/* The Marker — large, plain, high-contrast. Built for a phone in bright sun,
   held by someone who has just putted out. Touch targets 56px and up. */
:root {
  /* 1.1.0 (Willy, 31 Oct 2026): the Lake blue look, with a fairway-green trim
     line under the header, chosen together with The Scorecard. The names stay
     ("--green" is the main colour) so every screen follows without change. */
  --lake: #2F7BC4; --trim: #5DB36A;
  --green: #1F5C99; --green-dark: #174A7E; --green-soft: #E3EEF8;
  --ground: #EDF3F9; --card: #FFFFFF; --line: #CBD6E2; --line-strong: #9FB2C6;
  --ink: #18293A; --ink-2: #34485C; --ink-3: #46586A;
  --under: #1F6B45; --over: #A2412F; --warn-bg: #FBEFD5; --warn-ink: #6B4A0E;
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--sans); font-size: 19px; -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-user-select: none; user-select: none; }
a { color: var(--green); }

#app { max-width: 560px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }

.top { background: var(--lake); color: #fff; padding: calc(14px + env(safe-area-inset-top)) 18px 14px; display: flex; flex-direction: column; gap: 6px; border-bottom: 4px solid var(--trim); }
.top .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.top .title { font-family: var(--serif); font-size: 28px; font-weight: 600; line-height: 1.1; }
.top .sub { font-size: 13px; letter-spacing: 2px; font-weight: 700; text-transform: uppercase; }
.pill { font-size: 14px; font-weight: 800; background: var(--green-dark); color: #fff; padding: 6px 11px; border-radius: 999px; border: none; white-space: nowrap; }
.pill.light { background: #fff; color: var(--green); }
.hole-title { display: flex; align-items: baseline; gap: 14px; }
.hole-title .big { font-family: var(--serif); font-size: 44px; font-weight: 600; line-height: 1; }
.hole-title .par { font-size: 26px; font-weight: 800; }
.hole-meta { font-size: 20px; font-weight: 700; display: flex; gap: 18px; flex-wrap: wrap; margin-top: 4px; }

.body { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.foot { padding: 12px 16px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
h2 { font-family: var(--serif); font-size: 27px; font-weight: 600; margin: 0; }
p { margin: 0; line-height: 1.45; }
.muted { color: var(--ink-3); font-size: 16px; line-height: 1.45; }
.label { font-size: 13px; font-weight: 800; letter-spacing: 1.5px; color: var(--ink-3); text-transform: uppercase; }
.field { display: flex; flex-direction: column; gap: 6px; }

.btn { min-height: 60px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); font-weight: 800; font-size: 19px; padding: 10px 16px; display: flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; color: var(--ink); }
.btn.primary { background: var(--green); color: #fff; border-color: var(--green); }
.btn.outline { border: 2px solid var(--green); color: var(--green); }
.btn.dashed { border: 2px dashed var(--line-strong); background: transparent; color: var(--green); min-height: 52px; }
.followrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.btn.rm { min-height: 92px; padding: 0 18px; color: var(--ink-3); font-weight: 700; }
.btn .ico { width: 26px; height: 26px; margin-right: 10px; flex: none; }
.btn.danger { color: var(--over); border-color: var(--over); }
.btn[disabled] { opacity: .45; cursor: default; }
.btn.tall { min-height: 92px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; text-align: left; padding: 14px 18px; }
.btn.tall small { font-size: 16px; font-weight: 400; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

.choice { min-height: 54px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); font-weight: 600; font-size: 17px; padding: 8px 12px; }
.choice.on { background: var(--green); color: #fff; border: 2px solid var(--green); font-weight: 800; }
.input { min-height: 56px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); padding: 0 14px; font-size: 19px; width: 100%; }
.input:focus { outline: 3px solid var(--green-soft); border-color: var(--green); }
.stepper { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 6px; }
.stepper button { width: 60px; height: 52px; border-radius: 10px; border: none; background: var(--green-soft); color: var(--green); font-size: 28px; font-weight: 800; }
.stepper button[disabled] { opacity: .35; }
.stepper .val { flex: 1; text-align: center; font-size: 26px; font-weight: 800; }

.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; align-items: center; gap: 14px; min-height: 62px; padding: 8px 14px; border-radius: 12px; background: var(--card); border: 1.5px solid var(--line); text-align: left; width: 100%; }
.item.on { background: var(--green-soft); border: 2px solid var(--green); }
.item .box { width: 32px; height: 32px; flex-shrink: 0; border-radius: 8px; border: 2px solid var(--line-strong); background: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; color: #fff; }
.item.on .box { background: var(--green); border-color: var(--green); }
.item .txt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.item .name { font-size: 19px; font-weight: 800; }
.item .meta { font-size: 15px; color: var(--ink-3); }
.item[disabled] { opacity: .5; }
.saved-row { display: flex; gap: 8px; align-items: stretch; }
.saved-row .item { flex: 1; min-width: 0; }
.saved-row .del { flex-shrink: 0; color: var(--over); padding: 0 14px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }

.names { display: flex; gap: 6px; padding: 12px 16px 0; }
.names button { flex: 1 1 0; min-height: 48px; border-radius: 999px; font-weight: 800; font-size: 15px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink-3); padding: 4px 6px; }
.names button.done { background: var(--green-soft); color: var(--ink); border-color: var(--green); }
.names button.now { background: var(--green); color: #fff; border: 2px solid var(--green); }
.who .step { font-size: 15px; font-weight: 800; letter-spacing: 1.5px; color: var(--ink-3); }
.who .name { font-family: var(--serif); font-size: 34px; font-weight: 600; line-height: 1.1; }
.status { font-size: 17px; font-weight: 800; border-radius: 10px; padding: 10px 12px; }
.status.empty { background: var(--warn-bg); color: var(--warn-ink); }
.status.done { background: var(--green); color: #fff; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile { height: 88px; border-radius: 16px; background: var(--card); border: 1.5px solid var(--line-strong); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.tile b { font-size: 40px; line-height: 1; }
.tile span { font-size: 14px; font-weight: 600; }
.tile.on { background: var(--green); color: #fff; border: 3px solid var(--green); }

.player { background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.player .head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.player .head b { font-size: 19px; }
.player .head span { font-size: 16px; font-weight: 800; color: var(--ink-3); }
.player .ctl { display: flex; align-items: center; gap: 10px; }
.player .ctl button { width: 72px; height: 64px; border-radius: 12px; border: none; font-size: 34px; font-weight: 800; }
.player .ctl .minus { background: var(--green-soft); color: var(--green); }
.player .ctl .plus { background: var(--green); color: #fff; }
.player .ctl input { flex: 1; min-width: 0; height: 64px; border: 1.5px solid var(--line); border-radius: 12px; text-align: center; font-size: 40px; font-weight: 800; background: #fff; }
.player .note { font-size: 14px; color: var(--ink-3); }

.under { color: var(--under); } .over { color: var(--over); }
.cgrid { display: flex; flex-direction: column; gap: 2px; }
.crow { display: grid; grid-template-columns: 44px 34px 48px 38px repeat(var(--n), minmax(0, 1fr)); align-items: center; width: 100%; border: 0; border-radius: 6px; padding: 0; background: transparent; color: var(--ink); text-align: center; }
.crow > div { padding: 6px 2px; font-size: 17px; text-align: center; }
.crow .hd { font-size: 12px; font-weight: 800; color: var(--ink-3); letter-spacing: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crow.plain { background: #fff; }
.crow.zebra { background: #EFEADD; }
.crow.now-row { background: var(--green-soft); outline: 2px solid var(--green); }
.crow.total { border-top: 2px solid var(--green); border-radius: 0; font-weight: 800; margin-top: 6px; }

.sum { background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.sum .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sum .stats b { font-size: 30px; display: block; }
.sum .stats span { font-size: 14px; color: var(--ink-3); }

.banner { border-radius: 12px; padding: 12px 14px; font-size: 17px; line-height: 1.4; }
.banner.bad { background: #F8E1DC; color: #7A2A1C; }
.banner.ok { background: var(--green-soft); color: var(--green-dark); }
.banner.warn { background: var(--warn-bg); color: var(--warn-ink); }
.holes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.holes-grid label { display: flex; align-items: center; justify-content: space-between; gap: 6px; background: var(--card); border: 1.5px solid var(--line); border-radius: 10px; padding: 4px 8px; font-weight: 800; }
.holes-grid select { min-height: 44px; font-size: 18px; border-radius: 8px; border: 1px solid var(--line); background: #fff; padding: 0 6px; }
.links { display: flex; justify-content: center; gap: 18px; font-size: 16px; flex-wrap: wrap; }
.spin { opacity: .6; }

/* Hand entry: one row per hole (par, yards, handicap number). */
.hole-rows { display: flex; flex-direction: column; gap: 6px; }
.hole-row { display: grid; grid-template-columns: 44px 1fr 1.2fr 1fr; gap: 8px; align-items: center; background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 6px 10px; }
.hole-row.hd { background: none; border: none; padding: 0 10px; font-size: 14px; font-weight: 800; letter-spacing: .06em; color: var(--ink-3); text-transform: uppercase; }
.hole-row b { font-size: 20px; }
.hole-row select, .hole-row .input { height: 48px; font-size: 19px; min-width: 0; width: 100%; }

/* Reading a picture: the spinning wheel. */
.reading { display: flex; gap: 16px; align-items: center; padding: 16px; border-radius: 14px; background: var(--green-soft); color: var(--green-dark); font-size: 18px; line-height: 1.4; }
.wheel { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; border: 5px solid rgba(31,92,153,.2); border-top-color: var(--green); animation: turn .9s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }

/* Checking a card read from pictures: laid out like the club's card. */
.verdict { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px; font-size: 17px; line-height: 1.45; }
.verdict .big { font-size: 40px; font-weight: 900; line-height: 1; min-width: 40px; text-align: center; }
.verdict.ok { background: var(--green-soft); color: var(--green-dark); }
.verdict.next { background: var(--warn-bg); color: var(--warn-ink); }
.verdict.bad { background: #F8E1DC; color: #7A2A1C; }
.cardwrap { overflow-x: auto; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; }
.clubcard { border-collapse: collapse; width: 100%; min-width: 0; font-variant-numeric: tabular-nums; }
.clubcard th, .clubcard td { padding: 9px 2px; text-align: center; font-size: 17px; border-bottom: 1px solid rgba(0,0,0,.08); }
.clubcard td.tot { padding-right: 6px; }
.clubcard th { text-align: left; padding-left: 8px; font-size: 15px; font-weight: 800; letter-spacing: .03em; white-space: nowrap; }
.clubcard th small { display: block; font-size: 13px; font-weight: 600; opacity: .85; }
.clubcard tr.hd { background: var(--green); color: #fff; }
.clubcard tr.hd td, .clubcard tr.hd th { font-weight: 800; font-size: 15px; }
.clubcard tr.hcp, .clubcard tr.par { background: #f4f1ea; color: var(--ink); }
.clubcard tr.par td { font-weight: 800; }
.clubcard td.tot { font-weight: 800; }
.clubcard td.bad { background: #F8E1DC !important; color: #7A2A1C !important; font-weight: 900; outline: 2px solid var(--over); outline-offset: -2px; }
.clubcard td.warnc { background: #FBEBC8 !important; color: #6b4a00 !important; outline: 2px solid #d9a321; outline-offset: -2px; }
.clubcard td.mark { font-size: 20px; font-weight: 900; width: 34px; background: #fff; }
.clubcard td.mok { color: var(--green); }
.clubcard td.mwarn { color: #b7860b; }
.clubcard td.mbad { color: var(--over); }
details.retake summary { font-size: 17px; font-weight: 700; color: var(--green-dark); padding: 8px 0; cursor: pointer; }
.clubcard .tick { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; margin-right: 6px; font-size: 14px; font-weight: 900; vertical-align: middle; background: #fff; }
.clubcard .tick.tok { color: var(--green); }
.clubcard .tick.twarn { color: #b7860b; }
.clubcard .tick.tbad { color: #fff; background: var(--over); }
.clubcard th small { padding-left: 28px; }
@media (max-width: 520px) {
  .clubcard th, .clubcard td { font-size: 14px; padding: 8px 1px; letter-spacing: -.02em; }
  .clubcard th { padding-left: 5px; font-size: 13px; }
  .clubcard th small { font-size: 11px; padding-left: 0; }
  .clubcard .tick { width: 17px; height: 17px; font-size: 11px; margin-right: 3px; }
}
.clubcard .tick.tok { box-shadow: inset 0 0 0 1.5px currentColor; }

/* The group chooser on the players screen. */
.groupsel { height: 60px; font-size: 20px; font-weight: 700; appearance: none; -webkit-appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='12'%3E%3Cpath d='M1 1l8 9 8-9' fill='none' stroke='%231F5C99' stroke-width='3'/%3E%3C/svg%3E") no-repeat right 16px center; padding-right: 48px; }

/* The Scorecard's calendar */
.datebtn { width: 100%; min-height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); font-size: 24px; font-weight: 800; }
.datebtn-hint { color: var(--ink-3); font-size: 20px; }
.cal { margin-top: 8px; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: 12px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cal-arrow { width: 52px; height: 48px; border-radius: 10px; font-size: 28px; line-height: 1; border: 1.5px solid var(--line); background: var(--card); }
.cal-title { display: flex; gap: 10px; align-items: center; }
.cal-jump { font-weight: 800; font-size: 22px; background: none; border: 0; border-bottom: 2px dashed var(--line-strong); padding: 2px 4px; }
.cal-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 12px 0 4px; }
.cal-pick-btn { min-height: 52px; border-radius: 10px; font-size: 19px; border: 1.5px solid var(--line); background: var(--card); }
.cal-pick-btn.picked { background: var(--green); color: #fff; border-color: var(--green); font-weight: 800; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-week { margin: 12px 0 4px; }
.cal-week span { text-align: center; font-size: 15px; color: var(--ink-3); font-weight: 700; min-width: 0; }
.cal-day { aspect-ratio: 1; min-width: 0; border-radius: 10px; border: 1.5px solid transparent; background: var(--card); font-size: 19px; font-weight: 600; }
.cal-day:disabled { opacity: .3; }
.cal-day.today { border-color: var(--line-strong); font-weight: 800; }
.cal-day.picked { background: var(--green); color: #fff; font-weight: 800; border-color: var(--green); }
.cal-blank { min-width: 0; aspect-ratio: 1; }
.cal-typed { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 8px; }
.cal-foot { display: flex; gap: 10px; margin-top: 12px; }
.cal-foot .btn { flex: 1; }

/* 0.6.1: start screen and Your cards */
.btn.big { min-height: 170px; }
.btn.big span:first-child { font-size: 26px; }
.btn.big small { font-size: 18px; }
.btn.split { justify-content: space-between; text-align: left; }
.badge { background: #B7791F; color: #fff; border-radius: 999px; padding: 4px 12px; font-size: 16px; font-weight: 800; }
.who { text-align: center; font-size: 16px; color: var(--ink-3); }
h3.sec { font-family: var(--serif); font-size: 23px; font-weight: 600; margin: 4px 0 -4px; }
.item.amb { background: #FBEFD9; border: 2px solid #C98A1B; }
.item.amb .meta { color: #5C3D0A; }
.item .row2 { margin-top: 8px; }
.item .row2 .btn { min-height: 50px; }

/* Caddie scoring (Willy, 29 Oct 2026): a quiet icon on the first screen, the code and its QR square. */
.caddie-icon { align-self: center; display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: none; color: var(--ink-3); min-width: 64px; min-height: 64px; padding: 6px; font-size: 15px; }
.qrbox { align-self: center; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; width: min(260px, 70vw); }
.qr { display: block; width: 100%; height: auto; }
.bigcode { text-align: center; font-size: 40px; font-weight: 800; letter-spacing: 6px; }
.bigcode-in { font-size: 30px !important; font-weight: 800; letter-spacing: 6px; text-align: center; text-transform: uppercase; }
.icon-row { display: flex; justify-content: center; gap: 28px; }

/* iPad and other wide screens (Willy, 31 Oct 2026, option 1): the whole app is
   drawn larger instead of a narrow phone column in the middle, so it fills
   most of the screen and stays easy to read. Everything scales together. */
@media (min-width: 760px) {
  #app { zoom: 1.35; min-height: calc(100dvh / 1.35); }
}
@media (min-width: 1000px) {
  #app { zoom: 1.6; min-height: calc(100dvh / 1.6); }
}

/* 1.1.0: the game's live leaderboard (option B) — big type, one row per golfer, tap for the card. */
.board { display: flex; flex-direction: column; gap: 6px; }
.board-row { display: grid; grid-template-columns: 3.2em minmax(0, 1fr) 5em 2.8em; align-items: center; gap: 8px; min-height: 60px; padding: 8px 12px;
  border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); text-align: left; font-size: 20px; color: var(--ink); }
.board-row.hd { min-height: 0; border: none; background: none; padding: 0 12px; font-size: 14px; font-weight: 800; letter-spacing: 1px; color: var(--ink-3); text-transform: uppercase; }
.board-row .pl { font-weight: 800; color: var(--ink-3); }
.board-row .nm { font-weight: 800; overflow-wrap: anywhere; }
.board-row .sc { font-weight: 800; font-size: 24px; text-align: right; }
.board-row .th { text-align: right; color: var(--ink-3); font-weight: 700; }
.board-row.hd .sc, .board-row.hd .th { font-size: 14px; white-space: nowrap; }
/* 1.1.0: "Let my caddie score" on Who's playing?, no longer tucked under Tee off. */
.btn.caddie-choice { border: 2px solid var(--green); }
/* The Game button on every hole (5 Nov 2026): the game's name or "No game", cut short when long. */
.gamepill { max-width: 38vw; overflow: hidden; text-overflow: ellipsis; }
/* "+ Add" at the end of the golfers' names on a hole */
.names button.addlate { flex: 0 0 auto; border-style: dashed; color: var(--green); background: transparent; }
