.stage {
  position: relative;
  width: 100%;
  min-height: 320px;
  overflow: hidden;
  border: 3px solid var(--ink-3);
  border-radius: 14px;
  background: #0e151b;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.stage .overlay { user-select: text; -webkit-user-select: text; -webkit-touch-callout: default; }
canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.guide-map { position: absolute; top: 12px; right: 12px; z-index: 4; width: 204px; padding: 8px; border: 2px solid #dec78b; border-radius: 11px; color: #fff5d8; background: #173744ef; box-shadow: 0 3px 10px #16212888; pointer-events: none; }
.guide-map[hidden] { display: none; }
.guide-map-heading { display: grid; gap: 2px; padding: 1px 2px 6px; line-height: 1.2; }
.guide-map-heading b { font: 800 13px var(--font-ui); }
.guide-map-heading span { color: #f1d48b; font: 800 12px var(--font-ui); }
.guide-map canvas { display: block; width: 100%; height: auto; border: 1px solid #d7c487; border-radius: 3px; image-rendering: pixelated; }
.guide-map small { display: flex; align-items: center; gap: 5px; margin-top: 5px; font: 700 10px var(--font-ui); }
.guide-map small i, .guide-map small em { display: inline-block; width: 10px; height: 10px; border: 1px solid #153744; border-radius: 50%; background: #fffdf1; }
.guide-map small em { margin-left: 8px; border-color: #ffebcc; background: #aa382d; }
.battle-skill-tip, .battle-bait-tip { margin: 8px 0 12px; padding: 9px 12px; border: 1px solid #cba75d; border-left: 4px solid #b4842e; border-radius: 7px; color: #273b39; background: #fff2d4; font: 700 13px/1.4 var(--font-ui); }
.battle-bait-tip b { display: block; color: #694622; }
.battle-bait-tip p { margin: 4px 0 0; }
.tutorial-overlay-reminder { margin: 12px 0 0; padding: 9px 12px; border: 2px solid #cfaa54; border-radius: 9px; color: #28403d; background: #fff2d4; font: 700 13px/1.4 var(--font-ui); }
.tutorial-overlay-reminder b { color: #7d4c1d; }
.route-effects { position: absolute; top: 12px; left: 12px; z-index: 4; display: grid; gap: 5px; max-width: min(48%, 270px); pointer-events: none; }
.route-effects[hidden] { display: none; }
.route-effects span { padding: 7px 10px; border: 2px solid #dec78b; border-radius: 9px; color: #fff5d8; background: #173744ed; box-shadow: 0 3px 8px #16212866; font: 800 clamp(11px, 1.2vw, 14px)/1.25 var(--font-ui); }
.toast {
  position: absolute;
  top: 14px;
  left: 50%;
  z-index: 12;
  max-width: calc(100% - 30px);
  padding: 7px 15px;
  color: var(--paper);
  border-radius: 99px;
  background: rgba(27,36,48,.92);
  font: 700 15px system-ui;
  transform: translateX(-50%);
}
.dpad {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, 52px);
  grid-template-rows: repeat(3, 52px);
  gap: 3px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  filter: drop-shadow(0 5px 7px rgba(0,0,0,.32));
}
.dpad button {
  display: grid;
  place-items: center;
  color: white;
  border: 2px solid rgba(255,255,255,.78);
  border-radius: 13px;
  background: rgba(27,36,48,.8);
  font-size: 23px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  backdrop-filter: blur(3px);
}
.dpad button.is-active { background: rgba(198,63,43,.92); transform: translateY(1px); }
.dpad button[data-direction="up"] { grid-column: 2; grid-row: 1; }
.dpad button[data-direction="left"] { grid-column: 1; grid-row: 2; }
.dpad button[data-direction="down"] { grid-column: 2; grid-row: 3; }
.dpad button[data-direction="right"] { grid-column: 3; grid-row: 2; }
.overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: clamp(14px, 4vw, 34px);
  color: var(--ink);
  background: rgba(17,24,32,.72);
}
.panel, .dialog-card {
  width: min(680px, 100%);
  padding: clamp(18px, 4vw, 32px);
  border: 3px solid var(--ink);
  border-radius: 17px;
  background: var(--paper);
  box-shadow: 0 13px 30px rgba(0,0,0,.35);
}
.panel, .dialog-card { border-color: #765b3d; background: #f4ecd9; box-shadow: 0 13px 30px rgba(0,0,0,.35), inset 0 0 0 3px #fff7e6; }
.overlay.full-screen-overlay { position: fixed; inset: 0; z-index: 100; padding: 0; overflow: hidden; background: #0b1d29; }
.finale-screen { position: relative; width: 100%; height: 100%; min-height: 100dvh; overflow: hidden; color: #f8efd8; background: #102c39; }
.ending-story-screen { display: grid; align-items: end; }
.ending-story-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ending-story-shade { position: absolute; inset: 0; background: linear-gradient(180deg, #07192322 0%, #07192388 48%, #071923f2 100%); }
.ending-story-card { position: relative; z-index: 1; width: min(760px, calc(100% - 32px)); margin: 0 auto clamp(26px, 7vh, 82px); padding: clamp(18px, 4vw, 42px); border: 1px solid #d4ad65; border-radius: 18px; background: #0a243ad9; box-shadow: 0 22px 65px #0009; }
.ending-story-card h1 { margin: 0 0 16px; color: #ffedb5; font: 800 clamp(30px, 5vw, 60px)/1.08 Georgia, serif; }
.ending-story-card > p:not(.ending-eyebrow) { max-width: 66ch; font: clamp(17px, 2vw, 23px)/1.6 Georgia, serif; }
.ending-story-card button { margin-top: 14px; }
.final-blow-screen .ending-story-card, .final-reform-screen .ending-story-card { background: #091c2bea; }
.final-blow-screen .ending-story-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 20px; align-items: center; width: min(900px, calc(100% - 24px)); margin-bottom: max(12px, env(safe-area-inset-bottom)); padding: 14px 22px; }
.final-blow-screen .ending-story-card h1 { margin: 0; font-size: clamp(28px, 3.3vw, 44px); }
.final-blow-screen .ending-story-card > p:not(.ending-eyebrow) { grid-column: 1; margin: 0; font-size: clamp(15px, 1.4vw, 18px); }
.final-blow-screen .ending-story-card button { grid-column: 2; grid-row: 1 / 4; margin: 0; }
.final-blow-frame-1 .ending-story-image { object-position: 37% center; }
.final-blow-frame-1 { background: radial-gradient(circle at 28% 28%, #543744 0, #102c39 56%, #071723 100%); }
.final-blow-frame-2 .ending-story-image { object-position: center 40%; animation: final-impact-reveal .8s ease-out both; }
.final-reform-screen[data-speaker="Keeper Ming"] .ending-story-image { object-position: 72% center; }
.final-reform-screen[data-speaker="Hero"] .ending-story-image { object-position: 36% center; }
.final-brush-screen .ending-story-image { object-position: center 42%; }
.final-brush-screen .ending-story-card { width: min(510px, calc(100% - 32px)); margin-left: clamp(16px, 5vw, 70px); margin-right: auto; }
@keyframes final-impact-reveal { from { opacity: .45; transform: scale(1.06); } to { opacity: 1; transform: scale(1); } }
.ending-eyebrow { margin: 0 0 10px; color: #f7d577; font: 800 13px system-ui; letter-spacing: .16em; text-transform: uppercase; }
.ending-credits { display: flex; flex-direction: column; background: #0b2030; }
.ending-credits-sky { position: absolute; inset: 0; background: radial-gradient(circle at 50% 8%, #3d6f79 0, #153c4c 32%, #071926 78%); opacity: .78; }
.ending-credits-viewport { position: relative; z-index: 1; flex: 1; min-height: 0; overflow: hidden; }
.ending-credits-viewport::before, .ending-credits-viewport::after { position: absolute; z-index: 2; right: 0; left: 0; height: 14%; content: ''; pointer-events: none; }
.ending-credits-viewport::before { top: 0; background: linear-gradient(#0b2030, transparent); }
.ending-credits-viewport::after { bottom: 0; background: linear-gradient(transparent, #0b2030); }
.ending-credits-track { position: absolute; right: 0; left: 0; margin: auto; padding: 0 20px 90px; text-align: center; will-change: transform; }
.ending-credits-title { margin: 0 auto 70px; }
.ending-credits-title img { display: block; width: min(560px, 80vw); height: min(42vh, 340px); margin: auto auto 22px; object-fit: cover; border: 2px solid #d8ba78; border-radius: 16px; box-shadow: 0 12px 35px #0009; }
.ending-credits-title h1 { margin: 0 0 12px; color: #fff1c6; font: 800 clamp(34px, 5vw, 60px)/1.1 Georgia, serif; }
.ending-credits-title > p:last-child { font: italic clamp(17px, 2.4vw, 23px) Georgia, serif; }
.ending-section-title { margin: 10px 20px 25px; color: #f8d477; font: 800 clamp(24px, 3vw, 34px) Georgia, serif; text-align: center; }
.ending-chapters { display: grid; gap: 15px; width: min(760px, calc(100% - 32px)); margin: auto; }
.ending-chapter { display: grid; grid-template-columns: 42px 110px 1fr; align-items: center; gap: 16px; padding: 12px 18px; border: 1px solid #ad8d55; border-radius: 12px; background: #1d4250dd; text-align: left; }
.ending-chapter > span { color: #e1bf7a; font: 800 11px system-ui; text-align: center; text-transform: uppercase; writing-mode: vertical-rl; }
.ending-chapter img { width: 110px; height: 92px; object-fit: contain; }
.ending-chapter h2 { margin: 0 0 3px; color: #fff5dc; font: 800 clamp(17px, 2vw, 23px) Georgia, serif; }
.ending-chapter p { margin: 0 0 4px; }
.ending-chapter small { color: #d7c18b; }
.ending-mementos { width: min(760px, calc(100% - 32px)); margin: 60px auto 30px; padding: 24px; border: 1px solid #ad8d55; border-radius: 12px; background: #193844dd; text-align: left; }
.ending-mementos h2 { color: #f8d477; }
.ending-mementos li { margin-bottom: 5px; }
.ending-last-line { padding: 28px; color: #f7d577; font: italic 24px Georgia, serif; text-align: center; }
.ending-controls { position: relative; z-index: 3; display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid #ad8d55; background: #0b2030; }
.ending-credits-complete { display: grid; place-items: center; }
.ending-reduced-motion { overflow: auto; }
.ending-reduced-motion .ending-credits-track { position: static; transform: none !important; padding-top: 24px; will-change: auto; }
.portal-destinations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 20px 0; }
.portal-destinations button { white-space: normal; }
.homecoming-panel { display: flex; flex-direction: column; width: min(760px, calc(100% - 24px)); max-height: min(760px, calc(100dvh - 32px)); padding: 0; overflow: hidden; }
.homecoming-copy { min-height: 0; padding: clamp(22px, 4vw, 36px); overflow: auto; }
.homecoming-copy details { margin-bottom: 4px; }
.homecoming-actions { flex: none; padding: 14px clamp(22px, 4vw, 36px); border-top: 1px solid #cdb989; background: #f4ecd9; }
@media (max-width: 600px) { .ending-chapter { grid-template-columns: 25px 70px 1fr; gap: 8px; padding: 8px; } .ending-chapter img { width: 70px; height: 68px; } .ending-story-card { max-height: calc(100dvh - 32px); margin-bottom: 16px; overflow: auto; } .final-blow-screen .ending-story-card { grid-template-columns: 1fr; padding: 13px 16px; } .final-blow-screen .ending-story-card button { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 7px; } .final-blow-frame-1 .ending-story-image, .final-reform-screen[data-speaker="Hero"] .ending-story-image { height: 70%; object-fit: contain; object-position: center; } .portal-destinations { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .final-blow-frame-2 .ending-story-image { animation: none; } }
.panel > h1, .panel > h2 { color: #173744; }
.panel h1, .panel h2, .dialog-card p { margin-top: 0; }
.panel-header { display: flex; align-items: center; gap: 12px; }
.panel-header h2 { margin-right: auto; }
.level-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-top: 18px; }
.level-card { min-height: 110px; padding: 16px; text-align: left; color: var(--ink); border: 3px solid var(--ink); border-radius: 13px; background: white; }
.level-card b, .level-card span { display: block; }
.level-card b { font-size: 22px; }
.level-card span { margin-top: 7px; color: #65717d; font: 13px/1.4 system-ui; }
.level-card[disabled] { opacity: .55; border-style: dashed; cursor: not-allowed; }
.speaker { margin-bottom: 7px; color: var(--seal); font-size: 18px; font-weight: 900; }
.dialog-card p:not(.speaker) { min-height: 52px; font: 17px/1.65 system-ui; }
.button-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.status-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin: 16px 0; }
.status-grid div { padding: 11px; border-radius: 10px; background: white; font: 13px system-ui; }
.status-grid b { display: block; margin-top: 3px; font-size: 16px; }
.panel-kicker { margin: 0 0 5px; color: var(--seal); font: 900 12px system-ui; letter-spacing: .1em; text-transform: uppercase; }
.question-panel h2 { font: 800 clamp(20px, 3vw, 28px)/1.5 var(--font-chinese); }
.question-word { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.question-word b { font: 900 38px var(--font-chinese); }
.question-word span, .question-instruction { color: #647180; }
.dictation-clue { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; padding: 13px 16px; border-left: 5px solid var(--gold); border-radius: 8px; background: white; }
.dictation-clue p { display: grid; gap: 3px; margin: 0; }
.dictation-clue p:nth-of-type(3) { grid-column: 1 / -1; }
.dictation-speak { grid-column: 1 / -1; justify-self: start; min-height: 44px; padding: 7px 14px; border: 2px solid #a9894a; border-radius: 999px; color: #173744; background: #f7e9bf; font: 800 15px var(--font-ui); }
.dictation-speak span { color: inherit; font: inherit; }
.dictation-clue small { color: #6b7280; font: 800 11px system-ui; letter-spacing: .06em; text-transform: uppercase; }
.dictation-clue b { font-size: 21px; }
.dictation-clue span { color: #536171; font: 700 18px var(--font-chinese); }
.question-options, .attack-grid, .service-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 15px; }
.question-options button, .attack-grid button, .service-grid button {
  min-height: 58px;
  padding: 10px 13px;
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: 10px;
  background: white;
  font: 700 16px/1.35 var(--font-chinese);
  text-align: left;
}
.question-options button.right { border-color: var(--jade); background: #dff3e8; }
.question-options button.wrong { border-color: var(--seal); background: #fae3de; }
.answer-feedback { display: flex; flex-direction: column; align-items: stretch; margin-top: 14px; padding: 13px; border-left: 5px solid var(--jade); border-radius: 8px; background: white; }
.answer-feedback.bad { border-color: var(--seal); }
.answer-feedback > [data-question-next] { align-self: flex-end; min-width: 140px; margin-top: 12px; }
.battle-question-badge { position: absolute; top: 10px; right: 10px; display: flex; align-items: center; gap: 7px; padding: 6px 10px; border: 2px solid #b75639; border-radius: 10px; color: #762b1e; background: #fff1df; font: 900 13px/1 var(--font-ui); box-shadow: 0 2px 5px #493b2a33; }
.battle-question-badge.defense { border-color: #2b7184; color: #16495c; background: #e1f4f4; }
.battle-question-badge svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.boss-question .battle-question-badge { left: 10px; right: auto; }
.question-panel.battle-question, .writing-panel.battle-question { position: relative; padding-top: 55px; }
.answer-word { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.read-feedback { display: inline-grid; place-items: center; width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 9px; border: 1px solid var(--jade); border-radius: 50%; background: #e7f2e9; color: #215b49; vertical-align: middle; }
.read-feedback svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.read-feedback:hover, .read-feedback:focus-visible { background: #cde8d4; }
.passage-review-answer { padding: 10px 12px; border-left: 4px solid var(--jade); border-radius: 6px; background: #eaf3df; font-size: 1.05em; }
.battle-grid { display: grid; grid-template-columns: minmax(200px,.8fr) minmax(280px,1.4fr); gap: 24px; align-items: center; }
.battle-scene { display: grid; grid-template-rows: minmax(190px,1fr) auto; align-self: stretch; width: min(760px,100%); min-height: 100%; margin: auto; overflow: hidden; border: 3px solid var(--ink); border-radius: 16px; background: linear-gradient(#cfe3d5 0 55%,#a9cda0 55%); box-shadow: 0 13px 30px rgba(0,0,0,.35); }
.battle-scene.lesson-2 { background: linear-gradient(#d6d3e6 0 55%,#b5b0cc 55%); }
.battle-scene.lesson-3 { background: linear-gradient(#eee6c4 0 55%,#c9d98e 55%); }
.battle-arena { position: relative; min-height: 205px; }
.battle-player { position: absolute; bottom: 10px; left: 14px; display: flex; align-items: flex-end; gap: 8px; }
.battle-enemy { position: absolute; top: 8px; right: 14px; display: flex; flex-direction: column; align-items: center; }
.battle-enemy.elite .battle-nameplate { box-shadow: inset 0 0 0 3px #8e5cc7; }
.battle-enemy.golden .battle-nameplate { background: #fff3b3; box-shadow: inset 0 0 0 3px var(--gold); }
.battle-nameplate { min-width: 170px; padding: 7px 10px; border: 2px solid var(--ink); border-radius: 9px; background: var(--paper); font-size: 13px; }
.battle-nameplate b, .battle-nameplate small, .battle-nameplate strong { display: block; }
.battle-nameplate small { color: #536171; }
.battle-hero { width: 74px; height: 88px; box-shadow: 0 5px 0 rgba(27,36,48,.2); }
.battle-enemy .creature-art { min-height: 112px; }
.battle-enemy .creature-portrait { width: 145px; height: 112px; }
.battle-console { margin: 10px; padding: 12px 14px; border: 3px solid var(--ink); border-radius: 12px; background: var(--paper); }
.battle-console h2 { margin: 0; }
.battle-console .battle-message { margin-bottom: 8px; }
.creature-card { padding: 18px; border-radius: 15px; background: white; text-align: center; }
.creature-card.elite { box-shadow: inset 0 0 0 4px #8e5cc7, 0 7px 18px rgba(60,36,87,.2); }
.creature-card.golden { background: linear-gradient(145deg,#fffdf1,#ffe58a); box-shadow: inset 0 0 0 4px var(--gold), 0 7px 20px rgba(179,126,14,.28); }
.creature-art { display: grid; place-items: center; min-height: 150px; }
.creature-portrait { position: relative; display: grid; place-items: center; width: min(190px,100%); height: 150px; filter: drop-shadow(0 9px 5px rgba(27,36,48,.23)); animation: creature-bob 2.4s ease-in-out infinite; }
.creature-image { width: 100%; height: 100%; object-fit: contain; }
.word-seal { position: absolute; left: 50%; bottom: 8%; display: grid; place-items: center; width: 46px; height: 46px; color: var(--ink); border: 4px solid var(--seal); border-radius: 8px; background: var(--paper); font: 900 24px var(--font-chinese); transform: translateX(-50%); filter: drop-shadow(0 2px 1px rgba(0,0,0,.2)); }
.enemy-hp, .parent-goal div, .room-goal div { height: 11px; overflow: hidden; margin: 7px 0; border-radius: 10px; background: #d8cfc0; }
.enemy-hp i, .parent-goal i, .room-goal i { display: block; height: 100%; border-radius: inherit; background: var(--seal); }
.battle-scene .enemy-hp i { transition: width .58s cubic-bezier(.2,.72,.28,1); }
@media (prefers-reduced-motion: reduce) { .battle-scene .enemy-hp i { transition: none; } }
.encounter-transition { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; overflow: hidden; pointer-events: none; background: radial-gradient(circle at center,rgba(217,166,46,.92) 0 14%,rgba(198,63,43,.96) 15% 34%,rgba(27,36,48,.99) 35%); animation: encounter-open .72s cubic-bezier(.2,.8,.2,1) both; }
.encounter-transition.closing { animation: encounter-close .22s ease-in both; }
.encounter-rays { position: absolute; width: 160%; aspect-ratio: 1; background: repeating-conic-gradient(from 0deg,rgba(244,239,226,.22) 0 7deg,transparent 7deg 18deg); animation: encounter-spin 4s linear infinite; }
.encounter-creature { position: relative; z-index: 1; filter: brightness(0) drop-shadow(0 9px 0 rgba(0,0,0,.25)); animation: encounter-pop .72s cubic-bezier(.18,.9,.25,1.25) both; }
.encounter-creature .creature-portrait { width: 190px; height: 160px; }
.boss-battle-scene { background: radial-gradient(circle at 72% 32%,#59416f 0 18%,#26344d 55%,#171c2b 100%); }
.boss-battle-arena { position: relative; min-height: 245px; margin: -22px -22px 18px; overflow: hidden; border-bottom: 3px solid var(--ink); background: radial-gradient(circle at 72% 30%,rgba(158,113,184,.75),transparent 28%),linear-gradient(#28334d 0 62%,#4b3b51 62%); }
.boss-battle-scene > .boss-battle-arena { margin: 0; }
.boss-battle-arena .boss-enemy { top: 6px; right: 18px; }
.boss-battle-arena .boss-enemy .creature-portrait { width: 190px; height: 155px; }
.boss-victory-scene { background: radial-gradient(circle at 43% 45%,#f5d885,#d9a94c 45%,#6b704f 100%); }
.boss-victory-stage { position: relative; display: grid; place-items: center; min-height: 250px; overflow: hidden; background: repeating-conic-gradient(from 0deg at 44% 53%,rgba(255,255,255,.18) 0 12deg,transparent 12deg 28deg); }
.boss-victory-hero { position: relative; z-index: 2; padding: 18px; border-radius: 50%; background: rgba(255,244,194,.65); box-shadow: 0 0 0 18px rgba(255,236,161,.18),0 0 40px 16px rgba(255,238,169,.65); animation: boss-hero-lunge 1.25s cubic-bezier(.26,.7,.23,1) both; }
.boss-victory-hero::after { content: ''; position: absolute; z-index: 4; left: 74%; top: 27%; width: 105px; height: 12px; border: 2px solid #6d562d; border-radius: 100% 4px 4px 100%; background: linear-gradient(90deg,#947231 0 15%,#fff9d7 18%,#b4dae0 70%,#fff 100%); box-shadow: 0 0 15px #fff6bf; transform: rotate(-33deg); transform-origin: left center; }
.victory-hero { width: 145px; height: 170px; }
.boss-victory-boss { position: absolute; right: 8%; bottom: 8%; filter: drop-shadow(0 8px 7px #26323c88); }
.boss-split-left { clip-path: polygon(0 0, 100% 0, 24% 100%, 0 100%); animation: boss-split-left 1.35s .68s ease-out both; }
.boss-split-right { clip-path: polygon(100% 0, 100% 100%, 24% 100%); animation: boss-split-right 1.35s .68s ease-out both; }
.boss-victory-slash { position: absolute; z-index: 5; right: 6%; top: 42%; width: 225px; height: 8px; border-radius: 50%; background: #fffceb; box-shadow: 0 0 16px 8px #f5d679bd; transform: rotate(-49deg) scaleX(0); animation: boss-slash 1.35s .45s ease-out both; pointer-events: none; }
@keyframes boss-hero-lunge { 0% { transform: translateX(-38%) scale(.92); } 45% { transform: translateX(10%) scale(1.06); } 100% { transform: translateX(-8%) scale(1); } }
@keyframes boss-split-left { 0%, 30% { transform: none; opacity: 1; } 100% { transform: translate(-38px, 26px) rotate(-14deg); opacity: .22; } }
@keyframes boss-split-right { 0%, 30% { transform: none; opacity: 1; } 100% { transform: translate(38px, 25px) rotate(14deg); opacity: .22; } }
@keyframes boss-slash { 0%, 25% { transform: rotate(-49deg) scaleX(0); opacity: 0; } 45% { transform: rotate(-49deg) scaleX(1); opacity: 1; } 100% { transform: rotate(-49deg) scaleX(1.25); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .boss-victory-hero, .boss-split-left, .boss-split-right, .boss-victory-slash { animation: none; } .boss-split-left { transform: translate(-18px, 12px); opacity: .4; } .boss-split-right { transform: translate(18px, 12px); opacity: .4; } .boss-victory-slash { display: none; } }
.boss-victory-boss .creature-portrait { width: 170px; height: 150px; }
.boss-victory-scene .battle-console { border-color: #8c6726; background: #fff8de; }
.boss-victory-scene .battle-console h1 { margin-bottom: 5px; color: #674a16; }
.boss-question { overflow: hidden; }
.writing-panel .boss-battle-arena, .question-panel .boss-battle-arena { border-radius: 12px 12px 0 0; }
.encounter-callout { position: absolute; z-index: 2; bottom: 48px; color: white; font: 900 25px var(--font-ui); text-shadow: 0 3px 0 var(--ink); }
@keyframes encounter-open { from { opacity: 0; clip-path: circle(0 at 50% 50%); } to { opacity: 1; clip-path: circle(75% at 50% 50%); } }
@keyframes encounter-close { to { opacity: 0; transform: scale(1.08); } }
@keyframes encounter-spin { to { transform: rotate(1turn); } }
@keyframes encounter-pop { 0% { opacity: 0; transform: scale(.2) rotate(-12deg); } 55% { opacity: 1; transform: scale(1.2) rotate(4deg); } 100% { transform: scale(1); } }
@keyframes creature-bob { 50% { transform: translateY(-5px); } }
.creature-card h2 { margin: 5px 0; }
.attack-grid button { display: grid; }
.attack-grid button span { color: #65717d; font: 12px system-ui; }
.attack-grid button.recommended { border-color: var(--gold); box-shadow: inset 0 0 0 2px #f4d886; }
.attack-grid button.weak-to { border-color: var(--seal); background: #fae3de; }
.attack-grid button[data-attack="w"] { grid-column: 1 / -1; }
.battle-message { min-height: 44px; padding: 9px; border-radius: 8px; background: white; }
.level-up { margin: 15px 0; padding: 14px; border: 3px solid var(--gold); border-radius: 12px; background: #fff8d8; text-align: center; animation: encounter-pop .55s cubic-bezier(.18,.9,.25,1.25); }
.level-up strong { color: #a16b00; font-size: clamp(30px,7vw,50px); text-shadow: 0 2px 0 white; }
.level-up p { margin: 5px 0; font-weight: 800; }
.major-reward-panel { overflow: hidden; border: 4px solid var(--gold); background: radial-gradient(circle at 50% 15%,#fff8cf 0,#f4efe2 58%); }
.major-reward { display: flex; align-items: center; justify-content: center; gap: 20px; margin: -6px 0 14px; text-align: left; }
.major-reward img { width: min(210px,42vw); height: 210px; object-fit: contain; filter: drop-shadow(0 9px 8px rgba(105,69,21,.3)); animation: encounter-pop .65s cubic-bezier(.18,.9,.25,1.25); }
.major-reward h1, .major-reward p { margin: 3px 0; }
.rescue-journal { overflow: hidden; margin: 4px 0; border: 2px solid #9aab91; border-radius: 12px; background: #fffaf0; }
.chapter-journal-heading { padding: 17px 20px 13px; background: linear-gradient(105deg, #e2eee3, #f5efd9); border-bottom: 1px solid #bdc9ad; }
.chapter-journal-heading .panel-kicker { margin: 0 0 3px; color: #32675d; }
.chapter-journal-heading h2 { margin: 0 0 6px; color: #254d46; font-size: 22px; }
.chapter-journal-heading > p:last-child { margin: 0; font-size: 14px; }
.chapter-journal-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.chapter-journal-list li { display: grid; grid-template-columns: 26px 1fr; gap: 9px; align-items: start; padding: 11px 18px; border-top: 1px solid #e5ddcb; background: #fffaf0; }
.chapter-journal-list li:first-child { border-top: 0; }
.chapter-journal-list li > span:first-child { color: #807760; font-weight: 900; }
.chapter-journal-list li.done { color: #245543; background: #e8f4e7; }
.chapter-journal-list li.done > span:first-child { color: #338264; }
.tidewater-clue-panel { border-color: #2f7585; background: linear-gradient(145deg, #f3f5e9, #e1ede9); }
.tidewater-rescue-panel { width: min(900px, 100%); max-height: min(94vh, 900px); padding: 0; overflow: auto; border-color: #3e8191; background: #f3f0df; }
.tidewater-rescue-panel img { display: block; width: 100%; max-height: 47vh; object-fit: cover; }
.tidewater-rescue-panel > div { padding: clamp(18px, 3vw, 30px); }
.tidewater-rescue-panel h1 { margin: 4px 0 12px; color: #195463; }
.chapter-task-panel { border-color: #8c705c; background: linear-gradient(145deg, #fbf6e9, #e9eee4); }
.chapter-scene-panel { width: min(900px, 100%); max-height: min(94vh, 900px); padding: 0; overflow: auto; border-color: #7c785d; background: #f5efdd; }
.chapter-scene-panel img { display: block; width: 100%; max-height: 47vh; object-fit: cover; }
.chapter-scene-panel > div { padding: clamp(18px, 3vw, 30px); }
.chapter-scene-panel h1 { margin: 4px 0 12px; color: #5d453c; }
.chapter-evidence-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.chapter-evidence-grid button { min-height: 120px; padding: 14px; text-align: left; background: #f6f1df; border: 2px solid #9e9477; border-radius: 10px; }
.chapter-evidence-grid button[aria-pressed="true"] { background: #e5efe5; border-color: #56846b; }
.chapter-evidence-grid b, .chapter-evidence-grid span { display: block; }
.chapter-evidence-grid span { margin-top: 9px; font-size: 14px; }
.chapter-evidence-choices { display: grid; gap: 8px; margin: 16px 0 0; padding: 12px; border: 1px solid #9e9477; }
.chapter-evidence-choices legend { padding: 0 6px; font-weight: 800; }
.chapter-evidence-choices button { min-height: 44px; text-align: left; }
.chapter-evidence-feedback { min-height: 1.5em; color: #8a3d35; font-weight: 700; }
@media (max-width: 700px) { .chapter-evidence-grid { grid-template-columns: 1fr; } .chapter-evidence-grid button { min-height: 70px; } }
.inn-welcome { border-top: 8px solid var(--jade); background: linear-gradient(145deg,#f4efe2,#fff8d8); }
.save-warning { padding: 12px; border-left: 5px solid var(--seal); border-radius: 8px; background: #fae3de; font-weight: 800; }
.craft-message { margin: 12px 0; padding: 12px 14px; border: 3px solid var(--seal); border-radius: 9px; color: #76271f; background: #ffe6df; font-weight: 900; box-shadow: 0 4px 0 rgba(118,39,31,.18); }
.writing-layout { display: grid; grid-template-columns: minmax(200px,300px) 1fr; gap: 24px; align-items: center; }
.writing-box { width: 100%; aspect-ratio: 1; touch-action: none; border: 3px solid var(--ink); border-radius: 11px; background: white; }
.writing-slots { display: flex; gap: 6px; margin: 13px 0; }
.writing-slots span { display: grid; place-items: center; width: 46px; height: 46px; border: 2px solid var(--line); border-radius: 8px; background: white; font: 23px var(--font-chinese); }
.writing-slots span.current { border-color: var(--seal); }
.service-grid button { display: grid; gap: 4px; }
.service-grid button:disabled { border-color: #a9adb1; color: #59646d; background: #e3e5e3; box-shadow: none; cursor: not-allowed; opacity: 1; }
.service-grid button:disabled span { color: #667078; }
.service-grid button span { color: #647180; font: 13px system-ui; }
.reading-panel { width: min(960px,100%); max-height: 100%; overflow: auto; }
.passage-art { position: relative; width: 100%; height: clamp(310px,48vw,480px); overflow: hidden; border-radius: 8px; background: #f5dfaa url('../assets/images/story/reading-scroll.jpg') center / 100% 100% no-repeat; box-shadow: 0 6px 16px rgba(59,37,20,.22); }
.passage-text { position: absolute; inset: 20% 15% 21%; overflow: auto; padding: 0 1.5% 2px; color: #3c2b22; font: 600 clamp(21px,2.1vw,24px)/1.6 KaiTi,"Kaiti SC","STKaiti","Noto Serif SC",serif; line-break: strict; overflow-wrap: break-word; scrollbar-color: #a77c4f #eed9aa; scrollbar-width: thin; }
.passage-text:focus-visible { outline: 3px solid #8e5f37; outline-offset: 2px; }
.passage-scroll { margin: 10px 0 16px; padding: 10px; border: 2px solid var(--gold); border-radius: 10px; background: #fff8d8; }
.passage-scroll summary { cursor: pointer; font-weight: 900; }
.passage-scroll .passage-art { height: clamp(280px,42vw,380px); margin-top: 9px; }
.answer-field { display: grid; gap: 6px; margin: 12px 0; font-weight: 800; }
.answer-field input, .answer-field textarea, .answer-field select { min-height: 44px; padding: 9px; border: 2px solid var(--line); border-radius: 8px; font: 16px var(--font-ui); }
.shop-panel { width: min(900px,100%); max-height: 100%; overflow: auto; padding: 0 18px 18px; background: #e9d5a6 url('../assets/images/shop/shop-background.jpg') center top / cover; }
.shop-banner { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; min-height: 180px; margin: 0 -18px 18px; padding: 22px; color: white; background: linear-gradient(90deg,rgba(22,28,34,.9),rgba(22,28,34,.18)); text-shadow: 0 2px 3px rgba(0,0,0,.75); }
.shop-banner p, .shop-banner h1, .shop-banner span { margin: 0; }
.shop-banner p { color: #f0ca62; font-weight: 900; }
.shop-banner span { display: block; max-width: 50ch; margin-top: 5px; }
.shop-banner strong { flex: 0 0 auto; padding: 9px 13px; border: 2px solid #f0ca62; border-radius: 8px; background: rgba(27,36,48,.84); }
.shop-shelf { margin: 12px 0; padding: 12px; border: 3px solid #65452c; border-radius: 10px; background: rgba(244,239,226,.94); box-shadow: 0 8px 0 rgba(75,45,26,.5); }
.shop-shelf > h2 { margin: 0 0 10px; color: #65452c; }
.shop-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.shop-item { display: grid; grid-template-columns: 66px 1fr auto; align-items: center; gap: 11px; min-height: 94px; padding: 10px; border: 2px solid #c7ae7e; border-radius: 9px; background: rgba(255,255,255,.92); }
.shop-item h2, .shop-item p { margin: 2px 0; }
.shop-item b, .shop-item span, .shop-item small { display: block; }
.shop-item span { color: #536171; font: 13px/1.35 system-ui; }
.shop-item small { margin-top: 4px; color: #8a5525; font-weight: 800; }
.item-icon { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 3px 2px rgba(55,34,20,.22)); }
.book-summary { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 13px; }
.book-panel, .bag-panel, .daily-board-panel { width: min(960px,100%); padding: clamp(14px,2.5vw,24px); border-color: #765b3d; background: #f4ecd9; box-shadow: 0 14px 34px #172d3680, inset 0 0 0 3px #fff7e6; }
.collection-banner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 172px; margin: calc(-1 * clamp(14px,2.5vw,24px)) calc(-1 * clamp(14px,2.5vw,24px)) 18px; padding: 18px clamp(16px,2.8vw,28px); overflow: hidden; border-bottom: 4px solid #b38b4d; color: #fff8e5; background: linear-gradient(115deg,#102f3b 8%,#245550 72%,#377667); }
.collection-banner > div { position: relative; z-index: 1; max-width: 54ch; }
.collection-banner h1 { margin: 2px 0 8px; color: #f9d382; font: 900 clamp(27px,3vw,36px)/1.08 var(--font-ui); }
.collection-banner p { margin: 0; font: 14px/1.45 var(--font-ui); }
.collection-banner .panel-kicker { color: #d7e5ba; letter-spacing: .12em; text-transform: uppercase; }
.collection-banner img { align-self: end; flex: 0 0 auto; width: min(28%,210px); height: 144px; object-fit: contain; filter: drop-shadow(0 7px 8px #071a2377); }
.collection-banner > button { position: absolute; z-index: 2; top: 14px; right: 15px; min-height: 44px; }
.atlas-window { width: min(900px,100%); max-height: 100%; overflow: auto; padding: clamp(14px,2.5vw,24px); border-color: #765b3d; background: #f4ecd9; box-shadow: 0 14px 34px #172d3680, inset 0 0 0 3px #fff7e6; }
.atlas-window > .panel-header { position: relative; display: flex; align-items: center; min-height: 124px; margin: calc(-1 * clamp(14px,2.5vw,24px)) calc(-1 * clamp(14px,2.5vw,24px)) 20px; padding: 22px clamp(16px,2.8vw,28px); overflow: hidden; border-bottom: 4px solid #b38b4d; color: #fff8e5; background: linear-gradient(115deg,#102f3b 8%,#245550 72%,#377667); }
.atlas-window > .panel-header::after { position: absolute; right: 96px; top: 10px; width: 100px; height: 100px; background: url('../assets/images/brand/word-spirit-logo.webp') center / contain no-repeat; opacity: .26; content: ''; pointer-events: none; }
.atlas-window > .panel-header > div { position: relative; z-index: 1; max-width: calc(100% - 165px); }
.atlas-window > .panel-header h1 { margin: 0; color: #f9d382; font: 900 clamp(25px,3vw,35px)/1.1 var(--font-ui); }
.atlas-window > .panel-header .panel-kicker { color: #d7e5ba; }
.atlas-window > .panel-header > button { position: absolute; z-index: 2; top: 14px; right: 15px; min-height: 44px; }
.atlas-window > p:not(.panel-kicker), .atlas-window > .board-explainer { max-width: 75ch; }
.atlas-window .service-grid button, .atlas-window .gear-grid article, .atlas-window .set-card, .atlas-window .scroll-grid article { border: 1px solid #d6c29a; background: #fffaf0; box-shadow: 0 3px 0 #dfd0b1; }
.atlas-window .service-grid button { display: grid; align-content: center; gap: 5px; min-height: 92px; padding: 15px; }
.atlas-window .service-grid button span { color: #536171; font: 13px/1.35 var(--font-ui); }
.atlas-window .service-grid button:not(:disabled):hover, .atlas-window .gear-grid button:not(:disabled):hover { border-color: #237961; background: #eef6e9; }
.atlas-window .story-timeline, .atlas-window .board-explainer, .atlas-window .character-preview { border: 1px solid #d6c29a; background-color: #fffaf0; }
.atlas-window .hero-stat-grid > div, .atlas-window .status-grid > div { border: 1px solid #dfd0b1; background: #fffaf0; }
.atlas-window .button-row { justify-content: flex-end; }
.atlas-window.reading-panel { width: min(960px,100%); }
.atlas-window.dictation-picker, .atlas-window.inn-welcome { width: min(680px,100%); }
.atlas-window.parent-access-panel { width: min(530px,100%); }
.book-banner > div, .daily-board-banner > div { padding-right: 15px; }
.book-summary { gap: 9px; margin-bottom: 17px; }
.book-summary b { border: 1px solid #d2b886; color: #423424; background: #fff9e9; }
.book-summary b:nth-child(1) { border-color: #b77d51; }
.book-summary b:nth-child(2) { border-color: #8b9daa; }
.book-summary b:nth-child(3) { border-color: #c6a24e; }
.book-panel .lesson-tabs button { border-color: #c6b898; background: #fffaf0; }
.book-panel .lesson-tabs button[aria-selected="true"] { border-color: #245550; color: #fff; background: #245550; }
.book-panel .lesson-spirit-list { padding: clamp(10px,1.6vw,18px); border: 1px solid #d8c6a1; border-radius: 12px; background: #fff9ec; }
.book-panel .spirit-card { border-width: 4px; background: #fffef8; box-shadow: 0 3px 0 #e7dcc3; }
.book-summary b { padding: 7px 10px; border-radius: 99px; background: white; }
.lesson-tabs { display: flex; gap: 8px; margin: 4px 0 16px; overflow-x: auto; padding: 2px 2px 5px; }
.lesson-tabs button { display: grid; flex: 1 0 125px; min-height: 52px; padding: 8px 12px; border: 2px solid var(--line); border-radius: 9px; color: var(--ink); background: white; font: 800 15px var(--font-ui); text-align: left; }
.lesson-tabs button small { color: #647180; font: 11px system-ui; }
.lesson-tabs button[aria-selected="true"] { border-color: var(--jade); color: white; background: var(--jade); }
.lesson-tabs button[aria-selected="true"] small { color: white; }
.lesson-spirit-list > h2 { margin: 0 0 10px; }
.spirit-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; max-height: 410px; overflow: auto; }
.spirit-card { display: grid; gap: 3px; padding: 10px; border: 2px solid var(--line); border-radius: 9px; background: white; }
.spirit-card b { font: 800 23px var(--font-chinese); }
.spirit-card span, .spirit-card small { font: 12px system-ui; }
.spirit-card.gold { border-color: var(--gold); }
.spirit-card.silver { border-color: var(--silver); }
.spirit-card.bronze { border-color: var(--bronze); }
.partner-panel { width: min(900px,100%); }
.partner-count { position: sticky; top: 0; z-index: 2; width: fit-content; margin: 0 0 10px auto; padding: 7px 11px; border-radius: 20px; color: #fff; background: #315e52; font: 800 13px var(--font-ui); }
.partner-choice { position: relative; grid-template-columns: auto 1fr; align-items: center; cursor: pointer; }
.partner-choice input { width: 24px; height: 24px; margin: 0; accent-color: #397d63; }
.partner-choice b, .partner-choice span { grid-column: 2; }
.partner-choice:has(input:checked) { outline: 4px solid #397d6380; background: #eff9ee; }
.bait-legend { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.bait-key { padding: 5px 10px; border-radius: 999px; font-weight: 700; }
.bait-key.missing, .bait-word.missing { border-color: #a65a16; background: #fff1d6; color: #572d0c; }
.bait-key.collected, .bait-word.collected { border-color: #49866b; background: #e5f3e8; color: #214835; }
.bait-word { min-height: 86px; text-align: left; }
.written-review { display: grid; gap: 4px; margin: 8px 0; padding: 10px; border-radius: 8px; background: white; }
.written-review p { margin: 2px 0; }
.written-review small { display: block; }
.parent-panel { position: relative; display: flex; flex-direction: column; width: min(850px,100%); height: min(790px,100%); max-height: 100%; overflow: hidden; padding: clamp(15px,2.5vw,25px); border-color: #a68b55; background: #f9f1d9; box-shadow: 0 13px 30px rgba(0,0,0,.35), inset 0 0 0 4px #fff9e9; }
.parent-panel > .panel-header { flex: 0 0 auto; align-items: start; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid #c8b68c; }
.parent-panel > .panel-header h1 { margin-bottom: 0; color: #173744; }
.parent-panel > .panel-header .secondary { flex: 0 0 auto; }
.parent-panel > .panel-header { align-items: center; min-height: 104px; margin: calc(-1 * clamp(15px,2.5vw,25px)) calc(-1 * clamp(15px,2.5vw,25px)) 0; padding: 16px clamp(17px,2.8vw,27px); border-bottom: 4px solid #b38b4d; color: #fff8e5; background: linear-gradient(110deg,#102f3b,#285850); }
.parent-panel > .panel-header h1 { color: #f9d382; }
.parent-panel > .panel-header .panel-kicker { color: #d7e5ba; }
.parent-tabs { display: grid; flex: 0 0 auto; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 12px 0 10px; padding-bottom: 8px; border-bottom: 2px solid #c8b68c; }
.parent-tabs button { display: grid; min-height: 62px; padding: 9px 13px; border: 2px solid var(--line); border-radius: 10px 10px 4px 4px; color: var(--ink); background: white; font-weight: 900; text-align: left; }
.parent-tabs button small { color: #647180; font: 12px system-ui; }
.parent-tabs button[aria-selected="true"] { border-color: var(--jade); color: white; background: var(--jade); box-shadow: 0 4px 0 #1e684c; }
.parent-tabs button[aria-selected="true"] small { color: white; }
.parent-tab-content { display: grid; align-content: start; flex: 1 1 auto; gap: 14px; min-height: 0; overflow: auto; padding: 2px 5px 22px 2px; scrollbar-color: #a98f59 transparent; }
.parent-tab-intro { margin: 0; max-width: 68ch; color: #536171; font: 15px/1.5 system-ui; }
.parent-section { padding: 16px; border: 1px solid #d8c99f; border-left: 5px solid #237961; border-radius: 9px; background: #fffbf0; }
.parent-section-heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.parent-section-heading h2, .parent-section-heading p { margin: 0; }
.parent-section-heading p { margin-top: 3px; color: #647180; font: 13px/1.4 system-ui; }
.summary-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.summary-toolbar button { flex: 0 0 auto; }
.parent-status-grid { margin: 0; }
.summary-empty { margin: 0; padding: 11px 13px; border-radius: 8px; color: #647180; background: white; }
.parent-actions .button-row { margin-top: 0; }
.parent-walkthrough-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 14px; text-decoration: none; }
.save-import-picker { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 9px 14px; overflow: hidden; cursor: pointer; }
.save-import-picker input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.save-import-picker:focus-within { outline: 3px solid var(--gold); outline-offset: 3px; }
.pin-settings { padding: 10px 16px; border: 1px solid #d8c99f; border-left: 5px solid #a68b55; border-radius: 9px; background: #fffbf0; }
.pin-settings summary { min-height: 44px; padding: 10px 4px; cursor: pointer; font-weight: 900; }
.pin-editor { display: grid; grid-template-columns: minmax(220px,1fr) auto; gap: 16px; align-items: end; padding-top: 8px; }
.pin-editor .answer-field { margin: 0; }
.pin-editor button { min-height: 48px; padding-inline: 20px; }
.parent-feedback { border: 1px solid #d8c99f; border-left: 5px solid #237961; border-radius: 9px; background: #fffbf0; }
.parent-feedback summary { min-height: 54px; padding: 14px 16px; cursor: pointer; font-weight: 900; }
.parent-feedback-body { padding: 0 16px 16px; border-top: 1px solid #e5d8b7; }
.parent-feedback-body > p { max-width: 68ch; margin: 12px 0; line-height: 1.5; }
.parent-feedback form { display: grid; gap: 10px; margin-top: 16px; }
.parent-feedback .answer-field { min-width: 0; margin: 0; }
.parent-feedback textarea, .parent-feedback input { box-sizing: border-box; width: 100%; background: white; }
.parent-feedback textarea { min-height: 112px; resize: vertical; }
.parent-feedback-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; }
.parent-feedback-actions button { min-height: 44px; }
.parent-feedback-actions span { color: #536171; font: 800 13px/1.4 system-ui; }
.parent-feedback-actions span[data-kind="success"] { color: #1d6c51; }
.parent-feedback-actions span[data-kind="error"] { color: #a33224; }
.parent-tables { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 14px 0; }
.parent-tables section { padding: 12px; border-radius: 10px; background: white; }
.parent-tables section h2 { margin-top: 0; }
.parent-tables section p { display: flex; justify-content: space-between; gap: 10px; margin: 6px 0; }
.parent-settings { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px 16px; }
.parent-settings .answer-field { min-width: 0; margin: 0; }
.parent-settings .check-setting { align-self: end; min-height: 48px; padding: 8px 10px; border: 1px solid #d8c99f; border-radius: 8px; background: #f5f4e9; font-size: 13px; }
.parent-gate-settings { margin-top: 15px; padding-top: 14px; border-top: 1px solid #d8c99f; }
.parent-gate-settings h3 { margin: 0 0 10px; color: #214d4e; font-size: 16px; }
.parent-gate-settings > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)) auto; align-items: end; gap: 10px; }
.parent-gate-settings .answer-field { min-width: 0; margin: 0; }
.parent-gate-settings button { white-space: nowrap; }
.parent-shortcuts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.parent-shortcut-card { display: grid; align-content: start; gap: 8px; min-width: 0; padding: 12px; border: 1px solid #d7c9a8; border-radius: 9px; background: #f4f1e7; }
.parent-shortcut-card .answer-field { min-width: 0; margin: 0; }
.parent-shortcut-card select, .parent-shortcut-card input { box-sizing: border-box; width: 100%; min-width: 0; }
.parent-shortcut-card button { min-height: 44px; width: 100%; }
.parent-shortcut-card small, .parent-shortcut-note { color: #536171; font: 12px/1.4 system-ui; }
.parent-shortcut-card small { text-align: right; }
.parent-shortcut-note { margin: 10px 1px 14px; }
.parent-tool-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 8px; }
.parent-tool-grid > button, .parent-tool-grid > a, .parent-tool-grid > label { min-height: 44px; }
.parent-tool-goal { margin-top: 16px; padding-top: 14px; border-top: 1px solid #d8c99f; }
.parent-tool-goal h3 { margin: 0; color: #214d4e; font-size: 16px; }
.parent-tool-goal p { margin: 3px 0 12px; color: #647180; font: 13px/1.4 system-ui; }
.check-setting { display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 800; }
.goal-editor { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr) minmax(72px,.6fr) auto; align-items: end; gap: 8px; }
.goal-editor label { display: grid; min-width: 0; gap: 5px; color: #214d4e; font-size: 13px; font-weight: 800; }
.goal-editor label input, .goal-editor label select { width: 100%; min-width: 0; }
.goal-editor input, .goal-editor select, .goal-editor button { min-height: 44px; border: 2px solid var(--line); border-radius: 8px; padding: 8px; }
.parent-goal, .room-goal { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 12px; border: 2px solid var(--gold); border-radius: 10px; background: #fff8d8; }
.parent-goal div, .room-goal div { grid-column: 1 / -1; margin: 0; }
.parent-goal i, .room-goal i { background: var(--jade); }
.room-goal.complete { box-shadow: 0 0 0 4px rgba(217,166,46,.28); }
.parent-gift { margin: 0; overflow: hidden; border: 1px solid #83ad94; border-radius: 9px; background: #edf5ec; }
.parent-gift summary { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 9px 13px; cursor: pointer; list-style: none; }
.parent-gift summary::-webkit-details-marker { display: none; }
.parent-gift summary span:first-child { display: grid; gap: 2px; }
.parent-gift summary b { color: #214d4e; }
.parent-gift summary small { color: #536171; font: 12px/1.35 system-ui; }
.parent-gift-toggle { color: #237961; font-size: 21px; transition: transform .2s ease; }
.parent-gift[open] .parent-gift-toggle { transform: rotate(180deg); }
.parent-gift-body { padding: 0 12px 12px; }
.parent-gift-body > p { margin: 0; }
.parent-gift-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.parent-gift-toolbar label { display: grid; gap: 3px; min-width: 160px; font-size: 13px; font-weight: 900; }
.parent-gift-toolbar select { min-height: 44px; min-width: 0; padding: 7px; border: 2px solid var(--line); border-radius: 8px; background: white; font: 14px var(--font-ui); }
.parent-gift-toolbar button { min-height: 44px; }
.parent-gift-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; max-height: 215px; padding: 2px; overflow: auto; }
.gift-word-option { display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 7px; align-items: center; min-height: 48px; padding: 5px 7px; border: 1px solid #a9cdb9; border-radius: 7px; background: white; cursor: pointer; }
.gift-word-option:has(input:checked) { border-color: var(--jade); background: #d8f0e3; box-shadow: inset 0 0 0 1px var(--jade); }
.gift-word-option input { width: 20px; height: 20px; margin: 0; accent-color: var(--jade); }
.gift-word-option span { display: grid; min-width: 0; }
.gift-word-option b { font: 800 18px var(--font-chinese); }
.gift-word-option small { overflow: hidden; color: #536171; font: 11px/1.3 system-ui; text-overflow: ellipsis; white-space: nowrap; }
.parent-gift-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 9px; }
.parent-gift-actions span { color: #536171; font: 800 13px system-ui; }
.parent-change-notice { position: absolute; right: 20px; bottom: 18px; z-index: 2; max-width: min(420px,calc(100% - 40px)); padding: 12px 17px; border: 2px solid #f4d78e; border-radius: 10px; color: #fff8df; background: #164d50; box-shadow: 0 8px 24px #17374480; font: 800 14px/1.4 var(--font-ui); pointer-events: none; }
.parent-change-notice[data-kind="error"] { border-color: #e8aa8f; background: #873b34; }
.accuracy-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.accuracy-grid div { display: grid; grid-template-columns: 1fr auto; gap: 5px 8px; padding: 9px; background: white; border-radius: 8px; }
.accuracy-grid i { grid-column: 1 / -1; height: 8px; overflow: hidden; border-radius: 9px; background: #d8cfc0; }
.accuracy-grid em { display: block; height: 100%; background: var(--jade); }
.weekly-table { display: grid; gap: 7px; }
.weekly-table div { display: grid; grid-template-columns: 1.5fr repeat(5,1fr); gap: 7px; padding: 9px; border-radius: 8px; background: white; }
.gear-grid, .set-grid, .shop-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.gear-grid article, .set-card, .shop-grid article { display: grid; gap: 6px; padding: 12px; border-radius: 9px; background: white; }
.gear-grid span, .set-card small, .shop-grid span { color: #647180; font: 12px system-ui; }
.gear-grid button, .set-card button, .shop-grid button { min-height: 40px; border: 0; border-radius: 8px; font-weight: 800; }
.set-card.complete { border: 2px solid var(--jade); }
.character-preview { display: flex; align-items: center; gap: 18px; margin: 12px 0; padding: 14px; border-radius: 12px; background: white; }
.paper-hero { width: 112px; height: 132px; }
.hero-avatar { position: relative; flex: 0 0 auto; overflow: hidden; border: 4px solid var(--ink); border-radius: 35px 35px 18px 18px; background: #dce9e1; }
.hero-avatar-image { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 5px 3px rgba(27,36,48,.25)); }
.hero-avatar-hat { display: none; position: absolute; z-index: 4; top: 6%; left: 22%; width: 56%; height: 10%; border: 2px solid var(--ink); border-radius: 50% 50% 15% 15%; background: #c9a45c; }
.hero-avatar.red-cap .hero-avatar-hat, .hero-avatar.bamboo-hat .hero-avatar-hat, .hero-avatar.scholar-cap .hero-avatar-hat, .hero-avatar.gold-crown .hero-avatar-hat { display: block; }
.hero-avatar.red-cap .hero-avatar-hat { background: #c63f2b; }
.hero-avatar.gold-crown .hero-avatar-hat { background: var(--gold); }
.hero-level { display: grid; flex: 1; gap: 6px; min-width: 0; }
.hero-level b { font-size: 24px; }
.hero-level span, .equipment-section p { color: #536171; font: 14px/1.45 system-ui; }
.hero-xp { height: 13px; overflow: hidden; border: 2px solid var(--ink); border-radius: 9px; background: #d8cfc0; }
.hero-xp i { display: block; height: 100%; background: var(--gold); }
.hero-stat-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin: 14px 0 20px; }
.hero-stat-grid div { padding: 11px 12px; border-left: 4px solid var(--jade); border-radius: 8px; background: white; }
.hero-stat-grid span { display: block; color: #536171; font: 12px system-ui; }
.hero-stat-grid b { display: block; margin-top: 3px; font-size: 19px; }
.equipment-section h2 { margin-bottom: 4px; }
.equipment-section > p { margin-top: 0; }
.hero-status-panel .gear-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.hero-status-panel .gear-card { grid-template-columns: 72px minmax(0,1fr); align-items: center; border: 2px solid #d6c5a3; background: #fffaf0; }
.hero-status-panel .gear-card img { grid-row: 1 / span 2; width: 72px; height: 72px; object-fit: contain; filter: drop-shadow(0 3px 4px #47352055); }
.hero-status-panel .gear-card > div { display: grid; gap: 4px; min-width: 0; }
.hero-status-panel .gear-card button { grid-column: 1 / -1; min-height: 44px; }
.hero-status-panel .gear-card.is-equipped { border-color: #337966; background: #e7f3e9; }
.hero-status-panel .gear-card.is-locked img { opacity: .48; filter: grayscale(.8); }
.hero-status-panel .gear-card.is-locked button { opacity: 1; color: #5a5244; background: #e9e2d4; }
.bag-panel > .panel-header { position: relative; display: flex; align-items: start; min-height: 164px; margin: calc(-1 * clamp(14px,2.5vw,24px)) calc(-1 * clamp(14px,2.5vw,24px)) 17px; padding: 26px clamp(16px,2.8vw,28px); overflow: hidden; border-bottom: 4px solid #b38b4d; color: #fff8e5; background: url('../assets/images/ui/traveler-bag.webp') right 72px center / auto 164px no-repeat, linear-gradient(115deg,#172f42,#315867 65%,#467767); }
.bag-panel > .panel-header h1 { color: #f9d382; font-size: clamp(27px,3vw,36px); }
.bag-panel > .panel-header .panel-kicker { color: #d7e5ba; letter-spacing: .12em; text-transform: uppercase; }
.bag-panel > .panel-header > button { position: absolute; z-index: 1; top: 14px; right: 15px; min-height: 44px; }
.bag-panel .bag-summary { margin: 9px 0 17px; padding: 10px 14px; border: 1px solid #dcc99f; border-radius: 9px; color: #554b3c; background: #fff9eb; }
.bag-panel .bag-grid { gap: 13px; }
.bag-panel .bag-section { border: 1px solid #c9b58b; border-top-width: 5px; background: #fffaf0; box-shadow: 0 4px 0 #d8c9aa; }
.bag-panel .bag-list article { min-height: 44px; padding: 7px 0; }
.bag-panel .bag-list article > button { min-height: 44px; }
.bag-panel .bag-scrolls details { border: 1px solid #e1d2b2; background: #fffdf6; }
.bag-summary { display: flex; align-items: baseline; gap: 8px; margin: 8px 0 16px; color: #536171; }
.bag-summary b { color: var(--ink); font-size: 24px; }
.bag-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.bag-section { align-content: start; padding: 13px; border: 2px solid var(--line); border-top-width: 6px; border-radius: 10px; background: rgba(255,255,255,.7); }
.bag-section h2 { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 10px; font-size: 19px; }
.bag-section h2 span { display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 7px; border-radius: 16px; color: white; background: var(--ink); font: 700 13px system-ui; }
.bag-list article.illustrated-item { grid-template-columns: 58px minmax(0,1fr) auto; }
.bag-item-art { grid-column: 1; grid-row: 1 / span 2; width: 54px; height: 54px; object-fit: contain; }
.bag-list .illustrated-item b, .bag-list .illustrated-item span { grid-column: 2; }
.bag-list .illustrated-item strong { grid-column: 3; }
.bag-section.battle-supplies { border-top-color: #c63f2b; }
.bag-section.special-items { border-top-color: var(--gold); }
.bag-section.equipment-items { border-top-color: #263f70; }
.bag-section.material-items { border-top-color: #8b623d; }
.bag-section.bait-items { border-top-color: var(--jade); }
.bag-section.scroll-items { border-top-color: #78689c; }
.bag-list { display: grid; gap: 7px; }
.bag-list article { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 2px 10px; padding-bottom: 7px; border-bottom: 1px solid #d8cfc0; }
.bag-list article:last-child { padding-bottom: 0; border-bottom: 0; }
.bag-list b { min-width: 0; }
.bag-list span { grid-column: 1; color: #647180; font: 12px/1.35 system-ui; }
.bag-list strong { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.bag-empty { margin: 0; color: #647180; font: 13px/1.45 system-ui; }
.bag-scrolls { display: grid; gap: 7px; }
.bag-scrolls details { padding: 8px 9px; border-radius: 7px; background: white; }
.bag-scrolls summary { display: grid; cursor: pointer; }
.bag-scrolls summary span, .bag-scrolls small { color: #647180; font: 12px system-ui; }
.bag-scrolls p { white-space: pre-line; font: 14px/1.5 system-ui; }
.room-panel { width: min(960px,100%); padding: clamp(14px,2.4vw,24px); border-color: #543a2c; background: #f3e9d3; }
.room-header { align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.room-header h1 { margin: 0; color: #3b302c; font: 900 clamp(26px,3vw,34px)/1.1 var(--font-ui); }
.room-header p:last-child { max-width: 48ch; margin: 6px 0 0; color: #5c5348; font: 14px/1.4 system-ui; }
.room-scene { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 220px; overflow: hidden; border: 5px solid #664932; border-radius: 12px; background: #765238 url('../assets/images/room/grandmas-room.jpg') center / cover no-repeat; box-shadow: 0 9px 0 #cfb886; }
.room-shelf-count { position: absolute; top: 4%; right: 3%; display: flex; align-items: center; gap: 8px; padding: 5px 10px; border: 1px solid #e2be79; border-radius: 7px; color: #fff8e8; background: rgba(39,48,59,.9); box-shadow: 0 3px 9px #1c1a1880; }
.room-shelf-count b { color: #eac268; font-size: 24px; }
.room-shelf-count span { font: 700 12px system-ui; }
.room-restoration-display { position: absolute; top: 20%; left: 5%; display: flex; align-items: flex-end; gap: clamp(2px,.8vw,9px); width: 42%; min-height: 19%; }
.room-restoration-display .restoration-art { width: clamp(45px,7vw,76px); filter: drop-shadow(0 5px 3px #21160a8c); }
.room-companion-nook { position: absolute; left: 28%; right: 28%; bottom: 3%; display: grid; justify-items: center; gap: 6px; min-height: 68px; padding: 7px 10px; border: 1px solid #d9bc7c; border-radius: 12px; color: #fff8e8; background: rgba(31,42,53,.88); box-shadow: 0 5px 16px #1c1a1880; }
.room-companion-nook > b { font: 800 12px system-ui; }
.room-companion-nook > div { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; }
.room-spirit { display: grid; place-items: center; min-width: 41px; min-height: 38px; padding: 3px 7px; border: 2px solid #e7c775; border-radius: 30px; color: #213c43; background: #fff4d0; font: 800 clamp(12px,1.5vw,19px) var(--font-chinese); box-shadow: 0 0 12px #f3d8848c; }
.room-companion-empty { color: #f4e5bf; font: 12px/1.3 system-ui; text-align: center; }
.room-progress { display: grid; grid-template-columns: minmax(150px,1fr) minmax(240px,2fr); gap: 10px; margin-top: 20px; }
.room-streak, .room-progress .room-goal { min-height: 74px; padding: 11px 14px; border: 1px solid #ccb48e; border-radius: 10px; background: #fffaf0; }
.room-streak { display: grid; align-content: center; gap: 2px; }
.room-streak span { color: #62574d; font: 700 13px system-ui; }
.room-streak b { color: #765226; font-size: 21px; }
.room-progress .room-goal { border-color: #ccb48e; box-shadow: none; }
.room-goal-empty { display: grid; align-content: center; }
.room-goal-empty span { font: 13px/1.35 system-ui; }
.room-keepsakes { margin-top: 18px; }
.room-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.room-section-heading h2 { margin: 0 0 9px; color: #3b302c; font-size: 19px; }
.room-section-heading span { color: #64594e; font: 12px system-ui; }
.room-keepsake-grid { display: flex; gap: 9px; padding: 2px 2px 8px; overflow-x: auto; scrollbar-width: thin; }
.room-keepsake { display: grid; justify-items: center; align-content: center; gap: 4px; min-width: 105px; max-width: 125px; min-height: 92px; padding: 8px; border: 1px solid #d4b878; border-radius: 10px; background: #fff9e8; text-align: center; }
.room-keepsake img { width: 45px; height: 45px; object-fit: contain; }
.room-keepsake > span { color: #a16c37; font-size: 31px; line-height: 1; }
.room-keepsake b { font: 700 12px/1.25 system-ui; }
.room-decoration { border-color: #b8c9ae; background: #f3f8e9; }
.restoration-art { display: block; width: 64px; aspect-ratio: 1.143 / 1; background-image: url('../assets/images/restorations/restoration-atlas.webp'); background-repeat: no-repeat; background-size: 700% 600%; background-position: calc(var(--icon-column) * 16.6667%) calc(var(--icon-row) * 20%); }
.room-keepsake .restoration-art { width: 64px; }
.restoration-reveal { position: relative; display: grid; justify-items: center; width: min(620px,100%); overflow: hidden; padding: clamp(22px,5vw,48px); border-color: #9f722d; background: radial-gradient(circle at 50% 34%,#fffce8 0 19%,#f5dea1 48%,#d7b25e 100%); text-align: center; isolation: isolate; }
.restoration-reveal::before { position: absolute; z-index: -2; inset: -30%; background: repeating-conic-gradient(from 0deg,rgba(255,255,255,.55) 0 8deg,transparent 8deg 22deg); content: ''; animation: restoration-rays 18s linear infinite; }
.restoration-radiance { position: absolute; z-index: -1; top: 12%; width: 48%; aspect-ratio: 1; border-radius: 50%; background: #fff5bb; box-shadow: 0 0 50px 28px #fff4ae; }
.restoration-reward-art { width: min(280px,68vw); filter: drop-shadow(0 14px 9px #76541f73); animation: restoration-arrive .85s cubic-bezier(.2,.9,.25,1.22) both; }
.restoration-reveal h1 { max-width: 18ch; margin: 2px 0 8px; color: #4b371a; font: 900 clamp(27px,5vw,42px)/1.05 var(--font-ui); }
.restoration-reveal > p:not(.panel-kicker) { max-width: 48ch; margin: 5px 0; color: #4b4133; }
.restoration-room-note { padding: 8px 12px; border: 1px solid #b98837; border-radius: 8px; background: #fff9dfcc; font-weight: 800; }
.restoration-reveal button { margin-top: 14px; }
@keyframes restoration-rays { to { transform: rotate(1turn); } }
@keyframes restoration-arrive { from { opacity: 0; transform: translateY(35px) scale(.62) rotate(-4deg); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .restoration-reveal::before, .restoration-reward-art { animation: none; } }
.room-empty { margin: 0; padding: 13px 15px; border: 1px dashed #baaa8c; border-radius: 9px; color: #64594e; font: 14px/1.45 system-ui; }
.room-action-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 14px; }
.room-action { display: grid; align-content: center; gap: 4px; min-height: 74px; padding: 12px 14px; border: 2px solid #487b66; border-radius: 10px; color: #fff; background: #315e52; text-align: left; }
.room-action:nth-child(2) { border-color: #a57238; background: #76542f; }
.room-action b { font-size: 16px; }
.room-action span { font: 12px/1.35 system-ui; }
.room-explainers { display: grid; gap: 4px; margin-top: 12px; }
.room-explainers details { border-top: 1px solid #d1bfa0; padding: 7px 2px; }
.room-explainers summary { color: #594d3d; font: 700 13px system-ui; cursor: pointer; }
.room-explainers p { max-width: 75ch; margin: 6px 0 0; color: #594d3d; font: 13px/1.45 system-ui; }
.board-explainer { display: grid; gap: 4px; margin: 0 0 14px; padding: 13px 15px; border-left: 5px solid var(--gold); border-radius: 8px; background: white; }
.board-explainer span { color: #536171; font: 14px/1.5 system-ui; }
.quest-list, .scroll-grid, .story-timeline { display: grid; gap: 9px; margin: 14px 0; }
.quest-card, .scroll-grid article, .story-timeline p { margin: 0; padding: 12px; border: 2px solid var(--line); border-radius: 10px; background: white; }
.story-timeline .chapter-journal-heading p { padding: 0; border: 0; border-radius: 0; background: transparent; }
.quest-card { display: flex; justify-content: space-between; gap: 14px; }
.quest-card.complete, .story-timeline .done { border-color: var(--jade); background: #dff3e8; }
.daily-board-banner { background: linear-gradient(110deg,#3b2b22,#74543b 68%,#9b7953); }
.daily-board-banner h1 { color: #ffe09a; }
.daily-chapter { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin: 18px 0 0; padding: 18px 20px; border: 2px solid #aab991; border-radius: 12px; background: linear-gradient(105deg,#e8f0df,#f8f2df); box-shadow: 0 4px 0 #d7d2b8; }
.daily-chapter .panel-kicker { margin: 0 0 4px; color: #39665b; }
.daily-chapter h2 { margin: 0 0 5px; color: #254e46; font-size: 22px; }
.daily-chapter p:last-child { margin: 0; max-width: 62ch; font-size: 14px; }
.daily-chapter button { flex: none; }
.daily-quests { margin-top: 22px; }
.daily-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 10px; }
.daily-section-heading h2 { margin: 0; font-size: 23px; }
.daily-section-heading .panel-kicker { margin: 0 0 3px; color: #7b5c35; }
.daily-section-heading > strong { color: #4b6253; font-size: 14px; white-space: nowrap; }
.daily-board-progress { padding: 10px 0 0; }
.daily-board-progress > div { height: 13px; overflow: hidden; border: 2px solid #755b3c; border-radius: 20px; background: #e5dbc5; }
.daily-board-progress i { display: block; height: 100%; background: linear-gradient(90deg,#397d63,#84b887); }
.daily-board-panel .quest-list { gap: 12px; margin: 16px 0; }
.daily-board-panel .quest-card { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; min-height: 82px; padding: 12px 14px; border: 2px solid #c4ad7d; background: #fffcf3; box-shadow: 0 4px 0 #d8c9aa; }
.daily-board-panel .quest-card.complete { border-color: #438367; background: #e8f4e7; }
.daily-board-panel .quest-card.paused { border-color: #a7a8a5; background: #f3f1e9; }
.quest-number { display: grid; place-items: center; width: 36px; height: 36px; border: 2px solid #ba9152; border-radius: 50%; color: #674623; background: #f8eac2; font-weight: 900; }
.quest-card.complete .quest-number { border-color: #438367; color: #fff; background: #438367; }
.daily-board-panel .quest-card > div { display: grid; gap: 5px; }
.daily-board-panel .quest-card small { color: #686256; font: 12px system-ui; }
.quest-count { padding: 7px 11px; border-radius: 99px; color: #fff; background: #204d4e; font-weight: 900; white-space: nowrap; }
.daily-board-panel .button-row { align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.quest-chest-status { color: #5a503d; font: 700 13px/1.4 system-ui; }
.quest-card.paused { opacity: .58; border-style: dashed; }
.quest-chest-status { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; background: #f6f0e4; color: var(--ink); font-weight: 700; }
.scroll-grid { max-height: 390px; overflow: auto; }
.scroll-grid article { display: grid; gap: 5px; }
.scroll-grid article p { margin: 3px 0 0; font: 15px/1.55 var(--font-chinese); }
.scroll-grid small { color: #647180; }
.storyteller-panel { border-top: 8px solid #78689c; }
.storyteller-welcome { display: flex; align-items: center; gap: 13px; margin: 8px 0 18px; padding: 12px 14px; border-radius: 10px; background: #eee9f5; }
.storyteller-welcome span { display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 auto; color: white; border-radius: 50%; background: #78689c; font: 900 24px var(--font-chinese); }
.storyteller-welcome p { margin: 0; font-weight: 800; }
.story-reader-panel { width: min(920px,100%); padding: 16px; border-color: #4c3324; background: #172334; }
.story-reader-header { display: flex; justify-content: space-between; gap: 16px; padding: 2px 7px 10px; color: var(--paper); }
.story-reader-header h1 { margin: 0; color: white; font: 900 clamp(22px,3vw,34px)/1.2 var(--font-chinese); }
.story-reader-header .panel-kicker { color: #e5b947; }
.story-book-spread { position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; border-radius: 10px; background: #6a4329 url('../assets/images/story/open-book.webp') center / cover no-repeat; box-shadow: inset 0 0 0 2px rgba(229,185,71,.34),0 10px 24px rgba(0,0,0,.42); }
.story-book-page { position: absolute; top: 21%; bottom: 21%; overflow: hidden; color: #33251d; font: 700 clamp(12px,1.8vw,19px)/1.35 var(--font-chinese); line-break: strict; word-break: normal; }
.story-book-left { left: 18%; width: 28%; }
.story-book-right { right: 18%; width: 28%; }
.story-reader-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.boss-victory { border-color: var(--gold); background: linear-gradient(145deg,var(--paper),#fff3bd); }
@media (max-width: 600px) {
  .atlas-window > .panel-header { min-height: 108px; padding-right: 110px; }
  .atlas-window > .panel-header > div { max-width: 100%; }
  .atlas-window > .panel-header h1 { padding-right: 12px; font-size: clamp(23px,6vw,30px); }
  .atlas-window > .panel-header::after { right: 56px; width: 80px; height: 80px; }
  .atlas-window > .panel-header > button { top: 8px; right: 8px; }
  .collection-banner { min-height: 168px; padding-right: 72px; }
  .collection-banner > div { max-width: 100%; }
  .collection-banner img { position: absolute; right: 5px; bottom: 0; width: 85px; height: 90px; opacity: .65; }
  .collection-banner > button { top: 8px; right: 8px; }
  .collection-banner h1 { padding-right: 36px; }
  .bag-panel > .panel-header { min-height: 135px; background-size: auto 120px,auto; background-position: right 65px center,center; }
  .hero-status-panel .gear-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .daily-board-panel .quest-card { grid-template-columns: 36px minmax(0,1fr); }
  .daily-board-panel .quest-card .quest-count { grid-column: 2; justify-self: start; }
  .dpad { right: 9px; bottom: 9px; grid-template-columns: repeat(3,47px); grid-template-rows: repeat(3,47px); }
  .guide-map { top: auto; right: auto; left: 7px; bottom: 7px; width: 139px; padding: 5px; }
  .guide-map-heading b { font-size: 11px; }
  .guide-map-heading span, .guide-map small { font-size: 9px; }
  .level-grid, .status-grid, .parent-settings, .accuracy-grid, .parent-tables, .hero-stat-grid, .bag-grid { grid-template-columns: 1fr; }
  .goal-editor, .weekly-table div { grid-template-columns: 1fr; }
  .parent-gate-settings > div { grid-template-columns: 1fr; }
  .parent-panel { height: 100%; }
  .pin-editor { grid-template-columns: 1fr; }
  .parent-shortcuts { grid-template-columns: 1fr; }
  .parent-gift-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .parent-gift-toolbar, .parent-gift-actions { align-items: stretch; flex-direction: column; }
  .summary-toolbar { align-items: stretch; flex-direction: column; }
  .story-reader-panel { padding: 9px; }
  .story-reader-header { padding-inline: 4px; }
  .story-book-page { top: 20%; bottom: 20%; font-size: 11px; line-height: 1.25; }
  .story-book-left { left: 18%; width: 28%; }
  .story-book-right { right: 18%; width: 28%; }
  .room-progress, .room-action-grid { grid-template-columns: 1fr; }
  .room-scene { min-height: 180px; }
  .room-companion-nook { left: 17%; right: 17%; min-height: 50px; }
  .room-shelf-count { padding: 3px 7px; }
  .room-shelf-count b { font-size: 18px; }
  .story-reader-actions { align-items: stretch; flex-direction: column; }
  .battle-grid, .writing-layout, .question-options, .attack-grid, .service-grid, .spirit-grid, .gear-grid, .set-grid, .shop-grid { grid-template-columns: 1fr; }
  .hero-status-panel .gear-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .shop-item { grid-template-columns: auto 1fr; }
  .shop-item button { grid-column: 1 / -1; }
  .shop-banner { min-height: 145px; }
  .battle-scene { min-height: 520px; }
  .battle-arena { min-height: 190px; }
  .battle-player { left: 8px; }
  .battle-enemy { right: 8px; }
  .battle-nameplate { min-width: 140px; max-width: 180px; font-size: 11px; }
  .battle-hero { width: 58px; height: 70px; }
  .battle-enemy .creature-portrait { width: 112px; height: 88px; }
  .battle-console .attack-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .battle-console .button-row { margin-top: 10px; }
}
@media (min-width: 641px) and (max-width: 1050px) {
  .hud-overview { align-items: flex-start; flex-direction: column; gap: 7px; }
  .hud-status { width: 100%; }
  .hud-actions { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
.dictation-count {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 16px 0;
  padding: 12px 16px;
  border: 1px solid #bda875;
  border-radius: 12px;
}
.dictation-count label { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; }
.dictation-count input { width: 18px; height: 18px; }
.dictation-picker select { width: 100%; min-height: 44px; }
.passage-review { margin: 12px 0; text-align: left; }
.passage-review .passage-scroll { max-height: min(43vh, 320px); overflow: auto; }
@media (max-width: 640px) {
  .daily-chapter { align-items: stretch; flex-direction: column; padding: 16px; }
  .daily-chapter button { align-self: flex-start; }
  .daily-section-heading { align-items: start; flex-direction: column; gap: 3px; }
  .chapter-journal-heading { padding: 15px 16px 12px; }
  .chapter-journal-list li { padding: 11px 14px; }
}
