/* Score entry as little digital screens (Luke, 2026-11-08: "each little block is its own screen, and then when we push whatever number, it
   pops up and it's digital in the same colour theme of the golf course"). One look for every place a score goes in: Post a score (the five
   score tiles, the Other keypad and the 18-hole strip) and a round in play (the Birdie / Par / Bogey / Other row and the full score sheet).
   Each key is a dark screen with LED digits in the club's colour (--club-led, Kingfisher blue; Scratch green with no club). The score's
   meaning keeps a thin coloured strip and its word, so colours never carry it alone. The tapped key lights and its number pops; on Post a
   score the number then pops into the hole's own screen. The dimpled panel behind stays; the screens sit on top of it. */

:root { --led: #7CFFB2; --led-face: #050D09; }
html[data-club] { --led: var(--club-led, #7CFFB2); --led-face: color-mix(in srgb, var(--club-deep, #0F2A1C) 38%, #03060A); }

/* ── the screen ── */
.screen .qp-tiles .qp-t, .screen .qp-pad .qp-k, .screen .qp-strip .qp-dot, #quick button, #keys button {
  position: relative; overflow: hidden; isolation: isolate; color: #fff; -webkit-text-stroke: 0; text-shadow: none;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .03) 0 1px, rgba(0, 0, 0, 0) 1px 3px),
    radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--led) 12%, var(--led-face)), var(--led-face) 72%);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .85), inset 0 3px 9px rgba(0, 0, 0, .85), 0 1px 0 rgba(255, 255, 255, .1), 0 6px 12px -8px rgba(0, 0, 0, .8);
  transition: box-shadow 160ms ease, border-color 160ms ease, transform 120ms ease; }
.screen .qp-tiles .qp-t:active, .screen .qp-pad .qp-k:active, #quick button:active, #keys button:active { transform: scale(.96); filter: none; }

/* the score's meaning: a thin strip across the top of the screen */
.screen .qp-tiles .qp-t::before, .screen .qp-strip .qp-dot.has::before, #quick button::before, #keys button::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; z-index: 1; background: var(--strip, transparent); box-shadow: 0 0 8px var(--strip, transparent); }
.screen .qp-strip .qp-dot.has::before { top: auto; bottom: 0; height: 3px; }
:is(.qp-t.eg, .qp-dot.eg, #keys .t-e, #keys .t-a) { --strip: #E9C46A; }
:is(.qp-t.bd, .qp-dot.bd, #quick .birdie, #keys .t-b) { --strip: var(--led); }
:is(.qp-t.pr, .qp-dot.pr, #quick .par, #keys .t-p) { --strip: #EDE6D3; }
:is(.qp-t.bg, .qp-dot.bg, #quick .bogey, #keys .t-o) { --strip: #F08C74; }
:is(.qp-t.db, .qp-dot.db, #keys .t-d) { --strip: #F29A4A; }
.qp-dot.pk { --strip: #6B7280; }

/* ── the digits ── */
.screen .qp-tiles .qp-t b, .screen .qp-pad .qp-k b, .screen .qp-strip .qp-dot i, #quick button .q-n, #keys button .n {
  font-family: "Stats LED", var(--sans); font-weight: 700; font-style: normal; letter-spacing: .02em; color: var(--led); -webkit-text-stroke: 0;
  text-shadow: 0 0 1px var(--led), 0 0 10px color-mix(in srgb, var(--led) 55%, transparent); font-variation-settings: normal; }
.screen .qp-tiles .qp-t b { font-size: 34px; line-height: 1; margin-top: 6px; }
.screen .qp-pad .qp-k b { font-size: 22px; }
#quick button .q-n { font-size: 30px; line-height: 1; margin-top: 4px; }
#keys button .n { font-size: 26px; line-height: 1; margin-top: 4px; }

/* the words (Eagle, Birdie, Par…) sit small above the digits, like a label printed on the bezel */
.screen .qp-tiles .qp-t span, .screen .qp-pad .qp-k span, #quick button .q-w, #keys button .l {
  font: 700 10.5px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .72); -webkit-text-stroke: 0; text-shadow: none; }
.screen .qp-tiles .qp-t { display: flex; flex-direction: column-reverse; justify-content: center; align-items: center; gap: 6px; padding-top: 4px; }
#quick button { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; min-height: 72px; border-radius: 14px; background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .03) 0 1px, rgba(0, 0, 0, 0) 1px 3px),
    radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--led) 12%, var(--led-face)), var(--led-face) 72%); }
#keys button { display: flex; flex-direction: column-reverse; justify-content: center; align-items: center; gap: 5px; border-radius: 14px; }

/* "Other" and the non-score keys (pick up, ±1, clear) are screens too, with their words lit instead of digits */
#quick button.other .q-n { font-family: var(--sans); font-size: 22px; letter-spacing: .1em; }
#quick button.other[aria-pressed="true"] .q-n { font-family: "Stats LED", var(--sans); font-size: 30px; letter-spacing: .02em; }
#keys button:not([class*="t-"]) .n { font-family: var(--sans); }

/* the 18-hole strip: each hole a tiny screen, its number printed small at the top, the score lit in the middle */
.screen .qp-strip .qp-dot { border-radius: 9px; }
.screen .qp-strip .qp-dot b { font: 800 9.5px/1 var(--sans); color: rgba(255, 255, 255, .55); opacity: 1; -webkit-text-stroke: 0; text-shadow: none; }
.screen .qp-strip .qp-dot i { font-size: 17px; line-height: 1; margin-top: 10px; }
.screen .qp-strip .qp-dot.on { border-color: var(--led); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .85), inset 0 3px 9px rgba(0, 0, 0, .85), 0 0 0 2px color-mix(in srgb, var(--led) 45%, transparent), 0 0 14px -2px color-mix(in srgb, var(--led) 60%, transparent); }

/* ── chosen: the screen glows in the club's colour ── */
.screen .qp-tiles .qp-t.sel, .screen .qp-pad .qp-k.sel, #quick button[aria-pressed="true"], #keys button.sel, .screen :is(.qp-t, .qp-k).lit, #quick button.lit, #keys button.lit {
  outline: 0; border-color: var(--led);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .6), inset 0 0 18px color-mix(in srgb, var(--led) 28%, transparent), 0 0 0 2px color-mix(in srgb, var(--led) 50%, transparent), 0 0 18px -2px color-mix(in srgb, var(--led) 70%, transparent); }
:is(.qp-t, .qp-k, #quick button, #keys button).sel :is(b, .q-n, .n), #quick button[aria-pressed="true"] .q-n {
  text-shadow: 0 0 1px #fff, 0 0 6px var(--led), 0 0 16px var(--led); }

/* ── the pop: the tapped number jumps and flashes; on Post a score it lands in the hole's screen ── */
@keyframes led-pop { 0% { transform: scale(1); filter: brightness(1); } 35% { transform: scale(1.35); filter: brightness(1.9); } 100% { transform: scale(1); filter: brightness(1); } }
@keyframes led-land { 0% { transform: scale(.2); opacity: 0; filter: brightness(2.2); } 55% { transform: scale(1.4); opacity: 1; } 100% { transform: scale(1); filter: brightness(1); } }
.screen :is(.qp-t, .qp-k).lit b, #quick button.lit .q-n, #keys button.lit .n { animation: led-pop 260ms cubic-bezier(.2, .9, .3, 1.4) both; }
.screen .qp-strip .qp-dot.pop i { animation: led-land 420ms cubic-bezier(.2, .9, .3, 1.3) both; }
@media (prefers-reduced-motion: reduce) {
  .screen :is(.qp-t, .qp-k).lit b, #quick button.lit .q-n, #keys button.lit .n, .screen .qp-strip .qp-dot.pop i { animation: none; }
}
.screen .qp-tiles .qp-t:focus-visible, .screen .qp-pad .qp-k:focus-visible, #quick button:focus-visible, #keys button:focus-visible, .screen .qp-strip .qp-dot:focus-visible { outline: 2px solid var(--led); outline-offset: 2px; }

/* In a round, the word above the digits is printed on the bezel, not on a coloured band (the band was older styling; the strip says it now) */
#quick button .q-w, #quick button[aria-pressed="true"] .q-w { align-self: auto; padding: 0; background: none; color: rgba(255, 255, 255, .72); font: 700 10.5px/1 var(--sans); letter-spacing: .1em; text-shadow: none; }
#quick button .q-n { flex: none; display: block; }

/* One colour language for scores everywhere in a club's app (Luke, 2026-11-08: "they both must be the same"): eagle gold, birdie the club's
   own colour, par cream, bogey coral, double orange. The in-round scorecard, its key and the score screens all read these. */
html[data-club] .play, html[data-club] .scoresheet, html[data-club] .qp-panel {
  --sc-eagle: #E9C46A; --sc-birdie: var(--led); --sc-par: #EDE6D3; --sc-bogey: #F08C74; --sc-double: #F29A4A; }

/* ── Scoring from inside the 3D (js/view3d.js scoreKeeper): a SCORE row in the course's Tools menu opens these score screens. ── */
:is(.v3d-t).eg { --strip: #E9C46A; }
:is(.v3d-t).bd { --strip: var(--led); }
:is(.v3d-t).pr { --strip: #EDE6D3; }
:is(.v3d-t).bg { --strip: #F08C74; }
:is(.v3d-t).db { --strip: #F29A4A; }

.v3d-pad { position: absolute; z-index: 4; left: 50%; top: 50%; translate: -50% -50%; width: min(348px, calc(100% - 28px)); padding: 14px; border-radius: 22px; background: color-mix(in srgb, var(--led-face) 88%, transparent); border: 1px solid rgba(255, 255, 255, .16); box-shadow: 0 24px 48px rgba(0, 0, 0, .55); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: #fff; animation: v3d-pad-in 200ms cubic-bezier(.16, 1, .3, 1); }
.v3d-pad[hidden] { display: none; }
@keyframes v3d-pad-in { from { opacity: 0; scale: .96; } }
.v3d-pad-head { display: flex; align-items: baseline; gap: 10px; margin: 0 2px 12px; }
.v3d-pad-head b { font: 700 20px/1 var(--serif, var(--sans)); }
.v3d-pad-head span { flex: 1; font: 600 13px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.v3d-pad-x { align-self: center; display: grid; place-items: center; width: 44px; height: 44px; margin: -10px -8px -10px 0; border: 0; border-radius: 50%; background: none; color: rgba(255, 255, 255, .8); }
.v3d-pad-x .ico, .v3d-pad-x svg { width: 20px; height: 20px; }
.v3d-pad-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.v3d-t { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; min-height: 76px; padding: 4px 0 0; border-radius: 14px; color: #fff; border: 1px solid rgba(255, 255, 255, .12);
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .03) 0 1px, rgba(0, 0, 0, 0) 1px 3px), radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--led) 12%, var(--led-face)), var(--led-face) 72%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .85), inset 0 3px 9px rgba(0, 0, 0, .85), 0 1px 0 rgba(255, 255, 255, .1); transition: box-shadow 160ms ease, border-color 160ms ease, scale 120ms ease; }
.v3d-t::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--strip, transparent); box-shadow: 0 0 8px var(--strip, transparent); }
.v3d-t span { font: 700 10.5px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .72); }
.v3d-t b { font: 700 32px/1 "Stats LED", var(--sans); letter-spacing: .02em; color: var(--led); text-shadow: 0 0 1px var(--led), 0 0 10px color-mix(in srgb, var(--led) 55%, transparent); }
.v3d-t:active { scale: .96; }
.v3d-t.sel, .v3d-t.lit { border-color: color-mix(in srgb, var(--led) 70%, transparent); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .85), inset 0 0 18px color-mix(in srgb, var(--led) 30%, transparent), 0 0 14px color-mix(in srgb, var(--led) 35%, transparent); }
.v3d-t.lit b { animation: led-pop 260ms cubic-bezier(.2, .9, .3, 1.4) both; }
.v3d-pad-more { display: flex; gap: 8px; margin-top: 10px; }
.v3d-pad-more button { flex: 1; min-height: 44px; padding: 0 10px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .07); color: #fff; font: 600 14px/1 var(--sans); }
.v3d-pad-more button[data-n="-1"], .v3d-pad-more button[data-n="+1"] { flex: 0 0 52px; font-size: 22px; }
.v3d-pad-more button:active { scale: .97; }
.v3d-pad :is(button):focus-visible { outline: 2px solid var(--led); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .v3d-pad, .v3d-t.lit b { transition: none; animation: none; } }
