:root {
  color-scheme: light;
  --paper: #f8f4eb;
  --card: #fffcf6;
  --ink: #282a24;
  --muted: #686459;
  --line: #e2d9ca;
  --rust: #a64732;
  --honey: #ebbd83;
  --green: #2b6157;
  --night: #272b26;
  --serif: 'Songti SC', 'Noto Serif CJK SC', 'SimSun', 'STSong', Georgia, serif;
  --sans: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', system-ui, sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input, textarea { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .56; }
button:focus-visible, input:focus-visible, a:focus-visible, textarea:focus-visible { outline: 3px solid #bd6c46; outline-offset: 4px; }
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus, .voice-box[tabindex="-1"]:focus { outline: none; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, figure { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.shell, .mast-inner { width: min(1216px, calc(100% - 88px)); margin-inline: auto; }

.masthead { border-bottom: 1px solid var(--line); background: #fdf9f1; }
.mast-inner { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 16px; }
.mast-actions { display: flex; align-items: center; gap: 8px; }
.brand { display: flex; align-items: center; gap: 12px; text-align: left; padding: 0; border: 0; background: none; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; font-weight: 800; letter-spacing: .08em; }
.brand small { color: var(--muted); font-size: 9px; letter-spacing: .14em; margin-top: 4px; }
.brand-mark { display: grid; place-items: center; position: relative; width: 40px; height: 40px; flex: none; border-radius: 12px; color: #fff3da; background: #a44a34; }
.brand-mark i { position: absolute; top: 16px; left: 10px; width: 15px; height: 10px; border: 1.5px solid; border-radius: 2px 2px 6px 6px; }
.brand-mark i::before { content: ''; position: absolute; left: 12px; top: 0; width: 6px; height: 6px; border: 1.5px solid; border-left: 0; border-radius: 0 5px 5px 0; }
.brand-mark i::after { content: ''; position: absolute; width: 1.5px; height: 4px; top: -7px; left: 4px; border-radius: 1px; background: currentColor; box-shadow: 4px -1px currentColor; }
.brand-mark::after { content: ''; position: absolute; top: 29px; width: 20px; height: 1.5px; border-radius: 2px; background: currentColor; }
.archive-button, .reset-button { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 50px; background: var(--card); font-size: .875rem; white-space: nowrap; }
.archive-button:hover, .reset-button:hover { border-color: var(--rust); }
.reset-button { color: var(--rust); }
.archive-button b { color: #8e402f; background: #f3e5d7; padding: 4px 8px; border-radius: 30px; font-size: .75rem; font-variant-numeric: tabular-nums; }
.archive-icon { position: relative; display: inline-block; width: 14px; height: 11px; border: 1.5px solid currentColor; border-radius: 2px; opacity: .75; }
.archive-icon::before { content: ''; position: absolute; width: 14px; height: 4px; left: -1.5px; top: -4px; border: 1.5px solid currentColor; border-radius: 2px; background: var(--card); }
.archive-icon::after { content: ''; position: absolute; top: 3px; left: 4px; width: 4px; height: 1px; background: currentColor; }

#app { min-height: 68vh; padding-block: 32px 46px; }
.kicker { display: flex; align-items: center; gap: 9px; color: var(--rust); font-size: .8rem; font-weight: 800; letter-spacing: .13em; }
.kicker::before { content: ''; flex: 0 0 20px; height: 1px; background: currentColor; }
.subtle { color: var(--muted); font-size: .875rem; line-height: 1.65; }
.primary, .secondary, .quiet { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; gap: 8px; padding: 10px 17px; border: 1px solid transparent; border-radius: 8px; font-weight: 750; font-size: .9375rem; line-height: 1.45; text-align: center; text-decoration: none; }
.primary { background: var(--rust); color: #fffaf1; }
.primary:hover { background: #8f3827; }
.secondary { border-color: var(--line); background: var(--card); }
.secondary:hover { border-color: #b48673; background: #fcf0e3; }
.quiet { background: transparent; color: var(--muted); }
.quiet:hover { color: var(--rust); background: #f2e8db; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }

.hero { position: relative; isolation: isolate; display: grid; grid-template-columns: 43% 57%; min-height: 442px; overflow: hidden; border-radius: 18px; background: var(--night); color: #fff5e7; box-shadow: 0 19px 40px #4e332b15; }
.hero-copy { z-index: 1; padding: 45px 0 42px clamp(28px, 4.5vw, 68px); align-self: center; }
.hero .kicker { color: #f3c695; }
.hero h1 { margin-top: 17px; font-family: var(--serif); font-weight: 900; font-size: clamp(3.35rem, 6.35vw, 6rem); letter-spacing: .08em; line-height: 1.02; }
.hero h1 span { display: block; color: #f5bf88; }
.hero-text { margin-block: 20px 26px; color: #f1e0cf; font-size: 1rem; line-height: 1.85; }
.hero .primary { min-height: 49px; padding-inline: 24px; color: #341f17; background: #f2bb83; box-shadow: 0 6px 22px #15140f52; }
.hero .primary:hover { background: #ffd3a2; }
.hero .quiet { color: #f7e8d5; }
.hero .quiet:hover { background: #fff2d017; }
.hero-illustration { position: relative; display: grid; align-items: end; justify-items: end; min-width: 0; background: linear-gradient(145deg,#704231,#c67f58 52%,#2c4c41); }
.hero-illustration img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 56% center; }
.hero-illustration::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--night), #272b2666 11%, transparent 30%), linear-gradient(0deg,#261e1dab,transparent 25%); pointer-events: none; }
.hero-caption { z-index: 1; padding: 0 26px 23px; color: #fff3df; font-size: .8125rem; letter-spacing: .13em; text-shadow: 0 1px 5px #211910; text-align: right; }
.hero-caption span { display: block; margin-top: 6px; opacity: .94; font-size: .6875rem; letter-spacing: .19em; }

.section-head { display: flex; justify-content: space-between; align-items: end; gap: 14px; margin-block: 37px 16px; }
.section-head h2 { font: 800 clamp(1.75rem, 3vw, 2.15rem) / 1.15 var(--serif); margin-bottom: 6px; letter-spacing: .045em; }
.chapter-count { border: 1px solid var(--line); border-radius: 40px; padding: 8px 11px; color: var(--muted); font-size: .8125rem; white-space: nowrap; }
.chapter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.chapter-card { display: flex; flex-direction: column; width: 100%; height: 100%; text-align: left; overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--card); transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.chapter-card:hover { transform: translateY(-3px); border-color: #cfa890; box-shadow: 0 8px 20px #4e332b14; }
.chapter-card.current { border-color: #a7523d; }
.chapter-art { position: relative; isolation: isolate; overflow: hidden; min-height: 104px; aspect-ratio: 2.15; width: 100%; background-color: #786951; }
.chapter-art img, .stage-art img, .ending-art img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.chapter-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg,#24171159,transparent 55%); }
.chapter-day { position: absolute; z-index: 1; top: 9px; left: 9px; background: #fbf1df; color: #45332a; padding: 4px 8px; border-radius: 4px; font-size: .75rem; font-weight: 750; }
.chapter-caption { padding: 12px 13px 14px; }
.chapter-caption strong { display: block; font-size: 1.0625rem; margin-bottom: 4px; }
.chapter-caption small { display: block; color: var(--muted); font-size: .8125rem; line-height: 1.55; }
.cover-state { float: right; margin-left: 5px; color: var(--rust); font-size: .75rem; }

.game-layout { display: grid; grid-template-columns: minmax(0, 2.35fr) minmax(234px, 1fr); gap: 22px; align-items: start; }
.stage, .side-card { min-width: 0; overflow: hidden; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.stage-art { position: relative; isolation: isolate; min-height: 230px; max-height: 345px; aspect-ratio: 2.32; background: #724e3b; color: white; display: flex; align-items: end; }
.stage-art img { object-position: 50% 48%; }
.stage-art::after, .ending-art::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(0deg,#201911ee, #2019112a 68%, transparent); }
.stage-title { position: relative; z-index: 1; padding: 23px clamp(17px, 3.1vw, 36px); }
.stage-title p { color: #f9e0c2; margin-bottom: 7px; font-size: .8125rem; letter-spacing: .09em; }
.stage-title h1, .ending-art h1 { font: 900 clamp(2.1rem, 5vw, 3.45rem) / 1.1 var(--serif); }
.stage-content { padding: clamp(17px, 3vw, 32px); }
.stage-content h2, .overlay h2 { font-family: var(--serif); font-size: clamp(1.55rem, 3vw, 2rem); line-height: 1.2; margin-bottom: 10px; }
.stage-content h3 { font-size: 1.05rem; margin-block: 17px 9px; }
.stage-content > .actions { margin-top: 19px; }
.stage-content > .subtle { margin-bottom: 11px; }
.dialogue { display: grid; align-content: start; min-height: 136px; }
.speaker { margin-bottom: 12px; color: var(--rust); font-size: .85rem; font-weight: 800; letter-spacing: .06em; }
.long-text { line-height: 1.9; font-size: clamp(1rem, 2vw, 1.125rem); overflow-wrap: anywhere; }
.scene-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 13px; margin-top: 17px; }
.scene-dots { display: flex; gap: 6px; }
.scene-dots i { width: 8px; height: 8px; border-radius: 50%; background: #e6d9ca; }
.scene-dots i.active { background: var(--rust); width: 19px; border-radius: 10px; }
.choices { display: grid; gap: 8px; margin-top: 11px; }
.choice { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 13px; min-height: 48px; border: 1px solid var(--line); border-radius: 8px; background: #fffaf1; text-align: left; line-height: 1.55; }
.choice:hover { border-color: #a35f4c; background: #f6e7da; }
.choice-key { display: grid; place-items: center; width: 26px; min-height: 25px; flex: 0 0 26px; color: #8d3f2e; background: #f1e1d3; border-radius: 5px; font: 750 .76rem var(--sans); }
.side-card { padding: 17px 16px; margin-bottom: 13px; }
.side-card h2 { margin-bottom: 13px; font-size: 1rem; }
.side-card.status { background: #2e3129; color: #fff4e1; border-color: #2e3129; }
.meters { display: grid; gap: 11px; }
.stat { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; font-size: .875rem; }
.stat strong { font-variant-numeric: tabular-nums; }
.stat span:first-letter { font-weight: 850; }
.stat i { grid-column: 1/-1; display: block; width: 100%; height: 5px; background: #dcd1bf; border-radius: 4px; }
.status .stat i { background: #ffffff28; }
.stat b { display: block; width: var(--value); height: 100%; border-radius: inherit; background: #cc806e; transition: width .22s; }
.stat.duty b { background: #8daf95; }
.stat.cringe b { background: #dba556; }
.route-progress { display: grid; grid-template-columns: repeat(8,1fr); gap: 4px; margin-bottom: 10px; }
.route-progress span { height: 4px; border-radius: 6px; background: #e7ddcf; }
.route-progress .seen { background: #ad624c; }
.sidebar .secondary, .sidebar .quiet { width: 100%; }

.game-box { position: relative; border: 1px solid var(--line); border-radius: 10px; background: #f8f1e4; padding: clamp(12px, 2.8vw, 20px); margin-top: 14px; }
.game-phase { color: var(--rust); font-size: .8125rem; font-weight: 750; margin-bottom: 8px; }
.game-box h3 { margin: 0 0 12px; line-height: 1.55; }
.feedback { min-height: 27px; margin-top: 10px; color: #57483d; font-size: .875rem; line-height: 1.5; }
.feedback.good { color: #286052; }
.feedback.bad { color: #8b3726; }
.voice-box { background: #e9e8df; border: 1px solid #dbd9cd; border-radius: 6px; padding: 11px; color: #383b31; line-height: 1.55; }
.shirt-board { position: relative; display: grid; place-items: center; min-height: 181px; margin-bottom: 9px; border-radius: 9px; background: radial-gradient(ellipse at 50% 55%, #d7b99d, #b79a81); touch-action: pan-y; user-select: none; overflow: hidden; }
.shirt { position: relative; display: grid; place-items: center; width: 146px; height: 143px; background: #f9f4e9; clip-path: polygon(24% 4%, 35% 0, 65% 0, 76% 4%, 100% 27%, 85% 50%, 76% 43%, 77% 100%, 23% 100%, 24% 43%, 15% 50%, 0 27%); }
.shirt::before { content: ''; width: 100%; height: 100%; position: absolute; inset: 0; background: linear-gradient(90deg,transparent 48%,#b8a894 49%,#d7cdbb 51%,transparent 52%); }
.shirt-collar { position: absolute; top: -8px; left: 48px; width: 50px; height: 35px; border: 1px solid #bbac97; background: #e7ddcd; clip-path: polygon(0 0, 100% 0, 78% 100%, 50% 67%, 22% 100%); }
.stain { z-index: 1; width: calc(63px * var(--stain,1)); height: calc(44px * var(--stain,1)); border-radius: 38% 62% 59% 41%; transform: rotate(-22deg); background: radial-gradient(ellipse, #88563ba8, #a96c49bd 52%, #b68059a6 66%, #c1936e6b 72%, transparent 76%); opacity: var(--stain,1); transition: width .16s, height .16s, opacity .16s; }
.wipe-count { align-self: end; position: absolute; right: 9px; bottom: 8px; padding: 5px 8px; background: #fff6e8; border-radius: 5px; font-size: .8rem; }
.ppt { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; background: #253b38; padding: 13px; border-radius: 8px; margin-top: 11px; }
.ppt button { display: grid; gap: 5px; align-content: center; min-height: 77px; padding: 8px; border: 1px solid #719989; border-radius: 5px; background: #344e46; color: #fff7dc; text-align: left; line-height: 1.35; font-size: .8125rem; }
.ppt button:hover { background: #527166; }
.ppt strong { color: #ffdc96; font-size: 1.04rem; }
.camera { position: relative; isolation: isolate; height: clamp(152px, 30vw, 236px); border-radius: 8px; overflow: hidden; background: #674733; }
.camera-frame { position: absolute; left: var(--picture-x); top: var(--picture-y); width: 166%; height: 155%; }
.camera-frame img { width: 100%; height: 100%; object-fit: fill; filter: saturate(var(--saturation,1)); }
.camera-frame::after { position: absolute; content: ''; pointer-events: none; inset: 0; background: #ff962f; mix-blend-mode: soft-light; opacity: var(--warmth,.35); }
.focus-target, .sun-marker { position: absolute; z-index: 1; display: grid; place-items: center; transform: translate(-50%,-50%); border-radius: 50%; }
.focus-target { left: 30%; top: 33%; width: 28px; height: 28px; border: 2px dashed #fff6de; }
.sun-marker { left: 26.7%; top: 29%; width: 12px; height: 12px; border: 2px solid #fff6d4; background: #ef932b; box-shadow: 0 0 8px #16180c; }
.horizon, .horizon-target { position: absolute; z-index: 1; left: 7%; right: 7%; height: 0; border-top: 2px dashed #fff6dc; }
.horizon-target { top: 62%; }
.horizon { top: 47.7%; border-color: #ffc06b; border-top-style: solid; }
.camera-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 13px 0 10px; }
.camera-controls label { display: grid; gap: 7px; font-size: .875rem; font-weight: 700; }
input[type='range'] { width: 100%; accent-color: var(--rust); min-height: 30px; margin: 0; cursor: pointer; }
.timing-track { position: relative; height: 27px; margin: 21px 3px 12px; border-radius: 5px; border: 1px solid #9d8770; background: linear-gradient(90deg,#dbb999,#eed9b8,#e0c7ab); }
.timing-zone { position: absolute; top: 0; bottom: 0; left: var(--start); width: var(--range); background: #629681; border-inline: 1px solid #35674f; }
.timing-marker { position: absolute; z-index: 1; top: -6px; bottom: -6px; left: 0; width: 5px; transform: translateX(-50%); border-radius: 4px; background: #302c27; box-shadow: 0 0 0 2px #fff9e9; }
.track-labels { display: flex; justify-content: space-between; margin-bottom: 13px; color: #645240; font-size: .75rem; }

.stage-art.desk-heading { min-height: 112px; aspect-ratio: auto; background: linear-gradient(105deg,#33453a,#536653); }
.desk-heading::after { display: none; }
.desk-heading h1 { font-size: clamp(1.85rem, 4vw, 2.7rem); }
.desk-board { position: relative; margin-top: 14px; background: #a86842; border: 1px solid #99603f; border-radius: 11px; overflow: hidden; aspect-ratio: 1.5; }
.desk-board > img { width: 100%; height: auto; }
.desk-item {
  position: absolute; left: var(--x); top: var(--y); width: var(--w); height: var(--h); min-height: 44px;
  transform: translate(-50%,-50%); display: flex; align-items: end; justify-content: center; padding: 3px;
  color: #302821; background: #261c1b14; border: 1px dashed #ffeed2d1; border-radius: 7px;
  font-size: clamp(.6875rem, 2.6vw, .8125rem); font-weight: 750; text-align: center; line-height: 1.25;
}
.desk-item[data-value="0"] { --x: 28%; --y: 28%; --w: 38%; --h: 34%; }
.desk-item[data-value="1"] { --x: 74%; --y: 31%; --w: 21%; --h: 27%; }
.desk-item[data-value="2"] { --x: 14.5%; --y: 71%; --w: 18%; --h: 27%; }
.desk-item[data-value="3"] { --x: 46%; --y: 71%; --w: 32%; --h: 22%; }
.desk-item[data-value="4"] { --x: 81%; --y: 71%; --w: 25%; --h: 28%; }
.desk-item span { background: #fff3df; border-radius: 4px; padding: 4px; }
.desk-item:hover:not(:disabled) { background: #fff3df30; }
.desk-item.found { opacity: 1; border: 2px solid #ffe4a1; box-shadow: 0 0 14px #ffe4a1a0; }
.desk-item.found span { background: #ffe4a1; }
.desk-item:disabled:not(.found) { opacity: .45; }
.reward { display: flex; align-items: center; gap: 14px; margin-block: 13px; padding: 14px; border: 1px dashed #cbb18e; border-radius: 8px; background: #faf1df; }
.reward-icon { display: grid; place-items: center; min-width: 51px; height: 51px; border-radius: 9px; background: #edded0; font-size: 1.7rem; }
.reward strong { display: block; margin-bottom: 3px; }
.delta-row { display: flex; flex-wrap: wrap; gap: 6px; margin-block: 12px; }
.delta { border-radius: 20px; padding: 5px 9px; color: #783925; background: #f5e3d5; font-size: .8125rem; font-weight: 700; }
.delta.duty { color: #315a45; background: #e2ecdf; }
.delta.cringe { color: #754713; background: #f4e6c7; }
.phone { max-width: 540px; margin: 13px auto 0; border: 1px solid #d9d5c7; background: #eeeee4; border-radius: 12px; overflow: hidden; }
.phone-head { padding: 12px 14px; text-align: center; border-bottom: 1px solid #d9d8cc; font-weight: 800; }
.phone-body { padding: 15px 12px 19px; }
.phone-time { text-align: center; font-size: .75rem; color: var(--muted); margin-bottom: 11px; }
.message { display: flex; align-items: start; gap: 7px; margin-top: 7px; }
.avatar { display: grid; place-items: center; flex: 0 0 31px; height: 31px; background: #97604a; color: white; border-radius: 6px; font-size: .75rem; }
.bubble { background: #fffcf5; padding: 8px 11px; border-radius: 2px 8px 8px; font-size: .9375rem; line-height: 1.6; }
.message.mine { justify-content: end; }
.mine .bubble { background: #d2e5c8; border-radius: 8px 2px 8px 8px; }

.ending { max-width: 850px; margin: 0 auto; }
.ending-art { display: grid; align-items: end; position: relative; isolation: isolate; overflow: hidden; min-height: 265px; aspect-ratio: 2.55; color: #fff7e7; background: #4b6659; }
.ending-art > div { position: relative; z-index: 1; padding: clamp(18px, 4vw, 38px); }
.ending-art .kicker { color: #ffd09b; margin-bottom: 8px; }
.ending-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 15px; }
.ending-tabs button[aria-pressed='true'] { border-color: var(--rust); color: var(--rust); background: #fae9da; }
.report { padding: clamp(15px, 3vw, 24px); background: #f5ead9; border: 1px solid #e2ccb0; border-radius: 10px; margin-top: 19px; }
.report h2 { margin-bottom: 13px; }
.report-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-bottom: 14px; }
.report-grid > div { background: #fff8e9; border: 1px solid #eadbc4; border-radius: 7px; padding: 10px 8px; text-align: center; }
.report-grid span, .report-grid strong { display: block; }
.report-grid span { color: var(--muted); font-size: .8125rem; }
.report-grid strong { margin-top: 4px; font-size: 1.55rem; }
.report-meta { display: grid; gap: 7px; margin: 0 0 15px; }
.report-meta div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid #e7d5bc; padding-bottom: 6px; font-size: .875rem; }
.report-meta dd { margin: 0; font-weight: 750; text-align: right; }
.post-credits { margin-top: 14px; }
.vip-callout { margin-top: 14px; padding: 10px 13px; border: 1px dashed #b98351; border-radius: 8px; color: #784a24; background: #fff1cf; font-size: .9rem; line-height: 1.6; }

.overlay { width: min(620px, calc(100% - 28px)); max-height: min(88vh, 810px); padding: 0; border: 1px solid var(--line); border-radius: 13px; background: var(--card); color: var(--ink); box-shadow: 0 20px 70px #22151150; }
.overlay::backdrop { background: #2a241d9c; backdrop-filter: blur(3px); }
.overlay-inner { padding: clamp(16px, 4vw, 27px); }
.overlay-head { display: flex; align-items: start; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.overlay-head h2 { margin: 5px 0 0; }
.close-dialog { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); font-size: 1.45rem; line-height: 1; }
.archive-grid { list-style: none; padding: 0; margin: 9px 0 17px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.archive-entry { display: flex; align-items: start; gap: 7px; padding: 8px; min-width: 0; border: 1px solid var(--line); border-radius: 7px; background: #fbf5e9; }
.archive-entry.missing { color: var(--muted); background: transparent; }
.archive-entry > span { font-size: 1.2rem; min-width: 24px; text-align: center; }
.archive-entry strong { display: block; font-size: .875rem; margin-bottom: 3px; line-height: 1.4; }
.archive-entry p { color: var(--muted); font-size: .8125rem; line-height: 1.5; }
.overlay .actions { margin-top: 14px; }
.poster { max-width: 330px; width: 100%; height: auto; margin: 13px auto; border-radius: 7px; box-shadow: 0 6px 20px #38251520; }
.share-text { width: 100%; min-height: 95px; margin-top: 9px; padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); resize: vertical; }
.letter { padding: 12px 0; border-bottom: 1px solid var(--line); }
.letter:last-child { border-bottom: 0; }
.letter p:last-child { line-height: 1.75; }

@media (max-width: 900px) {
  .shell, .mast-inner { width: calc(100% - 44px); }
  .hero { min-height: 390px; }
  .hero-copy { padding-left: 30px; }
  .chapter-grid { gap: 10px; }
  .chapter-caption { padding-inline: 9px; }
  .game-layout { gap: 13px; }
}

@media (max-width: 680px) {
  .shell, .mast-inner { width: calc(100% - 28px); }
  .mast-inner { min-height: 64px; gap: 8px; }
  .mast-actions, .brand { gap: 6px; }
  .brand strong { font-size: .875rem; letter-spacing: .025em; white-space: nowrap; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-mark i { left: 8px; top: 14px; }
  .brand-mark::after { top: 27px; }
  .archive-button, .reset-button { min-height: 39px; padding-inline: 7px; gap: 4px; font-size: .8125rem; }
  .archive-button b { padding-inline: 6px; }
  #app { padding-block: 14px 26px; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-illustration { order: -1; min-height: 0; aspect-ratio: 1.83; }
  .hero-illustration img { object-position: 55% 49%; }
  .hero-illustration::after { background: linear-gradient(0deg,var(--night),#272b2620 41%,transparent 71%); }
  .hero-caption { padding: 0 13px 12px; font-size: .75rem; }
  .hero-caption span { display: none; }
  .hero-copy { padding: 5px 17px 21px; }
  .hero h1 { font-size: clamp(1.85rem, 9.2vw, 4.4rem); margin-top: 11px; }
  .hero h1 span { display: inline; }
  .hero-text { margin-block: 12px 15px; font-size: .9375rem; line-height: 1.65; }
  .hero .primary { min-height: 44px; padding-inline: 15px; }
  .section-head { margin-block: 23px 12px; }
  .chapter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .chapter-art { min-height: 88px; aspect-ratio: 1.85; }
  .chapter-caption { padding: 8px 8px 10px; }
  .chapter-caption strong { font-size: .9375rem; }
  .chapter-caption small { font-size: .75rem; }
  .game-layout { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .side-card { margin: 0; padding: 12px 10px; }
  .side-card .quiet { padding-inline: 6px; }
  .stage-art { min-height: 162px; aspect-ratio: 2.22; }
  .stage-title { padding: 14px 17px; }
  .stage-title p { margin-bottom: 5px; }
  .dialogue { min-height: 100px; }
  .ending-art { min-height: 175px; }
}

@media (max-width: 385px) {
  .archive-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

@media (max-width: 360px) {
  .brand small { display: none; }
  .hero h1 { letter-spacing: .035em; }
  .archive-grid { grid-template-columns: 1fr; }
  .ppt { padding: 7px; }
  .ppt button { padding: 5px; }
  .chapter-count { font-size: .75rem; padding: 6px; }
}

@media (max-width: 320px) {
  .mast-inner { flex-wrap: wrap; row-gap: 5px; padding-block: 7px; }
  .mast-actions { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
