.scene { background:#111513; }
#sceneArt { width:100%; height:100%; display:block; object-fit:cover; }
[data-screen="home"] .scene::after { content:""; position:absolute; inset:0; background:linear-gradient(90deg,#0c100ff0,#1116159c 42%,#12161120 85%); }
.home-screen { color:#fff6e6; }
.home-screen .subtitle,.home-screen .eyebrow,.home-screen .quick-links button { color:#eee6d6; }
.home-screen .quick-links button:disabled { opacity:.42; }
[data-theme="light"] .home-screen .hero-copy h1 span { color:#fff8e9; }
.hero-actions { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-width:440px;gap:12px; }
.mode-button { display:grid;gap:6px;text-align:left;padding:14px 18px;background:#162321dd;color:#fff3dc;border:1px solid #a9bbad82;cursor:pointer; }
.mode-button:first-child { background:#d8bca2;color:#2c241d;border-color:#f3dac2; }
.mode-button strong { font:600 1.14rem "Microsoft YaHei",serif; }
.mode-button span { font-size:.78rem;opacity:.85; }
.mode-button:hover,.mode-button:focus-visible,.route-card:focus-visible { outline:2px solid #eadcc2;outline-offset:3px; }
.route-note { margin:0 0 18px;line-height:1.65;font-size:.9rem; }
.route-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; }
.route-card { display:grid;position:relative;isolation:isolate;align-items:end;min-height:180px;aspect-ratio:1.52;padding:15px;text-align:left;border:1px solid #ad95845c;color:#fff5e5;background:#252823;overflow:hidden;cursor:pointer; }
.route-card img,.route-card::after { position:absolute;inset:0;width:100%;height:100%; }
.route-card img { object-fit:cover;z-index:-2;transition:transform .35s; }
.route-card:hover img { transform:scale(1.035); }
.route-card::after { content:"";z-index:-1;background:linear-gradient(180deg,#1016120a,#1016121a 16%,#101612e3 74%,#0d1110f7); }
.route-card span,.route-card strong,.route-card small,.route-card em { display:block; }
.route-card small { color:#ebd4ae;font-size:.72rem;letter-spacing:.15em; }
.route-card strong { font-size:1.2rem;line-height:1.55; }
.route-card em { font-size:.82rem;line-height:1.55;font-style:normal; }
.app-shell[data-screen="game"] { background:#111715;color:#ebe5d9; }
.game-screen { --accent:#bda68b;--surface:#302a24;--tone:#eadaac;display:grid;grid-template-columns:minmax(0,1.65fr) minmax(280px,1fr);grid-template-rows:auto auto auto auto auto;grid-template-areas:"art chapter" "art talk" "art choices" "art meters" "art tools";align-content:center;align-items:center;gap:18px clamp(22px,3.6vw,64px);max-width:1700px;margin:auto;padding:22px clamp(18px,4vw,68px) 48px; }
.game-screen .scene { position:relative;inset:auto;grid-area:art;width:100%;height:auto;aspect-ratio:1.5;align-self:center;overflow:hidden; }
.game-screen #sceneArt { object-fit:contain; }
.game-screen[data-place="shop"] { --accent:#cdad7c;--surface:#302a20; }
.game-screen[data-place="river"] { --accent:#82aaa9;--surface:#1c3036; }
.game-screen[data-place="park"] { --accent:#adbd89;--surface:#293025; }
.game-screen[data-place="cemetery"] { --accent:#bfb1b7;--surface:#352d35; }
.game-screen[data-place="hospital"] { --accent:#9fbaba;--surface:#263238; }
.game-screen[data-place="room"] { --accent:#c19c87;--surface:#382b25; }
.game-screen[data-place="dream"] { --accent:#b9a4cb;--surface:#322638; }
.game-screen[data-voice="male"] { --tone:#b9d8eb; }
.game-screen[data-voice="female"] { --tone:#edc4ce; }
.game-screen .chapter-ribbon,.game-screen .game-tools,.game-screen .meters,.game-screen .choices,.game-screen .dialogue-panel { position:relative;inset:auto;width:100%; }
.game-screen .chapter-ribbon { grid-area:chapter;display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 11px;color:#ede6d9; }
.chapter-ribbon #chapterNumber,.chapter-ribbon #routeLabel { color:var(--accent); }
.chapter-ribbon #routeLabel { margin-left:auto;font-size:.75rem; }
.game-screen .meters { grid-area:meters;display:flex;flex-wrap:wrap;gap:8px 16px;color:#b8c0b6; }
.meters .meter { gap:6px; }
.game-screen .game-tools { grid-area:tools;display:flex;flex-wrap:wrap; }
.game-screen .game-tools button { display:block;color:#e0dece;background:#1e2622;border:1px solid #80928465; }
.game-screen .choices { grid-area:choices;gap:7px; }
.game-screen .choice-btn { color:#f1e8d9;background:#28302b;border-color:#8a99835c; }
.game-screen .choice-btn span { color:var(--accent); }
.game-screen .choice-btn:hover { transform:none;background:#354239; }
.game-screen .dialogue-panel,.app-shell[data-theme="light"] .game-screen .dialogue-panel { grid-area:talk;padding:24px 23px 34px;min-height:155px;border:1px solid color-mix(in srgb,var(--accent) 45%,transparent);border-left:3px solid var(--accent);background:linear-gradient(119deg,var(--surface),#151b19);box-shadow:0 12px 35px #04100a38; }
.game-screen[data-place="river"] .dialogue-panel { border-radius:0 22px 0 22px;border-bottom:3px double var(--accent); }
.game-screen[data-place="park"] .dialogue-panel { border-radius:18px 3px 18px 3px; }
.game-screen[data-place="room"] .dialogue-panel { border-radius:8px;border-top:3px double var(--accent); }
.game-screen[data-place="hospital"] .dialogue-panel { border-top:3px solid var(--accent); }
.game-screen[data-place="cemetery"] .dialogue-panel { border:3px double var(--accent); }
.game-screen[data-place="dream"] .dialogue-panel { border-radius:18px;border-style:dotted; }
.game-screen .dialogue-panel::before { border-color:color-mix(in srgb,var(--accent) 12%,transparent);border-radius:inherit; }
.game-screen .speaker { position:static;min-width:0;background:transparent;box-shadow:none;padding:0;margin:0 0 10px;color:var(--tone);font:600 .85rem "Microsoft YaHei",sans-serif;letter-spacing:.14em; }
.game-screen .dialogue-text { color:var(--tone);font-size:clamp(1.03rem,1.55vw,1.35rem);line-height:1.8;text-shadow:none; }
.game-screen .advance-indicator { color:var(--accent); }
.app-shell[data-screen="game"] .footer { position:relative;color:#929c92; }
.app-shell[data-theme="light"] .game-screen .game-tools button { background:#26302a;color:#eee8d9; }
.app-shell[data-theme="light"] .game-screen .choice-btn { background:#e8e4d8;color:#26302a; }
.app-shell[data-theme="light"] .game-screen .choice-btn span { color:#655341; }
@media(max-width:760px) {
  .game-screen { display:grid;grid-template-columns:1fr;grid-template-rows:auto;grid-template-areas:"chapter" "art" "talk" "choices" "tools" "meters";align-content:start;gap:12px;padding:15px 14px 24px;min-height:0; }
  .game-screen .scene { max-height:min(50svh,520px);background:#101412; }
  .game-screen .chapter-ribbon strong { display:inline;margin:0; }
  .game-screen .dialogue-panel { min-height:110px;padding:17px 18px 24px; }
  .game-screen .meters { gap:4px 12px; }
  .route-card { padding:10px;min-height:160px; }
  .route-grid {gap:8px;}
  .mode-button { padding:12px; }
}
@media(max-width:450px) {
  .route-card { aspect-ratio:auto;min-height:162px; }
  .route-card strong {font-size:1rem;}
  .route-card em {font-size:.75rem;}
  .route-grid {margin:0 -6px;}
}
@media(prefers-reduced-motion:reduce) { .route-card img {transition:none;} }
.game-screen { grid-template-rows:repeat(6,auto);grid-template-areas:"art chapter" "art talk" "art extras" "art choices" "art meters" "art tools"; }
.reader-extras { grid-area:extras;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; }
.reader-extras button { position:relative;isolation:isolate;overflow:hidden;min-height:142px;display:flex;align-items:flex-end;text-align:left;padding:16px 12px;border:1px solid #b0a58b70;border-radius:9px;background:#202a25;color:#fff2dd;cursor:pointer; }
.reader-extras img { position:absolute;inset:0;z-index:-2;width:100%;height:100%;object-fit:cover;object-position:60% center;transition:transform .25s ease; }
.reader-extras button::after { content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg,#10171305 10%,#11181335 44%,#0c130fe8 100%); }
.reader-extras strong { font-size:clamp(1rem,1.35vw,1.18rem);font-weight:600;line-height:1.5;text-shadow:0 2px 8px #000; }
.reader-extras button:hover {border-color:#ddcbae;}
.reader-extras button:hover img {transform:scale(1.045);}
.reader-extras button:focus-visible {outline:2px solid #eed6ad;outline-offset:3px;}
.people-list button,.music-dock button { cursor:pointer;border:1px solid #8a9c8e66;background:#202a25;color:#e6e4d2;border-radius:6px;padding:9px 15px;min-height:42px; }
.music-dock button:hover { border-color:var(--accent,#c2b997);background:#2d3931; }
@media(max-width:760px){.reader-extras button {min-height:128px;}}
@media(prefers-reduced-motion:reduce){.reader-extras img {transition:none;}.reader-extras button:hover img {transform:none;}}
.people-list { display:flex;flex-wrap:wrap;gap:7px;margin-bottom:18px; }
.people-list button { border-radius:18px;padding:6px 12px;min-height:36px; }
.people-list button[aria-pressed="true"] { background:#e0c4a4;color:#201c17; }
.profile-story { display:grid;grid-template-columns:minmax(0,.82fr) minmax(0,1.28fr);align-items:start;gap:22px; }
.profile-story figure { margin:0;overflow:hidden;border-radius:5px; }
.profile-story img { width:100%;height:auto;aspect-ratio:3/4;object-fit:cover;display:block; }
.profile-story h3 {font-size:1.55rem;margin:0 0 5px;}
.profile-story small,.track-list small {opacity:.77;}
.profile-story p {font-size:.96rem;line-height:1.8;margin:12px 0 0;}
.profile-note {border-left:2px solid #b7a183;padding-left:10px;}
.track-list {display:grid;gap:8px;}
.track-list button {display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left;color:#ede8dc;background:#202921;border:1px solid #76837466;border-radius:6px;padding:12px 16px;cursor:pointer;}
.track-list button[aria-pressed="true"] {border-color:#cdb48e;background:#30382b;}
.track-list strong,.track-list small {display:block;}
.track-list small {margin-top:3px;}
.track-list i {font-style:normal;font-size:.8rem;white-space:nowrap;color:#dbcdb6;}
.music-dock {position:fixed;z-index:65;inset:auto 0 0;display:flex;align-items:center;justify-content:center;gap:clamp(10px,4vw,52px);padding:8px 12px calc(8px + env(safe-area-inset-bottom,0px));background:#19221ff7;color:#f7ecdb;border-top:1px solid #7f8974;box-shadow:0 -4px 16px #0003;}
.music-dock strong {font-size:.95rem;font-weight:500;}
.music-dock div {display:flex;gap:6px;}
.music-dock button {padding:6px 12px;white-space:nowrap;}
.has-music-dock #app {padding-bottom:calc(66px + env(safe-area-inset-bottom,0px));}
.has-music-dock #modalBackdrop {padding-bottom:calc(74px + env(safe-area-inset-bottom,0px));}
.has-music-dock .modal {max-height:calc(92svh - 70px);}
.has-music-dock .modal-body {max-height:calc(85svh - 126px);}
@media(max-width:760px){.game-screen {grid-template-columns:minmax(0,1fr);grid-template-rows:auto;grid-template-areas:"chapter" "art" "talk" "extras" "choices" "tools" "meters";}}
@media(max-width:520px){.profile-story {grid-template-columns:minmax(0,1fr);gap:12px;}.profile-story img {height:180px;aspect-ratio:auto;object-fit:contain;background:#141b18;}.music-dock {gap:8px;justify-content:space-between;}.music-dock button {padding:5px 9px;}}

