:root {
  color-scheme: light only;
  /* Clubhouse palette — fairway greens, scorecard paper, brass trim */
  --fairway-dark: #12291b;
  --fairway: #1e4a2f;
  --fairway-light: #2f6b46;
  --cream: #f3ecd8;
  --paper: #fbf7ea;
  --brass: #b3872e;
  --brass-light: #dcb35c;
  --ink: #1c2117;
  --muted: #756f56;
  --border: #ddd2ac;
  --blue: #2c5aa3;
  --blue-soft: rgba(44, 90, 163, 0.14);
  --orange: #a85f1d;
  --orange-soft: rgba(168, 95, 29, 0.14);
  --team1-wash: rgba(44, 90, 163, 0.10);
  --team2-wash: rgba(168, 95, 29, 0.10);
  --success: #2f6d47;
  --success-soft: #e2efe2;
  --danger: #9a3324;
  --live: #96701c;
  --live-soft: #f7ecd0;

  --font-display: "Fraunces", ui-serif, Georgia, serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", monospace;

  font-family: var(--font-body);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    repeating-linear-gradient(115deg, rgba(30,74,47,0.025) 0px, rgba(30,74,47,0.025) 2px, transparent 2px, transparent 26px),
    var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }

button {
  border: 0; border-radius: 10px; padding: 11px 16px; cursor: pointer;
  background: var(--fairway-dark); color: var(--paper); font-weight: 700;
  letter-spacing: .01em;
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
}
button:hover { filter: brightness(1.12); }
button:active { transform: translateY(1px) scale(.99); }
button:disabled { opacity: .4; cursor: not-allowed; filter:none; transform:none; }
button:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

button.ghost { background: var(--paper); color: var(--fairway-dark); border: 1px solid var(--border); }
button.danger { color: var(--danger); }
.blue-btn { background: var(--blue); }
.orange-btn { background: var(--orange); }

.topbar {
  display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap;
  padding:22px clamp(18px, 4vw, 50px);
  background: linear-gradient(160deg, var(--fairway-dark), var(--fairway) 130%);
  color: var(--paper);
  border-bottom: 3px solid var(--brass);
}
.topbar-left { display:flex; align-items:center; gap:18px; }
.topbar-logo {
  height:clamp(40px, 5vw, 58px); width:auto; flex-shrink:0;
  filter: drop-shadow(0 3px 10px rgba(0,0,0,.35));
}
.topbar h1 {
  margin:4px 0 0; font-size:clamp(30px, 4.4vw, 46px);
  font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em;
}
.eyebrow { text-transform:uppercase; letter-spacing:.15em; font-size:11.5px; font-weight:800; color:var(--muted); }
.topbar .eyebrow { color: var(--brass-light); }
.topbar-right { display:flex; align-items:center; gap:12px; }

.sync-status {
  font-size:11.5px; font-weight:800; padding:6px 13px; border-radius:999px; white-space:nowrap;
  border: 1px solid transparent; letter-spacing:.03em;
}
.sync-status::before { content:"●"; margin-right:6px; font-size:9px; }
.sync-status.live { background:rgba(75,160,110,.18); color:#8fe0b2; border-color:rgba(143,224,178,.3); }
.sync-status.syncing { background:rgba(220,179,92,.18); color:var(--brass-light); border-color:rgba(220,179,92,.3); }
.sync-status.offline { background:rgba(180,70,50,.2); color:#ffb3a1; border-color:rgba(255,179,161,.3); }

.tabs {
  display:flex; gap:6px; overflow:auto; padding:12px clamp(18px, 4vw, 50px);
  background: var(--paper); border-bottom:1px solid var(--border); position:sticky; top:0; z-index:5;
}
.tab {
  background:transparent; color:var(--muted); white-space:nowrap; font-weight:700;
  padding:9px 16px; border-radius:999px;
}
.tab:hover { filter:none; background: var(--cream); }
.tab.active { background: var(--fairway-dark); color: var(--paper); box-shadow: 0 2px 0 var(--brass); }

main { max-width:1200px; margin:0 auto; padding:24px; }
.view { display:none; }
.view.active { display:block; }

.sponsor-line {
  margin-top:8px; font-size:12.5px; font-weight:600; color: var(--brass-light);
  display:flex; align-items:center; gap:6px;
}
.sponsor-line::before { content:""; width:5px; height:5px; border-radius:50%; background: var(--brass-light); }

.sponsor-plate {
  max-width:1200px; margin:0 auto 32px; padding:20px clamp(18px, 4vw, 50px);
  display:flex; align-items:center; gap:16px;
}
.sponsor-logo { height:48px; width:auto; max-width:180px; flex-shrink:0; object-fit:contain; filter: drop-shadow(0 3px 8px rgba(18,41,27,.25)); }
.sponsor-info .eyebrow { color: var(--brass); }
.sponsor-name { font-family: var(--font-display); font-weight:600; font-size:18px; color: var(--fairway-dark); margin-top:2px; }
.sponsor-info .muted { font-size:13px; }
.sponsor-link { font-size:13px; font-weight:700; color: var(--brass); text-decoration:none; }
.sponsor-link:hover { text-decoration:underline; }

.card {
  background: var(--paper); border:1px solid var(--border); border-radius:18px; padding:22px;
  margin-bottom:20px; box-shadow: 0 10px 26px rgba(18,41,27,.06);
}

.hero {
  background: linear-gradient(150deg, var(--fairway-dark), var(--fairway) 85%);
  color: var(--paper);
  position: relative; overflow: hidden;
  border: 1px solid var(--fairway-dark);
}
.hero::after {
  content:""; position:absolute; inset:0; pointer-events:none;
  background: repeating-linear-gradient(115deg, rgba(255,255,255,.025) 0px, rgba(255,255,255,.025) 2px, transparent 2px, transparent 24px);
}
.hero .eyebrow { color: var(--brass-light); }
.hero h2, .section-heading h2 { margin:6px 0; font-family: var(--font-display); font-weight:600; }
.section-heading { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-bottom:16px; }
.section-heading h2 { color: var(--fairway-dark); }

.grid { display:grid; gap:18px; }
.grid.two { grid-template-columns:repeat(2, minmax(0,1fr)); }
.grid.three { grid-template-columns:repeat(3, minmax(0,1fr)); }

.scoreboard { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:16px; margin-top:22px; position:relative; z-index:1; }
.team-score {
  border-radius:14px; padding:18px 20px; display:flex; flex-direction:column; gap:6px;
  border-top: 3px solid transparent;
}
.team-score span { font-weight:700; font-size:14px; opacity:.9; }
.team-score strong { font-family: var(--font-mono); font-size:44px; font-variant-numeric: tabular-nums; line-height:1; }
.team-score.blue { background: var(--blue-soft); border-top-color: var(--blue); }
.team-score.orange { background: var(--orange-soft); border-top-color: var(--orange); }
.versus { color: var(--brass-light); display:flex; align-items:center; justify-content:center; }

.session-score { font-family: var(--font-mono); font-size:28px; font-weight:700; margin-top:12px; font-variant-numeric: tabular-nums; }

.inline-form { display:grid; grid-template-columns:2fr 1fr auto; gap:10px; margin-bottom:20px; }
input, select {
  width:100%; padding:11px 12px; border:1px solid var(--border); border-radius:10px; background: var(--paper);
  color: var(--ink);
}
input:focus, select:focus { outline:2px solid var(--brass); outline-offset:1px; border-color: var(--brass); }
label { font-weight:700; display:grid; gap:8px; }

.player-grid { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:12px; }
.player-card { border:1px solid var(--border); border-radius:12px; padding:14px; background: var(--cream); transition: background .15s ease, border-color .15s ease; }
.team-colors {
  margin:0 0 18px; padding:14px 16px; border:1px solid var(--border);
  border-radius:12px; background: var(--cream);
}
.color-pickers { display:flex; flex-wrap:wrap; align-items:flex-end; gap:16px; margin-top:10px; }
.color-picker { display:grid; gap:6px; font-size:12px; font-weight:800; color: var(--muted); }
.color-picker input[type="color"] {
  width:64px; height:38px; padding:3px; border:1px solid var(--border);
  border-radius:8px; background: var(--paper); cursor:pointer;
}
#resetColorsBtn { padding:9px 14px; font-size:13px; }
.player-card strong { display:block; font-family: var(--font-display); font-size:17px; font-weight:600; }
.player-card span { color:var(--muted); font-size:13px; }
.player-card button { margin-top:10px; padding:7px 9px; font-size:12px; }
.team-tag {
  display:inline-block; margin-top:6px; padding:3px 10px; border-radius:999px;
  font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.03em;
}
.team-tag.blue { background: var(--blue-soft); color: var(--blue); }
.team-tag.orange { background: var(--orange-soft); color: var(--orange); }

.draft-layout { display:grid; grid-template-columns:1fr 1.5fr 1fr; gap:18px; align-items:start; }
.team-panel { border-radius:14px; padding:16px; min-height:220px; border-top:3px solid transparent; }
.blue-panel { background: var(--team1-wash); border:1px solid var(--blue-soft); border-top:3px solid var(--blue); }
.orange-panel { background: var(--team2-wash); border:1px solid var(--orange-soft); border-top:3px solid var(--orange); }
.draft-pool { display:grid; gap:10px; }
.draft-player { display:flex; align-items:center; justify-content:space-between; gap:10px; border:1px solid var(--border); background: var(--paper); padding:12px; border-radius:10px; }
.history-list { padding-left:0; list-style:none; display:grid; gap:8px; }
.history-list li { padding:8px 0; border-bottom:1px solid var(--border); }

.session-block { margin:22px 0; }
.session-block h3 { border-bottom:2px solid var(--brass); padding-bottom:10px; font-family: var(--font-display); font-weight:600; color: var(--fairway-dark); }

.pairing-card {
  border:1px solid var(--border); background: var(--paper); border-radius:14px;
  padding:16px; margin-bottom:12px; box-shadow:0 4px 14px rgba(18,41,27,.04);
}
.pairing-card-head { margin-bottom:12px; }
.pairing-match-no {
  font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.08em;
  color: var(--muted); background: var(--cream); padding:5px 12px; border-radius:999px;
}
.pairing-side { display:grid; gap:6px; }
.pairing-side-label {
  font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; margin-bottom:2px;
}
.pairing-side-label.blue { color: var(--blue); }
.pairing-side-label.orange { color: var(--orange); }

/* The select sits invisibly over the whole row so the name can render full-width
   and tapping anywhere on the player opens the picker. */
.pairing-slot {
  position:relative; display:flex; align-items:center; gap:10px;
  padding:10px 12px; border:1px solid var(--border); border-radius:10px;
}
.pairing-slot-main { flex:1; min-width:0; }
.pairing-slot-name {
  font-weight:700; font-size:15px; color: var(--ink);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.pairing-slot-hcp { font-size:12px; color: var(--muted); }
.pairing-slot select {
  position:absolute; inset:0; width:100%; height:100%;
  opacity:0; cursor:pointer; border:0; padding:0;
}
.pairing-slot.editable:hover { filter: brightness(1.06); }
.pairing-slot.editable::after {
  content:"⇄"; color: var(--brass); font-weight:800; font-size:15px; flex-shrink:0;
}

.pairing-divider {
  display:flex; align-items:center; gap:10px; margin:12px 0;
  color: var(--muted); font-size:11px; font-weight:800; letter-spacing:.1em;
}
.pairing-divider::before, .pairing-divider::after {
  content:""; flex:1; height:1px; background: var(--border);
}

.match-card { border:1px solid var(--border); background: var(--paper); border-radius:14px; padding:16px; margin-bottom:14px; }
.match-top { display:flex; justify-content:space-between; gap:14px; align-items:flex-start; }
.match-title { margin:5px 0 0; font-family: var(--font-display); font-weight:600; display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.match-avatars { display:inline-flex; }
.match-avatars .avatar { margin-left:-6px; border:2px solid var(--paper); }
.match-avatars .avatar:first-child { margin-left:0; }
.match-result { padding:7px 12px; border-radius:999px; font-weight:800; font-size:12.5px; letter-spacing:.02em; }
.match-result.pending { background:var(--cream); color:var(--muted); }
.match-result.team1 { background:var(--blue-soft); color:var(--blue); }
.match-result.team2 { background:var(--orange-soft); color:var(--orange); }
.match-result.tie { background:var(--success-soft); color:var(--success); }
.match-result.live { background:var(--live-soft); color:var(--live); }
.match-title.clickable { cursor:pointer; }
.match-title.clickable:hover { color: var(--brass); }
.scorecard-btn { margin-top:12px; padding:8px 12px; font-size:13px; }
.match-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.mulligans { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:14px; padding-top:14px; border-top:1px solid var(--border); }
.mulligans button { padding:4px 9px; }
.muted { color:var(--muted); }
.empty { color:var(--muted); padding:20px; border:1px dashed var(--border); border-radius:12px; text-align:center; background: var(--cream); }

.card-actions { display:flex; gap:8px; margin-top:10px; }
.card-actions button { padding:7px 9px; font-size:12px; }
.record-editor { margin-top:12px; border-top:1px solid var(--border); padding-top:12px; display:grid; gap:10px; }
.record-row { display:grid; grid-template-columns:1.4fr repeat(3, 1fr); gap:8px; align-items:center; }
.record-row .record-type { font-size:12px; font-weight:700; color:var(--muted); }
.record-row label { font-size:11px; font-weight:700; color:var(--muted); display:grid; gap:4px; }
.record-row input { padding:6px 8px; }

.link-name { background:none; border:0; padding:0; color:var(--fairway-dark); font-weight:800; cursor:pointer; text-decoration:underline; text-decoration-color: var(--brass); text-underline-offset:3px; }
.link-name:hover { color: var(--brass); }

.avatar {
  display:inline-flex; align-items:center; justify-content:center; flex-shrink:0;
  width:32px; height:32px; border-radius:50%; color:#fff; font-weight:800; font-size:12px;
  font-family: var(--font-body); letter-spacing:.01em;
}
.avatar.sm { width:24px; height:24px; font-size:10px; }
.avatar.lg { width:44px; height:44px; font-size:15px; }
.av-1 { background: var(--fairway); }
.av-2 { background: var(--brass); }
.av-3 { background: var(--blue); }
.av-4 { background: var(--orange); }
.av-5 { background: var(--success); }
.av-6 { background: #5c666d; }

.name-row { display:flex; align-items:center; gap:10px; }

.modal-overlay {
  position:fixed; inset:0; background:rgba(18,41,27,.6); display:flex;
  align-items:center; justify-content:center; padding:20px; z-index:50;
  backdrop-filter: blur(1px);
}
.modal-card {
  background: var(--paper); border-radius:16px; padding:24px; max-width:480px; width:100%;
  box-shadow:0 24px 60px rgba(18,41,27,.4); max-height:85vh; overflow:auto;
  border: 1px solid var(--border); border-top: 4px solid var(--brass);
}
.modal-card.wide { max-width:680px; }
.team-summary-rows { margin:14px 0; display:grid; gap:6px; }
.team-summary-row { display:flex; align-items:center; justify-content:space-between; padding:8px 10px; background: var(--cream); border-radius:10px; }
.team-summary-score { font-family: var(--font-mono); font-weight:800; font-size:18px; }
.team-summary-row .blue { color: var(--blue); }
.team-summary-row .orange { color: var(--orange); }
.modal-top { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.modal-top h2 { margin:0; font-family: var(--font-display); font-weight:600; }
.record-summary { margin:16px 0; padding:16px; background: var(--cream); border-radius:12px; text-align:center; }
.record-table { width:100%; border-collapse:collapse; margin-top:8px; }
.record-table th, .record-table td { text-align:left; padding:9px 6px; border-bottom:1px solid var(--border); font-size:14px; }
.record-table th { color:var(--muted); font-size:11.5px; text-transform:uppercase; letter-spacing:.06em; }

.scorecard-scroll { overflow-x:auto; }
.scorecard-grid { display:grid; min-width:560px; }
.scorecard-row { display:grid; grid-template-columns:110px repeat(9, 1fr); gap:4px; align-items:center; padding:6px 0; }
.scorecard-row.header { font-weight:800; color:var(--muted); font-size:12px; text-align:center; }
.scorecard-row.header .scorecard-label { text-align:left; }
.scorecard-label { font-weight:700; font-size:13px; padding-right:8px; }
.sc-team { display:block; font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.sc-team.blue { color: var(--blue); }
.sc-team.orange { color: var(--orange); }
.scorecard-row input {
  width:100%; text-align:center; padding:8px 2px; border:1px solid var(--border); border-radius:8px;
  font-family: var(--font-mono); font-weight:700;
}
.sub-row { font-size:12px; color:var(--muted); font-family: var(--font-mono); text-align:center; padding:2px 0; }
.sub-row .scorecard-label { font-family: var(--font-body); font-weight:700; font-size:12px; text-align:left; color:var(--muted); }
.course-line { margin:2px 0 4px; font-size:12.5px; }
.result-row { border-top:1px solid var(--border); margin-top:6px; padding-top:10px; }
.hole-winner { text-align:center; font-size:11px; font-weight:800; color:var(--muted); font-family: var(--font-mono); }
.hole-winner.team1 { color:var(--blue); }
.hole-winner.team2 { color:var(--orange); }
.hole-winner.halved { color:var(--success); }

/* ===== Live scorecard (Enter Hole Scores) ===== */
.modal-card.scorecard-modal { display:flex; flex-direction:column; overflow:hidden; padding:0; max-height:90vh; }
.scorecard-modal .modal-top { padding:18px 20px 8px; }

.sc-status {
  display:grid; grid-template-columns:1fr auto 1fr; gap:10px; align-items:center;
  margin:4px 18px 2px; padding:14px 12px; border-radius:14px; background:var(--cream);
}
.sc-status.lead1 { box-shadow: inset 4px 0 0 var(--blue); }
.sc-status.lead2 { box-shadow: inset -4px 0 0 var(--orange); }
.sc-side { text-align:center; min-width:0; }
.sc-side-name { font-weight:800; font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sc-side-name.blue { color:var(--blue); }
.sc-side-name.orange { color:var(--orange); }
.sc-side-players { font-size:11px; color:var(--muted); margin:2px 0 5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sc-side-holes { font-family:var(--font-mono); font-weight:800; font-size:30px; line-height:1; }
.sc-status-mid { text-align:center; padding:0 4px; }
.sc-status-state { font-family:var(--font-display); font-weight:600; font-size:14px; line-height:1.15; }
.sc-status-thru { font-size:11px; color:var(--muted); font-family:var(--font-mono); margin-top:4px; }

.sc-body { overflow-y:auto; -webkit-overflow-scrolling:touch; padding:4px 20px 20px; flex:1 1 auto; min-height:0; }
.sc-locked { margin:6px 0; }
.sc-holes { display:grid; gap:8px; margin-top:8px; }
.sc-hole { border:1px solid var(--border); border-radius:12px; padding:10px 12px; background:var(--paper); }
.sc-hole.done { background:var(--cream); }
.sc-hole.current { border-color:var(--brass); box-shadow:0 0 0 2px rgba(179,135,46,.18); }
.sc-hole-head { display:flex; align-items:center; gap:10px; margin-bottom:9px; }
.sc-hole-no {
  font-family:var(--font-mono); font-weight:800; font-size:16px; background:var(--fairway-dark); color:var(--paper);
  width:30px; height:30px; border-radius:8px; display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.sc-hole-meta { font-size:12px; color:var(--muted); flex:1; }
.sc-now { color:var(--brass); }
.sc-pill { font-size:11px; font-weight:800; padding:3px 10px; border-radius:999px; min-width:26px; text-align:center; flex-shrink:0; }
.sc-pill.blue { background:var(--blue-soft); color:var(--blue); }
.sc-pill.orange { background:var(--orange-soft); color:var(--orange); }
.sc-pill.halved { background:var(--success-soft); color:var(--success); }
.sc-pill.none { background:var(--cream); color:var(--muted); }
.sc-hole-entry { display:grid; gap:8px; }
.sc-entry-side { display:grid; grid-template-columns:64px 1fr; align-items:center; gap:8px; }
.sc-entry-label { font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sc-entry-label.blue { color:var(--blue); }
.sc-entry-label.orange { color:var(--orange); }
.sc-stepper { display:grid; grid-template-columns:42px 1fr 42px; gap:6px; }
.sc-step {
  height:40px; border-radius:9px; border:1px solid var(--border); background:var(--cream);
  font-size:22px; font-weight:700; line-height:1; color:var(--fairway-dark); padding:0;
}
.sc-stepper.blue .sc-step { border-color:var(--blue-soft); }
.sc-stepper.orange .sc-step { border-color:var(--orange-soft); }
.sc-step:disabled { opacity:.4; }
.sc-step-val {
  text-align:center; padding:8px 2px; border:1px solid var(--border); border-radius:9px;
  font-family:var(--font-mono); font-weight:700; font-size:17px; min-width:0; margin:0;
}

/* ===== Side bets ===== */
.sidebets { margin-top:18px; padding-top:14px; border-top:1px solid var(--border); }
.sidebets-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:9px; }
.sidebet-total { font-family:var(--font-mono); font-weight:700; font-size:12px; color:var(--brass); }
.sidebet-list { display:grid; gap:6px; }
.sidebet-row { display:flex; align-items:center; gap:9px; background:var(--cream); border-radius:9px; padding:7px 10px; }
.sidebet-row.settled .sidebet-text { text-decoration:line-through; color:var(--muted); }
.sidebet-check { width:26px; height:26px; border-radius:7px; border:1px solid var(--border); background:var(--paper); color:var(--success); font-weight:800; flex-shrink:0; padding:0; }
.sidebet-row.settled .sidebet-check { background:var(--success-soft); border-color:var(--success); }
.sidebet-text { flex:1; min-width:0; font-size:13px; font-weight:600; }
.sidebet-amt { font-family:var(--font-mono); font-weight:800; font-size:13px; color:var(--fairway-dark); flex-shrink:0; }
.sidebet-rem { color:var(--danger); background:none; border:none; font-weight:800; padding:0 4px; flex-shrink:0; }
.sidebet-empty { font-size:13px; color:var(--muted); padding:4px 2px; }
.sidebet-form { display:grid; grid-template-columns:1fr 72px auto; gap:8px; margin-top:11px; }
.sidebet-form input { margin:0; }
.sidebet-badge {
  display:inline-block; margin-left:8px; background:rgba(179,135,46,.16); color:var(--brass);
  font-size:11px; font-weight:800; padding:1px 7px; border-radius:999px; font-family:var(--font-mono);
}

/* ===== Award tags (Awards tab) ===== */
.award-card { position:relative; }
.award-card.tbd { opacity:.72; }
.award-tag {
  display:inline-block; margin-top:9px; font-size:10px; font-weight:800; text-transform:uppercase;
  letter-spacing:.05em; color:var(--muted); background:var(--cream); padding:3px 11px; border-radius:999px;
}
.award-tag.final { color:#fff; background:var(--brass); }

@media (max-width:560px) {
  .sidebet-form { grid-template-columns:1fr auto; }
  .sidebet-form .sidebet-amount { grid-column:1; }
}

/* Must come last: .hidden needs to beat the display rules declared above. */
.hidden, .modal-overlay.hidden, .record-editor.hidden { display:none; }

.identity-list { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:8px; margin:16px 0; }
.identity-option { text-align:left; display:flex; align-items:center; justify-content:space-between; gap:8px; }
.identity-alt { display:grid; grid-template-columns:1fr; gap:8px; }
.identity-alt button { width:100%; }
.organizer-chip {
  font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.05em;
  color:var(--brass); background:rgba(179,135,46,.16); padding:2px 8px; border-radius:999px; flex-shrink:0;
}

.hof-row { display:grid; grid-template-columns:auto 1fr auto; gap:14px; align-items:start; padding:14px 0; border-bottom:1px solid var(--border); }
.hof-year {
  font-family: var(--font-mono); font-weight:700; font-size:16px; color: var(--paper);
  background: var(--fairway-dark); border-radius:8px; padding:6px 10px; border-bottom:2px solid var(--brass);
}
.hof-team { font-family: var(--font-display); font-weight:600; font-size:17px; color: var(--fairway-dark); }
.hof-form { display:grid; gap:8px; margin-top:18px; padding-top:18px; border-top:2px solid var(--brass); }
.hof-form button { justify-self:start; }

.admin-checklist { list-style:none; padding:0; margin:10px 0 16px; display:grid; gap:8px; }
.admin-checklist li { font-weight:600; font-family: var(--font-mono); font-size:14px; }

.cup-badge {
  display:inline-flex; align-items:center; margin-left:6px; padding:2px 8px; border-radius:999px;
  background: var(--brass-light); color:var(--fairway-dark); font-size:11px; font-weight:800;
  font-family: var(--font-mono); vertical-align:middle;
}
.cup-summary { text-align:left; }
.cup-summary .session-score { text-align:center; }
.cup-years { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; justify-content:center; }
.cup-year-chip {
  display:inline-flex; align-items:center; gap:4px; background:var(--paper); border:1px solid var(--border);
  border-radius:999px; padding:4px 6px 4px 10px; font-family: var(--font-mono); font-size:12.5px; font-weight:700;
}
.cup-year-remove { background:none; border:none; color:var(--danger); font-weight:800; cursor:pointer; padding:0 4px; }
.cup-year-form { display:flex; gap:8px; margin-top:12px; justify-content:center; }
.cup-year-form input { max-width:160px; }

.my-cup-hero .team-chip {
  display:inline-block; margin-top:14px; padding:8px 16px; border-radius:999px; font-weight:800; font-size:13px;
}
.my-cup-hero .team-chip.blue { background: var(--blue-soft); color:#fff; box-shadow: inset 0 0 0 1px var(--blue); }
.my-cup-hero .team-chip.orange { background: var(--orange-soft); color:#fff; box-shadow: inset 0 0 0 1px var(--orange); }
.my-cup-hero .team-chip.organizer { background: rgba(220,179,92,.22); color: var(--brass-light); box-shadow: inset 0 0 0 1px var(--brass); margin-left:8px; }
.admin-panel { border-top:4px solid var(--brass); }
.admin-panel h3 { font-family: var(--font-display); font-weight:600; margin:4px 0 8px; color: var(--fairway-dark); }
.my-match-card h3 { font-family: var(--font-display); font-weight:600; margin:6px 0 4px; }
.my-match-opp { font-size:13px; margin-bottom:12px; }
.my-match-card .match-result { display:inline-block; margin-bottom:12px; }
.my-match-card .scorecard-btn { display:block; }

/* --- Leaderboard: sub-tab pills --- */
.lb-pills { display:flex; gap:8px; overflow-x:auto; padding-bottom:4px; margin-bottom:18px; }
.lb-pill {
  background: var(--cream); color: var(--muted); border:1px solid var(--border);
  padding:9px 18px; border-radius:999px; font-weight:700; font-size:14px; white-space:nowrap;
}
.lb-pill.active { background: var(--fairway-dark); color: var(--paper); border-color: var(--fairway-dark); }

/* --- Overall standings table --- */
.lb-standings { width:100%; }
.lb-std-head, .lb-std-row, .lb-std-player {
  display:grid; grid-template-columns:26px 1fr 40px 40px 40px 48px; gap:6px; align-items:center;
}
.lb-std-head {
  font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.05em;
  color: var(--muted); padding-bottom:10px; border-bottom:1px solid var(--border);
}
.lb-std-num { text-align:center; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.lb-std-tot { font-weight:800; }
.lb-std-group { margin-top:14px; }
.lb-std-row {
  padding:12px 8px 12px 10px; background: var(--cream); border-radius:10px;
  border-left:4px solid var(--border); font-weight:800;
}
.lb-std-row .lb-std-num { font-size:15px; }
.lb-std-row .lb-std-tot { font-size:19px; color: var(--fairway-dark); }
.lb-std-pos { text-align:center; font-weight:800; color: var(--muted); font-family: var(--font-mono); }
.lb-std-team { font-family: var(--font-display); font-weight:600; font-size:17px; }
.lb-std-player { padding:9px 8px 9px 10px; border-bottom:1px solid var(--border); font-size:14px; }
.lb-std-player .name-row span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.lb-res { font-weight:800; font-size:13px; color: var(--muted); }
.lb-res.team1 { color: var(--blue); }
.lb-res.team2 { color: var(--orange); }
.lb-res.tie { color: var(--success); }

/* --- Round view: head-to-head match cards --- */
.lb-round-title {
  text-align:center; font-family: var(--font-display); font-weight:600; font-size:20px;
  color: var(--fairway-dark); margin:6px 0 16px;
}
.lb-match {
  display:grid; grid-template-columns:1fr auto 1fr; align-items:stretch; gap:0;
  border-radius:14px; overflow:hidden; margin-bottom:12px; cursor:pointer;
  border:1px solid var(--border); background: var(--paper);
  box-shadow:0 4px 14px rgba(18,41,27,.05);
}
.lb-match:hover { box-shadow:0 6px 20px rgba(18,41,27,.12); }
.lb-match-side { padding:14px 12px; display:grid; gap:10px; align-content:center; }
.lb-match-side.right { text-align:right; }
.lb-match-side.lead .lb-first, .lb-match-side.lead .lb-last { color:#fff; }
.lb-match-player { line-height:1.25; }
.lb-first { display:block; font-style:italic; font-size:13px; color: var(--muted); }
.lb-last { display:block; font-weight:800; font-size:15px; color: var(--ink); }
.lb-match-centre { padding:14px 10px; text-align:center; display:grid; gap:3px; align-content:center; min-width:96px; }
.lb-match-no { font-size:12px; font-weight:700; color: var(--muted); }
.lb-match-score { font-family: var(--font-mono); font-weight:700; font-size:19px; color: var(--fairway-dark); }
.lb-match-thru { font-size:11px; color: var(--muted); font-weight:600; }

.activity-item { display:flex; gap:12px; align-items:flex-start; padding:12px 0; border-bottom:1px solid var(--border); }
.activity-item:last-child { border-bottom:0; }
.activity-time { font-size:12px; margin-top:2px; }

@media (max-width: 850px) {
  .identity-list { grid-template-columns:1fr; }
  .lb-std-head, .lb-std-row, .lb-std-player { grid-template-columns:22px 1fr 32px 32px 32px 40px; gap:3px; }
  .lb-std-team { font-size:15px; }
  .lb-match-centre { min-width:80px; padding:12px 6px; }
  .lb-match-side { padding:12px 10px; }
}

@media (max-width: 850px) {
  .grid.three, .grid.two, .draft-layout, .player-grid { grid-template-columns:1fr; }
  .inline-form { grid-template-columns:1fr; }
  .scoreboard { grid-template-columns:1fr; }
  .versus { justify-content:center; padding:4px 0; }
  .mulligans { grid-template-columns:1fr; }
}

/* ===== Draft room ===== */
.draft-room { display:grid; gap:16px; }

.draft-clock {
  border-radius:18px; padding:22px; color:#fff; text-align:center;
  box-shadow:0 10px 30px rgba(18,41,27,.18); position:relative; overflow:hidden;
}
.draft-clock.waiting, .draft-clock.done { background: linear-gradient(135deg, var(--fairway-dark), var(--fairway)); }
.clock-status {
  font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.16em;
  opacity:.85; display:flex; align-items:center; justify-content:center; gap:8px;
}
.clock-dot {
  width:9px; height:9px; border-radius:50%; background:#fff;
  animation: clock-pulse 1.4s ease-in-out infinite;
}
@keyframes clock-pulse { 0%,100% { opacity:1; transform:scale(1);} 50% { opacity:.35; transform:scale(.75);} }
.clock-team { font-family: var(--font-display); font-weight:700; font-size:30px; margin:8px 0 4px; line-height:1.1; }
.clock-meta { font-size:13px; opacity:.9; font-weight:600; }
.clock-you {
  display:inline-block; margin-top:12px; background:rgba(255,255,255,.22);
  padding:7px 16px; border-radius:999px; font-weight:800; font-size:13px;
  border:1px solid rgba(255,255,255,.35);
}

.draft-room-bar, .draft-section-head {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.draft-hint { font-size:12px; }

.draft-board {
  display:flex; gap:10px; overflow-x:auto; padding:4px 2px 10px;
  scroll-snap-type:x proximity;
}
.board-pick {
  flex:0 0 92px; scroll-snap-align:start; background: var(--paper);
  border:1px solid var(--border); border-top:4px solid var(--border);
  border-radius:12px; padding:12px 8px; text-align:center; display:grid; gap:5px; justify-items:center;
}
.board-pick-no { font-family: var(--font-mono); font-size:11px; font-weight:700; color: var(--muted); }
.board-pick-name { font-weight:800; font-size:13px; }
.board-pick-team { font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.03em; }
.board-empty {
  flex:1; text-align:center; color:var(--muted); padding:20px;
  border:1px dashed var(--border); border-radius:12px; font-size:14px;
}

.draft-rosters { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.roster-col {
  background: var(--paper); border:1px solid var(--border); border-top:4px solid var(--border);
  border-radius:14px; padding:14px;
}
.roster-head {
  font-weight:800; font-size:13px; text-transform:uppercase; letter-spacing:.04em;
  display:flex; justify-content:space-between; align-items:center; gap:6px; margin-bottom:10px;
}
.roster-count { font-family: var(--font-mono); color: var(--muted); font-size:12px; }
.roster-list { list-style:none; padding:0; margin:0; display:grid; gap:6px; }
.roster-slot {
  display:flex; align-items:center; gap:8px; font-size:13px; font-weight:600;
  padding:5px 7px; border-radius:8px; background: var(--cream); min-height:34px;
}
.roster-slot span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.roster-slot em { margin-left:auto; font-style:normal; font-weight:800; font-size:10px; color: var(--brass); }
.roster-slot.empty { background:transparent; border:1px dashed var(--border); color: var(--muted); }

.prospect-list { display:grid; gap:10px; }
.prospect {
  background: var(--paper); border:1px solid var(--border); border-radius:14px;
  overflow:hidden; transition:box-shadow .15s ease, border-color .15s ease;
}
.prospect.open { border-color: var(--brass); box-shadow:0 8px 24px rgba(18,41,27,.1); }
.prospect-head { display:flex; align-items:center; gap:12px; padding:14px; cursor:pointer; }
.prospect-rank {
  font-family: var(--font-mono); font-weight:700; font-size:15px; color: var(--muted);
  min-width:22px; text-align:center;
}
.prospect-main { flex:1; min-width:0; }
.prospect-name { font-family: var(--font-display); font-weight:600; font-size:18px; line-height:1.2; }
.prospect-tag { font-size:12.5px; color: var(--brass); font-weight:700; margin-top:1px; }
.prospect-line { font-size:12.5px; color: var(--muted); font-family: var(--font-mono); margin-top:3px; }
.prospect-badges { display:flex; flex-wrap:wrap; gap:5px; margin-top:7px; }
.badge {
  font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.04em;
  padding:3px 8px; border-radius:999px;
}
.badge.gold { background: rgba(179,135,46,.16); color: var(--brass); }
.badge.green { background: var(--success-soft); color: var(--success); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.neutral { background: var(--cream); color: var(--muted); }
.prospect-draft { align-self:center; padding:11px 18px; font-size:14px; flex-shrink:0; }

.scout-report {
  display:none; padding:0 14px 16px; border-top:1px solid var(--border); margin-top:2px;
}
.prospect.open .scout-report { display:block; }
.scout-title {
  font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.1em;
  color: var(--muted); margin:14px 0 8px;
}
.scout-notes { margin:0 0 14px; padding-left:18px; display:grid; gap:5px; }
.scout-notes li { font-size:14px; line-height:1.45; }
.scout-formats { display:grid; gap:7px; }
.scout-fmt {
  display:grid; grid-template-columns:1fr 52px 1fr 40px; gap:8px; align-items:center; font-size:12px;
}
.scout-fmt-label { font-weight:700; color: var(--muted); }
.scout-fmt-rec, .scout-fmt-pct { font-family: var(--font-mono); font-weight:700; }
.scout-fmt-pct { text-align:right; color: var(--muted); }
.scout-fmt-bar { height:6px; background: var(--cream); border-radius:999px; overflow:hidden; }
.scout-fmt-bar i { display:block; height:100%; background: var(--brass); border-radius:999px; }

@media (max-width: 560px) {
  .clock-team { font-size:25px; }
  .draft-rosters { grid-template-columns:1fr; }
  .prospect-head { gap:9px; padding:12px; }
  .prospect-draft { padding:10px 13px; font-size:13px; }
  .prospect-name { font-size:16px; }
  .scout-fmt { grid-template-columns:1fr 48px 34px; }
  .scout-fmt-bar { display:none; }
}

/* ===== Draft lobby (the Draft tab) ===== */
.draft-lobby { display:grid; gap:16px; }
.draft-lobby-hero {
  text-align:center; position:relative; overflow:hidden;
  background:linear-gradient(150deg, var(--fairway-dark), var(--fairway) 82%);
  color:var(--paper); border:1px solid var(--fairway-dark);
}
.draft-lobby-hero .eyebrow { color:var(--brass-light); }
.draft-lobby-hero h1 { font-family:var(--font-display); font-weight:700; font-size:32px; margin:8px 0; line-height:1.1; }
.draft-lobby-hero p { max-width:520px; margin:0 auto 20px; opacity:.92; line-height:1.5; }
.dlh-badge {
  display:inline-block; background:rgba(220,179,92,.2); color:var(--brass-light);
  border:1px solid rgba(220,179,92,.4); padding:5px 14px; border-radius:999px;
  font-size:12px; font-weight:800; letter-spacing:.05em; margin-bottom:6px;
}
.enter-draft-btn {
  font-size:17px; font-weight:800; padding:15px 34px; border-radius:12px;
  background:var(--brass); color:#fff; box-shadow:0 8px 24px rgba(179,135,46,.4);
}
.enter-draft-btn:disabled { background:rgba(255,255,255,.18); box-shadow:none; cursor:not-allowed; color:rgba(255,255,255,.6); }
.draft-lobby-hero.is-live .enter-draft-btn { animation:pulse-btn 1.8s ease-in-out infinite; }
@keyframes pulse-btn { 0%,100%{ transform:scale(1);} 50%{ transform:scale(1.03);} }
.dlh-meta { margin-top:14px; font-family:var(--font-mono); font-size:12.5px; color:var(--brass-light); }

.lobby-cap { border-top:4px solid var(--border); }
.lobby-cap-name { display:flex; align-items:center; gap:8px; font-family:var(--font-display); font-weight:600; font-size:18px; margin:6px 0 4px; }
.cap-tag { font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; color:var(--brass); background:rgba(179,135,46,.14); padding:2px 8px; border-radius:999px; }

.lobby-order { display:grid; grid-template-columns:repeat(auto-fill, minmax(150px,1fr)); gap:8px; margin-top:10px; }
.lobby-chip { display:flex; align-items:center; gap:9px; border-left:4px solid var(--border); background:var(--cream); border-radius:9px; padding:8px 11px; }
.lobby-chip.done { opacity:.7; }
.lobby-chip.current { background:var(--live-soft); box-shadow:0 0 0 2px var(--brass) inset; opacity:1; }
.lobby-chip-no { font-family:var(--font-mono); font-weight:700; color:var(--muted); min-width:16px; }
.lobby-chip-main { display:flex; flex-direction:column; min-width:0; }
.lobby-chip-team { font-weight:800; font-size:13px; }
.lobby-chip-pick { font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lobby-chip-live { font-size:11px; font-weight:800; color:var(--brass); text-transform:uppercase; letter-spacing:.05em; }
.lobby-settings { grid-template-columns:auto auto; justify-content:start; align-items:end; margin-top:10px; }
.lobby-secs { display:grid; gap:5px; font-size:12px; font-weight:700; color:var(--muted); margin:0; }
.lobby-secs input { width:130px; margin:0; }
.admin-only-tag {
  font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.05em;
  color:var(--brass); background:rgba(179,135,46,.14); padding:2px 8px; border-radius:999px; margin-left:6px;
}
.clock-toggle { display:flex; align-items:center; gap:9px; font-weight:600; margin-top:8px; cursor:pointer; }
.clock-toggle input { width:18px; height:18px; margin:0; flex-shrink:0; accent-color:var(--brass); }

/* ===== Full-screen draft room ===== */
.draft-room-overlay {
  position:fixed; inset:0; z-index:80; color:var(--paper);
  background:linear-gradient(165deg, #0b1d13, #12291b 55%, #0b1d13);
}
.draft-room-overlay.hidden { display:none; }
.dr-shell { position:absolute; inset:0; display:flex; flex-direction:column; }

.dr-topbar {
  flex:0 0 auto; display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:12px 16px; background:rgba(0,0,0,.28); border-bottom:1px solid rgba(220,179,92,.3);
}
.dr-title { font-family:var(--font-display); font-weight:700; font-size:18px; color:var(--brass-light); }
.dr-progress { font-family:var(--font-mono); font-size:13px; opacity:.85; margin-left:auto; margin-right:12px; }
.dr-top-actions { display:flex; gap:8px; align-items:center; }
.dr-mute { background:rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.25); color:#fff; padding:7px 11px; border-radius:8px; font-size:15px; }
.dr-exit { background:var(--brass); color:#fff; padding:8px 15px; border-radius:8px; font-weight:800; }

.dr-clock { flex:0 0 auto; text-align:center; padding:18px 16px; color:#fff; }
.dr-clock.rest { background:linear-gradient(135deg, var(--fairway-dark), var(--fairway)); }
.dr-clock-status { font-size:12px; font-weight:800; letter-spacing:.16em; text-transform:uppercase; opacity:.92; display:flex; gap:8px; justify-content:center; align-items:center; }
.dr-clock-team { font-family:var(--font-display); font-weight:700; font-size:27px; margin:6px 0 2px; line-height:1.1; }
.dr-clock-meta { font-size:12.5px; opacity:.92; }
.dr-timer { font-family:var(--font-mono); font-size:46px; font-weight:700; line-height:1; margin:8px 0 4px; font-variant-numeric:tabular-nums; }
.dr-timer.warn { color:#ffd24a; animation:clock-pulse 1s ease-in-out infinite; }
.dr-timer.over { color:#ff7063; }
.dr-timer.idle { opacity:.45; font-size:34px; }
.dr-your-pick { font-weight:800; margin-top:2px; }
.dr-waiting-pick { opacity:.9; font-weight:600; margin-top:2px; }
.dr-quick-draft, .queue-draft-top {
  margin-top:10px; background:var(--brass-light); color:var(--fairway-dark);
  font-weight:800; padding:11px 20px; border-radius:10px;
}
.dr-clock-admin { margin-top:12px; display:flex; gap:8px; justify-content:center; flex-wrap:wrap; }
.dr-clock-admin .ghost { background:rgba(255,255,255,.16); color:#fff; border-color:rgba(255,255,255,.32); padding:8px 14px; }
.dr-topairings { margin-top:12px; background:var(--brass); color:#fff; font-weight:800; padding:11px 22px; border-radius:10px; }

.dr-layout {
  flex:1 1 auto; min-height:0; overflow-y:auto; -webkit-overflow-scrolling:touch; padding:14px;
}
.dr-stack { max-width:760px; margin:0 auto; display:flex; flex-direction:column; gap:14px; }
.dr-panel { background:var(--paper); color:var(--ink); border-radius:16px; padding:14px; border:1px solid rgba(0,0,0,.05); }
.dr-panel-head {
  font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.1em;
  color:var(--muted); margin-bottom:11px; display:flex; align-items:center; justify-content:space-between;
}
.dr-count { background:var(--brass); color:#fff; border-radius:999px; padding:1px 9px; font-family:var(--font-mono); font-size:12px; }

/* Collapsible sections stacked above the player pool */
.dr-collapse { background:var(--paper); color:var(--ink); border-radius:16px; border:1px solid rgba(0,0,0,.05); overflow:hidden; }
.dr-collapse-head {
  width:100%; display:flex; align-items:center; justify-content:space-between; gap:10px;
  background:transparent; color:var(--fairway-dark); padding:14px 16px; cursor:pointer;
  font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.1em;
}
.dr-collapse-head:hover { background:var(--cream); }
.dr-collapse-title { display:flex; align-items:center; gap:8px; }
.dr-chevron { color:var(--muted); font-size:13px; transition:transform .2s ease; }
.dr-collapse.collapsed .dr-chevron { transform:rotate(-90deg); }
.dr-collapse-body { padding:0 16px 16px; }
.dr-collapse.collapsed .dr-collapse-body { display:none; }

.dr-board { max-height:340px; overflow:auto; display:grid; gap:6px; }
.dr-slot { display:flex; align-items:center; gap:10px; padding:7px 9px; border-left:4px solid var(--border); border-radius:9px; background:var(--cream); font-size:13px; }
.dr-slot.current { background:var(--live-soft); box-shadow:0 0 0 2px var(--brass) inset; }
.dr-slot-no { font-family:var(--font-mono); font-weight:700; color:var(--muted); min-width:20px; text-align:center; }
.dr-slot-body { display:flex; align-items:center; gap:8px; min-width:0; }
.dr-slot-name { font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dr-slot-team { font-weight:800; }
.dr-slot-live { font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; color:var(--brass); }
.dr-slot-up { font-size:11px; color:var(--muted); }

.dr-toolbar { display:flex; gap:8px; align-items:center; margin-bottom:12px; }
.dr-toolbar #drSearch { flex:1; margin:0; }
.dr-sort { display:flex; gap:4px; flex-shrink:0; }
.dr-sort button { padding:9px 11px; font-size:12px; font-weight:700; background:var(--cream); color:var(--muted); border:1px solid var(--border); border-radius:8px; }
.dr-sort button.on { background:var(--fairway-dark); color:var(--paper); border-color:var(--fairway-dark); }

.prospect-actions { display:flex; flex-direction:column; gap:6px; align-items:center; align-self:center; flex-shrink:0; }
.queue-star { background:transparent; border:1px solid var(--border); color:var(--brass); font-size:18px; line-height:1; width:40px; height:34px; border-radius:8px; padding:0; }
.queue-star.on { background:rgba(179,135,46,.16); border-color:var(--brass); }

.dr-queue .queue-draft-top { display:block; width:100%; margin:0 0 10px; }
.queue-list { display:grid; gap:6px; }
.queue-row { display:flex; align-items:center; gap:8px; background:var(--cream); border-radius:9px; padding:6px 9px; }
.queue-pos { font-family:var(--font-mono); font-weight:700; color:var(--muted); min-width:16px; }
.queue-name { flex:1; min-width:0; font-weight:700; font-size:13px; display:flex; flex-direction:column; overflow:hidden; }
.queue-name .queue-hcp { font-weight:600; font-size:11px; color:var(--muted); }
.queue-ctrls { display:flex; gap:3px; flex-shrink:0; }
.queue-ctrls button { background:var(--paper); border:1px solid var(--border); border-radius:6px; padding:4px 7px; font-size:11px; color:var(--fairway-dark); }
.queue-ctrls button:disabled { opacity:.3; }
.queue-rem { color:var(--danger) !important; }
.queue-empty { font-size:13px; color:var(--muted); line-height:1.55; }

@media (max-width: 560px) {
  .draft-lobby-hero h1 { font-size:26px; }
  .dr-clock-team { font-size:22px; }
  .dr-timer { font-size:38px; }
  .dr-progress { display:none; }
}

.draft-announce-overlay {
  position:fixed; inset:0; z-index:100; display:flex; align-items:center; justify-content:center;
  background:rgba(18,41,27,0); transition:background .3s ease; padding:20px; cursor:pointer;
}
.draft-announce-overlay.hidden { display:none; }
.draft-announce-overlay.show { background:rgba(18,41,27,.6); }
.draft-announce-card {
  position:relative; background: var(--paper); border:3px solid var(--brass); border-radius:20px;
  padding:40px 36px; text-align:center; transform:scale(.7); opacity:0; max-width:320px; width:100%;
  transition:transform .35s cubic-bezier(.34,1.56,.64,1), opacity .25s ease;
  box-shadow:0 24px 60px rgba(18,41,27,.45); overflow:hidden; cursor:default;
}
.draft-announce-overlay.show .draft-announce-card { transform:scale(1); opacity:1; }
.draft-announce-label { font-weight:800; font-size:13px; letter-spacing:.1em; text-transform:uppercase; margin-bottom:16px; }
.draft-announce-card .avatar.lg { margin:0 auto; }
.draft-announce-name { font-family: var(--font-display); font-weight:700; font-size:27px; margin:16px 0 6px; color: var(--fairway-dark); }
.draft-announce-pick { font-family: var(--font-mono); color: var(--muted); font-size:13px; }
.draft-announce-confetti { position:absolute; inset:0; overflow:hidden; pointer-events:none; }
.confetti-dot {
  position:absolute; top:-12px; width:8px; height:8px; border-radius:2px;
  animation-name:confetti-fall; animation-timing-function:ease-in; animation-iteration-count:1;
}
@keyframes confetti-fall {
  0% { transform:translateY(-12px) rotate(0deg); opacity:1; }
  100% { transform:translateY(240px) rotate(360deg); opacity:0; }
}

/* --- Countdown to tee time ------------------------------------------------ */
.countdown-card { text-align:center; background: linear-gradient(150deg, var(--fairway-dark), var(--fairway) 85%); color: var(--paper); border:1px solid var(--fairway-dark); }
.countdown-card .eyebrow { color: var(--brass-light); }
.countdown-digits { display:flex; justify-content:center; gap:22px; margin-top:12px; }
.countdown-unit { display:flex; flex-direction:column; align-items:center; }
.countdown-unit strong { font-family: var(--font-mono); font-size:38px; font-variant-numeric: tabular-nums; line-height:1; }
.countdown-unit span { font-size:11px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; color: var(--brass-light); margin-top:4px; }
.countdown-live { font-family: var(--font-display); font-weight:600; margin:8px 0 0; }

/* --- Join QR code modal ---------------------------------------------------- */
.qr-card { text-align:center; }
.qr-canvas { display:flex; justify-content:center; margin:18px 0; }
.qr-canvas img, .qr-canvas canvas { border-radius:12px; border:6px solid var(--paper); box-shadow:0 4px 18px rgba(18,41,27,.18); }
.qr-url { font-family: var(--font-mono); font-size:12px; word-break:break-all; }

/* --- Champion celebration --------------------------------------------------- */
.champ-card { padding-top:48px; }
.champ-trophy { font-size:56px; line-height:1; margin-bottom:6px; }
.champ-hero { text-align:center; }

/* --- Tournament Awards & Power Rankings ------------------------------------ */
.award-grid { margin-top:14px; }
.award-card { text-align:center; }
.award-icon { font-size:34px; line-height:1; margin-bottom:6px; }
.award-card h3 { font-family: var(--font-display); font-weight:600; margin:4px 0; }

/* --- Shareable recap card --------------------------------------------------- */
.session-block-head { display:flex; align-items:center; justify-content:space-between; gap:10px; border-bottom:2px solid var(--brass); padding-bottom:10px; margin-bottom:14px; }
.session-block-head h3 { border:0; padding:0; margin:0; }
.recap-modal-card { text-align:center; }
.recap-canvas { width:100%; max-width:420px; aspect-ratio:1/1; border-radius:12px; margin:14px auto; display:block; border:1px solid var(--border); }
.recap-actions { grid-template-columns:1fr; }

@media (max-width:640px) {
  .countdown-digits { gap:14px; }
  .countdown-unit strong { font-size:30px; }
}

/* ===== Add-to-home-screen banner (first visit) ===== */
.install-banner {
  position:fixed; left:0; right:0; bottom:0; z-index:45; padding:12px;
  transform:translateY(130%); transition:transform .3s ease;
}
.install-banner.show { transform:translateY(0); }
.install-banner.hidden { display:none; }
.install-card {
  max-width:540px; margin:0 auto; display:flex; align-items:center; gap:13px;
  background:var(--fairway-dark); color:var(--paper); border:1px solid var(--brass);
  border-radius:14px; padding:12px 14px; box-shadow:0 14px 36px rgba(0,0,0,.4);
}
.install-logo { width:42px; height:42px; border-radius:9px; background:var(--paper); padding:4px; flex-shrink:0; object-fit:contain; }
.install-text { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.install-text strong { font-family:var(--font-display); font-weight:600; font-size:15px; }
.install-text span { font-size:12.5px; color:#cfe3d4; line-height:1.4; }
.install-text .ios-share { vertical-align:-3px; margin:0 1px; }
.install-actions { display:flex; flex-direction:column; gap:6px; flex-shrink:0; }
.install-btn { background:var(--brass); color:#fff; font-weight:800; padding:9px 18px; border-radius:9px; }
.install-dismiss { background:transparent; color:#cfe3d4; border:1px solid rgba(255,255,255,.25); padding:8px 15px; border-radius:9px; font-size:13px; font-weight:600; }

/* ===== Chat / message board ===== */
.chat-card { display:flex; flex-direction:column; }
.chat-form { display:grid; grid-template-columns:1fr auto; gap:8px; margin-bottom:16px; }
.chat-form input { margin:0; }
.chat-send { padding:11px 20px; }
.chat-locked { background:var(--cream); border:1px dashed var(--border); border-radius:10px; padding:12px 14px; color:var(--muted); font-size:13.5px; margin-bottom:16px; }
.chat-feed { display:flex; flex-direction:column; gap:12px; }
.chat-empty { color:var(--muted); padding:16px; border:1px dashed var(--border); border-radius:12px; text-align:center; background:var(--cream); }
.chat-msg { display:flex; gap:10px; align-items:flex-start; }
.chat-msg-body { flex:1; min-width:0; background:var(--cream); border-radius:12px; border-top-left-radius:3px; padding:9px 12px; }
.chat-msg.mine .chat-msg-body { background:var(--team1-wash); border:1px solid var(--blue-soft); }
.chat-msg-head { display:flex; align-items:baseline; justify-content:space-between; gap:8px; margin-bottom:2px; }
.chat-msg-name { font-weight:800; font-size:13px; color:var(--fairway-dark); }
.chat-msg-time { font-size:11px; color:var(--muted); font-family:var(--font-mono); flex-shrink:0; }
.chat-msg-text { font-size:14px; line-height:1.4; word-wrap:break-word; overflow-wrap:anywhere; }

/* Draft-room trash talk (dark panel) */
.dr-chat .chat-locked { background:rgba(0,0,0,.04); }
.draft-chat-feed { max-height:240px; overflow-y:auto; -webkit-overflow-scrolling:touch; }

/* ===== Yahoo-style draft room ===== */
.dr-yh {
  position:absolute; inset:0; display:flex; flex-direction:column;
  background:#0c1310; color:#f3ecd8;
}
.dr-yh-top {
  flex:0 0 auto; display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:calc(14px + env(safe-area-inset-top,0px)) 16px 8px;
}
.dr-x, .dr-mute2 {
  width:42px; height:42px; border-radius:50%; background:#19211d; border:1px solid rgba(255,255,255,.1);
  color:#f3ecd8; font-size:15px; display:flex; align-items:center; justify-content:center; flex-shrink:0; padding:0;
}
.dr-top-center { flex:1; text-align:center; min-width:0; }
.dr-top-main { font-family:var(--font-mono); font-weight:700; font-size:34px; line-height:1; }
.dr-top-of { font-size:18px; color:rgba(243,236,216,.45); }
.dr-top-sub { font-size:12px; color:rgba(243,236,216,.6); margin-top:4px; font-weight:600; }
.dr-yh .dr-timer { font-family:var(--font-mono); font-weight:700; font-size:36px; line-height:1; }
.dr-yh .dr-timer.warn { color:#ffd24a; animation:clock-pulse 1s ease-in-out infinite; }
.dr-yh .dr-timer.over { color:#ff7063; }
.dr-yh .dr-timer.idle { color:rgba(243,236,216,.4); }

.dr-managers { flex:0 0 auto; display:flex; gap:10px; padding:6px 16px; overflow-x:auto; }
.dr-mgr {
  display:flex; align-items:center; gap:9px; background:#19211d; border:1px solid rgba(255,255,255,.07);
  border-radius:999px; padding:5px 14px 5px 5px; flex-shrink:0;
}
.dr-mgr.onclock { border-color:var(--mgr); background:color-mix(in srgb, var(--mgr) 12%, #19211d); }
.dr-mgr-av { position:relative; display:inline-flex; }
.dr-mgr-dot { position:absolute; right:-1px; bottom:-1px; width:11px; height:11px; border-radius:50%; background:#4be08a; border:2px solid #0c1310; }
.dr-mgr-info { display:flex; flex-direction:column; }
.dr-mgr-name { font-weight:800; font-size:13px; }
.dr-mgr-sub { font-size:10.5px; color:rgba(243,236,216,.55); font-weight:600; }

.dr-lastpick {
  flex:0 0 auto; display:flex; align-items:center; gap:10px; margin:4px 16px 8px; padding:10px 14px;
  background:#19211d; border:1px solid rgba(255,255,255,.08); border-radius:12px; font-size:13px;
}
.dr-lastpick.empty { color:rgba(243,236,216,.5); }
.dr-lastpick-label { font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.08em; color:rgba(243,236,216,.5); }
.dr-lastpick-name { font-weight:800; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dr-lastpick-hcp { font-size:11px; color:rgba(243,236,216,.5); font-family:var(--font-mono); }
.dr-lastpick-team { margin-left:auto; font-weight:800; font-size:12px; flex-shrink:0; }

.dr-complete-banner {
  flex:0 0 auto; margin:2px 16px 8px; padding:12px 14px; background:rgba(220,179,92,.12);
  border:1px solid var(--brass); border-radius:12px; display:flex; align-items:center; justify-content:space-between; gap:10px; font-weight:800;
}
.dr-complete-banner .dr-topairings { background:var(--brass); color:#fff; padding:8px 14px; border-radius:9px; font-weight:800; }

.dr-view { flex:1 1 auto; min-height:0; overflow-y:auto; -webkit-overflow-scrolling:touch; padding:6px 16px 16px; }

.dr-turn-banner {
  text-align:center; font-weight:800; font-size:12px; letter-spacing:.06em; text-transform:uppercase;
  color:rgba(243,236,216,.6); padding:9px; margin-bottom:10px; border-bottom:1px solid rgba(255,255,255,.08);
}
.dr-turn-banner.you { color:var(--brass-light); }
.dr-turn-quick { background:var(--brass); color:#fff; font-weight:800; padding:5px 12px; border-radius:8px; margin-left:6px; text-transform:none; letter-spacing:0; }

/* dark theme for reused row components inside the room */
.dr-yh .dr-toolbar { display:flex; gap:8px; margin-bottom:12px; }
.dr-yh .dr-toolbar #drSearch { flex:1; margin:0; background:#19211d; border-color:rgba(255,255,255,.12); color:#f3ecd8; }
.dr-yh .dr-sort { display:flex; gap:4px; flex-shrink:0; }
.dr-yh .dr-sort button { background:#19211d; border:1px solid rgba(255,255,255,.12); color:rgba(243,236,216,.6); padding:9px 11px; font-size:12px; font-weight:700; border-radius:8px; }
.dr-yh .dr-sort button.on { background:var(--brass); border-color:var(--brass); color:#fff; }

.dr-yh .prospect { background:#19211d; border-color:rgba(255,255,255,.07); }
.dr-yh .prospect.open { border-color:var(--brass); box-shadow:none; }
.dr-yh .prospect-name { color:#f3ecd8; }
.dr-yh .prospect-rank { color:rgba(243,236,216,.5); }
.dr-yh .prospect-line { color:rgba(243,236,216,.55); }
.dr-yh .prospect-tag { color:var(--brass-light); }
.dr-yh .scout-report { border-top-color:rgba(255,255,255,.08); }
.dr-yh .scout-title { color:rgba(243,236,216,.5); }
.dr-yh .scout-notes li { color:#f3ecd8; }
.dr-yh .scout-fmt-bar { background:rgba(255,255,255,.1); }
.dr-yh .badge.neutral { background:rgba(255,255,255,.08); color:rgba(243,236,216,.6); }
.dr-yh .queue-star { background:transparent; border-color:rgba(255,255,255,.16); color:var(--brass-light); }
.dr-yh .queue-star.on { background:rgba(220,179,92,.2); border-color:var(--brass); }

.dr-yh .queue-row { background:#19211d; }
.dr-yh .queue-name { color:#f3ecd8; }
.dr-yh .queue-name .queue-hcp { color:rgba(243,236,216,.55); }
.dr-yh .queue-pos { color:rgba(243,236,216,.5); }
.dr-yh .queue-ctrls button { background:#0c1310; border-color:rgba(255,255,255,.14); color:#f3ecd8; }
.dr-yh .queue-empty { color:rgba(243,236,216,.55); }
.dr-yh .queue-draft-top { background:var(--brass); color:#fff; }

.dr-yh .dr-board { max-height:none; display:grid; gap:6px; }
.dr-yh .dr-slot { background:#19211d; }
.dr-yh .dr-slot.current { background:rgba(220,179,92,.12); box-shadow:0 0 0 2px var(--brass) inset; }
.dr-yh .dr-slot-no { color:rgba(243,236,216,.5); }
.dr-yh .dr-slot-name { color:#f3ecd8; }
.dr-yh .dr-slot-up { color:rgba(243,236,216,.45); }
.dr-board-admin { display:flex; gap:8px; margin-bottom:10px; }
.dr-board-admin button { background:#19211d; border:1px solid rgba(255,255,255,.14); color:#f3ecd8; padding:8px 13px; border-radius:8px; font-size:12px; font-weight:700; }

.dr-yh .draft-rosters { grid-template-columns:1fr 1fr; }
.dr-yh .roster-col { background:#19211d; border-color:rgba(255,255,255,.07); }
.dr-yh .roster-slot { background:#0c1310; color:#f3ecd8; }
.dr-yh .roster-slot.empty { background:transparent; border-color:rgba(255,255,255,.12); color:rgba(243,236,216,.4); }

.dr-yh .chat-msg-body { background:#19211d; }
.dr-yh .chat-msg.mine .chat-msg-body { background:rgba(44,90,163,.22); border:1px solid rgba(44,90,163,.4); }
.dr-yh .chat-msg-name { color:#f3ecd8; }
.dr-yh .chat-msg-text { color:#f3ecd8; }
.dr-yh .chat-msg-time { color:rgba(243,236,216,.45); }
.dr-yh .chat-input { background:#19211d; border-color:rgba(255,255,255,.12); color:#f3ecd8; }
.dr-yh .chat-locked { background:rgba(255,255,255,.04); color:rgba(243,236,216,.6); border-color:rgba(255,255,255,.12); }
.dr-yh .chat-empty { background:transparent; border-color:rgba(255,255,255,.12); color:rgba(243,236,216,.5); }
.dr-yh .draft-chat-feed { max-height:none; }

.dr-nav {
  flex:0 0 auto; display:flex; background:#0c1310; border-top:1px solid rgba(255,255,255,.08);
  padding:6px 6px calc(6px + env(safe-area-inset-bottom,0px));
}
.dr-nav-btn {
  flex:1; background:transparent; border:0; color:rgba(243,236,216,.55);
  display:flex; flex-direction:column; align-items:center; gap:3px; padding:8px 2px; position:relative; border-radius:12px;
}
.dr-nav-btn.active { color:var(--brass-light); background:rgba(220,179,92,.1); }
.dr-nav-icon { font-size:17px; line-height:1; }
.dr-nav-label { font-size:10.5px; font-weight:700; }
.dr-nav-badge {
  position:absolute; top:3px; right:calc(50% - 24px); background:var(--brass); color:#fff;
  font-size:9px; font-weight:800; min-width:15px; height:15px; border-radius:999px;
  display:flex; align-items:center; justify-content:center; padding:0 3px;
}

/* ===== Notifications enable card (Home tab) ===== */
.notif-card { margin-bottom:20px; }
.notif-card.hidden { display:none; }
.notif-inner {
  display:flex; align-items:center; gap:14px; padding:14px 18px; border-radius:16px;
  background:linear-gradient(150deg, var(--fairway-dark), var(--fairway) 130%); color:var(--paper);
  border:1px solid var(--brass);
}
.notif-bell { font-size:26px; flex-shrink:0; }
.notif-text { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.notif-text strong { font-family:var(--font-display); font-weight:600; font-size:16px; }
.notif-text span { font-size:12.5px; color:#cfe3d4; line-height:1.4; }
.notif-btn { flex-shrink:0; background:var(--brass); color:#fff; font-weight:800; padding:11px 20px; border-radius:10px; }

/* ===== Win probability (Home) ===== */
.winprob-card.hidden { display:none; }
.winprob-bar { display:flex; height:26px; border-radius:999px; overflow:hidden; margin:12px 0 8px; background:var(--cream); }
.winprob-fill { display:flex; align-items:center; justify-content:center; color:#fff; font-family:var(--font-mono); font-weight:800; font-size:12px; transition:width .5s ease; min-width:0; }
.winprob-fill.blue { justify-content:flex-start; padding-left:10px; }
.winprob-fill.orange { justify-content:flex-end; padding-right:10px; }
.winprob-labels { display:flex; justify-content:space-between; font-weight:800; font-size:13px; }

/* ===== Draft grades ===== */
.draft-grades .grade-col { text-align:center; border:1px solid var(--border); border-top:4px solid var(--border); border-radius:14px; padding:16px; background:var(--cream); }
.grade-team { font-weight:800; font-size:13px; margin-bottom:4px; }
.grade-letter { font-family:var(--font-display); font-weight:700; font-size:56px; line-height:1; color:var(--fairway-dark); }
.grade-verdict { font-size:12.5px; margin-top:8px; line-height:1.4; }

/* ===== Record book (Hall of Fame tab) ===== */
.record-grid { margin-top:4px; }
.record-card { margin-bottom:0; }
.record-list { list-style:none; margin:10px 0 0; padding:0; display:grid; gap:8px; }
.record-list li { display:flex; align-items:center; gap:10px; }
.record-rank { font-family:var(--font-mono); font-weight:700; color:var(--muted); min-width:16px; }
.record-name { flex:1; min-width:0; font-weight:700; font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.record-val { font-family:var(--font-mono); font-weight:800; color:var(--fairway-dark); flex-shrink:0; }

/* ===== Season recap button ===== */
.season-recap-bar { display:flex; justify-content:center; margin-bottom:18px; }
#seasonRecapBtn { background:var(--brass); color:#fff; font-weight:800; padding:12px 22px; border-radius:10px; }
