@charset "UTF-8";

:root {
  color-scheme: dark;
  --ink: #0c2024;
  --surface: #10282b;
  --surface-light: #183337;
  --line: #2b4445;
  --text: #f2ebd9;
  --muted: #9bb1ac;
  --faint: #708d88;
  --gold: #f1c77e;
  --gold-light: #ffe4ac;
  --stone: #bfd0bb;
  --teal: #72bab0;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Avenir Next', Avenir, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--ink); }
body { margin: 0; font-family: var(--sans); color: var(--text); font-size: 15px; -webkit-font-smoothing: antialiased; background: radial-gradient(ellipse at 66% 32%, #19383955, transparent 56%); }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
button:disabled { cursor: default; opacity: .3; }
button, a, svg[tabindex] { touch-action: manipulation; }
button:focus-visible, a:focus-visible, svg[tabindex]:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }
button { transition: color .18s, background-color .18s, border-color .18s, opacity .18s; }
button:not(:disabled):active { transform: translateY(1px); }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
button svg { width: 19px; height: 19px; display: block; }
[hidden] { display: none !important; }
kbd, .key { font-family: inherit; font-weight: 400; }
kbd { font-size: 10px; border: 1px solid #47615b66; border-radius: 4px; padding: 2px 5px; color: var(--muted); line-height: 1.25; }
::selection { background: #adccad33; color: var(--gold-light); }

.ambient { pointer-events: none; position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.ambient div { width: 86vw; height: 86vw; max-width: 1300px; max-height: 1300px; border: 1px solid #759a8b08; border-radius: 47%; position: absolute; left: 21%; top: -58%; transform: rotate(-24deg); }
.ambient div:nth-child(2) { margin: 50px; border-radius: 49%; }
.ambient div:nth-child(3) { margin: 110px; }
.shell { max-width: 1248px; padding: 0 56px; margin: auto; }
.site-header { display: flex; align-items: center; justify-content: space-between; padding: 28px 0 23px; border-bottom: 1px solid #45615a40; gap: 20px; }
.brand { display: inline-flex; gap: 12px; align-items: center; font-family: var(--serif); font-size: 27px; letter-spacing: -.6px; }
.brand-mark { width: 41px; height: 41px; stroke: var(--gold); stroke-width: 1.2; fill: none; }
.brand-subtitle { display: block; color: var(--muted); font-family: var(--sans); font-size: 10px; letter-spacing: 1.65px; padding-top: 4px; }
.header-actions { display: flex; align-items: center; gap: 16px; }
.icon-button { min-width: 38px; min-height: 40px; display: inline-flex; justify-content: center; align-items: center; border-radius: 8px; color: var(--muted); }
.icon-button:hover:not(:disabled) { background: #b9cbb011; color: var(--text); }
.help-button { min-width: 29px; min-height: 29px; border: 1px solid #89a29555; border-radius: 50%; font-family: var(--serif); font-size: 17px; }
.journey-button { display: flex; align-items: center; gap: 10px; font-size: 12px; min-height: 44px; padding: 0 12px; border: 1px solid #69867545; border-radius: 7px; }
.journey-button:hover { border-color: #a8b893; background: #adc4a809; }
.journey-icon { font-size: 20px; color: var(--gold); }
.journey-count { padding-left: 9px; color: var(--muted); font-size: 11px; border-left: 1px solid var(--line); font-variant-numeric: tabular-nums; }

.game-layout { display: grid; grid-template-columns: minmax(215px, 280px) minmax(0, 650px); justify-content: space-between; gap: 56px; padding-top: 38px; align-items: start; }
.level-panel { padding-top: 16px; }
.chapter-label, .little-label { font-size: 10px; letter-spacing: 1.6px; font-weight: 500; line-height: 1.6; }
.chapter-label { display: flex; gap: 10px; align-items: center; color: var(--gold); margin-bottom: 42px; }
.chapter-line { width: 22px; height: 1px; background: var(--gold); opacity: .65; }
.level-number { font-size: 10px; letter-spacing: 2.2px; color: var(--muted); margin-bottom: 13px; }
h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 4.4vw, 59px); line-height: 1.07; letter-spacing: -2.3px; margin: 0 0 20px -2px; text-wrap: balance; }
.level-note { font-family: var(--serif); font-size: 17px; line-height: 1.65; font-style: italic; color: var(--muted); max-width: 250px; }
.guidance { border-top: 1px solid var(--line); margin-top: 34px; padding-top: 22px; min-height: 169px; }
.little-label { color: var(--gold); }
.tiny-sun { font-size: 18px; display: inline-block; vertical-align: -1px; margin-right: 6px; }
.guidance p { color: #c3cdc0; font-size: 13px; line-height: 1.85; margin-top: 12px; }
.tutorial-action { display: flex; align-items: center; gap: 10px; color: var(--gold-light); font-size: 12px; margin-top: 19px; }
.key { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; min-height: 28px; font-size: 16px; border: 1px solid #d6b47355; background: #ebbd7710; border-radius: 5px; padding: 2px 7px; }
.field-notes { display: grid; gap: 16px; padding-top: 26px; margin-top: 13px; color: var(--faint); font-size: 11px; }
.field-notes > div { display: flex; align-items: center; gap: 12px; }
.legend-stone { width: 14px; height: 14px; border-radius: 3px; display: block; background: #b6cbb0; border-bottom: 3px solid #778e78; margin: 0 2px; opacity: .75; }
.legend-bridge { width: 18px; height: 9px; display: block; border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold); position: relative; opacity: .65; }
.legend-bridge:after { content: ''; position: absolute; inset: 3px 0 auto; height: 1px; background: var(--gold); }
.legend-arch { display: block; width: 13px; height: 16px; border: 2px solid var(--teal); border-bottom: 0; border-radius: 9px 9px 0 0; margin: 0 2px; opacity: .8; }

.board-topline { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 4px 12px; min-height: 24px; }
.location-label { display: flex; align-items: center; gap: 8px; font-size: 9px; letter-spacing: 1.8px; color: var(--gold); }
.live-dot { width: 4px; height: 4px; display: block; border-radius: 50%; background: currentColor; box-shadow: 0 0 7px currentColor; }
.board-stats { display: flex; align-items: center; gap: 22px; font-variant-numeric: tabular-nums; }
.moves { color: var(--faint); font-size: 11px; }
.moves strong { color: var(--text); font-weight: 400; font-size: 13px; margin-right: 3px; }
#spark-counter { display: flex; gap: 7px; }
.counter-spark { color: #667c68; font-size: 17px; line-height: 1; transition: color .25s, text-shadow .25s; }
.counter-spark.found { color: var(--gold-light); text-shadow: 0 0 12px #f1c77e55; }
.board-wrap { position: relative; isolation: isolate; width: 100%; height: clamp(340px, 52svh, 525px); border-radius: 18px; border: 1px solid #50786b35; background: radial-gradient(ellipse at 42% 27%, #24464975, transparent 72%), #112c30; box-shadow: 0 24px 70px #020e172d, inset 0 0 70px #071b2444; }
.board-wrap::before { content: ''; position: absolute; pointer-events: none; inset: 0; z-index: -1; opacity: .15; border-radius: inherit; 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='.87' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23d2e3d0' filter='url(%23n)' opacity='.35' d='M0 0h180v180H0z'/%3E%3C/svg%3E"); }
#board { display: block; width: 100%; height: 100%; overflow: visible; border-radius: inherit; user-select: none; -webkit-user-select: none; }
#board:focus { outline: none; }
#board:focus-visible { outline: 1px solid #f3cc7f80; outline-offset: 5px; }
.board-decoration { position: absolute; width: 15px; height: 15px; border-color: #a8ba9759; border-style: solid; pointer-events: none; }
.board-decoration.top-left { top: 11px; left: 11px; border-width: 1px 0 0 1px; border-radius: 4px 0 0; }
.board-decoration.bottom-right { bottom: 11px; right: 11px; border-width: 0 1px 1px 0; border-radius: 0 0 4px; }
.status-line { min-height: 36px; font-size: 11px; line-height: 1.5; text-align: center; color: var(--muted); padding: 11px 8px 6px; transition: color .15s; }
.status-line.warning { color: #f0ba8d; }
.status-line.success { color: var(--gold-light); }

.play-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 8px 0 10px; }
.piece-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; flex: 1; }
.piece-button { display: flex; align-items: center; text-align: left; gap: 11px; border: 1px solid #62877c44; border-radius: 9px; padding: 12px 13px; min-height: 62px; font-size: 13px; color: var(--muted); position: relative; }
.piece-button:hover { background: #8aab9d08; border-color: #93ac8880; }
.piece-button.selected { background: #f1c77e0c; border-color: #e8c4879a; color: var(--gold-light); }
.piece-button[data-piece='keeper'].selected { background: #d6e4d80b; border-color: #c8d7c798; color: var(--text); }
.piece-button small { display: block; font-size: 9px; font-weight: 400; color: var(--faint); letter-spacing: .2px; padding-top: 5px; white-space: nowrap; }
.piece-button.selected small { color: var(--muted); }
.piece-button kbd { margin-left: auto; align-self: flex-start; opacity: .65; }
.piece-symbol { flex: 0 0 auto; width: 21px; }
.light-symbol { color: var(--gold); font-size: 31px; font-weight: 300; line-height: 1; text-align: center; }
.keeper-symbol { width: 16px; height: 20px; border-radius: 10px 10px 7px 7px; border: 1px solid #eef0db; background: #e8ebd3; box-shadow: 0 3px 0 #798e7e; margin-left: 2px; margin-right: 3px; position: relative; }
.keeper-symbol:after { content: ''; width: 2px; height: 2px; background: #38565a; border-radius: 1px; position: absolute; top: 6px; left: 4px; box-shadow: 5px 0 0 #38565a; }
.dpad { width: 106px; display: grid; grid-template-columns: repeat(3, 34px); grid-template-rows: repeat(2, 32px); gap: 2px; }
.dpad button { font-size: 19px; color: var(--muted); border: 1px solid #5678694d; border-radius: 6px; background: #82998505; padding: 0; }
.dpad button:hover, .dpad button.pressed { color: var(--gold); border-color: #f1c77e66; background: #f1c77e0b; }
.dpad-up { grid-column: 2; grid-row: 1; }
.dpad-left { grid-column: 1; grid-row: 2; }
.dpad-down { grid-column: 2; grid-row: 2; }
.dpad-right { grid-column: 3; grid-row: 2; }

.utility-controls { border-top: 1px solid #405f5344; border-bottom: 1px solid #405f5344; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 51px; }
.utility-button { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); padding: 8px 2px; min-height: 44px; font-size: 11px; }
.utility-button:hover:not(:disabled) { color: var(--text); }
.utility-button kbd { font-size: 9px; opacity: .6; margin-left: 2px; }
.control-icon { font-family: var(--serif); font-size: 21px; font-weight: 400; line-height: 1; }
.history-controls { display: flex; align-items: center; gap: 9px; }
.redo-button { font-family: var(--serif); font-size: 22px; min-width: 29px; }
.hint-button { color: #c7c4a4; }
.hint-button .control-icon { font-size: 23px; color: var(--gold); }
.keyboard-note { display: flex; justify-content: center; flex-wrap: wrap; gap: 17px; font-size: 9px; color: var(--faint); margin-top: 16px; line-height: 1.5; }
.keyboard-note span { white-space: nowrap; }
.keyboard-note kbd { border: 0; font-size: 9px; padding: 0 3px 0 0; color: #a1b5a6; }
.hint-panel { display: flex; align-items: start; flex-wrap: wrap; position: relative; gap: 10px; padding: 14px 36px 14px 15px; background: #e4c57f0a; border: 1px solid #e4c57f33; border-radius: 7px; margin-top: 12px; font-size: 12px; line-height: 1.65; color: #dad5b9; }
.hint-panel p { flex: 1; }
.hint-panel .text-button { margin-left: 25px; padding: 0; font-size: 11px; flex-basis: 100%; text-align: left; }
.hint-symbol { color: var(--gold); font-size: 21px; line-height: 1; }
.dismiss-button { position: absolute; top: 4px; right: 5px; font-size: 21px; color: var(--muted); width: 31px; height: 32px; }
.hint-panel .key { min-height: 21px; min-width: 24px; font-size: 12px; }

.site-footer { margin-top: 33px; padding: 19px 0 25px; border-top: 1px solid #37594b40; display: flex; justify-content: space-between; color: var(--faint); font-size: 10px; letter-spacing: .15px; gap: 16px; }
.site-footer > :first-child { font-family: var(--serif); font-size: 13px; font-style: italic; color: #9ab1a099; }
#save-status { display: flex; align-items: center; gap: 7px; }
.saved-dot { width: 3px; height: 3px; background: #88a88b; border-radius: 50%; }

.completion { margin-top: 31px; padding: 22px 0 0; border-top: 1px solid #eac47b59; animation: arrive .55s ease both; }
.completion h2 { font-family: var(--serif); font-size: 29px; font-weight: 400; margin: 15px 0 9px; letter-spacing: -.6px; }
.completion > p { font-size: 12px; line-height: 1.8; color: var(--muted); }
.route-stats { font-size: 11px; color: var(--muted); line-height: 1.8; margin: 15px 0 19px; }
.route-stats .perfect { color: var(--gold); display: block; }
.primary-button { display: flex; align-items: center; justify-content: space-between; gap: 30px; width: 100%; color: #19312f; background: var(--gold); border: 1px solid var(--gold); border-radius: 6px; padding: 14px 17px; font-size: 13px; min-height: 46px; font-weight: 500; }
.primary-button:hover { background: var(--gold-light); border-color: var(--gold-light); }
.primary-button span { font-size: 19px; }
.text-button { padding: 12px 0; font-size: 11px; color: var(--gold); text-underline-offset: 4px; }
.text-button:hover { text-decoration: underline; }
.completion .text-button { margin-top: 3px; }
.board-wrap.is-won { border-color: #d2b87c70; box-shadow: 0 24px 70px #020e172d, inset 0 0 70px #071b2444, 0 0 50px #f1c77e08; }

dialog { background: #142d30; border: 1px solid #73948055; border-radius: 16px; color: var(--text); padding: 34px; width: min(700px, calc(100vw - 36px)); max-height: calc(100svh - 48px); box-shadow: 0 30px 120px #0008; overscroll-behavior: contain; scrollbar-color: #4e6f60 #142d30; }
dialog::backdrop { background: #041619b8; backdrop-filter: blur(8px); }
dialog[open] { animation: arrive .22s ease; }
.dialog-heading { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.dialog-heading h2 { font-family: var(--serif); font-size: 36px; font-weight: 400; letter-spacing: -1.1px; margin: 10px 0 12px; }
.dialog-heading p, .help-intro { color: var(--muted); font-size: 12px; line-height: 1.7; }
.dialog-heading .close-dialog { font-size: 27px; margin: -8px -10px 0 0; }
.journey-chapters { display: grid; gap: 27px; margin-top: 30px; }
.journey-chapter h3 { display: flex; gap: 8px; align-items: baseline; margin: 0 0 13px; font-size: 11px; letter-spacing: 1px; font-weight: 400; }
.journey-chapter h3 > span { font-family: var(--serif); font-size: 15px; color: var(--gold); margin-right: 3px; }
.chapter-completed { margin-left: auto; font-size: 10px; color: var(--muted); letter-spacing: 0; }
.level-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.level-card { min-height: 78px; border: 1px solid #5277664d; border-radius: 7px; padding: 13px 12px; text-align: left; background: #09252655; }
.level-card:hover { border-color: #eac5808c; background: #eac58009; }
.level-card.current { border-color: #efc88099; background: #efc8800a; }
.level-card.visited { border-color: #aac69e60; }
.level-card .card-top { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; margin-bottom: 9px; }
.level-card .card-completed { color: var(--gold); }
.level-card .card-title { font-family: var(--serif); font-size: 15px; letter-spacing: -.15px; display: block; }
.dialog-footnote { color: var(--muted); font-size: 11px; line-height: 1.8; margin-top: 26px; }
.help-dialog { max-width: 580px; }
.help-rules { display: grid; gap: 23px; margin-top: 27px; }
.help-rules > div { display: flex; gap: 17px; }
.rule-number { color: var(--gold); font-size: 10px; letter-spacing: 1px; padding-top: 4px; }
.help-rules h3 { font-size: 14px; font-weight: 500; margin: 0 0 7px; }
.help-rules p { font-size: 12px; color: var(--muted); line-height: 1.8; }
.help-keyboard { border-top: 1px solid var(--line); margin-top: 29px; padding-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px; font-size: 10px; color: var(--muted); line-height: 1.8; }
.help-dialog .primary-button { margin-top: 21px; }

.actor { will-change: transform; transition: transform 180ms cubic-bezier(.22,.7,.3,1); cursor: pointer; }
.actor-light { transition-duration: 300ms; }
.actor-selection { fill: none; stroke-width: 1; opacity: 0; transition: opacity .2s; }
.actor.selected .actor-selection { opacity: .9; }
.keeper-bob { animation: keeper-breathe 4s ease-in-out infinite; }
.light-aura { animation: light-breathe 3.5s ease-in-out infinite; transform-origin: 0 0; }
.light-rays { animation: slow-turn 100s linear infinite; transform-origin: 0 0; }
.water-mark { opacity: .23; }
.spark-token { transition: opacity .35s; }
.spark-token.taken { opacity: 0; pointer-events: none; }
.spark-glow { animation: light-breathe 4s ease-in-out infinite; }
.arch-glow { opacity: .1; transition: opacity .5s; }
.arch.ready .arch-glow { opacity: .65; }
.arch.ready .arch-outline { stroke: #e6d49b; }
.arch.won .arch-glow { opacity: .85; }
.arch.won .arch-outline { stroke: #ffe5aa; }
.gate-slats { transition: opacity .15s; }
.gate .gate-slats { opacity: .15; }
.gate.raised .gate-slats { opacity: 1; }
.pad-surface { transition: fill .15s, opacity .15s; }
.pad.active .pad-surface { fill: #e7c275; }
.trail-line { stroke: #e6c686; stroke-linecap: square; opacity: .2; }
.trail-edge { stroke: #f0d18a; stroke-width: 1; fill: none; opacity: .38; }
.old-trail { animation: trail-out .4s ease forwards; }
.preview-line { fill: none; stroke-width: 2; stroke-dasharray: 4 7; stroke-linecap: round; opacity: .85; }
.destination-marker { transition: opacity .2s; cursor: pointer; }
.destination-marker:hover { opacity: 1 !important; }
.hint-ring { fill: none; stroke: var(--gold-light); stroke-width: 2; stroke-dasharray: 4 5; animation: light-breathe 1.4s ease-in-out infinite; }
.particle { animation: spark-rise 1.5s ease-out both; }
.board-wrap.nudge { animation: nudge .22s ease; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 12px; transform: translateY(-150%); z-index: 100; padding: 12px 18px; border-radius: 5px; background: var(--gold); color: var(--ink); }
.skip-link:focus { transform: translateY(0); }
.noscript { position: fixed; inset: 40% 15% auto; padding: 35px; background: var(--surface); border: 1px solid var(--gold); z-index: 100; line-height: 1.8; }

@keyframes arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes light-breathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes keeper-breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.5px); } }
@keyframes slow-turn { to { transform: rotate(360deg); } }
@keyframes trail-out { to { opacity: 0; } }
@keyframes spark-rise { from { opacity: 0; transform: translate(0, 0) scale(.5); } 15% { opacity: .9; } to { opacity: 0; transform: translate(var(--drift), -65px) scale(.15); } }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-2px); } 75% { transform: translateX(2px); } }

@media (min-width: 1400px) and (min-height: 900px) { .game-layout { padding-top: 54px; } .site-header { padding-top: 37px; } }
@media (max-width: 1100px) { .shell { padding: 0 34px; } .game-layout { grid-template-columns: 235px minmax(0, 1fr); gap: 37px; } .piece-button { padding: 11px 9px; gap: 9px; } .piece-button kbd { display: none; } .dpad { width: 97px; grid-template-columns: repeat(3, 31px); } .board-stats { gap: 15px; } .keyboard-note { gap: 11px; } }
@media (max-width: 860px) { .shell { padding: 0 25px; } .game-layout { gap: 25px; grid-template-columns: 215px minmax(0, 1fr); } h1 { font-size: 46px; } .piece-button { flex-direction: column; gap: 8px; text-align: center; padding: 9px 7px; } .piece-symbol { display: none; } .piece-button small { padding-top: 5px; } .utility-button kbd { display: none; } .keyboard-note .pointer-note { display: none; } .field-notes { margin-top: 0; } .site-header { padding-top: 23px; } .header-actions { gap: 12px; } }
@media (max-width: 740px) {
  .shell { max-width: 580px; padding: 0 23px; }
  .site-header { padding: 20px 0 18px; }
  .brand { font-size: 24px; gap: 10px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-subtitle { font-size: 8px; letter-spacing: 1.1px; }
  .header-actions { gap: 7px; }
  .journey-button { padding: 0 9px; gap: 7px; min-height: 38px; }
  .journey-label { display: none; }
  .journey-count { padding-left: 7px; font-size: 9px; }
  .icon-button { min-width: 32px; }
  .help-button { min-width: 25px; min-height: 25px; }
  .game-layout { display: block; padding-top: 25px; }
  .level-panel { padding-top: 0; position: relative; margin-bottom: 22px; }
  .chapter-label { font-size: 9px; margin-bottom: 14px; letter-spacing: 1.4px; }
  .chapter-line { width: 16px; }
  .level-number { position: absolute; right: 0; top: 3px; font-size: 8px; letter-spacing: 1.4px; }
  h1 { font-size: 36px; letter-spacing: -1.3px; line-height: 1.12; margin: 0 0 9px; }
  .level-note { font-size: 14px; max-width: none; line-height: 1.5; }
  .guidance { margin-top: 16px; padding-top: 13px; min-height: auto; border-top-color: #4a68584d; }
  .guidance .little-label { display: none; }
  .guidance p { font-size: 12px; margin: 0; line-height: 1.75; }
  .tutorial-action { margin-top: 11px; font-size: 11px; }
  .tutorial-action .key { min-width: 25px; min-height: 24px; font-size: 13px; }
  .field-notes { display: none; }
  .board-topline { margin-bottom: 9px; }
  .board-wrap { height: auto; aspect-ratio: var(--board-ratio, 1.12); max-height: none; border-radius: 14px; }
  .board-decoration { width: 11px; height: 11px; }
  .board-decoration.top-left { top: 8px; left: 8px; }
  .board-decoration.bottom-right { bottom: 8px; right: 8px; }
  .status-line { min-height: 39px; font-size: 10px; padding-top: 9px; line-height: 1.65; }
  .play-controls { gap: 12px; margin-top: 3px; }
  .piece-button { min-height: 77px; font-size: 12px; }
  .piece-symbol { display: block; }
  .piece-button small { font-size: 8px; }
  .keeper-symbol { width: 12px; height: 15px; margin-top: 2px; margin-bottom: 3px; }
  .keeper-symbol:after { top: 5px; left: 3px; width: 1px; height: 2px; box-shadow: 4px 0 0 #38565a; }
  .light-symbol { font-size: 24px; height: 20px; }
  .dpad { width: 136px; grid-template-columns: repeat(3, 44px); grid-template-rows: repeat(2, 39px); }
  .dpad button { min-height: 39px; border-radius: 6px; }
  .keyboard-note { display: none; }
  .utility-controls { gap: 7px; margin-top: 13px; min-height: 52px; }
  .utility-button { font-size: 11px; gap: 7px; }
  .utility-button kbd { display: none; }
  .history-controls { gap: 5px; }
  .redo-button { min-width: 29px; }
  .hint-panel { font-size: 11px; }
  .site-footer { margin-top: 28px; padding: 16px 0 24px; font-size: 8px; gap: 12px; }
  .site-footer > :first-child { font-size: 11px; }
  .completion { margin-top: 17px; padding-top: 16px; display: grid; grid-template-columns: 1fr auto; gap: 7px 15px; }
  .completion .little-label { grid-column: 1 / -1; font-size: 8px; }
  .completion h2 { font-size: 26px; margin: 0; grid-column: 1; }
  .completion > p { font-size: 11px; grid-column: 1; }
  .completion .route-stats { font-size: 10px; margin: 0; grid-column: 1; }
  .completion .primary-button { grid-column: 2; grid-row: 2 / 4; align-self: center; gap: 22px; padding: 12px 15px; }
  .completion .text-button { grid-column: 2; grid-row: 4; padding: 3px; font-size: 9px; }
  dialog { padding: 24px; width: calc(100vw - 28px); max-height: calc(100svh - 32px); }
  .dialog-heading h2 { font-size: 32px; }
  .level-grid { gap: 6px; }
  .level-card { padding: 10px 9px; min-height: 79px; }
  .level-card .card-title { font-size: 13px; }
  .help-keyboard { grid-template-columns: 1fr; gap: 11px; }
  .help-rules { gap: 20px; }
}
@media (max-width: 390px) {
  .shell { padding: 0 16px; }
  .brand { font-size: 21px; gap: 8px; }
  .brand-mark { width: 30px; }
  .brand-subtitle { font-size: 7px; }
  .header-actions { gap: 5px; }
  .journey-count { display: none; }
  .journey-button { min-width: 34px; justify-content: center; }
  .dpad { width: 121px; grid-template-columns: repeat(3, 39px); }
  .play-controls { gap: 9px; }
  .piece-selector { gap: 5px; }
  .piece-button { font-size: 11px; padding: 8px 5px; }
  .piece-button small { font-size: 7px; }
  .utility-button { font-size: 10px; gap: 5px; }
  .site-footer { flex-direction: column; gap: 8px; align-items: center; }
  .level-card .card-title { font-size: 12px; }
  .completion .primary-button { gap: 12px; padding: 11px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
