:root {
  color-scheme: dark;
  --bg: #070d18;
  --panel: #101b2d;
  --line: #293a53;
  --line-soft: #1e2c40;
  --ink: #f3f7ff;
  --muted: #a5b5ca;
  --blue: #60deff;
  --orange: #ffae76;
  --green: #83e8ad;
  --body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Arial Narrow", "Roboto Condensed", var(--body);
  --shadow: 0 12px 32px #02050d55, inset 0 1px #e0efff0a;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-width: 300px;
  min-height: 100vh;
  color: var(--ink);
  font: 14px/1.5 var(--body);
  background: radial-gradient(ellipse at 50% -12%, #1a2f4d 0%, var(--bg) 66%) fixed;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { opacity: .48; cursor: default; }
a { color: var(--blue); text-underline-offset: 3px; }
:where(a,button,input,select,textarea,summary):focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
img { vertical-align: middle; }

.stadium {
  background: linear-gradient(180deg,#060b16a6,#0a1323f5), url(stadium.svg) center 24%/cover, #0b1424;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 20px #03061044;
}
.top, .shell { width: min(1320px, calc(100% - 48px)); margin-inline: auto; }
.top { min-height: 76px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; line-height: 1.2; }
.brand img { width: 44px; height: 44px; flex: none; border-radius: 11px; box-shadow: 0 2px 9px #0005; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 15px; font-weight: 850; letter-spacing: .075em; }
.brand span { margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .1em; }
.mode { text-align: right; font-weight: 820; font-size: 10px; letter-spacing: .12em; }
.mode span::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px #83e8ad85; }
.mode small { display: block; margin-top: 3px; font-size: 9px; color: var(--muted); }
nav { display: flex; gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: #091322d9; }
nav a, nav button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 38px;
  padding: 7px 12px; border: 1px solid transparent; border-radius: 7px;
  background: transparent; color: #bbcade; font-weight: 740; text-decoration: none; white-space: nowrap; font-size: 12px;
}
nav button[aria-pressed=true], nav a[aria-current=page] {
  background: linear-gradient(180deg,#243952,#182a40); border-color: #385471;
  color: #f6fbff; box-shadow: inset 0 -2px #63daff70;
}
nav a:hover, nav button:not([aria-pressed=true]):hover { background: #192a40; color: var(--ink); }

.shell { padding-block: 22px 24px; }
.box, .toolbar, .ticker, .card, .scoreline { border: 1px solid var(--line); border-radius: 13px; }
.box, .toolbar { background: linear-gradient(145deg,#132137,#0d1727 78%); box-shadow: var(--shadow); }
.box { min-width: 0; padding: clamp(16px, 2.2vw, 26px); }
.box h2, .box h3 { margin: 0 0 8px; letter-spacing: -.025em; line-height: 1.2; }
.box h2 { font-size: 21px; }
.box h3 { font-size: 15px; }
.box p, .intro p, .entry-copy p { color: var(--muted); margin: 5px 0 16px; line-height: 1.55; }
.eyebrow, .score-caption { color: var(--blue); font-size: 10px; font-weight: 830; letter-spacing: .16em; text-transform: uppercase; }
.intro { margin: 4px 0 20px; }
.intro h1, .gate h1, .gate h2, .entry-copy h1 {
  margin: 5px 0 7px; font-family: var(--display); font-weight: 860; letter-spacing: -.055em; line-height: 1.06;
}
.intro h1 { font-size: clamp(34px, 5vw, 52px); }
.intro p { margin-bottom: 0; }
.split { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; align-items: start; }
.draft-rosters { display: grid; gap: 12px; min-width: 0; }
.live-tools { margin-top: 14px; }
.error { color: #ffc08f; margin-top: 10px; }
.error:empty, .live-status:empty, .live-tools p:empty { display: none; }
.hint { color: var(--muted); font-size: 12px; }
footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 17px; padding: 12px 0 0; border-top: 1px solid var(--line-soft); color: #a5b5ca; font-size: 10px; letter-spacing: .065em; font-weight: 700; }
footer i { display: inline-block; width: 3px; height: 3px; border-radius: 50%; margin: 0 4px 2px; background: #6a829b; }

.btn {
  display: inline-flex; justify-content: center; align-items: center; min-height: 38px; max-width: 100%;
  padding: 8px 13px; border: 1px solid #3a516f; border-radius: 8px;
  background: linear-gradient(180deg,#22344c,#17263b); color: var(--ink);
  font-size: 12px; font-weight: 760; line-height: 1.25; text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.btn:not(:disabled):hover { background: #2b4360; border-color: #6383a7; }
.primary { color: #061622; background: linear-gradient(180deg,#91eaff,#59d7fb); border-color: #95edff; box-shadow: inset 0 1px #fff6, 0 4px 14px #33c8fd21; }
.primary:not(:disabled):hover { background: #a6efff; border-color: #c9f7ff; }
.ghost { background: transparent; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; margin-bottom: 12px; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
label { display: block; min-width: 0; color: #d7e1ef; font-size: 12px; font-weight: 720; }
input, select, textarea {
  display: block; width: 100%; min-width: 0; min-height: 42px; margin-top: 6px;
  padding: 9px 11px; border: 1px solid #405674; border-radius: 8px;
  background: #091426; color: var(--ink); font-size: 16px; font-weight: 500;
}
input::placeholder, textarea::placeholder { color: #8d9fb7; opacity: 1; }
textarea { resize: vertical; min-height: 145px; font-family: ui-monospace, monospace; font-size: 16px; }
details { margin: 16px 0; }
summary { cursor: pointer; color: var(--blue); font-size: 13px; font-weight: 760; }
details[open] summary { margin-bottom: 8px; }

.entry-layout { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(0,1fr); gap: 18px; align-items: stretch; max-width: 1140px; margin: clamp(12px,5vw,64px) auto 0; }
.entry-intro {
  position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: end;
  min-height: 350px; padding: clamp(25px,4vw,50px); border: 1px solid #3c546e; border-radius: 16px;
  background: linear-gradient(130deg,#0f2032f0 5%,#101c2e8c 80%), radial-gradient(ellipse at 79% 19%,#284b6f,#13223a 58%);
  box-shadow: var(--shadow);
}
.entry-intro::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg,#0c162500,#0d192ceb 91%),url(stadium.svg) center top/auto 62% no-repeat; opacity: .75; }
.field-art { position: absolute; right: -4%; bottom: -4%; width: 105%; height: auto; color: #7dbeeb; opacity: .28; z-index: -1; }
.entry-copy h1 { margin-block: 10px 14px; font-size: clamp(34px,4.8vw,64px); }
.entry-copy p { max-width: 33ch; margin: 0; color: #c0cfe1; }
.gate { width: min(100%,460px); margin: 28px auto; padding: clamp(20px,3.2vw,36px); }
.gate h1, .gate h2 { font-size: clamp(28px,3vw,39px); }
.gate form label+label { margin-top: 13px; }
.gate .gate-footer { margin: 20px 0 0; padding-top: 15px; border-top: 1px solid var(--line); font-size: 13px; }
.gate-footer a { font-weight: 720; }
.gate .primary { min-height: 44px; }
.join-card { align-self: stretch; display: flex; flex-direction: column; justify-content: center; width: auto; margin: 0; }
.join-card .eyebrow { margin-bottom: 4px; }
.join-card input { min-height: 48px; font-family: ui-monospace, monospace; text-transform: uppercase; letter-spacing: .15em; }
.join-card input::placeholder { letter-spacing: .07em; text-transform: none; }
.join-card .primary { width: 100%; }
.join-card .live-status { margin: 10px 0 0; }
.host-access {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  padding: 13px 16px; margin-bottom: 14px; border-left: 3px solid var(--blue);
}
.host-copy { flex: 1 1 200px; }
.host-copy h2 { margin: 3px 0; font-size: 17px; }
.host-copy p { margin: 0; font-size: 12px; }
.host-actions { margin: 0; }
.host-access .live-status { width: 100%; margin: 0; }
.saved-label { flex: 1 1 100%; max-width: 380px; }
.code-chip {
  display: inline-block; padding: 6px 11px; border: 1px solid #4a7598; border-radius: 8px;
  color: #b3efff; background: #0a192c; font: 780 19px/1.3 ui-monospace, monospace; letter-spacing: .12em;
}

.scoreline {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(128px,.54fr) minmax(0,1fr);
  align-items: center; gap: 18px; padding: 18px 20px; margin-bottom: 13px;
  background: radial-gradient(ellipse at 0 50%,#1439549c,transparent 49%), radial-gradient(ellipse at 100% 50%,#51352477,transparent 49%), #101c2d;
  box-shadow: var(--shadow);
}
.side { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.side.left { --accent: var(--blue); }
.side.right { --accent: var(--orange); flex-direction: row-reverse; text-align: right; }
.team { min-width: 0; border-left: 2px solid var(--accent); padding-left: 12px; }
.right .team { border-left: 0; border-right: 2px solid var(--accent); padding: 0 12px 0 0; }
.team h2 { margin: 0 0 4px; color: var(--accent); font-size: clamp(17px,2.35vw,35px); font-weight: 860; letter-spacing: -.025em; line-height: 1.05; overflow-wrap: anywhere; }
.team p { margin: 0; color: #c1cee0; font-size: 11px; overflow-wrap: anywhere; }
.big { font: 880 clamp(40px,6.4vw,86px)/.97 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.07em; text-shadow: 0 6px 16px #0005; }
.clock { text-align: center; min-width: 0; }
.score-caption { margin-bottom: 5px; color: #bbcce0; font-size: 9px; letter-spacing: .09em; }
.clock strong { display: inline-block; padding: 4px 10px; border: 1px solid #4e6988; border-radius: 7px; background: #0a1525; font-size: 13px; font-variant-numeric: tabular-nums; letter-spacing: .07em; white-space: nowrap; }
.clock span, .clock small { display: block; margin-top: 4px; text-transform: uppercase; font-size: 10px; font-weight: 780; letter-spacing: .035em; line-height: 1.35; overflow-wrap: anywhere; }
.clock small { color: var(--muted); font-size: 9px; }
.lead-blue { color: var(--blue); }
.lead-orange { color: var(--orange); }

.cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.card { --accent: var(--blue); min-width: 0; overflow: hidden; border-top: 2px solid var(--accent); background: #0d1828; box-shadow: var(--shadow); }
.card.orange { --accent: var(--orange); }
.card h3 { display: flex; align-items: center; gap: 8px; margin: 0; padding: 9px 13px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg,#1b2d45,#142136); font-size: 13px; font-weight: 830; letter-spacing: .06em; text-transform: uppercase; overflow-wrap: anywhere; }
.fantasy-mark { flex: none; color: var(--accent,var(--blue)); }
.fantasy-mark.uploaded { object-fit: contain; }
.table-wrap { padding: 0 10px; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 7px 6px; text-align: left; border-bottom: 1px solid var(--line-soft); line-height: 1.25; }
th { color: #b1c0d4; font-size: 9px; text-transform: uppercase; letter-spacing: .09em; }
td { font-size: 12px; }
.card td { height: 34px; }
.card th:nth-child(3) { width: 12%; }
.card th:nth-child(4) { width: 37%; }
.pts { text-align: right; white-space: nowrap; font-weight: 810; }
.tag { display: inline-block; min-width: 29px; padding: 3px 4px; border: 1px solid #405573; border-radius: 5px; background: #152439; color: #e0ebf9; text-align: center; font-size: 9px; font-weight: 800; }
.roster-club, .club-code { display: inline-flex; align-items: center; gap: 4px; }
.roster-club-cell { color: var(--muted); font-size: 10px; white-space: nowrap; }
.nfl-icon { object-fit: contain; flex: none; }
.roster-club .nfl-icon, .pool .nfl-icon { width: 15px; height: 15px; }
.stats, .empty, .directory-table small { color: var(--muted); }
.stats { font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.player-name { display: block; padding: 0; border: 0; background: none; text-align: left; font-size: inherit; font-weight: 760; line-height: 1.25; overflow-wrap: anywhere; }
.player-name:hover { text-decoration: underline; color: var(--accent); }
tr.hot { background: color-mix(in srgb,var(--accent) 13%,transparent); }
tr.hot td:first-child { box-shadow: inset 2px 0 var(--accent); }
.total { display: flex; align-items: center; justify-content: flex-end; gap: 11px; padding: 7px 16px; color: var(--muted); font-size: 10px; font-weight: 780; letter-spacing: .1em; }
.total b { color: var(--ink); font-size: 21px; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.ticker { display: flex; align-items: center; gap: 8px 12px; padding: 8px 13px; margin-top: 12px; background: linear-gradient(95deg,#152940,#0e1929); }
.ticker .bolt { color: var(--blue); font-size: 22px; line-height: 1; }
.ticker strong { color: var(--blue); font-size: 10px; font-weight: 820; letter-spacing: .1em; white-space: nowrap; }
.ticker .latest-text { min-width: 0; font-size: 12px; overflow-wrap: anywhere; }
.ticker .delta { margin-left: auto; padding: 3px 7px; color: var(--blue); border: 1px solid #32617e; border-radius: 5px; background: #122a40; font-size: 11px; font-weight: 850; overflow-wrap: anywhere; }
.ticker .delta.orange-text { color: var(--orange); border-color: #654830; background: #34251c; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 9px; margin-top: 12px; }
.toolbar .spacer { flex: 1; }
.viewer-toolbar label { display: flex; align-items: center; gap: 8px; }
.viewer-toolbar select { width: auto; max-width: 210px; margin: 0; }

.draft-progress { display: block; width: 100%; height: 6px; margin: 5px 0 16px; border: 0; border-radius: 5px; overflow: hidden; accent-color: var(--blue); }
.draft-progress::-webkit-progress-bar { background: #081321; }
.draft-progress::-webkit-progress-value { background: linear-gradient(90deg,#4697de,var(--blue)); }
.draft-progress::-moz-progress-bar { background: var(--blue); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin: 11px 0; }
.filters button { min-height: 34px; padding: 5px 9px; }
.filters button[aria-pressed=true], .club-tile[aria-pressed=true] { color: var(--blue); background: #17344a; border-color: #6399bd; }
.pool, .log { margin: 0; padding: 0; list-style: none; }
.pool { max-height: 465px; overflow: auto; scrollbar-gutter: stable; }
.pool li, .log li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.pool li small, .log li small { color: var(--muted); }
.pool li button { margin-left: auto; flex: none; }
.log li { justify-content: space-between; }
.log li b { color: var(--blue); font-variant-numeric: tabular-nums; }
.rules { margin-top: 16px; }
.rules table td:last-child { text-align: right; font-weight: 780; }
#clock-form { margin-top: 17px; padding-top: 15px; border-top: 1px solid var(--line); }
.directory .form-grid { margin-top: 17px; }
.club-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(58px,1fr)); gap: 7px; }
.club-tile { display: grid; place-items: center; gap: 3px; padding: 6px; font-size: 10px; }
.club-tile .nfl-icon { width: 30px; height: 30px; }
.directory-table { max-height: 620px; overflow: auto; border: 1px solid var(--line-soft); border-radius: 8px; }
.directory-table thead { position: sticky; top: 0; background: #192b44; }
.directory-table td, .directory-table th { padding-inline: 8px; }

#player-dialog, #branding { max-height: calc(100dvh - 28px); border: 1px solid #526b8b; border-top: 2px solid var(--blue); border-radius: 14px; color: var(--ink); background: #132138; box-shadow: 0 15px 50px #01040ab0; padding: 20px; }
#player-dialog { width: min(390px,calc(100% - 26px)); }
#branding { width: min(550px,calc(100% - 26px)); }
#player-dialog::backdrop, #branding::backdrop { background: #030811cc; }
#player-dialog form { float: right; }
#player-dialog h2, #branding h2 { margin: 5px 0; letter-spacing: -.035em; }
#player-dialog p, #branding p { color: var(--muted); font-size: 13px; }
#player-dialog dl { display: grid; grid-template-columns: 1fr auto; gap: 8px; font-size: 13px; }
#player-dialog dd { margin: 0; font-weight: 800; }
.dialog-points { color: var(--blue); font-size: 34px; font-weight: 850; letter-spacing: -.04em; }
.dialog-points small { color: var(--muted); font-size: 12px; letter-spacing: 0; }
#branding fieldset { min-width: 0; margin: 0; padding: 9px; border: 1px solid #3d5776; border-radius: 8px; }
#branding fieldset label+label { margin-top: 9px; }
#branding .blue-team { --accent: var(--blue); }
#branding .orange-team { --accent: var(--orange); }
#branding legend { color: var(--accent); font-weight: 850; }
#branding .brand-sample { display: grid; place-items: center; height: 36px; }
#branding .brand-sample .fantasy-mark { width: 30px; height: 30px; }
#branding input[type=file] { padding: 5px; font-size: 11px; }
#blitz-alert {
  --touchdown-accent: var(--blue);
  display: none; position: fixed; bottom: max(18px,env(safe-area-inset-bottom)); left: 50%; z-index: 3;
  width: min(550px,calc(100% - 24px)); overflow: hidden; isolation: isolate; pointer-events: none;
  padding: 14px 19px; border: 1px solid var(--touchdown-accent); border-radius: 13px;
  background: radial-gradient(ellipse at 0 0,color-mix(in srgb,var(--touchdown-accent) 24%,#101a2b),#101a2b 75%);
  box-shadow: 0 10px 34px #000a; text-align: center; transform: translateX(-50%);
}
#blitz-alert[data-side=orange] { --touchdown-accent: var(--orange); }
#blitz-alert[data-side=both] { --touchdown-accent: #dbe4ff; }
#blitz-alert.visible { display: grid; gap: 2px; animation: touchdown-in 470ms cubic-bezier(.19,.75,.25,1) both; }
#blitz-alert.visible::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(112deg,transparent 29%,#fff3 50%,transparent 69%);
  animation: touchdown-sweep 1050ms ease-out both;
}
#blitz-alert strong {
  color: var(--touchdown-accent); font-size: clamp(24px,5vw,35px); line-height: 1.1; font-weight: 900;
  letter-spacing: .08em; text-transform: uppercase;
}
#blitz-touchdown-play { color: var(--ink); font-size: 13px; overflow-wrap: anywhere; }
@keyframes touchdown-in {
  from { opacity: 0; transform: translate(-50%,18px) scale(.96); }
  to { opacity: 1; transform: translate(-50%,0) scale(1); }
}
@keyframes touchdown-sweep {
  from { transform: translateX(-110%); }
  to { transform: translateX(110%); }
}
.draft-feed { min-width: 0; margin: 0 0 18px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; }
.draft-feed legend { padding-inline: 5px; color: var(--blue); font-weight: 760; }
.draft-feed p { margin: 0 0 10px; }
#draft-games-status { margin-left: 6px; }

@media (max-width: 940px) {
  .top, .shell { width: calc(100% - 32px); }
  .top { grid-template-columns: 1fr auto auto; gap: 10px; }
  nav a, nav button { padding-inline: 8px; }
  .side { align-items: flex-start; flex-direction: column; gap: 6px; }
  .side.right { align-items: flex-end; flex-direction: column; }
}
@media (max-width: 650px) {
  .top, .shell { width: calc(100% - 24px); }
  .top { grid-template-columns: minmax(0,1fr) auto; padding-block: 10px; }
  .top nav { grid-row: 2; grid-column: 1/-1; }
  nav a, nav button { flex: 1; min-height: 36px; padding-inline: 4px; font-size: 11px; }
  .brand { gap: 8px; }
  .brand img { width: 37px; height: 37px; border-radius: 9px; }
  .brand strong { font-size: 12px; }
  .brand span, .mode small { font-size: 8px; }
  .mode { font-size: 9px; }
  .shell { padding-top: 12px; }
  .entry-layout { grid-template-columns: 1fr; gap: 12px; margin-top: 8px; }
  .join-card { grid-row: 1; }
  .entry-intro { min-height: 0; padding: 21px; }
  .entry-copy h1 { font-size: clamp(26px,7vw,38px); }
  .entry-copy p { font-size: 13px; }
  .cards, .split { grid-template-columns: 1fr; gap: 10px; }
  .scoreline { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; padding: 13px 9px; }
  .team { padding-left: 6px; }
  .right .team { padding-right: 6px; }
  .team h2 { font-size: clamp(14px,4vw,23px); }
  .team p { font-size: 10px; }
  .big { font-size: clamp(30px,8.6vw,52px); }
  .score-caption { font-size: 8px; }
  .clock strong { padding: 4px 5px; font-size: 10px; }
  .clock span, .clock small { font-size: 9px; }
  .ticker { flex-wrap: wrap; gap: 5px 8px; padding: 7px 9px; }
  .ticker .latest-text { flex: 1 1 130px; }
  .toolbar .spacer { display: none; }
  .host-access { padding: 11px; }
  .host-actions { flex-basis: 100%; }
  .table-wrap { padding-inline: 5px; }
  th, td { padding-inline: 4px; }
  .directory-table th, .directory-table td { padding-inline: 4px; }
  .directory-table td:last-child { font-size: 10px; overflow-wrap: anywhere; }
}
@media (max-width: 370px) {
  .mode small { display: none; }
  .roster-club-cell .nfl-icon { display: none; }
  .card th:nth-child(4) { width: 35%; }
  #branding .form-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  #blitz-alert.visible, #blitz-alert.visible::before { animation: none; }
}
