:root {
  --felt: #10241c;
  --felt-mid: #1a3a2c;
  --red: #b42318;
  --red-deep: #8c1d14;
  --green: #1f7a45;
  --cream: #f4efe6;
  --cream-2: #e8e0d1;
  --paper: #fffaf3;
  --ink: #1c1916;
  --brass: #8a6230;
  --brass-2: #e4c78a;
  --muted: #3f3a34;
  --muted-dark: #d9d0c3;
  --line: rgba(28, 25, 22, 0.14);
  --shadow: 0 18px 40px rgba(28, 25, 22, 0.12);
  --display: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  --sans: Outfit, "Segoe UI", sans-serif;
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  font-size: 18px;
}

body {
  margin: 0;
  padding-bottom: calc(5.6rem + env(safe-area-inset-bottom));
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.45;
}

img { max-width: 100%; height: auto; }

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

a { color: var(--red-deep); }

a:hover { color: var(--red); }

:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 3px;
}

[hidden] { display: none !important; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 50;
  background: var(--ink);
  color: var(--cream);
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
}

.skip-link:focus { top: 0.6rem; }

.wrap {
  width: min(1120px, calc(100% - 1.5rem));
  margin-inline: auto;
}

.dart-stripe {
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    #b42318 0 16px,
    #1c1916 16px 24px,
    #1f7a45 24px 40px,
    #f4efe6 40px 48px
  );
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(244, 239, 230, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-bar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 4.25rem;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
}

.wordmark strong {
  display: block;
  font-family: var(--display);
  font-size: 1.8rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 0.85;
}

.wordmark small {
  display: block;
  margin-top: 0.15rem;
  color: var(--red-deep);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-button {
  display: none;
  align-items: center;
  gap: 0.45rem;
  min-height: 48px;
  min-width: 48px;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-weight: 700;
  cursor: pointer;
}

.nav-bars {
  width: 1rem;
  height: 2px;
  background: var(--ink);
  box-shadow: 0 -5px 0 var(--ink), 0 5px 0 var(--ink);
}

#site-nav {
  display: none;
}

#site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.45rem 0.7rem;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.mock-banner {
  margin: 0;
  padding: 0.85rem 1.25rem;
  background: var(--felt);
  color: var(--cream);
  font-size: 1rem;
  line-height: 1.4;
}

.mock-banner a { color: var(--brass-2); }

.hero {
  background:
    radial-gradient(circle at 90% 10%, rgba(228, 199, 138, 0.16), transparent 28%),
    var(--felt);
  color: var(--cream);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: 1.5rem;
  padding: 1.75rem 0 2.5rem;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--red-deep);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.band-dark .eyebrow,
.hero .eyebrow { color: var(--brass-2); }

h1, h2, h3 { line-height: 0.95; }

.lock-card h1,
.admin-top h1 {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-size: clamp(2.4rem, 8vw, 3.6rem);
  font-weight: 400;
  letter-spacing: 0.03em;
}

.line-small,
.line-big,
.line-place { display: block; }

.line-small {
  font-family: var(--display);
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 400;
  letter-spacing: 0.04em;
}

.line-big {
  font-family: var(--display);
  font-size: clamp(3.4rem, 16vw, 7rem);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.line-place {
  margin-top: 0.35rem;
  font-size: clamp(1.25rem, 3vw, 1.8rem);
  font-weight: 550;
  font-weight: 500;
  color: var(--brass-2);
  line-height: 1.2;
}

.hero h1 { margin: 0.2rem 0 0.8rem; }

.hero a { color: var(--brass-2); }

.lede {
  margin: 0;
  max-width: 38rem;
  color: var(--muted-dark);
  font-size: 1.125rem;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.hero-actions .btn { width: 100%; }

.hero-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.hero-facts li {
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(228, 199, 138, 0.28);
  border-radius: 12px;
}

.hero-facts span {
  display: block;
  color: var(--brass-2);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-visual { position: relative; }

.hero-board {
  display: none;
  width: 230px;
  height: auto;
}

.hero-photo {
  margin: 0;
  border: 1px solid rgba(228, 199, 138, 0.5);
  border-radius: 18px;
  overflow: hidden;
  background: #0c1612;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
}

.hero-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 30%;
}

.hero-photo figcaption {
  padding: 0.7rem 0.9rem 0.85rem;
  color: var(--brass-2);
  font-size: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.65rem 1.15rem;
  border: 2px solid transparent;
  border-radius: 999px;
  background: transparent;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary { background: var(--red); color: white; }
.btn-primary:hover { background: var(--red-deep); color: white; }

.btn-fix {
  background: #f0b429;
  color: #1c1916;
  border-color: #6b4a00;
}
.btn-fix:hover { background: #d99a12; color: #1c1916; }

.btn-ghost { border-color: var(--brass-2); color: var(--cream); }
.btn-ghost:hover { background: rgba(228, 199, 138, 0.12); color: white; }

.btn-ink { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ink:hover { background: var(--ink); color: var(--cream); }

.btn-small { min-height: 48px; min-width: 48px; padding: 0.5rem 0.9rem; font-size: 1rem; }

.btn:disabled { opacity: 0.55; cursor: wait; }

.section { padding: 3.25rem 0; }

.section-head { margin-bottom: 1.25rem; }

h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.4rem, 8vw, 3.6rem);
  font-weight: 400;
  letter-spacing: 0.03em;
}

h3 {
  margin: 0 0 0.4rem;
  font-size: 1.25rem;
  line-height: 1.2;
}

.prose { max-width: 42rem; }

.prose p,
.section > .wrap > p { margin-top: 0; }

.about-grid,
.location-grid {
  display: grid;
  gap: 1.25rem;
}

.about-board {
  width: min(220px, 60vw);
  height: auto;
  justify-self: center;
}

.fact-list,
.roster,
.news-list,
.recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fact-list li {
  display: grid;
  gap: 0.15rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}

.fact-list span {
  color: #5c3e1c;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.placeholder-note,
.security-note {
  padding: 1rem 1.05rem;
  border: 1.5px dashed var(--brass);
  border-radius: 14px;
  background: rgba(138, 98, 48, 0.08);
}

.placeholder-note strong,
.security-note strong { color: var(--red-deep); }

.band-dark {
  background: var(--felt);
  color: var(--cream);
}

.band-dark a { color: var(--brass-2); }

.band-alt { background: var(--cream-2); }

.sample-tag {
  display: inline-block;
  margin-right: 0.3rem;
  padding: 0.08rem 0.35rem;
  border: 1px solid currentColor;
  border-radius: 3px;
  color: var(--red-deep);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.4;
  vertical-align: 0.1em;
  white-space: nowrap;
}

.band-dark .sample-tag { color: var(--brass-2); }

.sample-banner {
  display: inline-block;
  margin: 0 0 0.9rem;
  padding: 0.45rem 0.65rem;
  border: 2px solid var(--red);
  color: var(--red-deep);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

th, td {
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

caption {
  caption-side: bottom;
  padding: 0.75rem 0.9rem 0.9rem;
  color: var(--muted);
  font-size: 1rem;
  text-align: left;
}

thead th {
  background: #efe8da;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tbody th {
  position: sticky;
  left: 0;
  background: var(--paper);
  z-index: 1;
}

.num { text-align: right; font-weight: 700; }

.band-dark .table-scroll {
  background: #173528;
  border-color: rgba(228, 199, 138, 0.28);
}

.band-dark th,
.band-dark td {
  border-bottom-color: rgba(244, 239, 230, 0.12);
  color: var(--cream);
}

.band-dark thead th {
  background: #10241c;
  color: var(--brass-2);
}

.band-dark tbody th { background: #173528; }

.band-dark caption { color: var(--muted-dark); }

tr.is-fresh th,
tr.is-fresh td { animation: fresh 2.6s ease; }

.swipe-hint {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 1rem;
}

.band-dark .swipe-hint { color: var(--muted-dark); }

.formula,
.mode-line,
.status {
  color: var(--muted);
  font-size: 1rem;
}

.band-dark .formula,
.band-dark .mode-line,
.band-dark .status { color: var(--muted-dark); }

.status.is-error,
.alert { color: var(--red-deep); font-weight: 700; }

.recent-list li {
  padding: 0.75rem 0;
  border-top: 1px solid rgba(244, 239, 230, 0.14);
}

.sheet {
  padding: 1rem;
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow);
  min-width: 0;
  max-width: 100%;
}

.sheet-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--ink);
}

.sheet-top p { margin: 0; color: var(--muted); }

.form-grid,
.game-list { display: grid; gap: 0.85rem; min-width: 0; }

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  max-width: 100%;
  font-size: 1.05rem;
  font-weight: 700;
}

.field input,
.field select,
.file-btn {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 52px;
  padding: 0.65rem 0.75rem;
  border: 2px solid #1c1916;
  border-radius: 12px;
  background: white;
  font-size: 1.2rem;
  font-weight: 600;
}

.game-row {
  display: grid;
  gap: 0.7rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-left: 5px solid var(--red);
  border-radius: 12px;
  background: #fff;
}

.game-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
}

.text-btn {
  min-height: 48px;
  min-width: 48px;
  border: 0;
  background: none;
  color: var(--red-deep);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

.winner-picks {
  display: flex;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.winner-picks legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.winner-picks label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 700;
}

.winner-picks label:has(input:checked) {
  background: var(--felt);
  color: var(--cream);
  border-color: var(--felt);
}

.tally {
  margin: 1rem 0;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  background: var(--felt);
  color: var(--cream);
  font-weight: 700;
}

.form-actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.review-list { margin: 0.5rem 0 1rem; padding-left: 1.1rem; }

.team-grid,
.news-grid,
.gallery {
  display: grid;
  gap: 1rem;
}

.team-card,
.news-card,
.admin-card {
  padding: 1rem;
  border-radius: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.team-card .record,
.news-card time,
.muted { color: var(--muted); }

.roster li { padding: 0.25rem 0; }

.address { font-style: normal; }

.address p { margin: 0.2rem 0; }

.map-frame {
  width: 100%;
  min-height: 280px;
  border: 0;
  border-radius: 16px;
  background: var(--cream-2);
}

.shot { margin: 0; }

.shot img,
.shot-missing {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
  background: #1c1916;
}

.shot-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: none;
  cursor: zoom-in;
}

.shot figcaption,
.life-card figcaption {
  padding: 0.55rem 0.1rem 0;
  color: var(--muted);
  font-size: 1rem;
}

.shot-missing {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.35rem;
  padding: 1rem;
  border: 1.5px dashed var(--brass);
  background:
    linear-gradient(180deg, rgba(16, 36, 28, 0.04), rgba(16, 36, 28, 0.02));
  text-align: center;
}

.shot-missing p { margin: 0; }

.life-strip {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.4rem;
}

.life-card {
  flex: 0 0 82%;
  margin: 0;
  scroll-snap-align: start;
}

.life-card img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  background: #111;
}

#lightbox {
  width: min(920px, calc(100vw - 1.5rem));
  max-height: calc(100vh - 1.5rem);
  padding: 0.75rem;
  border: 0;
  border-radius: 16px;
  background: var(--felt);
  color: var(--cream);
}

#lightbox::backdrop { background: rgba(8, 12, 10, 0.82); }

#lightbox img {
  display: block;
  max-height: calc(100vh - 8rem);
  margin: 0.5rem auto 0;
}

#lightbox p { margin: 0.6rem 0 0.2rem; }

.site-footer {
  padding: 2rem 0 2.5rem;
  background: #0b1914;
  color: var(--muted-dark);
}

.site-footer a { color: var(--brass-2); }

.asset-version {
  margin: 0.75rem 0 0;
  color: var(--brass-2);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.site-footer .wordmark { color: var(--cream); margin-bottom: 0.8rem; }

.footer-grid {
  display: grid;
  gap: 1rem;
}

.empty { margin: 0; }

.admin-top {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 1rem;
}

.page-admin { background: var(--cream-2); }

.page-admin main { padding: 1.5rem 0 3rem; }

.lock-card {
  width: min(38rem, 100%);
  margin: 1rem auto;
  padding: 1.25rem;
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.stack { display: grid; gap: 0.75rem; }

.admin-card + .admin-card,
.stack > * + * { margin-top: 0; }

.list-block { display: grid; gap: 0.7rem; margin-top: 1rem; }

@media (min-width: 700px) {
  .hero-actions { flex-direction: row; flex-wrap: wrap; }
  .hero-actions .btn { width: auto; flex: 1 1 14rem; }
  .hero-facts { grid-template-columns: repeat(3, 1fr); }
  .form-grid.cols-3 { grid-template-columns: 1.1fr 1fr 1fr; }
  .game-row { grid-template-columns: 1fr 1fr; }
  .game-row-top,
  .winner-picks { grid-column: 1 / -1; }
  .team-grid,
  .gallery,
  .news-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1.4fr 0.8fr; align-items: center; }
  .about-board { justify-self: end; }
  .location-grid { grid-template-columns: 0.85fr 1.15fr; align-items: start; }
  .footer-grid { grid-template-columns: 1.2fr 1fr 0.8fr; }
  .form-actions { flex-direction: row; }
  .form-actions .btn { width: auto; }
  .admin-top { flex-direction: row; align-items: center; }
  .roster-grid { grid-template-columns: repeat(4, 1fr); }
  .shooter { grid-template-columns: 7rem 1fr 8rem; align-items: end; }
  .shooter-label { margin: 0 0 0.55rem; }
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    min-height: calc(100svh - 8rem);
    padding: 2.5rem 0 3.5rem;
  }
  .hero-board {
    display: block;
    position: absolute;
    left: -4.5rem;
    top: -2rem;
    width: 250px;
    z-index: 0;
  }
  .hero-photo { position: relative; z-index: 1; }
  .life-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow: visible;
  }
  .life-card { flex: none; }
  .life-hint { display: none; }
  .news-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .thumb-nav { display: none; }
  .header-bar { flex-wrap: nowrap; }
  #site-nav { display: block; flex: 1 1 auto; min-width: 0; }
  #site-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.15rem 0.35rem;
  }
  .save-bar {
    left: 50%;
    right: auto;
    width: min(1120px, calc(100% - 2.5rem));
    transform: translateX(-50%);
    bottom: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  tr.is-fresh th,
  tr.is-fresh td { animation: none; background: rgba(180, 35, 24, 0.12); }
}

@keyframes fresh {
  from { background: rgba(180, 35, 24, 0.2); }
  to { background: transparent; }
}

.experimental-banner {
  margin: 0;
  padding: 0.55rem 1rem;
  background: var(--red-deep);
  color: white;
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.page-upload main { padding: 0.45rem 0 3rem; }

.page-upload .stack { margin-top: 0; }

.page-upload .header-bar {
  min-height: 3.4rem;
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
}

.page-upload h1 {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  font-size: clamp(2.2rem, 10vw, 4rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 0.95;
}

.ocr-summary { font-weight: 650; }

.warning-list {
  margin: 0.35rem 0 1rem;
  padding-left: 1.15rem;
  color: var(--red-deep);
  font-weight: 650;
}

.align-preview {
  display: block;
  width: min(100%, 960px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

.final-score {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.1;
}

.side-block { margin-top: 1.35rem; }

.side-block h3,
.winners-heading {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
}

.bubble-table th,
.bubble-table td {
  padding: 0.45rem 0.5rem;
  vertical-align: top;
}

.bubble-table input {
  width: 100%;
  min-width: 4.2rem;
  min-height: 44px;
  padding: 0.35rem 0.45rem;
}

.bubble-table input.is-blank {
  border-style: dashed;
  border-color: var(--brass);
}

.bubble-table input.is-ambiguous {
  border-color: var(--red);
  background: #fff1ee;
}

.bubble-flag {
  display: block;
  min-height: 1.25rem;
  margin-top: 0.2rem;
  color: var(--red-deep);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.cross-checks { margin: 0.55rem 0 0.2rem; }

.cross-check {
  margin: 0.15rem 0;
  color: var(--muted);
  font-size: 1rem;
}

.cross-check.is-bad {
  color: var(--red-deep);
  font-weight: 700;
}

.winner-grid { margin-top: 0.35rem; }

.page-upload .stack { margin-top: 0; }

.btn-xl {
  min-height: 4.25rem;
  padding: 0.9rem 1.3rem;
  font-size: 1.35rem;
  border-width: 3px;
}

.camera-panel {
  margin: 0.75rem 0 1rem;
  scroll-margin-top: 5.5rem;
  scroll-margin-bottom: 6rem;
}

.camera-stage {
  position: relative;
  width: 100%;
  max-height: min(52vh, 70vh);
  overflow: hidden;
  background: #000;
  border: 4px solid #10241c;
  border-radius: 12px;
}

.camera-stage video {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: min(52vh, 70vh);
  height: auto;
  object-fit: contain;
  background: #000;
}

.camera-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.camera-status {
  margin: 0;
  padding: 0.85rem 1rem;
  background: #10241c;
  color: #fff;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.2;
}

.camera-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.btn-cancel {
  background: #10241c;
  color: #fff;
  border-color: #10241c;
}

.btn-cancel:hover { background: #000; color: #fff; }

.roster-table input,
.game-card select,
.game-card input {
  min-height: 2.75rem;
  font-size: 1.15rem;
}

.game-card {
  margin: 0.85rem 0;
  padding: 0.9rem 0.85rem 0.4rem;
  border: 2px solid #1c1916;
  border-radius: 16px;
  background: #fff;
  min-width: 0;
  max-width: 100%;
}

.game-card h3 {
  margin: 0;
  font-size: 1.45rem;
}

.game-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  min-height: 48px;
  margin: 0 0 0.35rem;
  padding: 0.2rem 0.1rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.game-toggle-state {
  flex: 0 0 auto;
  color: var(--red-deep);
  font-size: 1rem;
  font-weight: 800;
}

.game-card.is-collapsed .game-body { display: none; }

.game-card.is-collapsed .game-toggle { margin-bottom: 0; }

.missing-summary {
  margin: 0 0 1rem;
  padding: 0.9rem 0.85rem;
  border: 4px solid #b42318;
  border-radius: 16px;
  background: #fff1ee;
}

.missing-summary p {
  margin: 0 0 0.55rem;
  color: #8c1d14;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
}

.missing-summary ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.missing-summary button {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  overflow-wrap: anywhere;
  margin: 0.4rem 0 0;
  padding: 0.55rem 0.75rem;
  border: 3px solid #8c1d14;
  border-radius: 12px;
  background: #fff;
  color: #8c1d14;
  font: inherit;
  font-weight: 800;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

.missing-note:empty { display: none; }

.missing-note {
  display: block;
  margin-top: 0.3rem;
  color: #8c1d14;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
}

.field.is-missing input,
.field.is-missing select {
  border: 4px solid #b42318;
  background: #fff1ee;
  box-shadow: inset 0 0 0 2px #b42318;
}

#confirm-form .field {
  scroll-margin-top: 6rem;
  scroll-margin-bottom: 18rem;
}

.thumb-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.25rem;
  padding: 0.35rem 0.4rem calc(0.35rem + env(safe-area-inset-bottom));
  background: var(--felt);
  border-top: 3px solid var(--brass-2);
}

.thumb-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.3rem 0.15rem;
  border-radius: 12px;
  color: var(--cream);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
}

.thumb-nav a[aria-current="page"] {
  background: var(--red);
  color: white;
}

.footer-grid .footer-links { grid-column: 1 / -1; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.35rem 0.8rem;
  border: 2px solid var(--brass-2);
  border-radius: 999px;
  color: var(--cream);
  font-weight: 700;
  text-decoration: none;
}

.scan-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  margin: 0 0 0.45rem;
  padding: 0;
  list-style: none;
}

.scan-steps li {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 56px;
  padding: 0.35rem 0.2rem;
  border: 2px solid #1c1916;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  text-align: center;
}

.scan-steps li span {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--cream-2);
}

.scan-steps li.is-current {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

.scan-steps li.is-current span {
  background: var(--red);
  color: white;
}

.scan-steps li.is-done {
  border-color: var(--green);
}

.scan-steps li.is-done span {
  background: var(--green);
  color: white;
}

.step-status {
  margin: 0 0 0.55rem;
  padding: 0.6rem 0.8rem;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: #fff;
  font-size: 1.15rem;
  font-weight: 750;
  font-weight: 700;
  line-height: 1.35;
}

.scan-actions {
  display: grid;
  gap: 0.75rem;
}

.scan-actions .btn { width: 100%; }

.file-cta { cursor: pointer; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.form-actions { flex-direction: column; }
.form-actions .btn { width: 100%; }

.roster-note { margin: 0 0 0.6rem; font-weight: 650; }

.roster-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  min-width: 0;
}

.shooter {
  display: grid;
  gap: 0.45rem;
  margin: 0.75rem 0;
  padding-top: 0.75rem;
  border-top: 2px solid var(--line);
  min-width: 0;
}

.shooter-label {
  margin: 0;
  font-weight: 800;
}

.game-totals {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.4rem;
  min-width: 0;
}

#confirm-form { padding-bottom: 16rem; }

.save-bar {
  position: fixed;
  left: 0.5rem;
  right: 0.5rem;
  bottom: calc(5.15rem + env(safe-area-inset-bottom));
  z-index: 35;
  display: grid;
  gap: 0.35rem;
  padding: 0.45rem 0.55rem 0.5rem;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 12px 30px rgba(28, 25, 22, 0.28);
}

.save-bar .btn { width: 100%; }

.save-heading {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin: 0;
  min-width: 0;
  line-height: 1.1;
}

.save-totals .eyebrow {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.save-score-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 0.2rem;
  margin: 0.1rem 0 0;
  min-width: 0;
}

.save-score {
  margin: 0;
  min-width: 0;
  text-align: center;
}

.save-score span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.save-score strong {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.15;
}

.save-score-sum {
  border-left: 2px solid var(--line);
}

.save-score-sum strong { color: var(--red-deep); }

.team-total-display {
  display: block;
  margin: 0;
  padding: 0.15rem 0 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
}

.save-bar .status { margin: 0.2rem 0 0; }

.standings-fit {
  overflow: visible;
  border: 0;
  background: transparent;
}

.standings-fit table,
.standings-fit tbody { display: block; }

.standings-fit thead {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.standings-fit tr {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.75rem;
  margin: 0 0 0.75rem;
  padding: 0.9rem 0.95rem;
  border: 2px solid #1c1916;
  border-radius: 16px;
  background: var(--paper);
}

.standings-fit th,
.standings-fit td {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
}

.standings-fit th[scope="row"] {
  grid-column: 1 / -1;
  font-size: 1.35rem;
  line-height: 1.2;
}

.standings-fit td[data-label="Rank"] { grid-column: 1 / -1; }

.standings-fit td::before {
  content: attr(data-label);
  display: block;
  margin-bottom: 0.1rem;
  color: #5c3e1c;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.band-dark .standings-fit tr {
  background: #173528;
  border-color: rgba(228, 199, 138, 0.45);
}

.band-dark .standings-fit th,
.band-dark .standings-fit td { color: var(--cream); }

.band-dark .standings-fit td::before { color: var(--brass-2); }

.fit-table { overflow-x: visible; }

.fit-table table { table-layout: fixed; }

.fit-table th,
.fit-table td {
  overflow-wrap: anywhere;
  padding: 0.7rem 0.45rem;
}

label:has(> input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 48px;
  font-size: 1.05rem;
  font-weight: 700;
}

label:has(> input[type="checkbox"]) input {
  width: 1.6rem;
  height: 1.6rem;
}

@media (min-width: 800px) {
  .camera-stage,
  .camera-stage video { max-height: 70vh; }
  .standings-fit {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--paper);
  }
  .standings-fit table { display: table; min-width: 100%; }
  .standings-fit thead {
    position: static;
    display: table-header-group;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }
  .standings-fit tbody { display: table-row-group; }
  .standings-fit tr {
    display: table-row;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .standings-fit th,
  .standings-fit td {
    display: table-cell;
    padding: 0.8rem 0.9rem;
    border-bottom: 1px solid var(--line);
  }
  .standings-fit td::before { content: none; }
  .standings-fit tbody th { position: sticky; left: 0; background: var(--paper); }
  .band-dark .standings-fit {
    background: #173528;
    border-color: rgba(228, 199, 138, 0.28);
  }
  .band-dark .standings-fit tbody th { background: #173528; }
  .game-totals { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 960px) {
  .wrap { width: min(1120px, calc(100% - 2.5rem)); }
}

@media (min-width: 700px) {
  .form-actions .btn { width: auto; }
}
