/* Timaaay Golf Club — brand theme
   Carries the current site's forest green and gold, refined for readability on phones. */
:root {
  --green-900: #0b2418;
  --green-800: #0f3322;
  --green-700: #154a31;
  --green-600: #1d6142;
  --gold: #e3b51e;
  --gold-soft: #f3d779;
  --gold-ink: #7a5d00;
  --cream: #f6f3ea;
  --paper: #ffffff;
  --line: #e3ddcc;
  --ink: #17221c;
  --muted: #5d6a62;
  --under: #b3261e;     /* under par */
  --over: #3c4a43;
  --good: #1d7a45;
  --warn: #a86b00;

  --font-display: "Bitter", Georgia, serif;
  --font-body: "Public Sans", "Segoe UI", system-ui, sans-serif;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(11, 36, 24, .06), 0 4px 14px rgba(11, 36, 24, .06);
  --max: 1180px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green-700); }
a:hover { color: var(--green-600); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .4em; color: var(--green-900); }
h1 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 1.25rem; font-weight: 700; }
h3 { font-size: 1.02rem; font-weight: 700; }
.tabular, table { font-variant-numeric: tabular-nums; }

/* ---------- Header ---------- */
.site-header {
  background: var(--green-900);
  color: #fff;
  border-bottom: 3px solid var(--gold);
  position: sticky; top: 0; z-index: 20;
}
.site-header .bar {
  max-width: var(--max); margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand svg { width: 38px; height: 38px; flex: none; }
.brand { white-space: nowrap; }
.brand .name { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; letter-spacing: .04em; line-height: 1.05; }
.brand .tag { font-size: .7rem; color: var(--gold-soft); letter-spacing: .12em; text-transform: uppercase; }

.nav { display: flex; gap: 2px; margin-left: auto; flex-wrap: nowrap; align-items: center; }
.nav a, .nav summary {
  color: #dfe9e3; text-decoration: none; font-size: .86rem; font-weight: 600;
  padding: 7px 9px; border-radius: 6px; cursor: pointer; list-style: none; white-space: nowrap;
}
.nav summary::-webkit-details-marker { display: none; }
.nav a:hover, .nav summary:hover { background: var(--green-700); color: #fff; }
.nav a.active { background: var(--gold); color: var(--green-900); }
.nav details { position: relative; }
.nav details[open] summary { background: var(--green-700); color: #fff; }
.nav .menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 6px; display: grid;
}
.nav .menu a { color: var(--ink); font-weight: 500; }
.nav .menu a:hover { background: var(--cream); color: var(--ink); }
.nav .menu .sep { height: 1px; background: var(--line); margin: 4px 6px; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--green-600); color: #fff; border-radius: 6px; padding: 6px 10px; font: inherit; }

.season-pill {
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: var(--green-700); color: var(--gold-soft); border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}

@media (max-width: 1240px) { .brand .tag { display: none; } }
@media (max-width: 1100px) {
  .menu-toggle { display: block; }
  .nav { display: none; width: 100%; margin: 0; padding-bottom: 8px; flex-wrap: wrap; }
  .nav.open { display: flex; }
  .site-header .bar { flex-wrap: wrap; }
  .nav details { width: 100%; }
  .nav .menu { position: static; box-shadow: none; margin-top: 4px; }
}

/* ---------- Layout ---------- */
main { max-width: var(--max); margin: 0 auto; padding: 26px 20px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { margin: 0; color: var(--muted); max-width: 62ch; }
.eyebrow { font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 4px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}
.card.flush { padding: 0; overflow: hidden; }
.card .card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card .card-head h2, .card .card-head h3 { margin: 0; }
.card .card-body { padding: 16px 18px; }

.stat .label { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stat .value { font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; color: var(--green-900); line-height: 1.1; margin-top: 4px; }
.stat .sub { color: var(--muted); font-size: .85rem; }

.hero {
  background: radial-gradient(120% 140% at 100% 0%, var(--green-700) 0%, var(--green-900) 60%);
  color: #fff; border-radius: 14px; padding: 30px 28px; position: relative; overflow: hidden;
  border-bottom: 4px solid var(--gold);
}
.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.1rem); margin-bottom: 6px; }
.hero p { color: #d3e2d9; margin: 0; max-width: 58ch; }
.hero .eyebrow { color: var(--gold-soft); }
.hero .flag { position: absolute; right: -10px; bottom: -18px; width: 210px; opacity: .14; color: var(--gold); }

/* ---------- Controls ---------- */
.controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
select { max-width: 100%; }
.page-head > div { min-width: 0; max-width: 100%; }
select, input[type=text], input[type=number], input[type=password], input[type=url], input[type=email], input[type=tel] {
  font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 38px;
}
select:focus, input:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.btn {
  font: inherit; font-weight: 700; font-size: .88rem; border-radius: 8px; padding: 9px 14px; cursor: pointer;
  border: 1px solid var(--green-800); background: var(--green-800); color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover { background: var(--green-700); color: #fff; }
.btn.ghost { background: transparent; color: var(--green-800); }
.btn.ghost:hover { background: var(--cream); color: var(--green-800); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--green-900); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.tabs { display: inline-flex; background: var(--paper); border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
.tabs button { font: inherit; font-size: .85rem; font-weight: 700; border: 0; background: none; padding: 7px 12px; border-radius: 6px; cursor: pointer; color: var(--muted); }
.tabs button.on { background: var(--green-800); color: #fff; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 9px 10px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: #faf8f2; font-weight: 700; position: sticky; top: 0; }
td.name, th.name { text-align: left; }
td.name { font-weight: 600; }
tbody tr:hover { background: #fbfaf5; }
tr.leader td { background: #fff7d6; }
tr.leader td.name { font-weight: 800; }
.pos {
  display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 6px; border-radius: 999px;
  font-weight: 800; font-size: .8rem; background: var(--cream); color: var(--green-900);
}
tr.leader .pos { background: var(--gold); }
.under { color: var(--under); font-weight: 700; }
.even { color: var(--ink); font-weight: 600; }
.over { color: var(--over); }
.num-strong { font-weight: 800; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }

/* scorecard cells */
.sc td, .sc th { padding: 6px 5px; min-width: 30px; }
.sc .eagle { background: #f6c84c; border-radius: 50%; }
.sc .birdie { box-shadow: inset 0 0 0 2px var(--under); border-radius: 50%; color: var(--under); font-weight: 700; }
.sc .bogey { box-shadow: inset 0 0 0 1.5px var(--over); }
.sc .double { box-shadow: inset 0 0 0 3px var(--over); }
.sc .stroke-dot { color: var(--gold-ink); font-size: .65rem; vertical-align: super; }

/* ---------- Badges / chips ---------- */
.badge { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--cream); color: var(--green-800); border: 1px solid var(--line); vertical-align: middle; }
.badge.final { background: #e3f3e8; color: var(--good); border-color: #c6e6cf; }
.badge.live { background: #fff1d6; color: var(--warn); border-color: #f2d9a6; }
.badge.sub { background: #eef0ff; color: #3a43a0; border-color: #d7dbfb; }
.badge.gold { background: var(--gold); color: var(--green-900); border-color: var(--gold); }
.badge.soon { background: #f1efe8; color: var(--muted); }

/* skins hole grid */
.holes { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 8px; }
.hole { border: 1px solid var(--line); border-radius: 8px; padding: 8px 6px; text-align: center; background: var(--paper); min-height: 74px; }
.hole .n { font-size: .7rem; font-weight: 800; color: var(--muted); letter-spacing: .08em; }
.hole .par { font-size: .7rem; color: var(--muted); }
.hole .w { font-weight: 700; font-size: .8rem; margin-top: 4px; line-height: 1.2; }
.hole.won { background: #fff7d6; border-color: #efd88a; }
@media (max-width: 700px) { .holes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* roadmap / structure */
.roadmap li { margin: 6px 0; }
.feature { display: flex; gap: 12px; align-items: flex-start; }
.feature .ico { flex: none; width: 34px; height: 34px; border-radius: 8px; background: var(--cream); display: grid; place-items: center; color: var(--green-700); }
.feature p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }

.notice { border-left: 4px solid var(--gold); background: #fffaf0; padding: 12px 14px; border-radius: 8px; color: var(--ink); font-size: .9rem; }
.skeleton { background: linear-gradient(90deg, #eee9dc 0%, #f7f4ec 50%, #eee9dc 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 6px; height: 14px; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.site-footer .bar { max-width: var(--max); margin: 0 auto; padding: 18px 20px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media print {
  .site-header, .site-footer, .controls, .no-print { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; }
}
@media (max-width: 480px) { .season-pill { display: none; } }

/* ---- 2027 refresh: archive strip, pre-season panels, home ---- */
a.season-pill { text-decoration: none; }
a.season-pill:hover { filter: brightness(1.08); }
.archive-strip { background: var(--gold); color: var(--green-900); font-size: .88rem; }
.archive-strip .bar { max-width: var(--max); margin: 0 auto; padding: 8px 20px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.archive-strip a { color: var(--green-900); font-weight: 800; }
.preseason { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 24px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.preseason .ps-mark { width: 120px; height: 120px; border-radius: 50%; background: var(--green-800); display: grid; place-items: center; color: var(--gold); }
.preseason .ps-mark .flag { width: 58px; }
.preseason h2 { margin: 2px 0 6px; font-size: 1.5rem; }
.preseason p { margin: 0; color: var(--muted); max-width: 60ch; }
@media (max-width: 640px) { .preseason { grid-template-columns: 1fr; text-align: left; padding: 22px; } .preseason .ps-mark { width: 72px; height: 72px; } .preseason .ps-mark .flag { width: 34px; } }

.hero.v27 { padding-bottom: 34px; }
.hero.v27 h1 { max-width: 16ch; line-height: 1.05; }
.countdown { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.countdown div { background: rgba(255,255,255,.08); border: 1px solid rgba(243,215,121,.35); border-radius: 10px; padding: 10px 14px; min-width: 78px; text-align: center; }
.countdown strong { display: block; font-family: var(--font-display); font-size: 1.7rem; color: #fff; line-height: 1; }
.countdown span { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-soft); }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist .dot { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: .75rem; font-weight: 800; margin-top: 1px; }
.checklist li.done .dot { background: var(--good); border-color: var(--good); color: #fff; }
.checklist li.next .dot { border-color: var(--gold); background: #fff7d6; }
.checklist .t { font-weight: 700; }
.checklist .d { color: var(--muted); font-size: .86rem; }
.champ-card { background: linear-gradient(135deg, var(--green-800), var(--green-700)); color: #fff; border: 0; }
.champ-card h2, .champ-card h3 { color: #fff; }
.champ-card .eyebrow { color: var(--gold-soft); }
.champ-card .big { font-family: var(--font-display); font-size: 1.9rem; font-weight: 800; color: var(--gold); line-height: 1.1; }
.champ-card table { color: #fff; }
.champ-card th { color: var(--gold-soft) !important; background: transparent !important; border-color: rgba(255,255,255,.14) !important; }
.champ-card td { border-color: rgba(255,255,255,.12) !important; }
.champ-card a { color: var(--gold-soft); font-weight: 700; }
.new-list { display: grid; gap: 14px; }

/* ---- Admin ---- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; vertical-align: middle; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: #d9d4c5; border-radius: 999px; transition: background .15s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + span { background: var(--green-600); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
input[type=email], input[type=date], textarea { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 38px; }
textarea { width: 100%; resize: vertical; line-height: 1.5; }
.adm-auth { margin-bottom: 16px; }
.adm-auth.ok { border-color: #c6e6cf; background: #f6fbf7; }
.adm-auth.warn { border-color: #f2d9a6; background: #fffaf0; }
.adm-auth-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.adm-signin { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-signin input { width: 190px; }
.adm-uid { display: inline-block; margin-top: 4px; padding: 2px 6px; background: #fff; border: 1px solid var(--line); border-radius: 6px; user-select: all; word-break: break-all; }
.adm-bad { color: var(--under); font-weight: 600; }
.adm-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.adm-head { flex-wrap: wrap; }
.adm-head #psearch { width: 170px; }
.adm-table td { padding: 6px 8px; }
.adm-table td.name { min-width: 210px; }
.adm-table input[type=text] { width: 100%; min-width: 160px; }
.adm-table input.thin { width: 86px; text-align: right; }
.adm-table select { min-width: 110px; }
.adm-table input.bad, .adm-table select.bad { border-color: var(--under); background: #fff5f4; }
.adm-table tr.dirty td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.adm-table tr.off input[type=text] { color: var(--muted); }
.adm-x { border: 0; background: none; font-size: 1.35rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.adm-x:hover { background: #fff0ee; color: var(--under); }
.adm-check { display: flex; gap: 8px; align-items: center; margin: 12px 0; font-size: .92rem; cursor: pointer; }
.adm-check input { width: 18px; height: 18px; accent-color: var(--green-700); }
.adm-preview { margin-top: 6px; padding: 12px 14px; background: var(--cream); border-radius: 8px; }
.adm-kv td { text-align: left; white-space: normal; padding: 8px 6px; }
.adm-kv td:first-child { color: var(--muted); font-weight: 600; width: 38%; }
.adm-list { margin: 0; padding-left: 18px; max-height: 300px; overflow: auto; }
.adm-list li { margin: 3px 0; }
.adm-save { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--green-900); color: #fff; border-top: 3px solid var(--gold); box-shadow: 0 -6px 20px rgba(0,0,0,.18); }
.adm-save-in { max-width: var(--max); margin: 0 auto; padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.adm-save .btn.ghost { color: #fff; border-color: #3d7a5b; }
.adm-save .btn.ghost:hover { background: var(--green-700); }
.adm-save .adm-bad { color: #ffb4ab; }
body.has-savebar main { padding-bottom: 110px; }
.modal { position: fixed; inset: 0; background: rgba(11,36,24,.55); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal[hidden] { display: none; }
.modal-card { background: var(--paper); border-radius: 12px; padding: 20px; max-width: 480px; width: 100%; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--green-900); color: #fff; padding: 11px 16px; border-radius: 9px; font-size: .9rem; box-shadow: var(--shadow); z-index: 60; max-width: calc(100% - 32px); }
.news-text p { margin: 0 0 10px; }
.news-card .eyebrow { margin-bottom: 6px; }
@media (max-width: 720px) {
  .adm-table thead { display: none; }
  .adm-table, .adm-table tbody, .adm-table tr, .adm-table td { display: block; width: 100%; }
  .adm-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); position: relative; }
  .adm-table td { border: 0; padding: 0; text-align: left; }
  .adm-table td.name { grid-column: 1 / -1; padding-right: 36px; }
  .adm-table td[data-label]:not(.name)::before { content: attr(data-label); display: block; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
  .adm-table td:last-child { position: absolute; top: 10px; right: 8px; width: auto; }
  .adm-table input.thin, .adm-table select { width: 100%; }
  .adm-table tr.dirty td:first-child { box-shadow: none; }
  .adm-table tr.dirty { box-shadow: inset 3px 0 0 var(--gold); }
  .adm-head .controls { width: 100%; }
  .adm-head #psearch { flex: 1; width: auto; }
  .adm-signin, .adm-signin input { width: 100%; }
  .adm-save .controls { width: 100%; }
  .adm-save .btn { flex: 1; justify-content: center; padding: 9px 8px; }
}
[hidden] { display: none !important; }
.lbl { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 12px 0 4px; }
.nw { white-space: nowrap; }
.adm-name { display: flex; align-items: center; gap: 8px; }
.adm-name input { flex: 1; }

/* ---- Schedule: courses coming soon ---- */
.soon-card { display: grid; grid-template-columns: minmax(220px, 360px) minmax(0, 1fr); gap: 28px; align-items: center; background: linear-gradient(135deg, var(--green-900), var(--green-700)); color: #fff; border-radius: var(--radius); padding: 30px 34px; border-bottom: 4px solid var(--gold); box-shadow: var(--shadow); }
.soon-art { width: 100%; height: auto; }
.soon-body .eyebrow { color: var(--gold-soft); }
.soon-body h2 { color: #fff; font-size: 2.2rem; margin: 4px 0 8px; line-height: 1.1; }
.soon-body p { color: rgba(255,255,255,.85); margin: 0 0 16px; max-width: 52ch; }
.soon-weeks { display: flex; gap: 8px; flex-wrap: wrap; }
.soon-weeks span { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .9rem; border: 2px dashed rgba(243,215,121,.55); color: #fff; }
.soon-weeks span.po { background: var(--gold); border: 2px solid var(--gold); color: var(--green-900); }
.soon-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; color: rgba(255,255,255,.8); }
.soon-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px dashed rgba(243,215,121,.7); margin-right: 6px; vertical-align: -1px; }
.soon-legend i.po { background: var(--gold); border: 2px solid var(--gold); }
@media (max-width: 720px) { .soon-card { grid-template-columns: 1fr; padding: 22px; gap: 14px; } .soon-art { max-width: 240px; } .soon-body h2 { font-size: 1.7rem; } .soon-weeks span { width: 32px; height: 32px; font-size: .8rem; } }
.is-off { opacity: .5; pointer-events: none; }

/* ---------- Home page media (commissioner posts + banner background) ---------- */
.hero.has-bg > :not(.hm-hero-bg) { position: relative; z-index: 1; }
.hm-hero-bg { position: absolute; inset: 0; z-index: 0; }
.hm-hero-bg img, .hm-hero-bg video { width: 100%; height: 100%; object-fit: cover; display: block; }
.hm-hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,36,24,.92) 0%, rgba(11,36,24,.72) 45%, rgba(11,36,24,.35) 100%); }
.hero.has-bg .flag { display: none; }
.hm-wall { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.hm-block { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.hm-full { grid-column: span 6; } .hm-half { grid-column: span 3; } .hm-third { grid-column: span 2; }
.hm-media { background: var(--green-900); display: flex; justify-content: center; align-items: center; flex: 1; }
.hm-media img, .hm-media video { width: 100%; height: auto; display: block; max-height: 560px; object-fit: contain; }
.hm-half .hm-media img, .hm-half .hm-media video, .hm-third .hm-media img, .hm-third .hm-media video { max-height: 420px; }
.hm-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; }
.hm-embed.tall { aspect-ratio: 9 / 16; max-height: 640px; width: auto; height: 640px; max-width: 100%; }
.hm-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hm-block figcaption { padding: 14px 18px 16px; }
.hm-block figcaption h3 { margin: 0 0 6px; font-size: 1.15rem; }
.hm-block figcaption p { margin: 0 0 8px; color: var(--ink); line-height: 1.5; }
.hm-block figcaption .btn { margin-top: 4px; }
.hm-t-text { background: var(--green-900); border-color: var(--green-800); border-bottom: 4px solid var(--gold); }
.hm-t-text figcaption { padding: 22px 24px; }
.hm-t-text figcaption h3 { color: #fff; font-size: 1.45rem; }
.hm-t-text figcaption p { color: #d3e2d9; font-size: 1.02rem; }
@media (max-width: 860px) { .hm-third { grid-column: span 3; } }
@media (max-width: 620px) { .hm-half, .hm-third { grid-column: span 6; } .hm-embed.tall { height: 560px; } }

/* Admin: home page media editor */
.hm-ed-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.hm-ed-row:last-child { border-bottom: 0; }
.hm-ed-row.off { opacity: .55; }
.hm-thumb { width: 96px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--green-900); display: flex; align-items: center; justify-content: center; color: var(--gold-soft); font-size: .72rem; font-weight: 700; text-align: center; }
.hm-thumb img, .hm-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.hm-ph { padding: 4px; }
.hm-ed-row .t { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-ed-row .d { font-size: .85rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-ed-row .controls { gap: 6px; flex-wrap: nowrap; }
.hm-ed-row .btn { padding: 6px 9px; min-height: 0; font-size: .82rem; }
.hm-src { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.hm-src label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 11px; cursor: pointer; font-weight: 600; font-size: .9rem; }
.hm-src label:has(input:checked) { border-color: var(--green-700); background: var(--cream); }
.hm-drop { display: block; border: 2px dashed var(--line); border-radius: 10px; padding: 18px; text-align: center; color: var(--muted); cursor: pointer; }
.hm-drop.over { border-color: var(--gold); background: #fffbea; }
.hm-prev { margin-top: 10px; border-radius: 10px; overflow: hidden; }
.hm-prev:empty { display: none; }
.hm-prev .hm-media img, .hm-prev .hm-media video { max-height: 260px; }
.hm-hero-prev { height: 120px; border-radius: 10px; position: relative; overflow: hidden; background: radial-gradient(120% 140% at 100% 0%, var(--green-700) 0%, var(--green-900) 60%); color: #fff; display: flex; align-items: flex-end; padding: 12px 14px; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; }
.hm-hero-prev > span { position: relative; z-index: 1; }
@media (max-width: 620px) { .hm-ed-row { grid-template-columns: 72px minmax(0, 1fr); } .hm-ed-row .controls { grid-column: 1 / -1; flex-wrap: wrap; } .hm-thumb { width: 72px; height: 52px; } }
.tt-check { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; cursor: pointer; }
.tt-check input { margin-top: 3px; accent-color: var(--green-700); }
@media (max-width: 720px) { .hm-hero-bg::after { background: rgba(11,36,24,.8); } }

/* ---------- Non-league tournaments ---------- */
:root { --holly: #9e1b22; --holly-soft: #f7e3e1; }
.flyer {
  margin-top: 18px; position: relative; overflow: hidden; border-radius: 14px;
  background: #fffdf6; border: 2px solid var(--gold); box-shadow: var(--shadow);
  display: grid; grid-template-columns: minmax(0, 1fr) 260px;
}
.flyer-ribbon { position: absolute; inset: 0 auto 0 0; width: 8px; background: repeating-linear-gradient(180deg, var(--holly) 0 18px, #fff 18px 24px, var(--green-700) 24px 42px, #fff 42px 48px); }
.flyer-main { padding: 24px 26px 22px 34px; min-width: 0; }
.flyer-kicker { font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--holly); }
.flyer-title { font-size: clamp(1.5rem, 3.6vw, 2.25rem); font-weight: 800; margin: 6px 0 8px; color: var(--green-900); text-wrap: balance; }
.flyer-title span { color: var(--holly); }
.flyer-lede { margin: 0 0 16px; color: var(--ink); max-width: 60ch; }
.flyer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.flyer-grid > div { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.flyer-grid span { display: block; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.flyer-grid strong { display: block; font-family: var(--font-display); font-size: 1.3rem; color: var(--green-900); line-height: 1.2; margin-top: 2px; }
.flyer-grid em { display: block; font-style: normal; font-size: .8rem; color: var(--muted); }
.flyer-cta { margin-top: 16px; }
.flyer-fine { font-size: .84rem; color: var(--muted); margin: 14px 0 0; max-width: 72ch; }
.flyer-side { background: radial-gradient(120% 120% at 100% 0%, var(--green-700), var(--green-900) 70%); color: #fff; padding: 24px 22px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; }
.flyer-pot span, .flyer-pot em { display: block; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-soft); font-style: normal; font-weight: 700; }
.flyer-pot em { text-transform: none; letter-spacing: 0; font-weight: 500; color: #cfe0d6; font-size: .85rem; margin-top: 2px; }
.flyer-pot strong { display: block; font-family: var(--font-display); font-size: 2.6rem; line-height: 1.05; color: #fff; margin-top: 4px; }
.flyer-dates { display: grid; gap: 8px; font-size: .88rem; color: #dfe9e3; }
.flyer-dates b { color: var(--gold); margin-right: 6px; }
.flyer-ghost { color: var(--green-800); }
@media (max-width: 860px) {
  .flyer { grid-template-columns: 1fr; }
  .flyer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flyer-main { padding: 20px 18px 18px 26px; }
}

.tn-hero {
  background: radial-gradient(120% 140% at 100% 0%, var(--green-700) 0%, var(--green-900) 60%);
  color: #fff; border-radius: 14px; padding: 28px; position: relative; overflow: hidden; border-bottom: 4px solid var(--holly);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end;
}
.tn-hero h1 { color: #fff; margin-bottom: 6px; text-wrap: balance; }
.tn-hero p { color: #d3e2d9; margin: 0; max-width: 60ch; }
.tn-hero .eyebrow, .tn-hero .eyebrow a { color: var(--gold-soft); text-decoration: none; }
.tn-hero .flag { position: absolute; right: -10px; bottom: -18px; width: 180px; opacity: .1; color: var(--gold); pointer-events: none; }
.tn-hero-stats { display: grid; grid-template-columns: repeat(2, minmax(120px, 1fr)); gap: 10px; position: relative; z-index: 1; }
.tn-hero-stats div { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 10px 12px; }
.tn-hero-stats span { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-soft); }
.tn-hero-stats strong { font-family: var(--font-display); font-size: 1.25rem; }
.btn.tn-ghost { color: #fff; border-color: #3d7a5b; }
.btn.tn-ghost:hover { background: var(--green-700); color: #fff; }
@media (max-width: 800px) { .tn-hero { grid-template-columns: 1fr; padding: 22px 18px; } }

.tn-tabs-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 18px 0 14px; }
.tn-tabs-row .tabs { max-width: 100%; overflow-x: auto; }
.tn-rules { margin: 0 0 12px; padding-left: 18px; display: grid; gap: 8px; }
.tn-purse-row { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); }
.tn-purse-row strong { font-family: var(--font-display); font-size: 1.4rem; color: var(--green-900); }
.tn-purse .small { margin-top: 8px; }
.tn-dates { display: grid; gap: 10px; }
.tn-dates div { display: grid; grid-template-columns: 150px 1fr; gap: 10px; }
.tn-dates strong { color: var(--holly); }
.tn-dates span { color: var(--muted); font-size: .9rem; }
.tn-wait td { color: var(--muted); }
@media (max-width: 640px) { .tn-hide-sm { display: none; } .tn-dates div { grid-template-columns: 1fr; gap: 0; } }

.tn-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tn-team { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fffdf8; }
.tn-team-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 6px; }
.tn-solo { border-style: dashed; }
.tn-pl { display: flex; flex-direction: column; padding: 4px 0; }
.tn-pl-name { font-weight: 600; }
.tn-pending h2 { margin-top: 2px; }
.tn-win.first { border-color: var(--gold); background: #fffaf0; }
.tn-win-row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; color: var(--muted); }
.tn-win-row strong { font-family: var(--font-display); font-size: 1.6rem; color: var(--green-900); }

.tn-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; border-left: 5px solid var(--holly); }
.tn-item h2 a { color: var(--green-900); text-decoration: none; }
.tn-item h2 a:hover { text-decoration: underline; }
.tn-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; color: var(--muted); }
.tn-facts strong { color: var(--ink); }
.tn-item-links { display: flex; flex-direction: column; gap: 8px; min-width: 160px; }
.tn-item-links .btn { justify-content: center; }
@media (max-width: 700px) { .tn-item { grid-template-columns: 1fr; } .tn-item-links { flex-direction: row; flex-wrap: wrap; } }

.tn-narrow { max-width: 760px; }
.tn-form fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 4px 16px 16px; margin: 14px 0 0; }
.tn-form legend { font-family: var(--font-display); font-weight: 700; color: var(--green-900); padding: 0 6px; }
.tn-form input[type=text], .tn-form input[type=number], .tn-form input[type=email], .tn-form input[type=tel], .tn-form select { width: 100%; }
.tn-form .opt { text-transform: none; letter-spacing: 0; font-weight: 500; }
.tn-help { margin-top: 4px; }
.tn-hcp-row { display: grid; grid-template-columns: 1fr 1fr 110px; gap: 10px; align-items: end; }
.tn-allow { padding-bottom: 6px; }
.tn-allow strong { display: block; font-family: var(--font-display); font-size: 1.35rem; color: var(--green-900); line-height: 1.2; }
.tn-need { margin: 12px 0 4px; padding: 10px 12px; background: var(--cream); border-radius: 8px; }
.tn-form .tt-submit { width: 100%; justify-content: center; margin-top: 18px; padding: 12px; font-size: 1rem; }
.tn-done { border-top: 4px solid var(--good); }
@media (max-width: 520px) { .tn-hcp-row { grid-template-columns: 1fr 1fr; } .tn-allow { grid-column: 1 / -1; } }

.tn-adm-row { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin: 14px 0 10px; }
.tn-adm-row input[type=datetime-local] { font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.tn-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tn-acts input[type=text] { min-width: 130px; width: 140px; }
.tn-adm-pl { display: grid; grid-template-columns: minmax(130px, 1fr) 84px 76px; gap: 6px; margin: 3px 0; }
.tn-adm-teams input[type=date] { font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.tn-adm-teams td:last-child { position: static; }
.tn-form .tt-err { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: #fff5f4; color: var(--under); border: 1px solid #f1c9c5; font-size: .9rem; }
@media (max-width: 760px) { #admin .adm-table td:last-child { position: static; } #admin .adm-table tr { grid-template-columns: 1fr; } }
@media (max-width: 1400px) and (min-width: 1101px) {
  .nav a, .nav summary { padding: 7px 7px; font-size: .84rem; }
  span.season-pill { display: none; }
}

.tn-member-row { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 10px 0 2px; padding: 10px 12px; background: var(--cream); border-radius: 8px; }
.tn-ghin { margin-top: 8px; }
.tn-ghin input { max-width: 220px; }

/* Pending league requests (admin) */
.pd-list { display: grid; gap: 12px; }
.pd-item { display: flex; gap: 16px; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: #fff; }
.pd-name { margin-bottom: 8px; }
.pd-kv { display: grid; grid-template-columns: repeat(4, minmax(0, auto)); gap: 6px 22px; margin: 0; }
.pd-kv dt { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.pd-kv dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.pd-act { flex-shrink: 0; }
#pendCount { margin-left: 4px; font-size: 11px; padding: 1px 7px; }
.modal-card select, .modal-card input[type=number] { width: 100%; }
@media (max-width: 720px) {
  .pd-item { flex-direction: column; align-items: stretch; }
  .pd-kv { grid-template-columns: 1fr 1fr; }
  .pd-act { justify-content: flex-end; }
}
.adm-nav #tabs { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.adm-nav #tabs::-webkit-scrollbar { display: none; }
.adm-nav #tabs button { white-space: nowrap; flex-shrink: 0; }
