:root {
  --ink: #f7f4ed;
  --muted: #a7afb9;
  --line: rgba(255,255,255,.15);
  --panel: rgba(13,18,24,.73);
  --panel-soft: rgba(24,31,40,.72);
  --accent: #e9b86d;
  --cyan: #9fd5d1;
  --danger: #ee8e7f;
  --ease: cubic-bezier(.22,.8,.26,1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; background: #0e1319; color: var(--ink); font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif; }
body { overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; border: 0; cursor: pointer; }
.app-shell { width: 100vw; height: 100svh; min-height: 560px; position: relative; overflow: hidden; background: #10161d; }
.screen { position: absolute; inset: 0; visibility: hidden; opacity: 0; pointer-events: none; }
.screen.active { visibility: visible; opacity: 1; pointer-events: auto; }

.title-screen { display: grid; place-items: center; isolation: isolate; overflow: hidden; }
.title-backdrop { position: absolute; inset: 0; z-index: -3; background: url("images/校园地图/上放学校门外.jpg") center / cover no-repeat; filter: saturate(.7) contrast(1.08); transform: scale(1.03); animation: slow-drift 18s ease-in-out infinite alternate; }
.title-screen::before { content: ""; position: absolute; inset: 0; z-index: -2; background: linear-gradient(90deg, rgba(7,11,16,.94) 0%, rgba(8,13,19,.74) 42%, rgba(8,12,17,.33) 100%); }
.title-screen::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(8,12,17,.8), transparent 40%, rgba(5,9,14,.3)); pointer-events: none; }
.title-grain, .intro-film-grain { position: absolute; inset: 0; z-index: 1; opacity: .14; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E"); mix-blend-mode: screen; }
.title-copy { width: min(700px, 51vw); padding: 0 0 5vh; position: relative; z-index: 2; justify-self: start; align-self: center; margin-left: clamp(110px, 11vw, 180px); }
.eyebrow { display: block; color: var(--cyan); font: 600 .7rem/1.2 "Space Grotesk", sans-serif; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow-line { display: inline-block; width: 32px; height: 1px; margin-right: 7px; vertical-align: middle; background: var(--accent); }
h1, h2, p { margin: 0; }
.title-copy h1 { margin-top: 18px; font-size: clamp(4.5rem, 12vw, 9rem); font-weight: 900; letter-spacing: -.09em; line-height: .94; text-shadow: 0 10px 34px rgba(0,0,0,.3); animation: title-in .85s var(--ease) both; }
.title-subtitle { margin-top: 15px; color: var(--accent); font-size: clamp(1.1rem, 2.1vw, 1.7rem); letter-spacing: .18em; }
.title-hook { margin-top: 52px; color: #d9ddd9; font-size: clamp(1.05rem, 1.6vw, 1.35rem); line-height: 1.9; }
.title-hook strong { color: #fff; font-weight: 700; }
.title-actions { display: flex; gap: 12px; margin-top: 40px; flex-wrap: wrap; }
.primary-button, .ghost-button { min-height: 48px; padding: 0 25px; border-radius: 2px; letter-spacing: .04em; transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .2s; }
.primary-button { background: var(--accent); color: #1a1712; font-weight: 700; box-shadow: 0 8px 20px rgba(0,0,0,.2); }
.ghost-button { border: 1px solid var(--line); background: rgba(255,255,255,.08); }
.primary-button:hover, .ghost-button:hover { transform: translateY(-2px); }
.primary-button:hover { box-shadow: 0 12px 27px rgba(233,184,109,.25); }
.button-mark { margin-right: 7px; font-size: .75em; }
.ghost-button:hover { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.35); }
.title-note { margin-top: 17px; color: #9ea7af; font-size: .73rem; }
.title-stamp { position: absolute; top: 8vh; right: 5vw; z-index: 2; color: var(--accent); border: 1px solid rgba(233,184,109,.7); padding: 10px 13px; font: 600 .73rem/1.3 "Space Grotesk", sans-serif; letter-spacing: .1em; text-align: center; transform: rotate(7deg); }
.title-stamp b { color: var(--ink); letter-spacing: .28em; font-size: .62rem; font-weight: 600; }
.stamp-dot { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 11px var(--danger); }
.title-emblem-wrap { position: absolute; top: 7vh; left: 5vw; z-index: 2; display: flex; align-items: center; gap: 12px; color: rgba(238,243,239,.72); font: 600 .57rem "Space Grotesk", sans-serif; letter-spacing: .16em; writing-mode: vertical-rl; }
.title-emblem { width: clamp(60px, 7vw, 92px); height: clamp(60px, 7vw, 92px); object-fit: contain; filter: drop-shadow(0 9px 17px rgba(0,0,0,.35)); animation: emblem-in 1.2s var(--ease) both; }
.route-preview { position: absolute; z-index: 2; right: 5vw; bottom: 6vh; width: min(500px, 35vw); padding: 16px 17px 17px; border: 1px solid rgba(255,255,255,.2); background: rgba(9,15,22,.48); backdrop-filter: blur(11px); }
.route-preview-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.13); }
.route-preview-head .eyebrow { font-size: .57rem; }
.route-preview-hint { color: #89969b; font-size: .65rem; }
.route-cards { display: flex; height: 150px; margin-top: 13px; padding-left: 26px; }
.route-card { position: relative; width: 93px; height: 150px; margin-left: -25px; overflow: hidden; border: 1px solid rgba(255,255,255,.36); background: #29323a; cursor: pointer; transform: skewY(-2deg); transition: width .3s var(--ease), transform .3s var(--ease), border-color .3s, z-index .3s; }
.route-card:first-child { margin-left: 0; }
.route-card:hover, .route-card.active { width: 150px; z-index: 5; transform: translateY(-8px) skewY(-2deg); border-color: var(--accent); }
.route-face { position: absolute; inset: 0; display: block; background-repeat: no-repeat; background-size: 515% 309%; filter: grayscale(.15) saturate(.85); transition: transform .3s, filter .3s; }
.route-card:hover .route-face, .route-card.active .route-face { transform: scale(1.08); filter: saturate(1.1); }
.route-card::after { content: ""; position: absolute; inset: 48% 0 0; background: linear-gradient(transparent, rgba(6,11,16,.93)); }
.route-card-label { position: absolute; right: 9px; bottom: 8px; left: 9px; z-index: 1; color: #fff; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.route-detail { min-height: 72px; margin-top: 12px; padding: 12px 13px; border-left: 2px solid var(--accent); background: rgba(255,255,255,.06); }
.route-detail-kicker { display: block; color: var(--cyan); font: 600 .57rem "Space Grotesk", sans-serif; letter-spacing: .12em; }
.route-detail strong { display: block; margin-top: 5px; font-size: .88rem; }
.route-detail p { margin-top: 4px; color: #9ca8aa; font-size: .7rem; line-height: 1.5; }

.intro-screen { display: grid; place-items: center; overflow: hidden; isolation: isolate; background: #0f171d; }
.intro-backdrop { position: absolute; inset: -3%; z-index: -3; background: url("images/校园地图/上放学校园内.jpg") center / cover no-repeat; filter: saturate(.64) brightness(.58); transform: scale(1.04); transition: background-image .75s var(--ease), transform 1.1s var(--ease), filter .75s; }
.intro-screen::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(circle at 75% 45%, rgba(169,211,202,.17), transparent 29%), linear-gradient(90deg, rgba(7,13,18,.95), rgba(7,13,18,.55) 62%, rgba(7,13,18,.77)); }
.intro-topbar, .intro-bottom { position: absolute; right: 5vw; left: 5vw; z-index: 3; display: flex; justify-content: space-between; align-items: center; }
.intro-topbar { top: 5vh; color: #8b9c9d; font: 600 .65rem "Space Grotesk", sans-serif; letter-spacing: .1em; }
.intro-topbar #intro-counter { color: var(--accent); }
.intro-content { width: min(1180px, 88vw); display: flex; align-items: center; justify-content: space-between; gap: 7vw; position: relative; z-index: 2; }
.intro-copy { width: min(620px, 58vw); animation: rise-in .8s var(--ease) both; }
.intro-kicker { color: var(--accent); font-size: .85rem; letter-spacing: .16em; }
.intro-copy h2 { margin-top: 15px; font-size: clamp(3.8rem, 9vw, 8.6rem); letter-spacing: -.1em; line-height: .95; }
.intro-copy p { margin-top: 30px; color: #d6dfdb; font-size: clamp(1rem, 1.6vw, 1.3rem); line-height: 2; }
.intro-rule { width: min(480px, 100%); height: 2px; margin-top: 31px; background: rgba(255,255,255,.16); }
.intro-rule span { display: block; width: 25%; height: 100%; background: var(--accent); transition: width .5s var(--ease); }
.intro-facts { display: flex; gap: 29px; margin-top: 22px; color: #a5b1b0; }
.intro-fact strong { display: block; color: #f3f2e9; font: 700 1.25rem "Space Grotesk", sans-serif; }
.intro-fact span { display: block; margin-top: 3px; font-size: .65rem; letter-spacing: .1em; }
.intro-visual { position: relative; width: clamp(230px, 29vw, 390px); aspect-ratio: 1; display: grid; place-items: center; animation: emblem-float 5s ease-in-out infinite alternate; }
.intro-visual img { position: relative; z-index: 2; width: 49%; filter: drop-shadow(0 0 30px rgba(233,184,109,.25)); }
.intro-visual > span { position: absolute; z-index: 3; bottom: 19%; color: rgba(236,242,235,.77); font: 700 .65rem "Space Grotesk", sans-serif; letter-spacing: .35em; }
.intro-orbit { position: absolute; inset: 7%; border: 1px solid rgba(159,213,209,.3); border-radius: 50%; transform: rotate(25deg) scaleY(.42); }
.orbit-two { inset: 15%; border-color: rgba(233,184,109,.34); transform: rotate(-43deg) scaleY(.42); }
.intro-copy-in { animation: intro-copy-in .55s var(--ease) both; }
.intro-scene-change { transform: scale(1.1); filter: saturate(.75) brightness(.64); }
.intro-bottom { bottom: 5vh; }
.intro-next, .intro-skip { background: transparent; color: var(--ink); font-size: .78rem; }
.intro-next { color: var(--accent); letter-spacing: .1em; }
.intro-next span { display: inline-block; margin-left: 8px; font-size: 1.15rem; transition: transform .2s; }
.intro-next:hover span { transform: translateX(5px); }
.intro-skip { color: #7e8e92; }
.intro-skip:hover { color: #fff; }

.game-screen { background: #0f151c; transition: opacity .4s var(--ease); }
.scene { position: absolute; inset: 0; z-index: 1; background-position: center; background-size: cover; transition: background-image .65s var(--ease), transform .7s var(--ease); }
.scene.is-changing { transform: scale(1.025); }
.scene-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,13,18,.34) 0%, rgba(8,13,18,.02) 32%, rgba(8,13,18,.2) 57%, rgba(8,13,18,.89) 100%); pointer-events: none; }
.location-label, .day-label { position: absolute; top: 78px; z-index: 5; color: #e7eceb; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.location-label { left: 32px; font-size: .82rem; letter-spacing: .16em; }
.day-label { right: 32px; font: 600 .78rem "Space Grotesk", sans-serif; color: var(--accent); letter-spacing: .1em; }
.characters { position: absolute; inset: 7% 7% 20%; pointer-events: none; }
.character { position: absolute; bottom: 0; width: min(28vw, 330px); aspect-ratio: var(--cell-ratio, .9); height: auto; background-repeat: no-repeat; background-size: 515% 309%; background-origin: border-box; filter: drop-shadow(0 17px 22px rgba(0,0,0,.29)); animation: character-in .55s var(--ease) both; }
.character.center { left: 50%; transform: translateX(-50%); }
.character.left { left: 4%; }
.character.right { right: 4%; }
.character.dimmed { filter: brightness(.53) saturate(.65) drop-shadow(0 17px 22px rgba(0,0,0,.3)); transform: scale(.97); }
.character.left.dimmed { transform: translateX(-2%) scale(.97); }
.character.right.dimmed { transform: translateX(2%) scale(.97); }
.character[role="button"] { pointer-events: auto; cursor: pointer; }
.character[role="button"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.character.center.selected { transform: translateX(-50%) scale(1.08); z-index: 12; }
.character.left.selected { transform: translateX(2%) scale(1.08); z-index: 12; }
.character.right.selected { transform: translateX(-2%) scale(1.08); z-index: 12; }
.character-profile { position: absolute; right: clamp(18px, 7vw, 100px); bottom: 34%; z-index: 14; width: min(285px, 31vw); padding: 16px 17px; border: 1px solid rgba(233,184,109,.55); border-left: 3px solid var(--accent); background: rgba(8,14,20,.78); box-shadow: 0 15px 35px rgba(0,0,0,.28); backdrop-filter: blur(12px); opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .25s, transform .3s var(--ease); }
.character-profile.visible { opacity: 1; transform: translateY(0); }
.profile-kicker { display: block; color: var(--cyan); font: 600 .57rem "Space Grotesk", sans-serif; letter-spacing: .12em; }
.character-profile strong { display: block; margin-top: 7px; color: #fff; font-size: 1.2rem; }
.character-profile p { margin-top: 7px; color: #c1ccca; font-size: .76rem; line-height: 1.65; }
.chapter-card { position: absolute; left: 32px; bottom: 31%; max-width: 360px; z-index: 2; animation: rise-in .7s var(--ease) both; }
.chapter-kicker { display: block; color: var(--cyan); font: 600 .68rem "Space Grotesk", sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.chapter-card strong { display: block; margin-top: 7px; color: #fff; font-size: clamp(1.1rem, 2vw, 1.65rem); line-height: 1.35; }

.hud { position: absolute; top: 20px; left: 32px; right: 32px; display: flex; justify-content: space-between; align-items: flex-start; z-index: 30; }
.relationship-strip { display: flex; gap: 7px; flex-wrap: wrap; max-width: 72%; }
.relationship-pill { display: grid; grid-template-columns: auto auto auto; align-items: center; column-gap: 6px; row-gap: 1px; padding: 6px 9px; border: 1px solid rgba(255,255,255,.14); background: rgba(10,15,21,.55); backdrop-filter: blur(8px); font-size: .7rem; }
.relationship-pill i { color: #ef9b9b; font-style: normal; font-size: .65rem; letter-spacing: .04em; }
.relationship-pill b { color: var(--accent); font-family: "Space Grotesk", sans-serif; font-size: .68rem; }
.relationship-pill small { grid-column: 1 / -1; color: #a9b5ba; font-size: .54rem; line-height: 1; }
.hud-actions { display: flex; gap: 6px; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; background: rgba(10,15,21,.62); border: 1px solid rgba(255,255,255,.14); font-size: 1.1rem; transition: background .2s, border-color .2s; }
.icon-button:hover { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.38); }

.dialogue-panel { position: absolute; left: clamp(18px, 7vw, 100px); right: clamp(18px, 7vw, 100px); bottom: 24px; min-height: 185px; padding: 21px 27px 19px; z-index: 20; background: var(--panel); border: 1px solid rgba(255,255,255,.19); box-shadow: 0 14px 40px rgba(0,0,0,.26); backdrop-filter: blur(12px) saturate(1.08); }
.dialogue-panel::before { content: ""; position: absolute; top: -1px; left: 0; width: 86px; height: 3px; background: var(--accent); }
.dialogue-meta { display: flex; gap: 11px; align-items: baseline; }
.speaker-name { color: var(--accent); font-size: 1rem; font-weight: 700; }
.speaker-tag { color: #7e8c95; font: 600 .62rem "Space Grotesk", sans-serif; letter-spacing: .14em; }
.dialogue-text { min-height: 68px; max-width: 900px; margin-top: 11px; color: #f1f3f0; font-size: clamp(1rem, 1.55vw, 1.25rem); line-height: 1.85; letter-spacing: .02em; }
.advance-button { position: absolute; right: 20px; bottom: 17px; padding: 8px 1px 8px 13px; background: transparent; color: var(--accent); font-size: .83rem; }
.advance-button span { display: inline-block; margin-left: 6px; font-size: 1.15rem; transition: transform .2s; }
.advance-button:hover span { transform: translateX(4px); }
.choice-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 13px; padding-right: 0; }
.choice-button { min-height: 48px; padding: 11px 15px; border: 1px solid rgba(159,213,209,.35); background: rgba(159,213,209,.08); color: #edf5f2; text-align: left; font-size: .88rem; transition: transform .2s, background .2s, border-color .2s; }
.choice-button:hover { transform: translateY(-2px); background: rgba(159,213,209,.16); border-color: var(--cyan); }
.toast { position: absolute; left: 50%; bottom: 225px; z-index: 8; max-width: 88vw; padding: 8px 13px; background: rgba(9,14,19,.86); border-left: 2px solid var(--accent); color: #fff; font-size: .8rem; opacity: 0; transform: translate(-50%, 8px); transition: opacity .25s, transform .25s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.menu-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 20; width: min(390px, 92vw); padding: 33px 28px; background: #10171f; border-left: 1px solid var(--line); box-shadow: -20px 0 55px rgba(0,0,0,.3); transform: translateX(100%); transition: transform .4s var(--ease); }
.menu-drawer.open { transform: translateX(0); }
.drawer-backdrop { position: fixed; inset: 0; z-index: 19; background: rgba(0,0,0,.52); backdrop-filter: blur(3px); }
.drawer-header, .modal-heading { display: flex; align-items: flex-start; justify-content: space-between; }
.drawer-header h2, .modal-heading h2 { margin-top: 8px; font-size: 1.5rem; letter-spacing: -.03em; }
.drawer-status { margin: 34px 0 19px; padding: 11px 0; color: var(--cyan); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .82rem; }
.drawer-button { width: 100%; display: flex; justify-content: space-between; padding: 16px 0; background: transparent; border-bottom: 1px solid var(--line); color: #eef2ef; text-align: left; }
.drawer-button span { color: var(--accent); }
.settings-block { margin-top: 33px; padding-top: 23px; border-top: 1px solid var(--line); }
.settings-block label { display: flex; justify-content: space-between; color: #b9c1c5; font-size: .8rem; }
.settings-block output { color: var(--accent); font-family: "Space Grotesk", sans-serif; }
input[type="range"] { width: 100%; margin: 16px 0 25px; accent-color: var(--accent); }
.switch-row { align-items: center; cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; }
.switch { width: 35px; height: 19px; position: relative; display: block; background: #29323a; border-radius: 20px; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #d4d9d7; transition: transform .2s; }
.switch-row input:checked + .switch { background: var(--cyan); }
.switch-row input:checked + .switch::after { transform: translateX(16px); background: #162025; }
.drawer-footnote { position: absolute; bottom: 27px; right: 28px; left: 28px; color: #7f8b92; font-size: .72rem; line-height: 1.7; }

.modal-dialog { width: min(650px, 91vw); max-height: 75vh; padding: 25px; border: 1px solid var(--line); background: #10171f; color: var(--ink); box-shadow: 0 25px 80px rgba(0,0,0,.45); }
.credits-dialog { background: linear-gradient(145deg, #111d24, #11161d); }
.credits-list { margin-top: 30px; border-top: 1px solid var(--line); }
.credits-list > div { display: grid; grid-template-columns: 100px 1fr; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.credits-list span { color: var(--cyan); font-size: .76rem; }
.credits-list strong { color: #f4f1e8; font-size: .9rem; line-height: 1.65; font-weight: 600; }
.credits-note { margin-top: 23px; color: #89979a; font-size: .74rem; line-height: 1.7; }
.modal-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(4px); }
.history-list { max-height: 53vh; overflow-y: auto; margin-top: 22px; padding-right: 5px; }
.history-item { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.history-item strong { color: var(--accent); font-size: .78rem; }
.history-item p { margin-top: 5px; color: #d8deda; font-size: .88rem; line-height: 1.65; }

.ending-overlay { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 22px; background: rgba(5,9,13,.83); backdrop-filter: blur(11px); animation: fade-in .4s both; }
.ending-card { width: min(560px, 100%); padding: 44px; border: 1px solid rgba(233,184,109,.45); background: #111a22; box-shadow: 0 20px 70px rgba(0,0,0,.4); }
.ending-kicker { margin-top: 40px; color: var(--cyan); font-size: .82rem; letter-spacing: .1em; }
.ending-card h2 { margin-top: 10px; font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -.06em; }
.ending-card > p:not(.ending-kicker) { margin-top: 22px; color: #c8d1cf; line-height: 1.9; }
.ending-stats { display: flex; gap: 22px; margin: 28px 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ending-stat span { display: block; color: #88939b; font-size: .7rem; }
.ending-stat b { display: block; margin-top: 4px; color: var(--accent); font: 700 1.25rem "Space Grotesk", sans-serif; }

@keyframes slow-drift { from { transform: scale(1.03) translateX(-1%); } to { transform: scale(1.08) translateX(1%); } }
@keyframes title-in { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes emblem-in { from { opacity: 0; transform: rotate(-18deg) scale(.7); } to { opacity: 1; transform: rotate(0) scale(1); } }
@keyframes emblem-float { from { transform: translateY(-8px) rotate(-2deg); } to { transform: translateY(8px) rotate(2deg); } }
@keyframes intro-copy-in { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes character-in { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 700px) {
  .app-shell { min-height: 520px; }
  .title-copy { width: 86vw; margin: 0; padding: 0; position: absolute; top: 13vh; left: 7vw; align-self: initial; }
  .title-copy h1 { font-size: clamp(4rem, 20vw, 6.3rem); }
  .title-hook { margin-top: 36px; font-size: .95rem; }
  .title-stamp { top: 4vh; right: 7vw; font-size: .62rem; }
  .title-emblem-wrap { top: 4vh; left: 7vw; }
  .title-emblem-wrap span { display: none; }
  .title-emblem { width: 54px; height: 54px; }
  .route-preview { right: 5vw; bottom: 2.5vh; width: 90vw; padding: 10px 11px; }
  .route-cards { height: 105px; margin-top: 9px; padding-left: 18px; }
  .route-card { width: 64px; height: 105px; margin-left: -18px; }
  .route-card:hover, .route-card.active { width: 98px; }
  .route-card-label { right: 5px; bottom: 5px; left: 5px; font-size: .59rem; }
  .route-detail { min-height: 51px; margin-top: 8px; padding: 7px 9px; }
  .route-detail strong { font-size: .72rem; }
  .route-detail p { display: none; }
  .route-preview-hint { font-size: .57rem; }
  .title-hook { margin-top: 27px; font-size: .9rem; }
  .title-actions { margin-top: 25px; gap: 7px; }
  .title-actions .primary-button, .title-actions .ghost-button { min-height: 42px; padding: 0 12px; font-size: .72rem; }
  .location-label, .day-label { top: 76px; font-size: .65rem; }
  .location-label { left: 18px; }
  .day-label { right: 18px; }
  .hud { left: 18px; right: 18px; top: 18px; }
  .relationship-strip { max-width: calc(100% - 116px); }
  .relationship-pill { padding: 4px 6px; font-size: .6rem; column-gap: 4px; }
  .relationship-pill small { font-size: .48rem; }
  .hud-actions { gap: 3px; }
  .icon-button { width: 32px; height: 32px; font-size: .95rem; }
  .characters { inset: 20% 0 35%; }
  .character { width: min(42vw, 190px); }
  .character.left { left: -12%; }
  .character.right { right: -12%; }
  .character-profile { right: 15px; bottom: 37%; width: min(260px, 64vw); padding: 11px 12px; }
  .character-profile strong { font-size: .98rem; }
  .character-profile p { font-size: .68rem; }
  .chapter-card { left: 18px; bottom: 39%; max-width: 280px; }
  .chapter-card strong { font-size: 1rem; }
  .dialogue-panel { left: 11px; right: 11px; bottom: 10px; min-height: 204px; padding: 16px 16px 15px; }
  .dialogue-text { min-height: 90px; font-size: .94rem; line-height: 1.75; }
  .advance-button { right: 12px; bottom: 12px; }
  .choice-list { grid-template-columns: 1fr; margin-top: 5px; gap: 7px; }
  .choice-button { min-height: 42px; padding: 9px 11px; font-size: .8rem; }
  .toast { bottom: 230px; }
  .ending-card { padding: 28px 23px; }
  .intro-topbar { top: 3vh; right: 7vw; left: 7vw; font-size: .55rem; }
  .intro-content { display: block; width: 86vw; padding-top: 8vh; }
  .intro-copy { width: 100%; }
  .intro-copy h2 { font-size: clamp(4rem, 19vw, 6.5rem); }
  .intro-copy p { margin-top: 20px; font-size: .92rem; line-height: 1.85; }
  .intro-rule { margin-top: 22px; }
  .intro-facts { gap: 19px; margin-top: 16px; }
  .intro-fact strong { font-size: 1.05rem; }
  .intro-fact span { font-size: .56rem; }
  .intro-visual { width: 180px; margin: 30px auto 0; }
  .intro-bottom { bottom: 3vh; right: 7vw; left: 7vw; }
  .intro-next, .intro-skip { font-size: .68rem; }
  .credits-list > div { grid-template-columns: 76px 1fr; gap: 8px; }
}

@media (max-height: 700px) and (min-width: 701px) {
  .title-copy { transform: scale(.86); transform-origin: left center; }
  .route-preview { bottom: 3vh; transform: scale(.82); transform-origin: right bottom; }
}

@media (max-width: 700px) and (max-height: 700px) {
  .title-copy { top: 10vh; }
  .title-copy h1 { font-size: 3.65rem; }
  .title-subtitle { margin-top: 8px; font-size: .92rem; }
  .title-hook { margin-top: 16px; font-size: .78rem; line-height: 1.5; }
  .title-actions { margin-top: 14px; }
  .title-note { display: none; }
  .route-preview { bottom: 1vh; }
  .route-cards { height: 75px; }
  .route-card { height: 75px; width: 48px; }
  .route-card:hover, .route-card.active { width: 72px; }
  .route-detail { min-height: 36px; margin-top: 5px; padding: 5px 7px; }
  .route-detail-kicker { font-size: .48rem; }
  .route-detail strong { margin-top: 2px; font-size: .62rem; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
