/* Approved 2026-10-29: airy rose, left-hand reference. Shared presentation only. */
:root {
  color-scheme: light;
  --ui-font: "Trebuchet MS", "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --rose-ink: #60475f;
  --rose-muted: #806576;
  --rose-accent: #a83e67;
  --rose-border: #efcbdc;
  --rose-paper: #fffafd;
  --ivory: var(--rose-ink);
  --ink: var(--rose-ink);
  --muted: var(--rose-muted);
  --gold: var(--rose-accent);
  --line: var(--rose-border);
  --panel: #fffafdf5;
  --rose: var(--rose-accent);
  --rose-dark: #8d3158;
  --rose-soft: #fff0f7;
  --rose-line: var(--rose-border);
  --surface: var(--rose-paper);
  --shadow: 0 14px 42px #a45e8118;
  font-family: var(--ui-font);
  color: var(--rose-ink);
  background: #fff2f8;
}
body { font-family: var(--ui-font); color: var(--rose-ink); }
body .backdrop { filter: blur(4px) saturate(.85); }
body:not(:has(.vignette)) .backdrop:after { content: ""; position: absolute; inset: 0; background: #fff1f8b8; }
body .vignette { background: linear-gradient(115deg,#fff6fbd9,#fff3f899 50%,#fcebf5d6); }
body .topbar {
  background: #fffafdf2; border-color: #f2d9e5;
  box-shadow: 0 3px 20px #ab64800a; backdrop-filter: blur(12px);
}
body .brand, body .brand-copy strong { font-family: var(--ui-font); font-weight: 700; letter-spacing: .2px; color: #a74e78; }
body .brand small, body .brand-copy small { color: var(--rose-muted); }
body .seal, body .brand-mark, body .entrance-seal { background: #fff0f7; color: #b6517f; border-color: #efcbdc; border-radius: 14px; }
body .room-heading h1, body .hero-caption, body .room-heading>p:last-child,
body .room-heading .eyebrow, body .base-tag, body .rotate-controls,
body .model-note, body .page-foot { color: var(--rose-ink); text-shadow: none; }
body h1, body h2, body h3, body .room-heading h1, body .lesson-sidebar h1,
body .lesson-card h2, body .study-sheet>h1, body .study-sheet>h2,
body .grammar-page h2, body .reward-card h3, body .battle-info h3,
body .reading-text h3, body .chapter-review h3, body dialog h3,
body #letter-title, body .hero-caption .hero-name, body .archive-level-title,
body .wardrobe-section>summary { font-family: var(--ui-font); font-weight: 700; letter-spacing: -.025em; line-height: 1.22; color: var(--rose-ink); text-shadow: none; }
body .room-heading h1 { font-size: clamp(36px,4.6vw,62px); }
body .lesson-card h2 { font-size: clamp(26px,3.3vw,36px); margin-bottom: 24px; }
body .lesson-sidebar h1 { font-size: 32px; }
body .eyebrow, body .lesson-sidebar .eyebrow, body .lesson-card .eyebrow,
body .panel-top .eyebrow, body dialog .eyebrow { color: #995775; letter-spacing: 1px; }
body .panel, body .lesson-card, body .study-sheet, body .public-sheet,
body dialog, body .presale { background: #fffafdf7; border: 1px solid #f1d5e3; border-radius: 26px; box-shadow: var(--shadow); }
body .lesson-sidebar, body.lesson-body[data-chapter="2"] .lesson-sidebar {
  color: var(--rose-ink); text-shadow: none; background: #fffafdef;
  border: 1px solid #f1d5e3; border-radius: 22px; padding: 22px 18px;
  box-shadow: 0 8px 30px #ae648010;
}
body .map-step { color: #73586b; border-radius: 11px; text-shadow: none; }
body .map-step.active { background: #fce3ef; color: #813c61; border-color: #eeb8d0; font-weight: 700; }
body .map-step:not(:disabled):hover { background: #fff0f7; }
body .level-navigation>summary { color: #81526e; border-color: #edc7da; }
body .save-note { color: var(--rose-muted); border-color: #edd6e1; }
body .location-label { color: #81526e; background: #fce7f1; border-color: #edc7da; }
body .battle-hud { color: #60475f; background: #fffafdf7; border-color: #e9bfd5; box-shadow: 0 6px 22px #a45e8120; }
body .level-badge { color: #875471; }
body .primary, body #enter-world {
  color: #752847; background: linear-gradient(135deg,#ffc3d9,#f6a9c8);
  border: 1px solid #f09fc0; border-radius: 16px; font-weight: 700;
  box-shadow: 0 4px 0 #e99dbb55, 0 6px 16px #c9799b13;
  text-shadow: none; transition: background .18s, transform .18s, box-shadow .18s;
}
body .primary:hover, body #enter-world:hover { background: linear-gradient(135deg,#ffcce0,#f8b3ce); filter: none; }
body .primary:active, body #enter-world:active { transform: translateY(2px); box-shadow: 0 1px 0 #e99dbb55; }
body .quiet, body .study-tabs a, body .archive-links a, body .rotate-controls button {
  background: #fff7fb; color: #944c71; border-color: #edc7da; border-radius: 13px;
}
body .study-tabs a.selected { background: #fbd8e9; color: #81395c; border-color: #e9a6c4; }
body .token { border-radius: 13px; border-color: #ecbad3; color: #62435e; background: #fffafd; box-shadow: 0 3px 6px #b5658b0c; }
body .token:not(:disabled):hover { background: #fff0f8; filter: none; }
body .selected-token { background: #fce4f0; }
body .choice { border-color: #edd3e1; background: #fffcfe; border-radius: 13px; color: var(--rose-ink); }
body .choice:has(input:checked) { border-color: #c16e96; background: #fce5f0; box-shadow: inset 3px 0 #c16e96; }
body input:not([type=checkbox]):not([type=radio]):not([type=range]), body textarea, body select {
  background: #fffcfe; color: var(--rose-ink); border-color: #dfb6cb; border-radius: 12px;
}
body .question { border-color: #ecd4e1; border-radius: 18px; }
body .sentence { background: #fff5fa; border-color: #e8b6d0; border-radius: 15px; }
body .word, body .archive-word, body .archive-rule, body .grammar-deck,
body .reading-text, body .wardrobe-item, body .wardrobe-section { background: #fffcfe; border-color: #edd2e0; border-radius: 18px; }
body .word-bank, body .local-word-bank, body .note-box, body .launch-note,
body .task-card { background: #fff0f7; color: var(--rose-ink); border-color: #d99ab9; }
body .dialogue-card, body .helper-bubble { background: linear-gradient(115deg,#fff0f8,#fffcfe); border-color: #edc9dc; border-radius: 21px; }
body .narration, body .dialogue-card .dialogue-line, body .helper-bubble p { color: #674e62; }
body .dialogue-card .dialogue-role, body .gloss, body .sentence-placeholder { color: #806477; }
body .examples>div, body .grammar-deck .l3-example { background: #fff1f8; border-color: #d89abb; }
body .battle-arena { background: linear-gradient(115deg,#fff0f8,#fffbfe); border-color: #edc3d8; border-radius: 20px; }
body .battle-arena.defeated { background: linear-gradient(115deg,#edf6ee,#fffcfe); border-color: #8da994; }
body progress, body progress::-webkit-progress-bar { background: #f3dfe9; }
body progress::-webkit-progress-value { background: #ce739e; }
body progress::-moz-progress-bar { background: #ce739e; }
body .reward-card, body .reward { background: linear-gradient(120deg,#ffeaf5,#fff9ee); border-color: #e6b7cf; border-radius: 22px; }
body .phone { background: #fff0f7; border-color: #dfb8ce; box-shadow: 0 8px 24px #ad6a8910; }
body .phone p { background: #fffcfe; color: var(--rose-ink); }
body .hint, body .l3-hint { background: #fff6fb; border-color: #d8a2be; }
body .question.correct { border-color: #7d9f85; }
body .question.incorrect { border-color: #be6679; background: #fff1f4; }
body .level-card { background: #fffafd; border-color: #ebccdd; }
body .menu button:hover { background: #fff0f7; }
body .menu button>span:nth-child(2), body .rules-list { color: var(--rose-ink); }
body .gender-options button { background: #fff8fc; border-color: #edc9dc; border-radius: 18px; }
body .gender-options button[aria-pressed=true] { background: #fce1ef; border-color: #c16c97; }
body dialog::backdrop { background: #75526d40; backdrop-filter: blur(6px); }
body #welcome-letter { background: linear-gradient(135deg,#fff9fc,#ffedf7); border: 1px solid #e7bfd4; border-radius: 25px; box-shadow: 0 24px 80px #87506c28, inset 0 0 0 7px #fff5fa; }
body #welcome-letter::backdrop { background: #75526d40; }
body .letter-signature { font-family: var(--ui-font); }
body #letter-copy p { color: #674e62; }
body .music-settings-panel, body #music-control { background: #fffafdf5; border-color: #e9c5d8; }
body :is(button,a,input,select,textarea,summary,canvas):focus-visible { outline: 3px solid #aa4c7d; outline-offset: 4px; }

/* Login uses its own shell, with the same light surfaces and scenery. */
body.game-entrance { --ink: #60475f; --muted: #806576; --rose: #a83e67; --rose-dark: #8d3158; --rose-soft: #fff0f7; --rose-line: #efcbdc; --surface: #fffafd; --shadow: 0 14px 42px #a45e8118; color: #60475f; background: #fff2f8; }
body.game-entrance .brand-copy strong { font-family: var(--ui-font); color: #a74e78; }
body.game-entrance:before { filter: blur(4px) saturate(.85); }
body.game-entrance:after { background: linear-gradient(115deg,#fff6fbd9,#fff3f8aa 50%,#fcebf5e6); }
body.game-entrance .card { background: #fffafdf5; border-color: #efcbdc; border-radius: 26px; box-shadow: var(--shadow); }
body.game-entrance .entrance-story {
  padding: clamp(18px, 3vw, 36px);
  border-radius: 24px;
  background: linear-gradient(135deg, #30202bd9, #30202bb8);
  color: #fff5f3;
  text-shadow: 0 2px 12px #291b28;
}
body.game-entrance #entrance-title { font-family: var(--ui-font); font-weight: 700; color: inherit; }
body.game-entrance :is(.entrance-kicker,.entrance-copy,.entrance-motto span,.entrance-motto small) { color: #fff0eb; }
body.game-entrance h1 { font-family: var(--ui-font); font-weight: 700; color: #60475f; }
body.game-entrance .eyebrow { background: #fff0f7; color: #8b486a; border-color: #efd4e1; }
body.game-entrance :is(.lead,label,.helper) { color: #785c70; }
body.game-entrance button { background: linear-gradient(135deg,#ffc3d9,#f6a9c8); color: #752847; border-color: #f09fc0; border-radius: 15px; box-shadow: 0 4px 0 #e99dbb55; }
body.game-entrance button:hover { background: #ffcee2; }
body.game-entrance input::placeholder { color: #8a6e81; }
@media (max-width:850px) {
  body .lesson-sidebar, body.lesson-body[data-chapter="2"] .lesson-sidebar { padding: 16px; }
  body .lesson-sidebar h1, body.lesson-body[data-chapter="2"] .lesson-sidebar h1 { font-size: 26px; }
  body .lesson-sidebar h1 br { display: initial; }
}
@media (max-width:600px) {
  body .vignette { background: linear-gradient(#fff6fbcc,#fff1f8e8); }
  body .lesson-card, body .study-sheet, body .panel, body .public-sheet { border-radius: 21px; }
  body .room-heading h1 { font-size: 38px; }
  body .lesson-card h2 { font-size: 27px; line-height: 1.25; }
  body.game-entrance #entrance-title br { display: initial; }
}
@media (prefers-reduced-motion:reduce) {
  body .primary, body #enter-world { transition: none; }
}

/* Preserve the room illustration behind the rose interface, including phones. */
body .backdrop{filter:blur(1.5px) saturate(1)}
body .vignette{background:linear-gradient(115deg,#fff6fb4d,#fff3f81f 50%,#fcebf566)}
body:not(:has(.vignette)) .backdrop:after{background:#fff1f824}
body.game-entrance:before{filter:blur(1.5px) saturate(1)}
body.game-entrance:after{background:linear-gradient(115deg,#fff6fb33,#fff3f81a 50%,#fcebf54d)}
body .room-heading,body .hero-caption{background:#fffafde6;padding:12px 18px;border-radius:20px;width:fit-content;margin-left:auto;margin-right:auto}
body .rotate-controls,body .page-foot{color:white;text-shadow:0 1px 4px #34212a}
@media(max-width:600px){
 body .vignette{background:linear-gradient(115deg,#fff6fb2e,#fff3f81a 50%,#fcebf554)}
 body .backdrop{filter:blur(.7px) saturate(1)}
 body .room-heading{padding:12px 16px}
}
