:root {
  color-scheme: dark;
  --bg: #0f1019;
  --panel: #171824;
  --edge: #2b2b40;
  --ink: #f3effc;
  --muted: #aaa9c3;
  --subtle: #81819b;
  --purple: #e0b4ff;
  --mint: #8fdec4;
  --amber: #f2c675;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 300px;
  min-height: 100vh;
  background: radial-gradient(ellipse 920px 480px at 34% 0, #1b162d 0, transparent 74%), var(--bg);
}

button { color: inherit; font: inherit; cursor: pointer; }
button:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }

.topbar {
  border-bottom: 1px solid #29283a;
  background: #11111bcc;
}

.topbar-inner {
  width: min(1140px, calc(100% - 64px));
  height: 76px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand strong { display: block; font-size: 1.02rem; letter-spacing: .1em; }
.brand small { display: block; color: var(--subtle); font: 700 .6875rem var(--mono); letter-spacing: .16em; margin-top: 4px; }
.brand-mark {
  width: 37px;
  height: 37px;
  display: grid;
  grid-template-columns: repeat(2, 6px);
  grid-auto-rows: 6px;
  place-content: center;
  gap: 3px;
  border: 1px solid #593b78;
  border-radius: 10px;
  background: #2b1e43;
  box-shadow: inset 0 1px #ffffff13;
}

.brand-mark i { background: var(--purple); border-radius: 1px; }
.brand-mark i:nth-child(2) { opacity: .55; }
.brand-mark i:nth-child(3) { opacity: .28; }

.levels { display: flex; gap: 6px; align-items: center; }
.level-tab {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
  font-size: .875rem;
}

.level-tab:hover { color: var(--ink); background: #222133; }
.level-tab[aria-current] { color: #f0d8ff; border-color: #554063; background: #2f223f; }
.tab-number {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 23px;
  height: 22px;
  border-radius: 5px;
  background: #28283a;
  color: #a5a4bc;
  font: 700 .75rem var(--mono);
}

.level-tab[aria-current] .tab-number { background: #d4a6f6; color: #2b1940; }
.level-tab.completed .tab-number::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  top: -2px;
  right: -2px;
  border: 1px solid #262537;
  border-radius: 50%;
  background: var(--mint);
}
.rules-button {
  padding: 0 9px;
  min-height: 40px;
  flex: none;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: .875rem;
}

.rules-button:hover { border-color: var(--edge); color: var(--ink); }
.rules-button span {
  display: inline-grid;
  place-items: center;
  margin-right: 3px;
  width: 17px;
  height: 17px;
  border: 1px solid #74728c;
  border-radius: 50%;
  font: 700 .7rem var(--mono);
  vertical-align: 1px;
}

.game-shell { width: min(1140px, calc(100% - 64px)); margin: 0 auto; padding: 36px 0 48px; }
.level-intro { margin-bottom: 23px; }
.level-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #bc98d9;
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .075em;
}

.level-kicker i { width: 14px; height: 2px; border-radius: 2px; background: #aa77dd; }
.level-intro h1 {
  margin: 8px 0 6px;
  font-size: clamp(2.25rem, 4.7vw, 3.125rem);
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: .045em;
}

.level-intro p { margin: 0; color: var(--muted); line-height: 1.65; }
.play-layout { display: grid; grid-template-columns: minmax(0, 2.12fr) minmax(300px, 1fr); gap: 18px; }
.stage-card, .timeline-card { border: 1px solid var(--edge); border-radius: 16px; background: var(--panel); }
.stage-card { overflow: hidden; box-shadow: 0 18px 50px #07071148; }

.stage {
  position: relative;
  padding: 15px 18px 13px;
  background:
    radial-gradient(ellipse at 51% 49%, #24213f 0, #191a2c 52%, #141523 92%);
}

.stage:before {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: 0;
  opacity: .55;
  background-image: radial-gradient(#74709643 1px, transparent 1px);
  background-size: 17px 17px;
  mask-image: radial-gradient(ellipse, black 8%, transparent 85%);
}

.stage-top, .stage-bottom { position: relative; display: flex; align-items: center; }
.stage-top { justify-content: space-between; gap: 12px; }
.stage-bottom { justify-content: center; margin-top: 11px; }
.phase {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  min-height: 29px;
  border-radius: 6px;
  border: 1px solid #6a4777;
  background: #30213a;
  color: #efc4ff;
  font-size: .875rem;
  font-weight: 600;
  white-space: nowrap;
}

.phase i { width: 7px; height: 7px; border-radius: 50%; background: #e2a3fb; box-shadow: 0 0 9px #db98fa88; }
.stage[data-phase="replaying"] .phase, .stage[data-phase="won"] .phase { color: #bdf9de; border-color: #32685c; background: #1b3635; }
.stage[data-phase="replaying"] .phase i, .stage[data-phase="won"] .phase i { background: #86e2bc; box-shadow: 0 0 9px #82e6baa0; }
.stage-count { color: var(--muted); font: 600 .875rem var(--mono); white-space: nowrap; }

.board-area { position: relative; display: grid; place-items: center; margin: 0 auto; max-width: 568px; padding: 11px 26px; }
.coordinate {
  position: absolute;
  color: #686383;
  font: 400 .875rem var(--mono);
}
.coordinate-top { top: 9px; left: 3px; }
.coordinate-bottom { bottom: 9px; right: 3px; }
.board {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template: repeat(5, 1fr) / repeat(7, 1fr);
  width: min(100%, 476px);
  aspect-ratio: 7 / 5;
  border-radius: 6px;
  box-shadow: 0 0 0 1px #47415f, 0 12px 33px #090913a0, 0 0 36px #6652a222;
  background: #10111c;
}

.tile {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  border: 1px solid #1a1928;
  border-radius: 4px;
  background: linear-gradient(160deg, #3a3756, #302e48);
  box-shadow: inset 0 1px #78709279, inset 0 -3px #211f37;
}

.tile.wall {
  border-color: #1e2030;
  border-radius: 2px;
  background: linear-gradient(152deg, #242537, #1d2030 78%);
  box-shadow: inset 0 1px #37384b, inset -1px -3px #151725;
}

.tile.wall::after {
  content: "";
  position: absolute;
  inset: 11%;
  border: 1px solid #55547022;
  background: linear-gradient(135deg, #72728e07, transparent 70%);
  border-radius: 2px;
}

.tile.on-trace::before {
  content: "";
  position: absolute;
  right: 9%;
  bottom: 13%;
  width: 7%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #88dac281;
  box-shadow: 0 0 7px #7de1c464;
}

.tile.start { background: linear-gradient(160deg, #494066, #393250); }
.start .mark { width: 58%; aspect-ratio: 1; border: 1px dashed #a98ad37d; border-radius: 5px; }
.tile.plate, .tile.pad { background: linear-gradient(160deg, #57503f, #3e3840); }
.plate .mark, .pad .mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 58%;
  aspect-ratio: 1;
  border: 1px solid #9d8051;
  border-radius: 6px;
  background: #76603d;
  box-shadow: inset 0 1px #edd0968c, inset 0 -3px #563f35, 0 3px 4px #16141e72;
}
.plate .mark::after, .pad .mark::after {
  content: "";
  width: 49%;
  aspect-ratio: 1;
  border: 1px solid #c6a6689c;
  border-radius: 2px;
  background: #987746;
}
.plate.pressed .mark, .pad.pressed .mark { border-color: #f6ce80; background: #a18049; box-shadow: inset 0 2px #563f35, 0 0 14px #f6c95a54; }
.plate.pressed .mark::after, .pad.pressed .mark::after { background: #d1a860; }
.tile.pad { background: linear-gradient(160deg, #3a5050, #304244); }
.pad .mark { background: #3d6864; border-color: #66978d; box-shadow: inset 0 1px #c7f8e28c, inset 0 -3px #2c4d4e; }
.pad .mark::after { background: #52807a; border-color: #94c5b7ad; }
.pad.pressed .mark { background: #548e80; border-color: #a9e5cf; box-shadow: inset 0 2px #2c4d4e, 0 0 14px #8edcc054; }
.pad.pressed .mark::after { background: #7fbaa9; }

.tile.gate { background: linear-gradient(140deg, #452e4c, #39283f); }
.gate .mark {
  width: 62%;
  height: 72%;
  border: 1px solid #ad718b;
  border-radius: 3px;
  background: repeating-linear-gradient(90deg, #95627a 0 10%, #52374d 10% 24%);
  box-shadow: inset 0 2px #e3a9c082, inset 0 -3px #211a2b, 0 3px 5px #15131f66;
  transition: height 170ms, opacity 170ms;
}
.gate.unlocked { background: linear-gradient(145deg, #334b49, #2a3a3d); }
.gate.unlocked .mark { height: 12%; align-self: start; margin-top: 10%; opacity: .46; border-color: #8cceba; background: #74a89d; }
.tile.grate { background: linear-gradient(145deg, #273537, #222b33); }
.grate .mark {
  width: 51%;
  height: 78%;
  border: 1px solid #688986;
  background: repeating-linear-gradient(0deg, #54716e 0 12%, #273a3c 12% 27%);
  border-radius: 3px;
}

.tile.exit { color: #abedcd; background: linear-gradient(145deg, #344e4b, #2a3d3e); }
.exit .mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 59%;
  height: 68%;
  border: 2px solid #9bdebf;
  border-bottom-width: 5px;
  border-radius: 18% 18% 3px 3px;
  background: linear-gradient(160deg, #477d6d, #2b4947);
  box-shadow: inset 0 0 12px #92ebc536, 0 0 13px #8fd5b94f;
}
.exit .mark::after {
  content: "";
  width: 23%;
  aspect-ratio: 1;
  border: 1px solid #c4f8dd;
  rotate: 45deg;
}
.exit.locked .mark { border-color: #88a49c; opacity: .68; box-shadow: none; }
.exit.reached .mark { box-shadow: 0 0 26px #a4f9cf, inset 0 0 20px #92ebc5a9; }

.key .mark, .carried-key { position: relative; width: 42%; aspect-ratio: 1; color: var(--amber); transform: rotate(-32deg); filter: drop-shadow(0 0 4px #e8ad4773); }
.key .mark::before, .carried-key::before {
  content: "";
  position: absolute;
  left: 0;
  top: 21%;
  width: 38%;
  height: 42%;
  border: 2px solid currentColor;
  border-radius: 40%;
  box-sizing: border-box;
}
.key .mark::after, .carried-key::after {
  content: "";
  position: absolute;
  left: 36%;
  top: 35%;
  width: 62%;
  height: 33%;
  background: currentColor;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 75% 100%, 75% 53%, 56% 53%, 56% 100%, 34% 100%, 34% 53%, 0 53%);
}
.key.picked-up .mark { opacity: 0; }

.token {
  position: absolute;
  top: calc(var(--y) * 20%);
  left: calc(var(--x) * 100% / 7);
  width: calc(100% / 7);
  height: 20%;
  display: grid;
  place-items: center;
  z-index: 2;
  pointer-events: none;
  transition: top 145ms ease-out, left 145ms ease-out;
}
.token.echo { z-index: 1; }
.sprite {
  position: absolute;
  width: 94%;
  bottom: 9%;
  display: block;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 1px #0e0815bb) drop-shadow(0 0 6px #e0aaff50);
  transition: translate 145ms ease-out;
}
.echo .sprite { opacity: .89; filter: drop-shadow(0 2px 1px #061713bb) drop-shadow(0 0 7px #8ef4d477); }
.player.together .sprite { translate: 15% 2%; }
.echo.together .sprite { translate: -19% -6%; }
.carried-key {
  display: none;
  position: absolute;
  right: 4%;
  top: -5%;
  width: 39%;
}
.has-key .carried-key { display: block; }

.legend { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 15px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; color: #bcbacf; white-space: nowrap; font-size: .8125rem; }
.legend-mark { display: block; width: 8px; height: 8px; border-radius: 2px; background: var(--mint); }
.legend-player { background: var(--purple); }
.legend-echo { background: var(--mint); }
.legend-P, .legend-K { background: var(--amber); }
.legend-D { background: #d695ac; }
.legend-X { border: 1px solid #a9ebcc; background: transparent; }

.control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 17px;
  min-height: 72px;
  border-top: 1px solid var(--edge);
  background: #1a1b29;
}
.control-heading { display: flex; flex-direction: column; gap: 3px; flex: none; }
.control-heading strong { font-size: .875rem; }
.keyboard-hint { color: var(--muted); font-size: .8125rem; white-space: nowrap; }
.keyboard-hint b { color: #8671a0; padding: 0 2px; }
.move-controls { display: flex; gap: 6px; align-items: center; }
.move-controls button, .timeline-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 9px;
  height: 43px;
  min-width: 43px;
  border: 1px solid #423c56;
  border-radius: 8px;
  background: #2a273a;
  box-shadow: inset 0 1px #ffffff0e, inset 0 -2px #161424a0;
  color: #ede2fa;
  font-size: .875rem;
  white-space: nowrap;
  touch-action: manipulation;
}

.move-controls button:hover:not(:disabled), .timeline-actions button:hover:not(:disabled) { background: #39304d; border-color: #6a5481; }
.move-controls button:active:not(:disabled), .timeline-actions button:active:not(:disabled) { translate: 0 1px; }
.move-controls .wait-button { padding-inline: 11px; margin-left: 2px; }
.direction {
  display: inline-block;
  width: 0;
  height: 0;
  border: 6px solid transparent;
  border-bottom: 8px solid #dfcaf3;
  border-top: 0;
}
.direction.left { rotate: -90deg; }
.direction.down { rotate: 180deg; }
.direction.right { rotate: 90deg; }
.pause-icon { width: 8px; height: 11px; border-inline: 2px solid #dfcaf3; }
.control-bar:has(.advance:not([hidden])) .move-controls { display: none; }

.primary-button {
  border: 1px solid #edccff;
  border-radius: 8px;
  padding: 10px 16px;
  min-height: 43px;
  color: #24162f;
  background: #d9aaf8;
  font-size: .9375rem;
  font-weight: 800;
  box-shadow: inset 0 1px #ffffff4d, 0 4px 14px #ca8bff30;
  white-space: nowrap;
}
.primary-button:hover { background: #eccfff; }
.primary-button:active { translate: 0 1px; }

.side-panel { min-width: 0; }
.timeline-card { padding: 18px; }
.timeline-heading { display: flex; align-items: center; gap: 11px; }
.timeline-heading h2 { margin: 0; font-size: 1.06rem; letter-spacing: .04em; }
.timeline-icon {
  width: 39px;
  height: 39px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 8px 10px;
  gap: 3px;
  border: 1px solid #48365c;
  border-radius: 9px;
  background: #2b203e;
}
.timeline-icon i { width: 3px; height: 8px; background: #c197e1; border-radius: 1px; }
.timeline-icon i:nth-child(2) { height: 13px; }
.timeline-icon i:nth-child(3) { height: 10px; }
.timeline-icon i:nth-child(4) { height: 17px; background: #edcaff; }
.tracks { display: grid; gap: 8px; margin: 21px 0 16px; }
.track { display: grid; grid-template-columns: 36px repeat(4, minmax(0, 1fr)); gap: 6px; align-items: center; }
.track-label { color: var(--muted); font-size: .8125rem; white-space: nowrap; }
.beat {
  display: grid;
  place-items: center;
  min-width: 0;
  height: 44px;
  border: 1px solid #2b2b3f;
  border-radius: 7px;
  background: #191a28;
  color: #81819a;
  font: 600 .875rem var(--mono);
}
.track-player .beat.filled { border-color: #654979; background: #39274b; color: #ecc8ff; font-size: 1.15rem; }
.track-echo .beat.filled { background: #213035; border-color: #345653; color: #9bdcc8; font-size: 1.15rem; }
.track-player .beat.next { border-color: #9b6ab4; color: #f2caff; box-shadow: inset 0 0 13px #b583e419; }
.track-echo .beat.played, .track-echo .beat.next { background: #26433e; border-color: #568876; }
.track-echo .beat.next { border-color: #9adcbe; }
.status {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 104px;
  padding: 12px;
  border: 1px solid #443550;
  border-radius: 9px;
  background: linear-gradient(130deg, #2b213a, #211c30);
}
.status strong { color: #eed0ff; font-size: .9375rem; line-height: 1.35; }
.status > span { color: #c5b8d2; font-size: .875rem; line-height: 1.5; }
.status[data-phase="replaying"], .status[data-phase="won"] { border-color: #335149; background: linear-gradient(130deg, #233630, #1a2b2a); }
.status[data-phase="replaying"] strong, .status[data-phase="won"] strong { color: #bdf0d9; }
.status[data-phase="replaying"] > span, .status[data-phase="won"] > span { color: #b4cbc5; }
.timeline-actions { display: flex; gap: 8px; margin-top: 12px; }
.timeline-actions button { flex: 1; height: 39px; background: #202131; border-color: #35364a; color: #d9d5e8; }
.timeline-actions button span { color: #b298c7; font-size: 1rem; }
.timeline-actions button:disabled { opacity: .53; }

.timeline-actions #hint span { color: var(--amber); }

dialog {
  width: min(460px, calc(100% - 32px));
  max-height: calc(100% - 28px);
  padding: 0;
  border: 1px solid #544668;
  border-radius: 17px;
  background: #1d1a2c;
  color: var(--ink);
  box-shadow: 0 22px 80px #06050cc4;
}
dialog::backdrop { background: #090910c2; backdrop-filter: blur(4px); }
.rules-inner { position: relative; padding: 24px; }
.rules-inner h2 { margin: 8px 35px 14px 0; font-size: 1.45rem; }
.rules-inner ol { margin: 0 0 12px; padding-left: 24px; color: #dbd3e7; line-height: 1.65; }
.rules-inner li + li { margin-top: 8px; }
.shortcuts { margin: 13px 0 20px; color: var(--muted); font-size: .875rem; line-height: 1.65; }
.hint-text { margin: 0 0 20px; color: #dbd3e7; line-height: 1.65; }
.dialog-close { position: absolute; right: 15px; top: 15px; width: 36px; height: 36px; padding: 0; border: 1px solid #50465e; border-radius: 7px; background: #2b243a; color: #d9cbe3; font-size: 1.3rem; }
.dialog-close:hover { background: #3d3050; }

@media (max-width: 960px) {
  .topbar-inner, .game-shell { width: calc(100% - 40px); }
  .play-layout { grid-template-columns: minmax(0, 1.6fr) minmax(270px, 1fr); gap: 14px; }
  .board-area { padding-inline: 17px; }
  .timeline-card { padding: 14px; }
  .control-bar { padding-inline: 12px; }
  .control-heading .keyboard-hint { display: none; }
}

@media (min-width: 721px) and (max-height: 800px) {
  .topbar-inner { height: 64px; }
  .game-shell { padding-block: 25px 16px; }
  .level-intro { margin-bottom: 16px; }
  .level-intro h1 { font-size: 2.625rem; }
  .stage { padding-block: 12px 10px; }
  .board-area { padding-block: 8px; }
  .board { width: min(100%, 420px, max(210px, calc((100dvh - 420px) * 1.4))); }
}

@media (max-width: 720px), (max-width: 960px) and (max-height: 520px) and (orientation: landscape) {
  body {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100dvh;
    min-height: 480px;
  }
  .topbar { padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); }
  .topbar-inner { width: calc(100% - 24px); height: 48px; gap: 4px; }
  .brand { gap: 6px; }
  .brand strong { font-size: .875rem; letter-spacing: .03em; }
  .brand-mark { width: 29px; height: 29px; border-radius: 7px; }
  .brand small, .tab-title, .level-intro .level-kicker, .control-heading,
  .stage-bottom, .coordinate, .timeline-heading { display: none; }
  .levels { gap: 1px; }
  .level-tab { justify-content: center; width: 44px; min-height: 44px; padding: 0; }
  .tab-number { width: 25px; height: 24px; }
  .rules-button { min-height: 44px; padding-inline: 4px; }
  .game-shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: 100%;
    padding: 9px max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }
  .level-intro { margin-bottom: 7px; }
  .level-intro h1 { font-size: 1.47rem; margin: 0 0 3px; }
  .level-intro p { font-size: .875rem; line-height: 1.4; }
  .play-layout { grid-template: minmax(0, 1fr) auto / minmax(0, 1fr); gap: 7px; min-height: 0; }
  .stage-card { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 0; }
  .stage { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; padding: 7px 8px 0; }
  .phase { min-height: 23px; padding: 2px 6px; font-size: .8125rem; }
  .phase i { width: 6px; height: 6px; }
  .board-area { width: 100%; min-height: 0; container-type: size; padding: 5px 3px 7px; }
  .board { width: min(100%, 476px, 140cqh); }
  .control-bar { padding: 5px 7px; min-height: 55px; }
  .move-controls { display: grid; width: 100%; grid-template-columns: repeat(4, minmax(42px, 1fr)) minmax(72px, 1.45fr); gap: 5px; }
  .move-controls button { height: 44px; min-width: 0; }
  .move-controls .wait-button { margin-left: 0; padding-inline: 5px; }
  .advance { width: 100%; min-height: 44px; }
  .timeline-card { padding: 8px; }
  .tracks { margin: 0 0 6px; gap: 4px; }
  .track { grid-template-columns: 34px repeat(4, minmax(0, 1fr)); gap: 4px; }
  .track-player .track-label { color: var(--purple); }
  .track-echo .track-label { color: var(--mint); }
  .beat { height: 24px; border-radius: 5px; }
  .status { min-height: 53px; gap: 1px; padding: 6px 8px; }
  .status strong { font-size: .875rem; }
  .status > span { font-size: .875rem; line-height: 1.35; }
  .timeline-actions { gap: 5px; margin-top: 5px; }
  .timeline-actions button { height: 44px; }
}

@media (max-width: 960px) and (max-height: 520px) and (orientation: landscape) {
  body { min-height: 340px; }
  .topbar-inner { height: 43px; }
  .game-shell { padding-top: 6px; }
  .level-intro { display: flex; align-items: baseline; gap: 10px; }
  .level-intro h1 { font-size: 1.22rem; margin: 0; }
  .play-layout { grid-template: minmax(0, 1fr) / minmax(0, 1.55fr) minmax(238px, 1fr); }
  .stage { padding-top: 5px; }
  .board-area { padding-block: 3px; }
}

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