/* Boardwalk Bowl — flat candy-vector UI chrome over the rendered lane.
   Recipe matches boardwalk-putt/style.css + carnival-darts/style.css
   (candy-gloss family look) — same chip/cta/panel shapes, Bowl's own palette. */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: #1b2a3a; font-family: 'Segoe UI', system-ui, sans-serif; overflow: hidden; }

#stage { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 8px 0; }
canvas { max-width: 100vw; max-height: calc(100vh - 16px); aspect-ratio: 480 / 957; touch-action: none; border-radius: 14px; min-height: 0; flex: 0 1 auto; background: #1b2a3a; }
#hud:not(.hide) ~ * canvas, #stage:has(#hud:not(.hide)) canvas { max-height: calc(100vh - 130px); }

.hide { display: none !important; }

/* HUD — in flow above the canvas so chips never cover the lane */
#hud { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; width: min(96vw, 640px); }
.chip { background: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 13px; color: #23445c; box-shadow: 0 3px 0 rgba(0,0,0,.25); border: none; text-decoration: none; min-height: 40px; display: inline-flex; align-items: center; }
.chip.btn { cursor: pointer; }
.chip.home { background: #ffd166; }
.chip.wide { max-width: 40vw; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chip.alt { background: #4db9ff; color: #10243a; }

/* Frame-by-frame scorecard strip — persistent, horizontally scrollable,
   running totals per frame; null/unresolved frames render blank (never
   "NaN"/"null" text). */
#scorecard-strip { width: 100%; overflow-x: auto; background: rgba(255,255,255,.92); border-radius: 12px; margin-top: 2px; box-shadow: 0 3px 0 rgba(0,0,0,.2); }
#scorecard-strip table { border-collapse: collapse; width: 100%; font-size: 11px; }
#scorecard-strip td, #scorecard-strip th { border: 1px solid #dde5ee; padding: 3px 6px; color: #23445c; text-align: center; min-width: 28px; }
#scorecard-strip .dim { color: #8aa0b4; font-size: 9px; }
#scorecard-strip .cur { background: #fff3d6; }

/* Menu */
#menu { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: linear-gradient(180deg, #4db9ff 0%, #a077ff 55%, #ff6fa5 130%); text-align: center; padding: 20px; }
#menu h1 { font-size: clamp(34px, 7vw, 56px); color: #fff; text-shadow: 0 4px 0 rgba(0,0,0,.25); }
.tag { color: #fff8ec; font-weight: 700; text-shadow: 0 2px 0 rgba(0,0,0,.2); }
.banner { background: #fff; border-radius: 12px; padding: 10px 16px; font-weight: 800; color: #23445c; box-shadow: 0 4px 0 rgba(0,0,0,.2); }
.modes { display: flex; flex-direction: column; gap: 12px; width: min(86vw, 340px); }
.cta { background: #3fc463; color: #fff; font-size: 20px; font-weight: 800; border: none; border-radius: 16px; padding: 16px; cursor: pointer;
  box-shadow: 0 5px 0 #1f8f43; min-height: 56px; }
.cta:active { transform: translateY(3px); box-shadow: 0 2px 0 #1f8f43; }
.cta.alt { background: #ffd166; color: #5a3a1a; box-shadow: 0 5px 0 #c98a2e; }
.cta small { display: block; font-size: 12px; font-weight: 600; opacity: .9; }
.ghost { background: transparent; border: 2px solid rgba(255,255,255,.8); color: #fff; border-radius: 12px; padding: 10px 18px; font-weight: 700; cursor: pointer; text-decoration: none; }
.hint { color: rgba(255,255,255,.85); font-size: 13px; line-height: 1.5; max-width: 380px; }

/* Overlays */
#overlay { position: absolute; inset: 0; background: rgba(18, 30, 44, .6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.panel { background: #fff; border-radius: 20px; padding: 24px; width: min(92vw, 440px); text-align: center; box-shadow: 0 8px 0 rgba(0,0,0,.25); max-height: 90vh; overflow-y: auto; }
.panel h2 { color: #23445c; margin-bottom: 6px; }
.panel .big { font-size: 20px; font-weight: 800; color: #23445c; margin: 6px 0; }
.panel .rec { color: #d94a80; font-weight: 800; margin: 4px 0 10px; }
.panel .cta { width: 100%; margin-top: 10px; font-size: 18px; }
.panel .ghost { display: inline-block; margin-top: 10px; border-color: #23445c; color: #23445c; }
table.card { margin: 10px auto; border-collapse: collapse; font-size: 11px; }
table.card td, table.card th { border: 1px solid #dde5ee; padding: 3px 5px; color: #23445c; }
table.card .dim { color: #8aa0b4; }
