:root {
  color-scheme: light;
  --cream: #fff8e6;
  --paper: #fffcf2;
  --ink: #22332f;
  --muted: #65716a;
  --coral: #f66d60;
  --coral-dark: #b34239;
  --yellow: #ffcf4c;
  --cyan: #9de1df;
  --line: rgba(34, 51, 47, .18);
  font-family: "Avenir Next", Avenir, "Trebuchet MS", system-ui, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { color: var(--ink); background: #bce7e6; overscroll-behavior: none; }
button { color: inherit; font: inherit; -webkit-tap-highlight-color: transparent; cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
button:focus-visible, a:focus-visible { outline: 4px solid var(--ink); outline-offset: 5px; }
h1:focus, h2:focus { outline: none; }
svg { display: block; }
button svg, .how-icon svg, #move-stick svg, .look-label svg { stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.playground { position: relative; width: 100%; height: 100%; isolation: isolate; }
#arena { display: block; position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.arena-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(18, 55, 52, .07), transparent 30%, transparent 70%, rgba(18, 55, 52, .1)); }

.game-hud { position: absolute; z-index: 30; inset: 0 0 auto; display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 14px; padding: max(16px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 0 max(18px, env(safe-area-inset-left)); pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .18s ease; }
.is-playing .game-hud { opacity: 1; visibility: visible; }
.is-paused .game-hud { opacity: 0; visibility: hidden; }
.hud-heading { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding-top: 3px; text-shadow: 0 1px 2px var(--cream); }
.cabinet-wordmark { font-size: 13px; font-weight: 900; line-height: 1; letter-spacing: .08em; }
.cabinet-wordmark > span { margin-left: 2px; font-size: 7px; vertical-align: top; }
#mode-name { font-size: 11px; font-weight: 750; }
.game-actions { display: flex; gap: 8px; pointer-events: auto; }
.icon-button { display: grid; place-items: center; width: 48px; min-width: 48px; height: 48px; padding: 11px; border: 1.5px solid var(--ink); border-radius: 15px; background: var(--cream); box-shadow: 0 3px 0 rgba(34, 51, 47, .2); transition: transform .12s, background .12s; touch-action: manipulation; }
.icon-button svg { width: 24px; height: 24px; stroke-width: 2.2; }
.icon-button:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(34, 51, 47, .2); }
.icon-button:hover { background: var(--yellow); }
.sound-off { display: none; }
#mute[aria-pressed="true"] .sound-on { display: none; }
#mute[aria-pressed="true"] .sound-off { display: block; }
.scoreboard { grid-column: 1 / -1; display: flex; width: max-content; gap: 0; margin: -3px 0 0; overflow: hidden; border: 1.5px solid var(--ink); border-radius: 16px; background: var(--cream); box-shadow: 0 3px 0 rgba(34, 51, 47, .14); }
.score-item { min-width: 88px; padding: 9px 16px 10px; border-left: 1px solid var(--line); }
.score-item:first-child { border-left: 0; }
.score-item-points { min-width: 98px; background: var(--yellow); }
.score-item dt { margin-bottom: 2px; font-size: 9px; font-weight: 900; line-height: 1; letter-spacing: .1em; text-transform: uppercase; }
.score-item dd { margin: 0; font-size: 23px; font-weight: 900; line-height: 1.05; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.score-item-goal dd { font-size: 17px; line-height: 1.4; letter-spacing: -.045em; }

#reticle, #hit-marker { position: absolute; z-index: 12; left: 50%; top: 50%; width: 32px; height: 32px; transform: translate(-50%, -50%); opacity: 0; pointer-events: none; }
.is-playing:not(.is-paused) #reticle { opacity: 1; }
#reticle::before, #reticle::after { content: ""; position: absolute; inset: 3px; border: 2px solid rgba(255, 252, 242, .96); border-radius: 50%; filter: drop-shadow(0 1px 1px rgba(34, 51, 47, .6)); transition: transform .12s, border-color .12s; }
#reticle::after { inset: 14px; border: 0; background: var(--paper); }
#reticle.locked::before { border-color: var(--yellow); transform: scale(1.2); }
#reticle.locked::after { background: var(--yellow); }
#reticle span { position: absolute; inset: -3px; border: 2px solid transparent; border-radius: 50%; transition: border-color .12s; }
#reticle.locked span { border-color: rgba(255, 207, 76, .38); }
#hit-marker { width: 58px; height: 58px; transition: opacity .08s, transform .12s; }
#hit-marker.show { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
#hit-marker i { position: absolute; width: 4px; height: 13px; border-radius: 3px; background: var(--yellow); box-shadow: 0 1px 1px var(--ink); }
#hit-marker i:nth-child(1) { left: 7px; top: 5px; transform: rotate(-45deg); }
#hit-marker i:nth-child(2) { right: 7px; top: 5px; transform: rotate(45deg); }
#hit-marker i:nth-child(3) { right: 7px; bottom: 5px; transform: rotate(-45deg); }
#hit-marker i:nth-child(4) { left: 7px; bottom: 5px; transform: rotate(45deg); }

.touch-controls { display: none; position: absolute; z-index: 20; inset: 0; opacity: 0; visibility: hidden; pointer-events: none; user-select: none; -webkit-user-select: none; }
.is-playing:not(.is-paused) .touch-controls { opacity: 1; visibility: visible; }
#look-pad { position: absolute; z-index: 1; top: max(180px, calc(env(safe-area-inset-top) + 160px)); right: 0; bottom: 0; left: 47%; pointer-events: auto; touch-action: none; }
.look-label { position: absolute; top: auto; bottom: 16px; right: max(21px, env(safe-area-inset-right)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; width: 108px; min-height: 72px; padding: 12px 7px; border: 1.5px dashed rgba(34, 51, 47, .42); border-radius: 26px; color: var(--ink); background: rgba(255, 248, 230, .5); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; text-shadow: 0 1px 2px var(--cream); pointer-events: none; }
.look-label svg { width: 32px; height: 12px; stroke-width: 1.5; }
.move-control { position: absolute; z-index: 2; left: max(22px, env(safe-area-inset-left)); bottom: calc(25px + env(safe-area-inset-bottom)); width: 116px; height: 116px; pointer-events: none; }
.move-label { position: absolute; bottom: calc(100% + 9px); width: 100%; font-size: 10px; font-weight: 900; letter-spacing: .14em; text-align: center; text-transform: uppercase; text-shadow: 0 1px 3px var(--cream); }
#move-pad { position: relative; width: 116px; height: 116px; border: 2px solid rgba(255, 252, 242, .78); border-radius: 50%; background: rgba(255, 248, 230, .26); box-shadow: inset 0 0 0 7px rgba(34, 51, 47, .07), 0 3px 12px rgba(34, 51, 47, .1); pointer-events: auto; touch-action: none; }
.pad-guide { position: absolute; inset: 16px; border: 1px dashed rgba(34, 51, 47, .26); border-radius: 50%; pointer-events: none; }
#move-stick { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 58px; height: 58px; margin: -29px 0 0 -29px; border: 2px solid var(--ink); border-radius: 50%; background: var(--cream); box-shadow: 0 4px 0 rgba(34, 51, 47, .22); will-change: transform; pointer-events: none; }
#move-stick svg { width: 29px; height: 29px; stroke-width: 1.8; opacity: .8; }
#move-pad.active { background: rgba(157, 225, 223, .48); border-color: var(--cream); }
#fire { position: absolute; z-index: 3; right: max(25px, env(safe-area-inset-right)); bottom: calc(29px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; width: 88px; min-width: 88px; height: 88px; padding: 10px; border: 2px solid var(--ink); border-radius: 50%; color: var(--ink); background: var(--coral); box-shadow: 0 6px 0 var(--coral-dark), 0 8px 0 2px var(--ink), 0 11px 18px rgba(34, 51, 47, .16); pointer-events: auto; touch-action: none; transition: transform .08s, box-shadow .08s; }
#fire svg { width: 31px; height: 31px; fill: var(--yellow); stroke-width: 1.6; }
#fire span { margin-top: 3px; font-size: 20px; font-weight: 950; line-height: 1; letter-spacing: -.06em; }
#fire:active, #fire.active, #fire.is-pressed { transform: translateY(5px); box-shadow: 0 1px 0 var(--coral-dark), 0 3px 0 2px var(--ink), 0 6px 12px rgba(34, 51, 47, .14); }
.desktop-play-hint { position: absolute; z-index: 15; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); width: max-content; max-width: calc(100% - 36px); margin: 0; padding: 11px 17px; border: 1px solid rgba(34, 51, 47, .15); border-radius: 100px; color: var(--ink); background: rgba(255, 248, 230, .88); font-size: 11px; text-align: center; transform: translateX(-50%); pointer-events: none; opacity: 0; visibility: hidden; }
.desktop-play-hint span { font-weight: 850; }
.desktop-play-hint b { padding-inline: 7px; font-weight: 500; }
.is-playing:not(.is-paused) .desktop-play-hint { opacity: 1; visibility: visible; }

.overlay { position: absolute; z-index: 50; inset: 0; display: flex; flex-direction: column; align-items: center; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: max(22px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); background: rgba(40, 66, 56, .11); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.menu-panel { flex: 0 0 auto; position: relative; width: min(100%, 410px); margin-block: auto; padding: 25px 28px 22px; border: 2px solid var(--ink); border-radius: 30px; background: var(--cream); box-shadow: 0 7px 0 var(--ink), 0 18px 45px rgba(34, 51, 47, .18); }
.welcome-topline { display: flex; min-height: 42px; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.brand-label { display: inline-block; font-size: 9px; font-weight: 900; line-height: 1.4; letter-spacing: .13em; }
.brand-label > span { padding-inline: 5px; color: var(--coral-dark); }
.bot-sticker { position: relative; width: 51px; height: 42px; margin-right: 4px; border: 2px solid var(--ink); border-radius: 13px; background: var(--cyan); box-shadow: 2px 3px 0 rgba(34, 51, 47, .15); transform: rotate(8deg); }
.bot-antenna { position: absolute; left: 22px; bottom: 100%; width: 2px; height: 7px; background: var(--ink); }
.bot-antenna::before { content: ""; position: absolute; top: -5px; left: -3px; width: 8px; height: 8px; border: 2px solid var(--ink); border-radius: 50%; background: var(--coral); }
.bot-face { position: absolute; inset: 7px 6px 6px; border-radius: 8px; background: var(--ink); }
.bot-face i { position: absolute; top: 6px; width: 5px; height: 6px; border-radius: 3px; background: var(--cream); }
.bot-face i:first-child { left: 6px; }
.bot-face i:nth-child(2) { right: 6px; }
.bot-face b { position: absolute; left: 12px; bottom: 5px; width: 9px; height: 5px; border-bottom: 2px solid var(--cream); border-radius: 0 0 8px 8px; }
.bot-ear { position: absolute; top: 13px; width: 6px; height: 13px; border: 2px solid var(--ink); border-radius: 4px; background: var(--yellow); }
.bot-ear-left { left: -6px; }
.bot-ear-right { right: -6px; }
h1 { margin: 0; text-align: center; }
.title-main { display: block; color: var(--coral); font-family: "Arial Rounded MT Bold", "Avenir Next", "Trebuchet MS", system-ui, sans-serif; font-size: clamp(48px, 13vw, 65px); font-weight: 1000; line-height: .96; letter-spacing: -.075em; text-shadow: 0 3px 0 var(--ink); -webkit-text-stroke: 1.2px var(--ink); }
.title-sub { display: block; margin-top: 7px; font-size: clamp(23px, 6.6vw, 32px); font-weight: 950; line-height: 1; letter-spacing: -.06em; }
.welcome-copy { margin: 18px 0 0; font-size: 17px; font-weight: 650; line-height: 1.4; text-align: center; letter-spacing: -.025em; }
.how-to { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 23px 0 0; padding: 0; list-style: none; }
.how-to li { display: flex; flex-direction: column; align-items: center; text-align: center; }
.how-icon { display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: 7px; border: 1.5px solid var(--ink); border-radius: 14px; }
.how-icon svg { width: 25px; height: 25px; stroke-width: 1.7; }
.move-icon { background: var(--cyan); transform: rotate(-5deg); }
.look-icon { background: var(--yellow); transform: rotate(4deg); }
.pop-icon { background: var(--coral); transform: rotate(-3deg); }
.how-to strong { margin-bottom: 2px; font-size: 12px; font-weight: 900; }
.how-to li > span:last-child { font-size: 10px; font-weight: 650; line-height: 1.35; white-space: nowrap; }
.round-brief { margin: 20px 0 15px; font-size: 12px; line-height: 1.4; text-align: center; }
.round-brief strong { font-weight: 900; }
.menu-actions { display: flex; flex-direction: column; gap: 11px; }
.button { position: relative; display: flex; min-width: 48px; min-height: 52px; align-items: center; justify-content: center; gap: 12px; width: 100%; padding: 13px 17px; border: 1.5px solid var(--ink); border-radius: 15px; font-size: 14px; font-weight: 850; line-height: 1.2; text-align: center; touch-action: manipulation; transition: transform .12s, box-shadow .12s, background .12s; }
.button-primary { min-height: 57px; justify-content: space-between; color: var(--ink); background: var(--coral); box-shadow: 0 4px 0 var(--ink); }
.button-primary:hover { background: #ff7e70; }
.button-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.button-arrow { font-family: system-ui, sans-serif; font-size: 27px; font-weight: 500; line-height: .7; }
.button-secondary { flex-wrap: wrap; gap: 3px 9px; background: var(--paper); }
.button-secondary:hover { background: var(--yellow); }
.button-secondary:active { transform: translateY(2px); }
.button-detail { color: var(--muted); font-size: 10px; font-weight: 650; }
.button-quiet { color: var(--ink); min-height: 48px; border-color: transparent; background: transparent; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.button-quiet:hover { background: rgba(34, 51, 47, .06); }
.menu-desktop-hint { margin: 17px 0 0; color: var(--muted); font-size: 11px; font-weight: 600; line-height: 1.5; text-align: center; }
.loading-status { display: flex; justify-content: center; align-items: center; gap: 7px; min-height: 16px; margin: 13px 0 0; color: var(--muted); font-size: 10px; font-weight: 700; line-height: 1.4; text-align: center; }
.loading-status::before { content: ""; flex: 0 0 auto; width: 6px; height: 6px; border: 1px solid var(--ink); border-radius: 50%; background: var(--cyan); }
.load-error { margin: 15px 0 0; padding: 10px 12px; border: 1px solid var(--coral-dark); border-radius: 10px; color: #8f332d; background: #ffebe4; font-size: 12px; line-height: 1.4; }
.pause-menu, .result-menu { max-width: 380px; padding-top: 27px; text-align: center; }
.pause-menu h2, .result-menu h2 { margin: 15px 0 0; font-size: clamp(36px, 10vw, 45px); font-weight: 950; line-height: .98; letter-spacing: -.065em; }
.panel-copy { margin: 16px 0 21px; color: #59665e; font-size: 13px; font-weight: 600; line-height: 1.5; }
.pause-doodle { display: flex; align-items: center; justify-content: center; gap: 9px; width: 65px; height: 65px; margin: 22px auto 0; border: 1.5px solid var(--ink); border-radius: 19px; background: var(--yellow); transform: rotate(-7deg); }
.pause-doodle span { width: 7px; height: 27px; border-radius: 3px; background: var(--ink); }
.pause-touch-hint { margin: 17px 0 0; color: var(--muted); font-size: 10px; font-weight: 650; line-height: 1.5; }
.result-spark { width: 66px; height: 66px; margin: 19px auto 0; transform: rotate(7deg); }
.result-spark svg { width: 100%; height: 100%; fill: var(--yellow); stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; }
.result-total { display: flex; flex-direction: column; gap: 4px; margin: 21px 0 0; }
.result-total > span { font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
#result-score { color: var(--coral-dark); font-size: 65px; font-weight: 950; line-height: .95; letter-spacing: -.07em; font-variant-numeric: tabular-nums; }
#result-message { margin-top: 16px; }
#toast { position: absolute; z-index: 70; top: calc(max(16px, env(safe-area-inset-top)) + 148px); left: 50%; width: max-content; max-width: min(420px, calc(100% - 36px)); margin: 0; padding: 12px 17px; border: 1.5px solid var(--ink); border-radius: 14px; color: var(--ink); background: var(--cream); box-shadow: 0 3px 0 rgba(34, 51, 47, .2); font-size: 12px; font-weight: 750; line-height: 1.5; text-align: center; transform: translateX(-50%); pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .12s; }
.is-playing:not(.is-paused) #toast.show { opacity: 1; visibility: visible; }
.is-paused #arena { filter: saturate(.8); }

@media (hover: hover) and (pointer: fine) and (min-width: 741px) {
  .game-hud { grid-template-columns: 1fr auto 1fr; align-items: center; }
  .hud-heading { align-self: start; }
  .game-actions { grid-column: 3; grid-row: 1; justify-self: end; }
  .scoreboard { grid-column: 2; grid-row: 1; margin-top: 0; }
  .pause-touch-hint { display: none; }
}

@media (pointer: coarse), (max-width: 740px) {
  .touch-controls { display: block; }
  .desktop-play-hint { display: none; }
  .menu-desktop-hint { display: none; }
}

@media (max-width: 360px) {
  .game-hud { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); gap: 12px; }
  .game-actions { gap: 5px; }
  .icon-button { border-radius: 14px; }
  .cabinet-wordmark { font-size: 11px; }
  #mode-name { font-size: 9px; }
  .score-item { min-width: 77px; padding-inline: 13px; }
  .score-item-points { min-width: 85px; }
  .overlay { padding: max(16px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .menu-panel { padding: 22px 20px 19px; border-radius: 25px; }
  .welcome-topline { margin-bottom: 12px; }
  .title-main { font-size: 49px; }
  .title-sub { font-size: 25px; }
  .welcome-copy { font-size: 16px; }
  .how-to { gap: 3px; margin-top: 20px; }
  .how-to li > span:last-child { font-size: 9px; }
  .button { padding-inline: 13px; font-size: 13px; }
  .button-detail { font-size: 9px; }
  .move-control { left: max(18px, env(safe-area-inset-left)); }
  #fire { right: max(21px, env(safe-area-inset-right)); }
}

@media (max-height: 480px) and (min-width: 550px) {
  .game-hud { grid-template-columns: 1fr auto 1fr; align-items: start; padding-top: max(10px, env(safe-area-inset-top)); }
  .game-actions { grid-column: 3; grid-row: 1; justify-self: end; gap: 6px; }
  .scoreboard { grid-column: 2; grid-row: 1; margin: 0; }
  .score-item { min-width: 68px; padding: 7px 12px; }
  .score-item dd { font-size: 20px; }
  .score-item-goal dd { font-size: 18px; }
  .move-control { bottom: calc(16px + env(safe-area-inset-bottom)); }
  #fire { bottom: calc(20px + env(safe-area-inset-bottom)); }
  #look-pad { top: calc(76px + env(safe-area-inset-top)); bottom: 0; }
  .look-label { top: auto; right: max(148px, env(safe-area-inset-right)); bottom: calc(22px + env(safe-area-inset-bottom)); min-height: 60px; padding-block: 8px; }
  .overlay { padding-block: max(16px, env(safe-area-inset-top)) max(23px, env(safe-area-inset-bottom)); }
  #toast { top: calc(75px + env(safe-area-inset-top)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Park run: the objective lives in the arena; the HUD stays compact. */
.welcome-copy { margin: 8px 0 24px; }
.welcome-lights { display: flex; justify-content: center; gap: 14px; margin: 27px 0 0; }
.welcome-lights i, #light-pips i { display: block; width: 23px; height: 23px; border: 2px solid var(--ink); border-radius: 50%; background: var(--yellow); box-shadow: 0 3px 0 rgba(34,51,47,.18); }
.welcome-lights i:nth-child(2) { background: var(--cyan); }
.welcome-lights i:nth-child(3) { background: #f8a8bb; }
.welcome-panel .menu-actions { gap: 4px; }
.welcome-panel .loading-status { margin-top: 6px; }
#charge-hud { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 5px 10px; width: 280px; max-width: 100%; padding: 8px 12px; margin-top: -6px; border: 1px solid rgba(34,51,47,.3); border-radius: 13px; background: rgba(255,248,230,.94); }
#light-pips { display: flex; gap: 5px; grid-row: span 2; }
#light-pips i { width: 16px; height: 16px; background: #e1dfcf; box-shadow: none; }
#light-pips i.current { border-color: #c08d13; background: var(--yellow); }
#light-pips i.complete { background: #42b792; }
#light-pips i.complete::after { content:'✓'; display:block; text-align:center; font-size:10px; line-height:12px; font-weight:900; }
#charge-state { font-size: 11px; font-weight: 850; line-height: 1.1; }
.charge-track { height: 5px; overflow: hidden; border-radius: 5px; background: #dfded0; }
#charge-fill { display: block; height: 100%; width: 0; background: #3d9b75; }
#charge-hud.jammed { border-color: #b34239; background: #fff1dc; }
#charge-hud.jammed #charge-state { color: #9c382e; }
#charge-hud.jammed #charge-fill { background: #e6745b; }
#reticle.blocked::before { border-radius: 7px; border-color: var(--coral); }
#reticle.blocked::after { background: var(--coral); }
#beacon-nav { position: absolute; z-index: 15; left: 50%; top: calc(50% + 35px); display: none; align-items: center; justify-content: center; gap: 7px; padding: 4px 9px; border: 1px solid rgba(34,51,47,.45); border-radius: 25px; color: var(--ink); background: #fff8e6e8; pointer-events: none; transform: translateX(-50%); }
.is-playing:not(.is-paused) #beacon-nav { display:flex; }
#beacon-arrow { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--ink); background: var(--beacon-color,var(--yellow)); font: 900 20px/1 system-ui,sans-serif; }
#beacon-distance { font-size: 10px; font-variant-numeric: tabular-nums; }
body[data-fire-mode='auto'] #fire { display: none; }
body[data-fire-mode='auto'] .look-label { bottom: calc(48px + env(safe-area-inset-bottom)); min-height: 88px; border-radius: 50%; background: rgba(255,248,230,.4); }
body[data-fire-mode='manual'] .look-label { bottom: calc(152px + env(safe-area-inset-bottom)); }
#look-pad.active .look-label { border-style: solid; background: rgba(157,225,223,.45); }
.learned-look .look-label { opacity: .48; }
.learned-move .move-label { opacity: .45; }
.pause-menu .menu-actions { margin-top: 22px; gap: 9px; }
#controls-help { margin: 4px 0; text-align: left; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
#controls-help summary { display: flex; align-items:center; justify-content: center; min-height:48px; cursor: pointer; font-size:12px; font-weight:800; }
#controls-help p { margin: 6px 0 12px; color: var(--muted); font-size:12px; line-height:1.45; }
#controls-help label { display:block; margin-bottom:5px; font-size:11px; font-weight:800; }
#fire-mode { display:block; width:100%; min-height:48px; margin-bottom:14px; padding:10px; border:1.5px solid var(--ink); border-radius:10px; font:inherit; font-size:13px; background:var(--paper); color:var(--ink); }
summary:focus-visible, select:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.result-spark { color: var(--coral); font-size: 75px; line-height: 1; }
#result-score { font-size: 54px; }
@media (hover:hover) and (pointer:fine) and (min-width:741px) {
  #charge-hud { grid-column:2; grid-row:2; justify-self:center; margin-top:0; }
  .desktop-play-hint { opacity:.7; }
}
@media (max-height:480px) and (min-width:550px) {
  #charge-hud { grid-column:2; grid-row:2; width:235px; justify-self:center; margin-top:0; padding:6px 10px; }
  body[data-fire-mode='auto'] .look-label { right:max(25px,env(safe-area-inset-right)); bottom:calc(30px + env(safe-area-inset-bottom)); min-height:80px; }
  body[data-fire-mode='manual'] .look-label { right:145px; bottom:25px; }
  #look-pad { top:115px; bottom:0; }
}
@media (prefers-reduced-motion:reduce) {
  .learned-look .look-label { transition:none; }
}
#threat-cues { display:none; position:absolute; inset:0; z-index:14; pointer-events:none; }
.is-playing:not(.is-paused) #threat-cues { display:block; }
.threat-cue { position:absolute; top:48%; display:flex; align-items:center; gap:3px; min-width:39px; min-height:40px; padding:5px 7px; border:2px solid var(--ink); border-radius:14px; color:var(--ink); background:var(--yellow); box-shadow:0 3px 0 #22332f33; }
#threat-left { left:max(9px,env(safe-area-inset-left)); }
#threat-right { right:max(9px,env(safe-area-inset-right)); }
.threat-cue b { font-size:18px; }
.threat-cue i { display:block; font:900 21px/1 system-ui,sans-serif; font-style:normal; }
.threat-cue.guard { background:#75cfe8; border-radius:6px 6px 16px 16px; }
.threat-cue.urgent { border-color:#a3352c; box-shadow:0 0 0 4px #fff8e6b3; }
/* The first gesture cue outlines the actual area, rather than suggesting a button. */
body[data-fire-mode='auto'] #look-pad::before { content:''; position:absolute; inset:6px 14px calc(24px + env(safe-area-inset-bottom)); border:1.5px dashed rgba(34,51,47,.25); border-radius:25px; pointer-events:none; }
body[data-fire-mode='auto'] .look-label { right:14px; bottom:calc(40px + env(safe-area-inset-bottom)); width:calc(100% - 28px); min-height:48px; border:0; border-radius:0; background:none; text-shadow:0 1px 3px var(--cream),0 -1px 3px var(--cream); }
body[data-fire-mode='auto'] .look-label svg { width:70px; }
body.learned-look[data-fire-mode='auto'] #look-pad::before { opacity:.18; }
body.learned-look[data-fire-mode='auto'] .look-label { opacity:.4; }
