:root {
  color-scheme: dark;
  --ink: #314b74;
  --cream: #fbf7f0;
  --gold: #f6d28c;
  --gold-deep: #bd8754;
  --violet: #7355b8;
  --violet-light: #a889e3;
  --teal: #348f93;
  --teal-light: #63bbb5;
  --night: #15275a;
}

* { box-sizing: border-box; }

html,
body { width: 100%; min-height: 100%; margin: 0; }

body {
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--cream);
  background: #071329;
  font-family: "FZLanTingHeiS", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
a { font: inherit; -webkit-tap-highlight-color: transparent; }

button { cursor: pointer; }

.roam-app {
  position: relative;
  width: min(100vw, 560px);
  height: 100svh;
  min-height: 640px;
  max-height: 1000px;
  overflow: hidden;
  isolation: isolate;
  background: #17336e;
  box-shadow: 0 0 60px rgba(0, 0, 0, .54);
}

.world-backdrop,
.world-wash,
.forest-scene,
.starlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.world-backdrop {
  z-index: -4;
  background-image: url("assets/star-roam/star-roam-scene-v3.jpg");
  background-position: center;
  background-size: 100% 100%;
  filter: saturate(.94) contrast(1.03) brightness(.82);
}

.world-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 27%, rgba(61, 111, 145, .28) 34%, transparent 42%, transparent 58%, rgba(61, 111, 145, .28) 66%, transparent 73%),
    radial-gradient(ellipse at 50% 20%, rgba(86, 121, 173, .32), transparent 40%);
  mix-blend-mode: screen;
}

.world-wash {
  z-index: -3;
  background:
    linear-gradient(180deg, rgba(37, 33, 100, .18) 0%, rgba(18, 77, 108, .05) 44%, rgba(4, 27, 66, .3) 100%),
    radial-gradient(circle at 50% 52%, rgba(101, 213, 235, .18), transparent 35%);
}

.roam-app[data-realm="bloom"] .world-wash {
  background:
    linear-gradient(180deg, rgba(32, 77, 103, .12), rgba(39, 115, 103, .1) 54%, rgba(6, 39, 59, .18)),
    radial-gradient(circle at 50% 48%, rgba(147, 231, 191, .15), transparent 38%);
}

.forest-scene { z-index: -2; overflow: hidden; }
.forest-scene::before {
  content: "";
  position: absolute;
  top: -2%;
  left: 30%;
  right: 30%;
  height: 27%;
  border-radius: 0 0 48% 48%;
  background: radial-gradient(ellipse at 50% 30%, rgba(40, 54, 123, .76), rgba(34, 81, 125, .28) 58%, transparent 76%);
  box-shadow: 0 0 28px 20px rgba(48, 82, 133, .2);
}
.forest-mist {
  position: absolute;
  top: 23%;
  left: 8%;
  right: 8%;
  height: 52%;
  background:
    radial-gradient(ellipse at 50% 15%, rgba(167, 224, 255, .3), transparent 42%),
    radial-gradient(ellipse at 50% 88%, rgba(115, 209, 228, .2), transparent 47%);
  filter: blur(8px);
}

.water-path {
  position: absolute;
  left: 27%;
  right: 27%;
  bottom: -5%;
  height: 68%;
  clip-path: polygon(42% 0, 58% 0, 70% 45%, 94% 100%, 6% 100%, 30% 45%);
  background:
    repeating-linear-gradient(175deg, transparent 0 25px, rgba(216, 246, 255, .18) 27px 29px, transparent 31px 48px),
    linear-gradient(90deg, rgba(41, 130, 164, .24), rgba(131, 226, 239, .6) 48%, rgba(41, 130, 164, .24));
  opacity: .78;
  filter: drop-shadow(0 0 13px rgba(88, 207, 238, .45));
}

.flower-canopy {
  position: absolute;
  top: -6%;
  left: -8%;
  right: -8%;
  height: 28%;
  background: linear-gradient(180deg, rgba(11, 34, 62, .28), transparent 72%);
}
.flower-canopy::before,
.flower-canopy::after {
  content: "";
  position: absolute;
  top: 0;
  width: 43%;
  height: 100%;
  background: none;
  filter: drop-shadow(0 0 7px rgba(217, 188, 255, .35));
}
.flower-canopy::before { left: 0; transform: rotate(-7deg); }
.flower-canopy::after { right: 0; transform: scaleX(-1) rotate(-7deg); }
.flower-canopy > i {
  position: absolute;
  top: 20%;
  width: 2px;
  height: 35%;
  border-radius: 50%;
  background: linear-gradient(#79968b, transparent);
  transform-origin: top;
}
.flower-canopy > i::after {
  content: "✦";
  position: absolute;
  left: 50%;
  bottom: -7px;
  color: #f7cfbd;
  font-family: Georgia, serif;
  font-size: 13px;
  text-shadow: 0 0 7px #ffddc5;
  transform: translateX(-50%);
}
.flower-canopy i:nth-child(1) { left: 8%; height: 48%; transform: rotate(-9deg); }
.flower-canopy i:nth-child(2) { left: 22%; height: 30%; }
.flower-canopy i:nth-child(3) { left: 37%; height: 43%; transform: rotate(5deg); }
.flower-canopy i:nth-child(4) { right: 37%; height: 35%; transform: rotate(-4deg); }
.flower-canopy i:nth-child(5) { right: 22%; height: 46%; }
.flower-canopy i:nth-child(6) { right: 8%; height: 31%; transform: rotate(8deg); }

.flower-bank { display: none; }
.flower-bank-left { left: -6%; }
.flower-bank-right { right: -6%; transform: scaleX(-1); }
.flower-bank::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 92%, rgba(20, 73, 74, .96) 0 22%, transparent 23%),
    radial-gradient(ellipse at 46% 75%, rgba(35, 101, 85, .88) 0 17%, transparent 18%),
    radial-gradient(ellipse at 11% 52%, rgba(31, 84, 80, .85) 0 13%, transparent 14%),
    radial-gradient(ellipse at 67% 44%, rgba(31, 91, 89, .82) 0 12%, transparent 13%),
    linear-gradient(90deg, rgba(8, 35, 58, .92), transparent);
  filter: blur(1px);
}
.flower-bank i {
  position: absolute;
  width: 32px;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 225, 164, .58);
  border-radius: 48% 52% 46% 54%;
  background:
    radial-gradient(circle, #fff6bf 0 11%, transparent 13%),
    conic-gradient(from 10deg, #d6b5ef, #8fb5dc, #f2c4e9, #bca2e9, #d6b5ef);
  box-shadow: inset 0 0 13px rgba(255,255,255,.55), 0 0 13px rgba(233, 204, 255, .48);
  transform: rotate(45deg);
}
.flower-bank i:nth-child(1) { left: 12%; top: 6%; width: 22px; }
.flower-bank i:nth-child(2) { left: 54%; top: 19%; width: 29px; }
.flower-bank i:nth-child(3) { left: 5%; top: 37%; width: 43px; }
.flower-bank i:nth-child(4) { left: 61%; top: 48%; width: 36px; }
.flower-bank i:nth-child(5) { left: 16%; top: 66%; width: 51px; }
.flower-bank i:nth-child(6) { left: 66%; top: 77%; width: 42px; }
.flower-bank i:nth-child(7) { left: 31%; top: 91%; width: 31px; }

.starlight { z-index: 0; overflow: hidden; }
.starlight i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff6bd;
  box-shadow: 0 0 7px #ffe98c, 0 0 13px rgba(176, 225, 255, .9);
  animation: twinkle 2.8s ease-in-out infinite alternate;
}
.starlight i:nth-child(1) { top: 7%; left: 13%; }
.starlight i:nth-child(2) { top: 12%; left: 71%; animation-delay: -1s; }
.starlight i:nth-child(3) { top: 31%; left: 48%; animation-delay: -.5s; }
.starlight i:nth-child(4) { top: 43%; left: 9%; animation-delay: -1.7s; }
.starlight i:nth-child(5) { top: 57%; left: 87%; animation-delay: -2.1s; }
.starlight i:nth-child(6) { top: 71%; left: 21%; animation-delay: -.9s; }
.starlight i:nth-child(7) { top: 83%; left: 72%; animation-delay: -2.5s; }
.starlight i:nth-child(8) { top: 92%; left: 36%; animation-delay: -1.4s; }

.brand-block {
  position: absolute;
  z-index: 4;
  top: 4.3%;
  left: 15%;
  right: 15%;
  text-align: center;
  pointer-events: none;
}

.brand-block h1 {
  margin: 0;
  color: #fff7df;
  font-family: "STKaiti", "KaiTi", "FangSong", serif;
  font-size: clamp(42px, 10.5vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  text-shadow:
    0 2px 0 #b87538,
    0 0 2px #fff,
    0 0 11px rgba(255, 213, 120, .94),
    0 0 27px rgba(255, 233, 164, .55);
}

.title-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 19px;
  margin-bottom: -2px;
  color: #ffe8a3;
}
.title-ornament i { width: 28%; height: 1px; background: linear-gradient(90deg, transparent, #ffe4a0); }
.title-ornament i:last-child { transform: scaleX(-1); }
.title-ornament b { font-family: Georgia, serif; font-size: 16px; text-shadow: 0 0 8px #fff4a2; }

.close-button {
  position: absolute;
  z-index: 9;
  top: 6.5%;
  right: 5.5%;
  width: clamp(39px, 10.5vw, 54px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 239, 201, .92);
  border-radius: 50%;
  color: #a76d42;
  background: linear-gradient(150deg, #fff7e5, #ecd0a0);
  box-shadow: inset 0 0 0 3px rgba(185, 133, 73, .2), 0 4px 13px rgba(14, 21, 59, .37);
  font-family: Georgia, serif;
  font-size: clamp(31px, 8vw, 43px);
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.roam-broadcast {
  position: absolute;
  z-index: 5;
  top: 15.2%;
  left: 20.5%;
  right: 20.5%;
  height: 3.05%;
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  overflow: hidden;
  border: 1px solid rgba(207, 179, 228, .72);
  border-radius: 999px;
  color: #f7effd;
  background: rgba(44, 66, 127, .83);
  box-shadow: inset 0 0 14px rgba(157, 198, 244, .12), 0 3px 13px rgba(14, 20, 67, .2);
  backdrop-filter: blur(5px);
}
.roam-broadcast span { flex: 0 0 auto; font-size: clamp(11px, 2.9vw, 15px); }
.roam-broadcast p { min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(10px, 2.7vw, 14px); }

.side-action {
  position: absolute;
  z-index: 8;
  top: 16.4%;
  width: 14.2%;
  min-width: 54px;
  padding: 0;
  border: 0;
  color: #f9f4ff;
  background: transparent;
  text-align: center;
  filter: drop-shadow(0 2px 4px rgba(8, 19, 57, .45));
}
.guide-action { left: 1.2%; }
.record-action { right: 1.2%; }
.side-action > span {
  position: relative;
  width: clamp(52px, 13vw, 72px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin: 0 auto 2px;
  border: 1.5px solid rgba(247, 220, 185, .9);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(94, 89, 161, .92), rgba(41, 93, 135, .92));
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .09), 0 3px 10px rgba(8, 22, 58, .42);
}
.side-action b { display: block; font-size: clamp(11px, 3vw, 15px); font-weight: 700; text-shadow: 0 2px 4px #273568; }
.book-icon { color: #9c6149; font-family: Georgia, serif; font-size: clamp(30px, 8vw, 43px); font-weight: 800; text-shadow: 0 1px 0 #fff; }
.book-icon::before {
  content: "";
  position: absolute;
  inset: 18% 19%;
  z-index: -1;
  border: 2px solid #ba755e;
  border-radius: 5px 8px 8px 5px;
  background: linear-gradient(145deg, #ffeade, #f5c7bd);
  transform: rotate(8deg);
}
.jar-icon::before {
  content: "";
  position: absolute;
  top: 13%;
  left: 30%;
  width: 40%;
  height: 13%;
  border: 2px solid #d6d5f0;
  border-radius: 3px;
  background: #6e5066;
}
.jar-icon::after {
  content: "";
  position: absolute;
  inset: 24% 23% 13%;
  border: 2px solid rgba(233, 241, 255, .9);
  border-radius: 7px 7px 18px 18px;
  background: linear-gradient(160deg, rgba(255,255,255,.55), rgba(96,141,197,.16));
  box-shadow: inset 0 0 14px rgba(255, 238, 158, .6);
}
.jar-icon i { z-index: 1; color: #fff1a5; font-family: Georgia, serif; font-size: clamp(19px, 5vw, 28px); font-style: normal; text-shadow: 0 0 8px #ffe98a; }

.realm-tabs {
  position: absolute;
  z-index: 7;
  top: 19.2%;
  left: 17.1%;
  right: 17.1%;
  height: 5.25%;
  min-height: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.4%;
}

.realm-tabs button {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px solid rgba(240, 208, 148, .82);
  border-radius: 999px;
  color: #ffe7ac;
  background: linear-gradient(155deg, rgba(74, 86, 139, .94), rgba(42, 111, 131, .93));
  box-shadow: inset 0 0 13px rgba(255,255,255,.08), 0 3px 12px rgba(13, 28, 70, .32);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(16px, 4.4vw, 24px);
  font-weight: 800;
  white-space: nowrap;
}
.realm-tabs button[data-realm="forest"] { background: linear-gradient(155deg, rgba(129, 93, 197, .95), rgba(79, 71, 154, .95)); }
.realm-tabs button[data-realm="bloom"] { background: linear-gradient(155deg, rgba(49, 130, 145, .96), rgba(39, 99, 129, .95)); }
.realm-tabs button[aria-pressed="true"] { box-shadow: inset 0 0 18px rgba(255, 240, 194, .18), 0 0 0 2px rgba(255, 230, 166, .26), 0 4px 14px rgba(10, 25, 63, .42); transform: translateY(-1px); }
.tab-mark { position: relative; width: 28px; height: 25px; flex: 0 0 auto; }
.butterfly-mark::before,
.butterfly-mark::after {
  content: "";
  position: absolute;
  top: 5px;
  width: 15px;
  height: 17px;
  border: 1px solid rgba(255,255,255,.5);
  background: linear-gradient(145deg, #eebaff, #9fb9ff);
  box-shadow: 0 0 7px rgba(226, 198, 255, .72);
}
.butterfly-mark::before { left: 0; border-radius: 75% 25% 65% 35%; transform: rotate(-25deg); }
.butterfly-mark::after { right: 0; border-radius: 25% 75% 35% 65%; transform: rotate(25deg); }
.butterfly-mark i { position: absolute; z-index: 2; top: 6px; left: 13px; width: 3px; height: 16px; border-radius: 50%; background: #ffe2bc; }
.bloom-mark::before {
  content: "✿";
  position: absolute;
  inset: -4px 0 0;
  display: grid;
  place-items: center;
  color: #fff5fc;
  font-family: Georgia, serif;
  font-size: 29px;
  text-shadow: 0 0 6px #ffcce3;
}
.bloom-mark i { position: absolute; z-index: 2; top: 10px; left: 11px; width: 7px; height: 7px; border-radius: 50%; background: #f3bd84; }

.route-panel {
  position: absolute;
  z-index: 4;
  top: 27.25%;
  left: 2.7%;
  right: 2.7%;
  height: 16.2%;
}

.node-list { height: 100%; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.2%; align-items: start; }
.route-node {
  position: relative;
  z-index: 0;
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 2px;
  justify-items: center;
  padding: 0;
  border: 0;
  color: #3b5773;
  background: transparent;
}
.route-node::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 4%;
  right: 4%;
  bottom: 12px;
  height: 31px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 16% 35%, #f5d8fc 0 3px, transparent 4px),
    radial-gradient(circle at 72% 24%, #fff1c7 0 3px, transparent 4px),
    radial-gradient(circle at 88% 60%, #d6b8ed 0 2px, transparent 3px),
    radial-gradient(ellipse at 50% 70%, #5b946d 0 44%, #315f58 47% 65%, transparent 67%);
  filter: drop-shadow(0 4px 4px rgba(12, 39, 53, .34));
}

.portal-art {
  position: relative;
  z-index: 0;
  isolation: isolate;
  width: min(96%, 94px);
  height: 100%;
  max-height: 124px;
  min-height: 77px;
  overflow: visible;
}

.portal-vines {
  position: absolute;
  z-index: 3;
  inset: -2% -1% 4%;
  border-radius: 48% 48% 30% 30%;
  background:
    radial-gradient(ellipse at 11% 36%, #74966d 0 5%, transparent 6%),
    radial-gradient(ellipse at 89% 38%, #6c916a 0 5%, transparent 6%),
    radial-gradient(ellipse at 17% 66%, #5c8066 0 6%, transparent 7%),
    radial-gradient(ellipse at 83% 68%, #608668 0 6%, transparent 7%),
    radial-gradient(ellipse at 34% 11%, #809873 0 5%, transparent 6%),
    radial-gradient(ellipse at 67% 10%, #849c76 0 5%, transparent 6%);
  filter: drop-shadow(0 2px 2px rgba(26, 53, 57, .38));
}

.portal-vines::before,
.portal-vines::after {
  content: "";
  position: absolute;
  top: 8%;
  bottom: 7%;
  width: 22%;
  border: 3px solid #699267;
  opacity: .85;
}
.portal-vines::before { left: 4%; border-right: 0; border-radius: 70% 0 0 35%; transform: rotate(-5deg); }
.portal-vines::after { right: 4%; border-left: 0; border-radius: 0 70% 35% 0; transform: rotate(5deg); }

.portal-vines > i {
  position: absolute;
  z-index: 4;
  width: 15px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #fff5b8 0 13%, transparent 15%),
    radial-gradient(ellipse at 50% 18%, #f5d8f7 0 19%, transparent 21%),
    radial-gradient(ellipse at 81% 42%, #d0b8ed 0 19%, transparent 21%),
    radial-gradient(ellipse at 69% 78%, #f7e3ed 0 19%, transparent 21%),
    radial-gradient(ellipse at 31% 78%, #c7b5ed 0 19%, transparent 21%),
    radial-gradient(ellipse at 19% 42%, #f0d3f7 0 19%, transparent 21%);
  box-shadow: 0 0 6px rgba(255, 238, 189, .95);
}
.portal-vines > i:nth-child(1) { top: 1%; left: 42%; width: 18px; }
.portal-vines > i:nth-child(2) { top: 25%; left: 4%; width: 12px; transform: rotate(-12deg); }
.portal-vines > i:nth-child(3) { top: 27%; right: 3%; width: 12px; transform: rotate(14deg); }
.portal-vines > i:nth-child(4) { top: 59%; left: 2%; width: 11px; }
.portal-vines > i:nth-child(5) { top: 61%; right: 2%; width: 11px; }
.portal-vines > i:nth-child(6) { bottom: 4%; left: 44%; width: 12px; }

.portal-frame {
  position: absolute;
  z-index: 2;
  top: 8%;
  left: 17%;
  right: 17%;
  bottom: 12%;
  padding: 4px;
  border: 2px solid rgba(255, 240, 194, .98);
  border-radius: 50% 50% 16% 16% / 35% 35% 9% 9%;
  background: linear-gradient(90deg, #8d70c8, #d3b9ea 48%, #8c70c9);
  box-shadow:
    inset 0 0 0 2px rgba(91, 86, 178, .72),
    0 0 8px rgba(255, 236, 167, .9),
    0 5px 9px rgba(26, 41, 85, .35);
}

.portal-door {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(226, 237, 255, .74);
  border-radius: 49% 49% 12% 12% / 34% 34% 7% 7%;
  background:
    radial-gradient(circle at 50% 72%, rgba(208, 255, 255, .95), transparent 24%),
    linear-gradient(90deg, transparent 47%, rgba(242, 251, 255, .76) 49%, rgba(242, 251, 255, .76) 51%, transparent 53%),
    linear-gradient(180deg, #755ccc 0%, #8a78df 38%, #58c2df 100%);
  box-shadow: inset 0 0 14px rgba(225, 244, 255, .9);
}
.portal-door::before {
  content: "";
  position: absolute;
  inset: 13% 11% 5%;
  background:
    linear-gradient(68deg, transparent 45%, rgba(231, 247, 255, .67) 47% 49%, transparent 51%) 0 0 / 20px 28px,
    linear-gradient(112deg, transparent 45%, rgba(231, 247, 255, .56) 47% 49%, transparent 51%) 0 0 / 22px 31px;
  opacity: .76;
}
.portal-door > i {
  position: absolute;
  top: 18%;
  width: 1px;
  height: 72%;
  background: linear-gradient(transparent, rgba(229, 249, 255, .85), transparent);
  box-shadow: 0 0 5px #d5f8ff;
}
.portal-door > i:nth-child(1) { left: 20%; }
.portal-door > i:nth-child(2) { left: 39%; height: 58%; }
.portal-door > i:nth-child(3) { right: 39%; height: 62%; }
.portal-door > i:nth-child(4) { right: 20%; }
.portal-crown {
  position: absolute;
  z-index: 4;
  top: 5%;
  left: 50%;
  width: 7px;
  aspect-ratio: 1;
  border-radius: 1px;
  background: #fff8bd;
  box-shadow: 0 0 7px #fff, 0 0 13px #ffeca1;
  transform: translateX(-50%) rotate(45deg);
}
.portal-plinth {
  position: absolute;
  z-index: 5;
  left: 8%;
  right: 8%;
  bottom: 4%;
  height: 16%;
  border: 1px solid rgba(255, 231, 182, .88);
  border-radius: 50%;
  background: linear-gradient(180deg, #e1cae6, #7567a5 42%, #4a796c 72%);
  box-shadow: 0 3px 5px rgba(26, 42, 62, .45), 0 0 6px rgba(255, 230, 168, .7);
}
.node-mark { position: absolute; z-index: 6; inset: 0; display: none; place-items: center; color: rgba(245,250,255,.75); font-family: Georgia, serif; font-size: 12px; text-shadow: 0 0 7px #bff5ff; }
.route-node > b {
  position: absolute;
  z-index: 8;
  bottom: 18%;
  min-width: 72%;
  max-width: 100%;
  min-height: 22px;
  display: grid;
  place-items: center;
  padding: 2px 5px;
  overflow: hidden;
  border: 1px solid rgba(201, 164, 115, .68);
  border-radius: 999px;
  color: #3f586d;
  background: rgba(255, 249, 233, .94);
  box-shadow: 0 2px 7px rgba(25, 43, 83, .22);
  font-size: clamp(9px, 2.45vw, 13px);
  white-space: nowrap;
}
.route-node.is-active .portal-art { transform: translateY(-3px) scale(1.04); filter: saturate(1.15) brightness(1.08); }
.route-node.is-active > b { color: #6e4c88; box-shadow: 0 0 0 2px rgba(255, 228, 167, .42), 0 3px 9px rgba(25,43,83,.25); }
.route-node.is-complete .portal-crown { background: #f4ffb5; box-shadow: 0 0 8px #fff, 0 0 15px #d5ff91; }
.route-node.is-locked .portal-art { filter: none; opacity: 1; }
.route-node.is-locked .portal-door { filter: saturate(.64) brightness(.83); }

.reward-stage {
  position: absolute;
  z-index: 5;
  top: 48.2%;
  left: 21.7%;
  right: 21.7%;
  height: 27.2%;
  padding: 4.8% 7.5% 3.8%;
  border: 2px solid rgba(222, 184, 118, .9);
  border-radius: 7% 7% 10% 10% / 5% 5% 6% 6%;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(233, 207, 149, .35), transparent 13%) top left / 28px 28px no-repeat,
    linear-gradient(225deg, rgba(233, 207, 149, .35), transparent 13%) top right / 28px 28px no-repeat,
    linear-gradient(45deg, rgba(233, 207, 149, .35), transparent 13%) bottom left / 28px 28px no-repeat,
    linear-gradient(315deg, rgba(233, 207, 149, .35), transparent 13%) bottom right / 28px 28px no-repeat,
    rgba(252, 248, 242, .965);
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.32), 0 8px 24px rgba(18, 34, 80, .3);
}
.reward-stage::before,
.reward-stage::after {
  content: "❧";
  position: absolute;
  bottom: 3px;
  color: rgba(196, 152, 86, .6);
  font-family: Georgia, serif;
  font-size: 18px;
}
.reward-stage::before { left: 7px; transform: rotate(18deg); }
.reward-stage::after { right: 7px; transform: rotate(162deg); }
.panel-crown { position: absolute; top: -11px; left: 20%; right: 20%; display: flex; align-items: center; justify-content: center; color: #d9a963; }
.panel-crown i { width: 35%; height: 1px; background: linear-gradient(90deg, transparent, #dfb777); }
.panel-crown i:last-child { transform: scaleX(-1); }
.panel-crown b { margin: 0 5px; font-family: Georgia, serif; font-size: 14px; }
.reward-stage > header { position: relative; z-index: 6; text-align: center; }
.reward-stage h2 { margin: 0; font-family: "STKaiti", "KaiTi", serif; font-size: clamp(19px, 5.2vw, 29px); font-weight: 800; line-height: 1.1; white-space: nowrap; }
.reward-grid { height: calc(100% - 28px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4%; padding-top: 1%; }
.reward-option { min-width: 0; display: grid; grid-template-rows: 1fr auto auto; justify-items: center; align-items: end; color: var(--ink); text-align: center; }
.gift-orb {
  position: relative;
  width: min(96%, 116px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: #fff6c4;
}

.gift-orb.kind-glyph {
  border: 2px solid rgba(255, 232, 179, .9);
  border-radius: 47% 53% 49% 51% / 55% 52% 48% 45%;
  background: radial-gradient(circle at 35% 25%, rgba(255,255,255,.95), transparent 19%), linear-gradient(145deg, var(--gift-a), var(--gift-b));
  box-shadow: inset 0 -12px 22px rgba(82, 47, 91, .18), inset 0 0 16px rgba(255,255,255,.4), 0 6px 14px rgba(48, 52, 99, .2), 0 0 10px var(--gift-glow);
}
.gift-orb.kind-glyph::before { content: ""; position: absolute; inset: 8%; border: 1px solid rgba(255,255,255,.43); border-radius: inherit; }
.gift-orb.kind-glyph::after { content: "✦"; position: absolute; right: 15%; top: 13%; color: #fff; font-family: Georgia, serif; font-size: 10px; text-shadow: 0 0 5px white; }
.gift-glyph { position: relative; z-index: 2; font-family: "STKaiti", "KaiTi", serif; font-size: clamp(24px, 6.8vw, 38px); font-style: normal; font-weight: 800; text-shadow: 0 1px 1px rgba(72,44,64,.35), 0 0 8px rgba(255,245,183,.92); }

.amber-core {
  position: absolute;
  inset: 3% 8% 0;
  overflow: hidden;
  border: 2px solid #e6a22d;
  border-radius: 49% 51% 45% 55% / 54% 50% 50% 46%;
  background:
    radial-gradient(circle at 31% 18%, rgba(255,255,255,.96), transparent 11%),
    radial-gradient(circle at 59% 73%, rgba(255,244,157,.85) 0 3%, transparent 4%),
    radial-gradient(circle at 30% 67%, rgba(255,232,124,.72) 0 2%, transparent 3%),
    radial-gradient(circle at 75% 42%, rgba(255,246,170,.7) 0 2%, transparent 3%),
    linear-gradient(145deg, #ffeaa0 0%, #efb335 45%, #bd6d15 100%);
  box-shadow: inset 0 0 20px rgba(255,255,255,.68), inset 0 -15px 18px rgba(164,84,14,.22), 0 5px 10px rgba(133,82,25,.3), 0 0 10px rgba(255,202,71,.68);
}
.amber-core::before { content: ""; position: absolute; inset: 5%; border: 1px solid rgba(255,250,198,.72); border-radius: inherit; }
.amber-butterfly { position: absolute; z-index: 2; inset: 28% 22% 24%; transform: rotate(-3deg); }
.amber-butterfly > i { position: absolute; top: 0; width: 46%; height: 59%; border: 1px solid rgba(255,247,179,.9); background: linear-gradient(145deg, #fff3a7, #e29a23 66%, #a8580f); box-shadow: inset 0 0 6px rgba(255,255,255,.65), 0 0 6px rgba(255,240,144,.8); }
.amber-butterfly > i::after { content: ""; position: absolute; top: 66%; width: 76%; height: 64%; border: inherit; background: linear-gradient(150deg, #f8c94f, #b86513); }
.amber-butterfly > i:first-child { left: 2%; border-radius: 78% 22% 64% 36%; transform: rotate(-20deg); }
.amber-butterfly > i:first-child::after { right: 2%; border-radius: 65% 32% 72% 25%; transform: rotate(13deg); }
.amber-butterfly > i:nth-child(2) { right: 2%; border-radius: 22% 78% 36% 64%; transform: rotate(20deg); }
.amber-butterfly > i:nth-child(2)::after { left: 2%; border-radius: 32% 65% 25% 72%; transform: rotate(-13deg); }
.amber-butterfly > b { position: absolute; z-index: 3; top: 17%; left: 47%; width: 7%; height: 64%; border-radius: 60%; background: linear-gradient(#fff0a7, #9f5010); box-shadow: 0 0 5px #fff1a6; }
.amber-spark { position: absolute; width: 3px; aspect-ratio: 1; border-radius: 50%; background: #fff9c8; box-shadow: 0 0 5px #fff; }
.spark-one { top: 22%; right: 17%; }.spark-two { left: 18%; bottom: 20%; }.spark-three { right: 28%; bottom: 12%; }

.dew-globe {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 12%;
  right: 12%;
  height: 80%;
  overflow: hidden;
  border: 2px solid rgba(255, 237, 207, .9);
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.96), transparent 13%),
    radial-gradient(circle at 58% 55%, rgba(255,242,177,.28), transparent 27%),
    linear-gradient(145deg, rgba(238, 228, 255, .94), rgba(162, 135, 218, .82));
  box-shadow: inset 0 0 17px rgba(255,255,255,.72), inset 0 -11px 17px rgba(102,80,158,.25), 0 0 11px rgba(203,182,255,.82), 0 5px 10px rgba(76,61,119,.27);
}
.dew-globe::after { content: ""; position: absolute; inset: 7%; border: 1px solid rgba(255,255,255,.6); border-radius: 50%; }
.star-heart { position: absolute; z-index: 3; left: 25%; top: 25%; width: 50%; aspect-ratio: 1; background: linear-gradient(145deg, #fffce0, #ffd36a); clip-path: polygon(50% 0, 61% 35%, 98% 36%, 68% 57%, 79% 94%, 50% 72%, 21% 94%, 32% 57%, 2% 36%, 39% 35%); filter: drop-shadow(0 0 5px white) drop-shadow(0 0 8px #ffe89a); }
.dew-shine { position: absolute; top: 18%; right: 19%; width: 5px; aspect-ratio: 1; background: white; transform: rotate(45deg); box-shadow: 0 0 6px white; }
.petal-cradle { position: absolute; z-index: 3; left: 8%; right: 8%; bottom: 2%; height: 34%; filter: drop-shadow(0 3px 3px rgba(52,72,94,.34)); }
.petal-cradle > i { position: absolute; bottom: 8%; left: 39%; width: 24%; height: 80%; border: 1px solid rgba(217,240,218,.5); border-radius: 80% 10% 80% 20%; background: linear-gradient(155deg, #89d8ad, #4d8c7f 62%, #6a65aa); transform-origin: 50% 100%; }
.petal-cradle > i:nth-child(1) { transform: rotate(-65deg); }.petal-cradle > i:nth-child(2) { transform: rotate(-34deg); }.petal-cradle > i:nth-child(3) { transform: rotate(0deg); }.petal-cradle > i:nth-child(4) { transform: rotate(34deg); }.petal-cradle > i:nth-child(5) { transform: rotate(65deg); }
}
.tone-amber { --gift-a: #ffd87f; --gift-b: #c17d21; --gift-glow: rgba(255,199,77,.7); }
.tone-dawn { --gift-a: #e9d7ff; --gift-b: #8871d1; --gift-glow: rgba(203,184,255,.72); }
.tone-mint { --gift-a: #b8f0d9; --gift-b: #4c9b89; --gift-glow: rgba(135,229,200,.62); }
.tone-rose { --gift-a: #ffc6d6; --gift-b: #b96486; --gift-glow: rgba(255,174,207,.65); }
.tone-sky { --gift-a: #b9e9ff; --gift-b: #547ac1; --gift-glow: rgba(137,213,255,.65); }
.tone-night { --gift-a: #a99ce9; --gift-b: #444783; --gift-glow: rgba(156,147,244,.62); }
.tone-gold { --gift-a: #ffe2a3; --gift-b: #bf7d42; --gift-glow: rgba(255,207,115,.65); }
.reward-option p { min-width: 0; margin: 6px 0 1px; }
.reward-option p b,
.reward-option p small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reward-option p b { font-family: "STKaiti", "KaiTi", serif; font-size: clamp(13px, 3.6vw, 19px); }
.reward-option p small { display: none; }
.reward-value { display: flex; align-items: center; gap: 3px; color: #456092; font-size: clamp(13px, 3.4vw, 18px); }
.reward-value::before { content: "◆"; color: #47b8f1; font-size: .8em; text-shadow: 0 1px 1px #197bc0; }
.reward-value b { font-family: Georgia, serif; font-size: 1em; }

.butterfly-mascot {
  position: absolute;
  z-index: 4;
  top: -22%;
  right: -23%;
  width: 53%;
  aspect-ratio: 1.2;
  filter: drop-shadow(0 5px 8px rgba(44, 48, 98, .4));
  transform: rotate(12deg);
  animation: butterfly-float 3.4s ease-in-out infinite;
  pointer-events: none;
}
.butterfly-mascot .wing {
  position: absolute;
  border: 2px solid rgba(255, 224, 167, .94);
  background:
    radial-gradient(circle at 28% 19%, rgba(255,255,255,.95), transparent 13%),
    radial-gradient(circle at 56% 48%, rgba(255,236,186,.32), transparent 20%),
    linear-gradient(145deg, rgba(255,200,229,.95), rgba(82,218,224,.9) 56%, rgba(74,111,201,.83));
  box-shadow: inset 0 0 15px rgba(255,255,255,.5), 0 0 9px rgba(255,228,166,.7);
}
.butterfly-mascot .wing::before,
.butterfly-mascot .wing::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 236, 190, .72);
  border-radius: inherit;
  pointer-events: none;
}
.butterfly-mascot .wing::before { inset: 12% 18% 22%; background: repeating-linear-gradient(62deg, transparent 0 10px, rgba(255,236,186,.62) 11px 12px, transparent 13px 20px); }
.butterfly-mascot .wing::after { inset: 35% 12% 9% 31%; border-left: 0; border-bottom: 0; transform: rotate(22deg); }
.butterfly-mascot .forewing { top: 4%; width: 44%; height: 62%; }
.butterfly-mascot .wing-left { left: 6%; border-radius: 88% 16% 75% 24% / 72% 24% 76% 28%; transform: rotate(-22deg); }
.butterfly-mascot .wing-right { right: 6%; border-radius: 16% 88% 24% 75% / 24% 72% 28% 76%; transform: rotate(22deg) scaleX(-1); }
.butterfly-mascot .hindwing { z-index: -1; top: 46%; width: 38%; height: 43%; background: linear-gradient(155deg, rgba(79,210,220,.9), rgba(209,170,229,.86)); }
.butterfly-mascot .hind-left { left: 14%; border-radius: 76% 24% 82% 18% / 45% 28% 72% 55%; transform: rotate(17deg); }
.butterfly-mascot .hind-right { right: 14%; border-radius: 24% 76% 18% 82% / 28% 45% 55% 72%; transform: rotate(-17deg) scaleX(-1); }
.butterfly-body { position: absolute; z-index: 5; top: 19%; left: 47.5%; width: 6%; height: 57%; border-radius: 65% 65% 45% 45%; background: linear-gradient(90deg, #523d78, #243d6b 45%, #795681); box-shadow: 0 0 4px rgba(255,225,169,.72); transform: rotate(3deg); }
.butterfly-body::before { content: ""; position: absolute; top: -8%; left: -15%; width: 130%; aspect-ratio: 1; border-radius: 50%; background: #4f4677; }
.butterfly-body > i { position: absolute; bottom: -14%; left: 28%; width: 42%; height: 22%; border-radius: 50%; background: #26395d; transform: rotate(-15deg); }
.butterfly-antennae::before,
.butterfly-antennae::after { content: ""; position: absolute; z-index: 6; top: 4%; left: 49%; width: 25%; height: 30%; border-top: 1.5px solid #ffe8b6; border-radius: 50%; transform-origin: left bottom; }
.butterfly-antennae::before { transform: rotate(-34deg); }
.butterfly-antennae::after { transform: scaleX(-1) rotate(-34deg); }
.wing-trails::before,
.wing-trails::after { content: ""; position: absolute; z-index: -2; top: 70%; width: 45%; height: 25%; border-bottom: 2px solid rgba(255, 225, 176, .78); border-radius: 50%; }
.wing-trails::before { left: 14%; transform: rotate(18deg); }
.wing-trails::after { right: 1%; transform: rotate(-18deg); }

.node-progress { display: none; }
.node-progress > i { height: 3px; overflow: hidden; border-radius: 999px; background: rgba(55, 84, 118, .15); }
.node-progress > i b { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #55b5b2, #ebc46c); transition: width 220ms ease; }
.node-progress small { font-size: 7px; }

.resource-bar {
  position: absolute;
  z-index: 7;
  top: 79.2%;
  left: 35.2%;
  right: 35.2%;
  height: 5.8%;
  min-height: 45px;
  display: grid;
  grid-template-columns: 31% 1fr 34%;
  align-items: center;
  border: 1.5px solid rgba(244, 203, 116, .84);
  border-radius: 999px;
  color: white;
  background: rgba(39, 61, 111, .92);
  box-shadow: inset 0 0 14px rgba(99, 154, 209, .18), 0 4px 13px rgba(8, 22, 60, .32);
}
.resource-bar > b { font-family: Georgia, serif; font-size: clamp(21px, 5.9vw, 32px); font-weight: 500; text-align: center; }
.resource-bar button { align-self: stretch; aspect-ratio: 1; margin: -2px; border: 2px solid #f4d493; border-radius: 50%; color: white; background: linear-gradient(145deg, #9c79d8, #5f4ca4); box-shadow: inset 0 0 0 3px rgba(255,255,255,.16), 0 0 8px rgba(255,215,133,.5); font-family: Georgia, serif; font-size: clamp(32px, 8vw, 45px); line-height: 1; }
.seed-flower { width: 43px; aspect-ratio: 1; display: grid; place-items: center; margin-left: -4px; border-radius: 50%; color: #fff8d0; background: radial-gradient(circle, #fff7c7 0 17%, #efbf6a 19% 34%, #bf8a54 36% 48%, transparent 50%); filter: drop-shadow(0 0 5px rgba(255, 216, 123, .72)); }
.seed-flower i { font-family: Georgia, serif; font-size: 16px; font-style: normal; }

.action-dock {
  position: absolute;
  z-index: 8;
  left: 6.1%;
  right: 6.1%;
  bottom: 2.7%;
  height: 10.3%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5.5%;
}
.action-dock button { min-width: 0; border: 2px solid rgba(248, 217, 151, .9); border-radius: 28% / 50%; color: white; box-shadow: inset 0 0 0 4px rgba(255,255,255,.08), inset 0 0 18px rgba(255,255,255,.15), 0 7px 14px rgba(5, 21, 57, .38); text-shadow: 0 2px 3px rgba(25, 35, 80, .5); }
.collect-button { background: linear-gradient(160deg, #9472de, #6650b3 78%); }
.auto-button { background: linear-gradient(160deg, #55b6b1, #328d91 78%); }
.action-dock button:disabled { cursor: not-allowed; }
.action-dock button > span { display: block; font-family: "STKaiti", "KaiTi", serif; font-size: clamp(22px, 6.2vw, 34px); font-weight: 800; line-height: 1.05; }
.action-dock button small { display: block; min-height: 17px; margin-top: 5px; color: rgba(255,248,232,.92); font-size: clamp(10px, 2.7vw, 14px); }
.action-dock button small i { color: #ffe287; font-style: normal; text-shadow: 0 0 5px #fff4a6; }
.action-dock .auto-button small { display: none; }

.roam-dialog,
.reward-dialog {
  width: min(88vw, 430px);
  max-height: 78svh;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(243, 209, 150, .9);
  border-radius: 12px;
  color: #f9f4ee;
  background: linear-gradient(155deg, rgba(36, 50, 104, .985), rgba(29, 92, 109, .985));
  box-shadow: 0 20px 60px rgba(3, 11, 37, .58), inset 0 0 0 3px rgba(255,255,255,.04);
}
.roam-dialog::backdrop,
.reward-dialog::backdrop { background: rgba(7, 15, 45, .72); backdrop-filter: blur(6px); }
.dialog-shell { padding: 19px; }
.dialog-shell > header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.13); }
.dialog-shell > header span,
.reward-shell > span { color: #f3ce7d; font-family: Georgia, serif; font-size: 9px; font-weight: 700; }
.dialog-shell h2 { margin: 3px 0 0; font-family: "STKaiti", "KaiTi", serif; font-size: 25px; }
.dialog-shell > header button { width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; color: white; background: rgba(255,255,255,.07); font-family: Georgia, serif; font-size: 25px; }
.dialog-content { max-height: 58svh; padding-top: 13px; overflow: auto; }
.rule-list,
.record-list { display: grid; gap: 9px; }
.rule-row,
.record-row { display: grid; align-items: center; gap: 11px; margin: 0; padding: 10px; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; background: rgba(255,255,255,.055); }
.rule-row { grid-template-columns: 32px 1fr; }
.rule-row > b { color: #f2ca72; font-family: Georgia, serif; font-size: 15px; }
.rule-row p,
.record-row p { min-width: 0; margin: 0; }
.rule-row p b,
.rule-row p small,
.record-row p b,
.record-row p small { display: block; }
.rule-row p b,
.record-row p b { font-size: 13px; }
.rule-row p small,
.record-row p small { margin-top: 3px; color: rgba(255,255,255,.66); font-size: 10px; line-height: 1.45; }
.record-row { grid-template-columns: 37px 1fr auto; }
.record-mini { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: #fff7d5; background: linear-gradient(145deg, var(--gift-a), var(--gift-b)); font-family: "STKaiti", "KaiTi", serif; font-size: 15px; box-shadow: inset 0 0 8px rgba(255,255,255,.28); }
.record-row time { color: rgba(255,255,255,.52); font-family: Georgia, serif; font-size: 9px; }
.record-empty { padding: 28px 14px; color: rgba(255,255,255,.68); text-align: center; font-size: 11px; line-height: 1.7; }

.reward-shell { padding: 24px 22px 20px; text-align: center; }
.reward-shell h2 { margin: 5px 0 16px; font-family: "STKaiti", "KaiTi", serif; font-size: 27px; }
.reward-reveal .gift-orb { width: 112px; margin: 0 auto; }
.reward-reveal .gift-orb i { font-size: 40px; }
.reward-reveal h3 { margin: 13px 0 3px; font-family: "STKaiti", "KaiTi", serif; font-size: 21px; }
.reward-reveal small { color: #f2d388; font-size: 10px; }
.reward-shell > p { margin: 15px 0 17px; color: rgba(255,255,255,.7); font-size: 11px; }
.reward-shell > button { width: 100%; height: 43px; border: 1px solid rgba(255,244,203,.7); border-radius: 999px; color: #36536a; background: linear-gradient(145deg, #ffe8a8, #e4b66a); font-weight: 800; }

.roam-toast {
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: 14.5%;
  max-width: 80%;
  padding: 8px 15px;
  border: 1px solid rgba(255, 229, 169, .58);
  border-radius: 999px;
  color: white;
  background: rgba(32, 50, 103, .94);
  box-shadow: 0 5px 18px rgba(6,19,54,.35);
  font-size: 11px;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}
.roam-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

@keyframes twinkle { from { opacity: .28; transform: scale(.7); } to { opacity: 1; transform: scale(1.35); } }
@keyframes butterfly-float { 0%, 100% { transform: translateY(0) rotate(10deg); } 50% { transform: translateY(-5px) rotate(7deg); } }

@media (min-width: 600px) {
  .roam-app { width: min(57.15vh, 560px); border-inline: 1px solid rgba(180, 209, 234, .12); }
}

@media (max-height: 700px) {
  .roam-app { min-height: 620px; }
  .brand-block { top: 3.8%; }
  .reward-stage { top: 47.3%; height: 29%; }
  .resource-bar { top: 78.2%; }
  .action-dock { bottom: 1.9%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
