/* =====================================================================
   modal-standard.css — Portal-wide modal visual contract.
   =====================================================================
   The contract (REVISED by Jeremy 2026-07-02 — light modals):
     • Modal panel = LIGHT (white/off-white, per-page panel colors win)
     • Form inputs = WHITE fields, dark text, gold focus ring
     • Eyebrow pills = gold-tinted chips with gold text
     • Close button = light gray circle with dark ×
     • Primary buttons = GOLD with dark text
     • Nested content cards (stat tiles, game cards, .p1-card) stay as
       BLACK accent objects with white text — deliberate contrast pieces,
       like the navy Pregame slab.
   (Previous 2026-05-14 gold-tray/black-objects contract is retired.)

   This file is loaded LATE in each page's <head> so its rules win over
   per-page defaults, except where a per-page rule uses higher specificity
   (which is fine — that's an intentional override).

   Scoped to `.modal-panel` and `.modal` only (the two modal flavors used
   across the portal). Public marketing pages (index, membership, sms-
   policy, recruit) don't use those class names, so they're untouched.
   ===================================================================== */

/* ---------------------------------------------------------------------
   1) DEFAULT TEXT COLOR — direct children of the panel are DARK on gold.
   --------------------------------------------------------------------- */
.modal-panel,
.modal {
  color: #0e0e0e;
}

/* ---------------------------------------------------------------------
   1b) SCROLL SAFETY — every modal must scroll its OWN body, never the
   page underneath. Without this, long-form modals (waiver text, event
   description + comments) overflow off-screen and iOS Safari has no
   way to reveal the bottom rows. -webkit-overflow-scrolling:touch
   restores native momentum-scroll on iOS PWA mode.

   Pages that already declare these on .modal-panel / .modal win via
   higher specificity, so this is a safe default, not an override.
   --------------------------------------------------------------------- */
.modal-panel,
.modal {
  /* 92vh on iOS counts the address-bar area, so tall modals overflow the
     VISIBLE screen and the close button / last rows land off-screen. dvh is
     the dynamic (visible) viewport height — it shrinks when the URL bar is
     showing, so the modal always fits. vh stays as the fallback for older
     browsers; the safe-area-aware cap keeps clear of the notch + home bar. */
  max-height: 92vh;
  max-height: min(92dvh, calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Headings rendered directly on the gold tray */
.modal-panel > h1, .modal-panel > h2, .modal-panel > h3, .modal-panel > h4,
.modal-panel > p,
.modal-panel > .section-title,
.modal-panel > .section-subtitle,
.modal-panel > .modal-title,
.modal-panel > .modal-sub,
.modal > h1, .modal > h2, .modal > h3, .modal > h4,
.modal > p,
.modal .modal-inner > h1, .modal .modal-inner > h2, .modal .modal-inner > h3,
.modal .modal-inner > p,
.modal .section-modal-inner > h1, .modal .section-modal-inner > h2,
.modal .section-modal-inner > h3,
.modal .section-modal-inner > p {
  color: #0e0e0e;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.18);
}

/* Subtitles / muted copy directly on gold — slightly dimmed black */
.modal-panel .section-subtitle,
.modal-panel .modal-sub,
.modal .section-modal-sub,
.modal .modal-sub,
.modal .section-modal-inner > .section-modal-sub {
  color: rgba(14, 14, 14, 0.78);
  text-shadow: none;
}

/* Strong/em inside gold-tray copy stays dark too */
.modal-panel > p strong, .modal-panel > p em,
.modal > p strong, .modal > p em {
  color: #0e0e0e;
}

/* ---------------------------------------------------------------------
   2) BLACK OBJECTS — eyebrow pills, close buttons, action buttons.
   --------------------------------------------------------------------- */

/* Eyebrow pill = gold-tinted chip with gold text (light contract) */
.modal-panel .section-modal-eyebrow,
.modal-panel .modal-eyebrow,
.modal-panel .card-eyebrow,
.modal-panel .hero-eyebrow,
.modal-panel .hs-acc-eyebrow,
.modal .section-modal-eyebrow,
.modal .modal-eyebrow,
.modal .card-eyebrow {
  background: rgba(201, 162, 39, 0.12) !important;
  border: 1px solid rgba(201, 162, 39, 0.42) !important;
  color: var(--gold, #c9a227) !important;
  box-shadow: none;
}

/* Close × button = light gray circle with dark × */
.modal-panel .modal-close,
.modal-panel .section-modal-close,
.modal .modal-close,
.modal .section-modal-close {
  background: #f2f2f7;
  color: #3a3a3c;
  border: 1px solid #e3e3e8;
}

/* ---------------------------------------------------------------------
   3) FORM INPUTS — every input/select/textarea inside a modal is a
      LIGHT field: white background, dark text, gold focus ring.
      color-scheme:light beats the global :root{color-scheme:dark}
      (mobile-polish.css) so UA-rendered controls (datetime pickers,
      selects) don't paint themselves dark on the light panel.
   --------------------------------------------------------------------- */
.modal-panel input[type="text"],
.modal-panel input[type="email"],
.modal-panel input[type="tel"],
.modal-panel input[type="number"],
.modal-panel input[type="url"],
.modal-panel input[type="search"],
.modal-panel input[type="password"],
.modal-panel input[type="date"],
.modal-panel input[type="time"],
.modal-panel input[type="datetime-local"],
.modal-panel input:not([type]),
.modal-panel select,
.modal-panel textarea,
.modal input[type="text"], .modal input[type="email"],
.modal input[type="tel"], .modal input[type="number"],
.modal input[type="url"], .modal input[type="search"],
.modal input[type="password"], .modal input[type="date"],
.modal input[type="time"], .modal input[type="datetime-local"],
.modal input:not([type]),
.modal select, .modal textarea {
  background: #ffffff;
  color: #1c1c1e;
  border: 1px solid #d1d1d6;
  border-radius: 12px;
  color-scheme: light;
}
.modal-panel input:focus,
.modal-panel select:focus,
.modal-panel textarea:focus,
.modal input:focus,
.modal select:focus,
.modal textarea:focus {
  outline: 0;
  border-color: var(--gold, #c9a227);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.20);
}
.modal-panel input::placeholder,
.modal-panel textarea::placeholder,
.modal input::placeholder,
.modal textarea::placeholder {
  color: #aeaeb2;
}
.modal-panel select option,
.modal select option {
  background: #ffffff;
  color: #1c1c1e;
}

/* Field labels stay dark on the light panel */
.modal-panel .field > label,
.modal-panel label.field-label,
.modal-panel .field-label,
.modal .field > label,
.modal label.field-label,
.modal .field-label {
  color: rgba(14, 14, 14, 0.82);
  font-weight: 800;
}

/* ---------------------------------------------------------------------
   4) NESTED BLACK CARDS — explicit content surfaces meant to read as
      black objects on the gold tray. Pages can opt-in with .p1-card,
      .panel-card, or .nested-card. Existing `.card` / `.lb-section` /
      `.metric-card` patterns already meet the spec — these rules just
      make sure they render correctly inside the modal context.
   --------------------------------------------------------------------- */
.modal-panel .p1-card,
.modal-panel .panel-card,
.modal-panel .nested-card,
.modal .p1-card {
  background: linear-gradient(180deg, #181818 0%, #0a0a0a 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 18px;
  color: #f5f5f5;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45),
              inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.modal-panel .p1-card *,
.modal-panel .panel-card *,
.modal-panel .nested-card *,
.modal .p1-card * {
  color: inherit;
}
.modal-panel .p1-card h1,
.modal-panel .p1-card h2,
.modal-panel .p1-card h3,
.modal-panel .p1-card h4,
.modal-panel .p1-card .title,
.modal .p1-card h1, .modal .p1-card h2, .modal .p1-card h3 {
  color: #ffffff;
  text-shadow: none;
}
.modal-panel .p1-card .muted,
.modal-panel .p1-card small,
.modal .p1-card .muted {
  color: rgba(255, 255, 255, 0.7);
}

/* ---------------------------------------------------------------------
   5) BUTTONS — light contract:
      a) GOLD button with dark text (primary "do it" actions)
      b) LIGHT gray button with dark text (secondary actions)
   --------------------------------------------------------------------- */
.modal-panel .btn-primary,
.modal .btn-primary {
  background: linear-gradient(180deg, var(--gold-soft, #d6b24a) 0%, var(--gold, #c9a227) 100%);
  color: #3a2c05;
  border: 1.5px solid transparent;
  box-shadow: 0 4px 12px rgba(201, 162, 39, 0.32);
}
.modal-panel .btn-secondary,
.modal .btn-secondary {
  background: #f2f2f7;
  color: #1c1c1e;
  border: 1px solid #d1d1d6;
}
.modal-panel .btn-gold,
.modal .btn-gold {
  background: linear-gradient(180deg, var(--gold-bright, #f0c862) 0%,
              var(--gold, #c9a227) 60%, #a27e13 100%);
  color: #0e0e0e;
  border: 1.5px solid #0e0e0e;
}

/* ---------------------------------------------------------------------
   6) GENERIC SAFETY NET — any visibly light text rendered DIRECTLY on
      the gold panel (no nested black wrapper) gets flipped to dark.
      Scoped tight so it doesn't override the per-page .p1-card / dark
      nested surfaces above.
   --------------------------------------------------------------------- */
.modal-panel > span,
.modal-panel > small,
.modal-panel > div:not(.p1-card):not(.panel-card):not(.nested-card):not(.modal-actions):not(.field):not(.modal-inner):not(.section-modal-inner):not([class*="-card"]):not([class*="-list"]):not([class*="-grid"]):not([class*="-list-wrap"]):not([class*="-section"]):not([class*="-tile"]) {
  color: #0e0e0e;
}

/* Status messages directly on gold should still convey state but be
   visible — keep their accent color, just bump opacity. */
.modal-panel .status,
.modal .status {
  color: #0e0e0e;
}
.modal-panel .status.success,
.modal .status.success { color: #1d6e3f; }
.modal-panel .status.error,
.modal .status.error { color: #8a1d1d; }

/* ---------------------------------------------------------------------
   7) EXISTING CARD/TILE PATTERNS — coerce every known nested-content
      class inside any modal to render as a BLACK OBJECT with white text.
      These are the per-page classes already in use; the CSS makes them
      conform to the contract without renaming any markup.

      Rule: high specificity + !important so we beat per-page rules that
      previously decorated these as gold-tinted cards.
   --------------------------------------------------------------------- */
.modal-panel .lb-section,
.modal-panel .hs-game-card,
.modal-panel .hl-empty,
.modal-panel .hl-card,
.modal-panel .metric-card,
.modal-panel .modal-stat,
.modal-panel .history-row,
.modal-panel .session-row,
.modal-panel .goal-section,
.modal-panel .goal-row,
.modal-panel .game-stats-panel,
.modal-panel .stat-cell,
.modal-panel .stat-tile,
.modal-panel .coach-context,
.modal-panel .extracted-row,
.modal-panel .photo-drop,
.modal-panel .athlete-code-section,
.modal .lb-section,
.modal .hs-game-card,
.modal .hl-empty,
.modal .hl-card,
.modal .metric-card,
.modal .modal-stat,
.modal .history-row,
.modal .session-row,
.modal .goal-section,
.modal .goal-row,
.modal .game-stats-panel,
.modal .stat-cell,
.modal .stat-tile,
.modal .extracted-row {
  background: linear-gradient(180deg, #181818 0%, #0a0a0a 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 16px !important;
  color: #f5f5f5 !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.40),
              inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

/* All text inside those black objects is white/light, regardless of
   per-page rules that previously forced #0e0e0e (dark). */
.modal-panel .lb-section, .modal-panel .lb-section *,
.modal-panel .hs-game-card, .modal-panel .hs-game-card *,
.modal-panel .hl-empty, .modal-panel .hl-empty *,
.modal-panel .hl-card, .modal-panel .hl-card *,
.modal-panel .metric-card, .modal-panel .metric-card *,
.modal-panel .modal-stat, .modal-panel .modal-stat *,
.modal-panel .history-row, .modal-panel .history-row *,
.modal-panel .session-row, .modal-panel .session-row *,
.modal-panel .goal-section, .modal-panel .goal-section *,
.modal-panel .goal-row, .modal-panel .goal-row *,
.modal-panel .game-stats-panel, .modal-panel .game-stats-panel *,
.modal-panel .stat-cell, .modal-panel .stat-cell *,
.modal-panel .stat-tile, .modal-panel .stat-tile *,
.modal-panel .coach-context, .modal-panel .coach-context *,
.modal-panel .extracted-row, .modal-panel .extracted-row *,
.modal-panel .photo-drop, .modal-panel .photo-drop *,
.modal-panel .athlete-code-section, .modal-panel .athlete-code-section *,
.modal .lb-section, .modal .lb-section *,
.modal .hs-game-card, .modal .hs-game-card *,
.modal .hl-empty, .modal .hl-empty *,
.modal .hl-card, .modal .hl-card *,
.modal .metric-card, .modal .metric-card *,
.modal .modal-stat, .modal .modal-stat *,
.modal .history-row, .modal .history-row *,
.modal .session-row, .modal .session-row *,
.modal .goal-section, .modal .goal-section *,
.modal .goal-row, .modal .goal-row *,
.modal .game-stats-panel, .modal .game-stats-panel *,
.modal .stat-cell, .modal .stat-cell *,
.modal .stat-tile, .modal .stat-tile *,
.modal .extracted-row, .modal .extracted-row * {
  color: #f5f5f5 !important;
  text-shadow: none !important;
}

/* Headings inside the black objects are pure white */
.modal-panel .lb-section h1, .modal-panel .lb-section h2,
.modal-panel .lb-section h3, .modal-panel .lb-section h4,
.modal-panel .hs-game-card h3,
.modal-panel .hl-empty h3,
.modal-panel .metric-card h3,
.modal-panel .stat-tile h3,
.modal-panel .goal-section h3, .modal-panel .goal-section h4,
.modal-panel .game-stats-panel h3, .modal-panel .game-stats-panel h4,
.modal .lb-section h1, .modal .lb-section h2, .modal .lb-section h3,
.modal .hs-game-card h3, .modal .hl-empty h3,
.modal .metric-card h3, .modal .stat-tile h3,
.modal .goal-section h3, .modal .goal-section h4,
.modal .game-stats-panel h3, .modal .game-stats-panel h4 {
  color: #ffffff !important;
}

/* Eyebrows / muted labels inside the black objects render in gold-soft
   so they keep the eyebrow personality without flipping back to dark. */
.modal-panel .lb-section .lb-section-note,
.modal-panel .hs-game-card .hs-game-date,
.modal-panel .hl-empty .hl-empty-eyebrow,
.modal-panel .metric-card .metric-eyebrow,
.modal-panel .stat-tile .stat-tile-label,
.modal-panel .goal-section .section-eyebrow,
.modal-panel .game-stats-panel .gs-key-lbl,
.modal-panel .modal-stat .modal-stat-label,
.modal .lb-section .lb-section-note,
.modal .hs-game-card .hs-game-date,
.modal .hl-empty .hl-empty-eyebrow,
.modal .metric-card .metric-eyebrow,
.modal .stat-tile .stat-tile-label,
.modal .goal-section .section-eyebrow,
.modal .game-stats-panel .gs-key-lbl,
.modal .modal-stat .modal-stat-label {
  color: var(--gold-soft, #e7c45d) !important;
}

/* Muted/sub text inside black objects = soft gray, not dark */
.modal-panel .lb-section .lb-sub,
.modal-panel .hs-game-card .hs-game-vs,
.modal-panel .hs-game-card .hs-game-meta,
.modal-panel .hl-empty p,
.modal-panel .metric-card .metric-sub,
.modal-panel .history-row .history-note,
.modal-panel .session-row .session-note,
.modal-panel .goal-section .goal-sub,
.modal-panel .goal-row .goal-target-text,
.modal-panel .goal-row .goal-meta,
.modal .lb-section .lb-sub,
.modal .hs-game-card .hs-game-vs,
.modal .hs-game-card .hs-game-meta,
.modal .hl-empty p,
.modal .metric-card .metric-sub,
.modal .history-row .history-note,
.modal .session-row .session-note,
.modal .goal-section .goal-sub,
.modal .goal-row .goal-target-text,
.modal .goal-row .goal-meta {
  color: rgba(255, 255, 255, 0.72) !important;
}

/* Goal row specifics — the metric name reads white, the gold-soft
   progress strong tag stays gold, and the status pill keeps its own
   colored background (pending=gold, achieved=green, expired=gray)
   that's already legible on the dark card. */
.modal-panel .goal-row .goal-metric,
.modal .goal-row .goal-metric { color: #ffffff !important; }
.modal-panel .goal-row .goal-meta strong,
.modal .goal-row .goal-meta strong { color: var(--gold-soft, #e7c45d) !important; }
.modal-panel .goal-row .goal-progress-track,
.modal .goal-row .goal-progress-track {
  background: rgba(255, 255, 255, 0.10) !important;
}

/* ---------------------------------------------------------------------
   8) ADDITIONAL MODAL PANEL CLASSES — some pages use their own panel
      class name instead of .modal-panel / .modal. Treat them the same.
   --------------------------------------------------------------------- */
.hw-picker-panel,
.athlete-picker-modal-panel,
.p1-tenant-modal-panel,
.modal-card,
.modal-inner {
  /* default text on these panels = dark on gold */
  color: #0e0e0e;
}

/* Force the gold-tray background on these panels — overrides the dark
   gradient that 4 picker files (meals/grocery/curate-week/today-workout)
   declare in their inline <style>. The modal-standard.css link loads
   after each page's inline <style>, so these rules win on order. */
.athlete-picker-modal-panel {
  background:
    radial-gradient(140% 80% at 50% 0%, rgba(255, 232, 160, 0.55) 0%, transparent 55%),
    linear-gradient(180deg, #f0c862 0%, #c9a227 55%, #a27e13 100%) !important;
  border: 1.5px solid #0e0e0e !important;
  border-radius: 24px !important;
  box-shadow:
    0 0 0 1px rgba(201, 162, 39, 0.45),
    0 0 60px rgba(201, 162, 39, 0.35),
    0 14px 32px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}
.athlete-picker-modal h3 {
  color: #0e0e0e !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.18);
}
.athlete-picker-modal-close {
  background: #0e0e0e !important;
  color: var(--gold-soft, #e7c45d) !important;
  border: 1.5px solid #0e0e0e !important;
  border-radius: 999px !important;
  width: 34px !important;
  height: 34px !important;
}

/* Athlete picker tiles inside ANY of the above modal panels = black objects.
   The picker uses <button> elements; iOS Safari applies its own appearance
   to <button> on top of CSS unless we explicitly disable it. Reset both
   `appearance` and the WebKit prefix to neutralize the system tint. */
.modal-panel .athlete-card,
.modal .athlete-card,
.hw-picker-panel .athlete-card,
.athlete-picker-modal-panel .athlete-card {
  appearance: none !important;
  -webkit-appearance: none !important;
  background: linear-gradient(180deg, #181818 0%, #0a0a0a 100%) !important;
  background-color: #181818 !important;
  border: 1.5px solid rgba(255, 255, 255, 0.10) !important;
  color: #f5f5f5 !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45),
              inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}
.modal-panel .athlete-card .athlete-card-name,
.modal .athlete-card .athlete-card-name,
.hw-picker-panel .athlete-card .athlete-card-name,
.athlete-picker-modal-panel .athlete-card .athlete-card-name {
  color: #ffffff !important;
}
.modal-panel .athlete-card.active,
.modal .athlete-card.active,
.hw-picker-panel .athlete-card.active,
.athlete-picker-modal-panel .athlete-card.active {
  /* Active = same black background, but with a gold border + glow */
  background: linear-gradient(180deg, #181818 0%, #0a0a0a 100%) !important;
  border-color: var(--gold-soft, #e7c45d) !important;
  box-shadow: 0 0 0 1px var(--gold-soft, #e7c45d),
              0 10px 22px rgba(201, 162, 39, 0.25),
              inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

/* Search input inside the picker panel = light field (2026-07-02) */
.hw-picker-panel input,
.hw-picker-panel input[type="search"],
.athlete-picker-modal-panel input {
  background: #ffffff !important;
  color: #1c1c1e !important;
  border: 1px solid #d1d1d6 !important;
  border-radius: 12px !important;
  color-scheme: light;
}
.hw-picker-panel input::placeholder,
.athlete-picker-modal-panel input::placeholder {
  color: #aeaeb2;
}

/* ---------------------------------------------------------------------
   9) P1-MODAL-TILE — clean-slate tile primitive for ANY tile-style content
      rendered inside a modal. Use this class instead of legacy per-page
      classes (.athlete-card, .metric-card, etc.) when the cascade
      can't be relied on. Nothing else in the codebase uses this class,
      so there are no conflicts possible.
   --------------------------------------------------------------------- */
.p1-modal-tile {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 14px 10px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, #181818 0%, #0a0a0a 100%);
  background-color: #181818;
  border: 1.5px solid rgba(255, 255, 255, 0.10);
  color: #ffffff;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
  font: inherit;
}
.p1-modal-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(201, 162, 39, 0.45);
}
.p1-modal-tile.is-active {
  border-color: var(--gold-soft, #e7c45d);
  box-shadow: 0 0 0 1px var(--gold-soft, #e7c45d),
              0 10px 22px rgba(201, 162, 39, 0.25),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.p1-modal-tile-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: #0e0e0e;
  border: 2px solid rgba(255, 255, 255, 0.12);
  display: block;
}
.p1-modal-tile.is-active .p1-modal-tile-img {
  border-color: var(--gold-soft, #e7c45d);
}
.p1-modal-tile-name {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: .01em;
  line-height: 1.2;
  text-align: center;
  word-break: break-word;
  max-width: 100%;
}
.p1-modal-tile-sub {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-soft, #e7c45d);
}

/* Tile grid used inside picker modals */
.p1-modal-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 4px;
}

/* ---------------------------------------------------------------------
   10) UNIVERSAL GOLD-TRAY ENFORCEMENT — every `.modal` panel across the
       portal should look like the HS Athletics modal (gold tray with
       black-object content). Pages that previously defined their own
       dark-gradient .modal background now get overridden. Pages that
       already use .modal-panel are unaffected (they already use this tray).
   --------------------------------------------------------------------- */
.modal-backdrop > .modal,
.modal-backdrop > .modal-card,
.modal-backdrop > .drill-modal-card,
.modal:not(.modal-panel),
.modal-card,
.drill-modal-card,
.video-modal-card,
.vid-modal-card {
  background:
    radial-gradient(140% 80% at 50% 0%, rgba(255, 232, 160, 0.55) 0%, transparent 55%),
    linear-gradient(180deg, #f0c862 0%, #c9a227 55%, #a27e13 100%) !important;
  border: 1.5px solid #0e0e0e !important;
  box-shadow:
    0 0 0 1px rgba(201, 162, 39, 0.45),
    0 0 60px rgba(201, 162, 39, 0.35),
    0 14px 32px rgba(0, 0, 0, 0.50),
    inset 0 1px 0 rgba(255, 255, 255, 0.40) !important;
  color: #0e0e0e !important;
}
/* Helper alias — every selector below applies to both .modal and .modal-card */
.modal-backdrop > .modal > .modal-title,
.modal-backdrop > .modal > h1,
.modal-backdrop > .modal > h2,
.modal-backdrop > .modal > h3,
.modal-backdrop > .modal > h4,
.modal-backdrop > .modal-card > .modal-title,
.modal-backdrop > .modal-card > h1,
.modal-backdrop > .modal-card > h2,
.modal-backdrop > .modal-card > h3,
.modal-backdrop > .modal-card > h4 {
  color: #0e0e0e !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}
.modal-backdrop > .modal > p,
.modal-backdrop > .modal > .modal-sub,
.modal-backdrop > .modal-card > p,
.modal-backdrop > .modal-card > .modal-sub {
  color: rgba(14, 14, 14, 0.78) !important;
}
.modal-backdrop > .modal > .modal-close,
.modal-backdrop > .modal-card > .modal-close {
  background: #0e0e0e !important;
  color: var(--gold-soft, #e7c45d) !important;
  border: 1.5px solid #0e0e0e !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.40),
              inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

.modal-backdrop > .modal .field-label,
.modal-backdrop > .modal label,
.modal-backdrop > .modal-card .field-label,
.modal-backdrop > .modal-card label {
  color: rgba(14, 14, 14, 0.85) !important;
  font-weight: 800 !important;
}
.modal-backdrop > .modal .field-input,
.modal-backdrop > .modal .field-select,
.modal-backdrop > .modal input[type="text"],
.modal-backdrop > .modal input[type="email"],
.modal-backdrop > .modal input[type="tel"],
.modal-backdrop > .modal input[type="number"],
.modal-backdrop > .modal input[type="search"],
.modal-backdrop > .modal input[type="date"],
.modal-backdrop > .modal input[type="time"],
.modal-backdrop > .modal input:not([type]),
.modal-backdrop > .modal select,
.modal-backdrop > .modal textarea,
.modal-backdrop > .modal-card .field-input,
.modal-backdrop > .modal-card .field-select,
.modal-backdrop > .modal-card input[type="text"],
.modal-backdrop > .modal-card input[type="email"],
.modal-backdrop > .modal-card input[type="tel"],
.modal-backdrop > .modal-card input[type="number"],
.modal-backdrop > .modal-card input[type="search"],
.modal-backdrop > .modal-card input[type="date"],
.modal-backdrop > .modal-card input[type="time"],
.modal-backdrop > .modal-card input:not([type]),
.modal-backdrop > .modal-card select,
.modal-backdrop > .modal-card textarea {
  background: rgba(14, 14, 14, 0.92) !important;
  color: #ffffff !important;
  border: 1.5px solid rgba(14, 14, 14, 0.55) !important;
  border-radius: 12px !important;
}
.modal-backdrop > .modal input::placeholder,
.modal-backdrop > .modal textarea::placeholder,
.modal-backdrop > .modal-card input::placeholder,
.modal-backdrop > .modal-card textarea::placeholder { color: rgba(255, 255, 255, 0.45) !important; }

.modal-backdrop > .modal .btn-primary,
.modal-backdrop > .modal-card .btn-primary {
  background: #0e0e0e !important;
  color: var(--gold-soft, #e7c45d) !important;
  border: 1.5px solid #0e0e0e !important;
}
.modal-backdrop > .modal .btn-primary:hover,
.modal-backdrop > .modal-card .btn-primary:hover {
  background: #1a1a1a !important;
}
.modal-backdrop > .modal .btn-secondary,
.modal-backdrop > .modal-card .btn-secondary {
  background: rgba(14, 14, 14, 0.10) !important;
  color: #0e0e0e !important;
  border: 1.5px solid rgba(14, 14, 14, 0.45) !important;
}
.modal-backdrop > .modal .btn-secondary:hover,
.modal-backdrop > .modal-card .btn-secondary:hover {
  background: rgba(14, 14, 14, 0.18) !important;
}

.modal-backdrop > .modal .picker-filters,
.modal-backdrop > .modal-card .picker-filters {
  background: rgba(14, 14, 14, 0.85) !important;
  border: 1.5px solid rgba(14, 14, 14, 0.65) !important;
}
.modal-backdrop > .modal .picker-pill,
.modal-backdrop > .modal-card .picker-pill {
  color: rgba(255, 255, 255, 0.65) !important;
}
.modal-backdrop > .modal .picker-pill.is-on,
.modal-backdrop > .modal .picker-pill.is-active,
.modal-backdrop > .modal-card .picker-pill.is-on,
.modal-backdrop > .modal-card .picker-pill.is-active {
  background: var(--gold-soft, #e7c45d) !important;
  color: #0e0e0e !important;
  font-weight: 900 !important;
}

.modal-backdrop > .modal .ex-tile,
.modal-backdrop > .modal .exercise-card,
.modal-backdrop > .modal .pick-row,
.modal-backdrop > .modal .picker-row,
.modal-backdrop > .modal .builder-row,
.modal-backdrop > .modal-card .ex-tile,
.modal-backdrop > .modal-card .exercise-card,
.modal-backdrop > .modal-card .pick-row,
.modal-backdrop > .modal-card .picker-row,
.modal-backdrop > .modal-card .builder-row {
  background: linear-gradient(180deg, #181818 0%, #0a0a0a 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #f5f5f5 !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.40),
              inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

.modal-backdrop > .modal .state,
.modal-backdrop > .modal .spinner-text,
.modal-backdrop > .modal-card .state,
.modal-backdrop > .modal-card .spinner-text {
  color: rgba(14, 14, 14, 0.85) !important;
}

.modal-backdrop > .modal .field-grid,
.modal-backdrop > .modal-card .field-grid {
  background: transparent !important;
}

/* ---------------------------------------------------------------------
   11) DRILL-MODAL-CARD specifics (coach-reports.html) — uses its own
       backdrop/close class names, so the generic .modal-backdrop > rules
       don't match. Mirror the contract directly.
   --------------------------------------------------------------------- */
.drill-modal-card .drill-modal-close,
.drill-modal-close {
  background: #0e0e0e !important;
  color: var(--gold-soft, #e7c45d) !important;
  border: 1.5px solid #0e0e0e !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.40),
              inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}
.drill-modal-card .drill-title,
.drill-modal-card h1,
.drill-modal-card h2,
.drill-modal-card h3,
.drill-modal-card h4 {
  color: #0e0e0e !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}
.drill-modal-card > p,
.drill-modal-card .drill-meta,
.drill-modal-card .drill-sub {
  color: rgba(14, 14, 14, 0.78) !important;
}
/* Drill stat cells & history rows = black objects on gold */
.drill-modal-card .drill-pr-row,
.drill-modal-card .drill-pr-cell,
.drill-modal-card .history-table,
.drill-modal-card .drill-section {
  background: linear-gradient(180deg, #181818 0%, #0a0a0a 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  color: #f5f5f5 !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.40),
              inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}
.drill-modal-card .drill-pr-row *,
.drill-modal-card .drill-pr-cell *,
.drill-modal-card .history-table *,
.drill-modal-card .drill-section * {
  color: #f5f5f5 !important;
  text-shadow: none !important;
}
.drill-modal-card .drill-pr-cell-val {
  color: var(--gold-soft, #e7c45d) !important;
}

/* ---------------------------------------------------------------------
   12) VIDEO-PLAYER MODALS (.video-modal-card on athlete-hq.html for the
       highlight reel, .vid-modal-card on coach-exercises.html for the
       exercise demo). Flipped to gold-tray per Jeremy's call. The video
       element itself is left alone — only the surrounding chrome (panel,
       close button, title, eyebrow) is restyled.
   --------------------------------------------------------------------- */
.video-modal-card .video-modal-close,
.vid-modal-card .vid-modal-close,
.video-modal-close,
.vid-modal-close {
  background: #0e0e0e !important;
  color: var(--gold-soft, #e7c45d) !important;
  border: 1.5px solid #0e0e0e !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.40),
              inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}
.video-modal-card .video-modal-title,
.video-modal-card h1,
.video-modal-card h2,
.video-modal-card h3,
.vid-modal-card .vid-modal-title,
.vid-modal-card h1,
.vid-modal-card h2,
.vid-modal-card h3 {
  color: #0e0e0e !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}
/* Eyebrow above video title — match the HS Athletics eyebrow style */
.vid-modal-card .vid-modal-eye,
.video-modal-card .video-modal-eye {
  background: #0e0e0e !important;
  color: var(--gold-soft, #e7c45d) !important;
  border: 1.5px solid #0e0e0e !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4),
              inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}
/* The video frame container — leave the <video>/iframe alone, but the
   wrapper itself gets a dark inset so the video reads cleanly on the
   gold background. */
.video-modal-card .video-modal-frame,
.vid-modal-card .vid-modal-frame {
  background: #0e0e0e !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  overflow: hidden !important;
}

/* ---------------------------------------------------------------------
   13) CHECKBOX + LABEL CONSENT ROWS — defensive override.
   Both the Edit Athlete modal (.hw-consent) and the Add Highlight modal
   (.hl-feature-toggle) had bug reports where, inside the modal context,
   the label collapsed to ~1ch width and the text wrapped one letter per
   line. Root cause varies (parent flex/grid + min-content shrink, or a
   per-page word-break interacting with overflow). Brute-force override
   here so they always render as: checkbox on the left, label on the
   right, label growing to the available row width.
   --------------------------------------------------------------------- */
.modal-backdrop .hw-consent,
.modal-backdrop .hl-feature-toggle,
.modal-panel .hw-consent,
.modal-panel .hl-feature-toggle,
.modal .hw-consent,
.modal .hl-feature-toggle,
.modal-card .hw-consent,
.modal-card .hl-feature-toggle {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  flex-wrap: nowrap !important;
  gap: 12px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  /* These three together undo any column / vertical-text behavior that
     may be inheriting from a parent (column-count, writing-mode, etc.) */
  column-count: auto !important;
  column-width: auto !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}

.modal-backdrop .hw-consent > input,
.modal-backdrop .hl-feature-toggle > input,
.modal-panel .hw-consent > input,
.modal-panel .hl-feature-toggle > input,
.modal .hw-consent > input,
.modal .hl-feature-toggle > input,
.modal-card .hw-consent > input,
.modal-card .hl-feature-toggle > input {
  flex: 0 0 auto !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  margin: 3px 0 0 !important;
  align-self: flex-start !important;
}

.modal-backdrop .hw-consent > label,
.modal-backdrop .hl-feature-toggle > label,
.modal-panel .hw-consent > label,
.modal-panel .hl-feature-toggle > label,
.modal .hw-consent > label,
.modal .hl-feature-toggle > label,
.modal-card .hw-consent > label,
.modal-card .hl-feature-toggle > label {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: auto !important;
  max-width: none !important;
  display: block !important;
  text-align: left !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  column-count: auto !important;
  column-width: auto !important;
  line-height: 1.5 !important;
  font-size: 12.5px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

/* End of modal-standard.css */

/* =====================================================================
   PAPER LOOK (Nov 8, Jeremy: "make sure all pages fit our new styling").
   Every modal on a non-Pop-Warner page becomes a white card on the cream
   app: hairline border, dark text, white inputs, gold primary buttons,
   white secondary buttons. Nested cards and tiles go light too. Video
   frames stay black. Pop Warner pages (body.pw-theme) keep their look.
   ===================================================================== */
body:not(.pw-theme):not(.keep-dark) .modal-backdrop > .modal,
body:not(.pw-theme):not(.keep-dark) .modal-backdrop > .modal-card,
body:not(.pw-theme):not(.keep-dark) .modal-backdrop > .drill-modal-card,
body:not(.pw-theme):not(.keep-dark) .modal:not(.modal-panel),
body:not(.pw-theme):not(.keep-dark) .modal-card,
body:not(.pw-theme):not(.keep-dark) .modal-panel,
body:not(.pw-theme):not(.keep-dark) .athlete-picker-modal-panel,
body:not(.pw-theme):not(.keep-dark) .vid-modal-card,
body:not(.pw-theme):not(.keep-dark) .video-modal-card {
  background: #fff !important; color: #141414 !important;
  border: 1px solid #e6e1d6 !important; border-radius: 14px !important;
  box-shadow: 0 12px 40px rgba(20,20,20,.18) !important;
}
body:not(.pw-theme):not(.keep-dark) .modal-backdrop > .modal > :is(.modal-title,h1,h2,h3,h4),
body:not(.pw-theme):not(.keep-dark) .modal-backdrop > .modal-card > :is(.modal-title,h1,h2,h3,h4),
body:not(.pw-theme):not(.keep-dark) .athlete-picker-modal h3,
body:not(.pw-theme):not(.keep-dark) .drill-modal-card h4 {
  color: #141414 !important; font-family: "Oswald","Arial Narrow",system-ui,sans-serif !important;
  font-style: normal !important; font-weight: 600 !important; text-transform: uppercase; letter-spacing: .04em; text-shadow: none !important;
}
body:not(.pw-theme):not(.keep-dark) :is(.modal,.modal-card,.modal-panel) :is(.modal-sub,.field-label,label,.muted,.spinner-text,.section-modal-sub) { color: #4a4740 !important; text-shadow: none !important; }
body:not(.pw-theme):not(.keep-dark) :is(.modal,.modal-card,.modal-panel,.athlete-picker-modal-panel) :is(input,select,textarea) {
  background: #fff !important; color: #141414 !important; border: 1px solid #e6e1d6 !important;
  border-radius: 10px !important; font-size: 16px !important; min-height: 44px; box-shadow: none !important;
}
body:not(.pw-theme):not(.keep-dark) :is(.modal,.modal-card,.modal-panel,.athlete-picker-modal-panel) :is(input,textarea)::placeholder { color: #77736a !important; }
body:not(.pw-theme):not(.keep-dark) :is(.modal,.modal-card,.modal-panel) :is(input,select,textarea):focus { outline: 2px solid rgba(201,162,39,.55) !important; outline-offset: 1px; border-color: #c9a227 !important; }
body:not(.pw-theme):not(.keep-dark) :is(.modal,.modal-card,.modal-panel) :is(.btn-primary,.btn-gold) {
  background: linear-gradient(180deg,#d9b43a,#c9a227) !important; color: #151005 !important; border: 1px solid #c9a227 !important;
  font-family: "Oswald","Arial Narrow",system-ui,sans-serif !important; font-style: normal !important; font-weight: 600 !important;
  letter-spacing: .1em; text-transform: uppercase; min-height: 44px; border-radius: 999px !important; box-shadow: none !important; transform: none !important;
}
body:not(.pw-theme):not(.keep-dark) :is(.modal,.modal-card,.modal-panel) .btn-secondary {
  background: #fff !important; color: #141414 !important; border: 1px solid #e6e1d6 !important;
  font-family: "Oswald","Arial Narrow",system-ui,sans-serif !important; font-style: normal !important; font-weight: 600 !important;
  letter-spacing: .1em; text-transform: uppercase; min-height: 44px; border-radius: 999px !important; box-shadow: none !important; transform: none !important;
}
body:not(.pw-theme):not(.keep-dark) :is(.modal-backdrop > .modal, .modal-backdrop > .modal-card) > .modal-close,
body:not(.pw-theme):not(.keep-dark) .athlete-picker-modal-close,
body:not(.pw-theme):not(.keep-dark) .drill-modal-close,
body:not(.pw-theme):not(.keep-dark) :is(.vid-modal-close,.video-modal-close),
body:not(.pw-theme):not(.keep-dark) .modal .section-modal-close {
  background: #f3efe4 !important; color: #141414 !important; border: 1px solid #e6e1d6 !important; box-shadow: none !important;
}
body:not(.pw-theme):not(.keep-dark) .modal-panel :is(.panel-card,.nested-card),
body:not(.pw-theme):not(.keep-dark) .modal :is(.p1-card,.stat-cell,.stat-tile,.extracted-row,.athlete-card),
body:not(.pw-theme):not(.keep-dark) :is(.hw-picker-panel,.athlete-picker-modal-panel) .athlete-card,
body:not(.pw-theme):not(.keep-dark) .modal-backdrop > .modal-card :is(.pick-row,.picker-row,.builder-row),
body:not(.pw-theme):not(.keep-dark) .drill-modal-card :is(.drill-pr-cell,.history-table,.drill-section),
body:not(.pw-theme):not(.keep-dark) .p1-modal-tile {
  background: #faf8f3 !important; color: #141414 !important; border: 1px solid #e6e1d6 !important; box-shadow: none !important;
}
body:not(.pw-theme):not(.keep-dark) .modal :is(.p1-card,.extracted-row) *,
body:not(.pw-theme):not(.keep-dark) .drill-modal-card .drill-section * { color: inherit !important; }
body:not(.pw-theme):not(.keep-dark) :is(.modal,.hw-picker-panel,.athlete-picker-modal-panel) .athlete-card.active {
  background: #141414 !important; color: #fff !important; border-color: #141414 !important;
}
body:not(.pw-theme):not(.keep-dark) :is(.modal .card-eyebrow, .vid-modal-card .vid-modal-eye, .video-modal-card .video-modal-eye) {
  background: #fbf3d6 !important; color: #8a6a00 !important; border: 0 !important; font-style: normal !important; transform: none !important;
}
body:not(.pw-theme):not(.keep-dark) .modal-backdrop > .modal-card .picker-pill { background: #fff !important; color: #4a4740 !important; border: 1px solid #e6e1d6 !important; }
body:not(.pw-theme):not(.keep-dark) .modal-backdrop > .modal-card .picker-pill.is-active { background: #141414 !important; color: #fff !important; border-color: #141414 !important; }
body:not(.pw-theme):not(.keep-dark) :is(.video-modal-card .video-modal-frame, .vid-modal-card .vid-modal-frame) { background: #000 !important; }
