/* Shared pieces: type, buttons, chips, team badges, the game card, skeletons. */
.eyebrow { font: 700 var(--fs-xs)/1.2 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.h1 { font: 800 var(--fs-h1)/1.02 var(--display); letter-spacing: .015em; margin: 0; }
.h2 { font: 800 var(--fs-h2)/1.05 var(--display); letter-spacing: .02em; margin: 0; }
.h3 { font: 700 var(--fs-h3)/1.1 var(--display); letter-spacing: .03em; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- buttons ---------- */
.btn {
  min-height: var(--tap); padding: 0 16px; border-radius: var(--r); border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--text); font-weight: 600; font-size: var(--fs); text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast), background var(--t-fast);
}
.btn:hover { border-color: var(--line-3); color: var(--text); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.btn.primary:hover { box-shadow: 0 0 22px var(--accent-glow); color: var(--accent-ink); }
.btn.ghost { background: none; }
.btn[disabled] { opacity: .55; cursor: progress; }
/* A main button that can't be pressed yet turns grey instead of a muddy half-volt (POL-1 pass 7);
   one that's busy working keeps its color, dimmed. */
.btn.primary[disabled]:not(.busy) { opacity: 1; background: var(--surface-3); border-color: var(--line-2); color: var(--muted); box-shadow: none; }

/* ---------- chips and pills ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: var(--r-pill);
  background: rgba(10, 14, 21, .66); border: 1px solid rgba(255, 255, 255, .12); color: var(--text-2);
  font: 600 var(--fs-xs)/1 var(--body); white-space: nowrap;
}
.chip svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.chip.warn { color: var(--close); border-color: rgba(255, 193, 77, .38); }
.chip.cold { color: #A9DBFF; border-color: rgba(169, 219, 255, .35); }
.pill-live {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 7px; border-radius: var(--r-xs);
  background: var(--live-ink); color: #fff; font: 800 var(--fs-xs)/1 var(--display); letter-spacing: .12em; text-transform: uppercase;
}
.pill-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: nx-pulse 1.6s ease-in-out infinite; }
.pill-final { padding: 3px 8px; border-radius: var(--r-xs); background: rgba(244, 247, 250, .14); color: var(--text);
  font: 800 var(--fs-xs)/1 var(--display); letter-spacing: .12em; }
@keyframes nx-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .pill-live::before { animation: none; } }

/* ---------- team badge (our own: shield or roundel, team colors, abbreviation) ---------- */
.badge { display: block; flex: none; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .45)); }
.badge text { font-family: var(--display); font-weight: 800; letter-spacing: .02em; }

/* ---------- game card ---------- */
.gc {
  position: relative; display: block; overflow: hidden; isolation: isolate; text-decoration: none; color: var(--text);
  border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow); min-height: 168px;
  transition: transform var(--t) var(--ease), border-color var(--t) var(--ease);
}
.gc:hover { border-color: var(--line-3); color: var(--text); }
.gc:active { transform: scale(.992); }
.gc-poster, .gc-still { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; display: block; }
/* The 3D studio's still fades in over the poster (same box, so nothing moves). */
.gc-still { opacity: 0; transition: opacity 420ms var(--ease); }
.gc-still.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .gc-still { transition: none; } }
/* V-4: the moving weather (rain, snow, wind streaks) over the still, under the shade, so text keeps its contrast. */
.gc-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; display: block; pointer-events: none;
  opacity: 0; transition: opacity 420ms var(--ease); }
.gc-fx.on { opacity: 1; }
/* The wind chip's compass: north (the tick) and where the wind blows to (the arrow), as drawn in the picture. */
.chip svg.compass { width: 16px; height: 16px; }
.chip svg.compass circle { stroke-width: 1.4; opacity: .55; }
.chip svg.compass .north { fill: currentColor; stroke: none; }
.chip svg.compass .arrow { stroke-width: 2.2; }
/* Text for screen readers only (the scenes' text alternative). */
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.gc-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(5, 7, 11, .62) 0%, rgba(5, 7, 11, .46) 34%, rgba(5, 7, 11, .72) 70%, rgba(5, 7, 11, .94) 100%),
    linear-gradient(90deg, rgba(5, 7, 11, .45), rgba(5, 7, 11, 0) 30%, rgba(5, 7, 11, 0) 70%, rgba(5, 7, 11, .45));
}
.gc-body { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; min-height: inherit; padding: 14px 16px 14px; }
.gc-top { display: flex; align-items: center; gap: 8px; min-height: 26px; }
.gc-league { font: 800 var(--fs-xs)/1 var(--display); letter-spacing: .16em; color: var(--text-2);
  padding: 4px 7px; border-radius: var(--r-xs); background: rgba(5, 7, 11, .55); border: 1px solid rgba(255, 255, 255, .1); }
/* hero before kickoff: AWAY  time  HOME */
.gc-board { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; }
.gc-side { display: flex; align-items: center; gap: 12px; min-width: 0; }
.gc-side.home { flex-direction: row-reverse; text-align: right; }
.gc-team { min-width: 0; }
.gc-abbr { font: 800 26px/1 var(--display); letter-spacing: .03em; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
/* Full names wrap to a second line rather than being cut ("Green Bay Pa…"), POL-1 pass 3. */
.gc-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  font: 500 var(--fs-sm)/1.25 var(--body); color: var(--text-2); overflow-wrap: anywhere;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.gc-mid { text-align: center; min-width: 72px; }
.gc-time { display: block; font: 800 var(--fs-xl)/1 var(--display); letter-spacing: .03em; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); white-space: nowrap; }
.gc-count { display: block; margin-top: 4px; font: 600 var(--fs-xs)/1.2 var(--body); color: var(--text-2); white-space: nowrap; }
/* every other card: a scoreboard row per team */
.gc-rows { display: grid; gap: 8px; }
.gc-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; column-gap: 10px; }
.gc-row .gc-abbr { min-width: 2.15em; }
.gc-row .gc-name { display: -webkit-box; }
@media (max-width: 479px) { .gc-hero .gc-row .gc-city { display: none; } }  /* the hero's big score leaves room for "at Eagles" only */
.gc-at { color: var(--text-2); font-weight: 400; }  /* as bright as the name (it sits over the stadium too), lighter weight */
.gc-score { font: 800 36px/.9 var(--display); font-variant-numeric: tabular-nums; text-align: right; min-width: 1.6em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .6); }
.gc-row.lost .gc-abbr, .gc-row.lost .gc-score { color: var(--muted); }
.gc-state { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; text-align: right; }
.gc-state .gc-time { font-size: var(--fs-h3); }
.gc-state .gc-count { margin-top: 0; }
.gc-clock { font: 800 var(--fs-lg)/1 var(--display); letter-spacing: .04em; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
.gc-lines { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gc-venue { font: 500 var(--fs-xs)/1.3 var(--body); color: var(--text-2); text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.gc[data-state="live"] { border-color: rgba(255, 77, 94, .45); }
.gc[data-state="final"] .gc-shade { background: linear-gradient(180deg, rgba(5, 7, 11, .55), rgba(5, 7, 11, .9)); }

.gc-hero { min-height: 268px; border-radius: var(--r-lg); }
.gc-hero .gc-body { padding: 18px; }
.gc-hero .gc-abbr { font-size: 36px; }
.gc-hero .gc-time { font-size: 30px; }
.gc-hero .gc-score { font-size: 52px; }
.gc-hero .gc-rows { gap: 12px; }
@media (min-width: 768px) {
  .gc-hero { min-height: 340px; }
  .gc-hero .gc-body { padding: 24px 28px; }
  .gc-hero .gc-abbr { font-size: 44px; }
  .gc-hero .gc-score { font-size: 64px; }
  .gc-hero .gc-time { font-size: 38px; }
  .gc-hero .gc-name { font-size: var(--fs-sm); }
}

.gc-compact { min-height: 0; border-radius: var(--r); }
.gc-compact .gc-body { padding: 10px 14px 12px; gap: 8px; }
.gc-compact .gc-abbr { font-size: var(--fs-h3); }
.gc-compact .gc-score { font-size: 24px; }
.gc-compact .gc-rows { gap: 6px; }

/* ---------- loading and empty ---------- */
.sk { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 40%, var(--surface) 80%); background-size: 200% 100%;
  animation: nx-shimmer 1.4s linear infinite; border-radius: var(--r); }
.sk-line { height: 18px; margin: 6px 0 18px; border-radius: var(--r-xs); }
.sk-line.w40 { width: 40%; }
.sk-card { height: 176px; margin-bottom: var(--gap); border-radius: var(--r-lg); }
@keyframes nx-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }

.nx-note { padding: 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.nx-empty { padding: 28px 20px; text-align: center; border-radius: var(--r-lg); border: 1px dashed var(--line-2); color: var(--text-2); }
.nx-empty .h3 { margin-bottom: 6px; color: var(--text); }
.nx-err { padding: 14px 16px; border-radius: var(--r); background: rgba(255, 138, 138, .08); border: 1px solid rgba(255, 138, 138, .35); color: var(--text); }
/* The problem card (ui/problem.js): a title with its icon, the sentence, and Try again. */
.nx-err[data-problem] { display: grid; gap: 6px; padding: 18px; max-width: 560px; }
.nx-err-h { display: flex; align-items: center; gap: 10px; font: 800 var(--fs-h3)/1.1 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.nx-err-i { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--bad); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nx-err-m { margin: 0; color: var(--text-2); }
.nx-err .actions { margin-top: 8px; }
.nx-err-busy, .nx-err-offline { background: var(--surface); border-color: var(--line-2); }
.nx-err-busy .nx-err-i { stroke: var(--close); }
.nx-err-offline .nx-err-i { stroke: var(--muted); }
.nx-err .btn[disabled] { cursor: default; opacity: .7; font-variant-numeric: tabular-nums; }
/* Phones: the hero's kickoff time sits above the two teams instead of between them. */
@media (max-width: 599px) {
  .gc-versus .gc-board { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 14px; }
  .gc-versus .gc-mid { grid-column: 1 / -1; order: -1; }
}

/* ---------- game card facts (V-2): edges here, the line, injuries, your picks ---------- */
.gc-facts { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .1); }
.gf { display: inline-block; min-height: 26px; white-space: nowrap; padding: 5px 9px; border-radius: var(--r-sm);
  background: rgba(5, 7, 11, .62); border: 1px solid rgba(255, 255, 255, .1); font: 600 var(--fs-xs)/1.25 var(--body); color: var(--text-2); }
.gf b { font: 800 var(--fs)/1 var(--display); letter-spacing: .02em; color: inherit; margin-right: 1px; }
.gf-age { color: var(--muted); font-weight: 500; }
.gf.edge { color: var(--accent); border-color: rgba(198, 244, 50, .45); background: rgba(10, 14, 6, .74); }
.gf.edge .gf-age { color: #B8C7A0; }
.gf.none { color: var(--muted); }
.gf.mine { color: var(--over); border-color: rgba(124, 196, 255, .35); }
.gf.rec { color: var(--text); }
.gc-compact .gc-facts { padding-top: 8px; }

/* ---------- sheet (V-7: the pick sheet; phones: full height from the bottom; desktop: a 440px panel) ---------- */
.sh-open, .sh-open body { overflow: hidden; }
.sh-scrim { position: fixed; inset: 0; z-index: 60; background: rgba(2, 4, 8, .62); opacity: 0; transition: opacity var(--t) var(--ease); }
.sh-scrim.on { opacity: 1; }
.sh { position: fixed; z-index: 61; left: 0; right: 0; bottom: 0; top: max(env(safe-area-inset-top), 10px);
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line-2); border-bottom: 0;
  border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: 0 -24px 60px -20px rgba(0, 0, 0, .8); outline: none;
  transform: translateY(100%); transition: transform var(--t) var(--ease); }
.sh.on { transform: none; }
.sh-bar { position: absolute; z-index: 3; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 10px; min-height: 60px;
  padding: 10px 10px 6px var(--pad); border-radius: inherit; border-bottom: 1px solid transparent; touch-action: none; cursor: grab;
  transition: border-color var(--t-fast), background var(--t-fast); }
.sh-bar.scrolled { background: var(--surface); border-bottom-color: var(--line); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
/* Until the sheet scrolls the bar is see-through and lies over the sheet's own head (a pick's
   Follow button): it lets taps through there, keeping only the close button and the handle's
   strip along the top edge, where a swipe down closes the sheet (V-15). */
.sh-bar:not(.scrolled) { pointer-events: none; }
.sh-bar .sh-close, .sh-handle { pointer-events: auto; }
.sh-handle { position: absolute; top: 0; left: 0; right: 0; height: 22px; display: flex; justify-content: center; padding-top: 6px; }
.sh-handle span { display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line-3); }
.sh-title { flex: 1; min-width: 0; padding-top: 6px; font: 700 var(--fs)/1.2 var(--display); letter-spacing: .04em; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity var(--t-fast); }
.sh-bar.scrolled .sh-title { opacity: 1; }
.sh-close { flex: none; margin-left: auto; width: var(--tap); height: var(--tap); display: grid; place-items: center; cursor: pointer;
  border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); }
.sh-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.sh-close:hover { border-color: var(--line-3); }
.sh-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 26px var(--pad) calc(24px + env(safe-area-inset-bottom)); }
@media (min-width: 1024px) {
  .sh { left: auto; top: 0; width: 440px; border-radius: var(--r-lg) 0 0 var(--r-lg); border-bottom: 1px solid var(--line-2); border-right: 0;
    transform: translateX(100%); box-shadow: -24px 0 60px -20px rgba(0, 0, 0, .8); }
  .sh-handle { display: none; }
  .sh-bar { cursor: default; }
  .sh-body { padding-top: 18px; }
}
@media (prefers-reduced-motion: reduce) { .sh, .sh-scrim { transition: none; } }
.sh-open .nx-toast { z-index: 70; }

/* ---------- drop-downs (POL-1): our own arrow instead of the browser's ---------- */
select:not([multiple]):not([size]) {
  -webkit-appearance: none; appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239AA7B6' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 14px 14px;
}
select:not([multiple]):not([size]):hover { border-color: var(--line-3); }
select option { background: var(--surface-2); color: var(--text); }
.nowrap { white-space: nowrap; }
