/* Friday Golf Game — one stylesheet, no framework. Mobile first. */

:root {
  --turf: #eef0e3;
  --paper: #fffdf7;
  --ink: #10261a;
  --ink-soft: #2e4336;
  --muted: #65725f;
  --line: #dcdfcb;
  --line-strong: #bec4a8;
  --green: #2f7a45;
  --green-deep: #1d5a31;
  --green-wash: #e0eedb;
  --flag: #e0402f;
  --flag-wash: #fde5e0;
  --gold: #b8871b;
  --gold-wash: #f8ecc6;
  --danger: #b3261e;

  --display: "Fraunces", Georgia, serif;
  --body: "Barlow", system-ui, sans-serif;

  --radius: 14px;
  --shadow: 0 1px 0 rgba(16, 38, 26, .06), 0 10px 30px -18px rgba(16, 38, 26, .35);
  --wrap: 680px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

/* App-like: no double-tap zoom, no grey tap flash. */
html, body { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font: 400 17px/1.5 var(--body);
  color: var(--ink);
  background-color: var(--turf);
  /* a putting green up top + faint mowing stripes */
  background-image:
    radial-gradient(ellipse 380px 220px at 50% -90px, rgba(47, 122, 69, .13) 99%, transparent 100%),
    repeating-linear-gradient(100deg, transparent 0 90px, rgba(47, 122, 69, .035) 90px 180px);
  background-repeat: no-repeat, repeat;
}

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  font-variation-settings: "SOFT" 50, "WONK" 0;
  letter-spacing: -.01em;
  line-height: 1;
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 18px;
}

/* ---------- top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -.01em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wordmark .flag { width: 24px; height: 24px; flex: none; }
.wordmark span { color: var(--green); font-style: italic; }

.topbar nav { display: flex; gap: 4px; }

.topbar nav a {
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
}

.topbar nav a:hover { color: var(--ink); background: rgba(16, 38, 26, .06); }

/* ---------- page heading ---------- */

.page-head { padding: 18px 0 22px; }

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green-deep);
  margin: 0 0 10px;
}

.page-head h1 { font-size: clamp(44px, 12vw, 64px); font-weight: 800; }
.page-head h1.h-md { font-size: clamp(34px, 9vw, 48px); }

.page-head .sub {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 18px;
}

.sub strong { font-weight: 600; }

.tee-sheet { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }

.tee {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  padding: 4px 11px 4px 9px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.tee::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

.spots { font-size: 14px; color: var(--muted); margin-left: 4px; }

main { flex: 1; padding-bottom: 40px; }

/* ---------- cards & sections ---------- */

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 18px;
}

.card > h2, .section-title {
  font-size: 28px;
  margin-bottom: 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.section-title .count {
  font-family: var(--body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--muted);
}

.hint { color: var(--muted); font-size: 15px; margin: -6px 0 16px; }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 28px 12px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  margin-bottom: 18px;
}

/* ---------- game list ---------- */

.games { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 12px; }

.game {
  display: grid;
  grid-template-columns: 68px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 16px 12px 12px;
  text-decoration: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease;
}

.game:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.game:active { transform: translateY(0); }

.date-block {
  text-align: center;
  background: var(--ink);
  color: var(--paper);
  border-radius: 10px;
  padding: 7px 0 8px;
  line-height: 1;
}

.date-block .dow {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #9ed4a9;
}

.date-block .day {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 32px;
  margin: 4px 0 3px;
}

.date-block .mon {
  display: block;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .7;
}

.game .course { font-weight: 600; font-size: 18px; line-height: 1.25; }
.game .when { color: var(--muted); font-size: 15px; }

.fill { display: flex; align-items: center; gap: 10px; margin-top: 7px; }

.bar {
  flex: 1;
  max-width: 160px;
  height: 6px;
  border-radius: 999px;
  background: var(--green-wash);
  overflow: hidden;
}

.bar span { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.bar.full span { background: var(--flag); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--green-wash);
  color: var(--green-deep);
  white-space: nowrap;
}

.game .go {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 700;
  color: var(--line-strong);
  transition: color .15s ease, transform .15s ease;
}

.game:hover .go { color: var(--green); transform: translateX(3px); }

/* ---------- disclosure (add game / edit game / games) ---------- */

details.card { padding: 0; }

details.card > summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

details.card > summary small {
  display: block;
  font-family: var(--body);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 4px;
}

details.card > summary::-webkit-details-marker { display: none; }

details.card > summary::after {
  content: "+";
  font-family: var(--body);
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
  color: var(--green);
  transition: transform .2s ease;
}

details[open].card > summary::after { transform: rotate(45deg); }

details.card > .details-body { padding: 0 20px 20px; }

/* ---------- forms ---------- */

.field { margin-bottom: 16px; }

.field label, .label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink-soft);
}

.row { display: grid; gap: 0 12px; }
@media (min-width: 520px) { .row-2 { grid-template-columns: 1fr 1fr; } }

input, select, textarea {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  appearance: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

textarea { height: auto; min-height: 100px; padding: 12px 14px; resize: vertical; line-height: 1.5; }

select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2310261a' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(47, 122, 69, .18);
}

.is-invalid { border-color: var(--danger); }
.field-error { display: block; color: var(--danger); font-size: 14px; margin-top: 6px; }

.input-prefix { position: relative; }
.input-prefix::before {
  content: "$";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 600;
  color: var(--muted);
}
.input-prefix input { padding-left: 30px; }

/* Checkbox chips (who's in for skins). */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.chip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line-strong);
  background: #fff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip input:checked + span::before { content: "✓"; font-weight: 700; color: #9ed4a9; }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(47, 122, 69, .35); }

/* ---------- combobox (player picker) ---------- */

.cb { position: relative; scroll-margin-top: 12px; }
/* While a picker is open, leave room to scroll it to the top of the screen. */
.cb-open body { padding-bottom: 75vh; }

.cb-trigger {
  width: 100%;
  height: 50px;
  padding: 0 40px 0 14px;
  font: inherit;
  text-align: left;
  color: var(--ink);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2310261a' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.cb-trigger.placeholder { color: var(--muted); }
.cb-trigger:focus-visible, .cb.open .cb-trigger {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(47, 122, 69, .18);
}

.cb-panel {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: 0 24px 50px -20px rgba(16, 38, 26, .45);
  overflow: hidden;
  animation: pop .14s ease both;
  transform-origin: top center;
}

.cb-search { padding: 10px; border-bottom: 1px solid var(--line); }

.cb-search input {
  height: 44px;
  padding-left: 40px;
  background: var(--turf) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2365725f' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center;
  border-color: transparent;
}

.cb-search input:focus { box-shadow: none; border-color: var(--line-strong); background-color: #fff; }
.cb-search input::-webkit-search-cancel-button { display: none; }

.cb-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: min(340px, 50dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.cb-group {
  position: sticky;
  top: -6px;
  background: #fff;
  padding: 12px 10px 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green-deep);
}

.cb-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 8px;
  cursor: pointer;
}

.cb-option.active { background: var(--green-wash); }
.cb-option[aria-selected="true"] .cb-name { font-weight: 600; }
.cb-option[aria-selected="true"]::after { content: "✓"; color: var(--green); font-weight: 700; }
.cb-option[aria-selected="true"] .cb-meta { margin-left: auto; }

.cb-meta {
  font-size: 13px;
  color: var(--muted);
  background: var(--turf);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.cb-action { color: var(--green-deep); font-weight: 600; border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0; }
/* An action listed after the options sits at the bottom, under a rule. */
.cb-option ~ .cb-action { border-bottom: 0; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 4px; }

.cb-empty { padding: 14px 12px; color: var(--muted); font-size: 15px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 22px;
  font: 600 16px/1 var(--body);
  color: var(--paper);
  background: var(--ink);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s ease, transform .1s ease;
}

.btn:hover { background: var(--ink-soft); }
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

.btn-accent { background: var(--green); }
.btn-accent:hover { background: var(--green-deep); }

.btn-ghost {
  color: var(--ink);
  background: transparent;
  border: 1.5px solid var(--line-strong);
}
.btn-ghost:hover { background: rgba(16, 38, 26, .05); }

.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #8c1d17; }

.btn-block { width: 100%; }

.btn[aria-busy="true"] { opacity: .6; pointer-events: none; }

.btn-pair { display: grid; gap: 10px; }
@media (min-width: 520px) { .btn-pair { grid-template-columns: 1fr 1fr; } }

/* ---------- roster + score entry ---------- */

.roster { list-style: none; margin: 0; padding: 0; counter-reset: roster; }

.roster > li { counter-increment: roster; border-bottom: 1px solid var(--line); }
.roster > li:last-child { border-bottom: 0; }

.player-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 8px 0;
}

.player-row::before {
  content: counter(roster, decimal-leading-zero);
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  color: var(--green);
  width: 28px;
  flex: none;
}

.player-row .name { flex: 1; min-width: 0; font-weight: 500; line-height: 1.25; }
.player-row .meta { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }

.you {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--green);
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: 2px;
}

.score-summary { text-align: right; line-height: 1.1; font-variant-numeric: tabular-nums; }
.score-summary .to-par { display: block; font-family: var(--display); font-weight: 700; font-size: 22px; }
.score-summary .strokes { font-size: 13px; color: var(--muted); }
.to-par.under { color: var(--flag); }
.to-par.none { color: var(--line-strong); }

.score-toggle {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 14px;
}
.score-toggle[aria-expanded="true"] { background: var(--green); }

.remove {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: transparent;
  color: var(--danger);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.remove:hover { background: #fbe9e7; border-color: var(--danger); }

.score-entry { padding: 4px 0 18px; animation: rise .25s ease both; }

.holes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

/* A row of nine per side on wider screens, like a scorecard. */
@media (min-width: 560px) { .holes { grid-template-columns: repeat(9, 1fr); gap: 6px; } }

.hole {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 7px 6px 6px;
  border-radius: 10px;
  background: var(--turf);
  text-align: center;
}

.hole .num { font-family: var(--display); font-weight: 700; font-size: 16px; line-height: 1; }
.hole .par { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.hole input {
  height: 46px;
  padding: 0;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.hole input::-webkit-outer-spin-button, .hole input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.hole.under input { color: var(--flag); border-color: rgba(224, 64, 47, .55); }
.hole.saving input { opacity: .55; }
.hole.saved::after, .hole.error::after {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 12px;
  font-weight: 700;
}
.hole.saved::after { content: "✓"; color: var(--green); }
.hole.error::after { content: "!"; color: var(--danger); }
.hole.error input { border-color: var(--danger); }

.entry-total {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 15px;
  color: var(--muted);
}
.entry-total strong { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- scorecard ---------- */

.scorecard-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -20px; padding: 0 20px; }

.scorecard {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.scorecard th, .scorecard td {
  padding: 0 2px;
  height: 40px;
  min-width: 34px;
  border-bottom: 1px solid var(--line);
}

.scorecard .who {
  position: sticky;
  left: 0;
  z-index: 1;
  text-align: left;
  padding: 0 10px 0 0;
  min-width: 110px;
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--paper);
  font-weight: 500;
}

.scorecard thead th { font-weight: 600; }
.scorecard .hole-row th { background: var(--ink); color: var(--paper); font-family: var(--display); font-size: 15px; }
.scorecard .hole-row th:first-child { border-radius: 8px 0 0 0; }
.scorecard .hole-row th:last-child { border-radius: 0 8px 0 0; }
.scorecard .hole-row .who { background: var(--ink); padding-left: 10px; font-family: var(--body); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.scorecard .par-row th { background: var(--green-wash); color: var(--green-deep); font-weight: 600; font-size: 14px; }
.scorecard .par-row .who { background: var(--green-wash); padding-left: 10px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.scorecard .sum { background: rgba(16, 38, 26, .04); font-weight: 600; }
.scorecard .hole-row .sum { background: var(--ink); }
.scorecard .par-row .sum { background: var(--green-wash); }
.scorecard .total { font-weight: 700; }
.scorecard .hole-row .sum, .scorecard .hole-row .total { font-family: var(--body); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.scorecard .to-par-cell { font-family: var(--display); font-weight: 700; padding: 0 6px; }
.scorecard tbody tr:last-child td { border-bottom: 0; }
.scorecard .blank { color: var(--line-strong); }

/* Scorecard notation: circle birdies, double circle eagles; square bogeys, double square worse. */
.mk { display: inline-grid; place-items: center; width: 28px; height: 28px; line-height: 1; }
.mk.birdie, .mk.eagle { border: 1.5px solid var(--flag); border-radius: 50%; color: var(--flag); font-weight: 700; }
.mk.eagle { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--flag); }
.mk.bogey, .mk.double { border: 1.5px solid var(--ink-soft); border-radius: 3px; }
.mk.double { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--ink-soft); }

.scorecard td.skin { background: var(--gold-wash); }
.scorecard td.skin .mk { font-weight: 700; }
.scorecard td.counted { background: var(--green-wash); font-weight: 700; }
.scorecard td.skin .mk.eagle, .scorecard td.skin .mk.double { box-shadow: 0 0 0 2px var(--gold-wash), 0 0 0 3.5px currentColor; }
.scorecard td.counted .mk.eagle, .scorecard td.counted .mk.double { box-shadow: 0 0 0 2px var(--green-wash), 0 0 0 3.5px currentColor; }
.scorecard .team-row td { border-top: 1.5px solid var(--ink); font-weight: 700; font-family: var(--display); }
.scorecard .team-row .who { font-family: var(--body); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend .mk { width: 20px; height: 20px; font-size: 11px; }
.legend .swatch { width: 14px; height: 14px; border-radius: 4px; }

/* ---------- game results (skins, best ball, teams) ---------- */

.result:empty { display: none; }
.result { margin-top: 22px; padding-top: 20px; border-top: 1.5px dashed var(--line-strong); animation: rise .35s ease both; }
.result h3 { font-size: 22px; margin: 22px 0 10px; }
.result h3:first-child { margin-top: 0; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.stat { background: var(--turf); border-radius: 12px; padding: 12px 14px; }
.stat b { display: block; font-family: var(--display); font-size: 28px; line-height: 1.1; }
.stat span { font-size: 13px; color: var(--muted); }

.list { list-style: none; margin: 0; padding: 0; }
.list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}
.list li:last-child { border-bottom: 0; }
.list .note { color: var(--muted); font-size: 14px; }
.list .hole-no { font-family: var(--display); font-weight: 700; width: 26px; flex: none; color: var(--green); }
.list .grow { flex: 1; }

.net { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.net.up { color: var(--green); }
.net.down { color: var(--danger); }
.net.even { color: var(--muted); font-weight: 600; }

.team-grid { display: grid; gap: 12px; }
@media (min-width: 520px) { .team-grid { grid-template-columns: 1fr 1fr; } }

.team { border-radius: 12px; padding: 14px 16px; border: 1.5px solid var(--ink); background: #fff; animation: rise .35s ease both; }
.team:nth-child(even) { background: var(--ink); color: var(--paper); }
.team h3 { font-size: 22px; margin: 0 0 8px; display: flex; justify-content: space-between; align-items: baseline; }
.team h3 small { font-family: var(--body); font-size: 13px; font-weight: 600; opacity: .7; }
.team ol { margin: 0; padding-left: 20px; }
.team li { padding: 2px 0; }
.team .hcp { opacity: .6; font-size: 14px; }

.team-box { border: 1.5px solid var(--line-strong); border-radius: 12px; padding: 14px 14px 2px; margin-bottom: 12px; }
.team-box h4 { margin: 0 0 10px; font-family: var(--display); font-size: 19px; }

.bb-team { margin-top: 20px; }
.bb-team h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.bb-team h3 .score { font-size: 26px; }
.leader { font-family: var(--body); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--paper); background: var(--green); padding: 3px 8px; border-radius: 999px; vertical-align: 4px; margin-left: 6px; }

/* ---------- segmented control ---------- */

.segmented {
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
  background: #fff;
  position: relative;
}

.segmented input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }

.segmented label {
  display: grid;
  place-items: center;
  height: 46px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  border-left: 1.5px solid var(--line-strong);
  transition: background .15s ease, color .15s ease;
}

.segmented.numbers label { font-family: var(--display); font-weight: 700; font-size: 20px; }
.segmented label:first-of-type { border-left: 0; }
/* Longer labels can wrap to two centred lines. */
.segmented label { padding: 0 10px; text-align: center; line-height: 1.15; }
.segmented input:checked + label { background: var(--ink); color: var(--paper); }
.segmented input:focus-visible + label { box-shadow: inset 0 0 0 3px var(--green); }

/* ---------- login ---------- */

.login {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.login-box { width: 100%; max-width: 380px; text-align: center; }

.login-box .flag { width: 76px; height: 76px; margin-bottom: 14px; }

.login-box h1 { font-size: 60px; font-weight: 800; }
.login-box h1 span { color: var(--green); display: block; font-style: italic; }

.login-box p { color: var(--muted); margin: 14px 0 26px; }

.login-box input {
  text-align: center;
  font-size: 20px;
  letter-spacing: .08em;
  margin-bottom: 12px;
}

/* ---------- scorecard + money games calculator ---------- */

/* Compact shortcut from the home pages. */
.tool-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 12px;
  text-align: left;
  text-decoration: none;
  background: var(--ink);
  color: var(--paper);
  border-radius: 10px;
  transition: transform .15s ease, background .15s ease;
}
.tool-link:hover { transform: translateY(-2px); background: var(--ink-soft); }
.tool-link:active { transform: translateY(0); }
.tool-link .tool-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--green);
  font-family: var(--display);
  font-weight: 800;
  font-size: 17px;
}
.tool-link .tool-text { flex: 1; min-width: 0; line-height: 1.25; }
.tool-link strong { display: block; font-weight: 600; font-size: 15px; }
.tool-link .go { font-family: var(--display); font-size: 28px; font-weight: 700; color: #9ed4a9; }
.login-box .tool-link { margin-top: 34px; }
.games-tool { margin-top: 26px; }

.par-sum { font-weight: 500; color: var(--muted); }
[data-par-holes] .hole input.is-invalid { border-color: var(--danger); color: var(--danger); }

.course-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -8px 0 14px;
}
.course-bar .course-name { font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1.1; display: block; }
.course-bar .course-par { font-size: 14px; font-weight: 600; color: var(--muted); }

/* Editable scorecard: each cell is an input drawn in scorecard notation. */
.calc-scorecard th, .calc-scorecard td { height: 46px; }
.calc-scorecard .who { min-width: 120px; z-index: 2; }
/* Keep ringed score cells under the frozen name column. */
.calc-scorecard td { position: relative; z-index: 0; }
/* Stay inside the card's padding rather than bleeding to its edges. */
.calc .scorecard-wrap { margin: 0; padding: 0; border-radius: 8px 8px 0 0; }
.calc-scorecard tbody .who { padding: 0 4px 0 10px; }
.calc-scorecard .team-row .who { border-top: 1.5px solid var(--ink); }
.who-inner { display: flex; align-items: center; gap: 4px; }
.who-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.who-remove {
  flex: none;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.who-remove:hover { background: #fbe9e7; color: var(--danger); }

.sc-in {
  width: 32px;
  height: 32px;
  padding: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: var(--turf);
  border: 1.5px solid transparent;
  border-radius: 8px;
}
.sc-in:not(:placeholder-shown) { background: transparent; }
.sc-in:focus { background: #fff; border-color: var(--green); box-shadow: 0 0 0 3px rgba(47, 122, 69, .18); border-radius: 8px; }
.sc-in.birdie, .sc-in.eagle { border-color: var(--flag); border-radius: 50%; color: var(--flag); font-weight: 700; }
.sc-in.eagle { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--flag); }
.sc-in.bogey, .sc-in.double { border-color: var(--ink-soft); border-radius: 3px; }
.sc-in.double { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--ink-soft); }

.add-player { display: flex; gap: 10px; margin-top: 18px; }
.add-player input { flex: 1; min-width: 0; }
.add-player .btn { flex: none; }

/* Skins results on the calculator. */
.scorecard td.kp { position: relative; }
.scorecard td.kp::after, .kp-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1;
  color: var(--paper);
  background: var(--green);
  padding: 2px 3px;
  border-radius: 4px;
}
.scorecard td.kp::after { content: "KP"; position: absolute; top: 2px; right: 1px; }
.calc-scorecard .skins-row td, .calc-scorecard .skins-row .who { border-top: 1.5px solid var(--ink); font-weight: 700; }
.calc-scorecard .skins-row .who { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.settle-check { margin: 10px 0 0; font-size: 14px; color: var(--green-deep); font-weight: 600; text-align: right; }
.settle-check.off { color: var(--danger); }

/* Course bar actions: Start over is deliberately quiet. */
.course-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.link-btn {
  font: 600 13px/1 var(--body);
  color: var(--muted);
  background: none;
  border: 0;
  padding: 6px 2px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
}
.link-btn:hover { color: var(--danger); text-decoration-color: currentColor; }

/* Games drawer under the scorecard. */
.games-card > h2 { margin-bottom: 14px; }
.game-tabs { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.game-tabs button {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  font: inherit;
  text-align: left;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.game-tabs button strong { font-family: var(--display); font-size: 19px; line-height: 1.1; }
.game-tabs button small { font-size: 13px; color: var(--muted); }
.game-tabs button::after { content: "+"; position: absolute; top: 8px; right: 12px; font-size: 22px; line-height: 1; color: var(--green); transition: transform .2s ease; }
.game-tabs button:hover { border-color: var(--ink-soft); }
.game-tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.game-tabs button[aria-selected="true"] small { color: #b9c9b8; }
.game-tabs button[aria-selected="true"]::after { transform: rotate(45deg); color: #9ed4a9; }
.game-tabs button:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.game-panel { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); animation: rise .25s ease both; }

/* Best ball: one row per player, tap a team number. */
.assign { list-style: none; margin: 0 0 12px; padding: 0; }
.assign li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.assign li:last-child { border-bottom: 0; }
.assign-name { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assign-pick { margin: 0; flex: none; grid-auto-columns: 44px; }
.assign-pick label { height: 44px; font-size: 18px; }

/* Team colours, shared by the pickers and the summary chips. */
.team-1 { --team: var(--green); }
.team-2 { --team: var(--flag); }
.team-3 { --team: var(--gold); }
.team-4 { --team: #2d5b8a; }
.team-5 { --team: #7a4a8c; }
.team-6 { --team: var(--ink-soft); }
.assign-pick input:checked + label { background: var(--team, var(--ink)); }

.team-summary { display: grid; gap: 8px; margin-bottom: 16px; }
.team-chip { font-size: 15px; padding: 8px 12px; border-radius: 10px; background: var(--turf); border-left: 4px solid var(--team, var(--ink)); }
.team-chip b { margin-right: 4px; }
.team-chip.short { background: var(--flag-wash); }
.team-chip.short::after { content: " · needs 2+ players"; color: var(--danger); font-size: 13px; font-weight: 600; }

.bb-names { display: block; font-family: var(--body); font-size: 14px; font-weight: 500; color: var(--muted); margin-top: 4px; letter-spacing: 0; }
.bb-total { margin: 10px 0 0; text-align: right; font-size: 15px; }
.bb-total b { font-family: var(--display); font-size: 18px; }
.standings .rank { font-family: var(--display); font-weight: 700; font-size: 20px; width: 34px; flex: none; color: var(--green); }
.standings li { align-items: center; }
.bb-rank-score { text-align: right; line-height: 1.1; font-variant-numeric: tabular-nums; }
.bb-rank-score b { display: block; font-family: var(--display); font-size: 22px; }
.bb-rank-score small { font-size: 13px; color: var(--muted); }

/* Vegas: each hole shows its three possible match-ups; tap one. */
.vegas-holes { list-style: none; margin: 0 0 16px; padding: 0; }
.vh { padding: 12px 0 14px; border-bottom: 1px solid var(--line); }
.vh:last-child { border-bottom: 0; }
.vh-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.vh-hole {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
}
.vh-par { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.vh-stake-label { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); }

.matchups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; position: relative; }
.matchups input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.matchups label {
  display: grid;
  align-content: center;
  gap: 1px;
  min-height: 64px;
  padding: 8px 6px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  background: #fff;
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.matchups label em { font-style: normal; font-size: 11px; font-weight: 500; color: var(--muted); }
.matchups label span { overflow-wrap: anywhere; }
.matchups input:checked + label { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.matchups input:checked + label em { color: #9ed4a9; }
.matchups input:focus-visible + label { box-shadow: 0 0 0 3px rgba(47, 122, 69, .35); }

/* A proper checkbox row: box, title, one-line explanation. */
.checks { display: grid; gap: 10px; margin-bottom: 18px; }
.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.check input {
  flex: none;
  display: grid;
  place-content: center;
  width: 24px;
  height: 24px;
  margin: 1px 0 0;
  padding: 0;
  border: 2px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
}
.check input::after { content: ""; width: 7px; height: 12px; margin-top: -3px; border: solid transparent; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.check input:checked { background: var(--green); border-color: var(--green); }
.check input:checked::after { border-color: #fff; }
.check input:focus-visible { box-shadow: 0 0 0 4px rgba(47, 122, 69, .25); }
.check strong { display: block; font-weight: 600; line-height: 1.3; }
.check small { display: block; font-size: 14px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.check:has(input:checked) { border-color: var(--green); background: var(--green-wash); }

.vh-wager { flex: none; width: 86px; }
.vh-wager input { height: 38px; padding-right: 8px; font-size: 15px; font-weight: 600; }
.vh-wager.custom input { border-color: var(--gold); background: var(--gold-wash); }

.stepper { flex: none; display: inline-flex; align-items: center; border: 1.5px solid var(--line-strong); border-radius: 10px; background: #fff; overflow: hidden; }
.stepper button { width: 34px; height: 36px; border: 0; background: none; font: 600 18px/1 var(--body); color: var(--ink); cursor: pointer; }
.stepper button:disabled { color: var(--line-strong); cursor: default; }
.stepper span { min-width: 34px; text-align: center; font-family: var(--display); font-weight: 700; font-size: 16px; }
.stepper.custom { border-color: var(--gold); background: var(--gold-wash); }

.vegas-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; table-layout: fixed; }
.vegas-table th, .vegas-table td { padding: 6px 4px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vegas-table thead th { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border-bottom: 1.5px solid var(--line-strong); }
.vegas-table thead th:first-child, .vegas-table tbody th, .vegas-table tfoot th { width: 34px; text-align: left; }
.vegas-table tbody th { font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--green); vertical-align: top; padding-top: 8px; }
.vegas-table .vt-hole tr:last-child > * { border-bottom: 1px solid var(--line); padding-bottom: 9px; }
.vegas-table .vt-hole th[rowspan] { border-bottom: 1px solid var(--line); }
.vegas-table .vt-teams { text-align: left; white-space: normal; font-size: 13px; line-height: 1.35; color: var(--ink-soft); padding-top: 8px; }
.vegas-table .vt-teams b { font-family: var(--display); color: var(--ink); }
.vegas-table .vt-teams .note { margin-left: 8px; }
.vegas-table .vt-v { color: var(--muted); margin: 0 6px; }
.vegas-table .vt-win { font-weight: 600; color: var(--green-deep); }
.vegas-table .vt-win b { color: var(--green); }
.vegas-table .vt-pending > tr > * { opacity: .55; }
.vegas-table .vt-total th, .vegas-table .vt-total td { border-top: 1.5px solid var(--ink); font-weight: 700; font-size: 15px; padding-top: 10px; }
.vegas-table .vt-total th { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.vt-star { color: var(--gold); margin-left: 3px; font-size: 13px; }
.vt-flip { margin-left: 5px; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--flag); background: var(--flag-wash); padding: 1px 5px; border-radius: 4px; vertical-align: 1px; }
.vt-payer { align-items: flex-start; }
.vt-pays { display: grid; gap: 2px; margin-top: 4px; font-size: 15px; }

/* ---------- footer ---------- */

footer.wrap {
  padding-top: 18px;
  /* Leave breathing room below the credit and clear phone home indicators. */
  padding-bottom: calc(32px + env(safe-area-inset-bottom));
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

footer a { text-underline-offset: 3px; }
footer a:hover { color: var(--ink); }

/* ---------- dialog ---------- */

dialog {
  width: min(92vw, 380px);
  padding: 24px;
  border: 0;
  border-radius: 18px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5);
}

dialog::backdrop { background: rgba(16, 38, 26, .55); backdrop-filter: blur(2px); }
dialog[open] { animation: pop .18s ease both; }
dialog h2 { font-size: 30px; margin-bottom: 10px; }
dialog p { margin: 0 0 20px; color: var(--ink-soft); }
dialog .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
dialog .actions.single { grid-template-columns: 1fr; }

/* ---------- player card ---------- */


.profile-btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin: -6px 0 -6px 3px;
  vertical-align: -8px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--green);
  cursor: pointer;
}
.profile-btn:hover { background: var(--green-wash); }
.profile-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }
.profile-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }

dialog.player-card { width: min(94vw, 420px); padding: 22px 20px 20px; max-height: 88dvh; overflow-y: auto; }
.pc-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: var(--turf);
  color: var(--ink-soft);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.pc-head { display: flex; align-items: center; gap: 12px; margin: 0 40px 16px 0; }
.pc-head h2 { font-size: 26px; margin: 0 0 4px; }
.pc-sub { margin: 0; font-size: 14px; color: var(--muted); }
.pc-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--green);
  color: var(--paper);
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
}

.pc-label, .stat .pc-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

.pc-hcp {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: var(--green-deep);
  color: var(--paper);
}
.pc-hcp > div { flex: none; }
.pc-hcp .pc-label { color: rgba(255, 253, 247, .7); }
.pc-hcp b { display: block; font-family: var(--display); font-size: 36px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.pc-hcp p { margin: 0; font-size: 13px; line-height: 1.35; color: rgba(255, 253, 247, .82); }

.pc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pc-grid .stat { padding: 10px 12px; }
.pc-grid .stat b { font-size: 26px; font-variant-numeric: tabular-nums; }
.pc-grid .stat b small { font-size: 15px; color: var(--muted); }
.pc-grid .stat > span:last-child { display: block; line-height: 1.3; }

.pc-trend { margin-top: 14px; }
.pc-trend-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.pc-trend-tag { font-size: 13px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--turf); color: var(--ink-soft); }
.pc-trend-tag.better { background: var(--green-wash); color: var(--green-deep); }
.pc-trend-tag.worse { background: var(--flag-wash); color: var(--danger); }

.spark { display: block; width: 100%; height: auto; overflow: visible; }
.spark polyline { fill: none; stroke: var(--green); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.spark circle { fill: var(--flag); stroke: var(--paper); stroke-width: 2; }
.spark-avg { stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 4 4; }

.pc-note { margin: 6px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.pc-foot { margin-top: 12px; }
.pc-empty, .pc-loading { margin: 8px 40px 4px 0; color: var(--ink-soft); }

/* ---------- motion ---------- */

.stagger > * { animation: rise .4s ease both; animation-delay: calc(var(--i, 0) * 50ms); }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- admin (/panel) ---------- */

.wrap-wide { max-width: 1180px; }

.table-card { padding: 20px 0 8px; }
.table-card > .section-title { padding: 0 20px; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 15px; }

.admin-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 10px;
  border-bottom: 1.5px solid var(--line-strong);
  white-space: nowrap;
}

/* Sortable headers: the button inherits the th look; arrow shows direction. */
.admin-table th .sort {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.admin-table th .sort::after { content: "↕"; opacity: .35; font-size: 11px; }
.admin-table th[aria-sort="ascending"] .sort::after { content: "▲"; opacity: 1; color: var(--green); }
.admin-table th[aria-sort="descending"] .sort::after { content: "▼"; opacity: 1; color: var(--green); }
.admin-table th[aria-sort="ascending"], .admin-table th[aria-sort="descending"] { color: var(--ink); }
.admin-table th .sort:hover { color: var(--ink); }
.admin-table th .sort:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }

.admin-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table th:first-child, .admin-table td:first-child { padding-left: 20px; }
.admin-table th:last-child, .admin-table td:last-child { padding-right: 20px; }
.admin-table tbody tr:hover { background: rgba(47, 122, 69, .05); }
.admin-table a { text-decoration: none; }
.admin-table a:hover { color: var(--green-deep); }
.admin-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.admin-table tr.past td { color: var(--muted); }
.admin-table code { font-size: 14px; background: var(--turf); padding: 2px 6px; border-radius: 6px; }
.admin-table .muted { color: var(--muted); text-align: center; padding: 24px; }
.admin-table .pill { margin: 0 0 0 6px; }

/* Inline-editable cells look like text until you touch them. */
.editable td { position: relative; }
.editable input.cell {
  height: 38px;
  min-width: 90px;
  padding: 0 8px;
  font-size: 15px;
  background: transparent;
  border-color: transparent;
  border-radius: 8px;
}
.editable input.cell[data-field="email"] { min-width: 240px; }
.editable input.cell[data-field="hcp"] { min-width: 0; width: 64px; text-align: right; }
.editable input.cell:hover { border-color: var(--line); background: #fff; }
.editable input.cell:focus { background: #fff; }

.editable td.saving { opacity: .55; }
.editable td.saved::after, .editable td.error::after {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  pointer-events: none;
}
.editable td.saved::after { content: "✓"; color: var(--green); }
.editable td.error::after { content: "!"; color: var(--danger); }

.table-more { padding: 14px 20px 10px; text-align: center; }

.btn-sm { min-height: 34px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.actions-cell { white-space: nowrap; text-align: right; }
.actions-cell form { display: inline; }
.actions-cell .btn + form { margin-left: 6px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

[hidden] { display: none !important; }

/* Admin: player page. */
.player-link { font-weight: 600; white-space: nowrap; }
.player-link::after { content: " ›"; color: var(--line-strong); }
.player-link:hover::after { color: var(--green); }

@media (min-width: 760px) { .stats-4 { grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; } }
.stats-4 .stat { background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }

.muted-inline { color: var(--muted); font-size: 14px; }
.rounds-table td { white-space: nowrap; }
.table-filter { padding: 0 20px 12px; }
.rounds-table .to-par-cell { font-family: var(--display); font-weight: 700; }
.rounds-table tr.upcoming td { background: rgba(47, 122, 69, .04); }

.strip { display: inline-flex; align-items: flex-end; gap: 2px; font-variant-numeric: tabular-nums; }
.strip-hole { display: inline-grid; justify-items: center; gap: 5px; min-width: 26px; }
.strip-hole small { font-size: 10px; font-weight: 600; color: var(--muted); line-height: 1; }
.strip .mk { width: 24px; height: 24px; font-size: 14px; }
.strip .mk.blank { color: var(--line-strong); }
.strip-gap { width: 1.5px; align-self: stretch; margin: 0 5px; background: var(--line-strong); }
