:root {
  color-scheme: dark;
  --ink: #180d28;
  --cream: #fff6fb;
  --paper: #180d28;
  --panel: #352043;
  --line: #774b88;
  --muted: #e0c9ea;
  --pink: #ff97d2;
  --mint: #50efda;
  --gold: #ffd38c;
  --pride: linear-gradient(90deg, #ff4f84, #ff884b 18%, #ffce66 34%, #62e9ac 50%, #56dbff 66%, #9782ff 83%, #ee73dd);
  --bold: Georgia, 'Times New Roman', serif;
  --gutter: clamp(16px, 3.8vw, 56px);
  font-family: 'Avenir Next', Avenir, system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box }
body {
  margin: 0;
  color: var(--cream);
  background: radial-gradient(ellipse 83% 560px at 6% 6%, #72235385 0%, transparent 75%),
    radial-gradient(ellipse 68% 720px at 100% 30%, #46328390 0%, transparent 80%), var(--paper);
  min-height: 100svh;
  font-size: 16px;
  line-height: 1.35;
  -webkit-text-size-adjust: 100%;
}
button, input { font: inherit }
button { cursor: pointer; color: inherit; -webkit-tap-highlight-color: transparent; touch-action: manipulation }
button:disabled { cursor: default }
button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--mint);
  outline-offset: 2px;
}
svg.icons { width: 0; height: 0; position: absolute; overflow: hidden }
button svg, .wallet svg {
  width: 22px; height: 22px;
  display: block; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.mast {
  background: var(--pride) bottom / 100% 3px no-repeat,
    linear-gradient(113deg, #571541 0%, #3b1956 29%, #251534 55%, #1d2942 82%, #193744 100%);
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid #694572;
}
.mast-inner, main {
  max-width: 1320px;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
  margin-inline: auto;
}
.mast-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 12px }
.mast h1 { margin: 0; min-width: 0; line-height: 0 }
.wordmark { display: block; width: clamp(195px, 24vw, 312px); max-width: 100% }
.mast-actions { display: flex; gap: 8px; align-items: center; flex: 0 0 auto }
.utility, .cast-link {
  min-height: 44px; border: 1px solid #9a6da6; border-radius: 24px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: #3c2452; color: #f9dcff; font-size: 14px; font-weight: 700;
}
#sound[aria-pressed=true] { background: #12434b; border-color: #5ddbce; color: #92ffeb }
.utility.icon-only { width: 44px; height: 44px; padding: 0 }
.utility.outfit { padding: 0 16px; color: #ffe2f3; border-color: #d177ac; background: #6b2858 }
.muted .waves { display: none }
main { padding-top: 8px; padding-bottom: max(34px, env(safe-area-inset-bottom)) }
.sessionbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0 7px }
.switch {
  display: inline-flex; align-items: center; gap: 2px; padding: 2px;
  background: #271536; border: 1px solid #955ca4; border-radius: 30px;
}
.switch button {
  min-height: 44px; border: 0; padding: 0 18px; border-radius: 25px;
  background: transparent; color: #f4dcfb; font-weight: 750; font-size: 14px; white-space: nowrap;
}
.switch button[aria-pressed=true] { color: var(--ink); background: linear-gradient(115deg, #98ffdf, var(--mint) 64%, #76d9f0); box-shadow: inset 0 1px #f6fff8b3 }
.wallet { display: flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 14px; color: var(--gold) }
.wallet b { color: var(--cream); font-variant-numeric: tabular-nums }
.wallet svg { width: 21px; height: 21px; color: var(--gold); margin-left: 6px }
.wallet #level {
  padding: 4px 8px; border: 1px solid #a578cb; border-radius: 5px;
  color: #f1d9ff; background: #482a65; font-size: 12px; font-weight: 800; letter-spacing: .045em;
}
.game-grid { display: grid; grid-template-columns: minmax(0, 2.12fr) minmax(270px, .89fr); gap: 16px; align-items: stretch }
.lane-card, .scorecard, .approach {
  min-width: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.lane-card { display: flex; flex-direction: column; background: #21132f; box-shadow: 0 14px 35px #14041e85 }
.lane-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 46px; padding: 6px 16px; width: 100%; border: 0; border-bottom: 1px solid #976096;
  text-align: left; color: var(--cream); background: linear-gradient(105deg, #63234e, #40245c 59%, #264058);
}
.venue-title, .venue-detail { display: flex; align-items: center; gap: 9px; white-space: nowrap }
.venue-title strong { font: italic bold 21px/1.1 var(--bold); letter-spacing: -.035em }
.venue-title svg { width: 14px; height: 14px; transform: rotate(90deg); color: var(--mint) }
.status-bulb { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px #67ffdfbb }
.venue-detail, .control-kicker, .eyebrow, .mic-credit, .small-label {
  font-size: 11px; font-weight: 800; line-height: 1.2; letter-spacing: .095em;
}
.venue-detail { color: var(--muted); gap: 14px }
#lane-no { color: var(--gold) }
#arena {
  width: 100%; position: relative; height: clamp(340px, calc(100svh - 88px - env(safe-area-inset-top)), 1100px);
  flex: 1 0 auto; background: #291738; overflow: hidden;
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: crosshair;
}
#arena>canvas { display: block }
.mic {
  display: flex; align-items: center; gap: 12px; min-height: 78px; padding: 10px 16px;
  background: linear-gradient(115deg, #63234d, #402356 65%, #29233d); border-top: 1px solid #b46ab3;
}
.mic-face, .avatar { position: relative; overflow: hidden; border-radius: 50%; flex-shrink: 0 }
.mic-face { width: 49px; height: 49px; background: #cd9ea0; border: 1px solid #f494cf }
.avatar { width: 40px; height: 40px; background: #c998bb; border: 1px solid #9b7ab8 }
.rival-score .avatar { background: #c9a68f }
.mic-face img, .avatar img, .mic-face canvas, .avatar canvas, .cast-img img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 24%;
}
.avatar [hidden], .mic-face [hidden] { display: none }
.mic-credit { display: flex; align-items: center; gap: 6px; color: var(--pink) }
.eq { height: 11px; display: inline-flex; gap: 2px; align-items: center }
.eq i { width: 2px; height: 5px; border-radius: 2px; background: currentColor }
.eq i:nth-child(2) { height: 11px }
.eq i:nth-child(3) { height: 8px }
.mic p { color: var(--cream); margin: 3px 0 0; font: italic 600 clamp(16px, 1.45vw, 21px)/1.2 var(--bold) }
.console > .mic, .console > .lane-meta { border: 1px solid var(--line); border-radius: 12px }
.console { display: flex; flex-direction: column; gap: 12px; min-width: 0 }
.scorecard { background: linear-gradient(125deg, #233c49, #39254f 49%, #542046) }
.approach { background: radial-gradient(ellipse at 98% 0, #762c7080, transparent 68%), linear-gradient(128deg, #402153, #272047 86%) }
.scorecard { padding: 16px 18px 12px }
.sectiontop h2, .cast-head h2, .sheet h2, .approach h2 {
  font-family: var(--bold); font-style: italic; letter-spacing: -.035em; font-weight: 700; margin: 0;
}
.sectiontop h2 { font-size: 29px; line-height: 1.1; padding-bottom: 10px }
.scoreline { display: flex; gap: 9px; align-items: center; padding: 9px 0; border-top: 1px solid #865994 }
.scoreline .small-label { display: block; color: var(--muted); margin-bottom: 1px }
.scoreline b { font-weight: 730; font-size: 15px }
.scoreline strong {
  color: var(--mint); margin-left: auto; font: 650 30px/1 var(--bold); font-variant-numeric: tabular-nums;
}
.player-score .small-label, .player-score strong { color: var(--mint) }
.rival-score .small-label, .rival-score strong { color: #ffaad8 }
.scorecard>p { text-align: right; color: var(--muted); font-size: 13px; margin: 6px 0 0 }
.approach {
  display: flex; flex-direction: column; flex: 1; justify-content: center;
  border-top: 2px solid #d488fa; padding: 20px 18px 17px;
}
.shot-status { display: contents }
.control-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; color: var(--mint) }
#up-label { width: 100%; font-size: 10px; color: var(--muted) }
#ball-label { color: var(--gold) }
#ball-label:not(:empty)::before { content: ''; width: 3px; height: 3px; display: inline-block; background: #ba87be; border-radius: 50%; vertical-align: middle; margin-right: 9px }
.approach h2 { font-size: clamp(32px, 3.4vw, 49px); line-height: 1.04; margin: 9px 0 5px }
.approach>p { color: #eedaf4; font-size: 15px; line-height: 1.35; margin: 0 0 14px }
.aim-area { margin-bottom: 12px; min-width: 0 }
.aim-reading { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font-size: 13px; font-weight: 700 }
.aim-reading output { color: var(--gold); font-variant-numeric: tabular-nums }
.aim-controls { display: grid; grid-template-columns: 44px minmax(20px, 1fr) 44px; align-items: center; gap: 7px; margin-top: 3px }
.aim-step {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  color: var(--mint); border: 1px solid #7277aa; background: #312343; border-radius: 9px;
}
.aim-step svg { width: 17px; height: 17px; stroke-width: 2.5 }
#aim-left svg { transform: rotate(180deg) }
.aim-step:disabled, #aim:disabled { opacity: .5 }
#aim {
  appearance: none; -webkit-appearance: none; margin: 0; width: 100%; height: 44px;
  background: transparent; cursor: pointer; touch-action: pan-y;
}
#aim::-webkit-slider-runnable-track { height: 5px; border-radius: 5px; background: linear-gradient(to right, #ad7ce2, #64efdc 50%, #ad7ce2); box-shadow: 0 1px 2px #0004 }
#aim::-moz-range-track { height: 5px; border-radius: 5px; background: linear-gradient(to right, #ad7ce2, #64efdc 50%, #ad7ce2) }
#aim::-webkit-slider-thumb {
  -webkit-appearance: none; width: 23px; height: 23px; margin-top: -9px;
  background: #ff77bd; border: 2px solid #401638; border-radius: 50%; box-shadow: 0 1px 5px #0007;
}
#aim::-moz-range-thumb { width: 19px; height: 19px; background: #ff77bd; border: 2px solid #401638; border-radius: 50% }
.roll, .sheet-ok {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 8px 12px; border: 1px solid #ffafda; border-radius: 10px;
  background: linear-gradient(115deg, #ff9dc7, #ff68bc 44%, #f16adb 100%); color: #2c0c30;
  font-size: 18px; line-height: 1.1; font-weight: 850; box-shadow: inset 0 1px #ffe2f380, 0 3px 14px #f537b12e;
}
.roll:active:not(:disabled), .sheet-ok:active { filter: brightness(.93); transform: translateY(1px) }
.roll:disabled { background: #513859; color: #efdbf0; border-color: #89668f; box-shadow: none }
.roll svg { width: 23px; height: 23px; --holes: #ff81cb }
.cast-strip { margin-top: 28px }
.cast-head { display: flex; align-items: center; justify-content: space-between; gap: 12px }
.cast-head h2 { font-size: clamp(26px, 3.2vw, 40px); line-height: 1.1 }
.cast-link { border-color: #b07ac3; font-size: 14px; padding: 0 15px; background: #452557; color: #ffdcfb }
.cast-cards { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; margin-top: 12px; padding: 2px 1px 8px; scroll-snap-type: x proximity }
.cast-card {
  min-width: 0; padding: 0; border: 1px solid #88519b; border-radius: 10px;
  text-align: left; overflow: hidden; background: linear-gradient(110deg, #512453, #342247); color: var(--cream); scroll-snap-align: start;
}
.cast-img { display: block; position: relative; height: clamp(83px, 8.8vw, 128px); overflow: hidden; background: var(--c) }
.cast-img img { object-position: 50% 15% }
.cast-name { display: grid; align-items: center; padding: 6px; min-height: 34px; font-size: 12px; line-height: 1.13; font-weight: 750 }
.cast-number {
  position: absolute; bottom: 4px; left: 5px; display: grid; place-items: center;
  min-width: 20px; height: 20px; border: 1px solid #e7a6e1; border-radius: 50%;
  background: #34173f; color: var(--cream); font-size: 10px; font-weight: 800;
}
#info { width: min(440px, calc(100% - 24px)); max-height: min(88svh, 760px); padding: 0; border: 1px solid #ca86d7; border-radius: 15px; color: var(--cream); background: var(--pride) top / 100% 3px no-repeat, radial-gradient(ellipse at 100% 0, #612559 0, transparent 70%), #302040; box-shadow: 0 18px 70px #110718aa }
dialog::backdrop { background: #160a24cf }
#info .sheet { position: relative; padding: 23px }
#info .x { position: absolute; top: 5px; right: 5px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; color: var(--mint); background: transparent; font-size: 27px }
.eyebrow { color: var(--gold) }
.sheet h2 { margin: 7px 0 12px; font-size: 35px }
.sheet-text p { font-size: 16px; line-height: 1.5; margin: 10px 0 }
.sheet-ok { width: 100%; margin-top: 18px }
@media (hover:hover) {
  .utility:hover, .cast-link:hover, .aim-step:hover:not(:disabled) { background: #573463; border-color: #f0b7fa }
  .lane-meta:hover { background: #59345b }
  .cast-card:hover { border-color: var(--mint) }
  .roll:hover:not(:disabled), .sheet-ok:hover { filter: brightness(1.07) }
}
@media (max-width: 940px) {
  .game-grid { grid-template-columns: minmax(0, 1.8fr) minmax(235px, .9fr); gap: 10px }
  .cast-cards { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 92px; overflow-x: auto; scrollbar-width: thin }
  .cast-img { height: 91px }
  .scorecard, .approach { padding-inline: 14px }
  .venue-detail { gap: 8px; font-size: 10px }
}
/* The venue and live scores share one rail, leaving the phone's center for the lane
   and keeping aiming and bowling together beneath it. */
@media (max-width: 740px), (min-width: 741px) and (max-width: 900px) and (orientation: portrait) {
  :root {
    --gutter: clamp(3px, 1vw, 9px);
    --play-controls: clamp(170px, calc(155px + 3.6vw), 182px);
  }
  main { padding-top: calc(4px + env(safe-area-inset-top)); background: var(--pride) top / 100% 3px no-repeat }
  .mast-inner { min-height: 46px; gap: 8px }
  .wordmark { width: clamp(150px, 43vw, 220px) }
  .mast-actions { gap: 3px }
  .utility { background: #382149; border-color: #875d92 }
  .utility.outfit { padding: 0 10px; gap: 5px; border-color: #bf69a2; background: #5f2854; font-size: 12px }
  .utility svg { width: 20px; height: 20px }
  .sessionbar { padding: 3px 0 4px }
  .switch { padding: 1px; gap: 1px }
  .switch button { padding-inline: clamp(9px, 3vw, 17px); font-size: 13px }
  .wallet { font-size: 13px; gap: 4px }
  .wallet svg { width: 17px; margin-left: 3px }
  .wallet #level { font-size: 11px; padding: 3px 5px }
  .game-grid {
    display: grid; grid-template-columns: minmax(101px, .78fr) minmax(0, 1.22fr) 46px;
    grid-template-rows: auto auto auto auto; gap: 0;
  }
  .lane-card, .console { display: contents }
  #game-menu-toggle { grid-column: 3; grid-row: 1; border-radius: 0 9px 0 0 }
  .console > .lane-meta {
    grid-column: 1; grid-row: 1; min-width: 0; min-height: 44px; gap: 3px;
    display: flex; align-items: flex-start; justify-content: center; flex-direction: column;
    padding: 4px 9px; border: 1px solid var(--line); border-right: 0; border-radius: 11px 0 0 0;
    background: linear-gradient(115deg, #5d204e, #45245b);
  }
  .venue-title { gap: 4px; max-width: 100%; min-width: 0 }
  .venue-title strong { letter-spacing: -.04em; font-size: clamp(15.5px, 4.2vw, 18px); white-space: normal }
  .venue-title svg { width: 11px; height: 11px }
  .status-bulb, .venue-detail #location { display: none }
  .venue-detail { font-size: 10px; line-height: 1; letter-spacing: .10em; font-weight: 750 }
  .scorecard {
    grid-column: 2; grid-row: 1; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 6px;
    min-height: 44px; margin: 0; padding: 3px 7px; border-radius: 0; border-right: 0;
    background: linear-gradient(105deg, #263c4d, #3a2753 52%, #542247);
  }
  .sectiontop, .scorecard>p { display: none }
  .scoreline { border: 0; margin: 0; padding: 0; min-width: 0; gap: 4px }
  .scoreline .small-label { font-size: 9px; line-height: 1; letter-spacing: .075em }
  .scoreline b { display: block; font-size: 12px; line-height: 1.14 }
  .scoreline strong { font-size: 21px; margin-left: auto }
  .scoreline .surname { display: none }
  .scoreline .avatar { width: 25px; height: 25px }
  .rival-score { border-left: 1px solid #89548f; padding-left: 5px }
  #arena {
    grid-row: 2; grid-column: 1 / -1;
    /* Stable height avoids rebuilding the lane canvas while mobile browser chrome moves. */
    height: clamp(220px, calc(100vh - var(--play-controls) - env(safe-area-inset-top) - env(safe-area-inset-bottom)), 1230px);
    height: clamp(220px, calc(100svh - var(--play-controls) - env(safe-area-inset-top) - env(safe-area-inset-bottom)), 1230px);
    outline-offset: -3px; border-inline: 1px solid var(--line);
  }
  .console > .mic {
    grid-row: 3; grid-column: 1 / -1; min-height: 45px; padding: 3px 8px; gap: 7px;
    border: 1px solid var(--line); border-top-color: #aa64a2; border-radius: 0 0 11px 11px;
  }
  .mic-body { min-width: 0; line-height: 1.125; overflow-wrap: break-word }
  .mic-face { width: 36px; height: 36px }
  .mic-credit { display: inline; margin-right: 4px; font-size: 10px; letter-spacing: .06em }
  .mic-credit .eq { display: none }
  .mic p { display: inline; margin: 0; font-size: clamp(14px, 3.55vw, 16px); line-height: 1.19 }
  .approach {
    grid-row: 4; grid-column: 1 / -1; display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(84px, 23vw, 140px);
    gap: 0 9px; align-content: center;
    margin-top: 1px; padding: 0 7px 5px; border-radius: 11px;
  }
  .shot-status { grid-column: 1/-1; grid-row: 1; display: flex; align-items: center; justify-content: space-between; gap: 6px }
  .control-kicker { order: 1; flex: none; gap: 4px; font-size: 10px }
  #up-label { display: none }
  #ball-label:not(:empty)::before { margin-right: 5px }
  .approach h2 { margin: 0; font-size: clamp(19px, 5.3vw, 25px); line-height: 1.02 }
  .approach>p { grid-row: 3; grid-column: 1/-1; font-size: 13px; line-height: 1.3; margin: 3px 0 4px }
  .approach>p:empty { display: none }
  .roll { grid-row: 2; grid-column: 2; align-self: center; min-height: 44px; font-size: 16px; gap: 4px; padding: 5px }
  .roll svg { width: 19px; height: 19px }
  .aim-area { grid-row: 2; grid-column: 1; display: grid; grid-template-columns: 40px minmax(0,1fr); align-items: center; gap: 4px; margin: 0 }
  .aim-reading { justify-content: flex-start; align-items: flex-start; flex-direction: column; line-height: 1.13; gap: 2px; font-size: 13px }
  .aim-reading output { font-size: 11px }
  .aim-controls { margin: 0; gap: 4px }
  .aim-step { background: #312343; color: var(--mint); border-color: #8275af }
  .cast-strip { margin-top: max(22px, env(safe-area-inset-bottom)); }
  .cast-head h2 { font-size: 28px }
  .cast-cards { margin-top: 7px; gap: 7px }
  .cast-link { padding-inline: 13px; font-size: 13px }
}
@media (max-width: 430px) {
  .utility.outfit span { display: none }
  .utility.outfit { width: 44px; padding: 0; background: #672453; border-color: #bb669b; color: #ffe2f3 }
  .wordmark { width: clamp(150px, 46vw, 197px) }
}
@media (max-width: 355px) {
  :root { --play-controls: 185px }
  .game-grid { grid-template-columns: minmax(95px, .78fr) minmax(0, 1.22fr) 44px }
  .lane-meta { padding-left: 6px }
  .venue-title strong { font-size: 16px }
  .scorecard { gap: 4px; padding-inline: 4px }
  .scoreline { gap: 3px }
  .sessionbar { gap: 4px }
  .switch { flex-shrink: 0 }
  .switch button { padding-inline: 6px; font-size: 12px }
  .wallet { font-size: 12px; gap: 2px }
  .wallet #level { padding-inline: 4px; font-size: 10px }
  .wallet svg { width: 15px; margin-left: 0 }
  .tips-unit { display: none }
  .approach { column-gap: 6px }
  .cast-head h2 { font-size: 25px }
}
@media (max-width: 355px) and (max-height: 620px) {
  .venue-title strong { font-size: 15px }
  .approach>p { font-size: 12px }
}
@media (orientation: landscape) and (min-width: 520px) and (max-height: 540px) {
  :root { --gutter: 10px }
  .mast-inner { min-height: 44px }
  .wordmark { width: 188px }
  .utility { height: 44px; min-height: 44px }
  .sessionbar { padding: 2px 0 4px }
  .switch { padding: 0 }
  .switch button { min-height: 44px; padding-inline: 13px; font-size: 13px }
  main { padding-top: calc(4px + env(safe-area-inset-top)) }
  .game-grid { grid-template-columns: minmax(0, 1.72fr) minmax(150px, .68fr) 44px; grid-template-rows: auto auto minmax(0,1fr) auto; gap: 4px 6px }
  .lane-card { display: flex; grid-row: 1 / 4; grid-column: 1 }
  .console { display: contents }
  #game-menu-toggle { grid-column: 3; grid-row: 1; border-radius: 8px }
  .console > .lane-meta { grid-column: 2; grid-row: 1; flex-direction: row; align-items: center; justify-content: space-between; min-height: 44px; padding: 2px 8px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
  .venue-title, .venue-detail { font-size: 10px; gap: 6px }
  .venue-title strong { font-size: 17px }
  .venue-detail #location { display: none }
  #arena {
    height: clamp(170px, calc(100vh - 63px - env(safe-area-inset-top) - env(safe-area-inset-bottom)), 490px);
    height: clamp(170px, calc(100svh - 63px - env(safe-area-inset-top) - env(safe-area-inset-bottom)), 490px);
    border: 0;
  }
  .console > .mic { grid-row: 4; grid-column: 1; height: 49px; min-height: 44px; padding: 4px 8px; gap: 7px; border-inline: 0; border-bottom: 0; border-radius: 0 }
  .mic-face { width: 30px; height: 30px }
  .mic-credit { font-size: 9px }
  .mic p { font-size: 13px; margin: 1px 0 0; line-height: 1.15 }
  .scorecard { grid-row: 2; grid-column: 2 / 4; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; align-items: center; padding: 4px 7px; border-radius: 9px; min-height: 40px }
  .sectiontop, .scorecard>p, .surname { display: none }
  .scoreline { border: 0; padding: 0; gap: 4px }
  .scoreline .avatar { width: 24px; height: 24px }
  .scoreline strong { font-size: 21px }
  .scoreline b { display: block; font-size: 12px; line-height: 1.1 }
  .scoreline .small-label { font-size: 9px }
  .approach { grid-row: 3 / 5; grid-column: 2 / 4; align-self: start; display: flex; justify-content: center; padding: 6px 10px; gap: 0; margin: 0; }
  #up-label { display: none }
  .shot-status { display: contents }
  .control-kicker { order: initial; font-size: 10px; flex-wrap: nowrap }
  .approach h2 { font-size: 24px; margin: 4px 0 2px }
  .approach>p { font-size: 12px; line-height: 1.23; margin: 0 0 4px }
  .aim-area { display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 3px; margin: 0 0 3px }
  .aim-reading { display: flex; flex-direction: column; align-items: flex-start; gap: 0; font-size: 11px }
  .aim-controls { margin-top: 0; gap: 3px }
  .roll { width: 100%; min-height: 44px; padding: 4px; font-size: 15px }
  .cast-strip { margin-top: 18px }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important }
}

/* The alley monitor sits over open foreground wood, below the pin deck. */
.lane-card:has(#arena[data-venue="wilton"]) {
  border-color: #a16da4;
  box-shadow: 0 10px 30px #16062182;
}
.game-grid:has(#arena[data-venue="wilton"]) .lane-meta {
  background: linear-gradient(105deg,#702354,#4b2358 50%,#254451);
  border-bottom-color: #aa6bab;
}
.game-grid:has(#arena[data-venue="wilton"]) .mic {
  background: linear-gradient(100deg,#63244f,#402352 56%,#283549);
  border-top-color: #c577ab;
}
#reaction-monitor {
  position: absolute; z-index: 1; bottom: 7px; right: 7px; height: min(42%, 150px); aspect-ratio: 1.26;
  max-width: 43%; overflow: hidden; pointer-events: none; border: 2px solid #d0a46d;
  border-radius: 12px 12px 9px 9px; box-shadow: 0 2px 9px #07191b9c, inset 0 0 0 3px #132f32;
  background: radial-gradient(ellipse at 50% 54%, #4a6960 0%, #294641 34%, transparent 70%),
    repeating-linear-gradient(94deg, #113130 0, #204441 7%, #1b3937 11%, #14302e 14%);
}
#reaction-monitor[hidden] {display: none}
#arena[data-venue="wilton"] #reaction-monitor {
  border: 3px solid #494156;
  border-radius: 7px;
  box-shadow: -1px -1px 2px #ef8bbe9c, 1px 1px 2px #6acdd9a8, 0 3px 8px #130d138a;
  background: #424050;
}
#arena[data-venue="wilton"] #reaction-monitor::before {
  content: "";
  position: absolute;
  inset: -5px;
  background: linear-gradient(118deg,#b2158052,#19123262 58%,#1a718e50), url("./art/venues/wilton-mural.webp") 58% 57% / auto 165%;
  filter: blur(3px);
}
#arena[data-venue="wilton"] #reaction-camera {position: relative}
#reaction-camera {display: block; width: 100%; height: 100%; object-fit: cover}

/* With two-digit scores a conventional side-by-side portrait and name cannot
   fit the narrow rail. Keep the portrait and score together above the name. */
@media (max-width: 740px), (orientation: landscape) and (max-height: 540px) {
  .scorecard { container: scores / inline-size }
}
@container scores (max-width: 13.5rem) {
  .scoreline {
    display: grid; grid-template-columns: minmax(0,1fr) auto; align-content: center;
    gap: 1px 4px;
  }
  .scoreline .avatar { grid-area: 1 / 1; width: 20px; height: 20px }
  .scoreline strong { grid-area: 1 / 2; font-size: 20px }
  .scoreline > div:not(.avatar) {
    grid-area: 2 / 1 / 3 / -1; min-width: 0;
    display: flex; align-items: baseline; gap: 3px;
  }
  .scoreline .small-label { flex: none; margin: 0 }
  .scoreline b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
}
.cast-card:focus-visible, #open-alleys:focus-visible, #game-menu-toggle:focus-visible { outline-offset: -3px }
a:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px }

.mic {position:relative}
#replay-line {position:absolute; inset:0; z-index:1; width:100%; background:transparent; border:0; border-radius:inherit}
#replay-line:focus-visible {outline:2px solid var(--mint); outline-offset:-2px}
#replay-line::after {content:'▶'; position:absolute; bottom:2px; left:2px; padding:1px 3px; border-radius:4px; color:#ffdcf3; background:#341b41; line-height:1; font-size:9px}
