/* ==========================================================================
   HOGLINE — "Night Ice" design system
   One stylesheet. No frameworks. The house rings are the brand.
   ========================================================================== */

@font-face {
  font-family: "Barlow Condensed";
  src: url("/assets/fonts/barlow-condensed-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("/assets/fonts/barlow-condensed-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* --- night ice palette --- */
  --ice-0: #070b12;            /* rink at lights-out */
  --ice-1: #0b1220;            /* page background */
  --ice-2: #101a2c;            /* raised surface */
  --ice-3: #16233b;            /* hover surface */
  --frost: #e8eef7;            /* primary text */
  --frost-dim: #93a3ba;        /* secondary text */
  --frost-faint: #5b6b84;      /* hints, meta */
  --hairline: rgba(148, 190, 255, 0.14);
  --hairline-strong: rgba(148, 190, 255, 0.28);

  /* --- the house --- */
  --house-blue: #2f6fc2;       /* 12-foot ring */
  --house-blue-hi: #7db3ef;
  --house-red: #d8432f;        /* 4-foot ring — hammer, LIVE, danger */
  --button-white: #f4f7fb;     /* the button (center) */
  --sweep-cyan: #63d7e6;       /* skip's broom tape — focus & live accents */

  /* --- type --- */
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: Seravek, "Gill Sans Nova", Ubuntu, Calibri, "DejaVu Sans", source-sans-pro, sans-serif;

  --radius: 10px;
  --radius-lg: 16px;
  --pad: 1rem;
  --speed: 180ms;
}

/* 2026 workspace reset: brighter operational surfaces, clearer hierarchy. */
:root {
  --ice-0: #07101c;
  --ice-1: #0b1625;
  --ice-2: #122238;
  --ice-3: #1a304b;
  --frost: #f3f7fc;
  --frost-dim: #bdc9d9;
  --frost-faint: #91a3ba;
  --hairline: rgba(174, 207, 244, 0.18);
  --hairline-strong: rgba(174, 207, 244, 0.35);
  --radius: 8px;
  --radius-lg: 12px;
}

/* --- reset-ish --- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--frost);
  background:
    /* pebble: the droplet texture flooded onto every sheet before play */
    radial-gradient(rgba(180, 214, 255, 0.028) 1px, transparent 1.3px),
    radial-gradient(rgba(180, 214, 255, 0.018) 1px, transparent 1.3px),
    /* cold glow falling from the arena lights */
    radial-gradient(80rem 40rem at 50% -12rem, rgba(47, 111, 194, 0.16), transparent 60%),
    linear-gradient(var(--ice-1), var(--ice-0) 85%);
  background-size: 22px 22px, 22px 22px, auto, auto;
  background-position: 0 0, 11px 11px, 0 0, 0 0;
  background-attachment: fixed;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.015em;
  line-height: 1.1;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); text-transform: uppercase; }
h2 { font-size: 1.35rem; text-transform: uppercase; color: var(--frost-dim); }

a { color: var(--sweep-cyan); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code { color: var(--sweep-cyan); background: var(--ice-2); padding: 0.1em 0.4em; border-radius: 6px; }
.muted { color: var(--frost-dim); }

:focus-visible {
  outline: 2px solid var(--sweep-cyan);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ==========================================================================
   Brand — the house, drawn in pure CSS
   ========================================================================== */
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--frost); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 50%;
  background:
    radial-gradient(circle,
      var(--button-white) 0 18%,          /* the button */
      var(--house-red) 18% 40%,           /* four-foot */
      var(--ice-2) 40% 52%,               /* eight-foot */
      var(--house-blue) 52% 88%,          /* twelve-foot */
      transparent 88%);
  box-shadow: 0 0 0 1px var(--hairline), 0 0 18px rgba(47, 111, 194, 0.35);
  flex: none;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
/* the hog line itself: a red rule the brand sits behind */
.topbar {
  display: flex; align-items: center; gap: 1.75rem;
  padding: 0.8rem 1.5rem;
  background: color-mix(in srgb, var(--ice-1) 82%, transparent);
  border-bottom: 1px solid var(--hairline);
  position: sticky; top: 0; backdrop-filter: blur(10px); z-index: 10;
}
.mobile-nav { display: none; margin-left: auto; position: relative; }
.mobile-nav > summary {
  list-style: none; cursor: pointer; min-height: 44px; padding: 0.55rem 0.8rem;
  border: 1px solid var(--hairline-strong); border-radius: var(--radius);
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.1em;
}
.mobile-nav > summary::-webkit-details-marker { display: none; }
.mobile-nav nav {
  position: absolute; right: 0; top: calc(100% + 0.5rem); min-width: 13rem;
  display: grid; padding: 0.5rem; background: var(--ice-2);
  border: 1px solid var(--hairline-strong); border-radius: var(--radius); box-shadow: 0 18px 45px #0009;
}
.mobile-nav a, .mobile-nav button {
  display: block; width: 100%; padding: 0.7rem; color: var(--frost); text-align: left;
  background: none; border: 0; font: inherit;
}
.mobile-nav form { margin: 0; border-top: 1px solid var(--hairline); }
.topbar::after {
  content: "";
  position: absolute; inset: auto 0 -1px 0; height: 2px;
  background: linear-gradient(90deg, var(--house-red) 0 5.5rem, transparent 5.5rem);
  opacity: 0.9;
}

.topnav { display: flex; gap: 1.4rem; flex: 1; }
.topnav a {
  font-family: var(--font-display);
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--frost-dim);
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
}
.topnav a:hover { color: var(--frost); text-decoration: none; border-bottom-color: var(--sweep-cyan); }
.logout-form { margin: 0; }

/* ==========================================================================
   Layout
   ========================================================================== */
.page { max-width: 78rem; margin: 0 auto; padding: 2.25rem 1.5rem 4rem; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head h1 { margin: 0; }

.centered {
  display: grid; place-items: center;
  min-height: 100dvh; padding: 1.5rem;
}

.card {
  background: linear-gradient(180deg, var(--ice-2), color-mix(in srgb, var(--ice-2) 70%, var(--ice-1)));
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.8);
  animation: glide-in 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes glide-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ==========================================================================
   Buttons — big enough for cold hands
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.02rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--frost);
  background: var(--ice-3);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius);
  padding: 0.6rem 1.25rem;
  min-height: 44px;
  cursor: pointer;
  transition: transform var(--speed), box-shadow var(--speed), background var(--speed);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); background: color-mix(in srgb, var(--ice-3) 80%, var(--house-blue)); }
.btn:active { transform: translateY(0) scale(0.99); }
.btn-primary {
  background: linear-gradient(180deg, var(--house-blue), color-mix(in srgb, var(--house-blue) 75%, #0b1220));
  border-color: color-mix(in srgb, var(--house-blue) 60%, white 10%);
  box-shadow: 0 10px 24px -12px rgba(47, 111, 194, 0.8);
}
.btn-primary:hover { background: linear-gradient(180deg, color-mix(in srgb, var(--house-blue) 85%, white), var(--house-blue)); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--frost-dim); }
.btn-ghost:hover { color: var(--frost); background: var(--ice-2); }

/* ==========================================================================
   Forms
   ========================================================================== */
.stack { display: flex; flex-direction: column; gap: 0.45rem; }
.stack label {
  font-family: var(--font-display);
  text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 0.86rem; color: var(--frost-dim);
  margin-top: 0.8rem;
}
.stack input {
  font: inherit; color: var(--frost);
  background: var(--ice-1);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius);
  padding: 0.65rem 0.85rem;
  min-height: 44px;
  transition: border-color var(--speed), box-shadow var(--speed);
}
.stack input:focus {
  outline: none;
  border-color: var(--sweep-cyan);
  box-shadow: 0 0 0 3px rgba(99, 215, 230, 0.18);
}
.stack .btn { margin-top: 1.3rem; }
.form-narrow { max-width: 26rem; }
.form-error {
  color: #ffb4a8;
  background: color-mix(in srgb, var(--house-red) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--house-red) 45%, transparent);
  border-left: 3px solid var(--house-red);
  border-radius: var(--radius);
  padding: 0.65rem 0.9rem;
}

/* ==========================================================================
   Login
   ========================================================================== */
.login-card { width: min(24rem, 100%); text-align: center; }
.login-brand { justify-content: center; }
.login-brand .brand-mark { width: 54px; height: 54px; }
.login-brand .brand-name { font-size: 2.1rem; }
.tagline { color: var(--frost-faint); margin-top: 0.2rem; letter-spacing: 0.02em; }
.login-card form { text-align: left; }

/* ==========================================================================
   Tables — scoreboard bones
   ========================================================================== */
.table { width: 100%; border-collapse: collapse; }
.table th {
  font-family: var(--font-display);
  font-weight: 600; font-size: 0.88rem;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--frost-faint);
  text-align: left; padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--hairline-strong);
}
.table td { padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--hairline); font-variant-numeric: tabular-nums; }
.table tbody tr { transition: background var(--speed); }
.table tbody tr:hover { background: color-mix(in srgb, var(--ice-3) 55%, transparent); }
.empty-state { color: var(--frost-faint); padding: 2.5rem 0; text-align: center; font-style: italic; }

/* ==========================================================================
   Badges — event status
   ========================================================================== */
.badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-display);
  font-size: 0.82rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  padding: 0.18rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--hairline-strong);
  color: var(--frost-dim);
}
.badge-published { color: var(--sweep-cyan); border-color: color-mix(in srgb, var(--sweep-cyan) 45%, transparent); }
.badge-completed { color: var(--frost-faint); }
.badge-live {
  color: #ffd9d2;
  background: color-mix(in srgb, var(--house-red) 25%, transparent);
  border-color: color-mix(in srgb, var(--house-red) 60%, transparent);
}
.badge-live::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--house-red);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(216, 67, 47, 0.5); }
  50% { opacity: 0.6; box-shadow: 0 0 0 5px rgba(216, 67, 47, 0); }
}

/* ==========================================================================
   Dashboard
   ========================================================================== */
.stat-row { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1.5rem 0; }
.stat { display: flex; flex-direction: column; min-width: 9rem; padding: 1.1rem 1.4rem; }
.stat-value {
  font-family: var(--font-display);
  font-size: 3rem; font-weight: 600; line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--button-white);
}
.stat-label {
  text-transform: uppercase; letter-spacing: 0.16em;
  font-size: 0.8rem; color: var(--frost-faint); margin-top: 0.35rem;
}

.meta { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.6rem; margin: 0 0 2rem; }
.meta dt {
  font-family: var(--font-display);
  text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 0.86rem; color: var(--frost-faint); padding-top: 0.1rem;
}
.meta dd { margin: 0; }

/* ==========================================================================
   Error page
   ========================================================================== */
.error-card { width: min(22rem, 100%); text-align: center; }
.error-status {
  font-family: var(--font-display);
  font-size: 4.5rem; font-weight: 600; line-height: 1;
  margin: 0;
  color: var(--house-red);
  text-shadow: 0 0 34px rgba(216, 67, 47, 0.35);
}
.error-message { color: var(--frost-dim); margin: 0.6rem 0 1.4rem; }

/* ==========================================================================
   Portals — one hand, one glove, one glance
   ========================================================================== */
.portal .page { max-width: 30rem; }
.portal-head {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 1.2rem 1.5rem 1rem;
  border-bottom: 1px solid var(--hairline);
}
.portal-head .brand-mark { width: 42px; height: 42px; }
.portal-role {
  font-family: var(--font-display);
  text-transform: uppercase; letter-spacing: 0.2em;
  font-size: 0.85rem; margin: 0;
}
.portal-event { font-size: 1.45rem; margin: 0; }

/* each role wears its own colour on the hog line */
.portal-head { position: relative; }
.portal-head::after {
  content: ""; position: absolute; inset: auto 0 -1px 0; height: 3px;
}
.portal-scorer .portal-head::after  { background: var(--house-blue); }
.portal-scorer .portal-role        { color: var(--house-blue-hi, #7db3ef); }
.portal-timer .portal-head::after   { background: var(--sweep-cyan); }
.portal-timer .portal-role          { color: var(--sweep-cyan); }
.portal-team .portal-head::after    { background: var(--button-white); }
.portal-team .portal-role           { color: var(--frost); }
.portal-sponsor .portal-head::after { background: #d9a53f; }
.portal-sponsor .portal-role        { color: #e6bb62; }
.portal-player .portal-head::after  { background: var(--house-red); }
.portal-player .portal-role         { color: #f08a7a; }

/* ==========================================================================
   Management console
   ========================================================================== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 46rem) { .grid-2 { grid-template-columns: 1fr; } }
.head-actions { display: flex; align-items: center; gap: 0.75rem; }

.card + .card, .grid-2 + .card, .card + form { margin-top: 1rem; }

.inline-form {
  display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: end;
  margin-top: 1rem;
}
.inline-form input, .inline-form select,
.stack select {
  font: inherit; color: var(--frost);
  background: var(--ice-1);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius);
  padding: 0.55rem 0.75rem;
  min-height: 44px;
}
.inline-form input:focus, .inline-form select:focus, .stack select:focus {
  outline: none; border-color: var(--sweep-cyan);
  box-shadow: 0 0 0 3px rgba(99, 215, 230, 0.18);
}
.inline-form label {
  display: flex; flex-direction: column; gap: 0.3rem;
  font-family: var(--font-display);
  font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--frost-dim);
}

.chip-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 0.6rem 0; }
.chip {
  font-family: var(--font-display); font-weight: 600; letter-spacing: 0.08em;
  background: var(--ice-3); border: 1px solid var(--hairline-strong);
  border-radius: 999px; padding: 0.25rem 0.9rem;
}
.team-list { list-style: none; padding: 0; margin: 0.6rem 0; display: flex; flex-direction: column; gap: 0.35rem; }

.draw-block { border-top: 1px solid var(--hairline); margin-top: 1.25rem; padding-top: 1rem; }
.draw-block:first-of-type { border-top: 0; margin-top: 0.5rem; padding-top: 0; }
.draw-title { margin-bottom: 0.4rem; }
.score-cell { font-family: var(--font-display); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 0.06em; }
.row-actions { text-align: right; }
.btn-danger { color: #f2988a; }
.btn-danger:hover { color: #ffd9d2; background: color-mix(in srgb, var(--house-red) 22%, transparent); }

/* ==========================================================================
   Linescore — the heart of the thing
   ========================================================================== */
.linescore { margin: 1rem 0; }
.linescore .team-col { text-align: left; min-width: 9rem; }
.linescore .end-col { text-align: center; width: 2.2rem; color: var(--frost); }
.linescore thead .end-col, .linescore thead .total-col { color: var(--frost-faint); }
.linescore .total-col {
  text-align: center; width: 3.2rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1.15rem;
  color: var(--button-white);
  border-left: 1px solid var(--hairline-strong);
}
.hammer { color: #e6bb62; font-size: 0.85em; }
.score-entry .stack input, .score-entry .stack select { font-size: 1.15rem; }

/* ==========================================================================
   Portal token issue / QR
   ========================================================================== */
.new-link {
  display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap;
  border: 1px dashed var(--hairline-strong);
  border-radius: var(--radius);
  padding: 1rem; margin: 1rem 0;
  background: color-mix(in srgb, var(--house-blue) 8%, transparent);
}
.qr-wrap svg { display: block; border-radius: 8px; }
.new-link-role {
  font-family: var(--font-display); text-transform: uppercase;
  letter-spacing: 0.12em; font-weight: 600; margin: 0 0 0.3rem;
}
.wrap-anywhere { overflow-wrap: anywhere; }

/* ==========================================================================
   Scorer portal cards + public board
   ========================================================================== */
.game-card { display: block; color: inherit; margin-bottom: 0.9rem; }
.game-card:hover { text-decoration: none; border-color: var(--hairline-strong); transform: translateY(-1px); }
.game-card-head { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; }
.game-card-teams { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; font-size: 1.1rem; }
.game-card-teams .score-cell { font-size: 1.5rem; }

.board-page .page { max-width: 46rem; }
.board-live-badge { margin-left: auto; }
.board-card { margin-bottom: 1rem; overflow-x: auto; }
.badge-in_progress {
  color: #ffd9d2;
  background: color-mix(in srgb, var(--house-red) 25%, transparent);
  border-color: color-mix(in srgb, var(--house-red) 60%, transparent);
}
.badge-in_progress::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--house-red);
  animation: pulse 1.6s ease-in-out infinite;
}

/* ==========================================================================
   Standings
   ========================================================================== */
.standings .rank-col { width: 2rem; text-align: center; color: var(--frost-faint); }
.standings .team-col { text-align: left; }
.standings th:not(.team-col):not(.rank-col),
.standings td:not(.team-col):not(.rank-col) { text-align: center; width: 3rem; }
.standings .pts-col { font-family: var(--font-display); font-weight: 600; color: var(--button-white); }
.standings .record-col { font-variant-numeric: tabular-nums; letter-spacing: 0.03em; }
.standings tbody tr:first-child .rank-col { color: var(--sweep-cyan); font-weight: 700; }
.board-standings { margin-bottom: 1rem; }

/* ==========================================================================
   Result banner (game detail)
   ========================================================================== */
.result-banner {
  font-family: var(--font-display);
  font-size: 1.3rem; letter-spacing: 0.04em;
  padding: 0.7rem 1rem; margin: 1rem 0;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--house-blue) 14%, transparent);
  border-left: 3px solid var(--sweep-cyan);
}
.result-banner strong { color: var(--button-white); }

/* ==========================================================================
   Logos & sponsors
   ========================================================================== */
.team-row, .sponsor-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.25rem 0; }
.team-logo, .sponsor-row .sponsor-logo { width: 26px; height: 26px; object-fit: contain; border-radius: 5px; background: var(--ice-1); flex: none; }
.logo-form { margin: 0 0 0 auto; display: flex; gap: 0.35rem; align-items: center; }
.logo-form input[type=file] { max-width: 8rem; font-size: 0.78rem; color: var(--frost-dim); }
.sponsor-list { list-style: none; padding: 0; margin: 0.6rem 0; display: flex; flex-direction: column; gap: 0.3rem; }

.badge.tier-gold { color: #f2cf6b; border-color: color-mix(in srgb, #f2cf6b 45%, transparent); }
.badge.tier-silver { color: #cdd6e2; border-color: color-mix(in srgb, #cdd6e2 40%, transparent); }
.badge.tier-bronze { color: #d69a6a; border-color: color-mix(in srgb, #d69a6a 45%, transparent); }
.badge.tier-supporting { color: var(--frost-dim); }
.badge-paid { color: var(--success, #6fd08c); border-color: color-mix(in srgb, #6fd08c 45%, transparent); }

.sponsors-strip { text-align: center; }
.sponsors-label { text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.78rem; color: var(--frost-faint); margin: 0 0 0.8rem; }
.sponsor-logos { display: flex; flex-wrap: wrap; gap: 1.4rem; align-items: center; justify-content: center; }
.sponsor-logos .sponsor-logo { height: 40px; width: auto; object-fit: contain; }
.sponsor-logos .sponsor-name { font-family: var(--font-display); font-size: 1.1rem; letter-spacing: 0.04em; color: var(--frost-dim); }
.sponsor-logos .tier-gold { height: 56px; }
.sponsor-logos .tier-silver { height: 46px; }

/* ==========================================================================
   Audit / activity log
   ========================================================================== */
.audit-table td { font-size: 0.94rem; }
.nowrap { white-space: nowrap; }
.audit-table .badge { font-size: 0.78rem; }

/* ==========================================================================
   Motion discipline
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 40rem) {
  .topbar { padding: 0.7rem 1rem; gap: 1rem; }
  .topnav { gap: 1rem; }
  .page { padding: 1.5rem 1rem 3rem; }
  .meta { grid-template-columns: 1fr; gap: 0.1rem; }
  .meta dt { margin-top: 0.7rem; }
}

/* Event workspace -------------------------------------------------------- */
.workspace-nav {
  position: sticky; top: 4.15rem; z-index: 8; display: flex; gap: 0.25rem;
  margin: 0 -0.5rem 1.5rem; padding: 0.4rem; overflow-x: auto;
  background: color-mix(in srgb, var(--ice-1) 92%, transparent);
  border: 1px solid var(--hairline); border-radius: var(--radius); backdrop-filter: blur(12px);
  scrollbar-width: thin;
}
.workspace-nav a {
  flex: none; padding: 0.55rem 0.75rem; border-radius: 6px; color: var(--frost-dim);
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.08em;
}
.workspace-nav a:hover, .workspace-nav a:focus-visible { color: var(--frost); background: var(--ice-3); text-decoration: none; }
.workspace-section { scroll-margin-top: 8.5rem; }
.workspace-kicker {
  margin: 0 0 0.45rem; color: var(--sweep-cyan); font-family: var(--font-display);
  text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.82rem;
}
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.section-heading h2 { margin-bottom: 0; }

@media (max-width: 48rem) {
  .desktop-nav, .app-topbar > .logout-form { display: none; }
  .mobile-nav { display: block; }
  .app-topbar { gap: 0.75rem; }
  .workspace-nav { top: 3.9rem; margin-inline: -0.25rem; }
  .table { min-width: 38rem; }
  .card { overflow-x: auto; padding: 1.1rem; }
  .inline-form > input, .inline-form > select, .inline-form > label { flex: 1 1 10rem; min-width: 0; }
}

@media (max-width: 23rem) {
  .brand-name { font-size: 1.25rem; }
  .brand-mark { width: 26px; height: 26px; }
}

/* ---- Game clock (timekeeper control + TV board) --------------------------- */
.timer { max-width: 720px; margin: 0 auto; }
.timer-status {
  text-align: center; color: var(--frost-dim); text-transform: uppercase;
  letter-spacing: 0.06em; font-family: var(--font-display); margin-bottom: 0.75rem;
}
.timer-status .timer-break { margin-left: 0.75rem; color: var(--frost-faint); }
.timer-clocks { display: flex; gap: 1rem; }
.timer-clock {
  flex: 1; background: var(--ice-2); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); padding: 1.25rem 1rem; text-align: center;
  transition: border-color var(--speed), box-shadow var(--speed);
}
.timer-clock[data-panel].active {
  border-color: var(--sweep-cyan);
  box-shadow: 0 0 0 2px rgba(99, 215, 230, 0.35);
}
.timer-team {
  font-family: var(--font-display); text-transform: uppercase;
  color: var(--frost-dim); letter-spacing: 0.04em;
}
.timer-time {
  font-family: var(--font-display); font-variant-numeric: tabular-nums;
  font-size: clamp(2.6rem, 12vw, 5rem); line-height: 1; color: var(--frost);
  margin: 0.35rem 0;
}
.timer-timeouts { color: var(--frost-faint); font-size: 0.85rem; }
.timer-adjust { margin-top: 0.5rem; display: flex; gap: 0.4rem; justify-content: center; }
.timer-controls {
  display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center;
  margin-top: 1rem;
}
.timer-controls.timer-danger { margin-top: 1.25rem; }
.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.85rem; }
/* low-time flash on the running side */
.clock-home-low .timer-clock[data-panel="home"] .timer-time,
.clock-away-low .timer-clock[data-panel="away"] .timer-time { color: var(--house-red); }

/* ---- Large-format per-sheet TV scoreboard -------------------------------- */
.tv { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 3vh 3vw; }
.tv .timer-time { font-size: clamp(4rem, 18vw, 12rem); }
.tv-head { text-align: center; margin-bottom: 2vh; }
.tv-sheet {
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--sweep-cyan); font-size: clamp(1.2rem, 4vw, 2.4rem);
}
.tv-line { display: flex; align-items: center; justify-content: space-between; gap: 2vw; }
.tv-team { font-family: var(--font-display); font-size: clamp(2rem, 8vw, 5rem); color: var(--frost); }
.tv-score {
  font-family: var(--font-display); font-variant-numeric: tabular-nums;
  font-size: clamp(3rem, 14vw, 9rem); color: var(--frost);
}
.tv-final { text-align: center; color: var(--house-red); font-family: var(--font-display);
  text-transform: uppercase; letter-spacing: 0.1em; font-size: clamp(1.4rem, 5vw, 3rem); }

/* ---- Team roster --------------------------------------------------------- */
.roster-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  padding: 0.5rem 0; border-bottom: 1px solid var(--hairline); }
.roster-edit { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; flex: 1; }
.roster-name { font-family: var(--font-display); text-transform: uppercase;
  letter-spacing: 0.03em; min-width: 8rem; }
.roster-name.roster-benched { color: var(--frost-faint); text-decoration: line-through; }
.roster-active { color: var(--frost-dim); font-size: 0.9rem; display: inline-flex;
  align-items: center; gap: 0.3rem; }

/* ---- Mixed Doubles Power Play -------------------------------------------- */
.badge-pp { background: var(--sweep-cyan); color: #06222b; font-weight: 700;
  padding: 0.15rem 0.5rem; border-radius: 6px; text-transform: uppercase;
  font-size: 0.75rem; letter-spacing: 0.05em; }
.badge-out { background: var(--house-red); color: #fff; padding: 0.1rem 0.45rem;
  border-radius: 6px; text-transform: uppercase; font-size: 0.72rem; }
.pp-mark { color: var(--sweep-cyan); font-family: var(--font-display);
  font-size: 0.5em; vertical-align: middle; border: 2px solid var(--sweep-cyan);
  border-radius: 6px; padding: 0.05em 0.3em; }
.chip-link { text-decoration: none; margin-left: 0.35rem; }

/* venue schedule conflict row */
.row-conflict { background: rgba(216,67,47,0.14); }

/* ---- Headshots (players + coaches) --------------------------------------- */
.headshot { width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--hairline-strong); flex: none; background: var(--ice-2); }
.headshot-empty { display: inline-block; width: 40px; height: 40px; border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, var(--ice-3) 0 42%, transparent 42%),
              var(--ice-2); border: 1px dashed var(--hairline-strong); flex: none; }

/* ---- Venue picker (event setup) ------------------------------------------ */
.venue-picker { border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 0.9rem 1rem 1.1rem; display: grid; gap: 0.4rem; }
.venue-picker legend { font-family: var(--font-display); text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--frost-dim); padding: 0 0.4rem; }

/* ============================================================
   Operations dashboard — the nerve center
   ============================================================ */
.ops-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem;
}
.ops-eyebrow {
  font-family: var(--font-display); text-transform: uppercase;
  letter-spacing: 0.22em; font-size: 0.82rem; font-weight: 600;
  color: var(--sweep-cyan); margin: 0 0 0.15rem;
}
.ops-title { margin: 0; font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
.ops-flag {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-display); font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; font-size: 0.92rem; color: var(--frost-dim);
  padding: 0.5rem 0.9rem; border: 1px solid var(--hairline);
  border-radius: 999px; background: color-mix(in srgb, var(--ice-2) 70%, transparent);
}
.ops-flag.is-live { color: var(--frost); border-color: color-mix(in srgb, var(--house-red) 55%, var(--hairline-strong)); }

.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--frost-faint); flex: none; }
.pulse-dot.live { background: var(--house-red); box-shadow: 0 0 0 0 color-mix(in srgb, var(--house-red) 70%, transparent); animation: pulse 1.6s ease-out infinite; }
.pulse-dot.idle { background: var(--frost-faint); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--house-red) 60%, transparent); }
  70% { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) { .pulse-dot.live { animation: none; } }

/* status tiles */
.tiles {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.8rem;
  margin-bottom: 1.8rem;
}
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile {
  display: flex; flex-direction: column; gap: 0.1rem;
  padding: 0.9rem 1rem; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--ice-2), color-mix(in srgb, var(--ice-2) 65%, var(--ice-1)));
  border: 1px solid var(--hairline); position: relative; overflow: hidden;
}
.tile-num {
  font-family: var(--font-display); font-weight: 600; line-height: 1;
  font-size: 2.1rem; font-variant-numeric: tabular-nums; color: var(--frost);
}
.tile-label {
  font-family: var(--font-display); text-transform: uppercase;
  letter-spacing: 0.1em; font-size: 0.78rem; color: var(--frost-dim);
}
.tile-live { border-color: color-mix(in srgb, var(--house-red) 40%, var(--hairline)); }
.tile-live::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--house-red);
}
.tile-live .tile-num { color: var(--house-red); }

/* sections */
.ops-section { margin-bottom: 1.8rem; }
.ops-section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 0.8rem; }
.ops-section-head h2 { margin: 0; font-size: 1.3rem; }
.refresh-note {
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 0.72rem; color: var(--frost-faint);
}

/* live-games grid */
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 0.8rem; }
.live-card {
  display: block; text-decoration: none; color: inherit;
  padding: 0.85rem 0.95rem; border-radius: var(--radius);
  background: var(--ice-2); border: 1px solid var(--hairline);
  transition: transform var(--speed), border-color var(--speed), background var(--speed);
}
.live-card:hover {
  transform: translateY(-2px); border-color: color-mix(in srgb, var(--sweep-cyan) 45%, var(--hairline-strong));
  background: var(--ice-3);
}
.live-card-top { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.55rem; }
.sheet-chip {
  font-family: var(--font-display); font-weight: 600; letter-spacing: 0.06em;
  font-size: 0.82rem; padding: 0.12rem 0.5rem; border-radius: 6px;
  background: var(--ice-3); border: 1px solid var(--hairline-strong); color: var(--frost);
}
.sheet-chip.sm { font-size: 0.76rem; padding: 0.1rem 0.45rem; }
.disc-chip {
  font-family: var(--font-display); font-weight: 600; font-size: 0.72rem; letter-spacing: 0.08em;
  padding: 0.1rem 0.4rem; border-radius: 5px; color: var(--ice-0);
  background: var(--house-blue-hi);
}
.live-end {
  margin-left: auto; font-family: var(--font-display); font-weight: 600;
  color: var(--sweep-cyan); font-size: 0.92rem; letter-spacing: 0.03em;
}
.live-end .of { color: var(--frost-faint); font-weight: 400; margin-left: 0.25rem; }
.live-event { font-size: 0.82rem; color: var(--frost-dim); margin-bottom: 0.5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-team {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.28rem 0;
}
.live-team + .live-team { border-top: 1px solid var(--hairline); }
.live-team .tname { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--frost-dim); }
.live-team.leading .tname { color: var(--frost); font-weight: 600; }
.live-team .tscore {
  font-family: var(--font-display); font-weight: 600; font-variant-numeric: tabular-nums;
  font-size: 1.5rem; line-height: 1; color: var(--frost-dim); min-width: 1.4ch; text-align: right;
}
.live-team.leading .tscore { color: var(--button-white); }
.hammer-dot { width: 7px; height: 7px; border-radius: 50%; background: transparent; border: 1px solid var(--frost-faint); flex: none; }
.hammer-dot.on { background: var(--sweep-cyan); border-color: var(--sweep-cyan); box-shadow: 0 0 6px color-mix(in srgb, var(--sweep-cyan) 60%, transparent); }

.live-empty {
  display: flex; align-items: center; gap: 0.7rem; color: var(--frost-dim);
  padding: 1.4rem 1.2rem; border: 1px dashed var(--hairline); border-radius: var(--radius);
  background: color-mix(in srgb, var(--ice-2) 55%, transparent);
}
.live-empty p { margin: 0; }

/* two-column footer sections */
.ops-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 800px) { .ops-cols { grid-template-columns: 1fr; } }
.upnext { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.upnext-row { display: flex; align-items: center; gap: 0.65rem; padding: 0.55rem 0; border-top: 1px solid var(--hairline); }
.upnext-row:first-child { border-top: none; }
.upnext-teams { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upnext-teams em { color: var(--frost-faint); font-style: normal; padding: 0 0.2rem; }
.upnext-meta { font-size: 0.8rem; color: var(--frost-faint); white-space: nowrap; }
@media (max-width: 560px) { .upnext-meta { display: none; } }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }

/* ============================================================
   Event-first control home
   ============================================================ */
/* nav Setup dropdown */
.nav-menu { position: relative; display: inline-block; }
.nav-menu > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.3rem;
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 0.95rem; color: var(--frost-dim); padding: 0.2rem 0;
}
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary::after { content: "▾"; font-size: 0.7em; opacity: 0.7; }
.nav-menu[open] > summary { color: var(--frost); }
.nav-drop {
  position: absolute; top: 140%; left: 0; z-index: 30; min-width: 12rem;
  display: flex; flex-direction: column; padding: 0.4rem;
  background: var(--ice-2); border: 1px solid var(--hairline-strong);
  border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}
.nav-drop a { padding: 0.5rem 0.7rem; border-radius: 7px; color: var(--frost-dim); }
.nav-drop a:hover { background: var(--ice-3); color: var(--frost); text-decoration: none; }

/* two-column ops layout */
.ops-grid { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 1000px) { .ops-grid { grid-template-columns: 1fr; } }
.ops-main { min-width: 0; }

/* event cards */
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0.9rem; }
.event-card {
  display: block; text-decoration: none; color: inherit; position: relative; overflow: hidden;
  padding: 0.9rem 1rem 1rem; border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--ice-2), color-mix(in srgb, var(--ice-2) 60%, var(--ice-1)));
  border: 1px solid var(--hairline); transition: transform var(--speed), border-color var(--speed);
}
.event-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--frost-faint); }
.event-card.status-live::before { background: var(--house-red); }
.event-card.status-ready::before { background: var(--sweep-cyan); }
.event-card.status-final::before { background: var(--frost-faint); }
.event-card:hover { transform: translateY(-2px); border-color: var(--hairline-strong); }
.event-card-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; }
.status-pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.1em;
  font-size: 0.72rem; font-weight: 600; padding: 0.16rem 0.55rem; border-radius: 999px;
  border: 1px solid var(--hairline-strong); color: var(--frost-dim);
}
.status-pill.live { color: var(--house-red); border-color: color-mix(in srgb, var(--house-red) 55%, transparent); }
.status-pill.ready { color: var(--sweep-cyan); border-color: color-mix(in srgb, var(--sweep-cyan) 45%, transparent); }
.status-pill.final { color: var(--frost-faint); }
.event-name { margin: 0 0 0.15rem; font-size: 1.28rem; line-height: 1.1; }
.event-loc { margin: 0 0 0.7rem; font-size: 0.85rem; color: var(--frost-dim); }
.event-loc .pin { color: var(--house-blue-hi); margin-right: 0.3rem; font-size: 0.7em; }
.event-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; font-size: 0.82rem; color: var(--frost-dim); margin-bottom: 0.45rem; }
.event-meta .meta-live { color: var(--house-red); font-weight: 600; }
.event-meta .meta-prog { margin-left: auto; color: var(--frost-faint); }
.prog-bar { height: 4px; border-radius: 2px; background: var(--ice-1); overflow: hidden; margin-bottom: 0.7rem; }
.prog-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--house-blue), var(--sweep-cyan)); }

/* compact wins-losses grid on the card */
.wl-grid { width: 100%; border-collapse: collapse; font-size: 0.86rem; table-layout: fixed; }
.wl-grid td { padding: 0.2rem 0; border-top: 1px solid var(--hairline); }
.wl-grid tr:first-child td { border-top: none; }
.wl-rank { width: 1.4rem; color: var(--frost-faint); font-family: var(--font-display); }
.wl-team { color: var(--frost-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-rec { width: 3.4rem; text-align: right; white-space: nowrap; font-family: var(--font-display); font-variant-numeric: tabular-nums; color: var(--frost-dim); }
.wl-rec b { color: var(--button-white); }
.wl-rec span { color: var(--frost-faint); padding: 0 0.1rem; }
.wl-more { color: var(--frost-faint); font-size: 0.78rem; }

/* side lanes */
.ops-side { display: flex; flex-direction: column; gap: 1.3rem; }
.lane { background: color-mix(in srgb, var(--ice-2) 55%, transparent); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 0.85rem 1rem; }
.lane .ops-section-head { margin-bottom: 0.5rem; }
.lane .ops-section-head h2 { font-size: 1.08rem; }
.muted.sm { font-size: 0.85rem; }

.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.feed-row { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 0.5rem; padding: 0.4rem 0; border-top: 1px solid var(--hairline); }
.feed-row:first-child { border-top: none; }
.feed-kind { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.72rem; font-weight: 600; color: var(--frost-dim); padding: 0.08rem 0.4rem; border: 1px solid var(--hairline-strong); border-radius: 5px; white-space: nowrap; }
.feed-row.tone-win .feed-kind { color: var(--sweep-cyan); border-color: color-mix(in srgb, var(--sweep-cyan) 40%, transparent); }
.feed-row.tone-alert .feed-kind { color: var(--house-red); border-color: color-mix(in srgb, var(--house-red) 45%, transparent); }
.feed-detail { font-size: 0.85rem; color: var(--frost-dim); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-time { font-size: 0.74rem; color: var(--frost-faint); white-space: nowrap; }

.attn { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.attn-row a { display: flex; align-items: center; gap: 0.5rem; color: inherit; }
.attn-row a:hover { text-decoration: none; }
.attn-team { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--frost); }
.attn-clock { font-family: var(--font-display); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--house-red); font-size: 1.05rem; }
.attn-meta { display: block; font-size: 0.74rem; color: var(--frost-faint); margin-left: 1.9rem; }

.upnext-count { margin-left: auto; font-size: 0.78rem; color: var(--sweep-cyan); font-family: var(--font-display); white-space: nowrap; }

/* ---- team / player self-service portals ---- */
.saved-flag { background: color-mix(in srgb, var(--sweep-cyan) 18%, var(--ice-2)); border: 1px solid color-mix(in srgb, var(--sweep-cyan) 45%, transparent); color: var(--frost); border-radius: var(--radius); padding: 0.6rem 0.9rem; margin-bottom: 1rem; font-weight: 600; }
.player-photo { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--hairline-strong); margin-bottom: 0.8rem; display: block; }
.team-profile-photo { width: 100%; max-height: 22rem; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--hairline-strong); margin-bottom: 1rem; }
.photo-upload { padding: 0.9rem; margin-bottom: 1rem; background: var(--ice-1); border: 1px dashed var(--hairline-strong); border-radius: var(--radius); }
.photo-upload input[type="file"] { max-width: 100%; color: var(--frost-dim); }
.photo-upload .btn { margin-top: 0.4rem; }
.roster-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.roster-list li { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0; border-top: 1px solid var(--hairline); }
.roster-list li:first-child { border-top: none; }
.rl-pos { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.74rem; color: var(--frost-faint); width: 5rem; }
.rl-name { flex: 1; color: var(--frost); }
.rl-tag { font-family: var(--font-display); text-transform: uppercase; font-size: 0.68rem; letter-spacing: 0.08em; color: var(--sweep-cyan); border: 1px solid color-mix(in srgb, var(--sweep-cyan) 40%, transparent); border-radius: 5px; padding: 0.05rem 0.35rem; }
.rl-remove { margin: 0; }
/* add-player row: name grows, position + button hug the right */
.row-form { display: flex; gap: 0.7rem; align-items: flex-end; margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid var(--hairline); flex-wrap: wrap; }
.row-form .grow { flex: 1; min-width: 8rem; }
.row-form select { padding: 0.5rem; background: var(--ice-2); border: 1px solid var(--hairline); border-radius: 7px; color: var(--frost); }

/* generated access QR (roster page) */
.qr-slot:empty { display: none; }
.access-link { margin-top: 0.7rem; padding: 0.9rem; border: 1px solid var(--hairline-strong); border-radius: var(--radius); background: var(--ice-1); max-width: 320px; }
.access-role { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.76rem; color: var(--sweep-cyan); margin: 0 0 0.5rem; }
.qr-wrap { background: #fff; padding: 0.5rem; border-radius: 8px; width: fit-content; }
.qr-wrap svg { display: block; width: 168px; height: 168px; }
.access-url { width: 100%; margin-top: 0.6rem; font-size: 0.8rem; padding: 0.4rem 0.5rem; background: var(--ice-2); border: 1px solid var(--hairline); border-radius: 7px; color: var(--frost-dim); }
.access-sent { margin: 0.5rem 0 0; font-size: 0.82rem; color: var(--sweep-cyan); }
/* invite QR drops onto its own line below the team row */
.invite-slot:not(:empty) { flex-basis: 100%; margin-top: 0.6rem; }
.qr-email-form { display: inline-flex; gap: 0.4rem; align-items: center; margin: 0; }
.qr-email-form input { min-height: 38px; min-width: 11rem; max-width: 15rem; padding: 0.4rem 0.55rem; color: var(--frost); background: var(--ice-1); border: 1px solid var(--hairline-strong); border-radius: 7px; }
@media (max-width: 40rem) { .qr-email-form { width: 100%; flex-wrap: wrap; } .qr-email-form input { flex: 1; max-width: none; } }

/* ---- tournament stages (event page) ---- */
.stage-block { padding: 0.8rem 0; border-top: 1px solid var(--hairline); }
.stage-block:first-child { border-top: none; }
.stage-head { display: flex; align-items: center; gap: 0.6rem; }
.stage-head h3 { margin: 0; font-size: 1.15rem; }
.status-pill.active { color: var(--sweep-cyan); border-color: color-mix(in srgb, var(--sweep-cyan) 45%, transparent); }
.status-pill.complete { color: var(--frost-faint); }
.status-pill.pending { color: var(--frost-dim); }
.stage-actions { display: flex; align-items: center; gap: 0.7rem; margin: 0.5rem 0; flex-wrap: wrap; }
.stage-standings { max-width: 380px; margin: 0.4rem 0 0.6rem; }
.pool-name { margin: 0.6rem 0 0.2rem; font-size: 0.95rem; color: var(--frost-dim); }
.bracket-list { list-style: none; margin: 0.4rem 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.bracket-list a { color: var(--frost-dim); display: flex; gap: 0.5rem; align-items: baseline; }
.bracket-list a:hover { color: var(--frost); text-decoration: none; }
.bracket-label { display: inline-block; min-width: 9rem; color: var(--frost-faint); font-family: var(--font-display); text-transform: uppercase; font-size: 0.74rem; letter-spacing: 0.06em; }
