/* Bobblehead Golf grounds. Same tokens as the partner site: night, lime, Barlow Condensed + Inter. */
:root {
  --bg: #F3F6F8; --surface: #FFFFFF; --fg: #17212A; --muted: #5B6874; --line: #DCE3E8; --chip: #E8EEF2;
  --night: #121A21; --night2: #1B2630; --night-fg: #F3F6F8; --night-muted: #9AA7B2; --lime: #C6F432; --lime-ink: #4F6B00;
  --ok: #2F8F4E; --warn: #B7791F; --bad: #C0392B; --accent: var(--lime-ink);
  --display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif; --body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace; color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0D1318; --surface: #17212A; --fg: #E9EEF2; --muted: #9AA7B2; --line: #26323C; --chip: #1E2A34; --ok: #3FAE63; --warn: #E0A43A; --bad: #FF7A6B; --accent: #C6F432; color-scheme: dark; } }
:root[data-theme="dark"] { --bg: #0D1318; --surface: #17212A; --fg: #E9EEF2; --muted: #9AA7B2; --line: #26323C; --chip: #1E2A34; --ok: #3FAE63; --warn: #E0A43A; --bad: #FF7A6B; --accent: #C6F432; color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 15px/1.5 var(--body); -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1; text-transform: uppercase; }
a { color: var(--accent); }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: 44px; width: 100%; }
input[type=checkbox] { width: 22px; height: 22px; min-height: 0; padding: 0; accent-color: #4F6B00; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: .85em; }

/* top bar */
.bar { background: var(--night); color: var(--night-fg); display: flex; align-items: center; gap: 12px; padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 10px; position: sticky; top: 0; z-index: 1000; }
.brand { font-family: var(--display); font-weight: 800; font-size: 1.25rem; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; color: var(--night-fg); text-decoration: none; }
.brand b { color: var(--lime); }
.bar .sp { flex: 1; }
.bar .who { color: var(--night-muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar button.ghost { background: transparent; color: var(--night-fg); border: 1px solid #3A4854; border-radius: 999px; padding: 6px 12px; min-height: 36px; font-size: .85rem; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 12px 18px; min-height: 48px; font-weight: 600; background: var(--chip); color: var(--fg); text-decoration: none; }
.btn.primary { background: var(--lime); color: #121A21; }
.btn.dark { background: var(--night); color: var(--night-fg); }
.btn.danger { background: transparent; color: var(--bad); border: 1px solid currentColor; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: .88rem; border-radius: 999px; }
.btn[disabled] { opacity: .55; cursor: default; }
.big { width: 100%; min-height: 64px; font-size: 1.15rem; font-family: var(--display); text-transform: uppercase; letter-spacing: .02em; font-weight: 800; border-radius: 16px; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; border: 2px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 999px; padding: 8px 14px; min-height: 44px; font-weight: 600; }
.chip[aria-pressed="true"] { border-color: var(--fg); box-shadow: 0 0 0 2px var(--lime) inset; }
.chip .dot { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid rgba(0,0,0,.45); flex: none; }
.chip .tick { color: var(--ok); font-weight: 800; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--chip); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: transparent; color: var(--muted); border-radius: 9px; min-height: 44px; font-weight: 700; font-family: var(--display); text-transform: uppercase; font-size: 1.05rem; letter-spacing: .03em; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.15); }

/* cards and tiles */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 700px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.tile .v { font-family: var(--display); font-weight: 800; font-size: 2rem; line-height: 1; }
.tile .l { color: var(--muted); font-size: .82rem; margin-top: 4px; }
.prog { height: 6px; background: var(--chip); border-radius: 99px; margin-top: 8px; overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.note { background: var(--night2); color: var(--night-fg); border-radius: 12px; padding: 10px 14px; font-size: .92rem; }
.note b { color: var(--lime); font-family: var(--display); text-transform: uppercase; letter-spacing: .03em; margin-right: 6px; }

/* map markers */
.leaflet-container { background: #1B2630; font: 13px var(--body); }
.pin-ic { background: none; border: 0; }
.pin-ic b { position: absolute; left: 20px; top: 0; background: rgba(18,26,33,.85); color: #fff; font: 700 12px/1 var(--body); padding: 3px 5px; border-radius: 4px; white-space: nowrap; }
.pin-ic.prev { opacity: .45; }
.tee-ic i { display: block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #000; box-shadow: 0 0 0 1.5px #fff; }
.tee-ic.faded { opacity: .4; }
.lbl-ic span { display: inline-block; transform: translate(-50%, -50%); background: rgba(18,26,33,.8); color: #C6F432; font: 800 13px/1 var(--display); padding: 3px 6px; border-radius: 6px; white-space: nowrap; }
.me-ic { width: 18px !important; height: 18px !important; margin: -9px 0 0 -9px !important; border-radius: 50%; background: #1F8BFF; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(31,139,255,.5), 0 2px 6px rgba(0,0,0,.5); }

/* tables */
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.sel td { background: color-mix(in srgb, var(--lime) 18%, transparent); }
tbody tr { cursor: pointer; }
.tag { display: inline-block; font-size: .75rem; padding: 2px 8px; border-radius: 99px; background: var(--chip); color: var(--muted); font-weight: 600; white-space: nowrap; }
.tag.ok { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.tag.warn { background: color-mix(in srgb, var(--warn) 20%, transparent); color: var(--warn); }
.tag.lay { background: color-mix(in srgb, #FF4FD8 18%, transparent); color: #C2189A; }

/* toast */
#toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 20px); transform: translate(-50%, 20px); opacity: 0; background: var(--night); color: var(--night-fg); padding: 12px 16px; border-radius: 12px; font-weight: 600; transition: .2s; z-index: 3000; max-width: calc(100vw - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.3); pointer-events: none; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--bad); color: #fff; }
.field { display: grid; gap: 4px; margin-bottom: 10px; }
.field label { font-size: .82rem; color: var(--muted); font-weight: 600; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* report sheet (report.js) */
.rp-back { position: fixed; inset: 0; z-index: 2500; background: rgba(11,17,23,.55); display: flex; align-items: flex-end; justify-content: center; }
.rp-sheet { width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: var(--surface); color: var(--fg); border-radius: 20px 20px 0 0; padding: 16px 16px calc(env(safe-area-inset-bottom, 0px) + 18px); display: grid; gap: 12px; box-shadow: 0 -10px 40px rgba(0,0,0,.35); }
@media (min-width: 700px) { .rp-back { align-items: center; } .rp-sheet { border-radius: 20px; } }
.rp-head { display: flex; align-items: center; justify-content: space-between; }
.rp-head h2 { font-size: 1.7rem; }
.rp-x { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--chip); color: var(--fg); font-size: 1.5rem; }
.rp-types { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rp-type { text-align: left; border: 2px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 12px; padding: 10px 12px; min-height: 52px; font-weight: 600; font-size: .92rem; }
.rp-type.urgent { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.rp-type[aria-pressed="true"] { border-color: var(--fg); box-shadow: 0 0 0 2px var(--lime) inset; }
.rp-row { display: flex; gap: 8px; }
.rp-cam { flex: 1; }
.rp-cam[disabled] { opacity: .5; pointer-events: none; }
.rp-thumbs { display: flex; gap: 8px; }
.rp-thumbs:empty { display: none; }
.rp-th { position: relative; }
.rp-th img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; display: block; }
.rp-th button { position: absolute; top: -8px; right: -8px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--bad); color: #fff; font-weight: 800; }
.rp-marshal { display: flex; align-items: center; gap: 10px; font-weight: 700; min-height: 44px; }
.rp-where { font-size: .85rem; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rp-msg { margin: 0; color: var(--bad); font-weight: 600; min-height: 1em; }
.report-fab { position: fixed; right: 16px; bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); z-index: 1500; border: 0; border-radius: 999px; padding: 14px 20px; min-height: 56px; background: #E5484D; color: #fff; font: 800 1.1rem var(--display); text-transform: uppercase; letter-spacing: .04em; box-shadow: 0 8px 24px rgba(229,72,77,.45); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#toast.act { pointer-events: auto; display: flex; align-items: center; gap: 12px; }
.toast-act { border: 0; background: var(--lime); color: #121A21; font-weight: 800; border-radius: 999px; padding: 8px 14px; min-height: 40px; }
.btn.danger.small { min-height: 40px; }

/* maintenance photo log */
.cond { display: inline-block; color: #fff; font-weight: 800; font-size: .78rem; padding: 2px 8px; border-radius: 99px; white-space: nowrap; text-shadow: 0 1px 1px rgba(0,0,0,.3); }
.sp-opt { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; text-align: left; width: 100%; border: 2px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 12px; padding: 6px; min-height: 64px; }
.sp-opt[aria-pressed="true"] { border-color: var(--fg); box-shadow: 0 0 0 2px var(--lime) inset; }
.sp-opt img, .sp-noimg { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: var(--chip); display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; color: var(--muted); }
.sp-opt b { display: block; font-size: .95rem; }
.sp-opt small { color: var(--muted); font-size: .8rem; }
.sp-choose { display: grid; gap: 8px; }
.sp-choose .hint { margin: 0; }
.sp-new { display: grid; gap: 8px; }
.sp-ref figure { margin: 0; }
.sp-ref img { width: 100%; max-height: 240px; object-fit: cover; border-radius: 12px; display: block; }
.sp-ref figcaption { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.rp-th.big img { width: 100%; height: auto; max-height: 260px; }
.rp-th.big { flex: 1; }
.sp-cond { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.sp-cond button { border: 2px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 12px; min-height: 60px; display: grid; place-items: center; padding: 4px 2px; border-top: 6px solid var(--c); }
.sp-cond button b { font-family: var(--display); font-size: 1.4rem; line-height: 1; }
.sp-cond button small { font-size: .7rem; font-weight: 600; }
.sp-cond button[aria-pressed="true"] { border-color: var(--c); background: color-mix(in srgb, var(--c) 22%, var(--bg)); }
.sp-sum { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sp-spark { display: flex; align-items: flex-end; gap: 3px; height: 46px; padding: 4px; background: var(--bg); border-radius: 10px; }
.sp-spark i { flex: 1; max-width: 22px; border-radius: 3px 3px 0 0; min-height: 4px; }
.sp-why { margin: 0; color: var(--bad); font-weight: 600; font-size: .9rem; }
.sp-list { display: grid; gap: 12px; }
.sp-ph { margin: 0; }
.sp-ph img { width: 100%; max-height: 320px; object-fit: cover; border-radius: 12px; display: block; }
.sp-ph figcaption { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.sp-ph figcaption p { margin: 4px 0 0; color: var(--fg); }
.spot-ic i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; font-style: normal; font-size: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.sp-opt small.bad { color: var(--bad); font-weight: 600; display: block; }
.sp-opt small { display: block; }
#spotList { display: grid; gap: 8px; margin-top: 10px; }
.sp-opt.attn { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.sp-opt > span { min-width: 0; }

.kv .bad, span.bad { color: var(--bad); font-weight: 600; }
