/* ============================================================
   LEAP SCORES — "FLIGHT PATH" 2026 redesign (live port)
   Dark broadcast chrome (header / footer) + light, high-contrast
   reading surfaces (content panel, tables, cards).
   Everything is scoped under html.ls2026 so it layers on top of
   each page's existing CSS and is fully inert when the theme is
   toggled off (includes/theme.php -> LS_THEME_2026 = 'off').
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:ital,wdth,wght@0,62..125,100..900;1,62..125,100..900&family=Chivo+Mono:ital,wght@0,300..700;1,300..700&display=swap');

html.ls2026 {
  /* ---- light reading surfaces ---- */
  --bg: #f4f7fb;
  --paper: #ffffff;
  --paper-2: #f7f9fc;
  --th-bg: #eef2f8;
  --ink: #0f1828;
  --ink-soft: #3a4762;
  --ink-faint: #5b6678;
  --line: #e3e8f1;
  --line-strong: #cdd6e4;

  /* ---- dark stage ---- */
  --stage-950: #070c17;
  --stage-900: #0a101f;
  --stage-850: #0e1628;
  --stage-800: #131d35;
  --chalk: #f2f6ff;
  --chalk-dim: #aebbd6;
  --chalk-faint: #8694b8;

  /* ---- brand ---- */
  --teal-bright: #1ce4c4;   /* electric green on dark */
  --teal-ink: #00736a;      /* teal text/links on white (~5:1) */
  --teal-soft: rgba(0, 115, 106, 0.10);
  --live: #c52c45;

  --radius: 14px;
  --radius-lg: 22px;

  /* Canonical page content width — every page's main panel + masthead align to
     this so the whole app is one consistent width. Change here only. */
  --content-max: 1200px;

  --font-ui: 'Archivo', 'Segoe UI', Arial, sans-serif;
  --font-score: 'Chivo Mono', 'Consolas', monospace;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05), 0 6px 16px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 10px rgba(15, 23, 42, 0.07), 0 18px 40px rgba(15, 23, 42, 0.09);
  --shadow-glow: 0 0 24px rgba(28, 228, 196, 0.30);
}

/* ---------- base ---------- */
html.ls2026 body {
  font-family: var(--font-ui);
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;   /* the full-bleed masthead uses 100vw; avoid a h-scrollbar */
}

html.ls2026 ::selection { background: var(--teal-bright); color: var(--stage-950); }
html.ls2026 :focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; }

html.ls2026 main a:not([class*="btn"]):not([class*="button"]) { color: var(--teal-ink); }
html.ls2026 main a:hover { text-decoration: underline; text-underline-offset: 3px; }

html.ls2026 h1, html.ls2026 h2, html.ls2026 h3 {
  font-family: var(--font-ui);
  color: var(--ink);
  font-weight: 820;
  line-height: 1.12;
}

/* ============================================================
   HEADER (dark stage bar) — <header><img logo><nav></header>
   ============================================================ */
html.ls2026 header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  text-align: left;
  padding: 14px 26px;
  background:
    radial-gradient(900px 240px at 0% -40%, rgba(28, 228, 196, 0.12), transparent 60%),
    linear-gradient(180deg, var(--stage-900), var(--stage-950));
  color: var(--chalk);
  border-bottom: 1px solid rgba(150, 172, 222, 0.16);
}

/* Hide the raster <img> and draw the one-line logo as the header's ::before,
   tinted electric-teal via an alpha mask on logo-long.png (RGBA). Using a
   pseudo-element (not the replaced <img>) avoids the original pixels bleeding
   through the mask. */
html.ls2026 header > img { display: none !important; }
html.ls2026 header::before {
  content: "";
  display: inline-block;
  flex-shrink: 0;
  width: 243px;               /* 44 * 5.52 aspect of logo-long */
  height: 44px;
  margin: 0 auto 0 0;         /* push the nav to the right */
  background-color: var(--teal-bright);
  -webkit-mask-image: url('/logo-long.png');
          mask-image: url('/logo-long.png');
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: left center;
          mask-position: left center;
  -webkit-mask-size: contain;
          mask-size: contain;
}

/* nav links */
html.ls2026 nav ul { font-size: inherit; }
html.ls2026 nav ul li { margin: 0 2px; }
html.ls2026 nav ul li a {
  color: var(--chalk-dim);
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  padding: 9px 14px;
  border-radius: 10px;
  transition: color 0.18s, background 0.18s;
}
html.ls2026 nav ul li a:hover {
  color: var(--chalk);
  background: rgba(160, 185, 235, 0.10);
  text-decoration: none;
}
/* current page -> electric teal (marked by theme.php's nav script) */
html.ls2026 nav ul li a.ls-nav-active,
html.ls2026 nav ul li a.ls-nav-active:hover {
  color: var(--teal-bright) !important;
  background: transparent;
}
/* Director login as its own ghost button (matches prototype .btn-ghost) */
html.ls2026 nav ul li a[href*="myAccount"],
html.ls2026 nav ul li a[href*="logout"] {
  border: 1px solid rgba(150, 172, 222, 0.32);
  color: var(--chalk);
}
html.ls2026 nav ul li a[href*="myAccount"]:hover,
html.ls2026 nav ul li a[href*="logout"]:hover {
  border-color: var(--teal-bright);
  color: var(--teal-bright);
  background: transparent;
}
html.ls2026 nav ul li a.ls-nav-active[href*="myAccount"] {
  border-color: var(--teal-bright);
}

/* hamburger spans stay light on the dark bar */
html.ls2026 .hamburger span { background-color: var(--chalk); }

/* ============================================================
   MEET BANNER — the ".meet-header-container" bar shown on the
   director pages (currently a per-page inline green #4CAF50 bar).
   Unify it into one dark "masthead": meet name in chalk + a ghost
   "Change Meet" button. Targets the wrapper div, the
   .meet-header-green variant, and the container itself so it works
   whether the green bar is a wrapper or the container itself.
   ============================================================ */
/* full-width: cancel the white panel's top padding so the band sits flush
   under the header, then break the band out to the viewport edges */
html.ls2026 main:has(.meet-header-container) {
  margin-top: 0 !important;
  padding-top: 0 !important;
  border-top: 0 !important;
  /* some pages (gymnasts, sessionManager) set main{overflow-x:hidden; width:100%}
     on mobile. overflow-x:hidden clips the full-width banner, and width:100%
     (plus the panel's side margins) makes main overflow and throws off the
     bleed math. Restore: let it bleed (body's overflow-x:hidden is the
     scrollbar backstop) and let main size to its margins. */
  overflow-x: visible !important;
  width: auto !important;
}
html.ls2026 div:has(> .meet-header-container),
html.ls2026 .meet-header-green,
html.ls2026 .meet-header-container {
  width: 100vw;
  margin: 0 0 24px 0 !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  background: linear-gradient(180deg, var(--stage-900), var(--stage-850)) !important;
  color: var(--chalk) !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(150, 172, 222, 0.16) !important;
  border-radius: 0 !important;
  overflow: hidden;
}
html.ls2026 .meet-header-container {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 24px !important;
}
/* wrapped layout: the inner container becomes the centered content wrap */
html.ls2026 div:has(> .meet-header-container) > .meet-header-container {
  width: auto;
  max-width: var(--content-max);
  margin: 0 auto !important;
  border: 0 !important;
  border-bottom: 0 !important;
}
html.ls2026 .meet-header-container h1,
html.ls2026 .meet-header-container h2,
html.ls2026 .meet-header-container h3 {
  color: var(--chalk) !important;
  font-family: var(--font-ui) !important;
  font-weight: 820 !important;
  font-size: clamp(1.05rem, 2.4vw, 1.45rem) !important;
  line-height: 1.15;
  margin: 0 !important;
}
/* "Change Meet" -> chalk ghost button that reads on the dark bar */
html.ls2026 .meet-header-container .change-meet-btn,
html.ls2026 .meet-header-container button[name="change_meet"],
html.ls2026 .meet-header-container input[name="change_meet"] {
  background: transparent !important;
  color: var(--chalk) !important;
  border: 1px solid rgba(150, 172, 222, 0.45) !important;
  box-shadow: none !important;
}
html.ls2026 .meet-header-container .change-meet-btn:hover,
html.ls2026 .meet-header-container button[name="change_meet"]:hover,
html.ls2026 .meet-header-container input[name="change_meet"]:hover {
  border-color: var(--teal-bright) !important;
  color: var(--teal-bright) !important;
}
/* Mobile: stack the meet banner — meet name on top, the "Change Meet" button
   directly below it, with a tight gap. Done globally so every director page is
   consistent: the per-page inline rules had drifted (coaches_judges put the
   button ABOVE the title; most pages left a ~26px title-to-button gap from the
   16px column gap + a 10px form margin). This overrides all of them. */
@media (max-width: 900px) {
  html.ls2026 .meet-header-container {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
    gap: 6px !important;
    padding: 12px 16px !important;
  }
  /* keep "Change Meet" after the title regardless of its DOM position */
  html.ls2026 .meet-header-container form { order: 3 !important; margin: 0 !important; }
  /* hide the desktop-only right-hand spacer div so it doesn't add a second gap */
  html.ls2026 .meet-header-container > div:last-child { display: none !important; }
}

/* ============================================================
   MAIN — light reading panel centered on the page background
   ============================================================ */
html.ls2026 main {
  background: var(--paper);
  max-width: var(--content-max);
  margin: 26px auto 40px;
  padding: 30px 34px 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
/* when a full-width masthead precedes the panel, tighten the gap above it */
html.ls2026 .ls-masthead + main { margin-top: 26px; }

/* home section headings: "Ongoing / Upcoming / Past Meets" */
html.ls2026 main > h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  color: var(--ink);
  margin: 34px 0 16px;
}
html.ls2026 main > h2:first-child { margin-top: 6px; }

/* The big dark band is now the full-width .ls-masthead (below); the centered
   in-content titles ("Scores for X", "Select a Session for X", team/all-level)
   become plain teal sub-headings under it. */
html.ls2026 main center h1,
html.ls2026 main center h2,
html.ls2026 main center h3 {
  color: var(--teal-ink);
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  margin: 4px 0 18px;
  text-align: center;
}

/* ============================================================
   FULL-WIDTH MEET MASTHEAD (public meet/scores views) — breadcrumb,
   big meet name, LIVE badge, and date/location/sessions meta. Breaks
   out of <main> to span the viewport, echoing the prototype.
   ============================================================ */
html.ls2026 .ls-masthead {
  /* rendered between <header> and <main>, so it's already full page width */
  margin: 0;
  color: var(--chalk);
  background:
    radial-gradient(700px 360px at 88% -20%, rgba(28, 228, 196, 0.14), transparent 60%),
    linear-gradient(180deg, var(--stage-900), var(--stage-850));
  border-bottom: 1px solid rgba(150, 172, 222, 0.16);
  overflow: hidden;
}
html.ls2026 .ls-masthead-wrap { max-width: var(--content-max); margin: 0 auto; padding: 42px 24px 34px; }
html.ls2026 .ls-crumb {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--chalk-faint); margin-bottom: 14px;
}
html.ls2026 .ls-crumb a { color: var(--chalk-dim) !important; }
html.ls2026 .ls-crumb a:hover { color: var(--teal-bright) !important; text-decoration: none; }
html.ls2026 .ls-masthead-title {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin: 0;
  font-family: var(--font-ui);
  font-variation-settings: 'wdth' 120;
  font-weight: 860; text-transform: uppercase; letter-spacing: 0.01em; line-height: 0.98;
  font-size: clamp(1.9rem, 5.2vw, 3.4rem);
  color: var(--chalk) !important;
}
html.ls2026 .ls-live {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--live); color: #fff;
  font-size: 0.7rem; font-weight: 900; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 7px;
}
html.ls2026 .ls-live .dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; }
html.ls2026 .ls-masthead-meta {
  margin-top: 16px;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  color: var(--chalk-dim); font-size: 0.92rem;
}
html.ls2026 .ls-masthead-meta .m { display: inline-flex; align-items: center; gap: 8px; }
html.ls2026 .ls-masthead-meta svg { width: 15px; height: 15px; opacity: 0.75; flex-shrink: 0; }

/* ============================================================
   TABLES (light) — generic + meets / sessions listings
   ============================================================ */
html.ls2026 main table {
  border-collapse: separate;
  border-spacing: 0;
}

html.ls2026 main table.meets-table,
html.ls2026 main table.session-table {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin: 0 0 10px;
  background: var(--paper);
}

html.ls2026 main table.meets-table th,
html.ls2026 main table.session-table th {
  background: var(--th-bg);
  color: var(--ink-soft);
  text-align: left;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-strong);
}

html.ls2026 main table.meets-table td,
html.ls2026 main table.session-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  vertical-align: middle;
}
html.ls2026 main table.meets-table tr:last-child td,
html.ls2026 main table.session-table tr:last-child td { border-bottom: none; }

html.ls2026 main table.meets-table tbody tr,
html.ls2026 main table.meets-table tr { transition: background 0.15s; }
html.ls2026 main table.meets-table tr:hover td { background: var(--paper-2); }

html.ls2026 main table.meets-table td a,
html.ls2026 main table.session-table td a {
  font-weight: 750;
  font-variation-settings: 'wdth' 108;
  color: var(--ink);
}
html.ls2026 main table.meets-table td a:hover,
html.ls2026 main table.session-table td a:hover { color: var(--teal-ink); }
html.ls2026 main table.meets-table td.date-cell { font-family: var(--font-score); color: var(--ink-faint); font-size: 0.86rem; white-space: nowrap; }

/* ============================================================
   MOBILE CARDS — .meet-card / .session-card (display managed by
   the page's own responsive CSS; we only restyle appearance)
   ============================================================ */
html.ls2026 .meet-card,
html.ls2026 .session-card {
  border: 1px solid var(--line) !important;
  border-radius: var(--radius) !important;
  background: var(--paper) !important;
  box-shadow: var(--shadow-sm);
  color: var(--ink) !important;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
html.ls2026 .meet-card:hover,
html.ls2026 .session-card:hover {
  transform: translateY(-3px);
  border-color: var(--teal-ink) !important;
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
html.ls2026 .meet-card-title,
html.ls2026 .session-card-title {
  font-variation-settings: 'wdth' 110;
  font-weight: 800;
  color: var(--ink);
}
html.ls2026 .meet-card-dates { font-family: var(--font-score); color: var(--ink-soft); }
html.ls2026 .meet-card-location,
html.ls2026 .session-card-levels { color: var(--ink-faint); }

/* ============================================================
   REDESIGN MEET CARDS (home) — calendar-date tiles, one responsive
   grid that replaces the table+cards when the theme is active.
   ============================================================ */
html.ls2026 .ls-meet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr));
  gap: 18px;
  margin: 6px 0 10px;
}
html.ls2026 a.ls-meet-card {
  display: flex;
  gap: 18px;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.22s, box-shadow 0.22s;
}
html.ls2026 a.ls-meet-card:hover {
  transform: translateY(-4px);
  border-color: var(--teal-ink);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
html.ls2026 .ls-date-tile {
  flex-shrink: 0;
  width: 62px;
  text-align: center;
  align-self: flex-start;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper);
}
html.ls2026 .ls-date-tile .mon {
  display: block;
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 4px 0 3px;
  background: var(--teal-soft); color: var(--teal-ink);
}
html.ls2026 .ls-date-tile .day {
  display: block;
  font-family: var(--font-score);
  font-size: 1.5rem; font-weight: 600;
  padding: 6px 0 7px; color: var(--ink);
}
html.ls2026 .ls-meet-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
html.ls2026 .ls-meet-name {
  font-variation-settings: 'wdth' 112;
  font-weight: 820; text-transform: uppercase;
  font-size: 1.04rem; line-height: 1.15; color: var(--ink);
}
html.ls2026 .ls-meet-meta { margin-top: 7px; color: var(--ink-soft); font-size: 0.82rem; font-family: var(--font-score); }
html.ls2026 .ls-meet-loc { margin-top: 4px; color: var(--ink-faint); font-size: 0.84rem; }
html.ls2026 .ls-meet-go {
  margin-top: 12px;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--teal-ink);
}
/* left column: calendar date tile + (optional) uploaded meet logo below it */
html.ls2026 .ls-meet-aside {
  flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
html.ls2026 .ls-meet-logo {
  width: 62px;
  display: flex; align-items: center; justify-content: center;
}
html.ls2026 .ls-meet-logo img {
  max-width: 100%; max-height: 56px;
  object-fit: contain;
  border-radius: 8px;
}

/* ============================================================
   SESSION CARDS (public meet page) — prototype-style cards that
   replace the session-list table when the theme is active.
   ============================================================ */
html.ls2026 .ls-session-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 16px;
  margin: 4px 0 10px;
}
html.ls2026 a.ls-session-card {
  display: flex;
  flex-direction: column;
  padding: 20px 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
html.ls2026 a.ls-session-card:hover {
  transform: translateY(-3px);
  border-color: var(--teal-ink);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
html.ls2026 .ls-session-num {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  font-variation-settings: 'wdth' 116;
  font-weight: 860;
  text-transform: uppercase;
  font-size: 1.05rem;
  color: var(--ink);
}
/* a session that is actively being judged right now */
html.ls2026 a.ls-session-card.is-live {
  border-color: var(--live);
  box-shadow: 0 0 0 1px var(--live), var(--shadow-sm);
}
html.ls2026 .ls-session-live {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--live); color: #fff;
  font-size: 0.62rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 6px;
}
html.ls2026 .ls-session-live .dot {
  width: 6px; height: 6px; border-radius: 50%; background: #fff;
  animation: lsLivePulse 1.6s ease-in-out infinite;
}
@keyframes lsLivePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
html.ls2026 .ls-session-levels { margin-top: 8px; color: var(--ink-soft); font-size: 0.88rem; }
html.ls2026 .ls-session-go {
  margin-top: 14px;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal-ink);
}
html.ls2026 a.ls-session-card-all { border-color: var(--teal-ink); background: var(--teal-soft); }
html.ls2026 a.ls-session-card-all .ls-session-num { color: var(--teal-ink); }

/* empty state for a meet section with no meets */
html.ls2026 .ls-empty {
  text-align: center;
  padding: 34px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper-2);
  color: var(--ink-faint);
  margin: 2px 0 8px;
}
html.ls2026 .ls-empty-ic { display: block; width: 30px; height: 30px; margin: 0 auto 8px; opacity: 0.45; }
html.ls2026 .ls-empty-title { font-weight: 800; color: var(--ink-soft); font-size: 1rem; }
html.ls2026 .ls-empty-sub { font-size: 0.86rem; color: var(--ink-faint); margin-top: 3px; }

/* ============================================================
   FILTERS + FORM CONTROLS (light)
   ============================================================ */
html.ls2026 .filters { margin-bottom: 14px; }
html.ls2026 .filter-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
html.ls2026 .filter-group label { color: var(--ink-soft); font-weight: 700; }

html.ls2026 main input[type="text"],
html.ls2026 main input[type="search"],
html.ls2026 main input[type="email"],
html.ls2026 main input[type="password"],
html.ls2026 main input[type="number"],
html.ls2026 main input[type="tel"],
html.ls2026 main input[type="date"],
html.ls2026 main select,
html.ls2026 main textarea {
  font-family: var(--font-ui);
  font-size: 1rem;            /* 16px avoids iOS zoom */
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 10px 14px;
  transition: border-color 0.18s, box-shadow 0.18s;
}
html.ls2026 .filter-group input[type="text"] { border-radius: 99px; min-width: min(360px, 100%); }
html.ls2026 main input:focus,
html.ls2026 main select:focus,
html.ls2026 main textarea:focus {
  outline: none;
  border-color: var(--teal-ink);
  box-shadow: 0 0 0 3px var(--teal-soft);
}

/* ============================================================
   BUTTONS / CTA LINKS  (unified, guaranteed-readable)

   Targets real interactive elements (<button>, submit/button
   inputs, and anchors whose class contains "btn"/"button" such as
   .back-button or .change-meet-btn). The old site gave some of
   these a teal background; the theme link colour then turned their
   text teal too -> teal-on-teal. Here we force a solid teal fill
   with white text (primary) or a light outline (secondary) so every
   button reads clearly and looks on-theme. Selectors stay on
   interactive tags to avoid restyling wrapper divs like .btn-group.
   ============================================================ */
html.ls2026 main button,
html.ls2026 main input[type="submit"],
html.ls2026 main input[type="button"],
html.ls2026 main input[type="reset"],
html.ls2026 main a[class*="btn"],
html.ls2026 main a[class*="button"],
html.ls2026 main .reset-link,
html.ls2026 .change-meet-btn,
html.ls2026 .header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  line-height: 1.2;
  padding: 8px 15px;
  border-radius: 9px;
  border: 1px solid transparent !important;
  background: var(--teal-bright) !important;   /* electric-green primary */
  color: #06251f !important;                   /* dark text reads ~11:1 on green */
  cursor: pointer;
  text-decoration: none;
  box-shadow: none;
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s, background 0.15s;
}
html.ls2026 main button:hover,
html.ls2026 main input[type="submit"]:hover,
html.ls2026 main input[type="button"]:hover,
html.ls2026 main input[type="reset"]:hover,
html.ls2026 main a[class*="btn"]:hover,
html.ls2026 main a[class*="button"]:hover,
html.ls2026 .change-meet-btn:hover,
html.ls2026 .header-btn:hover {
  transform: translateY(-1px);
  filter: brightness(0.95);
  box-shadow: var(--shadow-sm);
  color: #06251f !important;
  text-decoration: none;
}
html.ls2026 main button:disabled,
html.ls2026 main input:disabled,
html.ls2026 .header-btn:disabled {
  background: var(--line-strong) !important;
  color: var(--ink-faint) !important;
  opacity: 1;
  cursor: not-allowed;
  filter: none;
  transform: none;
}

/* secondary / outline: Load More, Back links, Cancel */
html.ls2026 main .action-btn,
html.ls2026 main td button,
html.ls2026 main td input[type="submit"],
html.ls2026 main td input[type="button"],
html.ls2026 main td a[class*="btn"],
html.ls2026 main td a[class*="button"],
html.ls2026 main .reset-link,
html.ls2026 main a.back-button,
html.ls2026 main a[class*="back-button"],
html.ls2026 main [class*="cancel"],
html.ls2026 .header-btn.subuser-btn,
html.ls2026 .header-btn.demo-btn,
html.ls2026 a[href*="logout"].header-btn {
  background: var(--paper) !important;
  color: var(--teal-ink) !important;
  border: 1px solid var(--line-strong) !important;
  font-size: 0.76rem !important;
  font-weight: 700;
  padding: 6px 12px !important;
  box-shadow: none !important;
}
html.ls2026 main .action-btn:hover,
html.ls2026 main td button:hover,
html.ls2026 main td a[class*="btn"]:hover,
html.ls2026 main td a[class*="button"]:hover,
html.ls2026 main .reset-link:hover,
html.ls2026 main a.back-button:hover,
html.ls2026 main [class*="cancel"]:hover,
html.ls2026 .header-btn.subuser-btn:hover,
html.ls2026 .header-btn.demo-btn:hover,
html.ls2026 a[href*="logout"].header-btn:hover {
  background: var(--teal-soft) !important;
  color: var(--teal-ink) !important;
  border-color: var(--teal-ink) !important;
  filter: none;
  transform: none;
}
/* keep "Pay Now" green (primary) even though it's a table .action-btn */
html.ls2026 main .action-btn.pay {
  background: var(--teal-bright) !important;
  color: #06251f !important;
  border-color: transparent !important;
}
/* the logo action button has an inline purple bg -> outline like the rest */
html.ls2026 main .action-btn.logo {
  background: var(--paper) !important;
  color: var(--teal-ink) !important;
}

/* ------------------------------------------------------------
   SEMANTIC BUTTON VARIANTS (opt-in)
   The unified rule above paints EVERY button electric-teal so
   nothing reads teal-on-teal. That is great for consistency but
   makes pages where several actions sit side by side (Add / Print /
   Export / Delete) look monotonous. Add `ls-btn ls-btn--<variant>`
   to give an action a meaningful colour while KEEPING one shared
   shape + height, so a row of buttons looks intentional, not random.
   Selectors carry an extra class so they out-specify the blanket
   teal rule; sizing is normalised so legacy per-page height/min-width
   rules (e.g. .edit-button { height:32px }) can't make them mismatch.
   ------------------------------------------------------------ */
html.ls2026 main a.ls-btn,
html.ls2026 main button.ls-btn,
html.ls2026 main input.ls-btn,
html.ls2026 main td a.ls-btn,
html.ls2026 main td button.ls-btn {
  height: auto !important;
  min-width: 0 !important;
  min-height: 40px;               /* uniform height + comfortable tap target */
  padding: 9px 16px !important;
  font-size: 0.82rem !important;
  border-radius: 9px !important;
  white-space: nowrap;
}
/* Primary — the page's main create/confirm action */
html.ls2026 main .ls-btn--primary,
html.ls2026 main td .ls-btn--primary {
  background: var(--teal-bright) !important;
  color: #06251f !important;
  border-color: transparent !important;
}
/* Info — mode switches / neutral data actions */
html.ls2026 main .ls-btn--info,
html.ls2026 main td .ls-btn--info {
  background: #2563eb !important;
  color: #fff !important;
  border-color: transparent !important;
}
html.ls2026 main .ls-btn--info:hover,
html.ls2026 main td .ls-btn--info:hover { background: #1d4ed8 !important; color: #fff !important; filter: none; }
/* Success — exports (Download CSV) */
html.ls2026 main .ls-btn--success,
html.ls2026 main td .ls-btn--success {
  background: #15803d !important;
  color: #fff !important;
  border-color: transparent !important;
}
html.ls2026 main .ls-btn--success:hover,
html.ls2026 main td .ls-btn--success:hover { background: #166534 !important; color: #fff !important; filter: none; }
/* Danger — destructive actions (Delete All Scratched) */
html.ls2026 main .ls-btn--danger,
html.ls2026 main td .ls-btn--danger {
  background: #dc2626 !important;
  color: #fff !important;
  border-color: transparent !important;
}
html.ls2026 main .ls-btn--danger:hover,
html.ls2026 main td .ls-btn--danger:hover { background: #b91c1c !important; color: #fff !important; filter: none; }
/* Neutral — quiet utilities (Print, Upload, Reset, Edit, Scratch) */
html.ls2026 main .ls-btn--neutral,
html.ls2026 main td .ls-btn--neutral {
  background: var(--paper) !important;
  color: var(--ink) !important;
  border: 1px solid var(--line-strong) !important;
}
html.ls2026 main .ls-btn--neutral:hover,
html.ls2026 main td .ls-btn--neutral:hover {
  background: var(--teal-soft) !important;
  color: var(--teal-ink) !important;
  border-color: var(--teal-ink) !important;
  filter: none;
}
/* Warn — the "Unscratch" state of a toggled scratch button (amber) */
html.ls2026 main .ls-btn--warn,
html.ls2026 main td .ls-btn--warn {
  background: #b45309 !important;
  color: #fff !important;
  border-color: transparent !important;
}
html.ls2026 main .ls-btn--warn:hover,
html.ls2026 main td .ls-btn--warn:hover { background: #92400e !important; color: #fff !important; filter: none; }
/* Scratch toggle: the action it performs is color-coded. A not-yet-scratched
   gymnast shows "Scratch" in RED (the destructive action); a scratched gymnast
   shows "Unscratch" in GREEN (the restorative action). Neutral button shell,
   colored text only. The existing JS toggles `.scratched` so it flips live. */
html.ls2026 main .scratch-button,
html.ls2026 main td .scratch-button {
  color: #dc2626 !important;          /* "Scratch" = red */
  font-weight: 700 !important;
}
html.ls2026 main .scratch-button.scratched,
html.ls2026 main td .scratch-button.scratched {
  color: #15803d !important;          /* "Unscratch" = green */
}

/* ============================================================
   SCORES PODIUM (top-3 all-around) — gold/silver/bronze cards,
   shown above the results table on the single-session scores view.
   ============================================================ */
html.ls2026 .ls-podium-title {
  text-align: center;
  font-family: var(--font-ui);
  font-size: clamp(0.78rem, 1.8vw, 0.92rem);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 20px 0 4px;
}
html.ls2026 .ls-podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 14px 0 24px;
}
html.ls2026 .ls-podium-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px 16px;
  overflow: hidden;
}
html.ls2026 .ls-podium-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--medal, var(--ink-faint));
}
html.ls2026 .ls-podium-card.gold   { --medal: #eaa400; --medal-ink: #876200; }
html.ls2026 .ls-podium-card.silver { --medal: #94a3bd; --medal-ink: #515d72; }
html.ls2026 .ls-podium-card.bronze { --medal: #cf8043; --medal-ink: #8c4f1d; }
html.ls2026 .ls-podium-rank {
  position: absolute; right: 14px; top: 2px;
  font-family: var(--font-score); font-size: 3.2rem; font-weight: 700;
  color: var(--medal); opacity: 0.18; line-height: 1;
}
html.ls2026 .ls-podium-label {
  font-size: 0.62rem; font-weight: 850; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--medal-ink);
}
html.ls2026 .ls-podium-name {
  margin-top: 8px;
  font-variation-settings: 'wdth' 112;
  font-weight: 830; text-transform: uppercase; font-size: 1.06rem; line-height: 1.1;
  color: var(--ink);
}
html.ls2026 .ls-podium-club { color: var(--ink-faint); font-size: 0.8rem; margin-top: 4px; font-weight: 600; }
html.ls2026 .ls-podium-score {
  margin-top: 12px;
  font-family: var(--font-score); font-size: 1.85rem; font-weight: 700; color: var(--ink);
  display: flex; flex-direction: column;
}
html.ls2026 .ls-podium-score .lbl {
  font-family: var(--font-ui); font-size: 0.58rem; font-weight: 800; letter-spacing: 0.18em;
  color: var(--ink-faint); margin-bottom: 2px;
}
@media (max-width: 760px) {
  html.ls2026 .ls-podium { grid-template-columns: 1fr; gap: 10px; }
  html.ls2026 .ls-podium-card { flex-direction: row; align-items: center; justify-content: space-between; padding: 14px 18px; }
  html.ls2026 .ls-podium-score { margin-top: 0; font-size: 1.5rem; text-align: right; }
  html.ls2026 .ls-podium-rank { font-size: 2.4rem; top: auto; bottom: 2px; }
}

/* ============================================================
   LIVE SCORES TABLE (the un-classed results <table>, identified
   by its .desktop-row / .score-cell cells). Appearance only — the
   desktop/mobile split + column sorting are the page's own logic;
   we don't touch display/width/overflow so behaviour is preserved.
   ============================================================ */
/* desktop header row */
html.ls2026 .desktop-header th {
  background: var(--th-bg);
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
html.ls2026 .desktop-header th a {
  color: var(--ink-soft) !important;
  text-decoration: none;
  font-weight: 850;
}
html.ls2026 .desktop-header th a:hover { color: var(--teal-ink) !important; }

/* desktop body rows */
html.ls2026 .desktop-row td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  vertical-align: middle;
}
html.ls2026 .desktop-row:hover td { background: var(--paper-2); }

/* gymnast cell */
html.ls2026 .gymnast-name { font-weight: 750; color: var(--ink); }
html.ls2026 .gym-name,
html.ls2026 .gymnast-details { color: var(--ink-faint); font-weight: 600; }

/* score numerals + rank.
   Mobile keeps its original metrics (only recoloured) because the layout
   packs name + 5 score columns into ~375px; the mono font / chip go to the
   desktop layout only, where there's room and no overflow risk. */
html.ls2026 .score { color: var(--ink); }
html.ls2026 .rank { color: var(--ink-faint) !important; font-weight: 800; }
html.ls2026 .desktop-row .score {
  font-family: var(--font-score);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
html.ls2026 .desktop-row .rank {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.66rem;
  background: var(--th-bg);
  border-radius: 6px;
  padding: 1px 6px;
}

/* all-around column emphasis (last col of the results rows) */
html.ls2026 .desktop-row td:last-child {
  color: var(--teal-ink);
  font-weight: 750;
  font-family: var(--font-score);
}
html.ls2026 .desktop-header th:last-child { color: var(--teal-ink); }

/* ============================================================
   STICKY FOOTER — on short pages (e.g. login) push the footer to
   the bottom of the viewport instead of floating mid-page. Scoped
   to pages with a standard <footer> so bespoke layouts (judge
   login, TV board) are untouched.
   ============================================================ */
html.ls2026 body:has(> footer) {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
html.ls2026 body:has(> footer) > main { flex: 1 0 auto; }
html.ls2026 body:has(> footer) > footer { flex-shrink: 0; margin-top: auto; }
/* A flex item with auto side-margins shrinks to its content width instead of
   filling the row. <main> uses `margin: 26px auto 40px` on desktop, so inside
   this flex-column body it collapses to whatever its content happens to be —
   narrow on card/form pages (e.g. Meet Day Tools -> 1-col), wide on table
   pages — so pages end up inconsistent widths. `width: 100%` does NOT take
   effect on this flex item (the flex sizing ignores it), but a `min-width`
   floor is honored: it forces main up to the canonical width, capped by
   max-width, with the auto margins just centering it. min() keeps it from
   overflowing on screens narrower than the content width. Mobile uses explicit
   12px side margins, so it already stretches — leave that path untouched. */
@media (min-width: 769px) {
  html.ls2026 body:has(> footer) > main { min-width: min(100%, var(--content-max)); }
}

/* ============================================================
   FOOTER (dark stage)
   ============================================================ */
html.ls2026 footer {
  position: relative;
  background: var(--stage-900);
  color: var(--chalk-dim);
  text-align: center;
  padding: 30px 20px 38px;
}
html.ls2026 footer::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 180px; height: 3px;
  background: linear-gradient(90deg, var(--teal-bright), transparent);
}
html.ls2026 footer p { font-size: 0.84rem; }
html.ls2026 footer a { color: var(--teal-bright); }

/* ============================================================
   JUDGE LOGIN (judge_login.php) — standalone centred card with its
   own Material palette; recolour it to the brand and give it a real
   footer. Scoped to the login-card body so nothing else is touched.
   ============================================================ */
html.ls2026 body:has(> .login-card) {
  --primary: #00736a;
  --primary-dark: #005a52;
  --text-primary: #0f1828;
  --text-secondary: #5b6678;
  --background: #f4f7fb;
  padding-bottom: 64px;   /* room for the fixed footer */
}
html.ls2026 .login-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
html.ls2026 .login-card h1 { font-family: var(--font-ui); font-weight: 820; color: var(--ink); }
html.ls2026 .login-card button[type="submit"] {
  font-family: var(--font-ui);
  font-weight: 800;
  border-radius: 12px;
}
/* the small page footer becomes a slim dark bar pinned to the bottom */
html.ls2026 body > .footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  margin: 0;
  padding: 14px 16px;
  background: var(--stage-900);
  color: var(--chalk-dim) !important;
  text-align: center;
  font-family: var(--font-ui);
  border-top: 2px solid var(--teal-bright);
}

/* ============================================================
   MY ACCOUNT page — turn the pastel section boxes into clean cards
   and theme the generic data tables. CSS-only (targets existing
   classes), so it reverts with the kill switch.
   ============================================================ */
/* section cards: drop the pastel backgrounds + coloured left borders */
html.ls2026 .create-meet-section {
  background: var(--paper-2) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius) !important;
  padding: 26px !important;
  margin-top: 24px !important;
}
html.ls2026 .create-meet-section h2,
html.ls2026 main > section > h2 {
  color: var(--ink) !important;
  font-family: var(--font-ui);
  font-weight: 820;
  margin-bottom: 8px;
}
html.ls2026 .price-tag { color: var(--teal-ink) !important; font-family: var(--font-score); }

/* generic data tables (My Account etc.) — NOT the meets/scores tables, the
   rotation board, or the roster-verification table, which carry their own
   styling (excluded via .meets-table/.session-table/.roster-table/.gymnast-row
   /.drop-zone so they match the borderless production look) */
html.ls2026 main table:not(.meets-table):not(.session-table):not(.roster-table):not(:has(.desktop-row)):not(:has(.mobile-row)):not(:has(.gymnast-row)):not(:has(.drop-zone)) th {
  background: var(--th-bg) !important;
  color: var(--ink-soft) !important;
  border: 1px solid var(--line) !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.72rem;
}
html.ls2026 main table:not(.meets-table):not(.session-table):not(.roster-table):not(:has(.desktop-row)):not(:has(.mobile-row)):not(:has(.gymnast-row)):not(:has(.drop-zone)) td {
  border: 1px solid var(--line) !important;
  color: var(--ink);
}
html.ls2026 main table:not(.meets-table):not(.session-table):not(.roster-table):not(:has(.desktop-row)):not(:has(.mobile-row)):not(:has(.gymnast-row)):not(:has(.drop-zone)) tr:hover td {
  background: var(--paper-2);
}

/* payment status chips */
html.ls2026 .payment-badge { border-radius: 99px !important; letter-spacing: 0.06em; }
html.ls2026 .payment-badge.paid { background: var(--teal-ink) !important; }
html.ls2026 .payment-badge.unpaid { background: #b26a00 !important; }

/* collapsible sections (My Account) — collapsed by default */
html.ls2026 #main-content > section.ls-collapsible {
  background: var(--paper) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius) !important;
  padding: 0 !important;
  margin: 14px 0 !important;
  overflow: hidden;
}
html.ls2026 .ls-collapse-head {
  margin: 0 !important;
  padding: 15px 20px !important;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  cursor: pointer; user-select: none;
  font-size: 1.05rem !important;
  color: var(--ink) !important;
  background: var(--paper-2);
}
html.ls2026 .ls-collapse-head:hover { background: var(--th-bg); }
html.ls2026 .ls-collapse-head:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: -2px; }
html.ls2026 .ls-collapse-head::after {
  content: '';
  width: 9px; height: 9px; flex-shrink: 0;
  border: solid var(--ink-faint); border-width: 0 2px 2px 0;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s;
}
html.ls2026 .ls-collapsible:not(.is-collapsed) .ls-collapse-head::after { transform: translateY(2px) rotate(-135deg); }
html.ls2026 .ls-collapse-body { padding: 6px 20px 22px !important; }
html.ls2026 .ls-collapsible.is-collapsed .ls-collapse-body { display: none !important; }

/* top status banners (Stripe / Login-as / Welcome) -> neutral cards */
html.ls2026 .ls-acct-note {
  background: var(--paper-2) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius) !important;
  color: var(--ink) !important;
}
html.ls2026 .ls-acct-note strong { color: var(--ink) !important; }
/* inline-coloured action links (Stripe banner + "Meets I'm Attending") ->
   compact outline buttons, matching the new secondary style */
html.ls2026 .ls-acct-note a[style*="background"],
html.ls2026 #attending-section a[style*="background"] {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--paper) !important;
  color: var(--teal-ink) !important;
  border: 1px solid var(--line-strong) !important;
  border-radius: 9px !important;
  font-weight: 700 !important;
  font-size: 0.78rem !important;
  padding: 7px 13px !important;
}
html.ls2026 .ls-acct-note a[style*="background"]:hover,
html.ls2026 #attending-section a[style*="background"]:hover {
  background: var(--teal-soft) !important;
  border-color: var(--teal-ink) !important;
}

/* My Meets: render the data table as cards (uses the existing data-label
   cells), so it matches the public meet cards and the action buttons stay
   on-screen on mobile instead of overflowing a wide table. */
html.ls2026 #main-content table:has(td[data-label="Actions"]) {
  border: 0 !important; box-shadow: none !important; background: transparent !important; width: 100%;
}
html.ls2026 #main-content table:has(td[data-label="Actions"]) thead { display: none; }
html.ls2026 #main-content table:has(td[data-label="Actions"]) tbody {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 16px;
}
html.ls2026 #main-content table:has(td[data-label="Actions"]) tr {
  display: block;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
}
html.ls2026 #main-content table:has(td[data-label="Actions"]) td {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border: 0 !important;
  padding: 5px 0 !important;
  background: transparent !important;
  font-size: 0.88rem;
  color: var(--ink);
}
html.ls2026 #main-content table:has(td[data-label="Actions"]) td {
  position: static !important;   /* cancel the page's mobile responsive table */
  padding-left: 0 !important;
}
html.ls2026 #main-content table:has(td[data-label="Actions"]) td::before {
  content: attr(data-label);
  /* the page's mobile CSS makes this position:absolute (overlapping the value);
     force it back into the flex row */
  position: static !important;
  left: auto !important;
  width: auto !important;
  padding-right: 0 !important;
  flex-shrink: 0;
  font-weight: 800; font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-faint);
}
/* meet name = card title */
html.ls2026 #main-content table:has(td[data-label="Actions"]) td[data-label="Meet Name"] {
  display: block;
  font-size: 1.1rem; font-weight: 820; color: var(--ink);
  margin-bottom: 10px; padding-bottom: 10px !important;
  border-bottom: 1px solid var(--line) !important;
}
/* uploaded meet logo: a centred banner at the TOP of the card (branding spot),
   so it stays large and legible on mobile instead of shrinking next to the
   action buttons. */
html.ls2026 #main-content table:has(td[data-label="Actions"]) td.ls-meet-logo-cell {
  display: block;
  padding: 0 !important;
  margin: 0 0 14px;
  text-align: center;          /* centre the inline-block image */
}
html.ls2026 #main-content table:has(td[data-label="Actions"]) td.ls-meet-logo-cell::before {
  display: none;               /* no "LOGO" data-label */
}
html.ls2026 .ls-meet-logo-banner {
  display: inline-block;
  max-width: 100%;
  max-height: 110px;           /* cap height; never upscales a small logo */
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 8px;
}
html.ls2026 #main-content table:has(td[data-label="Actions"]) td[data-label="Meet Name"]::before { display: none; }
/* actions row */
html.ls2026 #main-content table:has(td[data-label="Actions"]) td[data-label="Actions"] {
  display: block;
  margin-top: 12px; padding-top: 12px !important;
  border-top: 1px solid var(--line) !important;
}
html.ls2026 #main-content table:has(td[data-label="Actions"]) td[data-label="Actions"]::before { display: none; }

/* ============================================================
   LOGIN PAGE (login.php) — a clean centred card on the page bg
   ============================================================ */
html.ls2026 body:has(#login) main {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
html.ls2026 #login { display: flex; justify-content: center; padding: 14px 0 50px; }
html.ls2026 .ls-login-card {
  width: 100%;
  max-width: 420px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 34px 32px;
}
html.ls2026 .ls-login-title { font-size: clamp(1.4rem, 4vw, 1.7rem); font-weight: 820; color: var(--ink); margin: 0; }
html.ls2026 .ls-login-sub { color: var(--ink-faint); font-size: 0.92rem; margin: 6px 0 24px; }
html.ls2026 .ls-login-form { display: flex; flex-direction: column; gap: 16px; }
html.ls2026 .ls-field { display: flex; flex-direction: column; gap: 6px; }
html.ls2026 .ls-field > span { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-soft); }
html.ls2026 .ls-login-form input { width: 100%; }
html.ls2026 .ls-login-submit { width: 100%; margin-top: 6px; padding: 12px 16px !important; font-size: 0.95rem !important; }
html.ls2026 .ls-login-foot { text-align: center; margin: 22px 0 0; color: var(--ink-soft); font-size: 0.9rem; }
html.ls2026 .ls-login-foot a { color: var(--teal-ink); font-weight: 700; }
html.ls2026 .ls-login-alert { border-radius: 10px; padding: 11px 14px; margin-bottom: 16px; font-size: 0.88rem; border: 1px solid transparent; }
html.ls2026 .ls-login-alert.error { background: rgba(197, 44, 69, 0.10); color: #a3233a; border-color: rgba(197, 44, 69, 0.30); }
html.ls2026 .ls-login-alert.success { background: var(--teal-soft); color: var(--teal-ink); border-color: rgba(0, 115, 106, 0.28); }

/* ============================================================
   RESPONSIVE — recolor the existing mobile nav dropdown.
   (The page's own media queries still control show/hide.)
   ============================================================ */
@media (max-width: 768px) {
  html.ls2026 header { padding: 12px 18px; }
  html.ls2026 header > img { display: none !important; }
  html.ls2026 header::before { width: 188px; height: 34px; }
  /* The original/per-page CSS pins the hamburger at top:20px (and some pages,
     e.g. sessionManager, do it with #id + !important), which sits low in the
     taller themed header. Center it vertically, with enough specificity +
     !important to beat those page rules (incl. the backend hamburger id). */
  html.ls2026 header button#hamburger-backend,
  html.ls2026 header #hamburger-backend,
  html.ls2026 header button.hamburger,
  html.ls2026 header .hamburger {
    position: absolute !important;
    top: 50% !important;
    right: 16px !important;
    left: auto !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    padding: 8px !important;
  }
  html.ls2026 nav {
    background-color: var(--stage-900) !important;
    border-bottom: 1px solid rgba(150, 172, 222, 0.22);
    box-shadow: var(--shadow-md);
  }
  html.ls2026 nav ul li a { color: var(--chalk); font-size: 1rem; }
  html.ls2026 main { margin: 14px 12px 28px !important; padding: 20px 16px 28px !important; border-radius: var(--radius) !important; }
  html.ls2026 .ls-masthead { margin: 0; }
  html.ls2026 .ls-masthead + main { margin-top: 14px; }
  html.ls2026 .ls-masthead-wrap { padding: 26px 16px 22px; }
  html.ls2026 .ls-masthead-meta { gap: 12px; font-size: 0.84rem; margin-top: 12px; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html.ls2026 *, html.ls2026 *::before, html.ls2026 *::after {
    transition-duration: 0.001s !important;
    animation-duration: 0.001s !important;
  }
}

/* ============================================================
   GYMNASTS PAGE COMPONENTS (gymnasts.php)
   Action toolbar, collapsible "Filter By" accordion, and the
   mobile card view of the roster/scores table. Themed-only; the
   legacy look degrades gracefully (toolbar stacks, filters stay
   open, table keeps its horizontal scroll).
   ============================================================ */

/* ---- Action toolbar: wraps instead of running off-screen ---- */
html.ls2026 main .gym-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 22px 0 12px;
}
html.ls2026 main .gym-toolbar-count {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-right: auto;            /* desktop: push actions to the right */
}
html.ls2026 main .gym-toolbar-count strong { color: var(--ink); }
html.ls2026 main .gym-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
@media screen and (max-width: 768px) {
  html.ls2026 main .gym-toolbar-count { margin-right: 0; width: 100%; }
  html.ls2026 main .gym-toolbar-actions { width: 100%; }
  html.ls2026 main .gym-toolbar-actions > .ls-btn { flex: 1 1 auto; }  /* share width, never overflow */
}

/* ---- Always-visible search box (matches name OR competitor number) ---- */
html.ls2026 main .gym-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0 12px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
}
html.ls2026 main .gym-search:focus-within {
  border-color: var(--teal-ink);
  box-shadow: 0 0 0 2px var(--teal-soft);
}
html.ls2026 main .gym-search-icon { font-size: 0.95rem; opacity: .55; flex: 0 0 auto; }
html.ls2026 main .gym-search input {
  flex: 1;
  min-width: 0;
  border: 0 !important;
  outline: none;
  background: transparent;
  padding: 11px 0;
  font-size: 0.95rem;
  font-family: var(--font-ui);
  color: var(--ink);
}

/* ---- Master "Filters" disclosure: one toggle hides the whole filter panel ---- */
html.ls2026 main .gfilters-master { margin: 0 0 6px; }
html.ls2026 main .gfilters-toggle {
  width: 100% !important;
  display: flex !important;
  align-items: center;
  gap: 10px;
  background: var(--paper) !important;
  border: 1px solid var(--line-strong) !important;
  border-radius: 10px !important;
  padding: 11px 14px !important;
  margin: 0 !important;
  min-height: 0 !important;
  font-family: var(--font-ui);
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  color: var(--ink) !important;
  text-align: left;
  justify-content: flex-start !important;
  box-shadow: none !important;
  cursor: pointer;
}
html.ls2026 main .gfilters-toggle:hover {
  background: var(--teal-soft) !important;
  color: var(--teal-ink) !important;
  transform: none !important;
}
html.ls2026 main .gfilters-master.is-active .gfilters-toggle-label { color: var(--teal-ink); }
html.ls2026 main .gfilters-badge {
  flex: 0 0 auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--teal-ink);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
html.ls2026 main .gfilters-badge[hidden] { display: none; }
html.ls2026 main .gfilters-toggle .gfilter-chev { margin-left: auto; }
html.ls2026 main .gfilters-master.is-open .gfilter-chev { transform: rotate(-135deg); }
html.ls2026 main .gfilters-panel { padding-top: 8px; }
html.ls2026 main .gfilters-master:not(.is-open) .gfilters-panel { display: none; }

/* ---- Collapsible "Filter By" accordion ---- */
html.ls2026 main .gfilter-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
}
html.ls2026 main .gfilter { border-top: 1px solid var(--line); }
html.ls2026 main .gfilter:last-child { border-bottom: 1px solid var(--line); }
/* The header is a <button>; strip the blanket teal button styling. */
html.ls2026 main .gfilter-head {
  width: 100% !important;
  display: flex !important;
  align-items: center;
  gap: 10px;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 13px 4px !important;
  margin: 0 !important;
  min-height: 0 !important;
  font-family: var(--font-ui);
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  color: var(--ink) !important;
  text-align: left;
  justify-content: flex-start !important;
  box-shadow: none !important;
  cursor: pointer;
}
html.ls2026 main .gfilter-head:hover {
  background: transparent !important;
  color: var(--teal-ink) !important;
  transform: none !important;
}
html.ls2026 main .gfilter.is-active .gfilter-title { color: var(--teal-ink); }
html.ls2026 main .gfilter-badge {
  flex: 0 0 auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--teal-ink);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
html.ls2026 main .gfilter-badge[hidden] { display: none; }
html.ls2026 main .gfilter-chev {
  flex: 0 0 auto;
  margin-left: auto;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--ink-faint);
  border-bottom: 2px solid var(--ink-faint);
  transform: rotate(45deg);                 /* points down = collapsed */
  transition: transform 0.18s ease;
}
html.ls2026 main .gfilter.is-open .gfilter-chev { transform: rotate(-135deg); } /* points up = open */
html.ls2026 main .gfilter-body { padding: 2px 4px 16px; }
html.ls2026 main .gfilter:not(.is-open) .gfilter-body { display: none; }
html.ls2026 main .gfilter-body .checkbox-group { display: flex; flex-wrap: wrap; gap: 8px 14px; }
html.ls2026 main .gfilter-body #name-filter {
  width: 100%;
  max-width: 320px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}
html.ls2026 main .gfilter-body select {
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  min-width: 180px;
  background: var(--paper);
  color: var(--ink);
}

/* ---- Filter action buttons (View toggle / Reset): wrap on mobile ---- */
html.ls2026 main .filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
@media screen and (max-width: 768px) {
  html.ls2026 main .filter-buttons > .ls-btn { flex: 1 1 auto; text-align: center; }
}

/* ============================================================
   GYMNAST TABLE -> MOBILE CARDS (<=768px)
   The same <table> DOM reflows into one card per gymnast so the
   meet director never swipes sideways. We add data-label + hook
   classes (gym-c-*) to each <td> server-side; CSV/print/sort all
   read the unchanged table, so only the on-screen layout changes.
   Each row becomes a flex card; `order` re-sequences the cells
   (the desktop column order puts Birthdate/Age before Session, but
   the card shows the chip rail first). Scoped to the 2026 theme;
   in legacy (?theme=old) the table keeps its horizontal scroll.
   ============================================================ */
/* The mobile-only score-row break adds no desktop column and is skipped by
   CSV/print (it also carries .no-print); only the mobile card view reveals it. */
html.ls2026 .gym-score-break { display: none; }

@media screen and (max-width: 768px) {

  /* Retire the horizontal-scroll affordances under the theme */
  html.ls2026 main .mobile-scroll-hint-banner { display: none !important; }
  html.ls2026 main .table-container {
    overflow: visible !important;
    overflow-x: visible !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Table + rows -> a stream of block cards */
  html.ls2026 main .table-container table { display: block !important; width: 100%; min-width: 0 !important; border: 0; }
  html.ls2026 main .table-container table tbody { display: block; }
  html.ls2026 main .table-container table tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    position: relative;
    background: var(--paper);
    border: 1px solid var(--line-strong);       /* clear card outline so each card stands out */
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(15,24,40,.12);   /* + a stronger drop shadow */
    padding: 14px;
    margin: 0 0 14px;
    font-family: var(--font-ui);
  }
  /* Hide the desktop header row (sorting moves to the mobile control) */
  html.ls2026 main .table-container table tr.desktop-header { display: none !important; }

  /* Generic cell reset: each <td> is a flex item, no table sizing/nowrap.
     border-box so flex-basis percentages (score tiles 25%, action cells 50%)
     include padding+border and pack cleanly without a sub-pixel wrap. */
  html.ls2026 main .table-container table td {
    display: block;
    box-sizing: border-box;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    white-space: normal !important;
    text-align: left !important;
    border: 0 !important;
    padding: 0;
    margin: 0;
    font-size: 14px;
    color: var(--ink);
  }

  /* ---- HERO: gymnast name (shares line 1 with the # pill, sits left) ---- */
  html.ls2026 main .table-container table td.gym-c-name {
    order: 0;                         /* line 1, left of the # pill */
    flex: 1 1 auto;                   /* shrinkable so the # can share line 1; long names wrap, never widen the card */
    min-width: 0;                     /* allow flex shrink so overflow-wrap can break */
    overflow-wrap: anywhere;          /* unbreakable long names/tokens wrap instead of overflowing */
    word-break: break-word;
    position: static !important;
    font-size: 1.3rem !important;     /* beat legacy .sticky-col-gymnast{font-size:13px} */
    line-height: 1.18;
    font-weight: 700;
    color: var(--ink);
    padding: 0 0 4px 0 !important;    /* no padding-right reservation: # is now in-flow */
    border-bottom: 0;                 /* no divider line under the name */
  }
  html.ls2026 main .table-container table td.gym-c-name::before { content: none; }
  /* Name, (Sr.) and the specialist (events) badges all read at the same size as
     the name; only colour/weight differ. */
  html.ls2026 main .table-container table td.gym-c-name span { font-size: inherit; vertical-align: baseline; }

  /* ---- # competitor number -> teal pill in the card's TOP-RIGHT corner.
     IN-FLOW flex item (NOT position:absolute): it shares line 1 with the name
     and is shoved to the right edge with margin-left:auto. Because it is a real
     flex item with flex:0 0 auto + white-space:nowrap, it ALWAYS keeps its full
     intrinsic width (1-4 digits); if a long name leaves no room on line 1,
     flex-wrap drops the WHOLE pill to its own line fully visible. It can never
     be pushed off-screen or clipped to a sliver the way the old
     position:absolute;right:12px pill was on 320-430px phones. ---- */
  html.ls2026 main .table-container table td.gym-c-num {
    order: 1;                         /* AFTER the name (which is DOM-first) so it rides to the right */
    margin-left: auto;                /* push to the far right = top-right corner */
    align-self: flex-start;           /* hug the top edge of the card */
    flex: 0 0 auto;                   /* keep full width; never shrink */
    position: static !important;      /* never absolute -> never clips */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--teal-ink);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center !important;
    white-space: nowrap;              /* keep the number on one line (safe: in-flow) */
    font-variant-numeric: tabular-nums;
  }
  html.ls2026 main .table-container table td.gym-c-num::before { content: none; }
  /* When a gymnast has no competitor number, don't show an empty pill.
     margin-left:auto on the (now-removed) pill no longer applies, so the name
     simply takes the full line. */
  html.ls2026 main .table-container table td.gym-c-num:empty { display: none !important; }

  /* Full-width zero-height break AFTER the name+# line (order:0) and BEFORE the
     meta chip rail (Team order:2 / Level 3 / Session 4). This forces the chips
     onto line 2 so the # pill owns the top-right corner of line 1 alone. A
     zero-size, flex-basis:100% pseudo is a hard line break in a flex-wrap
     container. No DOM/PHP change required. */
  html.ls2026 main .table-container table tr::after {
    content: "";
    order: 1;
    flex: 0 0 100%;
    width: 100%;
    height: 0;
    margin: 0;
    padding: 0;
  }

  /* ---- META CHIP RAIL: Team / Level / Session ---- */
  html.ls2026 main .table-container table td.gym-c-team,
  html.ls2026 main .table-container table td.gym-c-level,
  html.ls2026 main .table-container table td.gym-c-session {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--teal-soft);
    color: var(--teal-ink);
    font-size: 0.85rem;
    font-weight: 600;
  }
  html.ls2026 main .table-container table td.gym-c-team { order: 2; }
  html.ls2026 main .table-container table td.gym-c-level { order: 3; }
  html.ls2026 main .table-container table td.gym-c-session { order: 4; }
  html.ls2026 main .table-container table td.gym-c-team::before,
  html.ls2026 main .table-container table td.gym-c-level::before,
  html.ls2026 main .table-container table td.gym-c-session::before {
    content: attr(data-label);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--ink-faint);
  }

  /* ---- LOW-PRIORITY roster lines: Birthdate, Age Group ---- */
  html.ls2026 main .table-container table td.gym-c-bdate,
  html.ls2026 main .table-container table td.gym-c-age {
    flex: 1 1 100%;
    font-size: 0.8rem;
    color: var(--ink-soft);
  }
  html.ls2026 main .table-container table td.gym-c-bdate { order: 6; }
  html.ls2026 main .table-container table td.gym-c-age { order: 7; }
  html.ls2026 main .table-container table td.gym-c-bdate::before,
  html.ls2026 main .table-container table td.gym-c-age::before {
    content: attr(data-label) ": ";
    font-weight: 700;
    color: var(--ink-faint);
  }

  /* Full-width zero-height break: forces the score tiles onto their own row
     below the chip rail (otherwise the first tile shares the chips' flex line). */
  html.ls2026 main .table-container table td.gym-score-break {
    display: block;
    order: 5;
    flex: 0 0 100%;
    width: 100%;
    height: 0;
    min-height: 0;
    padding: 0;
    margin: 0;
  }

  /* ---- SCORE TILES (scores view) ---- */
  html.ls2026 main .table-container table td.gym-c-score {
    order: 5;
    flex: 0 0 calc(25% - 8px);        /* women clean 4-up; men wrap 4 + 2 (slack avoids a sub-pixel wrap) */
    min-width: 54px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 7px 4px;
    background: var(--paper-2);
    border: 1px solid var(--line) !important;
    border-radius: 10px;
    text-align: center !important;
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
  }
  html.ls2026 main .table-container table td.gym-c-score::before {
    content: attr(data-label);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--ink-faint);
  }
  /* Absent score (em-dash) recedes */
  html.ls2026 main .table-container table td.gym-c-score.is-empty {
    background: transparent;
    border: 1px dashed var(--line) !important;
    color: var(--ink-faint);
    font-weight: 600;
  }

  /* ---- AA: full-width boxed all-around banner (last line) ---- */
  html.ls2026 main .table-container table td.gym-c-aa {
    order: 8;
    flex: 1 1 100%;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 9px 14px;
    border: 2px solid var(--teal-ink) !important;
    border-radius: 12px;
    background: var(--teal-soft);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--teal-ink);
    font-variant-numeric: tabular-nums;
    text-align: left !important;
  }
  html.ls2026 main .table-container table td.gym-c-aa::before {
    content: "ALL-AROUND";
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--teal-ink);
  }
  html.ls2026 main .table-container table td.gym-c-aa.is-empty {
    border: 1px solid var(--line) !important;
    background: var(--paper-2);
    color: var(--ink-faint);
  }
  html.ls2026 main .table-container table td.gym-c-aa.is-empty::before { color: var(--ink-faint); }

  /* ---- ACTION ROW (roster): Scratch + Edit, divided, full-width taps ---- */
  html.ls2026 main .table-container table td[data-label="Scratch"] { order: 9; }
  html.ls2026 main .table-container table td[data-label="Edit"] { order: 10; }
  html.ls2026 main .table-container table td[data-label="Scratch"],
  html.ls2026 main .table-container table td[data-label="Edit"] {
    flex: 1 1 calc(50% - 4px);
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px solid var(--line) !important;
  }
  html.ls2026 main .table-container table td[data-label="Scratch"] .ls-btn,
  html.ls2026 main .table-container table td[data-label="Edit"] .ls-btn,
  html.ls2026 main .table-container table td[data-label="Scratch"] .scratch-button,
  html.ls2026 main .table-container table td[data-label="Edit"] .edit-button {
    display: flex;                 /* flex-center so the <a> "Edit" sits vertically */
    align-items: center;          /* centered like the <button> "Scratch" */
    justify-content: center;
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    text-align: center;
    line-height: 1.1;
  }

  /* ---- SCRATCHED state: recede vs. active cards (faded + muted fill, no
     accent), so non-scratched gymnasts read as the prominent ones. ---- */
  html.ls2026 main .table-container table tr.scratched {
    opacity: .6;
    background: var(--paper-2);
    border-color: var(--line);
    box-shadow: none;
  }
  html.ls2026 main .table-container table tr.scratched td { text-decoration: none !important; }
  html.ls2026 main .table-container table tr.scratched td.gym-c-name {
    text-decoration: line-through !important;
    color: var(--ink-faint);
  }

  /* ---- MOBILE SORT CONTROL (rendered just above .table-container) ---- */
  html.ls2026 main .ls-mobile-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-family: var(--font-ui);
  }
  html.ls2026 main .ls-mobile-sort label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--ink-faint);
  }
  html.ls2026 main .ls-mobile-sort select {
    flex: 1;
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--paper);
    color: var(--ink);
    font-size: 0.95rem;
    font-family: var(--font-ui);
  }
}

/* Desktop + print: never card-ify, never show the mobile-only sort */
@media screen and (min-width: 769px) {
  html.ls2026 main .ls-mobile-sort { display: none; }
}
@media print {
  html.ls2026 .ls-mobile-sort { display: none !important; }
}
