/* LAN Golf Club — UI styles. Two registers, one family:
   clubhouse paper (lobby, room, scorecard) and broadcast slabs (in-game HUD). */

/* ------------------------------------------------------------------ fonts (vendored, OFL) */
@font-face { font-family: 'Fraunces'; src: url(fonts/fraunces-latin-wght-normal.woff2) format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url(fonts/fraunces-latin-wght-italic.woff2) format('woff2'); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url(fonts/barlow-condensed-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url(fonts/barlow-condensed-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url(fonts/barlow-condensed-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url(fonts/barlow-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url(fonts/barlow-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url(fonts/barlow-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Caveat'; src: url(fonts/caveat-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; }

/* ------------------------------------------------------------------ tokens */
:root {
  --g900: #0a1c14; --g800: #0f2a1f; --g700: #163a2b; --g600: #1f4d39; --g500: #2d6a4f; --g300: #8fb59a;
  --ivory: #f4eedc; --paper: #f6f0de; --paper2: #ece2c6; --ink: #1b2620; --ink2: #56645a; --graphite: #34322d;
  --rule: #c9bb94; --rule2: #ddd1b0;
  --brass: #c49a3c; --brass-hi: #e0bb5c; --red: #b7342a; --tvred: #d33a2c; --slate: #2e3f52;

  /* HUD (broadcast) — re-themed per mode */
  --slab: rgba(8, 22, 16, 0.9); --slab2: rgba(17, 42, 31, 0.94); --slab-line: rgba(244, 238, 220, 0.12);
  --hud-ink: #f4eedc; --hud-mute: rgba(244, 238, 220, 0.56); --acc: var(--brass); --acc-ink: #1c1505; --cut: 10px; --rad: 2px;

  --f-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --f-cond: 'Barlow Condensed', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --f-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-hand: 'Caveat', 'Segoe Print', cursive;

  --sa-t: env(safe-area-inset-top, 0px); --sa-r: env(safe-area-inset-right, 0px);
  --sa-b: env(safe-area-inset-bottom, 0px); --sa-l: env(safe-area-inset-left, 0px);
  --gut: 14px;
  --ease: cubic-bezier(.2, .8, .2, 1); --ease-back: cubic-bezier(.3, 1.4, .5, 1);

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .26 0 0 0 0 .14 0 0 0 .11 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body.mode-mini {
  --slab: rgba(13, 31, 46, 0.9); --slab2: rgba(20, 46, 64, 0.94);
  --acc: #ff7a59; --acc-ink: #2a0f06; --cut: 0px; --rad: 9px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--g900); color: var(--ink);
  font: 16px/1.4 var(--f-body); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
#c { position: fixed; inset: 0; touch-action: none; display: block; cursor: crosshair; }
.hidden { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
input { font: inherit; color: inherit; }
.ico { width: 20px; height: 20px; flex: none; display: block; }
kbd { font: 600 10px/1 var(--f-cond); letter-spacing: .06em; padding: 3px 4px 2px; border: 1px solid currentColor; border-radius: 3px; opacity: .55; }

.eyebrow { font: 600 12px/1 var(--f-cond); letter-spacing: .16em; text-transform: uppercase; color: var(--ink2); }
.eyebrow.mt { margin-top: 22px; }
.fine { font-size: 13px; color: var(--ink2); margin: 8px 0 0; }

/* ------------------------------------------------------------------ buttons (paper register) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  font: 600 15px/1 var(--f-cond); letter-spacing: .12em; text-transform: uppercase; border-radius: 2px;
  transition: background .15s, color .15s, transform .08s, box-shadow .15s; }
.btn:active { transform: translateY(1px); }
.btn .ico { width: 18px; height: 18px; }
.btn.primary { background: var(--g700); color: var(--ivory); box-shadow: inset 0 -3px 0 var(--brass); }
.btn.primary:hover { background: var(--g600); }
.btn.ink { background: var(--ink); color: var(--paper); }
.btn.ink:hover { background: var(--g700); }
.btn.ghost { color: var(--ink2); border: 1px solid var(--rule); }
.btn.ghost:hover { color: var(--ink); border-color: var(--ink2); }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn.big { min-height: 54px; font-size: 18px; width: 100%; margin-top: 18px; }
.btn.ok { background: var(--g500); }

/* ------------------------------------------------------------------ screens & paper sheets */
.screen { position: fixed; inset: 0; z-index: 5; overflow: auto; -webkit-overflow-scrolling: touch;
  display: grid; place-items: center; grid-template-columns: minmax(0, 1fr);
  padding: calc(24px + var(--sa-t)) calc(16px + var(--sa-r)) calc(24px + var(--sa-b)) calc(16px + var(--sa-l));
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 240, 200, .07), transparent 60%),
    repeating-linear-gradient(100deg, rgba(255, 255, 255, .012) 0 120px, rgba(0, 0, 0, .025) 120px 240px),
    radial-gradient(140% 120% at 50% 40%, var(--g700) 0%, var(--g800) 55%, var(--g900) 100%); }
.screen::before { content: ''; position: fixed; inset: 0; background: var(--grain); opacity: .5; pointer-events: none; mix-blend-mode: overlay; }

.sheet { position: relative; background: var(--paper) var(--grain); color: var(--ink); border-radius: 3px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 30px 70px -20px rgba(0, 0, 0, .65), 0 2px 6px rgba(0, 0, 0, .3); }
.sheet::after { content: ''; position: absolute; inset: 8px; border: 1px solid var(--rule); outline: 1px solid var(--rule2);
  outline-offset: -4px; pointer-events: none; border-radius: 1px; }
.screen .sheet { animation: sheet-in .55s var(--ease) both; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(14px); } }

h1, h2 { font-family: var(--f-display); font-weight: 600; margin: 0; letter-spacing: -.01em; }

/* ------------------------------------------------------------------ lobby */
.lobby-sheet { width: min(1060px, 100%); display: grid; grid-template-columns: 1fr 1.2fr; }
.lobby-player { padding: 48px 44px 40px; border-right: 1px solid var(--rule); display: flex; flex-direction: column; align-items: center; text-align: center; }
.lobby-sheet-right { padding: 44px 44px 40px 40px; min-width: 0; }
.crest { width: 124px; height: 124px; color: var(--g700); }
.crest-svg { width: 100%; height: 100%; display: block; }
.cr-o { fill: var(--g700); } .cr-i { fill: none; stroke: var(--brass); stroke-width: 1; }
.cr-t { font: 600 8.6px var(--f-cond); letter-spacing: .26em; fill: var(--ivory); }
.cr-g { fill: var(--g500); } .cr-p { stroke: var(--ivory); stroke-width: 2.2; stroke-linecap: round; } .cr-f { fill: var(--brass-hi); } .cr-b { fill: #fff; }
.wordmark { font-size: 54px; line-height: 1; margin-top: 18px; font-weight: 640; font-variation-settings: 'opsz' 96; }
.wordmark em { font-weight: 400; color: var(--g500); }
.tagline { margin: 10px 0 0; color: var(--ink2); font-size: 15px; max-width: 26ch; }
.signin { margin-top: 30px; width: 100%; text-align: left; }
.sig { display: block; width: 100%; margin-top: 4px; padding: 2px 2px 0; border: 0; border-bottom: 1.5px solid var(--ink);
  background: transparent; font: 600 36px/1.15 var(--f-hand); color: var(--g700); outline: none; border-radius: 0; }
.sig:focus { border-bottom-color: var(--brass); }
.balls { display: grid; grid-template-columns: repeat(10, minmax(0, 32px)); justify-content: space-between; gap: 8px; margin-top: 12px; }
.ball { --c: #fff; position: relative; width: 32px; height: 32px; aspect-ratio: 1; border-radius: 50%; transition: transform .2s var(--ease-back);
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .95) 0 8%, rgba(255, 255, 255, 0) 32%),
    radial-gradient(circle, rgba(0, 0, 0, .13) 0 1px, transparent 1.5px) 0 0 / 6px 6px,
    radial-gradient(circle at 60% 70%, var(--c) 0 55%, color-mix(in srgb, var(--c) 70%, #000) 100%);
  box-shadow: 0 3px 5px -2px rgba(0, 0, 0, .45), inset -2px -3px 5px rgba(0, 0, 0, .18); }
.balls .ball { width: 100%; height: auto; }
.ball:hover { transform: translateY(-2px); }
.ball.on { transform: translateY(-4px); }
.ball.on::after { content: ''; position: absolute; left: 50%; bottom: -12px; width: 18px; height: 6px; transform: translateX(-50%);
  background: var(--brass); clip-path: polygon(0 0, 100% 0, 62% 100%, 38% 100%); }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; display: inline-block; box-shadow: inset -1px -2px 3px rgba(0, 0, 0, .3), 0 0 0 1px rgba(0, 0, 0, .25); }

.sheet-head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.sheet-head h2 { font-size: 26px; font-style: italic; font-weight: 500; }
.teesheet { min-height: 150px; max-height: 260px; overflow: auto; }
.tee { display: grid; grid-template-columns: 62px 1fr auto; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--rule); }
.tee .code { font: 700 20px/1 var(--f-cond); letter-spacing: .14em; color: var(--g700); }
.tee .who { min-width: 0; }
.tee .who b { display: block; font: 600 15px/1.2 var(--f-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tee .who small { display: flex; gap: 8px; align-items: center; font: 500 12px/1.4 var(--f-cond); letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); }
.tee .st-live { color: var(--red); } .tee .st-wait { color: var(--g500); }
.tee .btn { min-height: 38px; padding: 0 14px; }
.tee-empty { padding: 22px 2px; color: var(--ink2); font-family: var(--f-display); font-style: italic; font-size: 17px; border-bottom: 1px solid var(--rule); }
.tee-empty small { display: block; font: 13px var(--f-body); font-style: normal; margin-top: 4px; }

.newround { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.mode-btn { display: flex; align-items: center; gap: 12px; padding: 14px 14px; min-height: 70px; text-align: left;
  background: var(--g700); color: var(--ivory); border-radius: 2px; box-shadow: inset 0 -3px 0 var(--brass); transition: background .15s, transform .08s; }
.mode-btn:hover { background: var(--g600); }
.mode-btn:active { transform: translateY(1px); }
.mode-btn.mini { background: var(--slate); box-shadow: inset 0 -3px 0 #ff7a59; }
.mode-btn.mini:hover { background: #3a5068; }
.mode-btn .mode-ico .ico { width: 30px; height: 30px; }
.mode-btn b { display: block; font: 600 22px/1 var(--f-display); font-style: italic; }
.mode-btn small { display: block; margin-top: 4px; font: 500 12px/1.25 var(--f-cond); letter-spacing: .06em; text-transform: uppercase; opacity: .72; }

.joincode { margin-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid var(--rule); padding-top: 16px; }
.joinrow { display: flex; gap: 8px; }
#code { width: 128px; height: 44px; text-align: center; text-transform: uppercase; border: 1.5px solid var(--ink); border-radius: 2px; background: rgba(255, 255, 255, .45);
  font: 700 22px/1 var(--f-cond); letter-spacing: .35em; padding-left: .35em; color: var(--g700); outline: none; }
#code::placeholder { color: var(--rule); }
#code:focus { border-color: var(--brass); background: #fff; }

/* ------------------------------------------------------------------ room */
.room-sheet { width: min(900px, 100%); padding: 34px 36px 34px; }
.room-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid var(--ink); padding-bottom: 14px; }
.roomcode { display: flex; gap: 6px; margin-top: 8px; }
.roomcode span { width: 46px; height: 56px; display: grid; place-items: center; background: var(--ink); color: var(--paper);
  font: 700 36px/1 var(--f-cond); border-radius: 2px; box-shadow: inset 0 -3px 0 var(--brass); }
.room-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin-top: 22px; }
.pairing { margin-top: 8px; counter-reset: pr; }
.pr { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--rule); animation: row-in .4s var(--ease) both; }
.pr::before { counter-increment: pr; content: counter(pr); font: 600 13px/1 var(--f-cond); color: var(--ink2); width: 14px; }
.pr .ball { width: 22px; height: 22px; }
.pr.empty { color: var(--rule); font: italic 15px var(--f-display); animation: none; }
.pr.empty .ball { background: none; box-shadow: inset 0 0 0 1.5px var(--rule2); }
.pr .nm { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr .you { font: 500 12px var(--f-cond); letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); margin-left: 6px; }
.tag { font: 700 11px/1 var(--f-cond); letter-spacing: .14em; text-transform: uppercase; padding: 4px 6px 3px; border-radius: 2px; background: var(--brass); color: var(--acc-ink); }
@keyframes row-in { from { opacity: 0; transform: translateX(-8px); } }

.invite { margin-top: 26px; }
.invite-body { display: flex; gap: 16px; margin-top: 10px; align-items: flex-start; }
.qr { width: 124px; height: 124px; flex: none; background: #fff; padding: 8px; border: 1px solid var(--rule); border-radius: 2px; }
.qr svg { width: 100%; height: 100%; display: block; }
.invite-link { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
#share { font: 600 15px/1.3 var(--f-cond); letter-spacing: .04em; color: var(--g600); word-break: break-all; text-decoration: none; border-bottom: 1px dashed var(--g300); }

.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.mode-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; text-align: left; padding: 14px 14px 14px; border: 1.5px solid var(--rule); border-radius: 2px; background: rgba(255, 255, 255, .3); transition: border-color .15s, background .15s; }
.mode-card .mode-ico .ico { width: 28px; height: 28px; color: var(--g600); }
.mode-card.mini .mode-ico .ico { color: var(--slate); }
.mode-card b { display: block; margin-top: 10px; font: 600 21px/1 var(--f-display); font-style: italic; }
.mode-card small { display: block; margin-top: 6px; font-size: 13px; line-height: 1.35; color: var(--ink2); }
.mode-card:hover { border-color: var(--ink2); }
.mode-card.on { border-color: var(--g700); background: #fff; box-shadow: inset 0 0 0 1.5px var(--g700); }
.mode-card.mini.on { border-color: var(--slate); box-shadow: inset 0 0 0 1.5px var(--slate); }
.mode-card.on::after { content: ''; position: absolute; top: 10px; right: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--brass); }
.mode-card.mini.on::after { background: #ff7a59; }
.holes { display: flex; margin-top: 8px; border: 1.5px solid var(--ink); border-radius: 2px; }
.holes button { flex: 1; min-height: 46px; font: 700 20px/1 var(--f-cond); border-left: 1px solid var(--rule); transition: background .15s; }
.holes button:first-child { border-left: 0; }
.holes button:hover { background: rgba(0, 0, 0, .04); }
.holes button.on { background: var(--ink); color: var(--paper); }
.locked button { pointer-events: none; }
.locked .mode-card:not(.on) { opacity: .5; }
.waiting { display: flex; align-items: center; gap: 10px; margin: 20px 0 0; font: 500 italic 17px var(--f-display); color: var(--ink2); }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--g500); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; transform: scale(.7); } }

/* ------------------------------------------------------------------ HUD shell */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 4; color: var(--hud-ink); font-family: var(--f-cond); }
#hud button, #hud .board { pointer-events: auto; }
.slab { background: var(--slab); }

/* hole plate */
.hud-tl { position: absolute; top: calc(var(--gut) + var(--sa-t)); left: calc(var(--gut) + var(--sa-l)); display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.plate-row { display: flex; gap: 4px; align-items: stretch; }
.plate { display: flex; align-items: stretch; min-height: 66px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35)); }
.plate-num { width: 66px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--acc); color: var(--acc-ink);
  border-radius: var(--rad) 0 0 var(--rad); }
.plate-num span { font: 700 11px/1 var(--f-cond); letter-spacing: .2em; text-transform: uppercase; opacity: .78; }
.plate-num b { font: 700 40px/.95 var(--f-cond); font-variant-numeric: tabular-nums; }
.plate-body { background: var(--slab); padding: 9px 18px 8px 14px; min-width: 190px; border-radius: 0 var(--rad) var(--rad) 0;
  clip-path: polygon(0 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%); }
.plate-name { font: 500 italic 19px/1.15 var(--f-display); white-space: nowrap; letter-spacing: 0; }
.plate-stats { display: flex; gap: 14px; margin-top: 6px; }
.plate-stats span { display: inline-flex; align-items: baseline; gap: 5px; }
.plate-stats i, .strip i, .pw-read i, .c-read i { font-style: normal; font-weight: 600; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--hud-mute); }
.plate-stats b { font: 700 20px/1 var(--f-cond); font-variant-numeric: tabular-nums; }
.plate.in { animation: plate-in .6s var(--ease) both; }
@keyframes plate-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* wind compass */
.compass { width: 66px; background: var(--slab); border-radius: var(--rad); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px 0 5px;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35)); }
.compass svg { width: 44px; height: 44px; display: block; }
.c-ring { fill: none; stroke: var(--slab-line); stroke-width: 2; }
.c-ticks line { stroke: var(--hud-mute); stroke-width: 1.5; }
.c-ticks line.n { stroke: var(--acc); stroke-width: 3; }
.c-arrow { fill: var(--hud-ink); }
#wind-arrow { transform-origin: 32px 32px; transition: transform .25s var(--ease); }
.c-read { display: flex; align-items: baseline; gap: 2px; margin-top: -1px; }
.c-read b { font: 700 16px/1 var(--f-cond); font-variant-numeric: tabular-nums; }
.c-read i { font-size: 9px; letter-spacing: .1em; }

/* lie strip */
.strip { display: flex; align-items: stretch; background: var(--slab2); border-radius: var(--rad); filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .3)); overflow: hidden; }
.strip > span { display: flex; align-items: baseline; gap: 6px; padding: 7px 12px 6px; border-left: 1px solid var(--slab-line); white-space: nowrap; }
.strip > span:first-child { border-left: 0; }
.strip b { font: 700 18px/1 var(--f-cond); font-variant-numeric: tabular-nums; }
.strip .lie-tag { font: 700 13px/1 var(--f-cond); letter-spacing: .14em; text-transform: uppercase; padding: 8px 12px 7px; align-self: stretch; display: flex; align-items: center; }
.lie-tee, .lie-fairway { color: #9fdcab; } .lie-green, .lie-fringe { color: #c9f2a8; } .lie-rough { color: #d9cf8a; }
.lie-sand { color: #f2d394; } .lie-water { color: #8fd0ff; } .lie-ob { color: #ff9c8f; }
.strip .done { color: var(--acc); font: 700 14px/1 var(--f-cond); letter-spacing: .14em; text-transform: uppercase; }
.topar-neg { color: #ff8f80 !important; }

/* leaderboard */
.board { position: absolute; top: calc(var(--gut) + var(--sa-t)); right: calc(var(--gut) + var(--sa-r)); width: 250px;
  background: var(--slab); border-radius: var(--rad); overflow: hidden; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35)); }
.board-h { display: grid; grid-template-columns: 1fr 34px 42px; align-items: center; padding: 6px 0 5px 10px; background: var(--acc); color: var(--acc-ink);
  font: 700 11px/1 var(--f-cond); letter-spacing: .18em; text-transform: uppercase; }
.board-h span:not(:first-child) { text-align: center; letter-spacing: .08em; }
.br { position: relative; display: grid; grid-template-columns: 26px 14px 1fr 34px 42px; align-items: center; gap: 0; height: 30px; padding-left: 4px;
  border-top: 1px solid var(--slab-line); transition: background .3s; }
.br .pos { font: 600 14px/1 var(--f-cond); text-align: center; color: var(--hud-mute); font-variant-numeric: tabular-nums; }
.br .dot { width: 10px; height: 10px; }
.br .nm { padding-left: 8px; font: 600 15px/1 var(--f-cond); letter-spacing: .05em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br .hl { text-align: center; font: 600 15px/1 var(--f-cond); font-variant-numeric: tabular-nums; color: var(--hud-mute); display: flex; justify-content: center; align-items: center; }
.br .hl.fin { color: var(--hud-ink); }
.br .hl .ico { width: 12px; height: 12px; color: var(--acc); margin-left: 1px; }
.br .tp { height: 100%; display: grid; place-items: center; font: 700 17px/1 var(--f-cond); font-variant-numeric: tabular-nums; background: var(--ivory); color: var(--ink); }
.br .tp.neg { color: var(--tvred); }
.br.me { background: rgba(255, 255, 255, .07); }
.br.me::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--acc); }
.br.off { opacity: .45; }
.board-h { cursor: pointer; }
.board.min .br:not(.me) { display: none !important; }
.br.flash { animation: flash 1.2s ease-out; }
@keyframes flash { from { background: color-mix(in srgb, var(--acc) 45%, transparent); } }

/* bottom-centre: hint / power / clubs */
.hud-bc { position: absolute; z-index: 1; left: 50%; bottom: calc(var(--gut) + var(--sa-b)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hint { font: 500 14px/1.2 var(--f-cond); letter-spacing: .06em; color: rgba(244, 238, 220, .9); text-shadow: 0 1px 2px rgba(0, 0, 0, .8), 0 0 12px rgba(0, 0, 0, .4);
  white-space: nowrap; display: flex; gap: 14px; align-items: center; transition: opacity .3s; }
.hint span { display: inline-flex; gap: 5px; align-items: center; }
.hint kbd { opacity: .85; background: rgba(0, 0, 0, .35); border-color: rgba(244, 238, 220, .5); }
.hint:empty { opacity: 0; }

.clubs { display: flex; background: var(--slab); border-radius: var(--rad); overflow: hidden; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35)); }
.clubs button { position: relative; width: 54px; height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border-left: 1px solid var(--slab-line); color: var(--hud-ink); transition: background .15s, color .15s; }
.clubs button:first-child { border-left: 0; }
.clubs button b { font: 700 20px/1 var(--f-cond); }
.clubs button small { font: 600 12px/1 var(--f-cond); color: var(--hud-mute); font-variant-numeric: tabular-nums; }
.clubs button:hover { background: rgba(255, 255, 255, .08); }
.clubs button.on { background: var(--acc); color: var(--acc-ink); }
.clubs button.on small { color: var(--acc-ink); opacity: .75; }
.clubs button.on::after { content: ''; position: absolute; top: -1px; left: 50%; width: 10px; height: 5px; transform: translateX(-50%); background: var(--hud-ink); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.clubs .club-nm { display: none; }

.power { position: absolute; bottom: calc(100% + 10px); left: 50%; margin-left: 56px; width: 300px; background: var(--slab); border-radius: var(--rad); padding: 8px 12px 10px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35)); animation: rise .18s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.pw-read { display: flex; justify-content: space-between; align-items: baseline; }
.pw-read span { display: inline-flex; align-items: baseline; gap: 6px; }
.pw-read b { font: 700 30px/1 var(--f-cond); font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }
.pw-read em { font: 600 13px var(--f-cond); font-style: normal; color: var(--hud-mute); text-transform: uppercase; letter-spacing: .1em; }
.pw-gauge { position: relative; height: 12px; margin-top: 7px; background: rgba(255, 255, 255, .08); overflow: hidden; border-radius: calc(var(--rad) / 2); }
#power-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--hud-ink) 0%, var(--acc) 70%, var(--tvred) 100%) 0 0 / 276px 100%; }
.pw-ticks { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(8, 22, 16, .85) calc(10% - 1px) 10%); }
.power.max .pw-read b:first-of-type { color: var(--acc); }

/* actions */
.actions { position: absolute; left: calc(var(--gut) + var(--sa-l)); bottom: calc(var(--gut) + var(--sa-b)); display: flex; flex-direction: column; gap: 2px;
  background: var(--slab); border-radius: var(--rad); padding: 4px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35)); }
.actions button { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px 0 8px; border-radius: calc(var(--rad) / 1.5);
  font: 600 14px/1 var(--f-cond); letter-spacing: .1em; text-transform: uppercase; color: var(--hud-ink); transition: background .15s, color .15s; }
.actions button .lbl { flex: 1; text-align: left; }
.actions button kbd { margin-left: 10px; }
.actions button:hover { background: rgba(255, 255, 255, .09); }
.actions button.on { color: var(--acc); }
.actions button.arm { background: var(--tvred); color: #fff; }
.actions .more { display: none; }

#minimap { position: absolute; right: calc(var(--gut) + var(--sa-r)); bottom: calc(var(--gut) + var(--sa-b)); pointer-events: none;
  max-width: 32vw; max-height: min(52vh, calc(100vh - 330px)); background: var(--slab); border-radius: var(--rad); padding: 0; box-shadow: 0 0 0 4px var(--slab), 0 8px 20px rgba(0, 0, 0, .4); }

/* ------------------------------------------------------------------ broadcast moments */
.intro { position: absolute; left: calc(var(--gut) + var(--sa-l) + 150px); bottom: calc(28vh + var(--sa-b)); pointer-events: none; display: none; }
.intro.show { display: block; }
.intro .i-wrap { display: flex; align-items: stretch; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .45)); }
.intro .i-num { background: var(--acc); color: var(--acc-ink); display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 0 20px; border-radius: var(--rad) 0 0 var(--rad); }
.intro .i-num span { font: 700 12px/1 var(--f-cond); letter-spacing: .24em; text-transform: uppercase; }
.intro .i-num b { font: 700 64px/.9 var(--f-cond); }
.intro .i-body { background: var(--slab); padding: 14px 30px 14px 20px; clip-path: polygon(0 0, 100% 0, calc(100% - var(--cut) * 1.6) 100%, 0 100%); border-radius: 0 var(--rad) var(--rad) 0; }
.intro .i-name { font: 500 italic 34px/1.05 var(--f-display); white-space: nowrap; }
.intro .i-stats { display: flex; white-space: nowrap; gap: 18px; margin-top: 8px; font: 600 15px/1 var(--f-cond); letter-spacing: .14em; text-transform: uppercase; color: var(--hud-mute); }
.intro .i-stats b { color: var(--hud-ink); font-size: 20px; letter-spacing: .02em; margin-left: 5px; }
.intro .i-bar { height: 3px; background: var(--acc); transform-origin: left; }
.intro.show .i-num { animation: drop-in .5s var(--ease) both; }
.intro.show .i-body { animation: wipe-in .6s .12s var(--ease) both; }
.intro.show .i-bar { animation: bar 3.6s .2s linear both; }
.intro.out { animation: fade-out .4s ease-in both; }
@keyframes drop-in { from { transform: translateY(-14px); opacity: 0; } }
@keyframes wipe-in { from { clip-path: polygon(0 0, 0 0, 0 100%, 0 100%); } }
@keyframes bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes fade-out { to { opacity: 0; transform: translateY(6px); } }

.callout { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); pointer-events: none; display: flex; flex-direction: column; align-items: center; }
.co { display: flex; flex-direction: column; align-items: center; filter: drop-shadow(0 14px 28px rgba(0, 0, 0, .45)); }
.co .co-word { --bg: var(--g600); background: var(--bg); color: var(--ivory); padding: 6px 30px 2px; font: 700 76px/1 var(--f-cond); letter-spacing: .04em; text-transform: uppercase;
  clip-path: polygon(var(--cut) 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%); border-radius: var(--rad); white-space: nowrap; }
.co .co-sub { margin-top: -1px; background: var(--slab); padding: 7px 18px 6px; font: 600 15px/1 var(--f-cond); letter-spacing: .18em; text-transform: uppercase; color: var(--hud-ink);
  border-radius: 0 0 var(--rad) var(--rad); white-space: nowrap; }
.co .co-sub b { color: var(--acc); font-size: 17px; letter-spacing: .04em; }
.co.t-eagle .co-word, .co.t-ace .co-word { --bg: var(--brass); color: var(--acc-ink); }
.co.t-ace .co-word { font-size: 88px; }
.co.t-birdie .co-word { --bg: var(--tvred); }
.co.t-par .co-word { --bg: var(--g600); }
.co.t-bogey .co-word { --bg: var(--slate); }
.co.t-worse .co-word { --bg: #26303b; color: #c9d2dc; }
.co.t-pen .co-word { --bg: #a8501b; font-size: 46px; padding: 8px 22px 4px; }
.co.t-info .co-word { --bg: var(--slab2); font-size: 40px; padding: 8px 22px 4px; }
.callout.landing { top: 40%; }
.co.t-landing { animation: landing-pop .3s var(--ease) both; }
.co.t-landing .co-word { font-size: 32px; padding: 8px 22px 5px; animation: none; }
.co.t-landing .co-sub { font-size: 12px; padding: 6px 14px; animation: none; }
.co.t-landing.lie-rough .co-word, .co.t-landing.lie-hazard .co-word { --bg: #596333; }
.co.t-landing.lie-waste .co-word, .co.t-landing.lie-sand .co-word { --bg: #8a6533; }
.co.t-landing.out { animation: co-out .35s ease-in both; }
@keyframes landing-pop { from { opacity: 0; transform: translateY(8px) scale(.85); } to { opacity: 1; transform: translateY(0) scale(1); } }
.co { animation: co-in .55s var(--ease) both; }
.co .co-word { animation: co-word .55s var(--ease) both; }
.co .co-sub { animation: co-sub .5s .2s var(--ease) both; }
.co.out { animation: co-out .45s ease-in both; }
@keyframes co-in { from { opacity: 0; } }
@keyframes co-word { from { clip-path: polygon(var(--cut) 0, var(--cut) 0, 0 100%, 0 100%); transform: translateX(-20px); } }
@keyframes co-sub { from { opacity: 0; transform: translateY(-8px); } }
@keyframes co-out { to { opacity: 0; transform: translateY(-10px) scale(.98); } }

/* toasts: ticker plates, top-centre */
#toasts { position: fixed; top: calc(var(--gut) + var(--sa-t)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 4px; align-items: center;
  pointer-events: none; z-index: 20; width: max-content; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: stretch; background: var(--slab); color: var(--hud-ink); border-radius: var(--rad); overflow: hidden; max-width: 100%;
  font: 600 15px/1.2 var(--f-cond); letter-spacing: .06em; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35)); animation: t-in .35s var(--ease) both; }
.toast .t-k { flex: none; display: flex; align-items: center; gap: 7px; padding: 7px 10px 6px; background: var(--acc); color: var(--acc-ink); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 13px; }
.toast .t-k .dot { width: 10px; height: 10px; }
.toast .t-v { padding: 7px 12px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast .t-v b { color: var(--acc); }
.toast.score .t-k { background: var(--ivory); color: var(--ink); }
.toast.t-birdie .t-v b, .toast.t-eagle .t-v b, .toast.t-ace .t-v b { color: #ff8f80; }
.toast.out { animation: t-out .3s ease-in both; }
body:not(.in-game) #toasts .toast { background: var(--ink); }
@keyframes t-in { from { opacity: 0; transform: translateY(-10px); } }
@keyframes t-out { to { opacity: 0; transform: translateY(-6px); } }

/* connection */
#conn { position: fixed; top: calc(var(--gut) + var(--sa-t)); left: 50%; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 9px;
  background: var(--tvred); color: #fff; padding: 8px 14px 7px; border-radius: 2px; font: 700 13px/1 var(--f-cond); letter-spacing: .18em; text-transform: uppercase;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .35); }
#conn::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1s ease-in-out infinite; }

/* ------------------------------------------------------------------ overlay: scorecard / between / results */
#overlay { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; grid-template-columns: minmax(0, 1fr); overflow: auto;
  padding: calc(16px + var(--sa-t)) calc(16px + var(--sa-r)) calc(16px + var(--sa-b)) calc(16px + var(--sa-l));
  background: radial-gradient(ellipse at center, rgba(5, 15, 10, .45), rgba(5, 15, 10, .78)); animation: fade .25s ease both; }
@keyframes fade { from { opacity: 0; } }
.card-sheet { width: min(980px, 100%); min-width: 0; padding: 28px 30px 26px; animation: card-in .45s var(--ease) both; }
@keyframes card-in { from { opacity: 0; transform: translateY(18px) rotate(-.4deg); } }
.ov-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: 10px; }
.ov-head h2 { font-size: 30px; font-weight: 600; }
.ov-head h2 em { font-weight: 400; color: var(--g500); }
.ov-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 20px; }
.ov-actions .btn { min-width: 150px; }
.ov-actions .btn.ink, .ov-actions .btn.ghost { min-width: 0; }
.ov-actions:empty { display: none; }

.scard { margin-top: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1.5px solid var(--ink); }
.scard table { border-collapse: collapse; width: 100%; table-layout: fixed; font-family: var(--f-cond); font-variant-numeric: tabular-nums; }
.scard th, .scard td { border: 1px solid var(--rule); text-align: center; padding: 0; height: 40px; }
.scard thead th { background: var(--g700); color: var(--ivory); font: 700 14px/1 var(--f-cond); letter-spacing: .06em; height: 30px; border-color: rgba(255, 255, 255, .14); }
.scard thead th.nm { text-align: left; padding-left: 12px; letter-spacing: .2em; font-size: 11px; text-transform: uppercase; }
.scard tr.par td { background: var(--paper2); font: 600 15px var(--f-cond); color: var(--ink2); height: 30px; }
.scard tr.par td.nm { font: 600 11px var(--f-cond); letter-spacing: .2em; text-transform: uppercase; }
.scard td.nm, .scard th.nm { position: sticky; left: 0; z-index: 1; text-align: left; padding: 0 14px 0 12px; width: 190px; background: var(--paper); border-right: 1.5px solid var(--ink); }
.scard thead th.nm { background: var(--g700); }
.scard tr.par td.nm { background: var(--paper2); }
.scard td.nm .pl { display: flex; align-items: center; gap: 8px; font: 600 15px/1 var(--f-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scard td.nm .pl span { overflow: hidden; text-overflow: ellipsis; }
.scard .sub, .scard th.sub { background: rgba(0, 0, 0, .035); border-left: 1.5px solid var(--ink); }
.scard thead th.sub { background: var(--g800); }
.scard tr.par td.sub { background: #e3d7b7; }
.scard td.tot { font: 700 18px var(--f-cond); }
.scard td.tp { font: 700 18px var(--f-cond); }
.scard td.tp.neg { color: var(--red); }
.scard td.cur { background: rgba(250, 222, 110, .35); }
.scard td.cur .mk.eagle, .scard td.cur .mk.dbl { --gap: #f4e5a9; }
.scard thead th.cur { background: var(--brass); color: var(--acc-ink); }
.scard tr.me td.nm .pl::after { content: 'you'; font: 600 10px var(--f-cond); letter-spacing: .14em; text-transform: uppercase; color: var(--ink2); }
.mk { --r: 0deg; display: inline-grid; place-items: center; width: 30px; height: 30px; font: 600 25px/1 var(--f-hand); color: var(--graphite); transform: rotate(var(--r)); }
.mk.live { color: var(--ink2); opacity: .6; font-size: 21px; }
.mk.bird { border: 1.6px solid var(--red); border-radius: 50%; color: var(--red); }
.mk.eagle { border: 1.6px solid var(--red); border-radius: 50%; color: var(--red); box-shadow: 0 0 0 2.5px var(--gap, var(--paper)), 0 0 0 4px var(--red); }
.mk.bog { border: 1.5px solid var(--slate); width: 27px; height: 27px; }
.mk.dbl { border: 1.5px solid var(--slate); width: 27px; height: 27px; box-shadow: 0 0 0 2.5px var(--gap, var(--paper)), 0 0 0 4px var(--slate); }
.mk.dash { color: var(--rule); font-family: var(--f-cond); font-size: 16px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font: 500 12px var(--f-cond); letter-spacing: .12em; text-transform: uppercase; color: var(--ink2); align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .mk { width: 18px; height: 18px; font-size: 0; }
.legend .mk.bog, .legend .mk.dbl { width: 16px; height: 16px; }
.legend .mk.eagle { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--red); }
.legend .mk.dbl { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--slate); }

.between-foot { display: flex; align-items: center; gap: 16px; margin-top: 18px; }
.countdown { flex: 1; display: flex; align-items: center; gap: 14px; }
.cd-n { font: 700 40px/1 var(--f-cond); font-variant-numeric: tabular-nums; color: var(--g700); min-width: 2ch; text-align: right; }
.cd-l { font: 600 12px/1.3 var(--f-cond); letter-spacing: .16em; text-transform: uppercase; color: var(--ink2); }
.cd-bar { flex: 1; height: 3px; background: var(--rule2); position: relative; overflow: hidden; }
.cd-bar i { position: absolute; inset: 0; background: var(--g600); transform-origin: left; }
.next-up { font: 500 italic 17px var(--f-display); color: var(--ink); }

/* podium */
.champ { text-align: center; margin: 22px 0 6px; }
.champ .eyebrow { color: var(--brass); }
.champ h3 { font: 600 italic 44px/1.05 var(--f-display); margin: 8px 0 0; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 190px)); justify-content: center; align-items: end; gap: 10px; margin: 18px 0 4px; }
.step { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.step .ball { width: 36px; height: 36px; margin-bottom: 8px; animation: bounce-in .7s var(--ease-back) both; }
.step .who { font: 600 16px/1.2 var(--f-body); text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 4px; }
.step .sc { font: 600 13px var(--f-cond); letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); margin-top: 2px; }
.step .sc b { font-size: 17px; color: var(--ink); letter-spacing: .02em; }
.step .sc b.neg { color: var(--red); }
.step .blk { width: 100%; margin-top: 10px; background: var(--g700); color: var(--ivory); display: grid; place-items: start center; padding-top: 10px;
  font: 600 italic 30px/1 var(--f-display); border-radius: 2px 2px 0 0; box-shadow: inset 0 3px 0 var(--brass); animation: grow .7s var(--ease) both; transform-origin: bottom; }
.step .blk sup { font-size: 14px; margin-left: 1px; }
.step.p1 { order: 2; } .step.p1 .blk { height: 112px; background: var(--g600); } .step.p1 .ball { width: 44px; height: 44px; animation-delay: .5s; }
.step.p2 { order: 1; } .step.p2 .blk { height: 80px; } .step.p2 .ball { animation-delay: .35s; }
.step.p3 { order: 3; } .step.p3 .blk { height: 58px; } .step.p3 .ball { animation-delay: .2s; }
.podium-base { height: 4px; background: var(--ink); max-width: 590px; margin: 0 auto; }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes bounce-in { from { opacity: 0; transform: translateY(-40px); } }
.waitnote { font: 500 italic 16px var(--f-display); color: var(--ink2); margin: 16px 0 0; text-align: right; }

/* ------------------------------------------------------------------ mini register: same family, a touch playful */
body.mode-mini .plate-num b, body.mode-mini .intro .i-num b { font-family: var(--f-display); font-style: italic; font-weight: 600; }
body.mode-mini .co { transform: rotate(-3deg); }
body.mode-mini .co .co-word { clip-path: none; border-radius: 14px; }
body.mode-mini .co .co-sub { border-radius: 0 0 10px 10px; }
body.mode-mini .co .co-word { animation: co-pop .55s var(--ease-back) both; }
body.mode-mini .co.t-birdie .co-word { --bg: #ff5b7f; } body.mode-mini .co.t-par .co-word { --bg: #1f8a8a; } body.mode-mini .co.t-bogey .co-word { --bg: #43597a; }
@keyframes co-pop { from { transform: scale(.4); opacity: 0; } }
body.mode-mini .plate-body, body.mode-mini .intro .i-body { clip-path: none; }
body.mode-mini .clubs button.on::after { display: none; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 820px) {
  .lobby-sheet { grid-template-columns: 1fr; }
  .lobby-player { border-right: 0; border-bottom: 1px solid var(--rule); padding: 30px 24px 26px; }
  .lobby-sheet-right { padding: 24px 24px 28px; }
  .room-grid { grid-template-columns: 1fr; gap: 26px; }
  .room-sheet, .card-sheet { padding: 24px 22px 22px; }
}
@media (max-width: 520px) {
  .screen { padding: calc(10px + var(--sa-t)) calc(10px + var(--sa-r)) calc(10px + var(--sa-b)) calc(10px + var(--sa-l)); place-items: start center; }
  .lobby-player { padding: 26px 20px 22px; }
  .crest { width: 84px; height: 84px; }
  .wordmark { font-size: 36px; margin-top: 12px; }
  .lobby-sheet-right { padding: 20px 20px 24px; }
  .newround { grid-template-columns: 1fr; }
  .teesheet { min-height: 0; }
  .balls { gap: 5px; }
  .joincode { flex-direction: column; align-items: stretch; }
  .joinrow #code { flex: 1; }
  .roomcode span { width: 40px; height: 50px; font-size: 30px; }
  .mode-card small { display: none; }
  .mode-card b { margin-top: 6px; }
  .qr { width: 108px; height: 108px; }
  .ov-head h2 { font-size: 24px; }
  .card-sheet { padding: 20px 16px 18px; }
  .champ h3 { font-size: 32px; }
  .scard td.nm, .scard th.nm { width: 120px; padding: 0 8px; }
  .scard td.nm .pl { font-size: 14px; gap: 6px; }
  .scard tr.me td.nm .pl::after { display: none; }
  .step .blk { font-size: 24px; }
  .ov-actions .btn { flex: 1; min-width: 0; }
}

/* HUD: compact (phones, small windows) */
@media (max-width: 760px), (max-height: 520px) {
  :root { --gut: 10px; }
  .plate { min-height: 54px; }
  .plate-num { width: 52px; }
  .plate-num b { font-size: 31px; }
  .plate-num span { font-size: 9px; }
  .plate-body { min-width: 0; padding: 7px 14px 6px 10px; }
  .plate-name { font-size: 15px; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
  .plate-stats { gap: 10px; margin-top: 4px; }
  .plate-stats b { font-size: 16px; }
  .compass { width: 54px; }
  .compass svg { width: 34px; height: 34px; }
  .strip > span { padding: 5px 9px 4px; }
  .strip b { font-size: 15px; }
  .strip .lie-tag { font-size: 11px; padding: 5px 9px; }
  .strip i { font-size: 9px; }
  .board { width: 196px; }
  .br { height: 26px; grid-template-columns: 22px 12px 1fr 28px 36px; }
  .br .nm { font-size: 13px; padding-left: 6px; }
  .br .tp { font-size: 15px; }
  .board-h { grid-template-columns: 1fr 28px 36px; font-size: 10px; }
  .clubs button { width: 44px; height: 46px; }
  .clubs button b { font-size: 17px; }
  .clubs button small { font-size: 11px; }
  .hint { font-size: 13px; }
  .hint .k-desk { display: none; }
  .actions button { min-width: 44px; min-height: 44px; justify-content: center; padding: 0; }
  .actions button .lbl, .actions button kbd { display: none; }
  .actions .more { display: flex; }
  .actions [data-sec] { display: none; }
  .actions.open [data-sec] { display: flex; }
  .actions.open .more { color: var(--acc); }
  .intro { left: 50%; transform: translateX(-50%); bottom: auto; top: 34%; }
  .intro .i-num b { font-size: 44px; }
  .intro .i-name { font-size: 24px; }
  .intro .i-stats { font-size: 12px; gap: 12px; }
  .intro .i-stats b { font-size: 16px; }
  .co .co-word { font-size: 54px; padding: 4px 22px 1px; }
  .co.t-ace .co-word { font-size: 60px; }
  .co.t-pen .co-word, .co.t-info .co-word { font-size: 32px; }
  .co .co-sub { font-size: 13px; }
  .power { padding: 6px 10px 8px; }
  .pw-read b { font-size: 24px; }
  #minimap { max-width: 30vw; max-height: 26vh; }
}
/* portrait phone: stack clubs above the bottom edge, keep the corners for actions/map */
@media (max-width: 520px) {
  .hud-bc { width: calc(100vw - 2 * var(--gut)); }
  .clubs { width: 100%; }
  .clubs button { flex: 1; width: auto; }
  .actions { bottom: calc(var(--gut) + var(--sa-b) + 60px); }
  #minimap { bottom: calc(var(--gut) + var(--sa-b) + 64px); max-width: 34vw; max-height: 22vh; }
  .board { top: calc(var(--gut) + var(--sa-t) + 112px); width: 178px; }
  .board .br:nth-child(n+6):not(.me) { display: none; }
  .br { height: 24px; grid-template-columns: 22px 12px 1fr 26px 32px; }
  .hud-tl { right: calc(var(--gut) + var(--sa-r)); }
  .plate-row { width: 100%; }
  .plate { flex: 1; }
  .plate-body { flex: 1; }
  .plate-name { max-width: 58vw; }
  .power { left: 0; margin-left: 0; width: 100%; }
  #power-fill { background-size: calc(100vw - 2 * var(--gut) - 20px) 100%; }
  .intro .i-body { padding: 10px 18px 10px 14px; }
  .intro .i-name { font-size: 21px; }
  .intro .i-num { padding: 0 14px; }
  #toasts { top: auto; bottom: calc(var(--sa-b) + 196px); }
  .callout { top: 38%; }
  .intro { top: 40%; }
}
/* landscape phone: everything shallower */
@media (max-height: 520px) {
  .board .br:nth-child(n+6) { display: none; }
  .actions { bottom: auto; top: calc(var(--gut) + var(--sa-t) + 104px); }
  .callout { top: 24%; }
  .intro { top: 38%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
  .intro.show .i-bar { animation: none; }
}
.intro .i-num .i-of { margin-top: 4px; font-size: 10px; opacity: .75; }

/* short landscape phones: compress the clubhouse sheets */
@media (max-height: 520px) and (min-width: 521px) {
  .screen { place-items: start center; padding-top: calc(10px + var(--sa-t)); padding-bottom: calc(10px + var(--sa-b)); }
  .lobby-player { padding: 22px 26px; }
  .lobby-sheet-right { padding: 22px 26px; }
  .crest { width: 64px; height: 64px; }
  .wordmark { font-size: 34px; margin-top: 8px; }
  .tagline { display: none; }
  .signin { margin-top: 14px; }
  .sig { font-size: 30px; }
  .teesheet { min-height: 0; max-height: 150px; }
  .mode-btn { min-height: 56px; padding: 10px 12px; }
  .mode-btn small { display: none; }
  .joincode { margin-top: 14px; padding-top: 12px; }
  .room-sheet, .card-sheet { padding: 18px 22px; }
  .roomcode span { width: 38px; height: 46px; font-size: 28px; }
  .room-grid { gap: 24px; margin-top: 14px; }
  .mode-card small { display: none; }
  .btn.big { min-height: 48px; margin-top: 12px; }
  .champ { margin-top: 12px; }
  .champ h3 { font-size: 30px; }
  .step.p1 .blk { height: 78px; } .step.p2 .blk { height: 58px; } .step.p3 .blk { height: 44px; }
}

/* integration round: plays-like, mini theme, spectator plate, lava */
.strip .plays { font: 600 12px/1 var(--f-cond); font-style: normal; letter-spacing: .08em; text-transform: uppercase; margin-left: 2px; }
.strip .plays.up { color: #ffb59e; } .strip .plays.down { color: #9fd3ff; }
.strip .plays:empty { display: none; }
.p-theme { font: 700 10px/1 var(--f-cond); letter-spacing: .18em; text-transform: uppercase; color: var(--acc); align-self: center; }
.p-theme:empty { display: none; }
.intro .i-theme { font: 700 11px/1 var(--f-cond); letter-spacing: .24em; text-transform: uppercase; color: var(--acc); margin-bottom: 6px; }
.intro .i-blurb { margin-top: 9px; max-width: 34ch; font: 500 italic 15px/1.3 var(--f-display); color: var(--hud-mute); white-space: normal; }
.watch { display: flex; align-items: stretch; background: var(--slab); color: var(--hud-ink); border-radius: var(--rad); overflow: hidden; min-height: 40px;
  font: 600 15px/1 var(--f-cond); letter-spacing: .06em; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35)); animation: rise .25s var(--ease) both; }
.watch .w-k { display: flex; align-items: center; padding: 0 10px; background: var(--acc); color: var(--acc-ink); font-weight: 700; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; }
.watch .w-v { display: flex; align-items: center; gap: 8px; padding: 0 14px; text-transform: uppercase; font-size: 17px; }
.watch .w-n { display: flex; align-items: center; gap: 6px; padding: 0 10px; border-left: 1px solid var(--slab-line); color: var(--hud-mute); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.watch.flash .w-v { animation: flash 1s ease-out; }
.co.t-lava .co-word { --bg: #d4421a; background: linear-gradient(180deg, #ff7a2a, #c2300f); }
@media (max-width: 760px), (max-height: 520px) {
  .intro .i-blurb { font-size: 13px; max-width: 28ch; }
  .watch .w-v { font-size: 15px; }
}

/* ================================================================== round 3: controls v3, coach, loading, states */

/* ---- focus / press states across the HUD (keyboard users get the accent ring, pointer users don't) */
#hud button:focus-visible, .coach button:focus-visible, .helpcard button:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.clubs button:active { transform: translateY(1px); }
.actions button:active { background: rgba(255, 255, 255, .14); }
.watch { cursor: pointer; transition: background .15s; }
.watch:hover { background: var(--slab2); }
.mode-card:active, .holes button:active, .ball:active { transform: translateY(1px); }
.mode-card:focus-visible, .mode-btn:focus-visible { outline-offset: 3px; }
.tee { transition: background .15s; }
.tee:hover { background: rgba(255, 255, 255, .35); }

/* ---- HUD entrance: furniture slides in from its own edge whenever the HUD appears */
#hud:not(.hidden) .hud-tl { animation: in-l .5s var(--ease) both; }
#hud:not(.hidden) .board { animation: in-r .5s .06s var(--ease) both; }
#hud:not(.hidden) .actions { animation: in-l .5s .1s var(--ease) both; }
#hud:not(.hidden) #minimap { animation: in-r .5s .12s var(--ease) both; }
#hud:not(.hidden) .clubs { animation: rise .45s .14s var(--ease) both; }
@keyframes in-l { from { opacity: 0; transform: translateX(-14px); } }
@keyframes in-r { from { opacity: 0; transform: translateX(14px); } }
#overlay .card-sheet { transform-origin: 50% 60%; }

/* ---- hint line */
.hint .ico { width: 16px; height: 16px; margin-right: 1px; opacity: .9; }
.hint span + span::before { content: ''; width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .45; margin-right: 9px; }
.hint .h-warn { color: #ffcf9e; }
.hint { gap: 9px; }

/* ---- power gauge: cancel zone */
.power.cancel .pw-gauge { outline: 1px dashed rgba(255, 207, 158, .7); outline-offset: 2px; }
.power.cancel .pw-read b { color: var(--hud-mute); }
.power.max #power-fill { animation: pw-max .5s ease-in-out infinite alternate; }
@keyframes pw-max { to { filter: brightness(1.25); } }

/* ---- touch controls: swing pad + camera turn buttons (body.touch = coarse pointer or ?touch) */
.touch-ctl { position: absolute; right: calc(var(--gut) + var(--sa-r)); top: 52%; transform: translateY(-50%); display: none;
  flex-direction: column-reverse; align-items: center; gap: 10px; pointer-events: none; }
body.touch .touch-ctl { display: flex; }
.touch-ctl.gone { opacity: 0; visibility: hidden; transition: opacity .25s, visibility 0s .25s; }
#turn { display: flex; gap: 8px; }
#turn button { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--slab); color: var(--hud-ink);
  border: 1.5px solid var(--slab-line); touch-action: none; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .35)); transition: background .12s, color .12s; }
#turn button:active { background: var(--acc); color: var(--acc-ink); }
#turn .ico { width: 22px; height: 22px; }

.swing { --p: 0; --h: 184px; --knob: 52px; position: relative; width: 104px; height: var(--h); pointer-events: auto; touch-action: none; user-select: none; -webkit-user-select: none;
  background: var(--slab); border: 1.5px solid var(--slab-line); border-radius: 52px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .4));
  transition: border-color .15s, opacity .2s; cursor: grab; }
body.mode-mini .swing { border-radius: 26px; }
.sw-track { position: absolute; left: 50%; top: 12px; bottom: 34px; width: 10px; margin-left: -5px; border-radius: 5px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.sw-fill { position: absolute; left: 0; right: 0; top: 0; height: calc(var(--p) * 100%);
  background: linear-gradient(180deg, var(--hud-ink), var(--acc) 70%, var(--tvred)); background-size: 100% calc(var(--h) - 46px); }
.sw-ticks { position: absolute; inset: 0; background: repeating-linear-gradient(180deg, transparent 0 calc(10% - 1px), rgba(8, 22, 16, .9) calc(10% - 1px) 10%); }
.sw-knob { position: absolute; left: 50%; top: 6px; width: var(--knob); height: var(--knob); margin-left: calc(var(--knob) / -2);
  transform: translateY(calc(var(--p) * (var(--h) - var(--knob) - 40px))); display: grid; place-items: center; }
.sw-ball { width: 100%; height: 100%; border-radius: 50%; border: 2px solid var(--hud-ink); background:
  radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .95) 0 10%, rgba(255, 255, 255, 0) 38%),
  radial-gradient(circle, rgba(0, 0, 0, .14) 0 1px, transparent 1.6px) 0 0 / 7px 7px,
  radial-gradient(circle at 60% 70%, #f6f4ec 0 55%, #b9b6a8 100%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .45); transition: transform .15s var(--ease-back), border-color .15s; }
.sw-cap { position: absolute; left: 0; right: 0; bottom: 9px; display: flex; justify-content: center; align-items: baseline; gap: 4px;
  font: 700 13px/1 var(--f-cond); letter-spacing: .16em; text-transform: uppercase; color: var(--hud-mute); }
.sw-cap b { font: 700 17px/1 var(--f-cond); letter-spacing: .02em; color: var(--hud-ink); font-variant-numeric: tabular-nums; }
.sw-cap b:empty { display: none; }
.swing.st-idle .sw-ball { animation: sw-nudge 2.6s 1.2s var(--ease) infinite; }
@keyframes sw-nudge { 0%, 70%, 100% { transform: none; } 80% { transform: translateY(12px); } 90% { transform: translateY(2px); } }
.swing.st-live, .swing.st-max { border-color: color-mix(in srgb, var(--acc) 70%, transparent); cursor: grabbing; }
.swing.st-live .sw-ball, .swing.st-max .sw-ball { border-color: var(--acc); transform: scale(1.06); }
.swing.st-max .sw-cap b { color: var(--acc); }
.swing.st-cancel { border-color: rgba(255, 207, 158, .6); }
.swing.st-cancel .sw-cap { color: #ffcf9e; }
.swing.st-off { opacity: .45; }
.swing.st-off .sw-ball { animation: none; }

/* ---- coach marks */
.coach { position: absolute; left: 50%; top: calc(var(--gut) + var(--sa-t) + 92px); translate: -50% 0; width: min(430px, calc(100vw - 2 * var(--gut)));
  display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; padding: 14px 16px 12px; pointer-events: auto; z-index: 3;
  background: var(--slab2); color: var(--hud-ink); border-radius: var(--rad); border-top: 3px solid var(--acc);
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, .5)); transition: opacity .2s; }
.coach.show { animation: coach-in .4s var(--ease) both; }
.coach.dim { opacity: .35; pointer-events: none; }
@keyframes coach-in { from { opacity: 0; transform: translateY(10px); } }
.coach::after { content: none; position: absolute; border: 8px solid transparent; }
.cm-ico { grid-row: span 2; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--acc); color: var(--acc-ink); }
.cm-ico .ico { width: 24px; height: 24px; }
.cm-k { display: flex; align-items: baseline; gap: 10px; font: 500 italic 21px/1.1 var(--f-display); }
.cm-k span { font: 700 12px/1 var(--f-cond); font-style: normal; letter-spacing: .1em; color: var(--acc); }
.cm-k span i { font-style: normal; color: var(--hud-mute); }
.cm-body p { margin: 5px 0 0; font: 500 15px/1.35 var(--f-body); color: rgba(244, 238, 220, .86); }
.cm-body kbd { opacity: .9; font-size: 11px; }
.cm-act { grid-column: 2; display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin-top: 8px; }
.cm-act button { min-height: 36px; padding: 0 14px; border-radius: calc(var(--rad) / 1.5); font: 700 13px/1 var(--f-cond); letter-spacing: .14em; text-transform: uppercase; transition: background .15s, color .15s; }
.cm-skip { color: var(--hud-mute); }
.cm-skip:hover { color: var(--hud-ink); }
.cm-next { background: var(--acc); color: var(--acc-ink); }
.cm-next:hover { filter: brightness(1.08); }
/* on touch, the swing tip points at the pad */
body.touch .coach.s-shoot { left: auto; right: calc(var(--gut) + var(--sa-r) + 120px); top: 52%; translate: 0 -50%; width: min(340px, calc(100vw - 2 * var(--gut) - 128px)); }
body.touch .coach.s-shoot.show { animation: fade .3s ease both; }
body.touch .coach.s-shoot::after { content: ''; left: auto; right: -8px; top: 50%; bottom: auto; margin: -8px 0 0; border: 8px solid transparent; border-right: 0; border-left-color: var(--slab2); }

/* ---- help card (sections) */
.helpcard { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 2 * var(--gut) - 24px); overflow: auto;
  background: var(--slab); border-radius: var(--rad); padding: 16px 20px 14px; pointer-events: auto; z-index: 4; filter: drop-shadow(0 12px 30px rgba(0, 0, 0, .5)); animation: fade .2s ease both;
  border-top: 3px solid var(--acc); }
.helpcard h3 { margin: 0 0 6px; font: 500 italic 22px var(--f-display); display: flex; justify-content: space-between; align-items: center; }
.helpcard h3 button { width: 36px; height: 36px; display: grid; place-items: center; color: var(--hud-mute); border-radius: 50%; transition: background .15s, color .15s; }
.helpcard h3 button:hover { background: rgba(255, 255, 255, .08); color: var(--hud-ink); }
.help-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 6px 26px; }
.help-grid section:first-child { grid-row: span 2; }
.helpcard h4 { margin: 10px 0 7px; font: 700 11px/1 var(--f-cond); letter-spacing: .2em; text-transform: uppercase; color: var(--acc); border-bottom: 1px solid var(--slab-line); padding-bottom: 6px; }
.helpcard dl { display: grid; grid-template-columns: auto 1fr; gap: 7px 12px; margin: 0; font: 500 15px/1.25 var(--f-cond); letter-spacing: .03em; }
.helpcard dt { display: flex; gap: 4px; justify-content: flex-end; align-items: center; color: var(--hud-ink); white-space: nowrap; font-weight: 600; }
.helpcard dt kbd { opacity: 1; background: rgba(255, 255, 255, .06); }
.helpcard dt .ico { width: 18px; height: 18px; color: var(--acc); }
.helpcard dd { margin: 0; color: rgba(244, 238, 220, .78); align-self: center; }
.helpcard dd kbd { opacity: .8; }
.help-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--slab-line);
  font: 500 13px var(--f-cond); letter-spacing: .06em; color: var(--hud-mute); }
.hf-btn { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 10px 0 8px; border-radius: calc(var(--rad) / 1.5);
  font: 600 13px/1 var(--f-cond); letter-spacing: .12em; text-transform: uppercase; color: var(--hud-ink); background: rgba(255, 255, 255, .06); transition: background .15s; }
.hf-btn:hover { background: rgba(255, 255, 255, .12); }
.hf-btn .ico { width: 16px; height: 16px; color: var(--acc); }
@media (max-width: 640px) {
  .help-grid { grid-template-columns: 1fr; }
  .help-grid section:first-child { grid-row: auto; }
}

/* ---- loading plate (hole world building) + walking ball */
.loading { position: fixed; left: 50%; bottom: calc(26vh + var(--sa-b)); transform: translateX(-50%); z-index: 30; pointer-events: none; display: none; }
.loading.show { display: block; animation: ld-in .3s var(--ease) both; }
.loading.out { animation: ld-out .3s ease-in both; }
@keyframes ld-in { from { opacity: 0; transform: translate(-50%, 8px); } }
@keyframes ld-out { to { opacity: 0; transform: translate(-50%, 4px); } }
.ld { display: flex; align-items: center; gap: 14px; padding: 12px 22px 12px 16px; background: var(--slab); color: var(--hud-ink); border-radius: var(--rad);
  border-left: 4px solid var(--acc); filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .45)); }
.ld-t { font: 500 italic 22px/1.1 var(--f-display); white-space: nowrap; }
.ld-m { display: flex; gap: 12px; margin-top: 5px; font: 600 12px/1 var(--f-cond); letter-spacing: .16em; text-transform: uppercase; color: var(--hud-mute); white-space: nowrap; }
.walk-ball { position: relative; flex: none; width: 34px; height: 14px; }
.walk-ball::before { content: ''; position: absolute; left: 0; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--ivory);
  box-shadow: inset -2px -2px 3px rgba(0, 0, 0, .25); animation: walk 1.1s cubic-bezier(.45, 0, .55, 1) infinite alternate; }
.walk-ball::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: currentColor; opacity: .3; }
@keyframes walk { to { transform: translateX(24px) rotate(360deg); } }
.between-foot.walk { justify-content: center; gap: 14px; min-height: 40px; color: var(--g700); }
.between-foot.walk .walk-ball::before { background: var(--g700); }
.walk-t { font: 500 italic 20px var(--f-display); }
.btn.busy { pointer-events: none; background: var(--g600); }
.btn.busy .ico { animation: pulse 1.2s ease-in-out infinite; }

/* ---- lobby: empty / error states */
.tee-empty.wait { display: flex; align-items: center; gap: 10px; }
.note { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; padding: 10px 8px 10px 12px; border: 1.5px solid var(--red); border-radius: 2px;
  background: rgba(183, 52, 42, .07); color: var(--ink); }
.note > .ico { color: var(--red); margin-top: 1px; }
.note > div { flex: 1; min-width: 0; }
.note b { display: block; font: 600 15px/1.3 var(--f-body); }
.note small { display: block; margin-top: 2px; font-size: 13px; color: var(--ink2); }
.note button { width: 30px; height: 30px; display: grid; place-items: center; color: var(--ink2); border-radius: 2px; }
.note button:hover { background: rgba(0, 0, 0, .06); color: var(--ink); }
.note button .ico { width: 16px; height: 16px; }
.note.note-in { animation: note-in .35s var(--ease) both; }
@keyframes note-in { from { opacity: 0; transform: translateY(-6px); } }
#code.bad { border-color: var(--red); animation: shake .4s ease both; }
@keyframes shake { 20% { transform: translateX(-5px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }

/* ---- connection lost */
#conn { flex-wrap: wrap; justify-content: center; max-width: calc(100vw - 32px); }
#conn::after { content: 'Shots sync once you are back'; flex-basis: 100%; text-align: center; margin-top: 3px; font: 500 11px/1.2 var(--f-cond); letter-spacing: .1em; opacity: .85; }
body:not(.in-game) #conn::after { content: 'Hang on, finding the clubhouse'; }
body.offline-long #conn::after { content: 'Still trying. Is this device on the same network as the host?'; }
body.offline .newround, body.offline .joinrow, body.offline #start, body.offline .tee .btn { opacity: .45; pointer-events: none; }
body.offline.in-game #hud { filter: saturate(.6); }

/* ---- responsive: touch controls */
@media (max-width: 520px) {
  .touch-ctl { top: 54%; }
  .swing { --h: 168px; width: 92px; }
  .coach { top: calc(var(--gut) + var(--sa-t) + 276px); }
  body.touch .coach { left: calc(var(--gut) + var(--sa-l)); translate: none; width: calc(100vw - 2 * var(--gut) - 106px); grid-template-columns: 1fr; }
  body.touch .coach .cm-ico { display: none; }
  body.touch .coach .cm-act { grid-column: 1; }
  body.touch .coach.s-shoot { right: calc(var(--gut) + var(--sa-r) + 106px); top: 54%; }
  .loading { bottom: calc(30vh + var(--sa-b)); }
  .ld-t { font-size: 19px; }
}
@media (max-height: 520px) {
  .touch-ctl { top: auto; transform: none; bottom: calc(var(--gut) + var(--sa-b) + min(26vh, 120px) + 14px); flex-direction: row; align-items: flex-end; }
  #turn { flex-direction: column; }
  #turn button { width: 44px; height: 44px; }
  .swing { --h: 138px; --knob: 44px; width: 80px; }
  .sw-track { top: 10px; bottom: 30px; }
  .coach { top: calc(var(--gut) + var(--sa-t) + 100px); width: min(400px, 46vw); padding: 10px 12px 8px; }
  .cm-body p { font-size: 13px; }
  body.touch .coach.s-shoot { top: auto; translate: none; bottom: calc(var(--gut) + var(--sa-b) + min(26vh, 120px) + 40px); right: calc(var(--gut) + var(--sa-r) + 150px); }
  body.touch .coach.s-shoot::after { top: auto; bottom: 30px; }
  .helpcard { top: calc(var(--gut) + var(--sa-t)); transform: translateX(-50%); max-height: calc(100vh - 2 * var(--gut)); }
  .loading { bottom: calc(18vh + var(--sa-b)); }
}
.sw-tag { position: absolute; right: calc(100% + 18px); top: 50%; transform: translateY(-50%); display: flex; align-items: baseline; gap: 3px; padding: 6px 9px 5px;
  background: var(--slab); color: var(--hud-ink); border-radius: var(--rad); font: 700 18px/1 var(--f-cond); font-variant-numeric: tabular-nums; white-space: nowrap;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .4)); pointer-events: none; }
.sw-tag i { font: 600 10px/1 var(--f-cond); font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: var(--hud-mute); }
.sw-tag:empty { display: none; }
.intro { z-index: 2; }
@media (max-width: 520px) {
  body.touch .power { display: none; }
  .intro .i-stats { flex-wrap: wrap; row-gap: 6px; white-space: normal; }
  .intro .i-name { white-space: normal; }
}
@media (max-height: 520px) {
  body.touch .power { left: auto; right: calc(50% + 56px); margin-left: 0; width: min(300px, calc(50vw - 56px - 2 * var(--gut) - 48px)); }
  body.touch .sw-tag { display: none; }
}

/* ================================================================== round 4: conditions, advanced, reactions, replays, clubhouse */

/* ---- room: conditions chips + course library (paper register) */
.opts { display: grid; gap: 10px; margin-top: 8px; }
.opt-k { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 5px; font: 600 12px/1 var(--f-cond); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.opt-k small { font: 500 italic 13px/1 var(--f-display); letter-spacing: 0; text-transform: none; color: var(--ink2); }
.chips { display: flex; border: 1.5px solid var(--ink); border-radius: 2px; background: rgba(255, 255, 255, .3); }
.chip { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 48px; padding: 6px 2px 5px;
  border-left: 1px solid var(--rule); color: var(--ink2); transition: background .15s, color .15s; }
.chip:first-child { border-left: 0; }
.chip .ico { width: 19px; height: 19px; }
.chip-l { font: 600 11.5px/1 var(--f-cond); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.chip:hover { background: rgba(0, 0, 0, .04); color: var(--ink); }
.chip:active { transform: translateY(1px); }
.chip.rnd { background-image: repeating-linear-gradient(135deg, transparent 0 5px, rgba(0, 0, 0, .04) 5px 6px); }
.chip.on { background: var(--ink); color: var(--paper); }
.chip.on .ico { color: var(--brass-hi); }
.chips.locked .chip:not(.on) { opacity: .45; }
.chips.fixed .chip.on { background: var(--g600); }
.courses { margin-top: 8px; border-top: 1.5px solid var(--ink); max-height: 280px; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--rule) transparent; }
.crs { display: flex; align-items: center; gap: 12px; padding: 8px 6px 8px 4px; border-bottom: 1px solid var(--rule); cursor: pointer; transition: background .15s; }
.crs:hover { background: rgba(255, 255, 255, .4); }
.crs.on { background: #fff; }
.crs-radio { position: relative; flex: none; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--ink2); }
.crs.on .crs-radio { border-color: var(--g700); }
.crs.on .crs-radio::after { content: ''; position: absolute; inset: 2.5px; border-radius: 50%; background: var(--g700); }
.crs-b { flex: 1; min-width: 0; }
.crs-b b { display: block; font: 600 15px/1.2 var(--f-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crs-nm { font: 500 italic 18px/1.1 var(--f-display); }
.crs-b small { display: block; margin-top: 2px; font: 500 12px/1.3 var(--f-cond); letter-spacing: .08em; text-transform: uppercase; color: var(--ink2); }
.crs-b small em { font-style: normal; font-weight: 700; color: var(--ink); }
.crs-b small em.neg { color: var(--red); }
.courses.locked { pointer-events: auto; }
.courses.locked .crs { cursor: default; }
.courses.locked .crs:not(.on) { opacity: .6; }
.courses.locked .crs-del { pointer-events: auto; }
.crs-del { flex: none; width: 30px; height: 30px; display: grid; place-items: center; color: var(--ink2); border-radius: 2px; transition: background .15s, color .15s; }
.crs-del:hover { color: var(--red); background: rgba(183, 52, 42, .08); }
.crs-del.arm { background: var(--red); color: #fff; }
.crs-del.busy { opacity: .4; pointer-events: none; }
.crs-del .ico { width: 16px; height: 16px; }
#lib-empty { font-style: italic; }

/* ---- lobby: advanced switch + clubhouse buttons */
.switch { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--rule); cursor: pointer; text-align: left; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.tg-t { flex: 1; min-width: 0; }
.tg-t b { display: block; font: 600 15px/1.2 var(--f-body); }
.tg-t small { display: block; margin-top: 1px; font-size: 13px; color: var(--ink2); }
.tg-k, .sp-sw { position: relative; flex: none; width: 40px; height: 22px; border-radius: 11px; background: var(--rule2); box-shadow: inset 0 0 0 1.5px var(--rule); transition: background .2s, box-shadow .2s; }
.tg-k::after, .sp-sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .35); transition: transform .22s var(--ease-back); }
.switch input:checked ~ .tg-k { background: var(--g600); box-shadow: inset 0 -2px 0 var(--brass); }
input:checked ~ .tg-k::after, input:checked ~ .sp-sw::after { transform: translateX(18px); }
.switch input:focus-visible ~ .tg-k, .sp-row input:focus-visible ~ .sp-sw { outline: 2px solid var(--brass); outline-offset: 2px; }
.member { display: flex; gap: 8px; width: 100%; margin-top: 16px; }
.member .btn { flex: 1; }
.member .skinball.mini { width: 20px; height: 20px; }

/* ---- HUD: atmosphere on the plate + intro */
.p-atmos { display: inline-flex; gap: 3px; align-self: center; color: var(--hud-mute); }
.p-atmos:empty { display: none; }
.p-atmos .ico { width: 16px; height: 16px; }
.intro .i-theme { display: flex; align-items: center; gap: 4px; }
.intro .i-theme > span { display: inline-flex; }
.intro .i-theme .ico { width: 15px; height: 15px; }
.intro .i-theme > span:last-of-type { margin-right: 4px; }

/* ---- advanced: strike face + tempo */
.adv { position: absolute; bottom: 0; width: 132px; background: var(--slab); border-radius: var(--rad); padding: 7px 8px 6px; pointer-events: auto;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35)); animation: rise .3s var(--ease) both; transition: opacity .2s; }
.adv.dim { opacity: .6; }
.adv-h { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font: 700 10px/1 var(--f-cond); letter-spacing: .18em; text-transform: uppercase; color: var(--hud-mute); }
.adv-h b { font: 700 12px/1 var(--f-cond); letter-spacing: .05em; color: var(--hud-ink); white-space: nowrap; }
.adv.spun .adv-h b { color: var(--acc); }
.adv-face { position: relative; width: 100%; aspect-ratio: 1; margin-top: 2px; padding: 15px; }
.spin-face { width: 100%; height: 100%; border-radius: 50%; cursor: grab; touch-action: none; pointer-events: auto; }
.spin-face.drag { cursor: grabbing; }
.spin-face:hover svg { filter: drop-shadow(0 0 0 1.5px var(--acc)); }
.spin-face svg { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .4)); }
.adv-face kbd { position: absolute; font-size: 9px; padding: 2px 3px 1px; opacity: .6; color: var(--hud-ink); line-height: 1; }
.k-i { top: 0; left: 50%; transform: translateX(-50%); } .k-k { bottom: 0; left: 50%; transform: translateX(-50%); }
.k-j { left: 0; top: 50%; transform: translateY(-50%); } .k-l { right: 0; top: 50%; transform: translateY(-50%); }
.sf-ring { fill: none; stroke: rgba(0, 0, 0, .16); stroke-width: .8; stroke-dasharray: 2 2; }
.sf-cross { stroke: rgba(0, 0, 0, .16); stroke-width: .8; }
.sf-lab { font: 700 7px var(--f-cond); letter-spacing: .12em; fill: rgba(0, 0, 0, .38); text-anchor: middle; }
.sf-vec { stroke: var(--acc); stroke-width: 2.2; stroke-linecap: round; opacity: .8; }
.sf-dot { fill: var(--acc); stroke: #1b2620; stroke-width: 1.2; }
.sf-dot-o { fill: color-mix(in srgb, var(--acc) 22%, transparent); stroke: var(--acc); stroke-width: 1.2; }
.spin-face.drag .sf-dot-o { stroke-width: 2; }
.tempo { display: flex; align-items: center; gap: 9px; margin-top: 9px; }
.tempo i { font-style: normal; font-weight: 600; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--hud-mute); }
.tp-track { position: relative; flex: 1; height: 8px; background: rgba(255, 255, 255, .09); border-radius: 4px; }
.tp-win { position: absolute; top: -3px; bottom: -3px; background: color-mix(in srgb, var(--acc) 28%, transparent); box-shadow: inset 0 0 0 1px var(--acc); border-radius: 3px; }
.tp-mid { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--acc); opacity: .7; }
.tp-needle { position: absolute; top: -6px; bottom: -6px; width: 3px; margin-left: -1.5px; background: var(--hud-ink); border-radius: 2px; box-shadow: 0 0 6px rgba(0, 0, 0, .7); }
.tempo.good .tp-needle { background: var(--acc); box-shadow: 0 0 10px var(--acc); }
.tempo b { min-width: 30px; font: 700 12px/1 var(--f-cond); letter-spacing: .12em; text-transform: uppercase; color: var(--acc); }

/* ---- settings popover (HUD) */
.setpop { position: fixed; z-index: 6; width: 330px; padding: 10px 14px 12px; background: var(--slab2); color: var(--hud-ink); border-radius: var(--rad); border-top: 3px solid var(--acc);
  pointer-events: auto; filter: drop-shadow(0 12px 28px rgba(0, 0, 0, .5)); animation: in-l .25s var(--ease) both; font-family: var(--f-cond); }
.setpop h4 { margin: 0 0 4px; display: flex; justify-content: space-between; align-items: center; font: 500 italic 20px var(--f-display); }
.setpop h4 button { width: 30px; height: 30px; display: grid; place-items: center; color: var(--hud-mute); border-radius: 50%; }
.setpop h4 button:hover { color: var(--hud-ink); background: rgba(255, 255, 255, .08); }
.sp-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--slab-line); cursor: pointer; }
.sp-row input { position: absolute; opacity: 0; pointer-events: none; }
.sp-t { flex: 1; min-width: 0; }
.sp-t b { display: block; font: 600 16px/1.1 var(--f-cond); letter-spacing: .04em; }
.sp-t small { display: block; margin-top: 3px; font: 500 13px/1.35 var(--f-body); color: rgba(244, 238, 220, .66); }
.sp-t kbd { font-size: 9px; padding: 2px 3px 1px; margin: 0 1px; }
.sp-sw { background: rgba(255, 255, 255, .14); box-shadow: none; }
.sp-row input:checked ~ .sp-sw { background: var(--acc); }
.sp-q { padding: 10px 0 2px; border-top: 1px solid var(--slab-line); }
.sp-seg { display: flex; margin-top: 8px; border: 1px solid var(--slab-line); border-radius: calc(var(--rad) / 1.5); overflow: hidden; }
.sp-seg button { flex: 1; min-height: 30px; font: 700 12px/1 var(--f-cond); letter-spacing: .1em; text-transform: uppercase; color: var(--hud-mute); border-left: 1px solid var(--slab-line); transition: background .15s, color .15s; }
.sp-seg button:first-child { border-left: 0; }
.sp-seg button:hover { color: var(--hud-ink); background: rgba(255, 255, 255, .06); }
.sp-seg button.on { background: var(--acc); color: var(--acc-ink); }

/* ---- reaction wheel */
.wheel { position: fixed; inset: 0; z-index: 15; display: grid; place-items: center; color: var(--hud-ink); font-family: var(--f-cond);
  background: radial-gradient(circle at center, rgba(5, 15, 10, .62) 0, rgba(5, 15, 10, .35) 190px, rgba(5, 15, 10, 0) 330px); animation: fade .15s ease both; }
.wheel.out { animation: fade-out .16s ease-in both; }
.wh-ring { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.wh-it { position: absolute; left: 0; top: 0; width: 66px; height: 66px; margin: -33px 0 0 -33px; transform: translate(var(--x), var(--y)); border-radius: 50%;
  display: grid; place-items: center; background: var(--slab); border: 2px solid var(--slab-line); color: var(--hud-ink);
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .45)); transition: transform .14s var(--ease-back), background .12s, border-color .12s, color .12s; animation: wh-in .24s var(--ease-back) both; }
.wh-it:nth-child(2) { animation-delay: 15ms; } .wh-it:nth-child(3) { animation-delay: 30ms; } .wh-it:nth-child(4) { animation-delay: 45ms; }
.wh-it:nth-child(5) { animation-delay: 60ms; } .wh-it:nth-child(6) { animation-delay: 75ms; } .wh-it:nth-child(7) { animation-delay: 90ms; } .wh-it:nth-child(8) { animation-delay: 105ms; }
@keyframes wh-in { from { transform: translate(0, 0) scale(.3); opacity: 0; } }
.wh-it .ico { width: 30px; height: 30px; }
.wh-it.on { background: var(--acc); color: var(--acc-ink); border-color: var(--hud-ink); transform: translate(var(--x), var(--y)) scale(1.16); }
.wh-it.sent { background: var(--hud-ink); color: var(--ink); }
.wh-it.nope { background: var(--tvred); color: #fff; }
.wh-n { position: absolute; right: -3px; top: -3px; min-width: 19px; height: 19px; border-radius: 10px; background: var(--hud-ink); color: var(--ink); font: 700 11px/19px var(--f-cond); text-align: center; }
.wh-it.on .wh-n { background: var(--ink); color: var(--hud-ink); }
.wh-hub { position: relative; width: 136px; height: 136px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px; text-align: center;
  background: var(--slab2); box-shadow: inset 0 0 0 2px var(--acc), 0 10px 30px rgba(0, 0, 0, .45); pointer-events: none; }
.wh-hub b { font: 500 italic 23px/1.05 var(--f-display); }
.wh-hub small { margin-top: 7px; font: 600 11px/1.35 var(--f-cond); letter-spacing: .1em; text-transform: uppercase; color: var(--hud-mute); }
.wh-hub kbd { font-size: 9px; padding: 1px 3px 0; }

/* ---- replay chrome */
.replay { position: fixed; inset: 0; z-index: 9; pointer-events: none; color: var(--hud-ink); font-family: var(--f-cond); }
.rp-lb { position: absolute; left: 0; right: 0; height: 9vh; background: #050806; }
.rp-top { top: 0; animation: lb-top .55s var(--ease) both; } .rp-bot { bottom: 0; animation: lb-bot .55s var(--ease) both; }
@keyframes lb-top { from { transform: translateY(-100%); } } @keyframes lb-bot { from { transform: translateY(100%); } }
.replay.pip .rp-lb { display: none; }
.replay.carding::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(5, 15, 10, .25), rgba(5, 15, 10, .6)); animation: fade .3s ease both; }
.rp-frame { position: absolute; inset: 0; }
.rp-bug { position: absolute; top: calc(9vh + 16px); right: calc(var(--gut) + 10px); display: flex; align-items: stretch; background: var(--slab); border-radius: var(--rad); overflow: hidden;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .4)); animation: in-r .45s .15s var(--ease) both; }
.rp-roundel { display: grid; place-items: center; width: 40px; background: var(--tvred); color: #fff; }
.rp-roundel .ico { width: 22px; height: 22px; animation: pulse 1.6s ease-in-out infinite; }
.rp-word { display: flex; align-items: center; padding: 9px 16px 8px; font: 700 20px/1 var(--f-cond); letter-spacing: .3em; text-transform: uppercase; }
.rp-slow { display: flex; align-items: center; padding: 0 11px; border-left: 1px solid var(--slab-line); font: 700 12px/1 var(--f-cond); letter-spacing: .16em; text-transform: uppercase; color: var(--acc); }
.rp-slow:empty { display: none; }
.rp-plate { position: absolute; left: calc(var(--gut) + 22px); bottom: calc(9vh + 26px); display: flex; flex-direction: column; align-items: flex-start; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .45)); }
.rpp-k { padding: 7px 26px 2px 16px; font: 700 46px/1 var(--f-cond); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; border-radius: var(--rad) var(--rad) 0 0;
  clip-path: polygon(0 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%); }
.rpp-b { display: flex; align-items: center; gap: 12px; padding: 8px 18px 7px 16px; background: var(--slab); font: 600 15px/1 var(--f-cond); letter-spacing: .14em; text-transform: uppercase; color: var(--hud-mute); white-space: nowrap; border-radius: 0 var(--rad) var(--rad) var(--rad); }
.rpp-b b { font-size: 19px; letter-spacing: .06em; color: var(--hud-ink); }
.rpp-b span:not(.dot)::before { content: ''; display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: currentColor; margin: 0 10px 3px 0; opacity: .6; }
.rp-plate.in .rpp-k { animation: co-word .5s var(--ease) both; }
.rp-plate.in .rpp-b { animation: co-sub .45s .15s var(--ease) both; }
.tone-gold { background: var(--brass); color: var(--acc-ink); }
.tone-red { background: var(--tvred); color: #fff; }
.tone-blue { background: #1d6fa5; color: #fff; }
.tone-slate { background: var(--slate); color: #fff; }
.rp-foot { position: absolute; left: 0; right: 0; bottom: 0; height: 9vh; display: flex; align-items: center; gap: 16px; padding: 0 calc(var(--gut) + 22px); }
.rp-prog { flex: 1; height: 3px; background: rgba(244, 238, 220, .16); border-radius: 2px; overflow: hidden; }
.rp-prog i { display: block; height: 100%; background: var(--acc); transform-origin: left; transform: scaleX(0); }
.rp-skip { display: flex; align-items: center; gap: 6px; padding: 7px 9px; pointer-events: auto; border-radius: 2px; font: 600 13px/1 var(--f-cond); letter-spacing: .1em; text-transform: uppercase; color: var(--hud-mute); transition: color .15s, background .15s; }
.rp-skip:hover { color: var(--hud-ink); background: rgba(255, 255, 255, .08); }
.rp-skip kbd { opacity: .9; }
/* picture-in-picture: C renders the replay into a corner; we frame it */
.replay.pip .rp-frame { inset: auto; right: calc(var(--gut) + var(--sa-r)); bottom: calc(var(--gut) + var(--sa-b) + 30vh); width: 34vw; aspect-ratio: 16 / 9;
  box-shadow: 0 0 0 3px var(--slab), 0 0 0 4px var(--acc), 0 14px 34px rgba(0, 0, 0, .5); border-radius: 2px; animation: rise .35s var(--ease) both; }
.replay.pip .rp-bug { top: 8px; right: auto; left: 8px; }
.replay.pip .rp-roundel { width: 26px; } .replay.pip .rp-roundel .ico { width: 16px; height: 16px; }
.replay.pip .rp-word { font-size: 13px; padding: 6px 10px 5px; }
.replay.pip .rp-plate { left: 8px; bottom: 16px; }
.replay.pip .rpp-k { font-size: 22px; padding: 4px 14px 1px 9px; }
.replay.pip .rpp-b { font-size: 11px; padding: 5px 10px 4px 9px; gap: 7px; } .replay.pip .rpp-b b { font-size: 13px; }
.replay.pip .rp-foot { height: auto; bottom: 0; padding: 0; }
.replay.pip .rp-prog { border-radius: 0; }
.replay.pip .rp-skip { display: none; }
/* reel title card */
.rp-card { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); display: none; flex-direction: column; align-items: center; text-align: center; filter: drop-shadow(0 16px 34px rgba(0, 0, 0, .5)); }
.rp-card.show { display: flex; }
.rc-eye { display: flex; align-items: center; gap: 8px; padding: 8px 14px 7px; background: var(--slab); font: 700 13px/1 var(--f-cond); letter-spacing: .26em; text-transform: uppercase; border-radius: var(--rad) var(--rad) 0 0; animation: co-sub .4s var(--ease) both; }
.rc-eye .ico { width: 16px; height: 16px; color: var(--tvred); }
.rc-eye span { margin-left: 6px; padding-left: 12px; border-left: 1px solid var(--slab-line); color: var(--acc); letter-spacing: .14em; }
.rc-word { padding: 10px 40px 2px; font: 700 104px/1 var(--f-cond); letter-spacing: .03em; text-transform: uppercase; white-space: nowrap;
  clip-path: polygon(var(--cut) 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%); animation: co-word .6s .1s var(--ease) both; }
.rc-who { display: flex; align-items: center; gap: 12px; padding: 10px 20px 9px; background: var(--slab); font: 600 16px/1 var(--f-cond); letter-spacing: .14em; text-transform: uppercase; color: var(--hud-mute); border-radius: 0 0 var(--rad) var(--rad); animation: co-sub .45s .3s var(--ease) both; }
.rc-who b { font-size: 21px; letter-spacing: .06em; color: var(--hud-ink); }
.rc-who .ball { width: 22px; height: 22px; }
.rc-who span::before { content: ''; display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: currentColor; margin: 0 10px 4px 0; opacity: .6; }
.rp-card.out { animation: co-out .38s ease-in both; }
.replay.carding .rp-plate { opacity: 0; }
body.mode-mini .rpp-k, body.mode-mini .rc-word { clip-path: none; border-radius: 12px 12px 0 0; }
/* the normal HUD steps aside for a full-screen replay */
#hud .hud-tl, #hud .board, #hud .hud-bc, #hud .actions, #hud #minimap { transition: opacity .3s; }
body.replaying #hud .hud-tl, body.replaying #hud .board, body.replaying #hud .hud-bc, body.replaying #hud .actions, body.replaying #hud #minimap,
body.replaying #hud .coach, body.replaying #hud .callout, body.replaying #hud .intro, body.replaying #hud .helpcard, body.replaying #hud .setpop { opacity: 0 !important; }
body.replaying #hud * { pointer-events: none !important; }
body.replaying #toasts { top: calc(9vh + 72px); }

/* ---- final card: highlights + save this course */
.hl-strip { margin-top: 18px; }
.hl-strip .eyebrow { display: flex; align-items: center; gap: 7px; }
.hl-strip .eyebrow .ico { width: 15px; height: 15px; color: var(--red); }
.hl-strip ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; padding: 0; }
.hl-strip li { display: flex; align-items: baseline; gap: 8px; padding: 8px 12px 7px; border: 1px solid var(--rule); border-left: 3px solid var(--red); background: rgba(255, 255, 255, .4); border-radius: 2px; }
.hl-strip li .dot { align-self: center; width: 10px; height: 10px; }
.hl-strip li b { font: 700 14px/1 var(--f-cond); letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
.hl-strip li span:not(.dot) { font: 600 15px/1 var(--f-body); }
.hl-strip li small { font: 500 12px/1 var(--f-cond); letter-spacing: .08em; text-transform: uppercase; color: var(--ink2); }
.savec { display: flex; align-items: center; gap: 10px; margin-right: auto; min-width: 0; }
.savec:empty { display: none; }
.savec.edit { flex: 1 1 auto; }
.savec-l { font: 600 12px/1 var(--f-cond); letter-spacing: .14em; text-transform: uppercase; color: var(--ink2); white-space: nowrap; }
.savec-in { flex: 1; min-width: 160px; width: auto; margin: 0; font-size: 30px; }
.savec .btn.sm { min-width: 0; }
.savec-msg { display: flex; align-items: center; gap: 8px; font: 500 italic 17px var(--f-display); color: var(--ink2); }
.savec-msg.ok { color: var(--g700); }
.savec-msg .ico { color: var(--g500); }
.savec-msg i { color: var(--ink); }

/* ---- toasts: reactions, highlights, clubhouse */
.toast .rx { display: inline-flex; vertical-align: -4px; margin-right: 7px; }
.toast .rx .ico { width: 18px; height: 18px; color: var(--acc); }
.toast.react .t-k { background: var(--slab2); color: var(--hud-ink); box-shadow: inset -1px 0 0 var(--slab-line); }
.toast.hl .t-k { background: var(--tvred); color: #fff; }
.toast.clubt .t-k { background: var(--brass); }
.toast .t-k .ico { width: 16px; height: 16px; }

/* ---- clubhouse */
.club { position: fixed; inset: 0; z-index: 12; display: grid; place-items: center; grid-template-columns: minmax(0, 1fr); overflow: auto; padding: 24px 16px;
  background: radial-gradient(ellipse at center, rgba(5, 15, 10, .5), rgba(5, 15, 10, .82)); animation: fade .2s ease both; }
.club-sheet { width: min(880px, 100%); min-height: min(600px, calc(100vh - 48px)); padding: 28px 34px 30px; animation: card-in .4s var(--ease) both; }
.club-head { display: flex; align-items: flex-end; gap: 16px; border-bottom: 2px solid var(--ink); }
.club-head h2 { font-size: 30px; padding-bottom: 10px; white-space: nowrap; }
.club-tabs { display: flex; gap: 2px; margin-left: auto; }
.club-tabs button { padding: 11px 15px 9px; font: 600 14px/1 var(--f-cond); letter-spacing: .12em; text-transform: uppercase; color: var(--ink2); border-radius: 2px 2px 0 0; transition: background .15s, color .15s; }
.club-tabs button:hover { color: var(--ink); background: rgba(0, 0, 0, .05); }
.club-tabs button.on { background: var(--ink); color: var(--paper); }
.club-x { width: 36px; height: 36px; display: grid; place-items: center; margin: 0 0 4px 6px; color: var(--ink2); border-radius: 50%; }
.club-x:hover { color: var(--ink); background: rgba(0, 0, 0, .06); }
.club-body { animation: fade .25s ease both; }
.blank { margin: 14px 0 0; font: 500 italic 17px var(--f-display); color: var(--ink2); }
.faint { color: var(--ink2); }
.link { margin-left: 6px; color: var(--g600); font: inherit; text-decoration: underline dashed 1px; text-underline-offset: 3px; }
.link:hover { color: var(--g700); }
.skinball { display: block; width: 32px; height: 32px; overflow: visible; }
/* member card */
.member-card { padding-top: 20px; }
.mc-id { display: flex; align-items: center; gap: 18px; }
.skinball.big { width: 78px; height: 78px; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .35)); }
.mc-name { margin-top: 2px; font: 600 48px/1 var(--f-hand); color: var(--g700); }
.mc-skin { font: 500 14px var(--f-body); color: var(--ink2); }
.mc-skin b { color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 20px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); }
.st { padding: 14px 6px 12px; text-align: center; border-left: 1px solid var(--rule); }
.st:first-child { border-left: 0; }
.st b { display: block; font: 600 40px/1 var(--f-display); font-variant-numeric: lining-nums tabular-nums; }
.st span { display: block; margin-top: 7px; font: 600 11px/1 var(--f-cond); letter-spacing: .16em; text-transform: uppercase; color: var(--ink2); }
.longs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--rule); }
.longs div { padding: 10px 10px 8px; border-left: 1px solid var(--rule); }
.longs div:first-child { border-left: 0; padding-left: 2px; }
.longs span { display: block; font: 600 11px/1 var(--f-cond); letter-spacing: .14em; text-transform: uppercase; color: var(--ink2); }
.longs b { display: block; margin-top: 4px; font: 600 32px/1 var(--f-hand); color: var(--graphite); }
.longs b i { margin-left: 3px; font: 600 11px var(--f-cond); font-style: normal; letter-spacing: .12em; text-transform: uppercase; color: var(--ink2); }
.best { width: 100%; margin-top: 8px; border-collapse: collapse; border: 1.5px solid var(--ink); font-family: var(--f-cond); }
.best th { padding: 8px 12px 7px; background: var(--g700); color: var(--ivory); font: 700 11px/1 var(--f-cond); letter-spacing: .16em; text-transform: uppercase; text-align: left; }
.best td { padding: 5px 12px; border-top: 1px solid var(--rule); font: 600 15px/1.2 var(--f-cond); letter-spacing: .04em; }
.best td:first-child { font: 600 15px var(--f-body); }
.best .mk { width: auto; min-width: 38px; height: 30px; padding: 0 5px; font-size: 25px; --r: -2deg; }
.best .mk.bird { border-radius: 16px; }
/* honours board: dark wood, gilt lettering */
.honours { margin-top: 22px; padding: 10px; border-radius: 3px;
  background: repeating-linear-gradient(91deg, rgba(255, 220, 170, .03) 0 2px, transparent 2px 9px), repeating-linear-gradient(89deg, rgba(0, 0, 0, .08) 0 1px, transparent 1px 23px),
    linear-gradient(180deg, #4a2c17 0%, #3a2112 45%, #2d190c 100%);
  box-shadow: inset 0 0 0 2px #1d0f06, inset 0 0 0 7px #5b3a1f, inset 0 0 0 8px rgba(224, 187, 92, .5), 0 12px 26px rgba(0, 0, 0, .35); }
.hb-in { padding: 24px 34px 26px; border: 1px solid rgba(224, 187, 92, .35); text-align: center; color: #e9cf86; }
.honours h3, .hb-who, .hb-v, .hb-crest .ico { background: linear-gradient(180deg, #fbe9ad 0%, #e2b453 52%, #a87a22 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .7)); }
.hb-crest .ico { width: 30px; height: 30px; margin: 0 auto; color: #e2b453; background: none; }
.honours h3 { margin: 8px 0 0; font: 600 36px/1 var(--f-display); letter-spacing: .1em; text-transform: uppercase; }
.hb-sub { margin-top: 9px; font: 600 12px/1 var(--f-cond); letter-spacing: .32em; text-transform: uppercase; color: rgba(233, 207, 134, .55); }
.hb-sec { display: flex; align-items: center; gap: 14px; margin: 24px 0 4px; font: 600 12px/1 var(--f-cond); letter-spacing: .32em; text-transform: uppercase; color: rgba(233, 207, 134, .7); }
.hb-sec::before, .hb-sec::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(224, 187, 92, .5), transparent); }
.hb-row { display: grid; grid-template-columns: 1.15fr 1.4fr .7fr .65fr; align-items: baseline; gap: 14px; padding: 8px 2px 7px; border-bottom: 1px solid rgba(224, 187, 92, .13); text-align: left; }
.hb-t { font: 600 13px/1.2 var(--f-cond); letter-spacing: .14em; text-transform: uppercase; color: rgba(240, 222, 175, .75); }
.hb-who { font: 500 italic 23px/1.1 var(--f-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-v { font: 600 23px/1 var(--f-display); text-align: right; white-space: nowrap; }
.hb-v small { margin-left: 4px; font: 600 11px var(--f-cond); letter-spacing: .14em; text-transform: uppercase; -webkit-text-fill-color: rgba(240, 222, 175, .6); }
.hb-y { font: 600 12px/1 var(--f-cond); letter-spacing: .12em; text-transform: uppercase; color: rgba(240, 222, 175, .5); text-align: right; }
.hb-row.vac .hb-who { opacity: .35; font-size: 19px; }
.hb-vac { font: 500 italic 18px var(--f-display); color: rgba(233, 207, 134, .7); padding: 30px 0; text-align: center; }
/* ball locker */
.lk-intro { margin: 18px 0 12px; color: var(--ink2); }
.lk-intro b { color: var(--ink); font: 600 italic 21px var(--f-display); }
.locker { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.lk { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 16px 10px 12px; border: 1.5px solid var(--rule); border-radius: 2px;
  background: rgba(255, 255, 255, .32); transition: border-color .15s, background .15s; }
.lk:hover { border-color: var(--ink2); background: rgba(255, 255, 255, .6); }
.lk.on { border-color: var(--g700); background: #fff; box-shadow: inset 0 0 0 1.5px var(--g700); }
.lk-ball { position: relative; width: 60px; height: 60px; }
.lk-ball .skinball { width: 100%; height: 100%; filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .3)); transition: transform .3s var(--ease-back); }
.lk:not(.locked):hover .lk-ball .skinball { transform: translateY(-3px) rotate(-14deg); }
.lk b { margin-top: 10px; font: 600 italic 18px/1.1 var(--f-display); }
.lk small { margin-top: 4px; font-size: 12.5px; line-height: 1.3; color: var(--ink2); }
.lk.locked { cursor: not-allowed; border-style: dashed; background: repeating-linear-gradient(135deg, transparent 0 7px, rgba(0, 0, 0, .025) 7px 8px); }
.lk.locked b { color: var(--ink2); }
.lk.locked .skinball { filter: grayscale(1) brightness(1.15) !important; opacity: .4; }
.lk-lock { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink); }
.lk-lock .ico { width: 18px; height: 18px; padding: 5px; box-sizing: content-box; background: var(--paper); border-radius: 50%; box-shadow: 0 0 0 1.5px var(--ink2); }
.lk-prog { width: 72%; height: 4px; margin-top: 9px; background: var(--rule2); border-radius: 2px; overflow: hidden; }
.lk-prog i { display: block; height: 100%; background: var(--g500); }
.lk .lk-n { margin-top: 5px; font: 600 11px/1 var(--f-cond); letter-spacing: .12em; text-transform: uppercase; }
.lk-tag { position: absolute; top: 8px; right: 8px; padding: 4px 6px 3px; font: 700 10px/1 var(--f-cond); letter-spacing: .14em; text-transform: uppercase; background: var(--brass); color: var(--acc-ink); border-radius: 2px; }
.lk.nope { animation: shake .4s ease both; }

/* ---- unlock call-out */
.unlock { position: fixed; left: 50%; top: calc(var(--gut) + var(--sa-t) + 120px); transform: translateX(-50%); z-index: 26; display: none; pointer-events: none; }
.unlock.show { display: block; }
.ul { display: flex; align-items: center; gap: 18px; padding: 14px 16px 14px 16px; color: var(--ivory); border-radius: 3px; pointer-events: auto;
  background: radial-gradient(120% 140% at 0% 0%, #2a6249 0%, #163a2b 45%, #0b2018 100%);
  box-shadow: inset 0 0 0 1px rgba(224, 187, 92, .7), inset 0 0 0 4px #0f2a1f, inset 0 0 0 5px rgba(224, 187, 92, .35), 0 20px 44px rgba(0, 0, 0, .55); animation: ul-in .6s var(--ease-back) both; }
.ul-ball { position: relative; flex: none; width: 64px; height: 64px; }
.ul-ball .skinball { position: relative; z-index: 1; width: 100%; height: 100%; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5)); animation: ul-ball .9s .15s var(--ease-back) both; }
.ul-rays { position: absolute; inset: -20px; border-radius: 50%; background: repeating-conic-gradient(rgba(224, 187, 92, .4) 0 5deg, transparent 5deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 25%, transparent 70%); mask: radial-gradient(circle, #000 25%, transparent 70%); animation: ul-rays 9s linear infinite; }
.ul-k { display: flex; align-items: center; gap: 6px; font: 700 12px/1 var(--f-cond); letter-spacing: .3em; text-transform: uppercase; color: var(--brass-hi); }
.ul-k .ico { width: 14px; height: 14px; }
.ul-name { margin-top: 5px; font: 600 italic 32px/1.02 var(--f-display); }
.ul-d { margin-top: 4px; max-width: 32ch; font: 500 14px/1.3 var(--f-body); color: rgba(244, 238, 220, .74); }
.ul-use { flex: none; align-self: center; min-height: 40px; margin-left: 6px; padding: 0 16px; font: 700 13px/1 var(--f-cond); letter-spacing: .14em; text-transform: uppercase;
  background: var(--brass); color: var(--acc-ink); border-radius: 2px; transition: filter .15s; }
.ul-use:hover { filter: brightness(1.1); }
.ul-use:disabled { background: transparent; color: var(--brass-hi); box-shadow: inset 0 0 0 1px var(--brass); }
.unlock.out .ul { animation: co-out .45s ease-in both; }
@keyframes ul-in { from { opacity: 0; transform: translateY(-18px) scale(.94); } }
@keyframes ul-ball { from { transform: scale(.2) rotate(-220deg); opacity: 0; } }
@keyframes ul-rays { to { transform: rotate(360deg); } }

@media (max-width: 820px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .st:nth-child(4) { border-left: 0; }
  .longs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .club-head { flex-wrap: wrap; }
  .hb-row { grid-template-columns: 1fr 1.2fr .7fr; }
  .hb-y { display: none; }
  .rc-word { font-size: 64px; }
}
.lie-waste { color: #e8c99a; }

/* ------------------------------------------------------------------ round 5: skins next to names, handicaps, departed players */
/* a player's chosen ball (skin SVG) in place of the plain colour dot / ball */
.dot.sk, .ball.sk { background: none; box-shadow: none; border-radius: 50%; display: inline-block; }
.dot.sk .skinball, .ball.sk .skinball { width: 100%; height: 100%; }
.ball.sk .skinball { filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .3)); }
.sig-row { display: flex; align-items: flex-end; gap: 12px; }
.sig-row .sig { flex: 1; min-width: 0; }
.sig-row .me-ball { width: 34px; height: 34px; flex: none; margin-bottom: 6px; cursor: default; }
.sig-row .me-ball:hover { transform: none; }

/* room: your ball + handicap */
.mecard { margin-top: 18px; padding: 14px 16px 16px; background: var(--paper2); border: 1px solid var(--rule); border-radius: 2px; }
.mecard-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.mecard .eyebrow.faint { letter-spacing: .1em; font-weight: 500; }
.mecard .sig { font-size: 30px; }
.mecard .sig-row .me-ball { width: 28px; height: 28px; }
.balls.sm { grid-template-columns: repeat(10, minmax(0, 24px)); gap: 6px; margin-top: 10px; }
.balls.sm .ball.on::after { bottom: -9px; width: 12px; height: 4px; }
.mecard-hcp { margin-top: 18px; }
.mecard-hcp .eyebrow .faint { letter-spacing: .1em; }
.pr.still { animation: none; }
.pr.me .nm { color: var(--g700); }
.hcp-b { display: inline-flex; align-items: baseline; gap: 4px; font: 700 15px/1 var(--f-cond); font-variant-numeric: tabular-nums; color: var(--ink2); padding: 3px 6px 2px; border: 1px solid var(--rule); border-radius: 2px; }
.hcp-b i { font: 600 10px/1 var(--f-cond); font-style: normal; letter-spacing: .14em; text-transform: uppercase; }
.hcp-b.on { color: var(--ink); border-color: var(--ink); }

/* handicap stepper */
.hcp { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; }
.hcp-l { min-width: 72px; font: 600 12px/1 var(--f-cond); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.hcp-step { display: inline-flex; align-items: stretch; border: 1.5px solid var(--ink); border-radius: 2px; background: var(--paper); }
.hcp-step button { width: 34px; min-height: 36px; font: 700 20px/1 var(--f-cond); color: var(--ink); transition: background .15s; }
.hcp-step button:hover:not(:disabled) { background: rgba(0, 0, 0, .06); }
.hcp-step button:disabled { color: var(--rule); cursor: default; }
.hcp-v { min-width: 44px; display: grid; place-items: center; border-left: 1px solid var(--rule); border-right: 1px solid var(--rule);
  font: 600 30px/1 var(--f-hand); color: var(--g700); font-variant-numeric: tabular-nums; }
.hcp-sug { font: 500 italic 14px var(--f-display); color: var(--ink2); }
.hcp-sug b { font: 700 16px var(--f-cond); font-style: normal; color: var(--ink); }
.hcp-sug button { font: 700 12px/1 var(--f-cond); letter-spacing: .14em; text-transform: uppercase; color: var(--g600); padding: 4px 7px 3px; border: 1px solid var(--g600); border-radius: 2px; margin-left: 2px; font-style: normal; }
.hcp-sug button:hover { background: var(--g600); color: var(--ivory); }
.hcp-sug.ok { color: var(--g600); }
.hcp-sug.none { font-size: 13px; opacity: .8; }
.hcp.compact .hcp-step button { min-height: 30px; width: 28px; font-size: 17px; }
.hcp.compact .hcp-v { font-size: 25px; min-width: 38px; }
.mc-hcp { margin-top: 6px; padding: 4px 0 2px; border-top: 2px solid var(--ink); }
.mc-hcp .hcp { margin-top: 10px; }

/* scoring segment */
.holes.scoring button { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 8px 10px; min-height: 56px; }
.holes.scoring b { font: 700 18px/1 var(--f-cond); letter-spacing: .06em; text-transform: uppercase; }
.holes.scoring small { font: 500 12px/1.2 var(--f-body); opacity: .75; }
.holes.locked button:not(.on) { cursor: default; }

/* scorecard: handicap strokes (dots, like a real card), stroke index, net column, departed players */
.scard td.rcv { position: relative; }
.hs { position: absolute; top: 3px; right: 3px; display: inline-flex; gap: 2px; pointer-events: auto; }
.hs b { width: 5px; height: 5px; border-radius: 50%; background: var(--ink); }
.legend .hs { position: static; }
.legend .lg-net { color: var(--g600); font-weight: 700; }
.scard tr.si td { height: 22px; font-size: 12px; color: var(--ink2); background: var(--paper); }
.scard tr.si td.nm { font-size: 10px; background: var(--paper); }
.scard th.netc { background: var(--g800); }
.scard th.netc.on { background: var(--brass); color: var(--acc-ink); }
.scard td.netc { line-height: 1; }
.scard td.netc b { display: block; font: 700 17px/1 var(--f-cond); }
.scard td.netc small { display: block; margin-top: 2px; font: 600 11px/1 var(--f-cond); color: var(--ink2); }
.scard td.netc.on { background: rgba(196, 154, 60, .12); }
.scard td.netc.neg b { color: var(--red); }
.scard td.nm .pl .pl-h { flex: none; font: 600 11px/1 var(--f-cond); letter-spacing: .08em; color: var(--ink2); padding: 2px 4px 1px; border: 1px solid var(--rule); border-radius: 2px; }
.scard td.nm .pl .pl-h::before { content: 'hcp '; font-weight: 500; letter-spacing: .1em; }
.left-tag { flex: none; font: 700 10px/1 var(--f-cond); font-style: normal; letter-spacing: .16em; text-transform: uppercase; color: var(--paper); background: var(--ink2); padding: 3px 5px 2px; border-radius: 2px; margin-left: 6px; }
.scard tr.left td:not(.nm) { opacity: .55; }
.scard tr.left td.nm .pl > span:not(.left-tag), .scard tr.left .dot { opacity: .6; }
.step.left .ball, .step.left .who { opacity: .55; }
.step .who .left-tag { vertical-align: 2px; }
.step .sc .sc-g { display: block; margin-top: 2px; font-size: 11px; letter-spacing: .1em; opacity: .85; }

/* leaderboard in net mode: net to par, gross underneath */
.board.net .br .tp { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.board.net .br .tp b { font: 700 16px/1 var(--f-cond); }
.board.net .br .tp small { font: 600 9px/1 var(--f-cond); letter-spacing: .06em; color: var(--ink2); }
.board.net .board-h span:last-child { color: var(--acc-ink); }

/* final card: before the next round */
.nextround { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 26px; margin-top: 18px; padding: 12px 16px 14px; background: var(--paper2); border: 1px solid var(--rule); border-radius: 2px; }
.nr-ball { display: flex; align-items: center; gap: 12px; }
.nr-ball .ball { width: 30px; height: 30px; }
.nr-t { margin-top: 3px; font: 500 italic 18px/1.1 var(--f-display); }
.nextround .balls.sm { margin-top: 0; }
.nextround .hcp { margin-top: 0; }

/* free camera (C) */
.fc-label { position: absolute; left: 50%; top: calc(var(--gut) + var(--sa-t)); transform: translateX(-50%); display: flex; align-items: stretch; pointer-events: none;
  background: var(--slab); border-radius: var(--rad); overflow: hidden; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35)); animation: rise .2s var(--ease) both; max-width: calc(100vw - 600px); flex-wrap: wrap; }
.fc-label span { padding: 8px 10px 7px; font: 600 13px/1 var(--f-cond); letter-spacing: .1em; text-transform: uppercase; color: var(--hud-mute); white-space: nowrap; }
.fc-label .fc-k { display: inline-flex; align-items: center; gap: 7px; background: var(--acc); color: var(--acc-ink); font-weight: 700; letter-spacing: .16em; }
.fc-label .fc-k .ico { width: 15px; height: 15px; }
body.freecam #hint, body.freecam #clubs, body.freecam #power, body.freecam #adv, body.freecam #coach { display: none !important; }
.watch .w-m { font-style: normal; color: var(--hud-mute); font-weight: 500; }

/* ------------------------------------------------------------------ 8-player rooms */
/* tee sheet: seats */
.tee .seats { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 700; letter-spacing: .06em; }
.tee.full .seats { color: var(--red); }
.tee .btn.off { opacity: .45; cursor: default; pointer-events: none; display: inline-flex; align-items: center; }
/* pairing: 8 slots in two columns (1–4 left, 5–8 right) */
.pair-h #pair-n { margin-left: 6px; letter-spacing: .1em; font-weight: 500; }
.pairing { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, auto); grid-auto-flow: column; column-gap: 18px; }
.pr { min-width: 0; gap: 9px; padding: 8px 2px; }
.pr .ball { width: 20px; height: 20px; flex: none; }
.pr .nm { font-size: 15px; }
.pr .you { margin-left: 4px; font-size: 11px; }
.pr .tag { padding: 3px 4px 2px; font-size: 10px; letter-spacing: .1em; }
.pr .hcp-b { flex: none; }
.pr.empty .nm { font-size: 14px; }
@media (max-width: 820px) { .pairing { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; } }
/* colour swatches: taken colours */
.balls .ball.taken { opacity: .32; filter: saturate(.5); cursor: not-allowed; transform: none; }
.balls .ball.taken::before { content: ''; position: absolute; left: 12%; right: 12%; top: 50%; height: 2px; margin-top: -1px; background: var(--ink); transform: rotate(-40deg); border-radius: 1px; }
.balls .ball.taken:hover { transform: none; }
.balls .ball.nope { animation: sw-nope .3s; }
@keyframes sw-nope { 25% { translate: -3px 0; } 75% { translate: 3px 0; } }

/* leaderboard: dense rows for big fields, collapse to top 3 + you */
.board-h em { font-style: normal; opacity: .7; margin-left: 4px; letter-spacing: .06em; }
.board.dense .br { height: 24px; }
.board.dense .br .nm { font-size: 14px; }
.board.dense .br .pos { font-size: 13px; }
.board.dense .br .hl { font-size: 14px; }
.board.dense .br .tp { font-size: 15px; }
.board.dense .br .dot { width: 9px; height: 9px; }
.board.min .br:not(.me) { display: none !important; }
.board.min .br.top { display: grid !important; }
.br-more { display: none; align-items: center; justify-content: center; gap: 6px; height: 20px; border-top: 1px solid var(--slab-line); cursor: pointer;
  font: 600 11px/1 var(--f-cond); letter-spacing: .16em; text-transform: uppercase; color: var(--hud-mute); }
.br-more:hover { color: var(--hud-ink); }
.board.min .br-more { display: flex; }
.br-more .chev { width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); }

/* scorecard: tighter rows for 6–8 players */
.scard.many td { height: 33px; }
.scard.many tr.par td { height: 26px; }
.scard.many td.nm .pl { font-size: 14px; }
.scard.many .pl .ball, .scard.many .pl .dot { width: 10px; height: 10px; }
.scard.many td.tot, .scard.many td.tp { font-size: 16px; }

/* final card: the field behind the podium */
.field { list-style: none; margin: 14px auto 0; padding: 0; max-width: 590px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 22px; }
.field li { display: flex; align-items: center; gap: 10px; padding: 7px 2px; border-bottom: 1px solid var(--rule); min-width: 0; }
.field .fp { width: 26px; flex: none; font: 600 italic 18px/1 var(--f-display); color: var(--ink2); text-align: right; }
.field .ball { width: 20px; height: 20px; flex: none; }
.field .fn { flex: 1; min-width: 0; display: flex; align-items: center; font: 600 15px/1.2 var(--f-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field .fn .you { font: 500 10px var(--f-cond); font-style: normal; letter-spacing: .12em; text-transform: uppercase; color: var(--ink2); margin-left: 6px; }
.field .fs { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.field .fs b { font: 700 17px/1 var(--f-cond); font-variant-numeric: tabular-nums; }
.field .fs b.neg { color: var(--red); }
.field .fs small { font: 500 11px/1.3 var(--f-cond); letter-spacing: .08em; text-transform: uppercase; color: var(--ink2); }
.field li.left { opacity: .5; }
.field li.left .ball { filter: grayscale(.8); }
.field li.me .fn { color: var(--g700); }
@media (max-width: 640px) { .field { grid-template-columns: 1fr; } }

/* tickers: a coalesced line pulses when it absorbs another name */
.toast.bump { animation: t-bump .35s var(--ease); }
@keyframes t-bump { 40% { transform: scale(1.04); } }

/* watch plate: n of m */
.watch .w-of { font: 700 14px/1 var(--f-cond); color: var(--hud-ink); letter-spacing: .04em; margin-right: 4px; font-variant-numeric: tabular-nums; }
.watch .w-of i { font-style: normal; color: var(--hud-mute); margin: 0 1px; }
.pr .hcp-b { padding: 2px 4px 1px; font-size: 14px; }
.pr .hcp-b i { display: none; }
.pr .hcp-b::before { content: 'H'; font: 600 9px/1 var(--f-cond); letter-spacing: .1em; color: var(--ink2); margin-right: 2px; }

/* ---- top-centre stacking (polish): free-camera label > tickers > coach card / unlock call-out; never overlapping.
   --tk-b = bottom edge of the ticker stack in px (ui.js stackTop), 0 when empty. */
body.freecam #toasts { top: calc(var(--gut) + var(--sa-t) + 42px); }
.coach { top: max(calc(var(--gut) + var(--sa-t) + 92px), calc(var(--tk-b, 0px) + 12px)); transition: opacity .2s, top .25s var(--ease); }
.unlock { top: max(calc(var(--gut) + var(--sa-t) + 120px), calc(var(--tk-b, 0px) + 12px)); transition: top .25s var(--ease); }
/* scorecard: bot names ("Par-Tee Pam" + CPU tag + handicap) were cut to 7 letters in the 190px name column */
@media (min-width: 821px) { .scard td.nm, .scard th.nm { width: 222px; } }
/* while a card (between holes / final card) is up, the tickers drop to the bottom centre instead of covering its title */
body.in-game:has(#overlay:not(.hidden)) #toasts { top: auto; bottom: calc(var(--gut) + var(--sa-b)); }
