/* dAImond Inning production UI */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Sora:wght@400;500;600;700&display=swap');

:root {
  --font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-display: 'Sora', var(--font-sans);

  --fs-12: 0.75rem;
  --fs-13: 0.8125rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-24: 1.5rem;
  --tracking-wider: 0.08em;

  --bg: #fafafa;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f6f8;
  --surface-3: #edf0f4;
  --border: #e1e5ea;
  --border-strong: #c5ccd6;
  --divider: #eef1f4;

  --text: #101318;
  --text-2: #2f3742;
  --text-muted: #5b6472;
  --text-faint: #8a93a0;

  --accent: #0875d1;
  --accent-hover: #0667b8;
  --accent-soft: rgba(8, 117, 209, 0.10);
  --accent-fg: #ffffff;

  --green: #168a4a;
  --green-soft: rgba(22, 138, 74, 0.12);
  --yellow: #9b6a00;
  --yellow-soft: rgba(183, 126, 0, 0.15);
  --run-scored: #0875d1;
  --run-scored-soft: rgba(8, 117, 209, 0.12);
  --red: #c2342b;
  --red-soft: rgba(194, 52, 43, 0.12);

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;

  --shadow-1: 0 1px 2px rgba(14, 20, 30, 0.06);
  --shadow-2: 0 10px 30px rgba(14, 20, 30, 0.10), 0 2px 8px rgba(14, 20, 30, 0.05);
  --shadow-pop: 0 18px 50px rgba(14, 20, 30, 0.18), 0 4px 14px rgba(14, 20, 30, 0.08);

  --accent-hue: 245;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --tracking-snug: 0;
  --tracking-wide: 0;

  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.25rem;
  --s-6: 1.5rem;
  --s-8: 2rem;
  --s-10: 2.5rem;
  --s-12: 3rem;

  --appbar-h: 96px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  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;
}

.mono,
.session-id,
.eyebrow,
.drop-kicker,
.stage-item span,
.row-num,
.order-num,
.dcell__meta,
.review-loc,
.review-conf,
.sb-label,
.inn-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.ai {
  color: var(--accent);
}

/* Shared chrome */
.appbar,
.navbar {
  width: min(100% - 32px, 1400px);
  margin: 0 auto;
  align-items: center;
  gap: var(--s-4);
  padding-inline: clamp(24px, 4vw, 56px);
  border-bottom: 1px solid var(--border);
}
.navbar {
  display: flex;
  justify-content: space-between;
  height: 64px;
}
.appbar {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(140px, 1fr);
  padding-block: clamp(10px, 1.2vw, 16px);
}

.appbar--public {
  grid-template-columns: minmax(220px, 0.9fr) auto minmax(440px, 1.1fr);
  column-gap: clamp(18px, 2.4vw, 34px);
}

.appbar--public > .brand,
.appbar--public > .appbar-brand-group {
  grid-column: 1;
}

.appbar--public > .appbar-scoreboard-group {
  grid-column: 2;
}

.appbar--public > .appbar-actions--public {
  grid-column: 3;
}

.appbar-brand-group {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-self: start;
  min-width: 0;
  gap: 6px;
}

.brand-tagline {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-top: 6px;
  border-top: 1px solid var(--border);
  align-self: stretch;
}

.appbar-scoreboard-group {
  display: grid;
  justify-items: center;
  gap: 4px;
  justify-self: center;
}

.appbar-actions {
  grid-column: 3;
  justify-self: end;
}

.appbar-actions--public {
  gap: clamp(10px, 1.2vw, 14px);
  flex-wrap: nowrap;
}

.appbar-main-nav,
.appbar-auth {
  display: inline-flex;
  align-items: center;
  gap: clamp(10px, 1.2vw, 14px);
}

.appbar-actions--public .appbar-auth {
  gap: clamp(12px, 1.4vw, 16px);
}

/* While the Supabase session is being checked, hide both signed-in and
   signed-out controls (space reserved, no layout shift) so a logged-in user
   never sees the login buttons flash before their profile menu appears. */
#appbarAuth.is-auth-resolving [data-auth] {
  visibility: hidden;
}

.account-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.account-menu__button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 3px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease, transform 140ms ease;
}

.account-menu__button:hover,
.account-menu__button[aria-expanded="true"] {
  border-color: rgba(15, 23, 42, 0.22);
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.11);
}

.account-menu__button::after {
  content: attr(aria-label);
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  z-index: 90;
  width: max-content;
  max-width: 180px;
  padding: 6px 8px;
  border-radius: 7px;
  background: #17211b;
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translate(-35%, -2px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.account-menu__button:hover::after,
.account-menu__button:focus-visible::after {
  opacity: 1;
  transform: translate(-35%, 0);
}

.account-menu__button[aria-expanded="true"]::after {
  opacity: 0;
}

.account-menu__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  background: #315f54;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    0 0 0 1px rgba(15, 23, 42, 0.08);
}

.account-menu__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-menu__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 80;
  width: min(286px, calc(100vw - 28px));
  padding: 9px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  background: var(--surface);
  box-shadow:
    0 22px 50px rgba(15, 23, 42, 0.16),
    0 2px 8px rgba(15, 23, 42, 0.08);
}

.account-menu__identity {
  display: grid;
  gap: 3px;
  padding: 11px 12px 13px;
}

.account-menu__identity strong {
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.2;
}

.account-menu__identity span {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.25;
  word-break: break-word;
}

.account-menu__section {
  display: grid;
  gap: 1px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}

.account-menu__item {
  appearance: none;
  width: 100%;
  min-height: 40px;
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.account-menu__item:hover {
  background: #f5f7f6;
  color: var(--text);
  text-decoration: none;
}

.account-menu__icon {
  width: 18px;
  height: 18px;
  color: #4b5563;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  justify-self: center;
}

.account-menu__item--danger {
  color: #9f1d20;
}

.account-menu__item--danger .account-menu__icon {
  color: #9f1d20;
}

.appbar-actions--public .appbar-main-nav {
  padding-left: clamp(10px, 1vw, 12px);
  border-left: 1px solid var(--border);
}

/* Persistent cross-area nav (signed-in app pages) */
.appbar-area-nav {
  display: inline-flex;
  align-items: center;
  gap: clamp(2px, 0.6vw, 8px);
  margin-right: clamp(8px, 1vw, 14px);
}

.appbar-area-nav__item {
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  transition: background 120ms ease, color 120ms ease;
}

.appbar-area-nav__item:hover {
  background: #f5f7f6;
  color: var(--text);
}

.appbar-area-nav__item[aria-current="page"] {
  color: var(--text);
  background: #eef2f0;
}

.appbar-area-nav__item--locked {
  opacity: 0.6;
}

.appbar-area-nav__item--locked::after {
  content: " \1F512";
  font-size: 11px;
}

/* Plan chip in the account menu identity block */
.appbar-plan-chip {
  justify-self: start;
  margin-top: 5px;
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 2px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f5f7f6;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
}

.appbar-plan-chip--upgrade {
  color: #2f5a4f;
  border-color: #cfe0d9;
  background: #eef5f2;
}

.appbar-plan-chip--upgrade:hover {
  background: #e3efe9;
}

/* Sign-out confirmation toast (index.html) */
.signedout-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 14px);
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 10px;
  background: #17211b;
  color: #fff;
  font-size: 14px;
  font-weight: 650;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
}

.signedout-toast--in {
  opacity: 1;
  transform: translate(-50%, 0);
}

.appbar-main-nav a,
.nav-login {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.appbar-main-nav a {
  padding: 11px 0;
}

.nav-login {
  color: var(--text);
}

.appbar-actions--public .nav-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
}

.appbar-actions--public .btn--primary {
  min-width: 132px;
}

.appbar-actions--public .btn {
  min-height: 42px;
  padding: 10px 18px;
  font-size: 14px;
}

.appbar-main-nav a:hover,
.nav-login:hover {
  color: var(--text);
  text-decoration: none;
}

.appbar-actions--public .nav-login:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text);
}

.appbar-main-nav a[aria-current="page"] {
  color: var(--text);
}

.brand,
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.brand:hover,
.logo:hover {
  text-decoration: none;
}

.brand--static {
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  color: var(--text-muted);
}

.brand-mark svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
}

.brand-mark path:last-child {
  fill: var(--accent);
  stroke: var(--accent);
}

/* ===== Brand lockup (appbar) =====
   Manual scoreboard animation, built by /static/js/brand-equation.js. */
.brand--lockup {
  position: relative;
  align-items: center;
  gap: clamp(10px, 1.2vw, 16px);
}

.scoreboard-brand {
  --scoreboard-green: #52683d;
  --scoreboard-green-top: #60754a;
  --scoreboard-green-dark: #3f502f;
  --scoreboard-grid: rgba(248, 248, 238, 0.9);
  --scoreboard-plate: #303f29;
  --scoreboard-plate-low: #26331f;
  --scoreboard-letter: #f6f4e9;
  --scoreboard-blue: #2495de;
  --scoreboard-logo-blue: #2495de;
  --scoreboard-tile-w: 22px;
  --scoreboard-tile-top-h: 24px;
  --scoreboard-tile-h: 24px;
  --scoreboard-logo-w: calc(var(--scoreboard-tile-w) + var(--scoreboard-tile-w) + 2px);
  --scoreboard-logo-h: calc(var(--scoreboard-tile-h) + var(--scoreboard-tile-h) + 4px);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 2px solid var(--scoreboard-grid);
  border-radius: var(--radius-xs);
  background: linear-gradient(180deg, var(--scoreboard-green-top), var(--scoreboard-green));
  box-shadow:
    inset 0 0 0 1px rgba(248, 248, 238, 0.22),
    inset 0 12px 22px rgba(248, 248, 238, 0.08),
    0 2px 5px rgba(40, 50, 30, 0.18);
  color: var(--scoreboard-letter);
  font-family: var(--font-mono);
  letter-spacing: 0;
  line-height: 1;
  text-decoration: none;
}

.scoreboard-brand::before,
.scoreboard-brand::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  height: 1px;
  background: var(--scoreboard-grid);
  opacity: 0.72;
  pointer-events: none;
}

.scoreboard-brand::before { display: none; }
.scoreboard-brand::after { display: none; }

.scoreboard-brand__copy {
  display: grid;
  gap: 4px;
  align-items: start;
}

.scoreboard-brand__row {
  display: flex;
  align-items: center;
  gap: 2px;
}

.scoreboard-brand__row--main {
  min-height: var(--scoreboard-tile-h);
}

.scoreboard-brand__row--top,
.scoreboard-brand__row--prompt {
  min-height: var(--scoreboard-tile-top-h);
}

.scoreboard-brand__row--top {
  margin-bottom: 1px;
}

.scoreboard-tile {
  position: relative;
  display: inline-block;
  width: var(--scoreboard-tile-w);
  height: var(--scoreboard-tile-h);
  overflow: hidden;
}

.scoreboard-brand__row--top .scoreboard-tile,
.scoreboard-brand__row--prompt .scoreboard-tile {
  height: var(--scoreboard-tile-top-h);
}

.scoreboard-tile--space {
  width: var(--scoreboard-tile-w);
}

.scoreboard-tile__inner {
  position: absolute;
  inset: 0;
  transform: translateZ(0);
  transform-origin: 50% 50%;
  transform-style: flat;
  will-change: transform;
}

.scoreboard-tile.is-flipping .scoreboard-tile__inner {
  animation: scoreboard-panel-flip 430ms cubic-bezier(.24, .72, .24, 1) both;
  animation-delay: var(--flip-delay, 0ms);
}

.scoreboard-tile__face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(9, 14, 8, 0.72);
  border-radius: 1px;
  background: linear-gradient(180deg, var(--scoreboard-plate), var(--scoreboard-plate-low));
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.48),
    inset 2px 0 3px rgba(0, 0, 0, 0.26),
    inset -1px 0 0 rgba(248, 248, 238, 0.06),
    inset 0 -1px 0 rgba(248, 248, 238, 0.08);
  backface-visibility: hidden;
  color: var(--scoreboard-letter);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.scoreboard-brand__row--top .scoreboard-tile__face {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  font-size: 18px;
  font-weight: 800;
}

.scoreboard-brand__row--top .scoreboard-tile--space .scoreboard-tile__face {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.scoreboard-brand__row--prompt .scoreboard-tile__face {
  font-size: 20px;
  font-weight: 800;
}

.scoreboard-tile__face--accent {
  color: var(--scoreboard-blue);
}

.scoreboard-tile__back {
  display: none;
}

.scoreboard-tile--space .scoreboard-tile__face {
  color: transparent;
}

.scoreboard-tile-glyph {
  width: 1.05em;
  height: 1.05em;
  color: currentColor;
  display: block;
}

.scoreboard-brand__logo-stack {
  display: grid;
  grid-template-rows: var(--scoreboard-tile-top-h) var(--scoreboard-logo-h);
  gap: 9px;
}

.scoreboard-logo-spacer {
  display: block;
  width: var(--scoreboard-logo-w);
  height: var(--scoreboard-tile-top-h);
  border: 1px solid rgba(9, 14, 8, 0.72);
  border-radius: 1px;
  background: linear-gradient(180deg, var(--scoreboard-plate), var(--scoreboard-plate-low));
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.48),
    inset 2px 0 3px rgba(0, 0, 0, 0.26),
    inset -1px 0 0 rgba(248, 248, 238, 0.06),
    inset 0 -1px 0 rgba(248, 248, 238, 0.08);
}

.scoreboard-logo-spacer--top {
  visibility: hidden;
}

.scoreboard-brand__logo {
  position: relative;
  width: var(--scoreboard-logo-w);
  height: var(--scoreboard-logo-h);
  overflow: hidden;
}

.scoreboard-brand__logo::before,
.scoreboard-brand__logo::after {
  content: "";
  position: absolute;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
}

.scoreboard-brand__logo::before {
  top: 27%;
  right: 22%;
  width: 10px;
  height: 1.5px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.84), transparent);
  filter:
    drop-shadow(0 0 2px rgba(255, 255, 255, 0.58))
    drop-shadow(0 0 5px rgba(143, 211, 255, 0.34));
  transform: rotate(42deg) translateX(-4px);
}

.scoreboard-brand__logo::after {
  top: 19%;
  right: 20%;
  width: 9px;
  height: 9px;
  background:
    linear-gradient(90deg, transparent 0 40%, #fff9d7 45% 55%, transparent 60% 100%) center / 100% 100% no-repeat,
    linear-gradient(0deg, transparent 0 40%, #fff9d7 45% 55%, transparent 60% 100%) center / 100% 100% no-repeat,
    linear-gradient(45deg, transparent 0 43%, rgba(255, 255, 255, 0.78) 47% 53%, transparent 57% 100%) center / 100% 100% no-repeat,
    radial-gradient(circle, rgba(255, 255, 255, 0.96) 0 14%, rgba(255, 249, 215, 0.58) 18% 30%, transparent 36%);
  filter:
    drop-shadow(0 0 2px rgba(255, 255, 255, 0.74))
    drop-shadow(0 0 5px rgba(143, 211, 255, 0.42));
  transform: scale(0.28) rotate(-12deg);
}

.scoreboard-brand__logo.is-diamond-glinting::before {
  animation: scoreboard-logo-light-sweep 1250ms cubic-bezier(.2, .72, .18, 1) both;
}

.scoreboard-brand__logo.is-diamond-glinting::after {
  animation: scoreboard-logo-starburst 1250ms cubic-bezier(.2, .72, .18, 1) both;
}

.scoreboard-brand__logo.is-diamond-glint-visible::before {
  opacity: 0.28 !important;
}

.scoreboard-brand__logo.is-diamond-glint-visible::after {
  opacity: 0.66 !important;
}

.scoreboard-brand__logo.is-diamond-glint-visible .scoreboard-logo-svg__glint-star {
  opacity: 0.62 !important;
  transform: scale(0.68) rotate(0deg);
}

.scoreboard-brand__logo.is-diamond-glint-visible .scoreboard-logo-svg__glint-sweep {
  opacity: 0.14 !important;
  stroke-dashoffset: 0;
}

.scoreboard-brand__logo.is-diamond-glint-visible .scoreboard-logo-svg__logo-stone,
.scoreboard-brand__logo.is-diamond-glint-visible .scoreboard-logo-svg__gem-table {
  filter:
    brightness(1.16)
    drop-shadow(0 0 2px rgba(255, 255, 255, 0.34))
    drop-shadow(0 0 5px rgba(143, 211, 255, 0.28));
}

.scoreboard-logo__inner {
  position: absolute;
  inset: 0;
  transform: translateZ(0);
  transform-origin: 50% 50%;
  transform-style: flat;
  will-change: transform;
}

.scoreboard-brand__logo.is-flipping .scoreboard-logo__inner {
  animation: scoreboard-panel-flip 480ms cubic-bezier(.24, .72, .24, 1) both;
}

.scoreboard-logo__face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(9, 14, 8, 0.72);
  border-radius: 1px;
  background: linear-gradient(180deg, var(--scoreboard-plate), var(--scoreboard-plate-low));
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.48),
    inset 2px 0 3px rgba(0, 0, 0, 0.26),
    inset -1px 0 0 rgba(248, 248, 238, 0.06),
    inset 0 -1px 0 rgba(248, 248, 238, 0.08);
  backface-visibility: hidden;
}

.scoreboard-logo__back {
  display: none;
}

.scoreboard-logo-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--scoreboard-letter);
}

.scoreboard-logo-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 1px 0 rgba(25, 42, 32, 0.62));
}

.scoreboard-logo-svg__brackets {
  fill: none;
  stroke: var(--scoreboard-letter);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scoreboard-logo-svg__logo-stone {
  fill: var(--scoreboard-logo-blue);
  stroke: var(--scoreboard-logo-blue);
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.scoreboard-logo-svg__gem-base {
  fill: none;
  stroke: var(--scoreboard-letter);
  stroke-width: 1.7;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.scoreboard-logo-svg__gem-table {
  fill: var(--scoreboard-logo-blue);
  stroke: none;
}

.scoreboard-logo-svg__gem-lines {
  fill: none;
  stroke: var(--scoreboard-letter);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scoreboard-logo-svg__glint {
  transform-box: fill-box;
  transform-origin: center;
  filter:
    drop-shadow(0 0 2px rgba(255, 255, 255, 0.72))
    drop-shadow(0 0 5px rgba(143, 211, 255, 0.38));
  pointer-events: none;
}

.scoreboard-logo-svg__glint-star,
.scoreboard-logo-svg__glint-sweep {
  fill: none;
  opacity: 0;
  stroke: #fff9d7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scoreboard-logo-svg__glint-star {
  stroke-width: 1.65;
}

.scoreboard-logo-svg__glint-sweep {
  stroke: rgba(255, 255, 255, 0.56);
  stroke-width: 1.25;
  stroke-dasharray: 11;
  stroke-dashoffset: 11;
}

.scoreboard-brand__logo.is-diamond-glinting .scoreboard-logo-svg__glint-star {
  animation: scoreboard-diamond-spark 1150ms cubic-bezier(.2, .72, .18, 1) both;
}

.scoreboard-brand__logo.is-diamond-glinting .scoreboard-logo-svg__glint-sweep {
  animation: scoreboard-diamond-sweep 1150ms cubic-bezier(.2, .72, .18, 1) both;
}

.scoreboard-brand__logo.is-diamond-glinting .scoreboard-logo-svg__logo-stone,
.scoreboard-brand__logo.is-diamond-glinting .scoreboard-logo-svg__gem-table {
  animation: scoreboard-diamond-glow 1150ms cubic-bezier(.2, .72, .18, 1) both;
}

@keyframes scoreboard-diamond-glow {
  0%, 100% {
    filter: none;
  }
  16%, 42% {
    filter:
      brightness(1.24)
      drop-shadow(0 0 2px rgba(255, 255, 255, 0.42))
      drop-shadow(0 0 5px rgba(143, 211, 255, 0.32));
  }
  68% {
    filter:
      brightness(1.1)
      drop-shadow(0 0 3px rgba(143, 211, 255, 0.2));
  }
}

@keyframes scoreboard-diamond-spark {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.35) rotate(-8deg);
  }
  14%, 34% {
    opacity: 0.68;
    transform: translate(0, 0) scale(0.78) rotate(0deg);
  }
  58% {
    opacity: 0.42;
    transform: translate(0.02em, -0.02em) scale(0.62) rotate(6deg);
  }
  100% {
    opacity: 0;
    transform: translate(0.06em, -0.06em) scale(0.94) rotate(14deg);
  }
}

@keyframes scoreboard-diamond-sweep {
  0% {
    opacity: 0;
    stroke-dashoffset: 11;
  }
  18%, 40% {
    opacity: 0.18;
  }
  66% {
    opacity: 0.1;
    stroke-dashoffset: 0;
  }
  100% {
    opacity: 0;
    stroke-dashoffset: -11;
  }
}

@keyframes scoreboard-logo-starburst {
  0% {
    opacity: 0;
    transform: scale(0.35) rotate(-12deg);
  }
  12%, 42% {
    opacity: 0.62;
    transform: scale(0.82) rotate(0deg);
  }
  66% {
    opacity: 0.32;
    transform: scale(0.66) rotate(8deg);
  }
  100% {
    opacity: 0;
    transform: scale(1.08) rotate(18deg);
  }
}

@keyframes scoreboard-logo-light-sweep {
  0% {
    opacity: 0;
    transform: rotate(42deg) translateX(-5px);
  }
  18%, 48% {
    opacity: 0.3;
  }
  72% {
    opacity: 0.14;
    transform: rotate(42deg) translateX(2px);
  }
  100% {
    opacity: 0;
    transform: rotate(42deg) translateX(5px);
  }
}

@keyframes scoreboard-panel-flip {
  0% { transform: translateZ(0) scaleY(1); }
  48% { transform: translateZ(0) scaleY(0.14); }
  52% { transform: translateZ(0) scaleY(0.14); }
  100% { transform: translateZ(0) scaleY(1); }
}

.brand-stack {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.brand-eyebrow {
  position: absolute;
  top: clamp(-18px, -1.4vw, -12px);
  left: 0;
  right: auto;
  display: inline-grid;
  font-family: var(--font-mono);
  font-size: clamp(13px, 1.05vw, 15px);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: #000;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 320ms ease, transform 320ms ease;
}

.brand-eyebrow__text {
  grid-area: 1 / 1;
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  transform: translateY(3px);
  transition:
    opacity 220ms ease,
    transform 220ms ease,
    clip-path 760ms linear;
}

.brand-stack.is-precious .brand-eyebrow {
  opacity: 1;
  transform: translateY(0);
}

.brand-stack.is-save .brand-eyebrow__text--save,
.brand-stack.is-keep .brand-eyebrow__text--keep {
  opacity: 1;
  transform: translateY(0);
}

.brand-stack.is-writing-eyebrow.is-save .brand-eyebrow__text--save,
.brand-stack.is-save-written .brand-eyebrow__text--save,
.brand-stack.is-writing-eyebrow.is-keep .brand-eyebrow__text--keep,
.brand-stack.is-keep-written .brand-eyebrow__text--keep {
  clip-path: inset(0 0 0 0);
}

.brand-stack.is-erasing-eyebrow .brand-eyebrow__text--save {
  clip-path: inset(0 100% 0 0);
  transition-duration: 220ms, 220ms, 620ms;
}

.brand-words {
  position: relative;
  display: inline-block;
  vertical-align: baseline;
  white-space: nowrap;
  font-size: clamp(20px, 2.1vw, 28px);
  letter-spacing: -0.015em;
  line-height: 1;
}

.brand-mark--lockup {
  width: clamp(34px, 3.2vw, 44px);
  height: clamp(34px, 3.2vw, 44px);
}

.brand-mark--lockup svg {
  width: 100%;
  height: 100%;
}

/* Logo morph: kite-bracket → realistic faceted gem at the Precious Time/Plays
   peak. The two SVGs are stacked; opacity + a small rotate/scale handle
   the transition. */
.brand-mark--morph {
  position: relative;
  display: inline-block;
}

.brand-mark--morph svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  transition: opacity 360ms ease, transform 520ms cubic-bezier(.18, .96, .32, 1.08);
}

/* Kite-bracket logo (corner brackets + inner small diamond) — stays
   visible at all times. The gem just grows on top of it. */
.brand-mark__base {
  opacity: 1;
  transform: none;
}

/* Gem: grows from the center (where the inner small diamond sits). */
.brand-mark__gem {
  opacity: 0;
  transform: translateY(-1px) scale(0.42);
  transform-origin: 50% 46%;
  filter: drop-shadow(0 1px 2px rgba(23, 111, 159, 0.22));
}

.brand-mark--morph.is-gem .brand-mark__gem {
  opacity: 1;
  transform: translateY(-2px) scale(0.78);
}

/* Single traveling pencil. The tip starts on the mark, then grows and
   travels across "Inning" when the cross-out begins. */
.brand-pencil {
  position: absolute;
  top: var(--brand-pencil-top, clamp(8px, 0.9vw, 13px));
  left: var(--brand-pencil-left, clamp(22px, 1.9vw, 31px));
  width: clamp(50px, 4.6vw, 68px);
  height: clamp(17px, 1.6vw, 23px);
  pointer-events: none;
  opacity: 0;
  transform: rotate(-32deg) scale(0.5);
  transform-origin: 6.5% 50%;
  transition:
    opacity 300ms ease,
    transform 980ms cubic-bezier(.22, .84, .26, 1);
  z-index: 5;
  filter: drop-shadow(0 2px 2px rgba(26, 37, 50, 0.16));
}

.brand-pencil svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

/* Resting state: tip planted on the mark, body angled like it is writing. */
.brand-pencil.is-shown {
  opacity: 1;
  transform: rotate(-32deg) scale(0.5);
}

.brand-pencil.is-at-eyebrow-start {
  opacity: 1;
  transition-duration: 260ms;
  transition-timing-function: ease, cubic-bezier(.2, .88, .24, 1);
  transform:
    translate3d(
      var(--brand-pencil-eyebrow-start-x, clamp(4px, 0.3vw, 8px)),
      var(--brand-pencil-eyebrow-start-y, -18px),
      0
    )
    rotate(-16deg)
    scale(0.66);
}

.brand-pencil.is-writing-eyebrow {
  opacity: 1;
  transition-duration: 760ms;
  transition-timing-function: ease, cubic-bezier(.18, .68, .2, 1);
  transform:
    translate3d(
      var(--brand-pencil-eyebrow-x, clamp(48px, 4.4vw, 72px)),
      var(--brand-pencil-eyebrow-y, -18px),
      0
    )
    rotate(-9deg)
    scale(0.68);
}

.brand-pencil.is-at-eyebrow-erase-start {
  opacity: 1;
  transition-duration: 260ms;
  transition-timing-function: ease, cubic-bezier(.22, .84, .24, 1);
  transform:
    translate3d(
      var(--brand-pencil-eyebrow-erase-start-x, var(--brand-pencil-eyebrow-x, clamp(48px, 4.4vw, 72px))),
      var(--brand-pencil-eyebrow-erase-start-y, var(--brand-pencil-eyebrow-y, -18px)),
      0
    )
    rotate(158deg)
    scale(0.72);
}

.brand-pencil.is-erasing-eyebrow {
  opacity: 1;
  transition-duration: 620ms;
  transition-timing-function: ease, cubic-bezier(.32, .02, .18, 1);
  transform:
    translate3d(
      var(--brand-pencil-eyebrow-erase-end-x, var(--brand-pencil-eyebrow-start-x, clamp(4px, 0.3vw, 8px))),
      var(--brand-pencil-eyebrow-erase-end-y, var(--brand-pencil-eyebrow-start-y, -18px)),
      0
    )
    rotate(166deg)
    scale(0.72);
}

.brand-pencil.is-at-scratch-start {
  opacity: 1;
  transition-duration: 300ms;
  transition-timing-function: ease, cubic-bezier(.2, .86, .24, 1);
  transform:
    translate3d(
      var(--brand-pencil-scratch-start-x, clamp(130px, 13vw, 200px)),
      var(--brand-pencil-scratch-start-y, -6px),
      0
    )
    rotate(-16deg)
    scale(0.92);
}

/* Scratching state: the same tip grows and travels to the end of Inning. */
.brand-pencil.is-scratching {
  opacity: 1;
  transition-duration: 950ms;
  transition-timing-function: ease, cubic-bezier(.22, .52, .18, 1);
  transform:
    translate3d(
      var(--brand-pencil-write-x, clamp(190px, 18vw, 270px)),
      var(--brand-pencil-write-y, -6px),
      0
    )
    rotate(-12deg)
    scale(0.98);
}

.brand-pencil.is-at-addon-start {
  opacity: 1;
  transition-duration: 300ms;
  transition-timing-function: ease, cubic-bezier(.2, .86, .24, 1);
  transform:
    translate3d(
      var(--brand-pencil-addon-start-x, clamp(190px, 17vw, 260px)),
      var(--brand-pencil-addon-start-y, -5px),
      0
    )
    rotate(-15deg)
    scale(0.86);
}

.brand-pencil.is-writing-addon {
  opacity: 1;
  transition-duration: 680ms;
  transition-timing-function: ease, cubic-bezier(.18, .68, .2, 1);
  transform:
    translate3d(
      var(--brand-pencil-addon-x, clamp(230px, 20vw, 310px)),
      var(--brand-pencil-addon-y, -5px),
      0
    )
    rotate(-10deg)
    scale(0.9);
}

.brand-pencil.is-at-addon-erase-start {
  opacity: 1;
  transition-duration: 260ms;
  transition-timing-function: ease, cubic-bezier(.22, .84, .24, 1);
  transform:
    translate3d(
      var(--brand-pencil-addon-erase-start-x, var(--brand-pencil-addon-x, clamp(230px, 20vw, 310px))),
      var(--brand-pencil-addon-erase-start-y, var(--brand-pencil-addon-y, -5px)),
      0
    )
    rotate(160deg)
    scale(0.9);
}

.brand-pencil.is-erasing-addon {
  opacity: 1;
  transition-duration: 620ms;
  transition-timing-function: ease, cubic-bezier(.32, .02, .18, 1);
  transform:
    translate3d(
      var(--brand-pencil-addon-erase-end-x, var(--brand-pencil-addon-start-x, clamp(190px, 17vw, 260px))),
      var(--brand-pencil-addon-erase-end-y, var(--brand-pencil-addon-start-y, -5px)),
      0
    )
    rotate(168deg)
    scale(0.9);
}

.brand-pencil.is-writing-eyebrow svg,
.brand-pencil.is-scratching svg,
.brand-pencil.is-writing-addon svg {
  animation: brand-pencil-write-jitter 180ms ease-in-out infinite;
  transform-origin: 8% 50%;
}

.brand-pencil.is-erasing-eyebrow svg,
.brand-pencil.is-erasing-addon svg {
  animation: brand-pencil-erase-jitter 120ms ease-in-out infinite;
  transform-origin: 86% 50%;
}

@keyframes brand-pencil-write-jitter {
  0%,
  100% { transform: translateY(0) rotate(0deg); }
  35% { transform: translateY(-0.7px) rotate(-0.8deg); }
  70% { transform: translateY(0.45px) rotate(0.7deg); }
}

@keyframes brand-pencil-erase-jitter {
  0%,
  100% { transform: translateY(0) rotate(0deg); }
  30% { transform: translateY(-0.9px) rotate(1.4deg); }
  65% { transform: translateY(0.7px) rotate(-1.1deg); }
}

.brand-word {
  position: relative;
  display: inline-block;
  vertical-align: baseline;
}

.brand-word__orig,
.brand-word__new {
  display: inline-block;
  transition: opacity 260ms ease;
}

/* Make orig the positioning context for the scribble, so the scribble
   only covers the original word (e.g., "Inning") and not the addon
   ("Time"/"Plays") sitting next to it. */
.brand-word__orig {
  position: relative;
}

.brand-word__new {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-style: italic;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 260ms ease, transform 260ms ease;
  white-space: nowrap;
}

.brand-word--swap.is-replaced .brand-word__orig {
  opacity: 0;
}

.brand-word--swap.is-replaced .brand-word__new {
  opacity: 1;
  transform: translateY(0);
}

/* Insert variant: "Inning" stays visible with the scribble persisting,
   then "Time" appears inline to its right before switching to "Plays". */
.brand-word__addon {
  display: inline-grid;
  margin-left: 0.18em;
  color: #000;
  font-style: italic;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 320ms ease 80ms, transform 320ms ease 80ms;
  white-space: nowrap;
}

.brand-word--insert.is-replaced .brand-word__addon {
  opacity: 1;
  transform: translateY(0);
}

.brand-word__addon-text {
  grid-area: 1 / 1;
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  transform: translateY(4px);
  transition:
    opacity 220ms ease,
    transform 220ms ease,
    clip-path 680ms linear;
}

.brand-stack.is-save .brand-word__addon-text--time,
.brand-stack.is-keep .brand-word__addon-text--plays {
  opacity: 1;
  transform: translateY(0);
}

.brand-stack.is-writing-addon.is-save .brand-word__addon-text--time,
.brand-stack.is-time-written .brand-word__addon-text--time,
.brand-stack.is-writing-addon.is-keep .brand-word__addon-text--plays,
.brand-stack.is-plays-written .brand-word__addon-text--plays {
  clip-path: inset(0 0 0 0);
}

.brand-stack.is-erasing-addon .brand-word__addon-text--time {
  clip-path: inset(0 100% 0 0);
  transition-duration: 220ms, 220ms, 620ms;
}

.brand-word__scribble {
  position: absolute;
  left: -3%;
  right: -3%;
  top: 50%;
  height: 0.62em;
  transform: translateY(-50%);
  pointer-events: none;
  overflow: visible;
}

.brand-word__scribble svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.brand-word__scribble path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.45;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: var(--len, 600);
  stroke-dashoffset: var(--len, 600);
  opacity: 1;
}

.brand-word__scribble .s1 { transition: stroke-dashoffset 520ms ease-out; }
.brand-word__scribble .s2 { transition: stroke-dashoffset 580ms ease-out 140ms; }

.brand-word.is-scribbling .s1,
.brand-word.is-scribbled  .s1,
.brand-word.is-scribbling .s2,
.brand-word.is-scribbled  .s2 { stroke-dashoffset: 0; }

.brand-word--swap.is-replaced .brand-word__scribble {
  opacity: 0;
  transition: opacity 220ms ease;
}

@media (prefers-reduced-motion: reduce) {
  .scoreboard-tile.is-flipping .scoreboard-tile__inner,
  .scoreboard-brand__logo.is-flipping .scoreboard-logo__inner,
  .brand-pencil,
  .brand-pencil svg,
  .brand-eyebrow__text,
  .brand-word__orig,
  .brand-word__new,
  .brand-word__addon,
  .brand-word__addon-text,
  .brand-word__scribble path { transition: none !important; }

  .scoreboard-tile.is-flipping .scoreboard-tile__inner,
  .scoreboard-brand__logo.is-flipping .scoreboard-logo__inner,
  .scoreboard-brand__logo.is-diamond-glinting .scoreboard-logo-svg__glint-star,
  .scoreboard-brand__logo.is-diamond-glinting .scoreboard-logo-svg__glint-sweep,
  .scoreboard-brand__logo.is-diamond-glinting .scoreboard-logo-svg__logo-stone,
  .scoreboard-brand__logo.is-diamond-glinting .scoreboard-logo-svg__gem-table,
  .scoreboard-brand__logo.is-diamond-glinting::before,
  .scoreboard-brand__logo.is-diamond-glinting::after,
  .brand-pencil svg { animation: none !important; }

  .scoreboard-brand__logo.is-diamond-glint-visible::before,
  .scoreboard-brand__logo.is-diamond-glint-visible::after,
  .scoreboard-brand__logo.is-diamond-glint-visible .scoreboard-logo-svg__glint-star,
  .scoreboard-brand__logo.is-diamond-glint-visible .scoreboard-logo-svg__glint-sweep {
    opacity: 0 !important;
  }

  .scoreboard-brand__logo.is-diamond-glint-visible .scoreboard-logo-svg__logo-stone,
  .scoreboard-brand__logo.is-diamond-glint-visible .scoreboard-logo-svg__gem-table {
    filter: none !important;
  }
}

.appbar-actions,
.nav-links,
.export-actions,
.export-buttons,
.preview-actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
}

.appbar-actions.appbar-actions--public {
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.btn,
.btn-primary,
.btn-ghost {
  appearance: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.btn:hover,
.btn-primary:hover,
.btn-ghost:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.btn:active,
.btn-primary:active,
.btn-ghost:active {
  transform: translateY(1px);
}

.btn--primary,
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}

.btn--primary:hover,
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn--ghost,
.btn-ghost {
  background: transparent;
  color: var(--text-2);
}

.btn--sm {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 12px;
}

/* Home */
.home-shell {
  min-height: 100vh;
  overflow-x: clip;
}

.home-cinematic {
  --bg: #f4ecd9;
  --bg-elev: #fffaf1;
  --surface: #fff8eb;
  --surface-2: #efe1c8;
  --surface-3: #dfcaa6;
  --border: rgba(83, 60, 35, 0.18);
  --border-strong: rgba(83, 60, 35, 0.34);
  --divider: rgba(83, 60, 35, 0.12);
  --text: #1d2730;
  --text-2: #33404a;
  --text-muted: #6f675d;
  --text-faint: #9a8973;
  --accent: #176f9f;
  --accent-hover: #0f5f8b;
  --accent-soft: rgba(23, 111, 159, 0.12);
  --accent-fg: #fffaf1;
  --green: #2d8c55;
  --yellow: #c88b2f;
  --red: #b4483e;
  --shadow-1: 0 16px 42px rgba(94, 63, 28, 0.13);
  --shadow-2: 0 26px 80px rgba(94, 63, 28, 0.18);
  background:
    linear-gradient(180deg, #f8f0df 0%, #f2e5cb 52%, #ecddbf 100%);
}

.home-cinematic::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(83, 60, 35, 0.052) 1px, transparent 1px),
    linear-gradient(90deg, rgba(83, 60, 35, 0.045) 1px, transparent 1px),
    linear-gradient(112deg, rgba(23, 111, 159, 0.13), transparent 38%),
    linear-gradient(180deg, rgba(255, 250, 241, 0.78), transparent 23%);
  background-size: 76px 76px, 76px 76px, auto, auto;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.3) 72%, rgba(0, 0, 0, 0));
}

.home-cinematic > * {
  position: relative;
  z-index: 1;
}

.home-cinematic .appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 240, 223, 0.82);
  backdrop-filter: blur(18px);
  border-bottom-color: rgba(83, 60, 35, 0.14);
}

.home-cinematic .brand-mark {
  color: var(--text-2);
}

.home-cinematic .btn {
  box-shadow: none;
}

.home-cinematic .btn--ghost {
  color: var(--text-2);
  border-color: rgba(83, 60, 35, 0.2);
}

.home-cinematic .btn--ghost:hover {
  background: rgba(255, 250, 241, 0.7);
  border-color: rgba(83, 60, 35, 0.32);
}

.home-main {
  width: min(100% - 32px, 1400px);
  margin: 0 auto;
  padding: var(--s-8) 0 var(--s-12);
}

.home-cinematic .home-main {
  width: min(100% - 32px, 1400px);
  padding-top: 0;
  padding-bottom: 0;
}

.stadium-hero {
  position: relative;
  isolation: isolate;
  overflow: visible;
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-content: start;
  gap: clamp(22px, 4vw, 46px);
  padding: clamp(28px, 4.2vw, 54px) 0 0;
  text-align: center;
}

.stadium-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 0;
  z-index: -1;
  border: 1px solid rgba(83, 60, 35, 0.10);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background:
    linear-gradient(180deg, rgba(255, 250, 241, 0.92), rgba(255, 250, 241, 0.58) 48%, rgba(255, 250, 241, 0.08)),
    repeating-linear-gradient(90deg, rgba(83, 60, 35, 0.045) 0 1px, transparent 1px 76px),
    repeating-linear-gradient(0deg, rgba(83, 60, 35, 0.035) 0 1px, transparent 1px 76px);
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 241, 0.9),
    0 26px 90px rgba(94, 63, 28, 0.10);
}

.stadium-hero::after {
  display: none;
}

.stadium-hero > * {
  position: relative;
  z-index: 1;
}

.stadium-hero__copy {
  position: relative;
  z-index: 6;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: var(--s-5);
  width: min(100%, 1060px);
  max-width: 1060px;
  padding-inline: clamp(18px, 4vw, 56px);
}

.stadium-hero__copy::before {
  content: "";
  position: absolute;
  inset: clamp(-26px, -2vw, -14px) clamp(-20px, -3vw, -10px) clamp(-34px, -3vw, -18px);
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 76% 58% at 50% 46%, rgba(255, 250, 241, 0.96), rgba(255, 250, 241, 0.72) 56%, rgba(255, 250, 241, 0));
}

.stadium-hero h1 {
  max-width: 15.6ch;
  margin: 0;
  color: var(--text);
  font-size: clamp(54px, 6.4vw, 104px);
  line-height: 0.94;
  font-weight: 700;
  letter-spacing: 0;
}

.stadium-hero__stage {
  position: relative;
  left: auto;
  top: auto;
  z-index: 2;
  width: min(96%, 980px);
  aspect-ratio: 1;
  justify-self: center;
  margin: clamp(18px, 3.2vw, 42px) auto 0;
  transform: none;
  pointer-events: none;
}


.hero-stage-shell {
  transform: translateY(8px);
  overflow: visible;
}

.hero-stage-shell::before,
.hero-stage-shell::after {
  display: none;
}

.hero-stage-shell .scan {
  display: none;
}

.scan-story {
  min-height: 520vh;
  display: block;
  padding: 0;
  border-top: 1px solid rgba(83, 60, 35, 0.14);
}

.scan-story__sticky {
  position: sticky;
  top: 64px;
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-content: center;
  gap: clamp(14px, 2.4vw, 26px);
  padding: clamp(34px, 5vw, 72px) 0;
  text-align: center;
}

.scan-story__copy {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: var(--s-4);
  width: min(100%, 960px);
  max-width: 960px;
}

.scan-story__copy h2 {
  max-width: 15ch;
  margin: 0;
  color: var(--text);
  font-size: clamp(38px, 4.7vw, 74px);
  line-height: 0.95;
  letter-spacing: 0;
}

.scan-story__copy .hero-sub {
  max-width: 44ch;
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.48;
}

.scan-story__stage {
  position: relative;
  width: min(92vw, 860px);
  display: grid;
  grid-template-columns: 46px minmax(0, 820px);
  align-items: center;
  gap: clamp(10px, 2vw, 22px);
  justify-self: center;
}

.scan-story .motion-chapters {
  width: 100%;
  max-width: none;
  grid-template-columns: 1fr;
  gap: 11px;
  margin: 0;
  align-self: center;
  justify-self: center;
}

.scan-story .motion-chapter {
  display: flex;
  min-width: 0;
  justify-content: center;
  align-items: center;
  padding: 0;
  border: 1px solid rgba(83, 60, 35, 0.14);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.34);
  transform: none;
}

.scan-story .motion-chapter:last-child {
  border-bottom: 1px solid rgba(83, 60, 35, 0.14);
}

.scan-story .motion-chapter > span {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
}

.scan-story .motion-chapter div {
  display: none;
}

.home-hero {
  min-height: calc(100vh - 96px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  align-items: center;
  gap: 56px;
  padding: var(--s-8) 0 var(--s-10);
}

.motion-hero {
  min-height: 330vh;
  display: block;
  padding: 0;
}

.home-hero__sticky {
  position: sticky;
  top: 64px;
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(520px, 1.22fr);
  align-items: center;
  gap: clamp(36px, 6vw, 104px);
  padding: clamp(56px, 7vw, 110px) 0;
}

.home-hero__copy {
  display: grid;
  align-content: center;
  gap: var(--s-5);
}

.motion-hero .home-hero__copy {
  max-width: 620px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  animation: heroPulse 1.8s ease-in-out infinite;
}

@keyframes heroPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.7);
  }
}

.home-hero h1 {
  max-width: 780px;
  margin: 0;
  color: var(--text);
  font-size: 58px;
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: 0;
}

.home-cinematic .home-hero h1 {
  max-width: 11.8ch;
  font-size: clamp(54px, 7.1vw, 118px);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-sub {
  max-width: 58ch;
  margin: 0;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
}

.motion-chapters {
  display: grid;
  gap: 0;
  max-width: 560px;
  margin-top: var(--s-3);
}

.motion-chapter {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 13px;
  align-items: start;
  padding: 13px 0;
  border-top: 1px solid rgba(83, 60, 35, 0.14);
  color: var(--text-muted);
  opacity: 0.46;
  transform: translateX(-8px);
  transition: opacity 180ms ease, transform 180ms ease, color 180ms ease;
}

.motion-chapter:last-child {
  border-bottom: 1px solid rgba(83, 60, 35, 0.14);
}

.motion-chapter.is-active {
  color: var(--text-2);
  opacity: 1;
  transform: translateX(0);
}

.motion-chapter > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(83, 60, 35, 0.18);
  border-radius: 999px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.motion-chapter.is-active > span {
  color: #fffaf1;
  background: var(--accent);
  border-color: var(--accent);
}

.motion-chapter h2 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: 0;
}

.motion-chapter p {
  margin: 4px 0 0;
  max-width: 42ch;
  font-size: 13px;
  line-height: 1.45;
}

.home-hero__stage {
  position: relative;
  width: 100%;
  max-width: 660px;
  aspect-ratio: 1;
  justify-self: end;
}

.motion-hero .home-hero__stage {
  width: min(62vw, 850px);
  max-width: none;
  justify-self: center;
}

.motion-stage-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  perspective: 1800px;
  isolation: isolate;
}

.motion-stage-shell::before {
  content: "";
  position: absolute;
  inset: 58% 4% 8%;
  border: 1px solid rgba(68, 118, 72, 0.25);
  border-radius: 999px 999px 24px 24px;
  transform: translateZ(-100px) rotateX(67deg);
  background:
    linear-gradient(90deg, rgba(255, 250, 241, 0.24) 1px, transparent 1px),
    linear-gradient(rgba(255, 250, 241, 0.20) 1px, transparent 1px),
    linear-gradient(180deg, rgba(82, 149, 86, 0.32), rgba(54, 113, 63, 0.18));
  background-size: 30px 30px, 30px 30px, auto;
  opacity: 0.74;
}

.motion-stage-shell::after {
  content: "";
  position: absolute;
  left: 15%;
  right: 15%;
  bottom: 5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(176, 112, 53, 0.55), transparent);
  box-shadow: 0 12px 34px rgba(94, 63, 28, 0.16);
}

#heroStage3dMount,
#heroStage3dMount .stage3d,
#stage3dMount,
#stage3dMount .stage3d {
  width: 100%;
  height: 100%;
}

.hero-stage-shell #heroStage3dMount {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  transform:
    translate3d(0, 0, 52px)
    rotateX(-8deg)
    rotateY(-10deg)
    rotateZ(-1deg);
  transform-style: preserve-3d;
}

.motion-stage-shell #stage3dMount {
  position: relative;
  z-index: 3;
  transform:
    translate3d(0, var(--motion-rise, -10px), var(--motion-depth, 0px))
    rotateX(var(--motion-tilt, -8deg))
    rotateY(var(--motion-spin, -10deg));
  transform-style: preserve-3d;
  transition: transform 90ms linear;
}

.stadium-diorama {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  transform-style: preserve-3d;
  transition: opacity 260ms ease, transform 420ms var(--ease-out), filter 260ms ease;
}

.stadium-model {
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: -2%;
  height: 35%;
  transform: rotateX(62deg) translateZ(104px);
  transform-style: preserve-3d;
}

.stadium-field {
  position: absolute;
  left: 17%;
  right: 17%;
  bottom: 4%;
  height: 74%;
  border-radius: 50% 50% 18px 18px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.13) 0 12px, transparent 12px 24px),
    linear-gradient(145deg, #68a65b, #347845);
  box-shadow:
    inset 0 0 0 2px rgba(255, 250, 241, 0.34),
    0 24px 58px rgba(82, 73, 38, 0.30),
    0 6px 18px rgba(29, 39, 48, 0.12);
}

.stadium-infield {
  position: absolute;
  left: 43%;
  bottom: 17%;
  width: 15%;
  aspect-ratio: 1;
  background: #d8a86b;
  border: 2px solid rgba(255, 250, 241, 0.74);
  border-radius: 3px;
  transform: rotate(45deg);
  box-shadow: 0 0 0 13px rgba(216, 168, 107, 0.24), 0 12px 22px rgba(94, 63, 28, 0.22);
}

.stadium-stand {
  position: absolute;
  height: 24%;
  border: 1px solid rgba(83, 60, 35, 0.18);
  background:
    repeating-linear-gradient(90deg, rgba(29, 39, 48, 0.12) 0 9px, transparent 9px 18px),
    linear-gradient(180deg, #fff7e7, #dfcaa6);
  box-shadow:
    inset 0 8px 14px rgba(255, 250, 241, 0.22),
    0 18px 30px rgba(94, 63, 28, 0.20);
}

.stadium-stand--left {
  left: 11%;
  bottom: 33%;
  width: 28%;
  border-radius: 28px 8px 12px 24px;
  transform: rotate(-14deg) translateZ(68px);
}

.stadium-stand--right {
  right: 11%;
  bottom: 33%;
  width: 28%;
  border-radius: 8px 28px 24px 12px;
  transform: rotate(14deg) translateZ(68px);
}

.stadium-stand--back {
  left: 33%;
  right: 33%;
  bottom: 59%;
  border-radius: 999px 999px 8px 8px;
  transform: translateZ(78px);
}

.stadium-light {
  position: absolute;
  bottom: 72%;
  width: 4%;
  height: 48%;
  background: linear-gradient(90deg, #8d806e, #40372d);
  border-radius: 999px;
  transform: translateZ(118px) rotateX(-45deg);
}

.stadium-light::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -25%;
  width: 460%;
  height: 38%;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 250, 241, 0.96) 0 18%, transparent 18% 25%, rgba(255, 250, 241, 0.96) 25% 43%, transparent 43% 52%, rgba(255, 250, 241, 0.96) 52% 70%, transparent 70% 78%, rgba(255, 250, 241, 0.96) 78% 100%);
  border: 1px solid rgba(83, 60, 35, 0.2);
  transform: translateX(-50%);
}

.stadium-light--left {
  left: 15%;
}

.stadium-light--right {
  right: 15%;
}

.baseball-model {
  position: absolute;
  right: -2%;
  top: 14%;
  z-index: 8;
  width: clamp(78px, 11vw, 128px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, #fffefa 0 18%, transparent 19%),
    radial-gradient(circle at 62% 67%, rgba(180, 72, 62, 0.12), transparent 30%),
    linear-gradient(145deg, #fffdf8, #eadcc5);
  border: 1px solid rgba(83, 60, 35, 0.18);
  box-shadow:
    inset -13px -14px 24px rgba(94, 63, 28, 0.15),
    0 30px 62px rgba(94, 63, 28, 0.25),
    0 8px 16px rgba(29, 39, 48, 0.10);
  transform: translateZ(190px) rotateX(-12deg) rotateY(-18deg);
  animation: baseballFloat 4.8s ease-in-out infinite;
  transition: opacity 260ms ease, filter 260ms ease;
}

.baseball-seam {
  position: absolute;
  top: 18%;
  bottom: 18%;
  width: 31%;
  border: 2px solid var(--red);
  border-top-color: transparent;
  border-bottom-color: transparent;
  opacity: 0.82;
}

.baseball-seam--left {
  left: 13%;
  border-right: 0;
  border-radius: 100% 0 0 100%;
  transform: rotate(-18deg);
}

.baseball-seam--right {
  right: 13%;
  border-left: 0;
  border-radius: 0 100% 100% 0;
  transform: rotate(-18deg);
}

@keyframes baseballFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 190px) rotateX(-12deg) rotateY(-18deg);
  }
  50% {
    transform: translate3d(-8px, -14px, 205px) rotateX(-8deg) rotateY(-8deg);
  }
}

.motion-hero[data-motion-phase="0"] .stadium-diorama {
  opacity: 1;
  filter: none;
  transform: translateY(0);
}

.motion-hero[data-motion-phase="0"] .baseball-model {
  opacity: 1;
  filter: none;
}

.motion-hero[data-motion-phase="1"] .stadium-diorama {
  opacity: 0.58;
  filter: saturate(0.78);
  transform: translateY(22px) scale(0.98);
}

.motion-hero[data-motion-phase="1"] .baseball-model {
  opacity: 0.72;
  filter: saturate(0.82);
}

.motion-hero[data-motion-phase="2"] .stadium-diorama,
.motion-hero[data-motion-phase="3"] .stadium-diorama {
  opacity: 0.22;
  filter: saturate(0.52) blur(1px);
  transform: translateY(38px) scale(0.96);
}

.motion-hero[data-motion-phase="2"] .baseball-model,
.motion-hero[data-motion-phase="3"] .baseball-model {
  opacity: 0.18;
  filter: saturate(0.48) blur(0.6px);
}

.phase-chip {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
  box-shadow: var(--shadow-1);
}

.motion-stage-shell .phase-chip {
  left: 5%;
  top: 5%;
  z-index: 6;
  border-color: rgba(83, 60, 35, 0.18);
  background: rgba(255, 250, 241, 0.78);
  color: var(--text-2);
  backdrop-filter: blur(12px);
}

.phase-chip__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--text-faint);
  transition: background 200ms ease;
}

.stage3d.is-scanning ~ .phase-chip .phase-chip__dot {
  background: var(--accent);
  animation: heroPulse 1.2s ease-in-out infinite;
}

.stage3d.is-scroll-driven.scroll-phase-0 ~ .phase-chip .phase-chip__dot {
  background: var(--green);
  animation: none;
}

.stage3d.is-scroll-driven.scroll-phase-1 ~ .phase-chip .phase-chip__dot {
  background: var(--accent);
  animation: heroPulse 1.2s ease-in-out infinite;
}

.stage3d.is-assembled ~ .phase-chip .phase-chip__dot {
  background: var(--green);
  animation: none;
}

.motion-data-card {
  position: absolute;
  right: 4%;
  bottom: 7%;
  z-index: 4;
  width: min(310px, 52%);
  padding: 13px 14px;
  border: 1px solid rgba(45, 140, 85, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 250, 241, 0.88);
  color: var(--text-2);
  box-shadow: 0 22px 70px rgba(94, 63, 28, 0.18);
  opacity: 0;
  transform: translate3d(0, 16px, 60px);
  transition: opacity 220ms ease, transform 220ms ease;
  backdrop-filter: blur(14px);
}

.motion-data-card > span {
  display: block;
  margin-bottom: 6px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

.motion-data-card code {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.45;
}

.motion-hero[data-motion-phase="4"] .motion-data-card {
  opacity: 1;
  transform: translate3d(0, 0, 60px);
}

.how-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-4);
  padding: var(--s-8) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.home-cinematic .how-strip {
  padding: clamp(34px, 5vw, 72px) 0;
  border-top-color: rgba(83, 60, 35, 0.14);
  border-bottom-color: rgba(83, 60, 35, 0.14);
}

.how-strip__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--s-3);
  align-items: start;
  min-width: 0;
}

.how-strip__item > span {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.how-strip__item h2 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
}

.how-strip__item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.upload-workbench {
  display: grid;
  gap: var(--s-6);
}

.upload-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 var(--s-2);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.upload-copy h1,
.upload-copy h2,
.result-summary h1 {
  margin: 0;
  color: var(--text);
  font-size: 44px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: 0;
  max-width: 820px;
}

.upload-copy h2 {
  font-size: 36px;
  max-width: 700px;
}

.lede,
.summary-sub {
  margin: var(--s-4) 0 0;
  max-width: 68ch;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.55;
}

.upload-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.62fr);
  gap: var(--s-6);
  align-items: stretch;
}

.home-cinematic .scan-experience {
  position: relative;
  isolation: isolate;
  margin-bottom: 0;
}

.home-cinematic .drop-zone {
  min-height: clamp(276px, 35vh, 330px);
  padding: clamp(22px, 3.5vw, 36px);
}

.home-cinematic .upload-copy h2 {
  font-size: clamp(30px, 2.7vw, 34px);
}

.home-cinematic .upload-copy .lede {
  margin-top: var(--s-3);
  font-size: 16px;
  line-height: 1.45;
}

.home-cinematic .upload-next-card {
  padding: 12px;
}

.home-cinematic .stage-list {
  gap: 6px;
}

.home-cinematic .stage-item {
  grid-template-columns: 34px 1fr;
  gap: 10px;
  padding: 9px 12px;
}

.home-cinematic .stage-item small {
  font-size: 11px;
  line-height: 1.25;
}

/* Pop-in entrance: as the user scrolls past the cinematic story above,
   the workbench rises and scales up, then its inner pieces cascade in. */
.home-cinematic #teamLibrary {
  scroll-margin-top: 0;
}

.home-cinematic .post-scan-choices {
  position: relative;
  display: grid;
  align-items: center;
  min-height: clamp(460px, 58vh, 640px);
  margin-top: 0;
  padding: clamp(40px, 5vw, 72px) clamp(24px, 4.4vw, 72px) clamp(92px, 10vh, 140px);
  border-top: 0;
  background:
    radial-gradient(ellipse 62% 46% at 50% 14%, rgba(255, 250, 241, 0.72), transparent 68%),
    linear-gradient(180deg, rgba(244, 236, 217, 0), rgba(236, 221, 191, 0.7) 24%, rgba(236, 221, 191, 0.95));
}

.home-cinematic .post-scan-choices .narrative__paths {
  width: 100%;
  max-width: none;
  margin: 0;
  opacity: 1;
  transform: none;
  gap: clamp(18px, 2.4vw, 32px);
}

.home-cinematic .post-scan-choices .path-card {
  min-height: clamp(292px, 32vh, 360px);
  padding: clamp(26px, 3vw, 36px);
  background: rgba(232, 217, 187, 0.62);
  border-color: rgba(83, 60, 35, 0.18);
  box-shadow: 0 28px 82px rgba(94, 63, 28, 0.14);
  backdrop-filter: blur(14px);
}
.home-cinematic .post-scan-choices .path-card--primary {
  border-color: var(--accent);
  background:
    linear-gradient(180deg, var(--accent-soft) 0%, rgba(232, 217, 187, 0.78) 60%);
}

.home-cinematic .post-scan-choices .path-card__title {
  font-size: clamp(24px, 2.1vw, 30px);
}

.home-cinematic .post-scan-choices .path-card__body,
.home-cinematic .post-scan-choices .path-card__list li {
  font-size: clamp(15px, 1.15vw, 17px);
}

/* ===== Stadium-light atmospherics for post-scan choices ===== */

/* Section transitions from the cream scan story into a deep stadium-night
   sky so the actual stadium-light fixtures read against it. */
.home-cinematic .post-scan-stadium {
  overflow: hidden;
  min-height: max(720px, calc(100vh - 24px));
  padding-top: clamp(120px, 14vw, 200px);
  background: linear-gradient(
    180deg,
    rgba(244, 236, 217, 1)  0%,
    rgba(220, 200, 165, 1)  3%,
    rgba(150, 130, 115, 1)  9%,
    rgba(86, 84, 105, 1)   17%,
    rgba(40, 54, 86, 1)    28%,
    rgba(18, 32, 56, 1)    48%,
    rgba(8, 18, 36, 1)    100%
  );
}

/* Subtle starfield in the upper night sky. */
.home-cinematic .post-scan-stadium__sky {
  position: absolute;
  inset: 0 0 30% 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 38%, rgba(255,255,255,0.55), transparent 60%),
    radial-gradient(1px   1px   at 78% 22%, rgba(255,255,255,0.45), transparent 60%),
    radial-gradient(1.4px 1.4px at 38% 16%, rgba(255,255,255,0.6),  transparent 60%),
    radial-gradient(1px   1px   at 62% 32%, rgba(255,255,255,0.35), transparent 60%),
    radial-gradient(1px   1px   at 22% 50%, rgba(255,255,255,0.30), transparent 60%),
    radial-gradient(1.2px 1.2px at 88% 46%, rgba(255,255,255,0.40), transparent 60%),
    radial-gradient(1px   1px   at 50% 62%, rgba(255,255,255,0.25), transparent 60%);
  opacity: 0;
  transition: opacity 1400ms ease-out 200ms;
}

.home-cinematic .post-scan-stadium.is-revealed .post-scan-stadium__sky {
  opacity: 0.85;
}

/* Stadium light fixtures, anchored to the top corners. */
.home-cinematic .stadium-light {
  position: absolute;
  top: clamp(34px, 3.2vw, 58px);
  width: clamp(210px, 18.5vw, 282px);
  height: auto;
  pointer-events: none;
  z-index: 3;
  overflow: visible;
  filter: none;
  opacity: 0;
  transform: translateY(-12px);
  transition:
    opacity 700ms ease-out,
    transform 900ms cubic-bezier(.22, .61, .36, 1);
}

.home-cinematic .stadium-light--left  { left:  clamp(34px, 5.4vw, 92px); }
.home-cinematic .stadium-light--right { right: clamp(34px, 5.4vw, 92px); }

.home-cinematic .stadium-light__back {
  fill: rgba(116, 105, 84, 0.46);
  stroke: rgba(246, 244, 233, 0.14);
  stroke-width: 0.9;
}

.home-cinematic .stadium-light__frame {
  fill: rgba(7, 15, 18, 0.84);
  stroke: rgba(246, 244, 233, 0.62);
  stroke-linejoin: round;
  stroke-width: 0.9;
}

.home-cinematic .stadium-light__trim {
  fill: none;
  stroke: rgba(246, 244, 233, 0.34);
  stroke-linecap: round;
  stroke-width: 0.8;
}

.home-cinematic .stadium-light__grid {
  fill: none;
  stroke: rgba(246, 244, 233, 0.18);
  stroke-linecap: round;
  stroke-width: 0.65;
}

.home-cinematic .stadium-light__mast,
.home-cinematic .stadium-light__brace {
  fill: none;
  stroke: rgba(246, 244, 233, 0.22);
  stroke-linecap: round;
  stroke-width: 0.9;
}

.home-cinematic .stadium-light__brace {
  opacity: 0.56;
}

.home-cinematic .stadium-light__reflectors {
  fill: rgba(246, 244, 233, 0.12);
  stroke: rgba(246, 244, 233, 0.16);
  stroke-width: 0.8;
}

.home-cinematic .stadium-light__lenses {
  fill: rgba(255, 242, 201, 0.44);
  stroke: rgba(255, 250, 227, 0.34);
  stroke-width: 0.75;
}

.home-cinematic .stadium-light__bulbs {
  fill: rgba(255, 250, 226, 0.96);
  filter:
    drop-shadow(0 0 3px rgba(255, 236, 174, 0.72))
    drop-shadow(0 0 10px rgba(255, 220, 145, 0.32));
}

.home-cinematic .stadium-light__glints {
  fill: none;
  stroke: rgba(255, 255, 248, 0.7);
  stroke-linecap: round;
  stroke-width: 0.8;
}

.home-cinematic .post-scan-stadium.is-revealed .stadium-light {
  opacity: 1;
  transform: translateY(0);
}

.home-cinematic .post-scan-stadium.is-revealed .stadium-light--right {
  transition-delay: 120ms;
}

/* Volumetric light cones beaming from each fixture toward the cards. */
.home-cinematic .post-scan-stadium__cone {
  position: absolute;
  top: clamp(118px, 10.5vw, 154px);
  width: 50%;
  height: 70%;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: screen;
  filter: blur(18px);
  opacity: 0.34;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.58) 48%, transparent 92%);
  transition: opacity 1400ms ease-out 220ms;
}

.home-cinematic #teamLibrary.post-scan-stadium.is-revealed .post-scan-stadium__cone {
  opacity: 0.34;
}

.home-cinematic .post-scan-stadium__cone--left {
  left: 0;
  background: linear-gradient(
    168deg,
    rgba(255, 238, 190, 0.30) 0%,
    rgba(216, 201, 138, 0.16) 24%,
    rgba(145, 211, 255, 0.08) 48%,
    rgba(145, 211, 255, 0)    100%
  );
  clip-path: polygon(10% 0%, 22% 0%, 57% 100%, 36% 100%);
}

.home-cinematic .post-scan-stadium__cone--right {
  right: 0;
  background: linear-gradient(
    192deg,
    rgba(255, 238, 190, 0.30) 0%,
    rgba(216, 201, 138, 0.16) 24%,
    rgba(145, 211, 255, 0.08) 48%,
    rgba(145, 211, 255, 0)    100%
  );
  clip-path: polygon(78% 0%, 90% 0%, 64% 100%, 43% 100%);
}

/* Cards now sit on a dark stadium night, so re-light them: solid cream
   surface + warm rim from above + cool deep shadow + warm spill. */
.home-cinematic .post-scan-stadium .narrative__paths {
  position: relative;
  z-index: 2;
}

.home-cinematic .post-scan-stadium .path-card {
  background: linear-gradient(
    180deg,
    rgba(255, 250, 241, 0.98) 0%,
    rgba(244, 236, 217, 0.96) 100%
  );
  border-color: rgba(255, 220, 160, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 215, 0.95),
    0 -2px 18px rgba(255, 220, 150, 0.16),
    0 28px 72px rgba(0, 0, 0, 0.55),
    0 0 90px rgba(255, 215, 140, 0.10);
  backdrop-filter: blur(8px);
}

.home-cinematic .post-scan-stadium .path-card--primary {
  border-color: rgba(120, 180, 230, 0.55);
  background: linear-gradient(
    180deg,
    rgba(220, 235, 250, 0.95) 0%,
    rgba(255, 250, 241, 0.96) 65%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 241, 0.95),
    0 -2px 18px rgba(255, 220, 150, 0.20),
    0 28px 72px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(120, 180, 230, 0.20),
    0 0 90px rgba(120, 180, 230, 0.18);
}

/* Perspective container so the cards fan slightly toward the viewer. */
.home-cinematic .post-scan-stadium .narrative__paths {
  position: relative;
  z-index: 1;
  perspective: 1600px;
  perspective-origin: 50% 60%;
}

.home-cinematic .post-scan-stadium .path-card {
  position: relative;
  transform-origin: 50% 60%;
  transform: rotateY(0deg) translateY(18px);
  opacity: 0;
  transition:
    transform 720ms cubic-bezier(.22, .61, .36, 1),
    opacity 600ms ease-out,
    box-shadow 320ms ease-out,
    border-color 320ms ease-out;
  will-change: transform, opacity;
}

.home-cinematic .post-scan-stadium.is-revealed .path-card--lane-a {
  transform: rotateY(3deg) translateY(0);
  opacity: 1;
  transition-delay: 80ms, 80ms, 0ms, 0ms;
}

.home-cinematic .post-scan-stadium.is-revealed .path-card--lane-b {
  transform: rotateY(-3deg) translateY(0);
  opacity: 1;
  transition-delay: 220ms, 220ms, 0ms, 0ms;
}

.home-cinematic .post-scan-stadium .path-card:hover,
.home-cinematic .post-scan-stadium .path-card:focus-within {
  transform: rotateY(0deg) translateY(-6px);
  box-shadow: 0 36px 96px rgba(94, 63, 28, 0.22);
}

.home-cinematic .post-scan-stadium .path-card--primary:hover,
.home-cinematic .post-scan-stadium .path-card--primary:focus-within {
  border-color: var(--accent);
  box-shadow:
    0 36px 96px rgba(94, 63, 28, 0.22),
    0 0 0 1px rgba(23, 111, 159, 0.35);
}

/* Scoreboard-flap "01 / 02" digits. */
.home-cinematic .post-scan-stadium .path-card__eyebrow {
  align-items: center;
  gap: 12px;
}

.home-cinematic .post-scan-stadium .path-card__num {
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: clamp(26px, 2.8vw, 38px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  opacity: 1;
  color: rgba(83, 60, 35, 0.78);
  display: inline-flex;
  align-items: stretch;
  gap: 3px;
  text-shadow: 0 1px 0 rgba(255, 250, 241, 0.55);
}

.home-cinematic .post-scan-stadium .path-card__num > span {
  position: relative;
  display: inline-block;
  padding: 4px 8px 5px;
  background: linear-gradient(
    180deg,
    rgba(255, 250, 241, 0.85) 0%,
    rgba(255, 250, 241, 0.85) 49.6%,
    rgba(83, 60, 35, 0.18) 50%,
    rgba(83, 60, 35, 0.18) 50.4%,
    rgba(232, 217, 187, 0.85) 50.4%,
    rgba(232, 217, 187, 0.85) 100%
  );
  border-radius: 4px;
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 241, 0.7),
    inset 0 -1px 0 rgba(83, 60, 35, 0.18),
    0 1px 2px rgba(94, 63, 28, 0.10);
}

.home-cinematic .post-scan-stadium .path-card--primary .path-card__num {
  color: var(--accent);
}

.home-cinematic .post-scan-stadium .path-card--primary .path-card__num > span {
  background: linear-gradient(
    180deg,
    rgba(255, 250, 241, 0.92) 0%,
    rgba(255, 250, 241, 0.92) 49.6%,
    rgba(23, 111, 159, 0.32) 50%,
    rgba(23, 111, 159, 0.32) 50.4%,
    rgba(207, 226, 240, 0.85) 50.4%,
    rgba(207, 226, 240, 0.85) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 241, 0.85),
    inset 0 -1px 0 rgba(23, 111, 159, 0.20),
    0 1px 2px rgba(23, 111, 159, 0.18),
    0 0 12px rgba(23, 111, 159, 0.18);
}

.home-cinematic .post-scan-stadium .path-card__eyebrow-text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-muted);
}

.home-cinematic .post-scan-stadium .path-card--primary .path-card__eyebrow-text {
  color: var(--accent);
}

/* Stagger reveal for list items, format chips, and meta. */
.home-cinematic .post-scan-stadium .path-card__list li,
.home-cinematic .post-scan-stadium .fmt {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 480ms ease-out,
    transform 520ms cubic-bezier(.22, .61, .36, 1);
}

.home-cinematic .post-scan-stadium.is-revealed .path-card__list li,
.home-cinematic .post-scan-stadium.is-revealed .fmt {
  opacity: 1;
  transform: translateY(0);
  transition-delay: calc(380ms + var(--stagger-i, 0) * 70ms);
}

.home-cinematic .post-scan-stadium .path-card__action {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 520ms ease-out 600ms,
    transform 520ms cubic-bezier(.22, .61, .36, 1) 600ms;
}

.home-cinematic .post-scan-stadium.is-revealed .path-card__action {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .home-cinematic .post-scan-stadium .path-card,
  .home-cinematic .post-scan-stadium .path-card__list li,
  .home-cinematic .post-scan-stadium .fmt,
  .home-cinematic .post-scan-stadium .path-card__action {
    transform: none !important;
    opacity: 1 !important;
    transition: none !important;
  }
  .home-cinematic .post-scan-stadium__beam {
    animation: none;
  }
}

.home-cinematic .upload-card,
.home-cinematic .upload-next-card,
.home-cinematic .progress-card {
  background: rgba(255, 250, 241, 0.78);
  border-color: rgba(83, 60, 35, 0.16);
  box-shadow: 0 28px 82px rgba(94, 63, 28, 0.14);
  backdrop-filter: blur(14px);
}

.upload-card,
.process-card,
.progress-card,
.scorecard-panel,
.review-panel,
.inning-card,
.stat-box {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}

.upload-card {
  overflow: hidden;
}

.drop-zone {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  margin: var(--s-3);
  padding: var(--s-8);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  text-align: center;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.drop-kicker {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.drop-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.drop-icon svg {
  width: 34px;
  height: 34px;
  stroke: currentColor;
}

.drop-icon path:last-child {
  fill: var(--accent);
  stroke: var(--accent);
}

.drop-label {
  margin: var(--s-2) 0 0;
  font-size: 24px;
  font-weight: 700;
}

.drop-sub,
.drop-hint,
.drop-error {
  margin: 0;
  color: var(--text-muted);
}

.drop-error {
  color: var(--red);
  font-weight: 600;
}

.upload-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-3);
  align-items: stretch;
  margin: 0 var(--s-3) var(--s-3);
}

.upload-toggle {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.upload-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
}

.upload-toggle input,
.mobile-mlb-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.upload-toggle span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.upload-toggle strong {
  font-size: 13px;
  line-height: 1.2;
}

.upload-toggle small {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.mobile-mlb-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
}

.preview-area {
  display: grid;
  grid-template-rows: minmax(320px, 1fr) auto;
  min-height: 430px;
}

.preview-frame {
  display: grid;
  place-items: center;
  margin: var(--s-3);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.preview-frame img {
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: contain;
}

.preview-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-4);
  border-top: 1px solid var(--border);
}

.preview-label,
.preview-name {
  margin: 0;
}

.preview-label {
  font-weight: 700;
}

.preview-name {
  color: var(--text-muted);
  font-size: 13px;
  word-break: break-word;
}

.process-card,
.upload-next-card {
  padding: var(--s-4);
  display: grid;
  grid-template-rows: minmax(300px, 1fr) auto;
  gap: var(--s-4);
}

.upload-next-card {
  grid-template-rows: 1fr;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}

.home-stage3d {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 18% 16%, rgba(8, 117, 209, 0.09), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f3f6f9 100%);
  perspective: 1200px;
  isolation: isolate;
}

.home-stage3d__chip {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.home-stage3d__chip span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  animation: stagePulse 1.4s ease-in-out infinite;
}

.home-stage3d__paper,
.home-stage3d__tiles,
.home-stage3d__scan {
  position: absolute;
  inset: 54px 34px 34px;
  border-radius: 6px;
}

.home-stage3d__paper {
  display: grid;
  grid-template-columns: 1.35fr repeat(8, 1fr);
  grid-template-rows: 0.78fr repeat(8, 1fr);
  overflow: hidden;
  background: linear-gradient(180deg, #fbf5e8 0%, #f1e6cf 100%);
  border: 1px solid rgba(89, 64, 36, 0.22);
  box-shadow: 0 12px 28px rgba(37, 31, 20, 0.10);
  transform: rotateX(50deg) rotateZ(-8deg) translateY(10px);
  transform-style: preserve-3d;
}

.home-stage3d__paper-cell {
  position: relative;
  border-right: 1px solid rgba(89, 64, 36, 0.22);
  border-bottom: 1px solid rgba(89, 64, 36, 0.22);
}

.home-stage3d__paper-cell.is-head {
  background: rgba(255, 255, 255, 0.28);
  border-bottom-color: rgba(89, 64, 36, 0.42);
  color: #28384d;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.home-stage3d__paper-cell.is-player {
  justify-content: start;
  padding-left: 6px;
}

.home-stage3d__paper-cell .ink {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #24334a;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  transform: rotate(var(--rot, -3deg));
}

.home-stage3d__paper-cell .diamond {
  position: absolute;
  inset: 31%;
  border: 1px solid rgba(36, 51, 74, 0.34);
  transform: rotate(45deg);
}

.home-stage3d__scan {
  overflow: hidden;
  z-index: 3;
  transform: rotateX(50deg) rotateZ(-8deg) translateY(10px);
  pointer-events: none;
}

.home-stage3d__scan::before {
  content: "";
  position: absolute;
  top: -8%;
  bottom: -8%;
  left: -20%;
  width: 22%;
  background: linear-gradient(90deg, transparent, rgba(8, 117, 209, 0.38), transparent);
  border-right: 1px solid rgba(8, 117, 209, 0.7);
  box-shadow: 0 0 22px rgba(8, 117, 209, 0.45);
  animation: scanAcross 5.2s cubic-bezier(.45, .05, .25, 1) infinite;
}

.home-stage3d__tiles {
  display: grid;
  grid-template-columns: 1.35fr repeat(8, 1fr);
  grid-template-rows: 0.78fr repeat(8, 1fr);
  gap: 3px;
  transform-style: preserve-3d;
  transform: rotateX(50deg) rotateZ(-8deg) translateY(10px);
  pointer-events: none;
}

.home-stage3d__tile {
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid rgba(197, 204, 214, 0.9);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  opacity: 0;
  transform: translateZ(0);
  animation: tileLift 5.2s cubic-bezier(.2, .8, .2, 1) infinite;
  animation-delay: var(--delay, 0ms);
}

.home-stage3d__tile.is-head {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
  font-size: 8px;
}

.home-stage3d__tile.is-empty {
  background: rgba(255, 255, 255, 0.38);
  color: transparent;
}

.home-stage3d__tile.is-low {
  background: var(--yellow-soft);
  border-color: rgba(155, 106, 0, 0.5);
  color: var(--yellow);
}

.home-stage3d__tile.is-hr {
  background: var(--accent-soft);
  border-color: rgba(8, 117, 209, 0.55);
  color: var(--accent);
}

.home-stage3d__tile::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 8px;
  height: 8px;
  border: 1px solid currentColor;
  opacity: 0.28;
  transform: rotate(45deg);
}

.home-stage3d__tile.is-head::after,
.home-stage3d__tile.is-empty::after {
  display: none;
}

@keyframes scanAcross {
  0%, 10% { left: -24%; opacity: 0; }
  16%, 78% { opacity: 1; }
  88%, 100% { left: 104%; opacity: 0; }
}

@keyframes tileLift {
  0%, 22% {
    opacity: 0;
    transform: translateZ(0) translateY(0);
  }
  38%, 78% {
    opacity: 1;
    transform: translateZ(var(--lift, 22px)) translateY(var(--float, -2px));
  }
  100% {
    opacity: 0;
    transform: translateZ(0) translateY(0);
  }
}

@keyframes stagePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.42; transform: scale(0.72); }
}

@keyframes inkReveal {
  0%, 10% {
    opacity: 0;
    filter: blur(2px);
  }

  24%, 74% {
    opacity: 0.82;
    filter: blur(0);
  }

  100% {
    opacity: 0.18;
    filter: blur(0.6px);
  }
}

@keyframes storyScanPass {
  0%, 12% {
    left: -28%;
    opacity: 0;
  }

  18%, 74% {
    opacity: 1;
  }

  88%, 100% {
    left: 106%;
    opacity: 0;
  }
}

@keyframes storyCellReveal {
  0%, 24% {
    opacity: 0;
  }

  38%, 82% {
    opacity: var(--op, 1);
  }

  100% {
    opacity: 0.58;
  }
}

@keyframes storyPieceFloat {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(var(--float-y, -4px));
  }
}

.stage-list {
  display: grid;
  gap: var(--s-2);
}

.stage-item {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: var(--s-3);
  padding: var(--s-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.stage-item {
  transition: border-color 250ms ease, background-color 250ms ease, opacity 250ms ease;
}

.stage-item.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.stage-item.is-complete {
  border-color: var(--accent);
  background: var(--surface);
}

.stage-item.is-complete span::after {
  content: " ✓";
  color: var(--accent);
}

.stage-item span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.stage-item strong,
.stage-item small {
  display: block;
}

.stage-item small {
  margin-top: 2px;
  color: var(--text-muted);
}

.flash-messages {
  display: grid;
  gap: var(--s-2);
}


/* ── Upload progress modal ─────────────────────────────────────────────── */
.upload-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 32px);
}

.upload-modal[hidden] { display: none !important; }

.upload-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.upload-modal__card {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(20px, 3vw, 32px);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
  display: grid;
  gap: var(--s-3);
  animation: upload-modal-pop 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes upload-modal-pop {
  from { transform: translateY(8px) scale(0.98); opacity: 0; }
  to   { transform: translateY(0)   scale(1);    opacity: 1; }
}

.upload-modal__head .eyebrow { margin: 0; }
.upload-modal__head h2 {
  margin: 4px 0 0;
  font-size: clamp(20px, 2.4vw, 28px);
  letter-spacing: -0.01em;
}

.upload-modal__thumb {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  background: var(--accent-soft);
}
.upload-modal__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.upload-modal__progress { display: grid; gap: var(--s-2); }

.upload-modal__bar {
  height: 8px;
  background: var(--accent-soft);
  border-radius: 999px;
  overflow: hidden;
}
.upload-modal__bar > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: inherit;
  transition: width 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.upload-modal__stage {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.upload-modal__stage.is-success {
  color: var(--accent);
  font-weight: 700;
}

.upload-modal__actions {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
  margin-top: var(--s-2);
}
.upload-modal__actions .btn { flex: 1 1 auto; text-align: center; }

.upload-modal__error {
  border-top: 1px solid var(--border);
  padding-top: var(--s-3);
  display: grid;
  gap: var(--s-2);
}
.upload-modal__error-msg {
  margin: 0;
  color: #b00020;
}

body.has-modal-open { overflow: hidden; }


/* ── Results page (rebuild) ─────────────────────────────────────────────
   The .results-page / .result-summary / .results-workspace CSS further
   below predates this rebuild — left in place since other code may still
   reference it, but new layout uses the `.rp-*` namespace exclusively. */

.results-shell {
  --bg: #fafafa;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f6f8;
  --surface-3: #edf0f4;
  --border: #e1e5ea;
  --border-strong: #c5ccd6;
  --divider: #eef1f4;
  --text: #101318;
  --text-2: #2f3742;
  --text-muted: #5b6472;
  --text-faint: #8a93a0;
  --accent: #0875d1;
  --accent-hover: #0667b8;
  --accent-soft: rgba(8, 117, 209, 0.10);
  --accent-fg: #ffffff;
  --green: #168a4a;
  --green-soft: rgba(22, 138, 74, 0.12);
  --yellow: #9b6a00;
  --yellow-soft: rgba(183, 126, 0, 0.15);
  --warning: #9b6a00;
  --red: #c2342b;
  --red-soft: rgba(194, 52, 43, 0.12);
  --shadow-1: 0 1px 2px rgba(14, 20, 30, 0.06);
  --shadow-2: 0 14px 34px rgba(14, 32, 38, 0.09);
  background:
    linear-gradient(180deg, rgba(8, 117, 209, 0.06), transparent 260px),
    var(--bg);
}

.results-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.74), transparent 220px);
}

.results-shell > * {
  position: relative;
  z-index: 1;
}

.results-shell .appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: auto;
  background: rgba(250, 250, 250, 0.88);
  backdrop-filter: blur(18px);
  border-bottom-color: var(--border);
}

.results-shell .brand-mark {
  color: var(--text-2);
}

.results-shell .btn {
  box-shadow: none;
}

.results-shell .btn--ghost {
  color: var(--text-2);
  border-color: var(--border);
}

.results-shell .btn--ghost:hover {
  background: var(--surface);
  border-color: var(--border-strong);
  text-decoration: none;
}

.results-shell .appbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.rp-page {
  width: min(100% - 32px, 1360px);
  margin: 0 auto;
  padding: 30px 0 80px;
  display: grid;
  gap: 20px;
}

.rp-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(18px, 3vw, 34px);
  align-items: end;
  padding: clamp(20px, 3vw, 32px);
  overflow: hidden;
  border: 1px solid rgba(18, 45, 62, 0.12);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 253, 244, 0.96), rgba(246, 250, 251, 0.96) 60%, rgba(234, 242, 238, 0.92)),
    var(--surface);
  box-shadow: 0 14px 34px rgba(14, 32, 38, 0.08);
}
.rp-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(189, 48, 57, 0.08), transparent 18%);
}
.rp-hero > * {
  position: relative;
  z-index: 1;
}
.rp-hero__lead { display: grid; gap: var(--s-2); }
.rp-hero__lead .eyebrow {
  width: fit-content;
  margin: 0;
  padding: 5px 9px;
  border: 1px solid rgba(8, 117, 209, 0.18);
  border-radius: 999px;
  background: rgba(8, 117, 209, 0.08);
  color: var(--accent);
}
.rp-hero__title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: 0;
}
.rp-hero__sub {
  margin: 0;
  max-width: 720px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.45;
}
.rp-hero__sub code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
}
.rp-hero__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.rp-team-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 0;
  padding: 0;
}
.rp-team-tab {
  appearance: none;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  cursor: pointer;
  box-shadow: var(--shadow-1);
}
.rp-team-tab.is-active {
  color: var(--accent);
  border-color: rgba(8, 117, 209, 0.42);
  background: var(--accent-soft);
}
.rp-team-panel.is-hidden { display: none; }

/* ── Workspace: photo + review stage, data below ─────────────────────── */
.rp-workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(20px, 2.6vw, 32px);
}

.rp-review-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(320px, 24vw, 430px);
  align-items: start;
  gap: 18px;
}

.rp-photo-pane {
  position: relative;
  display: grid;
  gap: var(--s-2);
  /* Cap the photo height so a tall scorecard doesn't push the grid off-screen. */
  max-width: min(1180px, 100%);
  margin: 0 auto;
  width: 100%;
}

.rp-review-stage .rp-photo-pane {
  max-width: none;
  margin: 0;
}

.rp-side-pane {
  align-self: stretch;
  position: sticky;
  top: 16px;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 12px;
  max-height: min(82vh, 920px);
  min-height: 0;
}

.rp-review-stage .rp-review-card {
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
  padding: 14px;
  gap: 10px;
}

.rp-photo-frame {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: auto;
  background: var(--surface-2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 14px 34px rgba(14, 32, 38, 0.09);
  /* Aspect inferred from the image once it loads; this min-height stops
     layout jumping while the JPEG decodes on a slow connection. */
  min-height: 240px;
  max-height: min(82vh, 920px);
}

.rp-section-tabs {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 8;
  width: max-content;
  max-width: calc(100% - 20px);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: 0;
  padding: 3px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(10px);
}

.rp-section-tab {
  min-height: 28px;
  appearance: none;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  padding: 6px 10px;
  white-space: nowrap;
  transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.rp-section-tab:hover,
.rp-section-tab.is-active {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 5px 14px rgba(8, 117, 209, 0.20);
}

.rp-section-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.rp-photo-canvas {
  position: relative;
  width: calc(100% * var(--rp-photo-zoom, 1));
  min-width: 100%;
  line-height: 0;
}
.rp-photo-img {
  display: block;
  width: 100%;
  height: auto;
}
.rp-photo-missing {
  padding: 32px;
  color: var(--text-muted);
  text-align: center;
  font-size: 14px;
}

.rp-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.rp-overlay.is-hidden { display: none; }

.rp-section-focus {
  position: absolute;
  z-index: 1;
  border: 2px solid var(--accent);
  border-radius: 4px;
  background: rgba(203, 238, 243, 0.08);
  box-shadow:
    0 0 0 9999px rgba(16, 19, 24, 0.04),
    0 0 0 4px rgba(8, 117, 209, 0.18),
    0 12px 26px rgba(8, 117, 209, 0.16);
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.rp-section-focus.is-visible {
  opacity: 1;
}

.rp-section-hotspot {
  position: absolute;
  z-index: 1;
  appearance: none;
  border: 0;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  padding: 0;
  transition: background-color 120ms ease, box-shadow 120ms ease;
}

.rp-section-hotspot:hover,
.rp-section-hotspot:focus-visible {
  background: rgba(8, 117, 209, 0.08);
  box-shadow: inset 0 0 0 2px rgba(8, 117, 209, 0.28);
}

.rp-section-hotspot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.rp-marker-pin {
  position: absolute;
  z-index: 3;
  width: var(--rp-pin-size, 8px);
  min-width: 0;
  height: var(--rp-pin-size, 8px);
  display: grid;
  place-items: center;
  border: 1px solid #ffffff;
  border-radius: 2px;
  --pin-color: var(--yellow);
  background: var(--pin-color);
  color: #ffffff;
  pointer-events: auto;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: var(--rp-pin-font-size, 6px);
  font-weight: 800;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(16, 19, 24, 0.24));
  transform: none;
  transform-origin: 0 0;
  transition: transform 120ms ease, filter 120ms ease, opacity 120ms ease;
  padding: 0;
  outline: none;
}
.rp-marker-pin::after {
  content: none;
}
.rp-marker-pin--danger { --pin-color: var(--red); }
.rp-marker-pin--info { --pin-color: var(--accent); }
.rp-marker-pin--mlb {
  width: auto;
  min-width: 24px;
  padding-inline: 6px;
  border-radius: 999px;
}
.rp-marker-pin:hover,
.rp-marker-pin.is-active {
  filter: drop-shadow(0 0 2px #ffffff) drop-shadow(0 3px 5px rgba(16, 19, 24, 0.3));
  transform: scale(1.18);
}
.rp-marker-pin.is-resolved {
  opacity: 0.38;
}

.rp-marker-focus {
  position: absolute;
  z-index: 3;
  border: 2px solid rgba(47, 120, 150, 0.92);
  border-radius: 3px;
  background: rgba(47, 120, 150, 0.08);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.9),
    0 0 0 4px rgba(47, 120, 150, 0.16);
  pointer-events: none;
}

.rp-marker-focus--danger {
  border-color: rgba(194, 52, 43, 0.9);
  background: rgba(194, 52, 43, 0.08);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.9),
    0 0 0 4px rgba(194, 52, 43, 0.14);
}

.rp-cellbox {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  background: transparent;
  color: rgba(8, 117, 209, 0.62);
  pointer-events: auto;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  transition: background-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}
.rp-cellbox--med { color: rgba(232, 156, 36, 0.95); }
.rp-cellbox--low { color: rgba(220, 38, 38, 0.95); }
.rp-cellbox--empty { color: rgba(120, 120, 120, 0.35); pointer-events: none; }
.rp-cellbox--boxes {
  color: rgba(8, 117, 209, 0.45);
}
.rp-locatorbox {
  z-index: 4;
  border-width: 2px;
  background: rgba(255, 250, 241, 0.08);
  cursor: default;
}
.rp-locatorbox--batter {
  color: rgba(45, 140, 85, 0.92);
}
.rp-locatorbox--pitcher {
  color: rgba(180, 72, 62, 0.92);
}
.rp-cellbox--confidence {
  background: color-mix(in srgb, currentColor 12%, transparent);
}
.rp-cellbox:hover,
.rp-cellbox.is-active {
  background-color: color-mix(in srgb, currentColor 18%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 35%, transparent);
  transform: scale(1.03);
}

.rp-photo-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-2);
  padding: 3px 2px 0;
  font-size: 12px;
  color: var(--text-muted);
}
.rp-photo-legend {
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
}
.rp-photo-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rp-swatch {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 2px;
  border: 1.5px solid;
}
.rp-swatch--marker { color: var(--yellow); background: var(--yellow-soft); }
.rp-swatch--conflict { color: var(--red); background: var(--red-soft); }
.rp-swatch--debug { color: var(--accent); background: var(--accent-soft); }
.rp-swatch--locator-batter { color: var(--green); background: var(--green-soft); }
.rp-swatch--locator-pitcher { color: var(--red); background: var(--red-soft); }

.rp-overlay-mode,
.rp-photo-zoom {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
}
.rp-overlay-mode legend,
.rp-photo-zoom legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.rp-overlay-mode label,
.rp-photo-zoom label {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}
.rp-overlay-mode input,
.rp-photo-zoom input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.rp-overlay-mode span,
.rp-photo-zoom span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
.rp-overlay-mode input:checked + span,
.rp-photo-zoom input:checked + span {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: var(--shadow-1);
}
.rp-overlay-mode input:focus-visible + span,
.rp-photo-zoom input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.rp-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.rp-toggle input {
  width: 14px; height: 14px;
  accent-color: var(--accent);
}

/* ── Data pane ──────────────────────────────────────────────────────── */
.rp-data-pane {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
  min-width: 0;
}

.rp-stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: var(--s-2);
}
.rp-stat {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px 14px;
  display: grid;
  gap: 4px;
}
.rp-stat--accent {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.rp-stat__label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.rp-stat__value {
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.rp-stat__value small {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.rp-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  padding: clamp(16px, 2.2vw, 24px);
  display: grid;
  gap: var(--s-3);
  min-width: 0;
  box-shadow: var(--shadow-1);
}
.rp-card__head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: var(--s-3);
  flex-wrap: wrap;
}
.rp-card__head h2 {
  margin: 4px 0 0;
  font-size: clamp(18px, 1.8vw, 22px);
  letter-spacing: -0.01em;
}
.rp-card__head .eyebrow { margin: 0; }

.rp-scan-warning {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0 0 14px;
  padding: 12px 16px;
  border: 1px solid rgba(183, 126, 0, 0.24);
  border-radius: var(--radius);
  background: rgba(183, 126, 0, 0.10);
  color: var(--text-2);
  box-shadow: var(--shadow-1);
}

.rp-scan-warning.is-bad {
  border-color: rgba(194, 52, 43, 0.28);
  background: var(--red-soft);
}

.rp-scan-warning__icon {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  background: var(--yellow);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.rp-scan-warning.is-bad .rp-scan-warning__icon {
  background: var(--red);
}

.rp-scan-warning__body {
  min-width: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.rp-scan-warning__body strong {
  color: var(--yellow);
}

.rp-scan-warning.is-bad .rp-scan-warning__body strong {
  color: var(--red);
}

.rp-scan-warning__meta {
  margin-top: 5px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.rp-grid-card {
  gap: 10px;
  padding: clamp(12px, 1.5vw, 18px);
}

.rp-grid-card .grid-scroll { margin-inline: -8px; }

.rp-inning-window {
  display: flex;
  align-items: center;
  margin: 0 0 8px;
}

/* Single right-arrow pill that cycles inning windows. */
.rp-window-next {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 5px 0 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.rp-window-next__arrow {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(36, 39, 38, 0.10);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.rp-window-next:hover {
  border-color: rgba(8, 117, 209, 0.45);
  color: var(--accent);
}

/* More innings remain beyond the current view → accent so the user clicks. */
.rp-window-next.has-more {
  border-color: transparent;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 9px rgba(8, 117, 209, 0.32);
}

.rp-window-next.has-more:hover {
  background: #0a66b8;
  color: #fff;
}

.rp-window-next.has-more .rp-window-next__arrow {
  background: rgba(255, 255, 255, 0.22);
}

.rp-pitcher-card {
  gap: 14px;
}

.rp-pitcher-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.rp-pitcher-table {
  --scorecard-cream: #ffffff;
  --scorecard-peach: #f4f6f8;
  --scorecard-header: #e8f2f8;
  --scorecard-sage: #f4f6f8;
  --scorecard-starter: #dcecf6;
  --scorecard-starter-cell: rgba(232, 241, 245, 0.84);
  --scorecard-sub: #eaf4f1;
  --scorecard-sub-cell: rgba(238, 246, 244, 0.88);
  --scorecard-alert: #bd3039;
  --scorecard-play: #0875d1;
  --scorecard-ink: #101318;
  --scorecard-muted: #5b6472;
  --scorecard-line: #e1e5ea;
  --scorecard-pole: #0875d1;
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  background: var(--scorecard-cream);
}

.rp-pitcher-table caption {
  height: 1px;
  width: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
}

.rp-pitcher-table th,
.rp-pitcher-table td {
  height: 34px;
  padding: 6px 7px;
  border-right: 1px solid var(--scorecard-line);
  border-bottom: 1px solid var(--scorecard-line);
  text-align: center;
  vertical-align: middle;
}

.rp-pitcher-table th:last-child,
.rp-pitcher-table td:last-child {
  border-right: 0;
}

.rp-pitcher-table thead th {
  height: 28px;
  background: var(--scorecard-header);
  color: var(--scorecard-ink);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.rp-pitcher-table tfoot th,
.rp-pitcher-table tfoot td {
  height: 30px;
  background: var(--scorecard-header);
  color: var(--scorecard-ink);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.rp-pitcher-table tbody td {
  background: var(--scorecard-starter-cell);
}

.rp-pitcher-table tbody tr.is-starter-pitcher td {
  background: var(--scorecard-starter-cell);
}

.rp-pitcher-table tbody tr.is-starter-pitcher .rp-pitcher-name-cell {
  background:
    linear-gradient(90deg, var(--scorecard-starter) 0 5px, var(--scorecard-starter-cell) 5px);
}

.rp-pitcher-table tbody tr.is-relief-pitcher td {
  background: var(--scorecard-starter-cell);
}

.rp-pitcher-table tbody tr.is-relief-pitcher .rp-pitcher-name-cell {
  background:
    linear-gradient(90deg, var(--scorecard-starter) 0 5px, var(--scorecard-starter-cell) 5px);
}

.rp-pitcher-table tbody tr.is-low td,
.rp-pitcher-table tbody tr.is-low .rp-pitcher-name-cell {
  box-shadow: none;
}

.rp-pitcher-hand,
.rp-pitcher-no,
.rp-pitcher-stat {
  color: var(--scorecard-muted);
  font-family: var(--font-mono);
  font-weight: 800;
}

.rp-pitcher-hand {
  width: 28px;
}

.rp-pitcher-no {
  width: 34px;
}

.rp-pitcher-name-cell {
  position: relative;
  min-width: 0;
  text-align: center;
}

.rp-pitcher-name-btn {
  width: 100%;
  min-width: 0;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 5px;
  justify-items: center;
  padding: 0;
  text-align: center;
  font: inherit;
}

.rp-pitcher-name-btn span {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.rp-pitcher-name-btn strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 850;
}

.rp-pitcher-name-btn em {
  flex: 0 0 auto;
  color: var(--scorecard-pole);
  font-family: var(--font-mono);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.rp-pitcher-table tbody tr.is-starter-pitcher .rp-pitcher-name-btn {
  padding-right: 0;
}

.rp-pitcher-name-btn:hover strong,
.rp-pitcher-name-btn:focus-visible strong,
.rp-pitcher-name-btn.is-low-confidence strong {
  color: var(--scorecard-pole);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.rp-pitcher-name-btn:focus-visible {
  outline: 2px solid rgba(8, 117, 209, 0.28);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.rp-pitcher-table th:nth-child(1),
.rp-pitcher-table td:nth-child(1) { width: 28px; }
.rp-pitcher-table th:nth-child(2),
.rp-pitcher-table td:nth-child(2) { width: 36px; }
.rp-pitcher-table th:nth-child(3),
.rp-pitcher-table td:nth-child(3) { width: 210px; }
.rp-pitcher-table th:nth-child(4),
.rp-pitcher-table td:nth-child(4) { width: 58px; }
.rp-pitcher-table th:nth-child(n+5),
.rp-pitcher-table td:nth-child(n+5) { width: 42px; }

.rp-pitcher-empty {
  min-height: 56px;
  margin: 0;
  display: grid;
  place-items: center start;
  padding: 12px 14px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text-faint);
  font-weight: 650;
}

.rp-locator-card {
  gap: 16px;
}

.rp-locator-counts {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.rp-locator-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.rp-locator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  min-width: 0;
}

.rp-locator-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.rp-locator-panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--divider);
}

.rp-locator-panel__head h3 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
}

.rp-locator-panel__head span {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.rp-locator-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.rp-locator-table {
  width: 100%;
  min-width: 460px;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.rp-locator-table th,
.rp-locator-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--divider);
  text-align: left;
  vertical-align: top;
}

.rp-locator-table th {
  background: var(--surface-2);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.rp-locator-table tbody tr:last-child td {
  border-bottom: 0;
}

.rp-locator-row-id {
  width: 52px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-weight: 800;
}

.rp-locator-names {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.rp-locator-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  color: var(--text);
  font-weight: 700;
  line-height: 1.2;
}

.rp-locator-name > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rp-locator-name em {
  flex: 0 0 auto;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.rp-locator-name.is-muted,
.rp-locator-empty,
.rp-locator-none {
  color: var(--text-faint);
  font-weight: 600;
}

.rp-locator-empty {
  min-height: 44px;
  margin: 0;
  display: grid;
  place-items: center start;
  padding: 10px 12px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.rp-locator-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rp-locator-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 3px 6px;
  border: 1px solid rgba(8, 117, 209, 0.18);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
}

.rp-locator-chip__label {
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 800;
}

.rp-locator-chip__count {
  display: inline-grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  border-radius: var(--radius-xs);
  background: var(--accent);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
}

.rp-locator-chip__conf {
  color: var(--green);
  font-weight: 800;
}

.rp-review-stage .rp-review-card {
  background: rgba(255, 255, 255, 0.94);
  border-color: var(--border);
}

.rp-lens-card {
  min-height: 0;
  padding: 14px;
  gap: 10px;
  border-color: rgba(8, 117, 209, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 251, 0.92));
}

.rp-lens-card .rp-card__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.rp-lens-card .rp-card__head h2 {
  font-size: 17px;
  line-height: 1.12;
}

.rp-lens-mode {
  display: inline-flex;
  width: 100%;
  padding: 3px;
  gap: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.rp-lens-mode__btn,
.rp-lens-inning {
  appearance: none;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.rp-lens-mode__btn {
  flex: 1;
  min-height: 30px;
  padding: 7px 10px;
}

.rp-lens-mode__btn:hover,
.rp-lens-mode__btn.is-active,
.rp-lens-inning:hover,
.rp-lens-inning.is-active {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(8, 117, 209, 0.18);
}

.rp-lens-mode__btn:focus-visible,
.rp-lens-inning:focus-visible,
.rp-lens-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.rp-lens-innings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(30px, 1fr));
  gap: 4px;
}

.rp-lens-innings[hidden] {
  display: none;
}

.rp-lens-inning {
  min-height: 28px;
  padding: 6px 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
}

.rp-lens-output {
  min-height: 0;
  display: grid;
  gap: 9px;
}

.rp-lens-summary {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 7px 9px;
  border: 1px solid rgba(8, 117, 209, 0.16);
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.25;
}

.rp-lens-summary--plays,
.rp-lens-summary--lineup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-content: stretch;
  gap: 6px;
  font-size: 10px;
}

.rp-lens-summary--plays > span,
.rp-lens-summary--lineup > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rp-lens-summary strong {
  color: var(--accent);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.rp-lens-reset-all,
.rp-lens-reset-cell {
  appearance: none;
  border: 1px solid #9fc4aa;
  border-radius: var(--radius-sm);
  background: #e8f3ec;
  color: #245f3c;
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.rp-lens-reset-all {
  margin-left: auto;
  padding: 5px 7px;
  font-size: 10px;
}

.rp-lens-reset-cell {
  justify-self: end;
  padding: 5px 7px;
}

.rp-lens-reset-all:hover,
.rp-lens-reset-cell:hover {
  border-color: #6fa47d;
  background: #d7eadc;
  color: #16462c;
}

.rp-lens-reset-all:disabled,
.rp-lens-reset-cell:disabled {
  border-color: var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: default;
  opacity: 1;
}

.rp-lens-list {
  display: grid;
  gap: 5px;
  max-height: min(58vh, 560px);
  overflow: auto;
  padding-right: 2px;
}

.rp-lens-row {
  position: relative;
  width: 100%;
  min-width: 0;
  appearance: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.rp-lens-row:hover,
.rp-lens-row.is-active,
.rp-lens-row.is-linked-highlight {
  border-color: rgba(8, 117, 209, 0.42);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(8, 117, 209, 0.12);
}

.rp-lens-row.is-low {
  background: rgba(183, 126, 0, 0.11);
  border-color: rgba(183, 126, 0, 0.24);
}

.rp-lens-row.has-review {
  border-color: rgba(183, 126, 0, 0.34);
  box-shadow: inset 3px 0 0 rgba(183, 126, 0, 0.68);
}

.rp-lens-row.has-review.is-review-danger {
  border-color: rgba(194, 52, 43, 0.34);
  box-shadow: inset 3px 0 0 rgba(194, 52, 43, 0.70);
}

.rp-lens-row.has-review.is-review-info {
  border-color: rgba(8, 117, 209, 0.30);
  box-shadow: inset 3px 0 0 rgba(8, 117, 209, 0.52);
}

.rp-lens-row.has-review::after {
  content: attr(data-review-count);
  position: absolute;
  top: 6px;
  right: 6px;
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--yellow);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

.rp-lens-row.has-review.is-review-danger::after {
  background: var(--red);
}

.rp-lens-row.has-review.is-review-info::after {
  background: var(--accent);
}

.rp-lens-row--lineup {
  display: grid;
  grid-template-columns: 28px minmax(28px, auto) minmax(0, 1fr) minmax(42px, auto) auto;
  gap: 9px;
  align-items: center;
  padding: 8px 9px;
}

.rp-lens-row--lineup.is-user-corrected {
  border-color: rgba(47, 125, 80, 0.42);
  background: rgba(47, 125, 80, 0.07);
  box-shadow: inset 3px 0 0 rgba(47, 125, 80, 0.72);
}

.rp-lens-slot {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
}

.rp-lens-jersey,
.rp-lens-names,
.rp-lens-pos {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.rp-lens-jersey span,
.rp-lens-names span,
.rp-lens-pos span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
}

.rp-lens-jersey span {
  text-align: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.rp-lens-jersey .is-sub,
.rp-lens-names .is-sub,
.rp-lens-pos .is-sub {
  padding-top: 3px;
  border-top: 1px solid var(--divider);
  color: var(--text-muted);
  font-weight: 700;
}

.rp-lens-pos {
  justify-items: end;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.rp-lens-lineup-actions {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  align-self: stretch;
  gap: 5px;
  min-width: 0;
}

.rp-lens-row--lineup.is-user-corrected .rp-lens-lineup-actions .rp-lens-tag--corrected {
  position: absolute;
  left: 3px;
  top: 50%;
  min-width: 34px;
  height: 14px;
  padding: 0 4px;
  transform: translate(-50%, -50%) rotate(270deg);
  transform-origin: center;
}

.rp-lens-row--lineup.is-user-corrected .rp-lens-lineup-actions .rp-lens-reset-cell {
  position: absolute;
  top: 50%;
  left: 50%;
  align-self: center;
  z-index: 2;
  transform: translate(-50%, -50%);
}

.rp-lens-row--play {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 8px 9px;
}

.rp-lens-row--play.is-split-slot {
  background: rgba(246, 250, 251, 0.78);
}

.rp-lens-row--play.is-empty {
  opacity: 0.54;
}

.rp-lens-row--play.is-empty.is-user-corrected {
  opacity: 1;
}

.rp-lens-row--play.is-empty.is-user-corrected .rp-lens-slot {
  opacity: 0.54;
}

.rp-lens-row--play.is-user-corrected {
  position: relative;
  border-color: rgba(47, 125, 80, 0.42);
  background: rgba(47, 125, 80, 0.07);
  box-shadow: inset 3px 0 0 rgba(47, 125, 80, 0.72);
}

.rp-lens-slot-plays {
  display: grid;
  gap: 0;
  min-width: 0;
}

.rp-lens-play-line {
  display: grid;
  grid-template-columns: minmax(72px, 1fr) 42px minmax(62px, auto);
  gap: 8px;
  align-items: center;
  min-width: 0;
  min-height: 30px;
}

.rp-lens-play-line.is-sub {
  margin-top: 4px;
  padding-top: 5px;
  border-top: 1px solid var(--divider);
}

.rp-lens-play-line.is-empty {
  opacity: 0.55;
}

.rp-lens-play-line.is-empty.is-user-corrected {
  opacity: 1;
}

.rp-lens-play-line.is-empty.is-user-corrected .rp-lens-play-name,
.rp-lens-play-line.is-empty.is-user-corrected .rp-lens-play-code,
.rp-lens-play-line.is-empty.is-user-corrected .rp-lens-play-meta > span:not(.rp-lens-tag--corrected) {
  opacity: 0.55;
}

.rp-lens-play-line.is-empty.is-user-corrected .rp-lens-tag--corrected,
.rp-lens-play-line.is-empty.is-user-corrected .rp-lens-reset-cell {
  opacity: 1;
}

.rp-lens-play-line.is-user-corrected {
  margin: 0;
  padding: 0;
  border-radius: var(--radius-sm);
  background: rgba(47, 125, 80, 0.08);
}

.rp-lens-play-line.is-user-corrected .rp-lens-tag--corrected {
  position: absolute;
  left: 3px;
  top: 50%;
  min-width: 34px;
  height: 14px;
  padding: 0 4px;
  transform: translate(-50%, -50%) rotate(270deg);
  transform-origin: center;
}

.rp-lens-play-line.is-user-corrected .rp-lens-reset-cell {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
}

.rp-lens-play-line .rp-lens-reset-placeholder {
  display: none;
}

.rp-lens-play-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 750;
}

.rp-lens-play-name small {
  margin-left: 4px;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.rp-lens-play-code {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  min-height: 26px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 900;
}

.rp-lens-play-code.is-run {
  background: rgba(8, 117, 209, 0.12);
  color: var(--run-scored);
  box-shadow: inset 0 0 0 1px rgba(8, 117, 209, 0.18);
}

.rp-lens-play-meta {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  min-width: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
}

.rp-lens-tags {
  display: inline-flex;
  gap: 3px;
  min-width: 0;
}

.rp-lens-tag {
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 15px;
  padding: 0 4px;
  border: 1px solid rgba(8, 117, 209, 0.14);
  border-radius: 3px;
  background: var(--surface);
  color: var(--accent);
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
}

.rp-lens-tag--secondary {
  background: var(--yellow-soft);
  border-color: rgba(183, 126, 0, 0.20);
}

.rp-lens-tag--context {
  background: var(--accent-soft);
  border-color: rgba(8, 117, 209, 0.20);
}

.rp-lens-tag--corrected {
  min-width: 36px;
  border-color: #6fa47d;
  background: #dff0e5;
  color: #16462c;
}

.rp-lens-reset-placeholder {
  width: 1px;
  min-height: 1px;
}

.rp-lens-row--pitcher {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 8px 9px;
}

.rp-lens-pitcher-names {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.rp-lens-pitcher-names span {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.rp-lens-pitcher-names strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.rp-lens-pitcher-names em {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.rp-lens-pitcher-fields {
  grid-column: 2;
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.rp-lens-field-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 18px;
  padding: 2px 5px;
  border: 1px solid rgba(8, 117, 209, 0.16);
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
}

.rp-lens-field-chip strong {
  display: inline-grid;
  place-items: center;
  min-width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--accent);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 9px;
}

.rp-lens-field-chip em {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-style: normal;
}

.rp-lens-empty {
  padding: 16px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.rp-lens-reviewbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 2px;
}

.rp-lens-reviewbar .rp-review-counts {
  flex: 1 1 auto;
  min-width: 0;
}

/* ===== Source-lens panel — paper-scorecard theme =========================
   Re-skins the review/lens panel to match the printed-scorecard grid: cream
   paper, charcoal-green ink, hairline rules, a green run/hit accent and a warm
   ochre "needs review" flag — replacing the default blue app accents. Scoped
   under .rp-lens-card so it overrides the base rules above without touching the
   shared review-stage styles. */
.rp-lens-card {
  --lens-paper: #fbfaf2;
  --lens-cream: #f1efe4;
  --lens-ink: #222726;
  --lens-muted: #6c716c;
  --lens-line: #cdd2c9;
  --lens-line-strong: #9aa195;
  --lens-header: #333937;
  --lens-accent: #2f7d50;
  --lens-accent-soft: rgba(47, 125, 80, 0.10);
  --lens-flag: #ad7a1e;
  --lens-flag-soft: rgba(173, 122, 30, 0.13);
  border-color: var(--lens-line-strong);
  background: linear-gradient(180deg, #fffdf6, #f6f4ea);
}

.rp-lens-card .eyebrow {
  color: var(--lens-accent);
}

.rp-lens-card .rp-card__head h2 {
  color: var(--lens-ink);
}

/* Mode tabs → cream segmented control; active = charcoal-green like the
   scorecard table header. */
.rp-lens-card .rp-lens-mode {
  border-color: var(--lens-line);
  background: var(--lens-cream);
}

.rp-lens-card .rp-lens-mode__btn {
  color: var(--lens-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rp-lens-card .rp-lens-mode__btn:hover {
  background: rgba(47, 125, 80, 0.12);
  color: var(--lens-accent);
  box-shadow: none;
}

.rp-lens-card .rp-lens-mode__btn.is-active {
  background: var(--lens-header);
  color: #fbfaf2;
  box-shadow: none;
}

.rp-lens-card .rp-lens-mode__btn:focus-visible,
.rp-lens-card .rp-lens-inning:focus-visible,
.rp-lens-card .rp-lens-row:focus-visible {
  outline-color: var(--lens-accent);
}

/* Inning selector (Plays tab) */
.rp-lens-card .rp-lens-inning {
  border-color: var(--lens-line);
  background: var(--lens-paper);
  color: var(--lens-muted);
}

.rp-lens-card .rp-lens-inning:hover,
.rp-lens-card .rp-lens-inning.is-active {
  background: var(--lens-header);
  color: #fbfaf2;
  box-shadow: none;
}

/* Summary strip */
.rp-lens-card .rp-lens-summary {
  border-color: var(--lens-line);
  background: var(--lens-cream);
  color: var(--lens-muted);
  font-family: var(--font-mono);
}

.rp-lens-card .rp-lens-summary strong {
  color: var(--lens-accent);
}

/* List rows */
.rp-lens-card .rp-lens-row {
  border-color: var(--lens-line);
  background: var(--lens-paper);
  color: var(--lens-ink);
}

.rp-lens-card .rp-lens-row:hover,
.rp-lens-card .rp-lens-row.is-active,
.rp-lens-card .rp-lens-row.is-linked-highlight {
  border-color: rgba(47, 125, 80, 0.5);
  background: var(--lens-accent-soft);
  box-shadow: inset 0 0 0 1px rgba(47, 125, 80, 0.16);
}

.rp-lens-card .rp-lens-row.is-low {
  border-color: rgba(173, 122, 30, 0.34);
  background: var(--lens-flag-soft);
}

.rp-lens-card .rp-lens-row.has-review {
  border-color: rgba(173, 122, 30, 0.42);
  box-shadow: inset 3px 0 0 var(--lens-flag);
}

.rp-lens-card .rp-lens-row.has-review.is-review-danger {
  border-color: rgba(176, 60, 52, 0.42);
  box-shadow: inset 3px 0 0 #b03c34;
}

.rp-lens-card .rp-lens-row.has-review.is-review-info {
  border-color: rgba(47, 125, 80, 0.4);
  box-shadow: inset 3px 0 0 var(--lens-accent);
}

.rp-lens-card .rp-lens-row.has-review::after {
  background: var(--lens-flag);
  color: #fbfaf2;
}

.rp-lens-card .rp-lens-row.has-review.is-review-danger::after {
  background: #b03c34;
}

.rp-lens-card .rp-lens-row.has-review.is-review-info::after {
  background: var(--lens-accent);
}

/* Slot number badge */
.rp-lens-card .rp-lens-slot {
  background: var(--lens-cream);
  color: var(--lens-accent);
  box-shadow: inset 0 0 0 1px var(--lens-line);
}

/* Names + position numbers */
.rp-lens-card .rp-lens-jersey,
.rp-lens-card .rp-lens-pos {
  color: var(--lens-muted);
}

.rp-lens-card .rp-lens-jersey .is-sub,
.rp-lens-card .rp-lens-names .is-sub,
.rp-lens-card .rp-lens-pos .is-sub {
  border-top-color: var(--lens-line);
  color: var(--lens-muted);
}

/* Play rows */
.rp-lens-card .rp-lens-row--play.is-split-slot {
  background: var(--lens-cream);
}

.rp-lens-card .rp-lens-play-code {
  background: var(--lens-cream);
  color: var(--lens-ink);
}

.rp-lens-card .rp-lens-play-code.is-run {
  background: var(--lens-accent-soft);
  color: var(--lens-accent);
  box-shadow: inset 0 0 0 1px rgba(47, 125, 80, 0.22);
}

/* Tag chips inside rows */
.rp-lens-card .rp-lens-tag {
  border-color: var(--lens-line);
  background: var(--lens-paper);
  color: var(--lens-muted);
}

.rp-lens-card .rp-lens-tag--corrected {
  border-color: #6fa47d;
  background: #dff0e5;
  color: #16462c;
}

.rp-lens-card .rp-lens-tag--secondary {
  background: var(--lens-flag-soft);
  border-color: rgba(173, 122, 30, 0.24);
  color: #6f4e18;
}

.rp-lens-card .rp-lens-tag--context {
  background: var(--lens-accent-soft);
  border-color: rgba(47, 125, 80, 0.24);
  color: var(--lens-accent);
}

/* Pitcher field chips */
.rp-lens-card .rp-lens-field-chip {
  border-color: var(--lens-line);
  background: var(--lens-cream);
  color: var(--lens-ink);
}

.rp-lens-card .rp-lens-field-chip strong {
  background: var(--lens-accent);
  color: #fbfaf2;
}

/* Empty state */
.rp-lens-card .rp-lens-empty {
  border-color: var(--lens-line-strong);
  color: var(--lens-muted);
}

/* Bottom review-count chips */
.rp-lens-card .rp-review-counts span {
  border-color: var(--lens-line);
  background: var(--lens-cream);
  color: var(--lens-muted);
}

.rp-lens-card .rp-review-counts strong {
  color: var(--lens-ink);
}

/* Start-review button */
.rp-lens-card [data-review-start] {
  border-color: var(--lens-line-strong);
  color: var(--lens-accent);
}

.rp-lens-card [data-review-start]:hover {
  border-color: var(--lens-accent);
  background: var(--lens-accent-soft);
  color: var(--lens-accent);
}

/* ===== Pitchers card — paper-scorecard theme ============================
   The pitcher table reuses the scorecard variable names, so swap its cool/blue
   defaults for the warm paper palette and a charcoal-green header to match the
   play grid. */
.rp-pitcher-card .eyebrow {
  color: #2f7d50;
}

.rp-pitcher-table-wrap {
  border-color: #9aa195;
  background: #fbfaf2;
}

.rp-pitcher-table {
  --scorecard-cream: #fbfaf2;
  --scorecard-peach: #f1efe4;
  --scorecard-header: #333937;
  --scorecard-sage: #f1efe4;
  --scorecard-starter: #eef0e7;
  --scorecard-starter-cell: #fbfaf2;
  --scorecard-sub: #f0f3ea;
  --scorecard-sub-cell: #fbfaf2;
  --scorecard-alert: #c7403d;
  --scorecard-play: #2b302f;
  --scorecard-ink: #222726;
  --scorecard-muted: #6c716c;
  --scorecard-line: #cdd2c9;
  --scorecard-pole: #2f7d50;
}

.rp-pitcher-table th,
.rp-pitcher-table td {
  border-color: #cdd2c9;
}

.rp-pitcher-table thead th,
.rp-pitcher-table tfoot th,
.rp-pitcher-table tfoot td {
  background: #333937;
  color: #fbfaf2;
}

.rp-pitcher-table tbody tr.is-starter-pitcher td,
.rp-pitcher-table tbody tr.is-relief-pitcher td {
  background: #fbfaf2;
}

.rp-pitcher-table tbody tr.is-starter-pitcher .rp-pitcher-name-cell,
.rp-pitcher-table tbody tr.is-relief-pitcher .rp-pitcher-name-cell {
  background: linear-gradient(90deg, #eef0e7 0 5px, #fbfaf2 5px);
}

/* low-confidence pitcher row → warm ochre flag */
.rp-pitcher-table tbody tr.is-low td,
.rp-pitcher-table tbody tr.is-low .rp-pitcher-name-cell {
  background: rgba(173, 122, 30, 0.10);
}

.rp-pitcher-name-btn strong {
  color: #222726;
}

.rp-pitcher-name-btn em {
  color: #2f7d50;
}

.rp-pitcher-name-btn:hover strong,
.rp-pitcher-name-btn:focus-visible strong,
.rp-pitcher-name-btn.is-low-confidence strong {
  color: #2f7d50;
}

.rp-pitcher-name-btn:focus-visible {
  outline-color: rgba(47, 125, 80, 0.4);
}

.rp-pitcher-card .btn--ghost {
  border-color: #9aa195;
  color: #2f7d50;
}

.rp-pitcher-card .btn--ghost:hover {
  border-color: #2f7d50;
  background: rgba(47, 125, 80, 0.10);
  color: #2f7d50;
}

.rp-steps-card {
  border-color: rgba(13, 59, 102, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 250, 241, 0.98), rgba(245, 239, 224, 0.88));
}

.rp-step-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.rp-step {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 9px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(83, 60, 35, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 250, 241, 0.74);
}

.rp-step--warn {
  background: #fff3b0;
  border-color: rgba(13, 59, 102, 0.20);
}

.rp-step--error {
  background: #fde8e8;
  border-color: rgba(176, 45, 54, 0.26);
}

.rp-step__index {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  background: #0d3b66;
  color: #fffaf1;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
}

.rp-step__body {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.rp-step__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.rp-step__head h3 {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
}

.rp-step__head span {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.rp-step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.rp-step__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
}

.rp-step__metrics div {
  min-width: 54px;
  padding: 5px 6px;
  border-radius: 5px;
  background: rgba(13, 59, 102, 0.07);
}

.rp-step__metrics dt {
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.rp-step__metrics dd {
  margin: 2px 0 0;
  color: #0d3b66;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
}

.rp-step__notes {
  display: grid;
  gap: 3px;
  margin: 0;
  padding-left: 14px;
  color: var(--text);
  font-size: 11px;
  line-height: 1.35;
}

.trace-shell {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(245, 239, 224, 0.82), rgba(250, 250, 250, 0.96) 340px),
    var(--bg);
}

.trace-page {
  width: min(100% - 32px, 1480px);
  margin: 0 auto 56px;
  padding-top: 22px;
  display: grid;
  gap: 18px;
}

.trace-hero,
.trace-team__head,
.trace-card {
  border: 1px solid rgba(83, 60, 35, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 250, 241, 0.84);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.76) inset;
}

.trace-hero {
  padding: 18px 20px;
}

.trace-hero h1,
.trace-team__head h2,
.trace-card__head h3 {
  margin: 0;
  color: #101318;
  letter-spacing: 0;
}

.trace-hero h1 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1;
}

.trace-hero p {
  margin: 6px 0 0;
  color: var(--text-muted);
}

.trace-hero code {
  color: #0d3b66;
  font-family: var(--font-mono);
  font-size: 0.95em;
}

.trace-team {
  display: grid;
  gap: 14px;
}

.trace-team__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
}

.trace-team__head h2 {
  font-size: 24px;
  line-height: 1.1;
}

.trace-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  margin: 0;
}

.trace-metrics div {
  min-width: 72px;
  padding: 7px 9px;
  border: 1px solid rgba(13, 59, 102, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.58);
}

.trace-metrics dt {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.trace-metrics dd {
  margin: 4px 0 0;
  color: #0d3b66;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.trace-metrics--context {
  justify-content: flex-start;
}

.trace-card {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.trace-card__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.trace-card__head h3 {
  font-size: 16px;
  line-height: 1.18;
}

.trace-card__head p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.35;
}

.trace-step {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #0d3b66;
  color: #fffaf1;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.16) inset;
}

.trace-figure {
  position: relative;
  margin: 0;
  border: 1px solid rgba(83, 60, 35, 0.18);
  border-radius: 6px;
  overflow: hidden;
  background:
    linear-gradient(45deg, rgba(83, 60, 35, 0.05) 25%, transparent 25% 75%, rgba(83, 60, 35, 0.05) 75%),
    linear-gradient(45deg, rgba(83, 60, 35, 0.05) 25%, transparent 25% 75%, rgba(83, 60, 35, 0.05) 75%);
  background-position: 0 0, 10px 10px;
  background-size: 20px 20px;
}

.trace-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.trace-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.trace-box {
  position: absolute;
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  min-width: 8px;
  min-height: 8px;
  padding: 2px 3px;
  overflow: hidden;
  border: 1.5px solid rgba(13, 59, 102, 0.7);
  color: #0d3b66;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
}

.trace-box--section {
  border-width: 2px;
  background: rgba(203, 238, 243, 0.22);
  box-shadow: 0 0 0 1px rgba(255, 250, 241, 0.82) inset;
}

.trace-box--cell {
  padding: 0;
  border-width: 1px;
}

.trace-box--flagged {
  border-color: #f26a8d;
  background: rgba(255, 243, 176, 0.34);
  box-shadow: 0 0 0 1px rgba(242, 106, 141, 0.18);
}

.trace-box--active {
  border-color: rgba(13, 59, 102, 0.48);
  background: rgba(203, 238, 243, 0.10);
}

.trace-box--empty {
  border-color: rgba(83, 60, 35, 0.16);
  background: transparent;
  opacity: 0.26;
}

.trace-box--missing {
  border-color: rgba(242, 106, 141, 0.72);
  border-style: dashed;
  background: rgba(242, 106, 141, 0.06);
}

.trace-box--sub-entry {
  z-index: 3;
  border-width: 2px;
  border-color: #0875d1;
  background: rgba(203, 238, 243, 0.28);
  color: #0d3b66;
  box-shadow: 0 0 0 2px rgba(255, 250, 241, 0.86), 0 8px 18px rgba(8, 117, 209, 0.18);
}

.trace-box--sub-candidate {
  z-index: 2;
  align-items: flex-end;
  justify-content: flex-start;
  border-width: 1.5px;
  border-color: rgba(155, 106, 0, 0.72);
  background: rgba(255, 243, 176, 0.20);
  color: #6f4b00;
  box-shadow: 0 0 0 1px rgba(255, 250, 241, 0.76);
}

.trace-box--batter-row,
.trace-box--pitcher-row {
  border-width: 2px;
  border-color: rgba(13, 59, 102, 0.62);
  background: rgba(13, 59, 102, 0.06);
}

.trace-box--batter-field {
  border-color: #0875d1;
  background: rgba(203, 238, 243, 0.34);
}

.trace-box--pitcher-field {
  border-color: #9b6a00;
  background: rgba(255, 243, 176, 0.30);
}

.trace-empty {
  min-height: 84px;
  display: grid;
  place-items: center;
  padding: 16px;
  border: 1px dashed rgba(83, 60, 35, 0.22);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.trace-crop-grid,
.trace-row-list {
  display: grid;
  gap: 8px;
}

.trace-crop-grid {
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
}

.trace-crop {
  margin: 0;
  border: 1px solid rgba(83, 60, 35, 0.16);
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255, 250, 241, 0.88);
}

.trace-crop img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #fff;
}

.trace-crop figcaption {
  display: grid;
  gap: 2px;
  padding: 6px 7px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.2;
}

.trace-crop strong {
  color: var(--text);
  font-size: 11px;
}

.trace-crop span,
.trace-row-card em {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-style: normal;
}

.trace-row-list {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.trace-row-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(83, 60, 35, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.52);
}

.trace-row-card strong {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
}

.trace-row-card div {
  display: grid;
  gap: 3px;
}

.trace-row-card span {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.trace-row-card .is-muted {
  color: var(--text-muted);
  font-weight: 600;
}

.trace-warning-list {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(242, 106, 141, 0.22);
  border-radius: 6px;
  background: rgba(255, 243, 176, 0.34);
  color: #6f4b00;
  font-size: 12px;
  font-weight: 700;
}

.trace-warning-list p {
  margin: 0;
}

.trace-resolver-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  overflow-x: auto;
}

.trace-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  color: var(--text);
  font-size: 12px;
}

.trace-table th,
.trace-table td {
  padding: 8px 9px;
  border-bottom: 1px solid rgba(83, 60, 35, 0.12);
  text-align: left;
  vertical-align: top;
}

.trace-table th {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.trace-table td:first-child,
.trace-table td:nth-child(4),
.trace-table td:nth-child(5) {
  color: #0d3b66;
  font-family: var(--font-mono);
  font-weight: 900;
}

.trace-table--compact {
  min-width: 0;
  font-size: 11px;
}

.trace-table--compact th,
.trace-table--compact td {
  padding: 7px 8px;
}

.trace-table tr.is-selected td {
  background: rgba(203, 238, 243, 0.42);
}

.trace-table tr.is-accepted td {
  background: rgba(255, 243, 176, 0.30);
}

.trace-visual-flow {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.trace-visual-flow__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.trace-visual-flow__head h4,
.trace-visual-stage h5 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
}

.trace-visual-flow__head h4 {
  color: #0d3b66;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.trace-visual-flow__head p,
.trace-visual-stage header p {
  margin: 3px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.trace-visual-stage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.trace-visual-stage {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(83, 60, 35, 0.12);
  border-radius: 6px;
  background: rgba(255, 250, 241, 0.54);
}

.trace-visual-stage header {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.trace-visual-stage header > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  background: #0d3b66;
  color: #fffaf1;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
}

.trace-figure--stage {
  border-radius: 4px;
}

.trace-figure--stage img {
  filter: saturate(0.78) contrast(0.92);
}

.trace-svg-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.trace-svg-poly,
.trace-svg-rect,
.trace-svg-line {
  vector-effect: non-scaling-stroke;
}

.trace-svg-poly {
  fill: rgba(13, 59, 102, 0.10);
  stroke: rgba(13, 59, 102, 0.90);
  stroke-width: 2;
}

.trace-svg-rect {
  --trace-opacity: 0.42;
  fill: rgba(13, 59, 102, var(--trace-opacity));
  stroke: rgba(13, 59, 102, 0.90);
  stroke-width: 1.5;
}

.trace-svg-line {
  fill: none;
  stroke: rgba(13, 59, 102, 0.86);
  stroke-width: 2;
  stroke-linecap: round;
}

.trace-svg--section-play_grid,
.trace-stage-swatch.trace-svg--section-play_grid {
  fill: rgba(203, 238, 243, 0.20);
  stroke: #0875d1;
  background: rgba(203, 238, 243, 0.40);
  border-color: #0875d1;
}

.trace-svg--section-player_name_col,
.trace-stage-swatch.trace-svg--section-player_name_col {
  fill: rgba(255, 243, 176, 0.20);
  stroke: #b16a00;
  background: rgba(255, 243, 176, 0.46);
  border-color: #b16a00;
}

.trace-svg--section-summary_col,
.trace-svg--section-summary_row,
.trace-stage-swatch.trace-svg--section-summary_col,
.trace-stage-swatch.trace-svg--section-summary_row {
  fill: rgba(83, 60, 35, 0.08);
  stroke: rgba(83, 60, 35, 0.70);
  background: rgba(83, 60, 35, 0.13);
  border-color: rgba(83, 60, 35, 0.70);
}

.trace-svg--section-inning_header_row,
.trace-stage-swatch.trace-svg--section-inning_header_row {
  fill: rgba(242, 106, 141, 0.10);
  stroke: #f26a8d;
  background: rgba(242, 106, 141, 0.18);
  border-color: #f26a8d;
}

.trace-svg--section-game_header,
.trace-stage-swatch.trace-svg--section-game_header {
  fill: rgba(74, 78, 105, 0.10);
  stroke: #4a4e69;
  background: rgba(74, 78, 105, 0.18);
  border-color: #4a4e69;
}

.trace-svg--section-pitchers_section,
.trace-stage-swatch.trace-svg--section-pitchers_section {
  fill: rgba(64, 58, 102, 0.10);
  stroke: #4a4e69;
  background: rgba(64, 58, 102, 0.16);
  border-color: #4a4e69;
}

.trace-svg--ocr-inning,
.trace-stage-swatch.trace-svg--ocr-inning {
  fill: rgba(255, 168, 0, var(--trace-opacity, 0.42));
  stroke: #9b6200;
  background: rgba(255, 168, 0, 0.36);
  border-color: #9b6200;
}

.trace-svg--ocr-player,
.trace-stage-swatch.trace-svg--ocr-player {
  fill: rgba(25, 126, 91, var(--trace-opacity, 0.32));
  stroke: #197e5b;
  background: rgba(25, 126, 91, 0.22);
  border-color: #197e5b;
}

.trace-svg--yolo-row,
.trace-stage-swatch.trace-svg--yolo-row {
  fill: rgba(25, 126, 91, var(--trace-opacity, 0.18));
  stroke: rgba(25, 126, 91, 0.78);
  background: rgba(25, 126, 91, 0.18);
  border-color: rgba(25, 126, 91, 0.78);
}

.trace-svg--yolo-col,
.trace-stage-swatch.trace-svg--yolo-col {
  fill: rgba(8, 117, 209, var(--trace-opacity, 0.16));
  stroke: rgba(8, 117, 209, 0.72);
  background: rgba(8, 117, 209, 0.18);
  border-color: rgba(8, 117, 209, 0.72);
}

.trace-svg--lineseg-h,
.trace-svg--lineseg-v {
  stroke: rgba(255, 196, 59, 0.80);
  stroke-width: 1;
  stroke-dasharray: 5 5;
}

.trace-stage-swatch.trace-svg--lineseg-h,
.trace-stage-swatch.trace-svg--lineseg-v {
  background: repeating-linear-gradient(90deg, rgba(255, 196, 59, 0.80) 0 4px, transparent 4px 7px);
  border-color: rgba(255, 196, 59, 0.90);
}

.trace-svg--solver-row {
  stroke: rgba(13, 59, 102, 0.88);
  stroke-width: 2.5;
}

.trace-svg--solver-col {
  stroke: rgba(8, 117, 209, 0.78);
  stroke-width: 2.5;
}

.trace-stage-swatch.trace-svg--solver-row {
  background: #0d3b66;
  border-color: #0d3b66;
}

.trace-stage-swatch.trace-svg--solver-col {
  background: #0875d1;
  border-color: #0875d1;
}

.trace-svg--play-cell-vote,
.trace-stage-swatch.trace-svg--play-cell-vote {
  fill: rgba(242, 106, 141, var(--trace-opacity, 0.32));
  stroke: #f26a8d;
  background: rgba(242, 106, 141, 0.30);
  border-color: #f26a8d;
}

.trace-svg--cell-flagged,
.trace-stage-swatch.trace-svg--cell-flagged {
  fill: rgba(255, 243, 176, 0.30);
  stroke: #f26a8d;
  background: rgba(255, 243, 176, 0.48);
  border-color: #f26a8d;
}

.trace-svg--cell-active,
.trace-stage-swatch.trace-svg--cell-active {
  fill: rgba(203, 238, 243, 0.18);
  stroke: rgba(8, 117, 209, 0.72);
  background: rgba(203, 238, 243, 0.42);
  border-color: rgba(8, 117, 209, 0.72);
}

.trace-svg--cell-empty,
.trace-stage-swatch.trace-svg--cell-empty {
  fill: rgba(83, 60, 35, 0.03);
  stroke: rgba(83, 60, 35, 0.16);
  background: rgba(83, 60, 35, 0.08);
  border-color: rgba(83, 60, 35, 0.22);
}

.trace-stage-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: var(--text-muted);
  font-size: 11px;
}

.trace-stage-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.trace-stage-swatch {
  width: 14px;
  height: 9px;
  border: 1px solid rgba(83, 60, 35, 0.22);
  border-radius: 2px;
}

.trace-grid-debug {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.trace-debug-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  color: var(--text-muted);
  font-size: 12px;
}

.trace-debug-legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.trace-swatch {
  display: inline-block;
  width: 16px;
  height: 10px;
  border: 1px solid rgba(83, 60, 35, 0.22);
  border-radius: 2px;
}

.trace-swatch--flagged {
  border-color: #f26a8d;
  background: rgba(255, 243, 176, 0.58);
}

.trace-swatch--active {
  border-color: rgba(13, 59, 102, 0.58);
  background: rgba(203, 238, 243, 0.28);
}

.trace-swatch--empty {
  border-color: rgba(83, 60, 35, 0.18);
  background: rgba(255, 250, 241, 0.36);
}

.trace-swatch--missing {
  border-color: rgba(242, 106, 141, 0.72);
  border-style: dashed;
  background: rgba(242, 106, 141, 0.08);
}

.trace-metrics--grid-debug {
  grid-template-columns: repeat(6, minmax(92px, 1fr));
}

.trace-debug-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 10px;
}

.trace-details {
  border: 1px solid rgba(83, 60, 35, 0.12);
  border-radius: 6px;
  background: rgba(255, 250, 241, 0.50);
}

.trace-details summary {
  cursor: pointer;
  padding: 10px 12px;
  color: #0d3b66;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.trace-table-wrap {
  overflow-x: auto;
  border-top: 1px solid rgba(83, 60, 35, 0.12);
}

.trace-table--cell-debug {
  min-width: 1120px;
}

.trace-table--cell-debug tr.is-flagged td {
  background: rgba(255, 243, 176, 0.34);
}

.trace-table--cell-debug tr.is-active td {
  background: rgba(203, 238, 243, 0.14);
}

.trace-table--cell-debug tr.is-empty td {
  color: rgba(35, 42, 52, 0.62);
}

.trace-table--cell-debug tr.is-missing td {
  background: rgba(242, 106, 141, 0.08);
}

.trace-split-list {
  display: grid;
  gap: 12px;
}

.trace-split-card {
  border: 1px solid rgba(83, 60, 35, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.48);
  overflow: hidden;
}

.trace-split-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(83, 60, 35, 0.12);
  background: rgba(245, 239, 224, 0.48);
}

.trace-split-card__head div {
  display: grid;
  gap: 2px;
}

.trace-split-card__head strong {
  color: #0d3b66;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
}

.trace-split-card__head span {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.trace-split-card__head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  text-align: right;
}

.trace-split-card__head b {
  color: #0d3b66;
}

.trace-split-card__head small,
.trace-table small {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
}

.trace-split-card__body {
  display: grid;
  grid-template-columns: minmax(180px, 0.65fr) minmax(0, 1.35fr);
  gap: 10px;
  padding: 10px;
}

.trace-split-panel {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(83, 60, 35, 0.12);
  border-radius: 6px;
  background: rgba(255, 250, 241, 0.58);
  overflow-x: auto;
}

.trace-split-panel--wide {
  grid-column: 1 / -1;
}

.trace-split-panel h4 {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
}

.trace-summary-rows {
  display: grid;
  gap: 6px;
}

.trace-summary-rows p,
.trace-muted {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.trace-summary-rows b {
  color: var(--text);
}

.trace-kv {
  display: inline-flex;
  gap: 4px;
  margin: 0 8px 3px 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  white-space: nowrap;
}

.trace-kv b {
  color: #0d3b66;
}

@media (max-width: 900px) {
  .trace-team__head,
  .trace-resolver-grid,
  .trace-debug-grid,
  .trace-visual-stage-grid {
    grid-template-columns: 1fr;
  }

  .trace-visual-flow__head {
    align-items: stretch;
    flex-direction: column;
  }

  .trace-team__head {
    display: grid;
    align-items: start;
  }

  .trace-metrics {
    justify-content: flex-start;
  }

  .trace-table {
    min-width: 560px;
  }

  .trace-split-card__head,
  .trace-split-card__body {
    grid-template-columns: 1fr;
  }

  .trace-split-card__head {
    display: grid;
  }

  .trace-split-card__head p {
    text-align: left;
  }
}

.rp-grid-card {
  border-color: rgba(83, 60, 35, 0.20);
}

.rp-innings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--s-2);
}
.rp-inning {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  display: grid;
  gap: 8px;
  background: var(--surface);
}
.rp-inning__num {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.rp-inning__num span {
  font-size: 26px;
  color: var(--accent);
  font-weight: 700;
}
.rp-inning__num::after { content: "Inning"; }
.rp-inning__stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin: 0;
}
.rp-inning__stats > div {
  display: grid;
  gap: 2px;
  padding: 6px 4px;
  border-radius: 6px;
  background: var(--accent-soft);
  text-align: center;
}
.rp-inning__stats > div.is-hot { background: rgba(232, 156, 36, 0.18); }
.rp-inning__stats dt {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin: 0;
}
.rp-inning__stats dd {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.rp-mlb-card {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
  background:
    linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--accent-soft) 42%, var(--surface)));
}

.rp-mlb-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rp-mlb-status--complete {
  background: var(--green-soft);
  color: var(--green);
}

.rp-mlb-status--running,
.rp-mlb-status--queued {
  background: var(--accent-soft);
  color: var(--accent);
}

.rp-mlb-status--needs-game-hint {
  background: var(--yellow-soft);
  color: var(--yellow);
}

.rp-mlb-status--failed {
  background: var(--red-soft);
  color: var(--red);
}

.rp-mlb-body {
  display: grid;
  gap: var(--s-3);
}

.rp-mlb-line {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.rp-mlb-line strong {
  color: var(--text);
}

.rp-mlb-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: var(--s-2);
}

.rp-mlb-metric {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.rp-mlb-metric span {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.rp-mlb-metric strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
}

.rp-review-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  max-height: 380px;
  overflow-y: auto;
}

.rp-review-stage .rp-review-list {
  max-height: none;
  min-height: 0;
}

.rp-review-stage .rp-card__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.rp-review-stage .rp-card__head h2 {
  font-size: 16px;
  line-height: 1.15;
}

.rp-review-stage .rp-review-counts {
  gap: 5px;
}

.rp-review-stage .rp-review-counts span {
  min-height: 22px;
  padding: 3px 7px;
  font-size: 11px;
}
.rp-review-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 26px;
}
.rp-review-counts:empty { display: none; }
.rp-review-counts span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}
.rp-review-counts strong {
  color: var(--text);
  font-family: var(--font-mono);
}
.rp-review-list li { margin: 0; }
.rp-review-list button {
  display: grid;
  grid-template-columns: 28px auto 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--surface);
  font: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.rp-review-stage .rp-review-list button {
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 7px;
  padding: 8px 9px;
}

.rp-review-stage .rp-review-play {
  grid-column: 2 / -1;
}
.rp-review-list button:hover,
.rp-review-list button.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.rp-review-list button:disabled {
  opacity: 0.52;
  cursor: default;
}
.rp-review-list li.is-resolved button {
  border-style: dashed;
}
.rp-review-index {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}
.rp-review-loc {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}
.rp-review-play { font-weight: 700; }
.rp-review-conf {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(220, 38, 38, 0.95);
}

.rp-review-empty {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
}
.rp-review-empty strong { color: var(--accent); }

.rp-review-placeholder {
  padding: 12px;
  color: var(--text-muted);
  font-size: 13px;
}

.rp-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-2);
  padding-top: var(--s-3);
  border-top: 1px solid var(--divider);
}


/* ── Login page ─────────────────────────────────────────────────────────── */
.login-shell { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; }
.login-page {
  display: grid;
  place-items: center;
  padding: clamp(36px, 7vw, 92px) clamp(18px, 4vw, 36px);
}

.login-card {
  width: min(560px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(28px, 4.8vw, 48px);
  display: grid;
  gap: var(--s-4);
  box-shadow: 0 18px 54px rgba(15, 23, 42, 0.10);
}

.login-card__head { display: grid; gap: 10px; }
.login-card__head .eyebrow { margin: 0; }
.login-plan {
  width: fit-content;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 700;
}
.login-card__head h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: 0;
}
.login-card__sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.55;
}

.login-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 50px;
  padding: 13px 18px;
  background: #fff;
  color: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}
.login-google:hover:not(:disabled) {
  border-color: rgba(0, 0, 0, 0.35);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}
.login-google:disabled { opacity: 0.6; cursor: not-allowed; }
.login-google__logo { width: 20px; height: 20px; flex: 0 0 20px; }

.login-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.login-divider::before,
.login-divider::after {
  content: "";
  height: 1px;
  background: var(--border);
}

.login-email { display: grid; gap: var(--s-3); }
.login-field { display: grid; gap: 6px; font-size: 14px; color: var(--text-muted); }
.login-field input {
  min-height: 52px;
  padding: 13px 14px;
  font: inherit;
  font-size: 16px;
  color: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.login-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.login-actions {
  display: flex;
  gap: var(--s-2);
  margin-top: 6px;
}
.login-actions .btn {
  flex: 1 1 auto;
  min-height: 48px;
  text-align: center;
  font-size: 14px;
}

.login-error {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: var(--radius);
  background: rgba(220, 38, 38, 0.06);
  color: #b00020;
  font-size: 14px;
}

/* Success / info step (e.g. "check your email") — deliberately NOT the red
   error treatment, so a normal confirmation step doesn't read as a failure. */
.login-notice {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(16, 122, 87, 0.35);
  border-radius: var(--radius);
  background: rgba(16, 122, 87, 0.07);
  color: #0b6b4f;
  font-size: 14px;
  line-height: 1.5;
}

/* Button loading state: inline spinner + suppressed clicks. Works for the
   email buttons (.btn) and the Google button (spinner replaces the logo). */
.btn.is-loading,
.login-google.is-loading {
  pointer-events: none;
}
.btn.is-loading::before,
.login-google.is-loading::before {
  content: "";
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 9px;
  vertical-align: -2px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
.login-google.is-loading .login-google__logo { display: none; }

.login-card__footer {
  margin: 0;
  padding-top: var(--s-2);
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}
.login-card__footer a { color: var(--accent); }

.login-page--plan-preview,
.login-page--presspass {
  width: min(100% - 32px, 1240px);
  margin: 0 auto;
  grid-template-columns: minmax(320px, 500px) minmax(360px, 692px);
  gap: clamp(22px, 4vw, 44px);
  place-items: center;
}
.login-page--plan-preview .login-card,
.login-page--presspass .login-card {
  width: 100%;
}
.login-plan-card,
.login-pressbox {
  width: 100%;
  min-height: 410px;
  border-radius: 14px;
  box-shadow: 0 18px 54px rgba(15, 23, 42, 0.14);
}
.login-plan-card .pcard__art,
.login-pressbox .pcard__art {
  height: 132px;
  margin: 18px 0 8px;
}
.login-plan-card .pcard__desc,
.login-pressbox .pcard__desc {
  font-size: var(--fs-15);
}

@media (max-width: 960px) {
  .login-page--plan-preview,
  .login-page--presspass {
    width: min(100% - 32px, 560px);
    grid-template-columns: 1fr;
    align-content: start;
  }
}


/* ── History / library page ─────────────────────────────────────────────── */
.hist-shell, .history-shell { min-height: 100vh; }

.hist-page {
  width: min(100% - 32px, 1400px);
  margin: 0 auto;
  padding: clamp(20px, 3vw, 36px) 0 clamp(40px, 6vw, 80px);
  display: grid;
  gap: clamp(20px, 3vw, 32px);
}

.hist-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s-3);
  align-items: end;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  background: var(--surface);
}
.hist-hero h1 {
  margin: 4px 0 0;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.015em;
}
.hist-hero__lead { display: grid; gap: 4px; }
.hist-hero__sub { margin: 0; color: var(--text-muted); font-size: 14px; }

.hist-loading {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  padding: var(--s-4);
}

.home-shell.is-home-loading {
  background: var(--bg);
}

.home-loading {
  display: none;
}

.home-shell.is-home-loading .home-loading {
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--appbar-h));
  padding: clamp(32px, 7vw, 72px) var(--s-4);
}

.home-loading__panel {
  display: grid;
  justify-items: center;
  gap: 16px;
}

.home-loading__label {
  margin: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}

/* Press Box boot screen: a clean loading state shown over the whole page until
   pressbox.js has fetched data and built the dashboard, so a reload never flashes
   the half-rendered placeholders. Toggled by body.is-pressbox-loading. */
.pbx-boot {
  display: none;
}
.pressbox-shell.is-pressbox-loading .pbx-boot {
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--appbar-h));
  padding: clamp(32px, 7vw, 72px) var(--s-4);
}
.pressbox-shell.is-pressbox-loading .pressbox-page {
  display: none;
}
.pbx-boot__panel {
  display: grid;
  justify-items: center;
  gap: 16px;
}
.pbx-boot__label {
  margin: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}

.hist-error {
  margin: 0;
  padding: 12px 16px;
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: var(--radius);
  background: rgba(220, 38, 38, 0.06);
  color: #b00020;
  font-size: 14px;
}

.hist-empty {
  display: grid;
  place-items: center;
  gap: var(--s-2);
  padding: clamp(40px, 8vw, 80px);
  border: 1px dashed var(--border);
  border-radius: calc(var(--radius) + 6px);
  text-align: center;
  background: var(--surface);
}
.hist-empty h2 {
  margin: 8px 0 0;
  font-size: clamp(20px, 2vw, 24px);
}
.hist-empty p {
  margin: 0;
  max-width: 440px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}
.hist-empty__icon {
  width: 56px; height: 56px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 14px;
  display: grid;
  place-items: center;
}
.hist-empty__icon svg { width: 28px; height: 28px; stroke: currentColor; }
.hist-empty .btn { margin-top: 8px; }

.hist-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(12px, 1.6vw, 20px);
}

.hist-card {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}
.hist-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.hist-card__link {
  display: grid;
  grid-template-rows: auto 1fr;
  text-decoration: none;
  color: inherit;
}

.hist-card__thumb {
  margin: 0;
  aspect-ratio: 4 / 3;
  background: var(--accent-soft);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hist-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hist-card__thumb-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 24px;
}

.hist-card__body {
  padding: 14px 16px;
  display: grid;
  gap: 8px;
}
.hist-card__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.hist-card__date {
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.hist-card__status {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}
.hist-card__status--processing { background: rgba(232, 156, 36, 0.14); color: #b97c0a; }
.hist-card__status--failed     { background: rgba(220, 38, 38, 0.10);  color: #b00020; }
.hist-card__status--pending_upload { background: rgba(120, 120, 120, 0.10); color: var(--text-muted); }

.hist-card__stats {
  display: flex;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.hist-card__stats .is-flagged { color: rgba(220, 38, 38, 0.95); }
.hist-card__stats .is-clear   { color: var(--accent); }

.hist-card__id {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.hist-loadmore { text-align: center; }

.flash {
  padding: var(--s-3) var(--s-4);
  color: var(--red);
  background: var(--red-soft);
  border: 1px solid var(--red);
  border-radius: var(--radius);
  font-weight: 600;
}

.progress-card {
  padding: var(--s-6);
}

.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--border);
}

.progress-head h2 {
  margin: 0;
  font-size: 22px;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.progress-steps {
  display: grid;
  gap: var(--s-2);
  margin: var(--s-4) 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.progress-steps li {
  padding: var(--s-2) var(--s-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.progress-steps .is-current {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* Scan showcase */
.scan-showcase {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: minmax(340px, 0.78fr) minmax(0, 1.22fr);
  gap: var(--s-8);
  align-items: center;
  padding: var(--s-12) 0;
  border-bottom: 1px solid var(--border);
}

.scan-showcase__copy h1 {
  max-width: 12ch;
  margin: 0;
  color: var(--text);
  font-size: 46px;
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: 0;
}

.scan-showcase__lede {
  max-width: 62ch;
  margin: var(--s-5) 0 0;
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.55;
}

.scan-stage {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 54% 46%, rgba(8, 117, 209, 0.10), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f4f7fa 100%);
  box-shadow: var(--shadow-2);
  perspective: 1400px;
  isolation: isolate;
}

.scan-stage__label {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 6;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

/* Scroll story */
.scroll-story {
  position: relative;
  height: 360vh;
  margin-top: 0;
  border-top: 0;
}

.scroll-story--intro {
  margin-top: 0;
  border-top: 0;
}

.scroll-story__sticky {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(340px, 0.86fr) minmax(0, 1.14fr);
  gap: var(--s-8);
  align-items: center;
  padding: var(--s-12) 0;
}

.story-copy {
  position: relative;
  z-index: 2;
}

.story-copy h1,
.story-copy h2 {
  max-width: 12ch;
  margin: 0 0 var(--s-6);
  color: var(--text);
  font-size: 42px;
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: 0;
}

.story-lede {
  max-width: 62ch;
  margin: calc(var(--s-6) * -0.55) 0 var(--s-5);
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.55;
}

.story-steps {
  display: grid;
  gap: var(--s-2);
}

.story-step {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: var(--s-3);
  padding: var(--s-3);
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text-muted);
  opacity: 0.44;
  transform: translateX(-8px);
  transition: opacity 180ms ease, transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.story-step.is-active {
  opacity: 1;
  transform: translateX(0);
  border-color: var(--border);
  background: var(--bg-elev);
  box-shadow: var(--shadow-1);
}

.story-step span {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.story-step h3,
.story-step p {
  margin: 0;
}

.story-step h3 {
  color: var(--text);
  font-size: 16px;
}

.story-step p {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.48;
}

.story-stage {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 50% 42%, rgba(8, 117, 209, 0.10), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f4f7fa 100%);
  box-shadow: var(--shadow-2);
  perspective: 1400px;
  isolation: isolate;
}

.story-stage__label {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 6;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.scan-source {
  position: absolute;
  inset: 18% 18% 33% 8%;
  z-index: 1;
  border-radius: 10px;
  transform: rotateX(58deg) rotateZ(-9deg) translateY(24px);
  transform-style: preserve-3d;
  transition: opacity 220ms ease, filter 220ms ease, transform 220ms ease;
}

.scan-source::after {
  content: "";
  position: absolute;
  inset: -8% -7% -10%;
  z-index: -1;
  border-radius: 14px;
  background:
    linear-gradient(110deg, rgba(8, 117, 209, 0.10), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0));
  box-shadow: 0 22px 50px rgba(14, 20, 30, 0.12);
  opacity: 0.82;
}

.scan-source__label {
  position: absolute;
  left: 12px;
  top: 10px;
  z-index: 5;
  padding: 5px 8px;
  border: 1px solid rgba(89, 64, 36, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: rgba(36, 51, 74, 0.72);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.story-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.35fr repeat(8, 1fr);
  grid-template-rows: 0.72fr repeat(7, 1fr);
  overflow: hidden;
  border: 1px solid rgba(89, 64, 36, 0.20);
  border-radius: 6px;
  background: linear-gradient(180deg, #fbf6ea 0%, #efe5d0 100%);
  box-shadow: 0 14px 34px rgba(37, 31, 20, 0.12);
  transform: translateZ(0);
  transform-style: preserve-3d;
  transition: opacity 180ms ease, filter 180ms ease;
}

.story-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(89, 64, 36, 0.20) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(89, 64, 36, 0.20) 1px, transparent 1px);
  background-size: 11.111% 12.5%;
}

.story-paper-ink,
.story-scan-pass {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  transform-style: preserve-3d;
  pointer-events: none;
}

.story-paper-ink {
  z-index: 2;
  opacity: 0.92;
  transform: translateZ(3px);
  transition: opacity 180ms ease, filter 180ms ease;
}

.story-ink {
  position: absolute;
  left: var(--ix, 50%);
  top: var(--iy, 50%);
  min-width: 24px;
  padding: 2px 4px;
  border-radius: 4px;
  color: #24334a;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(var(--ir, -4deg));
  animation: inkReveal 3.8s ease-in-out infinite;
  animation-delay: var(--id, 0ms);
}

.story-scan-pass {
  z-index: 3;
  overflow: hidden;
  opacity: 0.9;
  mix-blend-mode: multiply;
  transform: translateZ(8px);
  transition: opacity 180ms ease;
}

.story-scan-pass::before {
  content: "";
  position: absolute;
  top: -18%;
  bottom: -18%;
  left: -24%;
  width: 26%;
  background:
    linear-gradient(90deg, transparent, rgba(8, 117, 209, 0.08), transparent),
    linear-gradient(90deg, transparent 8%, rgba(255, 255, 255, 0.74) 48%, transparent 92%);
  box-shadow: 0 0 28px rgba(8, 117, 209, 0.22);
  transform: skewX(-12deg);
  animation: storyScanPass 3.8s ease-in-out infinite;
}

.story-stage.is-phase-1 .story-paper-ink,
.story-stage.is-phase-2 .story-paper-ink,
.story-stage.is-phase-3 .story-paper-ink {
  opacity: 0.16;
  filter: saturate(0.5);
}

.story-stage.is-phase-1 .story-scan-pass,
.story-stage.is-phase-2 .story-scan-pass,
.story-stage.is-phase-3 .story-scan-pass {
  opacity: 0;
}

.story-cells {
  position: absolute;
  inset: 0;
  z-index: 4;
  transform-style: preserve-3d;
  pointer-events: none;
}

.story-cell {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(14, 20, 30, 0.12), 0 2px 8px rgba(14, 20, 30, 0.06);
  opacity: var(--op, 1);
  transform:
    translate(-50%, -50%)
    translate3d(var(--x, 0px), var(--y, 0px), var(--z, 0px))
    rotateX(var(--rx, 0deg))
    rotateZ(var(--rz, 0deg))
    scale(var(--scale, 1));
  transition: transform 80ms linear, opacity 80ms linear, background 180ms ease, border-color 180ms ease;
  will-change: transform, opacity;
}

.story-stage.is-phase-0 .story-cell {
  animation: storyCellReveal 3.8s ease-in-out infinite;
  animation-delay: var(--reveal-delay, 0ms);
}

.story-cell__face {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: inherit;
  animation: storyPieceFloat 3.2s ease-in-out infinite;
  animation-delay: var(--float-delay, 0ms);
}

.story-cell::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 9px;
  height: 9px;
  border: 1px solid currentColor;
  opacity: 0.26;
  transform: rotate(45deg);
}

.story-cell.is-low {
  background: var(--yellow-soft);
  border-color: rgba(155, 106, 0, 0.55);
  color: var(--yellow);
}

.story-cell.is-hr {
  background: var(--accent-soft);
  border-color: rgba(8, 117, 209, 0.58);
  color: var(--accent);
}

.story-cell.is-green {
  background: var(--green-soft);
  border-color: rgba(22, 138, 74, 0.5);
  color: var(--green);
}

.story-data-card {
  position: absolute;
  right: 32px;
  bottom: 32px;
  z-index: 5;
  width: min(280px, calc(100% - 64px));
  padding: var(--s-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-2);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 180ms ease, transform 180ms ease;
  backdrop-filter: blur(8px);
}

.story-stage.is-phase-3 .story-data-card {
  opacity: 1;
  transform: translateY(0);
}

.story-data-card span {
  display: block;
  margin-bottom: var(--s-2);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.story-data-card code {
  display: block;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: normal;
}

/* Results */
.results-page {
  width: min(100% - 32px, 1400px);
  margin: 0 auto;
  padding: var(--s-6) 0 var(--s-12);
}

.result-summary {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-6);
  margin-bottom: var(--s-5);
}

.result-summary h1 {
  font-size: 32px;
}

.summary-sub {
  font-size: 14px;
  margin-top: var(--s-2);
}

.results-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--s-5);
  align-items: start;
}

.scorecard-column {
  display: grid;
  gap: var(--s-5);
  min-width: 0;
}

.scorecard-panel {
  overflow: hidden;
}

.panel-head,
.review-head,
.section-title,
.scorecard-panel .panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}

.panel-head {
  padding: var(--s-4);
  border-bottom: 1px solid var(--border);
}

.panel-head h2,
.review-head h2,
.section-title h2 {
  margin: 0;
  font-size: 18px;
}

.panel-head p,
.review-head p,
.section-title p {
  margin: 3px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.toggle-line {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--text-muted);
  font-size: 13px;
  white-space: nowrap;
}

.grid-scroll {
  position: relative;
  overflow-x: auto;
}

.scorecard-table {
  --scorecard-cream: #fbfaf4;
  --scorecard-paper: #fffdf6;
  --scorecard-header: #30383a;
  --scorecard-header-soft: #444b4d;
  --scorecard-starter: #e7eee8;
  --scorecard-starter-soft: rgba(231, 238, 232, 0.38);
  --scorecard-starter-cell: rgba(255, 253, 246, 0.96);
  --scorecard-sub: #edf4ef;
  --scorecard-sub-soft: rgba(237, 244, 239, 0.48);
  --scorecard-sub-cell: rgba(249, 252, 248, 0.96);
  --scorecard-alert: #be3d3d;
  --scorecard-play: #2b2f33;
  --scorecard-hit: #34875b;
  --scorecard-walk: #236fb0;
  --scorecard-error: #b56a25;
  --scorecard-ink: #252a2d;
  --scorecard-muted: #6a716d;
  --scorecard-line: #ccd3ce;
  --scorecard-line-strong: #9da79f;
  --scorecard-pole: #236fb0;
  --run-scored: #2f7d50;
  --run-scored-soft: rgba(47, 125, 80, 0.13);
  --scorecard-row-h: 78px;
  --scorecard-summary-row-h: 24px;
  --scorecard-cell-min-w: 78px;
  --scorecard-left-cols-w: 330px;
  --scorecard-summary-cols-w: 200px;
  --visible-inning-cols: 10;
  width: max(720px, calc(var(--scorecard-left-cols-w) + (var(--visible-inning-cols) * var(--scorecard-cell-min-w)) + var(--scorecard-summary-cols-w)));
  min-width: max(720px, calc(var(--scorecard-left-cols-w) + (var(--visible-inning-cols) * var(--scorecard-cell-min-w)) + var(--scorecard-summary-cols-w)));
  border-collapse: separate;
  border-spacing: 0;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  background:
    linear-gradient(0deg, rgba(48, 56, 58, 0.025) 0 1px, transparent 1px 100%),
    var(--scorecard-paper);
}

.scorecard-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.scorecard-table th,
.scorecard-table td {
  border-right: 1px solid var(--scorecard-line);
  border-bottom: 1px solid var(--scorecard-line);
  text-align: center;
  padding: 0;
}

.scorecard-table .inning-col {
  width: var(--scorecard-cell-min-w);
  min-width: var(--scorecard-cell-min-w);
  max-width: var(--scorecard-cell-min-w);
}

.scorecard-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 32px;
  padding: 0 var(--s-2);
  background: var(--scorecard-header);
  color: #fffdf6;
  font-size: 14px;
  font-weight: 900;
}

.scorecard-table .summary-col {
  position: sticky;
  z-index: 3;
  width: 28px;
  min-width: 28px;
  max-width: 28px;
  box-sizing: border-box;
  padding: 0;
  background: var(--scorecard-paper);
  color: var(--scorecard-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  overflow: hidden;
  white-space: nowrap;
}

.scorecard-table .summary-col--ab {
  right: 168px;
  box-shadow: -2px 0 0 var(--scorecard-line);
}
.scorecard-table .summary-col--r { right: 140px; }
.scorecard-table .summary-col--h { right: 112px; }
.scorecard-table .summary-col--rbi { right: 84px; }
.scorecard-table .summary-col--bb { right: 56px; }
.scorecard-table .summary-col--k { right: 28px; }
.scorecard-table .summary-col--hr { right: 0; }

.scorecard-table thead .summary-col {
  z-index: 5;
  padding: 0;
  background: var(--scorecard-header);
  color: #fffdf6;
  font-size: 10px;
  line-height: 1;
}

.scorecard-table thead .summary-col--rbi {
  font-size: 9px;
}

.scorecard-table .batter-col {
  position: sticky;
  left: 68px;
  z-index: 3;
  width: 220px;
  min-width: 220px;
  padding: 0 var(--s-3);
  background: var(--scorecard-paper);
  box-shadow: 2px 0 0 var(--scorecard-line-strong);
  text-align: left;
  font-family: var(--font-sans);
}

.scorecard-table .pos-col {
  position: sticky;
  left: 288px;
  z-index: 3;
  width: 42px;
  min-width: 42px;
  background: var(--scorecard-paper);
  color: var(--scorecard-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 850;
  text-align: center;
  box-shadow: 2px 0 0 var(--scorecard-line-strong);
}

.scorecard-table .jersey-col {
  position: sticky;
  left: 30px;
  z-index: 3;
  width: 38px;
  min-width: 38px;
  background: var(--scorecard-paper);
  color: var(--scorecard-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 850;
  text-align: center;
  box-shadow: 2px 0 0 var(--scorecard-line-strong);
}

.scorecard-table .order-col {
  position: sticky;
  left: 0;
  z-index: 4;
  width: 30px;
  min-width: 30px;
  background: var(--scorecard-paper);
  color: rgba(47, 55, 66, 0.74);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  border-right: 0;
}

.scorecard-table tbody .batter-col {
  height: auto;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

.scorecard-table tbody .jersey-col,
.scorecard-table tbody .pos-col {
  height: auto;
}

.scorecard-table thead .order-col {
  z-index: 6;
  background: var(--scorecard-header);
  color: rgba(255, 253, 246, 0.70);
}

.scorecard-table thead .jersey-col,
.scorecard-table thead .pos-col,
.scorecard-table thead .summary-col {
  font-weight: 900;
}

.scorecard-table thead .jersey-col,
.scorecard-table thead .pos-col {
  font-size: 13px;
}

.scorecard-table thead .batter-col,
.scorecard-table thead .jersey-col,
.scorecard-table thead .pos-col {
  z-index: 5;
  background: var(--scorecard-header);
  color: #fffdf6;
}

.scorecard-table tbody .summary-col {
  height: auto;
}

.scorecard-slot-row.is-split-slot > th,
.scorecard-slot-row.is-split-slot > td,
.scorecard-player-row.is-split-slot > th,
.scorecard-player-row.is-split-slot > td {
  background: rgba(255, 248, 235, 0.82);
}

.scorecard-player-row.is-slot-start > th,
.scorecard-player-row.is-slot-start > td {
  border-top: 1px solid rgba(48, 56, 58, 0.40);
}

.scorecard-player-row.is-split-slot:not(.is-slot-start) > th,
.scorecard-player-row.is-split-slot:not(.is-slot-start) > td {
  border-top: 1px solid var(--scorecard-line);
}

.scorecard-player-row.is-slot-end > th,
.scorecard-player-row.is-slot-end > td {
  border-bottom-color: var(--scorecard-line);
}

.scorecard-table tbody .order-col,
.scorecard-summary .summary-order-label,
.scorecard-player-row.is-slot-start > .order-col,
.scorecard-player-row.is-split-slot:not(.is-slot-start) > .order-col,
.scorecard-player-row.is-slot-end > .order-col {
  border-top-color: transparent;
  border-bottom-color: transparent;
}

.scorecard-player-row.is-starter-row .batter-col {
  background:
    linear-gradient(90deg, var(--scorecard-starter) 0 5px, var(--scorecard-paper) 5px);
  color: var(--scorecard-ink);
  box-shadow: 2px 0 0 var(--scorecard-line-strong);
}

.scorecard-player-row.is-starter-row > td,
.scorecard-player-row.is-starter-row .jersey-col,
.scorecard-player-row.is-starter-row .pos-col,
.scorecard-player-row.is-starter-row .summary-col {
  background: var(--scorecard-starter-cell);
}

.scorecard-player-row.is-starter-row .jersey-col,
.scorecard-player-row.is-starter-row .pos-col {
  color: rgba(29, 39, 48, 0.68);
}

.scorecard-player-row.is-starter-row .summary-col {
  box-shadow: inset 0 1px 0 rgba(255, 248, 235, 0.62);
}

.scorecard-table tbody .summary-col.is-zero {
  background: rgba(255, 255, 255, 0.52);
  color: rgba(91, 100, 114, 0.38);
}

.scorecard-table tbody .summary-col.is-active {
  background: rgba(8, 117, 209, 0.10);
  color: var(--scorecard-ink);
  box-shadow: inset 0 0 0 1px rgba(8, 117, 209, 0.10);
}

.scorecard-player-row.is-starter-row .order-col,
.scorecard-player-row.is-sub-row .order-col {
  background: var(--scorecard-cream);
  box-shadow: none;
}

.scorecard-player-row.is-starter-row .row-summary-value {
  background: rgba(200, 216, 221, 0.40);
  color: var(--scorecard-ink);
  box-shadow: inset 0 0 0 1px rgba(83, 60, 35, 0.12);
}

.scorecard-player-row.is-sub-row .batter-col {
  background:
    linear-gradient(90deg, var(--scorecard-sub) 0 7px, var(--scorecard-paper) 7px);
  color: var(--scorecard-ink);
  box-shadow: 2px 0 0 var(--scorecard-line-strong);
}

.scorecard-player-row.is-sub-row > td {
  background: var(--scorecard-sub-cell);
}

.scorecard-player-row.is-sub-row .jersey-col,
.scorecard-player-row.is-sub-row .pos-col,
.scorecard-player-row.is-sub-row .summary-col {
  background: var(--scorecard-sub-cell);
}

.scorecard-player-row.is-starter-row .order-col,
.scorecard-player-row.is-sub-row .order-col {
  background: var(--scorecard-cream);
  color: rgba(91, 100, 114, 0.78);
  box-shadow: none;
}

.scorecard-player-row.is-sub-row .jersey-col,
.scorecard-player-row.is-sub-row .pos-col {
  color: rgba(91, 100, 114, 0.76);
}

.scorecard-player-row.is-sub-row .summary-col {
  box-shadow: inset 0 -1px 0 var(--scorecard-line);
}

.scorecard-player-row.is-sub-row .summary-col.is-zero {
  background: rgba(255, 248, 235, 0.46);
}

.scorecard-player-row.is-sub-row .summary-col.is-active {
  background: rgba(22, 138, 74, 0.10);
}

.scorecard-player-row.is-sub-row .row-summary-value {
  background: rgba(22, 138, 74, 0.08);
  color: var(--scorecard-ink);
  box-shadow: inset 0 0 0 1px rgba(22, 138, 74, 0.10);
}

.slot-play-stack,
.row-summary-stack {
  display: grid;
  min-height: var(--scorecard-row-h);
}

.slot-play-stack .dcell + .dcell {
  border-top: 1px solid var(--scorecard-line);
}

.row-summary-value {
  display: inline-grid;
  place-items: center;
  min-width: 1ch;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--scorecard-ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.scorecard-table .row-summary-value.is-zero {
  background: transparent;
  color: rgba(47, 55, 66, 0.30);
  box-shadow: none;
  font-weight: 800;
}

.scorecard-table .row-summary-value.is-active {
  background: transparent;
  color: var(--scorecard-ink);
  box-shadow: none;
  font-weight: 950;
}

.batter-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 0;
  min-width: 0;
}

.batter-lines {
  display: grid;
  min-width: 0;
}

.batter-line {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  align-items: center;
  gap: 2px;
  min-width: 0;
  min-height: var(--scorecard-row-h);
  line-height: 1.08;
}

.scorecard-player-row.is-split-slot .batter-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.batter-line__main,
.batter-line__meta {
  display: flex;
  align-items: center;
  min-width: 0;
}

.batter-line__main {
  gap: 6px;
  justify-content: center;
}

.batter-line__meta {
  gap: 5px;
  justify-content: center;
}

.batter-line.is-sub {
  color: var(--scorecard-ink);
}

.batter-line.has-sub-badge {
  padding-right: 42px;
}

.lineup-role,
.lineup-window {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.lineup-role {
  min-width: 30px;
  height: 14px;
  padding: 0 5px;
  background: var(--scorecard-starter);
  color: var(--scorecard-ink);
}

.lineup-role.is-sub {
  position: absolute;
  top: 4px;
  right: 5px;
  min-width: 34px;
  height: 14px;
  padding: 0 5px;
  background: var(--scorecard-sub);
  color: var(--scorecard-ink);
  box-shadow: 0 0 0 1px rgba(255, 248, 235, 0.86), 0 2px 6px rgba(83, 60, 35, 0.14);
}

.lineup-window {
  min-width: 36px;
  height: 14px;
  padding: 0 5px;
  background: rgba(255, 255, 255, 0.62);
  color: rgba(91, 100, 114, 0.86);
}

.batter-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batter-name-btn {
  appearance: none;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: inherit;
  font-weight: inherit;
  line-height: 1.15;
  text-align: center;
  padding: 2px 3px;
  margin: -2px -3px;
  cursor: pointer;
}

.batter-name-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.batter-name-btn.is-low-confidence {
  color: var(--warning);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.player-name-conf {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 800;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.player-name-conf.is-low {
  color: var(--warning);
}

.order-num {
  display: inline-grid;
  place-items: center;
  width: 100%;
  min-height: var(--scorecard-row-h);
  background: transparent;
  color: var(--scorecard-ink);
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.order-num--continuation {
  min-height: var(--scorecard-row-h);
}

.pos-lines {
  display: grid;
  justify-items: center;
  line-height: 1.15;
}

.jersey-lines {
  display: grid;
  justify-items: center;
  line-height: 1.15;
}

.pos-line {
  display: inline-grid;
  align-items: center;
  justify-items: center;
  width: 100%;
  min-height: var(--scorecard-row-h);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.jersey-line {
  display: inline-grid;
  align-items: center;
  justify-items: center;
  width: 100%;
  min-height: var(--scorecard-row-h);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.jersey-line.is-sub {
  color: rgba(111, 103, 93, 0.84);
}

.pos-line.is-sub {
  color: rgba(111, 103, 93, 0.84);
}

.row-summary-line {
  display: grid;
  place-items: center;
  min-height: var(--scorecard-row-h);
}

.dcell {
  position: relative;
  width: 100%;
  min-width: var(--scorecard-cell-min-w);
  height: var(--scorecard-row-h);
  appearance: none;
  border: 0;
  background: var(--scorecard-paper);
  color: var(--text);
  display: block;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition: background 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.dcell:hover,
.dcell.is-active {
  background: #fffefa;
  filter: none;
  box-shadow: inset 0 0 0 2px rgba(35, 111, 176, 0.30), 0 6px 18px rgba(28, 35, 38, 0.10);
}

.dcell.is-linked-highlight {
  box-shadow: inset 0 0 0 2px rgba(35, 111, 176, 0.58), 0 0 0 2px rgba(35, 111, 176, 0.20);
}

.dcell--sub-entry-marker::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 5px;
  bottom: 5px;
  width: 2px;
  border-radius: 2px;
  background: var(--scorecard-pole);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.82), 0 2px 6px rgba(15, 23, 42, 0.14);
  pointer-events: none;
}

.dcell--high {
  background: var(--scorecard-paper);
}

.scorecard-table .dcell--high {
  background:
    linear-gradient(180deg, rgba(255, 253, 246, 0.98), rgba(247, 246, 237, 0.92));
  color: var(--scorecard-ink);
  box-shadow:
    inset 0 0 0 1px rgba(48, 56, 58, 0.055),
    inset 0 -1px 0 rgba(48, 56, 58, 0.06);
}

.scorecard-table .dcell--empty {
  background: rgba(255, 253, 246, 0.72);
}

.scorecard-player-row.is-sub-row .dcell--empty,
.scorecard-player-row.is-sub-row .dcell--split-blank {
  background: var(--scorecard-sub-cell);
}

.dcell--low {
  background:
    linear-gradient(180deg, rgba(255, 253, 246, 0.98), rgba(253, 246, 226, 0.92));
  color: var(--scorecard-ink);
  box-shadow:
    inset 0 0 0 1px rgba(181, 106, 37, 0.30),
    inset 3px 0 0 rgba(181, 106, 37, 0.70);
}

.scorecard-table .dcell--low {
  background:
    linear-gradient(180deg, rgba(255, 253, 246, 0.98), rgba(253, 246, 226, 0.92));
  box-shadow:
    inset 0 0 0 1px rgba(181, 106, 37, 0.30),
    inset 3px 0 0 rgba(181, 106, 37, 0.70);
}

.dcell--low:hover,
.dcell--low.is-active {
  background:
    linear-gradient(180deg, rgba(255, 253, 246, 1), rgba(253, 246, 226, 0.98));
  box-shadow:
    inset 0 0 0 1.5px rgba(181, 106, 37, 0.48),
    inset 3px 0 0 rgba(181, 106, 37, 0.80),
    0 6px 18px rgba(28, 35, 38, 0.10);
}

.dcell--corrected {
  background: var(--green-soft);
}

.dcell--hr .dcell__code {
  color: var(--scorecard-alert);
}

.dcell--low .dcell__code {
  color: #76521a;
}

.dcell--empty,
.dcell--missing {
  color: var(--text-faint);
  cursor: default;
  background: transparent;
}

button.dcell--empty[data-row][data-col] {
  cursor: pointer;
}

.dcell--split-blank {
  background: rgba(239, 225, 200, 0.24);
}

.dcell--empty::before {
  content: none;
}

.scorecard-table .dcell--empty .dcell__dia {
  display: none;
}

.dcell__code {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  max-width: calc(100% - 12px);
  min-height: 24px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--scorecard-play);
  font-family: "Marker Felt", "Bradley Hand", "Segoe Print", var(--font-mono);
  font-size: 22px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  transform: translate(-50%, -50%) rotate(-2deg);
}

.dcell__meta {
  position: absolute;
  right: 4px;
  top: 4px;
  z-index: 2;
  display: none;
  align-items: center;
  gap: 3px;
  min-height: 12px;
  padding: 1px 3px;
  border-radius: 999px;
  border: 1px solid rgba(181, 106, 37, 0.22);
  background: rgba(255, 250, 240, 0.90);
  color: rgba(111, 78, 24, 0.82);
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
}

.dcell--low .dcell__meta,
.dcell--corrected .dcell__meta {
  display: inline-flex;
}

.dcell--low .dcell__meta {
  border-color: rgba(181, 106, 37, 0.22);
  background: rgba(255, 250, 240, 0.90);
  color: rgba(111, 78, 24, 0.82);
  font-weight: 700;
}

.dcell--corrected .dcell__meta {
  color: var(--accent-fg);
}

.scorecard-table .dcell__inning-end {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 4;
  width: 26px;
  height: 26px;
  pointer-events: none;
}

.scorecard-table .dcell__inning-end::before {
  content: none;
}

.scorecard-table .dcell__inning-end::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: 26px;
  height: 26px;
  background: #000;
  clip-path: polygon(100% 42%, 100% 100%, 42% 100%);
}

.cell-icon {
  display: inline-grid;
  place-items: center;
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 50%;
  background: rgba(177, 127, 41, 0.14);
  color: #7c5515;
  font-size: 7px;
  font-weight: 800;
  line-height: 1;
}

.dcell--low .cell-icon {
  background: rgba(177, 127, 41, 0.14);
  color: #7c5515;
}

.dcell__diamond {
  position: absolute;
  left: 50%;
  top: 50%;
  display: none;
  width: 24px;
  height: 24px;
  border: 1.6px solid rgba(52, 135, 91, 0.62);
  border-radius: 2px;
  background: rgba(52, 135, 91, 0.05);
  opacity: 0.9;
  transform: translate(-50%, -50%) rotate(45deg);
  box-shadow: none;
}

.dcell[data-play="single"] .dcell__diamond,
.dcell[data-play="double"] .dcell__diamond,
.dcell[data-play="triple"] .dcell__diamond,
.dcell[data-play="home_run"] .dcell__diamond,
.dcell[data-play="walk"] .dcell__diamond,
.dcell[data-play="intentional_walk"] .dcell__diamond,
.dcell[data-play="error"] .dcell__diamond,
.dcell[data-play="fielder's_choice"] .dcell__diamond,
.dcell--run-scored .dcell__diamond {
  display: block;
}

.dcell--run-scored .dcell__diamond {
  border-color: rgba(47, 125, 80, 0.86);
  background: rgba(47, 125, 80, 0.74);
  box-shadow: 0 0 0 2px rgba(47, 125, 80, 0.12);
}

.dcell__tags {
  position: absolute;
  left: 5px;
  bottom: 5px;
  max-width: calc(100% - 10px);
  display: none;
  align-items: center;
  gap: 3px;
  overflow: hidden;
  pointer-events: none;
}

.dcell__tag {
  display: inline-grid;
  place-items: center;
  min-width: 14px;
  height: 11px;
  padding: 0 3px;
  border: 1px solid rgba(122, 137, 153, 0.20);
  border-radius: 3px;
  background: rgba(255, 253, 246, 0.82);
  color: rgba(46, 57, 69, 0.82);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.dcell__tag--secondary {
  background: rgba(255, 253, 246, 0.82);
  border-color: rgba(122, 137, 153, 0.20);
}

.dcell__tag--context {
  background: rgba(245, 248, 245, 0.82);
  border-color: rgba(122, 137, 153, 0.18);
}

.dcell__out {
  position: absolute;
  left: 4px;
  bottom: 4px;
  z-index: 3;
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border: 1.5px solid rgba(34, 39, 38, 0.90);
  border-radius: 50%;
  background: var(--scorecard-paper);
  color: var(--scorecard-ink);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  pointer-events: none;
}

.dcell--low .dcell__tag {
  background: rgba(255, 250, 240, 0.86);
  color: rgba(111, 78, 24, 0.88);
}

.dcell--low .dcell__tags,
.dcell--run-scored .dcell__tags,
.dcell[data-play="home_run"] .dcell__tags {
  display: inline-flex;
}

.dcell[data-play="single"] .dcell__code,
.dcell[data-play="double"] .dcell__code,
.dcell[data-play="triple"] .dcell__code {
  color: var(--scorecard-hit);
}

.dcell[data-play="walk"] .dcell__code,
.dcell[data-play="intentional_walk"] .dcell__code {
  color: var(--scorecard-walk);
}

.dcell[data-play="strikeout"] .dcell__code {
  color: var(--scorecard-alert);
  font-size: 24px;
  font-weight: 950;
}

.dcell[data-play="error"] .dcell__code,
.dcell[data-play="fielder's_choice"] .dcell__code {
  color: var(--scorecard-error);
}

.dcell[data-play="double_play"] .dcell__code {
  color: #6d4f9c;
}

.dcell[data-play="groundout"] .dcell__code,
.dcell[data-play="flyout"] .dcell__code,
.dcell[data-play="lineout"] .dcell__code {
  color: var(--scorecard-play);
  font-size: 20px;
}

.dcell[data-play="strikeout"]::before,
.dcell[data-play="home_run"]::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 2px solid rgba(190, 61, 61, 0.28);
  border-radius: 50%;
  opacity: 0.18;
  pointer-events: none;
}

.dcell[data-play="home_run"]::before {
  border-color: rgba(190, 61, 61, 0.36);
}

.dcell[data-play="groundout"]::after,
.dcell[data-play="flyout"]::after,
.dcell[data-play="lineout"]::after,
.dcell[data-play="double_play"]::after {
  content: "";
  position: absolute;
  inset: auto 8px 8px auto;
  width: 22px;
  height: 14px;
  border-right: 2px solid rgba(37, 42, 45, 0.28);
  border-bottom: 2px solid rgba(37, 42, 45, 0.28);
  transform: skew(-18deg);
  pointer-events: none;
}

/* Paper scorecard pass: keep the extracted grid close to a printed card.
   This intentionally removes the more app-like color blocks, shadows,
   decorative circles, and animated hover treatment from the play cells. */
.scorecard-table {
  --scorecard-cream: #f6f4ea;
  --scorecard-paper: #fbfaf2;
  --scorecard-header: #333937;
  --scorecard-header-soft: #474d4b;
  --scorecard-starter: #eef0e7;
  --scorecard-starter-cell: #fbfaf2;
  --scorecard-sub: #f0f3ea;
  --scorecard-sub-cell: #fbfaf2;
  --scorecard-alert: #c7403d;
  --scorecard-play: #2b302f;
  --scorecard-hit: #2f8d52;
  --scorecard-walk: #2b302f;
  --scorecard-error: #2b302f;
  --scorecard-ink: #222726;
  --scorecard-muted: #6c716c;
  --scorecard-line: #bfc5bc;
  --scorecard-line-strong: #787f77;
  --scorecard-pole: #2b76b8;
  --run-scored: #2f8d52;
  background: var(--scorecard-paper);
}

.scorecard-table th,
.scorecard-table td {
  border-color: var(--scorecard-line);
}

.scorecard-table thead th,
.scorecard-table thead .batter-col,
.scorecard-table thead .jersey-col,
.scorecard-table thead .pos-col,
.scorecard-table thead .order-col,
.scorecard-table thead .summary-col {
  height: 28px;
  background: var(--scorecard-header);
  color: #fbfaf2;
  font-size: 12px;
  box-shadow: none;
}

.scorecard-table .batter-col,
.scorecard-table .jersey-col,
.scorecard-table .pos-col {
  box-shadow: 2px 0 0 var(--scorecard-line-strong);
}

.scorecard-table .summary-col--ab {
  box-shadow: -2px 0 0 var(--scorecard-line-strong);
}

.scorecard-player-row.is-starter-row > td,
.scorecard-player-row.is-starter-row .jersey-col,
.scorecard-player-row.is-starter-row .pos-col,
.scorecard-player-row.is-starter-row .summary-col,
.scorecard-player-row.is-sub-row > td,
.scorecard-player-row.is-sub-row .jersey-col,
.scorecard-player-row.is-sub-row .pos-col,
.scorecard-player-row.is-sub-row .summary-col,
.scorecard-slot-row.is-split-slot > th,
.scorecard-slot-row.is-split-slot > td,
.scorecard-player-row.is-split-slot > th,
.scorecard-player-row.is-split-slot > td {
  background: var(--scorecard-paper);
}

.scorecard-player-row.is-starter-row .batter-col {
  background: linear-gradient(90deg, var(--scorecard-starter) 0 4px, var(--scorecard-paper) 4px);
  box-shadow: 2px 0 0 var(--scorecard-line-strong);
}

.scorecard-player-row.is-sub-row .batter-col {
  background: linear-gradient(90deg, var(--scorecard-sub) 0 4px, var(--scorecard-paper) 4px);
  box-shadow: 2px 0 0 var(--scorecard-line-strong);
}

.scorecard-table tbody .summary-col.is-zero,
.scorecard-table tbody .summary-col.is-active,
.scorecard-player-row.is-sub-row .summary-col.is-zero,
.scorecard-player-row.is-sub-row .summary-col.is-active,
.scorecard-player-row.is-starter-row .row-summary-value,
.scorecard-player-row.is-sub-row .row-summary-value {
  background: var(--scorecard-paper);
  box-shadow: none;
}

.scorecard-table .dcell,
.scorecard-table .dcell--high,
.scorecard-table .dcell--empty,
.scorecard-table .dcell--split-blank,
.scorecard-table .dcell--corrected {
  background: var(--scorecard-paper);
  box-shadow: none;
  transition: none;
}

.scorecard-table .dcell:hover,
.scorecard-table .dcell.is-active {
  background: #fffef8;
  filter: none;
  box-shadow: inset 0 0 0 2px rgba(36, 104, 167, 0.32);
}

.scorecard-table .dcell.is-linked-highlight {
  box-shadow: inset 0 0 0 2px rgba(36, 104, 167, 0.62);
}

.scorecard-table .dcell--low {
  background: var(--scorecard-paper);
  box-shadow: none;
}

.scorecard-table .dcell--low:hover,
.scorecard-table .dcell--low.is-active {
  background: #fffef8;
  box-shadow: inset 0 0 0 2px rgba(36, 104, 167, 0.30);
}

.scorecard-table .dcell--sub-entry-marker::after {
  border-radius: 0;
  box-shadow: none;
}

.scorecard-table .dcell__code {
  color: var(--scorecard-play);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
  transform: translate(-50%, -50%);
  text-shadow:
    0 0 3px var(--scorecard-paper),
    0 0 3px var(--scorecard-paper),
    0 1px 0 var(--scorecard-paper);
}

.scorecard-table .dcell[data-play="strikeout"] .dcell__code {
  color: var(--scorecard-alert);
  font-size: 21px;
  font-weight: 950;
}

.scorecard-table .dcell[data-play="home_run"] .dcell__code {
  color: var(--scorecard-alert);
}

.scorecard-table .dcell[data-play="single"] .dcell__code,
.scorecard-table .dcell[data-play="double"] .dcell__code,
.scorecard-table .dcell[data-play="triple"] .dcell__code {
  color: var(--scorecard-hit);
}

.scorecard-table .dcell[data-play="walk"] .dcell__code,
.scorecard-table .dcell[data-play="intentional_walk"] .dcell__code,
.scorecard-table .dcell[data-play="error"] .dcell__code,
.scorecard-table .dcell[data-play="fielder's_choice"] .dcell__code,
.scorecard-table .dcell[data-play="double_play"] .dcell__code,
.scorecard-table .dcell[data-play="groundout"] .dcell__code,
.scorecard-table .dcell[data-play="flyout"] .dcell__code,
.scorecard-table .dcell[data-play="lineout"] .dcell__code {
  color: var(--scorecard-play);
  font-size: 18px;
}

.scorecard-table .dcell__diamond {
  width: 20px;
  height: 20px;
  border: 1.4px solid rgba(47, 141, 82, 0.70);
  background: transparent;
  opacity: 1;
  box-shadow: none;
}

.scorecard-table .dcell--low .dcell__meta,
.scorecard-table .dcell--corrected .dcell__meta {
  display: none;
}

.scorecard-table .dcell--run-scored .dcell__diamond {
  border-color: rgba(47, 141, 82, 0.88);
  background: rgba(47, 141, 82, 0.78);
  box-shadow: none;
}

.scorecard-table .dcell[data-play="strikeout"]::before,
.scorecard-table .dcell[data-play="home_run"]::before,
.scorecard-table .dcell[data-play="groundout"]::after,
.scorecard-table .dcell[data-play="flyout"]::after,
.scorecard-table .dcell[data-play="lineout"]::after,
.scorecard-table .dcell[data-play="double_play"]::after {
  content: none;
}

/* Vertical inning dividers. The play-cell <button> is box-sizing:border-box
   at the cell's full width with min-width:66px, so it overflows the <td>
   content box by the 1px the right border occupies and paints over any
   border set on the <td>. Draw the rule on the button itself (the topmost
   element) so the vertical lines always show. */
.scorecard-table .inning-col .dcell {
  border-right: 1px solid rgba(48, 56, 58, 0.40);
}

.scorecard-table thead .inning-col {
  border-right: 1px solid rgba(251, 250, 242, 0.20);
}

/* ---- Printed scorebook diamond ------------------------------------------
   Every at-bat cell gets a faint pre-printed diamond (home at the bottom
   point, 1B right, 2B top, 3B left). The four base-path edges are then
   inked in based on the base the batter reached, and the whole diamond is
   tinted/filled green once a run scores — mirroring how a scorekeeper
   traces the runner around a paper card. */
.scorecard-table .dcell__dia {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(48px, calc(100% - 12px));
  height: min(48px, calc(100% - 12px));
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}

.scorecard-table .dcell__dia .dia-edge {
  fill: none;
  stroke: rgba(120, 127, 119, 0.42);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.scorecard-table .dcell__dia .dia-fill {
  fill: transparent;
}

/* Unused cells (batter did not bat that inning): ghost-printed diamond. */
.scorecard-table .dcell--empty .dia-edge {
  stroke: rgba(120, 127, 119, 0.18);
}

/* Reached base — ink in the path up to the base earned on the at-bat.
   1B: single / walk / IBB / HBP / error / fielder's choice.
   2B: double (+ 1B→2B leg).  3B: triple (+ 2B→3B leg). */
.scorecard-table .dcell[data-play="single"] .dia-e1,
.scorecard-table .dcell[data-play="walk"] .dia-e1,
.scorecard-table .dcell[data-play="intentional_walk"] .dia-e1,
.scorecard-table .dcell[data-play="hit_by_pitch"] .dia-e1,
.scorecard-table .dcell[data-play="error"] .dia-e1,
.scorecard-table .dcell[data-play="fielder's_choice"] .dia-e1,
.scorecard-table .dcell[data-play="double"] .dia-e1,
.scorecard-table .dcell[data-play="double"] .dia-e2,
.scorecard-table .dcell[data-play="triple"] .dia-e1,
.scorecard-table .dcell[data-play="triple"] .dia-e2,
.scorecard-table .dcell[data-play="triple"] .dia-e3 {
  stroke: rgba(34, 39, 38, 0.82);
  stroke-width: 2.2;
}

/* Run scored (or HR): complete the diamond — all four legs + green fill.
   Doubled class on .dia-edge bumps specificity above the per-base rules so
   a single-that-scored still reads as a full, filled diamond. */
.scorecard-table .dcell--run-scored .dia-edge.dia-edge,
.scorecard-table .dcell[data-play="home_run"] .dia-edge.dia-edge {
  stroke: rgba(33, 110, 70, 0.92);
  stroke-width: 2.4;
}

.scorecard-table .dcell--run-scored .dia-fill,
.scorecard-table .dcell[data-play="home_run"] .dia-fill {
  fill: rgba(47, 141, 82, 0.26);
}

/* Keep the code legible once the diamond is filled green. */
.scorecard-table .dcell--run-scored .dcell__code {
  color: var(--scorecard-ink);
}

/* Secondary notes: small, unobtrusive, bottom-centered. */
.scorecard-table .dcell__tags {
  left: 50%;
  right: auto;
  bottom: 2px;
  transform: translateX(-50%);
  max-width: calc(100% - 8px);
  gap: 2px;
  z-index: 2;
}

.scorecard-table .dcell__tag {
  height: 10px;
  min-width: 11px;
  padding: 0 2px;
  border: 0;
  border-radius: 2px;
  background: rgba(34, 39, 38, 0.07);
  color: rgba(34, 39, 38, 0.62);
  font-size: 7px;
  font-weight: 800;
}

.scorecard-table .dcell__out {
  left: 4px;
  bottom: 4px;
  width: 16px;
  height: 16px;
  border-color: rgba(34, 39, 38, 0.95);
  border-width: 1.6px;
  background: #fffdf6;
  color: rgba(34, 39, 38, 0.95);
  font-size: 9px;
  box-shadow: 0 0 0 1px rgba(255, 253, 246, 0.75);
}

.scorecard-table .dcell--run-scored .dcell__tag,
.scorecard-table .dcell[data-play="home_run"] .dcell__tag {
  background: rgba(47, 141, 82, 0.14);
  color: rgba(28, 92, 58, 0.85);
}

body.dim-confident .dcell--empty {
  opacity: 0.34;
}

.scorecard-summary th,
.scorecard-summary td {
  height: var(--scorecard-summary-row-h);
  background: var(--scorecard-starter-cell);
  color: rgba(29, 39, 48, 0.72);
  font-size: 12px;
  font-weight: 700;
}

.scorecard-summary .summary-row-label {
  height: var(--scorecard-summary-row-h);
  padding-right: 12px;
  background: #39413d;
  color: #fbfaf2;
  font-weight: 900;
  text-align: right;
}

.scorecard-summary .summary-row-label--merged {
  position: sticky;
  left: 30px;
  z-index: 3;
  width: 300px;
  min-width: 300px;
  box-sizing: border-box;
  box-shadow: 2px 0 0 var(--scorecard-line-strong);
  font-family: var(--font-sans);
}

.scorecard-summary .summary-order-label {
  height: var(--scorecard-summary-row-h);
  background: var(--scorecard-starter-cell);
}

.scorecard-summary .col-summary-value {
  color: var(--scorecard-ink);
}

.scorecard-summary .summary-col {
  z-index: 4;
  background: var(--scorecard-starter-cell);
}

.scorecard-summary .summary-total-cell {
  position: sticky;
  right: 0;
  z-index: 4;
  width: 200px;
  min-width: 200px;
  background: #39413d;
  box-shadow: -2px 0 0 var(--scorecard-line-strong);
  text-align: center;
}

.scorecard-summary .summary-total {
  color: #fbfaf2;
  font-weight: 900;
}

.scorecard-summary .summary-empty {
  color: var(--text-faint);
  font-weight: 500;
}

@media (max-width: 760px) {
  .scorecard-table .summary-col,
  .scorecard-summary .summary-total-cell {
    position: static;
    right: auto;
    box-shadow: none;
  }
}

.stats-panel {
  display: grid;
  grid-template-columns: repeat(9, minmax(82px, 1fr));
  gap: var(--s-2);
  margin-top: var(--s-5);
}

.stat-box {
  padding: var(--s-3);
  min-height: 76px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-box--accent {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.sb-label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sb-val {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.sb-val small {
  margin-left: 4px;
  color: var(--text-faint);
  font-size: 14px;
  font-weight: 500;
}

.review-panel {
  position: sticky;
  top: var(--s-4);
  max-height: calc(100vh - 32px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.review-head {
  padding: var(--s-4);
  border-bottom: 1px solid var(--border);
}

.review-list {
  margin: 0;
  padding: var(--s-2);
  overflow-y: auto;
  list-style: none;
}

.review-list li {
  margin: 2px 0;
}

.review-list button {
  width: 100%;
  display: grid;
  grid-template-columns: 24px 1fr auto auto;
  gap: var(--s-2);
  align-items: center;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.review-list button:hover,
.review-list button.is-active {
  background: var(--surface-2);
  border-color: var(--accent);
}

.review-index,
.review-loc,
.review-conf {
  color: var(--text-muted);
  font-size: 12px;
}

.review-play {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--yellow);
}

.empty-review {
  display: grid;
  gap: var(--s-2);
  padding: var(--s-8) var(--s-4);
  color: var(--text-muted);
  text-align: center;
}

.empty-review strong {
  color: var(--green);
}

.section-title {
  margin-bottom: var(--s-3);
}

.inning-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--s-3);
}

.inning-card {
  padding: var(--s-3);
}

.inning-card__head {
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
  margin-bottom: var(--s-3);
}

.inning-card__head span:last-child {
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
}

.inn-num {
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
}

.inning-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin: 0;
}

.inning-stats div {
  padding: 4px 6px;
  border-radius: var(--radius-xs);
  background: var(--surface-2);
}

.inning-stats .is-hot {
  color: var(--accent);
  background: var(--accent-soft);
}

.inning-stats dt,
.inning-stats dd {
  margin: 0;
}

.inning-stats dt {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
}

.inning-stats dd {
  font-family: var(--font-mono);
  font-weight: 700;
}

.inning-plays {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px dashed var(--border);
}

.inning-plays span {
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-2);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 11px;
}

.team-tabs {
  display: inline-flex;
  gap: 0;
  margin-bottom: var(--s-5);
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.team-tab {
  appearance: none;
  min-height: 34px;
  padding: 6px 14px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 700;
}

.team-tab.active,
.team-tab[aria-selected="true"] {
  background: var(--surface-2);
  color: var(--text);
  box-shadow: var(--shadow-1);
}

.team-panel.hidden {
  display: none;
}

/* Correction popover */
.pop-scrim,
.popover-scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(16, 19, 24, 0.16);
}

.correction-popover {
  position: fixed;
  z-index: 50;
  width: min(340px, calc(100vw - 24px));
  display: grid;
  gap: var(--s-3);
  padding: var(--s-3);
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
}

.player-popover {
  left: 50%;
  top: 50%;
  max-height: calc(100vh - 32px);
  overflow: auto;
  transform: translate(-50%, -50%);
}

.player-fields {
  display: grid;
  gap: var(--s-2);
}

.player-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px 64px;
  gap: var(--s-2);
  align-items: end;
  padding: var(--s-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.player-field-row label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.player-field-row input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  color: var(--text);
  font: inherit;
  text-transform: none;
}

.scorecard-table [data-player-row].is-linked-highlight {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.rp-marker-pin--player {
  --pin-color: var(--green);
}

.pop-head {
  display: flex;
  justify-content: space-between;
  gap: var(--s-3);
}

.pop-head h2,
.pop-kicker {
  margin: 0;
}

.pop-head h2 {
  font-size: 18px;
}

.pop-kicker,
.select-label {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.icon-btn {
  appearance: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.crop-preview {
  height: 110px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
}

.current-pick {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--s-2);
  align-items: center;
  padding: var(--s-2) var(--s-3);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.current-pick span,
.current-pick small {
  color: var(--text-muted);
}

.current-pick strong {
  font-family: var(--font-mono);
}

.select-label {
  display: block;
  margin-bottom: -6px;
}

.correction-popover select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 7px 10px;
}

.popover-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--s-2);
}

.correction-history-actions {
  display: flex;
  gap: var(--s-2);
  margin-right: auto;
}

.correction-history-actions .btn:disabled {
  cursor: default;
  opacity: 0.46;
  transform: none;
}

.popover-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--s-2);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 80;
  transform: translateX(-50%);
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-elev);
  box-shadow: var(--shadow-pop);
  color: var(--text);
  font-weight: 600;
}

.rp-detail-scrim {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(16, 19, 24, 0.18);
}

.rp-marker-detail {
  position: fixed;
  top: 50%;
  right: 24px;
  z-index: 60;
  width: min(390px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  transform: translateY(-50%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  box-shadow: var(--shadow-pop);
}

.rp-marker-detail__head {
  display: flex;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-4);
  border-bottom: 1px solid var(--border);
}

.rp-marker-detail__head h2 {
  margin: 4px 0 0;
  font-size: 18px;
  letter-spacing: 0;
}

.rp-marker-detail__body {
  display: grid;
  gap: var(--s-3);
  min-height: 0;
  overflow-y: auto;
  padding: var(--s-4);
}

.rp-marker-crop {
  min-height: 128px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
  text-transform: uppercase;
}

.rp-marker-facts {
  display: grid;
  gap: 8px;
  margin: 0;
}

.rp-marker-facts > div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: var(--s-2);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--divider);
}

.rp-marker-facts dt,
.rp-marker-facts dd {
  margin: 0;
}

.rp-marker-facts dt {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
}

.rp-marker-facts dd {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
}

.rp-marker-candidates {
  display: grid;
  gap: 8px;
  padding: var(--s-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.rp-marker-candidates p {
  margin: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
}

.rp-marker-candidates ul {
  margin: 0;
  padding-left: 18px;
}

.rp-marker-candidates li {
  margin: 3px 0;
}

.rp-marker-detail__actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-4);
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* Footer */
.footer {
  width: min(100% - 32px, 1400px);
  margin: 0 auto;
  padding: var(--s-6) 0 var(--s-8);
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}
.footer > span:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: flex-end;
}
.footer > span:first-child {
  white-space: nowrap;
}
.footer a {
  color: inherit;
  text-decoration: none;
}
.footer a:hover {
  text-decoration: underline;
}

.home-cinematic > .footer {
  align-items: center;
  padding: 10px 0;
}

.modal-overlay,
.modal {
  display: none;
}

@media (max-width: 1120px) {
  .appbar--public > .brand,
  .appbar--public > .appbar-brand-group,
  .appbar--public > .appbar-scoreboard-group,
  .appbar--public > .appbar-actions--public {
    grid-column: auto;
  }

  .appbar--public {
    grid-template-columns: minmax(180px, auto) minmax(0, 1fr);
    grid-template-areas:
      "brand actions";
    align-items: center;
  }

  .appbar--public > .brand,
  .appbar--public .appbar-brand-group {
    grid-area: brand;
  }

  .appbar--public .appbar-scoreboard-group {
    display: none;
  }

  .appbar-actions--public {
    grid-area: actions;
    width: 100%;
    justify-self: end;
    justify-content: flex-end;
    flex-direction: row;
    align-items: center;
    gap: clamp(16px, 2vw, 28px);
  }

  .appbar-actions--public .appbar-auth {
    padding-left: 0;
    border-left: 0;
  }

  .appbar-actions--public .appbar-main-nav {
    padding-left: clamp(14px, 1.8vw, 22px);
    border-left: 1px solid var(--border);
  }

  .appbar-main-nav {
    justify-content: flex-end;
    gap: clamp(14px, 1.8vw, 24px);
    max-width: none;
    flex-wrap: nowrap;
  }
}

@media (max-width: 1120px) {
  .home-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: var(--s-8);
    padding-top: var(--s-6);
  }

  .home-hero__stage {
    justify-self: center;
    max-width: 620px;
  }

  .home-hero h1 {
    max-width: 720px;
    font-size: 46px;
  }

  .how-strip {
    grid-template-columns: 1fr;
  }

  .upload-layout,
  .results-workspace {
    grid-template-columns: 1fr;
  }

  .scroll-story {
    height: 430vh;
  }

  .scroll-story__sticky {
    display: flex;
    flex-direction: column;
    align-content: center;
    gap: var(--s-5);
  }

  .story-copy {
    display: contents;
  }

  .story-copy .eyebrow {
    order: 1;
  }

  .story-copy h1,
  .story-copy h2 {
    order: 2;
  }

  .story-lede {
    order: 3;
  }

  .story-stage {
    order: 4;
    width: 100%;
  }

  .story-steps {
    order: 5;
    width: 100%;
  }

  .story-copy h1,
  .story-copy h2 {
    max-width: 16ch;
    font-size: 36px;
  }

  .story-stage {
    min-height: 460px;
  }

  .scan-showcase {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .scan-showcase__copy h1 {
    max-width: 16ch;
    font-size: 38px;
  }

  .scan-stage {
    min-height: 460px;
  }

  .scan-source {
    inset: 18% 8% 35% 7%;
  }

  .review-panel {
    position: static;
    max-height: none;
  }

  .stats-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rp-review-stage {
    grid-template-columns: 1fr;
  }

  .rp-side-pane {
    position: static;
    max-height: none;
  }

  .rp-review-stage .rp-review-card {
    max-height: none;
  }

  .rp-review-stage .rp-review-list {
    max-height: 360px;
  }
}

@media (max-width: 760px) {
  .appbar,
  .navbar,
  .home-main,
  .results-page,
  .footer {
    width: min(100% - 20px, 1400px);
  }

  .appbar {
    height: auto;
    min-height: 58px;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand actions"
      "score score";
    row-gap: 8px;
    padding: var(--s-2) var(--s-3);
  }

  .results-shell .appbar {
    grid-template-columns: 1fr auto;
    min-height: 72px;
  }

  .appbar-brand-group {
    display: flex;
    grid-area: brand;
    gap: 4px;
    min-width: 0;
    max-width: 100%;
  }

  .appbar-scoreboard-group {
    grid-area: score;
    min-width: 0;
    max-width: 100%;
  }

  .brand--static {
    font-size: 14px;
    max-width: 100%;
  }

  .brand-mark {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
  }

  .brand-mark svg {
    width: 22px;
    height: 22px;
  }

  .brand-tagline {
    font-size: 9px;
    letter-spacing: 0.03em;
    padding-top: 4px;
    max-width: 100%;
    line-height: 1.3;
  }

  .scoreboard-brand {
    --scoreboard-tile-w: 16px;
    --scoreboard-tile-top-h: 18px;
    --scoreboard-tile-h: 18px;
  }

  .scoreboard-tile__face {
    font-size: 11px;
  }

  .scoreboard-brand__row--top .scoreboard-tile__face {
    font-size: 11px;
  }

  .scoreboard-brand__row--prompt .scoreboard-tile__face {
    font-size: 10px;
  }

  .scoreboard-brand__logo {
    width: var(--scoreboard-logo-w);
    height: var(--scoreboard-logo-h);
  }

  .scoreboard-logo-mark {
    width: 27px;
    height: 27px;
  }

  .appbar-actions {
    grid-area: actions;
    justify-content: flex-end;
  }

  .appbar--public {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "actions"
      "score";
    justify-items: center;
    row-gap: 10px;
  }

  .appbar--public > .brand,
  .appbar--public .appbar-brand-group {
    justify-self: center;
    align-items: center;
  }

  .appbar--public .brand-tagline {
    display: none;
  }

  .appbar--public .appbar-scoreboard-group {
    display: none;
  }

  .appbar-actions--public {
    width: 100%;
    max-width: 100%;
    justify-self: stretch;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
  }

  .appbar-main-nav {
    width: auto;
    max-width: none;
    justify-content: center;
    gap: 6px;
    padding-top: 0;
    flex-wrap: nowrap;
  }

  .appbar-actions--public .appbar-auth {
    width: auto;
    justify-content: center;
    gap: 6px;
    padding-left: 0;
    border-left: 0;
  }

  .appbar-actions--public .appbar-main-nav {
    padding-left: 0;
    border-left: 0;
  }

  .appbar-main-nav a,
  .nav-login {
    font-size: 10px;
  }

  .appbar-actions--public .btn {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 10px;
  }

  .appbar-actions--public .btn--primary {
    min-width: 104px;
  }

  .appbar-actions--public .nav-login {
    min-height: 34px;
    padding: 7px 9px;
  }

  .home-hero {
    gap: var(--s-6);
    padding: var(--s-5) 0 var(--s-8);
  }

  .home-hero h1,
  .stadium-hero h1 {
    font-size: clamp(28px, 8vw, 38px);
    max-width: 100%;
    word-wrap: break-word;
  }

  .stadium-hero {
    min-height: auto;
  }

  .stadium-hero__copy {
    padding-inline: 14px;
  }

  .hero-actions {
    width: 100%;
    justify-content: center;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
    min-width: 0;
  }

  .stadium-hero__stage {
    width: min(100%, 980px);
  }

  .hero-sub {
    font-size: 16px;
  }

  .home-hero__stage {
    max-width: 430px;
  }

  .how-strip {
    padding: var(--s-6) 0;
  }

  .how-strip__item {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .upload-copy h1,
  .upload-copy h2 {
    font-size: 34px;
  }

  .result-summary {
    display: grid;
    align-items: start;
  }

  .upload-layout,
  .home-main {
    gap: var(--s-4);
  }

  .drop-zone {
    min-height: 360px;
    padding: var(--s-5);
  }

  .upload-options {
    grid-template-columns: 1fr;
  }

  .scroll-story {
    height: 460vh;
  }

  .scroll-story__sticky {
    padding: var(--s-8) 0;
  }

  .story-copy h1,
  .story-copy h2 {
    font-size: 32px;
  }

  .story-step {
    grid-template-columns: 34px 1fr;
  }

  .story-stage {
    min-height: 390px;
  }

  .scan-showcase {
    gap: var(--s-5);
    padding: var(--s-8) 0;
  }

  .scan-showcase__copy h1 {
    font-size: 34px;
  }

  .scan-stage {
    min-height: 390px;
  }

  .scan-source {
    inset: 21% 5% 36%;
  }

  .story-cell {
    width: 44px;
    height: 44px;
    font-size: 11px;
  }

  .story-data-card {
    right: 14px;
    bottom: 14px;
    width: min(260px, calc(100% - 28px));
  }

  .preview-meta,
  .panel-head {
    display: grid;
  }

  .preview-actions,
  .export-actions {
    width: 100%;
  }

  .preview-actions .btn,
  .export-actions .btn {
    flex: 1;
  }

  .stats-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scorecard-table {
    --scorecard-row-h: 64px;
    --scorecard-summary-row-h: 24px;
    --scorecard-cell-min-w: 64px;
    --scorecard-left-cols-w: 254px;
  }

  .scorecard-table .batter-col {
    width: 150px;
    min-width: 150px;
  }

  .scorecard-table .pos-col {
    left: 214px;
    width: 40px;
    min-width: 40px;
  }

  .scorecard-table .jersey-col {
    left: 28px;
    width: 36px;
    min-width: 36px;
  }

  .scorecard-table .batter-col {
    left: 64px;
  }

  .scorecard-table .order-col {
    left: 0;
    width: 28px;
    min-width: 28px;
  }

  .dcell {
    min-width: var(--scorecard-cell-min-w);
    height: var(--scorecard-row-h);
  }

  .rp-photo-meta {
    align-items: stretch;
  }

  .rp-photo-legend,
  .rp-overlay-mode,
  .rp-photo-zoom {
    width: 100%;
  }

  .rp-overlay-mode,
  .rp-photo-zoom {
    justify-content: space-between;
  }

  .rp-overlay-mode label,
  .rp-photo-zoom label {
    flex: 1;
  }

  .rp-overlay-mode span,
  .rp-photo-zoom span {
    justify-content: center;
    width: 100%;
  }

  .rp-review-list button {
    grid-template-columns: 28px 1fr auto;
    gap: 8px;
  }

  .rp-review-play {
    grid-column: 2 / -1;
  }

  .rp-marker-detail {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: min(78vh, 680px);
    transform: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .rp-marker-facts > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .footer {
    display: grid;
  }
}

@media (max-width: 520px) {
  .scoreboard-brand {
    --scoreboard-tile-w: 11px;
    --scoreboard-tile-top-h: 12px;
    --scoreboard-tile-h: 12px;
    gap: 5px;
    padding: 5px 6px;
  }

  .scoreboard-brand__row {
    gap: 1px;
  }

  .scoreboard-tile--space {
    width: var(--scoreboard-tile-w);
  }

  .scoreboard-tile__face {
    font-size: 8px;
  }

  .scoreboard-brand__row--top .scoreboard-tile__face {
    font-size: 8px;
  }

  .scoreboard-brand__row--prompt .scoreboard-tile__face {
    font-size: 7px;
  }

  .scoreboard-brand__logo {
    width: var(--scoreboard-logo-w);
    height: var(--scoreboard-logo-h);
  }

  .scoreboard-logo-mark {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 1120px) {
  .home-cinematic .motion-hero {
    min-height: 310vh;
  }

  .home-cinematic .home-hero__sticky {
    grid-template-columns: 1fr;
    align-content: center;
    gap: var(--s-6);
    padding-top: var(--s-6);
  }

  .home-cinematic .motion-hero .home-hero__copy {
    max-width: 760px;
  }

  .home-cinematic .motion-hero .home-hero__stage {
    width: min(100%, 680px);
    margin: 0 auto;
  }

  .home-cinematic .home-hero h1 {
    max-width: 12ch;
    font-size: clamp(42px, 9vw, 76px);
  }

  .home-cinematic .motion-chapters {
    max-width: 720px;
  }
}

@media (max-width: 760px) {
  .home-cinematic .motion-hero {
    min-height: 280vh;
  }

  .home-cinematic .home-hero__sticky {
    top: 58px;
    min-height: calc(100vh - 58px);
    padding: var(--s-5) 0 var(--s-8);
  }

  .home-cinematic .home-hero h1 {
    max-width: 12ch;
    font-size: clamp(36px, 10vw, 48px);
    line-height: 0.94;
  }

  .home-cinematic .hero-sub {
    max-width: 36ch;
  }

  .home-cinematic .motion-hero .home-hero__stage {
    width: min(100%, 440px);
  }

  .home-cinematic .motion-stage-shell {
    transform: translateY(-8px);
  }

  .home-cinematic .motion-chapters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-top: var(--s-1);
  }

  .home-cinematic .motion-chapter {
    display: flex;
    min-width: 0;
    padding: 0;
    border: 0;
    transform: none;
  }

  .home-cinematic .motion-chapter:last-child {
    border-bottom: 0;
  }

  .home-cinematic .motion-chapter > span {
    width: 100%;
    height: 30px;
  }

  .home-cinematic .motion-chapter div,
  .home-cinematic .motion-chapter p {
    display: none;
  }

  .home-cinematic .motion-hero .home-hero__stage {
    margin-top: -10px;
  }

  .home-cinematic .motion-data-card {
    left: 5%;
    right: 5%;
    bottom: 4%;
    width: auto;
  }
}

@media (max-width: 1120px) {
  .home-cinematic .stadium-hero {
    grid-template-columns: 1fr;
    gap: var(--s-6);
    min-height: calc(100vh - 64px);
    padding-top: clamp(28px, 4.5vw, 48px);
  }

  .home-cinematic .stadium-hero__copy {
    max-width: 760px;
  }

  .home-cinematic .stadium-hero__stage {
    width: min(100%, 820px);
    top: auto;
    margin: clamp(18px, 3.5vw, 36px) auto 0;
  }

  .home-cinematic .scan-story__stage {
    width: min(100%, 620px);
    margin: 0 auto;
  }

  .home-cinematic .scan-story__stage {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
  }

  .home-cinematic .scan-story__sticky {
    grid-template-columns: 1fr;
    align-content: center;
    gap: var(--s-5);
    padding-top: var(--s-5);
  }

  .home-cinematic .scan-story__copy {
    max-width: 760px;
  }

  .home-cinematic .stadium-hero h1 {
    max-width: 12ch;
    font-size: clamp(42px, 9vw, 76px);
  }

  .home-cinematic .scan-story__copy h2 {
    max-width: 14ch;
    font-size: clamp(36px, 7.4vw, 62px);
  }
}

@media (max-width: 760px) {
  .home-cinematic .stadium-hero {
    min-height: calc(100vh - 58px);
    gap: var(--s-4);
    padding: var(--s-5) 0 0;
  }

  .home-cinematic .stadium-hero__copy {
    gap: var(--s-4);
  }

  .home-cinematic .stadium-hero h1 {
    max-width: 12ch;
    font-size: clamp(38px, 10vw, 50px);
    line-height: 0.94;
  }

  .home-cinematic .stadium-hero .hero-sub {
    max-width: 36ch;
  }

  .home-cinematic .stadium-hero__stage {
    width: min(118%, 520px);
    top: auto;
    margin: 18px auto 0;
  }

  .home-cinematic .hero-stage-shell #heroStage3dMount {
    transform:
      translate3d(0, 0, 52px)
      rotateX(-7deg)
      rotateY(-8deg)
      rotateZ(-1deg);
  }

  .home-cinematic .scan-story {
    min-height: 560vh;
  }

  .home-cinematic .scan-story__sticky {
    top: 58px;
    min-height: calc(100vh - 58px);
    gap: var(--s-3);
    padding: var(--s-3) 0 var(--s-6);
  }

  .home-cinematic .scan-story__copy {
    gap: var(--s-3);
  }

  .home-cinematic .scan-story__copy h2 {
    max-width: 13ch;
    font-size: clamp(30px, 8vw, 40px);
  }

  .home-cinematic .scan-story__copy .hero-sub {
    max-width: 34ch;
    font-size: 14px;
    line-height: 1.42;
  }

  .home-cinematic .scan-story__stage {
    width: min(100%, 430px);
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 5px;
    margin-top: -4px;
  }

  .home-cinematic .scan-story .motion-chapters {
    grid-template-columns: 1fr;
    gap: 7px;
    margin: 0;
  }

  .home-cinematic .scan-story .motion-chapter {
    border: 1px solid rgba(83, 60, 35, 0.14);
  }

  .home-cinematic .scan-story .motion-chapter > span {
    width: 34px;
    height: 34px;
  }
}

.home-cinematic .motion-hero[data-motion-phase="4"] .motion-data-card {
  bottom: -19%;
}

@media (max-width: 760px) {
  .home-cinematic .motion-hero[data-motion-phase="4"] .motion-data-card {
    left: 8%;
    right: 8%;
    bottom: -17%;
    width: auto;
  }
}

/* ───── Mobile landing (waitlist + plan path) ─────
   Hidden on desktop. On mobile (<=760px) it replaces the cinematic
   homepage entirely — phone visitors are mostly people who want the
   product, so we give them a fast path to the app waitlist and plans. */
.mobile-landing { display: none; }
.mobile-story,
.mobile-plans { display: none; }
.appbar-start--mobile { display: none; }

@media (max-width: 760px) {
  .appbar-start--desktop {
    display: none !important;
  }

  .appbar-start--mobile {
    display: inline-flex;
  }

  .home-cinematic .appbar-main-nav,
  .home-cinematic .brand-tagline {
    display: none;
  }

  .home-cinematic .appbar--public {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-inline: 10px;
  }

  .home-cinematic .appbar-actions--public {
    justify-self: end;
  }

  .home-cinematic .appbar-actions--public .appbar-auth {
    gap: 8px;
  }

  .home-footer-link--desktop {
    display: none;
  }

  .home-footer-link--mobile {
    display: block;
  }

  .home-cinematic .home-main {
    width: 100%;
  }

  .mobile-landing {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    display: block;
    box-sizing: border-box;
    width: 100%;
    margin: 0 auto;
    padding: clamp(30px, 9vw, 58px) max(18px, calc((100vw - 480px) / 2)) 38px;
    border-bottom: 1px solid rgba(216, 201, 138, 0.10);
    background:
      radial-gradient(circle at 50% -8%, rgba(143, 211, 255, 0.16), transparent 34%),
      radial-gradient(circle at 14% 18%, rgba(216, 201, 138, 0.12), transparent 26%),
      linear-gradient(180deg, #061018 0%, #071018 62%, #0b1113 100%);
    color: #f6f4e9;
  }

  .mobile-landing::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
      linear-gradient(180deg, rgba(5, 10, 14, 0.24) 0%, rgba(5, 10, 14, 0.82) 45%, rgba(11, 17, 19, 0.98) 100%),
      radial-gradient(circle at 52% 28%, rgba(5, 10, 14, 0.12), rgba(5, 10, 14, 0.74) 62%, rgba(5, 10, 14, 0.96) 100%);
    pointer-events: none;
  }

  .mobile-landing__motion {
    position: absolute;
    inset: -26px -78px auto -78px;
    height: 340px;
    z-index: -2;
    overflow: hidden;
    opacity: 0.62;
    pointer-events: none;
    transform: rotate(-5deg);
    filter: saturate(0.72) contrast(1.04);
    mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.88) 48%, transparent 100%);
  }

  .mobile-motion-row {
    position: absolute;
    left: -36px;
    display: flex;
    gap: 10px;
    width: max-content;
    will-change: transform;
  }

  .mobile-motion-row--one {
    top: 8px;
    animation: mobile-gallery-drift-a 34s linear infinite;
  }

  .mobile-motion-row--two {
    top: 150px;
    animation: mobile-gallery-drift-b 38s linear infinite;
  }

  .mobile-motion-row img {
    display: block;
    width: clamp(132px, 39vw, 178px);
    height: 112px;
    object-fit: cover;
    border: 1px solid rgba(246, 244, 233, 0.10);
    border-radius: 8px;
    background: rgba(246, 244, 233, 0.04);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.36);
    filter: brightness(0.58);
  }

  .mobile-landing__inner {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 18px;
    max-width: 460px;
    margin-inline: auto;
    text-align: center;
  }
  .mobile-landing__kicker {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    color: #8fd3ff;
  }
  .mobile-landing__title {
    margin: 0;
    color: #fff;
    font-size: clamp(34px, 10vw, 50px);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: 0;
  }
  .mobile-landing__sub {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: rgba(246, 244, 233, 0.68);
  }
  .mobile-landing__app-card {
    margin-top: 16px;
    padding: 22px 18px 20px;
    border: 1px solid rgba(216, 201, 138, 0.18);
    border-radius: 8px;
    background:
      linear-gradient(180deg, rgba(246, 244, 233, 0.07), rgba(246, 244, 233, 0.03)),
      rgba(8, 18, 24, 0.88);
    box-shadow: inset 0 1px 0 rgba(246, 244, 233, 0.08);
    text-align: left;
  }
  .mobile-landing__app-eyebrow {
    margin: 0 0 4px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #d8c98a;
  }
  .mobile-landing__app-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
    color: #f6f4e9;
  }
  .mobile-landing__app-sub {
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(246, 244, 233, 0.62);
  }
  .mobile-landing__form {
    display: grid;
    gap: 10px;
  }
  .mobile-landing__form input[type="email"] {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid rgba(83, 60, 35, 0.22);
    background: #fff;
    font-size: 15px;
    color: var(--text);
  }
  .mobile-landing__platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: rgba(246, 244, 233, 0.66);
  }
  .mobile-landing__platforms label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }
  .mobile-landing__submit {
    width: 100%;
    padding-block: 12px;
    font-size: 15px;
  }
  .mobile-landing__status {
    margin: 4px 0 0;
    min-height: 1em;
    font-size: 12px;
    color: rgba(246, 244, 233, 0.48);
  }
  .mobile-landing__status[data-state="ok"] { color: #2e7d4f; }
  .mobile-landing__status[data-state="error"] { color: #b04a3e; }
  .mobile-landing__plans {
    width: 100%;
    justify-content: center;
    border-color: rgba(246, 244, 233, 0.22);
    color: #f6f4e9;
  }

  .mobile-story,
  .mobile-plans {
    box-sizing: border-box;
    display: grid;
    width: 100%;
    padding: clamp(42px, 10vw, 64px) max(18px, calc((100vw - 480px) / 2));
    color: #f6f4e9;
    background: #071018;
  }

  .mobile-story {
    gap: 24px;
    border-bottom: 1px solid rgba(216, 201, 138, 0.10);
    background:
      radial-gradient(circle at 86% 12%, rgba(143, 211, 255, 0.12), transparent 30%),
      linear-gradient(180deg, #0b1113 0%, #071018 100%);
  }

  .mobile-kicker {
    margin: 0;
    color: #d8c98a;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .mobile-story__copy,
  .mobile-plans__head {
    display: grid;
    gap: 10px;
    max-width: 460px;
    margin-inline: auto;
  }

  .mobile-story__copy h2,
  .mobile-plans__head h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(31px, 9vw, 42px);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: 0;
  }

  .mobile-story__copy p:not(.mobile-kicker),
  .mobile-plans__head p:not(.mobile-kicker) {
    margin: 0;
    color: rgba(246, 244, 233, 0.66);
    font-size: 15px;
    line-height: 1.55;
  }

  .mobile-demo-phone {
    box-sizing: border-box;
    display: grid;
    gap: 12px;
    width: min(100%, 380px);
    margin-inline: auto;
    padding: 12px;
    border: 1px solid rgba(246, 244, 233, 0.16);
    border-radius: 8px;
    background:
      linear-gradient(180deg, rgba(246, 244, 233, 0.06), rgba(246, 244, 233, 0.025)),
      rgba(5, 11, 15, 0.92);
    box-shadow:
      0 24px 70px rgba(0, 0, 0, 0.36),
      inset 0 1px 0 rgba(246, 244, 233, 0.08);
  }

  .mobile-demo-phone__bar {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    color: rgba(246, 244, 233, 0.72);
    font-size: 12px;
  }

  .mobile-demo-phone__bar span {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #8fd3ff;
    box-shadow: 0 0 12px rgba(143, 211, 255, 0.62);
  }

  .mobile-demo-phone__bar strong {
    color: #f6f4e9;
  }

  .mobile-demo-phone__bar small {
    color: rgba(246, 244, 233, 0.48);
    font-size: 11px;
  }

  .mobile-demo-phone__photo {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border: 1px solid rgba(216, 201, 138, 0.16);
    border-radius: 8px;
    background: #0d151a;
  }

  .mobile-demo-phone__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.82) contrast(0.9) brightness(0.72);
  }

  .mobile-demo-phone__scan-line {
    position: absolute;
    left: 8%;
    right: 8%;
    top: 18%;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(143, 211, 255, 0.92), transparent);
    box-shadow: 0 0 18px rgba(143, 211, 255, 0.54);
    animation: mobile-scan-sweep 2400ms ease-in-out infinite;
  }

  .mobile-demo-phone__review {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(246, 244, 233, 0.11);
    border-radius: 8px;
    background: rgba(246, 244, 233, 0.04);
  }

  .mobile-demo-phone__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  .mobile-demo-phone__grid span {
    min-height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(246, 244, 233, 0.12);
    border-radius: 6px;
    color: rgba(246, 244, 233, 0.74);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 800;
    background: rgba(246, 244, 233, 0.045);
  }

  .mobile-demo-phone__grid span:nth-child(4) {
    border-color: rgba(216, 201, 138, 0.56);
    color: #d8c98a;
    background: rgba(216, 201, 138, 0.08);
  }

  .mobile-demo-phone__review p {
    display: grid;
    gap: 2px;
    margin: 0;
    color: rgba(246, 244, 233, 0.54);
    font-size: 12px;
    line-height: 1.35;
  }

  .mobile-demo-phone__review strong {
    color: #f6f4e9;
    font-size: 14px;
  }

  .mobile-step-list,
  .mobile-plan-list {
    display: grid;
    gap: 10px;
    width: min(100%, 460px);
    margin-inline: auto;
  }

  .mobile-step-list article,
  .mobile-plan-card {
    box-sizing: border-box;
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(216, 201, 138, 0.14);
    border-radius: 8px;
    background:
      linear-gradient(180deg, rgba(246, 244, 233, 0.055), rgba(246, 244, 233, 0.024));
    color: #f6f4e9;
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(246, 244, 233, 0.08);
  }

  .mobile-step-list article {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .mobile-step-list article span {
    grid-row: span 2;
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(216, 201, 138, 0.24);
    border-radius: 6px;
    color: #d8c98a;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 900;
  }

  .mobile-step-list h3,
  .mobile-plan-card h3 {
    margin: 0;
    color: #f6f4e9;
    font-size: 18px;
    line-height: 1.15;
  }

  .mobile-step-list p,
  .mobile-plan-card p {
    margin: 0;
    color: rgba(246, 244, 233, 0.62);
    font-size: 14px;
    line-height: 1.5;
  }

  .mobile-plans {
    gap: 24px;
    border-bottom: 1px solid rgba(216, 201, 138, 0.10);
    background:
      radial-gradient(circle at 0% 8%, rgba(216, 201, 138, 0.10), transparent 26%),
      linear-gradient(180deg, #071018 0%, #0b0f14 100%);
    scroll-margin-top: 84px;
  }

  .mobile-plan-card__label {
    color: #d8c98a;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .mobile-plan-card strong {
    margin-top: 4px;
    color: #f6f4e9;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .mobile-plan-card--quick {
    border-color: rgba(143, 211, 255, 0.18);
    background:
      linear-gradient(145deg, rgba(35, 48, 61, 0.96), rgba(16, 24, 33, 0.98));
  }

  .mobile-plan-card--quick .mobile-plan-card__label,
  .mobile-plan-card--quick strong {
    color: #8fd3ff;
  }

  .mobile-plan-card--pressbox {
    background:
      linear-gradient(145deg, rgba(30, 45, 28, 0.98), rgba(18, 30, 18, 0.98));
  }

  .mobile-plan-card--clubhouse {
    background:
      linear-gradient(145deg, rgba(54, 37, 26, 0.98), rgba(34, 25, 18, 0.98));
  }

  .mobile-plans__league {
    justify-self: center;
    width: min(100%, 460px);
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid rgba(216, 201, 138, 0.18);
    border-radius: 8px;
    color: #f6f4e9;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
    background: rgba(246, 244, 233, 0.04);
  }

  .home-cinematic .stadium-hero,
  .home-cinematic .scan-experience,
  .home-cinematic .upload-workbench,
  .home-cinematic .upload-card,
  .home-cinematic .post-scan-choices,
  .home-cinematic aside.upload-next-card {
    display: none !important;
  }
}

@keyframes mobile-scan-sweep {
  0%, 100% {
    transform: translateY(0);
    opacity: 0;
  }
  18%, 78% {
    opacity: 1;
  }
  50% {
    transform: translateY(112px);
  }
}

@keyframes mobile-gallery-drift-a {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-48%, 0, 0); }
}

@keyframes mobile-gallery-drift-b {
  from { transform: translate3d(-42%, 0, 0); }
  to { transform: translate3d(0, 0, 0); }
}

@media (max-width: 420px) {
  .hero-actions {
    grid-template-columns: 1fr;
  }

  .scoreboard-brand {
    --scoreboard-tile-w: 10px;
    --scoreboard-tile-top-h: 12px;
    --scoreboard-tile-h: 12px;
    gap: 4px;
    padding-inline: 5px;
  }

  .scoreboard-logo-mark {
    width: 17px;
    height: 17px;
  }
}

/* Public product pages */
.public-shell {
  min-height: 100vh;
  background: #fbfbf7;
  color: var(--text);
}
.public-page {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 96px;
}
.public-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 460px);
  gap: 40px;
  align-items: center;
  padding: 28px 0 42px;
}
.public-hero--center {
  display: block;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.public-hero h1,
.public-doc h1 {
  margin: 8px 0 0;
  font-size: clamp(36px, 7vw, 72px);
  line-height: 0.98;
  letter-spacing: 0;
}
.public-lede {
  margin: 18px 0 0;
  color: var(--text-muted);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.55;
}
.public-hero__media {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(25, 36, 52, 0.14);
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(25, 36, 52, 0.12);
}
.public-hero__media img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.public-section {
  padding: 42px 0;
  border-top: 1px solid rgba(25, 36, 52, 0.12);
}
.public-section h2,
.public-cta h2,
.public-contact__side h2,
.public-doc h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.08;
  letter-spacing: 0;
}
.public-section p,
.public-doc p {
  color: var(--text-muted);
  line-height: 1.65;
}
.public-two-col {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 36px;
  align-items: start;
}
.public-steps,
.public-pricing {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}
.public-step,
.public-plan {
  min-height: 100%;
  padding: 22px;
  border: 1px solid rgba(25, 36, 52, 0.14);
  border-radius: 8px;
  background: #ffffff;
}
.public-step > span {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #183a59;
  color: #ffffff;
  font-weight: 700;
}
.public-step h3,
.public-plan h2 {
  margin: 18px 0 8px;
  letter-spacing: 0;
}
.public-step p,
.public-plan p,
.public-plan li {
  color: var(--text-muted);
  line-height: 1.55;
}
.public-mark-list {
  display: grid;
  gap: 10px;
}
.public-mark-list > div {
  display: grid;
  grid-template-columns: minmax(110px, 0.34fr) minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(25, 36, 52, 0.12);
}
.public-mark-list strong {
  color: #183a59;
}
.public-mark-list span {
  color: var(--text-muted);
  line-height: 1.45;
}
.public-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 24px;
  padding: 28px;
  border-radius: 8px;
  background: #183a59;
  color: #ffffff;
}
.public-cta p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.76);
}
.public-pricing {
  margin: 36px 0 46px;
}
.public-plan {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.public-plan--featured {
  border-color: #2495de;
  box-shadow: 0 20px 50px rgba(36, 149, 222, 0.16);
}
.public-plan__label {
  margin: 0;
  color: #2e7d4f;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.08em;
}
.public-plan h2 {
  font-size: 42px;
}
.public-plan ul {
  margin: 0 0 8px;
  padding-left: 18px;
}
.public-plan .btn {
  margin-top: auto;
}
.public-contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 28px;
  align-items: start;
}
.public-form {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid rgba(25, 36, 52, 0.14);
  border-radius: 8px;
  background: #ffffff;
}
.public-form label {
  display: grid;
  gap: 6px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}
.public-form input,
.public-form select,
.public-form textarea {
  width: 100%;
  border: 1px solid rgba(25, 36, 52, 0.2);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--text);
  font: inherit;
  background: #ffffff;
}
.public-form textarea {
  resize: vertical;
}
.public-form__status {
  min-height: 20px;
  margin: 0;
  color: #2e7d4f;
  font-size: 13px;
}
.public-form__status[data-state="error"] {
  color: #b04a3e;
}
.public-contact__side {
  padding: 24px;
  border: 1px solid rgba(25, 36, 52, 0.14);
  border-radius: 8px;
  background: #f0f7fb;
}
.public-doc {
  max-width: 820px;
}
.public-doc section {
  padding: 28px 0;
  border-top: 1px solid rgba(25, 36, 52, 0.12);
}
.public-footer a {
  color: inherit;
  text-decoration: none;
}
.public-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 860px) {
  .public-page {
    width: min(100% - 28px, 720px);
    padding-top: 28px;
  }
  .public-hero,
  .public-two-col,
  .public-contact {
    grid-template-columns: 1fr;
  }
  .public-steps,
  .public-pricing {
    grid-template-columns: 1fr;
  }
  .public-cta {
    display: grid;
  }
  .public-mark-list > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* ── How-to-keep-score guide ──────────────────────────────────────── */
/* Scorecard-cell SVG primitives (shared by gallery + worked inning) */
.sk-cell text,
.sk-field text,
.sk-anatomy__art text,
.sk-tutorial text {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.sk-frame { fill: #ffffff; stroke: rgba(25, 36, 52, 0.20); stroke-width: 1.5; }
.sk-diamond { fill: none; stroke: rgba(25, 36, 52, 0.26); stroke-width: 1.5; }
.sk-path { fill: none; stroke: #183a59; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.sk-score { fill: #183a59; stroke: #183a59; stroke-width: 1.5; stroke-linejoin: round; }
.sk-base { fill: #ffffff; stroke: #183a59; stroke-width: 1.5; }
.sk-mark { fill: #183a59; font-weight: 800; font-size: 26px; text-anchor: middle; }
.sk-mark--sm { font-size: 20px; }
.sk-mark--xs { font-size: 15px; letter-spacing: 0; }
.sk-tag { fill: #183a59; font-weight: 800; font-size: 14px; text-anchor: end; }
.sk-rbi { fill: #2495de; font-weight: 800; font-size: 11px; text-anchor: start; letter-spacing: 0.3px; }
.sk-axis { fill: #8a93a0; font-weight: 700; font-size: 11px; text-anchor: middle; letter-spacing: 0.06em; }

/* Animated inning tutorial */
.sk-tutorial {
  display: grid;
  gap: 22px;
}
.sk-tutorial__intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
}
.sk-tutorial__intro h2 {
  max-width: 720px;
}
.sk-tutorial__intro p:not(.eyebrow) {
  max-width: 780px;
  margin: 12px 0 0;
  color: var(--text-muted);
  line-height: 1.65;
}
.sk-tutorial__controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.sk-lesson-player {
  overflow: hidden;
  border: 1px solid rgba(25, 36, 52, 0.18);
  border-radius: 8px;
  background: #111b19;
  box-shadow: 0 22px 58px rgba(18, 28, 26, 0.18);
}
.sk-lesson-player__bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: #17221f;
  color: rgba(255, 255, 255, 0.84);
}
.sk-lesson-player__bar strong,
.sk-lesson-player__time {
  min-width: 0;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.sk-lesson-player__time {
  color: rgba(255, 255, 255, 0.58);
}
.sk-lesson-lights {
  display: inline-flex;
  gap: 5px;
}
.sk-lesson-lights i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e24a3b;
}
.sk-lesson-lights i:nth-child(2) { background: #f2b84b; }
.sk-lesson-lights i:nth-child(3) { background: #39b66d; }
.sk-tutorial__stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(138px, 0.2fr) minmax(320px, 0.5fr) minmax(360px, 0.82fr) minmax(120px, 0.18fr);
  grid-template-areas: "coach field board stats";
  gap: clamp(12px, 1.6vw, 20px);
  min-height: 430px;
  padding: clamp(14px, 2.2vw, 24px);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(8, 117, 209, 0.14), transparent 28%),
    radial-gradient(circle at 90% 18%, rgba(242, 184, 75, 0.18), transparent 24%),
    linear-gradient(180deg, #f5f8f4, #e9f0ec);
}
.sk-coach-panel {
  position: relative;
  display: grid;
  grid-area: coach;
  align-items: end;
  justify-items: center;
  min-width: 0;
  min-height: 382px;
  padding-top: 94px;
}
.sk-coach {
  display: block;
  width: min(190px, 100%);
  height: auto;
  overflow: visible;
  transform-origin: 50% 92%;
}
.sk-tutorial[data-playing="true"] .sk-coach {
  animation: skCoachBounce 900ms ease-in-out infinite;
}
.sk-coach__shadow { fill: rgba(18, 28, 26, 0.22); }
.sk-coach__leg,
.sk-coach__shoe,
.sk-coach__jersey-line,
.sk-coach__sleeve,
.sk-coach__pointer,
.sk-coach__arm-rest,
.sk-coach__smile {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sk-coach__leg { stroke: #26333a; stroke-width: 12; }
.sk-coach__shoe { stroke: #17221f; stroke-width: 11; }
.sk-coach__body { fill: #ffffff; stroke: #173a59; stroke-width: 4; }
.sk-coach__jersey-line { stroke: rgba(23, 58, 89, 0.24); stroke-width: 3; }
.sk-coach__head { fill: #f2c49a; stroke: #6c4630; stroke-width: 3; }
.sk-coach__cap { fill: #0875d1; stroke: #0a4470; stroke-width: 3; }
.sk-coach__cap-bill { fill: #183a59; stroke: #0a2f4d; stroke-width: 3; }
.sk-coach__eye { fill: #17221f; }
.sk-coach__smile { stroke: #6c4630; stroke-width: 3; }
.sk-coach__arm {
  transform-origin: 126px 111px;
  transition: transform 420ms var(--ease-out);
}
.sk-coach__sleeve { stroke: #0875d1; stroke-width: 14; }
.sk-coach__pointer { stroke: #d99b45; stroke-width: 5; }
.sk-coach__hand { fill: #f2c49a; stroke: #6c4630; stroke-width: 2; }
.sk-coach__arm-rest { stroke: #0875d1; stroke-width: 13; }
.sk-coach__mark {
  fill: #183a59;
  font-weight: 900;
  font-size: 25px;
  letter-spacing: 0;
  text-anchor: middle;
}
.sk-tutorial[data-step="0"] .sk-coach__arm { transform: rotate(-8deg); }
.sk-tutorial[data-step="1"] .sk-coach__arm { transform: rotate(-19deg); }
.sk-tutorial[data-step="2"] .sk-coach__arm { transform: rotate(2deg); }
.sk-tutorial[data-step="3"] .sk-coach__arm { transform: rotate(15deg); }
.sk-tutorial[data-step="4"] .sk-coach__arm { transform: rotate(28deg); }
.sk-tutorial[data-step="5"] .sk-coach__arm { transform: rotate(8deg); }
.sk-tutorial[data-playing="true"] .sk-coach__pointer {
  animation: skPointerTap 720ms ease-in-out infinite;
}
.sk-coach-bubble {
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  z-index: 2;
  max-width: 210px;
  margin: 0 auto;
  padding: 11px 13px;
  border: 2px solid rgba(23, 58, 89, 0.22);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 12px 24px rgba(18, 28, 26, 0.14);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}
.sk-coach-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 16px;
  height: 16px;
  border-right: 2px solid rgba(23, 58, 89, 0.22);
  border-bottom: 2px solid rgba(23, 58, 89, 0.22);
  background: #ffffff;
  transform: translateX(-50%) rotate(45deg);
}
.sk-play-field {
  position: relative;
  display: grid;
  grid-area: field;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(25, 36, 52, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(247, 251, 248, 0.68)),
    #e8f2e6;
  box-shadow: 0 14px 28px rgba(18, 28, 26, 0.12);
}
.sk-play-field__label {
  position: absolute;
  top: 11px;
  left: 12px;
  z-index: 2;
  color: rgba(23, 58, 89, 0.72);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}
.sk-play-field__art {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 380px;
  transition: opacity 220ms ease;
}
.sk-tutorial[data-play="single"] .sk-play-field__art {
  opacity: 0;
}
.sk-batter-camera {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}
.sk-tutorial[data-play="single"] .sk-batter-camera {
  opacity: 1;
}
.sk-batter-camera__art {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 380px;
}
.sk-batter-camera__scene {
  transform-box: fill-box;
  transform-origin: 50% 41%;
}
.sk-fpv-sky {
  fill: url(#skFpvSky);
}
.sk-fpv-stands {
  fill: #33506b;
  opacity: 0.92;
}
.sk-fpv-lights rect {
  fill: #e6eef6;
  stroke: #9db2c6;
  stroke-width: 1;
  filter: drop-shadow(0 0 5px rgba(255, 250, 210, 0.85));
}
.sk-fpv-wall {
  fill: #15402a;
}
.sk-fpv-wall-top {
  fill: #f2d15c;
}
.sk-fpv-sign rect {
  fill: #0c2c1c;
  stroke: #cfe6d6;
  stroke-width: 1;
}
.sk-fpv-sign-text {
  fill: #eaf4ee;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-anchor: middle;
}
.sk-fpv-outfield {
  fill: url(#skFpvGrass);
}
.sk-fpv-stripes path {
  fill: #ffffff;
  opacity: 0.1;
}
.sk-fpv-dirt {
  fill: url(#skFpvDirt);
  stroke: rgba(96, 64, 34, 0.28);
  stroke-width: 1.5;
}
.sk-fpv-foul {
  fill: none;
  stroke: rgba(255, 255, 255, 0.82);
  stroke-width: 3;
  stroke-linecap: round;
}
.sk-fpv-mound {
  fill: #d8b57f;
  stroke: rgba(96, 64, 34, 0.22);
  stroke-width: 1.5;
}
.sk-fpv-rubber {
  fill: #ffffff;
}
.sk-fpv-base,
.sk-fpv-plate {
  fill: #ffffff;
  stroke: #173a59;
  stroke-width: 1.3;
}
.sk-fpv-player-shadow {
  fill: rgba(18, 28, 26, 0.22);
}
.sk-fpv-pitcher__leg {
  fill: none;
  stroke: #253239;
  stroke-width: 4;
  stroke-linecap: round;
}
.sk-fpv-pitcher__body {
  fill: #ffffff;
  stroke: #173a59;
  stroke-width: 2.2;
}
.sk-fpv-pitcher__head {
  fill: #f2c49a;
  stroke: #6c4630;
  stroke-width: 1.8;
}
.sk-fpv-pitcher__cap {
  fill: #0875d1;
  stroke: #0a4470;
  stroke-width: 2;
}
.sk-fpv-pitcher__arm {
  fill: none;
  stroke: #0875d1;
  stroke-width: 5.5;
  stroke-linecap: round;
}
.sk-fpv-pitcher__hand {
  fill: #f2c49a;
  stroke: #6c4630;
  stroke-width: 1.2;
}
.sk-fpv-pitcher__arm--throw {
  transform-box: fill-box;
  transform-origin: 0% 100%;
}
.sk-fpv-defense {
  pointer-events: none;
}
.sk-fpv-defender__motion,
.sk-fpv-pitcher {
  transform-box: fill-box;
  transform-origin: center bottom;
}
.sk-fpv-defender__shadow {
  fill: rgba(18, 28, 26, 0.18);
}
.sk-fpv-defender__head {
  fill: #f2c49a;
  stroke: #6c4630;
  stroke-width: 1.3;
}
.sk-fpv-defender__body {
  fill: #eef6ff;
  stroke: #173a59;
  stroke-width: 1.7;
}
.sk-fpv-defender__legs {
  fill: none;
  stroke: #253239;
  stroke-linecap: round;
  stroke-width: 3;
}
.sk-fpv-defender__label {
  fill: rgba(10, 34, 48, 0.82);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.82);
  stroke-width: 2.5;
  text-anchor: middle;
}
.sk-fpv-defender--left,
.sk-fpv-defender--center,
.sk-fpv-defender--right {
  opacity: 0.95;
}
.sk-fpv-defender--catcher .sk-fpv-defender__body {
  fill: #dbe6f0;
}
.sk-fpv-defender--center .sk-fpv-defender__body {
  fill: #fff4c8;
  stroke: #6f4a12;
}
.sk-fpv-hands {
  filter: url(#skFpvSoftShadow);
  transform-box: fill-box;
  transform-origin: center bottom;
}
.sk-fpv-bat {
  transform-box: fill-box;
  transform-origin: 0% 100%;
}
.sk-fpv-bat-handle {
  fill: none;
  stroke: #b07a3e;
  stroke-width: 7;
  stroke-linecap: round;
}
.sk-fpv-bat-barrel {
  fill: none;
  stroke: #b07a3e;
  stroke-width: 15;
  stroke-linecap: round;
}
.sk-fpv-bat-knob {
  fill: #8a5a2c;
  stroke: #5e3c1c;
  stroke-width: 1.5;
}
.sk-fpv-glove {
  fill: #2a3a4a;
  stroke: #11202c;
  stroke-width: 1.6;
}
.sk-fpv-glove--upper {
  fill: #33455a;
}
.sk-fpv-pitch-trail,
.sk-fpv-drive-trail {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0;
}
.sk-fpv-pitch-trail {
  stroke: rgba(220, 40, 30, 0.7);
  stroke-width: 3;
}
.sk-fpv-drive-trail {
  stroke: rgba(242, 209, 92, 0.92);
  stroke-width: 5;
  filter: drop-shadow(0 0 6px rgba(242, 209, 92, 0.6));
}
.sk-fpv-hit-spot {
  fill: rgba(242, 209, 92, 0.8);
  stroke: rgba(111, 74, 18, 0.5);
  stroke-width: 1.5;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}
.sk-fpv-ball {
  fill: url(#skFpvBall);
  stroke: #c2342b;
  stroke-width: 0.7;
  opacity: 0.7;
  transform: translate(0, 0) scale(0.45);
  transform-box: fill-box;
  transform-origin: center;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));
}
.sk-fpv-flash {
  fill: url(#skFpvFlash);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}
.sk-fpv-burst {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}
.sk-fpv-burst path {
  fill: none;
  stroke: #fff2c2;
  stroke-width: 3;
  stroke-linecap: round;
}
.sk-fpv-vignette {
  fill: url(#skFpvVignette);
}
.sk-fpv-brim {
  fill: #0c1116;
  opacity: 0.9;
}
.sk-fpv-pop {
  paint-order: stroke;
  stroke: #0c2c1c;
  stroke-width: 3.4;
  fill: #ffffff;
  font-family: var(--font-mono);
  font-weight: 900;
  text-anchor: middle;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}
.sk-fpv-pop--safe {
  font-size: 22px;
}
.sk-fpv-pop--mark {
  font-size: 13px;
  text-transform: uppercase;
}
.sk-fpv-runner {
  opacity: 0;
  transform: translate(220px, 350px) scale(0.6);
  transform-box: fill-box;
  transform-origin: center;
}
.sk-fpv-runner__head {
  fill: #39b66d;
  stroke: #ffffff;
  stroke-width: 1.6;
}
.sk-fpv-runner__body,
.sk-fpv-runner__arm,
.sk-fpv-runner__leg {
  fill: none;
  stroke: #168a4a;
  stroke-width: 4;
  stroke-linecap: round;
}
.sk-batter-camera__story {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.sk-fpv-cue {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(24, 58, 89, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: rgba(24, 58, 89, 0.72);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
}
.sk-field-grass {
  fill: #d8ead4;
  stroke: rgba(25, 36, 52, 0.12);
  stroke-width: 2;
}
.sk-field-dirt {
  fill: #efe0c4;
  stroke: rgba(25, 36, 52, 0.15);
  stroke-width: 2;
}
.sk-field-line {
  fill: none;
  stroke: rgba(25, 36, 52, 0.28);
  stroke-dasharray: 4 5;
  stroke-linecap: round;
  stroke-width: 2;
}
.sk-field-base {
  fill: #ffffff;
  stroke: #183a59;
  stroke-width: 1.5;
}
.sk-field-player circle {
  fill: #ffffff;
  stroke: #183a59;
  stroke-width: 3;
}
.sk-field-player path {
  fill: none;
  stroke: #183a59;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}
.sk-field-player text,
.sk-ball-count text,
.sk-field-pop {
  fill: #183a59;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-anchor: middle;
  text-transform: uppercase;
}
.sk-field-player--short circle,
.sk-field-player--first circle {
  fill: #e7f1ff;
}
.sk-tutorial[data-play="groundout"] .sk-field-player--short circle,
.sk-tutorial[data-play="groundout"] .sk-field-player--first circle {
  fill: #f2d15c;
}
.sk-field-player--left circle,
.sk-field-player--center circle,
.sk-field-player--right circle {
  fill: #eaf6e8;
}
.sk-field-player--second circle,
.sk-field-player--third circle {
  fill: #fff5d4;
}
.sk-bat {
  stroke: #8b643d;
  stroke-width: 5;
  transform-origin: 8px -4px;
  transition: transform 260ms var(--ease-out);
}
.sk-tutorial[data-play="strikeout"][data-playing="true"] .sk-bat,
.sk-tutorial[data-play="single"][data-playing="true"] .sk-bat {
  animation: skBatSwing 760ms ease-out;
}
.sk-play-path,
.sk-play-runner {
  fill: none;
  stroke: #183a59;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0;
  transition: opacity 160ms ease, stroke-dashoffset 720ms var(--ease-out);
}
.sk-play-path {
  stroke-width: 4;
}
.sk-play-runner {
  stroke: #168a4a;
  stroke-width: 5;
}
.sk-ball {
  fill: #ffffff;
  stroke: #c2342b;
  stroke-width: 2;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}
.sk-ball-count,
.sk-swing-arc,
.sk-strike-zone,
.sk-field-pop {
  opacity: 0;
  transition: opacity 180ms ease;
}
.sk-ball-count circle {
  fill: #ffffff;
  stroke: #c2342b;
  stroke-width: 2;
}
.sk-swing-arc {
  fill: none;
  stroke: #c2342b;
  stroke-linecap: round;
  stroke-width: 4;
}
.sk-strike-zone {
  fill: rgba(8, 117, 209, 0.10);
  stroke: rgba(8, 117, 209, 0.78);
  stroke-dasharray: 5 4;
  stroke-width: 2;
}
.sk-field-pop {
  fill: #c2342b;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.75);
  stroke-width: 4;
}
.sk-tutorial[data-play="single"] .sk-play-path--single,
.sk-tutorial[data-play="single"] .sk-play-runner--to-first,
.sk-tutorial[data-play="walk"] .sk-play-path--walk,
.sk-tutorial[data-play="walk"] .sk-play-runner--to-first,
.sk-tutorial[data-play="strikeout"] .sk-play-path--pitch,
.sk-tutorial[data-play="looking"] .sk-play-path--pitch,
.sk-tutorial[data-play="groundout"] .sk-play-path--grounder,
.sk-tutorial[data-play="groundout"] .sk-play-path--throw {
  opacity: 1;
  stroke-dashoffset: 0;
}
.sk-tutorial[data-playing="true"] .sk-play-path,
.sk-tutorial[data-playing="true"] .sk-play-runner {
  animation: skDrawLine 900ms var(--ease-out) both;
}
.sk-tutorial[data-play="single"] .sk-ball--single,
.sk-tutorial[data-play="walk"] .sk-ball--walk,
.sk-tutorial[data-play="strikeout"] .sk-ball--strikeout,
.sk-tutorial[data-play="looking"] .sk-ball--looking,
.sk-tutorial[data-play="groundout"] .sk-ball--groundout {
  opacity: 1;
}
.sk-tutorial[data-play="single"][data-playing="true"] .sk-ball--single {
  animation: skBallSingle 1100ms var(--ease-out) both;
}
.sk-tutorial[data-play="walk"][data-playing="true"] .sk-ball--walk {
  animation: skBallWalk 1100ms ease-out both;
}
.sk-tutorial[data-play="strikeout"][data-playing="true"] .sk-ball--strikeout,
.sk-tutorial[data-play="looking"][data-playing="true"] .sk-ball--looking {
  animation: skBallPitch 900ms ease-out both;
}
.sk-tutorial[data-play="groundout"][data-playing="true"] .sk-ball--groundout {
  animation: skBallGroundout 1500ms var(--ease-out) both;
}
.sk-tutorial[data-play="walk"] .sk-ball-count,
.sk-tutorial[data-play="strikeout"] .sk-swing-arc,
.sk-tutorial[data-play="looking"] .sk-strike-zone,
.sk-tutorial[data-play="single"] .sk-field-pop--hit,
.sk-tutorial[data-play="strikeout"] .sk-field-pop--miss,
.sk-tutorial[data-play="looking"] .sk-field-pop--looking,
.sk-tutorial[data-play="groundout"] .sk-field-pop--out {
  opacity: 1;
}
.sk-tutorial[data-playing="true"] .sk-field-pop {
  animation: skPopText 900ms ease-out both;
}
.sk-tutorial[data-play="single"][data-playing="true"] .sk-batter-camera__scene {
  animation: skFpvCameraSingle 6200ms cubic-bezier(0.2, 0.78, 0.22, 1) both;
}
.sk-tutorial[data-play="single"][data-playing="true"] .sk-fpv-pitcher__arm--throw {
  animation: skFpvPitcherThrow 6200ms ease-in-out both;
}
.sk-tutorial[data-play="single"][data-playing="true"] .sk-fpv-pitcher {
  animation: skFpvPitcherStayHome 6200ms ease-in-out both;
}
.sk-tutorial[data-play="single"][data-playing="true"] .sk-fpv-defender--center .sk-fpv-defender__motion {
  animation: skFpvCenterFielderBreak 6200ms ease-in-out both;
}
.sk-tutorial[data-play="single"][data-playing="true"] .sk-fpv-defender--left .sk-fpv-defender__motion,
.sk-tutorial[data-play="single"][data-playing="true"] .sk-fpv-defender--right .sk-fpv-defender__motion {
  animation: skFpvOutfielderRead 6200ms ease-in-out both;
}
.sk-tutorial[data-play="single"][data-playing="true"] .sk-fpv-defender--first .sk-fpv-defender__motion,
.sk-tutorial[data-play="single"][data-playing="true"] .sk-fpv-defender--second .sk-fpv-defender__motion,
.sk-tutorial[data-play="single"][data-playing="true"] .sk-fpv-defender--short .sk-fpv-defender__motion,
.sk-tutorial[data-play="single"][data-playing="true"] .sk-fpv-defender--third .sk-fpv-defender__motion {
  animation: skFpvInfieldReact 6200ms ease-in-out both;
}
.sk-tutorial[data-play="single"][data-playing="true"] .sk-fpv-pitch-trail {
  animation: skFpvPitchTrail 6200ms ease-out both;
}
.sk-tutorial[data-play="single"][data-playing="true"] .sk-fpv-drive-trail {
  animation: skFpvDriveTrail 6200ms ease-out both;
}
.sk-tutorial[data-play="single"][data-playing="true"] .sk-fpv-hit-spot {
  animation: skFpvHitSpot 6200ms ease-out both;
}
.sk-tutorial[data-play="single"][data-playing="true"] .sk-fpv-ball {
  animation: skFpvBallSingle 6200ms cubic-bezier(0.18, 0.72, 0.2, 1) both;
}
.sk-tutorial[data-play="single"][data-playing="true"] .sk-fpv-bat {
  animation: skFpvBatSingle 6200ms cubic-bezier(0.3, 0.1, 0.2, 1) both;
}
.sk-tutorial[data-play="single"][data-playing="true"] .sk-fpv-flash {
  animation: skFpvFlash 6200ms ease-out both;
}
.sk-tutorial[data-play="single"][data-playing="true"] .sk-fpv-burst {
  animation: skFpvBurst 6200ms ease-out both;
}
.sk-tutorial[data-play="single"][data-playing="true"] .sk-fpv-hands {
  animation: skFpvHandsExit 6200ms ease-in-out both;
}
.sk-tutorial[data-play="single"][data-playing="true"] .sk-fpv-runner {
  animation: skFpvRunnerToFirst 6200ms cubic-bezier(0.22, 0.74, 0.28, 1) both;
}
.sk-tutorial[data-play="single"][data-playing="true"] .sk-fpv-pop {
  animation: skFpvPop 6200ms ease-out both;
}
.sk-tutorial[data-play="single"][data-playing="true"] .sk-fpv-cue--pitch {
  animation: skFpvCuePitch 6200ms ease-out both;
}
.sk-tutorial[data-play="single"][data-playing="true"] .sk-fpv-cue--contact {
  animation: skFpvCueContact 6200ms ease-out both;
}
.sk-tutorial[data-play="single"][data-playing="true"] .sk-fpv-cue--drive {
  animation: skFpvCueDrive 6200ms ease-out both;
}
.sk-tutorial[data-play="single"][data-playing="true"] .sk-fpv-cue--run {
  animation: skFpvCueRun 6200ms ease-out both;
}
.sk-board-wrap {
  display: grid;
  grid-area: board;
  min-width: 0;
}
.sk-board {
  position: relative;
  overflow: hidden;
  min-height: 380px;
  border: 8px solid #8b643d;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    #153b34;
  background-size: 28px 28px, 28px 28px, auto;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.08),
    0 18px 36px rgba(18, 28, 26, 0.20);
}
.sk-board::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.16;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 26%, rgba(255, 255, 255, 0.20), transparent 8%),
    radial-gradient(circle at 72% 62%, rgba(255, 255, 255, 0.15), transparent 9%),
    linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.08) 44%, transparent 64%);
  transform: translateX(-18%);
}
.sk-tutorial[data-playing="true"] .sk-board::after {
  animation: skChalkDust 1500ms ease-in-out infinite;
}
.sk-board__callout {
  position: absolute;
  left: clamp(14px, 2.2vw, 24px);
  right: clamp(14px, 2.2vw, 24px);
  bottom: clamp(14px, 2.2vw, 22px);
  z-index: 2;
  width: fit-content;
  max-width: calc(100% - 32px);
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(9, 24, 22, 0.62);
  color: rgba(255, 255, 255, 0.94);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: uppercase;
}
.sk-board-art {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 380px;
}
.sk-board-title,
.sk-board-small,
.sk-board-mark,
.sk-board-rbi,
.sk-chalk-label {
  fill: rgba(249, 253, 246, 0.9);
  filter: url(#chalkRough);
  letter-spacing: 0;
}
.sk-board-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
}
.sk-board-small,
.sk-chalk-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.sk-board-field__grass {
  fill: rgba(91, 150, 99, 0.20);
  stroke: rgba(249, 253, 246, 0.42);
  stroke-width: 2;
}
.sk-board-field__dirt {
  fill: rgba(242, 184, 75, 0.22);
  stroke: rgba(249, 253, 246, 0.42);
  stroke-width: 2;
}
.sk-board-field__line,
.sk-board-cell__box,
.sk-board-cell__diamond {
  fill: none;
  stroke: rgba(249, 253, 246, 0.62);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sk-board-field__line { stroke-width: 2; stroke-dasharray: 5 6; }
.sk-board-cell__box { stroke-width: 2; }
.sk-board-cell__diamond { stroke-width: 2; }
.sk-board-route,
.sk-chalk-arrow {
  fill: none;
  stroke: #f9fdf6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 720ms var(--ease-out);
  filter: url(#chalkRough);
}
.sk-board-route { stroke-width: 5; }
.sk-chalk-arrow {
  stroke: #f2d15c;
  stroke-width: 3.5;
}
.sk-board-cell__fill {
  fill: rgba(249, 253, 246, 0.9);
  opacity: 0;
  transform: scale(0.74);
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 220ms ease, transform 420ms var(--ease-out);
}
.sk-board-mark {
  font-size: 30px;
  font-weight: 900;
  text-anchor: middle;
}
.sk-board-mark--small { font-size: 22px; }
.sk-board-mark--tag {
  font-size: 18px;
  text-anchor: end;
}
.sk-board-rbi {
  fill: #8fd8ff;
  font-size: 13px;
  font-weight: 900;
}
.sk-board-note,
.sk-chalk-label,
.sk-board-runner {
  opacity: 0;
  transform: translateY(5px);
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 220ms ease, transform 300ms var(--ease-out);
}
.sk-board-runner {
  fill: #39b66d;
  stroke: #f9fdf6;
  stroke-width: 2;
  transform: scale(0.7);
}
.sk-chalk-label {
  fill: #f2d15c;
}
.sk-chalk-cursor {
  opacity: 0.96;
  transform: translate(294px, 152px);
  transition: transform 520ms var(--ease-out), opacity 180ms ease;
}
.sk-chalk-cursor circle {
  fill: #f9fdf6;
  opacity: 0.88;
}
.sk-chalk-cursor path {
  fill: none;
  stroke: #f9fdf6;
  stroke-width: 4;
  stroke-linecap: round;
}
.sk-tutorial[data-playing="true"] .sk-chalk-cursor {
  animation: skChalkWiggle 380ms ease-in-out infinite;
}
.sk-board-mark--big { font-size: 34px; }
.sk-board-mark--huge { font-size: 56px; }
.sk-board-note--looking {
  transform: translateY(5px) scaleX(-1);
}
.sk-board-tip {
  max-width: 310px;
}
.sk-tutorial[data-play="single"] .sk-board-route--to-first,
.sk-tutorial[data-play="walk"] .sk-board-route--to-first,
.sk-tutorial[data-play="single"] .sk-chalk-arrow--single,
.sk-tutorial[data-play="walk"] .sk-chalk-arrow--walk,
.sk-tutorial[data-play="strikeout"] .sk-chalk-arrow--strikeout,
.sk-tutorial[data-play="looking"] .sk-chalk-arrow--looking,
.sk-tutorial[data-play="groundout"] .sk-chalk-arrow--groundout {
  stroke-dashoffset: 0;
}
.sk-tutorial[data-playing="true"] .sk-board-route,
.sk-tutorial[data-playing="true"] .sk-chalk-arrow {
  animation: skDrawLine 900ms var(--ease-out) both;
}
.sk-tutorial[data-play="single"] .sk-board-note--single,
.sk-tutorial[data-play="walk"] .sk-board-note--walk,
.sk-tutorial[data-play="strikeout"] .sk-board-note--strikeout,
.sk-tutorial[data-play="groundout"] .sk-board-note--groundout,
.sk-tutorial[data-play="single"] .sk-chalk-label--single,
.sk-tutorial[data-play="walk"] .sk-chalk-label--walk,
.sk-tutorial[data-play="strikeout"] .sk-chalk-label--strikeout,
.sk-tutorial[data-play="looking"] .sk-chalk-label--looking,
.sk-tutorial[data-play="groundout"] .sk-chalk-label--groundout {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.sk-tutorial[data-play="looking"] .sk-board-note--looking {
  opacity: 1;
  transform: translateY(0) scaleX(-1);
}
.sk-tutorial[data-play="single"][data-playing="true"] .sk-board-route--to-first,
.sk-tutorial[data-play="single"][data-playing="true"] .sk-chalk-arrow--single {
  animation: skFpvChalkDraw 6200ms var(--ease-out) both;
}
.sk-tutorial[data-play="single"][data-playing="true"] .sk-board-note--single,
.sk-tutorial[data-play="single"][data-playing="true"] .sk-chalk-label--single {
  animation: skFpvChalkReveal 6200ms ease-out both;
}
.sk-tutorial[data-play="single"] .sk-chalk-cursor { transform: translate(169px, 223px); }
.sk-tutorial[data-play="walk"] .sk-chalk-cursor { transform: translate(105px, 221px); }
.sk-tutorial[data-play="strikeout"] .sk-chalk-cursor { transform: translate(105px, 218px); }
.sk-tutorial[data-play="looking"] .sk-chalk-cursor { transform: translate(105px, 218px); }
.sk-tutorial[data-play="groundout"] .sk-chalk-cursor { transform: translate(105px, 218px); }
.sk-tutorial__scoreboard {
  display: grid;
  grid-area: stats;
  align-content: start;
  gap: 10px;
  min-width: 0;
}
.sk-score-stat {
  display: grid;
  gap: 3px;
  min-height: 72px;
  padding: 12px 13px;
  border: 1px solid rgba(25, 36, 52, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 20px rgba(18, 28, 26, 0.09);
}
.sk-score-stat span {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}
.sk-score-stat strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.sk-score-stat:nth-child(1) strong { color: var(--accent); }
.sk-score-stat:nth-child(2) strong { color: var(--green); }
.sk-score-stat:nth-child(3) strong { color: var(--red); }
.sk-bases {
  display: grid;
  place-items: center;
  min-height: 96px;
  padding: 10px 12px;
  border: 1px solid rgba(25, 36, 52, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 20px rgba(18, 28, 26, 0.09);
}
.sk-bases svg {
  display: block;
  width: 104px;
  max-width: 100%;
  height: auto;
}
.sk-bases__diamond {
  fill: none;
  stroke: rgba(25, 36, 52, 0.24);
  stroke-width: 2;
}
.sk-bases__base {
  fill: #ffffff;
  stroke: #183a59;
  stroke-width: 1.5;
}
.sk-bases__runner {
  fill: var(--green);
  stroke: #ffffff;
  stroke-width: 2;
  opacity: 0;
  transform: scale(0.7);
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 180ms ease, transform 220ms var(--ease-out);
}
.sk-tutorial[data-play="single"] .sk-bases__runner--first,
.sk-tutorial[data-play="walk"] .sk-bases__runner--first {
  opacity: 1;
  transform: scale(1);
}
.sk-tutorial__meter {
  height: 5px;
  background: rgba(255, 255, 255, 0.16);
}
.sk-tutorial__meter span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--green));
  transition: width 260ms ease;
}
.sk-tutorial__narration {
  display: grid;
  gap: 8px;
  max-width: 760px;
}
.sk-tutorial__narration .eyebrow,
.sk-tutorial__intro .eyebrow {
  margin: 0;
  color: var(--accent);
  letter-spacing: 0;
}
.sk-tutorial .sk-rbi { letter-spacing: 0; }
.sk-tutorial__narration h3 {
  margin: 0;
  color: var(--text);
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.12;
  letter-spacing: 0;
}
.sk-tutorial__narration p:not(.eyebrow) {
  margin: 0;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
}
.sk-tutorial__timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sk-tutorial__timeline button {
  appearance: none;
  width: 100%;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid rgba(25, 36, 52, 0.14);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-align: left;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}
.sk-tutorial__timeline button:hover,
.sk-tutorial__timeline button:focus-visible {
  border-color: rgba(8, 117, 209, 0.36);
  color: var(--text);
}
.sk-tutorial__timeline button[aria-current="step"] {
  border-color: rgba(8, 117, 209, 0.48);
  background: rgba(8, 117, 209, 0.10);
  color: #0b5f9c;
}

@keyframes skCoachBounce {
  0%, 100% { transform: translateY(0) rotate(-0.5deg); }
  50% { transform: translateY(-5px) rotate(0.6deg); }
}
@keyframes skPointerTap {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(3px, -3px); }
}
@keyframes skChalkWiggle {
  0%, 100% { opacity: 0.96; }
  50% { opacity: 0.62; }
}
@keyframes skChalkDust {
  0%, 100% { opacity: 0.12; transform: translateX(-18%); }
  50% { opacity: 0.22; transform: translateX(4%); }
}
@keyframes skDrawLine {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes skBatSwing {
  0% { transform: rotate(0deg); }
  46% { transform: rotate(-72deg); }
  100% { transform: rotate(-62deg); }
}
@keyframes skBallSingle {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 1; transform: translate(92px, -46px) scale(0.82); }
}
@keyframes skBallWalk {
  0% { opacity: 0; transform: translate(-32px, -20px) scale(0.82); }
  30% { opacity: 1; transform: translate(-18px, -8px) scale(1); }
  100% { opacity: 0; transform: translate(-8px, 10px) scale(0.86); }
}
@keyframes skBallPitch {
  0% { opacity: 1; transform: translate(0, 0) scale(0.85); }
  100% { opacity: 1; transform: translate(0, 66px) scale(1); }
}
@keyframes skBallGroundout {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  45% { opacity: 1; transform: translate(-44px, -76px) scale(0.86); }
  100% { opacity: 1; transform: translate(72px, -48px) scale(0.8); }
}
@keyframes skPopText {
  0% { opacity: 0; transform: translateY(5px) scale(0.92); }
  55% { opacity: 1; transform: translateY(0) scale(1.04); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes skFpvCameraSingle {
  0%, 22% { transform: translate(0, 0) scale(1); }
  26% { transform: translate(-3px, 2px) scale(1.018); }
  30% { transform: translate(3px, -1px) scale(1.03); }
  46% { transform: translate(0, -4px) scale(1.05); }
  64%, 100% { transform: translate(0, -8px) scale(1.075); }
}
@keyframes skFpvPitcherThrow {
  0%, 10% { transform: rotate(-54deg); }
  20% { transform: rotate(44deg); }
  27%, 100% { transform: rotate(18deg); }
}
@keyframes skFpvPitcherStayHome {
  0%, 100% { opacity: 1; }
}
@keyframes skFpvCenterFielderBreak {
  0%, 34% { transform: translate(0, 0) scale(1); }
  44% { transform: translate(3px, -5px) scale(1.03); }
  56% { transform: translate(5px, 4px) scale(1.04); }
  76%, 100% { transform: translate(1px, 8px) scale(1.02); }
}
@keyframes skFpvOutfielderRead {
  0%, 36% { transform: translate(0, 0); }
  58%, 100% { transform: translate(2px, 2px); }
}
@keyframes skFpvInfieldReact {
  0%, 30% { transform: translate(0, 0); }
  42% { transform: translate(0, -2px); }
  62%, 100% { transform: translate(0, 0); }
}
@keyframes skFpvPitchTrail {
  0%, 14% { opacity: 0; stroke-dashoffset: 1; }
  18% { opacity: 0.9; stroke-dashoffset: 0.5; }
  25% { opacity: 0.9; stroke-dashoffset: 0; }
  30%, 100% { opacity: 0; stroke-dashoffset: 0; }
}
@keyframes skFpvDriveTrail {
  0%, 29% { opacity: 0; stroke-dashoffset: 1; }
  34% { opacity: 1; stroke-dashoffset: 0.6; }
  58% { opacity: 1; stroke-dashoffset: 0; }
  74% { opacity: 0.7; stroke-dashoffset: 0; }
  100% { opacity: 0; stroke-dashoffset: 0; }
}
@keyframes skFpvHitSpot {
  0%, 52% { opacity: 0; transform: scale(0.7); }
  60% { opacity: 1; transform: scale(1.1); }
  78%, 100% { opacity: 0.72; transform: scale(1); }
}
@keyframes skFpvBallSingle {
  0% { opacity: 0.7; transform: translate(0, 0) scale(0.45); }
  8% { opacity: 1; transform: translate(0, 8px) scale(0.7); }
  18% { opacity: 1; transform: translate(2px, 40px) scale(1.5); }
  24% { opacity: 1; transform: translate(3px, 52px) scale(2.4); }
  27% { opacity: 1; transform: translate(4px, 50px) scale(2.6); }
  30% { opacity: 1; transform: translate(2px, 28px) scale(1.6); }
  40% { opacity: 1; transform: translate(-1px, -30px) scale(0.9); }
  55% { opacity: 1; transform: translate(0, -78px) scale(0.5); }
  64% { opacity: 0.95; transform: translate(0, -92px) scale(0.34); }
  72% { opacity: 0.9; transform: translate(1px, -86px) scale(0.32); }
  100% { opacity: 0.55; transform: translate(1px, -88px) scale(0.3); }
}
@keyframes skFpvBatSingle {
  0%, 18% { transform: rotate(6deg); }
  23% { transform: rotate(-34deg); }
  27% { transform: rotate(-92deg); }
  30% { transform: rotate(-116deg); }
  36% { transform: rotate(-138deg); }
  100% { transform: rotate(-132deg); }
}
@keyframes skFpvFlash {
  0%, 25% { opacity: 0; transform: scale(0.6); }
  29% { opacity: 1; transform: scale(1.15); }
  38% { opacity: 0; transform: scale(1.5); }
  100% { opacity: 0; transform: scale(1.5); }
}
@keyframes skFpvBurst {
  0%, 25% { opacity: 0; transform: scale(0.5); }
  29% { opacity: 1; transform: scale(1.1); }
  40% { opacity: 0; transform: scale(1.5); }
  100% { opacity: 0; transform: scale(1.5); }
}
@keyframes skFpvHandsExit {
  0%, 52% { opacity: 1; transform: translate(0, 0) scale(1); }
  70% { opacity: 0.3; transform: translate(10px, 42px) scale(0.96); }
  100% { opacity: 0; transform: translate(14px, 64px) scale(0.92); }
}
@keyframes skFpvRunnerToFirst {
  0%, 58% { opacity: 0; transform: translate(220px, 350px) scale(0.6); }
  66% { opacity: 1; transform: translate(250px, 332px) scale(0.62); }
  84% { opacity: 1; transform: translate(300px, 306px) scale(0.6); }
  100% { opacity: 1; transform: translate(316px, 300px) scale(0.58); }
}
@keyframes skFpvPop {
  0%, 60% { opacity: 0; transform: translateY(6px) scale(0.8); }
  66% { opacity: 1; transform: translateY(0) scale(1.06); }
  74% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes skFpvCuePitch {
  0%, 24% { background: #ffffff; color: #0b5f9c; transform: translateY(-2px); }
  31%, 100% { background: rgba(255, 255, 255, 0.78); color: rgba(24, 58, 89, 0.72); transform: translateY(0); }
}
@keyframes skFpvCueContact {
  0%, 24% { background: rgba(255, 255, 255, 0.78); color: rgba(24, 58, 89, 0.72); transform: translateY(0); }
  28%, 34% { background: #fff6cf; color: #7a4b00; transform: translateY(-2px); }
  42%, 100% { background: rgba(255, 255, 255, 0.78); color: rgba(24, 58, 89, 0.72); transform: translateY(0); }
}
@keyframes skFpvCueDrive {
  0%, 34% { background: rgba(255, 255, 255, 0.78); color: rgba(24, 58, 89, 0.72); transform: translateY(0); }
  40%, 60% { background: #e9f8ff; color: #0b5f9c; transform: translateY(-2px); }
  68%, 100% { background: rgba(255, 255, 255, 0.78); color: rgba(24, 58, 89, 0.72); transform: translateY(0); }
}
@keyframes skFpvCueRun {
  0%, 60% { background: rgba(255, 255, 255, 0.78); color: rgba(24, 58, 89, 0.72); transform: translateY(0); }
  66%, 100% { background: #e9f8ec; color: #168a4a; transform: translateY(-2px); }
}
@keyframes skFpvChalkDraw {
  0%, 72% { stroke-dashoffset: 1; }
  92%, 100% { stroke-dashoffset: 0; }
}
@keyframes skFpvChalkReveal {
  0%, 76% { opacity: 0; transform: translateY(7px) scale(0.82); }
  90%, 100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Hero secondary actions */
.sk-hero-cta { display: flex; align-items: center; gap: 20px; margin-top: 26px; flex-wrap: wrap; }
.sk-textlink { color: #183a59; font-weight: 600; text-decoration: none; }
.sk-textlink:hover { text-decoration: underline; }

/* Section intro block */
.sk-section-head { max-width: 720px; }
.sk-section-head h2 { margin-bottom: 10px; }
.sk-section-head p { color: var(--text-muted); line-height: 1.6; margin: 0; }

/* Keystone: anatomy of one cell */
.sk-anatomy { display: grid; grid-template-columns: minmax(220px, 0.85fr) minmax(0, 1fr); gap: 44px; align-items: center; }
.sk-anatomy__art { display: flex; justify-content: center; }
.sk-anatomy__art svg { width: 100%; max-width: 340px; height: auto; }
.sk-anatomy__copy h2 { margin-bottom: 12px; }
.sk-rules { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; counter-reset: skr; }
.sk-rules li { position: relative; padding-left: 44px; color: var(--text-muted); line-height: 1.5; }
.sk-rules li::before {
  counter-increment: skr; content: counter(skr);
  position: absolute; left: 0; top: -2px; width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #183a59; color: #fff; font-weight: 700; font-size: 14px;
}
.sk-rules strong { color: var(--text); }

/* Fielder diagram 1–9 */
.sk-field-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 40px; align-items: center; margin-top: 26px; }
.sk-field { width: 100%; max-width: 440px; height: auto; display: block; margin: 0 auto; }
.sk-grass { fill: #e7efe3; stroke: rgba(25, 36, 52, 0.10); stroke-width: 1.5; }
.sk-dirt { fill: #f1e7d3; stroke: rgba(25, 36, 52, 0.14); stroke-width: 1.5; }
.sk-foul { stroke: rgba(25, 36, 52, 0.30); stroke-width: 1.5; stroke-dasharray: 3 3; fill: none; }
.sk-pos circle { fill: #183a59; }
.sk-pos text { fill: #ffffff; font-weight: 800; font-size: 14px; text-anchor: middle; }
.sk-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 26px; }
.sk-legend li { display: flex; align-items: center; gap: 12px; color: var(--text-2); font-weight: 600; border-bottom: 1px solid rgba(25, 36, 52, 0.10); padding-bottom: 9px; }
.sk-legend b {
  flex: none; width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #eef3f8; color: #183a59; font-weight: 800; font-size: 13px;
}

/* Play gallery */
.sk-group { margin: 30px 0 0; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: #2495de; }
.sk-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; margin-top: 14px; }
.sk-play {
  margin: 0; padding: 16px 14px 18px; border: 1px solid rgba(25, 36, 52, 0.14);
  border-radius: 10px; background: #ffffff; text-align: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.sk-play:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(25, 36, 52, 0.10); }
.sk-cell { width: 100%; max-width: 104px; height: auto; display: block; margin: 0 auto 10px; }
.sk-play figcaption { display: block; }
.sk-play figcaption b { display: block; color: var(--text); font-size: 14px; margin-bottom: 3px; }
.sk-play figcaption span { display: block; color: var(--text-muted); font-size: 12.5px; line-height: 1.4; }
.sk-kk { display: inline-block; transform: scaleX(-1); font-weight: 800; font-style: normal; }
/* "also accepted" notation variants */
.sk-alt { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; justify-content: center; margin-top: 9px; }
.sk-alt::before {
  content: "also"; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-faint); margin-right: 1px;
}
.sk-alt .sk-chip {
  display: inline-block; padding: 1.5px 8px; border: 1px solid rgba(25, 36, 52, 0.16);
  border-radius: 999px; background: #f4f6f8; color: #183a59; font-size: 12px; font-weight: 700; line-height: 1.55;
}
.sk-section-head .sk-note { margin-top: 18px; }

/* Worked inning */
.sk-inning {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
  margin-top: 26px; border: 1px solid rgba(25, 36, 52, 0.16); border-radius: 12px; overflow: hidden;
}
.sk-inning__cell { margin: 0; padding: 20px 16px; border-left: 1px solid rgba(25, 36, 52, 0.12); }
.sk-inning__cell:first-child { border-left: 0; }
.sk-inning__cell .sk-cell { max-width: 112px; margin-bottom: 14px; }
.sk-inning__cell figcaption { color: var(--text-muted); font-size: 13px; line-height: 1.45; }
.sk-inning__cell figcaption b { color: var(--text); }
.sk-num {
  display: inline-flex; width: 22px; height: 22px; margin-right: 6px; vertical-align: -5px;
  align-items: center; justify-content: center; border-radius: 50%;
  background: #183a59; color: #fff; font-weight: 700; font-size: 12px;
}
.sk-inning__foot { margin: 18px 0 0; color: var(--text-muted); line-height: 1.6; }
.sk-inning__foot strong { color: var(--text); }

/* Spray chart */
.sk-spray { max-width: 430px; }
.sk-dist { fill: #9aa3b0; font-weight: 700; font-size: 9px; text-anchor: middle; letter-spacing: 0.02em; }
.sk-dot circle { fill: #183a59; stroke: #ffffff; stroke-width: 1.5; }
.sk-dot text { font-size: 11px; }
.sk-seq text { font-size: 13px; }
.sk-note {
  margin: 16px 0 0; padding: 12px 14px; border-left: 3px solid #2495de;
  background: #f0f7fb; border-radius: 0 8px 8px 0;
  color: var(--text-muted); font-size: 14px; line-height: 1.55;
}
/* "same number, two places" linking figure */
.sk-link-figure {
  display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap;
  margin-top: 30px; padding: 24px; border: 1px solid rgba(25, 36, 52, 0.14);
  border-radius: 12px; background: #fbfcfe;
}
.sk-link__item { margin: 0; width: 152px; text-align: center; }
.sk-link__item .sk-cell { max-width: 96px; margin: 0 auto 10px; }
.sk-link__item figcaption b { display: block; color: var(--text); font-size: 14px; margin-bottom: 3px; }
.sk-link__item figcaption span { display: block; color: var(--text-muted); font-size: 12.5px; line-height: 1.4; }
.sk-link-eq { flex: none; color: #183a59; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.sk-hit-lines { margin-top: 24px; }
.sk-hit-lines__lead { max-width: 760px; color: var(--text-muted); line-height: 1.6; margin: 0; }
.sk-hit-lines__lead strong { color: var(--text); }
.sk-hit-lines .sk-link-figure { margin-top: 16px; }

@media (max-width: 1080px) {
  .sk-tutorial__stage {
    grid-template-columns: minmax(136px, 0.28fr) minmax(0, 1fr);
    grid-template-areas:
      "coach field"
      "board board"
      "stats stats";
  }
  .sk-play-field__art,
  .sk-batter-camera__art {
    min-height: 300px;
  }
  .sk-tutorial__scoreboard {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .sk-bases {
    min-height: 72px;
  }
}

@media (max-width: 860px) {
  .sk-tutorial__intro {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .sk-tutorial__controls {
    justify-content: flex-start;
  }
  .sk-tutorial__stage {
    grid-template-columns: 1fr;
    grid-template-areas:
      "coach"
      "field"
      "board"
      "stats";
    min-height: 0;
  }
  .sk-coach-panel {
    min-height: 308px;
    padding-top: 82px;
  }
  .sk-coach {
    width: min(160px, 58vw);
  }
  .sk-coach-bubble {
    max-width: min(320px, 100%);
  }
  .sk-board,
  .sk-board-art {
    min-height: 320px;
  }
  .sk-play-field__art,
  .sk-batter-camera__art {
    min-height: 300px;
  }
  .sk-tutorial__scoreboard {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .sk-tutorial__timeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .sk-anatomy,
  .sk-field-grid { grid-template-columns: 1fr; gap: 28px; }
  .sk-inning { grid-template-columns: repeat(2, 1fr); }
  .sk-inning__cell:nth-child(3) { border-left: 0; }
  .sk-inning__cell:nth-child(n+3) { border-top: 1px solid rgba(25, 36, 52, 0.12); }
}
@media (max-width: 480px) {
  .sk-tutorial__controls .btn {
    width: 100%;
  }
  .sk-tutorial__scoreboard,
  .sk-tutorial__timeline {
    grid-template-columns: 1fr;
  }
  .sk-score-stat {
    min-height: 62px;
  }
  .sk-board {
    border-width: 6px;
  }
  .sk-board__callout {
    max-width: calc(100% - 24px);
    font-size: 11px;
  }
  .sk-batter-camera__story {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sk-legend { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .sk-coach,
  .sk-coach__arm,
  .sk-coach__pointer,
  .sk-board::after,
  .sk-board-route,
  .sk-chalk-arrow,
  .sk-board-cell__fill,
  .sk-board-note,
  .sk-chalk-label,
  .sk-board-runner,
  .sk-chalk-cursor,
  .sk-play-path,
  .sk-play-runner,
  .sk-ball,
  .sk-ball-count,
  .sk-swing-arc,
  .sk-strike-zone,
  .sk-field-pop,
  .sk-bat,
  .sk-bases__runner,
  .sk-batter-camera__scene,
  .sk-fpv-pitcher,
  .sk-fpv-pitcher__arm--throw,
  .sk-fpv-defender__motion,
  .sk-fpv-pitch-trail,
  .sk-fpv-drive-trail,
  .sk-fpv-hit-spot,
  .sk-fpv-ball,
  .sk-fpv-bat,
  .sk-fpv-contact-burst,
  .sk-fpv-flash,
  .sk-fpv-burst,
  .sk-fpv-hands,
  .sk-fpv-pop,
  .sk-fpv-batter,
  .sk-fpv-runner,
  .sk-fpv-cue,
  .sk-tutorial__meter span,
  .sk-tutorial__timeline button {
    animation: none !important;
    transition: none !important;
  }
}

/* ════════════════════════════════════════════════════════════════════
   Enthusiast tier — /shelf collection page + results Game panel
   ════════════════════════════════════════════════════════════════════ */

/* ── Shelf facet chips ── */
.shelf-facets {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 22px;
}
.shelf-facet-group {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.shelf-facet-group__label {
  flex: 0 0 72px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-faint);
}
.shelf-facet-group__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.facet-chip {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: var(--fs-13);
  font-weight: 600;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.facet-chip em {
  font-style: normal;
  color: var(--text-faint);
  margin-left: 4px;
}
.facet-chip:hover { border-color: var(--border-strong); }
.facet-chip.is-active {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}
.facet-chip.is-active em { color: rgba(255, 255, 255, 0.6); }

/* ── Shelf cards ── */
.shelf-card__matchup {
  font-weight: 700;
  font-size: var(--fs-16);
  color: var(--text);
}
.shelf-card__meta {
  margin: 4px 0 0;
  font-size: var(--fs-13);
  color: var(--text-muted);
}
.shelf-card__tags {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  font-size: var(--fs-12);
  color: var(--text-faint);
}
.shelf-card__league { font-family: var(--font-mono); letter-spacing: var(--tracking-wider); }

.acc-badge {
  border-radius: 999px;
  padding: 3px 10px;
  font-size: var(--fs-12);
  font-weight: 700;
  white-space: nowrap;
}
.acc-badge--good { background: rgba(47, 125, 50, 0.12);  color: #2f7d32; }
.acc-badge--mid  { background: var(--accent-soft);        color: var(--accent); }
.acc-badge--low  { background: rgba(232, 156, 36, 0.16);  color: #b97c0a; }
.acc-badge--none { background: rgba(120, 120, 120, 0.10); color: var(--text-muted); }
.acc-badge--cta  { background: var(--accent-soft);        color: var(--accent); }

/* ── Press Box dashboard ── */
.pressbox-shell {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(8, 117, 209, 0.06), transparent 220px),
    var(--bg);
}
.pressbox-page {
  width: min(100% - 32px, 1360px);
  margin: 0 auto;
  padding: 30px 0 80px;
}
.pbx-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 0;
  margin-bottom: 20px;
  padding: clamp(20px, 3vw, 30px);
  overflow: hidden;
  border: 1px solid rgba(18, 45, 62, 0.12);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 253, 244, 0.94), rgba(246, 250, 251, 0.96) 58%, rgba(232, 241, 245, 0.92)),
    var(--surface);
  box-shadow: 0 14px 34px rgba(14, 32, 38, 0.09);
}
.pbx-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(189, 48, 57, 0.1), transparent 18%),
    radial-gradient(circle at 82% 24%, rgba(8, 117, 209, 0.14), transparent 28%);
}
.pbx-hero__lead {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 7px;
  min-width: 0;
}
.pbx-hero__lead .eyebrow {
  width: fit-content;
  margin: 0;
  padding: 5px 9px;
  border: 1px solid rgba(8, 117, 209, 0.18);
  border-radius: 999px;
  background: rgba(8, 117, 209, 0.08);
  color: #0875d1;
}
.pbx-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: 0;
}
.pbx-hero__sub {
  margin: 0;
  max-width: 620px;
  color: var(--text-muted);
  font-size: var(--fs-15);
  line-height: 1.45;
}
.pbx-hero__actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.pbx-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "ledger"
    "schedule";
  align-items: start;
  gap: 18px;
}
.pbx-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-1);
}
.pbx-ledger {
  grid-area: ledger;
  position: relative;
  overflow: hidden;
  border-color: #d9dfd6;
  background:
    linear-gradient(90deg, rgba(57, 65, 61, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(57, 65, 61, 0.035) 1px, transparent 1px),
    linear-gradient(135deg, rgba(255, 253, 244, 0.98), rgba(247, 249, 245, 0.96) 56%, rgba(235, 243, 239, 0.94)),
    var(--surface);
  background-size: 42px 42px, 42px 42px, auto, auto;
}
.pbx-ledger::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(189, 48, 57, 0.08), transparent 18%),
    radial-gradient(circle at 92% 10%, rgba(8, 117, 209, 0.10), transparent 26%);
}
.pbx-ledger > * {
  position: relative;
  z-index: 1;
}
.pbx-side-stack {
  display: grid;
  gap: 18px;
  min-width: 0;
}
.pbx-follow-bar {
  position: sticky;
  top: 10px;
  z-index: 30;
  display: grid;
  gap: 12px;
  margin: 0 0 28px;
  padding: 14px 16px 18px;
  backdrop-filter: blur(14px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(248, 251, 252, 0.92)),
    var(--surface);
  box-shadow: 0 14px 30px rgba(14, 32, 38, 0.12);
}
.pbx-follow-bar.is-collapsed {
  gap: 0;
  padding-block: 10px 14px;
}
.pbx-follow-bar.is-docked {
  gap: 8px;
  padding-block: 10px 16px;
}
.pbx-follow-bar__body {
  display: grid;
  gap: 12px;
}
.pbx-follow-bar.is-collapsed .pbx-follow-bar__body {
  display: none;
}
.pbx-follow-bar.is-docked .pbx-follow-bar__title {
  display: none;
}
.pbx-follow-bar.is-docked .pbx-follow-bar__actions {
  display: none;
}
.pbx-follow-bar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}
.pbx-follow-bar.is-docked .pbx-follow-bar__head {
  justify-content: flex-end;
}
.pbx-follow-bar__head h2 {
  margin: 0;
  font-size: var(--fs-18);
  line-height: 1.15;
  letter-spacing: 0;
}
.pbx-follow-bar__head .eyebrow {
  margin: 0 0 4px;
  color: var(--text-faint);
}
.pbx-follow-bar__actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
#editFollowsBtn {
  min-height: 42px;
  padding: 10px 18px;
  border-color: rgba(8, 117, 209, 0.34);
  background: rgba(8, 117, 209, 0.08);
  color: #0b5f9c;
  font-size: var(--fs-14);
  font-weight: 800;
  box-shadow: none;
}
#editFollowsBtn:hover,
#editFollowsBtn:focus-visible {
  border-color: rgba(8, 117, 209, 0.56);
  background: rgba(8, 117, 209, 0.13);
  box-shadow: 0 0 0 3px rgba(8, 117, 209, 0.10);
}
.pbx-follow-bar__chips {
  display: grid;
  grid-template-columns: minmax(390px, 4fr) minmax(0, 6fr);
  gap: 14px;
}
.pbx-follow-group {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}
.pbx-follow-group > span {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 800;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}
.pbx-follow-bar .pbx-pick-list {
  display: flex;
  gap: 7px;
  min-width: 0;
  overflow: visible;
  padding: 1px 1px 4px;
  scrollbar-width: thin;
}
.pbx-follow-bar .pbx-pick-list.has-selection-wrap {
  flex-wrap: wrap;
  align-content: start;
  row-gap: 7px;
  padding-bottom: 6px;
}
.pbx-follow-bar .pbx-pick-list--teams {
  display: flex;
  max-height: none;
  overflow: visible;
  padding-right: 1px;
}
.pbx-follow-bar .pbx-pick-list.is-expanded {
  flex-wrap: wrap;
  max-height: min(38vh, 220px);
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: 6px;
}
.pbx-follow-bar .pbx-pick-list--teams .pbx-pick-wrap {
  width: auto;
}
.pbx-follow-bar .pbx-pick-list--teams .pbx-pick {
  width: auto;
  max-width: 150px;
}
.pbx-follow-bar .pbx-pick-wrap {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.pbx-follow-bar .pbx-pick {
  position: relative;
  display: flex;
  width: auto;
  min-height: 34px;
  max-width: 132px;
  padding: 6px 8px;
  gap: 6px;
  border-radius: 999px;
}
.pbx-follow-bar .pbx-pick-list:not(.pbx-pick-list--teams) .pbx-pick {
  max-width: 118px;
}
.pbx-follow-bar .pbx-pick.has-logo {
  display: flex;
}
.pbx-follow-bar .pbx-pick.is-active {
  border-color: rgba(8, 117, 209, 0.48);
  background: rgba(8, 117, 209, 0.11);
  box-shadow: none;
}
.pbx-follow-bar .pbx-pick.is-active .pbx-pick__count {
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent);
}
.pbx-follow-bar .pbx-pick[data-tooltip]::before,
.pbx-follow-bar .pbx-pick[data-tooltip]::after {
  position: absolute;
  left: var(--tooltip-left, 50%);
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transform: translate(var(--tooltip-shift, -50%), -4px);
  transition: opacity 120ms ease, transform 120ms ease;
}
.pbx-follow-bar .pbx-pick[data-tooltip]::before {
  content: "";
  left: var(--tooltip-arrow-left, var(--tooltip-left, 50%));
  transform: translate(var(--tooltip-arrow-shift, -50%), -4px);
  top: calc(100% + 3px);
  border: 5px solid transparent;
  border-bottom-color: #17211b;
}
.pbx-follow-bar .pbx-pick[data-tooltip]::after {
  content: attr(data-tooltip);
  top: calc(100% + 12px);
  width: max-content;
  max-width: min(260px, 64vw);
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: #17211b;
  color: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  white-space: normal;
}
.pbx-follow-bar .pbx-pick[data-tooltip]:hover::before,
.pbx-follow-bar .pbx-pick[data-tooltip]:hover::after,
.pbx-follow-bar .pbx-pick[data-tooltip]:focus-visible::before,
.pbx-follow-bar .pbx-pick[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translate(var(--tooltip-shift, -50%), 0);
}
.pbx-follow-bar .pbx-pick[data-tooltip]:hover::before,
.pbx-follow-bar .pbx-pick[data-tooltip]:focus-visible::before {
  transform: translate(var(--tooltip-arrow-shift, -50%), 0);
}
.pbx-follow-bar .pbx-pick-wrap:first-child .pbx-pick[data-tooltip] {
  --tooltip-left: 0;
  --tooltip-shift: 0;
  --tooltip-arrow-left: 50%;
  --tooltip-arrow-shift: -50%;
}
.pbx-follow-bar .pbx-pick__logo {
  display: grid;
  flex: 0 0 22px;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #fff;
  overflow: visible;
}
.pbx-follow-bar .pbx-pick__logo img {
  display: block;
  width: 18px;
  height: 18px;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.pbx-follow-bar .pbx-pick__main {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  flex: 1 1 auto;
}
.pbx-follow-bar .pbx-pick__main strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.05;
}
.pbx-follow-bar .pbx-pick__main em {
  display: none;
}
.pbx-follow-bar .pbx-pick__count {
  flex: 0 0 auto;
  min-width: 20px;
  padding: 2px 6px;
  font-size: 0.68rem;
}
.pbx-follow-bar .pbx-pick--overflow {
  max-width: none;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.78);
  color: var(--accent);
  font-weight: 800;
}
.pbx-follow-bar .pbx-pick--overflow .pbx-pick__main strong {
  color: inherit;
}
.pbx-follow-bar .pbx-open-link,
.pbx-follow-bar .pbx-remove {
  min-width: 0;
  min-height: 30px;
  padding: 0 9px;
  border-radius: 999px;
}
.pbx-follow-bar__edit {
  display: grid;
  grid-template-columns: 1fr;
  max-height: min(82vh, 760px);
  overflow-y: auto;
  padding-right: 4px;
  gap: 12px;
  scrollbar-width: thin;
}
.pbx-follow-bar__edit[hidden] {
  display: none;
}
.pbx-follow-edit-section {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}
.pbx-follow-edit-section--league {
  background: rgba(246, 248, 249, 0.72);
}
.pbx-follow-edit-section__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.pbx-follow-edit-section h3 {
  margin: 0;
  font-size: var(--fs-14);
  line-height: 1.2;
  letter-spacing: 0;
}
.pbx-follow-edit-section p {
  margin: 3px 0 0;
  color: var(--text-muted);
  font-size: var(--fs-12);
  line-height: 1.35;
}
.pbx-follow-current {
  display: grid;
  gap: 7px;
}
.pbx-follow-current:empty {
  display: none;
}
.pbx-follow-current__label {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pbx-follow-current__list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.pbx-follow-current__item {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  min-height: 32px;
  padding: 5px 7px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: var(--fs-12);
  font-weight: 750;
}
.pbx-follow-current__item:hover {
  border-color: rgba(194, 52, 43, 0.28);
  background: rgba(194, 52, 43, 0.06);
}
.pbx-follow-current__item span:not(.pbx-follow-current__logo) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pbx-follow-current__item em {
  color: var(--text-faint);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 800;
}
.pbx-follow-current__item b {
  color: #9f1d20;
  font-size: 0.68rem;
  font-weight: 850;
}
.pbx-follow-current__logo {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}
.pbx-follow-current__logo img {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
}
.pbx-follow-team-filter {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(248, 251, 252, 0.72);
}
.pbx-follow-team-filter[hidden] {
  display: none;
}
.pbx-follow-team-filter__label {
  flex: 0 0 auto;
  padding: 6px 0 0;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pbx-follow-team-filter__chips {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
.pbx-follow-filter-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: var(--fs-12);
  font-weight: 850;
}
.pbx-follow-filter-chip:hover {
  border-color: rgba(8, 117, 209, 0.32);
}
.pbx-follow-filter-chip.is-active {
  border-color: rgba(8, 117, 209, 0.58);
  background: var(--accent-soft);
  color: var(--accent);
}
.pbx-follow-filter-chip span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}
.pbx-follow-filter-chip img {
  display: block;
  width: 16px;
  height: 16px;
  object-fit: contain;
}
.pbx-follow-filter-chip strong {
  font-size: inherit;
  line-height: 1;
}
.pbx-follow-team-choices {
  display: grid;
  grid-template-columns: 1fr;
  max-height: none;
  overflow-y: visible;
  padding-right: 0;
  gap: 10px;
}
.pbx-follow-team-league-group {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px dashed rgba(15, 23, 42, 0.18);
  border-left: 3px solid rgba(8, 117, 209, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(8, 117, 209, 0.045), transparent 90px),
    rgba(255, 255, 255, 0.58);
}
.pbx-follow-team-league {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin: -10px -10px 2px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid rgba(8, 117, 209, 0.12);
  border-radius: 7px 7px 0 0;
  background: rgba(8, 117, 209, 0.075);
  color: var(--text);
  font-size: var(--fs-13);
  font-weight: 850;
}
.pbx-follow-team-league__logo {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}
.pbx-follow-team-league__logo img {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
}
.pbx-follow-team-league > span:not(.pbx-follow-team-league__logo) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pbx-follow-team-league > em {
  margin-left: auto;
  color: var(--text-muted);
  font-size: var(--fs-12);
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}
.pbx-follow-team-division {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 800;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}
.pbx-follow-team-division:first-child {
  margin-top: 0;
}
.pbx-follow-team-division::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--divider);
}
.pbx-follow-team-choice {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.pbx-follow-team-choice.has-logo {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
}
.pbx-follow-team-choice:hover {
  border-color: rgba(8, 117, 209, 0.38);
}
.pbx-follow-team-choice__logo {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}
.pbx-follow-team-choice__logo img {
  display: block;
  width: 23px;
  height: 23px;
  object-fit: contain;
}
.pbx-follow-team-choice span {
  display: grid;
  min-width: 0;
  gap: 2px;
}
.pbx-follow-team-choice strong,
.pbx-follow-team-choice em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pbx-follow-team-choice strong {
  font-size: var(--fs-13);
  line-height: 1.1;
}
.pbx-follow-team-choice em {
  color: var(--text-muted);
  font-size: var(--fs-12);
  font-style: normal;
}
.pbx-follow-team-choice b {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: var(--fs-12);
}
.pbx-follow-team-choice.is-followed {
  cursor: default;
  background: var(--accent-soft);
  border-color: rgba(8, 117, 209, 0.28);
}
.pbx-follow-team-choice.is-followed b {
  color: var(--text-muted);
}
@media (max-width: 1100px) {
  .pbx-follow-bar__edit {
    max-height: min(78vh, 640px);
  }
  .pbx-follow-bar .pbx-pick-list--teams,
  .pbx-follow-team-league-group {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .pbx-follow-bar__edit {
    max-height: min(76vh, 520px);
  }
  .pbx-follow-bar .pbx-pick-list--teams,
  .pbx-follow-team-league-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.pbx-follow-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: 7px;
  color: var(--text-muted);
  font-size: var(--fs-12);
}
.pbx-follow-bar__edit .pbx-editor {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.pbx-follow-bar__edit .pbx-panel__links {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  justify-content: flex-end;
}
.pbx-follow-toggle {
  appearance: none;
  position: absolute;
  left: 50%;
  bottom: -16px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 6px;
  background: #fff;
  color: #263238;
  letter-spacing: 0;
  line-height: 1;
  cursor: pointer;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.08),
    0 10px 24px rgba(15, 23, 42, 0.10);
  transform: translateX(-50%);
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
.pbx-follow-toggle__chevron {
  display: block;
  width: 9px;
  height: 9px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: translateY(2px) rotate(225deg);
}
.pbx-follow-bar.is-collapsed .pbx-follow-toggle {
  background: #f4f5f6;
}
.pbx-follow-bar.is-collapsed .pbx-follow-toggle__chevron {
  transform: translateY(-2px) rotate(45deg);
}
.pbx-follow-bar.is-docked .pbx-follow-toggle {
  display: inline-flex;
}
.pbx-follow-toggle[hidden] {
  display: none;
}
.pbx-follow-toggle:hover {
  border-color: rgba(15, 23, 42, 0.2);
  background: #fff;
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.10),
    0 12px 26px rgba(15, 23, 42, 0.14);
}
.pbx-follow-toggle:focus-visible {
  outline: 2px solid rgba(8, 117, 209, 0.42);
  outline-offset: 2px;
}
.pbx-schedule-panel {
  grid-area: schedule;
  scroll-margin-top: 116px;
  border-color: rgba(8, 117, 209, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 251, 0.96)),
    var(--surface);
}
.pbx-calendar-panel {
  grid-area: auto;
}
.pbx-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.pbx-panel__head h2 {
  margin: 0;
  font-size: var(--fs-20);
  line-height: 1.15;
  letter-spacing: 0;
}
.pbx-panel__head .eyebrow {
  margin: 0 0 5px;
  color: var(--text-faint);
}
.pbx-panel__sub {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: var(--fs-13);
}
.pbx-panel__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--divider);
  font-size: var(--fs-13);
  font-weight: 600;
}
.pbx-ledger__head {
  align-items: center;
  position: relative;
}
.pbx-ledger__title-block {
  min-width: 0;
}
.pbx-ledger__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pbx-ledger__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.pbx-ledger__actions .btn.is-active {
  border-color: rgba(8, 117, 209, 0.42);
  background: var(--accent-soft);
  color: var(--accent);
}
.pbx-scorebook-icon-link.btn {
  display: inline-grid;
  place-items: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 100px;
  min-width: 100px;
  height: 100px;
  min-height: 100px;
  padding: 0;
  border-color: transparent;
  border-radius: 20px;
  background: transparent;
  box-shadow: none;
  color: var(--accent);
  overflow: hidden;
}
.pbx-scorebook-icon-link.btn:hover,
.pbx-scorebook-icon-link.btn:focus-visible {
  border-color: transparent;
  background: transparent;
  box-shadow: 0 0 0 3px rgba(8, 117, 209, 0.18);
  color: var(--accent);
}
.pbx-scorebook-icon {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 18px;
  object-fit: cover;
}
.pbx-ledger__facets {
  margin-bottom: 16px;
}
.pbx-shelf-selected-game {
  width: min(100%, 560px);
  margin: -2px 0 12px;
  padding: 8px 11px;
  border: 1px solid rgba(8, 117, 209, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
  font-size: var(--fs-13);
  font-weight: 750;
  line-height: 1.2;
}
.pbx-shelf-selected-game[hidden] {
  display: none;
}
.pbx-upload-wheel__status {
  position: absolute;
  right: 0;
  bottom: calc(100% + 16px);
  z-index: 8;
  display: block;
  width: min(176px, calc(100vw - 40px));
  min-height: 124px;
  margin: 0;
  padding: 11px 12px;
  border-color: rgba(37, 99, 235, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.95)),
    var(--surface);
  box-shadow:
    0 20px 42px rgba(15, 23, 42, 0.18),
    0 0 0 6px rgba(255, 255, 255, 0.7),
    0 0 0 9px rgba(37, 99, 235, 0.08);
  cursor: default;
  pointer-events: auto;
  white-space: normal;
  overflow: hidden;
  isolation: isolate;
  transition: bottom 180ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 160ms ease, border-color 160ms ease;
}
.pbx-upload-wheel__status::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: -1;
  width: 4px;
  background: linear-gradient(180deg, #2563eb, #0f9f7a);
}
.pbx-upload-wheel__status:hover {
  border-color: rgba(37, 99, 235, 0.46);
  box-shadow:
    0 24px 48px rgba(15, 23, 42, 0.2),
    0 0 0 6px rgba(255, 255, 255, 0.78),
    0 0 0 10px rgba(37, 99, 235, 0.11);
}
.pbx-upload-wheel.is-open .pbx-upload-wheel__status {
  bottom: calc(100% + 146px);
}
.pbx-upload-wheel__game {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.pbx-upload-wheel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.pbx-upload-wheel__title {
  min-width: 0;
  overflow: hidden;
  color: #2563eb;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.15;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pbx-upload-wheel__state {
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid rgba(8, 117, 209, 0.18);
  border-radius: 999px;
  background: rgba(8, 117, 209, 0.08);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 1.2;
}
.pbx-upload-wheel__team {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.pbx-upload-wheel__logo {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
}
.pbx-upload-wheel__logo img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.pbx-upload-wheel__name {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: var(--fs-13);
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pbx-upload-wheel__score {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
}
.pbx-shelf-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  gap: clamp(18px, 2.4vw, 30px);
  align-items: center;
  padding-bottom: 34px;
}
.pbx-shelf-stage::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 7px;
  height: 18px;
  border: 1px solid rgba(57, 65, 61, 0.18);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.48), transparent 40%),
    linear-gradient(90deg, #d8d2bf, #f4f0e3 18%, #d1c7ad 52%, #eee6d2);
  box-shadow:
    0 10px 20px rgba(57, 65, 61, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.68);
}
.pbx-shelf-stage > * {
  position: relative;
  z-index: 1;
}
.pbx-shelf-stage__memories {
  min-width: 0;
  align-self: center;
}
.pbx-upload-wheel {
  position: absolute;
  right: -16px;
  bottom: 58px;
  z-index: 80;
  width: 48px;
  height: 48px;
}
.pbx-upload-wheel[hidden] {
  display: none;
}
.pbx-upload-wheel::before {
  content: "";
  position: absolute;
  right: -12px;
  bottom: -12px;
  z-index: 1;
  width: 172px;
  height: 188px;
  pointer-events: none;
}
.pbx-upload-wheel.is-open::before {
  pointer-events: auto;
}
.pbx-upload-wheel__trigger,
.pbx-upload-wheel__item {
  appearance: none;
  display: grid;
  place-items: center;
  border: 1px solid rgba(8, 117, 209, 0.32);
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
}
.pbx-upload-wheel__trigger {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 3;
  width: 48px;
  height: 48px;
  background: #0875d1;
  box-shadow:
    0 12px 26px rgba(8, 117, 209, 0.28),
    0 0 0 6px rgba(255, 255, 255, 0.74);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.pbx-upload-wheel.is-open .pbx-upload-wheel__trigger {
  background: #075fa8;
  box-shadow:
    0 14px 30px rgba(8, 117, 209, 0.34),
    0 0 0 6px rgba(255, 255, 255, 0.84);
  transform: rotate(45deg);
}
.pbx-upload-wheel__menu {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 2;
  width: 48px;
  height: 48px;
  pointer-events: none;
}
.pbx-upload-wheel__item {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 40px;
  height: 40px;
  padding: 9px;
  opacity: 0;
  transform: translate(0, 0) scale(0.72);
  box-shadow:
    0 10px 22px rgba(15, 23, 42, 0.20),
    0 0 0 4px rgba(255, 255, 255, 0.70);
  transition:
    opacity 150ms ease,
    transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 150ms ease;
}
.pbx-upload-wheel.is-open .pbx-upload-wheel__item {
  opacity: 1;
  pointer-events: auto;
}
.pbx-upload-wheel.is-open .pbx-upload-wheel__item--scorecard {
  transform: translate(-8px, -112px) scale(1);
}
.pbx-upload-wheel.is-open .pbx-upload-wheel__item--media {
  transform: translate(-68px, -80px) scale(1);
}
.pbx-upload-wheel.is-open .pbx-upload-wheel__item--link {
  transform: translate(-98px, -22px) scale(1);
}
.pbx-upload-wheel__item svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pbx-upload-wheel__item--scorecard { background: #2563eb; }
.pbx-upload-wheel__item--media { background: #108c63; }
.pbx-upload-wheel__item--link { background: #5468d4; }
.pbx-upload-wheel__item:hover,
.pbx-upload-wheel__item:focus-visible {
  box-shadow:
    0 12px 26px rgba(15, 23, 42, 0.24),
    0 0 0 5px rgba(255, 255, 255, 0.86);
}
@media (max-width: 760px) {
  .pbx-upload-wheel {
    right: 8px;
    bottom: 54px;
  }
  .pbx-upload-wheel__status {
    right: 0;
  }
  .pbx-upload-wheel.is-open .pbx-upload-wheel__item--scorecard {
    transform: translate(-3px, -108px) scale(1);
  }
  .pbx-upload-wheel.is-open .pbx-upload-wheel__item--media {
    transform: translate(-54px, -78px) scale(1);
  }
  .pbx-upload-wheel.is-open .pbx-upload-wheel__item--link {
    transform: translate(-82px, -22px) scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .pbx-upload-wheel__status,
  .pbx-upload-wheel__trigger,
  .pbx-upload-wheel__item {
    transition: none;
  }
}
.pbx-ledger-grid.hist-grid {
  position: relative;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
  margin-top: 0;
  padding: 10px 0 30px;
}
.pbx-ledger-grid.hist-grid::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 6px;
  height: 16px;
  border: 1px solid rgba(57, 65, 61, 0.18);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 38%),
    linear-gradient(90deg, #d8d2bf, #f4f0e3 18%, #d1c7ad 52%, #eee6d2);
  box-shadow:
    0 9px 18px rgba(57, 65, 61, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.64);
}
.pbx-shelf-stage .pbx-ledger-grid.hist-grid::after {
  display: none;
}
.pbx-ledger-grid .hist-card {
  position: relative;
  z-index: 1;
  min-width: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.pbx-ledger-grid .hist-card:hover {
  border-color: transparent;
  box-shadow: none;
  transform: none;
}
.pbx-ledger-grid.hist-grid.is-recommendations {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  width: min(100%, 680px);
  margin: 0 auto;
  padding: 10px 0 24px;
}
.pbx-ledger-grid.hist-grid.is-recommendations.has-upload-wheel {
  width: min(680px, calc(100% - clamp(106px, 13vw, 144px)));
  margin-left: 0;
  margin-right: auto;
}
.pbx-ledger-grid.hist-grid.is-recommendations.has-single-recommendation {
  grid-template-columns: minmax(0, 1fr);
  width: min(100%, 330px);
}
.pbx-ledger-grid.hist-grid.is-recommendations.has-single-recommendation.has-upload-wheel {
  width: min(330px, calc(100% - clamp(106px, 13vw, 144px)));
}
.pbx-score-rec {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(8, 117, 209, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 22px rgba(14, 32, 38, 0.08);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.pbx-score-rec:hover {
  transform: translateY(-1px);
  border-color: rgba(8, 117, 209, 0.42);
}
.pbx-score-rec.is-selected {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(8, 117, 209, 0.12), rgba(8, 117, 209, 0.04));
  box-shadow:
    0 16px 32px rgba(8, 117, 209, 0.22),
    0 0 0 3px rgba(8, 117, 209, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
}
.pbx-score-rec.is-selected::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.6) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: pbx-rec-shine 1.1s ease-out 0.05s 1;
}
@keyframes pbx-rec-shine {
  to { transform: translateX(120%); }
}
.pbx-score-rec.is-selected .btn--primary {
  box-shadow: 0 0 0 2px rgba(8, 117, 209, 0.25);
}
.pbx-score-rec.is-selected .btn--primary::before {
  content: "✓ ";
}
.pbx-score-rec--empty {
  grid-column: 1 / -1;
  width: min(100%, 560px);
  margin: 0 auto;
  cursor: default;
}
.pbx-score-rec h3,
.pbx-score-rec p {
  margin: 0;
}
.pbx-score-rec h3 {
  font-size: var(--fs-18);
  line-height: 1.15;
  letter-spacing: 0;
}
.pbx-score-rec p {
  color: var(--text-muted);
  font-size: var(--fs-13);
  line-height: 1.4;
}
.pbx-score-rec__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 800;
  text-transform: uppercase;
}
.pbx-score-rec__match {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
}
.pbx-score-rec__match span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
}
.pbx-score-rec__match img {
  max-width: 34px;
  max-height: 34px;
  object-fit: contain;
}
.pbx-score-rec__match strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: var(--fs-17);
  line-height: 1.15;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pbx-score-rec .btn {
  justify-self: center;
}
.shelf-card {
  position: relative;
  min-width: 0;
  --shelf-photo-rail: clamp(74px, 18%, 98px);
}

/* Modern, photo-forward "game memory" card: the scorecard is the backdrop,
   a couple of game-photo polaroids are fanned over it, and only the matchup +
   one quiet caption line sit on a gradient scrim. */
.shelf-card .hist-card__link {
  display: block;
  position: relative;
  height: 100%;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #0e1a22;
  box-shadow:
    0 10px 26px rgba(15, 30, 38, 0.16),
    0 2px 6px rgba(15, 30, 38, 0.10);
  transition: transform 200ms cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 200ms ease;
}
.shelf-card:hover .hist-card__link {
  transform: translateY(-6px);
  box-shadow:
    0 24px 46px rgba(15, 30, 38, 0.26),
    0 4px 10px rgba(15, 30, 38, 0.14);
}

.shelf-card__media {
  position: relative;
  display: block;
  aspect-ratio: 7 / 5;   /* landscape, matches the scorecard scans */
  background: linear-gradient(180deg, #1c2b35, #0e1a22);
}
.shelf-card.has-photos .shelf-card__media {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--shelf-photo-rail);
}
.shelf-card__scorecard {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: saturate(0.95) contrast(1.02) brightness(0.92);
}
.shelf-card.has-photos .shelf-card__scorecard {
  position: relative;
  inset: auto;
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}
.shelf-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8, 16, 20, 0.20) 0%, rgba(8, 16, 20, 0) 24%),
    linear-gradient(0deg, rgba(8, 16, 20, 0.88) 1%, rgba(8, 16, 20, 0.42) 28%, rgba(8, 16, 20, 0) 54%);
}

/* Attached game photos: a compact right rail, so the scorecard stays visible. */
.shelf-card__photos {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 2;
  width: 40%;
  pointer-events: none;
}
.shelf-card:not(.has-photos) .shelf-card__photos {
  display: none;
}
.shelf-card.has-photos .shelf-card__photos {
  position: relative;
  inset: auto;
  grid-column: 2;
  grid-row: 1;
  display: grid;
  align-content: center;
  gap: 8px;
  width: auto;
  min-width: 0;
  padding: 12px 10px 12px 0;
  background:
    linear-gradient(90deg, rgba(8, 16, 20, 0.06), rgba(8, 16, 20, 0.28));
}
.shelf-card__photo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border: 4px solid #fdfdfb;
  border-radius: 3px;
  box-shadow: 0 10px 20px rgba(8, 16, 20, 0.34);
  transform-origin: 50% 60%;
}
.shelf-card.has-photos .shelf-card__photo {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  min-height: 0;
  aspect-ratio: 1 / 1;
  border-width: 3px;
  border-radius: 6px;
  box-shadow: 0 7px 14px rgba(8, 16, 20, 0.28);
  transform: none;
}
.shelf-card__photo--1 {
  z-index: 2;
  transform: rotate(-6deg);
}
.shelf-card__photo--2 {
  left: 34%;
  top: 18px;
  z-index: 1;
  transform: rotate(6deg);
}
.shelf-card.has-photos .shelf-card__photo--1,
.shelf-card.has-photos .shelf-card__photo--2 {
  left: auto;
  top: auto;
  transform: none;
}
.shelf-card:hover .shelf-card__photo--1 {
  transform: rotate(-8deg) translate(-3px, -2px);
}
.shelf-card:hover .shelf-card__photo--2 {
  transform: rotate(8deg) translate(3px, -2px);
}
.shelf-card.has-photos:hover .shelf-card__photo--1,
.shelf-card.has-photos:hover .shelf-card__photo--2 {
  transform: translateY(-2px);
}
.shelf-card__photo,
.shelf-card__photo--1,
.shelf-card__photo--2 {
  transition: transform 220ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* Accuracy / sample chip, floated top-right over the image */
.shelf-card .acc-badge.shelf-card__chip {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  margin: 0;
  box-shadow: 0 4px 12px rgba(8, 16, 20, 0.28);
}
.shelf-card.has-photos .acc-badge.shelf-card__chip {
  right: calc(var(--shelf-photo-rail) + 12px);
}

/* Caption: league chip + matchup + date / venue, on the scrim */
.shelf-card__overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: grid;
  gap: 5px;
  padding: 16px 16px 58px;
}
.shelf-card.has-photos .shelf-card__overlay {
  right: var(--shelf-photo-rail);
}
.shelf-card__league {
  justify-self: start;
  margin: 0;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}
.shelf-card__league[hidden] {
  display: none;
}
.shelf-card__matchup {
  margin: 3px 0 0;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #fff;
  font-size: clamp(1.12rem, 1.7vw, 1.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.45);
}
.shelf-card__sub {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}
.shelf-card__actions {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  pointer-events: none;
}
.shelf-card__actions .btn {
  pointer-events: auto;
  box-shadow: 0 8px 18px rgba(8, 16, 20, 0.24);
}
.shelf-card__actions .btn[hidden] {
  display: none;
}
.is-memory-stack .shelf-card:not(.is-front) .shelf-card__actions {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .shelf-card .hist-card__link,
  .shelf-card__photo {
    transition: none;
  }
}

/* --- Stacked memory carousel: a single date with several memories ---------
   All cards share one grid cell and are offset by --stack-pos so they fan out
   behind the front card; clicking a back card (or the nav) flips it forward. */
.pbx-ledger-grid.hist-grid.is-memory-stack {
  display: grid;
  grid-template-columns: 1fr;
  width: min(560px, 100%);
  margin: 2px auto 0;
  padding: 4px 28px 30px 0;
}
.is-memory-stack .shelf-card {
  grid-area: 1 / 1;
  min-width: 0;
  --p: var(--stack-pos, 0);
  transform:
    translate(calc(var(--p) * 16px), calc(var(--p) * 13px))
    scale(calc(1 - var(--p) * 0.045));
  transform-origin: top left;
  z-index: calc(50 - var(--p));
  opacity: clamp(0, calc(1.35 - var(--p) * 0.42), 1);
  transition: transform 280ms cubic-bezier(0.2, 0.7, 0.3, 1), opacity 240ms ease, filter 240ms ease;
}
.is-memory-stack .shelf-card:not(.is-front) {
  cursor: pointer;
  filter: brightness(0.8) saturate(0.94);
}
.is-memory-stack .shelf-card:not(.is-front) .shelf-card__overlay,
.is-memory-stack .shelf-card:not(.is-front) .acc-badge {
  opacity: 0;
}
.is-memory-stack .shelf-card.is-front {
  cursor: default;
}
.is-memory-stack .shelf-card:not(.is-front):hover {
  filter: brightness(0.9) saturate(0.97);
}

.shelf-stack-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(340px, 100%);
  margin: 6px auto 4px;
}
.shelf-stack-nav[hidden] {
  display: none;
}
.shelf-stack-nav__btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}
.shelf-stack-nav__btn:hover {
  border-color: var(--accent);
  background: var(--bg);
  transform: translateY(-1px);
}
.shelf-stack-nav__dots {
  display: flex;
  align-items: center;
  gap: 6px;
}
.shelf-stack-nav__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(57, 65, 61, 0.26);
  transition: background 160ms ease, transform 160ms ease;
}
.shelf-stack-nav__dot.is-active {
  background: var(--accent);
  transform: scale(1.35);
}
.pbx-rec-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: min(420px, 100%);
  margin: 2px auto 6px;
}
.pbx-rec-pagination[hidden] {
  display: none;
}
.pbx-rec-pagination__pages {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
}
.pbx-rec-pagination__btn,
.pbx-rec-pagination__page {
  appearance: none;
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 850;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}
.pbx-rec-pagination__btn {
  border-color: var(--border);
  background: var(--surface);
  font-size: 16px;
}
.pbx-rec-pagination__btn:hover:not(:disabled),
.pbx-rec-pagination__page:hover,
.pbx-rec-pagination__page.is-active {
  border-color: rgba(8, 117, 209, 0.36);
  background: rgba(8, 117, 209, 0.10);
  color: var(--accent);
}
.pbx-rec-pagination__btn:hover:not(:disabled) {
  transform: translateY(-1px);
}
.pbx-rec-pagination__btn:disabled {
  cursor: default;
  opacity: 0.42;
}
.pbx-ledger-grid.hist-grid.is-date-memory-view {
  grid-template-columns: 1fr;
  gap: 14px;
  padding-top: 8px;
}
.pbx-ledger-grid.hist-grid.is-date-memory-view.has-single-memory {
  grid-template-columns: minmax(0, min(560px, 100%));
  justify-content: center;
  width: min(560px, 100%);
  margin: 2px auto 0;
  padding: 4px 0 30px;
}
.pbx-ledger-grid.is-date-memory-view .shelf-card {
  --card-tilt: 0deg;
}
.pbx-ledger-grid.is-date-memory-view .shelf-card .hist-card__link {
  grid-template-columns: minmax(340px, 1.25fr) minmax(280px, 0.75fr);
  grid-template-rows: 1fr;
  min-height: clamp(330px, 36vw, 460px);
  transform: none;
}
.pbx-ledger-grid.is-date-memory-view.has-single-memory .shelf-card .hist-card__link {
  min-height: 0;
}
.pbx-ledger-grid.is-date-memory-view .shelf-card:hover .hist-card__link {
  transform: translateY(-3px);
}
.pbx-ledger-grid.is-date-memory-view .shelf-card .hist-card__link::before {
  left: 12px;
  top: 18px;
  bottom: 18px;
}
.pbx-ledger-grid.is-date-memory-view .shelf-card__thumb {
  height: auto;
  min-height: 0;
  margin: 18px 0 18px 28px;
  aspect-ratio: auto;
}
.pbx-ledger-grid.is-date-memory-view .shelf-card__thumb img {
  height: 100%;
  object-fit: cover;
}
.pbx-ledger-grid.is-date-memory-view .shelf-card__body {
  align-content: center;
  min-height: 0;
  gap: 12px;
  padding: clamp(20px, 3vw, 34px);
}
.pbx-ledger-grid.is-date-memory-view .shelf-card__matchup {
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 0.96;
  white-space: normal;
}
.pbx-ledger-grid.is-date-memory-view .shelf-card__meta {
  max-width: 520px;
  font-size: var(--fs-15);
  white-space: normal;
}
.pbx-ledger-grid.is-date-memory-view .shelf-card__artifact-row {
  max-width: 430px;
}
.pbx-ledger-grid.is-date-memory-view .shelf-card__tags {
  font-size: var(--fs-13);
}
.pbx-ledger-grid.has-binder-stack {
  padding-left: 14px;
}
.pbx-ledger-grid.has-binder-stack .shelf-card {
  --stack-offset: 0px;
}
.pbx-ledger-grid.has-binder-stack .shelf-card:nth-child(2n) {
  --stack-offset: 14px;
}
.pbx-ledger-grid.has-binder-stack .shelf-card:nth-child(3n) {
  --stack-offset: 28px;
}
.pbx-ledger-grid.has-binder-stack .shelf-card .hist-card__link {
  margin-left: var(--stack-offset);
}
.pbx-ledger-grid.has-binder-stack .shelf-card .hist-card__link::after {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.42), transparent 22%, transparent 84%, rgba(57, 65, 61, 0.035)),
    linear-gradient(180deg, transparent, rgba(57, 65, 61, 0.035));
}
.pbx-ledger-grid.has-binder-stack .shelf-card + .shelf-card {
  margin-top: -5px;
}
.pbx-ledger-grid.has-binder-stack .shelf-card__flag::after {
  content: " / binder page";
  color: #8a93a0;
}
.pbx-photo-gallery {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--divider);
}
.pbx-photo-gallery[hidden] {
  display: none !important;
}
.pbx-photo-gallery__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.pbx-photo-gallery__head h3 {
  margin: 0;
  font-size: var(--fs-18);
  line-height: 1.15;
  letter-spacing: 0;
}
.pbx-photo-gallery__head .eyebrow {
  margin: 0 0 5px;
  color: var(--text-faint);
}
.pbx-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pbx-photo-grid[hidden] {
  display: none !important;
}
.pbx-photo-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}
.pbx-photo-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}
.pbx-photo-card__link {
  display: grid;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.pbx-photo-card__link:hover {
  text-decoration: none;
}
.pbx-photo-card__image {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(145deg, #e7ece7, #f8f6ec);
}
.pbx-photo-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pbx-photo-card__placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 128px;
  place-items: center;
  padding: 12px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}
.pbx-photo-card__badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  padding: 5px 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(16, 24, 22, 0.74);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}
.pbx-photo-card__body {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 12px;
}
.pbx-photo-card__body > strong,
.pbx-photo-card__kicker,
.pbx-photo-card__meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pbx-photo-card__body > strong {
  color: var(--text);
  font-size: var(--fs-15);
  line-height: 1.15;
}
.pbx-photo-card__kicker {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  font-weight: 900;
  text-transform: uppercase;
}
.pbx-photo-card__meta {
  color: var(--text-muted);
  font-size: var(--fs-12);
}
.pbx-photo-card__artifacts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding-top: 2px;
}
.pbx-photo-card__artifact {
  min-width: 0;
  padding: 5px 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f6f8f7;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.pbx-photo-card__artifact.is-active {
  border-color: rgba(47, 141, 82, 0.24);
  background: rgba(47, 141, 82, 0.10);
  color: #1f7040;
}
.pbx-photo-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 2px;
}
.pbx-photo-card__stats span {
  min-width: 0;
  color: var(--text-muted);
  font-size: var(--fs-12);
  line-height: 1.25;
}
.pbx-photo-card__stats span + span::before {
  content: "/";
  margin-right: 6px;
  color: var(--text-faint);
}

/* --- Scorebook post feed -------------------------------------------------- */
.pbx-mosaic {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  width: min(100%, 880px);
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.pbx-mosaic[hidden] {
  display: none !important;
}
.pbx-post {
  min-width: 0;
}
.pbx-post__card {
  overflow: hidden;
  border: 1px solid rgba(18, 45, 62, 0.12);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(14, 32, 38, 0.08);
}
.pbx-post__head {
  padding: 0;
  border-bottom: 1px solid var(--divider);
}
.pbx-post__title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  gap: 14px;
  width: 100%;
  min-height: 82px;
  padding: 15px 16px;
  border-radius: 8px 8px 0 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 251, 248, 0.92)),
    var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: background 160ms ease, box-shadow 160ms ease;
}
.pbx-post__title:hover,
.pbx-post__title:focus-visible {
  background:
    linear-gradient(180deg, rgba(244, 250, 246, 0.98), rgba(255, 255, 255, 0.96)),
    var(--surface);
  box-shadow: inset 0 0 0 1px rgba(23, 58, 52, 0.12);
  text-decoration: none;
}
.pbx-post__title:focus-visible,
.pbx-post-media:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.pbx-post__matchup-mark {
  display: grid;
  min-width: 132px;
  padding: 9px 10px 8px;
  justify-items: center;
  gap: 7px;
  border: 1px solid rgba(23, 58, 52, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(242, 248, 244, 0.88)),
    #f7faf7;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 18px rgba(14, 32, 38, 0.1);
}
.pbx-post__logos {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.pbx-post-team-logo {
  position: relative;
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(23, 58, 52, 0.13);
  border-radius: 50%;
  background: #173a34;
  color: #fff;
  box-shadow: 0 6px 14px rgba(14, 32, 38, 0.14);
}
.pbx-post-team-logo + .pbx-post__versus,
.pbx-post__versus + .pbx-post-team-logo {
  margin-left: -6px;
}
.pbx-post-team-logo.has-logo {
  background: #fff;
}
.pbx-post-team-logo img {
  display: block;
  width: 82%;
  height: 82%;
  object-fit: contain;
}
.pbx-post-team-logo span {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 900;
  line-height: 1;
}
.pbx-post-team-logo em {
  position: absolute;
  right: 3px;
  bottom: 3px;
  min-width: 18px;
  padding: 1px 3px;
  border-radius: 999px;
  background: rgba(8, 16, 20, 0.76);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.48rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.25;
  text-align: center;
}
.pbx-post__versus {
  z-index: 1;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 1px solid rgba(23, 58, 52, 0.16);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 900;
  box-shadow: 0 2px 7px rgba(14, 32, 38, 0.12);
}
.pbx-post__date-lockup {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: baseline;
  justify-content: center;
  width: 100%;
  gap: 5px;
  padding-top: 7px;
  border-top: 1px solid rgba(23, 58, 52, 0.14);
  color: #173a34;
  font-family: var(--font-mono);
  line-height: 1;
  text-transform: uppercase;
}
.pbx-post__date-lockup span {
  padding: 3px 5px;
  border-radius: 5px;
  background: #173a34;
  color: #fff;
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}
.pbx-post__date-lockup strong {
  font-size: 0.98rem;
  font-weight: 950;
  letter-spacing: 0;
}
.pbx-post__date-lockup em {
  color: var(--text-muted);
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.04em;
}
.pbx-post__date-lockup.is-raw {
  grid-template-columns: minmax(0, 1fr);
}
.pbx-post__date-lockup.is-raw strong {
  overflow: hidden;
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pbx-post__copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}
.pbx-post__copy strong,
.pbx-post__copy em,
.pbx-post__eyebrow,
.pbx-post__open span {
  min-width: 0;
  overflow: hidden;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pbx-post__eyebrow {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pbx-post__copy strong {
  font-size: 1.18rem;
  font-weight: 900;
  letter-spacing: 0;
}
.pbx-post__copy em,
.pbx-post__open span {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-style: normal;
  font-weight: 700;
}
.pbx-post-template {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  min-width: 0;
  margin-top: 2px;
}
.pbx-post-template span,
.pbx-post__copy .pbx-post-template em {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 3px 7px;
  border: 1px solid rgba(23, 58, 52, 0.13);
  border-radius: 999px;
  background: #edf6f1;
  color: #173a34;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pbx-post__copy .pbx-post-template em {
  background: #f7f9f5;
  color: var(--text-muted);
  font-weight: 800;
}
.pbx-post__open {
  display: grid;
  min-width: 128px;
  justify-items: end;
  gap: 6px;
  color: var(--text-muted);
}
.pbx-post__open b {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid rgba(23, 58, 52, 0.14);
  border-radius: 999px;
  background: var(--surface);
  color: #173a34;
  font-size: var(--fs-12);
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(14, 32, 38, 0.08);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}
.pbx-post__open b::after {
  content: "›";
  font-size: 1rem;
  line-height: 0.7;
}
.pbx-post__title:hover .pbx-post__open b,
.pbx-post__title:focus-visible .pbx-post__open b {
  border-color: rgba(23, 58, 52, 0.28);
  background: #eaf4ed;
  transform: translateX(2px);
}
.pbx-post__media {
  position: relative;
  display: grid;
  background: #eff2ec;
}
.pbx-post-media {
  appearance: none;
  position: relative;
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #10202a;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.pbx-post-media--lead {
  aspect-ratio: 16 / 10;
  cursor: default;
}
.pbx-post-media--scorecard {
  background: #f7f3e7;
}
.pbx-post-media--lead.pbx-post-media--scorecard {
  background:
    linear-gradient(135deg, rgba(255, 252, 238, 0.86), rgba(239, 245, 241, 0.9)),
    #f7f3e7;
}
.pbx-post-media img,
.pbx-post-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease, filter 220ms ease;
}
.pbx-post-media--scorecard img {
  object-position: top center;
}
.pbx-post-media--lead.pbx-post-media--scorecard img {
  object-fit: contain;
}
.pbx-post-media--stack-item:hover img,
.pbx-post-media--stack-item:hover video {
  transform: scale(1.03);
  filter: saturate(1.04);
}
.pbx-post__stack {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 126px;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 12px 16px 18px;
  background: var(--surface);
  scrollbar-width: none;
}
.pbx-post__stack::-webkit-scrollbar {
  display: none;
}
.pbx-post__stack .pbx-post-media {
  flex: 0 0 clamp(86px, 16vw, 112px);
  width: clamp(86px, 16vw, 112px);
  aspect-ratio: 1 / 1;
  margin-left: -18px;
  border: 2px solid var(--surface);
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(14, 32, 38, 0.16);
  transform: translateY(var(--stack-lift)) rotate(var(--stack-tilt));
}
.pbx-post__stack .pbx-post-media:first-child {
  margin-left: 0;
}
.pbx-post__stack .pbx-post-media:hover,
.pbx-post__stack .pbx-post-media:focus-visible {
  z-index: 3;
  box-shadow: 0 16px 28px rgba(14, 32, 38, 0.24);
  transform: translateY(-3px) rotate(0deg);
}
.pbx-post__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 12px 12px;
  background: var(--surface);
}
.pbx-post__dots span {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(23, 58, 52, 0.22);
}
.pbx-post__dots span.is-active {
  width: 16px;
  background: #173a34;
}
.pbx-post-media.is-broken img,
.pbx-post-media.is-broken video {
  visibility: hidden;
}
.pbx-post-media__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 12px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 800;
  text-align: center;
}
.pbx-post-media__badge,
.pbx-post-media__duration,
.pbx-post-media__play,
.pbx-post-media__tags {
  position: absolute;
  z-index: 1;
}
.pbx-post-media__badge {
  top: 8px;
  left: 8px;
  max-width: calc(100% - 16px);
  overflow: hidden;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(8, 16, 20, 0.66);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  backdrop-filter: blur(6px);
}
.pbx-post-media--scorecard .pbx-post-media__badge {
  background: rgba(23, 58, 52, 0.78);
}
.pbx-post-media__tags {
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-height: 42%;
  overflow: hidden;
  align-content: flex-end;
  pointer-events: none;
}
.pbx-post-media__tags span {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  padding: 4px 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(8, 16, 20, 0.68);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(7px);
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.2);
}
.pbx-post-media--lead .pbx-post-media__tags {
  right: auto;
  max-width: min(76%, 540px);
}
.pbx-post-media.has-tags .pbx-post-media__duration {
  top: 8px;
  bottom: auto;
}
.pbx-post-media__play {
  inset: 50% auto auto 50%;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: rgba(8, 16, 20, 0.68);
  color: #fff;
  font-size: 1rem;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(6px);
}
.pbx-post-media__duration {
  right: 8px;
  bottom: 8px;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(8, 16, 20, 0.72);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 800;
}

@media (max-width: 560px) {
  .pbx-mosaic {
    gap: 14px;
  }
  .pbx-post__title {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: flex-start;
    gap: 10px;
    min-height: 0;
    padding: 13px 12px;
  }
  .pbx-post__matchup-mark {
    min-width: 124px;
    padding: 8px;
    justify-self: start;
  }
  .pbx-post__logos {
    justify-content: flex-start;
  }
  .pbx-post-team-logo {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }
  .pbx-post__date-lockup {
    gap: 4px;
    padding-top: 6px;
  }
  .pbx-post__date-lockup strong {
    font-size: 0.92rem;
  }
  .pbx-post__copy strong,
  .pbx-post__copy em,
  .pbx-post__open span {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }
  .pbx-post__copy strong {
    font-size: 1.06rem;
  }
  .pbx-post__open {
    min-width: 0;
    justify-items: start;
  }
  .pbx-post__open b {
    padding-inline: 9px;
  }
  .pbx-post-media--lead {
    aspect-ratio: 4 / 3;
  }
  .pbx-post__stack {
    min-height: 106px;
    padding: 10px 12px 14px;
  }
  .pbx-post__stack .pbx-post-media {
    flex-basis: 82px;
    width: 82px;
    margin-left: -14px;
  }
  .pbx-post-media__badge {
    font-size: 0.5rem;
  }
  .pbx-post-media__tags {
    left: 6px;
    right: 6px;
    bottom: 6px;
    gap: 3px;
  }
  .pbx-post-media__tags span {
    padding: 3px 5px;
    font-size: 0.5rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pbx-post-media img,
  .pbx-post-media video {
    transition: none;
  }
}

.pbx-gallery-page {
  width: min(100% - 32px, 1280px);
}
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="2"],
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="3"] {
  width: 100%;
  align-items: stretch;
}
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="2"] .pbx-post__card,
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="3"] .pbx-post__card {
  height: 100%;
}
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="2"] .pbx-post__title,
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="3"] .pbx-post__title {
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  min-height: 0;
  padding: 11px 12px;
}
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="2"] .pbx-post__matchup-mark,
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="3"] .pbx-post__matchup-mark {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
  padding: 7px 8px;
  gap: 8px;
}
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="2"] .pbx-post__logos,
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="3"] .pbx-post__logos {
  justify-content: flex-start;
}
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="2"] .pbx-post-team-logo,
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="3"] .pbx-post-team-logo {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="2"] .pbx-post__versus,
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="3"] .pbx-post__versus {
  width: 20px;
  height: 20px;
  font-size: 0.6rem;
}
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="2"] .pbx-post__date-lockup,
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="3"] .pbx-post__date-lockup {
  width: auto;
  grid-template-columns: auto auto;
  gap: 4px;
  padding-top: 0;
  border-top: 0;
}
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="2"] .pbx-post__date-lockup em,
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="3"] .pbx-post__date-lockup em {
  display: none;
}
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="2"] .pbx-post__date-lockup strong,
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="3"] .pbx-post__date-lockup strong {
  font-size: 0.84rem;
}
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="2"] .pbx-post__copy,
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="3"] .pbx-post__copy {
  gap: 3px;
}
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="2"] .pbx-post__copy strong,
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="3"] .pbx-post__copy strong {
  font-size: 0.96rem;
}
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="2"] .pbx-post__copy em,
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="3"] .pbx-post__copy em {
  font-size: 0.68rem;
}
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="2"] .pbx-post__open,
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="3"] .pbx-post__open {
  display: none;
}
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="2"] .pbx-post-template span,
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="2"] .pbx-post__copy .pbx-post-template em,
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="3"] .pbx-post-template span,
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="3"] .pbx-post__copy .pbx-post-template em {
  padding: 3px 6px;
  font-size: 0.54rem;
}
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="2"] .pbx-post-media--lead,
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="3"] .pbx-post-media--lead {
  aspect-ratio: 4 / 3;
}
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="2"] .pbx-post__stack,
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="3"] .pbx-post__stack {
  min-height: 72px;
  padding: 8px 10px 10px;
}
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="2"] .pbx-post__stack .pbx-post-media,
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="3"] .pbx-post__stack .pbx-post-media {
  flex-basis: 58px;
  width: 58px;
  margin-left: -10px;
}
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="2"] .pbx-post__dots,
.pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="3"] .pbx-post__dots {
  padding-bottom: 9px;
}
@media (max-width: 980px) {
  .pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="3"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="2"],
  .pbx-gallery-page:not(.pbx-gallery-page--public) .pbx-mosaic[data-layout="3"] {
    grid-template-columns: minmax(0, 1fr);
  }
}
.pbx-gallery-page--public .pbx-mosaic {
  width: 100%;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 14px;
}
.pbx-gallery-page--public .pbx-post__card {
  height: 100%;
}
.pbx-gallery-page--public .pbx-post__title {
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  min-height: 0;
  padding: 11px 12px;
}
.pbx-gallery-page--public .pbx-post__matchup-mark {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
  padding: 7px 8px;
  gap: 8px;
}
.pbx-gallery-page--public .pbx-post__logos {
  justify-content: flex-start;
}
.pbx-gallery-page--public .pbx-post-team-logo {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}
.pbx-gallery-page--public .pbx-post__versus {
  width: 20px;
  height: 20px;
  font-size: 0.6rem;
}
.pbx-gallery-page--public .pbx-post__date-lockup {
  width: auto;
  grid-template-columns: auto auto;
  gap: 4px;
  padding-top: 0;
  border-top: 0;
}
.pbx-gallery-page--public .pbx-post__date-lockup em {
  display: none;
}
.pbx-gallery-page--public .pbx-post__date-lockup strong {
  font-size: 0.84rem;
}
.pbx-gallery-page--public .pbx-post__copy {
  gap: 3px;
}
.pbx-gallery-page--public .pbx-post__copy strong {
  font-size: 0.96rem;
}
.pbx-gallery-page--public .pbx-post__copy em,
.pbx-gallery-page--public .pbx-post__open span {
  font-size: 0.68rem;
}
.pbx-gallery-page--public .pbx-post__open {
  display: none;
}
.pbx-gallery-page--public .pbx-post-template span,
.pbx-gallery-page--public .pbx-post__copy .pbx-post-template em {
  padding: 3px 6px;
  font-size: 0.54rem;
}
.pbx-gallery-page--public .pbx-post-media--lead {
  aspect-ratio: 4 / 3;
}
.pbx-gallery-page--public .pbx-post__stack {
  min-height: 72px;
  padding: 8px 10px 10px;
}
.pbx-gallery-page--public .pbx-post__stack .pbx-post-media {
  flex-basis: 58px;
  width: 58px;
  margin-left: -10px;
}
.pbx-gallery-page--public .pbx-post__dots {
  padding-bottom: 9px;
}
.pbx-gallery-page--public .pbx-mosaic[data-layout="moments"] {
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.pbx-gallery-refresh {
  display: flex;
  justify-content: center;
  padding: 18px 0 4px;
}
.pbx-gallery-refresh[hidden] {
  display: none !important;
}
.pbx-gallery-refresh .btn {
  min-width: min(100%, 240px);
}
.pbx-moment {
  min-width: 0;
}
.pbx-moment__card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(18, 45, 62, 0.12);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 8px 20px rgba(14, 32, 38, 0.08);
}
.pbx-moment__profile {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
  padding: 10px 10px 2px;
}
.pbx-moment-avatar {
  position: relative;
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(23, 58, 52, 0.15);
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(8, 117, 209, 0.12), rgba(47, 141, 82, 0.14)),
    #f7faf7;
  color: #173a34;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
}
.pbx-moment-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pbx-moment__byline {
  display: grid;
  min-width: 0;
  gap: 1px;
}
.pbx-moment__byline strong,
.pbx-moment__byline em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pbx-moment__byline strong {
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0;
}
.pbx-moment__byline em {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 800;
}
.pbx-moment__media-link {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
  font: inherit;
  text-align: inherit;
  text-decoration: none;
  appearance: none;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.pbx-moment__media-link:hover,
.pbx-moment__media-link:focus-visible {
  text-decoration: none;
}
.pbx-moment__media-link:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}
.pbx-moment__media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #10202a;
}
.pbx-moment--scorecard .pbx-moment__media {
  background:
    linear-gradient(135deg, rgba(255, 252, 238, 0.86), rgba(239, 245, 241, 0.9)),
    #f7f3e7;
}
.pbx-moment__media img,
.pbx-moment__media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 220ms ease, filter 220ms ease;
}
.pbx-moment--scorecard .pbx-moment__media img {
  object-fit: contain;
  object-position: center center;
}
.pbx-moment-type {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(8, 16, 20, 0.58);
  color: #fff;
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 14px rgba(8, 16, 20, 0.18);
}
.pbx-moment-type--scorecard::after {
  content: "";
  position: absolute;
  right: auto;
  bottom: 4px;
  left: 9px;
  z-index: 3;
  width: 20px;
  height: 7px;
  background: currentColor;
  filter: drop-shadow(0 1px 1px rgba(8, 16, 20, 0.48));
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2044%2014'%3E%3Cpath%20d='M5%204H30L38%207L30%2010H5Z'%20fill='black'/%3E%3Cpath%20d='M2%204H7V10H2Z'%20fill='black'/%3E%3Cpath%20d='M31%204.5L38%207L31%209.5Z'%20fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2044%2014'%3E%3Cpath%20d='M5%204H30L38%207L30%2010H5Z'%20fill='black'/%3E%3Cpath%20d='M2%204H7V10H2Z'%20fill='black'/%3E%3Cpath%20d='M31%204.5L38%207L31%209.5Z'%20fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pbx-moment-type__scorecard {
  position: relative;
  width: 28px;
  height: 21px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2052%2038'%3E%3Cpath%20d='M15%208H45Q48%208%2048%2011V31Q48%2034%2045%2034H15Q12%2034%2012%2031V11Q12%208%2015%208Z'%20fill='none'%20stroke='black'%20stroke-width='4'%20stroke-linejoin='round'/%3E%3Cpath%20d='M5%2014H12M5%2019.5H12M5%2025H12M5%2030.5H12'%20fill='none'%20stroke='black'%20stroke-width='4'%20stroke-linecap='round'/%3E%3Cpath%20d='M30%2014L38%2022L30%2030L22%2022Z'%20fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2052%2038'%3E%3Cpath%20d='M15%208H45Q48%208%2048%2011V31Q48%2034%2045%2034H15Q12%2034%2012%2031V11Q12%208%2015%208Z'%20fill='none'%20stroke='black'%20stroke-width='4'%20stroke-linejoin='round'/%3E%3Cpath%20d='M5%2014H12M5%2019.5H12M5%2025H12M5%2030.5H12'%20fill='none'%20stroke='black'%20stroke-width='4'%20stroke-linecap='round'/%3E%3Cpath%20d='M30%2014L38%2022L30%2030L22%2022Z'%20fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pbx-moment-type__scorecard::before {
  content: none;
}
.pbx-moment-type__scorecard::after {
  content: none;
}
.pbx-moment-type__photo {
  position: relative;
  width: 22px;
  height: 16px;
  border: 1.7px solid currentColor;
  border-radius: 4px;
}
.pbx-moment-type__photo::before {
  content: "";
  position: absolute;
  top: 3px;
  right: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}
.pbx-moment-type__photo::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 2px;
  left: 3px;
  height: 7px;
  background:
    linear-gradient(135deg, transparent 0 34%, currentColor 36% 49%, transparent 51%) left bottom / 55% 100% no-repeat,
    linear-gradient(45deg, transparent 0 30%, currentColor 32% 48%, transparent 50%) right bottom / 60% 100% no-repeat;
}
.pbx-moment-type__video {
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 12px solid currentColor;
  transform: translateX(1px);
}
.pbx-moment__media-link:hover .pbx-moment__media img,
.pbx-moment__media-link:hover .pbx-moment__media video {
  transform: scale(1.03);
  filter: saturate(1.04);
}
.pbx-moment__fallback {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 16px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 900;
  text-align: center;
}
.pbx-moment__fallback .pbx-post-media__play {
  position: static;
  transform: none;
}
.pbx-moment__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 9px 9px 2px;
}
.pbx-moment-action {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #101318;
  cursor: pointer;
  text-decoration: none;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}
.pbx-moment-action:hover,
.pbx-moment-action:focus-visible {
  background: rgba(16, 19, 24, 0.06);
  text-decoration: none;
}
.pbx-moment-action:active {
  transform: scale(0.94);
}
.pbx-moment-action--like.is-active {
  color: #d9364f;
}
.pbx-moment-action__icon {
  position: relative;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: currentColor;
}
.pbx-moment-action__icon--heart::before {
  content: "♡";
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1;
}
.pbx-moment-action--like.is-active .pbx-moment-action__icon--heart::before {
  content: "♥";
}
.pbx-moment__open {
  margin-left: auto;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}
.pbx-moment__open:hover,
.pbx-moment__open:focus-visible {
  color: #173a34;
  text-decoration: none;
}
.pbx-moment__likes {
  padding: 0 11px;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.25;
}
.pbx-moment__caption {
  min-width: 0;
  margin: 0;
  padding: 4px 11px 0;
  font-size: 0.82rem;
  line-height: 1.35;
}
.pbx-moment__caption strong {
  margin-right: 4px;
  font-weight: 900;
}
.pbx-moment__caption span {
  color: var(--text-2);
}
.pbx-moment.is-broken .pbx-moment__media img,
.pbx-moment.is-broken .pbx-moment__media video {
  visibility: hidden;
}
.pbx-moment-preview[hidden] {
  display: none !important;
}
.pbx-moment-preview {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 34px);
}
.pbx-moment-preview__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(5, 12, 16, 0.66);
  backdrop-filter: blur(10px);
  cursor: zoom-out;
}
.pbx-moment-preview__panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(100%, 1040px);
  max-height: min(92vh, 920px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.36);
}
.pbx-moment-preview__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(18, 45, 62, 0.1);
}
.pbx-moment-preview__head .eyebrow,
.pbx-moment-preview__head h2,
.pbx-moment-preview__head p {
  margin: 0;
}
.pbx-moment-preview__head h2 {
  margin-top: 3px;
  font-size: clamp(1.1rem, 2.2vw, 1.55rem);
  line-height: 1.08;
  letter-spacing: 0;
}
.pbx-moment-preview__head p:not(.eyebrow) {
  margin-top: 5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
}
.pbx-moment-preview__close {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(18, 45, 62, 0.12);
  border-radius: 50%;
  background: #f7faf7;
  color: var(--text);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}
.pbx-moment-preview__close:hover,
.pbx-moment-preview__close:focus-visible {
  border-color: rgba(8, 117, 209, 0.3);
  background: rgba(8, 117, 209, 0.08);
  outline: none;
}
.pbx-moment-preview__media {
  display: grid;
  min-height: 240px;
  max-height: min(68vh, 680px);
  place-items: center;
  overflow: auto;
  background:
    linear-gradient(135deg, rgba(255, 252, 238, 0.92), rgba(239, 245, 241, 0.94)),
    #f7f3e7;
}
.pbx-moment-preview__media img,
.pbx-moment-preview__media video {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(68vh, 680px);
  object-fit: contain;
  object-position: center center;
}
.pbx-moment-preview:not(.is-scorecard) .pbx-moment-preview__media {
  background: #101820;
}
.pbx-moment-preview:not(.is-scorecard) .pbx-moment-preview__media img,
.pbx-moment-preview:not(.is-scorecard) .pbx-moment-preview__media video {
  width: 100%;
  height: 100%;
}
.pbx-moment-preview__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-top: 1px solid rgba(18, 45, 62, 0.1);
}
.pbx-moment-preview__caption {
  min-width: 0;
  color: var(--text-2);
  font-size: 0.92rem;
  line-height: 1.35;
}
.pbx-moment-preview__caption strong {
  margin-right: 5px;
  color: var(--text);
  font-weight: 900;
}
.pbx-moment-preview__caption span {
  overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  .pbx-gallery-page--public .pbx-mosaic[data-layout="moments"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .pbx-moment__caption {
    padding-inline: 9px;
  }
  .pbx-moment-preview {
    padding: 10px;
  }
  .pbx-moment-preview__panel {
    max-height: 94vh;
  }
  .pbx-moment-preview__head,
  .pbx-moment-preview__foot {
    padding-inline: 14px;
  }
  .pbx-moment-preview__foot {
    align-items: stretch;
    flex-direction: column;
  }
  .pbx-moment-preview__foot .btn {
    width: 100%;
  }
}
@media (max-width: 420px) {
  .pbx-gallery-page--public .pbx-mosaic[data-layout="moments"] {
    grid-template-columns: minmax(0, 1fr);
  }
}
.pbx-gallery-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid rgba(18, 45, 62, 0.12);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 253, 244, 0.96), rgba(246, 250, 251, 0.96) 60%, rgba(234, 242, 238, 0.92)),
    var(--surface);
  box-shadow: 0 14px 34px rgba(14, 32, 38, 0.08);
}
.pbx-gallery-hero .eyebrow {
  margin: 0 0 7px;
  color: var(--text-faint);
}
.pbx-gallery-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: 0;
}
.pbx-gallery-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.pbx-gallery-panel {
  padding: clamp(14px, 2vw, 20px);
}
.pbx-gallery-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.pbx-gallery-search {
  display: grid;
  gap: 6px;
  flex: 1 1 360px;
  max-width: 520px;
}
.pbx-gallery-search span {
  color: var(--text-muted);
  font-size: var(--fs-12);
  font-weight: 800;
}
.pbx-gallery-search input {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.pbx-gallery-search input:focus {
  border-color: rgba(8, 117, 209, 0.55);
  outline: 3px solid rgba(8, 117, 209, 0.14);
}
.pbx-gallery-layout {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
  min-height: 40px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8faf7;
}
.pbx-gallery-layout > span {
  padding: 0 8px 0 6px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
}
.pbx-gallery-layout button {
  display: inline-grid;
  min-width: 42px;
  min-height: 30px;
  place-items: center;
  padding: 6px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font: inherit;
  font-size: var(--fs-12);
  font-weight: 900;
  line-height: 1;
}
.pbx-gallery-layout button:hover,
.pbx-gallery-layout button:focus-visible {
  background: rgba(8, 117, 209, 0.08);
  color: #0875d1;
}
.pbx-gallery-layout button:focus-visible {
  outline: 3px solid rgba(8, 117, 209, 0.16);
  outline-offset: 1px;
}
.pbx-gallery-layout button.is-active {
  background: #173a34;
  color: #fff;
  box-shadow: 0 4px 10px rgba(14, 32, 38, 0.14);
}
.pbx-layout-icon {
  display: grid;
  width: 24px;
  height: 18px;
  gap: 3px;
  color: currentColor;
}
.pbx-layout-icon i {
  display: block;
  min-width: 0;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  background: rgba(23, 58, 52, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.pbx-layout-icon--current {
  grid-template-columns: minmax(0, 1fr);
}
.pbx-layout-icon--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.pbx-layout-icon--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.pbx-gallery-layout button:hover .pbx-layout-icon i,
.pbx-gallery-layout button:focus-visible .pbx-layout-icon i {
  background: rgba(8, 117, 209, 0.10);
}
.pbx-gallery-layout button.is-active .pbx-layout-icon i {
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.pbx-gallery-toolbar__meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: var(--text-muted);
  font-size: var(--fs-13);
  font-weight: 700;
}
.pbx-gallery-facets {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--divider);
}

/* Gallery/SNS skin for Explore + Scorebook. */
.pressbox-gallery-shell {
  --gallery-bg: #f5f7fb;
  --gallery-surface: #ffffff;
  --gallery-surface-soft: #f8fafc;
  --gallery-line: #e4e7ec;
  --gallery-line-strong: #cfd6e2;
  --gallery-text: #101318;
  --gallery-muted: #667085;
  --gallery-faint: #98a2b3;
  --gallery-accent: #2f6fed;
  --gallery-accent-soft: #eaf1ff;
  --gallery-like: #e83e63;
  --gallery-ink: #111827;
  --gallery-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 16px 34px rgba(15, 23, 42, 0.08);
  background: var(--gallery-bg);
  color: var(--gallery-text);
}
.pressbox-gallery-shell .pbx-gallery-page {
  width: min(100% - 40px, 1180px);
  padding-top: 24px;
}
.pressbox-gallery-shell .pbx-gallery-hero {
  align-items: center;
  margin-bottom: 12px;
  padding: 22px 0 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.pressbox-gallery-shell .pbx-gallery-hero .eyebrow {
  color: var(--gallery-accent);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}
.pressbox-gallery-shell .pbx-gallery-hero h1 {
  color: var(--gallery-text);
  font-size: clamp(2.15rem, 4.2vw, 3.35rem);
  font-weight: 950;
}
.pressbox-gallery-shell .pbx-hero__sub {
  max-width: 58ch;
  color: var(--gallery-muted);
}
.pressbox-gallery-shell .pbx-gallery-hero__actions .btn,
.pressbox-gallery-shell .pbx-gallery-refresh .btn,
.pressbox-gallery-shell .pbx-gallery-toolbar__meta .btn {
  border-radius: 999px;
}
.pressbox-gallery-shell .btn--primary {
  border-color: var(--gallery-accent);
  background: var(--gallery-accent);
  color: #fff;
  box-shadow: 0 10px 20px rgba(47, 111, 237, 0.18);
}
.pressbox-gallery-shell .btn--primary:hover,
.pressbox-gallery-shell .btn--primary:focus-visible {
  background: #255bd8;
  border-color: #255bd8;
}
.pressbox-gallery-shell .btn--ghost {
  border-color: var(--gallery-line);
  background: var(--gallery-surface);
  color: var(--gallery-text);
}
.pressbox-gallery-shell .btn--ghost:hover,
.pressbox-gallery-shell .btn--ghost:focus-visible {
  border-color: var(--gallery-line-strong);
  background: var(--gallery-surface-soft);
  color: var(--gallery-accent);
  text-decoration: none;
}
.pressbox-gallery-shell .pbx-gallery-panel {
  padding: 18px;
  border-color: var(--gallery-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--gallery-shadow);
}
.pressbox-gallery-shell .pbx-gallery-toolbar {
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gallery-line);
}
.pressbox-gallery-shell .pbx-gallery-search span,
.pressbox-gallery-shell .shelf-facet-group__label,
.pressbox-gallery-shell .pbx-gallery-toolbar__meta {
  color: var(--gallery-muted);
}
.pressbox-gallery-shell .pbx-gallery-search input {
  min-height: 44px;
  border-color: var(--gallery-line);
  border-radius: 999px;
  background: var(--gallery-surface-soft);
  color: var(--gallery-text);
}
.pressbox-gallery-shell .pbx-gallery-search input:focus {
  border-color: rgba(47, 111, 237, 0.52);
  outline: 4px solid rgba(47, 111, 237, 0.13);
}
.pressbox-gallery-shell .pbx-gallery-layout {
  border-color: var(--gallery-line);
  background: var(--gallery-surface-soft);
}
.pressbox-gallery-shell .pbx-gallery-layout button:hover,
.pressbox-gallery-shell .pbx-gallery-layout button:focus-visible {
  background: var(--gallery-accent-soft);
  color: var(--gallery-accent);
}
.pressbox-gallery-shell .pbx-gallery-layout button.is-active {
  background: var(--gallery-ink);
  color: #fff;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.18);
}
.pressbox-gallery-shell .pbx-layout-icon i {
  background: rgba(47, 111, 237, 0.08);
}
.pressbox-gallery-shell .pbx-gallery-facets {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-color: var(--gallery-line);
}
.pressbox-gallery-shell .facet-chip {
  border-color: var(--gallery-line);
  background: var(--gallery-surface-soft);
  color: var(--gallery-text);
  font-weight: 750;
}
.pressbox-gallery-shell .facet-chip:hover {
  border-color: var(--gallery-line-strong);
  background: #fff;
}
.pressbox-gallery-shell .facet-chip.is-active {
  border-color: var(--gallery-accent);
  background: var(--gallery-accent);
  color: #fff;
}
.pressbox-gallery-shell .facet-chip.is-active em {
  color: rgba(255, 255, 255, 0.74);
}
.pressbox-gallery-shell .pbx-mosaic {
  gap: 20px;
}
.pressbox-gallery-shell .pbx-post__card,
.pressbox-gallery-shell .pbx-moment__card {
  border-color: var(--gallery-line);
  background: var(--gallery-surface);
  box-shadow: var(--gallery-shadow);
}
.pressbox-gallery-shell .pbx-post__head {
  border-color: var(--gallery-line);
}
.pressbox-gallery-shell .pbx-post__title {
  background: var(--gallery-surface);
  color: var(--gallery-text);
}
.pressbox-gallery-shell .pbx-post__title:hover,
.pressbox-gallery-shell .pbx-post__title:focus-visible {
  background: var(--gallery-surface-soft);
  box-shadow: inset 0 0 0 1px rgba(47, 111, 237, 0.12);
}
.pressbox-gallery-shell .pbx-post__matchup-mark {
  border-color: var(--gallery-line);
  background: var(--gallery-surface-soft);
  box-shadow: none;
}
.pressbox-gallery-shell .pbx-post-team-logo {
  border-color: rgba(255, 255, 255, 0.92);
  background: var(--gallery-ink);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.16);
}
.pressbox-gallery-shell .pbx-post-team-logo.has-logo {
  background: #fff;
}
.pressbox-gallery-shell .pbx-post__versus {
  border-color: var(--gallery-line);
  background: #fff;
  color: var(--gallery-muted);
}
.pressbox-gallery-shell .pbx-post__date-lockup {
  border-color: var(--gallery-line);
  color: var(--gallery-accent);
}
.pressbox-gallery-shell .pbx-post__date-lockup span {
  background: var(--gallery-accent);
  color: #fff;
}
.pressbox-gallery-shell .pbx-post__eyebrow,
.pressbox-gallery-shell .pbx-post__copy em,
.pressbox-gallery-shell .pbx-post__open span,
.pressbox-gallery-shell .pbx-post__date-lockup em,
.pressbox-gallery-shell .pbx-moment__byline em,
.pressbox-gallery-shell .pbx-moment__open {
  color: var(--gallery-muted);
}
.pressbox-gallery-shell .pbx-post-template span,
.pressbox-gallery-shell .pbx-post__copy .pbx-post-template em {
  border-color: #d7e3ff;
  background: var(--gallery-accent-soft);
  color: var(--gallery-accent);
}
.pressbox-gallery-shell .pbx-post__open b {
  border-color: #d7e3ff;
  background: #f7faff;
  color: var(--gallery-accent);
}
.pressbox-gallery-shell .pbx-post__title:hover .pbx-post__open b,
.pressbox-gallery-shell .pbx-post__title:focus-visible .pbx-post__open b {
  border-color: rgba(47, 111, 237, 0.42);
  background: var(--gallery-accent-soft);
}
.pressbox-gallery-shell .pbx-post__media,
.pressbox-gallery-shell .pbx-post__stack,
.pressbox-gallery-shell .pbx-post__dots {
  background: var(--gallery-surface);
}
.pressbox-gallery-shell .pbx-post-media {
  background: #111827;
}
.pressbox-gallery-shell .pbx-post-media--scorecard,
.pressbox-gallery-shell .pbx-post-media--lead.pbx-post-media--scorecard,
.pressbox-gallery-shell .pbx-moment--scorecard .pbx-moment__media,
.pressbox-gallery-shell .pbx-moment-preview__media {
  background:
    linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.96)),
    #f8fafc;
}
.pressbox-gallery-shell .pbx-post__stack .pbx-post-media {
  border-color: var(--gallery-surface);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
}
.pressbox-gallery-shell .pbx-post__dots span {
  background: rgba(47, 111, 237, 0.22);
}
.pressbox-gallery-shell .pbx-post__dots span.is-active {
  background: var(--gallery-accent);
}
.pressbox-gallery-shell .pbx-post-media__badge,
.pressbox-gallery-shell .pbx-post-media__duration,
.pressbox-gallery-shell .pbx-post-media__play,
.pressbox-gallery-shell .pbx-post-media__tags span,
.pressbox-gallery-shell .pbx-moment-type {
  background: rgba(17, 24, 39, 0.72);
  color: #fff;
}
.pressbox-gallery-shell .pbx-post-media--scorecard .pbx-post-media__badge {
  background: rgba(47, 111, 237, 0.78);
}
.pressbox-gallery-shell .pbx-moment-avatar {
  border-color: #dbe8ff;
  background: #eef5ff;
  color: #1d4ed8;
}
.pressbox-gallery-shell .pbx-moment__byline strong,
.pressbox-gallery-shell .pbx-moment__caption strong {
  color: var(--gallery-text);
}
.pressbox-gallery-shell .pbx-moment__caption span {
  color: #344054;
}
.pressbox-gallery-shell .pbx-moment-action {
  color: var(--gallery-ink);
}
.pressbox-gallery-shell .pbx-moment-action:hover,
.pressbox-gallery-shell .pbx-moment-action:focus-visible {
  background: rgba(47, 111, 237, 0.09);
  color: var(--gallery-accent);
}
.pressbox-gallery-shell .pbx-moment-action--like.is-active {
  color: var(--gallery-like);
}
.pressbox-gallery-shell .pbx-moment__open:hover,
.pressbox-gallery-shell .pbx-moment__open:focus-visible {
  color: var(--gallery-accent);
}
.pressbox-gallery-shell .pbx-moment-preview__panel {
  border-color: rgba(255, 255, 255, 0.28);
  background: #fff;
}
.pressbox-gallery-shell .pbx-moment-preview__backdrop {
  background: rgba(15, 23, 42, 0.68);
}
.pressbox-gallery-shell .pbx-moment-preview__close {
  border-color: var(--gallery-line);
  background: var(--gallery-surface-soft);
}

.pbx-photo-grid--page {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.pbx-photo-detail-page {
  width: min(100% - 32px, 1280px);
}
.pbx-photo-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 14px;
  font-size: var(--fs-13);
  font-weight: 800;
}
.pbx-photo-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 18px;
  align-items: start;
}
.pbx-photo-detail[hidden] {
  display: none !important;
}
.pbx-photo-detail__media {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.pbx-photo-detail__media img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 180px);
  object-fit: contain;
  margin: 0 auto;
  background: #f8fafb;
}
.pbx-photo-detail__media.has-image-placeholder {
  min-height: 420px;
  display: grid;
  place-items: center;
}
.pbx-photo-detail__media.has-image-placeholder::after {
  content: 'Photo unavailable';
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 800;
  text-transform: uppercase;
}
.pbx-photo-detail__panel {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-1);
}
.pbx-photo-detail__panel .eyebrow {
  margin: 0;
  color: var(--text-faint);
}
.pbx-photo-detail__panel h1 {
  margin: -6px 0 0;
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  line-height: 1.06;
  letter-spacing: 0;
}
.pbx-photo-detail__stats {
  display: grid;
  gap: 8px;
  margin: 0;
}
.pbx-photo-detail__stats div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--divider);
}
.pbx-photo-detail__stats div:last-child {
  border-bottom: 0;
}
.pbx-photo-detail__stats dt,
.pbx-photo-detail__stats dd {
  margin: 0;
  font-size: var(--fs-13);
}
.pbx-photo-detail__stats dt {
  color: var(--text-muted);
  font-weight: 800;
}
.pbx-photo-detail__stats dd {
  color: var(--text);
  font-weight: 700;
  text-align: right;
}
.pbx-photo-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

/* ── Game memory capsule detail ── */
.pbx-memory {
  display: grid;
  gap: 18px;
}
.pbx-memory[hidden] {
  display: none !important;
}
.pbx-memory-cover {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  min-height: clamp(360px, 44vw, 520px);
  overflow: hidden;
  border: 1px solid rgba(18, 45, 62, 0.12);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 253, 244, 0.98), rgba(244, 248, 249, 0.97) 52%, rgba(232, 241, 238, 0.94)),
    var(--surface);
  box-shadow: 0 18px 44px rgba(14, 32, 38, 0.10);
}
.pbx-memory-cover__media.pbx-photo-detail__media {
  min-height: 100%;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(31, 42, 38, 0.08), rgba(31, 42, 38, 0.02)),
    #ecefe7;
  box-shadow: none;
}
.pbx-memory-cover__media.pbx-photo-detail__media img {
  width: 100%;
  height: 100%;
  max-height: none;
  padding: clamp(10px, 1.4vw, 18px);
  object-fit: contain;
  background: #ecefe7;
}
.pbx-memory-cover__copy {
  display: grid;
  align-content: end;
  gap: 14px;
  min-width: 0;
  padding: clamp(24px, 4vw, 44px);
}
.pbx-memory-cover__copy .eyebrow {
  width: fit-content;
  margin: 0;
  padding: 5px 9px;
  border: 1px solid rgba(8, 117, 209, 0.18);
  border-radius: 999px;
  background: rgba(8, 117, 209, 0.08);
  color: var(--accent);
}
.pbx-memory-cover h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(2.1rem, 4.4vw, 4.1rem);
  line-height: 0.98;
  letter-spacing: 0;
}
.pbx-memory-cover__meta {
  margin: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  font-weight: 800;
  letter-spacing: 0;
}
.pbx-memory-cover__story {
  max-width: 560px;
  margin: 0;
  color: var(--text-2);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.48;
}
.pbx-memory-cover__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 8px;
}
.pbx-memory-cover__actions label.btn {
  cursor: pointer;
}
.pbx-memory-artifacts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.pbx-memory-artifact {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-1);
}
.pbx-memory-artifact__kind {
  display: block;
  margin-bottom: 12px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  font-weight: 900;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}
.pbx-memory-artifact strong {
  display: block;
  min-width: 0;
  color: var(--text);
  font-size: var(--fs-18);
  line-height: 1.12;
}
.pbx-memory-artifact span:last-child {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: var(--fs-13);
  line-height: 1.35;
}
.pbx-memory-artifact--scorecard { border-top: 4px solid #39413d; }
.pbx-memory-artifact--photos { border-top: 4px solid #2f8d52; }
.pbx-memory-artifact--result { border-top: 4px solid var(--accent); }
.pbx-memory-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 18px;
  align-items: start;
}
.pbx-memory-card {
  min-width: 0;
  padding: clamp(16px, 2vw, 22px);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-1);
}
.pbx-memory-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.pbx-memory-card__head .eyebrow {
  margin: 0 0 5px;
  color: var(--text-faint);
}
.pbx-memory-card__head h2 {
  margin: 0;
  color: var(--text);
  font-size: var(--fs-22);
  line-height: 1.1;
  letter-spacing: 0;
}
.pbx-memory-card__head > span {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 900;
  text-transform: uppercase;
}
.pbx-memory-timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pbx-memory-timeline li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--divider);
}
.pbx-memory-timeline li:first-child {
  border-top: 0;
  padding-top: 0;
}
.pbx-memory-timeline li > span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #c7cec7;
  border-radius: 50%;
  background: #fbfaf2;
  color: #39413d;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 900;
}
.pbx-memory-timeline strong {
  display: block;
  color: var(--text);
  font-size: var(--fs-16);
  line-height: 1.2;
}
.pbx-memory-timeline p {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: var(--fs-14);
  line-height: 1.45;
}
.pbx-memory-card--facts .pbx-photo-detail__stats {
  gap: 0;
}
.pbx-memory-card--photos {
  padding-bottom: 18px;
}
.pbx-memory-photo-roll {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.pbx-memory-photo {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.pbx-memory-photo figure {
  margin: 0;
  aspect-ratio: 5 / 3.35;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(145deg, #e7ece7, #f8f6ec);
}
.pbx-memory-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pbx-memory-photo > div {
  display: grid;
  gap: 3px;
  padding: 11px 12px 12px;
}
.pbx-memory-photo strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: var(--fs-14);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pbx-memory-photo span {
  color: var(--text-muted);
  font-size: var(--fs-12);
  line-height: 1.35;
}
.pbx-memory-photo__scene {
  position: relative;
  display: grid;
  height: 100%;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(39, 54, 64, 0.18), transparent 42%),
    linear-gradient(160deg, #e3e9e5, #fbf5e8 62%, #dfeadf);
}
.pbx-memory-photo__scene span:first-child {
  align-self: end;
  display: block;
  height: 36%;
  background:
    linear-gradient(90deg, rgba(47, 141, 82, 0.70), rgba(47, 141, 82, 0.40)),
    #2f8d52;
}
.pbx-memory-photo__scene span:nth-child(2) {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 25%;
  height: 1px;
  background: rgba(57, 65, 61, 0.28);
}
.pbx-memory-photo__scene span:nth-child(3) {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 58px;
  height: 34px;
  border: 2px solid rgba(57, 65, 61, 0.28);
  background: rgba(57, 65, 61, 0.12);
}
.pbx-memory-photo--scorecard figure {
  background: #f4f1e8;
}
.pbx-memory-photo--scorecard img {
  object-fit: contain;
  padding: 10px;
}
.pbx-memory-photo--scoreboard .pbx-memory-photo__scene span:nth-child(3),
.pbx-memory-photo--postgame .pbx-memory-photo__scene span:nth-child(3) {
  width: 76px;
}
.pbx-empty.hist-empty {
  margin: 10px 0 0;
  padding-block: 34px;
}
.pbx-empty.hist-empty.is-date-memory-empty {
  width: min(390px, 100%);
  min-height: 360px;
  box-sizing: border-box;
  margin: 2px auto 30px;
  place-items: center;
  gap: 11px;
  padding: 22px;
  border: 1px solid rgba(8, 117, 209, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
  text-align: center;
}
.pbx-empty.hist-empty.is-date-memory-empty .hist-empty__icon {
  display: none;
}
.pbx-empty.hist-empty.is-date-memory-empty h2 {
  margin: 0;
  font-size: var(--fs-18);
  line-height: 1.2;
}
.pbx-empty.hist-empty.is-date-memory-empty p {
  max-width: 236px;
  font-size: var(--fs-13);
}
.pbx-empty.hist-empty.is-date-memory-empty .btn {
  margin-top: 6px;
}
.pbx-shelf-stage.is-date-memory-empty-stage .pbx-empty.hist-empty.is-date-memory-empty {
  margin-left: auto;
  margin-right: auto;
}
.pbx-shelf-stage.is-date-memory-empty-stage .pbx-upload-wheel {
  left: calc(50% + 354px);
  right: auto;
}
.pbx-scan-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--divider);
}
.pbx-game-upload {
  width: min(100%, 560px);
  box-sizing: border-box;
  margin: 0 auto 12px;
  padding: 12px 14px;
  border: 1px solid rgba(8, 117, 209, 0.16);
  border-radius: 8px;
  background: rgba(8, 117, 209, 0.055);
}
@media (prefers-reduced-motion: reduce) {
  .pbx-score-rec.is-selected::after { display: none; }
}
.pbx-scan-strip h3 {
  margin: 0;
  font-size: var(--fs-18);
  line-height: 1.15;
  letter-spacing: 0;
}
.pbx-scan-strip p:not(.eyebrow) {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: var(--fs-13);
  line-height: 1.45;
}
.pbx-scan-strip__actions {
  display: grid;
  justify-items: end;
  gap: 6px;
  flex: 0 0 auto;
}
.pbx-scan-strip__actions span {
  color: var(--text-faint);
  font-size: var(--fs-12);
  text-align: right;
}
.pbx-upload-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.pbx-scan-strip__actions .btn:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}
.pbx-scan-strip__actions .btn[aria-disabled="true"] {
  cursor: pointer;
  opacity: 1;
}
.pbx-game-upload .pbx-scan-strip__actions .pbx-upload-btn:not(:disabled) {
  --pbx-upload-start: #39a8ff;
  --pbx-upload-mid: #0875d1;
  --pbx-upload-end: #0066bd;
  --pbx-upload-hover-start: #4bb2ff;
  --pbx-upload-hover-mid: #0b7fdf;
  --pbx-upload-hover-end: #005fb0;
  --pbx-upload-rgb: 8, 117, 209;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-color: rgba(var(--pbx-upload-rgb), 0.86);
  background:
    linear-gradient(135deg, var(--pbx-upload-start) 0%, var(--pbx-upload-mid) 58%, var(--pbx-upload-end) 100%);
  background-size: 180% 180%;
  color: #fff;
  box-shadow:
    0 10px 22px rgba(var(--pbx-upload-rgb), 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  font-weight: 800;
  animation: pbx-upload-cta-breathe 3.4s ease-in-out infinite;
}
.pbx-game-upload .pbx-scan-strip__actions .pbx-upload-btn--icon {
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 8px;
  border-radius: 8px;
}
.pbx-upload-btn__icon {
  position: relative;
  z-index: 1;
  display: block;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pbx-game-upload .pbx-scan-strip__actions .pbx-upload-btn--media:not(:disabled) {
  --pbx-upload-start: #39d8a2;
  --pbx-upload-mid: #108c63;
  --pbx-upload-end: #0b6f50;
  --pbx-upload-hover-start: #51e2b1;
  --pbx-upload-hover-mid: #139a6d;
  --pbx-upload-hover-end: #096446;
  --pbx-upload-rgb: 16, 140, 99;
}
.pbx-game-upload .pbx-scan-strip__actions .pbx-upload-btn--link:not(:disabled) {
  --pbx-upload-start: #9aa9ff;
  --pbx-upload-mid: #5468d4;
  --pbx-upload-end: #3546a8;
  --pbx-upload-hover-start: #aab6ff;
  --pbx-upload-hover-mid: #6075e2;
  --pbx-upload-hover-end: #2f409a;
  --pbx-upload-rgb: 84, 104, 212;
}
.pbx-game-upload .pbx-scan-strip__actions .pbx-upload-btn:not(:disabled)::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -50% -70%;
  pointer-events: none;
  background:
    linear-gradient(110deg, transparent 36%, rgba(255, 255, 255, 0.34) 50%, transparent 64%);
  transform: translateX(-62%);
  animation: pbx-upload-cta-sheen 3.4s ease-in-out infinite;
}
.pbx-game-upload .pbx-scan-strip__actions .pbx-upload-btn:not(:disabled):hover,
.pbx-game-upload .pbx-scan-strip__actions .pbx-upload-btn:not(:disabled):focus-visible {
  border-color: rgba(var(--pbx-upload-rgb), 0.95);
  background:
    linear-gradient(135deg, var(--pbx-upload-hover-start) 0%, var(--pbx-upload-hover-mid) 54%, var(--pbx-upload-hover-end) 100%);
  background-size: 180% 180%;
  box-shadow:
    0 12px 26px rgba(var(--pbx-upload-rgb), 0.32),
    0 0 0 3px rgba(var(--pbx-upload-rgb), 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}
.pbx-game-upload .pbx-scan-strip__actions .pbx-upload-btn:not(:disabled) > span {
  position: relative;
  z-index: 1;
  color: #fff;
}
.pbx-game-upload .pbx-scan-strip__actions .pbx-upload-btn:not(:disabled) > span:first-child {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 900;
}
@keyframes pbx-upload-cta-breathe {
  0%,
  100% {
    background-position: 0% 50%;
    box-shadow:
      0 10px 22px rgba(var(--pbx-upload-rgb), 0.24),
      inset 0 1px 0 rgba(255, 255, 255, 0.22);
  }
  50% {
    background-position: 100% 50%;
    box-shadow:
      0 13px 28px rgba(var(--pbx-upload-rgb), 0.34),
      0 0 0 3px rgba(var(--pbx-upload-rgb), 0.10),
      inset 0 1px 0 rgba(255, 255, 255, 0.24);
  }
}
@keyframes pbx-upload-cta-sheen {
  0%,
  38% {
    transform: translateX(-62%);
    opacity: 0;
  }
  52% {
    opacity: 1;
  }
  72%,
  100% {
    transform: translateX(62%);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pbx-game-upload .pbx-scan-strip__actions .pbx-upload-btn:not(:disabled),
  .pbx-game-upload .pbx-scan-strip__actions .pbx-upload-btn:not(:disabled)::before {
    animation: none;
  }
  .pbx-game-upload .pbx-scan-strip__actions .pbx-upload-btn:not(:disabled)::before {
    display: none;
  }
}
.pbx-pick-list {
  display: grid;
  gap: 8px;
}
.pbx-pick-list--teams {
  max-height: 310px;
  overflow: auto;
  padding-right: 2px;
}
.pbx-pick-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 8px;
}
.pbx-pick {
  appearance: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}
.pbx-pick:hover {
  border-color: var(--border-strong);
}
.pbx-pick.is-active {
  border-color: rgba(8, 117, 209, 0.52);
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}
.pbx-pick.is-active .pbx-pick__logo {
  background: #fff;
}
.pbx-pick.has-logo {
  grid-template-columns: auto minmax(0, 1fr) auto;
}
.pbx-pick__logo {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.pbx-pick__logo img {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.pbx-pick__main {
  display: grid;
  min-width: 0;
  gap: 2px;
}
.pbx-pick__main strong,
.pbx-pick__main em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pbx-pick__main strong {
  font-size: var(--fs-14);
}
.pbx-pick__main em {
  color: var(--text-muted);
  font-size: var(--fs-12);
  font-style: normal;
}
.pbx-pick__count {
  min-width: 30px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  text-align: center;
}
.pbx-open-link,
.pbx-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-muted);
  font-size: var(--fs-12);
  font-weight: 700;
  text-decoration: none;
}
.pbx-open-link:hover,
.pbx-remove:hover {
  border-color: var(--border-strong);
  color: var(--text);
  text-decoration: none;
}
.pbx-remove {
  cursor: pointer;
}
.pbx-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--divider);
}
.pbx-editor label {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.pbx-editor span {
  color: var(--text-muted);
  font-size: var(--fs-12);
  font-weight: 700;
}
.pbx-editor input {
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}
.pbx-schedule-controls {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.pbx-league-pick {
  display: inline-flex;
}
.pbx-league-pick select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 32px;
  padding: 5px 26px 5px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%23888' stroke-width='1.5' d='M1 1l4 4 4-4'/%3E%3C/svg%3E")
    no-repeat right 9px center;
  color: var(--text);
  cursor: pointer;
  font-size: var(--fs-12);
  font-weight: 700;
}
.pbx-league-pick select:focus-visible {
  outline: 2px solid var(--accent, #2d7);
  outline-offset: 1px;
}
.pbx-ext-game-row {
  cursor: pointer;
  border-radius: var(--radius);
  transition: background 0.12s ease, box-shadow 0.12s ease;
}
.pbx-ext-game-row:hover {
  background: var(--surface-2);
}
.pbx-ext-game-row.is-selected {
  background: var(--surface-2);
  box-shadow: inset 0 0 0 2px var(--accent, #2d7);
}
.pbx-ext-matchup {
  font-weight: 700;
}
.pbx-segmented {
  display: inline-flex;
  flex: none;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.pbx-segmented button {
  appearance: none;
  min-height: 32px;
  padding: 6px 11px;
  border: 0;
  border-left: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: var(--fs-12);
  font-weight: 700;
}
.pbx-segmented button:first-child {
  border-left: 0;
}
.pbx-segmented button.is-active {
  background: var(--surface);
  color: var(--text);
}
.pbx-schedule {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pbx-schedule--card-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
  align-items: stretch;
  gap: 10px;
}
.pbx-schedule--card-grid .pbx-game-row,
.pbx-schedule--card-grid .pbx-league-divider {
  grid-column: 1 / -1;
}
.pbx-game-row > a,
.pbx-game-row > div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) minmax(74px, auto);
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}
.pbx-game-row > a:hover {
  border-color: var(--border-strong);
  text-decoration: none;
}
.pbx-game-row__date,
.pbx-game-row__main,
.pbx-game-row__status {
  display: grid;
  min-width: 0;
  gap: 2px;
}
.pbx-game-row__date strong,
.pbx-game-row__main strong,
.pbx-game-row__status strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--fs-14);
}
.pbx-game-row__date span,
.pbx-game-row__main span,
.pbx-game-row__status span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
  font-size: var(--fs-12);
}
.pbx-game-row__date strong {
  font-family: var(--font-mono);
}
.pbx-game-row__status {
  justify-items: end;
  text-align: right;
}
.pbx-game-row__status strong {
  color: var(--green);
}
.pbx-club__logo {
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(18, 27, 32, 0.16);
  border-radius: 50%;
  background: #2f3e46;
  color: #fff;
  font-family: var(--font-mono);
  font-size: var(--fs-14);
  font-weight: 900;
  line-height: 1;
}
.pbx-club__logo--grillers {
  background: linear-gradient(135deg, #253f2f, #5c9362);
}
.pbx-club__logo--cubs {
  background: linear-gradient(135deg, #123d73, #d33a42);
}
.pbx-league-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 4px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--fs-14);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pbx-league-divider::before,
.pbx-league-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--divider);
}
.pbx-league-divider span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 5px 14px rgba(31, 35, 36, 0.05);
}
.pbx-league-game-row {
  min-width: 0;
  list-style: none;
}
.pbx-league-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  min-height: 190px;
  border: 1px solid #aeb5b7;
  border-radius: 8px;
  background: #fffdf8;
  color: #1f2324;
  box-shadow: 0 8px 18px rgba(31, 35, 36, 0.06);
}
.pbx-league-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
  border-bottom: 1px solid #cfd5d6;
  background: #f8f7f0;
}
.pbx-league-card__head span {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pbx-league-card__head strong {
  color: var(--green);
  font-size: var(--fs-13);
}
.pbx-league-card__match {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 103px;
  padding: 16px 14px;
}
.pbx-league-card__club {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}
.pbx-league-card__club:last-child {
  justify-content: flex-end;
  text-align: right;
}
.pbx-league-card__club .pbx-club__logo {
  flex-basis: 44px;
  width: 44px;
  height: 44px;
  font-size: var(--fs-18);
}
.pbx-league-card__club div:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}
.pbx-league-card__club strong {
  overflow: hidden;
  color: var(--text);
  font-size: var(--fs-18);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pbx-league-card__club em {
  overflow: hidden;
  color: var(--text-muted);
  font-size: var(--fs-12);
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pbx-league-card__vs {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  font-weight: 900;
  text-transform: uppercase;
}
.pbx-league-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid #dce1e2;
  color: var(--text-muted);
  font-size: var(--fs-12);
}
.pbx-empty-mini {
  padding: 22px 12px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
  text-align: center;
}
.pbx-mlb-datebar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
}
.pbx-mlb-datebar[hidden] {
  display: none !important;
}
.pbx-mlb-datebar__nav {
  display: inline-flex;
  align-items: stretch;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.pbx-mlb-datebar__nav button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 38px;
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.pbx-mlb-datebar__nav button:last-child {
  border-right: 0;
}
.pbx-mlb-datebar__nav button:hover:not(:disabled) {
  background: #f4f7f8;
}
.pbx-mlb-datebar__nav button:disabled {
  color: var(--text-faint);
  cursor: not-allowed;
}
.pbx-mlb-datebar__nav svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#mlbDatePickerBtn {
  min-width: min(240px, 56vw);
  justify-content: flex-start;
  font-weight: 800;
}
.pbx-date-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  width: min(318px, calc(100vw - 42px));
  padding: 13px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(20, 25, 26, 0.18);
}
.pbx-date-popover[hidden] {
  display: none !important;
}
.pbx-date-popover__head,
.pbx-date-popover__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pbx-date-popover__head {
  margin-bottom: 10px;
}
.pbx-date-popover__head strong {
  font-size: var(--fs-14);
}
.pbx-date-popover__head div {
  display: inline-flex;
  gap: 5px;
}
.pbx-date-popover__head button,
.pbx-date-popover__foot button {
  appearance: none;
  min-height: 30px;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}
.pbx-date-popover__head button {
  width: 30px;
  color: var(--text-muted);
  font-size: var(--fs-18);
}
.pbx-date-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.pbx-date-grid__dow {
  display: grid;
  place-items: center;
  min-height: 24px;
  color: var(--text);
  font-size: var(--fs-12);
  font-weight: 800;
}
.pbx-date-cell {
  appearance: none;
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  aspect-ratio: 1;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: var(--fs-13);
}
.pbx-date-cell em {
  position: absolute;
  right: 4px;
  bottom: 3px;
  color: var(--text-faint);
  font-size: 0.62rem;
  font-style: normal;
  line-height: 1;
}
.pbx-date-cell.is-outside {
  color: var(--text-faint);
}
.pbx-date-cell:disabled {
  color: #b7bec0;
  cursor: default;
}
.pbx-date-cell.has-games:hover {
  border-color: var(--border-strong);
  background: #f4f7f8;
}
.pbx-date-cell.is-today {
  border-color: #aeb8bb;
}
.pbx-date-cell.is-selected {
  border-color: #0b72d9;
  background: #0b72d9;
  color: #fff;
  font-weight: 900;
}
.pbx-date-cell.is-selected em {
  color: rgba(255, 255, 255, 0.84);
}
.pbx-mlb-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 10px;
}
.pbx-mlb-board .pbx-league-divider {
  grid-column: 1 / -1;
  margin-top: 0;
}
.pbx-mlb-card {
  display: block;
  overflow: hidden;
  border: 1px solid #aeb5b7;
  border-radius: 8px;
  background: #fffdf8;
  color: #1f2324;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(31, 35, 36, 0.06);
}
.pbx-mlb-card:hover {
  border-color: #778285;
  text-decoration: none;
  transform: translateY(-1px);
}
.pbx-mlb-card.is-live {
  border-color: #2a8f5f;
  box-shadow: 0 10px 22px rgba(42, 143, 95, 0.13);
}
.pbx-mlb-card.is-selected {
  border-color: #0875d1;
  box-shadow:
    0 0 0 2px rgba(8, 117, 209, 0.16),
    0 14px 28px rgba(8, 117, 209, 0.14);
}
.pbx-mlb-card.is-postponed,
.pbx-mlb-card.is-suspended {
  border-color: #b7a15f;
  background: #fffdf4;
}
.pbx-mlb-card__head {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  align-items: center;
  min-height: 58px;
  border-bottom: 1px solid #cfd5d6;
  background: #f8f7f0;
}
.pbx-mlb-card__logo {
  display: grid;
  place-items: center;
  width: 54px;
  height: 58px;
  background: #eef2f4;
}
.pbx-mlb-card__logo img {
  max-width: 46px;
  max-height: 46px;
  object-fit: contain;
}
.pbx-mlb-card__match {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 0 6px;
  text-align: center;
}
.pbx-mlb-card__match strong {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  font-size: var(--fs-16);
  line-height: 1.08;
}
.pbx-mlb-card__match em {
  color: #4d5658;
  font-style: normal;
  font-weight: 800;
}
.pbx-mlb-card__meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 5px 8px;
  border-bottom: 1px solid #d8ddde;
  font-size: var(--fs-12);
}
.pbx-mlb-card__meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pbx-mlb-card__meta strong {
  color: #202425;
  font-size: var(--fs-11);
  text-transform: uppercase;
}
.pbx-mlb-card.is-live .pbx-mlb-card__meta strong {
  color: #187545;
}
.pbx-mlb-card.is-postponed .pbx-mlb-card__meta strong,
.pbx-mlb-card.is-suspended .pbx-mlb-card__meta strong {
  color: #8a6418;
}
.pbx-mlb-card__note {
  margin: 0;
  padding: 7px 9px;
  border-bottom: 1px solid #e2d8af;
  background: #fff6d5;
  color: #6c5218;
  font-size: var(--fs-12);
  font-weight: 800;
}
.pbx-mlb-lines {
  --mlb-team-col: 48px;
  --mlb-total-col: 33px;
  --mlb-inning-col-min: 24px;
  overflow-x: auto;
}
.pbx-mlb-lines__row {
  display: grid;
  grid-template-columns:
    var(--mlb-team-col)
    repeat(9, minmax(var(--mlb-inning-col-min), 1fr))
    repeat(3, var(--mlb-total-col));
  min-width: 100%;
  border-bottom: 1px solid #dfe4e5;
}
.pbx-mlb-lines__row:last-child {
  border-bottom: 0;
}
.pbx-mlb-lines__row > * {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 25px;
  border-left: 1px solid #dfe4e5;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  box-sizing: border-box;
}
.pbx-mlb-lines__row > *:first-child {
  justify-items: start;
  border-left: 0;
  padding: 0 5px 0 9px;
  overflow: hidden;
  background: #f6f8f6;
  font-family: var(--font-sans);
  font-weight: 800;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pbx-mlb-lines__row--head > * {
  min-height: 24px;
  background: #f1f3f1;
  color: #263132;
  font-weight: 800;
}
.pbx-mlb-lines__row b {
  background: #fbfaf4;
  font-weight: 900;
}
.pbx-mlb-card__foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 7px 9px;
  border-top: 1px solid #cfd5d6;
  background: #f8f7f0;
  font-size: var(--fs-12);
}
.pbx-mlb-card__foot span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #667174;
}
.pbx-mlb-card__foot span:last-child {
  text-align: right;
}
.pbx-mlb-card__foot strong {
  color: #182021;
  font-family: var(--font-mono);
}
.pbx-mlb-card__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  padding: 8px 9px;
  border-top: 1px solid #d8ddde;
  background: #f8f7f0;
}
.pbx-mlb-card__actions .btn {
  min-height: 30px;
  padding: 0 10px;
}
.pbx-mlb-card.is-selected .pbx-mlb-card__actions .btn--primary {
  background: #0875d1;
  border-color: #0875d1;
}
.pbx-desk-calendar {
  position: relative;
  isolation: isolate;
  align-self: end;
  min-width: 0;
  min-height: 374px;
  padding: 44px 24px 14px;
  overflow: visible;
  border: 1px solid #dfe4ea;
  border-radius: 6px 6px 10px 10px;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0.82), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #fbfcfd 72%, #f3f5f7 100%);
  box-shadow:
    0 8px 0 #d8dde3,
    0 26px 34px rgba(57, 65, 61, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  transform: none;
  transform-origin: center bottom;
}
.pbx-desk-calendar::before {
  content: none;
}
.pbx-desk-calendar::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -14px;
  z-index: -1;
  height: 18px;
  border: 1px solid rgba(94, 63, 28, 0.14);
  border-radius: 0 0 10px 10px;
  background:
    linear-gradient(180deg, #d4dae1, #b8c0ca);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 16px 22px rgba(57, 65, 61, 0.14);
}
.pbx-desk-calendar > * {
  position: relative;
  z-index: 2;
}
.pbx-desk-calendar__head {
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "year month tools";
  align-items: center;
  column-gap: 8px;
  margin: 0 0 8px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  text-align: center;
}
.pbx-desk-calendar__head::before {
  content: none;
}
.pbx-desk-calendar__month {
  grid-area: month;
  justify-self: center;
  min-width: 0;
  padding-top: 0;
}
.pbx-desk-calendar__head .eyebrow {
  display: none;
}
.pbx-calendar-month-control {
  display: inline-grid;
  grid-template-columns: 28px auto 28px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
}
.pbx-desk-calendar__head h2 {
  margin: 0;
  color: #2f302c;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 2.16rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 0.9;
}
.pbx-calendar-month-control button {
  appearance: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(47, 48, 44, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #252722;
  cursor: pointer;
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 2px 4px rgba(57, 65, 61, 0.08);
}
.pbx-calendar-month-control button:hover {
  border-color: rgba(47, 48, 44, 0.38);
  background: #fff;
}
.pbx-desk-calendar__caption {
  margin: 8px 0 0;
  color: #696258;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.pbx-desk-calendar__foot {
  display: flex;
  margin-top: 10px;
}
.pbx-desk-calendar__foot .pbx-calendar-yearview {
  width: 100%;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
}
.pbx-desk-calendar__tools {
  grid-area: tools;
  justify-self: end;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pbx-desk-calendar__year {
  grid-area: year;
  justify-self: start;
  position: relative;
  z-index: 60;
}
.pbx-desk-calendar__year-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  min-width: 72px;
  padding: 0 10px;
  border: 1px solid rgba(47, 48, 44, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #2c322f;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(57, 65, 61, 0.08);
}
.pbx-desk-calendar__year-btn:hover,
.pbx-desk-calendar__year-btn[aria-expanded="true"] {
  border-color: rgba(47, 48, 44, 0.38);
  background: #fff;
}
.pbx-desk-calendar__year-btn:focus-visible {
  outline: 2px solid rgba(8, 117, 209, 0.42);
  outline-offset: 3px;
}
.pbx-desk-calendar__year-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 90;
  width: 92px;
  max-height: 168px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid rgba(47, 48, 44, 0.16);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(31, 36, 33, 0.14);
}
.pbx-desk-calendar__year-option {
  appearance: none;
  display: block;
  width: 100%;
  min-height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #2c322f;
  cursor: pointer;
  font: inherit;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: left;
}
.pbx-desk-calendar__year-option:hover,
.pbx-desk-calendar__year-option.is-active {
  background: rgba(8, 117, 209, 0.10);
  color: #0875d1;
}
.pbx-calendar-today,
.pbx-calendar-yearview {
  appearance: none;
  height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(47, 48, 44, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #2c322f;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 2px 4px rgba(57, 65, 61, 0.08);
}
.pbx-calendar-today:hover,
.pbx-calendar-yearview:hover,
.pbx-calendar-yearview[aria-expanded="true"] {
  border-color: rgba(8, 117, 209, 0.42);
  background: rgba(8, 117, 209, 0.08);
  color: var(--accent);
}
.pbx-year-modal[hidden] {
  display: none !important;
}
.pbx-year-modal {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  padding: 22px;
}
.pbx-year-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 22, 20, 0.48);
  backdrop-filter: blur(5px);
}
.pbx-year-modal__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(1180px, calc(100vw - 28px));
  height: min(90vh, 900px);
  overflow: hidden;
  padding: 16px 20px 18px;
  border: 1px solid rgba(47, 48, 44, 0.18);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 248, 243, 0.98));
  box-shadow: 0 28px 68px rgba(13, 20, 18, 0.30);
}
.pbx-year-modal__head {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(47, 48, 44, 0.12);
}
.pbx-year-modal__head .eyebrow,
.pbx-year-modal__head h2,
.pbx-year-modal__head p {
  margin: 0;
}
.pbx-year-modal__head h2 {
  color: var(--text);
  font-size: var(--fs-24);
  letter-spacing: 0;
}
.pbx-year-modal__head p:not(.eyebrow) {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: var(--fs-13);
  line-height: 1.35;
}
.pbx-year-modal__close {
  appearance: none;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(47, 48, 44, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #2f302c;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}
.pbx-year-modal__close:hover {
  border-color: rgba(8, 117, 209, 0.42);
  color: var(--accent);
}
.pbx-tour[hidden] {
  display: none !important;
}
.pbx-tour {
  position: fixed;
  inset: 0;
  z-index: 260;
  pointer-events: none;
}
.pbx-tour__shade {
  position: fixed;
  z-index: 0;
  background: rgba(13, 21, 20, 0.58);
  backdrop-filter: blur(3px);
  pointer-events: auto;
}
.pbx-tour__spotlight {
  position: fixed;
  z-index: 1;
  border: 2px solid #f2d15c;
  border-radius: 8px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.52),
    0 18px 46px rgba(13, 21, 20, 0.26);
  pointer-events: auto;
  transition: left 160ms ease, top 160ms ease, width 160ms ease, height 160ms ease;
}
.pbx-tour__card {
  position: fixed;
  z-index: 2;
  display: grid;
  gap: 14px;
  width: min(372px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  padding: 16px;
  border: 1px solid rgba(47, 48, 44, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 247, 0.98));
  box-shadow: 0 24px 64px rgba(13, 21, 20, 0.30);
  pointer-events: auto;
}
.pbx-tour__head,
.pbx-tour__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pbx-tour__head .eyebrow {
  margin: 0;
  color: var(--accent);
  letter-spacing: 0;
}
.pbx-tour__head span {
  display: block;
  margin-top: 3px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}
.pbx-tour__close {
  appearance: none;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(47, 48, 44, 0.18);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}
.pbx-tour__close:hover,
.pbx-tour__close:focus-visible {
  border-color: rgba(8, 117, 209, 0.42);
  color: var(--accent);
}
.pbx-tour__body {
  display: grid;
  gap: 10px;
}
.pbx-tour__body h2 {
  margin: 0;
  color: var(--text);
  font-size: var(--fs-22);
  line-height: 1.1;
  letter-spacing: 0;
}
.pbx-tour__body p {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-14);
  line-height: 1.45;
}
.pbx-tour__bullets {
  display: grid;
  gap: 8px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}
.pbx-tour__bullets li {
  position: relative;
  padding-left: 18px;
  color: var(--text-2);
  font-size: var(--fs-13);
  line-height: 1.35;
}
.pbx-tour__bullets li::before {
  content: "";
  position: absolute;
  top: 0.58em;
  left: 2px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
}
.pbx-tour__dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pbx-tour__dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(47, 48, 44, 0.22);
}
.pbx-tour__dots span.is-active {
  width: 22px;
  background: var(--accent);
}
.pbx-tour__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.pbx-tour__actions .btn[disabled] {
  opacity: 0.42;
  pointer-events: none;
}
.pbx-year-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 14px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pbx-mini-month {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  min-height: 0;
}
.pbx-mini-month__name {
  appearance: none;
  flex: 0 0 auto;
  align-self: flex-start;
  margin: 0;
  padding: 0 6px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
}
.pbx-mini-month.has-activity .pbx-mini-month__name {
  color: var(--accent);
}
.pbx-mini-month__name:hover {
  background: rgba(8, 117, 209, 0.10);
  color: var(--accent);
}
.pbx-mini-month__dows {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 1px;
}
.pbx-mini-month__grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: 1fr;
  gap: 2px;
}
.pbx-mini-month__dow {
  display: grid;
  place-items: center;
  height: 15px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.52rem;
  font-weight: 700;
  text-transform: uppercase;
}
.pbx-mini-month__day {
  appearance: none;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-2);
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 500;
  line-height: 1;
}
.pbx-mini-month__day.is-blank {
  visibility: hidden;
}
.pbx-mini-month__day.has-memories {
  cursor: pointer;
  font-weight: 700;
  color: #6f4a12;
  background: #f8e4b4;
}
.pbx-mini-month__day.lvl-2 {
  color: #5d3a0b;
  background: #f1c879;
}
.pbx-mini-month__day.lvl-3 {
  color: #fff;
  background: #df9a39;
}
.pbx-mini-month__day.has-memories:hover {
  box-shadow: inset 0 0 0 2px rgba(47, 48, 44, 0.28);
}
.pbx-mini-month__day.is-today {
  box-shadow: inset 0 0 0 1.5px rgba(8, 117, 209, 0.55);
}
.pbx-mini-month__day.is-selected {
  color: #fff;
  background: var(--accent);
}
.pbx-mini-month__day.is-selected.is-today {
  box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3.5px var(--accent);
}
@media (max-width: 780px) {
  .pbx-year-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .pbx-year-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(6, minmax(0, 1fr));
  }
}
.pbx-year-empty {
  grid-column: 1 / -1;
  display: grid;
  min-height: 150px;
  place-items: center;
  border: 1px dashed rgba(47, 48, 44, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--text-muted);
  font-size: var(--fs-14);
  font-weight: 700;
}
.pbx-calendar {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: 28px repeat(6, minmax(37px, 1fr));
  gap: 0;
  min-height: 250px;
  padding: 0;
  border: 1px solid rgba(47, 48, 44, 0.30);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.68);
}
.pbx-calendar::after {
  content: none;
  pointer-events: none;
}
.pbx-calendar__dow {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  border-right: 1px solid rgba(47, 48, 44, 0.22);
  border-bottom: 1px solid rgba(47, 48, 44, 0.30);
  color: #2f3633;
  font-family: var(--font-sans);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
}
.pbx-calendar__dow:nth-child(7) {
  border-right: 0;
}
.pbx-calendar__day {
  appearance: none;
  position: relative;
  display: grid;
  align-content: space-between;
  min-width: 0;
  min-height: 0;
  padding: 4px 6px 5px;
  border: 0;
  border-right: 1px solid rgba(47, 48, 44, 0.22);
  border-bottom: 1px solid rgba(47, 48, 44, 0.22);
  border-radius: 0;
  background: transparent;
  color: #2f302c;
  cursor: pointer;
  font: inherit;
  text-align: left;
  opacity: 1;
}
.pbx-calendar__day span {
  justify-self: end;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
}
.pbx-calendar__day:nth-child(7n) {
  border-right: 0;
}
.pbx-calendar__day:nth-last-child(-n + 7) {
  border-bottom: 0;
}
.pbx-calendar__day em {
  justify-self: end;
  min-width: 15px;
  height: 15px;
  border-radius: 999px;
  background: transparent;
  color: transparent;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  line-height: 15px;
  text-align: center;
}
.pbx-calendar__day.is-muted {
  color: rgba(47, 48, 44, 0.38);
  background: rgba(255, 255, 255, 0.10);
}
.pbx-calendar__day.is-today {
  box-shadow: inset 0 0 0 2px rgba(8, 117, 209, 0.22);
}
.pbx-calendar__day.has-events {
  background: transparent;
}
.pbx-calendar__day.has-memories {
  background: rgba(8, 117, 209, 0.035);
}
.pbx-calendar__day:hover {
  background: rgba(8, 117, 209, 0.08);
  box-shadow: inset 0 0 0 2px rgba(8, 117, 209, 0.18);
}
.pbx-calendar__day:disabled {
  cursor: default;
}
.pbx-calendar__day.has-events em {
  background: transparent;
  color: transparent;
}
.pbx-calendar__day.has-memories em {
  background: var(--accent);
  color: #fff;
}
.pbx-calendar__day.is-selected {
  background: rgba(8, 117, 209, 0.14);
  color: #0f2030;
  box-shadow: inset 0 0 0 2px rgba(8, 117, 209, 0.58);
}
.pbx-calendar__day.is-selected em {
  background: var(--accent);
  color: #fff;
}
.pbx-calendar__day.is-selected.is-today {
  box-shadow:
    inset 0 0 0 2px rgba(8, 117, 209, 0.58),
    inset 0 0 0 4px rgba(255, 255, 255, 0.42);
}

@media (max-width: 1080px) {
  .pbx-workbench {
    grid-template-columns: 1fr;
    grid-template-areas:
      "ledger"
      "schedule";
  }
  .pbx-follow-bar__edit {
    grid-template-columns: 1fr;
  }
  .pbx-follow-bar__edit .pbx-panel__links {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .pressbox-page {
    width: min(100% - 24px, 720px);
    padding-top: 22px;
  }
  .pbx-hero {
    grid-template-columns: 1fr;
    align-items: stretch;
    min-height: 0;
    padding: 20px;
  }
  .pbx-hero__actions {
    justify-content: flex-start;
  }
  .pbx-tour.is-compact .pbx-tour__card {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-height: min(58vh, 430px);
  }
  .pbx-tour.is-compact .pbx-tour__foot {
    display: grid;
    gap: 12px;
    align-items: stretch;
    justify-content: stretch;
  }
  .pbx-tour.is-compact .pbx-tour__actions {
    width: 100%;
    justify-self: stretch;
    justify-content: stretch;
  }
  .pbx-tour.is-compact .pbx-tour__actions .btn {
    flex: 1 1 auto;
  }
  .pbx-follow-bar__head {
    align-items: flex-start;
    display: grid;
  }
  .pbx-follow-bar__actions {
    justify-content: flex-start;
  }
  .pbx-follow-bar__chips {
    grid-template-columns: 1fr;
  }
  .pbx-follow-group {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .pbx-follow-bar__edit {
    grid-template-columns: 1fr;
  }
  .pbx-follow-bar__edit .pbx-panel__links {
    grid-column: auto;
  }
  .pbx-ledger-grid.hist-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-bottom: 24px;
  }
  .pbx-ledger-grid.hist-grid.is-recommendations.has-upload-wheel,
  .pbx-ledger-grid.hist-grid.is-recommendations.has-single-recommendation.has-upload-wheel {
    width: min(100%, 680px);
    margin-left: auto;
    margin-right: auto;
  }
  .pbx-shelf-stage {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 18px;
  }
  .pbx-desk-calendar {
    transform: none;
  }
  .pbx-ledger-grid.hist-grid.is-date-memory-view {
    padding-left: 0;
  }
  .pbx-empty.hist-empty.is-date-memory-empty {
    margin-left: auto;
    margin-right: auto;
  }
  .pbx-shelf-stage.is-date-memory-empty-stage .pbx-upload-wheel {
    left: auto;
    right: 8px;
  }
  .pbx-ledger-grid.is-date-memory-view .shelf-card .hist-card__link {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .pbx-ledger-grid.is-date-memory-view .shelf-card__thumb {
    margin: 10px 10px 0 20px;
    aspect-ratio: 5 / 3.12;
  }
  .pbx-ledger-grid.is-date-memory-view .shelf-card__body {
    padding: 12px 12px 14px 20px;
  }
  .pbx-ledger-grid.is-date-memory-view .shelf-card__matchup {
    font-size: clamp(1.45rem, 7vw, 2.1rem);
  }
  .pbx-ledger-grid.has-binder-stack .shelf-card .hist-card__link {
    margin-left: 0;
  }
  .shelf-card .hist-card__link {
    transform: none;
  }
  .shelf-card:hover .hist-card__link {
    transform: translateY(-2px);
  }
  .pbx-ledger-grid .shelf-card__thumb {
    margin: 10px 10px 0 20px;
  }
  .pbx-ledger-grid .shelf-card__body {
    min-height: 0;
    padding: 12px 12px 14px 20px;
  }
  .pbx-scan-strip {
    align-items: stretch;
    flex-direction: column;
  }
  .pbx-scan-strip__actions {
    justify-items: start;
  }
  .pbx-upload-action-row {
    justify-content: flex-start;
  }
  .pbx-scan-strip__actions span {
    text-align: left;
  }
  .pbx-panel {
    padding: 14px;
  }
  .pbx-panel__head {
    display: grid;
  }
  .pbx-ledger__actions {
    justify-content: flex-start;
  }
  .pbx-photo-gallery__head {
    display: grid;
  }
  .pbx-photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
  }
  .pbx-gallery-hero,
  .pbx-gallery-toolbar {
    display: grid;
  }
  .pbx-gallery-hero__actions,
  .pbx-gallery-layout,
  .pbx-gallery-toolbar__meta {
    justify-content: flex-start;
  }
  .pbx-photo-grid--page {
    grid-template-columns: 1fr;
  }
  .pbx-photo-detail {
    grid-template-columns: 1fr;
  }
  .pbx-photo-detail__media img {
    max-height: none;
  }
  .pbx-memory-cover {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .pbx-memory-cover__media.pbx-photo-detail__media {
    min-height: 280px;
  }
  .pbx-memory-cover__copy {
    padding: 20px;
  }
  .pbx-memory-artifacts,
  .pbx-memory-grid {
    grid-template-columns: 1fr;
  }
  .pbx-memory-card__head {
    display: grid;
  }
  .pbx-memory-photo-roll {
    grid-template-columns: 1fr;
  }
  .pbx-segmented {
    width: 100%;
  }
  .pbx-segmented button {
    flex: 1;
  }
  .pbx-game-row > a,
  .pbx-game-row > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .pbx-game-row__status {
    justify-items: start;
    text-align: left;
  }
  .pbx-pick-wrap,
  .pbx-editor {
    grid-template-columns: 1fr;
  }
  .pbx-open-link,
  .pbx-remove {
    min-height: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pbx-tour__spotlight {
    transition: none;
  }
}

.mlb-game-page {
  width: min(100% - 32px, 1220px);
  margin: 0 auto;
  padding: 28px 0 56px;
}
.mlb-game-back {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-bottom: 12px;
  color: var(--text-muted);
  font-weight: 800;
  text-decoration: none;
}
.mlb-game-back:hover {
  color: var(--text);
  text-decoration: none;
}
.mlb-game-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 1.15fr) minmax(0, 1fr);
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: var(--shadow-sm);
}
.mlb-game-hero__team {
  display: grid;
  grid-template-rows: 76px auto auto auto;
  justify-items: center;
  align-content: center;
  gap: 6px;
  min-width: 0;
  padding: 22px 16px;
}
.mlb-game-hero__team img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}
.mlb-game-hero__team p {
  margin: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
}
.mlb-game-hero__team h1 {
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(1.15rem, 2vw, 1.8rem);
}
.mlb-game-hero__team strong {
  color: #17201f;
  font-family: var(--font-mono);
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 0.95;
}
.mlb-game-hero__center {
  display: grid;
  place-items: center;
  gap: 8px;
  min-width: 0;
  padding: 24px 18px;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: #f4f7f5;
  text-align: center;
}
.mlb-game-hero__center h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 2rem);
}
.mlb-game-hero__center p:not(.eyebrow) {
  margin: 0;
  color: var(--text-muted);
}
.mlb-game-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid #b9c0c2;
  border-radius: 999px;
  background: #fff;
  color: #1e2526;
  font-size: var(--fs-12);
  font-weight: 900;
  text-transform: uppercase;
}
.mlb-game-pill.is-live {
  border-color: #248653;
  background: #eaf6ee;
  color: #17633b;
}
.mlb-game-pill.is-final {
  border-color: #262b2c;
  background: #262b2c;
  color: #fff;
}
.mlb-game-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 16px;
  margin-top: 16px;
}
.mlb-game-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.mlb-game-panel--wide {
  grid-column: 1 / -1;
}
.mlb-game-panel__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.mlb-game-panel__head h2 {
  margin: 0;
  font-size: var(--fs-20);
}
.mlb-game-lines {
  overflow-x: auto;
  border: 1px solid #cfd5d6;
  border-radius: 8px;
  background: #fffdf8;
}
.mlb-game-lines__row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(34px, 1fr);
  border-bottom: 1px solid #dfe4e5;
}
.mlb-game-lines__row:last-child {
  border-bottom: 0;
}
.mlb-game-lines__row > * {
  display: grid;
  place-items: center;
  min-height: 38px;
  border-left: 1px solid #dfe4e5;
  font-family: var(--font-mono);
}
.mlb-game-lines__row > *:first-child {
  min-width: 64px;
  border-left: 0;
  background: #f4f7f5;
  font-family: var(--font-sans);
  font-weight: 900;
}
.mlb-game-lines__row--head > * {
  min-height: 34px;
  background: #edf2ee;
  font-weight: 900;
}
.mlb-game-lines__row b {
  background: #fbfaf4;
}
.mlb-scorecard {
  overflow-x: auto;
}
.mlb-scorecard__sheet {
  min-width: 980px;
  padding: 14px;
  border: 1px solid #c8bfa7;
  border-radius: 8px;
  background:
    linear-gradient(rgba(30, 45, 50, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 45, 50, 0.055) 1px, transparent 1px),
    #fffaf0;
  background-size: 22px 22px;
}
.mlb-scorecard__title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid #2c3839;
}
.mlb-scorecard__title div {
  display: grid;
  gap: 2px;
}
.mlb-scorecard__title span,
.mlb-scorecard__title em {
  color: #6c6558;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-style: normal;
  text-transform: uppercase;
}
.mlb-scorecard__title strong {
  color: #182021;
  font-size: var(--fs-20);
}
.mlb-scorecard__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.mlb-scorecard__legend span {
  padding: 3px 7px;
  border: 1px solid #d7cba9;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #756a52;
  font-size: var(--fs-12);
  font-weight: 800;
}
.mlb-scorecard-team {
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid #2f3d3e;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.76);
}
.mlb-scorecard-team__head {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 72px;
  align-items: center;
  min-height: 34px;
  border-bottom: 1px solid #2f3d3e;
  background: #edf2ee;
}
.mlb-scorecard-team__head > * {
  min-width: 0;
  padding: 7px 9px;
  border-left: 1px solid #2f3d3e;
}
.mlb-scorecard-team__head > *:first-child {
  border-left: 0;
}
.mlb-scorecard-team__head span,
.mlb-scorecard-team__head em {
  color: #435053;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}
.mlb-scorecard-team__head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mlb-scorecard-table {
  min-width: calc(34px + 190px + 44px + (var(--scorecard-cols) * 82px) + 156px);
}
.mlb-scorecard-row {
  display: grid;
  grid-template-columns: 34px minmax(150px, 190px) 44px repeat(var(--scorecard-cols), minmax(82px, 1fr)) 40px 36px 36px 44px;
}
.mlb-scorecard-row > span {
  display: grid;
  align-items: center;
  min-width: 0;
  min-height: 48px;
  padding: 5px 6px;
  border-right: 1px solid #ccd4d1;
  border-bottom: 1px solid #ccd4d1;
  background: rgba(255, 255, 255, 0.54);
  font-size: var(--fs-12);
}
.mlb-scorecard-row > span:last-child {
  border-right: 0;
}
.mlb-scorecard-row--head > span {
  min-height: 30px;
  background: #f4f7f5;
  color: #2f3d3e;
  font-family: var(--font-mono);
  font-weight: 900;
  justify-items: center;
  text-transform: uppercase;
}
.mlb-scorecard-order,
.mlb-scorecard-pos,
.mlb-scorecard-row > span:nth-last-child(-n + 4) {
  justify-items: center;
  font-family: var(--font-mono);
  font-weight: 900;
}
.mlb-scorecard-player {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}
.mlb-scorecard-box {
  position: relative;
  align-content: start;
  gap: 3px;
  min-height: 58px !important;
  background:
    linear-gradient(135deg, transparent calc(50% - 0.5px), rgba(47, 61, 62, 0.14) 50%, transparent calc(50% + 0.5px)),
    rgba(255, 255, 255, 0.58) !important;
}
.mlb-scorecard-pa {
  position: relative;
  z-index: 1;
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 3px;
  min-width: 0;
  min-height: 34px;
  padding: 4px 5px;
  border: 1px solid rgba(47, 61, 62, 0.36);
  border-radius: 4px;
  background: #fffaf0;
  text-align: center;
}
.mlb-scorecard-pa b {
  display: block;
  overflow: hidden;
  color: #17201f;
  font-family: var(--font-mono);
  font-size: 1.02rem;
  font-weight: 950;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mlb-scorecard-pa em {
  overflow: hidden;
  color: #657072;
  font-size: 0.62rem;
  font-style: normal;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mlb-scorecard-pa.is-run {
  border-color: #2a8f5f;
  background: #eaf6ee;
}
.mlb-scorecard-pa.is-out {
  background: #eef1f1;
}
.mlb-scorecard-pitching {
  border-top: 2px solid #2f3d3e;
  background: rgba(244, 247, 245, 0.72);
}
.mlb-scorecard-pitching header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 30px;
  padding: 6px 9px;
  border-bottom: 1px solid #ccd4d1;
  background: #f7f4e9;
}
.mlb-scorecard-pitching header span {
  color: #2f3d3e;
  font-weight: 900;
}
.mlb-scorecard-pitching header em {
  color: #6f766f;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}
.mlb-scorecard-pitch-table {
  min-width: 650px;
}
.mlb-scorecard-pitch-row {
  display: grid;
  grid-template-columns: 34px minmax(180px, 1fr) repeat(8, 54px);
}
.mlb-scorecard-pitch-row > span {
  display: grid;
  align-items: center;
  min-height: 34px;
  min-width: 0;
  padding: 5px 6px;
  border-right: 1px solid #ccd4d1;
  border-bottom: 1px solid #ccd4d1;
  background: rgba(255, 255, 255, 0.56);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 900;
  justify-items: center;
}
.mlb-scorecard-pitch-row > span:nth-child(2) {
  overflow: hidden;
  justify-items: start;
  font-family: var(--font-sans);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mlb-scorecard-pitch-row > span:last-child {
  border-right: 0;
}
.mlb-scorecard-pitch-row--head > span {
  min-height: 28px;
  background: #edf2ee;
  color: #2f3d3e;
  text-transform: uppercase;
}
.mlb-scorecard__empty {
  padding: 26px;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  color: var(--text-muted);
  text-align: center;
}
.mlb-state-grid {
  display: grid;
  gap: 8px;
}
.mlb-state-grid span {
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}
.mlb-state-grid em {
  color: var(--text-muted);
  font-size: var(--fs-12);
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}
.mlb-state-grid strong {
  overflow-wrap: anywhere;
}
.mlb-play-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mlb-play-list li {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}
.mlb-play-list li.is-scoring {
  border-color: #2a8f5f;
  background: #eef8f1;
}
.mlb-play-list__inning {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  text-transform: uppercase;
}
.mlb-play-list strong,
.mlb-play-list p,
.mlb-play-list em {
  margin: 0;
}
.mlb-play-list p {
  color: var(--text);
  line-height: 1.35;
}
.mlb-play-list em {
  color: var(--text-muted);
  font-size: var(--fs-12);
  font-style: normal;
}
.mlb-play-list--compact {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.mlb-abs-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, auto);
  gap: 12px;
  margin-bottom: 12px;
}
.mlb-abs-totals,
.mlb-abs-teams {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mlb-abs-totals span,
.mlb-abs-team-chip {
  display: grid;
  gap: 2px;
  min-width: 84px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}
.mlb-abs-totals em,
.mlb-abs-team-chip em,
.mlb-abs-team-chip small {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}
.mlb-abs-totals strong,
.mlb-abs-team-chip strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--fs-18);
  line-height: 1;
}
.mlb-abs-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mlb-abs-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fffdf8;
}
.mlb-abs-card.is-success {
  border-color: #2a8f5f;
  background: #f2fbf5;
}
.mlb-abs-card.is-fail {
  border-color: #b96a57;
  background: #fff7f3;
}
.mlb-abs-card__body {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
}
.mlb-abs-card__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.mlb-abs-card__topline span {
  overflow: hidden;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.mlb-abs-card__topline b {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: #2d5d77;
  font-size: var(--fs-12);
  line-height: 1;
  text-transform: uppercase;
}
.mlb-abs-card.is-success .mlb-abs-card__topline b {
  color: #17633b;
}
.mlb-abs-card.is-fail .mlb-abs-card__topline b {
  color: #914432;
}
.mlb-abs-card h3,
.mlb-abs-card p,
.mlb-abs-card em {
  min-width: 0;
  margin: 0;
}
.mlb-abs-card h3 {
  overflow: hidden;
  color: var(--text);
  font-size: var(--fs-18);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mlb-abs-card p {
  color: var(--text);
  font-weight: 900;
}
.mlb-abs-card em {
  overflow-wrap: anywhere;
  color: var(--text-muted);
  font-size: var(--fs-12);
  font-style: normal;
  line-height: 1.35;
}
.mlb-abs-card__coords {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}
.mlb-abs-card__coords span {
  padding: 3px 6px;
  border: 1px solid rgba(37, 45, 46, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 900;
}
.mlb-abs-zone {
  position: relative;
  width: 112px;
  aspect-ratio: 0.82;
  overflow: hidden;
  border: 1px solid #9da8aa;
  border-radius: 7px;
  background:
    linear-gradient(rgba(24, 32, 33, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 32, 33, 0.07) 1px, transparent 1px),
    #f8faf7;
  background-size: 18px 18px;
}
.mlb-abs-zone__box {
  position: absolute;
  left: var(--zone-left);
  top: var(--zone-top);
  width: var(--zone-width);
  height: var(--zone-height);
  border: 2px solid #182426;
  background: rgba(255, 255, 255, 0.44);
}
.mlb-abs-zone__midline {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(24, 32, 33, 0.18);
}
.mlb-abs-zone__pitch {
  position: absolute;
  left: var(--pitch-left);
  top: var(--pitch-top);
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #2e6f95;
  box-shadow: 0 0 0 1px rgba(24, 32, 33, 0.48);
  transform: translate(-50%, -50%);
}
.mlb-abs-zone.is-empty {
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 900;
}
.mlb-abs-empty {
  padding: 14px;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  color: var(--text-muted);
}
.mlb-abs-empty strong,
.mlb-abs-empty p {
  margin: 0;
}
.mlb-abs-empty p {
  margin-top: 4px;
}
.mlb-box-tabs {
  display: inline-flex;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.mlb-box-tabs button {
  appearance: none;
  min-height: 34px;
  padding: 6px 14px;
  border: 0;
  border-left: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 800;
}
.mlb-box-tabs button:first-child {
  border-left: 0;
}
.mlb-box-tabs button.is-active {
  background: var(--surface);
  color: var(--text);
}
.mlb-box-title {
  margin: 0 0 10px;
  font-size: var(--fs-18);
}
.mlb-box-scroll {
  display: grid;
  gap: 16px;
  overflow-x: auto;
}
.mlb-box-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: var(--fs-13);
}
.mlb-box-table th,
.mlb-box-table td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--border);
  text-align: right;
}
.mlb-box-table th:first-child {
  text-align: left;
}
.mlb-box-table thead th {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  text-transform: uppercase;
}
.mlb-box-table tbody th {
  min-width: 220px;
}
.mlb-box-table tbody th span,
.mlb-box-table tbody th em {
  display: inline-block;
  vertical-align: middle;
}
.mlb-box-table tbody th em {
  margin-left: 6px;
  color: var(--text-muted);
  font-size: var(--fs-12);
  font-style: normal;
}
@media (max-width: 820px) {
  .mlb-game-page {
    width: min(100% - 24px, 720px);
    padding-top: 22px;
  }
  .mlb-game-hero,
  .mlb-game-grid {
    grid-template-columns: 1fr;
  }
  .mlb-game-hero__center {
    order: -1;
    border: 0;
    border-bottom: 1px solid var(--border);
  }
  .mlb-game-panel--wide {
    grid-column: auto;
  }
  .mlb-abs-summary,
  .mlb-abs-card {
    grid-template-columns: 1fr;
  }
  .mlb-abs-zone {
    width: min(140px, 100%);
  }
  .mlb-scorecard__sheet {
    min-width: 860px;
  }
}

/* ── Game panel (results page) ── */
.game-panel { margin: 0 0 18px; padding: 20px 22px; }
.game-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.game-panel__head h2 { margin: 2px 0 4px; font-size: var(--fs-20); }
.game-panel__sub { margin: 0; color: var(--text-muted); font-size: var(--fs-14); }
.game-panel__score { text-align: right; }
.game-panel__pct { display: block; font-size: 2rem; font-weight: 800; line-height: 1; }
.game-panel__pct.is-good { color: #2f7d32; }
.game-panel__pct.is-mid  { color: var(--accent); }
.game-panel__pct.is-low  { color: #b97c0a; }
.game-panel__pct-label {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-faint);
}

.game-panel__form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
  margin-top: 16px;
}
.game-panel__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: var(--fs-12);
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}
.game-panel__field input,
.game-panel__field select {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-14);
  padding: 8px 10px;
  min-width: 150px;
}

.game-panel__candidates {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.game-candidate {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: var(--fs-14);
  text-align: left;
}
.game-candidate:hover { border-color: var(--accent); }
.game-candidate__matchup { font-weight: 700; color: var(--text); }
.game-candidate__status { color: var(--text-muted); font-size: var(--fs-13); }
.game-candidate__cta { margin-left: auto; color: var(--accent); font-weight: 600; }

.game-panel__grade { margin-top: 14px; }
.game-panel__verdicts { display: flex; flex-wrap: wrap; gap: 8px; }
.gd-chip {
  border-radius: 8px;
  padding: 4px 10px;
  font-size: var(--fs-13);
  font-weight: 600;
}
.gd-chip--match  { background: rgba(47, 125, 50, 0.12);  color: #2f7d32; }
.gd-chip--wrong  { background: rgba(232, 156, 36, 0.18); color: #b97c0a; }
.gd-chip--missed { background: var(--accent-soft);        color: var(--accent); }
.gd-chip--extra  { background: rgba(120, 120, 120, 0.10); color: var(--text-muted); }
.game-panel__actions { display: flex; gap: 10px; margin-top: 12px; }
.game-panel__legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  font-size: var(--fs-13);
  color: var(--text-muted);
}
.gd-key {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
  margin-left: 10px;
}
.gd-key:first-child { margin-left: 0; }
.gd-key--match  { background: rgba(47, 125, 50, 0.25);  border: 1px solid #2f7d32; }
.gd-key--wrong  { background: rgba(232, 156, 36, 0.30); border: 1px solid #b97c0a; }
.gd-key--missed { background: var(--accent-soft);        border: 1px solid var(--accent); }

.game-panel__msg { margin: 12px 0 0; font-size: var(--fs-14); color: var(--text-muted); }
.game-panel__msg.is-error { color: #b00020; }

/* ── grading overlay on the play grid ── */
.dcell.gd--match  { outline: 2px solid rgba(47, 125, 50, 0.85);  outline-offset: -2px; }
.dcell.gd--wrong  { outline: 2px solid rgba(185, 124, 10, 0.95); outline-offset: -2px; position: relative; }
.dcell.gd--missed { outline: 2px dashed rgba(8, 117, 209, 0.85); outline-offset: -2px; position: relative; }
.dcell.gd--extra  { outline: 2px dotted rgba(120, 120, 120, 0.8); outline-offset: -2px; }
.dcell__truth {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.62rem;
  font-weight: 800;
  color: #b97c0a;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 4px;
  padding: 0 4px;
  pointer-events: none;
  white-space: nowrap;
}
.dcell.gd--missed .dcell__truth { color: var(--accent); }

/* ── clips ── */
.game-panel__clips { margin-top: 18px; border-top: 1px solid var(--divider); padding-top: 14px; }
.game-panel__clips-head { display: flex; align-items: center; gap: 12px; }
.game-panel__clips-head h3 { margin: 0; font-size: var(--fs-14); }
.game-panel__clips-head h3 span { color: var(--text-faint); font-weight: 500; }
.game-panel__clip-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.game-clip {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: var(--fs-14);
}
.game-clip__link { color: var(--text); font-weight: 600; text-decoration: none; }
.game-clip__link:hover { color: var(--accent); }
.game-clip__link.is-pending { color: var(--text-muted); }
.game-clip__meta { color: var(--text-faint); font-size: var(--fs-13); }
.game-clip__delete {
  margin-left: auto;
  appearance: none;
  border: none;
  background: none;
  color: var(--text-faint);
  cursor: pointer;
  font-size: var(--fs-14);
}
.game-clip__delete:hover { color: #b00020; }
.game-panel__clips-hint { margin: 10px 0 0; color: var(--text-muted); font-size: var(--fs-13); }

/* ── Dashboard (post-login hub) ── */
.dash-paths {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin: 0 0 28px;
}
.dash-paths__stage,
.dash-paths__track { display: contents; }
.dash-card-nav {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 70px;
  border: 1px solid rgba(40, 50, 36, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  color: #273324;
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}
.dash-card-nav:hover {
  border-color: rgba(40, 50, 36, 0.3);
  background: #fff;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.16);
  transform: translateY(-1px);
}
.dash-card-nav:disabled,
.dash-card-nav.is-locked {
  opacity: 0.32;
  cursor: default;
  box-shadow: none;
}
.dash-card-nav.is-locked {
  cursor: not-allowed;
}
.dash-card-nav:disabled:hover,
.dash-card-nav.is-locked:hover {
  border-color: rgba(40, 50, 36, 0.18);
  background: rgba(255, 255, 255, 0.84);
  transform: none;
}
.dash-card-nav:focus-visible {
  outline: 3px solid rgba(8, 117, 209, 0.35);
  outline-offset: 3px;
}
.dash-card-nav span {
  display: block;
  margin-top: -2px;
  font-size: 2.25rem;
  line-height: 1;
}
.dash-paths--single,
.dash-paths--presspass {
  grid-template-columns: minmax(0, 692px);
  justify-content: center;
}
.dash-paths--carousel {
  position: relative;
  display: block;
  width: 100%;
  max-width: min(1440px, calc(100vw - 32px));
  margin-inline: auto;
  --dash-card-width: min(1240px, calc(100vw - 128px));
  --dash-card-gap: clamp(18px, 2.4vw, 34px);
}
.dash-paths--carousel .dash-card-nav {
  display: inline-flex;
  position: absolute;
  top: 50%;
  z-index: 4;
  transform: translateY(-50%);
}
.dash-paths--carousel .dash-card-nav:hover {
  transform: translateY(calc(-50% - 1px));
}
.dash-paths--carousel .dash-card-nav:disabled:hover,
.dash-paths--carousel .dash-card-nav.is-locked:hover {
  transform: translateY(-50%);
}
.dash-paths--carousel .dash-card-nav--prev {
  left: 0;
}
.dash-paths--carousel .dash-card-nav--next {
  right: 0;
}
.dash-paths__lock-note {
  position: absolute;
  top: 50%;
  right: 58px;
  z-index: 5;
  display: grid;
  width: min(238px, calc(100vw - 96px));
  gap: 3px;
  padding: 10px 12px 11px;
  border: 1px solid rgba(31, 41, 55, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: #17211b;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(calc(-50% + 4px));
  visibility: hidden;
  transition: opacity .12s ease, transform .12s ease, visibility .12s ease;
}
.dash-card-nav--prev.is-locked:hover ~ .dash-paths__lock-note,
.dash-card-nav--prev.is-locked:focus-visible ~ .dash-paths__lock-note {
  left: 58px;
  right: auto;
}
.dash-card-nav--next.is-locked:hover ~ .dash-paths__lock-note,
.dash-card-nav--next.is-locked:focus-visible ~ .dash-paths__lock-note,
.dash-paths__lock-note.is-tooltip-visible {
  left: auto;
  right: 58px;
}
.dash-card-nav.is-locked:hover ~ .dash-paths__lock-note,
.dash-card-nav.is-locked:focus-visible ~ .dash-paths__lock-note,
.dash-paths__lock-note.is-tooltip-visible {
  opacity: 1;
  transform: translateY(-50%);
  visibility: visible;
}
.dash-paths__lock-note strong {
  font-size: var(--fs-13);
  font-weight: 800;
  line-height: 1.2;
}
.dash-paths__lock-note span {
  font-size: var(--fs-12);
  line-height: 1.35;
  color: var(--text-muted);
}
.dash-paths__lock-note.is-lock-calledout {
  animation: dash-lock-callout 520ms ease;
}
.dash-paths--carousel .dash-paths__stage {
  display: block;
  overflow-x: auto;
  overflow-y: visible;
  padding: 2px 0 10px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.dash-paths--carousel .dash-paths__stage::-webkit-scrollbar {
  display: none;
}
.dash-paths--carousel .dash-paths__track {
  display: flex;
  align-items: stretch;
  gap: var(--dash-card-gap);
  width: max-content;
  min-width: 100%;
  padding-inline: max(42px, calc((100vw - var(--dash-card-width)) / 2));
}
.dash-paths--carousel #dashBallclub {
  order: 1;
}
.dash-paths--carousel #dashPressbox {
  order: 2;
}
.dash-paths--carousel.dash-paths--pressbox-locked #dashPressbox {
  order: 1;
}
.dash-paths--carousel.dash-paths--pressbox-locked #dashBallclub {
  order: 2;
}
.dash-paths--carousel .dash-path {
  flex: 0 0 var(--dash-card-width);
  width: var(--dash-card-width);
  min-height: 410px;
  scroll-snap-align: center;
  transform-origin: center;
  transition:
    opacity .26s ease,
    filter .26s ease,
    transform .32s cubic-bezier(.2, .8, .2, 1),
    box-shadow .18s ease,
    border-color .18s ease;
}
.dash-paths--carousel[data-active-card="clubhouse"] #dashBallclub,
.dash-paths--carousel[data-active-card="pressbox"] #dashPressbox {
  position: relative;
  z-index: 2;
  opacity: 1;
  filter: none;
  pointer-events: auto;
  transform: scale(1);
}
.dash-paths--carousel[data-active-card="clubhouse"] #dashPressbox {
  z-index: 1;
  opacity: 0.48;
  filter: saturate(0.72);
  transform: scale(0.94);
}
.dash-paths--carousel[data-active-card="pressbox"] #dashBallclub {
  z-index: 1;
  opacity: 0.48;
  filter: saturate(0.72);
  transform: scale(0.94);
}
.dash-path {
  position: relative;
  display: block;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 22px 24px;
  text-decoration: none;
  color: var(--text);
  transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}
.dash-path:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(16, 19, 24, 0.06);
  transform: translateY(-1px);
}
.dash-path.is-locked {
  cursor: not-allowed;
}
.dash-path.is-locked::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(12, 13, 15, 0.08), rgba(12, 13, 15, 0.36)),
    radial-gradient(circle at 50% 26%, rgba(255, 255, 255, 0.10), transparent 42%);
  pointer-events: none;
}
.dash-path__lock {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 3;
  display: none;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: rgba(255, 252, 243, 0.94);
  color: #26301f;
  box-shadow: 0 14px 32px rgba(10, 14, 18, 0.28);
  backdrop-filter: blur(8px);
}
.dash-path.is-locked .dash-path__lock {
  display: grid;
}
.dash-path__lock strong {
  font-size: var(--fs-14);
  line-height: 1.2;
}
.dash-path__lock span {
  font-size: var(--fs-13);
  line-height: 1.35;
  color: #5d6458;
}
.dash-paths--carousel .dash-path.is-locked:hover {
  border-color: var(--border);
  box-shadow: none;
}
.dash-paths--carousel[data-active-card="pressbox"] #dashBallclub.is-locked:hover {
  transform: scale(0.94);
}
.dash-path.is-lock-calledout .dash-path__lock {
  animation: dash-lock-callout 520ms ease;
}
@keyframes dash-lock-callout {
  0%, 100% { box-shadow: 0 14px 32px rgba(10, 14, 18, 0.28); }
  45% {
    box-shadow:
      0 14px 32px rgba(10, 14, 18, 0.28),
      0 0 0 4px rgba(8, 117, 209, 0.18);
  }
}
.dash-path h2 { margin: 6px 0 8px; font-size: var(--fs-24); }
.dash-path__desc { margin: 0; color: var(--text-muted); font-size: var(--fs-14); line-height: 1.5; }
.dash-path__stats { display: flex; gap: 18px; margin-top: 16px; flex-wrap: wrap; }
.dash-stat { color: var(--text-faint); font-size: var(--fs-13); }
.dash-stat strong { color: var(--text); font-size: var(--fs-18); margin-right: 4px; }
.dash-path__note { margin: 12px 0 0; font-size: var(--fs-13); color: #b97c0a; }
.dash-path__cta { display: inline-block; margin-top: 16px; color: var(--accent); font-weight: 600; font-size: var(--fs-14); }

@media (max-width: 860px) {
  .dash-paths--carousel {
    --dash-card-width: calc(100vw - 92px);
    --dash-card-gap: 18px;
  }
  .dash-paths--carousel .dash-paths__track {
    padding-inline: max(34px, calc((100vw - var(--dash-card-width)) / 2));
  }
  .dash-paths--carousel .dash-card-nav {
    width: 38px;
    height: 58px;
  }
  .dash-paths__lock-note {
    right: 44px;
    width: min(218px, calc(100vw - 88px));
  }
  .dash-card-nav--prev.is-locked:hover ~ .dash-paths__lock-note,
  .dash-card-nav--prev.is-locked:focus-visible ~ .dash-paths__lock-note {
    left: 44px;
  }
  .dash-card-nav--next.is-locked:hover ~ .dash-paths__lock-note,
  .dash-card-nav--next.is-locked:focus-visible ~ .dash-paths__lock-note,
  .dash-paths__lock-note.is-tooltip-visible {
    right: 44px;
  }
  .dash-paths--carousel .dash-path {
    min-height: 390px;
  }
}

@media (max-width: 560px) {
  .dash-paths--carousel {
    --dash-card-width: calc(100vw - 82px);
    --dash-card-gap: 14px;
  }
  .dash-paths--carousel .dash-paths__track {
    padding-inline: max(28px, calc((100vw - var(--dash-card-width)) / 2));
  }
  .dash-paths--carousel .dash-path {
    min-height: 430px;
  }
  .dash-paths__lock-note {
    left: 42px;
    right: 42px;
    width: auto;
  }
  .dash-card-nav--prev.is-locked:hover ~ .dash-paths__lock-note,
  .dash-card-nav--prev.is-locked:focus-visible ~ .dash-paths__lock-note,
  .dash-card-nav--next.is-locked:hover ~ .dash-paths__lock-note,
  .dash-card-nav--next.is-locked:focus-visible ~ .dash-paths__lock-note,
  .dash-paths__lock-note.is-tooltip-visible {
    left: 42px;
    right: 42px;
  }
  .dash-card-nav--prev { left: -4px; }
  .dash-card-nav--next { right: -4px; }
  .dash-card-nav span { font-size: 1.9rem; }
}

.dash-recent { margin-top: 8px; }
.dash-recent__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dash-recent__head h2 { margin: 0; font-size: var(--fs-18); }
.dash-recent__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dash-recent__row {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 10px 14px;
  text-decoration: none;
  color: var(--text);
  font-size: var(--fs-14);
}
.dash-recent__row:hover { border-color: var(--border-strong); }
.dash-recent__status { font-weight: 700; font-size: var(--fs-13); }
.dash-recent__status--complete { color: #2f7d32; }
.dash-recent__status--processing { color: #b97c0a; }
.dash-recent__status--failed { color: #b00020; }
.dash-recent__status--pending_upload { color: var(--text-muted); }
.dash-recent__when { color: var(--text-muted); }
.dash-recent__meta { color: var(--text-faint); font-size: var(--fs-13); }
.dash-recent__go { margin-left: auto; color: var(--text-faint); font-size: var(--fs-18); }
.dash-recent__empty { color: var(--text-muted); font-size: var(--fs-14); }

/* migration-pending notice (shelf + dashboard) */
.shelf-notice {
  margin: 0 0 18px;
  padding: 10px 14px;
  border: 1px solid rgba(232, 156, 36, 0.4);
  border-radius: 10px;
  background: rgba(232, 156, 36, 0.08);
  color: #8a5c06;
  font-size: var(--fs-13);
}
.shelf-notice.is-error {
  border-color: rgba(220, 38, 38, 0.28);
  background: rgba(220, 38, 38, 0.08);
  color: #b00020;
}

/* ── The Press Box card (clubhouse) — styled as the booth above home plate ── */
.dash-path--pressbox {
  padding: 0;
  overflow: hidden;
  background: #303f29;             /* scoreboard plate green */
  border-color: #26331f;
  display: flex;
  flex-direction: column;
}
.dash-path--pressbox:hover {
  border-color: #1d2a18;
  box-shadow: 0 10px 26px rgba(31, 53, 40, 0.35);
}

/* roof fascia with the venue sign */
.pbx-fascia {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 10px 16px 9px;
  background: linear-gradient(#3a4a31, #26331f);
  border-bottom: 2px solid #1d2a18;
}
.pbx-sign {
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  font-weight: 700;
  letter-spacing: 0.45em;
  text-indent: 0.45em; /* re-center despite tracking */
  color: #f6f4e9;
}
.pbx-lamp {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe9a8, #e8c15a 55%, #8a6a1f);
  box-shadow: 0 0 6px rgba(232, 193, 90, 0.8);
}

/* window strip overlooking the field */
.pbx-windows {
  position: relative;
  height: 120px;
  border-top: 2px solid #141d10;
  border-bottom: 2px solid #141d10;
}
.pbx-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.pbx-windows::before {
  /* glass reflection */
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(112deg,
      rgba(255, 255, 255, 0.22) 0%,
      rgba(255, 255, 255, 0.05) 22%,
      transparent 38%,
      transparent 60%,
      rgba(255, 255, 255, 0.10) 78%,
      transparent 92%);
  pointer-events: none;
}
.pbx-windows::after {
  /* mullions: two vertical frame bars */
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg,
      transparent calc(33.33% - 3px), #1d2a18 calc(33.33% - 3px),
      #1d2a18 calc(33.33% + 3px), transparent calc(33.33% + 3px)),
    linear-gradient(90deg,
      transparent calc(66.66% - 3px), #1d2a18 calc(66.66% - 3px),
      #1d2a18 calc(66.66% + 3px), transparent calc(66.66% + 3px));
  pointer-events: none;
}

/* the working counter under the windows */
.pbx-counter {
  height: 7px;
  background: linear-gradient(#a97f4d, #8a6a42 60%, #6e5333);
  border-bottom: 1px solid #4e3a23;
}

/* booth interior */
.pbx-booth {
  padding: 16px 22px 20px;
  color: #f6f4e9;
}
.pbx-eyebrow {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: rgba(246, 244, 233, 0.55);
}
.pbx-desc {
  margin: 0;
  font-size: var(--fs-14);
  line-height: 1.5;
  color: rgba(246, 244, 233, 0.78);
}

/* out-of-town scoreboard stat tiles */
.pbx-board {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.pbx-board__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 86px;
  padding: 8px 12px 7px;
  background: #1d2a18;
  border: 1px solid rgba(246, 244, 233, 0.22);
  border-radius: 6px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35);
}
.pbx-board__cell strong {
  font-family: var(--font-mono);
  font-size: var(--fs-20);
  font-weight: 700;
  color: #f2c94c;                  /* scoreboard bulb amber */
  text-shadow: 0 0 8px rgba(242, 201, 76, 0.35);
  line-height: 1.1;
}
.pbx-board__cell em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(246, 244, 233, 0.5);
  margin-top: 3px;
}

.pbx-note {
  margin: 12px 0 0;
  font-size: var(--fs-13);
  color: #e8b04b;
}
.pbx-cta {
  display: inline-block;
  margin-top: 14px;
  font-weight: 600;
  font-size: var(--fs-14);
  color: #f6f4e9;
  border-bottom: 1px solid rgba(246, 244, 233, 0.35);
  padding-bottom: 1px;
}
.dash-path--pressbox:hover .pbx-cta { color: #ffe9a8; border-bottom-color: #ffe9a8; }

.dash-recent__links { display: flex; gap: 8px; }
.pbx-game__matchup { font-weight: 700; color: var(--text); }
.pbx-game .acc-badge { margin-left: auto; }
.pbx-game .dash-recent__go { margin-left: 12px; }

/* ── Your ballclub card (clubhouse) — styled as the locker room ── */
.dash-path,
.dash-path:hover,
.dash-path:hover h2,
.dash-path:hover p,
.dash-path:hover span {
  text-decoration: none; /* beat the global a:hover underline */
}

.dash-path--ballclub {
  padding: 0;
  overflow: hidden;
  background: #4a3622;            /* dark walnut */
  border-color: #3a2b1b;
  display: flex;
  flex-direction: column;
}
.dash-path--ballclub:hover {
  border-color: #2f2317;
  box-shadow: 0 10px 26px rgba(74, 54, 34, 0.35);
}

/* wooden header plaque */
.chx-fascia {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 10px 16px 9px;
  background: linear-gradient(#6e4f2f, #4a3622);
  border-bottom: 2px solid #2f2317;
}
.chx-sign {
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  font-weight: 700;
  letter-spacing: 0.45em;
  text-indent: 0.45em;
  color: #f6f4e9;
}
.chx-pin {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f0d9a8, #c9a04e 55%, #6e521f);
  box-shadow: 0 0 5px rgba(201, 160, 78, 0.7);
}

/* locker stalls */
.chx-lockers {
  position: relative;
  height: 120px;
  border-top: 2px solid #2f2317;
  border-bottom: 2px solid #2f2317;
}
.chx-room-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* bench rail under the lockers */
.chx-bench {
  height: 7px;
  background: linear-gradient(#a97f4d, #8a6a42 60%, #6e5333);
  border-bottom: 1px solid #4e3a23;
}

/* the room itself */
.chx-room {
  padding: 16px 22px 20px;
  color: #f6f4e9;
}
.chx-eyebrow {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: rgba(246, 244, 233, 0.55);
}
.chx-desc {
  margin: 0;
  font-size: var(--fs-14);
  line-height: 1.5;
  color: rgba(246, 244, 233, 0.78);
}

/* brass roster plates */
.chx-board {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.chx-board__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 86px;
  padding: 8px 12px 7px;
  background: #3a2b1b;
  border: 1px solid rgba(246, 244, 233, 0.22);
  border-radius: 6px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35);
}
.chx-board__cell strong {
  font-family: var(--font-mono);
  font-size: var(--fs-20);
  font-weight: 700;
  color: #d9b46a;                 /* brass */
  text-shadow: 0 0 8px rgba(217, 180, 106, 0.3);
  line-height: 1.1;
}
.chx-board__cell em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(246, 244, 233, 0.5);
  margin-top: 3px;
}

.chx-cta {
  display: inline-block;
  margin-top: 14px;
  font-weight: 600;
  font-size: var(--fs-14);
  color: #f6f4e9;
  border-bottom: 1px solid rgba(246, 244, 233, 0.35);
  padding-bottom: 1px;
}
.dash-path--ballclub:hover .chx-cta { color: #f0d9a8; border-bottom-color: #f0d9a8; }

/* ── Clubhouse hero — stadium entrance marquee ── */
.dash-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid #26331f;
  border-radius: 14px;
  background: linear-gradient(#3a4a31, #303f29 55%, #26331f);
  box-shadow: 0 10px 26px rgba(31, 53, 40, 0.18);
  margin: 0 0 24px;
  padding: 40px 26px 34px;
}
.dash-hero__pennants {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 30px;
}
.dash-hero__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.dash-hero__eyebrow {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: rgba(246, 244, 233, 0.55);
}
.dash-hero__title {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  color: #f6f4e9;
}
.dash-hero__sub {
  margin: 6px 0 0;
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  color: rgba(246, 244, 233, 0.6);
}
.dash-hero__field {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 12px;
  background: linear-gradient(#f6f4e9 0 2px, #578a48 2px 55%, #4a7440);
}

/* ── Press Pass: interior press box window view ── */
.hero-fenway {
  --plan-topper-height: 320px;
  position: relative;
  border: 1px solid rgba(16, 28, 23, 0.28);
  border-radius: 14px;
  overflow: hidden;
  margin: 0 0 24px;
  min-height: 360px;
  padding: 94px 20px 30px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 18%, rgba(138, 190, 208, 0.18), transparent 34%),
    linear-gradient(180deg, #101815, #050807 100%);
  box-shadow:
    0 18px 42px rgba(10, 17, 14, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.hero-fenway::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 30%, rgba(0, 0, 0, 0.2) 100%),
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.08), transparent 34%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.24), transparent 16%, transparent 84%, rgba(0, 0, 0, 0.26));
}
.fen-facade {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.98;
}
.fen-content,
.fen-note,
.fen-actions {
  position: relative;
  z-index: 2;
}
.fen-content {
  width: min(500px, 100%);
  margin: 0 auto;
  padding: 16px 16px 14px;
  border: 1px solid rgba(233, 225, 201, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 40%),
    linear-gradient(180deg, rgba(22, 32, 28, 0.9), rgba(7, 12, 10, 0.88));
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 -18px 30px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(6px);
  overflow: hidden;
}
.fen-content::before {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 248, 226, 0.52), transparent);
}
.fen-sign {
  display: inline-block;
  padding: 8px 26px 9px;
  border: 1px solid rgba(37, 48, 41, 0.72);
  border-radius: 3px;
  background: linear-gradient(180deg, #fffdf2, #ebe2c8);
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.18),
    0 10px 24px rgba(0, 0, 0, 0.22);
  color: #bd3039;
  font-size: var(--fs-18);
  font-weight: 800;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}
.fen-eyebrow {
  margin: 14px 0 4px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: rgba(236, 229, 204, 0.7);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.66);
}
.fen-who {
  margin: 0;
  color: #fffaf0;
  font-size: var(--fs-24);
  font-weight: 800;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.52);
}
.fen-pennants {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 14px;
  border: 1px solid rgba(246, 244, 233, 0.18);
  border-radius: 5px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 8px),
    linear-gradient(#111a17, #050807);
  box-shadow:
    inset 0 2px 7px rgba(0, 0, 0, 0.38),
    0 0 16px rgba(229, 221, 157, 0.12);
}
.fen-pennant {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 58px;
  padding: 7px 10px 6px;
  border-left: 1px solid rgba(246, 244, 233, 0.16);
  background: transparent;
  color: rgba(246, 244, 233, 0.74);
  filter: none;
}
.fen-pennant:first-child { border-left: 0; }
.fen-pennant--red,
.fen-pennant--navy { background: transparent; }
.fen-pennant strong {
  font-family: var(--font-mono);
  font-size: var(--fs-20);
  font-weight: 700;
  line-height: 1.1;
  color: #f1dc94;
  text-shadow: 0 0 9px rgba(229, 221, 157, 0.45);
}
.fen-pennant em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(246, 244, 233, 0.75);
}
.fen-note {
  max-width: 560px;
  margin: 12px auto 0;
  color: #f5df9a;
  font-size: var(--fs-13);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.68);
}
.fen-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
}
.fen-link {
  padding-bottom: 1px;
  border-bottom: 1px solid rgba(255, 253, 246, 0.56);
  color: #fffdf6;
  font-size: var(--fs-14);
  font-weight: 600;
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.72);
}
.fen-link:hover {
  color: #fff;
  border-bottom-color: #fff;
  text-decoration: none;
}
.hero-fenway--artwork {
  height: var(--plan-topper-height);
  min-height: var(--plan-topper-height);
  padding: 0;
  background: #050807;
}
.hero-fenway--artwork::after {
  display: block;
  background:
    linear-gradient(180deg, rgba(4, 7, 6, 0.08), rgba(4, 7, 6, 0.24) 64%, rgba(4, 7, 6, 0.52)),
    linear-gradient(90deg, rgba(4, 7, 6, 0.22), transparent 20%, transparent 80%, rgba(4, 7, 6, 0.24));
}
.hero-fenway--artwork .fen-facade {
  display: block;
  object-fit: cover;
  opacity: 0.9;
  filter: saturate(0.72) brightness(0.78) contrast(0.96);
}
.hero-fenway--artwork .fen-content {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
.hero-fenway--artwork .fen-content::before {
  display: none;
}
.hero-fenway--artwork .fen-note {
  position: absolute;
  left: 50%;
  bottom: 58px;
  width: min(560px, calc(100% - 48px));
  margin: 0;
  transform: translateX(-50%);
}
.hero-fenway--artwork .fen-actions {
  position: absolute;
  left: 50%;
  bottom: 18px;
  margin: 0;
  transform: translateX(-50%);
}

/* ── Clubhouse: Wrigley-inspired night facade, flags, and red neon marquee ── */
.hero-wrigley {
  --plan-topper-height: 320px;
  position: relative;
  overflow: hidden;
  border: 1px solid #122235;
  border-radius: 14px;
  margin: 0 0 24px;
  padding: 42px 20px 24px;
  background:
    radial-gradient(circle at 28% 18%, rgba(89, 170, 238, 0.38), transparent 34%),
    linear-gradient(#07111d, #102944 48%, #101116);
  box-shadow:
    0 18px 42px rgba(6, 18, 31, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  height: var(--plan-topper-height);
  min-height: var(--plan-topper-height);
}
.hero-wrigley::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 43%, rgba(255, 51, 45, 0.24), transparent 27%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 28%, rgba(0, 0, 0, 0.44) 100%);
}
.wrg-stadium {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.92;
}
.wrg-marquee {
  position: relative;
  z-index: 2;
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 16px 18px 14px;
  border: 1px solid rgba(255, 98, 80, 0.42);
  border-radius: 18px 18px 8px 8px;
  background:
    linear-gradient(180deg, rgba(255, 74, 60, 0.16), transparent 38%),
    linear-gradient(#b81f2e, #851622 62%, #5c1119);
  box-shadow:
    0 0 24px rgba(255, 51, 45, 0.36),
    0 22px 42px rgba(0, 0, 0, 0.36),
    inset 0 0 0 2px rgba(255, 255, 255, 0.08),
    inset 0 -20px 36px rgba(49, 4, 9, 0.34);
  text-align: center;
}
.wrg-marquee__crown {
  display: flex;
  justify-content: center;
  gap: 9px;
  height: 8px;
  margin: 0 24px 10px;
  border-top: 1px solid rgba(255, 197, 145, 0.4);
  border-radius: 50% 50% 0 0;
}
.wrg-marquee__crown span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #ffd8b8;
  box-shadow: 0 0 10px rgba(255, 214, 153, 0.72);
}
.wrg-marquee__top {
  font-family: var(--font-mono);
  font-size: var(--fs-20);
  font-weight: 800;
  letter-spacing: 0.36em;
  text-indent: 0.36em;
  color: #ffe9ba;
  text-shadow:
    0 0 4px rgba(255, 238, 171, 0.9),
    0 0 14px rgba(255, 78, 49, 0.8),
    0 2px 0 rgba(89, 9, 15, 0.62);
}
.wrg-marquee__mid {
  margin-top: 6px;
  display: grid;
  gap: 4px;
}
.wrg-homeof {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 228, 189, 0.76);
  text-shadow: 0 0 8px rgba(255, 52, 45, 0.54);
}
.wrg-name {
  font-size: var(--fs-16);
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  text-transform: uppercase;
  color: #fff9ea;
  text-shadow:
    0 0 6px rgba(255, 255, 255, 0.5),
    0 0 12px rgba(255, 71, 54, 0.68);
}
.wrg-board {
  margin-top: 16px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 247, 220, 0.16);
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 8px),
    linear-gradient(#151719, #080b0d);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.46),
    0 0 16px rgba(255, 51, 45, 0.18);
}
.wrg-board span {
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  font-weight: 700;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  color: #f3df9a;
  text-shadow:
    0 0 8px rgba(228, 211, 142, 0.58),
    0 0 16px rgba(255, 72, 40, 0.3);
}
.wrg-marquee__base {
  height: 9px;
  margin-top: 12px;
  border: 1px solid rgba(255, 247, 220, 0.16);
  border-radius: 0 0 6px 6px;
  background: linear-gradient(90deg, #e22a34, #9d1722 54%, #e22a34);
  box-shadow: 0 0 16px rgba(255, 45, 41, 0.48);
}
.wrg-actions {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

@media (max-width: 640px) {
  .hero-fenway,
  .hero-wrigley {
    --plan-topper-height: 300px;
    padding-inline: 16px;
  }
  .hero-wrigley {
    height: var(--plan-topper-height);
    min-height: var(--plan-topper-height);
    padding-block: 32px 16px;
  }
  .hero-fenway {
    min-height: 382px;
    padding-block: 82px 24px;
  }
  .hero-fenway--artwork {
    height: var(--plan-topper-height);
    min-height: var(--plan-topper-height);
    padding: 0;
  }
  .fen-content {
    padding: 14px 12px 12px;
  }
  .fen-sign {
    width: min(100%, 300px);
    padding-inline: 16px;
    font-size: var(--fs-16);
    letter-spacing: 0.22em;
    text-indent: 0.22em;
    white-space: nowrap;
  }
  .fen-pennants {
    gap: 0;
  }
  .fen-pennant {
    width: auto;
    height: 54px;
    padding: 7px 6px 6px;
  }
  .fen-pennant strong {
    font-size: var(--fs-18);
  }
  .fen-pennant em {
    font-size: 0.55rem;
    letter-spacing: 0.1em;
  }
  .fen-actions {
    flex-direction: column;
    gap: 12px;
  }
  .hero-fenway--artwork .fen-actions {
    bottom: 16px;
    flex-direction: column;
  }
  .hero-fenway--artwork .fen-note {
    bottom: 96px;
  }
  .wrg-marquee {
    padding-inline: 12px;
  }
  .wrg-marquee__top {
    font-size: var(--fs-16);
    letter-spacing: 0.22em;
    text-indent: 0.22em;
  }
  .wrg-name {
    font-size: var(--fs-14);
    letter-spacing: 0.12em;
    text-indent: 0.12em;
  }
  .wrg-board span {
    display: block;
    font-size: var(--fs-12);
    letter-spacing: 0.14em;
    text-indent: 0.14em;
  }
}

/* ── League: limestone front office ── */
.hero-yankee {
  border: 1px solid #c9c2b2;
  border-radius: 14px;
  overflow: hidden;
  margin: 0 0 24px;
  background: linear-gradient(#efeadf, #ddd5c4);
}
.yk-frieze {
  padding: 14px 16px 12px;
  text-align: center;
  background: linear-gradient(#f6f2e9, #e6dfd0);
  border-bottom: 1px solid #c9c2b2;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  font-size: var(--fs-20);
  letter-spacing: 0.38em;
  text-indent: 0.38em;
  color: #1c2747;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.75), 0 4px 6px rgba(28, 39, 71, 0.28);
}
.yk-stone {
  padding: 28px 26px 0;
  text-align: center;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 27px, rgba(120, 110, 90, 0.16) 27px 28px),
    repeating-linear-gradient(90deg, transparent 0 92px, rgba(120, 110, 90, 0.10) 92px 93px);
}
.yk-engraving {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  text-transform: uppercase;
  color: #a8853b;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}
.yk-title {
  margin: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  font-size: 2.1rem;
  color: #1c2747;
}
.yk-sub {
  margin: 8px 0 0;
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  color: #7d6f4e;
}
.yk-actions { margin: 18px 0 6px; }
.yk-arches {
  display: block;
  width: min(640px, 100%);
  margin: 6px auto 0;
}

/* ── Path cards, etched variant — line-art on dark material ── */
.pcard {
  padding: 22px 26px 24px;
  display: flex;
  flex-direction: column;
  color: #f6f4e9;
}
.pcard--green {
  background: linear-gradient(#26301f, #1e271a);
  border-color: #151c12;
}
.pcard--walnut {
  background: linear-gradient(#2e241c, #251c15);
  border-color: #1a130e;
}
.pcard--green:hover  { border-color: #0f140d; box-shadow: 0 12px 26px rgba(30, 39, 26, 0.35); }
.pcard--walnut:hover { border-color: #120d09; box-shadow: 0 12px 26px rgba(37, 28, 21, 0.35); }

.pcard__head {
  display: flex;
  align-items: center;
  gap: 16px;
}
.pcard__head::before,
.pcard__head::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(246, 244, 233, 0.2);
}
.pcard__label {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 700;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  color: rgba(246, 244, 233, 0.75);
}
.pcard__art {
  width: 100%;
  height: 112px;
  margin: 16px 0 6px;
}
.pcard__eyebrow {
  margin: 6px 0 6px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: rgba(246, 244, 233, 0.45);
}
.pcard__desc {
  margin: 0;
  font-size: var(--fs-14);
  line-height: 1.55;
  color: rgba(246, 244, 233, 0.72);
}
.pcard__stats {
  display: flex;
  align-items: stretch;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(246, 244, 233, 0.16);
}
.pcard__stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.pcard__stat strong {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.1;
  color: #d8c98a;
}
.pcard--walnut .pcard__stat strong { color: #c9a86a; }
.pcard__stat em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(246, 244, 233, 0.45);
}
.pcard__divider {
  width: 1px;
  background: rgba(246, 244, 233, 0.16);
}
.pcard__cta {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(246, 244, 233, 0.85);
}
.pcard:hover .pcard__cta { color: #fff; }
.dash-path.is-locked.pcard--walnut:hover {
  border-color: #1a130e;
  box-shadow: none;
}
.dash-path.is-locked.pcard:hover .pcard__cta {
  color: rgba(246, 244, 233, 0.85);
}
.pcard .pbx-note { margin-top: 12px; }

/* ── Merged slot rows: starter + 2 tentative sub-lines — COMPACT, square cells (2026-06-14) ── */
.scorecard-player-row.is-merged-slot > th,
.scorecard-player-row.is-merged-slot > td {
  vertical-align: middle;
}
.scorecard-player-row.is-merged-slot .batter-cell--stacked {
  display: block;
  min-width: 0;
}
/* stacks flow at natural height; the square 66px play cell sets the row height */
.is-merged-slot .batter-lines,
.is-merged-slot .jersey-lines,
.is-merged-slot .pos-lines {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  min-height: 0;
}
.is-merged-slot .batter-line {
  min-height: 0;
  line-height: 1.05;
}
.is-merged-slot .batter-line.is-starter {
  min-height: 0;
}
.is-merged-slot .batter-line.is-tentative {
  min-height: 0;
  padding: 0;
  border: 0;
  font-size: 11px;
}
.is-merged-slot .batter-line.is-tentative .batter-name {
  font-size: 11px;
}
.is-merged-slot .batter-line.is-placeholder {
  opacity: 0.4;
}
.is-merged-slot .batter-name--empty {
  font-style: italic;
  font-size: 10px;
  color: rgba(91, 100, 114, 0.5);
}
.is-merged-slot .lineup-role.is-sub {
  position: static;
  min-width: 0;
  height: auto;
  padding: 0 4px;
  margin-right: 4px;
  font-size: 8px;
  box-shadow: none;
}
.is-merged-slot .batter-line.has-sub-badge {
  padding-right: 0;
}
.is-merged-slot .jersey-line,
.is-merged-slot .pos-line {
  min-height: 0;
  line-height: 1.05;
}
.is-merged-slot .jersey-line.is-sub,
.is-merged-slot .pos-line.is-sub {
  font-size: 9px;
  opacity: 0.7;
}
.is-merged-slot .jersey-line.is-placeholder,
.is-merged-slot .pos-line.is-placeholder {
  opacity: 0.22;
  font-size: 9px;
}
/* the play cell stays square (= column width) and drives the row height */
.is-merged-slot .inning-col .dcell,
.is-merged-slot .inning-col .dcell--split-blank {
  min-height: var(--scorecard-row-h);
  height: var(--scorecard-row-h);
}

/* stacked per-player summary values (match the name column's starter + sub lines) */
.is-merged-slot .summary-lines {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-height: 0;
}
.is-merged-slot .summary-lines .row-summary-line {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.is-merged-slot .summary-lines .row-summary-line.is-sub .row-summary-value {
  font-size: 11px;
  font-weight: 800;
}

/* "N+" bat-around continuation inning — highlight just the header digit yellow
   so the extended inning is noticeable; the column itself stays uncolored. */
.scorecard-table thead .inning-col.is-continuation-col {
  color: #ffe14d;
  font-weight: 900;
}

/* ── Scorebook detail page (/pressbox/scorebook/:id) ─────────────────────────
   Scorecard-first single-game page: box-score header, hero scorecard with
   home/away tabs + accuracy grade, how-you-watched, game details, photo/video
   roll, and notes. */
.sbk-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 20px 64px;
}
.sbk-breadcrumb {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
  font-size: 0.8rem;
}
.sbk-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}
.sbk-breadcrumb a:hover {
  color: var(--accent);
}
.sbk {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sbk-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.sbk .eyebrow {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* header / box score */
.sbk-header {
  padding: 16px 20px;
}
.sbk-header__teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
}
.sbk-team {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.sbk-team--home {
  justify-content: flex-end;
}
.sbk-team__badge {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  overflow: hidden;
}
.sbk-team__badge.has-logo {
  background: transparent;
}
.sbk-team__badge img {
  max-width: 32px;
  max-height: 32px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.sbk-team__id {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.sbk-team__id--right {
  align-items: flex-end;
}
.sbk-team__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}
.sbk-team__role {
  font-size: 0.72rem;
  color: var(--text-faint);
}
.sbk-team__role.is-scored {
  color: var(--accent);
  font-weight: 600;
}
.sbk-score {
  text-align: center;
}
.sbk-score__num {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}
.sbk-score__state {
  margin-top: 3px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1f9d57;
}
.sbk-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
}
.sbk-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.72rem;
  color: var(--text-2);
}
.sbk-pill--league {
  background: rgba(8, 117, 209, 0.08);
  border-color: rgba(8, 117, 209, 0.2);
  color: #0c447c;
}
.sbk-pill--template {
  background: #edf6f1;
  border-color: rgba(23, 58, 52, 0.18);
  color: #173a34;
}
.sbk-pill--visibility,
.sbk-pill--owner {
  background: #f7f4ec;
  border-color: rgba(124, 91, 40, 0.2);
  color: #6b4b1f;
}
.sbk-team__mgr {
  font-size: 0.68rem;
  color: var(--text-faint);
}
.sbk-header__details {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 24px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--divider);
}
.sbk-detail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 60px;
}
.sbk-detail span {
  font-family: var(--font-display);
  font-size: 0.57rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.sbk-detail strong {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}
.sbk-detail.is-empty strong {
  color: var(--text-faint);
  font-weight: 500;
}
.sbk-header__umps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 14px;
  margin-top: 10px;
}
.sbk-ump-label {
  font-family: var(--font-display);
  font-size: 0.57rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.sbk-ump {
  font-size: 0.76rem;
  color: var(--text-2);
}
.sbk-ump b {
  margin-right: 3px;
  color: var(--text-faint);
  font-weight: 700;
  font-size: 0.66rem;
}
.sbk-ump.is-empty {
  color: var(--text-faint);
}

/* main two-column */
.sbk-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(320px, 30vw, 340px);
  grid-template-areas:
    "scorecard rail"
    "highlights scan";
  gap: 14px;
  align-items: start;
}

/* hero scorecard */
.sbk-hero {
  grid-area: scorecard;
  padding: 14px;
  overflow: hidden;
}
.sbk-hero__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.sbk-hero__tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.sbk-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface-2);
  border-radius: 9px;
  padding: 3px;
}
.sbk-tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 4px 12px;
  border-radius: 7px;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
}
.sbk-tab.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  font-weight: 600;
}
.sbk-zoom {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.88);
}
.sbk-zoom__btn {
  appearance: none;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}
.sbk-zoom__btn--fit {
  width: auto;
  min-width: 42px;
  padding: 0 9px;
  font-size: 0.72rem;
}
.sbk-zoom__btn:hover:not(:disabled),
.sbk-zoom__btn:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
  outline: none;
}
.sbk-zoom__btn:disabled {
  opacity: 0.38;
  cursor: default;
}
.sbk-zoom__value {
  min-width: 42px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
}
.sbk-hero__media {
  position: relative;
  margin: 0;
  border-radius: 10px;
  background: #f6f1e8;
  border: 1px solid #e6dcc6;
  min-height: 240px;
  max-height: min(78vh, 920px);
  display: block;
  overflow: auto;
}
.sbk-hero__media.is-empty {
  display: grid;
  place-items: center;
  overflow: hidden;
}
.sbk-scorecard-canvas {
  position: relative;
  width: calc(100% * var(--sbk-scorecard-zoom, 1));
  min-width: 100%;
  line-height: 0;
}
.sbk-scorecard-canvas img {
  width: 100%;
  height: auto;
  display: block;
}
.sbk-hero__media.is-empty .sbk-scorecard-canvas {
  display: none;
}
.sbk-hero__empty {
  padding: 44px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  max-width: 320px;
}
.sbk-grade-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.sbk-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.sbk-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}
.sbk-btn:hover {
  border-color: var(--border-strong);
}
.sbk-btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.sbk-btn--primary:hover {
  filter: brightness(0.96);
}
.sbk-btn--publish {
  border-color: rgba(31, 157, 87, 0.28);
  background: rgba(31, 157, 87, 0.08);
  color: #145c36;
  font-weight: 650;
}
.sbk-btn:disabled,
.sbk-watch__chip:disabled,
.sbk-tvmode__btn:disabled {
  cursor: default;
  opacity: 0.62;
}

/* generated highlights placeholder */
.sbk-ai-highlights {
  grid-area: highlights;
  padding: 12px;
}
.sbk-ai-highlights__badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(8, 117, 209, 0.2);
  border-radius: 999px;
  background: rgba(8, 117, 209, 0.08);
  color: #0c447c;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sbk-ai-highlights__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.72fr);
  gap: 10px;
  margin-top: 4px;
}
.sbk-ai-highlights__lede {
  min-width: 0;
  padding: 11px 12px;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  background: var(--surface-2);
}
.sbk-ai-highlights__label {
  display: block;
  margin-bottom: 5px;
  color: var(--text-faint);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sbk-ai-highlights__lede h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.25;
  color: var(--text);
}
.sbk-ai-highlights__lede p {
  margin: 5px 0 0;
  max-width: 52ch;
  color: var(--text-muted);
  font-size: 0.74rem;
  line-height: 1.38;
}
.sbk-ai-highlights__list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sbk-ai-highlights__list li {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.sbk-ai-highlights__list span {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 800;
}
.sbk-ai-highlights__list p {
  min-width: 0;
  margin: 0;
  color: var(--text-2);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.3;
}

/* right rail */
.sbk-rail {
  grid-area: rail;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sbk-rail .sbk-card,
.sbk-scan-card {
  padding: 14px;
}
.sbk-scan-card {
  grid-area: scan;
}
.sbk-grade {
  display: flex;
  align-items: center;
  gap: 14px;
}
.sbk-grade__ring {
  flex: 0 0 auto;
}
.sbk-grade__txt h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
}
.sbk-grade__txt p {
  margin: 3px 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.sbk-watch {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}
.sbk-watch__chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 0.78rem;
  cursor: pointer;
}
.sbk-watch__chip:hover {
  border-color: var(--border-strong);
}
.sbk-watch__chip.is-on {
  background: rgba(8, 117, 209, 0.1);
  border-color: var(--accent);
  color: #0c447c;
  font-weight: 600;
}
.sbk-facts {
  margin: 9px 0 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 7px 12px;
  font-size: 0.8rem;
}
.sbk-facts dt {
  color: var(--text-faint);
  margin: 0;
}
.sbk-facts dd {
  margin: 0;
  text-align: right;
  color: var(--text);
}

/* gallery + notes */
.sbk-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.sbk-gallery,
.sbk-notes {
  padding: 14px;
}
.sbk-add {
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 11px;
}
.sbk-add:hover {
  border-color: var(--border-strong);
}
.sbk-roll {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.sbk-roll__tile {
  appearance: none;
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-3);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.sbk-roll__tile:hover,
.sbk-roll__tile:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.sbk-roll__tile img,
.sbk-roll__tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sbk-roll__status {
  grid-column: span 2;
  min-height: 120px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
}
.sbk-roll__status span:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.sbk-roll__status strong {
  font-size: 0.78rem;
  line-height: 1.25;
}
.sbk-roll__status small {
  color: var(--text-muted);
  font-size: 0.68rem;
  line-height: 1.3;
}
.sbk-roll__status--error {
  border-color: rgba(196, 69, 54, 0.38);
  background: rgba(196, 69, 54, 0.07);
}
.sbk-roll__status-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(14, 116, 144, 0.28);
  animation: sbk-roll-status-pulse 1.4s ease-out infinite;
}
@keyframes sbk-roll-status-pulse {
  0% { box-shadow: 0 0 0 0 rgba(14, 116, 144, 0.34); }
  72% { box-shadow: 0 0 0 12px rgba(14, 116, 144, 0); }
  100% { box-shadow: 0 0 0 0 rgba(14, 116, 144, 0); }
}
.sbk-roll__label {
  padding: 0 8px;
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-muted);
}
.sbk-roll__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.5rem;
  background: rgba(0, 0, 0, 0.26);
}
.sbk-roll__source {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  padding: 3px 5px;
  border-radius: 5px;
  background: rgba(4, 34, 92, 0.84);
  color: #fff;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.sbk-roll__visibility {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 3;
  padding: 4px 6px;
  border-radius: 7px;
  background: rgba(8, 16, 20, 0.74);
  color: #fff;
  font-size: 0.56rem;
  font-weight: 850;
  line-height: 1;
}
.sbk-roll__visibility--public {
  background: rgba(14, 102, 56, 0.84);
}
.sbk-roll__tags {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  max-width: calc(100% - 12px);
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  pointer-events: none;
}
.sbk-roll__tags span,
.sbk-cell-pick__tags span,
.sbk-cell-linked__tags span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #14201c;
  font-size: 0.56rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.sbk-roll__tags span {
  padding: 4px 5px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}
.sbk-roll__context {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 31px;
  z-index: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  padding: 4px 6px;
  border-radius: 7px;
  background: rgba(6, 12, 18, 0.68);
  color: #fff;
  font-size: 0.57rem;
  font-weight: 750;
  line-height: 1.18;
  text-align: center;
}
.sbk-roll__context:last-child {
  bottom: 6px;
}
.sbk-roll__linked {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  z-index: 2;
  padding: 4px 6px;
  border-radius: 7px;
  background: rgba(14, 58, 36, 0.82);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}
.sbk-roll__pending {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  z-index: 3;
  padding: 4px 6px;
  border-radius: 7px;
  background: rgba(9, 30, 58, 0.84);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}
.sbk-roll__empty {
  grid-column: 1 / -1;
  padding: 30px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
}
@media (max-width: 540px) {
  .sbk-roll__status {
    grid-column: 1 / -1;
  }
}
.sbk-notes__box {
  margin-top: 10px;
  min-height: 64px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  padding: 11px 13px;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text);
}
.sbk-notes__box:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
}
.sbk-notes__box:empty::before {
  content: attr(data-placeholder);
  color: var(--text-faint);
}
.sbk-notes__hint {
  font-size: 0.7rem;
  color: var(--text-faint);
}

/* scorecard cell media linking */
.sbk-cell-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.sbk-cell-overlay[hidden] {
  display: none !important;
}
.sbk-cell-target {
  position: absolute;
  padding: 0;
  border: 1px solid transparent;
  background: rgba(8, 117, 209, 0);
  cursor: pointer;
  pointer-events: auto;
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
.sbk-cell-target:hover,
.sbk-cell-target:focus-visible,
.sbk-cell-target.is-active {
  border-color: rgba(8, 117, 209, 0.84);
  background: rgba(8, 117, 209, 0.15);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
  outline: none;
}
.sbk-cell-target.is-linked {
  border-color: rgba(31, 157, 87, 0.7);
  background: rgba(31, 157, 87, 0.12);
}
.sbk-cell-target__badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #1f9d57;
  color: #fff;
  font-size: 0.56rem;
  font-weight: 800;
  line-height: 1;
}
.sbk-cell-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 20px;
}
.sbk-cell-modal[hidden] {
  display: none !important;
}
.sbk-cell-modal__scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(18, 22, 20, 0.48);
  backdrop-filter: blur(4px);
  cursor: pointer;
}
.sbk-cell-modal__panel {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100vw - 28px));
  max-height: min(720px, calc(100vh - 28px));
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 28px 70px rgba(13, 20, 18, 0.28);
}
.sbk-cell-modal__head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}
.sbk-cell-modal__head h2 {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
}
.sbk-cell-modal__head p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.78rem;
}
.sbk-cell-modal__body {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}
.sbk-cell-modal__body h3 {
  margin: 0 0 7px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.sbk-cell-linked,
.sbk-cell-picks {
  display: grid;
  gap: 8px;
}
.sbk-cell-picks {
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
}
.sbk-cell-linked__empty {
  padding: 14px;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-align: center;
}
.sbk-cell-linked__item,
.sbk-cell-pick {
  display: grid;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}
.sbk-cell-linked__item {
  grid-template-columns: 46px 1fr auto;
  padding: 6px 8px 6px 6px;
  cursor: pointer;
}
.sbk-cell-linked__item:hover,
.sbk-cell-linked__item:focus-visible {
  border-color: var(--accent);
  outline: none;
}
.sbk-cell-linked__text {
  min-width: 0;
  display: grid;
  gap: 2px;
  overflow: hidden;
  color: var(--text);
  font-size: 0.78rem;
}
.sbk-cell-linked__text strong,
.sbk-cell-linked__text small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sbk-cell-linked__text strong {
  font-weight: 700;
}
.sbk-cell-linked__text small {
  color: var(--text-muted);
  font-size: 0.66rem;
}
.sbk-cell-linked__item button {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
}
.sbk-cell-pick {
  appearance: none;
  grid-template-rows: 78px minmax(42px, auto);
  padding: 0 0 9px;
  overflow: hidden;
  color: var(--text);
  cursor: pointer;
}
.sbk-cell-pick:hover,
.sbk-cell-pick:focus-visible {
  border-color: var(--accent);
  outline: none;
}
.sbk-cell-pick.is-linked {
  opacity: 0.55;
  cursor: default;
}
.sbk-cell-pick__thumb {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 46px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--surface-3);
}
.sbk-cell-pick__thumb img,
.sbk-cell-pick__thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sbk-cell-pick__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.24);
  color: #fff;
  font-size: 1.2rem;
}
.sbk-cell-pick__source {
  position: absolute;
  top: 5px;
  left: 5px;
  padding: 3px 5px;
  border-radius: 5px;
  background: rgba(4, 34, 92, 0.84);
  color: #fff;
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.sbk-cell-pick__fallback {
  color: var(--text-muted);
  font-size: 0.72rem;
}
.sbk-cell-pick__text {
  min-width: 0;
  padding: 0 8px;
  display: grid;
  gap: 2px;
  overflow: hidden;
  font-size: 0.72rem;
  line-height: 1.18;
}
.sbk-cell-pick__title,
.sbk-cell-pick__meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sbk-cell-pick__title {
  font-weight: 700;
}
.sbk-cell-pick__meta {
  color: var(--text-muted);
  font-size: 0.64rem;
}
.sbk-cell-pick__tags,
.sbk-cell-linked__tags {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  overflow: hidden;
}
.sbk-cell-pick__tags span,
.sbk-cell-linked__tags span {
  padding: 3px 5px;
  background: var(--surface-3);
  color: var(--text-muted);
  font-size: 0.55rem;
}
.sbk-cell-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sbk-cell-modal__actions .sbk-btn {
  margin: 0;
}
.sbk-cell-modal__status {
  min-height: 1.2em;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.75rem;
}
.sbk-cell-modal__status.is-error {
  color: var(--red);
}

.sbk-media-viewer {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: grid;
  place-items: center;
  padding: 20px;
}
.sbk-media-viewer[hidden] {
  display: none !important;
}
.sbk-media-viewer__scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(18, 22, 20, 0.66);
  backdrop-filter: blur(5px);
  cursor: pointer;
}
.sbk-media-viewer__panel {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100vw - 28px));
  max-height: min(780px, calc(100vh - 28px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: #111715;
  color: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}
.sbk-media-viewer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
}
.sbk-media-viewer__head h2 {
  margin: 3px 0 0;
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.25;
}
.sbk-media-viewer .popover-close {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.sbk-media-viewer__body {
  background: #050807;
  max-height: calc(100vh - 92px);
  overflow: auto;
}
.sbk-media-viewer__frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #050807;
}
.sbk-media-viewer__disclosure {
  padding: 10px 16px 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}
.sbk-media-viewer__body video,
.sbk-media-viewer__body img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 150px);
  object-fit: contain;
}
.sbk-media-viewer__body > .sbk-btn--publish {
  margin: 12px 16px 0;
}
.sbk-media-viewer__link {
  display: block;
  padding: 10px 16px 12px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.76rem;
  text-decoration: none;
}
.sbk-media-viewer__link:hover {
  color: #fff;
}
.sbk-media-viewer__empty {
  min-height: 240px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.72);
}
.sbk-media-viewer__linkout {
  gap: 12px;
  padding: 28px;
  text-align: center;
}
.sbk-media-viewer__linkout p {
  margin: 0;
}
.sbk-media-tags-editor {
  padding: 14px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
  background: #111715;
}
.sbk-media-tags-editor__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.sbk-media-tags-editor__head span {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
}
.sbk-media-tags-editor__head small {
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}
.sbk-media-tags-editor__current,
.sbk-media-tags-editor__suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sbk-media-tags-editor__current {
  min-height: 30px;
  margin-bottom: 10px;
}
.sbk-media-tags-editor__tag,
.sbk-media-tags-editor__suggestion {
  appearance: none;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}
.sbk-media-tags-editor__tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.9);
  color: #13201c;
  padding: 6px 9px;
}
.sbk-media-tags-editor__tag span {
  color: rgba(19, 32, 28, 0.64);
}
.sbk-media-tags-editor__suggestion {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.8);
  padding: 6px 8px;
}
.sbk-media-tags-editor__suggestion.is-on {
  border-color: rgba(31, 157, 87, 0.75);
  background: rgba(31, 157, 87, 0.22);
  color: #fff;
}
.sbk-media-tags-editor__tag:hover,
.sbk-media-tags-editor__tag:focus-visible,
.sbk-media-tags-editor__suggestion:hover,
.sbk-media-tags-editor__suggestion:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.62);
  outline-offset: 2px;
}
.sbk-media-tags-editor__empty {
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.75rem;
  align-self: center;
}
.sbk-media-tags-editor__custom {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.sbk-media-tags-editor__custom input {
  min-width: 0;
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 9px 10px;
  font-size: 0.78rem;
}
.sbk-media-tags-editor__custom input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}
.sbk-media-tags-editor__custom .sbk-btn {
  margin: 0;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

/* your seat (placeholder for the future 3D seat view) */
.sbk-tvmode {
  display: inline-flex;
  gap: 3px;
  margin: 9px 0 0;
  padding: 3px;
  border-radius: 9px;
  background: var(--surface-2);
}
.sbk-tvmode__btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
}
.sbk-tvmode__btn.is-on {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.sbk-seat__inputs {
  display: flex;
  gap: 8px;
  margin: 9px 0 10px;
}
.sbk-seat__inputs label {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.sbk-seat__inputs input {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text);
}
.sbk-seat__inputs input:focus {
  outline: none;
  border-color: var(--accent);
}
.sbk-seat__view {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  overflow: hidden;
}
.sbk-seat__empty {
  padding: 20px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}
.sbk-seat__stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 12px 13px;
}
.sbk-seat__svg {
  width: 100%;
  max-width: 220px;
  height: auto;
}
.sbk-seat__label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
}
.sbk-seat__soon {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
}

@media (max-width: 820px) {
  .sbk-main {
    grid-template-columns: 1fr;
    grid-template-areas:
      "scorecard"
      "highlights"
      "rail"
      "scan";
  }
  .sbk-ai-highlights__grid {
    grid-template-columns: 1fr;
  }
  .sbk-hero__tools {
    width: 100%;
    justify-content: space-between;
  }
  .sbk-zoom {
    margin-left: auto;
  }
}

/* ── Upload-side chooser (which team's scorecard) ───────────────────────── */
.pbx-side-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 22px;
}
.pbx-side-modal[hidden] {
  display: none !important;
}
.pbx-side-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 22, 20, 0.48);
  backdrop-filter: blur(5px);
}
.pbx-side-modal__panel {
  position: relative;
  z-index: 1;
  width: min(440px, calc(100vw - 28px));
  padding: 22px 22px 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 28px 68px rgba(13, 20, 18, 0.3);
}
.pbx-side-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}
.pbx-side-modal__close:hover {
  border-color: var(--border-strong);
}
.pbx-side-modal__head {
  margin-bottom: 14px;
}
.pbx-side-modal__head h2 {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
}
.pbx-side-modal__sub {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.pbx-side-modal__choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pbx-side-choice {
  appearance: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.pbx-side-choice:hover {
  border-color: var(--accent);
  background: rgba(8, 117, 209, 0.06);
  transform: translateY(-1px);
}
.pbx-side-choice strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.pbx-side-choice span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ===== Google Flow-inspired public homepage refresh ===== */
.home-cinematic {
  --bg: #05070a;
  --bg-elev: #0d1118;
  --surface: #111720;
  --surface-2: #18212d;
  --surface-3: #243140;
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.22);
  --divider: rgba(255, 255, 255, 0.08);
  --text: #f7f9fb;
  --text-2: #d7dde5;
  --text-muted: rgba(231, 236, 244, 0.72);
  --text-faint: rgba(231, 236, 244, 0.48);
  --accent: #6eb6ff;
  --accent-hover: #9acaeb;
  --accent-soft: rgba(110, 182, 255, 0.14);
  --accent-fg: #06111d;
  --green: #54d68a;
  --yellow: #f0c15b;
  --red: #f4776f;
  color: var(--text);
  background:
    linear-gradient(180deg, #05070a 0%, #07101a 46%, #0a0d12 100%);
}

.home-cinematic::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 28%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: auto, 88px 88px, 88px 88px;
  opacity: 0.72;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.64) 48%, transparent 100%);
}

.home-cinematic .appbar {
  background: rgba(5, 7, 10, 0.72);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px);
}

.home-cinematic .appbar--public {
  grid-template-columns: minmax(220px, 0.9fr) minmax(320px, auto) minmax(420px, 1.1fr);
  grid-template-areas: "brand score actions";
  min-height: 82px;
  padding-block: 10px;
}

.home-cinematic .appbar--public > .appbar-brand-group {
  grid-area: brand;
}

.home-cinematic .appbar--public > .appbar-actions--public {
  grid-area: actions;
}

.home-cinematic .appbar--public > .appbar-scoreboard-group {
  display: grid;
  grid-area: score;
  justify-self: center;
}

.home-cinematic .scoreboard-brand {
  --scoreboard-green: rgba(8, 24, 18, 0.78);
  --scoreboard-green-top: rgba(14, 36, 28, 0.80);
  --scoreboard-green-dark: #06120e;
  --scoreboard-grid: rgba(246, 244, 233, 0.54);
  --scoreboard-plate: transparent;
  --scoreboard-plate-low: transparent;
  --scoreboard-letter: #ffffff;
  --scoreboard-blue: #8fd3ff;
  --scoreboard-logo-blue: #8fd3ff;
  --scoreboard-tile-w: 18px;
  --scoreboard-tile-top-h: 16px;
  --scoreboard-tile-h: 19px;
  gap: 7px;
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 52%),
    linear-gradient(180deg, var(--scoreboard-green-top), var(--scoreboard-green));
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.56);
  backdrop-filter: blur(16px);
}

.home-cinematic .scoreboard-brand::before,
.home-cinematic .scoreboard-brand::after {
  display: block;
  left: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.24);
  opacity: 1;
}

.home-cinematic .scoreboard-brand::before {
  display: none;
  top: 6px;
}

.home-cinematic .scoreboard-brand::after {
  bottom: 6px;
}

.home-cinematic .scoreboard-brand__copy {
  gap: 3px;
}

.home-cinematic .scoreboard-brand__logo-stack {
  gap: 7px;
}

.home-cinematic .scoreboard-brand__row {
  gap: 2px;
}

.home-cinematic .scoreboard-brand__row--prompt {
  min-height: var(--scoreboard-tile-h);
}

.home-cinematic .scoreboard-brand__row--prompt .scoreboard-tile {
  height: var(--scoreboard-tile-h);
}

.home-cinematic .scoreboard-tile__face {
  border-color: rgba(255, 255, 255, 0.24);
  border-radius: 2px;
  background: rgba(246, 244, 233, 0.018);
  box-shadow: none;
  color: var(--scoreboard-letter);
  font-size: 13px;
  font-weight: 700;
  text-shadow: none;
}

.home-cinematic .scoreboard-brand__row--top {
  transform: translateY(-2px);
}

.home-cinematic .scoreboard-brand__row--top .scoreboard-tile__face {
  border-color: rgba(255, 255, 255, 0.14);
  background: transparent;
  color: rgba(255, 255, 255, 0.66);
  font-size: 9px;
  font-weight: 700;
  text-shadow: none;
}

.home-cinematic .scoreboard-brand__row--prompt .scoreboard-tile__face {
  color: var(--scoreboard-letter);
  font-size: 13px;
  letter-spacing: 0;
}

.home-cinematic .scoreboard-tile__face--accent {
  color: #8fd3ff;
  text-shadow: none;
}

.home-cinematic .scoreboard-logo-spacer,
.home-cinematic .scoreboard-logo__face {
  border-color: rgba(255, 255, 255, 0.24);
  border-radius: 2px;
  background: rgba(246, 244, 233, 0.018);
  box-shadow: none;
}

.home-cinematic .scoreboard-brand__logo {
  filter: none;
}

.home-cinematic .scoreboard-logo-mark {
  width: 27px;
  height: 27px;
}

@media (max-width: 1120px) {
  .home-cinematic .appbar--public {
    grid-template-columns: minmax(180px, auto) minmax(0, 1fr);
    grid-template-areas: "brand actions";
    min-height: 74px;
  }

  .home-cinematic .appbar--public > .appbar-scoreboard-group {
    display: none;
  }
}

.home-cinematic .brand,
.home-cinematic .logo,
.home-cinematic .brand-tagline,
.home-cinematic .appbar-main-nav a,
.home-cinematic .nav-login {
  color: rgba(247, 249, 251, 0.76);
}

.home-cinematic .brand--static,
.home-cinematic .appbar-main-nav a:hover,
.home-cinematic .nav-login:hover {
  color: #fff;
}

.home-cinematic .brand-tagline {
  border-top-color: rgba(255, 255, 255, 0.11);
}

.home-cinematic .appbar-actions--public .nav-login {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(247, 249, 251, 0.86);
}

.home-cinematic .appbar-actions--public .nav-login:hover,
.home-cinematic .appbar-actions--public .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.10);
}

.home-cinematic .appbar-actions--public .appbar-main-nav {
  border-left-color: rgba(255, 255, 255, 0.12);
}

.home-cinematic .home-main {
  width: min(100% - 32px, 1440px);
}

.flow-hero,
.product-film {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.flow-hero {
  position: relative;
  isolation: isolate;
  min-height: calc(100vh - 72px);
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: clamp(64px, 9vw, 118px) 24px clamp(78px, 8vw, 118px);
  background: #030406;
  text-align: center;
}

.flow-hero__gallery,
.flow-hero__scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.flow-hero__gallery {
  z-index: -2;
  display: grid;
  align-content: center;
  gap: clamp(12px, 1.5vw, 22px);
  transform: rotate(-2.2deg) scale(1.08);
}

.gallery-row {
  width: 100%;
  overflow: visible;
}

.gallery-row__track {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.4vw, 22px);
  width: max-content;
  will-change: transform;
  animation: gallery-drift-left 34s linear infinite;
}

.gallery-row--middle .gallery-row__track {
  animation-name: gallery-drift-right;
  animation-duration: 42s;
}

.gallery-row--bottom .gallery-row__track {
  animation-duration: 38s;
}

.gallery-row img {
  display: block;
  width: clamp(190px, 25vw, 470px);
  height: clamp(132px, 17vw, 304px);
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  filter: saturate(0.94) contrast(1.06) brightness(0.62);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

.gallery-row--middle img {
  width: clamp(260px, 37vw, 700px);
  height: clamp(152px, 20vw, 342px);
}

.gallery-row--bottom img {
  width: clamp(178px, 22vw, 390px);
  height: clamp(142px, 16vw, 292px);
}

.flow-hero__scrim {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(3, 4, 6, 0.9), rgba(3, 4, 6, 0.34) 28%, rgba(3, 4, 6, 0.34) 70%, rgba(3, 4, 6, 0.88)),
    linear-gradient(180deg, rgba(3, 4, 6, 0.92), rgba(3, 4, 6, 0.14) 36%, rgba(3, 4, 6, 0.66) 74%, #05070a 100%),
    radial-gradient(ellipse 70% 42% at 50% 45%, rgba(3, 4, 6, 0.08), rgba(3, 4, 6, 0.76));
}

.flow-hero__content {
  display: grid;
  justify-items: center;
  gap: clamp(16px, 2vw, 24px);
  width: min(100%, 1100px);
  padding-top: clamp(28px, 4vw, 54px);
}

.flow-hero__eyebrow,
.flow-hero__rail,
.flow-hero__motion-toggle,
.demo-cinema__chrome,
.demo-caption {
  font-family: var(--font-mono);
  letter-spacing: 0;
}

.flow-hero__eyebrow {
  margin: 0;
  color: rgba(247, 249, 251, 0.82);
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 700;
  text-transform: uppercase;
}

.flow-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(66px, 12vw, 178px);
  line-height: 0.82;
  font-weight: 700;
  letter-spacing: 0;
  text-shadow: 0 18px 70px rgba(0, 0, 0, 0.64);
}

.flow-hero h1 .ai {
  color: var(--accent);
}

.flow-hero__sub {
  max-width: 720px;
  margin: 0;
  color: rgba(247, 249, 251, 0.82);
  font-size: clamp(17px, 1.5vw, 22px);
  line-height: 1.45;
  text-wrap: balance;
}

.flow-hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.flow-hero .btn {
  min-height: 50px;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
}

.flow-hero .btn--primary {
  border-color: #fff;
  background: #fff;
  color: #081018;
}

.flow-hero .btn--primary:hover {
  border-color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.86);
}

.flow-hero .btn--ghost {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  backdrop-filter: blur(14px);
}

.flow-hero__rail {
  position: absolute;
  left: 50%;
  bottom: clamp(22px, 3vw, 38px);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(5, 7, 10, 0.46);
  color: rgba(247, 249, 251, 0.7);
  font-size: 11px;
  text-transform: uppercase;
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}

.flow-hero__rail span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.flow-hero__rail span + span::before {
  content: "";
  width: 18px;
  height: 1px;
  background: rgba(247, 249, 251, 0.34);
}

.flow-hero__motion-toggle {
  position: absolute;
  right: clamp(18px, 3vw, 44px);
  bottom: clamp(22px, 3vw, 38px);
  z-index: 3;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(5, 7, 10, 0.48);
  color: rgba(247, 249, 251, 0.76);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(18px);
}

.flow-hero__motion-toggle:hover {
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
}

@keyframes gallery-drift-left {
  from { transform: translateX(0); }
  to { transform: translateX(-45%); }
}

@keyframes gallery-drift-right {
  from { transform: translateX(-43%); }
  to { transform: translateX(0); }
}

.product-film {
  position: relative;
  display: grid;
  grid-template-columns: minmax(330px, 0.38fr) minmax(640px, 1fr);
  gap: clamp(34px, 5vw, 82px);
  align-items: center;
  min-height: 100vh;
  padding: clamp(74px, 8vw, 128px) max(24px, calc((100vw - 1320px) / 2)) clamp(80px, 9vw, 138px);
  background:
    linear-gradient(180deg, #05070a 0%, #09111a 48%, #071018 100%);
  overflow: hidden;
}

.product-film::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, transparent, #000 20%, #000 80%, transparent);
}

.product-film > * {
  position: relative;
  z-index: 1;
}

.product-film__copy {
  position: relative;
  display: grid;
  gap: 22px;
  align-content: center;
  max-width: 520px;
  min-width: 0;
  padding-block: clamp(18px, 3vw, 40px);
}

.product-film__copy::before {
  content: "";
  position: absolute;
  inset: -34px -40px -28px -22px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 76% at 12% 46%, rgba(3, 4, 6, 0.9), rgba(3, 4, 6, 0.5) 52%, transparent 76%);
}

.product-film__copy h2 {
  max-width: 11.4ch;
  margin: 0;
  color: #fff;
  font-size: clamp(48px, 5.8vw, 88px);
  line-height: 0.96;
  letter-spacing: 0;
  text-shadow: 0 18px 48px rgba(0, 0, 0, 0.66);
}

.product-film__copy .hero-sub {
  max-width: 46ch;
  color: rgba(247, 249, 251, 0.86);
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.55;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.72);
}

.product-film .hero-kicker {
  color: #b4f0c8;
  text-shadow: 0 8px 22px rgba(0, 0, 0, 0.64);
}

.product-film .hero-kicker::before {
  background: #91d2a8;
}

.demo-cinema {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
    #06090e;
  box-shadow:
    0 46px 120px rgba(0, 0, 0, 0.54),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.demo-cinema__chrome {
  display: grid;
  grid-template-columns: 10px 10px 10px 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  color: rgba(247, 249, 251, 0.58);
  font-size: 11px;
}

.demo-cinema__chrome > span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}

.demo-cinema__chrome > span:first-child { background: #f4776f; }
.demo-cinema__chrome > span:nth-child(2) { background: #f0c15b; }
.demo-cinema__chrome > span:nth-child(3) { background: #54d68a; }

.demo-cinema__chrome p {
  margin: 0;
  padding-left: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-cinema__chrome button {
  appearance: none;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(247, 249, 251, 0.72);
  font: inherit;
  cursor: pointer;
}

.demo-screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  min-height: 420px;
  background:
    linear-gradient(135deg, rgba(110, 182, 255, 0.13), transparent 32%),
    linear-gradient(180deg, #0b1119, #070b10);
}

.demo-camera {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 280px;
  gap: 18px;
  padding: 22px;
  transform-origin: 58% 48%;
  animation: demo-camera 18s cubic-bezier(0.24, 0.82, 0.18, 1) infinite;
}

.demo-sidebar {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 18px;
  padding: 14px 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.demo-sidebar span:not(.demo-sidebar__brand) {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.14);
}

.demo-sidebar span.is-active {
  background: #6eb6ff;
  box-shadow: 0 0 28px rgba(110, 182, 255, 0.46);
}

.demo-sidebar__brand {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #fff;
  color: #081018;
  font-size: 12px;
  font-weight: 800;
}

.demo-workspace {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    #0b1118;
}

.demo-upload {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(300px, 70%);
  padding: 26px;
  border: 1px dashed rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  transform: translate(-50%, -50%);
  animation: demo-upload-panel 18s linear infinite;
}

.demo-upload strong {
  font-size: 18px;
}

.demo-upload small {
  color: rgba(247, 249, 251, 0.58);
}

.demo-upload__icon {
  width: 42px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 11px;
  transform: rotate(45deg);
}

.demo-upload__button {
  margin-top: 6px;
  padding: 8px 15px;
  border-radius: 999px;
  background: #fff;
  color: #081018;
  font-weight: 800;
}

.demo-scorecard {
  position: absolute;
  inset: 22px;
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  grid-template-rows: repeat(8, minmax(0, 1fr));
  gap: 4px;
  opacity: 0;
  transform: scale(0.96);
  animation: demo-grid-in 18s linear infinite;
}

.demo-scorecard span {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  background: rgba(247, 249, 251, 0.07);
  color: rgba(247, 249, 251, 0.7);
  font-family: var(--font-mono);
  font-size: clamp(8px, 1vw, 12px);
  font-weight: 800;
}

.demo-scorecard span.is-hit {
  background: rgba(84, 214, 138, 0.18);
  border-color: rgba(84, 214, 138, 0.46);
  color: #c6f8d7;
}

.demo-scorecard span.is-flagged {
  background: rgba(240, 193, 91, 0.17);
  border-color: rgba(240, 193, 91, 0.62);
  color: #ffe3a3;
  animation: demo-flag-pulse 1800ms ease-in-out infinite;
}

.demo-results {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  opacity: 0;
  animation: demo-results-in 18s linear infinite;
}

.demo-results div {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(6, 9, 14, 0.72);
}

.demo-results strong,
.demo-results span {
  display: block;
}

.demo-results strong {
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

.demo-results span {
  margin-top: 5px;
  color: rgba(247, 249, 251, 0.58);
  font-size: 11px;
}

.demo-inspector {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  opacity: 0;
  transform: translateX(18px);
  animation: demo-inspector-in 18s linear infinite;
}

.demo-inspector p {
  margin: 0 0 4px;
  color: rgba(247, 249, 251, 0.56);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
}

.demo-inspector div,
.demo-inspector a {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 10px;
  background: rgba(6, 9, 14, 0.5);
  color: #fff;
}

.demo-inspector div.is-current {
  border-color: rgba(240, 193, 91, 0.58);
  background: rgba(240, 193, 91, 0.11);
}

.demo-inspector strong {
  font-size: 13px;
  line-height: 1.25;
}

.demo-inspector span {
  color: rgba(247, 249, 251, 0.62);
  font-size: 12px;
}

.demo-inspector a {
  place-items: center;
  margin-top: 4px;
  border-color: rgba(255, 255, 255, 0.74);
  background: #fff;
  color: #081018;
  font-weight: 800;
  text-decoration: none;
}

.demo-scan-line {
  position: absolute;
  left: 90px;
  right: 326px;
  top: 16%;
  z-index: 8;
  height: 18px;
  opacity: 0;
  background:
    linear-gradient(180deg, transparent, rgba(110, 182, 255, 0.8), transparent);
  box-shadow: 0 0 28px rgba(110, 182, 255, 0.55);
  animation: demo-scan-line 18s linear infinite;
}

.demo-cursor {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 10;
  width: 22px;
  height: 22px;
  clip-path: polygon(0 0, 0 100%, 28% 75%, 45% 100%, 62% 91%, 45% 66%, 78% 66%);
  background: #fff;
  filter: drop-shadow(0 7px 14px rgba(0, 0, 0, 0.42));
  animation: demo-cursor 18s cubic-bezier(0.24, 0.82, 0.18, 1) infinite;
}

.demo-click {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 9;
  width: 38px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.4);
  animation: demo-click 18s linear infinite;
}

.demo-caption {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 18px;
  z-index: 9;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  pointer-events: none;
}

.demo-caption span {
  overflow: hidden;
  padding-top: 9px;
  border-top: 2px solid rgba(255, 255, 255, 0.16);
  color: rgba(247, 249, 251, 0.5);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.demo-caption span::before {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  margin-top: -11px;
  margin-bottom: 9px;
  background: #fff;
}

.demo-caption span:nth-child(1)::before { animation: demo-caption-1 18s linear infinite; }
.demo-caption span:nth-child(2)::before { animation: demo-caption-2 18s linear infinite; }
.demo-caption span:nth-child(3)::before { animation: demo-caption-3 18s linear infinite; }
.demo-caption span:nth-child(4)::before { animation: demo-caption-4 18s linear infinite; }

@keyframes demo-camera {
  0%, 18% { transform: translate3d(0, 0, 0) scale(1); }
  26%, 42% { transform: translate3d(-3%, -1%, 0) scale(1.12); }
  50%, 66% { transform: translate3d(-10%, -2%, 0) scale(1.18); }
  74%, 100% { transform: translate3d(-4%, 0, 0) scale(1.06); }
}

@keyframes demo-upload-panel {
  0%, 22% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  29%, 100% { opacity: 0; transform: translate(-50%, -54%) scale(0.92); }
}

@keyframes demo-grid-in {
  0%, 22% { opacity: 0; transform: scale(0.96); }
  31%, 100% { opacity: 1; transform: scale(1); }
}

@keyframes demo-inspector-in {
  0%, 40% { opacity: 0; transform: translateX(18px); }
  48%, 100% { opacity: 1; transform: translateX(0); }
}

@keyframes demo-results-in {
  0%, 62% { opacity: 0; transform: translateY(12px); }
  70%, 100% { opacity: 1; transform: translateY(0); }
}

@keyframes demo-scan-line {
  0%, 22% { opacity: 0; transform: translateY(0); }
  25% { opacity: 1; transform: translateY(0); }
  38% { opacity: 1; transform: translateY(420px); }
  42%, 100% { opacity: 0; transform: translateY(420px); }
}

@keyframes demo-cursor {
  0%, 8% { transform: translate3d(-22px, -12px, 0); }
  16%, 22% { transform: translate3d(42px, 64px, 0); }
  34%, 44% { transform: translate3d(176px, -118px, 0); }
  54%, 62% { transform: translate3d(318px, -128px, 0); }
  74%, 86% { transform: translate3d(322px, 112px, 0); }
  100% { transform: translate3d(-22px, -12px, 0); }
}

@keyframes demo-click {
  0%, 15%, 18%, 50%, 53%, 76%, 79%, 100% { opacity: 0; }
  16% { opacity: 0.9; transform: translate3d(42px, 64px, 0) scale(0.42); }
  17% { opacity: 0; transform: translate3d(42px, 64px, 0) scale(1.4); }
  51% { opacity: 0.9; transform: translate3d(176px, -118px, 0) scale(0.42); }
  52% { opacity: 0; transform: translate3d(176px, -118px, 0) scale(1.4); }
  77% { opacity: 0.9; transform: translate3d(322px, 112px, 0) scale(0.42); }
  78% { opacity: 0; transform: translate3d(322px, 112px, 0) scale(1.4); }
}

@keyframes demo-flag-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(240, 193, 91, 0); }
  50% { box-shadow: 0 0 22px rgba(240, 193, 91, 0.26); }
}

@keyframes demo-caption-1 { 0% { width: 0; } 3%, 24% { width: 100%; } 25%, 100% { width: 0; } }
@keyframes demo-caption-2 { 0%, 24% { width: 0; } 27%, 48% { width: 100%; } 49%, 100% { width: 0; } }
@keyframes demo-caption-3 { 0%, 48% { width: 0; } 51%, 72% { width: 100%; } 73%, 100% { width: 0; } }
@keyframes demo-caption-4 { 0%, 72% { width: 0; } 75%, 100% { width: 100%; } }

.film-copy {
  display: none;
  gap: 18px;
}

.film-copy.is-active {
  display: grid;
  animation: film-copy-in 420ms ease both;
}

.film-copy h2 {
  max-width: 11.4ch;
  margin: 0;
  color: #fff;
  font-size: clamp(48px, 5.8vw, 88px);
  line-height: 0.96;
  letter-spacing: 0;
  text-shadow: 0 18px 48px rgba(0, 0, 0, 0.66);
}

.film-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin-top: 0;
}

.film-tab {
  appearance: none;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 9px 14px;
  border: 1px solid rgba(247, 249, 251, 0.14);
  border-radius: 999px;
  background: rgba(247, 249, 251, 0.055);
  color: rgba(247, 249, 251, 0.74);
  font: 800 13px/1.1 var(--font-ui);
  letter-spacing: 0;
  text-align: left;
  cursor: pointer;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.film-tab span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 28px;
  border-radius: 999px;
  background: rgba(247, 249, 251, 0.08);
  color: rgba(247, 249, 251, 0.48);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
}

.film-tab:hover {
  border-color: rgba(247, 249, 251, 0.28);
  color: #fff;
  transform: translateY(-2px);
}

.film-tab.is-active {
  border-color: #fff;
  background: #fff;
  color: #071018;
}

.film-tab.is-active span {
  background: #071018;
  color: #fff;
}

.film-subtabs {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(247, 249, 251, 0.12);
  border-radius: 16px;
  background: rgba(247, 249, 251, 0.045);
  backdrop-filter: blur(18px);
}

.film-subtabs__body {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.film-subtab-group {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.film-subtab-group.is-active {
  display: grid;
  animation: film-copy-in 260ms ease both;
}

.film-subtab {
  appearance: none;
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(247, 249, 251, 0.12);
  border-radius: 999px;
  background: rgba(5, 8, 13, 0.42);
  color: rgba(247, 249, 251, 0.66);
  font: 800 12px/1.1 var(--font-ui);
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.film-subtab:hover {
  border-color: rgba(247, 249, 251, 0.28);
  color: #fff;
}

.film-subtab.is-active {
  border-color: rgba(145, 211, 255, 0.7);
  background: rgba(145, 211, 255, 0.16);
  color: #d9f0ff;
  box-shadow: inset 0 0 0 1px rgba(145, 211, 255, 0.22);
}

.film-subtab-caption {
  min-height: 34px;
  margin: 0;
  padding: 0 4px;
  color: rgba(247, 249, 251, 0.68);
  font-size: 12px;
  line-height: 1.4;
}

.film-screen-nav {
  appearance: none;
  position: absolute;
  top: 50%;
  z-index: 26;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(247, 249, 251, 0.14);
  border-radius: 999px;
  background: rgba(5, 8, 13, 0.58);
  color: rgba(247, 249, 251, 0.76);
  font: 900 14px/1 var(--font-ui);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
  cursor: pointer;
  transform: translateY(-50%);
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.film-screen-nav--prev {
  left: clamp(16px, 2.4vw, 34px);
}

.film-screen-nav--next {
  right: clamp(42px, 4vw, 58px);
}

.film-screen-nav:hover {
  border-color: rgba(145, 211, 255, 0.58);
  background: rgba(145, 211, 255, 0.12);
  color: #fff;
  transform: translateY(-50%) scale(1.04);
}

.film-screen-nav:active {
  transform: translateY(-50%) scale(0.98);
}

.film-cinema {
  min-width: 0;
}

.product-film__showcase {
  display: grid;
  align-content: center;
  gap: 14px;
  min-width: 0;
}

.film-screen {
  min-height: 560px;
  aspect-ratio: 16 / 10;
}

.film-panel {
  position: absolute;
  inset: 0;
  padding: clamp(18px, 2vw, 28px);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.985);
  transition:
    opacity 420ms ease,
    transform 520ms cubic-bezier(0.2, 0.82, 0.16, 1);
}

.film-panel.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.film-upload-scene,
.film-review-scene,
.film-store-scene {
  display: grid;
  height: 100%;
  min-height: 0;
  gap: clamp(14px, 1.8vw, 22px);
}

.film-upload-scene {
  grid-template-columns: minmax(250px, 0.42fr) minmax(0, 1fr);
}

.film-device,
.film-results-window,
.film-correction-panel,
.film-store-card {
  min-width: 0;
  border: 1px solid rgba(247, 249, 251, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(247, 249, 251, 0.085), rgba(247, 249, 251, 0.03)),
    rgba(5, 8, 13, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.film-device {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.film-device__bar,
.film-window-toolbar,
.film-store-card__header {
  display: grid;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: rgba(247, 249, 251, 0.7);
}

.film-device__bar {
  grid-template-columns: 22px minmax(0, 1fr) auto;
  padding: 12px;
  border-bottom: 1px solid rgba(247, 249, 251, 0.1);
}

.film-device__bar span {
  width: 16px;
  height: 16px;
  border-radius: 6px;
  background:
    linear-gradient(135deg, #91d3ff, #91d2a8);
  box-shadow: 0 0 24px rgba(145, 211, 255, 0.35);
}

.film-device__bar strong,
.film-window-toolbar strong,
.film-store-card__header strong {
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.film-device__bar small,
.film-window-toolbar small,
.film-store-card__header span {
  color: rgba(247, 249, 251, 0.5);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.film-dropzone {
  position: relative;
  overflow: hidden;
  margin: 14px;
  border-radius: 8px;
  background: #0f1720;
}

.film-dropzone img,
.film-media-card img,
.film-gallery-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.film-dropzone img {
  min-height: 100%;
  filter: contrast(1.08) brightness(0.72);
}

.film-dropzone::after {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  pointer-events: none;
}

.film-dropzone__overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  justify-items: center;
  gap: 7px;
  width: min(78%, 260px);
  padding: 18px;
  border-radius: 8px;
  background: rgba(5, 8, 13, 0.78);
  color: #fff;
  text-align: center;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(14px);
}

.film-upload-icon {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  transform: rotate(45deg);
}

.film-dropzone__overlay strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.film-dropzone__overlay small {
  color: rgba(247, 249, 251, 0.62);
  font-size: 11px;
}

.film-device__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 12px;
}

.film-device__actions span,
.film-correction-panel a {
  display: grid;
  place-items: center;
  min-height: 36px;
  border: 1px solid rgba(247, 249, 251, 0.16);
  border-radius: 999px;
  color: rgba(247, 249, 251, 0.7);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.film-device__actions .is-primary,
.film-correction-panel a {
  border-color: #fff;
  background: #fff;
  color: #071018;
}

.film-media-wall {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(132px, 1fr);
  gap: 14px;
  min-height: 0;
}

.film-media-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(247, 249, 251, 0.12);
  border-radius: 8px;
  background: rgba(247, 249, 251, 0.06);
  animation: film-card-float 5.4s ease-in-out infinite;
}

.film-media-card:nth-child(2) { animation-delay: 360ms; }
.film-media-card:nth-child(3) { animation-delay: 720ms; }
.film-media-card:nth-child(4) { animation-delay: 1080ms; }

.film-media-card--wide {
  grid-column: span 2;
}

.film-media-card img {
  filter: saturate(0.96) contrast(1.08) brightness(0.72);
  transition: transform 420ms ease;
}

.film-media-card span {
  position: absolute;
  left: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  overflow: hidden;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(5, 8, 13, 0.72);
  color: rgba(255, 255, 255, 0.86);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.film-media-card--video::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent 42%, #071018 42% 58%, transparent 58%),
    #fff;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  box-shadow: 0 0 0 12px rgba(255, 255, 255, 0.16);
  opacity: 0.9;
  transform: translate(-50%, -50%) scale(0.82);
  animation: film-video-pulse 1800ms ease-in-out infinite;
}

.film-review-scene {
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.36fr);
}

.film-results-window {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.film-window-toolbar {
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(247, 249, 251, 0.1);
}

.film-window-toolbar span {
  color: rgba(247, 249, 251, 0.54);
  font-size: 12px;
}

.film-window-toolbar small {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(240, 193, 91, 0.14);
  color: #ffe3a3;
}

.film-score-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  grid-template-rows: repeat(8, minmax(0, 1fr));
  gap: 5px;
  min-height: 0;
  padding: 18px;
}

.film-score-grid span {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(247, 249, 251, 0.12);
  border-radius: 6px;
  background: rgba(247, 249, 251, 0.075);
  color: rgba(247, 249, 251, 0.72);
  font-family: var(--font-mono);
  font-size: clamp(9px, 1vw, 13px);
  font-weight: 900;
}

.film-score-grid span.is-hit {
  border-color: rgba(84, 214, 138, 0.5);
  background: rgba(84, 214, 138, 0.18);
  color: #c8f8d8;
}

.film-score-grid span.is-flagged {
  border-color: rgba(240, 193, 91, 0.72);
  background: rgba(240, 193, 91, 0.18);
  color: #ffe3a3;
  animation: demo-flag-pulse 1700ms ease-in-out infinite;
}

.film-correction-panel {
  display: grid;
  align-content: start;
  gap: 13px;
  padding: 16px;
}

.film-correction-panel p {
  margin: 0;
  color: rgba(247, 249, 251, 0.55);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.film-flag-card,
.film-mini-summary {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(247, 249, 251, 0.12);
  border-radius: 8px;
  background: rgba(7, 13, 20, 0.78);
}

.film-flag-card {
  border-color: rgba(240, 193, 91, 0.58);
  background: rgba(240, 193, 91, 0.11);
}

.film-flag-card strong {
  color: #fff;
  font-size: 13px;
}

.film-flag-card span {
  color: rgba(247, 249, 251, 0.62);
  font-size: 12px;
}

.film-choice-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.film-choice-row button {
  appearance: none;
  min-width: 0;
  min-height: 34px;
  border: 1px solid rgba(247, 249, 251, 0.14);
  border-radius: 8px;
  background: rgba(247, 249, 251, 0.055);
  color: rgba(247, 249, 251, 0.78);
  font: 900 12px/1 var(--font-mono);
  cursor: pointer;
}

.film-choice-row button.is-selected {
  border-color: rgba(84, 214, 138, 0.58);
  background: rgba(84, 214, 138, 0.2);
  color: #c8f8d8;
}

.film-mini-summary span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: rgba(247, 249, 251, 0.58);
  font-size: 12px;
}

.film-mini-summary strong {
  color: #fff;
}

.film-store-scene {
  grid-template-columns: minmax(0, 0.98fr) minmax(290px, 0.82fr);
}

.film-store-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.film-store-card__header {
  grid-template-columns: auto minmax(0, 1fr);
  padding: 14px;
  border-bottom: 1px solid rgba(247, 249, 251, 0.1);
}

.film-store-card__header span {
  color: #91d2a8;
}

.film-gallery-preview {
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-height: 0;
  padding: 14px;
}

.film-gallery-preview article {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  grid-template-rows: 1fr 1fr;
  column-gap: 12px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(247, 249, 251, 0.11);
  border-radius: 8px;
  background: rgba(247, 249, 251, 0.055);
}

.film-gallery-preview img {
  grid-row: 1 / -1;
  min-height: 92px;
}

.film-gallery-preview strong,
.film-gallery-preview span {
  min-width: 0;
  overflow: hidden;
  align-self: end;
  padding-right: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.film-gallery-preview strong {
  color: #fff;
  font-size: 13px;
}

.film-gallery-preview span {
  align-self: start;
  color: rgba(247, 249, 251, 0.58);
  font-size: 12px;
}

.film-store-card--analytics {
  background:
    linear-gradient(145deg, rgba(145, 211, 255, 0.12), rgba(84, 214, 138, 0.07) 52%, rgba(247, 249, 251, 0.035)),
    rgba(5, 8, 13, 0.7);
}

.film-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.film-stats-grid div {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(247, 249, 251, 0.11);
  border-radius: 8px;
  background: rgba(5, 8, 13, 0.5);
}

.film-stats-grid span {
  overflow: hidden;
  color: rgba(247, 249, 251, 0.58);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.film-stats-grid strong {
  color: #fff;
  font-size: clamp(22px, 2.8vw, 34px);
  line-height: 0.95;
}

.film-trend-lines {
  display: flex;
  align-items: end;
  gap: 8px;
  min-height: 132px;
  margin: auto 14px 14px;
  padding: 12px;
  border: 1px solid rgba(247, 249, 251, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(rgba(247, 249, 251, 0.06) 1px, transparent 1px),
    rgba(5, 8, 13, 0.44);
  background-size: 100% 32px;
}

.film-trend-lines span {
  flex: 1;
  min-width: 0;
  border-radius: 999px 999px 4px 4px;
  background:
    linear-gradient(180deg, #91d3ff, #54d68a);
  transform-origin: bottom;
  animation: film-bars 2200ms ease-in-out infinite;
}

.film-trend-lines span:nth-child(2) { animation-delay: 140ms; }
.film-trend-lines span:nth-child(3) { animation-delay: 280ms; }
.film-trend-lines span:nth-child(4) { animation-delay: 420ms; }
.film-trend-lines span:nth-child(5) { animation-delay: 560ms; }
.film-trend-lines span:nth-child(6) { animation-delay: 700ms; }

[data-film-subtarget] {
  transition:
    border-color 220ms ease,
    box-shadow 220ms ease,
    filter 220ms ease,
    transform 220ms ease;
}

.product-film[data-film-substep="capture"] [data-film-subtarget="capture"],
.product-film[data-film-substep="media"] [data-film-subtarget="media"],
.product-film[data-film-substep="scan"] [data-film-subtarget="scan"],
.product-film[data-film-substep="correct"] [data-film-subtarget="correct"],
.product-film[data-film-substep="approve"] [data-film-subtarget="approve"],
.product-film[data-film-substep="gallery"] [data-film-subtarget="gallery"],
.product-film[data-film-substep="stats"] [data-film-subtarget="stats"],
.product-film[data-film-substep="insights"] [data-film-subtarget="insights"] {
  border-color: rgba(145, 211, 255, 0.72);
  box-shadow:
    0 0 0 1px rgba(145, 211, 255, 0.28),
    0 18px 42px rgba(145, 211, 255, 0.16);
  filter: brightness(1.08);
  transform: translateY(-2px);
}

.product-film[data-film-substep="flags"] .film-score-grid span.is-flagged {
  border-color: rgba(255, 227, 163, 0.92);
  box-shadow:
    0 0 0 1px rgba(255, 227, 163, 0.28),
    0 0 24px rgba(240, 193, 91, 0.32);
}

.film-cursor {
  position: absolute;
  z-index: 20;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  clip-path: polygon(0 0, 0 100%, 28% 75%, 45% 100%, 62% 91%, 45% 66%, 78% 66%);
  background: #fff;
  filter: drop-shadow(0 7px 14px rgba(0, 0, 0, 0.44));
  animation-duration: 6.8s;
  animation-timing-function: cubic-bezier(0.24, 0.82, 0.18, 1);
  animation-iteration-count: infinite;
}

.film-click {
  position: absolute;
  z-index: 19;
  left: 0;
  top: 0;
  width: 38px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.4);
  animation-duration: 6.8s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.product-film[data-film-step="upload"] .film-cursor { animation-name: film-cursor-upload; }
.product-film[data-film-step="review"] .film-cursor { animation-name: film-cursor-review; }
.product-film[data-film-step="store"] .film-cursor { animation-name: film-cursor-store; }
.product-film[data-film-step="upload"] .film-click { animation-name: film-click-upload; }
.product-film[data-film-step="review"] .film-click { animation-name: film-click-review; }
.product-film[data-film-step="store"] .film-click { animation-name: film-click-store; }

.film-progress {
  height: 3px;
  background: rgba(247, 249, 251, 0.1);
}

.film-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(90deg, #91d3ff, #91d2a8);
  transform-origin: left center;
  animation: film-progress 6.8s linear infinite;
}

@keyframes film-copy-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes film-card-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes film-video-pulse {
  0%, 100% { opacity: 0.78; transform: translate(-50%, -50%) scale(0.82); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(0.94); }
}

@keyframes film-bars {
  0%, 100% { transform: scaleY(0.82); }
  50% { transform: scaleY(1); }
}

@keyframes film-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes film-cursor-upload {
  0%, 8% { opacity: 0; left: 19%; top: 72%; }
  18%, 44% { opacity: 1; left: 24%; top: 78%; }
  64%, 92% { opacity: 1; left: 71%; top: 34%; }
  100% { opacity: 0; left: 71%; top: 34%; }
}

@keyframes film-cursor-review {
  0%, 8% { opacity: 0; left: 52%; top: 32%; }
  18%, 46% { opacity: 1; left: 66%; top: 53%; }
  68%, 92% { opacity: 1; left: 84%; top: 49%; }
  100% { opacity: 0; left: 84%; top: 49%; }
}

@keyframes film-cursor-store {
  0%, 8% { opacity: 0; left: 22%; top: 32%; }
  18%, 46% { opacity: 1; left: 30%; top: 41%; }
  70%, 92% { opacity: 1; left: 78%; top: 66%; }
  100% { opacity: 0; left: 78%; top: 66%; }
}

@keyframes film-click-upload {
  0%, 19%, 23%, 67%, 71%, 100% { opacity: 0; }
  20% { opacity: 0.85; left: 24%; top: 78%; transform: translate(-50%, -50%) scale(0.4); }
  22% { opacity: 0; left: 24%; top: 78%; transform: translate(-50%, -50%) scale(1.35); }
  68% { opacity: 0.85; left: 71%; top: 34%; transform: translate(-50%, -50%) scale(0.4); }
  70% { opacity: 0; left: 71%; top: 34%; transform: translate(-50%, -50%) scale(1.35); }
}

@keyframes film-click-review {
  0%, 21%, 25%, 70%, 74%, 100% { opacity: 0; }
  22% { opacity: 0.85; left: 66%; top: 53%; transform: translate(-50%, -50%) scale(0.4); }
  24% { opacity: 0; left: 66%; top: 53%; transform: translate(-50%, -50%) scale(1.35); }
  71% { opacity: 0.85; left: 84%; top: 49%; transform: translate(-50%, -50%) scale(0.4); }
  73% { opacity: 0; left: 84%; top: 49%; transform: translate(-50%, -50%) scale(1.35); }
}

@keyframes film-click-store {
  0%, 21%, 25%, 72%, 76%, 100% { opacity: 0; }
  22% { opacity: 0.85; left: 30%; top: 41%; transform: translate(-50%, -50%) scale(0.4); }
  24% { opacity: 0; left: 30%; top: 41%; transform: translate(-50%, -50%) scale(1.35); }
  73% { opacity: 0.85; left: 78%; top: 66%; transform: translate(-50%, -50%) scale(0.4); }
  75% { opacity: 0; left: 78%; top: 66%; transform: translate(-50%, -50%) scale(1.35); }
}

.home-motion-paused .gallery-row__track,
.home-motion-paused .demo-camera,
.home-motion-paused .demo-upload,
.home-motion-paused .demo-scorecard,
.home-motion-paused .demo-results,
.home-motion-paused .demo-inspector,
.home-motion-paused .demo-scan-line,
.home-motion-paused .demo-cursor,
.home-motion-paused .demo-click,
.home-motion-paused .demo-caption span::before,
.home-motion-paused .demo-scorecard span.is-flagged,
.home-motion-paused .film-media-card,
.home-motion-paused .film-media-card--video::after,
.home-motion-paused .film-score-grid span.is-flagged,
.home-motion-paused .film-trend-lines span,
.home-motion-paused .film-cursor,
.home-motion-paused .film-click,
.home-motion-paused .film-progress span,
.home-motion-paused .hero-kicker::before {
  animation-play-state: paused !important;
}

.home-cinematic .post-scan-stadium .subscription-stage {
  position: relative;
  z-index: 2;
  width: min(100% - 48px, 1320px);
  margin: 0 auto;
  display: grid;
  gap: clamp(24px, 3vw, 38px);
  color: #f6f4e9;
}

.home-cinematic .subscription-stage__intro {
  display: grid;
  justify-items: center;
  gap: 12px;
  max-width: 820px;
  margin-inline: auto;
  text-align: center;
}

.home-cinematic .subscription-stage__intro h2 {
  max-width: min(100%, 920px);
  margin: 0;
  color: #fff;
  font-size: clamp(42px, 5.8vw, 82px);
  line-height: 0.95;
  letter-spacing: 0;
  text-shadow: 0 18px 54px rgba(0, 0, 0, 0.58);
}

.home-cinematic .subscription-stage__intro h2 span {
  display: block;
}

.home-cinematic .subscription-stage__intro p:not(.hero-kicker) {
  max-width: 66ch;
  margin: 0;
  color: rgba(246, 244, 233, 0.72);
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.55;
}

.home-cinematic .subscription-stage .hero-kicker {
  color: #d8c98a;
}

.home-cinematic .subscription-stage .hero-kicker::before {
  background: #d8c98a;
}

.home-cinematic .subscription-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
  align-items: stretch;
}

.home-cinematic .subscription-card {
  position: relative;
  min-width: 0;
  min-height: 390px;
  overflow: hidden;
  border: 1px solid rgba(246, 244, 233, 0.14);
  border-radius: 12px;
  text-decoration: none;
  box-shadow:
    0 28px 76px rgba(0, 0, 0, 0.44),
    inset 0 1px 0 rgba(246, 244, 233, 0.1);
  opacity: 1;
  transform: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.home-cinematic #teamLibrary.post-scan-stadium.is-revealed .subscription-grid > .subscription-card {
  opacity: 1;
  transform: translateY(0);
}

.home-cinematic #teamLibrary.post-scan-stadium.is-revealed .subscription-grid > .subscription-card:nth-child(2) {
  transition-delay: 0ms;
}

.home-cinematic #teamLibrary.post-scan-stadium.is-revealed .subscription-grid > .subscription-card:nth-child(3) {
  transition-delay: 0ms;
}

.home-cinematic .subscription-card:hover,
.home-cinematic .subscription-card:focus-visible {
  border-color: rgba(246, 244, 233, 0.36);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.52),
    0 0 0 1px rgba(216, 201, 138, 0.16),
    inset 0 1px 0 rgba(246, 244, 233, 0.14);
  transform: translateY(-4px);
}

.home-cinematic .subscription-card--quick {
  background:
    linear-gradient(145deg, rgba(35, 48, 61, 0.96), rgba(16, 24, 33, 0.98)),
    #14202a;
  border-color: rgba(145, 211, 255, 0.18);
}

.home-cinematic .subscription-card--quick .pcard__stat strong {
  color: #91d3ff;
  font-size: clamp(1.05rem, 1.8vw, 1.45rem);
}

.home-cinematic .subscription-card--pressbox {
  border-color: rgba(216, 201, 138, 0.16);
}

.home-cinematic .subscription-card--clubhouse {
  border-color: rgba(201, 168, 106, 0.18);
}

.home-cinematic .subscription-card .pcard__art {
  height: 116px;
}

.home-cinematic .subscription-card .pcard__desc {
  min-height: 88px;
}

.home-cinematic .subscription-card .pcard__cta {
  margin-top: auto;
  padding-top: 18px;
}

.home-cinematic .subscription-stage__league {
  justify-self: center;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid rgba(246, 244, 233, 0.13);
  border-radius: 999px;
  background: rgba(5, 8, 13, 0.34);
  color: rgba(246, 244, 233, 0.6);
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.home-cinematic .subscription-stage__league span {
  color: rgba(246, 244, 233, 0.58);
}

.home-cinematic .subscription-stage__league a {
  color: #f6f4e9;
  font-weight: 800;
  text-decoration: none;
}

.home-cinematic .subscription-stage__league a:hover {
  text-decoration: underline;
}

.home-cinematic .home-faq {
  box-sizing: border-box;
  width: 100%;
  background: #071018;
  color: #f6f4e9;
}

.home-cinematic .home-bottom-kicker {
  margin: 0;
  color: #d8c98a;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.home-cinematic .home-faq {
  display: grid;
  grid-template-columns: minmax(400px, 0.46fr) minmax(560px, 0.54fr);
  gap: clamp(42px, 5.8vw, 96px);
  padding: clamp(58px, 8vw, 106px) max(48px, calc((100vw - 1480px) / 2));
  border-top: 1px solid rgba(216, 201, 138, 0.1);
  background:
    radial-gradient(circle at 8% 20%, rgba(216, 201, 138, 0.1), transparent 28%),
    linear-gradient(180deg, #071018 0%, #0c1716 100%);
}

.home-cinematic .home-faq__copy {
  display: grid;
  align-content: start;
  gap: 18px;
  min-width: 0;
}

.home-cinematic .home-faq__copy h2 {
  margin: 0;
  max-width: 9.5ch;
  color: #f6f4e9;
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: 0;
  text-wrap: balance;
}

.home-cinematic .home-faq__copy p {
  margin: 0;
  max-width: 31ch;
  color: rgba(246, 244, 233, 0.7);
  font-size: 16px;
  line-height: 1.55;
}

.home-cinematic .home-faq__support {
  justify-self: start;
  border-color: rgba(216, 201, 138, 0.46);
  color: #f6f4e9;
}

.home-cinematic .home-faq__support:hover {
  background: rgba(216, 201, 138, 0.12);
  border-color: rgba(216, 201, 138, 0.72);
  text-decoration: none;
}

.home-cinematic .home-faq__list {
  display: grid;
  gap: 10px;
  min-width: 0;
  align-self: start;
}

.home-cinematic .home-faq__item {
  overflow: hidden;
  border: 1px solid rgba(216, 201, 138, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(246, 244, 233, 0.055), rgba(246, 244, 233, 0.025));
  box-shadow: inset 0 1px 0 rgba(246, 244, 233, 0.08);
}

.home-cinematic .home-faq__item summary {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 18px;
  gap: 14px;
  align-items: center;
  min-height: 76px;
  padding: 16px clamp(16px, 2vw, 24px);
  color: #f6f4e9;
  cursor: pointer;
  font-size: clamp(16px, 1.16vw, 18px);
  font-weight: 800;
  line-height: 1.3;
  list-style: none;
}

.home-cinematic .home-faq__item summary::-webkit-details-marker {
  display: none;
}

.home-cinematic .home-faq__item summary span {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(216, 201, 138, 0.26);
  border-radius: 6px;
  background: rgba(216, 201, 138, 0.08);
  color: #d8c98a;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.home-cinematic .home-faq__item summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid rgba(216, 201, 138, 0.86);
  border-bottom: 2px solid rgba(216, 201, 138, 0.86);
  transform: rotate(45deg);
  transition: transform 180ms ease;
}

.home-cinematic .home-faq__item[open] summary::after {
  transform: translateY(4px) rotate(225deg);
}

.home-cinematic .home-faq__item summary:focus-visible {
  outline: 2px solid #d8c98a;
  outline-offset: -6px;
}

.home-cinematic .home-faq__item p {
  margin: 0;
  padding: 0 clamp(16px, 2vw, 24px) 22px calc(clamp(16px, 2vw, 24px) + 62px);
  color: rgba(246, 244, 233, 0.68);
  font-size: 15px;
  line-height: 1.55;
}

.home-cinematic > .home-mega-footer {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(38px, 5vw, 66px) max(48px, calc((100vw - 1480px) / 2)) 0;
  display: grid;
  gap: clamp(24px, 4vw, 48px);
  align-items: stretch;
  border-top: 1px solid rgba(216, 201, 138, 0.1);
  background: #071018;
  color: rgba(246, 244, 233, 0.76);
}

.home-mega-footer__top {
  display: grid;
  width: min(100%, 1480px);
  margin-inline: auto;
  grid-template-columns: minmax(280px, 1.18fr) repeat(4, minmax(145px, 1fr));
  gap: clamp(30px, 3.2vw, 52px);
  align-items: start;
}

.home-mega-footer__brand {
  display: grid;
  align-content: start;
  gap: 18px;
  min-width: 0;
}

.home-mega-footer__brand .brand {
  color: #f6f4e9;
  font-size: 18px;
}

.home-mega-footer__brand p {
  max-width: 30ch;
  margin: 0;
  color: rgba(246, 244, 233, 0.62);
  font-size: 15px;
  line-height: 1.5;
}

.home-mega-footer__mini-score {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  width: min(100%, 300px);
  border: 1px solid rgba(216, 201, 138, 0.18);
  border-radius: 8px;
  color: #d8c98a;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.home-mega-footer__mini-score span {
  padding: 10px 8px;
  border-left: 1px solid rgba(216, 201, 138, 0.14);
  text-align: center;
}

.home-mega-footer__mini-score span:first-child {
  border-left: 0;
}

.home-mega-footer__columns {
  display: contents;
}

.home-mega-footer nav {
  display: grid;
  align-content: start;
  gap: 12px;
}

.home-mega-footer h2 {
  margin: 0 0 8px;
  color: #d8c98a;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-mega-footer a {
  color: rgba(246, 244, 233, 0.7);
  font-size: 15px;
  line-height: 1.25;
  text-decoration: none;
}

.home-mega-footer a:hover {
  color: #f6f4e9;
  text-decoration: none;
}

.home-footer-link--mobile {
  display: none;
}

.home-mega-footer__bottom {
  width: min(100%, 1480px);
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0;
  border-top: 1px solid rgba(216, 201, 138, 0.1);
  color: rgba(246, 244, 233, 0.52);
  font-size: 12px;
}

.home-mega-footer__bottom p {
  margin: 0;
}

.home-cinematic .post-scan-stadium {
  --bg-elev: #fffaf1;
  --surface: #fffaf1;
  --surface-2: #f1e8d7;
  --border: rgba(31, 42, 55, 0.14);
  --border-strong: rgba(31, 42, 55, 0.28);
  --text: #151b22;
  --text-2: #2c3742;
  --text-muted: #626d78;
  --text-faint: #8a94a0;
  background:
    linear-gradient(180deg, #071018 0%, #08111b 42%, #0b0f14 100%);
}

.home-cinematic .post-scan-stadium .path-card {
  color: #151b22;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(235, 239, 242, 0.9));
  border-color: rgba(255, 255, 255, 0.22);
}

.home-cinematic .post-scan-stadium .path-card__title {
  color: #151b22;
}

.home-cinematic .post-scan-stadium .path-card__body,
.home-cinematic .post-scan-stadium .path-card__list li,
.home-cinematic .post-scan-stadium .path-card__meta {
  color: #626d78;
}

.home-cinematic .post-scan-stadium .path-card--primary {
  background:
    linear-gradient(180deg, rgba(226, 243, 255, 0.96), rgba(255, 255, 255, 0.9));
}

@media (max-width: 1180px) {
  .home-cinematic .home-faq {
    grid-template-columns: 1fr;
  }

  .home-cinematic .home-faq__copy {
    justify-items: center;
    text-align: center;
  }

  .home-cinematic .home-faq__copy h2,
  .home-cinematic .home-faq__copy p {
    max-width: 760px;
  }

  .home-cinematic .home-faq__support {
    justify-self: center;
  }

  .home-mega-footer__top {
    grid-template-columns: 1fr;
  }

  .home-mega-footer__columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {

  .home-cinematic .subscription-grid {
    grid-template-columns: 1fr;
  }

  .home-cinematic .subscription-card {
    min-height: 0;
  }

  .home-cinematic .subscription-card .pcard__desc {
    min-height: 0;
  }

  .product-film {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .product-film__copy {
    justify-items: center;
    text-align: center;
  }

  .product-film__copy h2 {
    max-width: 14ch;
  }

  .product-film__copy .hero-sub {
    margin-inline: auto;
  }

  .film-tabs {
    margin-inline: auto;
  }

  .film-screen {
    min-height: 620px;
  }

  .film-upload-scene,
  .film-review-scene,
  .film-store-scene {
    grid-template-columns: 1fr;
  }

  .film-media-wall {
    grid-auto-rows: minmax(118px, 1fr);
  }

  .film-store-scene {
    min-height: 700px;
  }

  .demo-camera {
    grid-template-columns: 56px minmax(0, 1fr) 232px;
    gap: 14px;
    padding: 18px;
  }
}

@media (max-width: 760px) {
  .home-cinematic .flow-hero,
  .home-cinematic .product-film {
    display: none;
  }
}

@media (max-width: 680px) {
  .home-cinematic .home-faq {
    padding-inline: 16px;
  }

  .home-cinematic .home-faq__copy {
    justify-items: start;
    text-align: left;
  }

  .home-cinematic .home-faq__support {
    justify-self: start;
  }

  .home-cinematic .home-faq__item summary {
    grid-template-columns: 38px minmax(0, 1fr) 14px;
    gap: 10px;
    min-height: 70px;
    padding-inline: 16px;
  }

  .home-cinematic .home-faq__item summary span {
    width: 34px;
    height: 34px;
  }

  .home-cinematic .home-faq__item p {
    padding: 0 16px 22px 64px;
  }

  .home-cinematic > .home-mega-footer {
    padding-inline: 24px;
  }

  .home-mega-footer__columns {
    display: grid;
    grid-template-columns: 1fr;
  }

  .home-mega-footer__bottom {
    flex-direction: column;
  }

  .home-cinematic .post-scan-stadium .subscription-stage {
    width: min(100% - 28px, 1320px);
  }

  .home-cinematic .subscription-stage__intro h2 {
    font-size: clamp(38px, 12vw, 58px);
  }

  .home-cinematic .subscription-stage__league {
    border-radius: 12px;
  }

  .flow-hero {
    min-height: calc(100vh - 118px);
    padding-inline: 18px;
  }

  .flow-hero h1 {
    font-size: clamp(54px, 18vw, 92px);
  }

  .flow-hero__sub {
    font-size: 16px;
  }

  .flow-hero__rail,
  .flow-hero__motion-toggle {
    display: none;
  }

  .product-film {
    padding-inline: 16px;
  }

  .demo-cinema__chrome {
    grid-template-columns: 10px 10px 10px 1fr;
  }

  .demo-cinema__chrome button {
    display: none;
  }

  .demo-screen {
    min-height: 520px;
    aspect-ratio: auto;
  }

  .film-screen {
    min-height: 680px;
  }

  .film-tab {
    min-height: 46px;
    font-size: 12px;
  }

  .film-panel {
    padding: 16px;
  }

  .film-media-wall {
    grid-template-columns: 1fr;
  }

  .film-media-card--wide {
    grid-column: auto;
  }

  .film-window-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .film-window-toolbar span {
    display: none;
  }

  .film-gallery-preview article {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .demo-camera {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .demo-sidebar {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    justify-content: start;
    padding: 10px 12px;
  }

  .demo-inspector {
    grid-template-columns: 1fr;
  }

  .demo-caption {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-row__track,
  .mobile-motion-row,
  .demo-camera,
  .demo-upload,
  .demo-scorecard,
  .demo-results,
  .demo-inspector,
  .demo-scan-line,
  .demo-cursor,
  .demo-click,
  .demo-caption span::before,
  .demo-scorecard span.is-flagged {
    animation: none !important;
  }

  .demo-upload {
    opacity: 0;
  }

  .demo-scorecard,
  .demo-results,
  .demo-inspector {
    opacity: 1;
    transform: none;
  }

  .film-panel {
    transition: none;
  }

  .film-media-card,
  .film-media-card--video::after,
  .film-score-grid span.is-flagged,
  .film-trend-lines span,
  .film-cursor,
  .film-click,
  .film-progress span {
    animation: none !important;
  }

  .home-cinematic .subscription-card {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .demo-scan-line,
  .demo-cursor,
  .demo-click,
  .film-cursor,
  .film-click,
  .mobile-demo-phone__scan-line {
    display: none;
  }
}
