@font-face {
  font-family: "Nachtzine Word";
  src: url("assets/nachtzine/fonts/roboto-condensed-variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: light;
  color: #241f26;
  background: #e9e4d8;
  font: 15px/1.4 system-ui, sans-serif;
  --stock: url("assets/nachtzine/paper-stock-v1.png");
  --xerox: url("assets/nachtzine/xerox-ink-v1.png");
  --portrait: url("assets/nachtzine/flowbot-poses-v2.png");
}
@supports (background-image: image-set(url("assets/nachtzine/web/paper-stock-v1.webp") type("image/webp"))) {
  :root {
    --stock: image-set(url("assets/nachtzine/web/paper-stock-v1.webp") type("image/webp"), url("assets/nachtzine/paper-stock-v1.png") type("image/png"));
    --xerox: image-set(url("assets/nachtzine/web/xerox-ink-v1.webp") type("image/webp"), url("assets/nachtzine/xerox-ink-v1.png") type("image/png"));
    --portrait: image-set(url("assets/nachtzine/web/flowbot-poses-v2.webp") type("image/webp"), url("assets/nachtzine/flowbot-poses-v2.png") type("image/png"));
  }
}
* { box-sizing: border-box; }
body { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-underline-offset: 3px; }
button:focus-visible, a:focus-visible { outline: 3px solid currentColor; outline-offset: 5px; }
[hidden] { display: none !important; }
.zine-page { max-width: 1840px; margin: auto; }
.zine-stage {
  --field: #ef4483;
  --dark: #221f25;
  --paper: #efe7d2;
  --action: #d7ee4e;
  --time: #d7ee4e;
  --accent: #b69ace;
  --face-accent: #e9548b;
  --ink: #19191b;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(210px, 26%) minmax(0, 1fr);
  gap: 24px;
  min-height: 580px;
  height: calc(100svh - 90px);
  max-height: 1020px;
  padding: 22px 30px 24px 0;
  overflow: clip;
  background: var(--field) var(--stock) 0 0 / 640px;
  background-blend-mode: multiply;
}
.zine-stage[data-palette="club"] {
  --field: #8054ca;
  --dark: #271f33;
  --action: #96d9af;
  --time: #f28c41;
  --accent: #b7a1d6;
  --face-accent: #96d9af;
  --ink: #241b2c;
}
.zine-poster { position: relative; min-width: 0; margin: -34px 0 -40px -20px; isolation: isolate; }
.poster-paper, .poster-back { position: absolute; z-index: -1; pointer-events: none; }
.poster-paper {
  inset: 0 4px 0 0;
  background: var(--dark) var(--xerox) 34% 0 / 630px;
  background-blend-mode: luminosity;
  filter: none;
}
.poster-back {
  inset: 140px -10px 40px 42px;
  background: var(--accent) var(--stock) 5% 17% / 440px;
  background-blend-mode: multiply;
  transform: rotate(2.8deg);
  clip-path: polygon(2% 0, 96% 2%, 99% 6%, 97% 61%, 100% 93%, 94% 100%, 0 97%);
  z-index: -2;
  box-shadow: 2px 4px 2px #18111f55;
}
.zine-logo { position: absolute; left: 22px; right: 0; top: 7%; transform: rotate(-5deg); }
.zine-logo img { display: block; width: 100%; height: auto; clip-path: polygon(1% 2%, 98% 0, 100% 96%, 3% 100%, 0 53%); }
.zine-character { position: absolute; width: 99%; aspect-ratio: 1291 / 1218; left: 16px; top: 41%; transform: rotate(-4deg); }
.character-sprite, .character-backing { position: absolute; inset: 0; }
.character-sprite { background: var(--portrait) 0 0 / 200% 200% no-repeat; }
.character-backing {
  background: var(--face-accent) var(--stock) 0 0 / 380px;
  background-blend-mode: multiply;
  inset: 0;
  transform: translate(-2px, 2px) scale(1.1);
  mask: var(--portrait) 0 0 / 200% 200% no-repeat;
  filter: drop-shadow(2px 5px 1px #1118);
}
.zine-stage[data-mood="alert"] .character-sprite { background-position: 100% 0; }
.zine-stage[data-mood="paused"] .character-sprite { background-position: 0 100%; }
.zine-stage[data-mood="cheer"] .character-sprite { background-position: 100% 100%; }
.zine-stage[data-mood="alert"] .character-backing { mask-position: 100% 0; }
.zine-stage[data-mood="paused"] .character-backing { mask-position: 0 100%; }
.zine-stage[data-mood="cheer"] .character-backing { mask-position: 100% 100%; }
.zine-game { min-width: 0; min-height: 0; display: grid; grid-template-rows: 54px minmax(0, 1fr) 76px; gap: 13px; }
.zine-heading { grid-row: 1; }
.zine-words { grid-area: 2 / 1; }
.zine-controls { grid-area: 3 / 1; }
.zine-heading { display: flex; gap: 20px; align-items: flex-start; min-width: 0; padding-left: 18px; }
.ink-label { isolation: isolate; position: relative; margin: 0; padding: 2px 15px 6px; color: var(--paper); font: 900 32px/1.05 "Nachtzine Word", sans-serif; text-transform: uppercase; white-space: nowrap; }
.ink-label::before { content: ""; position: absolute; inset: 0; background: var(--dark) var(--xerox) 21% 48% / 650px; z-index: -1; clip-path: polygon(1% 3%, 14% 0, 78% 3%, 99% 0, 100% 86%, 96% 100%, 61% 97%, 12% 100%, 0 91%); transform: rotate(-1deg); }
.variant-label { font-size: 27px; padding-block: 5px 7px; margin-top: 4px; }
.variant-label::before { transform: rotate(1.5deg); }
#zineLiveScore { position: absolute; inset: 0; padding: inherit; }
.zine-stage[data-run-mode="challenge"][data-phase="running"] .game-name { visibility: hidden; }
.settings-toggle { border: 0; background: none; display: inline-flex; align-items: center; gap: 13px; min-width: 0; min-height: 44px; margin-top: 0; }
.settings-toggle:focus-visible { outline-color: var(--ink); }
.settings-toggle:not(:disabled):is(:hover, :focus-visible)::before { background-position: 43% 65%; }
@media (hover: hover) and (pointer: fine) {
  .settings-toggle:not(:disabled):is(:hover, :focus-visible)::before { animation: ink-cut 2s steps(1, end) infinite; }
}
@keyframes ink-cut {
  0%, 100% { background-position: 43% 65%; }
  25% { background-position: 70% 29%; }
  50% { background-position: 14% 81%; }
  75% { background-position: 58% 12%; }
}
.settings-toggle:not(:disabled):active { translate: 0 1px; }
.settings-mark { position: relative; width: 14px; height: 14px; flex: 0 0 14px; }
.settings-mark::before, .settings-mark::after { content: ""; position: absolute; background: currentColor; }
.settings-mark::before { width: 14px; height: 3px; top: 6px; left: 0; }
.settings-mark::after { width: 3px; height: 14px; left: 6px; top: 0; }
.settings-toggle[aria-expanded="true"] .settings-mark::after,
.settings-toggle:disabled .settings-mark { display: none; }
.settings-panel {
  grid-area: 2 / 1;
  position: relative;
  isolation: isolate;
  z-index: 2;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
}
.settings-scroll {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #57504e #e5dbc3;
  padding: clamp(22px, 3vw, 44px);
  display: grid;
  align-content: start;
  align-content: safe center;
  gap: clamp(15px, 2.5vh, 28px);
}
.settings-paper { position: absolute; inset: 0; z-index: -1; background: var(--paper) var(--stock) 78px 12px / 560px; pointer-events: none; }
.zine-game:has(.settings-panel:not([hidden])) .zine-words { visibility: hidden; }
.settings-group { padding: 0; margin: 0; border: 0; min-width: 0; }
.settings-group legend { padding: 0 0 12px; font: 900 clamp(25px, 2.5vw, 37px)/1 "Nachtzine Word", sans-serif; text-transform: uppercase; }
.settings-choices { display: grid; gap: 9px; }
.speed-choices { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.difficulty-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 68%; }
.mode-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rewind-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 320px; }
.rewind-hint { margin-top: 12px !important; }
.mode-hint { margin: 0; font: 650 clamp(18px, 1.7vw, 25px)/1.25 "Nachtzine Word", sans-serif; max-width: 38ch; }
.settings-choices button {
  position: relative;
  isolation: isolate;
  border: 0;
  background: none;
  color: var(--paper);
  min-width: 0;
  min-height: 56px;
  padding: 9px 12px;
  font: 900 clamp(20px, 2vw, 30px)/1 "Nachtzine Word", sans-serif;
  text-transform: uppercase;
  white-space: nowrap;
}
.settings-choices button::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--dark) var(--xerox) 21% 48% / 630px; clip-path: polygon(1% 4%, 79% 0, 100% 3%, 97% 43%, 99% 93%, 47% 100%, 0 95%, 2% 66%); }
.settings-choices button[aria-pressed="true"] { color: var(--ink); }
.settings-choices button[aria-pressed="true"]::before { background: var(--action) var(--stock) 50px 170px / 560px; background-blend-mode: multiply; }
.settings-choices button[aria-pressed="true"]::after { content: ""; position: absolute; width: 50%; height: 3px; left: 25%; bottom: 6px; background: currentColor; transform: rotate(-1.5deg); }
.settings-choices button:not(:disabled):hover { translate: 0 -1px; }
.settings-choices button:not(:disabled):active { translate: 0 1px; }
.settings-choices button:focus-visible { outline-color: var(--ink); }
.settings-panel .settings-close { --button-paper: var(--accent); justify-self: end; width: 28%; min-width: 125px; min-height: 54px; font-size: 30px; }
.zine-words { --word-fit-ratio: 1.2; list-style: none; margin: 0; padding: 0; min-width: 0; min-height: 0; display: grid; grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 8px; }
.zine-words li { position: relative; min-width: 0; min-height: 0; padding-right: 10px; }
.zine-words li:nth-child(2) { margin-left: -7px; padding-right: 0; }
.zine-words li:nth-child(3) { padding-right: 3px; }
.zine-words li:nth-child(4) { margin-left: -5px; padding-right: 28px; }
.paper-row { position: relative; height: 100%; min-width: 0; padding: 12px clamp(28px, 3.6vw, 68px) 14px; display: flex; align-items: center; isolation: isolate; }
.paper-shadow { position: absolute; inset: 0; z-index: -1; filter: drop-shadow(1px 4px 1px #22172296); }
.paper-surface { position: absolute; inset: 0; overflow: hidden; background: var(--paper) var(--stock) 0 0 / 560px; }
.zine-words li:nth-child(2) .paper-surface { background-position: 170px 53px; }
.zine-words li:nth-child(3) .paper-surface { background-position: 80px 219px; }
.zine-words li:nth-child(4) .paper-surface { background-position: 324px 80px; }
.word-text { display: block; max-width: 100%; white-space: nowrap; font: 900 var(--word-size, 76px)/.86 "Nachtzine Word", "Arial Narrow", sans-serif; text-transform: uppercase; letter-spacing: -.018em; color: var(--ink); font-synthesis: none; }
@supports (background-clip: text) {
  .word-text { background: linear-gradient(#19151bbd, #19151bbd), var(--xerox) 0 0 / 430px; background-clip: text; color: transparent; }
}
.time-paper { --fill: 0%; position: absolute; inset: 0; background: var(--time) var(--stock) 0 100px / 560px; background-blend-mode: multiply; clip-path: polygon(0 0, var(--fill) 0, calc(var(--fill) - 3px) 11%, var(--fill) 19%, calc(var(--fill) - 4px) 31%, calc(var(--fill) - 2px) 45%, var(--fill) 59%, calc(var(--fill) - 5px) 74%, calc(var(--fill) - 1px) 84%, var(--fill) 100%, 0 100%); }
.zine-stage[data-run-mode="timeless"] .time-paper { visibility: hidden; }
.zine-stage[data-scene="challenge"] .zine-words { visibility: hidden; }
.challenge-scene { grid-area: 2 / 1; position: relative; isolation: isolate; min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr); }
.scene-paper { position: absolute; inset: 0 10px 0 0; z-index: -1; background: var(--paper) var(--stock) 170px 53px / 560px; filter: drop-shadow(1px 4px 1px #22172296); }
.scene-content { min-height: 0; min-width: 0; overflow: auto; padding: clamp(24px, 3.6vw, 68px); display: grid; align-content: safe center; justify-items: start; gap: clamp(12px, 2vh, 24px); color: var(--ink); font-family: "Nachtzine Word", sans-serif; }
.scene-title { margin: 0; max-width: 11ch; font: 900 clamp(45px, 7.5vw, 120px)/.95 "Nachtzine Word", sans-serif; text-transform: uppercase; }
.scene-hint { margin: 0; max-width: 30ch; font-size: clamp(22px, 2.4vw, 34px); font-weight: 650; line-height: 1.2; }
.scene-best { margin: 0; font-size: clamp(22px, 2.2vw, 32px); font-weight: 650; }
.scene-best strong { font-weight: 900; }
.score-category { display: block; margin-top: 2px; font-size: .72em; font-weight: 650; }
.scene-score { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; line-height: 1; }
.scene-score strong { font-size: clamp(68px, 9vw, 140px); font-weight: 900; }
.scene-score span { font-size: clamp(24px, 3vw, 42px); font-weight: 750; }
.scene-missed { margin: 0; display: grid; gap: 4px; max-width: 100%; }
.scene-missed span { font-size: clamp(18px, 1.8vw, 25px); font-weight: 650; }
.scene-missed strong { font-size: clamp(23px, 3vw, 48px); font-weight: 900; line-height: 1.1; text-transform: uppercase; overflow-wrap: anywhere; }
.zine-stage[data-phase="ending"] .scene-title,
.zine-stage[data-phase="ended"] .scene-title { position: relative; isolation: isolate; max-width: none; padding: 5px 16px 10px; color: var(--paper); }
.zine-stage[data-phase="ending"] .scene-title::before,
.zine-stage[data-phase="ended"] .scene-title::before { content: ""; position: absolute; inset: -1px -8px 0; z-index: -1; background: var(--dark) var(--xerox) 43% 65% / 650px; clip-path: polygon(0 4%, 97% 0, 100% 91%, 3% 100%); transform: rotate(-2deg); }
.zine-stage[data-phase="ending"] .scene-title::before { animation: ink-cut .4s steps(1, end) 1; }
.zine-game:has(.settings-panel:not([hidden])) .challenge-scene { visibility: hidden; }
.zine-stage[data-phase="ending"] .main-action:disabled { opacity: .6; }
@media (min-width: 901px) and (min-height: 561px) {
  .zine-stage[data-phase="ending"] .scene-content,
  .zine-stage[data-phase="ended"] .scene-content { grid-template-columns: 1fr 1fr; }
  .zine-stage[data-phase="ending"] .scene-title,
  .zine-stage[data-phase="ended"] .scene-title { grid-column: 1 / -1; }
  .scene-score { grid-column: 1; }
  .scene-missed { grid-column: 2; align-self: center; }
  .scene-best { grid-column: 1 / -1; }
}
.zine-controls { display: flex; align-items: stretch; gap: 22px; padding: 0 24px 0 8px; min-width: 0; }
.zine-button { position: relative; isolation: isolate; border: 0; border-radius: 0; min-height: 44px; padding: 4px 20px 8px; color: var(--ink); background: none; font: 900 clamp(26px, 3.6vw, 54px)/1 "Nachtzine Word", sans-serif; text-transform: uppercase; white-space: nowrap; filter: drop-shadow(1px 4px 1px #24122199); }
.zine-button::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--button-paper, var(--action)) var(--stock) 61px 420px / 530px; background-blend-mode: multiply; clip-path: polygon(0 7%, 5% 4%, 6% 0, 29% 2%, 30% 4%, 55% 0, 97% 3%, 96% 12%, 100% 24%, 98% 47%, 100% 58%, 99% 93%, 75% 100%, 52% 97%, 24% 100%, 3% 96%, 2% 77%, 0 74%, 1% 41%); }
.main-action { flex: 1; font-size: clamp(28px, 4.9vw, 78px); line-height: .9; }
.pause-action, .stop-action { --button-paper: var(--accent); flex: 0 0 17%; font-size: clamp(24px, 2.5vw, 39px); }
.rewind-action { --button-paper: var(--accent); flex: 0 0 24%; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 3px; font-size: clamp(24px, 2.9vw, 42px); }
.rewind-status { font-size: .46em; font-weight: 750; letter-spacing: .03em; }
.zine-stage[data-has-rewind="true"] .main-action { min-width: 0; font-size: clamp(23px, 3.5vw, 60px); white-space: normal; }
.zine-stage[data-rewind-state="ready"] .rewind-action { --button-paper: var(--action); }
.zine-stage[data-rewind-state="used"] .rewind-action::before { animation: ink-cut .32s steps(1, end) 1; }
.zine-button:focus-visible { outline-color: #19191b; }
.zine-button:not(:disabled):hover { translate: 0 -2px; }
.zine-button:not(:disabled):active { translate: 0 2px; filter: drop-shadow(0 1px 0 #24122199); }
.zine-stage[data-view="live"][data-phase="idle"] .zine-controls { padding-right: 28px; }
.zine-stage[data-view="live"][data-phase="idle"] .main-action { flex: 0 1 42%; }
.zine-stage[data-view="live"][data-run-mode="challenge"][data-phase="idle"] .main-action { flex-basis: 70%; }
.zine-failure { position: absolute; inset: auto 30px 20px 30px; padding: 20px; color: #211d24; background: var(--paper); z-index: 5; }
.review-deck { display: flex; gap: 0 22px; flex-wrap: wrap; align-items: center; padding: 5px 22px 9px; background: #e9e4d8; }
.review-choices { display: flex; gap: 2px; }
.review-choices button, .reference-link { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 10px; border: 0; background: none; font-size: 13px; color: #29242b; }
.review-choices button[aria-pressed="true"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; font-weight: 750; }
.review-choices button:hover { background: #d8d2c6; }
.swatch { width: 15px; height: 15px; border: 1px solid #29242b; display: block; }
.swatch-nacht { background: linear-gradient(135deg, #df3f76 50%, #cee647 50%); }
.swatch-club { background: linear-gradient(135deg, #7148b7 50%, #96d9af 50%); }
.reference-link { margin-left: auto; }
.proof-note, .review-note { margin: 0; font-size: 12px; }
.proof-note { color: #514956; width: 100%; padding: 2px 10px; }
.review-note { padding-left: 10px; font-weight: 650; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.no-script { margin: 20px; }
@media (min-width: 1600px) {
  .zine-game { grid-template-rows: 66px minmax(0, 1fr) 94px; gap: 18px; }
  .ink-label { font-size: 43px; }
  .variant-label { font-size: 35px; }
}
@media (min-width: 1200px) and (min-height: 800px) {
  .paper-row { padding-block: 18px 20px; }
}
@media (min-width: 901px) and (max-height: 800px) {
  .settings-scroll { padding: 24px; gap: 14px; }
  .settings-group legend { font-size: 27px; padding-bottom: 8px; }
  .settings-choices button { min-height: 48px; padding-block: 6px; }
  .settings-panel .settings-close { min-height: 48px; font-size: 27px; }
}
@media (max-width: 1050px) {
  .zine-stage { grid-template-columns: 23% minmax(0, 1fr); gap: 20px; padding-right: 24px; }
  .zine-game { grid-template-rows: 44px minmax(0, 1fr) 64px; }
  .zine-heading { gap: 12px; }
  .ink-label { font-size: 27px; padding-inline: 10px; }
  .variant-label { font-size: 22px; }
  .zine-logo { left: 24px; right: -5px; }
  .zine-character { width: 107%; left: 7px; }
  .paper-row { padding-inline: 27px; }
  .zine-controls { padding-right: 10px; gap: 14px; }
}
@media (max-width: 900px) and (orientation: portrait) {
  .zine-stage { display: block; padding: 104px 17px 22px; height: calc(100svh - 125px); min-height: 565px; max-height: 950px; }
  .zine-poster { position: absolute; top: 0; left: 0; width: 100%; height: 98px; margin: 0; }
  .poster-paper { inset: -7px -10px 0; background-size: 540px; }
  .poster-back { display: none; }
  .zine-logo { left: 17px; right: auto; top: -3px; width: 164px; transform: rotate(-3deg); }
  .zine-character { left: auto; right: 10px; top: -7px; width: 104px; transform: rotate(4deg); }
  .zine-game { height: 100%; grid-template-rows: 44px minmax(0, 1fr) 57px; gap: 10px; }
  .zine-heading { padding-left: 6px; gap: 10px; }
  .ink-label { font-size: 24px; padding: 3px 10px 5px; }
  .variant-label { font-size: 18px; margin-top: 2px; padding: 5px 8px; }
  .settings-toggle { margin-top: 0; gap: 8px; white-space: normal; text-align: left; font-size: 17px; }
  .settings-scroll { padding: 22px; gap: 22px; }
  .settings-group legend { font-size: 27px; padding-bottom: 10px; }
  .mode-choices { grid-template-columns: 1fr; }
  .mode-choices button { min-height: 44px; }
  .speed-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .difficulty-choices { max-width: none; }
  .settings-choices button { min-height: 44px; font-size: 21px; padding: 8px 4px; }
  .settings-panel .settings-close { font-size: 26px; min-height: 44px; }
  .zine-words { gap: 9px; }
  .zine-words li { padding-right: 0; }
  .zine-words li:nth-child(4) { padding-right: 6px; }
  .paper-row { padding: 10px 20px 12px; }
  .zine-controls { gap: 13px; padding: 0; }
  .zine-button { font-size: 28px; padding-inline: 13px; }
  .pause-action, .stop-action { font-size: 23px; flex-basis: 24%; }
  .zine-stage[data-has-rewind="true"] .zine-controls { gap: 9px; }
  .zine-stage[data-has-rewind="true"] .zine-button { padding-inline: 8px; }
  .zine-stage[data-has-rewind="true"] .main-action { font-size: 23px; }
  .zine-stage[data-has-rewind="true"] .stop-action { flex-basis: 18%; font-size: 21px; }
  .rewind-action { flex-basis: 28%; font-size: 23px; }
  .rewind-status { font-size: 12px; }
  .zine-stage[data-view="live"][data-phase="idle"] .main-action { flex-basis: 65%; }
  .zine-stage[data-view="live"][data-run-mode="challenge"][data-phase="idle"] .main-action { flex-basis: 100%; }
  .review-deck { padding: 3px 8px 10px; gap: 0 9px; }
  .review-choices button, .reference-link { padding-inline: 8px; font-size: 12px; }
  .reference-link { margin-left: 0; }
  .proof-note { padding-inline: 8px; }
  .scene-content { padding: 27px; gap: 18px; }
  .scene-title { font-size: clamp(42px, 8vw, 62px); }
  .scene-score strong { font-size: 72px; }
}
@media (min-width: 701px) and (max-width: 900px) and (orientation: portrait) {
  .zine-stage { padding-top: 122px; }
  .zine-poster { height: 112px; }
  .zine-logo { width: 188px; }
  .zine-character { width: 120px; right: 20px; }
  .zine-game { grid-template-rows: 44px minmax(0, 1fr) 64px; }
  .ink-label { font-size: 32px; }
  .variant-label { font-size: 25px; }
  .settings-toggle { font-size: 25px; }
  .settings-scroll { padding: 38px; gap: 30px; }
  .settings-group legend { font-size: 35px; }
  .speed-choices { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .mode-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .settings-choices button { font-size: 22px; min-height: 56px; padding-inline: 6px; }
  .zine-button { font-size: 38px; }
  .pause-action, .stop-action { font-size: 29px; }
  .zine-stage[data-has-rewind="true"] .main-action { font-size: 35px; }
  .rewind-action { font-size: 30px; }
  .rewind-status { font-size: 15px; }
}
@media (max-width: 360px) and (orientation: portrait) {
  .zine-stage { padding-inline: 12px; }
  .zine-logo { width: 152px; }
  .ink-label { font-size: 22px; }
  .variant-label { font-size: 16px; }
  .settings-toggle { font-size: 14px; gap: 6px; }
  .settings-scroll { padding: 17px; gap: 14px; }
  .settings-group legend { font-size: 25px; padding-bottom: 8px; }
  .settings-choices { gap: 8px; }
  .settings-choices button { font-size: 21px; }
  .difficulty-choices button { font-size: 19px; }
  .zine-heading { gap: 8px; }
  .zine-button { font-size: 21px; }
  .pause-action, .stop-action { font-size: 21px; }
  .zine-stage[data-has-rewind="true"] .main-action { font-size: 21px; }
  .zine-stage[data-has-rewind="true"] .stop-action { font-size: 19px; }
  .rewind-action { font-size: 21px; }
}
@media (orientation: landscape) and (max-height: 560px) {
  .zine-stage { height: calc(100svh - 48px); min-height: 310px; padding: 12px 18px 14px 0; gap: 15px; grid-template-columns: 21% minmax(0, 1fr); }
  .zine-poster { margin-top: -16px; margin-bottom: -24px; }
  .zine-logo { top: 5%; left: 24px; right: -6px; }
  .zine-character { top: 43%; width: 103%; left: 12px; }
  .zine-game { grid-template-rows: 44px minmax(0, 1fr) 44px; gap: 6px; }
  .ink-label { font-size: 22px; padding: 1px 9px 4px; }
  .variant-label { font-size: 17px; margin-top: 1px; padding-block: 3px 4px; }
  .settings-toggle { margin-top: 0; }
  .settings-scroll { padding: 12px 15px; gap: 8px 16px; grid-template-columns: 1.25fr 1fr; align-content: start; }
  .mode-group, .mode-hint { grid-column: 1 / -1; }
  .mode-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .settings-group legend { font-size: 20px; padding-bottom: 6px; }
  .settings-choices { gap: 6px; }
  .speed-choices, .difficulty-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; }
  .settings-choices button { min-height: 44px; padding: 6px 2px; font-size: 16px; white-space: nowrap; }
  .settings-panel .settings-close { grid-column: 2; font-size: 22px; min-width: 100px; min-height: 44px; width: 100%; }
  .rewind-hint { font-size: 17px; }
  .zine-words { gap: 5px; }
  .paper-row { padding: 6px 20px 8px; }
  .zine-controls { gap: 12px; padding-inline: 4px 12px; }
  .zine-button { font-size: 26px; padding-block: 2px 5px; }
  .pause-action, .stop-action { font-size: 21px; }
  .zine-stage[data-has-rewind="true"] .main-action { font-size: 26px; }
  .rewind-action { font-size: 23px; padding-inline: 12px; gap: 1px; }
  .rewind-status { font-size: 12px; }
  .review-deck { padding-block: 1px 5px; gap: 0 12px; }
  .scene-content { padding: 16px 26px; gap: 8px 20px; grid-template-columns: 1fr 1fr; }
  .scene-title { font-size: 37px; }
  .scene-hint { font-size: 20px; }
  .scene-score strong { font-size: 48px; }
  .scene-score span, .scene-best { font-size: 21px; }
  .scene-missed { grid-column: 1; }
  .scene-missed strong { font-size: 21px; }
  .scene-missed span { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .zine-stage[data-rewind-state="used"] .rewind-action::before { animation: none; }
  .zine-stage[data-phase="ending"] .scene-title::before { animation: none; }
  .settings-toggle:not(:disabled):is(:hover, :focus-visible)::before { animation: none; }
  .zine-button:not(:disabled):hover, .zine-button:not(:disabled):active,
  .settings-toggle:active, .settings-choices button:hover, .settings-choices button:active { translate: none; }
}
@media (forced-colors: active) {
  .zine-stage { background: Canvas; color: CanvasText; }
  .poster-paper, .poster-back, .paper-surface, .ink-label::before, .zine-button::before { background: Canvas; }
  .paper-row { outline: 1px solid CanvasText; }
  .word-text { color: CanvasText; background: none; }
  .ink-label, .zine-button { color: CanvasText; }
  .zine-button { border: 2px solid ButtonText; filter: none; }
  .time-paper { background: Highlight; opacity: .25; }
  .review-deck { background: Canvas; color: CanvasText; }
  .review-choices button, .reference-link, .proof-note { color: CanvasText; }
  .zine-logo img, .zine-character { forced-color-adjust: none; }
  .settings-paper { background: Canvas; }
  .scene-paper { background: Canvas; }
  .scene-content { color: CanvasText; }
  .zine-stage[data-phase="ending"] .scene-title, .zine-stage[data-phase="ended"] .scene-title { color: CanvasText; }
  .zine-stage[data-phase="ending"] .scene-title::before, .zine-stage[data-phase="ended"] .scene-title::before { background: Canvas; outline: 1px solid CanvasText; }
  .settings-choices button, .settings-choices button[aria-pressed="true"] { color: ButtonText; border: 2px solid ButtonText; }
  .settings-choices button::before { background: Canvas; }
  .settings-choices button[aria-pressed="true"]::before { background: Canvas; }
  .settings-toggle:focus-visible, .settings-choices button:focus-visible { outline-color: Highlight; }
}
