@font-face {
  font-family: Fraunces; src: url('./fonts/fraunces-title.woff2') format('woff2');
  font-style: normal; font-weight: 650; font-display: swap;
  unicode-range: U+0046-0049,U+004F,U+0053-0054;
}
@font-face {
  font-family: 'Instrument Sans'; src: url('./fonts/instrument-sans.woff2') format('woff2');
  font-style: normal; font-weight: 400 700; font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0b1518;
  --surface: #111f24;
  --paper: #f3ead7;
  --soft: #9caca9;
  --line: #2a3d3f;
  --gold: #f2bf75;
  --lavender: #c1a8f3;
  --serif: Georgia, 'Times New Roman', serif;
  --menu-font: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font: 16px/1.53 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--paper);
  background: var(--bg);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 290px; }
button, input { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; opacity: .44; }
button:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
[hidden] { display: none !important; }
h1,h2,p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#announcement { inset-block-start: 0; }
.eyebrow { color: #b7c5bc; font-size: .75rem; font-weight: 750; letter-spacing: .15em; line-height: 1.4; text-transform: uppercase; }
.button {
  display: inline-flex; gap: .55rem; align-items: center; justify-content: center;
  min-height: 45px; padding: .6rem 1rem; border: 1px solid transparent;
  border-radius: 6px; color: var(--paper); background: transparent; font-weight: 650;
  transition: background .16s ease, translate .16s ease, border-color .16s ease;
}
.button:not(:disabled):active { translate: 0 2px; }
.primary { background: var(--gold); color: #271b11; border-color: #f4c888; }
.primary:hover { background: #ffcf8d; }
.quiet { background: #16252a; border-color: #344749; }
.quiet:not(:disabled):hover { background: #24383c; border-color: #617574; }
.small { font-size: .875rem; padding: .42rem .78rem; min-height: 42px; }
.home {
  --menu-inset: clamp(2.2rem, 8.2vw, 11rem);
  --sign-gold: #ffd196;
  min-height: 100svh; overflow: hidden; display: grid; align-items: center; position: relative;
  isolation: isolate; background: #294045;
}
.home, .play, dialog { font-family: var(--menu-font); }
#title-art, #title-weather {
  display: block; position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center; pointer-events: none;
}
.home-shade {
  position: absolute; z-index: 1; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 63% 45%, transparent 36%, #161a2452 100%);
}
.home-inner {
  position: relative; z-index: 2; width: clamp(22rem, 35vw, 32rem);
  margin: clamp(1.2rem, 4svh, 3.75rem) 0 clamp(1.2rem, 4svh, 3.75rem) var(--menu-inset);
  padding: clamp(1.65rem, 3.5vw, 3.25rem);
}
.home-inner::before {
  content: ''; pointer-events: none; position: absolute; z-index: -1;
  inset: -2.25rem -2.75rem;
  background: radial-gradient(ellipse at center, #101d246f 24%, #101d243f 50%, transparent 76%);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .home-inner::before {
    background: #101d2429;
    -webkit-backdrop-filter: blur(12px) brightness(.77) saturate(.85);
    backdrop-filter: blur(12px) brightness(.77) saturate(.85);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 28%, #000d 48%, transparent 76%);
    mask-image: radial-gradient(ellipse at center, #000 28%, #000d 48%, transparent 76%);
  }
}
.home-title {
  position: relative; width: fit-content; margin: 0 0 0 -.046em;
  font: 650 clamp(3.75rem, 7.25vw, 7rem)/.87 Fraunces, var(--serif);
  letter-spacing: -.083em; color: #fff4d8;
  text-shadow: 0 1px #fff7db, 0 3px #8c644f, 0 5px #69463f, 0 10px 24px #151324c7;
}
.title-line { display: flex; padding-right: .11em; width: max-content; }
.title-line + .title-line {
  color: var(--sign-gold); margin: .065em 0 0 .11em; letter-spacing: -.066em;
  font-size: .93em; transform: skewX(-9deg);
  text-shadow: 0 1px #ffe4ab, 0 3px #9a5c4c, 0 6px #714755, 0 11px 26px #251731d6;
}
.title-letter { display: block; }
.title-ink {
  display: block; pointer-events: none; transform-origin: 50% 85%;
  animation: headline-wave 8.4s calc(var(--step) * 78ms) ease-in-out infinite;
  transition: transform .32s cubic-bezier(.2,.72,.26,1), color .23s ease;
}
.title-line + .title-line .title-ink { animation-delay: calc((9 - var(--step)) * 92ms + .39s); }
.home-premise {
  position: relative; margin-top: 1.28rem; padding-top: .83rem;
  color: #f3e7d2; font-size: clamp(1rem, 1.38vw, 1.18rem); letter-spacing: .01em;
}
.home-premise::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 1px;
  background: linear-gradient(90deg, #f8c785a6, #a397c983 72%, transparent);
}
.home-actions {
  position: relative; display: grid; gap: .72rem; margin-top: 1.35rem;
}
.home-start {
  position: relative; overflow: hidden; min-height: 3.9rem; padding: 0 .72rem 0 1.15rem;
  justify-content: space-between; text-align: left; font-size: 1.1rem; letter-spacing: -.02em;
  color: #2b1d1d; border-radius: 12px; border-color: #ffe4b2;
  background: linear-gradient(115deg,#ffe8ba 0%,#f7cd90 52%,#e8a779 100%);
  box-shadow: inset 0 0 0 3px #ffeac461, inset 0 -3px #8d503f39, 0 9px 22px #15142171;
  transition: translate .22s ease, box-shadow .22s ease, filter .22s ease;
}
.home-start::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 28%, #fff8df75 50%, transparent 72%);
  transform: translateX(-115%); transition: transform .52s ease;
}
.home-start:is(:hover,:focus-visible) {
  background: linear-gradient(115deg,#fff1ce,#ffd49a 56%,#efb286);
  box-shadow: inset 0 0 0 3px #fff4d185, 0 10px 25px #e6a76432;
}
.home-start:is(:hover,:focus-visible)::after { transform: translateX(115%); }
.start-arrow {
  display: grid; place-items: center; width: 2.45rem; height: 2.45rem;
  font-size: 1.34rem; line-height: 1;
  color: #ffe4b3; background: linear-gradient(155deg,#59413b,#342731);
  border: 1px solid #a87b60; border-radius: 7px; box-shadow: inset 0 1px #ffd19635;
  transition: translate .22s ease-out;
}
.home-start:is(:hover,:focus-visible) .start-arrow { translate: 3px 0; }
.home-links { display: grid; grid-template-columns: 1fr 1fr; gap: .56rem; }
.home-tool {
  justify-content: flex-start; min-height: 3.02rem; padding: .5rem .76rem; border-radius: 9px;
  color: #f4e3c9; background: linear-gradient(155deg,#405053a3,#24343bbe);
  border-color: #a590796f; box-shadow: inset 0 1px #e8d8bc27;
  font-size: .87rem; white-space: nowrap;
}
.home-tool:is(:hover,:focus-visible) { background: #405052; border-color: #ebc092; }
.home-tool > :first-child { color: #f6d098; }
.home-extras { display: flex; flex-wrap: wrap; gap: .16rem .6rem; }
.home-music, .home-extra {
  padding: 0 .28rem; min-height: 42px; color: #f2e3cc; font-size: .83rem;
  text-decoration: underline; text-underline-offset: .27em; text-decoration-color: #b6a99385;
}
.home-music:hover, .home-extra:hover { color: var(--sign-gold); text-decoration-color: currentColor; }
.home-music span:first-child { color: var(--sign-gold); font-size: 1.05rem; }
.home-resume { color: #f1dfbf; font-size: .86rem; }
.rooms-icon {
  width: .94rem; height: .94rem; flex: none; border: 1px solid currentColor;
  border-radius: 2px; background: linear-gradient(currentColor,currentColor) center/1px 100% no-repeat,
    linear-gradient(currentColor,currentColor) center/100% 1px no-repeat;
}
.settings-gear {
  width: 1.04rem; height: 1.04rem; flex: none; border-radius: 50%; background: currentColor;
  clip-path: polygon(40% 0,60% 0,64% 16%,73% 20%,87% 12%,100% 25%,92% 38%,96% 46%,100% 50%,100% 60%,85% 65%,81% 75%,88% 87%,75% 100%,62% 92%,54% 96%,50% 100%,40% 100%,35% 85%,25% 81%,12% 88%,0 75%,8% 62%,4% 54%,0 50%,0 40%,15% 35%,19% 25%,12% 12%,25% 0,38% 8%);
  mask: radial-gradient(circle,transparent 0 24%,#000 27%);
  transition: rotate .25s ease;
}
.home-tool:is(:hover,:focus-visible) .settings-gear { rotate: 28deg; }
@keyframes headline-wave {
  0%, 19%, 32%, 100% { translate: 0 0; scale: 1; }
  24% { translate: 0 -.055em; scale: 1.025 1.055; }
  28% { translate: 0 .013em; scale: 1.01 .977; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  body:not(.no-motion) .title-letter:hover .title-ink { transform: translateY(-.1em) rotate(-5deg); color: #fff1bd; }
  body:not(.no-motion) #title-weather {
    transform: translate(var(--rain-x,0), var(--rain-y,0)) scale(1.018);
    transition: transform .32s ease-out;
  }
}

.play { --room-light: #172b2d; min-height: 100svh; position: relative; isolation: isolate; overflow: clip; background: radial-gradient(ellipse at 42% 45%, var(--room-light), var(--bg) 67%); }
.play:has(#board[data-decor="window"]) { --room-light: #24333e; }
.play:has(#board[data-decor="booths"]) { --room-light: #382d2e; }
.play:has(#board[data-decor="kitchen"]) { --room-light: #263838; }
.play:has(#board[data-decor="closing"]) { --room-light: #25283d; }
.play:has(#board[data-decor="store"]) { --room-light: #392f26; }
.play::before { content: ''; position: absolute; z-index: -1; inset: -10%; pointer-events: none; background: radial-gradient(ellipse at 23% 60%,#385b4d38,transparent 58%), radial-gradient(ellipse at 83% 18%,#86644725,transparent 56%); animation: room-light 15s ease-in-out infinite alternate; }
@keyframes room-light { to { translate: 6% 3%; opacity: .65; } }
.topbar { padding: .52rem max(1.1rem, calc((100% - 1160px)/2)); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: .7rem; background: #0b1518d9; }
.wordmark { padding: .15rem 0; min-height: 44px; border: 0; background: none; color: var(--paper); font: 700 clamp(1.4rem, 4vw, 1.8rem)/1 var(--serif); letter-spacing: -.06em; white-space: nowrap; }
.wordmark em { color: var(--gold); font-weight: 400; }
.top-actions { display: flex; gap: .48rem; }
.pause-icon { width: .63rem; height: .7rem; border-inline: 2px solid currentColor; }
.game-shell { --stage-width: min(100%, max(57%, calc((100svh - 15rem) * var(--board-aspect, 1.8)))); width: min(100% - 1.65rem, 1310px); margin-inline: auto; padding: .4rem 0 max(.8rem,env(safe-area-inset-bottom)); }
.game-shell > :not(.input-controls,.sr-only) { width: var(--stage-width); margin-inline: auto; }
.room-number { white-space: nowrap; color: #b6c6bf; font-size: .78rem; font-variant-numeric: tabular-nums; }
.room-hud { display: flex; align-items: center; justify-content: space-between; gap: .35rem .7rem; margin-bottom: .35rem; min-height: 36px; }
.task { display: flex; flex-wrap: wrap; align-items: baseline; gap: .04rem .7rem; }
#task-main { color: #f3e8ce; font-size: .93rem; font-weight: 700; }
.turn-status { color: #b7c8c0; font-size: .75rem; font-variant-numeric: tabular-nums; }
.tickets { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .28rem; }
.ticket { display: grid; place-items: center; width: 30px; height: 28px; color: #b1c6bd; background: #182b2e; border: 1px solid #405155; border-radius: 6px; font-size: .78rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.ticket.active { border-color: var(--gold); background: #392f25; color: #ffe2aa; }
.ticket.served { border-color: #537867; color: #a8d1b3; }
.ticket:has(.ticket-forecast) { width: auto; height: auto; display: block; border: 0; background: transparent; }
.ticket-forecast {
  display: grid; place-items: center; min-width: 42px; min-height: 42px; padding: 0 .25rem;
  color: #d6c6f5; background: #27243b; border: 1px solid #6b6088; border-radius: 6px;
  font-size: .8rem; font-weight: 750;
}
.ticket-forecast:hover { border-color: #b7a3df; }
.ticket-forecast[aria-pressed="true"] { border-color: #dcc8ff; background: #403456; color: #fff3ff; }
.board-frame { position: relative; overflow: hidden; padding: .42rem; border: 1px solid #8a7b61; border-radius: 11px; background: linear-gradient(140deg,#4f5044,#1b292b 17%,#131e22 83%,#4a3e39); box-shadow: 0 5px #121a20, 0 19px 42px #0005, inset 0 1px #beac8052; }
.board-frame.clash { border-color: #f29990; }
.board-viewport { max-width: 100%; }
.board-viewport[data-zoomed] {
  max-height: min(58svh, 33rem); overflow: auto; overscroll-behavior: contain;
  scrollbar-color: #8d7a64 #1f2c2d;
}
.board-viewport:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
#board { display: block; width: 100%; height: auto; border-radius: 5px; background: #18272b; touch-action: none; }
.board-viewport[data-zoomed] #board { width: max(122%, calc(var(--board-columns, 15) * 35px)); max-width: none; }
#board-zoom[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }
.game-footer { display: flex; gap: .3rem .85rem; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: .48rem; }
.legend { display: flex; flex-wrap: wrap; gap: .29rem .72rem; color: #b4c3ba; font-size: .78rem; }
.legend span { display: inline-flex; align-items: center; gap: .32rem; }
.legend-dot, .legend-plate { width: .63rem; height: .63rem; flex: none; border-radius: 2px; }
.legend-dot.gold { background: var(--gold); }
.legend-dot.lavender { background: var(--lavender); }
.legend-dot.dashed { border: 1px dashed var(--lavender); }
.legend-sign { color: #aad9eb; font: 800 .85rem/1 system-ui,sans-serif; font-style: normal; }
.legend-sign.gold { color: var(--gold); }
.legend-plate { background: #754d2e; border: 1px solid var(--gold); transform: rotate(45deg) scale(.8); }
.feedback:empty { display: none; }
.feedback { font-size: .82rem; color: #ffd091; min-height: 1.15em; margin-top: .18rem; }
.tools { display: flex; gap: .35rem; flex-wrap: wrap; }
.tools .button { min-height: 40px; padding-inline: .62rem; }
.hint { color: #f0d1a1; padding-left: .65rem; margin: .52rem 0; border-left: 1px solid var(--gold); font-size: .87rem; }
.forecast { display: grid; gap: .28rem; color: #f1e2fb; border: 1px solid #81709c; border-radius: 9px; background: #27263bea; padding: .6rem .72rem; margin: .65rem 0; font-size: .84rem; }
.forecast-heading, .forecast-controls { display: flex; gap: .55rem; align-items: center; justify-content: space-between; }
.forecast-heading h2 { font-size: .95rem; }
.forecast-controls input { flex: 1; min-width: 0; accent-color: #dac2fc; min-height: 36px; }
.forecast-controls .button { min-width: 42px; }
.forecast .micro { color: #d3c7e2; }
.play.replaying .game-shell { --stage-width: min(100%, max(0px, calc((100svh - 11rem - env(safe-area-inset-bottom)) * var(--board-aspect, 1.8)))); }
.play.replaying :is(.top-actions,.room-hud,.game-footer,.input-controls) { display: none; }
.play.replaying .topbar { padding-block: .25rem; }
.play.replaying .room-replay {
  width: min(100%, max(var(--stage-width), 28rem)); margin-bottom: .42rem;
  display: grid; gap: .18rem;
  font-size: .8rem; color: #d3ded7; font-variant-numeric: tabular-nums;
}
.replay-toolbar, .replay-buttons, .replay-actions { display: flex; align-items: center; gap: .3rem; }
.replay-toolbar { flex-wrap: wrap; gap: .42rem .85rem; }
.replay-buttons { flex: none; gap: .48rem; margin-inline-start: auto; }
.replay-toolbar .button { min-height: 44px; padding-inline: .57rem; }
.replay-actions .button { min-width: 44px; color: #edcc9a; font-size: 1.16rem; }
#replay-play {
  min-width: 4.8rem; background: linear-gradient(160deg,#60482f,#3c2d22); border-color: #b8935b;
  box-shadow: inset 0 1px #ffdfa84a, 0 2px #100f10;
  color: #ffe4ba; font: 700 1.1rem/1 var(--serif);
}
#replay-play:hover { background: #5b4530; }
.replay-keys {
  display: flex; flex: 1 1 9rem; flex-wrap: wrap; justify-content: center; gap: .3rem .85rem;
  color: #f3ead7; font: 700 1.05rem/1.2 var(--menu-font);
}
.replay-keys span { display: inline-flex; align-items: center; gap: .25rem; white-space: nowrap; }
.replay-keys kbd {
  display: inline-grid; place-items: center; min-width: 1.48rem; min-height: 1.5rem; padding: 0 .28rem;
  border: 1px solid #827053; border-radius: 4px; background: #263231;
  box-shadow: inset 0 1px #efcc921f, 0 2px #0e1719; color: #ffdcaa;
  font: inherit;
}
.replay-progress { display: grid; grid-template-columns: minmax(0,1fr) 8rem; align-items: center; gap: .58rem; }
#replay-position { width: 100%; margin: 0; min-height: 34px; accent-color: var(--gold); cursor: pointer; }
#replay-step { display: grid; grid-template-rows: repeat(2,1.15em); justify-items: end; line-height: 1.15; }
#replay-event { color: var(--gold); font-size: .73rem; }
@media (max-width: 445px) and (pointer: fine) {
  .play.replaying .game-shell { --stage-width: min(100%, max(0px, calc((100svh - 13rem - env(safe-area-inset-bottom)) * var(--board-aspect, 1.8)))); }
}
@media (pointer: coarse) { .replay-keys { display: none; } }
.input-controls { display: none; padding-top: .28rem; }
.pad {
  width: min(100%, 18.5rem); margin-inline: auto; display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr)) minmax(4.2rem,1.32fr);
  grid-template-areas: ". up . wait" "left down right wait";
  gap: 5px;
}
.pad .button { min-height: 48px; padding: 0 .12rem; font-size: 1.2rem; }
.pad .up { grid-area: up; }
.pad .left { grid-area: left; }
.pad .right { grid-area: right; }
.pad .down { grid-area: down; }
.pad .wait { grid-area: wait; margin-inline-start: .25rem; }
.pad .button[data-move]:not(.wait) { touch-action: none; user-select: none; -webkit-touch-callout: none; }
.pad .button[data-held]:not(:disabled) { background: #453628; border-color: var(--gold); color: #ffe2aa; translate: 0 2px; }
.pad .wait { font-size: .87rem; }
.keys, .micro { color: #a6b8b2; font-size: .77rem; }
kbd { font-family: ui-monospace, monospace; color: #ebe8d8; }
.tutorial-coach { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: .65rem; align-items: center; border: 1px solid #7e684d; border-left: 3px solid var(--gold); background: #1f2524; border-radius: 7px; padding: .55rem .65rem; margin: .52rem auto 0; }
.tutorial-coach h2 { font-size: 1rem; color: var(--gold); }
.tutorial-coach p { color: #d3ddce; font-size: .88rem; line-height: 1.36; }
.tutorial-count { font-size: .74rem; color: #eccb93; white-space: nowrap; }
.play.training .game-shell { --stage-width: min(100%, max(52%,calc((100svh - 19rem) * var(--board-aspect,1.8)))); }
.play.training .tools { display: none; }
.play.training .game-footer { justify-content: flex-end; }
.play.training .pad button[data-current="true"] { border-color: var(--gold); color: var(--gold); }
dialog { width: min(calc(100vw - 1.5rem), 610px); max-height: 91svh; padding: 0; border: 1px solid #8f795c; border-radius: 16px; color: var(--paper); background: linear-gradient(150deg,#253437,#151f28 62%,#252331); box-shadow: inset 0 1px #dec89738, 0 24px 80px #000a; }
dialog::backdrop { background: #050d13be; backdrop-filter: blur(5px); }
.modal { position: relative; padding: clamp(1.1rem, 4.8vw, 2.15rem); }
.close { position: absolute; inset: .75rem .75rem auto auto; min-width: 44px; min-height: 44px; padding: 0; font-size: 1.45rem; line-height: 1; }
.modal header { padding-right: 2.75rem; margin-bottom: .95rem; }
.modal h2 { margin-top: .18rem; font: 500 clamp(1.8rem, 5vw, 2.75rem)/1.05 var(--serif); letter-spacing: -.04em; }
.modal p { color: #afc0bb; }
.modal .eyebrow { color: var(--gold); }
.modal .share-status { margin-top: .45rem; color: var(--gold); font-size: .83rem; }
.share-url { width: 100%; margin-top: .45rem; padding: .5rem; border: 1px solid #738782; border-radius: 4px; background: #192b2e; color: var(--paper); }
.modal-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.modal-actions.stack { display: grid; justify-items: stretch; grid-template-columns: repeat(auto-fit,minmax(115px,1fr)); }
.campaign-overview { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem .85rem; }
.chapter-navigation { display: grid; align-items: end; grid-template-columns: minmax(0,1fr) auto auto; gap: .38rem; margin-top: .75rem; }
.chapter-navigation > button { padding-inline: .62rem; min-width: 44px; }
.chapter-picker { display: grid; gap: .32rem; color: #d3ded7; font-size: .85rem; }
.chapter-picker select { width: 100%; min-height: 44px; padding: .5rem .65rem; border: 1px solid #536a69; border-radius: 6px; background: #182b2e; color: var(--paper); font: inherit; }
.chapter-list { border-top: 1px solid var(--line); padding-top: .7rem; margin-top: .8rem; }
.chapter-list h3 { margin: 0; color: var(--paper); font: 500 1.22rem var(--serif); }
.chapter-list > p { font-size: .84rem; margin: .17rem 0 .48rem; }
.modal .chapter-progress { color: #f3d09d; font-weight: 650; }
.room-select { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .4rem; }
.room-choice { display: grid; justify-items: start; align-content: start; gap: .16rem; padding: .5rem .55rem; line-height: 1.18; min-height: 64px; text-align: left; font-size: .85rem; }
.room-choice span { font-size: .69rem; color: #bdd2c4; }
.room-choice[aria-current="true"] { border-color: var(--gold); }
.setting { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .78rem 0; border-top: 1px solid var(--line); }
.setting small { display: block; font-size: .82rem; line-height: 1.35; color: #aabeb6; }
.setting input { accent-color: var(--gold); }
.setting input[type="checkbox"] { width: 21px; height: 21px; flex: none; margin: .2rem; }
.setting input[type="range"] { width: min(34%, 150px); }
.rules-list { padding-left: 1.25rem; color: #bdcfc6; }
.rules-list li { padding-left: .32rem; margin: 0 0 .65rem; }
.rules-list strong { color: var(--paper); }
.result-star { color: var(--gold); font-size: 1.3rem; margin-right: .4rem; }
.result-line { margin-top: .35rem; }
.modal .collision-detail {
  border-left: 2px solid #e29b91; padding-left: .65rem; margin-bottom: .65rem;
  color: #f0c4b8; font-size: .92rem;
}
body.no-motion *, body.no-motion *::before, body.no-motion *::after { animation: none !important; transition: none !important; }

@media (max-width: 790px) {
  .game-shell, .play.training .game-shell { --stage-width: 100%; }
  .game-shell { width: calc(100% - 1.06rem); padding-top: .45rem; }
  .room-number { font-size: .77rem; }
}
@media (max-width: 790px), (pointer: coarse) {
  .input-controls { display: block; }
  .keys { display: none; }
  .feedback:empty { display: none; }
  .game-footer { margin-bottom: .25rem; }
}
@media (max-width: 680px) and (orientation: portrait) {
  .home { align-items: end; }
  #title-art, #title-weather { height: max(75%, 26rem); object-position: 70% center; }
  .home {
    background: linear-gradient(180deg, #304a52 45%, #31484b 76%, #27353d);
  }
  .home-shade { background: linear-gradient(0deg,#293b41 4%,#293b41a6 23%,transparent 55%); }
  .home-inner {
    width: min(calc(100% - 1.65rem), 25rem); margin: clamp(12rem, 38svh, 22rem) auto max(.85rem,env(safe-area-inset-bottom));
    padding: clamp(1.05rem, 5vw, 1.55rem);
  }
  .home-title { font-size: clamp(3.1rem, 16.4vw, 5.2rem); }
  .home-premise { margin-top: .92rem; padding-top: .55rem; }
  .home-actions { margin-top: .8rem; gap: .52rem; }
  .home-start { min-height: 3.45rem; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .home-inner { width: min(22rem, 50%); margin-block: .6rem; padding: .85rem 1.05rem; }
  .home-title { font-size: clamp(2.65rem, 12.2svh, 4.1rem); }
  .home-premise { margin-top: .7rem; padding-top: .45rem; }
  .home-actions { margin-top: .58rem; gap: .44rem; }
  .home-start { min-height: 2.95rem; }
  .home-tool, .home-extra, .home-music { min-height: 39px; }
}
@media (max-width: 445px) {
  .topbar { padding: .4rem .56rem; }
  .top-actions .button { padding-inline: .48rem; }
  .tools { gap: .28rem; }
  .tools .button { padding-inline: .43rem; font-size: .75rem; }
  .board-viewport[data-zoomed] { max-height: 50svh; }
  .room-select { gap: .32rem; }
  .room-choice { padding-inline: .37rem; font-size: .77rem; }
  .tutorial-coach { grid-template-columns: auto minmax(0,1fr); gap: .2rem .55rem; }
  .tutorial-coach .button { grid-column: 2; justify-self: start; min-height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
