:root {
  --night: #0a140e;
  --panel: #111f16;
  --line: #24382b;
  --gilt: #c8a36a;
  --bourbon: #b0823f;
  --ivory: #f1e6cc;
  --muted: #a99f88;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--night); color: var(--ivory); }
body { font: 400 16px/1.5 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.shell { max-width: 30rem; margin: 0 auto; padding: max(2rem, env(safe-area-inset-top)) 1.25rem 3rem; }
.brand { text-align: center; margin-bottom: 2rem; }
.eyebrow { margin: 0; color: var(--gilt); font-size: .75rem; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; }
h1 { margin: .35rem 0 0; font: 600 2rem/1.1 "Cormorant SC", Georgia, serif; letter-spacing: .04em; }
.lede { text-align: center; color: var(--muted); margin: 0 0 1.75rem; }
.welcome { text-align: center; margin: 0 0 1.25rem; color: var(--muted); }
.welcome span { color: var(--ivory); font-weight: 600; }
.primary { display: block; text-align: center; padding: 1rem; border-radius: .75rem; background: var(--gilt); color: var(--night); font-weight: 600; text-decoration: none; }
.primary:hover, .primary:focus-visible { background: var(--bourbon); }
.primary[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.fine { color: var(--muted); font-size: .8125rem; text-align: center; margin: 1rem 0 0; }
.my-bay { margin: 0 0 1.5rem; padding: .9rem 1rem; border: 1px solid var(--gilt); border-radius: .9rem; background: var(--panel); text-align: center; }
.my-bay-title { margin: 0 0 .35rem; color: var(--gilt); font-size: .75rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.my-bay-lines { list-style: none; margin: 0; padding: 0; font-weight: 600; }
.my-bay .fine { margin-top: .5rem; }
.my-bay .fine a { color: var(--gilt); }
.booking-note { margin: 0 0 1.25rem; text-align: center; color: var(--gilt); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 9.5rem; padding: 2.75rem 1rem 1rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--panel); color: var(--ivory); text-decoration: none; }
a.tile:hover, a.tile:focus-visible { border-color: var(--gilt); outline: none; }
.step { position: absolute; top: .85rem; left: 1rem; color: var(--gilt); font: 600 1.1rem "Cormorant SC", Georgia, serif; }
.label { font: 600 1.6rem/1.1 "Cormorant SC", Georgia, serif; letter-spacing: .03em; }
.hint { margin-top: .3rem; color: var(--muted); font-size: .8125rem; }
.tile.soon { opacity: .55; }
.help { text-align: center; color: var(--muted); margin: 1.75rem 0 .5rem; }
.help a { color: var(--gilt); }
form { text-align: center; }
.link { background: none; border: 0; color: var(--muted); font: inherit; font-size: .875rem; text-decoration: underline; cursor: pointer; padding: .5rem; }
.notice { border: 1px solid var(--bourbon); border-radius: .75rem; padding: .75rem 1rem; margin: 0 0 1.25rem; font-size: .875rem; }
[hidden] { display: none !important; }

/* Yardage book */
.back { color: var(--gilt); text-decoration: none; }
.summary { text-align: center; color: var(--gilt); font-size: .8125rem; letter-spacing: .04em; margin: -.75rem 0 1.25rem; }
.clubs, .report { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.club { padding: .9rem 0; border-top: 1px solid var(--line); }
.club:last-child { border-bottom: 1px solid var(--line); }
.club-top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.club-name { font: 600 1.3rem/1.2 "Cormorant SC", Georgia, serif; letter-spacing: .03em; }
.club-total .num { font: 600 1.7rem/1 Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; color: var(--ivory); }
.club-carry .range { font: 500 1rem/1 Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; padding-bottom: .1rem; }
.club-carry .unit { margin-left: .25rem; color: var(--muted); font-size: .75rem; }
.club-detail { margin-top: .2rem; color: var(--muted); font-size: .8125rem; }
.club-note { margin-top: .45rem; padding-left: .7rem; border-left: 2px solid var(--bourbon); font-size: .875rem; }
.club.estimate .club-name, .club.estimate .club-total .num { color: var(--muted); }
.tag { margin-left: .5rem; padding: .1rem .4rem; border: 1px solid var(--line); border-radius: .35rem; color: var(--muted); font: 500 .625rem/1.4 Inter, system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; vertical-align: middle; }

/* Staff */
.filepick { display: block; width: 100%; margin: 0 0 1rem; color: var(--muted); font: inherit; }
.button { width: 100%; border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.button:disabled { opacity: .45; cursor: default; }
.report li { padding: .5rem 0; border-top: 1px solid var(--line); font-size: .875rem; }
code { font-size: .875em; color: var(--ivory); }

/* Staff members page */
.search { display: block; width: 100%; margin: 0 0 1rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: .6rem; background: transparent; color: inherit; font: inherit; }
.search option { color: #0a140e; }
.roster { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.roster-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.roster-row:hover .roster-name { color: var(--gilt); }
.roster-name { font-weight: 500; }
.holds-bay { padding: .9rem 0; border-top: 1px solid var(--line); }
.holds-row { display: flex; gap: .6rem; align-items: center; margin-top: .65rem; }
.holds-row .search { flex: 1 1 0; margin: 0; }
.holds-row .button { flex: 1 1 0; width: auto; }
.tag.on { border-color: var(--gilt); color: var(--gilt); }
.linkbox { margin: 0 0 1.25rem; padding: .9rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.linkbox .club-detail { margin: 0 0 .75rem; }
.button.quiet { padding: .7rem; border: 1px solid var(--line); border-radius: .6rem; background: transparent; color: inherit; }

/* Keep the load result clear of the Load button. */
#go { margin-bottom: 1.25rem; }

/* Carry first, total second */
.club-nums { display: flex; gap: 1.1rem; align-items: flex-end; }
.club-carry, .club-total { display: flex; flex-direction: column; align-items: flex-end; }
.club-nums .label { color: var(--muted); font-size: .625rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .2rem; }
.club.estimate .club-total .num { opacity: .8; }
.club-adjusted { margin-top: .3rem; color: var(--gilt); font-size: .75rem; }
.club-sim { margin-top: .3rem; color: var(--muted, #9a9a8a); font-size: .75rem; }

/* SwingPower panel */
.swing { margin: 0 0 1.5rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: .9rem; background: var(--panel); }
.swing-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.swing-label { color: var(--gilt); font-size: .7rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.swing-score { display: flex; align-items: center; gap: .25rem; margin: .2rem 0 .3rem; }
.swing-score .num { font: 600 2.4rem/1 Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.swing-moves { display: flex; flex-wrap: wrap; gap: .35rem .8rem; font-size: .78rem; }
.chg { white-space: nowrap; color: var(--muted); }
.chg.up { color: #7fbf8a; }
.chg.down { color: #d98b7a; }
.spark { display: block; width: 100%; height: auto; max-height: 120px; }
.spark polyline { fill: none; stroke: var(--gilt); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark circle { fill: var(--gilt); }
.spark circle.last { fill: var(--ivory); }
.spark .axis { stroke: var(--line); stroke-width: 1; }
.spark text { font: 500 10px Inter, system-ui, sans-serif; }
.spark text.val { fill: var(--ivory); }
.spark text.date { fill: var(--muted); }
.tracker { margin-top: .7rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: .7rem; background: var(--panel); cursor: default; }
.tracker.top { margin-top: 1rem; }
.tracker-label { color: var(--gilt); font-size: .65rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; margin-bottom: .35rem; }
.tracker .swing-moves { margin-top: .4rem; }
.club.tappable { cursor: pointer; }
.club.tappable:focus-visible { outline: 1px solid var(--gilt); outline-offset: 2px; }
.club-more { margin-top: .35rem; color: var(--gilt); font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.tag.swing-chip { border-color: var(--bourbon); color: var(--gilt); }
.tag.swing-chip.hot { background: var(--bourbon); border-color: var(--bourbon); color: var(--night); }
.pillars { list-style: none; margin: 1rem 0 .6rem; padding: 0; display: grid; gap: .55rem; }
.pillar-row { display: flex; justify-content: space-between; align-items: baseline; font-size: .82rem; margin-bottom: .25rem; }
.pillar-weight { color: var(--muted); font-size: .7rem; }
.pillar-val { font-weight: 600; font-variant-numeric: tabular-nums; margin-right: .4rem; }
.pillars .chg { font-size: .72rem; }
.bar { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar .fill { height: 100%; background: var(--gilt); }
.club-trend { margin-top: .3rem; font-size: .75rem; }
.club-trend.up { color: #7fbf8a; }
.club-trend.down { color: #d98b7a; }

/* Matched sessions (staff) */
.sessions-box { margin: 1.25rem 0 0; border-top: 1px solid var(--line); padding-top: .9rem; }
.sessions-box summary { cursor: pointer; color: var(--gilt); font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.sessions { list-style: none; margin: .6rem 0 0; padding: 0; }
.sess { padding: .7rem 0; border-top: 1px solid var(--line); }
.sess-top { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; }
.tag.lvl { white-space: nowrap; }
.lvl-certain .tag.lvl, .lvl-high .tag.lvl { border-color: #7fbf8a; color: #7fbf8a; }
.lvl-doubtful .tag.lvl, .lvl-unassigned .tag.lvl { border-color: #d98b7a; color: #d98b7a; }

/* Last shot on the phone, and the club it was filed under */
.shot { margin: 0 0 1.5rem; padding: 1rem 1rem 1.1rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--panel); text-align: center; }
.shot-num { margin: .35rem 0 .15rem; color: var(--gilt); font: 600 3rem/1 Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.shot-num .unit { color: var(--muted); font-size: .8125rem; font-weight: 500; }
.shot-club { margin: 0; font: 600 1.5rem/1.2 "Cormorant SC", Georgia, serif; letter-spacing: .03em; }
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(3.25rem, 1fr)); gap: .5rem; margin: .75rem 0 0; }
.chips:empty { display: none; }
.chip { min-height: 2.75rem; padding: 0 .25rem; border: 1px solid var(--line); border-radius: .6rem; background: transparent; color: var(--ivory); font: 600 1rem/1 Inter, system-ui, sans-serif; cursor: pointer; }
.chip[aria-pressed="true"] { border-color: var(--gilt); background: var(--gilt); color: var(--night); }
.chip:focus-visible { outline: 2px solid var(--gilt); outline-offset: 2px; }
.chip:disabled { opacity: .5; cursor: default; }
.shot .link { min-height: 2.75rem; }
.shot #shot-note:empty { display: none; }

/* Bay kiosk (big screen, landscape) */
body.kiosk { font-size: 20px; }
.kiosk-shell { max-width: 1600px; margin: 0 auto; padding: 1.25rem 2.5rem; }
.kiosk-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 1.5rem; }
.kiosk-head h1 { font-size: 2.6rem; }
.kiosk-who { font: 600 1.8rem/1.1 "Cormorant SC", Georgia, serif; text-align: right; }
.kiosk-out { width: auto; margin-top: .5rem; font-size: .9rem; }
.kiosk-welcome { display: flex; align-items: center; gap: 3rem; justify-content: center; min-height: 60vh; }
.kiosk-welcome .lede { text-align: left; max-width: 28rem; font-size: 1.2rem; }
.kiosk-big { font: 600 3rem/1.1 "Cormorant SC", Georgia, serif; margin: 0 0 1rem; }
.kiosk-qr { width: 340px; height: 340px; background: #fff; padding: 14px; border-radius: 1rem; }
.kiosk-held { min-height: 75vh; }
.kiosk-held .kiosk-qr { width: 420px; height: 420px; }
.kiosk-held-help { margin-bottom: 0; }
.kiosk-open-note { margin: 1rem 0 0; text-align: center; color: var(--gilt); }
.kiosk-top { display: grid; grid-template-columns: 1fr 18rem; gap: 1.5rem; align-items: start; }
.kiosk-last { padding: 1rem 1.25rem; border: 1px solid var(--gilt); border-radius: .9rem; background: var(--panel); text-align: center; }
.kiosk-last-num { font: 600 4rem/1 Inter, system-ui, sans-serif; color: var(--gilt); margin: .3rem 0; }
.kiosk-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.kiosk-table th { text-align: right; color: var(--muted); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
.kiosk-table th:first-child, .kiosk-table td:first-child { text-align: left; }
.kiosk-table td { text-align: right; padding: .3rem .6rem; border-bottom: 1px solid var(--line); }
.kiosk-table th.today { color: var(--gilt); }
.kiosk-table tr:not(.hit) td.today { color: var(--line); }
.kiosk-table td.big { font-weight: 600; font-size: 1.15em; }
.kiosk-table tr.hit td:first-child { color: var(--gilt); font-weight: 600; }
.kiosk-table tr.now td { background: rgba(200, 163, 106, .16); }
.kiosk-table tr.now td:first-child { box-shadow: inset 4px 0 0 var(--gilt); padding-left: .7rem; }
.kiosk-whobox { display: flex; gap: 1.25rem; align-items: center; }
.kiosk-next { text-align: center; }
.kiosk-qr-small { width: 110px; height: 110px; background: #fff; padding: 6px; border-radius: .5rem; display: block; margin: 0 auto .25rem; }
body.kiosk .swing { margin-bottom: .75rem; padding: .75rem 1rem; }
body.kiosk .pillars li { margin: .15rem 0; }

/* Save: session briefs */
.section-title { margin: 1.75rem 0 .75rem; color: var(--gilt); font: 600 .75rem/1 Inter, system-ui, sans-serif; letter-spacing: .2em; text-transform: uppercase; }
.brief { margin: 0 0 .75rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: .9rem; background: var(--panel); }
.brief summary { display: flex; flex-direction: column; gap: .2rem; cursor: pointer; list-style: none; }
.brief summary::-webkit-details-marker { display: none; }
.brief-when { font: 600 1.15rem/1.2 "Cormorant SC", Georgia, serif; letter-spacing: .03em; }
.brief-meta { color: var(--muted); font-size: .8rem; }
.brief-focus-label { margin-top: .9rem; color: var(--gilt); font-size: .65rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.brief-focus { margin: .3rem 0 .6rem; padding-left: .7rem; border-left: 2px solid var(--bourbon); font-size: .9rem; }
.brief-highlights { margin: 0 0 .6rem; padding-left: 1.1rem; color: var(--muted); font-size: .82rem; }
.brief-highlights li { margin: .15rem 0; }
.brief-table { width: 100%; border-collapse: collapse; font-size: .82rem; font-variant-numeric: tabular-nums; }
.brief-table th { text-align: left; color: var(--muted); font-weight: 500; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; padding: .35rem 0; border-bottom: 1px solid var(--line); }
.brief-table td { padding: .4rem 0; border-bottom: 1px solid var(--line); }
.brief-table th:not(:first-child), .brief-table td:not(:first-child) { text-align: right; }
.chg.flat { color: var(--muted); }

/* Help */
.help-fab { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 10; padding: .7rem 1.1rem; border: 1px solid var(--gilt); border-radius: 999px; background: var(--night); color: var(--gilt); font: 600 .85rem Inter, system-ui, sans-serif; letter-spacing: .06em; box-shadow: 0 4px 18px rgba(0,0,0,.45); cursor: pointer; }
.help-fab:hover, .help-fab:focus-visible { background: var(--gilt); color: var(--night); outline: none; }
.help-dialog { width: min(92vw, 26rem); padding: 1.2rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--panel); color: var(--ivory); }
.help-dialog::backdrop { background: rgba(5, 10, 7, .7); }
.help-title { margin: 0 0 .3rem; font: 600 1.4rem/1.2 "Cormorant SC", Georgia, serif; }
.help-sub { margin: 0 0 .8rem; color: var(--muted); font-size: .85rem; }
.help-text { box-sizing: border-box; width: 100%; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: .6rem; background: var(--night); color: inherit; font: inherit; resize: vertical; }
.help-status { min-height: 1.2em; margin: .5rem 0; color: var(--muted); font-size: .82rem; }
.help-status a { color: var(--gilt); }
.help-row { display: flex; gap: .6rem; justify-content: flex-end; }
.help-row .button { width: auto; padding: .65rem 1.1rem; }
main.shell { padding-bottom: 5rem; }

/* Connect */
.scanner { margin: 1rem 0; }
.scanner video { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--gilt); border-radius: .9rem; background: #000; margin-bottom: .6rem; }
.steps { margin: 1.25rem 0 0; padding-left: 1.2rem; color: var(--muted); font-size: .9rem; }
.steps li { margin: .35rem 0; }
.steps b { color: var(--ivory); }

/* Bay screen: Run bay / Reset bay */
.kiosk-controls { display: flex; gap: .75rem; align-items: center; justify-content: flex-end; margin: -.75rem 0 1rem; }
.kiosk-controls .button { width: auto; padding: .6rem 1.4rem; font-size: 1rem; }
.kiosk-state { color: var(--muted); font-size: .95rem; margin-right: auto; padding-left: 1.1rem; position: relative; }
.kiosk-state::before { content: ""; position: absolute; left: 0; top: .45em; width: .6rem; height: .6rem; border-radius: 50%; background: var(--muted); }
.kiosk-state[data-kind="ok"]::before { background: #5fbf7a; }
.kiosk-state[data-kind="warn"]::before, .kiosk-state[data-kind="sleep"]::before { background: var(--gilt); }
.kiosk-state[data-kind="bad"]::before { background: #d9695f; }
.kiosk-state[data-kind="busy"]::before { background: var(--gilt); animation: kiosk-pulse 1.2s ease-in-out infinite; }
@keyframes kiosk-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .kiosk-state[data-kind="busy"]::before { animation: none; } }
.kiosk-confirm { margin: 0 0 1rem; padding: 1rem 1.25rem; border: 1px solid var(--gilt); border-radius: .9rem; background: var(--panel); display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.kiosk-confirm p { margin: 0; flex: 1 1 20rem; }
.kiosk-confirm .button { width: auto; padding: .6rem 1.4rem; }

/* Bay screen in the small window beside ProTee (about a fifth of the monitor, ~350px wide) */
@media (max-width: 720px) {
  body.kiosk { font-size: 15px; }
  .kiosk-shell { padding: .7rem .75rem 1rem; }
  .kiosk-head { flex-direction: column; align-items: stretch; gap: .6rem; margin-bottom: .7rem; }
  .kiosk-head h1 { font-size: 1.8rem; }
  .kiosk-whobox { justify-content: space-between; gap: .6rem; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: .8rem; background: var(--panel); }
  .kiosk-who { font-size: 1.3rem; text-align: left; overflow-wrap: anywhere; }
  .kiosk-out { margin-top: .35rem; padding: .45rem .8rem; }
  .kiosk-qr-small { width: 84px; height: 84px; padding: 4px; }
  .kiosk-next .club-detail { font-size: .68rem; max-width: 84px; line-height: 1.2; }
  .kiosk-controls { flex-wrap: wrap; gap: .5rem; margin: 0 0 .8rem; }
  .kiosk-state { flex: 1 0 100%; margin: 0; font-size: .9rem; line-height: 1.35; }
  .kiosk-controls .button { flex: 1 1 0; padding: .65rem .4rem; font-size: .95rem; }
  .kiosk-confirm { padding: .8rem; }
  .kiosk-confirm p { flex-basis: 100%; }
  .kiosk-confirm .button { flex: 1 1 0; }
  .kiosk-welcome { flex-direction: column; gap: 1rem; min-height: 0; padding-top: .5rem; text-align: center; }
  .kiosk-welcome .lede { text-align: center; font-size: .98rem; max-width: none; }
  .kiosk-big { font-size: 1.9rem; margin-bottom: .6rem; }
  .kiosk-qr { width: min(100%, 300px); height: auto; aspect-ratio: 1; padding: 10px; }
  .kiosk-held { min-height: 70vh; }
  .kiosk-held .kiosk-qr { width: min(100%, 320px); height: auto; }
  .kiosk-top { grid-template-columns: 1fr; gap: .7rem; }
  .kiosk-last { padding: .7rem 1rem; }
  .kiosk-last-num { font-size: 3rem; }
  body.kiosk .swing { margin-bottom: 0; padding: .7rem .85rem; }
  body.kiosk .tracker { display: none; }           /* the progress chart lives on the phone */
  .kiosk-table { margin-top: .7rem; }
  .kiosk-table th { font-size: .62rem; letter-spacing: .06em; padding: .35rem .25rem; }
  .kiosk-table td { padding: .32rem .25rem; }
  /* Room for four columns: Club, Book carry, Today carry, Shots. */
  .kiosk-table th:nth-child(3), .kiosk-table td:nth-child(3),
  .kiosk-table th:nth-child(5), .kiosk-table td:nth-child(5),
  .kiosk-table th:nth-child(6), .kiosk-table td:nth-child(6),
  .kiosk-table th:nth-child(7), .kiosk-table td:nth-child(7),
  .kiosk-table th:nth-child(8), .kiosk-table td:nth-child(8) { display: none; }
  body.kiosk .fine { font-size: .72rem; }
}
