/**
 * Chalk & Settle — shared light-palette styles (Design System v1.0)
 * Linked by scoring pages, play.html, member-game.html, dashboard.html, admin.html
 * Not used by display.html (dark). index.html links this file with .marketing body overrides.
 */

/* ── Design tokens (light palette superset) ─────────────────────────────── */
:root {
  --bg: #F4F0E8;
  --bg-warm: #ECE7DC;
  --bg-card: #FDFCF9;
  --bg-inset: #F0EBE2;
  --bg-scorecard: #FDFCFA;
  --text: #24211D;
  --text-secondary: #6B6560;
  --text-dim: #A09890;
  --forest: #1B3D2F;
  --forest-soft: #2D5E47;
  --olive: #4A5D3E;
  --olive-bg: rgba(74, 93, 62, 0.12);
  --olive-border: rgba(74, 93, 62, 0.18);
  --gold: #9A7B2D;
  --gold-warm: #B8942F;
  --gold-lt: #B8942F;
  --gold-bg: rgba(154, 123, 45, 0.06);
  --gold-border: rgba(154, 123, 45, 0.15);
  --green: #3A7D52;
  --green-bg: rgba(58, 125, 82, 0.07);
  --clay: #A8593E;
  --clay-bg: rgba(168, 89, 62, 0.05);
  --stone: #D4CEC4;
  --border: rgba(0, 0, 0, 0.06);
  --border-warm: rgba(139, 115, 50, 0.1);
  --shadow-sm: 0 1px 3px rgba(36, 33, 29, 0.03);
  --shadow-md: 0 2px 8px rgba(36, 33, 29, 0.04), 0 4px 16px rgba(36, 33, 29, 0.03);
  --shadow-lg: 0 4px 12px rgba(36, 33, 29, 0.04), 0 8px 32px rgba(36, 33, 29, 0.05);
  --r: 10px;
  --rl: 14px;
  --wolf: #6B4C9A;
  --wolf-bg: rgba(107, 76, 154, 0.06);
  --wolf-border: rgba(107, 76, 154, 0.18);
  --teal: #0d7070;
  /* member-game.html aliases */
  --card: var(--bg-card);
  --inset: var(--bg-inset);
  /* dashboard.html aliases */
  --surface: #FDFCF9;
  --surface2: #F0EBE2;
  --cream: #24211D;
  --r-lg: 14px;
  --gold-dim: #C4A94A;
  --amber: #e08c1a;
  --blue: #4a90c4;
  --sport-tennis: #0d7070;
  --border-gold: rgba(154, 123, 45, 0.15);
}

/* ── Reset & document ───────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* Stroke allocation indicators (1–2 dots per player per hole) */
.cs-stroke-ind {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 6px;
  vertical-align: middle;
}

.cs-stroke-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--olive);
  flex-shrink: 0;
}

/* Live scorecard grid (Vegas reference — shared renderLiveScorecard) */
.cs-live-scorecard {
  padding: 16px 20px;
  overflow-x: auto;
}

.cs-live-scorecard .sc-title {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.cs-live-scorecard .sc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.cs-live-scorecard .sc-table thead tr {
  background: var(--bg-inset);
}

.cs-live-scorecard .sc-table th {
  padding: 6px 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
  border: 1px solid var(--stone);
}

.cs-live-scorecard .sc-table td {
  padding: 6px 4px;
  text-align: center;
  border: 1px solid var(--stone);
  font-family: 'DM Mono', monospace;
}

.cs-live-scorecard .sc-table .lbl {
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 10px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.cs-live-scorecard .sc-table .usd-h {
  color: var(--gold);
  text-align: right;
}

.cs-live-scorecard .sc-table .usd {
  color: var(--gold);
  text-align: right;
  font-weight: 700;
}

.cs-live-scorecard .sc-table .text-dim {
  color: var(--text-dim);
}

.cs-live-scorecard .sc-table .birdie-cell {
  color: var(--green);
  font-weight: 600;
}

.cs-live-scorecard .sc-table .bogey-cell {
  color: var(--clay);
}

.cs-live-scorecard .sc-table .flip-cell {
  background: rgba(168, 89, 62, 0.06);
  font-weight: 600;
  color: var(--clay);
}

.cs-live-scorecard .sc-table .diff-cell {
  font-weight: 600;
}

body {
  max-width: 520px;
  margin: 0 auto;
  padding-bottom: 80px;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 20% 10%, rgba(154, 123, 45, 0.02), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

button,
input,
select {
  font: inherit;
}

/* ── Utilities ──────────────────────────────────────────────────────────── */
.u-hidden {
  display: none;
}

.section-label {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.view {
  display: none;
  padding: 20px 16px 16px;
}

.view.on,
.view.active {
  display: block;
}

/* ── Demo bar (top bar on scoring pages) ─────────────────────────────────── */
.demo-bar {
  position: relative;
  z-index: 10;
  background: var(--forest);
  padding: 6px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}

.demo-bar a {
  color: var(--forest);
  text-decoration: none;
  font-weight: 600;
}

.demo-bar .links a {
  color: var(--bg-inset);
  text-decoration: none;
  opacity: 0.7;
  font-size: 10px;
  margin-left: 10px;
}

/* Bottom-fixed demo bar (wolf, dots, snake, ninepoint) */
.demo-bar:has(.demo-btn) {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  max-width: 430px;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ── Header ───────────────────────────────────────────────────────────────── */
header {
  padding: 12px 20px;
  background: transparent;
}

.hdr-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--forest);
}

.logo em {
  font-style: italic;
  font-weight: 400;
  color: var(--text-secondary);
}

.hdr-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--olive);
  background: rgba(74, 93, 62, 0.08);
  padding: 3px 8px;
  border-radius: 4px;
}

.member-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid rgba(74, 93, 62, 0.2);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  line-height: 1;
  color: var(--olive);
  background: rgba(74, 93, 62, 0.05);
}

.hdr-sub {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 4px;
}

.hdr-config {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  color: var(--text-dim);
  margin-top: 2px;
}

.hdr-back {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 0;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.hdr-back:active {
  opacity: 0.6;
}

/* ── Sticky top stacks (grouped per game page) ───────────────────────────── */
.top-stack,
.top-stack-nassau,
.top-stack-wolf,
.top-stack-vegas,
.top-stack-scotch,
.top-stack-skins {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 240, 232, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.top-stack-wolf {
  background: rgba(244, 240, 232, 0.88);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}

.top-stack-vegas {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.top-stack-scotch {
  background: rgba(244, 240, 232, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

.top-stack-scotch > *:last-child {
  margin-bottom: 0;
}

.top-stack-scotch header {
  margin-bottom: 0;
  padding: 10px 20px 0;
  padding-bottom: 0;
}

.top-stack-scotch .hero-card {
  margin-top: 4px;
}

.top-stack-skins {
  background: rgba(244, 240, 232, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.top-stack-skins .ld-badge {
  margin: 8px 12px 0;
}

/* ── Tabs (scoring / matches / settlement) ─────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  position: relative;
  z-index: 5;
}

.tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}

.tab.on {
  color: var(--forest);
  border-bottom-color: var(--forest);
}

.tab .badge {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  background: var(--clay-bg);
  color: var(--clay);
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 3px;
}

/* ── Hero glance card ─────────────────────────────────────────────────────── */
.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--rl);
  padding: 14px 16px;
  margin: 0 12px 10px;
  box-shadow: var(--shadow-sm);
}

.hero-selector {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.hero-sel-pill {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--stone);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.hero-sel-pill.on {
  background: var(--forest);
  color: var(--bg-card);
  border-color: var(--forest);
  font-weight: 600;
}

.hero-sel-pill.wolf {
  border-color: var(--wolf-border);
}

.hero-sel-pill.on.wolf {
  background: var(--wolf);
  border-color: var(--wolf);
}

.hero-sel-pill:active {
  transform: scale(0.95);
}

.hero-thru {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  text-align: center;
}

.hero-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
}

.hero-opp {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--text-secondary);
}

.hero-val {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-weight: 600;
  text-align: right;
}

.hero-val.up {
  color: var(--olive);
}

.hero-val.dn {
  color: var(--clay);
}

.hero-val.as {
  color: var(--text-dim);
}

.hero-net {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.hero-net.pos {
  color: var(--olive);
}

.hero-net.neg {
  color: var(--clay);
}

.hero-net.even {
  color: var(--text-dim);
}

.hero-net.final {
  font-size: 18px;
  margin-top: 12px;
  padding-top: 12px;
}

.hero-amount {
  font-family: 'DM Mono', monospace;
  font-size: 32px;
  font-weight: 600;
  text-align: center;
  line-height: 1;
  margin-bottom: 12px;
}

.hero-amount.pos {
  color: var(--olive);
}

.hero-amount.neg {
  color: var(--clay);
}

.hero-amount.even {
  color: var(--text-dim);
}

.hero-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 10px;
}

.hero-ranks {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.hero-rank-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 0;
}

.hero-rank-row.me {
  font-weight: 600;
}

.hero-rank-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--text-secondary);
}

.hero-rank-row.me .hero-rank-name {
  color: var(--text);
}

.hero-rank-pts {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 600;
}

.hero-rank-pts.pos {
  color: var(--olive);
}

.hero-rank-pts.neg {
  color: var(--clay);
}

.hero-rank-pts.even {
  color: var(--text-dim);
}

/* ── Hole progress strip ──────────────────────────────────────────────────── */
.hole-strip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 16px;
  overflow-x: auto;
  background: var(--bg-inset);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.hole-pip {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  border: 1.5px solid var(--stone);
  color: var(--text-dim);
  flex-shrink: 0;
  transition: all 0.15s;
}

.hole-pip.done {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--bg-inset);
}

.hole-pip.reviewable {
  cursor: pointer;
  box-shadow: 0 0 0 2px rgba(27, 61, 47, 0.08);
}

.hole-pip.reviewable:active {
  transform: scale(0.94);
}

.hole-pip.active {
  background: var(--olive);
  border-color: var(--olive);
  color: var(--bg-card);
  transform: scale(1.15);
}

.hole-pip.flip {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--bg-inset);
}

.hole-pip.bound {
  margin-right: 8px;
}

.hole-pip.bonus {
  background: var(--green);
  border-color: var(--green);
  color: var(--bg-card);
}

.nine-div {
  width: 1px;
  height: 20px;
  background: var(--stone);
  flex-shrink: 0;
  margin: 0 2px;
  opacity: 0.55;
}

/* ── Scoring shell ─────────────────────────────────────────────────────────── */
.hole-num {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--forest);
}

.hole-info {
  text-align: right;
}

.hole-par {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
}

.hole-nine {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 11px;
  color: var(--olive);
}

.hole-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.hole-header-main {
  display: flex;
  flex: 1;
  align-items: baseline;
  justify-content: space-between;
  min-width: 0;
  gap: 10px;
}

.hole-gear {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 22px;
  line-height: 1;
  margin-top: 2px;
}

.hole-gear:active {
  opacity: 0.7;
}

.player-entry {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 18px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-shadow: var(--shadow-sm);
}

.pe-left {
  flex: 1;
}

.pe-name {
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  font-weight: 600;
}

.pe-hcp {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
}

.pe-stroke {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--olive);
  margin-left: 4px;
  vertical-align: middle;
}

.pe-net {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.pe-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.score-ctrl {
  display: flex;
  align-items: center;
  gap: 8px;
}

.score-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--stone);
  background: var(--bg);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: all 0.12s;
  user-select: none;
}

.score-btn:active {
  transform: scale(0.9);
  background: var(--bg-inset);
}

.score-val-cluster {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.score-max-badge {
  font-family: 'DM Mono', monospace;
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  color: #fff;
  background: var(--clay);
  padding: 2px 5px;
  border-radius: 3px;
  line-height: 1;
  letter-spacing: 0.04em;
}

.score-max-badge.u-hidden {
  visibility: hidden;
}

.score-max-btn {
  min-height: 44px;
  height: auto;
  padding: 0 12px;
  border: 1.5px solid var(--clay);
  background: transparent;
  color: var(--clay);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.score-max-btn:hover,
.score-max-btn:active {
  background: var(--clay);
  color: #fff;
}

.score-val {
  font-family: 'DM Mono', monospace;
  font-size: 28px;
  font-weight: 600;
  width: 48px;
  text-align: center;
}

.score-val.birdie {
  color: var(--green);
}

.score-val.bogey {
  color: var(--clay);
}

.btn-submit {
  width: 100%;
  padding: 16px;
  background: var(--forest);
  color: var(--bg-inset);
  border: none;
  border-radius: var(--r);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 16px;
  transition: all 0.15s;
}

.btn-submit:hover {
  background: var(--forest-soft);
}

.btn-score {
  width: 100%;
  padding: 14px;
  background: var(--forest);
  color: var(--bg-inset);
  border: none;
  border-radius: var(--r);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 16px;
  transition: all 0.15s;
  letter-spacing: 0.02em;
}

.btn-score:hover {
  background: var(--forest-soft);
}

.btn-score:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Junk pills (shared) ──────────────────────────────────────────────────── */
.junk-pill {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid transparent;
  user-select: none;
}

.junk-pill.off {
  background: var(--bg-inset);
  color: var(--text-dim);
}

.junk-pill.on {
  background: var(--olive-bg);
  color: var(--olive);
  border: 1px solid rgba(74, 93, 62, 0.35);
}

.junk-pill:disabled {
  opacity: 0.35;
  cursor: default;
}

.birdie-junk-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--green);
  flex-shrink: 0;
}

.junk-birdie-note {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--gold);
}

/* ── Bottom sheet / junk panel ─────────────────────────────────────────────── */
.nj-overlay {
  position: fixed;
  inset: 0;
  background: rgba(36, 33, 29, 0.35);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.nj-overlay.u-hidden {
  display: none !important;
}

.nj-panel {
  width: 100%;
  max-width: 520px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--rl) var(--rl) 0 0;
  padding: 16px 18px 22px;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
}

.nj-panel-title {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--forest);
  margin-bottom: 12px;
}

.nj-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nj-row:last-of-type {
  border-bottom: none;
}

.nj-row span {
  font-size: 13px;
}

.nj-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
}

.nj-actions button {
  flex: 1;
  padding: 12px;
  border-radius: var(--r);
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: 'DM Sans', sans-serif;
}

.nj-actions .nj-cancel {
  background: var(--stone);
  color: var(--text);
}

.nj-actions .nj-apply {
  background: var(--forest);
  color: var(--bg-inset);
}

/* ── Settlement (generic) ───────────────────────────────────────────────────── */
.settle-hdr {
  text-align: center;
  margin-bottom: 16px;
}

.settle-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--forest);
}

.settle-sub {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* Game settlement (Vegas-style net cards + breakdown + transfers) */
.cs-game-settlement {
  padding: 24px 16px;
  text-align: center;
}

.cs-game-settlement .settle-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--rl);
  padding: 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.cs-game-settlement .settle-team {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.cs-game-settlement .settle-amount {
  font-family: 'DM Mono', monospace;
  font-size: 32px;
  font-weight: 600;
}

.cs-game-settlement .settle-amount.win {
  color: var(--green);
}

.cs-game-settlement .settle-amount.lose {
  color: var(--text);
}

.cs-game-settlement .settle-amount.text-dim {
  color: var(--text-dim);
}

.cs-game-settlement .settle-zero {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--olive);
  margin-top: 16px;
}

.cs-settle-breakdown {
  text-align: left;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.cs-settle-breakdown-label {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--text-dim);
  text-transform: lowercase;
  margin-bottom: 10px;
}

.cs-settle-transfers {
  text-align: left;
  margin-top: 16px;
}

.cs-settle-transfers-toggle {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--text-dim);
  text-transform: lowercase;
  margin-bottom: 8px;
}

.cs-settle-transfers-body {
  display: none;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}

.cs-settle-transfers.open .cs-settle-transfers-body {
  display: block;
}

.cs-settle-transfer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.cs-settle-transfer-row:last-child {
  border-bottom: none;
}

.cs-settle-transfer-amt {
  font-family: 'DM Mono', monospace;
  font-size: 16px;
  font-weight: 600;
  color: var(--gold);
}

.cs-settle-back-wrap {
  text-align: center;
  margin-top: 20px;
}

.cs-settle-back-btn {
  padding: 12px 32px;
  background: var(--forest);
  color: var(--bg-inset);
  border: none;
  border-radius: var(--r);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.cs-settle-bd-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  font-size: 12px;
}

.cs-settle-bd-row:last-child {
  border-bottom: none;
}

.cs-settle-bd-hole {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  width: 28px;
  flex-shrink: 0;
}

.cs-settle-bd-desc {
  flex: 1;
  color: var(--text-secondary);
  line-height: 1.35;
}

.cs-settle-bd-desc strong {
  color: var(--text);
  font-weight: 600;
}

.cs-settle-bd-amt {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  flex-shrink: 0;
}

.cs-settle-bd-more {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--forest);
  font-weight: 600;
  padding: 10px 0 4px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.cs-settle-pot-note {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.45;
  margin-bottom: 10px;
}

.cs-settle-pot-warn {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--clay);
  line-height: 1.45;
  margin-bottom: 10px;
}

.cs-settle-skins-grid {
  overflow-x: auto;
  margin-top: 6px;
}

.cs-settle-skins-grid .rs-grid {
  width: 100%;
}

.settle-toggle {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  gap: 6px;
}

.settle-toggle:active {
  opacity: 0.7;
}

.settle-toggle-hint {
  font-family: 'DM Sans', sans-serif;
  font-style: normal;
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 400;
}

.sp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--rl);
  padding: 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sp-rank {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  width: 20px;
}

.sp-name {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-weight: 600;
  flex: 1;
}

.sp-amt {
  font-family: 'DM Mono', monospace;
  font-size: 22px;
  font-weight: 600;
}

.sp-amt.win {
  color: var(--green);
}

.sp-amt.lose {
  color: var(--text);
}

.sp-amt.even {
  color: var(--text-dim);
}

.mx-title {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 12px;
  color: var(--text-dim);
  margin: 16px 0 8px;
}

.mx {
  width: 100%;
  border-collapse: collapse;
}

.mx th {
  padding: 5px 3px;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 400;
  text-align: center;
  border-bottom: 1px solid var(--stone);
}

.mx td {
  padding: 6px 3px;
  text-align: center;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.mx th,
.mx td {
  min-width: 48px;
}

.mx .lbl {
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 11px;
  color: var(--text-secondary);
}

.mx .self {
  color: var(--stone);
}

.mx .pos {
  color: var(--green);
  font-weight: 600;
}

.mx .neg {
  color: var(--text);
  font-weight: 600;
}

.smu {
  background: var(--bg-inset);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 6px;
}

.smu-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.smu-names {
  font-size: 12px;
  font-weight: 600;
}

.smu-total {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  font-weight: 600;
}

.smu-bets {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.settle-zero {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 12px;
  color: var(--olive);
  text-align: center;
  margin-top: 16px;
}

.settle-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding: 0 4px;
}

.settle-detail-wrap,
.settle-matrix-wrap {
  max-height: 2000px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.2s ease;
  opacity: 1;
}

.settle-detail-wrap.collapsed,
.settle-matrix-wrap.collapsed {
  max-height: 0;
  opacity: 0;
  transition: max-height 0.25s ease, opacity 0.15s ease;
}

.round-complete-wrap {
  text-align: center;
  padding: 40px 0;
}

.round-complete-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--forest);
}

.round-complete-sub {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--text-dim);
  margin-top: 8px;
}

/* ── Hole review overlay ────────────────────────────────────────────────────── */
.hole-review-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(36, 33, 29, 0.38);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 18px;
}

.hole-review-overlay.on {
  opacity: 1;
  pointer-events: auto;
}

.hole-review-card {
  width: 100%;
  max-width: 430px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px 18px 14px 14px;
  box-shadow: 0 18px 42px rgba(36, 33, 29, 0.16);
  padding: 18px;
  transform: translateY(18px);
  transition: transform 0.3s ease;
}

.hole-review-overlay.on .hole-review-card {
  transform: translateY(0);
}

.hr-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.hr-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--forest);
}

.hr-meta {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 3px;
}

.hr-close {
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

.hr-section {
  margin-top: 14px;
}

.hr-label {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 7px;
}

.hr-score-row {
  display: grid;
  grid-template-columns: 1fr 54px 54px 64px;
  gap: 8px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  font-size: 13px;
}

.hr-score-row.hr-edit {
  grid-template-columns: 1fr 78px 74px;
}

.hr-score-head {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.hr-mono {
  font-family: 'DM Mono', monospace;
}

.hr-status {
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--forest);
  line-height: 1.45;
}

.hr-note {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.hr-edit-input {
  width: 70px;
  border: 1px solid var(--stone);
  border-radius: 8px;
  background: var(--bg);
  padding: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  text-align: center;
}

.hr-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.hr-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.hr-btn {
  border: 1px solid var(--forest);
  background: transparent;
  color: var(--forest);
  border-radius: 8px;
  padding: 8px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.hr-btn.primary {
  background: var(--forest);
  color: var(--bg-card);
}

.hr-btn.subtle {
  border-color: var(--stone);
  color: var(--text-secondary);
}

/* ── Toast ──────────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--forest);
  color: var(--bg-inset);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  z-index: 999;
  transition: transform 0.3s ease;
  pointer-events: none;
  max-width: 92%;
  text-align: center;
  font-family: 'DM Sans', sans-serif;
}

.toast.show,
.toast.on {
  transform: translateX(-50%) translateY(0);
}

.toast.on {
  opacity: 1;
}

.toast.toast--press {
  background: var(--clay);
  color: #fff;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 22px;
}

.toast.toast--aloha {
  background: var(--olive);
  color: #fff;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 22px;
}

/* ── Shared responsive ──────────────────────────────────────────────────────── */
@media (max-width: 430px) {
  .hdr-top .logo,
  .header-bar .logo,
  .live-header .live-logo,
  .live-logo {
    display: none;
  }

  .live-header > div:has(.live-logo) {
    display: none;
  }

  .hdr-top,
  .header-bar,
  .live-header {
    align-items: center;
    gap: 8px;
  }

  .hdr-back {
    padding: 10px 12px 10px 0;
    min-height: 44px;
  }

  .hdr-actions {
    margin-left: auto;
    flex-shrink: 0;
  }

  .live-header > div:has(.live-logo) {
    display: none;
  }

  .hdr-top {
    align-items: center;
  }

  .hole-num {
    font-size: 22px;
  }

  .player-entry {
    padding: 14px;
  }

  .score-val {
    font-size: 26px;
    width: 44px;
  }

  .score-btn {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .score-max-btn {
    min-height: 40px;
    padding: 0 10px;
    font-size: 9px;
  }

  .hero-sel-pill {
    font-size: 10px;
    padding: 4px 10px;
  }
}

@media (max-width: 375px) {
  header {
    padding: 10px 14px;
  }

  .hdr-top {
    align-items: flex-start;
    gap: 8px;
  }

  .logo {
    font-size: 15px;
  }

  .hdr-badge {
    font-size: 9px;
    padding: 3px 7px;
    white-space: nowrap;
  }

  .hero-card {
    margin: 0 8px 8px;
    padding: 12px;
  }

  .hero-val {
    font-size: 14px;
  }

  .hero-opp {
    font-size: 12px;
  }

  .hero-sel-pill {
    font-size: 9px;
    padding: 4px 8px;
  }

  .hero-amount {
    font-size: 28px;
  }

  .header-bar {
    padding: 12px 14px 10px;
    gap: 8px;
    align-items: flex-start;
  }

  .live-badge {
    font-size: 9px;
    padding: 4px 8px;
    white-space: nowrap;
  }
}

/* Mid-round How-to-Play panel (scoring pages; Scotch uses page-local panel) */
.cs-hdr-rules-btn {
  border: 1px solid var(--stone);
  background: var(--bg-inset);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  flex-shrink: 0;
}

.cs-hdr-rules-btn:active {
  background: rgba(0, 0, 0, 0.06);
}

.cs-mid-round-rules-panel {
  position: fixed;
  left: 0;
  right: 0;
  top: 52px;
  z-index: 120;
  max-height: 60vh;
  overflow-y: auto;
  background: var(--bg-card);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 24px rgba(36, 33, 29, 0.12);
  transform: translateY(-102%);
  transition: transform 0.3s ease;
  padding: 16px 20px 20px;
}

.cs-mid-round-rules-panel.open {
  transform: translateY(0);
}

.cs-mid-round-rules-panel[aria-hidden='true'] {
  visibility: hidden;
  pointer-events: none;
}

.cs-mid-round-rules-panel .cs-rules-h {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--forest);
  margin: 14px 0 6px;
}

.cs-mid-round-rules-panel .cs-rules-h:first-child {
  margin-top: 0;
}

.cs-mid-round-rules-panel .cs-rules-p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 8px;
}

.cs-mid-round-rules-close {
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  background: var(--forest);
  color: var(--bg-inset);
  border: none;
  border-radius: var(--r);
  font-weight: 700;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}
