:root {
  color-scheme: dark;
  --ink: #0b1e1d;
  --ink-2: #112a27;
  --ink-3: #18352f;
  --paper: #eee4ce;
  --paper-soft: #d7ccb7;
  --jade: #80a889;
  --jade-bright: #acd0a4;
  --cinnabar: #d66445;
  --gold: #c8a66b;
  --line: rgba(228, 215, 188, 0.16);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  --safe-top: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
  --safe-bottom: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  --native-toolbar-offset: 52px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  height: 100%;
  touch-action: manipulation;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--ink);
}

body {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  margin: 0;
  color: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  background:
    radial-gradient(circle at 15% -10%, rgba(83, 132, 105, 0.28), transparent 35%),
    radial-gradient(circle at 92% 12%, rgba(172, 96, 65, 0.14), transparent 28%),
    linear-gradient(165deg, #0a1a19 0%, #102723 48%, #071615 100%);
}

button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible {
  outline: 2px solid var(--jade-bright);
  outline-offset: 3px;
}

#app {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.app-shell {
  position: relative;
  width: min(100%, 520px);
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background:
    linear-gradient(rgba(225, 213, 185, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(225, 213, 185, 0.025) 1px, transparent 1px),
    linear-gradient(160deg, rgba(255, 255, 255, 0.015), transparent 44%);
  background-size: 36px 36px, 36px 36px, auto;
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.25);
}

.app-shell::before,
.app-shell::after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(2px);
}

.app-shell::before {
  width: 260px;
  height: 260px;
  top: 22%;
  left: max(calc(50% - 330px), -120px);
  background: radial-gradient(circle, rgba(110, 155, 121, 0.13), transparent 68%);
}

.app-shell::after {
  width: 300px;
  height: 300px;
  right: max(calc(50% - 340px), -150px);
  bottom: 4%;
  background: radial-gradient(circle, rgba(190, 97, 65, 0.11), transparent 70%);
}

.screen {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 0;
  padding: calc(18px + var(--safe-top)) 20px calc(24px + var(--safe-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: none;
}

.screen.with-nav { padding-top: calc(74px + var(--safe-top) + var(--native-toolbar-offset)); }
.screen.home-screen {
  padding-top: calc(18px + var(--safe-top) + var(--native-toolbar-offset));
  padding-bottom: calc(116px + var(--safe-bottom));
}

.top-nav {
  position: absolute;
  z-index: 10;
  inset: 0 0 auto;
  min-height: calc(58px + var(--safe-top) + var(--native-toolbar-offset));
  padding: calc(12px + var(--safe-top) + var(--native-toolbar-offset)) 16px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(8, 24, 22, 0.97), rgba(8, 24, 22, 0.72), transparent);
}

.nav-title {
  font-family: "Songti SC", "STSong", serif;
  font-size: 17px;
  letter-spacing: .18em;
  color: var(--paper);
}

.nav-spacer { width: 42px; height: 42px; }

.icon-button, .nav-back {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--paper);
  background: rgba(235, 226, 205, 0.06);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.icon-button:active, .nav-back:active, .primary-button:active, .secondary-button:active,
.action-card:active, .atlas-card:active, .region-card:active, .track-card:active { transform: scale(.98); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .28em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: .75;
}

.display-title {
  margin: 0;
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: clamp(44px, 13vw, 68px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: .09em;
  text-shadow: 0 8px 30px rgba(0, 0, 0, .25);
}

.display-title .accent { color: var(--cinnabar); }

.subtitle {
  margin: 18px 0 0;
  color: var(--paper-soft);
  font-family: "Songti SC", "STSong", serif;
  font-size: 15px;
  line-height: 1.9;
  letter-spacing: .05em;
}

.primary-button, .secondary-button, .ghost-button {
  min-height: 52px;
  border-radius: 18px;
  padding: 0 22px;
  border: 0;
  font-weight: 700;
  letter-spacing: .08em;
  cursor: pointer;
  transition: transform .18s ease, opacity .18s ease, background .18s ease;
}

.primary-button {
  color: #10201d;
  background: linear-gradient(135deg, #d7bf89, #99bd97);
  box-shadow: 0 12px 30px rgba(116, 154, 119, .22), inset 0 1px rgba(255, 255, 255, .4);
}

.secondary-button {
  color: var(--paper);
  border: 1px solid rgba(232, 217, 185, .23);
  background: rgba(229, 217, 190, .07);
}

.ghost-button {
  min-height: 42px;
  padding: 0 14px;
  color: var(--paper-soft);
  border: 1px solid var(--line);
  background: transparent;
}

.primary-button:disabled, .secondary-button:disabled { opacity: .4; cursor: default; }
.wide { width: 100%; }

.cover-screen {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cover-copy { padding-top: min(8vh, 70px); }

.cover-art {
  position: relative;
  height: min(42vh, 390px);
  margin: 8px -18px 4px;
  display: grid;
  place-items: center;
}

.cover-art::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(211, 189, 139, .25);
  border-radius: 50%;
  box-shadow: 0 0 0 24px rgba(211, 189, 139, .025), 0 0 0 52px rgba(211, 189, 139, .018);
}

.cover-mountain {
  position: absolute;
  inset: auto 0 0;
  height: 62%;
  background:
    linear-gradient(146deg, transparent 37%, rgba(78, 110, 91, .28) 37.4%, rgba(39, 71, 61, .48) 68%, transparent 68.4%) 0 100% / 70% 100% no-repeat,
    linear-gradient(215deg, transparent 38%, rgba(84, 97, 79, .27) 38.4%, rgba(27, 55, 49, .68) 74%, transparent 74.3%) 100% 100% / 68% 94% no-repeat;
  opacity: .8;
}

.cover-beast {
  position: relative;
  width: min(76vw, 320px);
  z-index: 2;
  animation: spiritFloat 4.8s ease-in-out infinite;
}

.cover-actions { padding-bottom: 4px; }
.cover-hint { margin: 14px 0 0; text-align: center; color: rgba(222, 210, 185, .55); font-size: 11px; letter-spacing: .08em; }

.progress-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 6px 0 14px;
  color: var(--paper-soft);
  font-size: 12px;
}

.progress-track {
  height: 3px;
  background: rgba(222, 210, 185, .1);
  overflow: hidden;
  border-radius: 99px;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cinnabar), var(--gold));
  transition: width .35s ease;
}

.question-wrap { padding-top: min(7vh, 58px); }
.scene-index { color: var(--gold); font-size: 12px; letter-spacing: .2em; }
.scene-copy { margin: 20px 0 8px; color: var(--paper-soft); font-family: "Songti SC", serif; font-size: 15px; line-height: 1.8; }
.question-title { margin: 0 0 30px; font-family: "Songti SC", serif; font-weight: 500; font-size: 28px; line-height: 1.45; }

.choice-list { display: grid; gap: 14px; }
.choice-button {
  position: relative;
  width: 100%;
  min-height: 92px;
  padding: 18px 20px 18px 62px;
  text-align: left;
  color: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(235, 223, 196, .08), rgba(235, 223, 196, .025));
  cursor: pointer;
}

.choice-button::before {
  content: attr(data-mark);
  position: absolute;
  left: 18px;
  top: 50%;
  width: 29px;
  height: 29px;
  border: 1px solid rgba(212, 188, 137, .36);
  border-radius: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  color: var(--gold);
  font-family: serif;
}

.choice-button:active { background: rgba(165, 191, 157, .15); transform: scale(.99); }

.reveal-screen { text-align: center; display: flex; flex-direction: column; align-items: center; }
.reveal-sigil { margin-top: 10px; color: var(--gold); font-size: 11px; letter-spacing: .4em; }
.reveal-art { width: min(82vw, 370px); margin: 16px auto -8px; animation: revealIn .9s cubic-bezier(.22, .8, .24, 1) both; }
.reveal-name { margin: 0; font-family: "Songti SC", serif; font-weight: 500; font-size: 42px; letter-spacing: .16em; }
.source-line { margin: 10px 0; color: var(--gold); font-size: 12px; }
.quote { margin: 16px auto; max-width: 390px; color: var(--paper-soft); font-family: "Songti SC", serif; font-size: 15px; line-height: 1.8; }
.trait-row { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 20px; }
.trait { padding: 7px 11px; border: 1px solid rgba(203, 173, 108, .25); border-radius: 99px; color: #dfc991; font-size: 11px; }
.explain-card { width: 100%; margin: 6px 0 18px; padding: 18px; border: 1px solid var(--line); border-radius: 20px; text-align: left; background: rgba(233, 222, 197, .045); }
.explain-card h3 { margin: 0 0 8px; color: var(--jade-bright); font-size: 12px; letter-spacing: .12em; }
.explain-card p { margin: 0; color: var(--paper-soft); font-size: 13px; line-height: 1.75; }
.explain-card + .explain-card { margin-top: -8px; }

.naming-screen { display: flex; flex-direction: column; justify-content: center; }
.naming-art { width: 210px; margin: 0 auto 12px; }
.naming-title { margin: 0; text-align: center; font-family: "Songti SC", serif; font-size: 30px; font-weight: 500; }
.naming-copy { margin: 12px auto 24px; max-width: 330px; text-align: center; color: var(--paper-soft); font-size: 13px; line-height: 1.7; }
.name-field {
  width: 100%;
  height: 58px;
  padding: 0 18px;
  color: var(--paper);
  border: 1px solid rgba(215, 195, 149, .32);
  border-radius: 18px;
  background: rgba(6, 22, 20, .55);
  text-align: center;
  font-family: "Songti SC", serif;
  font-size: 19px;
  -webkit-user-select: text;
  user-select: text;
}
.name-note { margin: 10px 0 22px; color: rgba(224, 211, 182, .5); text-align: center; font-size: 11px; }

.home-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stage-line { min-width: 0; flex: 1; color: var(--gold); font-size: 12px; letter-spacing: .08em; }
.stage-line strong { color: var(--paper); font-size: 16px; }
.header-actions { flex: 0 0 auto; display: flex; gap: 7px; }

.habitat {
  position: relative;
  min-height: 390px;
  margin: 12px -20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.habitat::before {
  content: "";
  position: absolute;
  width: 270px;
  height: 270px;
  top: 36px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(190, 166, 111, .13), rgba(104, 141, 112, .06) 48%, transparent 69%);
  border: 1px solid rgba(215, 191, 139, .08);
}

.habitat::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background:
    radial-gradient(ellipse at 50% 105%, #17322e 0 45%, transparent 46%),
    linear-gradient(146deg, transparent 35%, rgba(69, 98, 78, .42) 35.5%, #102824 72%, transparent 72.4%) 0 100% / 74% 100% no-repeat,
    linear-gradient(215deg, transparent 39%, rgba(80, 95, 75, .26) 39.5%, #0c211f 74%, transparent 74.3%) 100% 100% / 72% 88% no-repeat;
}

.music-atmosphere {
  position: absolute;
  z-index: 1;
  inset: 12px 0 12%;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(transparent, #000 14%, #000 82%, transparent);
  mask-image: linear-gradient(transparent, #000 14%, #000 82%, transparent);
}

.music-atmosphere i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  display: block;
  opacity: .55;
  animation-delay: var(--delay);
  animation-duration: var(--duration);
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}

.atmosphere-2 i {
  border-radius: 70% 10% 70% 30%;
  background: linear-gradient(135deg, #d9bf76, #71936f);
  box-shadow: 0 0 12px rgba(182, 211, 147, .45);
  animation-name: forestDrift;
}

.atmosphere-3 i {
  left: 50%;
  top: 48%;
  width: calc(48px + var(--i) * 29px);
  height: calc(48px + var(--i) * 29px);
  border: 1px solid rgba(222, 193, 128, .48);
  border-radius: 50%;
  background: transparent;
  transform: translate(-50%, -50%);
  animation-name: bowlRipple;
}

.atmosphere-3 i:nth-child(n+8) { display: none; }

.atmosphere-4 i {
  top: auto;
  bottom: -12%;
  border: 1px solid rgba(174, 224, 222, .65);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.55), rgba(102,185,190,.12) 45%, transparent 70%);
  animation-name: bubbleRise;
}

.atmosphere-5 i {
  top: auto;
  bottom: -10%;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, rgba(255,255,255,.78), rgba(218,130,165,.28) 34%, rgba(103,174,168,.18) 63%, transparent 72%);
  box-shadow: 0 0 16px rgba(211, 148, 185, .22);
  animation-name: dreamBubble;
}

.atmosphere-7 i {
  top: -18%;
  width: 1px;
  height: calc(34px + var(--size) * 2.4);
  border-radius: 99px;
  opacity: .34;
  background: linear-gradient(transparent, rgba(178, 211, 209, .9));
  transform: rotate(10deg);
  animation-name: rainFall;
  animation-timing-function: linear;
}

.atmosphere-11 {
  background: radial-gradient(circle at 50% 46%, rgba(235, 193, 99, .12), transparent 50%);
}

.atmosphere-11 i {
  border-radius: 50%;
  background: #f0ca73;
  box-shadow: 0 0 12px #eabf63, 0 0 28px rgba(241, 190, 85, .5);
  animation-name: tomorrowGlow;
}

.home-spirit { position: relative; z-index: 2; width: min(82vw, 350px); cursor: grab; user-select: none; -webkit-user-select: none; touch-action: manipulation; animation: spiritBreathe 4s ease-in-out infinite; }
.home-spirit.pet-happy { animation: petHappy .72s ease both; }
.home-spirit.pet-shy { animation: petShy .6s ease both; }
.home-spirit.pet-play { animation: petPlay .8s ease both; }
.home-spirit.pet-nuzzle { animation: petNuzzle 1.02s ease both; }
.speech-bubble {
  position: absolute;
  z-index: 5;
  top: 36px;
  left: 50%;
  max-width: 230px;
  padding: 10px 14px;
  border: 1px solid rgba(221, 208, 178, .2);
  border-radius: 16px 16px 16px 4px;
  color: var(--paper);
  background: rgba(12, 34, 31, .88);
  backdrop-filter: blur(12px);
  font-family: "Songti SC", serif;
  font-size: 13px;
  line-height: 1.5;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.speech-bubble.show { opacity: 1; transform: translate(-50%, 6px); }
.pet-name { position: relative; z-index: 3; margin-top: -10px; text-align: center; font-family: "Songti SC", serif; font-size: 24px; letter-spacing: .16em; }
.pet-origin { position: relative; z-index: 3; margin-top: 4px; color: var(--paper-soft); font-size: 11px; letter-spacing: .18em; }
.pet-hint { position: relative; z-index: 3; margin-top: 8px; color: rgba(220,207,177,.5); font-size: 10px; letter-spacing: .08em; }
.pet-effect { position: absolute; z-index: 4; left: 50%; top: 40%; width: 0; height: 0; pointer-events: none; }
.pet-effect i { position: absolute; left: 0; top: 0; color: var(--gold); font-size: 20px; font-style: normal; opacity: 0; text-shadow: 0 0 14px rgba(218,190,124,.65); animation: petParticle 1.05s ease-out both; animation-delay: calc(var(--pet-i) * 35ms); }
.pet-effect-hold i { color: #d9b4a4; }
.pet-effect-double i { font-size: 17px; }

.daily-title { display: flex; align-items: flex-end; justify-content: space-between; margin: 6px 0 12px; }
.daily-title h2, .section-title { margin: 0; font-family: "Songti SC", serif; font-weight: 500; font-size: 22px; letter-spacing: .06em; }
.daily-title span { color: var(--paper-soft); font-size: 11px; }
.action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.action-card {
  position: relative;
  min-height: 116px;
  padding: 15px 10px;
  color: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(150deg, rgba(228, 214, 185, .085), rgba(228, 214, 185, .025));
  text-align: left;
  cursor: pointer;
}
.action-card.done { border-color: rgba(128, 168, 137, .35); background: linear-gradient(150deg, rgba(122, 167, 133, .16), rgba(228, 214, 185, .025)); }
.action-icon { display: block; margin-bottom: 16px; color: var(--gold); font-family: "Songti SC", serif; font-size: 24px; }
.action-card strong { display: block; margin-bottom: 5px; font-size: 14px; }
.action-card small { color: var(--paper-soft); font-size: 10px; }
.done-mark { position: absolute; right: 10px; top: 10px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: #10211d; background: var(--jade-bright); font-size: 12px; }

.home-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
.home-link {
  min-height: 56px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: transparent;
  cursor: pointer;
}
.home-link strong { color: var(--paper); font-size: 13px; }

.bottom-note { margin: 20px 0 0; text-align: center; color: rgba(220, 207, 177, .42); font-size: 10px; line-height: 1.7; }

.panel-head { margin: 10px 0 24px; }
.panel-head h1 { margin: 0; font-family: "Songti SC", serif; font-size: 34px; font-weight: 500; }
.panel-head p { margin: 9px 0 0; color: var(--paper-soft); font-size: 13px; line-height: 1.7; }
.feed-panel-head { margin-bottom: 16px; }
.feed-panel-head small, .modal-kicker { display: block; margin-bottom: 7px; color: var(--gold); font-size: 10px; letter-spacing: .16em; }

.feed-arena {
  position: relative;
  height: min(56vh, 470px);
  min-height: 360px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 110%, rgba(111, 149, 112, .28), transparent 50%),
    linear-gradient(#102a27, #091b1a);
  touch-action: pan-y;
}
.feed-arena.is-locked { touch-action: pan-y; }
.feed-arena.is-playing { touch-action: none; }
.feed-target {
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #173028;
  background: radial-gradient(circle at 35% 30%, #f4e0ad, #c98d4a 65%, #854c34);
  box-shadow: 0 0 0 10px rgba(210, 164, 92, .08), 0 12px 24px rgba(0, 0, 0, .3);
  font-size: 26px;
  animation: targetPulse 1.4s ease-in-out infinite;
  transition: left .18s ease, top .18s ease;
}
.feed-target.hit { animation: targetHit .4s ease both; }
.feed-ready { position: absolute; inset: 0; padding: 26px; display: grid; place-content: center; gap: 8px; text-align: center; color: var(--paper-soft); }
.feed-ready span { width: 82px; height: 82px; margin: 0 auto 5px; display: grid; place-items: center; border: 1px solid rgba(210, 181, 119, .28); border-radius: 50%; color: var(--gold); font-family: "Songti SC", serif; font-size: 34px; background: rgba(205, 171, 108, .06); }
.feed-ready strong { color: var(--paper); font-family: "Songti SC", serif; font-size: 20px; font-weight: 500; letter-spacing: .12em; }
.feed-ready small { font-size: 11px; line-height: 1.6; }
.feed-start-button { width: min(230px, calc(100vw - 100px)); min-height: 50px; margin: 13px auto 0; position: relative; z-index: 3; touch-action: manipulation; }
.feed-game-guide, .rain-guide, .alternate-guide, .memory-hint { position: absolute; z-index: 2; left: 0; right: 0; top: 18px; color: var(--paper-soft); text-align: center; font-size: 11px; letter-spacing: .08em; pointer-events: none; }
.true-orb, .sequence-mark, .rain-light, .calm-mark, .alternate-orb, .rhythm-core, .hold-orb, .feed-fruit { border: 0; color: var(--paper); cursor: pointer; touch-action: none; }
.true-orb { position: absolute; width: 58px; height: 58px; border-radius: 50%; background: radial-gradient(circle, rgba(235,220,173,.4), rgba(115,151,132,.18)); box-shadow: 0 0 18px rgba(196,211,171,.08); font-size: 21px; }
.true-orb.is-true { color: #fff3bd; background: radial-gradient(circle at 38% 32%, #fff0b4, #c6954d 58%, #4f5e45); box-shadow: 0 0 30px rgba(240,204,123,.65); }
.sequence-mark { position: absolute; width: 60px; height: 60px; border: 1px solid rgba(210,188,136,.25); border-radius: 18px; color: var(--gold); background: rgba(224,210,177,.07); font-family: "Songti SC", serif; font-size: 23px; }
.sequence-mark.done { color: #11251f; border-color: transparent; background: var(--jade-bright); }
.wrong { animation: feedWrong .3s ease both; }
.hold-orb { position: absolute; width: 96px; height: 96px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; color: #1b3028; background: radial-gradient(circle at 35% 30%, #e8dab0, #bb8a4a); box-shadow: 0 0 0 12px rgba(207,174,109,.08); }
.hold-orb span { position: relative; z-index: 2; font-size: 14px; }
.hold-orb i { position: absolute; inset: auto 0 0; height: 0; background: rgba(137,197,154,.8); }
.hold-orb.holding i { height: 100%; transition: height .85s linear; }
.feed-nest { position: absolute; left: 50%; top: 50%; width: 126px; height: 126px; display: grid; place-items: center; border: 2px dashed rgba(191,211,164,.38); border-radius: 50%; color: var(--paper-soft); background: radial-gradient(circle, rgba(118,162,126,.2), transparent 68%); transform: translate(-50%, -50%); }
.feed-nest span { font-family: "Songti SC", serif; font-size: 16px; letter-spacing: .12em; }
.feed-fruit { position: absolute; width: 66px; height: 66px; border-radius: 46% 54% 50% 50%; color: #442c1e; background: radial-gradient(circle at 35% 28%, #f3cc83, #c76442 67%); box-shadow: 0 8px 20px rgba(0,0,0,.28); }
.feed-fruit.dragging { z-index: 5; transform: scale(1.08); }
.rhythm-wrap { position: absolute; inset: 0; display: grid; place-items: center; }
.rhythm-ring { position: absolute; width: 230px; height: 230px; border: 3px solid rgba(212,189,128,.6); border-radius: 50%; animation: rhythmClose 1.6s linear infinite; }
.rhythm-core { position: relative; z-index: 2; width: 92px; height: 92px; border-radius: 50%; color: #15291f; background: radial-gradient(circle at 35% 30%, #f0db9d, #b97d43); font-family: "Songti SC", serif; font-size: 25px; }
.rhythm-core.ready { box-shadow: 0 0 0 12px rgba(191,219,166,.16), 0 0 35px rgba(231,208,142,.65); }
.rhythm-wrap small { position: absolute; top: calc(50% + 80px); color: var(--paper-soft); }
.memory-grid { position: absolute; left: 50%; top: 54%; width: 250px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; transform: translate(-50%, -50%); }
.memory-pad { aspect-ratio: 1; border: 1px solid rgba(218,198,150,.2); border-radius: 28px; background: rgba(211,196,158,.07); }
.memory-pad.pad-0 { --pad-color: #cf7b5e; }.memory-pad.pad-1 { --pad-color: #cba65d; }.memory-pad.pad-2 { --pad-color: #78a797; }.memory-pad.pad-3 { --pad-color: #788eaf; }
.memory-pad.lit { border-color: transparent; background: var(--pad-color); box-shadow: 0 0 32px var(--pad-color); transform: scale(1.04); }
.rain-light { position: absolute; z-index: 3; top: -50px; width: 46px; height: 46px; border-radius: 50%; color: #f6e5a4; background: radial-gradient(circle, rgba(241,216,142,.72), rgba(105,147,126,.18)); animation: feedRain var(--rain-duration) linear forwards; }
.alternate-wrap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 26px; }
.alternate-orb { width: 118px; height: 160px; border: 1px solid rgba(219,203,165,.18); border-radius: 60px; color: var(--paper-soft); background: rgba(224,211,179,.06); font-family: "Songti SC", serif; font-size: 27px; }
.alternate-orb.active { color: #183027; border-color: transparent; background: var(--jade-bright); box-shadow: 0 0 28px rgba(164,207,165,.3); }
.calm-grid { position: absolute; left: 18px; right: 18px; top: 68px; bottom: 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.calm-mark { border: 1px solid rgba(221,206,172,.14); border-radius: 18px; color: rgba(218,207,183,.55); background: rgba(225,214,187,.04); font-family: "Songti SC", serif; font-size: 20px; }
.calm-mark.is-calm { color: var(--paper); border-color: rgba(173,208,164,.45); background: rgba(121,164,130,.17); }
.aim-ring {
  position: absolute;
  width: 74px;
  height: 74px;
  border: 2px solid rgba(220, 195, 137, .65);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
}
.aim-ring.show { opacity: 1; }
.feed-hud { display: flex; justify-content: space-between; margin: 14px 2px 18px; }
.feed-hud div { color: var(--paper-soft); font-size: 12px; }
.feed-hud strong { display: block; margin-top: 3px; color: var(--paper); font-size: 21px; }
.feed-tip { text-align: center; color: var(--paper-soft); font-size: 12px; line-height: 1.7; }

.pouch-list { display: grid; gap: 18px; }
.birthday-reminder { margin-bottom: 18px; padding: 20px; border: 1px solid rgba(207,178,116,.34); border-radius: 22px; background: linear-gradient(145deg, rgba(207,178,116,.12), rgba(118,162,128,.08)); }
.birthday-reminder small { display: block; margin-bottom: 7px; color: var(--gold); font-size: 13px; letter-spacing: .1em; }
.birthday-reminder strong { display: block; color: var(--paper); font-family: "Songti SC", serif; font-size: 22px; font-weight: 500; }
.birthday-reminder p { margin: 10px 0 17px; color: var(--paper-soft); font-size: 14px; line-height: 1.7; }
.birthday-reminder .primary-button { min-height: 50px; }
.birthday-setting { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; padding: 17px 18px; border: 1px solid rgba(207,178,116,.24); border-radius: 20px; background: rgba(225,213,185,.045); }
.birthday-setting div { min-width: 0; }
.birthday-setting small { display: block; margin-bottom: 6px; color: var(--gold); font-size: 12px; letter-spacing: .08em; }
.birthday-setting strong { display: block; color: var(--paper); font-family: "Songti SC", serif; font-size: 18px; font-weight: 500; }
.birthday-setting p { margin: 5px 0 0; color: var(--paper-soft); font-size: 12px; line-height: 1.55; }
.birthday-setting .secondary-button { min-height: 44px; flex: 0 0 auto; padding: 0 15px; border-radius: 15px; font-size: 13px; }
.pouch-card { overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(145deg, rgba(231,218,187,.07), rgba(231,218,187,.025)); }
.pouch-summary { padding: 20px; list-style: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pouch-summary::-webkit-details-marker { display: none; }
.pouch-summary-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 15px; padding-top: 13px; border-top: 1px solid rgba(222,207,175,.1); }
.pouch-summary-foot span { min-width: 0; display: flex; align-items: center; gap: 7px; color: var(--paper-soft); font-size: 13px; }
.pouch-summary-foot .pouch-color { width: 16px; height: 16px; }
.pouch-summary-foot em { flex: 0 0 auto; color: var(--gold); font-size: 12px; font-style: normal; }
.pouch-summary-foot em::after { content: "⌄"; display: inline-block; margin-left: 6px; transition: transform .2s ease; }
.pouch-card[open] .pouch-summary-foot em { font-size: 0; }
.pouch-card[open] .pouch-summary-foot em::before { content: "收起"; font-size: 12px; }
.pouch-card[open] .pouch-summary-foot em::after { font-size: 12px; transform: rotate(180deg); }
.pouch-card-body { padding: 0 20px 20px; border-top: 1px solid rgba(222,207,175,.1); }
.pouch-card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.pouch-card-head small { color: var(--gold); font-size: 13px; letter-spacing: .08em; }
.pouch-card-head h3 { margin: 5px 0 2px; font-family: "Songti SC", serif; font-size: 23px; font-weight: 500; }
.pouch-card-head p { margin: 0; color: var(--paper-soft); font-size: 13px; }
.pouch-number { flex: 0 0 72px; text-align: right; }
.pouch-number span { display: block; color: var(--paper-soft); font-size: 12px; }
.pouch-number strong { color: var(--gold); font-family: "Songti SC", serif; font-size: 38px; line-height: 1; }
.pouch-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 17px; }
.pouch-facts > div { min-width: 0; padding: 13px; border: 1px solid rgba(222,207,175,.12); border-radius: 16px; background: rgba(225,213,185,.04); }
.pouch-facts span, .pouch-section-label { display: block; margin-bottom: 7px; color: var(--gold); font-size: 13px; letter-spacing: .08em; }
.pouch-facts strong { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.pouch-facts small { display: block; margin-top: 5px; color: var(--paper-soft); font-size: 14px; line-height: 1.5; }
.pouch-color { width: 20px; height: 20px; flex: 0 0 auto; display: inline-block; border: 2px solid rgba(255,255,255,.22); border-radius: 50%; background: var(--pouch-color); box-shadow: 0 0 0 3px rgba(225,214,187,.06); }
.pouch-rating-block { margin-top: 17px; }
.pouch-ratings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pouch-ratings > div { padding: 11px 7px; border-radius: 14px; background: rgba(212,192,148,.065); text-align: center; }
.pouch-ratings span { display: block; margin-bottom: 5px; color: var(--paper-soft); font-size: 14px; }
.pouch-ratings strong { display: block; color: var(--gold); font-size: 15px; letter-spacing: -.08em; white-space: nowrap; }
.pouch-reading, .pouch-suitable, .pouch-advice, .pouch-caution, .pouch-modal-caution { margin-top: 17px; }
.pouch-reading h4, .pouch-suitable h4, .pouch-advice h4, .pouch-caution h4, .pouch-modal-caution h4 { margin: 0 0 7px; color: var(--gold); font-size: 14px; letter-spacing: .1em; }
.pouch-reading p, .pouch-suitable p, .pouch-advice p, .pouch-caution p, .pouch-modal-caution p { margin: 0; color: var(--paper-soft); font-size: 15px; line-height: 1.75; }
.pouch-advice { padding: 14px; border-radius: 16px; background: rgba(118,162,128,.11); }
.pouch-advice p { color: var(--paper); font-family: "Songti SC", serif; font-size: 17px; }
.pouch-caution, .pouch-modal-caution { padding: 14px; border-left: 3px solid var(--gold); background: rgba(207,178,116,.07); }
.pouch-share-button { margin-top: 17px; }

.region-grid { display: grid; gap: 12px; }
.region-card {
  position: relative;
  min-height: 92px;
  padding: 18px 20px;
  overflow: hidden;
  color: var(--paper);
  border: 1px solid var(--line);
  border-radius: 21px;
  background: rgba(236, 223, 193, .045);
  text-align: left;
  cursor: pointer;
}
.region-card::after { content: ""; position: absolute; width: 120px; height: 120px; right: -30px; top: -36px; border-radius: 50%; background: var(--region-color); opacity: .17; }
.region-card strong { display: block; margin-bottom: 7px; font-family: "Songti SC", serif; font-size: 20px; letter-spacing: .12em; }
.region-card small { color: var(--paper-soft); }

.letter-card {
  position: relative;
  padding: 28px 24px;
  color: #27332d;
  border-radius: 8px;
  background:
    linear-gradient(rgba(113, 91, 57, .055) 1px, transparent 1px) 0 0 / 100% 28px,
    #e7dcc3;
  box-shadow: var(--shadow);
}
.letter-card::before { content: "山海来信"; position: absolute; right: 18px; top: 18px; padding: 6px 4px; border: 1px solid rgba(154, 62, 45, .6); color: #9f4638; writing-mode: vertical-rl; font-family: "Songti SC", serif; letter-spacing: .12em; }
.letter-date { color: #8c6a46; font-size: 11px; letter-spacing: .14em; }
.letter-card h2 { margin: 13px 42px 18px 0; font-family: "Songti SC", serif; font-size: 27px; font-weight: 600; }
.letter-label { margin: 18px 0 6px; color: #9b4b3c; font-size: 11px; font-weight: 750; letter-spacing: .14em; }
.letter-card p { margin: 0; font-size: 13px; line-height: 1.85; }
.letter-item { margin-top: 18px; padding: 13px 14px; border: 1px solid rgba(81, 84, 60, .15); background: rgba(255, 255, 255, .2); }
.letter-reaction { margin-top: 18px !important; color: #51645a; font-family: "Songti SC", serif; }
.result-actions { display: grid; gap: 10px; margin-top: 18px; }

.atlas-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.atlas-card {
  min-height: 184px;
  padding: 12px;
  color: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(235, 221, 190, .045);
  text-align: left;
  cursor: pointer;
}
.atlas-card.locked { filter: saturate(.3); opacity: .5; }
.atlas-art { height: 116px; display: grid; place-items: center; overflow: hidden; }
.atlas-art .spirit-svg { width: 130px; }
.atlas-card strong { display: block; font-family: "Songti SC", serif; font-size: 17px; letter-spacing: .1em; }
.atlas-card small { color: var(--paper-soft); font-size: 10px; }

.beast-detail-art { width: min(88vw, 390px); margin: 0 auto -10px; }
.detail-section { margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: rgba(231, 217, 187, .04); }
.detail-section h3 { margin: 0 0 10px; color: var(--gold); font-size: 12px; letter-spacing: .12em; }
.detail-section p { margin: 0; color: var(--paper-soft); font-size: 13px; line-height: 1.8; }

.fragment-tabs { display: flex; gap: 8px; margin: 0 0 16px; overflow-x: auto; scrollbar-width: none; }
.fragment-tabs::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; min-height: 34px; padding: 0 13px; border: 1px solid var(--line); border-radius: 99px; color: var(--paper-soft); background: transparent; font-size: 11px; }
.chip.active { color: #15261f; border-color: transparent; background: var(--jade-bright); }
.fragment-list { display: grid; gap: 11px; }
.fragment-card { padding: 17px; border: 1px solid var(--line); border-radius: 18px; background: rgba(229, 218, 192, .04); }
.fragment-card.locked { opacity: .43; }
.fragment-meta { display: flex; justify-content: space-between; color: var(--gold); font-size: 10px; }
.fragment-card h3 { margin: 9px 0 7px; font-family: "Songti SC", serif; font-size: 18px; }
.fragment-card p { margin: 0; color: var(--paper-soft); font-size: 12px; line-height: 1.7; }

.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: rgba(210, 190, 145, .2); }
.timeline-item { position: relative; padding: 0 0 22px 18px; }
.timeline-item::before { content: ""; position: absolute; left: -19px; top: 6px; width: 9px; height: 9px; border: 2px solid var(--gold); border-radius: 50%; background: var(--ink); }
.timeline-item.future { opacity: .4; }
.timeline-item h3 { margin: 0 0 5px; font-family: "Songti SC", serif; font-size: 18px; }
.timeline-item p { margin: 0; color: var(--paper-soft); font-size: 12px; line-height: 1.6; }
.timeline-item small { color: var(--gold); font-size: 10px; }

.contract-card {
  position: relative;
  min-height: 520px;
  padding: 28px 22px;
  overflow: hidden;
  color: #27342d;
  background: #e7dcc3;
  border: 1px solid rgba(111, 80, 43, .25);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.contract-card::before, .contract-card::after { content: ""; position: absolute; width: 150px; height: 150px; border: 1px solid rgba(123, 81, 52, .12); border-radius: 50%; }
.contract-card::before { left: -75px; top: -70px; }
.contract-card::after { right: -74px; bottom: -72px; }
.contract-kicker { color: #9b4b3c; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .35em; }
.contract-art { width: 240px; height: 240px; margin: 8px auto -10px; display: grid; place-items: center; }
.contract-name { text-align: center; font-family: "Songti SC", serif; font-size: 34px; font-weight: 600; letter-spacing: .16em; }
.contract-origin { margin-top: 6px; text-align: center; color: #745c42; font-size: 12px; }
.contract-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; border-top: 1px solid rgba(75, 73, 53, .18); padding-top: 18px; }
.contract-grid div { min-height: 48px; }
.contract-grid span { display: block; color: #8e7657; font-size: 9px; letter-spacing: .12em; }
.contract-grid strong { display: block; margin-top: 5px; font-family: "Songti SC", serif; font-size: 14px; }
.seal { position: absolute; right: 24px; bottom: 24px; width: 54px; height: 54px; padding: 5px; display: grid; place-items: center; border: 2px solid rgba(153, 55, 42, .72); color: #a04334; font-family: "Songti SC", serif; font-size: 12px; line-height: 1.05; text-align: center; transform: rotate(-5deg); }

.share-options { display: grid; gap: 12px; }
.share-option { padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: rgba(231, 220, 193, .045); }
.share-option h3 { margin: 0 0 7px; font-family: "Songti SC", serif; font-size: 19px; }
.share-option p { margin: 0 0 16px; color: var(--paper-soft); font-size: 12px; line-height: 1.6; }
.share-preview { width: min(100%, 360px); margin: 0 auto 18px; display: block; border-radius: 8px; box-shadow: var(--shadow); }

.music-now { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 20px; background: rgba(229, 216, 186, .05); }
.music-disc { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(210, 181, 119, .3); background: radial-gradient(circle, #d1b275 0 8%, #263d37 9% 30%, #b85f43 31% 34%, #142a27 35%); }
.music-disc.spinning { animation: discSpin 6s linear infinite; }
.music-now strong { display: block; font-size: 14px; }
.music-now small { color: var(--paper-soft); }
.music-toggle { width: 44px; height: 44px; border: 0; border-radius: 50%; color: #12241f; background: var(--jade-bright); cursor: pointer; }
.track-list { display: grid; gap: 9px; margin-top: 18px; }
.track-card { width: 100%; min-height: 62px; padding: 10px 15px; display: flex; align-items: center; justify-content: space-between; color: var(--paper); border: 1px solid var(--line); border-radius: 17px; background: transparent; text-align: left; cursor: pointer; }
.track-card.active { border-color: rgba(151, 190, 151, .48); background: rgba(119, 162, 128, .12); }
.track-card strong { display: block; font-size: 13px; }
.track-card small { color: var(--paper-soft); font-size: 10px; }
.track-number { color: var(--gold); font-family: "Songti SC", serif; }
.volume-block { margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; }
.volume-label { display: flex; justify-content: space-between; margin-bottom: 12px; color: var(--paper-soft); font-size: 11px; }
.volume-slider { width: 100%; accent-color: var(--jade-bright); }
.music-credit { margin: 10px 0 0; text-align: center; color: var(--paper-soft); font-size: 11px; }

.modal-layer {
  position: fixed;
  z-index: 30;
  inset: 0;
  padding: calc(20px + var(--safe-top)) 18px calc(20px + var(--safe-bottom));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(2, 12, 11, .72);
  backdrop-filter: blur(10px);
}
.modal-card { width: min(100%, 480px); max-height: 86vh; overflow-y: auto; padding: 22px; border: 1px solid rgba(226, 211, 179, .18); border-radius: 28px; background: #112a27; box-shadow: var(--shadow); animation: modalUp .3s ease both; }
.modal-title { margin: 0 0 8px; font-family: "Songti SC", serif; font-size: 26px; }
.modal-copy { margin: 0 0 18px; color: var(--paper-soft); font-size: 14px; line-height: 1.7; }
.modal-actions { display: grid; gap: 9px; margin-top: 18px; }
.birthday-label { display: block; margin: 17px 0 8px; color: var(--paper); font-size: 14px; }
.birthday-select-row { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 8px; }
.birthday-select-wrap { position: relative; min-width: 0; }
.birthday-select-wrap > span { position: absolute; z-index: 2; left: 12px; top: 8px; color: var(--gold); font-size: 12px; pointer-events: none; }
.birthday-select-wrap::after { content: "⌄"; position: absolute; z-index: 2; right: 10px; top: 50%; color: var(--paper-soft); font-size: 13px; transform: translateY(-34%); pointer-events: none; }
.birthday-select { width: 100%; height: 58px; padding: 19px 25px 4px 11px; overflow: hidden; color: var(--paper); border: 1px solid var(--line); border-radius: 14px; background: rgba(231,218,188,.07); appearance: none; -webkit-appearance: none; -webkit-user-select: auto; user-select: auto; text-overflow: ellipsis; }
.birthday-select:disabled { color: rgba(215,204,183,.38); opacity: .72; }
.birthday-helper { margin: 8px 0 0; color: var(--paper-soft); font-size: 13px; }
.birthday-note { margin: 8px 0 0; color: rgba(215,204,183,.68); font-size: 13px; }
.modal-kicker { font-size: 14px; }
.daily-pouch-modal { padding: 24px; }
.daily-pouch-modal .modal-title { font-size: 30px; }
.pouch-energy-head { display: grid; grid-template-columns: 104px 1fr; gap: 13px; align-items: stretch; margin: 18px 0 0; }
.pouch-energy-head > div { padding: 14px; border: 1px solid var(--line); border-radius: 17px; background: rgba(228,215,185,.05); }
.pouch-energy-head span { display: block; color: var(--paper-soft); font-size: 13px; line-height: 1.45; }
.pouch-energy-head strong { display: block; margin-top: 4px; color: var(--gold); font-family: "Songti SC", serif; font-size: 43px; line-height: 1; }
.pouch-energy-head h3 { margin: 5px 0 5px; font-family: "Songti SC", serif; font-size: 22px; font-weight: 500; }
.pouch-energy-head p { margin: 0; color: var(--paper-soft); font-size: 13px; }
.daily-pouch-modal .modal-actions { position: sticky; z-index: 4; bottom: -24px; margin: 18px -24px -24px; padding: 14px 24px 24px; background: linear-gradient(180deg, rgba(17,42,39,0), #112a27 18%, #112a27 100%); }

.video-recording-overlay {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--paper);
  background: rgba(3, 15, 14, .78);
  backdrop-filter: blur(12px);
}

.video-recording-card {
  width: min(78vw, 310px);
  padding: 28px 24px;
  border: 1px solid rgba(228, 212, 180, .2);
  border-radius: 28px;
  background: #102925;
  text-align: center;
  box-shadow: var(--shadow);
}

.recording-dot {
  width: 13px;
  height: 13px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--cinnabar);
  box-shadow: 0 0 0 8px rgba(214, 100, 69, .12);
  animation: recordingPulse 1s ease-in-out infinite;
}

.video-recording-card strong { display: block; font-family: "Songti SC", serif; font-size: 21px; font-weight: 500; }
.video-recording-card span { display: block; margin-top: 8px; color: var(--paper-soft); font-size: 12px; }
.recording-track { height: 4px; margin-top: 20px; overflow: hidden; border-radius: 99px; background: rgba(232, 218, 187, .1); }
.recording-fill { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cinnabar), var(--gold)); transition: width .18s linear; }

.culture-note { margin-top: 16px; padding: 15px; border: 1px dashed rgba(205, 181, 130, .25); border-radius: 16px; color: var(--paper-soft); font-size: 11px; line-height: 1.7; }
.culture-note strong { color: var(--gold); }

.empty-state { padding: 44px 20px; text-align: center; color: var(--paper-soft); }
.empty-state strong { display: block; margin-bottom: 8px; color: var(--paper); font-family: "Songti SC", serif; font-size: 20px; }

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: calc(26px + var(--safe-bottom));
  max-width: calc(100vw - 36px);
  padding: 11px 16px;
  color: var(--paper);
  border: 1px solid rgba(224, 211, 181, .18);
  border-radius: 99px;
  background: rgba(9, 27, 25, .94);
  box-shadow: var(--shadow);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  transform: translate(-50%, 24px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.spirit-svg { display: block; width: 100%; max-width: 100%; overflow: visible; filter: drop-shadow(0 22px 18px rgba(0, 0, 0, .22)); }
.spirit-eye { transform-origin: center; animation: blink 5s infinite; }
.spirit-tail { transform-origin: 55% 55%; animation: tailSway 3.8s ease-in-out infinite; }
.spirit-wing { transform-origin: 50% 55%; animation: wingSway 2.8s ease-in-out infinite; }
.spirit-glow { animation: glowPulse 3.4s ease-in-out infinite; }

@keyframes spiritFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes spiritBreathe { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-5px) scale(1.012); } }
@keyframes revealIn { from { opacity: 0; transform: scale(.78) translateY(22px); filter: blur(7px); } to { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); } }
@keyframes blink { 0%, 45%, 48%, 100% { transform: scaleY(1); } 46%, 47% { transform: scaleY(.08); } }
@keyframes tailSway { 0%,100% { transform: rotate(-2deg); } 50% { transform: rotate(4deg); } }
@keyframes wingSway { 0%,100% { transform: rotate(-1deg); } 50% { transform: rotate(3deg); } }
@keyframes glowPulse { 0%,100% { opacity: .2; } 50% { opacity: .5; } }
@keyframes petHappy { 0% { transform: scale(1); } 35% { transform: scale(1.08) rotate(-2deg); } 65% { transform: scale(1.04) rotate(2deg); } 100% { transform: scale(1); } }
@keyframes petShy { 0%,100% { transform: translateX(0); } 45% { transform: translateX(22px) scale(.97); } }
@keyframes petPlay { 0%,100% { transform: translateY(0) rotate(0) scale(1); } 24% { transform: translateY(-18px) rotate(-5deg) scale(1.04); } 48% { transform: translateY(2px) rotate(5deg) scale(.98); } 72% { transform: translateY(-10px) rotate(-3deg) scale(1.03); } }
@keyframes petNuzzle { 0%,100% { transform: translateX(0) scale(1); } 24% { transform: translateX(-17px) rotate(-2deg) scale(1.025); } 48% { transform: translateX(12px) rotate(2deg) scale(1.045); } 72% { transform: translateX(-7px) scale(1.025); } }
@keyframes petParticle { 0% { opacity: 0; transform: translate(var(--pet-x), 18px) scale(.45) rotate(-8deg); } 22% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--pet-x), -104px) scale(1.2) rotate(14deg); } }
@keyframes targetPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes targetHit { to { transform: scale(1.8); opacity: 0; } }
@keyframes feedWrong { 0%,100% { transform: translateX(0); } 35% { transform: translateX(-7px); } 70% { transform: translateX(7px); } }
@keyframes rhythmClose { 0% { transform: scale(1); opacity: .1; } 72% { opacity: .75; } 100% { transform: scale(.38); opacity: 0; } }
@keyframes feedRain { from { transform: translateY(0) rotate(0); opacity: .95; } to { transform: translateY(480px) rotate(140deg); opacity: .2; } }
@keyframes discSpin { to { transform: rotate(360deg); } }
@keyframes modalUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes forestDrift { 0%,100% { transform: translate3d(-8px, 12px, 0) rotate(-14deg); opacity: .12; } 50% { transform: translate3d(18px, -30px, 0) rotate(35deg); opacity: .68; } }
@keyframes bowlRipple { 0% { transform: translate(-50%, -50%) scale(.35); opacity: .55; } 100% { transform: translate(-50%, -50%) scale(1.38); opacity: 0; } }
@keyframes bubbleRise { 0% { transform: translateY(20px) scale(.7); opacity: 0; } 18% { opacity: .68; } 100% { transform: translateY(-370px) translateX(18px) scale(1.22); opacity: 0; } }
@keyframes dreamBubble { 0% { transform: translateY(30px) scale(.6); opacity: 0; } 20% { opacity: .7; } 55% { transform: translateY(-180px) translateX(-14px) scale(1); } 100% { transform: translateY(-390px) translateX(24px) scale(1.28); opacity: 0; } }
@keyframes rainFall { from { transform: translateY(-30px) rotate(10deg); } to { transform: translateY(460px) rotate(10deg); } }
@keyframes tomorrowGlow { 0%,100% { transform: translateY(9px) scale(.65); opacity: .16; } 50% { transform: translateY(-22px) scale(1.25); opacity: .86; } }
@keyframes recordingPulse { 0%,100% { transform: scale(.86); opacity: .7; } 50% { transform: scale(1.15); opacity: 1; } }

@media (min-width: 700px) {
  body { padding: 18px 0; }
  #app, .app-shell { height: calc(100vh - 36px); height: calc(100dvh - 36px); }
  .screen { height: 100%; }
  .app-shell { border: 1px solid rgba(226, 211, 178, .1); border-radius: 32px; }
  .screen { scrollbar-width: thin; scrollbar-color: rgba(204, 183, 137, .2) transparent; }
}

@media (max-width: 360px) {
  .screen { padding-left: 15px; padding-right: 15px; }
  .display-title { font-size: 43px; }
  .question-title { font-size: 24px; }
  .action-card { padding-left: 9px; padding-right: 9px; }
}

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