:root {
  --ink: #10231d;
  --muted: #66756f;
  --forest: #123c2c;
  --forest-2: #1a523d;
  --lime: #d9ff62;
  --cream: #f3f5ee;
  --paper: #ffffff;
  --line: #dfe6df;
  --gold: #f6c75b;
  --orange: #e66c37;
  --danger: #a72d2d;
  --shadow: 0 18px 50px rgba(21, 50, 39, 0.09);
  --radius: 22px;
}

[hidden] { display: none !important; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.app-loading { position: fixed; z-index: 100; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; background: var(--cream); color: var(--forest); transition: opacity .25s ease, visibility .25s ease; }
.app-loading.ready { opacity: 0; visibility: hidden; pointer-events: none; }
.app-loading.error { padding: 30px; text-align: center; }
.app-loading small { color: var(--muted); }
.auth-card { width: min(430px, calc(100vw - 30px)); padding: 32px; display: grid; justify-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 24px; background: var(--paper); box-shadow: var(--shadow); text-align: center; }
.auth-card h1 { margin: 4px 0 0; font-size: 25px; letter-spacing: -.03em; }
.auth-card > p { margin: 0 0 8px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.auth-form { width: 100%; display: grid; gap: 12px; text-align: left; }
.auth-form label { display: grid; gap: 6px; color: var(--forest); font-size: 10px; font-weight: 850; }
.auth-form input { width: 100%; min-height: 48px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcf8; color: var(--ink); font-size: 14px; }
.auth-form input:focus { border-color: var(--forest-2); }
.auth-submit { min-height: 48px; border: 0; border-radius: 11px; background: var(--forest); color: white; cursor: pointer; font-size: 12px; font-weight: 850; }
.auth-submit:disabled { opacity: .65; cursor: wait; }
.auth-secondary { border: 0; background: transparent; color: var(--forest-2); cursor: pointer; font-size: 11px; font-weight: 800; text-decoration: underline; }
.auth-recovery { width: 100%; font-size: 14px; line-height: 1.5; }
.auth-recovery summary { padding: 8px 0; color: var(--forest-2); cursor: pointer; font-weight: 750; text-decoration: underline; }
.auth-recovery summary:focus-visible { outline: 2px solid var(--forest-2); outline-offset: 3px; border-radius: 4px; }
.auth-recovery p { margin: 4px 0 10px; padding: 12px; border-radius: 10px; background: #eef2ef; color: var(--ink); text-align: left; }
.auth-error { min-height: 16px; margin: 0; color: var(--danger); font-size: 10px; font-weight: 700; text-align: center; }
.auth-note { max-width: 330px; font-size: 9px; line-height: 1.45; }
.auth-password-hint { color: var(--muted); font-size: 9px; font-weight: 600; line-height: 1.35; }
.loading-crest { width: 58px; height: 64px; margin-bottom: 8px; display: grid; place-items: center; border-radius: 12px 12px 22px 22px; background: var(--forest); color: var(--lime); font-size: 28px; font-weight: 950; box-shadow: inset 0 0 0 3px rgba(217,255,98,.22); }
@media (max-height: 760px), (max-width: 560px) {
  .app-loading.error { place-content: start center; overflow-y: auto; padding: max(18px, env(safe-area-inset-top)) 15px max(18px, env(safe-area-inset-bottom)); }
  .auth-card { padding: 24px 20px; }
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(217, 255, 98, .8); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.site-shell { min-height: 100vh; padding-bottom: 92px; }
.topbar {
  height: 80px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.top-actions { display: flex; align-items: center; gap: 9px; }
.account-pill { min-height: 48px; display: flex; align-items: center; gap: 9px; padding: 6px 9px 6px 6px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.72); }
.account-pill > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--forest); color: var(--lime); font-size: 9px; font-weight: 900; }
.account-pill > div { display: grid; min-width: 74px; }
.account-pill strong { max-width: 115px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 10px; }
.account-pill small { margin-top: 2px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 7px; font-weight: 800; }
.account-pill .account-signout { padding: 6px 7px; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-size: 8px; font-weight: 750; }
.brand { display: flex; align-items: center; gap: 11px; border: 0; background: transparent; padding: 0; cursor: pointer; text-align: left; }
.crest {
  position: relative;
  width: 42px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--lime);
  font-weight: 950;
  font-size: 22px;
  background: var(--forest);
  border-radius: 8px 8px 16px 16px;
  box-shadow: inset 0 0 0 2px rgba(217,255,98,.22);
}
.crest::after { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(217,255,98,.5); border-radius: 5px 5px 12px 12px; }
.crest span { z-index: 1; }
.brand-copy { display: grid; }
.brand-copy strong { font-size: 16px; letter-spacing: -.02em; }
.brand-copy small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; font-weight: 750; margin-top: 3px; }
.lock-pill { display: flex; align-items: center; gap: 10px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.72); }
.lock-pill > span:last-child { display: grid; }
.lock-pill small { font-size: 9px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 750; }
.lock-pill strong { font-size: 12px; margin-top: 2px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #46b46e; box-shadow: 0 0 0 5px rgba(70,180,110,.12); }

main { max-width: 1240px; margin: 0 auto; padding: 0 28px 48px; }
.view { display: none; animation: fade-in .24s ease both; }
.view.active { display: block; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.team-name-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .75fr); align-items: end; gap: 20px; margin-bottom: 14px; padding: 20px 22px; border-radius: 18px; background: var(--paper); border: 1px solid rgba(21,50,39,.08); box-shadow: 0 10px 35px rgba(21,50,39,.05); }
.team-name-panel h2 { margin: 0; font-size: 22px; letter-spacing: -.03em; }
.team-name-panel p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.team-name-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; align-items: end; }
.team-name-controls .field { margin: 0; }
.team-name-controls .button { min-width: 120px; }

.hero-panel {
  position: relative;
  min-height: 248px;
  overflow: hidden;
  padding: 44px 48px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  background:
    radial-gradient(circle at 84% 28%, rgba(217,255,98,.24), transparent 25%),
    linear-gradient(128deg, #0f3325 0%, #17533b 72%, #1a6044 100%);
  box-shadow: 0 24px 70px rgba(18,60,44,.16);
}
.hero-panel::before, .hero-panel::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.hero-panel::before { width: 410px; height: 410px; right: -172px; top: -180px; }
.hero-panel::after { width: 250px; height: 250px; right: -70px; top: -92px; }
.eyebrow, .kicker { margin: 0 0 10px; text-transform: uppercase; letter-spacing: .16em; font-size: 11px; font-weight: 850; }
.eyebrow { color: var(--lime); }
.hero-panel h1, .page-intro h1 { margin: 0; letter-spacing: -.055em; line-height: .96; font-size: clamp(42px, 6vw, 74px); font-weight: 900; }
.hero-copy { margin: 18px 0 0; max-width: 570px; color: rgba(255,255,255,.74); line-height: 1.55; font-size: 16px; }
.hero-mark { z-index: 1; min-width: 144px; aspect-ratio: 1; display: grid; place-content: center; text-align: center; border: 1px solid rgba(217,255,98,.42); border-radius: 50%; background: rgba(5,31,22,.24); }
.hero-mark span { color: var(--lime); font-size: 62px; line-height: .9; font-weight: 950; }
.hero-mark small { margin-top: 9px; letter-spacing: .24em; font-size: 9px; font-weight: 850; }

.summary-strip { margin: -25px 34px 0; position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr); border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); border: 1px solid rgba(21,50,39,.05); }
.summary-strip > div { min-height: 82px; padding: 18px 24px; display: grid; align-content: center; border-right: 1px solid var(--line); }
.summary-strip > div:last-child { border: 0; }
.summary-strip span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-weight: 750; }
.summary-strip strong { font-size: 24px; letter-spacing: -.04em; margin-top: 4px; }
.summary-strip small { color: var(--muted); font-size: 10px; margin-left: 6px; display: inline; }
.cap-track { height: 5px; margin: 15px 42px 25px; border-radius: 999px; background: #dbe2da; overflow: hidden; }
.cap-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--lime), #76c979); transition: width .3s ease, background .3s ease; }
.cap-track.over span { background: linear-gradient(90deg, #f29c75, var(--danger)); }
.practice-note { margin: 0 34px 20px; padding: 12px 15px; border: 1px solid rgba(182,212,79,.55); border-radius: 12px; background: #f7fbe9; color: var(--forest); font-size: 12px; line-height: 1.5; }

.team-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr); gap: 22px; }
.panel { background: var(--paper); border: 1px solid rgba(21,50,39,.08); border-radius: var(--radius); box-shadow: 0 10px 35px rgba(21,50,39,.05); }
.squad-panel, .market-panel, .scoring-panel, .score-form, .recent-panel { padding: 26px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.section-heading h2 { margin: 0; font-size: 25px; letter-spacing: -.04em; }
.kicker { color: #709083; margin-bottom: 4px; font-size: 9px; }
.text-button { border: 0; background: transparent; padding: 8px 0; color: var(--forest-2); font-weight: 780; font-size: 12px; cursor: pointer; }
.text-button:hover { color: #0c7651; }

.squad-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.squad-card, .empty-slot { min-height: 98px; border-radius: 15px; }
.squad-card { position: relative; display: grid; grid-template-columns: 47px 1fr auto; align-items: center; gap: 11px; padding: 13px; border: 1px solid var(--line); background: #fbfcfa; }
.squad-card.captain { border-color: #b6d44f; box-shadow: inset 0 0 0 1px rgba(182,212,79,.35); background: #fcfff3; }
.squad-card.vice-captain:not(.captain) { border-color: #a9c2b8; box-shadow: inset 0 0 0 1px rgba(76,125,106,.18); }
.empty-slot { display: grid; place-items: center; border: 1px dashed #cbd4cc; background: #fafcf9; color: #8a978f; font-size: 12px; }
.trade-open-slot { align-content: center; gap: 5px; padding: 13px; border-color: var(--forest-2); color: var(--forest); text-align: center; }
.trade-open-slot .trade-slot-plus { font-size: 30px; line-height: 1; font-weight: 600; }
.trade-open-slot strong { font-size: 14px; }
.trade-open-slot > span:last-child { color: var(--muted); font-size: 14px; line-height: 1.4; }
.player-avatar { width: 47px; height: 47px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--forest); font-size: 12px; font-weight: 850; letter-spacing: .02em; flex: 0 0 auto; }
.player-avatar.second { background: #4d6b60; }
.player-avatar.both { background: #2d6f5b; box-shadow: inset 0 0 0 3px rgba(217,255,98,.26); }
.player-avatar.women { background: #7a4f8e; box-shadow: inset 0 0 0 3px rgba(255,255,255,.18); }
.squad-info, .player-main { min-width: 0; }
.squad-info strong, .player-main strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.02em; }
.squad-info small, .player-main small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.selection-pill { display: inline-flex; width: fit-content; margin-top: 7px; padding: 4px 7px; border-radius: 999px; background: #eef2ef; color: #6f7d75; font-size: 8px; line-height: 1; font-weight: 850; letter-spacing: .02em; }
.selection-pill.selected { background: #e7f7ec; color: #197044; }
.selection-pill.not-selected { background: #fff0e8; color: #9a4b2f; }
.selection-pill.pending { background: #eef2ef; color: #708078; }
.squad-price { text-align: right; }
.squad-price strong { font-size: 13px; }
.leadership-buttons { display: flex; justify-content: flex-end; gap: 4px; }
.captain-button { margin-top: 7px; min-width: 27px; height: 24px; padding: 0 8px; border-radius: 999px; border: 1px solid #c9d2cb; background: white; color: #6c7b73; font-size: 9px; font-weight: 900; cursor: pointer; }
.captain-button.active { border-color: var(--forest); background: var(--forest); color: var(--lime); }
.captain-button.vice.active { border-color: #607e72; background: #607e72; color: white; }
.captain-button.trade { border-color: #d1a944; color: #826414; }
.captain-button.trade:hover { background: #fff8dc; }
.captain-button.trade.active { border-color: #c59a2e; background: #f2c94c; color: #4c3a05; }
.trade-in-tag { margin-top: 7px; min-width: 27px; height: 24px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: 999px; background: #e5f4ea; color: #237046; font-size: 8px; font-weight: 900; }
.trade-draft { margin-top: 14px; overflow: hidden; border: 1px solid #d9c16d; border-radius: 13px; background: #fffaf0; }
.trade-draft-heading { padding: 11px 13px; border-bottom: 1px solid #eadcae; background: #fff5cf; }
.trade-draft-heading strong, .trade-draft-heading small { display: block; }
.trade-draft-heading strong { color: #654d0d; font-size: 12px; }
.trade-draft-heading small { margin-top: 3px; color: #856d30; font-size: 9px; }
.trade-draft-row { display: grid; grid-template-columns: minmax(0,1fr) 16px minmax(0,1fr) auto; gap: 8px; align-items: center; padding: 11px 13px; border-bottom: 1px solid #eee3bf; }
.trade-draft-row:last-child { border-bottom: 0; }
.trade-draft-row span { min-width: 0; }
.trade-draft-row b, .trade-draft-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trade-draft-row b { font-size: 10px; }
.trade-draft-row small { margin-top: 3px; color: #877a57; font-size: 8px; }
.trade-draft-row i { color: #9b8443; font-style: normal; text-align: center; }
.trade-undo { min-height: 31px; padding: 0 10px; border: 1px solid #d1b75e; border-radius: 9px; background: white; color: #6c5414; font-size: 9px; font-weight: 900; cursor: pointer; }
.trade-undo:hover { background: #fff3c7; }
.team-warning { margin-top: 12px; padding: 11px 13px; border-radius: 10px; background: #fff0ea; color: #8b351f; font-size: 12px; font-weight: 700; }
.entry-prompt { margin-top: 12px; padding: 12px 14px; border: 1px solid #d5ddd7; border-radius: 11px; background: #f5f8f5; color: #526158; font-size: 12px; line-height: 1.45; }
.entry-prompt.ready { border-color: #d6b95d; background: #fff9df; color: #6d581b; }
.entry-prompt.entered { border-color: #b5d5c4; background: #edf9f1; color: #245b3e; }
.entry-prompt strong { display: block; margin-bottom: 2px; color: inherit; }
.selection-summary { margin-top: 10px; padding: 12px 14px; border: 1px solid #d5ddd7; border-radius: 11px; background: #f5f8f5; color: #526158; font-size: 12px; line-height: 1.45; }
.selection-summary strong { display: block; margin-bottom: 2px; }
.selection-summary.selected { border-color: #acd2bb; background: #ebf8ef; color: #205d3d; }
.selection-summary.warning { border-color: #e5c58d; background: #fff7e7; color: #765221; }
.selection-summary.published { border-color: #bad4c5; background: #eff8f2; color: #35654b; }
.team-actions { display: grid; grid-template-columns: 1fr 1.15fr; gap: 10px; margin-top: 18px; }
.button { min-height: 46px; border-radius: 12px; padding: 0 16px; border: 1px solid transparent; font-size: 12px; font-weight: 850; cursor: pointer; transition: transform .15s ease, filter .15s ease; }
.button:hover { transform: translateY(-1px); filter: brightness(.98); }
.button:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.button.loading, .button.loading:disabled { display: inline-flex; align-items: center; justify-content: center; gap: 8px; opacity: .78; cursor: wait; }
.button.loading::before { content: ""; width: 13px; height: 13px; border: 2px solid rgba(255,255,255,.35); border-top-color: white; border-radius: 50%; animation: button-spin .75s linear infinite; }
@keyframes button-spin { to { transform: rotate(360deg); } }
.button.primary { background: var(--forest); color: white; }
.button.secondary { border-color: var(--line); background: #f7f9f5; color: var(--forest); }
.wide { grid-column: 1 / -1; width: 100%; }

.search-wrap { height: 43px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); background: #f7f9f6; border-radius: 11px; }
.search-wrap.large { height: 48px; }
.search-icon { color: #7c8b83; font-size: 20px; line-height: 1; transform: rotate(-15deg); }
.search-wrap input { width: 100%; min-width: 0; border: 0; outline: none; background: transparent; color: var(--ink); }
.search-wrap input::placeholder { color: #9aa59e; }
.player-list { margin-top: 14px; }
.player-row { display: grid; grid-template-columns: 43px minmax(0,1fr) auto auto; gap: 11px; align-items: center; padding: 12px 2px; border-bottom: 1px solid #e7ece7; }
.player-row:last-child { border: 0; }
.player-row .player-avatar { width: 39px; height: 39px; font-size: 10px; }
.price-stack { text-align: right; }
.price-stack strong { display: block; font-size: 12px; }
.tier { display: block; margin-top: 3px; font-size: 8px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; }
.add-button { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; border: 1px solid #cbd5cd; background: white; color: var(--forest); font-size: 20px; line-height: 1; cursor: pointer; }
.add-button.selected { background: var(--forest); color: var(--lime); border-color: var(--forest); font-size: 14px; }
.empty-copy { color: var(--muted); font-size: 13px; line-height: 1.5; }
.market-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.market-footer .button { min-height: 36px; }
.market-nav { display: flex; gap: 7px; }

.page-intro { min-height: 190px; padding: 34px 10px 30px; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.page-intro .eyebrow { color: #4b806c; }
.page-intro p:last-child { color: var(--muted); max-width: 590px; margin: 14px 0 0; line-height: 1.55; }
.big-stat { min-width: 120px; text-align: center; font-size: 64px; line-height: .78; font-weight: 950; color: var(--forest); }
.big-stat small { display: block; margin-top: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .15em; font-size: 9px; }
.filter-panel { position: sticky; top: 10px; z-index: 5; display: grid; grid-template-columns: minmax(240px, 1fr) auto; gap: 12px; align-items: center; padding: 13px; border-radius: 16px; background: rgba(255,255,255,.9); border: 1px solid rgba(21,50,39,.08); box-shadow: 0 10px 35px rgba(21,50,39,.08); backdrop-filter: blur(16px); }
select, input[type="number"] { height: 48px; width: 100%; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: #f7f9f6; color: var(--ink); }
.tier-filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chip { white-space: nowrap; min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--muted); font-size: 10px; font-weight: 800; cursor: pointer; }
.chip.active { background: var(--forest); color: var(--lime); border-color: var(--forest); }
.chip:disabled { opacity: .42; cursor: not-allowed; }
.player-table { margin-top: 14px; overflow: hidden; border: 1px solid rgba(21,50,39,.08); border-radius: 18px; background: white; }
.player-table .player-row { grid-template-columns: 45px minmax(210px,1.5fr) minmax(90px,.7fr) repeat(3, minmax(70px,.45fr)) auto; padding: 14px 18px; }
.player-stat { display: grid; }
.player-stat span { color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; }
.player-stat strong { margin-top: 4px; font-size: 13px; }
.player-table .price-stack strong { font-size: 14px; }

.ladder-intro, .gameday-intro, .rules-intro, .admin-intro { min-height: 220px; }
.round-badge, .admin-label { padding: 12px 15px; border-radius: 12px; background: var(--forest); color: white; }
.round-badge { display: grid; }
.round-badge small { text-transform: uppercase; color: var(--lime); letter-spacing: .12em; font-size: 8px; font-weight: 800; }
.round-badge strong { margin-top: 4px; font-size: 13px; }
.podium { max-width: 680px; margin: 0 auto 18px; display: flex; align-items: flex-end; justify-content: center; gap: 12px; position: relative; z-index: 2; }
.podium-card { width: 31%; min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px 10px; border-radius: 18px 18px 0 0; background: #e8eee8; text-align: center; }
.podium-card.first { min-height: 185px; background: var(--forest); color: white; }
.podium-card strong { margin-top: 9px; font-size: 12px; }
.podium-card small { margin-top: 5px; color: #75857c; font-size: 10px; }
.podium-card.first small { color: rgba(255,255,255,.65); }
.podium-rank { font-size: 10px; font-weight: 900; color: #73837a; }
.podium-card.first .podium-rank { color: var(--lime); }
.manager-avatar { width: 46px; height: 46px; margin-top: 8px; display: grid; place-items: center; border-radius: 50%; background: white; color: var(--forest); font-size: 11px; font-weight: 900; }
.podium-card:not(.first) .manager-avatar { background: #cbd8ce; }
.ladder-panel { max-width: 1000px; margin: 0 auto; overflow-x: auto; border-radius: 20px; padding-top: 20px; }
.ladder-row { min-height: 66px; display: grid; grid-template-columns: 55px minmax(160px,1fr) repeat(4, 95px); min-width: 650px; align-items: center; padding: 0 24px; border-bottom: 1px solid var(--line); }
.ladder-row:last-child { border: 0; }
.ladder-row.header { min-height: 46px; color: var(--muted); background: #f6f8f5; font-size: 9px; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
.ladder-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.ladder-row.me { background: #f4f9df; border-left: 4px solid #b8d545; padding-left: 20px; }
.ladder-row > :nth-child(n+3) { text-align: right; }

.game-live-badge { min-width: 142px; padding: 13px 16px; border-radius: 15px; background: var(--forest); color: white; box-shadow: 0 12px 30px rgba(18,60,44,.15); }
.game-live-badge span, .game-live-badge strong, .game-live-badge small { display: block; }
.game-live-badge span { color: var(--lime); text-transform: uppercase; letter-spacing: .13em; font-size: 9px; font-weight: 900; }
.game-live-badge span i { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgba(217,255,98,.13); animation: live-pulse 1.8s ease-in-out infinite; }
.game-live-badge strong { margin-top: 7px; font-size: 13px; }
.game-live-badge small { margin-top: 3px; color: rgba(255,255,255,.58); font-size: 9px; }
@keyframes live-pulse { 50% { box-shadow: 0 0 0 8px rgba(217,255,98,0); } }
.matchup-card { position: relative; overflow: hidden; padding: 27px 30px 24px; border-radius: 25px; color: white; background: radial-gradient(circle at 50% -20%, rgba(217,255,98,.22), transparent 35%), linear-gradient(135deg, #0d2f22, #18523b); box-shadow: 0 22px 60px rgba(18,60,44,.16); }
.matchup-card::after { content: ""; position: absolute; width: 260px; height: 260px; right: -145px; bottom: -170px; border: 1px solid rgba(255,255,255,.11); border-radius: 50%; }
.matchup-topline { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.matchup-topline h2 { margin: 0; font-size: 25px; letter-spacing: -.04em; }
.matchup-topline .kicker { color: rgba(255,255,255,.52); }
.bragging-pill { padding: 8px 11px; border: 1px solid rgba(217,255,98,.34); border-radius: 999px; background: rgba(217,255,98,.09); color: var(--lime); text-transform: uppercase; letter-spacing: .1em; font-size: 8px; font-weight: 900; }
.matchup-scoreboard { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(110px,1fr) minmax(220px,.7fr) minmax(110px,1fr); align-items: center; gap: 25px; max-width: 820px; margin: 33px auto 30px; }
.matchup-team { min-width: 0; display: grid; justify-items: center; text-align: center; }
.matchup-team strong { max-width: 100%; margin-top: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.matchup-team small { margin-top: 4px; color: rgba(255,255,255,.5); font-size: 9px; }
.matchup-avatar { width: 56px; height: 56px; display: grid; place-items: center; border: 1px solid rgba(217,255,98,.42); border-radius: 50%; background: var(--lime); color: var(--forest); font-size: 12px; font-weight: 950; }
.matchup-avatar.rival { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.11); color: white; }
.matchup-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 13px; text-align: center; }
.matchup-score strong { font-size: clamp(42px, 6vw, 68px); line-height: .8; letter-spacing: -.07em; }
.matchup-score > span { color: rgba(255,255,255,.35); font-size: 28px; font-weight: 300; }
.matchup-score small { grid-column: 1 / -1; margin-top: 10px; color: var(--lime); font-size: 10px; font-weight: 800; }
.matchup-progress { position: relative; z-index: 1; height: 5px; max-width: 730px; margin: 0 auto; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.13); }
.matchup-progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--lime), #7cd98f); transition: width .35s ease; }
.matchup-progress-copy { position: relative; z-index: 1; margin: 10px 0 0; color: rgba(255,255,255,.55); text-align: center; font-size: 9px; }
.all-matchups-panel { margin-top: 16px; padding: 24px 26px; }
.all-matchups-copy { margin: -10px 0 18px; color: var(--muted); font-size: 11px; }
.all-matchups-list { display: grid; gap: 10px; }
.all-matchup-card { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #f8faf7; }
.all-matchup-card.mine { border-color: #b8d545; box-shadow: inset 4px 0 #b8d545; }
.all-matchup-summary { min-height: 74px; display: grid; grid-template-columns: 52px minmax(0,1fr) 130px minmax(0,1fr) 92px; gap: 12px; align-items: center; padding: 10px 15px; }
.all-matchup-number { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 8px; font-weight: 850; }
.all-matchup-team { min-width: 0; }
.all-matchup-team.away { text-align: right; }
.all-matchup-team strong, .all-matchup-team small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.all-matchup-team strong { font-size: 12px; }
.all-matchup-team small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.all-matchup-score { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; text-align: center; }
.all-matchup-score strong { font-size: 25px; letter-spacing: -.05em; }
.all-matchup-score i { color: #9aa59f; font-style: normal; }
.all-matchup-status { justify-self: end; padding: 6px 8px; border-radius: 999px; background: #edf1ee; color: #728078; text-transform: uppercase; letter-spacing: .07em; font-size: 7px; font-weight: 900; }
.all-matchup-status.live { background: #e5f6e9; color: #187347; }
.all-matchup-status.live::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: #29a967; }
.all-matchup-status.final { background: var(--forest); color: var(--lime); }
.all-matchup-details { border-top: 1px solid var(--line); background: white; }
.all-matchup-details summary { padding: 11px 15px; color: var(--forest); cursor: pointer; font-size: 10px; font-weight: 850; }
.all-matchup-details summary::marker { color: #7e9a30; }
.all-matchup-lineups { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; padding: 2px 17px 17px; }
.all-matchup-lineup { min-width: 0; }
.all-matchup-lineup-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.all-matchup-lineup-heading span { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 7px; font-weight: 850; }
.all-matchup-lineup-heading strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.next-fixture-panel { margin-top: 16px; padding: 24px 26px; }
.fixture-lockout { padding: 7px 10px; border-radius: 999px; background: #eef4e2; color: #56701e; text-transform: uppercase; letter-spacing: .08em; font-size: 8px; font-weight: 900; }
.next-fixture-grid { display: grid; grid-template-columns: minmax(230px,.75fr) minmax(0,1.25fr); gap: 24px; align-items: stretch; }
.my-next-fixture { min-height: 128px; display: grid; place-items: center; padding: 22px; border-radius: 16px; background: var(--forest); color: white; text-align: center; }
.next-opponent-copy small, .next-opponent-copy strong, .next-opponent-copy span { display: block; }
.next-opponent-copy small { color: var(--lime); text-transform: uppercase; letter-spacing: .12em; font-size: 8px; font-weight: 900; }
.next-opponent-copy strong { margin-top: 10px; font-size: 22px; letter-spacing: -.04em; }
.next-opponent-copy span { margin-top: 5px; color: rgba(255,255,255,.6); font-size: 10px; }
.fixture-list-label { margin: 0 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-size: 8px; font-weight: 850; }
.fixture-list { display: grid; gap: 7px; }
.fixture-row { min-height: 54px; display: grid; grid-template-columns: 45px minmax(0,1fr) 16px minmax(0,1fr); gap: 9px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: #f8faf7; }
.fixture-row.mine { border-color: #b8d545; background: #f4f9df; }
.fixture-row em { color: var(--muted); font-size: 8px; font-style: normal; font-weight: 850; }
.fixture-row > span { min-width: 0; }
.fixture-row b, .fixture-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fixture-row b { font-size: 11px; }
.fixture-row small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.fixture-row > i { color: #95a198; text-align: center; font-size: 9px; font-style: normal; font-weight: 900; }
.fixture-row .fixture-bye b { color: #7f8b84; }
.gameday-stats { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 870px; margin: 14px auto 20px; overflow: hidden; border: 1px solid rgba(21,50,39,.07); border-radius: 17px; background: white; box-shadow: 0 10px 35px rgba(21,50,39,.05); }
.gameday-stats article { min-height: 91px; display: grid; align-content: center; justify-items: center; padding: 14px 20px; border-right: 1px solid var(--line); text-align: center; }
.gameday-stats article:last-child { border: 0; }
.gameday-stats span { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-size: 8px; font-weight: 850; }
.gameday-stats strong { margin-top: 4px; font-size: 24px; letter-spacing: -.04em; }
.gameday-stats small { margin-top: 3px; color: #8b9891; font-size: 9px; }
.gameday-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; align-items: start; }
.gameday-lineup { padding: 24px; }
.lineup-total { color: var(--muted); font-size: 10px; }
.lineup-total b { color: var(--forest); font-size: 18px; }
.gameday-player-list { display: grid; }
.gameday-player-row { min-height: 67px; display: grid; grid-template-columns: 42px minmax(0,1fr) auto auto; gap: 11px; align-items: center; border-bottom: 1px solid var(--line); }
.gameday-player-row:last-child { border: 0; }
.gameday-player-row .player-avatar { width: 38px; height: 38px; font-size: 9px; }
.gameday-player-main { min-width: 0; }
.gameday-player-main strong { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gameday-player-main small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.captain-tag, .vice-captain-tag, .shared-tag { flex: 0 0 auto; display: inline-grid; place-items: center; height: 19px; padding: 0 6px; border-radius: 999px; text-transform: uppercase; letter-spacing: .06em; font-size: 7px; font-weight: 900; }
.captain-tag { background: var(--forest); color: var(--lime); }
.vice-captain-tag { background: #dce7e1; color: #385a4c; }
.shared-tag { background: #e9efe8; color: #64756c; }
.player-game-status { min-width: 62px; text-align: right; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: 7px; font-weight: 850; }
.player-game-status.live { color: #188354; }
.player-game-status.live::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 4px; border-radius: 50%; background: #33aa70; }
.player-game-status.upcoming { color: #8f9a94; }
.gameday-player-points { min-width: 40px; text-align: right; }
.gameday-player-points strong { display: block; font-size: 17px; }
.gameday-player-points small { display: block; margin-top: 1px; color: var(--muted); font-size: 7px; }
.gameday-empty-slot { min-height: 67px; display: grid; place-items: center; border-bottom: 1px dashed var(--line); color: #94a097; font-size: 10px; }
.championship-note { margin-top: 18px; padding: 24px 26px; display: grid; grid-template-columns: 48px minmax(0,1fr) auto; gap: 18px; align-items: center; }
.championship-note h2 { margin: 0; font-size: 20px; letter-spacing: -.035em; }
.championship-note p:last-child { margin: 7px 0 0; max-width: 680px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.championship-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; background: var(--forest); color: var(--lime); font-size: 20px; font-weight: 950; }

.rules-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.rule-card { min-height: 220px; padding: 28px; border-radius: 22px; background: white; border: 1px solid rgba(21,50,39,.08); }
.rule-card.feature { background: var(--forest); color: white; }
.rule-number { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #edf2ed; color: var(--forest); font-size: 11px; font-weight: 900; }
.rule-card.feature .rule-number { background: var(--lime); }
.rule-card h2 { margin: 34px 0 10px; font-size: 26px; letter-spacing: -.04em; }
.rule-card p { margin: 0; color: var(--muted); line-height: 1.6; font-size: 13px; }
.rule-card.feature p { color: rgba(255,255,255,.68); }
.scoring-panel { margin-top: 14px; }
.score-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.score-columns h3 { margin: 0 0 12px; padding-bottom: 10px; border-bottom: 2px solid var(--forest); font-size: 14px; }
.score-columns p { display: flex; justify-content: space-between; gap: 20px; margin: 0; padding: 8px 0; border-bottom: 1px solid #edf0ec; color: var(--muted); font-size: 12px; }
.score-columns p strong { color: var(--forest); }
.rule-note { margin: 22px 0 0; padding: 14px; border-radius: 10px; background: #f1f5ed; color: var(--muted); font-size: 11px; line-height: 1.5; }

.admin-label { text-transform: uppercase; letter-spacing: .13em; color: var(--lime); font-size: 9px; font-weight: 900; }
.selection-admin-panel { margin-bottom: 18px; padding: 26px; }
.selection-admin-copy { max-width: 720px; margin: -10px 0 20px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.selection-publish-status { padding: 7px 10px; border-radius: 999px; background: #eef2ef; color: #697970; text-transform: uppercase; letter-spacing: .08em; font-size: 8px; font-weight: 900; }
.selection-publish-status.published { background: #e4f5e9; color: #176b40; }
.selection-list-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.selection-list-grid textarea { width: 100%; min-height: 180px; resize: vertical; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #f7f9f6; color: var(--ink); font: inherit; line-height: 1.5; }
.selection-list-grid textarea:focus { outline: 2px solid rgba(58,115,88,.2); border-color: #7ca58f; }
.selection-preview { min-height: 68px; margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #f8faf7; }
.selection-preview.ready { border-color: #b5d5c4; background: #f0faf3; }
.selection-preview.has-errors { border-color: #e6c189; background: #fff9ed; }
.selection-preview-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--forest); font-size: 12px; }
.selection-preview-summary span { color: var(--muted); font-size: 10px; }
.selection-match-list { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; margin-top: 12px; }
.selection-match-list span { min-width: 0; padding: 8px 9px; border-radius: 8px; background: white; border: 1px solid rgba(21,50,39,.08); }
.selection-match-list b, .selection-match-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selection-match-list b { font-size: 10px; }
.selection-match-list small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.selection-unmatched { margin-top: 13px; padding-top: 11px; border-top: 1px solid #ead8b9; font-size: 11px; }
.selection-unmatched > strong { color: #865225; }
.selection-unmatched p { margin: 7px 0 0; color: #765d45; }
.selection-admin-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 14px; }
.admin-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(320px,.7fr); gap: 18px; align-items: start; }
.score-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.score-form .section-heading { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.field-hint { color: #819087; text-transform: none; letter-spacing: 0; font-size: 9px; font-weight: 650; }
.field.check { min-height: 48px; display: flex; align-items: center; gap: 9px; padding-top: 17px; }
.field.check input { width: 19px; height: 19px; accent-color: var(--forest); }
.score-status { min-width: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; border: 0; }
.score-status legend { margin-bottom: 6px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 10px; font-weight: 800; }
.score-status label { position: relative; cursor: pointer; }
.score-status input { position: absolute; opacity: 0; pointer-events: none; }
.score-status span { min-height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: #f7f9f6; color: #65756c; font-size: 11px; font-weight: 850; }
.score-status input:checked + span { border-color: var(--forest); background: var(--forest); color: white; }
.score-status label:last-child input:checked + span { border-color: #a25636; background: #a25636; }
.score-status input:focus-visible + span { outline: 3px solid rgba(70,122,96,.22); outline-offset: 2px; }
.points-output { display: grid; min-width: 70px; text-align: right; color: var(--forest); font-size: 32px; font-weight: 950; }
.points-output small { font-size: 8px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.count-badge { min-width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--forest); color: var(--lime); font-size: 11px; font-weight: 900; }
.score-entries { min-height: 260px; }
.score-entry { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.score-entry strong { display: block; font-size: 12px; }
.score-entry small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.score-entry > b { min-width: 46px; font-size: 18px; text-align: right; color: var(--forest); }
.entry-remove { border: 0; background: transparent; color: #8b9891; cursor: pointer; }

.bottom-nav { position: fixed; z-index: 20; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(720px, calc(100% - 28px)); height: 66px; padding: 7px; display: grid; grid-template-columns: repeat(6, 1fr); border-radius: 19px; background: rgba(15,51,37,.96); box-shadow: 0 18px 55px rgba(9,34,24,.3); backdrop-filter: blur(18px); }
.bottom-nav.manager { grid-template-columns: repeat(5, 1fr); }
.bottom-nav button { border: 0; border-radius: 13px; background: transparent; color: rgba(255,255,255,.54); cursor: pointer; display: grid; place-content: center; gap: 3px; }
.bottom-nav button span { font-size: 18px; line-height: 1; font-weight: 600; }
.bottom-nav button small { font-size: 8px; letter-spacing: .03em; font-weight: 760; }
.bottom-nav button.active { background: var(--lime); color: var(--forest); }
.round-settings-panel { padding: 24px; margin-bottom: 22px; }
.round-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.round-format-note { color: var(--forest); font-size: 12px; line-height: 1.6; margin: 16px 0; }
.round-averages { font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.round-averages p { padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.publish-complete { margin: 16px 0; line-height: 1.5; }
@media (max-width: 560px) { .round-settings-grid { grid-template-columns: 1fr; } .round-settings-panel { padding: 18px; } }
.home-status { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 20px 0; padding: 24px; }
.home-status p, .home-award p { line-height: 1.6; }
.home-my-match { padding: 24px; margin-bottom: 20px; }
.home-my-match h2 { margin-bottom: 18px; }
.home-awards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.home-award { padding: 24px; overflow-wrap: anywhere; }
.home-award h2 { font-size: 21px; line-height: 1.35; }
.home-wrap-panel { padding: 24px; margin-top: 20px; }
.home-wrap-panel textarea { width: 100%; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--cream); color: var(--ink); font: inherit; font-size: 14px; line-height: 1.7; resize: vertical; }
.home-wrap-panel textarea:focus-visible { outline: 3px solid var(--forest-2); outline-offset: 2px; }
[data-view="home"] h2 { overflow-wrap: anywhere; }
[data-view="home"] .hero-panel > button { color: var(--lime); flex-shrink: 0; min-height: 44px; }
@media (max-width: 700px) {
  .home-awards { grid-template-columns: 1fr; }
  .home-status, [data-view="home"] .hero-panel { align-items: flex-start; flex-direction: column; }
  .home-wrap-panel .section-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .home-wrap-panel .button { width: 100%; min-height: 44px; }
  .home-status, .home-my-match, .home-award, .home-wrap-panel { padding: 20px; }
}
.toast { position: fixed; z-index: 50; left: 50%; top: 18px; transform: translate(-50%, -18px); max-width: min(420px, calc(100% - 30px)); padding: 12px 16px; border-radius: 11px; background: #102d23; color: white; box-shadow: 0 14px 40px rgba(0,0,0,.2); font-size: 12px; font-weight: 750; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .team-layout, .admin-layout, .gameday-grid { grid-template-columns: 1fr; }
  .team-name-panel { grid-template-columns: 1fr; }
  .filter-panel { grid-template-columns: 1fr; }
  .tier-filters { grid-column: 1 / -1; }
  .player-table .player-row { grid-template-columns: 42px minmax(140px,1fr) repeat(2, 70px) auto; }
  .selection-list-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .site-shell { padding-bottom: 86px; }
  .topbar { height: 68px; padding: 0 16px; }
  .crest { width: 35px; height: 40px; font-size: 18px; }
  .brand-copy strong { font-size: 14px; }
  .brand-copy small { font-size: 8px; }
  .lock-pill { padding: 8px 10px; gap: 7px; }
  .lock-pill small { display: none; }
  .lock-pill strong { font-size: 10px; }
  .live-dot { width: 7px; height: 7px; box-shadow: 0 0 0 4px rgba(70,180,110,.12); }
  .account-pill { min-height: 40px; padding: 3px; }
  .account-pill > span { width: 32px; height: 32px; }
  .account-pill > div { display: none; }
  .account-pill .account-signout { padding: 5px 6px; border-left: 0; font-size: 7px; }
  main { padding: 0 12px 34px; }
  .hero-panel { min-height: 245px; padding: 30px 24px; border-radius: 23px; align-items: flex-start; }
  .hero-panel h1, .page-intro h1 { font-size: 46px; }
  .hero-copy { max-width: 250px; font-size: 13px; }
  .hero-mark { position: absolute; right: -17px; bottom: -18px; min-width: 120px; opacity: .76; }
  .hero-mark span { font-size: 50px; }
  .summary-strip { margin: -20px 10px 0; grid-template-columns: repeat(2, 1fr); }
  .summary-strip > div { min-height: 69px; padding: 13px 16px; }
  .summary-strip > div:nth-child(2) { border-right: 0; }
  .summary-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .summary-strip strong { font-size: 20px; }
  .cap-track { margin: 13px 18px 19px; }
  .practice-note { margin: 0 10px 16px; }
  .squad-panel, .market-panel, .scoring-panel, .score-form, .recent-panel, .selection-admin-panel { padding: 19px; }
  .squad-grid { grid-template-columns: 1fr; }
  .squad-card, .empty-slot { min-height: 83px; }
  .team-actions { grid-template-columns: 1fr; }
  .team-name-panel { padding: 16px; }
  .team-name-controls { grid-template-columns: 1fr; }
  .market-footer { align-items: flex-start; flex-direction: column; }
  .trade-draft-row { grid-template-columns: minmax(0,1fr) 14px minmax(0,1fr); }
  .trade-undo { grid-column: 1 / -1; }
  .page-intro { min-height: 170px; padding: 26px 5px 22px; }
  .big-stat { display: none; }
  .filter-panel { position: static; grid-template-columns: 1fr; padding: 10px; }
  .filter-panel > label { width: 100%; }
  .tier-filters { grid-column: auto; }
  .player-table .player-row { grid-template-columns: 40px minmax(0,1fr) auto auto; padding: 12px 12px; }
  .rules-grid { grid-template-columns: 1fr; }
  .rule-card { min-height: 190px; padding: 22px; }
  .rule-card h2 { margin-top: 26px; }
  .score-columns { grid-template-columns: 1fr; gap: 24px; }
  .podium { gap: 5px; }
  .podium-card { width: 33%; padding: 12px 5px; }
  .podium-card strong { font-size: 10px; }
  .ladder-panel { padding-top: 8px; }
  .ladder-row { grid-template-columns: 40px minmax(140px,1fr) repeat(4, 90px); min-width: 600px; padding: 0 14px; }

  .gameday-intro { min-height: 0; flex-direction: column; align-items: stretch; gap: 14px; }
  .game-live-badge { width: 100%; min-width: 0; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
  .game-live-badge strong, .game-live-badge small { margin-top: 0; }
  .game-live-badge small { text-align: right; }
  .matchup-card { padding: 22px 16px 20px; }
  .matchup-topline { gap: 10px; }
  .matchup-topline h2 { font-size: 22px; }
  .bragging-pill { padding: 6px 8px; font-size: 7px; }
  .matchup-scoreboard { grid-template-columns: minmax(0,1fr) minmax(96px,.9fr) minmax(0,1fr); gap: 6px; margin: 27px auto 24px; }
  .matchup-avatar { width: 48px; height: 48px; }
  .matchup-team strong { font-size: 11px; }
  .matchup-score { gap: 5px; }
  .matchup-score strong { font-size: 36px; }
  .all-matchups-panel { padding: 19px; }
  .all-matchup-summary { grid-template-columns: 38px minmax(0,1fr) 88px minmax(0,1fr); gap: 7px; padding: 9px; }
  .all-matchup-score strong { font-size: 20px; }
  .all-matchup-status { grid-column: 2 / -1; justify-self: end; }
  .all-matchup-lineups { grid-template-columns: 1fr; padding: 2px 12px 12px; }
  .next-fixture-panel { padding: 19px; }
  .next-fixture-grid { grid-template-columns: 1fr; gap: 16px; }
  .fixture-row { grid-template-columns: 39px minmax(0,1fr) 13px minmax(0,1fr); padding: 8px 9px; }
  .gameday-stats article { min-height: 79px; padding: 11px 5px; }
  .gameday-stats strong { font-size: 19px; }
  .gameday-lineup { padding: 18px; }
  .gameday-player-row { grid-template-columns: 38px minmax(0,1fr) auto auto; gap: 8px; }
  .player-game-status { min-width: 49px; }
  .championship-note { grid-template-columns: 42px minmax(0,1fr); padding: 20px; }
  .championship-note .button { grid-column: 1 / -1; width: 100%; }
  .score-form { grid-template-columns: 1fr; }
  .score-form .section-heading, .score-form .wide { grid-column: 1; }
  .selection-match-list { grid-template-columns: 1fr 1fr; }
  .selection-admin-actions { display: grid; grid-template-columns: 1fr; }
  .bottom-nav { bottom: max(10px, env(safe-area-inset-bottom)); width: calc(100% - 20px); height: 63px; }
  .bottom-nav button span { font-size: 17px; }
  .bottom-nav button small { font-size: 7px; }
}

@media (max-width: 420px) {
  .topbar { padding: 0 10px; }
  .brand-copy { display: none; }
  .lock-pill { padding: 7px 8px; }
  main { padding-left: 10px; padding-right: 10px; }
  .section-heading { gap: 10px; }
  .section-heading h2 { font-size: 21px; }
  .matchup-card { padding-left: 12px; padding-right: 12px; }
  .matchup-avatar { width: 42px; height: 42px; }
  .matchup-team strong { font-size: 10px; }
  .matchup-score strong { font-size: 32px; }
  .all-matchups-panel, .next-fixture-panel, .gameday-lineup { padding: 15px; }
  .all-matchup-summary { grid-template-columns: 31px minmax(0,1fr) 68px minmax(0,1fr); gap: 5px; padding: 8px 6px; }
  .all-matchup-score { gap: 4px; }
  .all-matchup-score strong { font-size: 17px; }
  .fixture-row { grid-template-columns: 33px minmax(0,1fr) 11px minmax(0,1fr); gap: 5px; padding: 8px 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.price-movement { display: block; font-size: 11px; line-height: 1.4; white-space: nowrap; }
.price-movement.up { color: var(--green, #148052); }
.price-movement.down { color: var(--danger, #bc3944); }
.price-movement.flat { color: var(--muted, #647268); }

.ladder-help { max-width: 1000px; margin: 0 auto 12px; color: var(--muted); font-size: 12px; line-height: 1.6; }

/* Shared readability and responsive spacing across coach and admin views. */
body { line-height: 1.5; }
button, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--forest-2); outline-offset: 3px; }
.bottom-nav button:focus-visible { outline-color: var(--lime); }
button:disabled { cursor: not-allowed; }
main, .panel, .field, .section-heading > div, .page-intro > div, .hero-panel > div { min-width: 0; }
.section-heading, .matchup-topline, .selection-preview-summary { flex-wrap: wrap; }
h1, h2, h3, .team-warning, .entry-prompt, .selection-summary { overflow-wrap: anywhere; }
.hero-panel h1, .page-intro h1 { line-height: 1.05; }
.hero-panel::before, .hero-panel::after, .matchup-card::after { pointer-events: none; }
.hero-panel > div:first-child { position: relative; z-index: 2; }
.hero-panel { gap: 28px; padding-bottom: 54px; }
.hero-copy { color: rgba(255,255,255,.88); }
.kicker { color: #557665; font-size: 11px; letter-spacing: .1em; }
.button { padding: 11px 16px; font-size: 14px; line-height: 1.4; }
.text-button, .auth-secondary { min-height: 44px; font-size: 13px; }
.chip { min-height: 44px; font-size: 12px; flex-shrink: 0; }
.tier-filters { padding: 4px; scrollbar-width: thin; }
.search-wrap { min-height: 48px; }
.controls-help { margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.auth-card > p, .auth-form label, .auth-error { font-size: 13px; }
.auth-note, .auth-password-hint { font-size: 12px; line-height: 1.5; }
.auth-submit { font-size: 14px; }
.auth-recovery summary { min-height: 44px; }
.app-loading.error { overflow-y: auto; align-content: safe center; }
.account-pill strong { font-size: 12px; }
.account-pill small { font-size: 10px; }
.account-pill .account-signout { min-height: 44px; font-size: 12px; padding: 8px; }
.lock-pill { flex-shrink: 0; }
.summary-strip > div { min-width: 0; }
.summary-strip small { margin: 4px 0 0; font-size: 12px; line-height: 1.4; }
.summary-strip span { font-size: 11px; letter-spacing: .07em; }
.squad-card { grid-template-columns: 40px minmax(0,1fr); gap: 10px; padding: 14px; }
.squad-card .player-avatar { width: 40px; height: 40px; }
.squad-info strong, .player-main strong, .matchup-team strong, .all-matchup-team strong,
.all-matchup-lineup-heading strong, .fixture-row b, .trade-draft-row b, .selection-match-list b { white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }
.squad-info small, .player-main small { font-size: 12px; }
.squad-price { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.squad-value { text-align: left; }
.squad-price strong { font-size: 15px; }
.leadership-buttons { gap: 6px; flex-wrap: wrap; }
.captain-button { margin: 0; min-width: 44px; height: 44px; font-size: 13px; }
.trade-in-tag { margin: 0; min-height: 44px; font-size: 11px; }
.selection-pill { max-width: 100%; font-size: 11px; line-height: 1.35; }
.add-button { width: 44px; height: 44px; }
.trade-undo { min-height: 44px; font-size: 13px; }
.trade-draft-heading small, .trade-draft-row small { font-size: 12px; }
.trade-draft-row b { font-size: 13px; }
.entry-prompt, .team-warning, .selection-summary, .team-name-panel p:last-child, .practice-note { font-size: 14px; line-height: 1.6; }
.price-stack strong { font-size: 14px; }
.tier, .player-stat span { font-size: 10px; letter-spacing: .04em; }
.market-footer { flex-wrap: wrap; font-size: 12px; }
.market-footer .button { min-height: 44px; }
.market-nav { flex-wrap: wrap; }
.ladder-row { padding-top: 12px; padding-bottom: 12px; }
.ladder-row > :nth-child(2), .podium-card strong { min-width: 0; overflow-wrap: anywhere; }
.ladder-row.header, .ladder-row small { font-size: 11px; letter-spacing: .03em; }
.podium-card strong { font-size: 13px; }
.ladder-help { font-size: 13px; }
.matchup-scoreboard { grid-template-columns: minmax(0,1fr) minmax(300px,1.7fr) minmax(0,1fr); }
.matchup-score strong { font-size: clamp(34px, 4vw, 54px); line-height: 1.15; font-variant-numeric: tabular-nums; }
.matchup-team small, .matchup-progress-copy, .all-matchups-copy, .game-live-badge small { font-size: 12px; }
.matchup-team small, .matchup-progress-copy, .game-live-badge small { color: rgba(255,255,255,.78); }
.bragging-pill, .fixture-lockout, .all-matchup-status { font-size: 10px; letter-spacing: .03em; }
.all-matchup-summary { grid-template-columns: 48px minmax(0,1fr) minmax(170px,.9fr) minmax(0,1fr) auto; }
.all-matchup-number, .all-matchup-team small, .all-matchup-lineup-heading span { font-size: 11px; }
.all-matchup-team strong, .all-matchup-lineup-heading strong { font-size: 14px; }
.all-matchup-score strong { font-size: 23px; font-variant-numeric: tabular-nums; }
.all-matchup-details summary { min-height: 44px; padding: 12px; font-size: 13px; }
.all-matchup-lineup-heading { flex-wrap: wrap; }
.gameday-player-row { grid-template-columns: 38px minmax(0,1fr) auto; gap: 4px 10px; padding: 12px 0; }
.gameday-player-row > .player-avatar { grid-column: 1; grid-row: 1 / 3; }
.gameday-player-main { grid-column: 2; grid-row: 1; }
.gameday-player-main strong { white-space: normal; overflow-wrap: anywhere; flex-wrap: wrap; font-size: 14px; }
.gameday-player-main small, .gameday-player-points small, .gameday-stats span, .gameday-stats small { font-size: 11px; }
.player-game-status { grid-column: 2; grid-row: 2; text-align: left; font-size: 10px; }
.gameday-player-points { grid-column: 3; grid-row: 1 / 3; }
.captain-tag, .vice-captain-tag, .shared-tag { font-size: 10px; height: 22px; }
.fixture-row small, .fixture-row em, .fixture-list-label, .next-opponent-copy small { font-size: 11px; }
.fixture-row b, .next-opponent-copy span { font-size: 13px; }
.rule-card p, .rule-note, .score-columns p { font-size: 14px; line-height: 1.65; }
.rule-note > strong { color: var(--forest); font-size: 16px; }
.rule-note p { margin: 10px 0 0; }
.rule-card.feature p { color: rgba(255,255,255,.85); }
.field, .score-status legend { min-width: 0; font-size: 12px; letter-spacing: .04em; }
.field-hint { font-size: 12px; line-height: 1.5; }
.field.check { padding-top: 0; text-transform: none; letter-spacing: 0; font-size: 14px; }
.field.check input { flex-shrink: 0; }
.score-status span { font-size: 13px; padding: 8px; text-align: center; }
.selection-admin-copy, .selection-preview-summary, .round-format-note { font-size: 14px; }
.selection-match-list small, .selection-preview-summary span { font-size: 12px; }
.selection-publish-status, .admin-label { font-size: 11px; }
.score-entry { grid-template-columns: minmax(0,1fr) auto auto; }
.score-entry > div { min-width: 0; overflow-wrap: anywhere; }
.score-entry strong { font-size: 14px; }
.score-entry small { font-size: 12px; }
.entry-remove { min-width: 44px; min-height: 44px; font-size: 20px; }
.bottom-nav button small { font-size: 11px; letter-spacing: 0; }
.bottom-nav button { min-width: 0; min-height: 44px; }
.site-shell { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }

@media (max-width: 1000px) {
  .all-matchup-lineups { grid-template-columns: 1fr; }
  .all-matchup-summary { grid-template-columns: minmax(0,1fr) minmax(170px,.9fr) minmax(0,1fr); }
  .all-matchup-number { grid-column: 1 / 3; grid-row: 1; }
  .all-matchup-status { grid-column: 3; grid-row: 1; }
  .all-matchup-team { grid-column: 1; grid-row: 2; }
  .all-matchup-score { grid-column: 2; grid-row: 2; }
  .all-matchup-team.away { grid-column: 3; grid-row: 2; }
}
@media (max-width: 760px) {
  .topbar { height: auto; min-height: 80px; padding: 14px 16px; flex-wrap: wrap; gap: 12px; }
  .top-actions { flex: 1; justify-content: flex-end; flex-wrap: wrap; }
  .page-intro { flex-wrap: wrap; gap: 16px; }
  .matchup-scoreboard { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 12px; }
  .matchup-team { grid-row: 1; grid-column: 1; }
  .matchup-team:last-child { grid-column: 2; }
  .matchup-team strong { font-size: 15px; }
  .matchup-score { grid-row: 2; grid-column: 1 / -1; justify-self: center; gap: 12px; }
  .matchup-score strong { font-size: clamp(32px,8vw,48px); }
}
@media (max-width: 640px) {
  input, select, textarea, .auth-form input { font-size: 16px; min-width: 0; }
  .hero-panel { padding: 28px 22px 42px; min-height: 0; }
  .hero-panel h1, .page-intro h1 { font-size: clamp(36px,10vw,46px); }
  .hero-copy { max-width: none; font-size: 15px; }
  .hero-mark { display: none; }
  .lock-pill small { display: block; font-size: 10px; letter-spacing: .03em; }
  .lock-pill strong { font-size: 12px; }
  .summary-strip strong { font-size: 22px; }
  .player-row { grid-template-columns: minmax(0,1fr) auto auto; gap: 9px; }
  .player-row > .player-avatar { display: none; }
  .player-table .player-row { grid-template-columns: minmax(0,1fr) auto auto; }
  .player-main strong { font-size: 14px; }
  .all-matchup-summary { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 14px; }
  .all-matchup-number { grid-column: 1; }
  .all-matchup-status { grid-column: 2; }
  .all-matchup-team { grid-column: 1; grid-row: 2; }
  .all-matchup-team.away { grid-column: 2; grid-row: 2; }
  .all-matchup-score { grid-column: 1 / -1; grid-row: 3; justify-self: center; gap: 14px; }
  .all-matchup-score strong { font-size: 26px; }
  .game-live-badge { grid-template-columns: minmax(0,1fr) auto; }
  .game-live-badge small { grid-column: 1 / -1; text-align: left; }
  .gameday-stats article { min-width: 0; padding: 12px 8px; }
  .gameday-stats span { font-size: 10px; letter-spacing: .03em; }
  .selection-match-list { grid-template-columns: 1fr; }
  .bottom-nav { padding: 5px; height: 66px; }
  .bottom-nav button small { font-size: 10px; }
}

.field input[type="text"], .field input[type="datetime-local"] { width: 100%; min-width: 0; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: #f7f9f6; color: var(--ink); font-size: 16px; }

.site-help { max-width: 1240px; margin: 0 auto; padding: 0 20px 20px; text-align: center; }
.site-help .text-button { font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
#scoring-heading { scroll-margin-top: 24px; }

/* Keep the current-season stats together and visible at every screen width. */
.players-stats-note { margin: 18px 4px 12px; color: var(--muted); font-size: 13px; line-height: 1.6; max-width: 880px; }
.player-table .player-row { grid-template-columns: 40px minmax(150px,1fr) minmax(330px,1.5fr) 85px 44px; }
.player-season-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; min-width: 0; }
.player-season-stats .player-stat { display: grid; grid-template-rows: minmax(32px,auto) auto; align-content: start; min-width: 0; }
.player-season-stats .player-stat span { font-size: 11px; line-height: 1.4; letter-spacing: 0; text-transform: none; }
.player-season-stats .player-stat strong { font-size: 15px; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .player-table .player-row { grid-template-columns: 40px minmax(0,1fr) auto 44px; }
  .player-table .player-main { grid-column: 2; grid-row: 1; }
  .player-table .price-stack { grid-column: 3; grid-row: 1; }
  .player-table .add-button { grid-column: 4; grid-row: 1; }
  .player-season-stats { grid-column: 1 / -1; grid-row: 2; padding-top: 12px; border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .player-table .player-row { grid-template-columns: minmax(0,1fr) auto 44px; gap: 12px 10px; }
  .player-table .player-main { grid-column: 1; }
  .player-table .price-stack { grid-column: 2; }
  .player-table .add-button { grid-column: 3; }
  .player-season-stats { gap: 8px; }
}
