/* =========================================================
   App CSS — I See What Game We Are Playing!
   Masters Green & Cream theme
   ========================================================= */

/* -----------------------------
   Design tokens
----------------------------- */
:root {
  --bg: #1C4932;
  --surface: #fffdf7;
  --text: #1e3d2f;
  --muted: #6b7c6b;

  --accent: #1e3d2f;
  --accent-soft: rgba(212, 180, 131, 0.20);
  --tint-1: rgba(212, 180, 131, 0.12);
  --tint-2: rgba(212, 180, 131, 0.22);

  --border: rgba(30, 61, 47, 0.12);

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.08);

  --radius: 16px;
  --radius-sm: 12px;

  --container: 1100px;

  --pad-page: 16px;
  --gap: 14px;

  --btn-radius: 12px;
  --btn-pad-y: 10px;
  --btn-pad-x: 14px;

  --focus: 2px solid rgba(30, 61, 47, 0.35);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(130% 70% at 50% 118%, rgba(230,192,44,.10), transparent 62%),
    linear-gradient(180deg, var(--m-green-dk) 0%, var(--m-green) 55%, #235b3f 100%);
  background-color: var(--bg);
  background-attachment: fixed;
}

html, body { overflow-x: clip; }

h1, h2, h3 {
  margin: 0 0 8px 0;
  line-height: 1.15;
}

p {
  margin: 0 0 10px 0;
  color: var(--muted);
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: var(--focus);
  outline-offset: 3px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-page);
}

/* -----------------------------
   Main + page wrapper
----------------------------- */
main {
  display: block;
  overflow: visible;
  padding-top: 0;
}

.page-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 12px var(--pad-page) 36px;
  overflow-wrap: anywhere;
}

/* -----------------------------
   Page topbar
----------------------------- */
.page-topbar {
  position: sticky;
  top: 0;
  z-index: 1100;
  background: #1C4932;
  border-bottom: 1px solid rgba(30, 61, 47, 0.20);
  box-shadow: var(--shadow-sm);
  padding: 10px 14px;
}

.page-topbar__home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  color: #FCE300;
}

.home-arrow {
  font-size: 18px;
  line-height: 1;
}

/* -----------------------------
   Ticker
----------------------------- */
.ticker-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.ticker-wrap.is-hidden { display: none; }

.ticker-label {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .08em;
  opacity: .75;
  white-space: nowrap;
}

.ticker {
  overflow: hidden;
  flex: 1;
  white-space: nowrap;
}

.ticker-text {
  display: inline-block;
  padding-left: 100%;
  padding-right: 30px;
  animation: ticker-scroll 12s linear infinite;
}

.ticker-wrap:hover .ticker-text {
  animation-play-state: paused;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* -----------------------------
   Inner-page header (shared page_header partial)
----------------------------- */
.ph {
  text-align: center;
  padding: 22px 16px 18px;
  margin-bottom: 6px;
}

.ph__eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .20em;
  text-transform: uppercase;
  color: #FCE300;
}

.ph__title {
  font-family: var(--m-serif);
  font-weight: 700;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: .01em;
  color: #fff;
  margin: 8px 0 0;
}

.ph__sub {
  font-family: var(--m-serif);
  font-style: italic;
  font-size: 14px;
  color: rgba(243,237,224,.72);
  margin: 6px 0 0;
}

.ph__rule {
  width: 54px;
  height: 3px;
  background: #FCE300;
  border-radius: 999px;
  margin: 16px auto 0;
}

@media (max-width: 400px) {
  .ph__title { font-size: 30px; }
}

/* -----------------------------
   Page hero — Masters scoreboard style
----------------------------- */
.page-hero {
  background: #1C4932;
  border: none;
  border-radius: 0 0 18px 18px;
  padding: 16px 18px;
  margin-bottom: var(--gap);
  min-width: 0;
}

.page-hero h1 {
  font-size: 34px;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.page-hero h2 {
  color: #ffffff;
}

.page-hero p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.65);
}

.page-hero::after {
  content: "";
  display: block;
  width: 84px;
  height: 3px;
  border-radius: 999px;
  background: #d4b483;
  margin-top: 12px;
}

/* -----------------------------
   Buttons
----------------------------- */
.btn {
  appearance: none;
  border: 1px solid rgba(30, 61, 47, 0.12);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--btn-radius);
  padding: var(--btn-pad-y) var(--btn-pad-x);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 160ms ease, border-color 160ms ease;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.08);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.07);
}

.btn-primary {
  background: #1C4932;
  color: #fff;
  border-color: rgba(30, 61, 47, 0.20);
}

.btn-primary:hover { background: rgba(30, 61, 47, 0.90); }

.btn-secondary {
  background: rgba(30, 61, 47, 0.06);
  color: var(--text);
}

.btn-secondary:hover { background: rgba(30, 61, 47, 0.10); }

/* -----------------------------
   Actions row
----------------------------- */
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--gap);
}

.meta-line {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* -----------------------------
   Sheet embed
----------------------------- */
.sheet-card {
  background: linear-gradient(180deg, var(--tint-1), var(--surface));
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  min-width: 0;
}

.sheet-frame {
  width: 100%;
  height: 78vh;
  min-height: 520px;
  border: 0;
  display: block;
}

.embed-label {
  font-family: var(--m-serif);
  font-size: 20px;
  color: #F3EDE0;
  margin: 24px 0 10px;
}

/* -----------------------------
   Cards + tables
----------------------------- */
.payouts-stack {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.payouts-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  padding: 16px;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.payouts-card h2 {
  margin: 0 0 10px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(30, 61, 47, 0.12);
  position: relative;
}

.payouts-card h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 84px;
  height: 4px;
  border-radius: 999px;
  background: #d4b483;
}

.table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
  position: relative;
  padding-right: 6px;
  padding-left: 6px;
}

.table-scroll::after {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 28px; height: 100%;
  pointer-events: none;
  background: linear-gradient(to left, var(--surface), rgba(255,255,255,0));
  opacity: 0;
  transition: opacity 180ms ease;
}

.table-scroll::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 22px; height: 100%;
  pointer-events: none;
  background: linear-gradient(to right, var(--surface), rgba(255,255,255,0));
  opacity: 0;
  transition: opacity 180ms ease;
}

.table-scroll.has-overflow::after  { opacity: 1; }
.table-scroll.is-end::after        { opacity: 0; }
.table-scroll.is-start::before     { opacity: 0; }
.table-scroll.is-middle::before    { opacity: 1; }

.payouts-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  max-width: 100%;
  min-width: 0;
}

.payouts-card.daily-quota .payouts-table,
.payouts-card.overall-quota .payouts-table {
  min-width: 520px;
}

.payouts-table th,
.payouts-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(30, 61, 47, 0.10);
  text-align: left;
  white-space: nowrap;
}

.payouts-table thead th {
  font-weight: 800;
  color: rgba(30, 61, 47, 0.75);
  background: rgba(212, 180, 131, 0.10);
}

.payouts-table .num {
  text-align: right;
  white-space: nowrap;
}

.payouts-table .day { font-weight: 800; }

code {
  display: inline-block;
  max-width: 100%;
  overflow-x: auto;
  vertical-align: bottom;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(30, 61, 47, 0.06);
}

/* -----------------------------
   Scoring card internals
----------------------------- */
.scoring-card .card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.card-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(212, 180, 131, 0.50);
  background: var(--accent-soft);
  color: #7a5a20;
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
}

.scoring-grid {
  display: grid;
  gap: 12px;
}

@media (min-width: 720px) {
  .scoring-grid { grid-template-columns: 1fr 1fr; }
}

.scoring-block {
  border: 1px solid rgba(30, 61, 47, 0.10);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(180deg, var(--tint-1), var(--surface));
  min-width: 0;
}

.scoring-block h3 { margin: 0 0 8px 0; }

.scoring-list {
  margin: 0;
  padding-left: 18px;
}

.scoring-list li + li { margin-top: 6px; }

.muted { color: rgba(30, 61, 47, 0.55); }

.bullets { padding-left: 18px; }
.bullets li + li { margin-top: 6px; }

/* =========================================================
   Home page — Masters scorecard
   (scoped under .masters-home / .home-body so inner pages
    are untouched)
   ========================================================= */
:root {
  --m-green:      #1C4932;
  --m-green-dk:   #143523;
  --m-green-line: rgba(9, 24, 18, .45);
  --m-gold:       #FCE300;
  --m-gold-lo:    #E3CC00;
  --m-gold-hi:    #FFEA33;
  --m-gold-txt:   #123a29;
  --m-serif:      Georgia, "Times New Roman", "Playfair Display", serif;
}

/* Whole page becomes the Masters green board (home only) */
.home-body {
  color: #F3EDE0;
}

.masters-home {
  max-width: 580px;
  padding: 18px var(--pad-page) 40px;
}

/* -------- Title -------- */
.mh {
  text-align: center;
  padding: 12px 8px 16px;
}

.mh__title {
  font-family: var(--m-serif);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.04;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #FFFFFF;
  margin: 0;
}

.mh__tag {
  font-family: var(--m-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--m-gold);
  margin: 8px 0 0;
}

/* -------- Gold ticker (in-page, home) -------- */
.mh-ticker {
  border: none;
  border-radius: 8px;
  margin: 8px 0 14px;
  padding: 9px 14px;
  background: linear-gradient(180deg, var(--m-gold-hi), var(--m-gold));
  color: var(--m-gold-txt);
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}

.mh-ticker .ticker-label { color: rgba(18,58,41,.75); }
.mh-ticker .ticker-text  { color: var(--m-gold-txt); font-weight: 700; animation-duration: 13s; }

/* -------- Event line (under tagline) -------- */
.mh-event {
  display: flex;
  justify-content: center;
  padding: 6px 4px 14px;
}

.mh-event__name {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--m-gold);
}

/* -------- Scorecard (TV scoreboard style) -------- */
.scorecard {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0,0,0,.22);
}

.scorecard__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--m-green);
  color: #F3EDE0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.sc-row {
  display: flex;
  align-items: center;
  padding: 0 0 0 16px;
  min-height: 54px;
  background: #ffffff;
  border-top: 1px solid rgba(0,0,0,.08);
  color: #111;
  text-decoration: none;
  transition: background 120ms ease;
  -webkit-tap-highlight-color: transparent;
}

.sc-row:first-of-type { border-top: none; }

/* Cut line — heavy rule separating the field from those below the cut */
.sc-row--cut { border-top: 3px solid var(--m-green-dk); }
.sc-row:hover { background: #f4f2ea; }
.sc-row:active { background: #ece9dd; }
.sc-row:focus-visible { outline: 3px solid var(--m-green); outline-offset: -3px; }

.sc-row__num {
  flex-shrink: 0;
  width: 44px;
  margin-right: 10px;
  font-family: var(--m-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--m-green);
  /* .page-wrap sets overflow-wrap: anywhere, which would otherwise
     split T3 / T7 / CUT onto two lines. Keep each on one line. */
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

.sc-row__name {
  font-family: var(--m-serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: #111111;
  line-height: 1;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
}

.sc-row__tag {
  margin-left: 8px;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8a8a86;
  white-space: nowrap;
}

/* Score cells (right side) */
.sc-row__topar {
  margin-left: auto;
  flex-shrink: 0;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  padding: 0;
  background: #a32d2d;
  color: #fff;
  font-family: var(--m-serif);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.sc-row__round {
  flex-shrink: 0;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  padding: 0;
  font-family: var(--m-serif);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.sc-row__topar--green { background: #1e6b3a; }

.sc-row__round--red   { color: #a32d2d; }
.sc-row__round--green { color: #1e6b3a; }

/* -------- Scorecard bottom bar — state mark + network -------- */
.scorecard__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--m-green);
  border-top: 2px solid var(--m-gold);
}

.scorecard__logo { color: #F3EDE0; display: inline-flex; }
.scorecard__logo svg { height: 30px; width: auto; display: block; }

.scorecard__net {
  color: #F3EDE0;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .10em;
}

/* -------- Footer line -------- */
.mh__foot {
  text-align: center;
  margin: 16px 0 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(243,237,224,.45);
}

/* -------- Mobile -------- */
@media (max-width: 400px) {
  .mh__title { font-size: 34px; }
  .sc-row__name { font-size: 16px; }
}

/* -----------------------------
   Rules page — reference cards
----------------------------- */
.rules-stack {
  display: grid;
  gap: 12px;
}

.ref-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  padding: 14px 16px;
  min-width: 0;
}

.ref-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(30,61,47,.10);
}

.ref-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1C4932;
  color: #d4b483;
  font-size: 13px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ref-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  flex: 1;
  margin: 0;
}

.ref-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(212,180,131,.20);
  border: 1px solid rgba(212,180,131,.40);
  color: #7a5a20;
  white-space: nowrap;
}

.ref-rules {
  display: grid;
  gap: 10px;
}

.ref-rule {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 10px;
  align-items: baseline;
  font-size: 15px;
  color: var(--text);
  line-height: 1.5;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(30,61,47,.06);
}

.ref-rule:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ref-rule-label {
  font-size: 11px;
  font-weight: 800;
  color: #7a5a20;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding-top: 3px;
}

.ref-sub-list {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  padding-left: 4px;
}

.ref-sub-list span {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
}

/* -----------------------------
   Pairings — tee sheet
----------------------------- */
.ts-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 4px 0 18px;
}

.ts-field {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--btn-radius);
  padding: 8px 12px 8px 14px;
  box-shadow: var(--shadow-sm);
}

.ts-field__label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.ts-field__wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.ts-field__wrap::after {
  content: "";
  position: absolute;
  right: 2px;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-3px) rotate(45deg);
  pointer-events: none;
}

.ts-field select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  padding: 2px 22px 2px 0;
  cursor: pointer;
  max-width: 46vw;
}

.ts-field select:focus-visible {
  outline: var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- One day ---- */
.ts-day {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin: 0 0 16px;
}

.ts-day__band {
  display: flex;
  align-items: baseline;
  gap: 10px 16px;
  flex-wrap: wrap;
  padding: 13px 18px;
  background: var(--bg);
}

.ts-day__id {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.ts-day__num {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #d4b483;
  white-space: nowrap;
}

.ts-day__course {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -.01em;
  color: #F3EDE0;
}

/* ---- The sheet itself ---- */
.ts-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.ts-caption {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.ts-col-tee { width: 148px; }

.ts-table thead th {
  text-align: left;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--tint-1);
  padding: 9px 18px;
  border-bottom: 1px solid var(--border);
}

.ts-table tbody tr:not(:first-child) > * {
  border-top: 1px solid rgba(30, 61, 47, .08);
}

.ts-time {
  text-align: left;
  vertical-align: middle;
  padding: 14px 12px 14px 18px;
  border-left: 4px solid transparent;
}

.ts-time__t {
  display: block;
  font-size: 23px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -.01em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ts-time__m {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--muted);
  margin-left: 4px;
}

.ts-time__g {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.ts-players {
  padding: 12px 18px 12px 6px;
  vertical-align: middle;
}

.ts-players ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px 14px;
}

.ts-players li {
  min-width: 0;
  font-size: 17px;
  line-height: 1.35;
  color: var(--text);
  overflow-wrap: anywhere;
}

/* ---- Highlight ---- */
.ts-table tbody tr.is-mine > * { background: var(--tint-2); }
.ts-table tbody tr.is-mine .ts-time { border-left-color: #d4b483; }

.ts-players li.is-me {
  font-weight: 900;
  color: #6b4f18;
}

.ts-status {
  margin: 14px 2px 0;
  font-size: 13px;
  font-weight: 700;
  color: rgba(243, 237, 224, .72);
}

.ts-status:empty { margin: 0; }

.page-wrap hr {
  border: 0;
  border-top: 1px solid rgba(30, 61, 47, .12);
  margin: 16px 0;
}

/* ---- Tee sheet on a phone ---- */
@media (max-width: 720px) {
  .ts-field select { font-size: 15px; }

  .ts-day__band { padding: 12px 14px; }
  .ts-day__course { font-size: 18px; }

  .ts-table thead { display: none; }

  .ts-col-tee { width: 96px; }

  .ts-time { padding: 12px 8px 12px 14px; }
  .ts-time__t { font-size: 19px; }
  .ts-time__m { font-size: 11px; margin-left: 3px; }

  .ts-players { padding: 11px 14px 11px 4px; }
  .ts-players ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; }
  .ts-players li { font-size: 15px; }
}

@media (max-width: 380px) {
  .ts-col-tee { width: 84px; }
  .ts-players ul { grid-template-columns: minmax(0, 1fr); }
}

/* ---- Print: tape it to the cart ---- */
@media print {
  html, body {
    background: #fff !important;
    background-image: none !important;
    color: #000;
  }

  .page-topbar,
  .ts-tools,
  .ts-status,
  .ph__rule,
  .ph__sub { display: none !important; }

  .page-wrap { max-width: none; padding: 0; }

  .ph { padding: 0 0 10px; text-align: left; }
  .ph__eyebrow { color: #555; }
  .ph__title { color: #000; font-size: 26px; margin: 2px 0 0; }

  .ts-day {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #999;
    border-radius: 0;
    margin: 0 0 10px;
  }

  .ts-day__band {
    background: #ececec !important;
    border-bottom: 1px solid #999;
    padding: 7px 10px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .ts-day__num { color: #444; }
  .ts-day__course { color: #000; font-size: 15px; }

  .ts-table thead th {
    background: transparent;
    color: #555;
    padding: 5px 10px;
    border-bottom: 1px solid #bbb;
  }

  .ts-table tbody tr:not(:first-child) > * { border-top: 1px solid #ddd; }
  .ts-table tbody tr.is-mine > * { background: #f0f0f0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ts-table tbody tr.is-mine .ts-time { border-left-color: #666; }

  .ts-time { padding: 7px 8px 7px 10px; }
  .ts-time__t { font-size: 15px; color: #000; }
  .ts-time__m { font-size: 10px; color: #444; }
  .ts-time__g { color: #444; }

  .ts-players { padding: 7px 10px 7px 4px; }
  .ts-players li { font-size: 12px; color: #000; }
  .ts-players li.is-me { color: #000; }
}
/* -----------------------------
   Mobile tweaks
----------------------------- */
@media (max-width: 720px) {
  :root {
    --pad-page: 14px;
    --gap: 12px;
  }

  .page-wrap { padding: 10px var(--pad-page) 30px; }
  .page-hero h1 { font-size: 26px; }

  h2 {
    font-size: 1.25rem;
    margin-bottom: 8px;
  }

  .sheet-frame {
    height: 72vh;
    min-height: 480px;
  }

  .payouts-card { padding: 14px; }

  .payouts-table th,
  .payouts-table td { padding: 8px 10px; }

  .rules-grid { gap: 10px; margin-top: 10px; }
  .rule-card { padding: 14px; }

  .hub-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .hub-card { padding: 12px 10px; }
  .hub-card h2 { font-size: 16px; }
  .hub-card p { font-size: 13px; }
}

/* =========================================================
   Weather
   ========================================================= */
.wx-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 1fr);
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 6px 2px 10px;
  scroll-snap-type: x mandatory;
}

.wx-card { scroll-snap-align: start; }

@media (min-width: 720px) {
  .wx-strip { grid-auto-columns: minmax(260px, 1fr); }
}

.wx-strip::-webkit-scrollbar { height: 8px; }
.wx-strip::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: 999px;
}

.wx-condition {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid rgba(30,61,47,.12);
  background: rgba(30,61,47,.04);
  color: rgba(30,61,47,.75);
}

.wx-clear  { background: rgba(255,200,0,.15);   border-color: rgba(255,200,0,.35);   color: #8a5b00; }
.wx-cloudy { background: rgba(120,140,160,.15); border-color: rgba(120,140,160,.35); color: #3c4b57; }
.wx-rain   { background: rgba(30,120,200,.12);  border-color: rgba(30,120,200,.35);  color: #1b5d8e; }
.wx-storm  { background: rgba(100,80,180,.14);  border-color: rgba(100,80,180,.40);  color: #43387a; }
.wx-fog    { background: rgba(150,150,150,.14); border-color: rgba(150,150,150,.35); color: #555;    }

.wx-condition-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.wx-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.wx-date   { margin: 0 0 6px 0; }
.wx-temps  { margin: 0 0 6px 0; color: var(--text); }
.wx-icon-lg { font-size: 26px; line-height: 1; flex-shrink: 0; }

.wx-divider {
  border: 0;
  border-top: 1px solid rgba(30, 61, 47, 0.10);
  margin: 10px 0;
}

.wx-footer { margin: 0; color: var(--muted); }

.wx-wind-badge {
  border-color: rgba(30,61,47,0.16);
  background: rgba(30,61,47,0.04);
  color: rgba(30,61,47,0.75);
}

/* =========================================================
   Addresses
   ========================================================= */
.venue-list {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.venue-card {
  border: 1px solid rgba(30, 61, 47, 0.10);
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(180deg, var(--tint-1), var(--surface));
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.venue-day {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #7a5a20;
}

.venue-name { margin: 0; font-size: 20px; }
.venue-sub  { margin: 0; font-size: 13px; color: var(--muted); }

.venue-address,
.venue-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(30, 61, 47, 0.10);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease;
  -webkit-tap-highlight-color: transparent;
}

.venue-address:active,
.venue-phone:active {
  background: var(--accent-soft);
  border-color: rgba(212, 180, 131, 0.50);
}

.venue-icon { font-size: 16px; flex-shrink: 0; }

/* =========================================================
   List spacing helpers
   ========================================================= */
.course-quota-list > li,
.course-list > li { margin-bottom: 20px; }

.course-quota-list > li > ul > li:first-child,
.course-list > li > ul > li:first-child { margin-top: 10px; }

/* =========================================================
   Leaderboard
   ========================================================= */
.lb-card {
  padding: 0;
  overflow: hidden;
  margin-top: 20px;
  margin-bottom: var(--gap);
}

.lb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(30, 61, 47, .12);
}

.lb-header h2 {
  margin: 0;
  padding: 0;
  border: none;
}

.lb-header h2::after { display: none; }

.lb-updated {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.lb-content { padding: 0; }

.lb-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.lb-table thead tr { background: #1C4932; }

.lb-table thead th {
  padding: 8px 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #d4b483;
  text-align: center;
  border: none;
  background: none;
}

.lb-col-pos   { width: 32px; }
.lb-col-name  { text-align: left !important; padding-left: 12px !important; }
.lb-col-score { width: 40px; }
.lb-col-total { width: 46px; }

.lb-row { border-bottom: 1px solid rgba(30, 61, 47, .07); }
.lb-row:last-child { border-bottom: none; }
.lb-row--leader { background: rgba(212, 180, 131, .10); }

.lb-table tbody td {
  padding: 10px 6px;
  font-size: 13px;
  text-align: center;
  color: var(--text);
  border: none;
}

.lb-col-name {
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  padding-left: 12px;
  text-transform: uppercase;
}

.lb-col-pos {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.lb-from {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-left: 6px;
  white-space: nowrap;
}

.lb-row--leader .lb-col-pos { color: var(--muted); }
.lb-row--leader .lb-col-name { color: var(--text); }

.lb-pos   { color: #1e6b3a; font-weight: 700; }
.lb-neg   { color: #a32d2d; font-weight: 700; }
.lb-zero  { color: var(--muted); font-weight: 700; }
.lb-empty { color: rgba(30,61,47,.25); }

.lb-total-pos  { color: #1e3d2f; font-weight: 900; font-size: 14px; }
.lb-total-neg  { color: #a32d2d; font-weight: 900; font-size: 14px; }
.lb-total-zero { color: var(--muted); font-weight: 900; font-size: 14px; }
