:root {
  color-scheme: light;
  --ink: #17253a;
  --paper: #f6edda;
  --copper: #b8562c;
  --copper-dark: #77361f;
  --sun: #ffd56a;
  --sky: #9fc9d1;
  --storm: #34475e;
  --mint: #d8eddf;
  --danger: #9e2f2f;
  --safe: #14785e;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-width: 320px; min-height: 100%; background: #d7d1c2; color: var(--ink); }
body { overflow-x: hidden; }
button { font: inherit; color: inherit; }
button:focus-visible, [role="button"]:focus-visible { outline: 3px solid #ffcd45; outline-offset: 2px; }
[hidden] { display: none !important; }

.app-shell {
  width: min(100%, 1180px);
  height: 100svh;
  height: 100dvh;
  min-height: 568px;
  margin: 0 auto;
  padding: env(safe-area-inset-top) max(8px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(8px, env(safe-area-inset-left));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--paper);
  border-inline: 1px solid #807564;
}

.masthead {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 7px;
  border-bottom: 3px double var(--ink);
  background: repeating-linear-gradient(0deg, #f8f0dd 0 6px, #f2e7d0 6px 7px);
}

.title-lockup { min-width: 0; display: flex; align-items: center; gap: 7px; }
.title-lockup small { display: block; font: 700 14px/1.1 ui-monospace, monospace; letter-spacing: .08em; color: var(--copper-dark); }
.title-lockup h1 { margin: 1px 0 0; font: 800 clamp(15px, 4.2vw, 24px)/1.05 "Yu Mincho", serif; overflow-wrap: anywhere; }
.polarity-mark { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border: 3px solid var(--ink); border-radius: 50%; background: var(--sun); font: 900 25px/1 ui-monospace, monospace; box-shadow: 3px 3px 0 var(--copper); }
.mast-actions { display: flex; gap: 5px; }
.mast-actions button, .hud button { min-width: 48px; min-height: 44px; padding: 4px 7px; border: 2px solid var(--ink); background: #fff8e9; font-size: 14px; font-weight: 800; box-shadow: 2px 2px 0 var(--ink); }

.screen-stack { min-height: 0; position: relative; }
.screen { width: 100%; height: 100%; min-height: 0; }

.start-screen {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, .92fr);
  align-items: stretch;
  background: #e4d7bb;
}
.start-world { position: relative; min-height: 0; overflow: hidden; background: linear-gradient(#7facba 0 62%, #d6c49e 62%); border-right: 3px solid var(--ink); }
.start-world::after { content: ""; position: absolute; inset: 62% 0 0; background: repeating-linear-gradient(90deg, #a58a61 0 2px, transparent 2px 42px), repeating-linear-gradient(0deg, #b7a078 0 2px, transparent 2px 34px); opacity: .65; }
.sun-disc { position: absolute; width: min(29vw, 230px); aspect-ratio: 1; top: 7%; right: 8%; border-radius: 50%; background: var(--sun); border: 4px solid var(--ink); box-shadow: 10px 10px 0 rgba(184,86,44,.4); }
.start-cloud { position: absolute; width: 30%; height: 9%; border: 3px solid var(--ink); border-radius: 50%; background: #52667a; box-shadow: 25px 2px 0 #52667a, 45px 8px 0 #52667a; }
.start-cloud.c1 { top: 18%; left: -8%; }
.start-cloud.c2 { top: 37%; right: -2%; transform: scale(.75); }
.start-spire { position: absolute; z-index: 2; left: 39%; bottom: 7%; width: 21%; height: 59%; border: 4px solid var(--ink); background: #efe2bd; clip-path: polygon(35% 0,65% 0,72% 12%,90% 100%,10% 100%,28% 12%); }
.start-spire::before { content: ""; position: absolute; left: 23%; right: 23%; top: 7%; bottom: 6%; background: repeating-linear-gradient(0deg, #b8562c 0 7%, #f7cf6b 7% 12%, #203b51 12% 15%); border: 2px solid var(--ink); }
.start-spire i { position: absolute; z-index: 2; width: 54%; aspect-ratio: 1; left: 23%; top: -12%; border-radius: 50%; border: 4px solid var(--ink); background: var(--sun); }
.start-spire b { position: absolute; z-index: 3; left: 39%; font-size: clamp(18px, 3vw, 34px); color: var(--ink); }
.start-spire b:nth-of-type(1) { top: 32%; }.start-spire b:nth-of-type(2) { top: 57%; }
.current-ribbon { position: absolute; z-index: 3; left: 57%; bottom: 31%; width: 30%; display: flex; justify-content: space-around; transform: rotate(-14deg); }
.current-ribbon i { width: 18px; height: 18px; border-top: 5px solid #fff; border-right: 5px solid #fff; transform: rotate(45deg); filter: drop-shadow(2px 2px 0 var(--copper)); }
.start-copy { padding: clamp(18px, 4vw, 54px); display: flex; flex-direction: column; justify-content: center; background: repeating-linear-gradient(0deg, transparent 0 31px, rgba(24,37,58,.08) 31px 32px); }
.eyebrow { margin: 0 0 6px; color: var(--copper-dark); font-weight: 900; font-size: 14px; letter-spacing: .05em; }
.start-copy h2, .result-screen h2 { margin: 0 0 10px; font: 900 clamp(26px, 5vw, 48px)/1.1 "Yu Mincho", serif; }
.start-copy p { margin: 0 0 14px; font-size: clamp(15px, 2vw, 19px); line-height: 1.7; }
.start-key { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.start-key span { padding: 5px 8px; border: 1px solid var(--ink); background: #fff8e9; font-size: 14px; font-weight: 700; }
.primary-button { min-height: 48px; border: 3px solid var(--ink); background: var(--sun); font-weight: 900; font-size: 17px; box-shadow: 5px 5px 0 var(--copper-dark); }

.game-screen { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; background: #a8cad0; }
.hud { display: grid; grid-template-columns: repeat(4, minmax(45px, 1fr)) auto; gap: 3px; padding: 4px; background: #173148; color: #fff7df; border-bottom: 2px solid #0b1b29; }
.hud > div { min-width: 0; padding: 2px 5px; border-left: 2px solid #d19a52; }
.hud small { display: block; font-size: 14px; color: #dce8e8; }
.hud strong { display: block; font-size: clamp(14px, 2.2vw, 20px); white-space: nowrap; }
.hud button { background: #f5e3b8; color: var(--ink); }

.game-field { position: relative; min-width: 0; min-height: 160px; overflow: hidden; touch-action: pan-y; background: linear-gradient(#6f99aa 0 70%, #b89b70 70%); isolation: isolate; }
.game-field::after { content: ""; position: absolute; z-index: -1; inset: 70% 0 0; background: repeating-linear-gradient(90deg, transparent 0 31px, rgba(23,37,58,.35) 31px 34px), linear-gradient(#c4ac7f,#8e744f); border-top: 4px solid var(--ink); }
.sky-grain { position: absolute; inset: 0 0 30%; opacity: .16; background: radial-gradient(circle at 20% 30%, #fff 0 1px, transparent 2px), radial-gradient(circle at 68% 64%, #fff 0 1px, transparent 2px); background-size: 23px 19px, 31px 27px; }
.storm-front { position: absolute; z-index: 1; top: 44px; width: 28%; height: 24%; transition: transform .45s ease; }
.storm-front.from-left { left: -2%; }.storm-front.from-right { right: -2%; transform: scaleX(-1); }
.storm-front span { position: absolute; width: 62%; height: 55%; background: var(--storm); border: 3px solid #17253a; border-radius: 50%; box-shadow: 28px 5px 0 var(--storm), 54px 13px 0 var(--storm); }
.storm-front span:nth-child(2) { top: 27%; left: 17%; filter: brightness(.78); transform: scale(.85); }
.storm-front span:nth-child(3) { top: 53%; left: 37%; width: 34%; height: 20%; background: repeating-linear-gradient(135deg,#f2cc68 0 5px,#273a50 5px 10px); box-shadow: none; }
.storm-front b { position: absolute; top: 58%; left: 52%; font-size: clamp(24px, 5vw, 45px); filter: drop-shadow(3px 3px 0 #17253a); }
.storm-front.step-1 { translate: 8% 0; }.storm-front.step-2 { translate: 18% 0; }.storm-front.step-3 { translate: 30% 0; }.storm-front.step-4 { translate: 44% 0; }.storm-front.step-5 { translate: 60% 0; }
.from-right.step-1 { translate: -8% 0; }.from-right.step-2 { translate: -18% 0; }.from-right.step-3 { translate: -30% 0; }.from-right.step-4 { translate: -44% 0; }.from-right.step-5 { translate: -60% 0; }
.forecast-board { position: absolute; z-index: 4; top: 5px; left: 50%; transform: translateX(-50%) rotate(-1deg); display: flex; gap: 8px; align-items: center; padding: 4px 10px; border: 2px solid var(--ink); background: #f6edda; box-shadow: 3px 3px 0 var(--copper-dark); font-size: 14px; white-space: nowrap; }
.forecast-board strong { color: var(--danger); }
.pressure-track { position: absolute; z-index: 4; top: 38px; left: 50%; transform: translateX(-50%); display: flex; gap: 3px; }
.pressure-track i { width: 13px; height: 7px; background: #e8f3ed; border: 1px solid var(--ink); }
.pressure-track i.used { background: var(--danger); }

.beacon-head { position: absolute; z-index: 3; left: 50%; top: 21%; width: 58px; height: 58px; transform: translateX(-50%); border: 3px solid var(--ink); border-radius: 50%; background: var(--sun); display: grid; place-items: center; box-shadow: 0 0 0 7px rgba(255,213,106,.2); }
.beacon-head b { font: 900 23px/1 "Yu Mincho", serif; }
.beacon-head i { position: absolute; top: 19px; width: min(26vw, 160px); height: 20px; opacity: .1; transition: opacity .2s, transform .2s; }
.beacon-head i:first-child { right: 47px; clip-path: polygon(100% 0,0 50%,100% 100%); background: #fff4a9; }
.beacon-head i:last-child { left: 47px; clip-path: polygon(0 0,100% 50%,0 100%); background: #fff4a9; }
.beacon-head i.active { opacity: .9; transform: scale(1.08); }
.tower { position: absolute; z-index: 3; left: 50%; bottom: 5%; width: min(47%, 320px); height: 55%; transform: translateX(-50%); display: flex; flex-direction: column; justify-content: flex-end; }
.floor-stack { min-height: 0; flex: 1; width: 58%; margin: 0 auto; display: flex; flex-direction: column-reverse; justify-content: flex-start; }
.floor-stack i { height: 18%; min-height: 12px; border: 3px solid var(--ink); border-bottom: 0; background: repeating-linear-gradient(90deg,#b75b31 0 15%,#e6c879 15% 25%); position: relative; }
.floor-stack i::after { content: ""; position: absolute; left: 38%; width: 24%; height: 100%; background: #ffe28b; border-inline: 2px solid var(--ink); }
.circuit-deck { flex: 0 0 auto; display: grid; grid-template-columns: minmax(58px,1fr) 48px minmax(58px,1fr); align-items: end; gap: 5px; padding: 7px; border: 4px solid var(--ink); border-bottom-width: 7px; background: #d0b47c; box-shadow: inset 0 0 0 3px #efe1bb; }
.battery-slot { min-height: 76px; border: 3px dashed #5b4a36; background: rgba(255,255,255,.35); display: grid; place-items: center; font-weight: 900; font-size: 18px; }
.battery-slot.drag-over { background: #fff5b4; transform: translateY(-3px); }
.battery-slot > .battery-cell { width: 100%; height: 100%; }
.wire-core { height: 64px; display: grid; place-items: center; position: relative; }
.wire-core i { position: absolute; width: 53px; height: 30px; border: 5px solid var(--copper-dark); border-top: 0; }
.wire-core i:first-child { top: 2px; border-bottom: 0; border-top: 5px solid var(--copper-dark); }
.wire-core i:last-child { bottom: 2px; }
.wire-core b { z-index: 1; width: 38px; height: 38px; border: 2px solid var(--ink); border-radius: 50%; display: grid; place-items: center; background: #fff5c6; font-size: 23px; }
.battery-rack { position: absolute; z-index: 4; right: max(5px, 2vw); bottom: 4%; width: min(22%, 145px); min-width: 70px; min-height: 95px; padding: 6px; display: flex; gap: 6px; align-items: flex-end; justify-content: center; border: 3px solid var(--ink); border-top-width: 8px; background: #8b6d47; }
.battery-cell { position: relative; min-width: 46px; min-height: 76px; padding: 3px; border: 3px solid var(--ink); border-radius: 4px; display: grid; grid-template-rows: 1fr auto 1fr; place-items: center; background: #df9d43; font-weight: 900; cursor: grab; touch-action: pan-y; box-shadow: inset 0 0 0 4px #f3c96f; }
.battery-cell i { font-style: normal; font: 900 21px/1 ui-monospace, monospace; }
.battery-cell span { font-size: 14px; background: var(--ink); color: #fff8e9; padding: 1px 5px; }
.battery-cell em { position: absolute; right: 3px; bottom: 3px; width: 7px; height: 66%; background: linear-gradient(to top,#32966c var(--charge,100%),#f6e5bd var(--charge,100%)); border: 1px solid var(--ink); }
.battery-cell.selected { outline: 4px solid #fff3a0; outline-offset: 2px; }
.battery-cell.down { transform: rotate(180deg); }.battery-cell.down span { transform: rotate(180deg); }
.release-banner { position: absolute; z-index: 8; left: 50%; top: 45%; transform: translate(-50%,-50%) rotate(-2deg); min-width: 210px; padding: 10px 18px; border: 4px solid var(--ink); background: #fff2a8; text-align: center; box-shadow: 8px 8px 0 rgba(23,37,58,.5); }
.release-banner strong, .release-banner span { display: block; }.release-banner strong { font: 900 23px/1.2 "Yu Mincho", serif; }.release-banner span { font-size: 14px; }
.pause-panel { position: absolute; z-index: 10; inset: 0; display: grid; place-content: center; gap: 12px; background: rgba(20,37,55,.88); color: #fff; text-align: center; font-size: 19px; }
.pause-panel button { min-width: 140px; min-height: 48px; border: 3px solid #fff; background: var(--sun); color: var(--ink); font-weight: 900; }

.status-line { min-height: 26px; margin: 0; padding: 4px 8px; border-block: 2px solid var(--ink); background: #fff8e9; font-size: 14px; line-height: 1.35; font-weight: 800; text-align: center; white-space: normal; overflow-wrap: anywhere; }
.build-controls { min-height: 82px; display: grid; grid-template-columns: minmax(150px,1fr) minmax(92px,.48fr) minmax(100px,.55fr); gap: 5px; padding: 5px; background: #cfb77f; }
.build-controls button { min-height: 52px; border: 3px solid var(--ink); background: #f7edcf; font-size: 14px; font-weight: 800; box-shadow: 2px 2px 0 var(--ink); }
.build-controls button span, .build-controls button b { display: block; }
.wiring-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.wiring-switch button[aria-pressed="true"] { background: var(--sun); transform: translateY(-2px); }
#repairButton { background: #d9ecdc; }
#repairButton:disabled { opacity: .55; box-shadow: none; }
.send-button { background: var(--copper) !important; color: #fff !important; }
.send-button b { font-size: 20px; letter-spacing: .15em; }

.quiz-screen { padding: clamp(10px, 2.5vw, 28px); display: grid; grid-template-rows: auto auto auto minmax(0,1fr); gap: 8px; background: repeating-linear-gradient(0deg,#eee2c8 0 31px,#ded0b4 31px 32px); }
.quiz-cap { display: flex; justify-content: space-between; padding: 7px 10px; border: 2px solid var(--ink); background: #173148; color: #fff; font-weight: 900; font-size: 14px; }
.quiz-current { display: flex; align-items: center; justify-content: center; gap: 12px; font: 900 21px/1 ui-monospace, monospace; color: var(--copper-dark); }
.quiz-current i { width: 34px; height: 34px; border: 2px solid var(--ink); border-radius: 50%; display: grid; place-items: center; background: var(--sun); font-style: normal; }
.quiz-screen h2 { margin: 0; font-size: clamp(17px, 3vw, 25px); line-height: 1.35; text-align: center; }
.quiz-choices { min-height: 0; display: grid; grid-template-columns: 1fr 1fr; align-content: center; gap: 8px; }
.quiz-choices button { min-height: 52px; padding: 7px 10px; border: 3px solid var(--ink); background: #fff9e9; font-size: clamp(14px, 2vw, 17px); font-weight: 800; box-shadow: 3px 3px 0 #7e6e54; }
.quiz-choices button.correct { background: #bfe7cf; }.quiz-choices button.wrong { background: #f1c1b4; }
.quiz-feedback { position: absolute; inset: auto 5% 6%; z-index: 3; padding: 12px; border: 3px solid var(--ink); background: #fff4cf; box-shadow: 6px 6px 0 var(--copper-dark); }
.quiz-feedback strong { font-size: 19px; }.quiz-feedback p { margin: 5px 0; font-size: 15px; line-height: 1.45; }
.quiz-feedback button { min-width: 120px; min-height: 44px; border: 2px solid var(--ink); background: var(--sun); font-weight: 900; float: right; }

.result-screen { padding: clamp(12px, 3vw, 32px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; background: linear-gradient(#9bc4c8 0 48%,#efd98e 48%); }
.dawn-seal { width: 70px; height: 70px; border: 4px solid var(--ink); border-radius: 50%; background: var(--sun); display: grid; place-items: center; box-shadow: 7px 7px 0 var(--copper); }
.dawn-seal b { font: 900 32px/1 ui-monospace,monospace; }.result-screen h2 { font-size: clamp(24px, 4vw, 42px); margin: 0; }
.final-score { min-width: min(90%, 420px); padding: 7px 18px; border-block: 3px double var(--ink); background: rgba(255,248,226,.65); }
.final-score span, .final-score strong { display: block; }.final-score span { font-size: 14px; }.final-score strong { font: 900 clamp(30px, 6vw, 54px)/1 ui-monospace,monospace; }
.result-stats { display: grid; grid-template-columns: repeat(3,1fr); width: min(100%,650px); gap: 5px; }
.result-stats div { padding: 5px; border: 2px solid var(--ink); background: #fff7df; }.result-stats span,.result-stats b { display: block; font-size: 14px; }.result-stats b { font-size: 18px; }
.result-screen > p:not(.eyebrow) { margin: 0; font-size: 15px; }
.result-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: center; }
.result-actions button { min-height: 48px; min-width: 160px; padding: 6px 12px; border: 3px solid var(--ink); font-weight: 900; background: #fff8e9; }

.overlay-panel { position: absolute; z-index: 30; inset: 0; padding: 8px; display: grid; place-items: center; background: rgba(18,31,45,.84); }
.overlay-card { width: min(100%, 680px); max-height: 100%; overflow-y: auto; padding: 12px; border: 4px solid var(--ink); background: #f8eed6; box-shadow: 8px 8px 0 var(--copper-dark); font-size: 15px; line-height: 1.55; }
.overlay-card > button:first-child { min-width: 72px; min-height: 44px; float: right; border: 2px solid var(--ink); background: var(--sun); font-weight: 900; }
.help-card h2 { margin: 4px 0; }.help-card ol { clear: both; padding-left: 1.5em; }.help-card p { padding: 8px; border-left: 5px solid var(--danger); background: #fff8e9; }

.tower.wobble { animation: wobble .48s ease-in-out 2; }.game-field.success { animation: sky-release .8s ease; }.game-field.danger { box-shadow: inset 0 0 0 8px rgba(158,47,47,.65); }
@keyframes wobble { 0%,100%{ transform:translateX(-50%) rotate(0) } 30%{ transform:translateX(-50%) rotate(-3deg) } 70%{ transform:translateX(-50%) rotate(3deg) } }
@keyframes sky-release { 0%{ filter:brightness(1) } 45%{ filter:brightness(1.28) saturate(1.2) } 100%{ filter:brightness(1) } }

@media (max-width: 700px) {
  .app-shell { padding-inline: 0; border: 0; }
  .masthead { min-height: 50px; }
  .title-lockup small { display: none; }
  .polarity-mark { width: 34px; height: 34px; flex-basis: 34px; font-size: 22px; }
  .mast-actions button { min-width: 46px; padding-inline: 4px; }
  .start-screen { grid-template-columns: 1fr; grid-template-rows: 42% minmax(0,1fr); }
  .start-world { border-right: 0; border-bottom: 3px solid var(--ink); }
  .start-copy { padding: 9px 13px; justify-content: space-evenly; }
  .start-copy h2 { font-size: clamp(22px,7vw,29px); margin-bottom: 4px; }
  .start-copy p { font-size: 14px; line-height: 1.35; margin-bottom: 5px; }
  .start-key { margin-bottom: 5px; gap: 3px; }.start-key span { padding: 2px 5px; }
  .primary-button { min-height: 46px; }
  .hud { grid-template-columns: repeat(4,1fr) 48px; }
  .hud > div { padding-inline: 3px; }.hud small { font-size: 14px; }.hud strong { font-size: 14px; }
  .hud button { min-width: 44px; padding: 2px; font-size: 14px; }
  .forecast-board { top: 3px; gap: 5px; padding: 3px 6px; }
  .pressure-track { top: 34px; }
  .storm-front { top: 53px; width: 34%; }
  .beacon-head { top: 20%; width: 50px; height: 50px; }
  .tower { width: 51%; height: 58%; bottom: 3%; }
  .circuit-deck { grid-template-columns: minmax(48px,1fr) 36px minmax(48px,1fr); gap: 3px; padding: 4px; border-width: 3px; border-bottom-width: 6px; }
  .battery-slot { min-height: 64px; }
  .wire-core { height: 54px; }.wire-core i { width: 42px; }.wire-core b { width: 32px; height: 32px; font-size: 19px; }
  .battery-rack { right: 4px; min-width: 67px; width: 21%; min-height: 76px; gap: 2px; padding: 3px; }
  .battery-cell { min-width: 44px; min-height: 64px; width: 44px; padding: 1px; }.battery-cell i { font-size: 18px; }
  .battery-rack .battery-cell { min-width: 44px; width: 44px; }.battery-rack:has(.battery-cell + .battery-cell) { width: 31%; }
  .build-controls { min-height: 80px; grid-template-columns: 1.25fr .75fr .8fr; gap: 3px; padding: 3px; }
  .build-controls button { min-height: 48px; padding: 2px; font-size: 14px; }.send-button b { font-size: 18px; }
  .quiz-screen { padding: 8px; gap: 5px; }.quiz-choices { gap: 5px; }.quiz-choices button { min-height: 48px; padding: 5px; }
  .quiz-feedback { inset: auto 3% 3%; }
  .result-screen { gap: 5px; padding: 8px; }.dawn-seal { width: 56px; height: 56px; }.result-actions button { min-width: 140px; }
}

@media (max-width: 360px) {
  .title-lockup h1 { font-size: 15px; }
  .mast-actions { gap: 2px; }.mast-actions button { min-width: 44px; font-size: 14px; }
  .start-key span:nth-child(3) { display: none; }
  .forecast-board { font-size: 14px; }.forecast-board span:last-child { display: none; }
  .build-controls { grid-template-columns: 1.2fr .7fr .75fr; }
  .result-actions { gap: 5px; }.result-actions button { min-width: 135px; }
}

@media (max-height: 600px) and (max-width: 700px) {
  .masthead { min-height: 46px; padding-block: 2px; }
  .start-screen { grid-template-rows: 39% minmax(0,1fr); }
  .start-copy h2 { font-size: 21px; }.start-copy p { line-height: 1.25; }.start-key { display: none; }
  .game-screen { grid-template-rows: auto minmax(160px,1fr) auto auto; }
  .hud { padding: 2px; }.hud button { min-height: 44px; }
  .build-controls { min-height: 72px; }.build-controls button { min-height: 44px; }
  .forecast-board { top: 2px; }.pressure-track { top: 31px; }
  .tower { height: 61%; }.battery-slot { min-height: 57px; }.battery-cell { min-height: 57px; }
  .quiz-current { display: none; }.quiz-screen { grid-template-rows: auto auto minmax(0,1fr); }
  .dawn-seal { width: 46px; height: 46px; }.result-screen h2 { font-size: 22px; }.final-score strong { font-size: 28px; }
}

@media (max-height: 567px), (max-width: 319px) {
  .app-shell { height: auto; min-height: 100svh; overflow: visible; }
  .screen-stack { min-height: 518px; }
  body { overflow-y: auto; }
}

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