/* Broken Bat Brewery Wiffleball League
   Brand navy #22314F + cream #C5C2AB from brokenbatbrewery.com, on a deeper night-game
   background with an amber "cold beer" accent. Previous look is kept in styles.classic.css. */
:root {
  --bg: #0b1120;
  --navy-deep: #0b1120;
  --navy: #22314F;
  --navy-3: #33476f;
  --surface: #141d33;
  --surface-2: #1b2743;
  --surface-3: #24335a;
  --cream: #C5C2AB;
  --cream-2: #dcd9c4;
  --paper: #f4f2e8;      /* primary text on dark */
  --paper-2: #b4bacb;    /* secondary text on dark */
  --ink: #f4f2e8;        /* text inside cards */
  --muted: #8b93a8;
  --accent: #ffb22e;
  --accent-2: #ff7a2f;
  --accent-ink: #1a1203;
  --grad: linear-gradient(135deg, #ffc94d 0%, #ffb22e 45%, #ff7a2f 100%);
  --win: #4ade80;
  --loss: #ff6b5e;
  --line: rgba(197, 194, 171, .14);
  --line-2: rgba(197, 194, 171, .28);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
  --glow: 0 8px 28px -8px rgba(255, 160, 40, .55);
  --display: 'Jost', 'Futura', 'Century Gothic', 'Trebuchet MS', sans-serif;
  --body: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 520px at 12% -120px, rgba(51, 71, 111, .75) 0%, transparent 70%),
    radial-gradient(700px 420px at 100% 0, rgba(255, 140, 40, .13) 0%, transparent 65%);
  background-repeat: no-repeat;
  color: var(--paper);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
img { max-width: 100%; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
main.wrap { flex: 1; padding-top: 28px; padding-bottom: 64px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: .01em; margin: 0 0 .5em; line-height: 1.02; }
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.15rem; font-weight: 700; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Page content eases in on each route change */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
main > * { animation: rise .45s cubic-bezier(.2, .7, .2, 1) both; }
main > *:nth-child(2) { animation-delay: .05s; }
main > *:nth-child(3) { animation-delay: .1s; }
main > *:nth-child(n+4) { animation-delay: .15s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(11, 17, 32, .78); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--paper); margin-right: auto; }
.brand img { transition: transform .25s ease; }
.brand-logo { height: 44px; width: auto; }
.brand:hover img { transform: rotate(-3deg) scale(1.05); }
.brand-text { display: flex; flex-direction: column; font-family: var(--display); text-transform: uppercase; line-height: 1; }
.brand-top { font-size: 1.15rem; font-weight: 800; letter-spacing: .03em; color: var(--paper); }
.brand-sub { font-size: .72rem; font-weight: 600; color: var(--accent); letter-spacing: .24em; margin-top: 5px; }
.nav { display: flex; gap: 2px; align-items: center; }
.nav a { position: relative; white-space: nowrap; font-family: var(--display); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; font-size: .88rem; color: var(--paper-2); text-decoration: none; padding: 8px 9px; border-radius: 999px; transition: color .15s, background .15s; }
.nav a:hover { color: var(--paper); background: rgba(255, 255, 255, .07); }
.nav a.active { color: var(--paper); background: rgba(255, 255, 255, .09); }
.nav a.active::after { content: ''; position: absolute; left: 11px; right: 11px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--grad); }
.menu-btn { display: none; background: none; border: 0; padding: 10px; cursor: pointer; border-radius: 10px; }
.menu-btn span { display: block; width: 24px; height: 2.5px; background: var(--paper); margin: 5px 0; border-radius: 2px; }

@media (max-width: 1200px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: rgba(11, 17, 32, .98); border-bottom: 1px solid var(--line); padding: 8px 16px 18px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 13px 14px; font-size: 1.1rem; border-radius: 12px; }
  .nav a.active::after { display: none; }
  .nav a.nav-cta { text-align: center; margin: 8px 0 0; }
}

.announce-bar { background: var(--grad); color: var(--accent-ink); font-weight: 700; font-size: .95rem; }
.announce-bar .wrap { padding-top: 9px; padding-bottom: 9px; }
.announce-bar a { color: inherit; }
.site-footer a { color: inherit; }
.live-bar { background: linear-gradient(90deg, #d93a2b, #ff5a4a); color: #fff; font-weight: 600; }
.live-bar .wrap { display: flex; gap: 18px; overflow-x: auto; padding-top: 8px; padding-bottom: 8px; white-space: nowrap; }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #fff; margin-right: 6px; animation: pulse 1.4s infinite; box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); }
@keyframes pulse { 50% { opacity: .35; box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); } }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; border-radius: 28px; overflow: hidden; padding: clamp(28px, 6vw, 64px) clamp(20px, 5vw, 56px); margin-bottom: 36px;
  background:
    radial-gradient(620px 360px at 92% 8%, rgba(255, 150, 40, .34), transparent 62%),
    radial-gradient(520px 420px at 0% 100%, rgba(74, 108, 180, .5), transparent 65%),
    linear-gradient(135deg, #2b3f6e 0%, #1c2947 50%, #101829 100%);
  border: 1px solid var(--line-2); box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .08); }
/* home hero: field photo behind the text, darkened on the left so the copy stays readable */
.hero.hero-photo { background:
    linear-gradient(100deg, rgba(11, 17, 32, .95) 0%, rgba(16, 24, 41, .86) 42%, rgba(16, 24, 41, .5) 100%),
    url('/img/venue/field-outfield.jpg') center 45% / cover no-repeat, #101829; }
.hero.hero-photo::before, .hero.hero-photo::after { display: none; }
@media (max-width: 640px) { .hero.hero-photo { background:
    linear-gradient(180deg, rgba(11, 17, 32, .9) 0%, rgba(16, 24, 41, .86) 100%),
    url('/img/venue/field-outfield.jpg') center / cover no-repeat, #101829; } }
/* wiffle-ball perforations fading in from the right */
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .13) 1.6px, transparent 1.8px); background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(105deg, transparent 35%, #000 100%); mask-image: linear-gradient(105deg, transparent 35%, #000 100%); }
.hero::after { content: ''; position: absolute; z-index: -1; right: -90px; top: -110px; width: 380px; height: 380px; border-radius: 50%;
  border: 2px solid rgba(255, 190, 90, .25); box-shadow: 0 0 0 44px rgba(255, 190, 90, .05), 0 0 0 96px rgba(255, 190, 90, .03); pointer-events: none; }
.eyebrow { display: inline-block; font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .22em; color: var(--accent); font-size: .82rem; margin-bottom: 14px; }
.hero .eyebrow { background: rgba(255, 178, 46, .12); border: 1px solid rgba(255, 178, 46, .35); padding: 6px 14px; border-radius: 999px; letter-spacing: .18em; }
.hero h1 { color: #fff; font-size: clamp(2.5rem, 8.2vw, 5.4rem); letter-spacing: -.005em; line-height: .95; margin-bottom: .35em; text-wrap: balance; }
.hero h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sm h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); }
.hero p { max-width: 560px; color: #cfd4e2; margin: 0 0 24px; font-size: 1.1rem; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { display: inline-block; font-family: var(--display); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; padding: 12px 22px; border-radius: 999px; text-decoration: none; border: 1.5px solid var(--line-2); color: var(--paper); background: rgba(255, 255, 255, .05); cursor: pointer; font-size: .92rem; transition: transform .15s ease, box-shadow .15s ease, background .15s, border-color .15s, color .15s; }
.btn:hover { background: rgba(255, 255, 255, .12); border-color: var(--cream); color: #fff; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: var(--grad); color: var(--accent-ink); border-color: transparent; box-shadow: var(--glow); }
.btn.primary:hover { background: var(--grad); color: var(--accent-ink); border-color: transparent; filter: brightness(1.07); box-shadow: 0 12px 34px -8px rgba(255, 160, 40, .75); }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 36px; position: relative; z-index: 1; }
.kpi { background: rgba(8, 13, 26, .45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--radius); padding: 16px 18px; transition: transform .2s ease, border-color .2s; }
.kpi:hover { transform: translateY(-3px); border-color: rgba(255, 178, 46, .5); }
.kpi b { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1; color: #fff; font-variant-numeric: tabular-nums; margin-bottom: 6px; }
.kpi span { font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); }
@media (max-width: 640px) { .kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 28px; } .hero { border-radius: 22px; } }

/* ---------- Cards / layout ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.section { margin-bottom: 40px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.section-head h1, .section-head h2 { margin: 0; color: #fff; display: flex; align-items: center; gap: 12px; }
.section-head h1::before, .section-head h2::before { content: ''; flex: none; width: .9em; height: .9em; background: var(--grad); -webkit-mask: url(/img/logos/icon-ball.png) center / contain no-repeat; mask: url(/img/logos/icon-ball.png) center / contain no-repeat; }
.section-head a { font-family: var(--display); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; font-size: .82rem; text-decoration: none; color: var(--paper-2); padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; transition: color .15s, border-color .15s, background .15s; }
.section-head a::after { content: ' →'; }
.section-head a:hover { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

.card { background: var(--surface); color: var(--ink); border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow); }
.card-head { background: linear-gradient(180deg, var(--surface-3), var(--surface-2)); color: #fff; padding: 12px 16px; font-family: var(--display); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; font-size: .95rem; display: flex; justify-content: space-between; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.card-head span + span { color: var(--accent); font-size: .78rem; letter-spacing: .12em; }
.card-body { padding: 14px 16px; }
.card a { color: var(--ink); }
.card-body a { color: var(--accent); }

/* ---------- Games ---------- */
.game-list { display: grid; gap: 10px; }
.game { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; background: var(--surface); color: var(--ink); border-radius: 14px; padding: 12px 16px 12px 20px; border: 1px solid var(--line); text-decoration: none; overflow: hidden; transition: transform .15s ease, border-color .15s, background .15s, box-shadow .15s; }
.game::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--muted); }
.game.final::before { background: var(--navy-3); }
.game.live::before { background: var(--loss); }
.game.live { border-color: rgba(255, 107, 94, .45); }
.game.upcoming::before { background: var(--grad); }
.game.stale { opacity: .7; }
.game.stale::before { background: var(--line-2); }
.game .meta { grid-column: 1 / -1; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 2px; }
.game .meta .tag { background: rgba(255, 178, 46, .14); color: var(--accent); padding: 1px 8px; border-radius: 999px; }
.team-row { display: contents; }
.team-row .tn { font-weight: 600; overflow-wrap: anywhere; }
.team-row .sc { font-family: var(--mono); font-weight: 700; font-size: 1.15rem; text-align: right; }
.team-row.won .tn, .team-row.won .sc { color: #fff; }
.team-row.won .sc { color: var(--accent); }
.team-row.lost .tn, .team-row.lost .sc { color: var(--muted); font-weight: 500; }
a.game:hover { transform: translateY(-2px); border-color: var(--line-2); background: var(--surface-2); box-shadow: var(--shadow); }

.date-group { margin-bottom: 26px; }
.date-group h3 { color: var(--cream); font-size: .95rem; letter-spacing: .14em; margin-bottom: 10px; }
.date-group .game-list { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 10px 12px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }
th { font-family: var(--display); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; font-size: .74rem; color: var(--muted); background: var(--surface-2); position: sticky; top: 0; }
th.sortable { cursor: pointer; user-select: none; transition: color .15s; }
th.sortable:hover { color: var(--paper); }
th.sorted { color: var(--accent); background: var(--surface-3); box-shadow: inset 0 -2px 0 var(--accent); }
td { font-family: var(--mono); font-variant-numeric: tabular-nums; color: #d6dae6; }
th:first-child, td:first-child, th.l, td.l { text-align: left; }
td.name { text-align: left; font-family: var(--body); font-weight: 600; white-space: normal; min-width: 150px; color: #fff; }
td.name a { text-decoration: none; }
td.name a:hover { color: var(--accent); }
td.name small { display: block; font-weight: 400; color: var(--muted); font-size: .75rem; }
tbody tr { transition: background .12s; }
tbody tr:hover td { background: rgba(255, 255, 255, .045); }
td.rank { color: var(--muted); width: 1%; }
.w { color: var(--win); font-weight: 700; } .l-c { color: var(--loss); font-weight: 700; }
.pill { display: inline-block; width: 19px; height: 19px; line-height: 19px; text-align: center; border-radius: 6px; font-size: .68rem; font-weight: 700; margin-right: 3px; font-family: var(--mono); }
.pill.W { background: rgba(74, 222, 128, .16); color: var(--win); }
.pill.L { background: rgba(255, 107, 94, .16); color: var(--loss); }
.pill.T { background: rgba(255, 255, 255, .1); color: var(--paper-2); }

/* ---------- Leaders ---------- */
.leader-list { list-style: none; margin: 0; padding: 0; }
.leader-list li { display: grid; grid-template-columns: 22px 36px 1fr auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.leader-list li:last-child { border-bottom: 0; }
.leader-list .pos { font-family: var(--mono); color: var(--muted); }
.leader-list .who { min-width: 0; }
.leader-list .who a { font-weight: 600; text-decoration: none; color: #fff; }
.leader-list .who a:hover { color: var(--accent); }
.leader-list .who small { display: block; color: var(--muted); font-size: .75rem; overflow-wrap: anywhere; }
.leader-list .val { font-family: var(--mono); font-weight: 700; font-size: 1.05rem; color: #d6dae6; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-3); object-fit: cover; display: grid; place-items: center; font-family: var(--display); font-size: .85rem; color: var(--paper-2); border: 1.5px solid var(--line-2); overflow: hidden; }
.leader-list li:first-child .pos { color: var(--accent); font-weight: 700; }
.leader-list li:first-child .avatar { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 178, 46, .18); }
.leader-list li:first-child .val { color: var(--accent); font-size: 1.25rem; }

/* ---------- Controls ---------- */
.controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.seg button { background: none; border: 0; color: var(--paper-2); font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; padding: 7px 16px; border-radius: 999px; cursor: pointer; font-size: .88rem; transition: color .15s, background .15s; }
.seg button:hover { color: #fff; }
.seg button.on { background: var(--grad); color: var(--accent-ink); box-shadow: var(--glow); }
select, input[type=search] { background: var(--surface); color: var(--paper); border: 1px solid var(--line-2); border-radius: 999px; padding: 9px 14px; font: inherit; font-size: .92rem; max-width: 100%; transition: border-color .15s, box-shadow .15s; }
select:focus, input[type=search]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 178, 46, .2); }
label.check { display: inline-flex; align-items: center; gap: 6px; color: var(--paper-2); font-size: .9rem; cursor: pointer; }
input[type=checkbox] { accent-color: var(--accent); }
.note { color: var(--paper-2); font-size: .85rem; }
.card .note { color: var(--muted); }

/* ---------- Teams ---------- */
.team-card { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--surface); color: var(--ink); border-radius: var(--radius); padding: 18px; text-decoration: none; border: 1px solid var(--line); overflow: hidden; transition: transform .18s ease, border-color .18s, box-shadow .18s, background .18s; }
.team-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.team-card:hover { transform: translateY(-3px); border-color: var(--line-2); background: var(--surface-2); box-shadow: var(--shadow); }
.team-card:hover::before { transform: scaleX(1); }
.team-card b { font-family: var(--display); text-transform: uppercase; letter-spacing: .03em; font-size: 1.1rem; overflow-wrap: anywhere; }
.team-card small { display: block; color: var(--muted); }
.team-card .rec { font-family: var(--mono); font-weight: 700; font-size: 1.1rem; white-space: nowrap; color: var(--accent); }
.team-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; padding: 28px; border-radius: 22px; border: 1px solid var(--line-2);
  background: radial-gradient(480px 260px at 100% 0, rgba(255, 150, 40, .22), transparent 65%), linear-gradient(135deg, #2b3f6e, #141d33); box-shadow: var(--shadow); }
.team-hero h1 { overflow-wrap: anywhere; margin: 0; color: #fff; }
.team-hero .stats-row { display: flex; gap: 22px; flex-wrap: wrap; }
.team-hero .stats-row div { text-align: center; }
.team-hero .stats-row b { display: block; font-family: var(--display); font-weight: 800; font-size: 1.8rem; line-height: 1.1; color: #fff; }
.team-hero .stats-row span { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); }

/* ---------- About ---------- */
.prose { max-width: 720px; }
.prose p, .prose li { color: #cfd4e2; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 20px 0; }

/* ---------- Footer / misc ---------- */
.site-footer { border-top: 1px solid var(--line); background: rgba(8, 12, 24, .7); color: var(--paper-2); font-size: .9rem; }
.site-footer strong { color: var(--paper); font-family: var(--display); text-transform: uppercase; letter-spacing: .06em; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; padding-top: 26px; padding-bottom: calc(26px + env(safe-area-inset-bottom)); flex-wrap: wrap; }
.powered b { font-family: var(--display); letter-spacing: .04em; color: var(--accent); }
#updated { display: block; font-size: .78rem; opacity: .75; }
.loading, .empty, .error { padding: 40px 0; text-align: center; color: var(--paper-2); }
.game-list > .empty { background: rgba(255, 255, 255, .03); border: 1px dashed var(--line-2); border-radius: 14px; padding: 32px 16px; }
.error { color: #ffb4aa; }
.card .empty { padding: 16px 0; color: var(--muted); }
@media (max-width: 520px) { td.name { min-width: 120px; } th, td { padding: 8px 9px; } .wrap { padding: 0 14px; } }

/* ---------- Sign up / waiver forms ---------- */
.nav a.nav-cta { background: var(--grad); color: var(--accent-ink); font-weight: 700; padding: 9px 18px; margin-left: 8px; box-shadow: var(--glow); transition: transform .15s ease, filter .15s; }
.nav a.nav-cta:hover, .nav a.nav-cta.active { background: var(--grad); color: var(--accent-ink); filter: brightness(1.08); transform: translateY(-1px); }
.nav a.nav-cta.active::after { display: none; }
.hero-sm { padding: clamp(24px, 4vw, 40px) clamp(20px, 4vw, 40px); }
.kpis-2 { grid-template-columns: repeat(2, minmax(0, 200px)); }
.signup { max-width: 820px; display: grid; gap: 20px; }
.narrow { max-width: 820px; }
.type-seg { justify-self: start; }
.type-seg button { padding: 10px 20px; font-size: 1rem; }
.form-card { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 0; min-width: 0; box-shadow: var(--shadow); }
.form-card legend { font-family: var(--display); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; background: var(--surface-3); color: #fff; border: 1px solid var(--line-2); padding: 5px 16px; border-radius: 999px; font-size: .92rem; }
.form-card h2, .form-card h3 { color: #fff; }
.form-card a { color: var(--accent); }
legend i, .field i { color: var(--loss); font-style: normal; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--paper-2); }
.field.full { grid-column: 1 / -1; }
.signup input:not([type=checkbox]), .signup select, .signup textarea, .copy-row input {
  font: inherit; font-weight: 500; font-size: 1rem; color: var(--paper); background: #0c1322; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 11px 13px; width: 100%; max-width: none; transition: border-color .15s, box-shadow .15s; }
.signup input::placeholder, .signup textarea::placeholder { color: #5f6880; }
.signup input:focus, .signup select:focus, .signup textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 178, 46, .2); }
.signup textarea { resize: vertical; margin-top: 4px; }
.signup .field.full { margin-top: 14px; }
.field-grid .field.full { margin-top: 0; }
.sub { margin: 20px 0 10px; font-size: 1rem; }
.sub small { display: block; text-transform: none; letter-spacing: 0; font-family: var(--body); font-weight: 500; color: var(--muted); font-size: .85rem; margin-top: 4px; }
.roster-row { display: grid; grid-template-columns: 26px 1fr 1fr 36px; gap: 8px; align-items: center; margin-bottom: 8px; }
.roster-num { font-family: var(--mono); color: var(--muted); text-align: center; }
.x-btn { background: none; border: 1px solid var(--line-2); border-radius: var(--radius-sm); height: 44px; font-size: 1.3rem; color: var(--muted); cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.x-btn:hover { border-color: var(--loss); color: var(--loss); background: rgba(255, 107, 94, .1); }
.btn.small { padding: 8px 16px; font-size: .82rem; }
.btn.big { padding: 16px 32px; font-size: 1.08rem; justify-self: start; }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.night-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick span { display: block; text-align: center; padding: 13px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; cursor: pointer; background: #0c1322; color: var(--paper-2); transition: all .15s; }
.pick span:hover { border-color: var(--accent); color: #fff; }
.pick input:checked + span { background: var(--grad); color: var(--accent-ink); border-color: transparent; box-shadow: var(--glow); }
.pick input:focus-visible + span { box-shadow: 0 0 0 3px rgba(255, 178, 46, .35); }
.form-note { color: var(--muted); font-size: .85rem; margin: 10px 0 0; }
.waiver-title { font-size: 1rem; margin: 6px 0 10px; }
.waiver-text { max-height: 260px; overflow-y: auto; background: #0c1322; color: #cfd4e2; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 4px 16px; font-size: .9rem; margin-bottom: 14px; }
.waiver-text p { margin: 10px 0; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; margin-bottom: 10px; cursor: pointer; }
.check-row input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.pay-box { display: flex; gap: 22px; align-items: center; background: linear-gradient(135deg, #2b3f6e, var(--surface-2)); border-color: rgba(255, 178, 46, .4); color: #cfd4e2; }
.pay-box p { margin: 0; font-size: .9rem; }
.due { display: block; font-family: var(--display); font-weight: 800; font-size: 2.4rem; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.form-error { background: rgba(255, 107, 94, .12); color: #ffc2bb; border: 1px solid var(--loss); border-radius: var(--radius-sm); padding: 12px 14px; font-weight: 600; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.done { max-width: 720px; display: grid; gap: 16px; }
.done h1 { color: #fff; margin: 0; }
.done > p { color: #cfd4e2; margin: 0; }
.ref-card { display: flex; gap: 40px; flex-wrap: wrap; }
.ref-card .eyebrow { color: var(--muted); display: block; margin-bottom: 4px; }
.ref { font-family: var(--mono); font-size: 1.8rem; color: var(--accent); }
.pay-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.pay-list li { padding: 11px 14px; background: #0c1322; border: 1px solid var(--line-2); border-radius: var(--radius-sm); }
.pay-list b { display: inline-block; min-width: 90px; color: #fff; }
.copy-row { display: flex; gap: 8px; }
@media (max-width: 640px) {
  .field-grid { grid-template-columns: 1fr; }
  .roster-row { grid-template-columns: 22px 1fr 36px; }
  .roster-row [name=pemail] { grid-column: 2; }
  .roster-row .x-btn { grid-row: 1; grid-column: 3; }
  .pay-box { flex-direction: column; align-items: flex-start; }
  .btn.big { justify-self: stretch; text-align: center; }
  .form-card { padding: 16px; }
}

[hidden] { display: none !important; }
.tight { margin: 8px 0 0; padding-left: 20px; } .tight li { margin: 4px 0; }
.hero .btn.big { margin-bottom: 4px; }

/* ---------- Team badges: WIFF+ logo when uploaded, else a monogram coloured from the name ---------- */
.badge { --tc: var(--accent); flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; font-family: var(--display); font-weight: 800; font-size: .82rem; letter-spacing: .02em; line-height: 1; color: var(--tc);
  background: color-mix(in srgb, var(--tc) 20%, var(--surface)); border: 1.5px solid color-mix(in srgb, var(--tc) 55%, transparent); }
.badge.sm { width: 24px; height: 24px; border-radius: 7px; font-size: .62rem; border-width: 1px; }
.badge.lg { width: 46px; height: 46px; border-radius: 13px; font-size: 1.05rem; }
.badge.xl { width: 76px; height: 76px; border-radius: 20px; font-size: 1.8rem; border-width: 2px; box-shadow: 0 0 0 6px color-mix(in srgb, var(--tc) 12%, transparent); }
.team-row .tn { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 2px 0; }
.team-row.lost .badge { opacity: .55; }
td.name a.team-link { display: inline-flex; align-items: center; gap: 10px; }
.badge, .avatar { position: relative; overflow: hidden; }
.badge > img, .avatar > img { position: absolute; inset: 0; width: 100%; height: 100%; }
.badge > img { object-fit: contain; padding: 6%; }
.avatar > img { object-fit: cover; }
.badge.has-img, .avatar.has-img { color: transparent; }
.badge.has-img { background: var(--surface-3); border-color: var(--line-2); }
.avatar.sm { width: 28px; height: 28px; font-size: .68rem; border-width: 1px; flex: none; }
td.name .pcell { display: flex; align-items: center; gap: 10px; }
@media (min-width: 521px) { td.name:has(.pcell) { min-width: 190px; } }
td.name .pcell > div { min-width: 0; }
.team-card { justify-content: flex-start; gap: 14px; }
.team-card > span:not(.badge):not(.rec) { flex: 1; min-width: 0; }
.team-id { display: flex; align-items: center; gap: 20px; min-width: 0; }
.team-id .eyebrow { margin-bottom: 8px; }
@media (max-width: 520px) { .badge.xl { width: 56px; height: 56px; border-radius: 16px; font-size: 1.3rem; } .team-id { gap: 14px; } }

/* ---------- Registration callout + key dates ---------- */
.callout { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 36px; padding: 20px 24px; border-radius: 20px; text-decoration: none; color: var(--paper);
  background: linear-gradient(100deg, rgba(255, 178, 46, .16), rgba(255, 122, 47, .06) 55%, var(--surface)); border: 1px solid rgba(255, 178, 46, .4); transition: transform .18s ease, border-color .18s, box-shadow .18s; }
.callout:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow); }
.callout-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.callout .eyebrow { margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.callout b { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: clamp(1.3rem, 3vw, 1.8rem); line-height: 1.05; color: #fff; }
.callout small { color: #cfd4e2; font-size: .92rem; }
.chip { display: inline-block; font-family: var(--display); font-weight: 700; font-size: .72rem; letter-spacing: .1em; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: var(--paper); }
.chip.hot { background: var(--loss); color: #fff; animation: pulse 1.8s infinite; }
@media (max-width: 640px) { .callout { padding: 18px; } .callout .btn { width: 100%; text-align: center; } }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.timeline li { display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 16px 10px 10px; }
.timeline .cal { display: grid; text-align: center; background: var(--surface-3); border-radius: 10px; overflow: hidden; }
.timeline .cal i { font-style: normal; font-family: var(--display); font-weight: 700; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; background: rgba(255, 255, 255, .08); color: var(--paper-2); padding: 3px 0 2px; }
.timeline .cal b { font-family: var(--display); font-weight: 800; font-size: 1.35rem; line-height: 1.5; color: #fff; }
.timeline .what b { display: block; font-weight: 600; color: #fff; }
.timeline .what small { color: var(--muted); font-size: .8rem; }
.timeline .when { font-family: var(--display); font-weight: 600; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--paper-2); white-space: nowrap; }
.timeline li.next { border-color: rgba(255, 178, 46, .5); }
.timeline li.next .cal i { background: var(--grad); color: var(--accent-ink); }
.timeline li.next .when { color: var(--accent); }
.timeline li.past { opacity: .5; }

/* ---------- Refinements ---------- */
/* Names stay put while wide stat tables scroll sideways */
.table-wrap td.name, .table-wrap th.l { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.table-wrap th.l { background: var(--surface-2); z-index: 2; }
.table-wrap th.l.sorted { background: var(--surface-3); }
.table-wrap tbody tr:hover td.name { background: #1d263b; }
tbody tr:first-child td.rank { color: var(--accent); font-weight: 700; }
/* Long emails wrap instead of being clipped */
.card-body { overflow-wrap: anywhere; }
.prose { max-width: 860px; }
.prose h2 { margin-top: 1.7em; }
.prose > p { font-size: 1.05rem; }
/* Amber is for actions and winners; plain labels go quiet */
.kpi span, .team-hero .stats-row span { color: var(--paper-2); }
/* Night pickers scroll instead of overflowing on phones */
.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { white-space: nowrap; flex: none; }
.date-group { scroll-margin-top: 92px; }
@media (max-width: 520px) { td.name { min-width: 158px; } td.name a.team-link { gap: 8px; } }

/* ---------- Playoff brackets ---------- */
.playoff-night { scroll-margin-top: 92px; }
.bracket-scroll { overflow-x: auto; margin: 0 -16px; padding: 4px 16px 10px; }
.bracket { --gap: 34px; display: grid; grid-template-columns: repeat(var(--rounds), minmax(210px, 1fr)); column-gap: var(--gap); min-width: calc(var(--rounds) * 210px + (var(--rounds) - 1) * 34px); }
.b-round { display: flex; flex-direction: column; }
.b-head { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; color: var(--accent); margin-bottom: 10px; display: flex; flex-direction: column; }
.b-head small { color: var(--muted); letter-spacing: .06em; font-weight: 600; font-size: .7rem; }
.b-col { flex: 1; display: flex; flex-direction: column; }
.b-pair { flex: 1; display: flex; flex-direction: column; position: relative; }
.b-slot { flex: 1; display: flex; align-items: center; position: relative; padding: 6px 0; }
.b-slot > * { width: 100%; }
/* connector lines: stub out of each match, a vertical joining each pair, a stub into the next round */
.b-round:not(.champ) .b-slot::after { content: ''; position: absolute; right: calc(var(--gap) / -2); width: calc(var(--gap) / 2); top: 50%; border-top: 2px solid var(--line-2); }
.b-round:not(.champ) .b-pair:not(.solo)::after { content: ''; position: absolute; right: calc(var(--gap) / -2); top: 25%; bottom: 25%; border-right: 2px solid var(--line-2); }
.b-round:not(.first) .b-slot::before { content: ''; position: absolute; left: calc(var(--gap) / -2); width: calc(var(--gap) / 2); top: 50%; border-top: 2px solid var(--line-2); }
.b-match { display: block; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 7px 10px 8px; color: var(--ink); text-decoration: none; transition: border-color .15s, background .15s, transform .15s; }
a.b-match:hover { border-color: var(--accent); background: var(--surface-3); transform: translateY(-1px); }
.b-match.live { border-color: rgba(255, 107, 94, .6); }
.b-match.stale { opacity: .75; }
.b-match.bye { opacity: .6; border-style: dashed; background: transparent; }
.b-meta { font-size: .66rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; min-height: 1em; }
.b-team { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 6px; padding: 3px 0; font-size: .88rem; font-weight: 600; }
.b-team .seed { font-family: var(--mono); font-size: .72rem; color: var(--muted); text-align: right; }
.b-team .tn { display: flex; align-items: center; gap: 7px; min-width: 0; }
.b-team .tn > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-team .sc { font-family: var(--mono); font-weight: 700; min-width: 2ch; text-align: right; }
.b-team.won { color: #fff; }
.b-team.won .sc { color: var(--accent); }
.b-team.lost { color: var(--muted); }
.b-team.lost .badge { opacity: .55; }
.b-team.tbd .tn { color: var(--muted); font-style: italic; font-weight: 500; }
.b-champ { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 16px 10px; border-radius: 14px; border: 1px dashed var(--line-2); color: var(--muted); }
.b-champ .trophy { font-size: 1.6rem; filter: grayscale(1); opacity: .5; }
.b-champ b { font-family: var(--display); text-transform: uppercase; letter-spacing: .04em; font-size: 1.05rem; line-height: 1.1; }
.b-champ small { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; }
.b-champ.set { border: 1px solid rgba(255, 178, 46, .55); background: linear-gradient(180deg, rgba(255, 178, 46, .16), rgba(255, 122, 47, .06)); color: #fff; box-shadow: var(--glow); }
.b-champ.set .trophy { filter: none; opacity: 1; }
.seed-list { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.seed-list summary { cursor: pointer; font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 600; color: var(--paper-2); }
.seed-list ol { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 18px; }
.seed-list li { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; font-size: .88rem; }
.seed-list .seed { font-family: var(--mono); color: var(--muted); text-align: right; }
.seed-list a { color: var(--ink); text-decoration: none; }
.seed-list a:hover { color: var(--accent); }
.seed-list .rec { font-family: var(--mono); color: var(--paper-2); }
.b-others { margin-top: 16px; }
.b-others h3 { font-size: 1rem; margin-bottom: 2px; }
.b-others .game-list { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 8px; }

/* ---------- WIFF+ branding: logo, player-link hint, "full stats on WIFF+" bands ---------- */
.wiff-logo { display: inline-block; height: 1.15em; width: auto; vertical-align: -0.2em; }
.wiff-logo.lg { height: 34px; vertical-align: middle; }
.plink .plink-go { display: inline-block; margin-left: 3px; font-size: .78em; opacity: 0; transform: translate(-3px, 2px); transition: opacity .15s, transform .15s; color: var(--accent); }
.plink:hover .plink-go, .plink:focus-visible .plink-go { opacity: 1; transform: none; }
@media (hover: none) { .plink .plink-go { opacity: .55; transform: none; } }
.wiff-cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 22px 0; padding: 18px 22px; border-radius: 18px; text-decoration: none; color: var(--paper);
  background: radial-gradient(420px 200px at 0 0, rgba(193, 18, 31, .22), transparent 70%), var(--surface); border: 1px solid var(--line-2); transition: transform .15s ease, border-color .15s, box-shadow .15s; }
.wiff-cta:hover { transform: translateY(-2px); border-color: #c1121f; box-shadow: var(--shadow); }
.wiff-cta-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 200px; }
.wiff-cta-main b { font-family: var(--display); text-transform: uppercase; letter-spacing: .03em; font-size: 1.15rem; color: #fff; }
.wiff-cta-main small { color: var(--paper-2); font-size: .88rem; }
.wiff-cta:hover .btn { background: rgba(255, 255, 255, .12); border-color: var(--cream); color: #fff; }
@media (max-width: 640px) { .wiff-cta .btn { width: 100%; text-align: center; } }
.wiff-pill { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .2); color: var(--paper); text-decoration: none; font-size: .82rem; font-weight: 600; transition: border-color .15s, background .15s; }
.wiff-pill:hover { border-color: #c1121f; background: rgba(193, 18, 31, .15); }
.wiff-note { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
p.wiff-note { display: flex; margin: -6px 0 18px; }
.section-head + .wiff-cta, h1 + .wiff-cta { margin-top: 0; }
.team-hero + .wiff-cta { margin-top: -10px; }
.wiff-mark { display: inline-block; margin-bottom: 4px; }
.powered-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.powered-link img { height: 24px; width: auto; transition: transform .15s; }
.powered-link:hover img { transform: scale(1.05); }

/* ---------- Added Nov 2026: my team, watch links, calendar, champions, rulebook, admin ---------- */
main.quiet > * { animation: none; }

/* Watch button under games that are still to be played */
.game-wrap { display: grid; gap: 0; }
.game-wrap .game { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.watch { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px; background: var(--surface-2); color: var(--paper-2); font-family: var(--display); font-weight: 700; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; transition: color .15s, background .15s; }
.watch:hover { color: #fff; background: var(--surface-3); }
.watch.live { background: linear-gradient(90deg, #d93a2b, #ff5a4a); color: #fff; border-color: transparent; }

/* My team */
.star { font-style: normal; color: var(--accent); font-size: .9em; }
tr.mine td { background: rgba(255, 178, 46, .08); }
tr.mine td.name a span { color: #fff; }
.fav-hint { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: -14px 0 36px; padding: 12px 18px; border: 1px dashed var(--line-2); border-radius: 14px; color: var(--paper-2); text-decoration: none; font-size: .9rem; }
.fav-hint b { font-family: var(--display); text-transform: uppercase; letter-spacing: .1em; color: var(--accent); }
.fav-hint:hover { border-color: var(--accent); color: var(--paper); }
.myteam-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; align-items: start; }
.myteam-game { display: grid; gap: 8px; min-width: 0; }
.myteam-game .eyebrow { margin: 0; font-size: .74rem; }

.team-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: -12px 0 26px; align-items: flex-start; }
.fav-btn.on { background: rgba(255, 178, 46, .14); border-color: var(--accent); color: var(--accent); }
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-body { position: absolute; z-index: 10; top: calc(100% + 8px); left: 0; min-width: 260px; display: grid; gap: 2px; padding: 8px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); }
.menu-body a { padding: 9px 12px; border-radius: 9px; color: var(--paper); text-decoration: none; font-weight: 600; font-size: .92rem; }
.menu-body a:hover { background: rgba(255, 255, 255, .08); }
.menu-body small { padding: 6px 12px 2px; color: var(--muted); font-size: .78rem; line-height: 1.4; }

/* Champions */
.champ-grid { gap: 14px; }
.champ-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: linear-gradient(135deg, rgba(255, 178, 46, .12), transparent 60%), var(--surface); border: 1px solid rgba(255, 178, 46, .35); border-radius: var(--radius); color: var(--ink); text-decoration: none; min-width: 0; transition: transform .15s, border-color .15s; }
a.champ-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.champ-card .trophy { font-size: 1.8rem; }
.champ-main { display: flex; flex-direction: column; min-width: 0; }
.champ-main .eyebrow { margin: 0 0 4px; font-size: .74rem; }
.champ-main b { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 1.25rem; line-height: 1.1; color: #fff; overflow-wrap: anywhere; }
.champ-main small { color: var(--paper-2); }
.champ-card.pending { background: var(--surface); border-style: dashed; border-color: var(--line-2); }
.champ-card.pending .trophy { filter: grayscale(1); opacity: .45; }
.champ-card.pending b { color: var(--paper-2); }

/* Rulebook */
.rulebook { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 26px 20px; }
.rulebook > ul { padding-left: 0; list-style: none; }
.rulebook > ul > li { margin-top: 18px; }
.rulebook > ul > li > b:first-child { display: block; font-family: var(--display); text-transform: uppercase; letter-spacing: .06em; font-size: 1.15rem; color: var(--accent); border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 6px; }
.rulebook ul ul { padding-left: 20px; margin: 4px 0; }
.rulebook li { margin: 3px 0; color: #cfd4e2; }
.rulebook li li li { font-size: .95rem; }
.rulebook hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.rulebook p { margin: 12px 0; }
@media (max-width: 640px) { .rulebook { padding: 4px 16px 16px; } .rulebook ul ul { padding-left: 16px; } }

/* Admin */
.narrow-form { max-width: 520px; }
.form-ok { color: var(--win); font-weight: 700; }
.code, code { font-family: var(--mono); font-size: .9em; }
pre.code { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; overflow-x: auto; }
.field small.note { font-weight: 500; font-size: .76rem; }
.field textarea { font-family: inherit; }
@media (max-width: 520px) { .menu-body { left: auto; right: 0; min-width: 240px; } }

/* ---------- Venue photos (About) ---------- */
.photo-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0 26px; }
.photo-row figure { margin: 0; }
.photo-row img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.photo-row figcaption { margin-top: 6px; font-size: .82rem; color: var(--muted); }
@media (max-width: 640px) { .photo-row { grid-template-columns: 1fr 1fr; } .photo-row figure:first-child { grid-column: 1 / -1; } }

/* ---------- Field reservations ---------- */
.rent-price { font-family: var(--display); font-size: 2rem; line-height: 1; color: #fff; }
.rent-price small { font-size: .95rem; font-weight: 600; color: var(--muted); margin-left: 2px; }
.rent-alert { margin: 24px 0; padding: 16px 20px; border-radius: var(--radius); border: 1px solid rgba(255, 178, 46, .45); border-left: 4px solid var(--accent); background: rgba(255, 178, 46, .08); }
.rent-alert p { margin: 0; color: var(--paper); }
.rent-alert p + p { margin-top: 10px; }

/* Prizes, night guide and Pitcher Race */
.prize-card { display: flex; gap: 16px; align-items: flex-start; margin: 18px 0 26px; padding: 18px 22px; border-radius: var(--radius); border: 1px solid rgba(255, 178, 46, .45); background: rgba(255, 178, 46, .08); }
.prize-card .trophy { font-size: 2.2rem; line-height: 1; }
.prize-card h2 { margin: 0 0 4px; font-size: 1.15rem; }
.prize-card .note { margin: 0 0 8px; }
.prize-card ul { margin: 0; }
.prize-card.compact { padding: 14px 18px; }
.prize-card.compact .trophy { font-size: 1.7rem; }
.night-guide { list-style: none; padding: 0; margin: 8px 0 16px; display: grid; gap: 6px; }
.night-guide li { display: flex; gap: 12px; align-items: baseline; }
.night-guide b { min-width: 6.5em; color: var(--accent); }
.night-guide span { color: var(--paper-2); }
.race-grid { align-items: start; }
.race-night { margin: 0; }
.race-list { list-style: none; margin: 0; padding: 6px 16px 12px; }
.race-list li { display: grid; grid-template-columns: 1.8em auto minmax(0, 1fr) minmax(50px, 28%) 2.4em; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.race-list li:first-child { border-top: 0; }
.race-list .pos { color: var(--muted); font-weight: 700; text-align: right; }
.race-list .who { min-width: 0; display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; font-weight: 600; }
.race-list .who a { color: inherit; }
.race-list .tag { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--paper-2); }
.race-list .tag.free { color: var(--accent); }
.race-list .bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.race-list .bar i { display: block; height: 100%; border-radius: inherit; background: var(--line-2); }
.race-list li.spot .bar i { background: rgba(255, 178, 46, .55); }
.race-list li.free .bar i { background: var(--accent); }
.race-list li.free .pos { color: var(--accent); }
.race-list b.num { text-align: right; }
@media (max-width: 560px) { .race-list li { grid-template-columns: 1.6em auto minmax(0, 1fr) 2.4em; } .race-list .bar { display: none; } }

/* ---------- Taproom board (/tv) ----------
   Sized from the screen width so it fills any TV, read from across the bar. */
body.tv-mode .site-header, body.tv-mode .site-footer { display: none; }
body.tv-mode main.wrap { max-width: none; padding: 0; }
body.tv-mode.tv-idle, body.tv-mode.tv-idle * { cursor: none; }
body.tv-mode.tv-idle .tv-full { opacity: 0; pointer-events: none; }
.tv { height: 100vh; display: flex; flex-direction: column; gap: 1.4vh; padding: 2.2vh 2.2vw 1.4vh; font-size: clamp(14px, 1.2vw, 46px); overflow: hidden; }
.tv h1, .tv h2 { margin: 0; }
.tv h2 { font-size: 1.15em; color: var(--accent); letter-spacing: .06em; margin-bottom: .6em; }
.tv-head { display: flex; align-items: center; gap: 1.2em; }
.tv-logo { height: 3.6em; width: auto; }
.tv-title { margin-right: auto; }
.tv-title small { display: block; color: var(--paper-2); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .8em; }
.tv-title h1 { font-size: 2.6em; line-height: 1; }
.tv-nights { display: flex; gap: .4em; }
.tv-nights span { padding: .25em .6em; border-radius: 99px; border: 1px solid var(--line-2); color: var(--muted); font-weight: 700; font-size: .85em; text-transform: uppercase; }
.tv-nights span.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tv-clock { font-size: 2.2em; font-weight: 700; color: var(--paper); }
.tv-full { transition: opacity .3s; }
.tv-announce { padding: .55em 1em; border-radius: var(--radius-sm); background: var(--grad); color: var(--accent-ink); font-weight: 700; font-size: 1.15em; text-align: center; }
.tv > * { flex: none; }
.tv > .tv-main { flex: 1; display: grid; grid-template-columns: 1.35fr 1fr; gap: 1.6vw; min-height: 0; }
.tv-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1em 1.3em; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.tv-empty, .tv-note, .tv-coming { color: var(--paper-2); }
.tv-note { margin: .6em 0 0; font-size: .85em; }
.tv-coming { margin: auto 0 0; padding-top: .8em; font-size: 1.05em; font-weight: 600; color: var(--cream-2); }

.tv-game-list { flex: 1; display: flex; flex-direction: column; gap: .6em; min-height: 0; overflow: hidden; }
.tv-coming { flex: none; }
.tv-games.dense .tv-game-list { gap: .4em; }
.tv-game { display: grid; grid-template-columns: 7.5em 1fr; gap: 1em; align-items: center; padding: .55em .8em; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.tv-game.live { border-color: rgba(255, 93, 94, .7); box-shadow: 0 0 0 1px rgba(255, 93, 94, .4), 0 0 1.4em -0.4em rgba(255, 93, 94, .7); }
.tv-game.next { border-color: rgba(255, 178, 46, .6); }
.tv-when b { display: block; font-family: var(--display); font-size: 1.25em; text-transform: uppercase; }
.tv-game.live .tv-when b { color: #ff7b7b; }
.tv-game.live .live-dot { background: #ff5d5e; width: .6em; height: .6em; }
.tv-game.final .tv-when b { color: var(--muted); }
.tv-when small { display: block; color: var(--paper-2); font-size: .75em; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.tv-game.next .tv-when small:first-of-type { color: var(--accent); }
.tv-team { display: flex; align-items: center; gap: .6em; font-size: 1.3em; font-weight: 700; padding: .1em 0; }
.tv-team .badge { width: 2.6em; height: 2.6em; font-size: .62em; border-radius: .5em; }
.tv-tn { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-sc { font-size: 1.25em; min-width: 1.6em; text-align: right; }
.tv-team.lost { color: var(--muted); }
.tv-team.won .tv-sc { color: var(--accent); }
.tv-games.dense .tv-game { padding: .35em .7em; }
.tv-games.dense .tv-team { font-size: 1.05em; }

.tv-table { width: 100%; border-collapse: collapse; font-size: 1.1em; }
.tv-table th { color: var(--muted); font-size: .7em; font-weight: 700; letter-spacing: .06em; padding: 0 .4em .5em; text-align: right; }
.tv-table td { padding: .45em .4em; text-align: right; border-top: 1px solid var(--line); font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tv-table .l { text-align: left; font-family: var(--body); font-weight: 700; }
.tv-table td.l { width: 100%; max-width: 0; } /* long team names shorten instead of pushing columns off screen */
.tv-tcell > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.tv-table td.rank { color: var(--muted); width: 1%; }
.tv-table tbody tr:first-child td.rank { color: var(--accent); }
.tv-table tr.cut td { border-bottom: 2px dashed rgba(255, 178, 46, .55); }
.tv-tcell { display: flex; align-items: center; gap: .5em; white-space: nowrap; overflow: hidden; }
.tv-tcell .badge { width: 2.6em; height: 2.6em; font-size: .55em; border-radius: .5em; flex: none; }

.tv-leaders { position: relative; padding-bottom: 1.4em; }
.tv-leader { display: none; }
.tv-leader.on { display: block; animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; }
.tv-leader ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); }
.tv-leader li { display: flex; align-items: center; gap: .6em; min-width: 0; padding: 0 1.1em; border-left: 1px solid var(--line); }
.tv-leader li:first-child { padding-left: 0; border-left: 0; }
.tv-leader .pos { color: var(--muted); font-weight: 700; }
.tv-leader li:first-child .pos { color: var(--accent); }
.tv-leader .avatar { width: 2.6em; height: 2.6em; font-size: .8em; flex: none; }
.tv-leader .who { flex: 1; min-width: 0; }
.tv-leader .who b, .tv-leader .who small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-leader .who small { color: var(--paper-2); font-size: .78em; }
.tv-leader .val { font-size: 1.35em; font-weight: 700; color: var(--paper); }
.tv-leader h2 small { margin-left: 1em; color: var(--paper-2); font-family: var(--body); font-size: .7em; font-weight: 600; letter-spacing: 0; text-transform: none; }
.tv-leader .badge { width: 2.6em; height: 2.6em; font-size: .7em; border-radius: .6em; }
.tv-leader .who small.free { color: var(--accent); font-weight: 700; }
.tv-leader-dots { position: absolute; right: 1.3em; top: 1.2em; display: flex; gap: .35em; }
.tv-leader-dots i { width: .5em; height: .5em; border-radius: 50%; background: var(--line-2); }
.tv-leader-dots i.on { background: var(--accent); }
.tv-foot { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .8em; }
.tv-foot span { display: inline-flex; align-items: center; gap: .5em; }
.tv-foot .wiff-logo { height: 1.3em; width: auto; }

/* Portrait screens: stack the panels. */
@media (orientation: portrait) {
  .tv { font-size: clamp(14px, 2vw, 46px); }
  .tv > .tv-main { grid-template-columns: 1fr; grid-template-rows: auto auto; overflow: hidden; }
  .tv-leader ol { grid-template-columns: repeat(3, 1fr); }
  .tv-leader li:nth-child(n+4) { display: none; }
}
