:root {
      --bg: #08111b;
      --bg-2: #0b1520;
      --surface-1: rgba(11, 19, 29, 0.96);
      --surface-2: rgba(15, 25, 38, 0.98);
      --surface-3: rgba(19, 33, 49, 0.98);
      --text: #edf4fb;
      --muted: #8ea0b3;
      --border: rgba(120, 156, 192, 0.16);
      --tab: rgba(17, 28, 42, 0.92);
      --tab-active: #12314d;
      --tab-active-text: #f5fbff;
      --navbar-height: 52px;
      --subnav-height: 38px;
      --header-total: calc(var(--navbar-height) + var(--subnav-height));
      /* ── Typography system (bet365 — Roboto everywhere) ── */
      --font-primary: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
      --text-2xs:  9px;
      --text-xs:   10px;
      --text-sm:   11px;
      --text-base: 12px;
      --text-md:   13px;
      --text-lg:   14px;
      --text-xl:   16px;
      --text-2xl:  18px;
      --tracking-tight:   -0.01em;
      --tracking-normal:   0em;
      --tracking-wide:     0.04em;
      --tracking-wider:    0.08em;
      --tracking-widest:   0.13em;
    }
    /* ════════════════════════════════════════════
       iOS 26 LIQUID GLASS NAVBAR
       ════════════════════════════════════════════ */
    .navbar {
      position: sticky; top: 12px; z-index: 100;
      margin: 0 12px;
      height: 52px;
      border-radius: 18px;
      -webkit-backdrop-filter: blur(22px) saturate(180%);
      backdrop-filter: blur(22px) saturate(180%);
      background: rgba(255,255,255,0.10);
      border: 1px solid rgba(255,255,255,0.25);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.35),
                  0 4px 24px rgba(0,0,0,0.2);
    }
    .navbar-content {
      display: flex; align-items: center; justify-content: space-between;
      height: 100%; padding: 0 14px;
    }
    .navbar-left { flex-shrink: 0; }
    .navbar-logo {
       font-weight: 700; font-size: 1.5rem;
      color: #FFFFFF; letter-spacing: -0.02em; cursor: default;
      background: linear-gradient(90deg, #f1f5f9, #f1f5f9, #3b82f6, #f1f5f9);
      background-size: 200% 100%;
      -webkit-background-clip: text; background-clip: text;
      transition: background-position 800ms ease;
    }
    .navbar-logo:hover { background-position: -100% 0; }
    .navbar-center {
      display: flex; align-items: center; overflow-x: auto; flex: 1; justify-content: center;
      -ms-overflow-style: none; scrollbar-width: none; padding: 0 12px;
    }
    .navbar-center::-webkit-scrollbar { display: none; }
    .navbar-tabs { display: flex; gap: 3px; }
    .navbar-right { flex-shrink: 0; }
    .user-btn {
      display: flex; align-items: center; gap: 7px;
      padding: 4px 10px 4px 4px; border-radius: 9999px;
      -webkit-backdrop-filter: blur(20px) saturate(180%);
      backdrop-filter: blur(20px) saturate(180%);
      background: rgba(255,255,255,0.12);
      border: 1px solid rgba(255,255,255,0.25);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
      cursor: pointer; transition: background 150ms ease, border-color 150ms ease;
      
    }
    .user-btn:hover { background: rgba(255,255,255,0.18); }
    .user-btn--open { border-color: rgba(255,255,255,0.5); box-shadow: 0 0 12px rgba(255,255,255,0.2); }
    .user-btn-avatar {
      width: 26px; height: 26px; border-radius: 50%;
      background: linear-gradient(135deg, #3b82f6, #06b6d4);
      display: flex; align-items: center; justify-content: center;
      font-size: 0.85rem; font-weight: 700; color: #fff; flex-shrink: 0;
    }
    .user-btn-name { font-size: 1.00rem; color: #FFFFFF; font-weight: 500; }
    .user-btn-chevron { color: #64748b; transition: transform 200ms ease; }
    .user-btn--open .user-btn-chevron { transform: rotate(180deg); }

    /* ── User Dropdown ── */
    .user-dropdown {
      position: fixed; top: 62px; right: 16px; z-index: 200;
      min-width: 290px; border-radius: 14px;
      -webkit-backdrop-filter: blur(20px) saturate(180%);
      backdrop-filter: blur(20px) saturate(180%);
      background: rgba(255,255,255,0.10);
      border: 1px solid rgba(255,255,255,0.25);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.35),
                  0 20px 60px rgba(0,0,0,0.5);
      opacity: 0; transform: translateY(-8px) scale(0.97);
      transition: opacity 200ms ease, transform 200ms ease;
      pointer-events: none;
    }
    .user-dropdown--open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
    .user-card { padding: 6px; display: flex; flex-direction: column; gap: 1px; }
    .user-header { display: flex; align-items: center; gap: 10px; padding: 6px 10px 10px; }
    .user-avatar {
      width: 34px; height: 34px; border-radius: 50%;
      background: linear-gradient(135deg, #3b82f6, #06b6d4);
      display: flex; align-items: center; justify-content: center;
      font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0;
    }
    .user-info { display: flex; flex-direction: column; }
    .user-name { font-size: 1.0rem; font-weight: 700; color: #f1f5f9;  }
    .user-role {
      font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
      padding: 1px 5px; border-radius: 3px; display: inline-block; width: fit-content; margin-top: 2px;
    }
    .user-role--admin { background: rgba(245,158,11,0.15); color: #f59e0b; border: 1px solid rgba(245,158,11,0.3); }
    .user-role--user { background: rgba(59,130,246,0.15); color: #3b82f6; border: 1px solid rgba(59,130,246,0.3); }
    .user-email { font-size: 10px; color: #475569; margin-top: 1px; }
    .user-divider { height: 1px; background: rgba(255,255,255,0.07); margin: 3px 0; }
    .user-section-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #475569; padding: 4px 10px; }
    .user-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 7px; font-size: 12px; color: #e2e8f0;  }
    .user-row-label { color: #e2e8f0; font-size: 12px; }
    .user-hint { font-size: 10px; color: #475569; padding: 0 10px 5px 10px; margin-top: -3px; }
    .user-clickable { cursor: pointer; transition: background 120ms ease; }
    .user-clickable:hover { background: rgba(255,255,255,0.04); }
    .user-clickable svg { flex-shrink: 0; opacity: 0.6; }
    .user-row--danger { color: #ef4444; }
    .user-row--danger:hover { background: rgba(239,68,68,0.08); }
    .user-toggle { position: relative; width: 30px; height: 17px; flex-shrink: 0; }
    .user-toggle input { opacity: 0; width: 0; height: 0; }
    .user-toggle-track { position: absolute; inset: 0; background: rgba(255,255,255,0.12); border-radius: 9px; cursor: pointer; transition: background 200ms ease; }
    .user-toggle-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; background: #fff; border-radius: 50%; transition: transform 200ms ease; }
    .user-toggle input:checked + .user-toggle-track { background: #3b82f6; }
    .user-toggle input:checked + .user-toggle-track::after { transform: translateX(13px); }
    .user-stepper { display: flex; align-items: center; gap: 6px; }
    .user-step { width: 22px; height: 22px; border-radius: 5px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); color: #94a3b8; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 13px; transition: background 120ms ease;  }
    .user-step:hover { background: rgba(255,255,255,0.1); }
    .user-step-val { font-size: 13px; font-weight: 600; color: #f1f5f9; min-width: 18px; text-align: center;  }
    .user-books { display: flex; flex-wrap: wrap; gap: 3px; max-width: 150px; justify-content: flex-end; }
    .user-book-pill { padding: 2px 7px; border-radius: 4px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); color: #94a3b8; font-size: 9px; cursor: pointer; transition: background 120ms ease, color 120ms ease;  }
    .user-book-pill.active { background: rgba(59,130,246,0.15); border-color: rgba(59,130,246,0.3); color: #3b82f6; }
    .user-book-pill:hover { background: rgba(255,255,255,0.08); }
    .user-row-badge {
      font-size: 10px; color: #64748b; font-weight: 500;
      background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.2);
      border-radius: 4px; padding: 1px 6px; 
    }
    .user-row-arrow { color: #475569; flex-shrink: 0; transition: transform 180ms ease; }
    .user-row-arrow--open { transform: rotate(90deg); }
    .user-submenu {
      overflow: hidden;
      max-height: 0;
      transition: max-height 220ms ease;
    }
    .user-submenu--open { max-height: 150px; }
    .user-submenu-item {
      display: flex; align-items: center; gap: 8px;
      padding: 6px 10px 6px 18px; border-radius: 6px;
      font-size: 12px; color: #94a3b8; cursor: pointer;
      transition: background 120ms ease, color 120ms ease;
    }
    .user-submenu-item:hover { background: rgba(255,255,255,0.04); color: #e2e8f0; }
    .user-submenu-item--active { color: #e2e8f0; }
    .user-submenu-check { flex-shrink: 0; opacity: 0; transition: opacity 120ms ease; }
    .user-submenu-item--active .user-submenu-check { opacity: 1; color: #3b82f6; }
    .user-submenu-item span { flex: 1; }
      --header-bg: rgba(12, 22, 34, 0.98);
      --header-text: #d8e6f4;
      --row-hover: rgba(76, 126, 177, 0.14);
      --accent: #59c0ff;
      --success: #86d36a;
      --board-line: rgba(109, 147, 185, 0.14);
      --board-row-height: 44px;
      --board-date-col-width: 66px;
      --board-matchup-col-width: 272px;
      --board-pitcher-col-width: 110px;
      --board-event-header-bg: #111e2c;
      --board-date-header-bg: #0e1824;
      --board-league-header-bg: #10253a;
      --board-row-odd-bg: #101b29;
      --board-row-even-bg: #132131;
      --board-live-inprogress-bg: #15462f;
      --board-live-inprogress-text: #eafff2;
      --board-final-postponed-bg: #2a3342;
      --board-final-postponed-text: #edf3fb;
      /* ── Design tokens: Text hierarchy ── */
      --text-data:        #ffffff;
      --text-data-sub:    #e2e8f0;
      --text-header:      #60a5fa;
      --text-date:        #94a3b8;
      --text-col-header:  #cbd5e1;
      --text-pitcher:     #e2e8f0;
      /* ── Design tokens: Odds highlights ── */
      --odds-best-green-bg:     rgba(34,197,94,0.18);
      --odds-best-green-border: rgba(34,197,94,0.40);
      --odds-best-green-text:   #86efac;
      --odds-best-red-bg:       rgba(239,68,68,0.18);
      --odds-best-red-border:   rgba(239,68,68,0.40);
      --odds-best-red-text:     #fca5a5;
      --odds-best-blue-bg:      rgba(59,130,246,0.18);
      --odds-best-blue-border:  rgba(59,130,246,0.40);
      --odds-best-blue-text:    #93c5fd;
      /* ── Design tokens: Row / section ── */
      --row-separator:    rgba(255,255,255,0.055);
      --row-even:         rgba(255,255,255,0.018);
      --row-hover:        rgba(59,130,246,0.06);
      --section-bg:       rgba(59,130,246,0.08);
      --section-border:   rgba(59,130,246,0.20);
      --section-accent:   #3b82f6;
      --board-recent-lt1-bg: #c63d2f;
      --board-recent-lt1-text: #fdf7f5;
      --board-recent-lt5-bg: #d0a52a;
      --board-recent-lt5-text: #1f1602;
      --board-recent-lt10-bg: #2d7b52;
      --board-recent-lt10-text: #f4fbf7;
      --elev-1: 0 16px 40px rgba(3, 6, 12, 0.4);
      --elev-2: 0 24px 52px rgba(2, 5, 10, 0.48);
      --radius-lg: 20px;
      --radius-md: 14px;
    }
    * { box-sizing: border-box; }
    *, *::before, *::after {
      font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif !important;
    }
    body, input, button, select, textarea, table, th, td, label, span, div, p, a, li {
      font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    }
    body {
      margin: 0;
      overflow-x: hidden;
      font-family: var(--font-primary);
      color: var(--text);
      background:
        radial-gradient(900px 420px at 10% -5%, rgba(34, 77, 120, 0.28) 0%, rgba(13,13,13,0) 60%),
        radial-gradient(800px 400px at 100% -10%, rgba(23, 58, 96, 0.24) 0%, rgba(9,9,9,0) 58%),
        linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
      min-height: 100vh;
    }
    .wrap {
      width: 100%;
      max-width: 100%;
      margin: 0;
      padding: 10px 12px 20px;
      overflow-x: hidden;
    }
    h1 {
      margin: 0;
      font-size: 1.18rem;
      font-weight: 700;
      letter-spacing: 0.02em;
      color: #e5eff9;
    }
    .meta { color: var(--muted); margin: 6px 0 12px; font-size: 0.74rem; }
    .board-shell {
      border: 1px solid var(--border);
      border-radius: 18px;
      padding-top: 8px;
      background: linear-gradient(180deg, rgba(10, 18, 28, 0.96) 0%, rgba(10, 17, 25, 0.99) 100%);
      box-shadow: var(--elev-2);
      overflow: hidden;
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
    }
    .board-top {
      padding: 10px 12px 8px;
      border-bottom: 1px solid var(--board-line);
      background: linear-gradient(180deg, rgba(10, 19, 29, 0.98) 0%, rgba(11, 18, 27, 0.96) 100%);
    }
    .screen-controls {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      margin-bottom: 8px;
    }
    .screen-left, .screen-right {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    .screen-chip {
      border: 1px solid rgba(120, 156, 192, 0.2);
      background: rgba(16, 28, 42, 0.85);
      color: #c2d6ea;
      border-radius: 7px;
      padding: 6px 9px;
      font-size: 0.7rem;
      font-weight: 600;
      cursor: pointer;
      transition: 120ms ease;
    }
    .screen-chip.active {
      background: linear-gradient(180deg, rgba(14, 82, 118, 0.98) 0%, rgba(11, 64, 94, 1) 100%);
      border-color: rgba(101, 206, 255, 0.55);
      color: #e9f7ff;
    }
    .screen-chip:hover { border-color: rgba(101, 206, 255, 0.38); }
    .screen-select, .screen-select-btn {
      border: 1px solid rgba(120, 156, 192, 0.22);
      background: rgba(18, 31, 45, 0.95);
      color: #e4f1fc;
      border-radius: 7px;
      padding: 6px 10px;
      font-size: 0.7rem;
      font-weight: 600;
      min-height: 31px;
    }
    .screen-select-btn {
      cursor: pointer;
      transition: 120ms ease;
    }
    .screen-select-btn:hover { border-color: rgba(89, 192, 255, 0.42); }
    .screen-search {
      border: 1px solid rgba(120, 156, 192, 0.2);
      background: rgba(17, 29, 42, 0.95);
      color: #eff8ff;
      border-radius: 7px;
      padding: 6px 10px;
      font-size: 0.71rem;
      min-width: 180px;
    }
    .screen-search::placeholder { color: #7f97ae; }
    .toolbar {
      margin-bottom: 8px;
      display: flex;
      gap: 8px;
      align-items: center;
      flex-wrap: wrap;
    }
    .btn {
      border: 1px solid rgba(120, 156, 192, 0.2);
      background: linear-gradient(180deg, rgba(27, 43, 59, 0.94) 0%, rgba(18, 31, 44, 0.98) 100%);
      color: #d8e7f6;
      padding: 8px 12px;
      border-radius: 8px;
      cursor: pointer;
      font-size: 0.72rem;
      font-weight: 600;
      letter-spacing: 0.02em;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
      transition: 150ms ease;
    }
    .btn:hover { transform: translateY(-1px); border-color: rgba(89, 192, 255, 0.44); background: linear-gradient(180deg, rgba(30, 51, 70, 0.98) 0%, rgba(19, 35, 49, 1) 100%); }
    .odds-status {
      font-size: 0.72rem;
      color: var(--muted);
      padding: 7px 10px;
      border-radius: 8px;
      border: 1px solid rgba(120, 156, 192, 0.14);
      background: rgba(16, 28, 40, 0.78);
      letter-spacing: 0.02em;
    }
    .control-group {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      padding: 6px 10px;
      border-radius: 8px;
      border: 1px solid rgba(120, 156, 192, 0.14);
      background: rgba(16, 28, 40, 0.74);
      color: #bfd2e5;
      font-size: 0.7rem;
    }
    .control-label {
      color: #8fa7bf;
      font-weight: 600;
      letter-spacing: 0.02em;
    }
    .control-select {
      border: 1px solid rgba(120, 156, 192, 0.18);
      background: rgba(20, 35, 50, 0.96);
      color: #ecf4fc;
      border-radius: 6px;
      padding: 5px 8px;
      font-size: 0.72rem;
      font-weight: 600;
    }
    .odds-status.ok { color: #c9f7d6; border-color: rgba(159, 245, 184, 0.4); }
    .odds-status.warn { color: #f2d7b0; border-color: rgba(242, 215, 176, 0.4); }
    .odds-status.err { color: #f2b0b0; border-color: rgba(242, 176, 176, 0.4); }
    .odds-source-badge {
      font-size: 0.77rem;
      color: #9db6cf;
      padding: 7px 10px;
      border-radius: 8px;
      border: 1px solid rgba(120, 156, 192, 0.14);
      background: rgba(16, 28, 40, 0.56);
      letter-spacing: 0.03em;
      text-transform: uppercase;
    }
    .board-footer {
      padding: 8px 14px;
      display: flex;
      align-items: center;
      gap: 10px;
      border-top: 1px solid rgba(255, 255, 255, 0.04);
      background: rgba(10, 18, 28, 0.6);
    }
    .btn-mini { padding: 7px 11px; font-size: 0.72rem; }
    .bookmakers-modal {
      width: min(920px, 100%);
      max-height: 86vh;
      border: 1px solid var(--border);
      border-radius: 24px;
      background: linear-gradient(180deg, rgba(26, 26, 26, 0.96) 0%, rgba(13, 13, 13, 0.98) 100%);
      box-shadow: var(--elev-2);
      overflow: hidden;
      display: grid;
      grid-template-rows: auto 1fr auto;
    }
    /* ── Redesigned Sports Settings Modal ── */
    .settings-modal {
      --settings-surface: #161616;
      --settings-surface-2: #1e1e1e;
      --settings-surface-3: #242424;
      --settings-accent: #5b9df5;
      --settings-accent-amber: #e2a640;
      --settings-text: #e8e8e8;
      --settings-muted: #888;
      --settings-border: rgba(255, 255, 255, 0.06);
      --settings-border-active: rgba(255, 255, 255, 0.14);
      --settings-radius: 8px;
      width: min(960px, 100%);
      max-height: 88vh;
      border: 1px solid var(--settings-border-active);
      border-radius: 24px;
      background: linear-gradient(180deg, rgba(26,26,26,0.98) 0%, rgba(14,14,14,0.98) 100%);
      box-shadow: 0 24px 64px rgba(0,0,0,0.55);
      overflow: hidden;
      display: grid;
      grid-template-rows: auto 1fr auto;
    }
    .settings-head {
      display: flex; align-items: center; justify-content: space-between;
      padding: 12px 16px;
      border-bottom: 1px solid var(--settings-border);
    }
    .settings-head-title {
      font-size: 1rem; font-weight: 600; color: var(--settings-text);
      letter-spacing: 0.02em; margin: 0;
    }
    .settings-head-close {
      background: none; border: none; color: var(--settings-muted); font-size: 1.2rem;
      cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 4px;
    }
    .settings-head-close:hover { color: var(--settings-text); background: rgba(255,255,255,0.06); }
    /* ── 3-column main layout: rail | center | right ── */
    .settings-main {
      display: grid;
      grid-template-columns: 200px 1fr 280px;
      gap: 0;
      overflow: hidden;
    }
    /* ── Left Rail ── */
    .settings-rail {
      background: var(--settings-surface-2);
      border-right: 1px solid var(--settings-border);
      padding: 10px 0;
      overflow-y: auto;
      overflow-x: hidden;
      display: flex; flex-direction: column;
    }
    .settings-rail-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 6px 12px 4px;
    }
    .settings-rail-label {
      font-size: 0.77rem; font-weight: 700; letter-spacing: 0.08em;
      text-transform: uppercase; color: var(--settings-muted);
    }
    .settings-rail-add {
      background: none; border: 1px solid var(--settings-border-active);
      color: var(--settings-muted); width: 22px; height: 22px; border-radius: 5px;
      cursor: pointer; font-size: 0.85rem; display: flex; align-items: center; justify-content: center;
    }
    .settings-rail-add:hover { color: var(--settings-text); border-color: var(--settings-text); }
    .settings-rail-list { display: flex; flex-direction: column; gap: 1px; padding: 2px 6px; }
    .settings-rail-section { border-top: 1px solid var(--settings-border); margin-top: 6px; }

    /* Rail sport item */
    .settings-rail-item {
      display: flex; align-items: center; gap: 8px;
      padding: 6px 8px; border-radius: var(--settings-radius);
      cursor: pointer; font-size: 0.78rem; color: var(--settings-text);
      border: 1px solid transparent; border-left: 2px solid transparent;
      transition: background 0.15s, border-color 0.15s;
      user-select: none;
    }
    .settings-rail-item:hover { background: rgba(255,255,255,0.04); }
    .settings-rail-item.active {
      background: rgba(255,255,255,0.06);
      border-color: var(--settings-border-active);
      border-left-color: var(--settings-accent);
      font-weight: 500;
    }
    .settings-rail-item.disabled { opacity: 0.35; }
    .settings-rail-item.disabled > :not(button) { pointer-events: none; }
    .settings-rail-item-icon { font-size: 0.8rem; width: 16px; text-align: center; flex-shrink: 0; }
    .settings-rail-item-badge {
      margin-left: auto; font-size: 0.77rem; color: var(--settings-muted);
      background: rgba(255,255,255,0.06); padding: 1px 6px; border-radius: 8px;
    }
    /* Rail pill toggle */
    .settings-pill-toggle {
      position: relative; display: inline-flex; align-items: center;
      width: 30px; height: 16px; border-radius: 8px;
      background: rgba(255,255,255,0.1); cursor: pointer;
      border: none; padding: 0; flex-shrink: 0;
      transition: background 0.2s;
    }
    .settings-pill-toggle.on { background: var(--settings-accent); }
    .settings-pill-toggle::after {
      content: ''; position: absolute; top: 2px; left: 2px;
      width: 12px; height: 12px; border-radius: 50%;
      background: #fff; transition: transform 0.2s;
    }
    .settings-pill-toggle.on::after { transform: translateX(14px); }

    /* Custom tab rail item */
    .settings-rail-item.custom-tab {
      border-left: 2px solid var(--settings-accent-amber);
    }
    .settings-rail-item.custom-tab.active {
      background: rgba(226, 166, 64, 0.08);
      border-left-color: var(--settings-accent-amber);
    }
    .settings-rail-item-delete {
      margin-left: auto; background: none; border: none; color: var(--settings-muted);
      cursor: pointer; font-size: 0.85rem; padding: 2px 4px; border-radius: 3px;
      opacity: 0; transition: opacity 0.15s;
    }
    .settings-rail-item:hover .settings-rail-item-delete { opacity: 1; }
    .settings-rail-item-delete:hover { color: #e05555; background: rgba(224,85,85,0.1); }

    /* Inline custom tab form */
    .settings-custom-tab-form {
      padding: 8px 10px; display: flex; flex-direction: column; gap: 8px;
      border-top: 1px solid var(--settings-border);
    }
    .settings-custom-tab-form-label { display: flex; flex-direction: column; gap: 4px; }
    .settings-custom-tab-name-input {
      width: 100%; border: 1px solid var(--settings-border-active);
      background: var(--settings-surface-3); color: var(--settings-text);
      border-radius: 5px; padding: 5px 8px; font-size: 0.85rem;
    }
    .settings-custom-tab-name-input:focus { border-color: var(--settings-accent); outline: none; }
    .settings-custom-tab-form-actions { display: flex; gap: 6px; }
    .settings-form-btn {
      padding: 4px 12px; border: 1px solid var(--settings-border-active);
      background: var(--settings-surface-3); color: var(--settings-text);
      border-radius: 5px; font-size: 0.85rem; cursor: pointer;
    }
    .settings-form-btn:hover { background: rgba(255,255,255,0.06); }
    .settings-form-btn--primary {
      background: var(--settings-accent); border-color: var(--settings-accent); color: #fff;
      font-weight: 500;
    }
    .settings-form-btn--primary:hover { opacity: 0.9; }

    /* ── Center Panel (Leagues) ── */
    .settings-center {
      padding: 14px 16px; overflow-y: auto; overflow-x: hidden;
      border-right: 1px solid var(--settings-border);
    }
    .settings-center-head {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 10px; gap: 10px;
    }
    .settings-center-title {
      font-size: 0.85rem; font-weight: 600; color: var(--settings-text);
      letter-spacing: 0.04em; text-transform: uppercase; margin: 0;
    }
    .settings-league-search-wrap { flex: 1; max-width: 180px; }
    .settings-league-search {
      width: 100%; border: 1px solid var(--settings-border-active);
      background: var(--settings-surface-3); color: var(--settings-text);
      border-radius: 5px; padding: 4px 8px; font-size: 0.85rem;
    }
    .settings-league-search:focus { border-color: var(--settings-accent); outline: none; }
    .settings-league-search::placeholder { color: rgba(255,255,255,0.2); }
    /* ── Select All row ── */
    .settings-select-all-wrap { padding: 0 0 8px; }
    /* ── Custom Checkbox ── */
    .settings-checkbox {
      display: flex; align-items: center; gap: 8px;
      padding: 5px 8px; border-radius: 6px; cursor: pointer;
      font-size: 0.85rem; color: var(--settings-text);
      user-select: none; width: 100%; box-sizing: border-box;
    }
    .settings-checkbox:hover { background: rgba(255,255,255,0.04); }
    .settings-checkbox-input { position: absolute; opacity: 0; width: 0; height: 0; }
    .settings-checkbox-box {
      width: 16px; height: 16px; border-radius: 3px;
      border: 1.5px solid var(--settings-border-active);
      background: var(--settings-surface-3);
      flex-shrink: 0; position: relative; transition: background 0.15s, border-color 0.15s;
    }
    .settings-checkbox[data-checked='true'] .settings-checkbox-box,
    .settings-checkbox[data-checked='partial'] .settings-checkbox-box {
      background: var(--settings-accent); border-color: var(--settings-accent);
    }
    .settings-checkbox[data-checked='true'] .settings-checkbox-box::after {
      content: ''; position: absolute; top: 2px; left: 4px;
      width: 5px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0;
      transform: rotate(45deg);
    }
    .settings-checkbox[data-checked='partial'] .settings-checkbox-box::after {
      content: ''; position: absolute; top: 6px; left: 3px;
      width: 8px; height: 2px; background: #fff; border-radius: 1px;
    }
    .settings-checkbox-label { flex: 1; }
    .settings-checkbox--select-all {
      font-weight: 500; padding: 6px 8px;
      border-bottom: 1px solid var(--settings-border);
    }
    .settings-leagues-list {
      display: flex; flex-direction: column; gap: 1px; max-height: 420px; overflow-y: auto; overflow-x: hidden;
    }
    .settings-checkbox:focus-within { background: rgba(255,255,255,0.06); }

    /* ── Right Panel ── */
    .settings-right { padding: 14px 16px; overflow-y: auto; overflow-x: hidden; }
    .settings-fieldset {
      border: none; padding: 0; margin: 0 0 16px;
    }
    .settings-fieldset-legend {
      font-size: 0.77rem; font-weight: 700; letter-spacing: 0.08em;
      text-transform: uppercase; color: var(--settings-muted); margin-bottom: 8px;
    }
    .settings-options-list { display: flex; flex-direction: column; gap: 1px; margin-bottom: 8px; }
    .settings-fieldset-note {
      color: var(--settings-muted); font-size: 0.77rem; line-height: 1.35; margin: 4px 0 0;
    }
    .settings-board-title {
      font-size: 0.77rem; font-weight: 700; letter-spacing: 0.08em;
      text-transform: uppercase; color: var(--settings-muted); margin-bottom: 8px;
    }
    /* Preserve layout/color rows and preview from original */
    .settings-preview-card {
      border: 1px solid var(--settings-border-active); border-radius: var(--settings-radius);
      background: var(--settings-surface-2); margin-bottom: 14px; overflow: hidden;
    }
    .settings-preview-head {
      display: flex; align-items: center; justify-content: space-between;
      padding: 8px 12px; border-bottom: 1px solid var(--settings-border);
    }
    .settings-preview-title {
      font-size: 0.85rem; font-weight: 600; color: var(--settings-text); margin: 0;
    }
    .settings-preview-note { font-size: 0.77rem; color: var(--settings-muted); }
    .settings-group { margin-bottom: 10px; }
    .settings-group + .settings-group { border-top: 1px solid var(--settings-border); padding-top: 12px; }
    .settings-group-title {
      font-size: 0.85rem; font-weight: 700; letter-spacing: 0.04em;
      text-transform: uppercase; color: var(--settings-text); margin: 0 0 10px;
    }
    .settings-layout-row {
      display: grid; grid-template-columns: minmax(0,1fr) 70px; gap: 8px; align-items: center;
      border: 1px solid var(--settings-border); border-radius: var(--settings-radius);
      padding: 8px 10px; background: var(--settings-surface-2); margin-bottom: 6px;
    }
    .settings-layout-label { color: var(--settings-text); font-size: 1rem; font-weight: 600; }
    .settings-layout-note { color: var(--settings-muted); font-size: 0.9rem; line-height: 1.35; margin-top: 3px; }
    .settings-layout-input {
      width: 100%; border: 1px solid var(--settings-border-active);
      background: var(--settings-surface-3); color: var(--settings-text);
      border-radius: 6px; padding: 8px 28px 8px 10px; font-size: 1rem; font-weight: 600; text-align: right;
      -moz-appearance: textfield;
    }
    .settings-layout-input::-webkit-outer-spin-button,
    .settings-layout-input::-webkit-inner-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }
    .settings-color-control { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
    .settings-color-input { width: 28px; height: 28px; padding: 0; border: none; background: transparent; cursor: pointer; }
    .settings-color-text {
      width: 100px; border: 1px solid var(--settings-border-active);
      background: var(--settings-surface-3); color: var(--settings-text);
      border-radius: 6px; padding: 8px 10px; font-size: 1rem; font-weight: 600;
      text-transform: uppercase; text-align: center; 
    }
    .settings-inline-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
    .settings-foot {
      padding: 10px 16px 14px; display: flex; justify-content: flex-end; gap: 8px;
      border-top: 1px solid var(--settings-border);
    }

    /* ── Responsive ── */
    @media (max-width: 900px) {
      .settings-main { grid-template-columns: 160px 1fr 240px; }
    }
    @media (max-width: 720px) {
      .settings-main { grid-template-columns: 1fr; }
      .settings-rail { flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--settings-border); }
      .settings-center { border-right: none; }
    }

    /* ── Display Settings Modal (Board Appearance) ── */
    .display-settings-modal {
      --settings-surface: #161616;
      --settings-surface-2: #1e1e1e;
      --settings-surface-3: #242424;
      --settings-accent: #5b9df5;
      --settings-border: rgba(255, 255, 255, 0.06);
      --settings-border-active: rgba(255, 255, 255, 0.14);
      --settings-text: #e8e8e8;
      --settings-muted: #888;
      --settings-radius: 8px;
      width: min(900px, 100%);
      min-height: 400px;
      max-height: 88vh;
      border: 1px solid var(--settings-border-active);
      border-radius: 24px;
      background: linear-gradient(180deg, rgba(26,26,26,0.98) 0%, rgba(14,14,14,0.98) 100%);
      box-shadow: 0 24px 64px rgba(0,0,0,0.55);
      overflow: hidden;
      display: grid;
      grid-template-rows: auto 1fr auto;
    }
    .display-settings-body {
      padding: 12px; overflow-y: auto;
      min-height: 0;
    }
    .display-settings-body .settings-preview-card {
      min-height: 200px;
      margin-bottom: 12px;
    }
    .display-settings-body .settings-preview-head {
      display: flex; justify-content: space-between; align-items: center;
      margin-bottom: 8px;
    }
    .display-settings-body .settings-preview-title {
      font-size: 1.1rem; font-weight: 700; color: var(--settings-text); margin: 0;
    }
    .display-settings-body .settings-preview-note {
      font-size: 0.85rem; color: var(--settings-muted); margin: 0;
    }
    .display-settings-body .settings-group + .settings-group {
      border-top: 1px solid var(--settings-border); padding-top: 10px; margin-top: 12px;
    }
    .display-settings-body .settings-group-title {
      font-size: 1.1rem; font-weight: 700; letter-spacing: 0.04em;
      text-transform: uppercase; color: var(--settings-text); margin: 0 0 8px;
    }
    .display-settings-body .settings-layout-row {
      display: grid; grid-template-columns: 1fr 70px; gap: 10px; align-items: center;
      border: 1px solid var(--settings-border); border-radius: var(--settings-radius);
      padding: 10px; background: var(--settings-surface-2); margin-bottom: 6px;
    }
    .display-settings-body .settings-layout-row[data-color-row] {
      grid-template-columns: 1fr 120px;
    }
    .display-settings-body .settings-layout-label { color: var(--settings-text); font-size: 1.1rem; font-weight: 600; line-height: 1.3; }
    .display-settings-body .settings-layout-note { color: var(--settings-muted); font-size: 0.9rem; line-height: 1.35; margin-top: 2px; }
    .display-settings-body .settings-layout-input {
      width: 100%; box-sizing: border-box;
      border: 1px solid var(--settings-border-active);
      background: var(--settings-surface-3); color: var(--settings-text);
      border-radius: 6px; padding: 6px 8px; font-size: 1rem; font-weight: 600; text-align: right;
      -moz-appearance: textfield;
    }
    .display-settings-body .settings-layout-input::-webkit-outer-spin-button,
    .display-settings-body .settings-layout-input::-webkit-inner-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }
    .display-settings-body .settings-color-control { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
    .display-settings-body .settings-color-input { width: 28px !important; height: 28px !important; padding: 0; border: none; background: transparent; cursor: pointer; }
    .display-settings-body .settings-color-text {
      width: 85px; border: 1px solid var(--settings-border-active);
      background: var(--settings-surface-3); color: var(--settings-text);
      border-radius: 6px; padding: 6px 8px; font-size: 0.95rem; font-weight: 600;
      text-transform: uppercase; text-align: center; 
    }
    .display-settings-body .settings-inline-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
    .display-settings-body .settings-fieldset-note { color: var(--settings-muted); font-size: 0.85rem; margin-top: -8px; margin-bottom: 8px; }
    .display-settings-body .settings-preview-board {
      overflow-x: auto; overflow-y: hidden;
      border-radius: 8px;
      background: linear-gradient(180deg, rgba(10, 18, 28, 0.96) 0%, rgba(11, 17, 25, 0.99) 100%);
      box-shadow: 0 16px 40px rgba(3, 6, 12, 0.4);
      --board-row-height: 44px;
      --board-date-col-width: 66px;
      --board-matchup-col-width: 272px;
      --board-pitcher-col-width: 110px;
      --board-bookmaker-col-width: 72px;
    }
    .display-settings-body .settings-preview-table {
      width: 100%; border-collapse: collapse; font-size: 0.92rem; color: #ffffff;
    }
    .display-settings-body .settings-preview-table th,
    .display-settings-body .settings-preview-table td {
      padding: 3px 6px; vertical-align: middle; white-space: nowrap;
    }
    .display-settings-body .settings-preview-table th {
      height: 36px;
      color: rgba(255,255,255,0.35); font-size: 0.77rem;
      text-transform: uppercase; letter-spacing: 0.10em; font-weight: 700; text-align: left;
      background: rgba(255,255,255,0.04); border-bottom: 1px solid rgba(255,255,255,0.10);
    }
    .display-settings-body .settings-preview-table th:nth-child(1),
    .display-settings-body .settings-preview-table td:nth-child(1) {
      width: var(--board-date-col-width, 66px);
      min-width: var(--board-date-col-width, 66px);
    }
    .display-settings-body .settings-preview-table th:nth-child(2),
    .display-settings-body .settings-preview-table td:nth-child(2) {
      width: var(--board-matchup-col-width, 272px);
      min-width: var(--board-matchup-col-width, 272px);
    }
    .display-settings-body .settings-preview-table th:nth-child(3),
    .display-settings-body .settings-preview-table td:nth-child(3) {
      width: var(--board-pitcher-col-width, 110px);
      min-width: var(--board-pitcher-col-width, 110px);
    }
    .display-settings-body .settings-preview-table th.preview-book,
    .display-settings-body .settings-preview-table td.preview-book,
    .display-settings-body .settings-preview-table th.odds-col,
    .display-settings-body .settings-preview-table td.odds-col {
      width: var(--board-bookmaker-col-width, 72px);
      min-width: var(--board-bookmaker-col-width, 72px);
      text-align: center;
    }
    .display-settings-body .preview-book { width: 72px; }
    
    /* League/Date/Event headers - match actual events-table */
    .display-settings-body .settings-preview-table .league-header-row td {
      background: var(--board-league-header-bg); color: #edf6ff;
      font-size: 0.77rem; letter-spacing: 0.08em; font-weight: 700;
      text-transform: uppercase; text-align: center;
      height: 28px; padding: 4px 6px;
    }
    .display-settings-body .settings-preview-table .date-header-row td {
      background: var(--board-date-header-bg); color: #dce8f4;
      font-size: 0.73rem; letter-spacing: 0.04em; font-weight: 700;
      text-align: center; height: 24px; padding: 3px 6px;
    }
    .display-settings-body .settings-preview-table .event-header-row td {
      background: var(--board-event-header-bg); color: #e5eef8;
      font-size: 0.73rem; letter-spacing: 0.04em; font-weight: 700;
      text-align: center;
      border-top: 1px solid rgba(109, 147, 185, 0.16);
      border-bottom: 1px solid rgba(109, 147, 185, 0.16);
      height: 28px; padding: 3px 6px;
    }
    
    /* Match rows - match actual events-table */
    .display-settings-body .settings-preview-table .match-row {
      transition: background 120ms ease;
    }
    .display-settings-body .settings-preview-table .match-row[data-stripe='odd'] td { background: var(--board-row-odd-bg) !important; }
    .display-settings-body .settings-preview-table .match-row[data-stripe='even'] td { background: var(--board-row-even-bg) !important; }
    .display-settings-body .settings-preview-table .match-row:hover { background: var(--row-hover); }
    .display-settings-body .settings-preview-table .match-row td {
      color: #ffffff; height: var(--board-row-height, 44px);
      border-bottom: 1px solid rgba(255,255,255,0.04);
    }
    
    /* Time lines (date/time) */
    .display-settings-body .settings-preview-table .time-line {
      font-size: 0.73rem; color: var(--text-date);
      line-height: 1.2;
    }
    
    /* Team lines (ROT + name + score) */
    .display-settings-body .settings-preview-table .team-line {
      display: flex; align-items: center; gap: 6px;
      font-size: 0.85rem; font-weight: 700; color: #ffffff;
    }
    .display-settings-body .settings-preview-table .team-line .rot {
      color: #64748b; font-size: 0.73rem; font-weight: 600;
      min-width: 24px; text-align: right;
    }
    .display-settings-body .settings-preview-table .team-line .team-name {
      flex: 1; color: #ffffff;
    }
    .display-settings-body .settings-preview-table .team-line .team-score {
      color: #ffffff; font-weight: 700; min-width: 12px; text-align: right;
    }
    
    /* Pitcher lines */
    .display-settings-body .settings-preview-table .pitcher-line {
      font-size: 0.85rem; color: var(--text-pitcher); font-weight: 600;
      line-height: 1.2;
    }
    
    /* Odds lines */
    .display-settings-body .settings-preview-table .odds-col {
      text-align: center;
    }
    .display-settings-body .settings-preview-table .odds-line {
      font-size: 0.68rem; padding: 1px 0; border-radius: 2px;
      display: block; font-weight: 500;
      text-align: center; white-space: nowrap;
      line-height: 1.2;
    }
    .display-settings-body .settings-preview-table .odds-line[data-recent-bucket='lt1'] { background: var(--board-recent-lt1-bg); color: #fdf7f5; }
    .display-settings-body .settings-preview-table .odds-line[data-recent-bucket='lt5'] { background: var(--board-recent-lt5-bg); color: #1f1602; }
    .display-settings-body .settings-preview-table .odds-line[data-recent-bucket='lt10'] { background: var(--board-recent-lt10-bg); color: #f4fbf7; }

    /* ── Old Custom Tab Sub-Modal (preserving existing layout) ── */
    .custom-tab-modal {
      width: min(800px, 100%); max-height: 82vh;
      border: 1px solid var(--settings-border-active); border-radius: 24px;
      background: linear-gradient(180deg, rgba(26,26,26,0.98) 0%, rgba(14,14,14,0.98) 100%);
      box-shadow: 0 24px 64px rgba(0,0,0,0.55);
      overflow: hidden; display: grid; grid-template-rows: auto 1fr auto;
    }
    .custom-tab-create-body { padding: 14px 16px; overflow-y: auto; display: grid; gap: 12px; }
    .custom-tab-create-summary { color: var(--settings-muted); font-size: 0.72rem; }
    .custom-tab-create-list { display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow-y: auto; }
    .custom-tab-modal {
      width: min(800px, 100%);
      max-height: 82vh;
      border: 1px solid var(--border);
      border-radius: 24px;
      background: linear-gradient(180deg, rgba(26, 26, 26, 0.97) 0%, rgba(13, 13, 13, 0.99) 100%);
      box-shadow: var(--elev-2);
      overflow: hidden;
      display: grid;
      grid-template-rows: auto 1fr auto;
    }
    .settings-body {
      padding: 14px 16px;
      display: grid;
      gap: 14px;
      overflow: auto;
      align-items: start;
    }
    .settings-top-row {
      display: grid;
      grid-template-columns: repeat(3, minmax(220px, 1fr));
      gap: 14px;
      align-items: start;
    }
    .settings-pane {
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 14px;
      background: rgba(255, 255, 255, 0.03);
      display: grid;
      grid-template-rows: auto 1fr;
      min-height: 360px;
    }
    .settings-list {
      padding: 10px;
      overflow: auto;
      display: grid;
      gap: 6px;
      align-content: start;
    }
    .settings-item {
      display: grid;
      grid-template-columns: 16px 1fr auto;
      gap: 8px;
      align-items: center;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(255, 255, 255, 0.02);
      border-radius: 10px;
      padding: 8px 10px;
      font-size: 0.76rem;
      color: #e8e8e8;
      cursor: pointer;
    }
    .settings-item.active { border-color: rgba(255,255,255,0.22); background: rgba(255,255,255,0.06); }
    .settings-item input { margin: 0; }
    .settings-count { color: #b1b1b1;  font-size: 0.72rem; }
    .settings-empty { color: var(--muted); font-size: 0.76rem; padding: 12px; }
    .settings-option-note { color: var(--muted); font-size: 0.72rem; padding: 0 12px 12px; line-height: 1.35; }
    .settings-layout-list {
      display: grid;
      gap: 10px;
      padding: 0 0 12px;
    }
    .settings-group {
      display: grid;
      gap: 10px;
      padding: 0 12px 12px;
      align-content: start;
    }
    .settings-group + .settings-group {
      border-top: 1px solid rgba(255,255,255,0.06);
      padding-top: 12px;
    }
    .settings-group-title {
      color: #edf4fb;
      font-size: 0.75rem;
      font-weight: 700;
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }
    .custom-tab-create-body {
      padding: 14px 16px;
      overflow: auto;
      display: grid;
      gap: 14px;
      align-content: start;
    }
    .custom-tab-create-grid {
      display: grid;
      gap: 12px;
    }
    .custom-tab-create-list {
      display: grid;
      gap: 12px;
      max-height: 46vh;
      overflow: auto;
      padding-right: 2px;
    }
    .custom-tab-create-foot {
      padding: 12px 16px 14px;
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      border-top: 1px solid rgba(255,255,255,0.08);
      background: rgba(255,255,255,0.02);
    }
    .custom-tab-create-summary {
      color: #9fb3c7;
      font-size: 0.72rem;
    }
    .custom-tab-card {
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 12px;
      background: rgba(255,255,255,0.03);
      padding: 12px;
      display: grid;
      gap: 10px;
    }
    .custom-tab-card-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }
    .custom-tab-card-title {
      color: #edf4fb;
      font-size: 0.8rem;
      font-weight: 700;
    }
    .custom-tab-card-meta {
      color: #9fb3c7;
      font-size: 0.72rem;
    }
    .custom-tab-chip-list {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }
    .custom-tab-chip {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 999px;
      background: rgba(14, 39, 67, 0.38);
      color: #d9e6f4;
      padding: 5px 9px;
      font-size: 0.71rem;
      line-height: 1;
    }
    .custom-tab-chip-sport {
      color: #8fb6db;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      font-size: 0.77rem;
    }
    .settings-layout-row {
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 10px;
      padding: 10px 12px;
      background: rgba(255,255,255,0.03);
      display: grid;
      grid-template-columns: minmax(0, 1fr) 92px;
      gap: 10px;
      align-items: center;
    }
    .settings-layout-label {
      color: #edf4fb;
      font-size: 1rem;
      font-weight: 600;
    }
    .settings-layout-note {
      color: var(--muted);
      font-size: 0.9rem;
      line-height: 1.35;
      margin-top: 3px;
    }
    .settings-layout-input {
      width: 100%;
      border: 1px solid rgba(120, 156, 192, 0.22);
      background: rgba(18, 31, 45, 0.95);
      color: #e4f1fc;
      border-radius: 7px;
      padding: 8px 28px 8px 10px;
      font-size: 1rem;
      font-weight: 600;
      text-align: right;
      -moz-appearance: textfield;
    }
    .settings-layout-input::-webkit-outer-spin-button,
    .settings-layout-input::-webkit-inner-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }
    .settings-layout-input {
      width: 100%; border: 1px solid rgba(120, 156, 192, 0.22);
      background: rgba(18, 31, 45, 0.95);
      color: #e4f1fc;
      border-radius: 7px;
      padding: 8px 28px 8px 10px;
      font-size: 1rem;
      font-weight: 600;
      text-align: right;
      -moz-appearance: textfield;
    }
    .settings-layout-input::-webkit-outer-spin-button,
    .settings-layout-input::-webkit-inner-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }
    .settings-layout-row.color-active {
      border-color: rgba(89, 192, 255, 0.46);
      box-shadow: inset 0 0 0 1px rgba(89, 192, 255, 0.18);
      background: rgba(255,255,255,0.05);
    }
    .bookmakers-modal {
      width: min(440px, 100%);
      max-height: 80vh;
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      background: linear-gradient(180deg, rgba(26, 26, 26, 0.96) 0%, rgba(13, 13, 13, 0.98) 100%);
      box-shadow: var(--elev-2);
      overflow: hidden;
      display: grid;
      grid-template-rows: auto 1fr auto;
    }
    .bookmakers-body {
      padding: 8px 12px;
      overflow-y: auto;
    }
    .modal-subtitle {
      font-size: 10px; color: #64748b; margin-top: 2px;
      letter-spacing: 0.04em;
    }
    .bookmakers-drag-list {
      display: flex; flex-direction: column; gap: 2px;
    }
    .bookmaker-drag-row {
      display: flex; align-items: center; gap: 8px;
      padding: 8px 10px; border-radius: 8px;
      background: rgba(255,255,255,0.02);
      border: 1px solid rgba(255,255,255,0.05);
      transition: background 120ms ease, border-color 120ms ease, transform 150ms ease, box-shadow 150ms ease;
      cursor: default; user-select: none;
    }
    .bookmaker-drag-row:hover {
      background: rgba(255,255,255,0.04);
      border-color: rgba(255,255,255,0.08);
    }
    .bookmaker-drag-row--disabled { opacity: 0.35; }
    .bookmaker-drag-row--disabled:hover { opacity: 0.5; }
    .bookmaker-drag-row.dragging {
      opacity: 0.4; transform: scale(0.98);
      background: rgba(59,130,246,0.06); border-color: rgba(59,130,246,0.2);
    }
    .bookmaker-drag-row.drag-over {
      border-color: rgba(59,130,246,0.4);
      box-shadow: 0 0 0 1px rgba(59,130,246,0.2), 0 4px 16px rgba(59,130,246,0.08);
      background: rgba(59,130,246,0.06);
    }
    .bookmaker-drag-grip {
      flex-shrink: 0; width: 18px; height: 18px;
      display: flex; align-items: center; justify-content: center;
      cursor: grab; color: #475569; transition: color 120ms ease;
    }
    .bookmaker-drag-grip:hover { color: #94a3b8; }
    .bookmaker-drag-grip:active { cursor: grabbing; }
    .bookmaker-drag-grip svg { width: 12px; height: 12px; opacity: 0.6; }
    .bookmaker-drag-row--disabled .bookmaker-drag-grip { cursor: default; opacity: 0.3; }
    .bookmaker-drag-toggle {
      flex-shrink: 0;
      width: 32px; height: 18px; border-radius: 9px;
      background: rgba(255,255,255,0.1); border: none;
      cursor: pointer; transition: background 200ms ease;
      position: relative;
    }
    .bookmaker-drag-toggle::after {
      content: ''; position: absolute; top: 2px; left: 2px;
      width: 14px; height: 14px; border-radius: 50%;
      background: #fff; transition: transform 200ms ease;
    }
    .bookmaker-drag-toggle--on { background: #3b82f6; }
    .bookmaker-drag-toggle--on::after { transform: translateX(14px); }
    .bookmaker-drag-name {
      flex: 1; font-size: 13px; font-weight: 500;
      color: #e2e8f0; 
      min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .bookmaker-drag-row--disabled .bookmaker-drag-name { color: #475569; }
    .bookmakers-foot {
      padding: 10px 14px 14px;
      display: flex; justify-content: flex-end;
      gap: 8px;
      border-top: 1px solid rgba(255, 255, 255, 0.06);
    }
    .btn-primary {
      background: #3b82f6; color: #fff; border: none; border-radius: 6px;
      padding: 7px 16px; font-size: 0.76rem; font-weight: 500; cursor: pointer;
      transition: background 120ms ease;
    }
    .btn-primary:hover { background: #2563eb; }
    /* ── Kill old .tabs and .market-strip permanently ── */
    .tabs,
    .market-strip {
      display: none !important;
      pointer-events: none !important;
      height: 0 !important;
      overflow: hidden !important;
    }

    /* ═══════════════════════════════════════════════
       iOS 26 LIQUID GLASS SUBNAV
    ═══════════════════════════════════════════════ */

    .subnav {
      position: sticky; top: calc(var(--navbar-height, 52px) + 18px); z-index: 98;
      margin: 10px 12px 0;
      height: var(--subnav-height, 38px);
      display: flex; align-items: center;
      border-radius: 18px;
      -webkit-backdrop-filter: blur(20px) saturate(180%);
      backdrop-filter: blur(20px) saturate(180%);
      background: rgba(255,255,255,0.08);
      border: 1px solid rgba(255,255,255,0.20);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.25),
                  0 4px 20px rgba(0,0,0,0.18);
    }
    .subnav-content {
      display: flex; align-items: center; gap: 4px; padding: 0 10px; width: 100%;
    }
    .subnav .market-pill {
      font-family: var(--font-primary);
      font-size: 0.85rem; font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      padding: 4px 14px; border-radius: 9999px;
      border: 1px solid transparent;
      background: transparent;
      color: rgba(255,255,255,0.60);
      cursor: pointer;
      transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
      white-space: nowrap;
    }
    .subnav .market-pill:hover { color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.08); }
    .subnav .market-pill.active {
      background: rgba(255,255,255,0.28);
      border-color: rgba(255,255,255,0.5);
      color: #FFFFFF;
      box-shadow: 0 0 12px rgba(255,255,255,0.2);
    }

    /* ── Navbar sport tabs ── */
    .navbar-tab {
      font-family: var(--font-primary);
      font-size: 1.25rem; font-weight: 500;
      letter-spacing: 0.01em;
      padding: 5px 14px; border-radius: 9999px;
      border: 1px solid transparent;
      background: transparent;
      color: rgba(255,255,255,0.65);
      cursor: pointer;
      transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
      white-space: nowrap;
      position: relative;
    }
    .navbar-tab:hover { color: #fff; background: rgba(255,255,255,0.12); }
    .navbar-tab--active {
      background: rgba(255,255,255,0.28);
      color: #FFFFFF;
      font-weight: 700;
      border-color: rgba(255,255,255,0.5);
      color: #fff;
      box-shadow: 0 0 12px rgba(255,255,255,0.2);
    }
    .navbar-tab--active::before { display: none; }
    @keyframes pillIn { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: scale(1); } }
    .tab-pane { display: none; }
    .tab-pane.active { display: block; }
    .pane-layout { display: block; }
    .pane-placeholder {
      min-height: 180px;
      display: grid;
      place-items: center;
      border: 1px dashed var(--border);
      border-radius: 18px;
      background: rgba(9, 17, 27, 0.72);
    }
    .filter-panel {
      border: 1px solid var(--border);
      background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface-1) 100%);
      backdrop-filter: blur(10px);
      border-radius: var(--radius-lg);
      padding: 12px;
      position: sticky;
      top: 8px;
      max-height: 80vh;
      overflow: auto;
      box-shadow: var(--elev-1);
    }
    .filter-title {
      font-weight: 700;
      font-size: 0.8rem;
      margin-bottom: 8px;
      color: #f1f1f1;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }
    .league-options { display: grid; gap: 4px; }
    .league-option {
      display: grid;
      grid-template-columns: 16px 1fr auto;
      gap: 6px;
      align-items: center;
      font-size: 0.75rem;
      color: #e0e0e0;
      padding: 6px 6px;
      border-radius: 10px;
    }
    .league-option:hover { background: #2a2a2a; }
    .league-option input { margin: 0; }
    .league-option .league-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .league-option .league-count { color: #b1b1b1;  }
    .league-option.all-option { border-bottom: 1px solid #3a3a3a; margin-bottom: 6px; padding-bottom: 8px; }
    .table-wrap {
      overflow: auto;
      width: 100%;
      max-width: 100%;
      max-height: calc(100vh - 200px);
      display: block;
      padding: 0;
    }
    .events-table {
      width: auto;
      min-width: 0;
      border-collapse: separate;
      border-spacing: 0;
      table-layout: auto;
      margin: 0;
      background: linear-gradient(180deg, rgba(11, 20, 31, 0.98) 0%, rgba(13, 21, 31, 1) 100%);
      border: 0;
      border-radius: 0;
      box-shadow: none;
      overflow: hidden;
    }
    .events-table.no-odds-columns {
      width: auto;
      min-width: auto;
    }
    .events-table th {
      position: sticky;
      top: 0;
      z-index: 30;
      background: var(--header-bg);
      color: var(--header-text);
      text-align: center;
      padding: 8px 6px;
      white-space: nowrap;
      font-weight: 700;
      border-bottom: 1px solid rgba(109, 147, 185, 0.18);
      border-right: 1px solid rgba(109, 147, 185, 0.12);
      box-shadow: inset 0 -1px 0 rgba(255,255,255,0.02);
    }
    .events-table th:last-child { border-right: 0; }
    .events-table td {
      padding: 4px 6px;
      border-bottom: 1px solid rgba(109, 147, 185, 0.12);
      border-right: 1px solid rgba(109, 147, 185, 0.08);
      color: #d8e5f2;
      vertical-align: middle;
      line-height: 1.15;
      white-space: nowrap;
    }
    .events-table td:last-child { border-right: 0; }
    .events-table td.teams-cell {
      white-space: normal;
      min-width: 248px;
      width: 248px;
      padding-left: 0;
      padding-right: 6px;
      background: rgba(14, 23, 34, 0.88);
    }
    .events-table.no-odds-columns td.teams-cell {
      min-width: 248px;
      width: 248px;
    }
    .events-table td.date-time-cell {
      width: var(--board-date-col-width);
      min-width: var(--board-date-col-width);
      max-width: var(--board-date-col-width);
      white-space: normal;
      background: rgba(16, 28, 42, 0.95);
      text-align: center;
    }
    .date-time-content,
    .teams-stack,
    .pitcher-stack,
    .odds-cell {
      height: 100%;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }
    .date-time-content {
      align-items: center;
      gap: 1px;
    }
    .events-table th:first-child {
      width: var(--board-date-col-width);
      min-width: var(--board-date-col-width);
      max-width: var(--board-date-col-width);
    }
    .events-table th:nth-child(2) {
      width: var(--board-matchup-col-width);
      min-width: var(--board-matchup-col-width);
    }
    .events-table td.pitcher-cell {
      white-space: normal;
      min-width: var(--board-pitcher-col-width);
      width: var(--board-pitcher-col-width);
      background: rgba(13, 22, 34, 0.92);
    }
    .events-table th:nth-child(3) {
      width: var(--board-pitcher-col-width);
      min-width: var(--board-pitcher-col-width);
    }
    .events-table th.odds-col {
      text-align: center;
      border-left: 1px solid rgba(109, 147, 185, 0.16);
      background: rgba(11, 20, 31, 0.98);
      padding-left: 6px;
      padding-right: 6px;
    }
    .events-table td.odds-col {
      white-space: normal;
      border-left: 1px solid rgba(109, 147, 185, 0.1);
      background: rgba(14, 24, 36, 0.88);
      padding: 0 !important;
      text-align: left;
    }
    .odds-cell {
      display: grid;
      grid-template-rows: repeat(2, minmax(0, 1fr));
      gap: 0;
      min-height: var(--board-row-height);
      width: 100%;
      height: 100%;
      line-height: 1.1;
      align-items: stretch;
      justify-content: stretch;
    }
    .odds-line {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      justify-self: stretch;
      align-self: stretch;
      flex: 1 1 auto;
      color: #f4f8fd;
      font-size: 0.98em;
      font-weight: 700;
      line-height: 1.1;
      overflow-wrap: anywhere;
      text-align: right;
      width: 100%;
      min-height: 100%;
      border-radius: 0;
      padding: 0 3px 0 0;
    }
    .odds-line[data-recent-bucket="lt1"] {
      background: var(--board-recent-lt1-bg);
      color: var(--board-recent-lt1-text);
    }
    .odds-line[data-recent-bucket="lt5"] {
      background: var(--board-recent-lt5-bg);
      color: var(--board-recent-lt5-text);
    }
    .odds-line[data-recent-bucket="lt10"] {
      background: var(--board-recent-lt10-bg);
      color: var(--board-recent-lt10-text);
    }
    .odds-line + .odds-line {
      margin-top: 0;
      padding-top: 0;
      border-top: 0;
    }
    .odds-empty {
      color: #68819a;
      font-size: 0.9em;
      min-height: 0;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .date-line {
      display: flex;
      align-items: center;
      justify-content: center;
      flex: 1 1 0;
      font-weight: 700;
      color: #dceaf8;
      font-size: 0.93em;
    }
    .time-line {
      display: flex;
      align-items: center;
      justify-content: center;
      flex: 1 1 0;
      color: #8ca4bb;
      font-size: 0.9em;
      min-height: 0;
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .time-line[data-phase='live'] {
      color: #8de29c;
      font-weight: 700;
    }
    .time-line[data-phase='postponed'] {
      color: var(--board-final-postponed-text);
      font-weight: 700;
    }
    .time-line[data-phase='final'] {
      color: #d5deea;
    }
    .team-line {
      display: grid;
      grid-template-columns: 46px minmax(0, 1fr) auto auto;
      gap: 4px;
      align-items: center;
      flex: 1 1 0;
      line-height: 1.15;
      min-height: 0;
    }
    .team-line + .team-line {
      padding-top: 3px;
      border-top: 1px dashed rgba(137, 164, 191, 0.1);
    }
    .team-line .rot {
      text-align: left;
      white-space: nowrap;
    }
    .team-line .team-name {
      color: #edf5fd;
      font-weight: 700;
      font-size: 1.01em;
      line-height: 1.15;
      overflow-wrap: anywhere;
    }
    .team-line .team-score {
      color: #f2f7fc;
      
      font-weight: 700;
      font-size: 0.95em;
      text-align: right;
      min-width: 20px;
    }
    .team-line .team-score:empty {
      visibility: hidden;
    }
    .team-line .team-score.series-score {
      color: #ffcd3c;
      font-size: 1.1em;
    }
    .pitcher-line {
      display: flex;
      align-items: center;
      flex: 1 1 0;
      color: #d9ebfb;
      font-weight: 600;
      font-size: 0.96em;
      line-height: 1.15;
      min-height: 0;
      overflow-wrap: anywhere;
    }
    .pitcher-line + .pitcher-line {
      padding-top: 3px;
      border-top: 1px dashed rgba(137, 164, 191, 0.1);
    }
    .pitcher-line.changed {
      color: #ff8f8f;
      font-weight: 700;
    }
    .events-table tbody tr:hover { background: var(--row-hover); }
    .events-table tr.match-row {
      cursor: pointer;
      transition: background 120ms ease;
    }
    .events-table tr.match-row.search-hidden {
      display: none;
    }
    .events-table tr.match-row td {
      height: var(--board-row-height);
      padding-top: 3px;
      padding-bottom: 3px;
    }
    .events-table tr.event-header-row td {
      background: var(--board-event-header-bg);
      color: #e5eef8;
      font-weight: 700;
      border-top: 1px solid rgba(109, 147, 185, 0.16);
      border-bottom: 1px solid rgba(109, 147, 185, 0.16);
      padding: 3px 10px;
      font-size: 0.73rem;
      line-height: 1.1;
      white-space: normal;
      text-align: center;
    }
    .events-table tr.event-header-row:hover { background: transparent; }
    .events-table tr.date-banner-row td {
      background: var(--board-date-header-bg);
      color: #dce8f4;
      font-weight: 700;
      letter-spacing: 0.02em;
      font-size: 0.73rem;
      line-height: 1.1;
      padding: 3px 10px;
      border-top: 1px solid rgba(109, 147, 185, 0.1);
      border-bottom: 1px solid rgba(109, 147, 185, 0.1);
      text-align: center;
    }
    .events-table tr.date-banner-row:hover { background: transparent; }
    .events-table tr.league-banner-row td {
      background: var(--board-league-header-bg);
      color: #edf6ff;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      font-size: 0.73rem;
      line-height: 1.1;
      padding: 4px 10px;
      border-top: 1px solid rgba(89, 192, 255, 0.18);
      border-bottom: 1px solid rgba(89, 192, 255, 0.18);
      text-align: center;
    }
    .events-table tr.league-banner-row:hover { background: transparent; }
    .events-table tr.match-row[data-stripe='odd'] td { background: var(--board-row-odd-bg) !important; }
    .events-table tr.match-row[data-stripe='even'] td { background: var(--board-row-even-bg) !important; }
    .events-table tr.match-row[data-board-phase='live'] td {
      background: var(--board-live-inprogress-bg) !important;
      color: var(--board-live-inprogress-text) !important;
    }
    .events-table tr.match-row[data-board-phase='final'] td,
    .events-table tr.match-row[data-board-phase='postponed'] td {
      background: var(--board-final-postponed-bg) !important;
      color: var(--board-final-postponed-text) !important;
    }
    .league-group[hidden] { display: none; }
    .empty { color: var(--muted); font-size: 0.9rem; margin: 8px 0; }
    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.72);
      backdrop-filter: blur(4px);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 1000;
      padding: 16px;
      overflow-y: auto;
      overscroll-behavior: contain;
    }
    .modal-overlay.open { display: flex; }
    .match-modal {
      width: min(1000px, 100%);
      max-height: calc(100vh - 32px);
      border: 1px solid rgba(255, 255, 255, 0.10);
      border-radius: 20px;
      background: linear-gradient(180deg, #1a1f28 0%, #111418 100%);
      box-shadow: 0 32px 80px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255,255,255,0.04) inset;
      overflow: hidden;
      display: grid;
      grid-template-rows: auto minmax(0, 1fr);
      font-size: 1rem;
    }
    /* ── Modal header ── */
    .modal-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 14px 18px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(255, 255, 255, 0.03);
    }
    .modal-title-wrap {
      display: flex;
      align-items: baseline;
      gap: 10px;
      min-width: 0;
      flex: 1 1 auto;
    }
    .modal-title {
      font-size: 1.05rem;
      font-weight: 700;
      color: #f0f4f8;
      white-space: nowrap;
      flex: 0 1 auto;
      letter-spacing: 0.02em;
    }
    .modal-title-venue {
      font-size: 0.9rem;
      color: #6b7f93;
      font-weight: 400;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      flex: 1 1 auto;
      text-align: left;
      min-width: 0;
      letter-spacing: 0.01em;
    }
    .modal-close {
      margin-left: 12px;
      border: 1px solid rgba(255, 255, 255, 0.12);
      background: rgba(255, 255, 255, 0.06);
      color: #8a9db0;
      border-radius: 8px;
      width: 30px;
      height: 30px;
      cursor: pointer;
      font-size: 1.1rem;
      line-height: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 150ms ease, color 150ms ease;
    }
    .modal-close:hover {
      background: rgba(255, 255, 255, 0.12);
      color: #f0f4f8;
    }
    /* ── Modal body ── */
    .modal-body {
      padding: 16px 18px;
      display: grid;
      gap: 12px;
      overflow-y: auto;
      min-height: 0;
    }
    /* ── Matchup block ── */
    .modal-matchup {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 12px;
      background: rgba(255, 255, 255, 0.02);
      overflow: hidden;
      min-width: 0;
    }
    .modal-team {
      display: flex;
      gap: 14px;
      flex-wrap: nowrap;
      padding: 13px 16px;
      align-items: center;
      min-width: 0;
      min-height: 48px;
    }
    .modal-team + .modal-team {
      border-top: 1px solid rgba(255, 255, 255, 0.06);
    }
    .modal-rot {
      color: #4e6072;
      font-weight: 600;
      font-size: 1rem;
      flex: 0 0 44px;
      letter-spacing: 0.02em;
      font-variant-numeric: tabular-nums;
    }
    .modal-name {
      color: #e8f0f8;
      font-weight: 700;
      font-size: 1rem;
      min-width: 0;
      flex: 1 1 auto;
      white-space: normal;
      overflow-wrap: anywhere;
      line-height: 1.2;
      letter-spacing: 0.01em;
    }
    /* ── Info grid cards ── */
    .modal-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }
    .modal-card {
      border: 1px solid rgba(255, 255, 255, 0.07);
      border-radius: 10px;
      background: rgba(255, 255, 255, 0.025);
      padding: 11px 14px;
      min-width: 0;
    }
    .modal-label {
      color: #4e6072;
      font-size: 1rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      margin-bottom: 5px;
    }
    .modal-value {
      color: #d8e8f5;
      font-size: 1rem;
      font-weight: 500;
      line-height: 1.4;
      word-break: break-word;
    }
    /* ── Section titles (SERIES DETAILS, etc.) ── */
    .modal-section-title {
      margin: 4px 0 10px;
      font-size: 0.9rem;
      font-weight: 700;
      color: #4e6072;
      letter-spacing: 0.10em;
      text-transform: uppercase;
      padding-bottom: 8px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    }
    /* ── MLB grid ── */
    .modal-mlb-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }
    #modal-mlb-series-grid {
      display: none;
    }
    #modal-mlb-series-grid.modal-mlb-grid {
      display: grid;
    }
    .modal-series-summary-card {
      margin-bottom: 10px;
    }
    .series-games-table {
      margin-top: 6px;
    }
    .modal-mlb-overview {
      display: contents;
    }
    .modal-mlb-team-block {
      display: grid;
      gap: 10px;
      align-content: start;
      min-width: 0;
    }
    .modal-mlb-team-title {
      margin: 4px 0 6px;
      font-size: 1rem;
      font-weight: 700;
      color: #59a3d4;
      letter-spacing: 0.10em;
      text-transform: uppercase;
    }
    .modal-espn-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }
    .modal-subvalue {
      color: #5a7a94;
      font-size: 1rem;
      font-weight: 400;
      margin-top: 4px;
      line-height: 1.4;
    }
    .probable-pitcher-meta {
      color: #73bfff;
      font-size: 0.9rem;
      font-weight: 700;
      white-space: nowrap;
    }
    .lineup-list {
      display: grid;
      gap: 6px;
    }
    .lineup-row {
      display: grid;
      grid-template-columns: 24px minmax(0, 1fr) auto;
      gap: 8px;
      align-items: center;
      font-size: 0.9rem;
      color: #edf4fb;
    }
    .lineup-slot {
      color: #73bfff;
      font-size: 0.9rem;
      font-weight: 700;
    }
    .lineup-pos {
      color: #aebfd1;
      font-size: 0.9rem;
    }
    .team-stats-wrap {
      display: grid;
      gap: 12px;
      min-width: 0;
      overflow-x: auto;
    }
    .team-stats-title {
      color: #dfeaf5;
      font-size: 0.85rem;
      font-weight: 700;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      margin-bottom: 6px;
    }
    .team-stats-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.9rem;
      table-layout: fixed;
      font-variant-numeric: tabular-nums;
      font-feature-settings: "tnum" 1;
    }
    .team-stats-table th,
    .team-stats-table td {
      padding: 5px 6px;
      border-bottom: 1px solid rgba(109, 147, 185, 0.12);
      text-align: center;
      color: #e6eef7;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .team-stats-table th:first-child,
    .team-stats-table td:first-child {
      text-align: left;
      white-space: normal;
      overflow-wrap: anywhere;
      text-overflow: clip;
    }
    .team-stats-table thead th {
      color: #a8bbcf;
      font-size: 0.85rem;
      font-weight: 700;
    }
    .team-stats-table tfoot td {
      font-weight: 700;
      color: #f2f7fc;
    }
    .team-stats-table .player-name-cell {
      line-height: 1.25;
    }
    .team-stats-table .name-col {
      width: 28%;
    }
    .team-stats-table .metric-col {
      width: 6%;
    }
    .team-stats-table .metric-wide-col {
      width: 8%;
    }
    .team-stats-table .rate-col {
      width: 12%;
    }
    .probable-pitcher-stats {
      table-layout: auto;
    }
    .probable-pitcher-stats th:nth-child(1),
    .probable-pitcher-stats td:nth-child(1) {
      width: 72px;
    }
    .probable-pitcher-stats th:nth-child(2),
    .probable-pitcher-stats td:nth-child(2),
    .probable-pitcher-stats th:nth-child(3),
    .probable-pitcher-stats td:nth-child(3),
    .probable-pitcher-stats th:nth-child(4),
    .probable-pitcher-stats td:nth-child(4),
    .probable-pitcher-stats th:nth-child(6),
    .probable-pitcher-stats td:nth-child(6),
    .probable-pitcher-stats th:nth-child(7),
    .probable-pitcher-stats td:nth-child(7),
    .probable-pitcher-stats th:nth-child(8),
    .probable-pitcher-stats td:nth-child(8) {
      width: 52px;
    }
    .probable-pitcher-stats th:nth-child(5),
    .probable-pitcher-stats td:nth-child(5) {
      width: 58px;
    }
    .series-games-table {
      table-layout: fixed;
      min-width: 100%;
    }
    .series-games-table th,
    .series-games-table td {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .series-games-table--generic th:nth-child(1),
    .series-games-table--generic td:nth-child(1) {
      width: 48px;
    }
    .series-games-table--generic th:nth-child(2),
    .series-games-table--generic td:nth-child(2) {
      width: 52px;
    }
    .series-games-table--generic th:nth-child(3),
    .series-games-table--generic td:nth-child(3) {
      width: 240px;
    }
    .series-games-table--generic th:nth-child(4),
    .series-games-table--generic td:nth-child(4) {
      width: 65px;
    }
    .series-games-table--generic th:nth-child(5),
    .series-games-table--generic td:nth-child(5) {
      width: 75px;
    }
    .series-games-table--generic th:nth-child(6),
    .series-games-table--generic td:nth-child(6) {
      width: auto;
    }
    .series-games-table--mlb {
      table-layout: fixed;
      font-size: 0.9rem;
    }
    .series-games-table--mlb th:nth-child(1),
    .series-games-table--mlb td:nth-child(1) { width: 42px; }
    .series-games-table--mlb th:nth-child(2),
    .series-games-table--mlb td:nth-child(2) { width: 50px; }
    .series-games-table--mlb th:nth-child(3),
    .series-games-table--mlb td:nth-child(3) { width: 154px; }
    .series-games-table--mlb th:nth-child(4),
    .series-games-table--mlb td:nth-child(4) { width: 56px; }
    .series-games-table--mlb th:nth-child(5),
    .series-games-table--mlb td:nth-child(5) { width: 64px; }
    .series-games-table--mlb th:nth-child(6),
    .series-games-table--mlb td:nth-child(6) { width: 112px; }
    .series-games-table--mlb th:nth-child(7),
    .series-games-table--mlb td:nth-child(7),
    .series-games-table--mlb th:nth-child(9),
    .series-games-table--mlb td:nth-child(9) { width: 98px; }
    .series-games-table--mlb th:nth-child(8),
    .series-games-table--mlb td:nth-child(8),
    .series-games-table--mlb th:nth-child(10),
    .series-games-table--mlb td:nth-child(10) { width: 44px; }
    .series-games-table--mlb th:nth-child(3),
    .series-games-table--mlb td:nth-child(3) { width: 170px; }
    .series-games-table--mlb th:nth-child(6),
    .series-games-table--mlb td:nth-child(6) { width: 138px; }
    .series-games-table--mlb td {
      white-space: nowrap;
      line-height: 1.15;
    }
    .batter-stats-table th,
    .batter-stats-table td {
      padding: 5px 6px;
    }
    .batter-stats-table th:first-child,
    .batter-stats-table td:first-child {
      padding-left: 6px;
      padding-right: 8px;
    }
    .batter-stats-table .name-col {
      width: 28%;
    }
    .batter-stats-table .metric-wide-col {
      width: 8%;
    }
    .batter-stats-table .rate-col {
      width: 12%;
    }
    .pitcher-stats-table th:first-child,
    .pitcher-stats-table td:first-child {
      padding-left: 6px;
      padding-right: 8px;
    }
    .pitcher-stats-table .name-col {
      width: 28%;
    }
    .pitcher-stats-table .metric-col {
      width: 8%;
    }
    .kp-lines {
      display: grid;
      gap: 3px;
      font-size: 0.9rem;
      color: #dddddd;
    }
    .kp-line span {
      color: #b5b5b5;
      margin-right: 6px;
    }
    .log-modal {
      width: min(1000px, 100%);
      max-height: 86vh;
      border: 1px solid var(--border);
      border-radius: 24px;
      background: linear-gradient(180deg, rgba(26, 26, 26, 0.95) 0%, rgba(13, 13, 13, 0.96) 100%);
      box-shadow: var(--elev-2);
      overflow: hidden;
      display: grid;
      grid-template-rows: auto 1fr;
    }
    .log-table-wrap {
      overflow: auto;
      padding: 0 0 6px;
    }
    .log-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.9rem;
    }
    .log-table th, .log-table td {
      text-align: left;
      padding: 9px 12px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      white-space: nowrap;
    }
    .log-table th {
      position: sticky;
      top: 0;
      background: rgba(20, 20, 20, 0.96);
      color: #ececec;
      z-index: 1;
      font-size: 0.9rem;
    }
    .log-table td {
      color: #dbdbdb;
      font-size: 0.9rem;
    }
    .log-table td.log-match {
      white-space: normal;
      min-width: 200px;
      color: #f1f1f1;
      font-weight: 600;
    }
    .log-empty {
      padding: 14px;
      color: #adadad;
      font-size: 0.9rem;
    }
    .toast-stack {
      position: fixed;
      right: 16px;
      bottom: 16px;
      z-index: 1200;
      display: grid;
      gap: 8px;
      width: min(360px, calc(100vw - 24px));
      pointer-events: none;
    }
    .toast {
      border: 1px solid rgba(255, 255, 255, 0.18);
      background: linear-gradient(180deg, rgba(44, 44, 44, 0.95) 0%, rgba(24, 24, 24, 0.96) 100%);
      border-radius: 14px;
      box-shadow: var(--elev-2);
      padding: 11px 14px;
      pointer-events: auto;
    }
    .toast-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 4px;
    }
    .toast-title {
      font-size: 0.9rem;
      font-weight: 700;
      color: #f2f2f2;
      margin: 0;
    }
    .toast-close {
      border: 0;
      background: transparent;
      color: #d2d2d2;
      font-size: 0.95rem;
      line-height: 1;
      padding: 0;
      cursor: pointer;
    }
    .toast-close:hover {
      color: #ffffff;
    }
    .toast-body {
      color: #d6d6d6;
      font-size: 0.9rem;
      line-height: 1.35;
    }
    @media (max-width: 1320px) {
      .events-table {
        font-size: 0.92rem;
      }
      .events-table th, .events-table td {
        padding: 5px 6px;
      }
      .odds-line {
        font-size: 1.0rem;
      }
      .pane-layout { display: block; }
    }
    @media (max-width: 900px) {
      .wrap { padding: 10px; }
      .pane-layout { grid-template-columns: 1fr; }
      .filter-panel { position: static; max-height: none; }
      .table-wrap { max-width: 100%; }
      .events-table { font-size: 0.92rem; }
      .events-table th, .events-table td { padding: 5px 6px; }
      .modal-grid { grid-template-columns: 1fr; }
      .modal-mlb-grid { grid-template-columns: 1fr; }
      .modal-mlb-overview { display: grid; gap: 10px; }
      .settings-top-row { grid-template-columns: 1fr; }
      .settings-body { grid-template-columns: 1fr; }
      .settings-preview-row { grid-template-columns: minmax(58px, var(--board-date-col-width)) minmax(140px, var(--board-matchup-col-width)) minmax(90px, var(--board-pitcher-col-width)) 84px; }
    }

    /* ════════════════════════════════════════════
       PHASE 4 — Table Typography & White Text Overhaul
       Bloomberg Terminal meets modern dark UI
       ════════════════════════════════════════════ */

    /* ── Hard reset — no grey text on live data ── */
    .events-table,
    .events-table tbody,
    .events-table tbody tr,
    .events-table tbody td {
      color: #ffffff;
    }

    /* Only these elements are intentionally not white */
    .rot                { color: #64748b; }
    .date-banner-row td { color: var(--text-date); }
    .time-line          { color: var(--text-col-header); }

    /* ── Column Headers (DATE/TIME, MATCHUP, PITCHER, bookmaker names) ── */
    .events-table thead tr th {
      background: rgba(255,255,255,0.04);
      border-bottom: 1px solid rgba(255,255,255,0.10);
      border-top: none;
      font-family: var(--font-primary);
      font-size: 0.77rem;
      font-weight: 700;
      letter-spacing: 0.10em;
      text-transform: uppercase;
      color: rgba(255,255,255,0.35);
      padding: 7px 10px;
      white-space: nowrap;
      border-right: 1px solid rgba(255,255,255,0.05);
    }

    .events-table thead tr th:last-child {
      border-right: none;
    }

    .events-table thead th.odds-col {
      border-left: 1px solid rgba(255,255,255,0.04);
    }

    /* ── Data cells — white text base ── */
    .events-table tbody td {
      font-family: var(--font-primary);
      font-weight: 400;
      font-variant-numeric: tabular-nums;
      color: #FFFFFF;
      border-bottom: 1px solid var(--row-separator);
      padding: 5px 10px;
      vertical-align: middle;
    }

    .events-table tbody td:last-child {
      border-right: 0;
    }

    /* ── Date-time cell ── */
    .date-line {
      font-family: var(--font-primary);
      font-size: 1.0rem;
      font-weight: 400;
      font-variant-numeric: tabular-nums;
      color: #FFFFFF;
    }

    .time-line {
      font-family: var(--font-primary);
      font-size: 1.0rem;
      font-weight: 500;
      font-variant-numeric: tabular-nums;
      color: #FFFFFF;
    }

    /* ── ROT numbers ── */
    .team-line .rot {
      font-family: var(--font-primary);
      font-size: 1.0rem;
      font-weight: 400;
      font-variant-numeric: tabular-nums;
      color: #FFFFFF;
      border-right: 1px solid rgba(255,255,255,0.12);
      margin-right: 6px;
      padding-right: 6px;
    }

    /* ── Team names ── */
    .team-line .team-name {
      font-family: var(--font-primary);
      font-size: 1.0rem;
      font-weight: 500;
      color: #FFFFFF;
      letter-spacing: 0em;
    }

    .team-line .team-score {
      font-family: var(--font-primary);
      font-size: 1.0rem;
      font-weight: 500;
      font-variant-numeric: tabular-nums;
      color: #FFFFFF;
      margin-left: 6px;
    }

    /* ── Pitcher names ── */
    .pitcher-line {
      display: flex;
      align-items: center;
      gap: 5px;
      font-family: var(--font-primary);
      font-size: 1.0rem;
      font-weight: 400;
      color: #FFFFFF;
    }

    td .pitcher-name,
    [class*="pitcher"]:not(.settings-preview-pitcher) {
      font-family: var(--font-primary);
      font-size: 1.0rem;
      font-weight: 400;
      color: #FFFFFF;
    }

    .pitcher-hand {
      display: inline-block;
      font-family: var(--font-primary);
      font-size: 0.85rem;
      font-weight: 700;
      color: #FFFFFF;
      letter-spacing: 0.04em;
      padding: 1px 5px;
      border-radius: 4px;
      margin-left: 4px;
      vertical-align: middle;
    }

    .pitcher-hand--R {
      background: rgba(239,68,68,0.12);
      border: 1px solid rgba(239,68,68,0.28);
      color: #fca5a5;
    }

    .pitcher-hand--L {
      background: rgba(59,130,246,0.12);
      border: 1px solid rgba(59,130,246,0.28);
      color: #93c5fd;
    }

    /* Keep legacy hand-badge classes for backwards compat */
    .pitcher-line .hand-badge {
      display: inline-block;
      padding: 1px 5px; border-radius: 4px;
      font-family: var(--font-primary);
      font-size: 0.91em; font-weight: 600;
      letter-spacing: 0.05em;
      vertical-align: middle;
    }
    .hand-badge--R { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.25); color: #fca5a5; }
    .hand-badge--L { background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.25); color: #93c5fd; }

    /* ── Odds cell defaults ── */
    .odds-line {
      font-family: var(--font-primary);
      font-size: 1.0rem;
      font-weight: 500;
      color: #ffffff;
      text-align: center;
      letter-spacing: -0.01em;
      font-variant-numeric: tabular-nums;
      transition: background 200ms ease, box-shadow 200ms ease, color 200ms ease;
    }

    .odds-cell,
    [data-odds],
    .events-table tbody td:nth-child(n+4) {
      font-family: var(--font-primary);
      font-size: 1.0rem;
      font-weight: 500;
      font-variant-numeric: tabular-nums;
      color: #ffffff;
      text-align: center;
    }

    /* ── Secondary odds lines (alt line) ── */
    .odds-line:not(:first-child) {
      font-size: 1.0rem;
      font-weight: 500;
      opacity: 1;
    }

    /* ── Best price highlights ── */
    .odds-best-green,
    [data-best="green"],
    .hi-green {
      font-weight: 700;
      background: var(--odds-best-green-bg);
      border: 1px solid var(--odds-best-green-border);
      border-radius: 4px;
      color: var(--odds-best-green-text);
      box-shadow: 0 0 10px rgba(34,197,94,0.10);
      padding: 1px 4px;
    }

    .odds-best-red,
    [data-best="red"],
    .hi-red {
      font-weight: 700;
      background: var(--odds-best-red-bg);
      border: 1px solid var(--odds-best-red-border);
      border-radius: 4px;
      color: var(--odds-best-red-text);
      box-shadow: 0 0 10px rgba(239,68,68,0.10);
      padding: 1px 4px;
    }

    .odds-best-blue,
    [data-best="blue"],
    .hi-blue {
      font-weight: 700;
      background: var(--odds-best-blue-bg);
      border: 1px solid var(--odds-best-blue-border);
      border-radius: 4px;
      color: var(--odds-best-blue-text);
      box-shadow: 0 0 10px rgba(59,130,246,0.10);
      padding: 1px 4px;
    }

    /* ── Recent bucket highlights ── */
    .odds-line[data-recent-bucket="lt1"] {
      background: var(--board-recent-lt1-bg);
      color: var(--board-recent-lt1-text);
      box-shadow: 0 0 6px rgba(198,61,47,0.15);
    }
    .odds-line[data-recent-bucket="lt5"] {
      background: var(--board-recent-lt5-bg);
      color: var(--board-recent-lt5-text);
      box-shadow: 0 0 6px rgba(208,165,42,0.15);
    }
    .odds-line[data-recent-bucket="lt10"] {
      background: var(--board-recent-lt10-bg);
      color: var(--board-recent-lt10-text);
      box-shadow: 0 0 6px rgba(45,123,82,0.15);
    }

    /* ── Odds update live flash — amber pulse ── */
    @keyframes odds-flash {
      0%   { box-shadow: 0 0 0 2px rgba(251,191,36,0.7); }
      60%  { box-shadow: 0 0 0 3px rgba(251,191,36,0.3); }
      100% { box-shadow: 0 0 0 0px transparent; }
    }

    .odds-updated {
      animation: odds-flash 700ms ease-out forwards;
    }

    /* Keep legacy flash keyframe + trigger for backwards compat */
    @keyframes oddsFlash {
      0% { box-shadow: 0 0 0 0 rgba(251,191,36,0.6); }
      100% { box-shadow: 0 0 0 2px transparent; }
    }
    .odds-line[data-updated='true'] {
      animation: oddsFlash 600ms ease-out;
    }

    /* ── Row stripes and hover ── */
    .events-table tr.match-row[data-stripe='odd'] td {
      background: var(--board-row-odd-bg, rgba(255,255,255,0.018)) !important;
    }
    .events-table tr.match-row[data-stripe='even'] td {
      background: var(--board-row-even-bg, rgba(255,255,255,0.018)) !important;
    }

    .events-table tr.match-row:hover td {
      background: var(--row-hover) !important;
      cursor: pointer;
      transition: background 120ms ease;
    }

    .events-table tr.match-row td {
      transition: background 120ms ease;
    }

    /* ── Phase: live/final/postponed ALWAYS win over stripes ── */
    .events-table tr.match-row[data-board-phase='live'][data-stripe] td,
    .events-table tr.match-row[data-board-phase='live'] td {
      background: var(--board-live-inprogress-bg) !important;
      color: var(--board-live-inprogress-text) !important;
    }

    .events-table tr.match-row[data-board-phase='final'][data-stripe] td,
    .events-table tr.match-row[data-board-phase='final'] td,
    .events-table tr.match-row[data-board-phase='postponed'][data-stripe] td,
    .events-table tr.match-row[data-board-phase='postponed'] td {
      background: var(--board-final-postponed-bg) !important;
      color: var(--board-final-postponed-text) !important;
    }

    /* ── Section Headers — blue, uppercase, left accent bar ── */
    .events-table tr.event-header-row td {
      background: var(--board-event-header-bg, var(--section-bg));
      border-top: 1px solid var(--board-event-header-accent, var(--section-accent));
      border-bottom: 1px solid var(--board-event-header-accent, var(--section-accent));
      border-left: 3px solid var(--board-event-header-accent, var(--section-accent));
      border-right: 1px solid var(--board-event-header-accent, var(--section-accent));
      padding-left: 14px;
      font-family: var(--font-primary);
      font-size: 0.85rem;
      font-weight: 700;
      letter-spacing: 0.10em;
      text-transform: uppercase;
      color: #FFFFFF;
    }

    .events-table tr.event-header-row:hover {
      background: transparent;
    }

    /* ── Date group headers: "DATE 05/09" ── */
    .events-table tr.date-banner-row td {
      background: var(--board-date-header-bg, rgba(255,255,255,0.022));
      border-bottom: 1px solid rgba(255,255,255,0.06);
      border-left: 3px solid rgba(255,255,255,0.08);
      padding-left: 14px;
      font-family: var(--font-primary);
      font-size: 0.85rem;
      font-weight: 700;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: rgba(255,255,255,0.70);
    }

    .events-table tr.date-banner-row:hover {
      background: transparent;
    }

    /* ── League banner rows: "MAJOR LEAGUE BASEBALL" ── */
    .events-table tr.league-banner-row td {
      background: var(--board-league-header-bg, rgba(255,255,255,0.03));
      border-bottom: 1px solid rgba(255,255,255,0.07);
      border-left: 3px solid rgba(255,255,255,0.15);
      padding-left: 14px;
      font-family: var(--font-primary);
      font-size: 0.85rem;
      font-weight: 700;
      letter-spacing: 0.10em;
      text-transform: uppercase;
      color: #FFFFFF;
    }

    .events-table tr.league-banner-row:hover {
      background: transparent;
    }

    /* ── Footer status bar ── */
    .board-footer {
      display: flex;
      align-items: center;
      gap: 16px;
      padding: 8px 16px;
      background: rgba(10,12,16,0.85);
      border-top: 1px solid rgba(255,255,255,0.07);
      font-family: var(--font-primary);
      font-size: 0.77rem;
      font-weight: 500;
      letter-spacing: 0.06em;
      text-transform: uppercase;
    }

    .odds-status {
      color: rgba(255,255,255,0.45);
    }

    .odds-source-badge {
      font-family: var(--font-primary);
      color: rgba(255,255,255,0.70);
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: uppercase;
    }

    .version-badge {
      margin-left: auto;
      font-family: var(--font-primary);
      font-size: 0.77rem;
      font-weight: 400;
      color: rgba(255,255,255,0.20);
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    /* ── Table container glass card wrap ── */
    .board-shell { max-width: 100%; }
    .table-wrap {
      border: 1px solid rgba(255,255,255,0.06);
      border-radius: 12px;
      overflow: auto;
      background: rgba(11,20,31,0.98);
    }

    /* ════════════════════════════════════════════
       MOBILE RESPONSIVE OVERRIDES
       ════════════════════════════════════════════ */

    /* ── Tablet (≤768px) ── */
    @media (max-width: 768px) {
      .navbar {
        margin: 0 8px;
        height: 48px;
        border-radius: 14px;
      }
      .navbar-content {
        padding: 0 8px;
      }
      .navbar-logo {
        font-size: 1.2rem;
      }
      .navbar-tab {
        font-size: 1rem;
        padding: 4px 10px;
      }
      .user-btn {
        padding: 4px 8px 4px 4px;
      }
      .user-btn-name {
        display: none;
      }
      .subnav {
        margin: 8px 8px 0;
        border-radius: 14px;
      }
      .subnav .market-pill {
        font-size: 0.75rem;
        padding: 3px 10px;
      }
      .wrap {
        padding: 8px;
      }
      .board-shell {
        border-radius: 14px;
      }
      .screen-controls {
        gap: 6px;
      }
      .screen-chip {
        font-size: 0.65rem;
        padding: 5px 7px;
      }
    }

    /* ── Mobile (≤480px) ── */
    @media (max-width: 480px) {
      :root {
        --navbar-height: 44px;
        --subnav-height: 34px;
      }
      .navbar {
        margin: 0 6px;
        height: 44px;
        border-radius: 12px;
      }
      .navbar-content {
        padding: 0 6px;
        gap: 4px;
      }
      .navbar-left {
        flex-shrink: 1;
        min-width: 0;
      }
      .navbar-logo {
        font-size: 1.05rem;
        letter-spacing: -0.03em;
      }
      .navbar-center {
        justify-content: flex-start;
        padding: 0 4px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
      }
      .navbar-tabs {
        gap: 2px;
        flex-wrap: nowrap;
      }
      .navbar-tab {
        font-size: 0.85rem;
        padding: 3px 8px;
        border-radius: 9999px;
        white-space: nowrap;
        scroll-snap-align: start;
      }
      .navbar-right {
        flex-shrink: 0;
      }
      .user-btn {
        padding: 3px 6px 3px 3px;
        border-radius: 9999px;
      }
      .user-btn-avatar {
        width: 22px;
        height: 22px;
        font-size: 0.7rem;
      }
      .user-btn-name {
        display: none;
      }
      .user-btn-chevron {
        display: none;
      }

      /* Subnav */
      .subnav {
        margin: 6px 6px 0;
        height: 34px;
        border-radius: 12px;
        top: calc(var(--navbar-height, 44px) + 12px);
      }
      .subnav-content {
        padding: 0 6px;
        gap: 3px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
      }
      .subnav-content::-webkit-scrollbar {
        display: none;
      }
      .subnav .market-pill {
        font-size: 0.7rem;
        padding: 3px 8px;
        border-radius: 9999px;
      }

      /* Wrap and board */
      .wrap {
        padding: 6px;
      }
      .board-shell {
        border-radius: 12px;
        padding-top: 4px;
      }
      .board-top {
        padding: 8px 8px 6px;
      }
      .screen-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        margin-bottom: 6px;
      }
      .screen-left, .screen-right {
        justify-content: space-between;
      }
      .screen-chip {
        font-size: 0.6rem;
        padding: 4px 6px;
        border-radius: 6px;
      }

      /* Table */
      .table-wrap {
        max-height: calc(100vh - 180px);
        border-radius: 8px;
        -webkit-overflow-scrolling: touch;
      }
      .events-table {
        font-size: 0.8rem;
      }
      .events-table th,
      .events-table td {
        padding: 4px 5px;
      }
      .events-table td.teams-cell {
        min-width: 180px;
        width: 180px;
      }
      .events-table.no-odds-columns td.teams-cell {
        min-width: 180px;
        width: 180px;
      }
      .date-line {
        font-size: 0.85rem;
      }
      .team-name {
        font-size: 0.8rem;
      }
      .odds-line {
        font-size: 0.8rem;
      }
      .status-text {
        font-size: 0.7rem;
      }

      /* User dropdown */
      .user-dropdown {
        right: 8px;
        left: 8px;
        min-width: auto;
        max-width: calc(100vw - 16px);
      }

      /* Settings modal */
      .settings-modal {
        width: calc(100vw - 16px);
        max-width: none;
        margin: 8px;
        border-radius: 16px;
      }

      /* Quick controls */
      #quick-sport-select,
      #quick-market-select {
        font-size: 0.7rem;
        padding: 4px 6px;
      }

      /* Refresh button */
      #refresh-feed-btn {
        padding: 4px 8px;
        font-size: 0.7rem;
      }

      /* Bookmakers modal */
      .bookmakers-modal {
        width: calc(100vw - 16px);
        max-width: none;
        margin: 8px;
        border-radius: 16px;
      }

      /* Odds history page */
      .odds-history-container {
        padding: 6px;
      }

      /* Ticker page */
      .ticker-container {
        padding: 6px;
      }
    }

    /* ── Small mobile (≤360px) ── */
    @media (max-width: 360px) {
      .navbar {
        margin: 0 4px;
        height: 40px;
        border-radius: 10px;
      }
      .navbar-content {
        padding: 0 4px;
      }
      .navbar-logo {
        font-size: 0.95rem;
      }
      .navbar-tab {
        font-size: 0.75rem;
        padding: 2px 6px;
      }
      .user-btn {
        padding: 2px 4px 2px 2px;
      }
      .user-btn-avatar {
        width: 20px;
        height: 20px;
        font-size: 0.65rem;
      }
      .subnav {
        margin: 4px 4px 0;
        height: 30px;
        border-radius: 10px;
      }
      .subnav .market-pill {
        font-size: 0.65rem;
        padding: 2px 6px;
      }
      .wrap {
        padding: 4px;
      }
      .board-shell {
        border-radius: 10px;
      }
      .events-table {
        font-size: 0.75rem;
      }
      .events-table td.teams-cell {
        min-width: 150px;
        width: 150px;
      }
    }