:root {
  --bg: #090c11;
  --panel: #11161e;
  --panel-2: #151b24;
  --panel-3: #1a212c;
  --border: #28313e;
  --border-soft: #202833;
  --text: #f6f8fb;
  --muted: #8e9aad;
  --muted-2: #657187;
  --purple: #8b46f6;
  --purple-2: #6f2ed6;
  --green: #28d17c;
  --yellow: #f5c63c;
  --red: #ef4349;
  --blue: #47a4ff;
  --radius: 12px;
  --shadow: 0 20px 55px rgba(0,0,0,.34);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; }
img { max-width: 100%; }
.app-shell { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 50; height: 66px; display: flex; align-items: center; border-bottom: 1px solid var(--border-soft); background: rgba(14,18,24,.96); backdrop-filter: blur(18px); }
.topbar-inner { width: 100%; max-width: 1600px; margin: auto; padding: 0 24px; display: flex; align-items: center; gap: 24px; }
.brand-button { border: 0; background: transparent; cursor: pointer; padding: 4px 0; display: flex; align-items: center; }
.brand-button img { width: 69px; height: 30px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,.35)); }
.desktop-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px; border: 0; background: transparent; color: #9ca6b6; cursor: pointer; transition: .18s ease; }
.nav-btn:hover { color: var(--text); background: #171d26; }
.nav-btn.active { background: rgba(139,70,246,.18); color: #aa71ff; }
.nav-icon { width: 16px; text-align: center; opacity: .95; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 36px; height: 36px; border: 1px solid transparent; border-radius: 9px; background: transparent; display: grid; place-items: center; cursor: pointer; color: #cfd5df; }
.icon-btn:hover { background: var(--panel-2); border-color: var(--border); }
.series-picker { max-width: 230px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 10px; padding: 7px 11px; background: #10151c; cursor: pointer; }
.series-dot { width: 25px; height: 25px; border-radius: 6px; flex: none; display: grid; place-items: center; font-size: 10px; font-weight: 900; color: #111; }
.series-picker span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #261a47; color: #a873ff; font-weight: 700; }
.mobile-menu-btn { display: none; }
.main { max-width: 1600px; margin: 0 auto; padding: 26px 24px 80px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: clamp(25px, 3vw, 34px); letter-spacing: -.035em; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { border: 1px solid var(--border); background: #111720; padding: 9px 14px; border-radius: 9px; cursor: pointer; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: .18s ease; }
.btn:hover { border-color: #465266; transform: translateY(-1px); }
.btn.primary { background: linear-gradient(135deg,var(--purple),var(--purple-2)); border-color: transparent; box-shadow: 0 8px 24px rgba(139,70,246,.2); }
.btn.success { background: #123a29; border-color: #206a48; color: #6ee7a5; }
.btn.danger { color: #ff878b; border-color: #5a282d; background: #241316; }
.btn.ghost { background: transparent; }
.btn.small { padding: 7px 10px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.notice { border: 1px solid #a62e34; background: linear-gradient(90deg,#371317,#291014); color: #ff6e73; padding: 13px 16px; border-radius: 10px; font-weight: 800; margin-bottom: 22px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.card { background: linear-gradient(180deg,rgba(21,27,36,.98),rgba(15,20,27,.98)); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.card-pad { padding: 18px; }
.card-title { margin: 0; font-size: 17px; }
.card-subtitle { margin: 5px 0 0; color: var(--muted); }
.series-card { border-color: #323a46; }
.series-stripe { height: 52px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 0 16px; color: #080a0d; }
.series-stripe .btn { justify-self: start; background: rgba(255,255,255,.9); color: #111; border: 0; }
.series-stripe .series-wordmark { height: 38px; max-width: 190px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,.2)); }
.series-stripe .season-chip { justify-self: end; background: rgba(0,0,0,.25); color: #fff; border-radius: 7px; padding: 5px 10px; font-size: 12px; font-weight: 800; }
.series-body { padding: 14px 16px 16px; }
.info-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.info-box { border: 1px solid var(--border); background: #141a23; border-radius: 9px; padding: 13px; min-height: 73px; }
.eyebrow { color: #7e8caa; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .09em; }
.info-box strong { display: block; margin-top: 5px; }
.info-box span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.mini-standings { margin-top: 14px; }
.mini-row { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 9px; padding: 7px 0; }
.pos-pill { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #202835; color: #aeb8c6; font-weight: 800; font-size: 12px; }
.pos-pill.gold { background:#4a3a13; color:#ffd64b; }
.pos-pill.silver { background:#dfe6ef; color:#263244; }
.pos-pill.bronze { background:#ffe8d5; color:#b95b22; }
.hero { position: relative; min-height: 340px; border: 1px solid #2b3440; border-radius: 16px; overflow: hidden; display: flex; align-items: end; background:
  radial-gradient(circle at 80% 15%, rgba(139,70,246,.35), transparent 35%),
  linear-gradient(135deg,#171e29 0%,#0c1016 60%,#121824 100%); margin-bottom: 22px; }
.hero:before { content:""; position:absolute; inset:0; background: repeating-linear-gradient(115deg,transparent 0 35px,rgba(255,255,255,.018) 35px 37px); }
.hero-content { position: relative; z-index: 1; padding: clamp(24px,4vw,52px); max-width: 760px; }
.hero-logo { width: min(420px,65vw); max-height: 150px; object-fit: contain; object-position: left center; margin-bottom: 18px; }
.hero h1 { font-size: clamp(31px,5vw,58px); margin: 0; letter-spacing: -.055em; line-height: .98; }
.hero p { color: #aeb7c6; max-width: 650px; font-size: 16px; line-height: 1.6; }
.hero-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:20px; }
.stat-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card { padding: 17px; border-radius: 11px; background: #121821; border: 1px solid var(--border); }
.stat-card .value { display:block; font-size:25px; font-weight:900; margin-top:4px; }
.tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.tab { border: 1px solid var(--border); background: #0f141b; padding: 8px 13px; border-radius: 8px; color: #d6dbe4; font-weight: 800; cursor: pointer; }
.tab.active { background: var(--purple); border-color: var(--purple); color: #fff; }
.tab.yellow.active { background: var(--yellow); border-color: var(--yellow); color:#15120b; }
.tab:disabled { opacity:.38; cursor:not-allowed; filter:saturate(.35); }
.playoff-round-tabs { align-items:center; }
.playoff-round-tabs .tab { white-space:nowrap; }
.toolbar { display: flex; justify-content: space-between; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:16px; }
.segment { display:inline-flex; padding:3px; border-radius:9px; background:#111720; border:1px solid var(--border); }
.segment button { border:0; background:transparent; color:#8d98aa; padding:7px 11px; border-radius:6px; cursor:pointer; font-weight:700; }
.segment button.active { background:#242c39; color:#fff; }
.search { position:relative; min-width:260px; flex:1; max-width:420px; }
.search input { width:100%; padding:10px 12px 10px 36px; border-radius:9px; background:#10151c; border:1px solid var(--border); color:#fff; outline:none; }
.search:before { content:'⌕'; position:absolute; left:12px; top:8px; color:var(--muted); font-size:18px; }
.section-divider { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:12px; margin:20px 0 12px; color:#9e6fff; font-weight:900; text-transform:uppercase; letter-spacing:.09em; font-size:11px; }
.section-divider:before,.section-divider:after { content:""; height:1px; background:linear-gradient(90deg,transparent,#4b2a72); }
.section-divider:after { background:linear-gradient(90deg,#4b2a72,transparent); }
.race-list { display:flex; flex-direction:column; gap:10px; }
.race-banner { min-height:95px; display:grid; grid-template-columns:70px 80px 1fr 220px 26px; align-items:center; border:1px solid #303947; border-radius:11px; overflow:hidden; position:relative; isolation:isolate; background-color:#121820; background-size:cover; background-position:center; background-clip:padding-box; cursor:pointer; }
.race-banner:before { content:""; position:absolute; inset:0; border-radius:10px; background:linear-gradient(90deg,rgba(5,7,10,.96) 0%,rgba(5,7,10,.84) 40%,rgba(5,7,10,.38) 100%); pointer-events:none; }
.race-banner > * { position:relative; z-index:1; }
.race-num { height:100%; display:grid; place-items:center; font-size:28px; font-weight:900; border-right:1px solid #303947; }
.race-logo { padding:10px; display:grid; place-items:center; height:100%; border-right:1px solid #303947; }
.race-logo img { max-height:55px; max-width:60px; object-fit:contain; }
.race-logo .placeholder { width:48px;height:48px;border-radius:10px;background:#222a35;display:grid;place-items:center;font-size:10px;font-weight:900;color:#a9b3c2; }
.race-main { padding:10px 14px; min-width:0; }
.race-date { color:#b7c0cf; font-size:12px; font-weight:800; }
.race-name { font-size:18px; font-weight:950; margin-top:4px; white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.race-track { margin-top:2px; color:#e9edf3; }
.winner { padding:12px 15px; text-align:right; color:#ffc928; }
.winner small { display:block;font-size:10px;font-weight:900;text-transform:uppercase; }
.winner strong { display:block;font-size:17px;margin-top:2px; }
.table-wrap { overflow:auto; border:1px solid var(--border); border-radius:11px; }
table { width:100%; border-collapse:collapse; min-width:900px; }
th { color:#c1cad7; font-size:12px; text-align:left; background:#171e28; padding:13px 14px; position:sticky;top:0;z-index:1; }
td { padding:12px 14px; border-top:1px solid var(--border); background:#121821; }
tr:hover td { background:#151c26; }
.driver-cell { display:flex; align-items:center; gap:10px; font-weight:800; }
.number-badge { width:34px;height:29px;border-radius:8px;display:grid;place-items:center;background:#202936;color:#fff;font-weight:950;font-style:italic; }
.type-chip { border-radius:5px; padding:4px 6px; background:#edf0f5; color:#202631; font-size:10px; font-weight:900; }
.manufacturer { display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:900;text-transform:uppercase; vertical-align:middle; }
.manufacturer-logo { height:18px; width:auto; max-width:76px; display:block; object-fit:contain; }
.manufacturer-logo.image-only { max-width:78px; }
.manufacturer-text { line-height:1; }
.manufacturer-fallback { font-size:10px; letter-spacing:.02em; }
.mfr-dot { width:11px;height:11px;border-radius:3px;display:inline-block; }
.move-up { color:#29d47b;font-size:11px; }
.move-down { color:#f04b52;font-size:11px; }
.cutoff-row td { border-top:1px dashed #7a282c; }
.roster-list { border:1px solid var(--border);border-radius:11px;overflow:hidden; }
.roster-row { display:grid;grid-template-columns:50px 1.25fr 1.4fr repeat(5,.55fr);gap:12px;align-items:center;padding:12px 14px;border-top:1px solid var(--border);background:#10151c;cursor:pointer; }
.roster-row:first-child { border-top:0; }
.roster-row:hover { background:#151c25; }
.roster-head { color:#8591a4;background:#171e28;font-size:12px;cursor:default; }
.roster-name { font-weight:850;display:flex;align-items:center;gap:8px; }
.roster-team { font-weight:700; }
.empty { padding:70px 20px;text-align:center;color:var(--muted); }
.season-card { padding:18px; display:flex; flex-direction:column; gap:12px; }
.season-card .season-icon { width:48px;height:48px;border-radius:12px;display:grid;place-items:center;font-weight:950; }
.season-meta { color:var(--muted); }
.progress { height:7px;border-radius:10px;background:#242c38;overflow:hidden; }
.progress span { display:block;height:100%;background:linear-gradient(90deg,var(--purple),#b675ff); }
.rulebook-shell { display:grid;grid-template-columns:260px 1fr;min-height:680px;border:1px solid var(--border);border-radius:11px;overflow:hidden;background:#1e1f22; }
.pdf-sidebar { padding:16px;background:#27282b;border-right:1px solid #424348;overflow:auto; }
.pdf-thumb { height:190px;border-radius:5px;background:#f5f5f5;color:#141414;display:grid;place-items:center;text-align:center;padding:18px;margin-bottom:14px;font-weight:900; }
.pdf-main { display:flex;flex-direction:column;min-width:0; }
.pdf-toolbar { height:48px;background:#37383b;display:flex;align-items:center;gap:12px;padding:0 14px;color:#fff; }
.pdf-page { flex:1;display:grid;place-items:center;padding:28px;overflow:auto;background:#2c2d2f; }
.rulebook-cover { width:min(700px,94%);aspect-ratio:8.5/11;background:linear-gradient(135deg,#fff,#e6e6e6);color:#111;border:1px solid #aaa;box-shadow:0 10px 35px rgba(0,0,0,.35);display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:50px; }
.rulebook-cover img { width:70%;max-height:180px;object-fit:contain;filter:drop-shadow(0 5px 8px rgba(0,0,0,.2)); }
.rulebook-cover h2 { font-size:clamp(30px,4vw,55px);margin:22px 0 0; }
.rulebook-cover h3 { color:#d51f28;font-size:25px; }
.settings-grid { display:grid;grid-template-columns:minmax(0,720px) minmax(280px,1fr);gap:18px;align-items:start; }
.settings-stack { display:flex;flex-direction:column;gap:18px; }
.form-section { padding:20px; }
.form-section h3 { margin:0 0 17px;font-size:18px; }
.form-grid { display:grid;grid-template-columns:1fr 1fr;gap:14px; }
.field { display:flex;flex-direction:column;gap:7px; }
.field.full { grid-column:1/-1; }
.field label { font-size:12px;font-weight:800;color:#dce2eb; }
.field input,.field select,.field textarea { width:100%;background:#10151d;border:1px solid var(--border);border-radius:8px;padding:10px 11px;color:#fff;outline:none; }
.field textarea { min-height:90px;resize:vertical; }
.field input:focus,.field select:focus,.field textarea:focus { border-color:#7440c5;box-shadow:0 0 0 3px rgba(139,70,246,.12); }
.point-grid { display:grid;grid-template-columns:repeat(8,minmax(45px,1fr));gap:7px; }
.point-input { position:relative; }
.point-input span { position:absolute;top:-6px;left:7px;background:#151b24;color:#77849a;font-size:8px;padding:0 3px; }
.point-input input { width:100%;background:#10151d;border:1px solid var(--border);border-radius:7px;padding:10px 4px 7px;color:#fff;text-align:center;font-weight:800; }
.toggle-row { display:flex;justify-content:space-between;align-items:center;gap:15px;padding:12px 0;border-top:1px solid var(--border-soft); }
.toggle-row:first-of-type { border-top:0; }
.toggle { width:42px;height:24px;border-radius:20px;background:#343d4b;padding:3px;cursor:pointer;transition:.2s;flex:none; }
.toggle span { display:block;width:18px;height:18px;border-radius:50%;background:#fff;transition:.2s; }
.toggle.on { background:var(--purple); }
.toggle.on span { transform:translateX(18px); }
.chart-card { padding:18px; }
.chart-wrap { width:100%;height:480px;position:relative;overflow:auto; }
.chart-wrap canvas { min-width:850px;width:100%;height:100%; }
.modal-backdrop { position:fixed;inset:0;z-index:100;background:rgba(0,0,0,.76);display:grid;place-items:center;padding:20px; }
.modal { width:min(720px,100%);max-height:92vh;overflow:auto;background:#121820;border:1px solid #354052;border-radius:13px;box-shadow:var(--shadow); }
.modal.large { width:min(1120px,100%); }
.modal-head { display:flex;justify-content:space-between;align-items:center;padding:18px 20px;border-bottom:1px solid var(--border); }
.modal-head h2 { margin:0;font-size:21px; }
.modal-body { padding:20px; }
.modal-foot { display:flex;justify-content:flex-end;gap:10px;padding:16px 20px;border-top:1px solid var(--border); }
.close { border:0;background:transparent;color:#b4bdcb;font-size:23px;cursor:pointer; }
.profile-top { display:flex;align-items:center;gap:16px;margin-bottom:20px; }
.profile-photo { width:72px;height:72px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#24324b,#141a24);font-size:25px;font-weight:950;border:3px solid #e9edf3;color:#fff; }
.profile-name h2 { margin:0;font-size:25px; }
.profile-name p { margin:4px 0 0;color:var(--muted); }
.profile-stats { display:grid;grid-template-columns:repeat(7,1fr);gap:8px; }
.profile-stat { border:1px solid var(--border);background:#171e28;border-radius:8px;padding:12px;text-align:center; }
.profile-stat strong { display:block;font-size:20px; }
.profile-stat span { color:var(--muted);font-size:11px; }
.upload-zone { border:1px dashed #465166;border-radius:11px;min-height:180px;display:grid;place-items:center;text-align:center;padding:25px;background:#111720;cursor:pointer; }
.upload-zone:hover { border-color:#8955dd;background:#161d27; }
.import-preview { max-height:350px;overflow:auto;margin-top:16px; }
.toast-stack { position:fixed;right:20px;bottom:20px;z-index:160;display:flex;flex-direction:column;gap:10px; }
.toast { min-width:250px;max-width:390px;padding:12px 14px;border-radius:9px;background:#16221c;border:1px solid #2b714e;box-shadow:var(--shadow);animation:toast-in .2s ease; }
.toast.danger { background:#271417;border-color:#713139;color:#ff9aa0; }
.toast.info { background:#14202c;border-color:#315d7e;color:#a7d5ff; }
@keyframes toast-in { from{transform:translateY(12px);opacity:0} }
.mobile-drawer { display:none; }
@media (max-width:1100px) {
  .desktop-nav { display:none; }
  .mobile-menu-btn { display:grid; }
  .mobile-drawer { position:fixed;top:66px;left:0;right:0;z-index:45;padding:10px 16px 16px;background:#0f141b;border-bottom:1px solid var(--border);box-shadow:var(--shadow); }
  .mobile-drawer.open { display:grid;grid-template-columns:repeat(4,1fr);gap:6px; }
  .settings-grid { grid-template-columns:1fr; }
  .race-banner { grid-template-columns:55px 65px 1fr 175px 22px; }
  .roster-row { grid-template-columns:45px 1.2fr 1fr repeat(3,.55fr); }
  .roster-row > :nth-child(6),.roster-row > :nth-child(7) { display:none; }
}
@media (max-width:780px) {
  .topbar-inner,.main { padding-left:14px;padding-right:14px; }
  .top-actions .social,.top-actions .calendar,.top-actions .shield { display:none; }
  .series-picker { max-width:160px; }
  .grid-2,.grid-3,.stat-grid { grid-template-columns:1fr 1fr; }
  .page-head { flex-direction:column; }
  .race-banner { grid-template-columns:48px 54px 1fr 20px;min-height:88px; }
  .winner { display:none; }
  .race-name { font-size:15px; }
  .race-track { font-size:12px; }
  .info-pair { grid-template-columns:1fr; }
  .series-stripe { grid-template-columns:auto 1fr auto; }
  .series-stripe .series-wordmark { max-width:130px; }
  .rulebook-shell { grid-template-columns:1fr; }
  .pdf-sidebar { display:none; }
  .point-grid { grid-template-columns:repeat(5,1fr); }
  .form-grid { grid-template-columns:1fr; }
  .profile-stats { grid-template-columns:repeat(3,1fr); }
  .roster-row { grid-template-columns:44px 1.5fr 1fr .55fr; }
  .roster-row > :nth-child(n+5) { display:none; }
  .mobile-drawer.open { grid-template-columns:repeat(2,1fr); }
}
@media (max-width:520px) {
  .brand-button img { width:54px; }
  .series-picker { max-width:140px;padding:6px 8px; }
  .avatar { display:none; }
  .grid-2,.grid-3,.stat-grid { grid-template-columns:1fr; }
  .hero { min-height:380px; }
  .hero-content { padding:26px 20px; }
  .series-stripe { height:auto;min-height:58px;padding:8px 10px; }
  .series-stripe .btn { padding:7px 9px; }
  .series-stripe .season-chip { padding:4px 6px; }
  .race-banner { grid-template-columns:42px 1fr 18px; }
  .race-logo { display:none; }
  .race-num { font-size:22px; }
  .point-grid { grid-template-columns:repeat(4,1fr); }
  .toolbar { align-items:stretch; }
  .search { min-width:100%; }
  .profile-top { align-items:flex-start; }
  .profile-stats { grid-template-columns:repeat(2,1fr); }
}

/* Version 2: recent-race home hero and series manager */
.series-dot { overflow:hidden; }
.series-dot img { width:100%;height:100%;object-fit:contain;padding:2px; }
.manage-count { margin-left:6px;padding:2px 7px;border-radius:999px;background:#252d3a;color:#9faaba;font-size:10px; }
.recent-race-hero { position:relative;min-height:430px;margin-bottom:28px;border:1px solid #303a49;border-radius:17px;overflow:hidden;display:grid;grid-template-columns:minmax(0,1.35fr) minmax(360px,.65fr);gap:0;background-size:cover;background-position:center;box-shadow:0 20px 52px rgba(0,0,0,.24); }
.recent-race-shade { position:absolute;inset:0;background:linear-gradient(90deg,rgba(7,10,15,.97) 0%,rgba(7,10,15,.88) 53%,rgba(7,10,15,.66) 100%); }
.recent-summary,.recent-results-panel { position:relative;z-index:1; }
.recent-summary { padding:clamp(28px,4vw,54px);display:flex;flex-direction:column;justify-content:space-between;min-width:0; }
.recent-series-brand { display:flex;align-items:center;gap:16px; }
.recent-series-brand img { width:120px;height:52px;object-fit:contain;object-position:left center;filter:drop-shadow(0 5px 12px rgba(0,0,0,.35)); }
.recent-series-brand strong { display:block;margin-top:4px;font-size:14px; }
.recent-race-title { margin:34px 0 30px; }
.recent-race-title > span { color:#aeb8c7;font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase; }
.recent-race-title h1 { max-width:850px;margin:7px 0 8px;font-size:clamp(32px,4.8vw,68px);line-height:.95;letter-spacing:-.055em;text-wrap:balance; }
.recent-race-title p { margin:0;color:#c0c8d4;font-size:16px; }
.recent-highlights { display:grid;grid-template-columns:1.05fr 1.4fr 1fr;gap:10px; }
.recent-highlight { min-height:76px;padding:13px 15px;border:1px solid rgba(255,255,255,.12);border-radius:10px;background:rgba(15,20,29,.76);backdrop-filter:blur(8px); }
.recent-highlight.featured { border-color:rgba(245,198,60,.46);background:linear-gradient(135deg,rgba(91,69,16,.58),rgba(23,25,29,.82)); }
.recent-highlight span { display:block;color:#8794a8;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.09em; }
.recent-highlight strong { display:block;margin-top:7px;font-size:16px;line-height:1.25; }
.recent-results-panel { margin:24px 24px 24px 0;padding:22px;border:1px solid rgba(255,255,255,.12);border-radius:13px;background:rgba(13,17,24,.91);backdrop-filter:blur(16px);display:flex;flex-direction:column;min-width:0; }
.recent-results-head { display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding-bottom:14px;border-bottom:1px solid var(--border-soft); }
.recent-results-head h2 { margin:4px 0 0;font-size:21px; }
.recent-results-list { flex:1;padding:7px 0; }
.recent-result-row { display:grid;grid-template-columns:28px 42px minmax(0,1fr) auto;gap:9px;align-items:center;padding:10px 0;border-bottom:1px solid var(--border-soft); }
.recent-result-row:last-child { border-bottom:0; }
.recent-result-row strong { white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.recent-result-row b { color:#e9edf5;font-size:12px;white-space:nowrap; }
.recent-number { color:#a9b4c4;font-size:11px;font-weight:900; }
.recent-results-empty { flex:1;display:grid;place-items:center;text-align:center;color:var(--muted);padding:35px 14px;line-height:1.5; }
.recent-results-button { width:100%;margin-top:10px; }
.recent-empty { background:radial-gradient(circle at 84% 12%,rgba(139,70,246,.26),transparent 35%),linear-gradient(135deg,#151c27,#0d1118 68%);grid-template-columns:minmax(0,1.25fr) minmax(310px,.75fr);align-items:center;padding:clamp(28px,4vw,54px);gap:44px; }
.recent-empty:before { content:"";position:absolute;inset:0;background:repeating-linear-gradient(115deg,transparent 0 42px,rgba(255,255,255,.015) 42px 44px); }
.recent-empty-copy,.recent-empty-preview { position:relative;z-index:1; }
.recent-empty-copy > img { width:180px;max-height:70px;object-fit:contain;object-position:left;margin-bottom:24px; }
.recent-empty-copy h1 { margin:7px 0 13px;font-size:clamp(32px,4.2vw,59px);line-height:1;letter-spacing:-.05em;max-width:760px; }
.recent-empty-copy p { max-width:690px;color:#aab4c3;font-size:15px;line-height:1.65; }
.recent-empty-preview { min-height:285px;padding:28px;border:1px solid #343e4d;border-radius:14px;background:rgba(13,18,25,.74);box-shadow:0 18px 45px rgba(0,0,0,.25); }
.preview-line { height:13px;width:58%;border-radius:999px;background:#293241;margin-bottom:12px; }
.preview-line.wide { width:83%;height:20px;background:#384457; }
.preview-grid { display:grid;gap:9px;margin-top:35px; }
.preview-grid div { display:grid;grid-template-columns:27px 1fr;align-items:center;gap:10px; }
.preview-grid span { width:27px;height:27px;border-radius:50%;display:grid;place-items:center;background:#252e3b;color:#8d99ab;font-size:11px;font-weight:900; }
.preview-grid i { display:block;height:12px;border-radius:999px;background:linear-gradient(90deg,#313c4d,#232b37); }
.empty-state-card { min-height:260px;padding:48px 24px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center; }
.empty-state-card h2 { margin:12px 0 7px;font-size:24px; }
.empty-state-card p { max-width:570px;margin:0 0 20px;color:var(--muted);line-height:1.55; }
.empty-state-icon { width:52px;height:52px;border-radius:14px;display:grid;place-items:center;background:rgba(139,70,246,.15);color:#a970ff;font-size:25px;font-weight:900; }
.series-card-title { display:flex;justify-content:space-between;gap:14px;align-items:flex-start;margin-bottom:13px; }
.series-card-title h2 { margin:0;font-size:18px; }
.series-card-title p { margin:4px 0 0;color:var(--muted);font-size:12px; }
.series-empty-row { padding:18px 0 5px;color:var(--muted);font-size:12px; }
.manager-explainer { display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:24px; }
.manager-explainer > div { padding:15px;border:1px solid var(--border);border-radius:10px;background:#10161e; }
.manager-explainer p { margin:6px 0 0;color:var(--muted);font-size:12px;line-height:1.5; }
.manager-section-head { display:flex;align-items:center;justify-content:space-between;gap:14px;margin:6px 0 12px; }
.manager-section-head h3 { margin:0;font-size:17px; }
.manager-section-head p { margin:4px 0 0;color:var(--muted);font-size:12px; }
.manager-section-head.archived-head { margin-top:30px; }
.series-manager-list { display:grid;gap:9px; }
.series-manager-row { display:grid;grid-template-columns:58px minmax(190px,1fr) auto;gap:13px;align-items:center;padding:13px;border:1px solid var(--border);border-radius:11px;background:#10161e; }
.series-manager-logo { width:52px;height:44px;border:2px solid;border-radius:9px;display:grid;place-items:center;overflow:hidden;background:#171d26;font-size:10px;font-weight:950; }
.series-manager-logo img { width:100%;height:100%;object-fit:contain;padding:4px; }
.series-manager-main { min-width:0; }
.series-manager-main > strong { display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:15px; }
.series-manager-main > span { display:block;margin-top:4px;color:var(--muted);font-size:11px; }
.series-manager-badges { display:flex;flex-wrap:wrap;gap:5px;margin-top:8px; }
.status-badge { border-radius:999px;padding:3px 7px;font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.05em; }
.status-badge.active,.status-badge.visible { background:#153426;color:#62dea0; }
.status-badge.archived { background:#282d36;color:#a9b2c0; }
.status-badge.hidden { background:#34243b;color:#d391ec; }
.series-manager-actions { display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:6px;max-width:390px; }
.icon-action { width:34px;height:34px;border:1px solid var(--border);border-radius:8px;background:#151c25;color:#c8d0db;cursor:pointer;font-weight:900; }
.icon-action:hover { border-color:#586579;background:#1d2632; }
.manager-empty { padding:27px;border:1px dashed #3a4658;border-radius:10px;color:var(--muted);text-align:center; }
.series-choice { display:grid;grid-template-columns:56px 1fr;gap:14px;align-items:center; }
.series-choice-logo { width:50px;height:42px;border-radius:8px;background:#0d1219;display:grid;place-items:center;overflow:hidden;font-size:10px;font-weight:900; }
.series-choice-logo img { width:100%;height:100%;object-fit:contain;padding:4px; }
.field-help { color:var(--muted);font-size:11px; }
.season-icon img { width:100%;height:100%;object-fit:contain;padding:5px; }
.archived-card { opacity:.78; }

@media (max-width:1050px) {
  .recent-race-hero { grid-template-columns:1fr; }
  .recent-results-panel { margin:0 24px 24px; }
  .recent-empty { grid-template-columns:1fr; }
  .recent-empty-preview { display:none; }
  .series-manager-row { grid-template-columns:52px 1fr; }
  .series-manager-actions { grid-column:1/-1;justify-content:flex-start;max-width:none;padding-top:5px; }
}
@media (max-width:720px) {
  .recent-race-hero { min-height:0; }
  .recent-summary { padding:25px 20px; }
  .recent-series-brand img { width:90px;height:42px; }
  .recent-race-title { margin:26px 0 23px; }
  .recent-highlights { grid-template-columns:1fr; }
  .recent-results-panel { margin:0 14px 14px;padding:16px; }
  .recent-empty { padding:31px 20px; }
  .manager-explainer { grid-template-columns:1fr; }
  .manager-section-head { align-items:flex-start;flex-direction:column; }
  .series-manager-row { grid-template-columns:46px 1fr;padding:11px; }
  .series-manager-logo { width:43px;height:38px; }
}
@media (max-width:480px) {
  .recent-result-row { grid-template-columns:27px 35px minmax(0,1fr); }
  .recent-result-row b { display:none; }
  .recent-series-brand { align-items:flex-start; }
  .recent-series-brand strong { font-size:12px; }
  .recent-race-title h1 { font-size:34px; }
  .series-manager-actions .btn { flex:1; }
}
.race-summary-strip { display:grid;grid-template-columns:1fr 1.5fr 1fr;gap:10px;align-items:stretch;margin-bottom:16px; }
.race-summary-strip > div { padding:12px 13px;border:1px solid var(--border);border-radius:9px;background:#10161e;min-width:0; }
.race-summary-strip strong { display:block;margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
@media (max-width:820px) { .race-summary-strip { grid-template-columns:1fr 1fr; } .race-summary-strip > div:last-child { grid-column:1/-1; } }
@media (max-width:520px) { .race-summary-strip { grid-template-columns:1fr; } }

/* Version 3: account entry and fixed series context */
.series-context { max-width:230px;display:flex;align-items:center;gap:10px;border:1px solid var(--border);border-radius:10px;padding:7px 11px;background:#10151c;color:#e5e9f0; }
.series-context > span:last-child { white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:750; }
.series-context .series-dot { overflow:hidden;background:#687386; }
.series-context .series-dot img { width:100%;height:100%;object-fit:contain;padding:3px; }
.account-avatar { border:1px solid #3c2c62;cursor:pointer;transition:.18s ease; }
.account-avatar:hover { border-color:#8b46f6;background:#32205c;transform:translateY(-1px); }

.auth-shell { min-height:100vh;display:grid;grid-template-columns:minmax(480px,1.15fr) minmax(460px,.85fr);background:#090c11; }
.auth-brand-panel { min-height:100vh;position:relative;overflow:hidden;padding:clamp(34px,5vw,76px);display:flex;flex-direction:column;justify-content:space-between;background:radial-gradient(circle at 20% 18%,rgba(139,70,246,.30),transparent 32%),radial-gradient(circle at 88% 82%,rgba(71,164,255,.12),transparent 34%),linear-gradient(145deg,#151c27 0%,#0b0f15 70%);border-right:1px solid #242d39; }
.auth-brand-panel:before { content:"";position:absolute;inset:0;background:repeating-linear-gradient(118deg,transparent 0 46px,rgba(255,255,255,.016) 46px 48px);pointer-events:none; }
.auth-brand-panel:after { content:"";position:absolute;width:640px;height:640px;border:1px solid rgba(255,255,255,.05);border-radius:50%;right:-330px;top:12%;box-shadow:0 0 0 80px rgba(255,255,255,.012),0 0 0 160px rgba(255,255,255,.008);pointer-events:none; }
.auth-brand-top,.auth-brand-copy,.auth-feature-grid { position:relative;z-index:1; }
.auth-brand-top { display:flex;align-items:center;gap:16px;font-size:18px;font-weight:900;letter-spacing:-.02em; }
.auth-brand-top img { width:100px;height:45px;object-fit:contain;object-position:left; }
.auth-brand-top span { padding-left:16px;border-left:1px solid #465062;color:#d8dee8; }
.auth-brand-copy { max-width:850px;margin:80px 0; }
.auth-kicker { display:inline-flex;align-items:center;gap:8px;color:#b47bff;font-size:11px;font-weight:950;text-transform:uppercase;letter-spacing:.13em; }
.auth-kicker:before { content:"";width:28px;height:2px;background:#8b46f6; }
.auth-brand-copy h1 { margin:14px 0 20px;font-size:clamp(43px,5.1vw,82px);line-height:.95;letter-spacing:-.065em;max-width:900px;text-wrap:balance; }
.auth-brand-copy p { margin:0;max-width:720px;color:#a8b3c2;font-size:17px;line-height:1.68; }
.auth-feature-grid { display:grid;grid-template-columns:repeat(3,1fr);gap:12px; }
.auth-feature-grid > div { min-height:112px;padding:16px;border:1px solid rgba(255,255,255,.09);border-radius:12px;background:rgba(13,18,25,.58);backdrop-filter:blur(10px); }
.auth-feature-grid b { display:block;font-size:14px; }
.auth-feature-grid span { display:block;margin-top:7px;color:#8f9aab;font-size:12px;line-height:1.5; }
.auth-form-panel { min-height:100vh;display:grid;place-items:center;padding:40px;background:linear-gradient(180deg,#0c1016,#090c11); }
.auth-card { width:min(520px,100%);padding:30px;border:1px solid #2e3847;border-radius:18px;background:linear-gradient(180deg,rgba(21,27,36,.99),rgba(14,19,26,.99));box-shadow:0 30px 90px rgba(0,0,0,.42); }
.auth-mobile-logo { display:none;align-items:center;gap:12px;margin-bottom:25px;font-weight:900; }
.auth-mobile-logo img { width:75px;height:34px;object-fit:contain; }
.auth-tabs { display:grid;grid-template-columns:1fr 1fr;padding:4px;border:1px solid var(--border);border-radius:10px;background:#0d1218;margin-bottom:27px; }
.auth-tabs button { border:0;border-radius:7px;padding:10px;background:transparent;color:#8e9aad;cursor:pointer;font-weight:850; }
.auth-tabs button.active { color:#fff;background:#252e3b;box-shadow:0 5px 15px rgba(0,0,0,.2); }
.auth-heading > span { color:#9e68f0;font-size:10px;font-weight:950;letter-spacing:.12em;text-transform:uppercase; }
.auth-heading h2 { margin:6px 0 8px;font-size:29px;letter-spacing:-.04em; }
.auth-heading p { margin:0 0 24px;color:var(--muted);line-height:1.55; }
.auth-form { display:grid;gap:15px; }
.auth-form-grid { display:grid;grid-template-columns:1fr 1fr;gap:14px; }
.auth-form-grid .full { grid-column:1/-1; }
.auth-submit { width:100%;min-height:46px;margin-top:4px;font-size:14px; }
.auth-account-count { margin:13px 0 0;text-align:center;color:#758196;font-size:11px; }
.auth-divider { display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:10px;color:#667287;font-size:11px;text-transform:uppercase;letter-spacing:.08em;margin:22px 0; }
.auth-divider:before,.auth-divider:after { content:"";height:1px;background:#28313e; }
.auth-guest-button { width:100%;display:grid;grid-template-columns:36px 1fr auto;text-align:left;justify-content:stretch;padding:12px 14px;background:#10161e; }
.auth-guest-button > span:nth-child(2) { display:flex;flex-direction:column;align-items:flex-start; }
.auth-guest-button small { margin-top:3px;color:#818da0;font-weight:500; }
.guest-icon { width:32px;height:32px;border-radius:9px;display:grid;place-items:center;background:#202937;color:#b4becd; }
.auth-local-note { margin:18px 0 0;color:#687489;font-size:10px;line-height:1.5;text-align:center; }
.auth-error { border:1px solid #713139;border-radius:8px;background:#271417;color:#ff9aa0;padding:10px 12px;font-size:12px;font-weight:700; }

.account-profile { display:flex;align-items:center;gap:15px;padding-bottom:18px;border-bottom:1px solid var(--border-soft); }
.account-profile-avatar { width:62px;height:62px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#3c2370,#21163e);border:2px solid #9f69f1;color:#cba8ff;font-size:20px;font-weight:950; }
.account-profile h3 { margin:7px 0 3px;font-size:22px; }
.account-profile p { margin:0;color:var(--muted); }
.account-details { display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0; }
.account-details > div,.account-link-card { padding:14px;border:1px solid var(--border);border-radius:10px;background:#10161e; }
.account-details span { display:block;color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.08em;font-weight:850; }
.account-details strong { display:block;margin-top:6px;overflow-wrap:anywhere; }
.account-link-card { border-left:4px solid #5d6879; }
.account-link-card.linked { border-left-color:#28d17c;background:linear-gradient(90deg,rgba(40,209,124,.08),#10161e 40%); }
.account-link-card strong { display:block;margin-top:6px;font-size:16px; }
.account-link-card p { margin:7px 0 0;color:var(--muted);font-size:12px;line-height:1.5; }
.my-result-row td { background:rgba(139,70,246,.12); }
.my-result-row:hover td { background:rgba(139,70,246,.18); }
.you-chip { display:inline-block;margin-left:7px;padding:2px 6px;border-radius:999px;background:#6f2ed6;color:#fff;font-size:9px;font-weight:900;text-transform:uppercase;vertical-align:middle; }

@media (max-width:1100px) {
  .auth-shell { grid-template-columns:1fr; }
  .auth-brand-panel { display:none; }
  .auth-form-panel { padding:25px; }
  .auth-mobile-logo { display:flex; }
}
@media (max-width:720px) {
  .series-context { max-width:150px; }
  .top-actions .social { display:none; }
  .auth-card { padding:22px; }
  .auth-form-grid { grid-template-columns:1fr; }
  .auth-form-grid .full { grid-column:auto; }
  .account-details { grid-template-columns:1fr; }
}
@media (max-width:520px) {
  .series-context { max-width:115px;padding:6px 8px; }
  .series-context .series-dot { display:none; }
  .auth-form-panel { padding:14px;align-items:start;padding-top:24px; }
  .auth-card { border-radius:14px; }
}

/* Version 4: full-width boxed navigation and connected social links */
.topbar {
  height: 82px;
  padding: 0;
  background: rgba(12,16,22,.98);
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
}
.topbar-inner {
  max-width: none;
  margin: 0;
  padding: 11px 18px;
  gap: 9px;
}
.brand-button {
  width: 108px;
  height: 58px;
  flex: 0 0 108px;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg,#181e27,#10151c);
  transition: .18s ease;
}
.brand-button:hover {
  border-color: #4b5668;
  background: #1a202a;
  transform: translateY(-1px);
}
.brand-button img { width: 78px; height: 36px; }
.desktop-nav {
  display: grid;
  grid-template-columns: repeat(7,minmax(78px,1fr));
  gap: 7px;
  min-width: 0;
}
.nav-btn {
  width: 100%;
  min-width: 0;
  height: 58px;
  justify-content: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg,#151b24,#10151c);
  color: #9ca8ba;
  font-weight: 800;
  box-shadow: inset 0 1px rgba(255,255,255,.018);
}
.nav-btn:hover {
  color: #fff;
  border-color: #455166;
  background: #1a212c;
  transform: translateY(-1px);
}
.nav-btn.active {
  color: #fff;
  border-color: #9859ff;
  background: linear-gradient(145deg,rgba(139,70,246,.36),rgba(91,39,177,.22));
  box-shadow: inset 0 0 0 1px rgba(174,111,255,.12),0 8px 22px rgba(116,53,215,.16);
}
.nav-icon {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  flex: 0 0 19px;
  opacity: 1;
}
.nav-icon svg,
.quick-link svg,
.icon-btn svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-fill { fill: currentColor; stroke: none; }
.inverse-fill { fill: #0e1218; }
.nav-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-actions {
  margin-left: 0;
  gap: 7px;
  flex: 0 0 auto;
}
.social-links {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 2px;
}
.quick-link,
.icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #111720;
  display: grid;
  place-items: center;
  color: #d4dae4;
  text-decoration: none;
  cursor: pointer;
  transition: .18s ease;
  padding: 10px;
}
.quick-link:hover,
.icon-btn:hover {
  color: #fff;
  border-color: #4c586a;
  background: #1a212b;
  transform: translateY(-1px);
}
.quick-link.instagram:hover { color:#ff6aa8; border-color:#9c426c; }
.quick-link.youtube:hover { color:#ff5151; border-color:#903c40; }
.quick-link.discord:hover { color:#8d9cff; border-color:#5868bd; }
.series-context {
  height: 42px;
  max-width: 190px;
  border-radius: 11px;
  padding: 6px 10px;
}
.series-context .series-dot { width:27px;height:27px;border-radius:7px; }
.avatar {
  width: 42px;
  height: 42px;
  border: 1px solid #4a3479;
  cursor: pointer;
}
.mobile-menu-btn { padding:10px; }

@media (max-width: 1450px) {
  .topbar-inner { padding-left:12px;padding-right:12px;gap:7px; }
  .brand-button { width:92px;flex-basis:92px; }
  .brand-button img { width:68px; }
  .desktop-nav { grid-template-columns:repeat(7,minmax(68px,1fr));gap:5px; }
  .nav-btn { padding-left:7px;padding-right:7px;gap:6px;font-size:12px; }
  .series-context { max-width:150px; }
}
@media (max-width: 1200px) {
  .nav-label { display:none; }
  .desktop-nav { grid-template-columns:repeat(7,54px);justify-content:start; }
  .nav-btn { padding:0; }
  .nav-icon { width:21px;height:21px;flex-basis:21px; }
}
@media (max-width: 1100px) {
  .topbar { height:68px; }
  .topbar-inner { padding-top:7px;padding-bottom:7px; }
  .brand-button { height:52px;width:88px;flex-basis:88px; }
  .desktop-nav { display:none; }
  .mobile-drawer { top:68px; }
  .mobile-drawer.open .nav-label { display:inline; }
  .mobile-drawer.open .nav-btn { height:48px;justify-content:flex-start;padding:9px 12px; }
}
@media (max-width: 780px) {
  .social-links,.top-actions .calendar { display:none; }
  .topbar-inner { padding-left:10px;padding-right:10px; }
  .series-context { margin-left:auto; }
}
@media (max-width: 520px) {
  .brand-button { width:72px;flex-basis:72px;padding:6px 9px; }
  .brand-button img { width:56px; }
  .series-context { max-width:120px; }
  .avatar { display:grid; }
}

/* Version 5: persistent Home button and series-only navigation */
.brand-button {
  width: 96px;
  flex-basis: 96px;
  padding: 4px 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.brand-button:hover {
  border-color: transparent;
  background: transparent;
  transform: none;
}
.brand-button img { width: 82px; height: 42px; }
.persistent-home {
  width: 112px;
  flex: 0 0 112px;
}
.desktop-nav.has-series-tabs {
  grid-template-columns: repeat(6,minmax(78px,1fr));
}
.desktop-nav.home-only-nav {
  display: block;
  flex: 1;
}
.home-navigation-note {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: -4px 0 16px;
  padding: 14px 16px;
  border: 1px solid #30394a;
  border-radius: 12px;
  background: linear-gradient(135deg,rgba(139,70,246,.12),rgba(17,23,32,.78));
}
.home-navigation-note strong { display:block; color:#f4f6fb; font-size:14px; }
.home-navigation-note p { margin:4px 0 0; color:var(--muted); font-size:12px; line-height:1.5; }
.home-navigation-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:rgba(139,70,246,.2);
  color:#b985ff;
}
.home-navigation-icon svg,.empty-state-icon svg { width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round; }
.series-page-banner {
  display:grid;
  grid-template-columns:86px minmax(0,1fr) auto;
  align-items:center;
  gap:18px;
  margin-bottom:20px;
  padding:16px 18px;
  border:1px solid;
  border-left-width:4px;
  border-radius:13px;
  background:#111720;
}
.series-page-banner h2 { margin:4px 0 3px; }
.series-page-banner p { margin:0;color:var(--muted); }
.series-page-logo { width:78px;height:60px;border-radius:10px;display:grid;place-items:center;overflow:hidden; }
.series-page-logo img { width:100%;height:100%;object-fit:contain;padding:7px; }
.current-season-card { border-top:3px solid var(--purple); }
.compact-empty { min-height:210px; }

@media (max-width:1450px) {
  .brand-button { width:82px;flex-basis:82px; }
  .brand-button img { width:70px; }
  .persistent-home { width:94px;flex-basis:94px; }
  .desktop-nav.has-series-tabs { grid-template-columns:repeat(6,minmax(68px,1fr)); }
}
@media (max-width:1200px) {
  .persistent-home { width:56px;flex-basis:56px;padding:0; }
  .persistent-home .nav-label { display:none; }
  .desktop-nav.has-series-tabs { grid-template-columns:repeat(6,54px); }
}
@media (max-width:1100px) {
  .brand-button { height:52px;width:78px;flex-basis:78px; }
  .persistent-home { height:52px;width:58px;flex-basis:58px; }
  .desktop-nav { display:none !important; }
}
@media (max-width:780px) {
  .series-page-banner { grid-template-columns:64px 1fr; }
  .series-page-logo { width:58px;height:50px; }
  .series-page-banner .btn { grid-column:1/-1;justify-self:start; }
}
@media (max-width:520px) {
  .brand-button { width:62px;flex-basis:62px;padding:2px 4px; }
  .brand-button img { width:56px; }
  .persistent-home { width:48px;flex-basis:48px; }
  .persistent-home .nav-icon { width:19px;height:19px; }
  .home-navigation-note { align-items:flex-start;padding:12px; }
}

/* Version 6: modern series previews, page transitions, and Excel imports */
.series-showcase-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 20px;
}
.series-showcase-card {
  --series-color:#8b46f6;
  --series-soft:rgba(139,70,246,.16);
  position: relative;
  overflow: hidden;
  min-width: 0;
  border: 1px solid #303a49;
  border-radius: 16px;
  background: linear-gradient(145deg,#151c26 0%,#0f141b 100%);
  box-shadow: 0 16px 38px rgba(0,0,0,.18);
  transition: transform .22s ease,border-color .22s ease,box-shadow .22s ease;
}
.series-showcase-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb,var(--series-color) 54%,#303a49);
  box-shadow: 0 22px 52px rgba(0,0,0,.28);
}
.series-card-glow {
  position:absolute;
  width:290px;
  height:290px;
  right:-105px;
  top:-155px;
  border-radius:50%;
  background:var(--series-color);
  opacity:.13;
  filter:blur(4px);
  pointer-events:none;
}
.series-showcase-top {
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:22px;
  padding:24px;
  border-bottom:1px solid rgba(255,255,255,.07);
  background:linear-gradient(110deg,var(--series-soft),transparent 66%);
}
.series-brand-lockup { display:flex;align-items:center;gap:17px;min-width:0; }
.series-showcase-logo {
  width:104px;
  height:72px;
  flex:0 0 104px;
  display:grid;
  place-items:center;
  border:1px solid color-mix(in srgb,var(--series-color) 46%,#303a49);
  border-radius:13px;
  background:rgba(8,11,16,.62);
  box-shadow:inset 0 0 26px rgba(0,0,0,.28);
  overflow:hidden;
}
.series-showcase-logo img { width:100%;height:100%;object-fit:contain;padding:9px; }
.series-showcase-copy { min-width:0; }
.series-showcase-copy h2 { margin:5px 0 5px;font-size:clamp(20px,2vw,28px);letter-spacing:-.025em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.series-showcase-copy p { margin:0;color:#9ca8b9;font-size:12px; }
.series-showcase-copy p span { color:var(--series-color);margin:0 4px; }
.series-open-cta {
  min-width:154px;
  min-height:52px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:15px;
  padding:13px 17px;
  border:1px solid color-mix(in srgb,var(--series-color) 72%,#fff 8%);
  border-radius:11px;
  background:var(--series-color);
  color:var(--series-contrast,#fff);
  font:inherit;
  font-size:13px;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 10px 24px color-mix(in srgb,var(--series-color) 24%,transparent);
  transition:filter .18s ease,transform .18s ease,box-shadow .18s ease;
}
.series-open-cta b { font-size:20px;line-height:1;transition:transform .18s ease; }
.series-open-cta:hover { filter:brightness(1.12);transform:translateY(-1px);box-shadow:0 14px 30px color-mix(in srgb,var(--series-color) 34%,transparent); }
.series-open-cta:hover b { transform:translateX(3px); }
.series-glance-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:19px 24px 21px;gap:12px; }
.series-glance-item {
  min-width:0;
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  align-items:start;
  gap:10px;
  padding:13px;
  border:1px solid #283241;
  border-radius:11px;
  background:rgba(17,23,32,.72);
}
.series-glance-icon {
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:9px;
  background:var(--series-soft);
  color:var(--series-color);
  font-weight:950;
}
.series-glance-icon svg { width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round; }
.series-glance-item small { display:block;color:#788599;font-size:9px;font-weight:900;letter-spacing:.08em;text-transform:uppercase; }
.series-glance-item strong { display:block;margin-top:5px;color:#eef2f8;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.series-glance-item p { margin:5px 0 0;color:#8d99aa;font-size:10px;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden; }
.series-showcase-footer { display:flex;align-items:center;justify-content:space-between;gap:15px;padding:13px 24px;border-top:1px solid rgba(255,255,255,.06);background:#0d1218; }
.series-metrics { display:flex;align-items:center;flex-wrap:wrap;gap:16px;color:#7f8b9d;font-size:10px;text-transform:uppercase;letter-spacing:.05em; }
.series-metrics b { color:#dfe5ee;font-size:12px;margin-right:3px; }
.series-secondary-link { border:0;background:transparent;color:#b9c2d0;font:inherit;font-size:11px;font-weight:850;cursor:pointer;white-space:nowrap; }
.series-secondary-link:hover { color:var(--series-color); }
.series-secondary-link span { margin-left:5px; }

.page-transition.page-enter { animation:frc-page-enter .34s cubic-bezier(.2,.78,.25,1) both; }
@keyframes frc-page-enter {
  from { opacity:0;transform:translateY(9px) scale(.997);filter:blur(2px); }
  to { opacity:1;transform:none;filter:none; }
}
@view-transition { navigation:auto; }
::view-transition-old(root) { animation:frc-view-old .18s ease both; }
::view-transition-new(root) { animation:frc-view-new .28s cubic-bezier(.2,.78,.25,1) both; }
@keyframes frc-view-old { to { opacity:0;transform:translateY(-4px); } }
@keyframes frc-view-new { from { opacity:0;transform:translateY(8px); } }
@media (prefers-reduced-motion:reduce) {
  .page-transition.page-enter,.series-showcase-card,.series-open-cta,.series-open-cta b { animation:none!important;transition:none!important; }
  ::view-transition-old(root),::view-transition-new(root) { animation:none!important; }
}

.import-summary-card {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-bottom:15px;
  padding:17px 18px;
  border:1px solid #343f50;
  border-radius:11px;
  background:linear-gradient(135deg,rgba(139,70,246,.13),#10161e);
}
.import-summary-card h3 { margin:5px 0 5px;font-size:20px; }
.import-summary-card p { margin:0;color:var(--muted);font-size:12px; }
.import-error-list { display:flex;flex-direction:column;gap:6px;margin-bottom:14px;padding:13px 15px;border:1px solid #7c3138;border-radius:10px;background:#2a1519;color:#ffabb0;font-size:12px; }
.import-error-list strong { color:#ffd5d8;font-size:13px; }
.import-error-list.warning { border-color:#715d25;background:#251f12;color:#e5ca7b; }
.import-error-list.warning strong { color:#ffe89c; }
.import-more-note { margin:9px 0 0;color:var(--muted);font-size:11px;text-align:right; }
.settings-import-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px; }
.settings-import-grid > div { min-width:0;padding:12px 13px;border:1px solid var(--border);border-radius:9px;background:#10161e; }
.settings-import-grid span { display:block;color:#7f8b9d;font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.07em; }
.settings-import-grid strong { display:block;margin-top:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.import-big-number { display:block;margin-top:8px;font-size:31px;line-height:1; }

@media (max-width:1180px) {
  .series-showcase-grid { grid-template-columns:1fr; }
}
@media (max-width:720px) {
  .series-showcase-top { align-items:stretch;flex-direction:column;padding:18px; }
  .series-open-cta { width:100%; }
  .series-glance-grid { grid-template-columns:1fr;padding:15px 18px 18px; }
  .series-showcase-footer { align-items:flex-start;flex-direction:column;padding:12px 18px; }
  .series-secondary-link { padding:3px 0; }
  .settings-import-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .import-summary-card { align-items:flex-start;flex-direction:column; }
}
@media (max-width:460px) {
  .series-brand-lockup { align-items:flex-start; }
  .series-showcase-logo { width:76px;height:58px;flex-basis:76px; }
  .series-showcase-copy h2 { white-space:normal; }
  .settings-import-grid { grid-template-columns:1fr; }
}


/* Version 7: series contrast and expanded settings */
.settings-feature-card { padding:22px; }
.settings-feature-card h3 { margin-bottom:20px; }
.settings-toggle-row {
  justify-content:flex-start;
  align-items:flex-start;
  gap:12px;
  padding:0;
  border:0;
}
.settings-toggle-row .toggle { margin-top:1px; }
.settings-toggle-copy { min-width:0; }
.settings-toggle-copy b { display:block;font-size:13px;color:#f3f5fa; }
.settings-toggle-copy div { margin-top:4px;color:var(--muted);font-size:12px;line-height:1.45;max-width:620px; }
.settings-feature-fields { margin-top:20px; }
.settings-explanation { margin:-2px 0 16px;color:var(--muted);font-size:12px;line-height:1.55; }
.field-help { color:var(--muted);font-size:11px;line-height:1.4; }
.label-note { color:var(--muted);font-weight:500;font-size:11px; }
.settings-subhead { margin:22px 0 12px; }
.settings-subhead strong { display:block;font-size:13px; }
.settings-subhead p { margin:4px 0 0;color:var(--muted);font-size:11px;line-height:1.45; }
.chase-reset-grid { display:grid;grid-template-columns:repeat(6,minmax(66px,1fr));gap:8px; }
.manufacturer-settings-list { display:flex;flex-direction:column;gap:9px;margin-bottom:12px; }
.manufacturer-setting-row {
  display:grid;
  grid-template-columns:minmax(170px,1fr) 42px 36px 36px 36px;
  align-items:center;
  gap:7px;
}
.manufacturer-name-input {
  min-width:0;
  width:100%;
  background:#10151d;
  border:1px solid var(--border);
  border-radius:8px;
  padding:10px 11px;
  color:#fff;
  outline:none;
}
.manufacturer-name-input:focus { border-color:#7440c5;box-shadow:0 0 0 3px rgba(139,70,246,.12); }
.manufacturer-logo-preview {
  width:42px;height:34px;border-radius:8px;border:1px solid var(--border);
  display:grid;place-items:center;overflow:hidden;background:#f0f1f3;color:#727987;font-size:8px;text-align:center;
}
.manufacturer-logo-preview img { width:100%;height:100%;object-fit:contain;padding:3px; }
.icon-action-spacer { width:36px;height:36px; }
.danger-icon { color:#f04d57;border-color:rgba(240,77,87,.35); }
.manufacturer-empty { padding:16px;border:1px dashed #303a49;border-radius:9px;color:var(--muted);font-size:12px;text-align:center; }
.import-count-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }

@media (max-width:760px) {
  .chase-reset-grid { grid-template-columns:repeat(3,minmax(66px,1fr)); }
  .manufacturer-setting-row { grid-template-columns:minmax(130px,1fr) 40px 34px 34px 34px;gap:5px; }
  .import-count-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:480px) {
  .chase-reset-grid { grid-template-columns:repeat(2,minmax(66px,1fr)); }
  .manufacturer-setting-row { grid-template-columns:1fr 40px 34px 34px; }
  .manufacturer-setting-row .danger-icon { grid-column:4; }
  .icon-action-spacer { display:none; }
}

/* Version 8: searchable track library and repaired season creation */
.track-picker-row { display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;align-items:start; }
.track-combobox { position:relative;min-width:0; }
.track-combobox > input[type="text"],.track-combobox > input:not([type]) { padding-right:38px; }
.track-picker-actions { display:flex;gap:7px; }
.track-add-button,.track-edit-button { width:46px;height:42px;padding:0;font-size:21px;line-height:1;display:grid;place-items:center; }
.track-edit-button { font-size:18px; }
.track-configuration-block { margin-top:12px;display:grid;gap:6px; }
.track-configuration-block label { font-size:12px;font-weight:700;color:#e8edf7; }
.track-suggestions {
  position:absolute;left:0;right:0;top:calc(100% + 7px);z-index:130;
  display:none;max-height:310px;overflow:auto;padding:7px;
  border:1px solid #3b4658;border-radius:10px;background:#0e141c;box-shadow:0 18px 48px rgba(0,0,0,.48);
}
.track-suggestions.open { display:block; }
.track-suggestion {
  width:100%;display:grid;grid-template-columns:58px minmax(0,1fr);align-items:center;gap:10px;
  padding:8px;border:0;border-radius:8px;background:transparent;color:#fff;text-align:left;cursor:pointer;
}
.track-suggestion:hover,.track-suggestion:focus { background:#1a2230;outline:none; }
.track-suggestion-image { width:58px;height:38px;border:1px solid #354052;border-radius:7px;display:grid;place-items:center;overflow:hidden;background:#151c25;color:#7f8b9d; }
.track-suggestion-image img { width:100%;height:100%;object-fit:cover; }
.track-suggestion strong { display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.track-suggestion small { display:block;margin-top:4px;color:var(--muted);font-size:10px; }
.track-suggestion-empty { display:flex;flex-direction:column;gap:4px;padding:17px 13px;text-align:center;color:var(--muted);font-size:11px; }
.track-suggestion-empty strong { color:#e5e9ef;font-size:12px; }
.track-banner-preview {
  min-height:92px;margin-top:10px;border:1px dashed #364154;border-radius:10px;
  display:flex;align-items:flex-end;padding:13px;background:#0e141c center/cover no-repeat;color:var(--muted);font-size:11px;overflow:hidden;
}
.track-banner-preview.has-image { border-style:solid;color:#fff;font-weight:800;text-shadow:0 2px 8px #000; }
.track-library-summary { margin-top:18px;padding:14px;border:1px solid var(--border);border-radius:10px;background:#0f151d; }
.track-library-summary > div { display:flex;flex-wrap:wrap;gap:7px;margin-top:9px; }
.track-library-summary > div > span { padding:6px 9px;border:1px solid #303a49;border-radius:999px;background:#151c25;font-size:11px; }
.track-library-summary small { color:var(--muted); }
@media (max-width:520px) {
  .track-picker-row { grid-template-columns:minmax(0,1fr) auto; }
  .track-add-button,.track-edit-button { width:43px; }
}

/* Version 9: selectable seasons and accessible archives */
.status-badge.available { background:#182536;color:#8eb7ec; }
.current-series-row { border-color:#6c45ad; box-shadow:0 0 0 1px rgba(139,70,246,.18) inset; }
.season-card-top { display:flex;align-items:center;gap:12px; }
.season-status-row { display:flex;flex-wrap:wrap;gap:6px;min-height:22px; }
.season-card-actions { margin-top:auto; }
.viewed-season-card { box-shadow:0 0 0 1px rgba(139,70,246,.42) inset; }
.form-callout { margin-top:16px;padding:14px 15px;border:1px solid #3b4657;border-radius:10px;background:#101720;display:grid;gap:5px; }
.form-callout b { color:#f0f4fa; }
.form-callout span { color:var(--muted);font-size:12px;line-height:1.5; }
.archive-context-bar,.archive-view-notice { margin-bottom:18px;padding:13px 15px;border:1px solid #4c4656;border-left:4px solid #8b46f6;border-radius:10px;background:linear-gradient(90deg,rgba(139,70,246,.11),rgba(16,22,30,.96));display:flex;align-items:center;justify-content:space-between;gap:16px; }
.archive-context-bar > div,.archive-view-notice { min-width:0; }
.archive-context-bar b,.archive-view-notice b { display:block;color:#efe6ff; }
.archive-context-bar span,.archive-view-notice span { display:block;margin-top:3px;color:var(--muted);font-size:12px;line-height:1.45; }
.archive-view-notice { align-items:flex-start;justify-content:flex-start; }
.season-archive-notice { border-left-color:#8894a6;background:linear-gradient(90deg,rgba(136,148,166,.1),rgba(16,22,30,.96)); }
@media (max-width:760px) {
  .archive-context-bar { align-items:flex-start;flex-direction:column; }
  .season-card-actions .btn { flex:1; }
}

/* Version 10: cloud database, synchronized accounts, and update-safe data */
.app-loading {
  min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;
  background:radial-gradient(circle at 42% 30%,rgba(139,70,246,.2),transparent 32%),#090d12;color:#f5f7fb;text-align:center;
}
.app-loading img { width:112px;max-height:58px;object-fit:contain;filter:drop-shadow(0 8px 25px rgba(0,0,0,.45)); }
.app-loading strong { font-size:16px; }
.app-loading span { color:var(--muted);font-size:12px; }
.loading-spinner { width:30px;height:30px;border:3px solid #263142;border-top-color:#8b46f6;border-radius:50%;animation:cloudSpin .8s linear infinite; }
@keyframes cloudSpin { to { transform:rotate(360deg); } }
.cloud-save-pill {
  min-width:92px;padding:7px 10px;border:1px solid #324053;border-radius:999px;background:#111923;color:#b9c6d8;
  font-size:10px;font-weight:800;text-align:center;white-space:nowrap;transition:.2s ease;
}
.cloud-save-pill[data-status="saved"],.cloud-save-pill[data-status="idle"] { color:#7ee0ad;border-color:rgba(64,204,132,.35);background:rgba(33,122,80,.12); }
.cloud-save-pill[data-status="saving"],.cloud-save-pill[data-status="pending"] { color:#f7d36c;border-color:rgba(247,211,108,.35);background:rgba(160,121,21,.12); }
.cloud-save-pill[data-status="error"] { color:#ff8e96;border-color:rgba(255,87,96,.4);background:rgba(170,34,45,.14); }
.cloud-save-pill.local { color:#e4b86c;border-color:rgba(228,184,108,.35);background:rgba(160,112,30,.12); }
.cloud-setup-warning {
  margin-bottom:18px;padding:15px 17px;border:1px solid rgba(255,183,73,.42);border-left:4px solid #ffb749;border-radius:11px;
  background:linear-gradient(90deg,rgba(255,183,73,.13),rgba(13,18,25,.96));color:#f3f6fb;
}
.cloud-setup-warning b { display:block;margin-bottom:4px;color:#ffd28c; }
.cloud-setup-warning span { color:#aeb9c9;font-size:12px;line-height:1.55; }
.auth-notice { margin-top:12px;background:rgba(44,124,82,.15);border-color:rgba(84,214,146,.35);color:#a7efc8; }
@media (max-width:1100px) { .cloud-save-pill { display:none; } }

/* Version 12: race-results workflow and championship formats */
.modal.xlarge{width:min(1500px,calc(100vw - 36px));max-height:94vh}
.results-wizard-modal{width:min(1500px,calc(100vw - 32px));max-height:94vh;display:flex;flex-direction:column}
.results-wizard-modal .modal-body{overflow:auto}
.results-wizard-steps{display:flex;gap:8px;padding:14px 22px;border-bottom:1px solid var(--line);overflow-x:auto;background:rgba(8,11,16,.5)}
.wizard-step{display:flex;align-items:center;gap:9px;min-width:max-content;padding:9px 13px;border:1px solid var(--line);border-radius:10px;background:var(--panel-2);color:var(--muted);font:inherit;cursor:pointer;transition:.18s ease}
.wizard-step span{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#202735;color:#9aa6ba;font-size:11px;font-weight:900}
.wizard-step b{font-size:12px}
.wizard-step:hover{border-color:#515e72;color:var(--text)}
.wizard-step.active{border-color:var(--purple);background:rgba(139,70,246,.16);color:#fff;box-shadow:0 0 0 1px rgba(139,70,246,.2) inset}
.wizard-step.active span,.wizard-step.complete span{background:var(--purple);color:#fff}
.wizard-step.complete:not(.active){color:#cbd5e5}
.results-wizard-body{padding:22px 24px 28px}
.result-step-heading{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin-bottom:18px}
.result-step-heading h3{margin:4px 0 5px;font-size:23px}
.result-step-heading p{margin:0;color:var(--muted);max-width:760px}
.result-mode-tabs{display:flex;padding:4px;background:#090d13;border:1px solid var(--line);border-radius:11px;flex:none}
.result-mode-tabs button{border:0;background:transparent;color:var(--muted);padding:8px 13px;border-radius:8px;font-weight:800;cursor:pointer}
.result-mode-tabs button.active{background:#252e3d;color:#fff}
.compact-upload{min-height:190px;margin-bottom:18px}
.upload-icon{font-size:34px;color:#a36cff}
.selected-file-name{margin-top:10px;color:var(--muted);font-size:12px}
.results-empty{min-height:120px;display:flex;flex-direction:column;justify-content:center;gap:5px}
.manual-result-table{margin-bottom:12px;max-height:430px}
.result-grid-input{min-width:86px;padding:8px 9px;border-radius:8px}
.result-grid-input.wide{min-width:180px}
.add-result-row{margin-top:4px}
.points-spread-summary{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:16px}
.points-spread-summary h3{font-size:24px;margin:4px 0}
.points-spread-summary p{margin:0;color:var(--muted);max-width:760px}
.points-spread-kpi{min-width:92px;padding:12px;border:1px solid var(--line);border-radius:12px;text-align:center;background:var(--panel-2)}
.points-spread-kpi strong{display:block;font-size:24px}.points-spread-kpi span{color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.08em}
.points-spread-table{max-height:520px}
.penalty-input,.point-value-input{width:78px;padding:7px 8px;border-radius:7px;text-align:center}
.point-value-input{background:var(--panel);border-color:var(--line);color:var(--text);font-weight:700}
.point-value-input:focus{border-color:var(--purple);box-shadow:0 0 0 3px rgba(139,70,246,.16)}
.point-value-input.is-overridden{border-color:#c99a14;background:rgba(201,154,20,.13);color:#ffd85e}
.points-edit-note{display:flex;align-items:flex-start;gap:9px;margin:-2px 0 14px;padding:10px 12px;border:1px solid rgba(201,154,20,.28);border-radius:10px;background:rgba(201,154,20,.07);color:var(--muted);font-size:12px;line-height:1.45}
.override-dot{width:9px;height:9px;min-width:9px;margin-top:4px;border-radius:50%;background:#d5a719;box-shadow:0 0 0 3px rgba(213,167,25,.14)}
.points-spread-table td:not(:first-child),.points-spread-table th:not(:first-child){text-align:center}
.points-penalty{color:#ff6c72;font-weight:900}
.playoff-point-chip{display:inline-flex;min-width:28px;justify-content:center;padding:4px 7px;border-radius:999px;background:rgba(255,206,44,.13);border:1px solid rgba(255,206,44,.32);color:var(--yellow);font-weight:900}
.race-center-section{margin-top:24px;padding-top:20px;border-top:1px solid var(--line)}
.section-title-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.section-title-row h3{margin:4px 0 0;font-size:22px}

.format-choice-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:16px}
.format-choice{position:relative;text-align:left;padding:18px 16px;border:1px solid var(--line);border-radius:13px;background:var(--panel-2);color:var(--text);cursor:pointer;transition:.18s ease;min-height:132px}
.format-choice:hover{transform:translateY(-1px);border-color:#4b576a}
.format-choice.selected{border-color:var(--purple);background:linear-gradient(145deg,rgba(139,70,246,.18),rgba(19,24,33,.92));box-shadow:0 0 0 1px rgba(139,70,246,.18) inset}
.format-choice-check{position:absolute;right:12px;top:12px;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#262e3b;color:#fff;font-weight:900}
.format-choice.selected .format-choice-check{background:var(--purple)}
.format-choice strong{display:block;font-size:15px;margin:12px 0 8px}.format-choice small{display:block;color:var(--muted);line-height:1.45}
.format-settings-panel{margin-top:18px;padding-top:18px;border-top:1px solid var(--line)}
.playoff-round-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}
.playoff-round-card{padding:16px;border:1px solid var(--line);border-radius:12px;background:#0d1219}
.playoff-round-card>strong{display:block;font-size:18px;margin:4px 0 14px;color:#fff}
.playoff-round-card .field+.field{margin-top:12px}
.standings-context{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 17px;margin:12px 0;border:1px solid var(--line);border-radius:12px;background:var(--panel)}
.standings-context strong{display:block;margin-top:4px;font-size:13px;color:#d9e0eb}
.format-badge{padding:7px 11px;border-radius:999px;font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.07em;border:1px solid var(--line)}
.format-badge.full{background:rgba(56,201,142,.12);border-color:rgba(56,201,142,.35);color:var(--green)}
.format-badge.chase{background:rgba(255,206,44,.12);border-color:rgba(255,206,44,.35);color:var(--yellow)}
.format-badge.playoff{background:rgba(139,70,246,.14);border-color:rgba(139,70,246,.4);color:#b78cff}
.grid-5{grid-template-columns:repeat(5,minmax(0,1fr))}

@media(max-width:900px){
  .format-choice-grid,.playoff-round-grid{grid-template-columns:1fr}
  .result-step-heading,.points-spread-summary,.standings-context{flex-direction:column;align-items:stretch}
  .result-mode-tabs{align-self:flex-start}
  .grid-5{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px){
  .results-wizard-modal{width:100vw;max-height:100vh;height:100vh;border-radius:0}
  .results-wizard-body{padding:18px 14px}
  .results-wizard-steps{padding:10px 12px}
  .wizard-step b{display:none}.wizard-step{min-width:44px;justify-content:center;padding:8px}
  .grid-5{grid-template-columns:1fr}
}

/* Settings status and storage summary layout */
.settings-stack .mini-row {
  grid-template-columns: 28px minmax(0, 1fr) auto;
  min-width: 0;
}
.settings-stack .mini-row > span:not(.pos-pill) {
  min-width: 0;
  line-height: 1.35;
}
.settings-stack .mini-row > b {
  justify-self: end;
  text-align: right;
}
.settings-stack .mini-row.metric-row {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  border-top: 1px solid var(--border-soft);
}
.settings-stack .mini-row.metric-row:first-of-type {
  border-top: 0;
}
.settings-stack .mini-row.metric-row > b {
  max-width: 185px;
  overflow-wrap: anywhere;
}
.storage-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.storage-summary-item {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: #111720;
}
.storage-summary-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}
.storage-summary-item strong {
  display: block;
  margin-top: 7px;
  font-size: 23px;
  line-height: 1;
}
@media (max-width: 420px) {
  .storage-summary-grid { grid-template-columns: 1fr; }
  .settings-stack .mini-row.metric-row { grid-template-columns: 1fr; gap: 4px; }
  .settings-stack .mini-row.metric-row > b { justify-self: start; text-align: left; max-width: none; }
}

.roster-team .manufacturer { margin-left:8px; }
.driver-cell .manufacturer { flex:0 0 auto; }

/* Version 12.7: streamlined race-results importer */
.results-wizard-modal {
  width:min(1510px,calc(100vw - 28px));
  max-height:95vh;
  display:flex;
  flex-direction:column;
  background:#111720;
  border-color:#2c3645;
  box-shadow:0 30px 90px rgba(0,0,0,.62);
}
.results-import-head { align-items:center; padding:17px 22px; }
.results-import-title { display:flex;align-items:center;gap:15px;min-width:0;flex-wrap:wrap; }
.results-import-title h2 { margin:0;font-size:19px;white-space:nowrap; }
.results-nav-tabs { display:flex;align-items:center;gap:6px;overflow-x:auto;scrollbar-width:thin; }
.results-nav-tab {
  display:inline-flex;align-items:center;gap:5px;padding:6px 10px;border:1px solid #303a49;border-radius:8px;
  background:#0c1118;color:#e6ebf4;font:800 11px/1 inherit;white-space:nowrap;cursor:pointer;transition:.16s ease;
}
.results-nav-tab:hover { border-color:#59677d;background:#171e29; }
.results-nav-tab.active { border-color:#9354ff;background:linear-gradient(135deg,#9c55ff,#7737d8);color:#fff;box-shadow:0 7px 20px rgba(139,70,246,.28); }
.results-nav-tab.complete:not(.active) { color:#d8e1ef;border-color:#3f4b5e; }
.results-nav-tab span { color:#66dfa1;font-size:10px; }
.results-race-context {
  display:grid;grid-template-columns:minmax(260px,.8fr) minmax(320px,1.2fr);gap:18px;align-items:center;
  padding:12px 22px;border-top:1px solid #202936;border-bottom:1px solid #293342;background:#0d1219;
}
.results-race-context strong { display:block;font-size:14px;color:#fff; }
.results-race-context span { display:block;margin-top:4px;color:#8895a8;font-size:11px; }
.results-race-context p { margin:0;color:#9ba8bb;font-size:12px;line-height:1.5; }
.results-wizard-body { padding:18px 22px 24px;background:#111720; }
.results-wizard-footer { background:#0e141c;border-top:1px solid #293342; }
.results-section-toolbar { display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:14px; }
.results-section-toolbar p,.stage-step-copy p { margin:0;color:#8f9db1;font-size:12px;line-height:1.55; }
.result-mode-tabs { border-radius:9px;background:#202735;border-color:#293342;padding:3px; }
.result-mode-tabs button { padding:7px 12px;border-radius:7px;font-size:11px; }
.result-mode-tabs button.active { background:#080c12;color:#fff;box-shadow:0 1px 5px rgba(0,0,0,.35); }
.results-upload-zone {
  min-height:210px;margin:0;border:1px dashed #344054;border-radius:12px;background:linear-gradient(145deg,#111821,#0e141c);
}
.results-upload-zone:hover { border-color:#8d51ed;background:linear-gradient(145deg,rgba(139,70,246,.08),#0e141c); }
.results-upload-zone .upload-icon { display:grid;place-items:center;width:52px;height:52px;margin:0 auto 12px;border-radius:14px;background:rgba(139,70,246,.15);font-size:27px; }
.results-upload-zone h3 { margin:0 0 6px;font-size:16px; }
.results-info-panel,.results-validation-panel,.results-data-panel {
  margin-top:13px;border:1px solid #2b3544;border-radius:12px;background:#111821;overflow:hidden;
}
.results-panel-title { display:flex;align-items:center;gap:10px;min-height:54px;padding:12px 16px;border-bottom:1px solid #283240;background:#141b25; }
.results-panel-title>div { min-width:0; }
.results-panel-title strong { display:block;color:#f3f6fb;font-size:13px; }
.results-panel-title small { display:block;margin-top:3px;color:#8492a6;font-size:10px; }
.results-panel-icon { display:grid;place-items:center;width:27px;height:27px;border-radius:8px;background:#222c39;color:#9cabbf;font-size:13px;flex:none; }
.results-panel-icon.purple { color:#b47cff;background:rgba(139,70,246,.13); }
.results-panel-icon.gold { color:#ffd23f;background:rgba(255,203,40,.12); }
.results-driver-count { margin-left:auto;color:#8694a8;font-size:10px; }
.csv-metadata-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;background:#283240; }
.csv-meta-card { min-height:64px;padding:12px 15px;background:#111821; }
.csv-meta-card span { display:block;color:#7f8ca0;font-size:9px;text-transform:uppercase;letter-spacing:.07em; }
.csv-meta-card strong { display:block;margin-top:5px;color:#f0f3f8;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.results-validation-panel { border-color:#66531c; }
.results-validation-panel .results-panel-title { background:rgba(142,103,10,.08);border-color:#66531c; }
.validation-note-list { padding:8px 14px 12px; }
.validation-note { display:flex;align-items:center;gap:9px;padding:7px 3px;color:#c7d0dc;font-size:11px; }
.validation-note>span { display:grid;place-items:center;width:17px;height:17px;border-radius:50%;font-size:9px;flex:none; }
.validation-note.info>span { border:1px solid #7553d9;color:#a97bff; }
.validation-note.warning>span { border:1px solid #a78320;color:#f0c840; }
.validation-note.danger>span { border:1px solid #a22c36;color:#ff666e; }
.results-edit-table { max-height:500px;border:0;border-radius:0; }
.results-edit-table table { min-width:700px; }
.results-edit-table th { padding:9px 12px;background:#171f2a;font-size:10px; }
.results-edit-table td { padding:6px 9px;background:#111821; }
.results-edit-table tr:hover td { background:#151d28; }
.result-grid-input {
  width:100%;min-width:70px;padding:7px 9px;border:1px solid #2c3747;border-radius:7px;background:#10161f;color:#f1f4f8;font-size:11px;font-weight:650;
}
.result-grid-input:focus { border-color:#8748e5;box-shadow:0 0 0 2px rgba(139,70,246,.13); }
.result-grid-input.tiny { min-width:44px;width:52px;text-align:center; }
.result-grid-input.driver-name-input { min-width:190px; }
.result-grid-input.car-number-input { min-width:52px;width:58px;text-align:center; }
.result-grid-input.lap-time-input { min-width:92px;width:102px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace; }
.result-grid-input.interval-input { min-width:86px;width:96px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace; }
.race-import-table table { min-width:1330px; }
.derived-points { text-align:center;color:#9da9ba;font-size:10px; }
.derived-points.bonus-point { color:#9e77ed; }
.derived-points.total-point { color:#fff;font-weight:900; }
.results-table-actions { display:flex;gap:9px;justify-content:flex-end;margin-top:12px; }
.stage-step-copy { margin-bottom:13px; }
.stage-entry-panel { margin-top:0; }
.stage-entry-list { padding:11px 16px 16px;display:grid;gap:7px; }
.stage-entry-row { display:grid;grid-template-columns:32px minmax(0,1fr) 76px;align-items:center;gap:10px; }
.stage-position { color:#8592a6;text-align:right;font-size:11px;font-weight:800; }
.stage-entry-row input { padding:9px 12px;border:1px solid #293443;border-radius:8px;background:#10161f;color:#f0f3f8;font-size:11px; }
.stage-entry-row input:focus { border-color:#8b46f6;box-shadow:0 0 0 2px rgba(139,70,246,.13); }
.stage-entry-row.filled input { border-color:#455169; }
.stage-points-award { text-align:right;color:#7f8da1;font-size:10px; }
.points-breakdown-panel { margin-top:0; }
.points-spread-table { max-height:560px;border:0;border-radius:0; }
.points-spread-table table { min-width:980px; }
.points-spread-table th { padding:9px 10px;font-size:9px; }
.points-spread-table td { padding:7px 10px;font-size:11px; }
.points-spread-table td:nth-child(2),.points-spread-table th:nth-child(2) { text-align:left; }
.points-car-number { font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-weight:900;color:#fff; }
.point-value-input,.penalty-input { width:60px;padding:6px 7px;font-size:10px; }
.points-total { color:#fff;font-size:12px; }
.points-edit-note { margin:12px 14px; }
@media(max-width:900px){
  .results-race-context { grid-template-columns:1fr;gap:8px; }
  .results-section-toolbar { align-items:flex-start;flex-direction:column; }
  .csv-metadata-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:600px){
  .results-import-head { padding:13px 14px; }
  .results-import-title { gap:9px; }
  .results-import-title h2 { width:100%; }
  .results-race-context { padding:11px 14px; }
  .results-wizard-body { padding:14px; }
  .csv-metadata-grid { grid-template-columns:1fr; }
  .stage-entry-list { padding:10px; }
  .stage-entry-row { grid-template-columns:26px minmax(0,1fr); }
  .stage-points-award { display:none; }
}

/* Version 12.8: full-page race results workspace */
.main.results-main {
  max-width: 1900px;
  padding: 20px 18px 72px;
}
.results-page { min-width:0; }
.results-page-heading {
  display:grid;
  grid-template-columns:46px minmax(0,1fr) auto;
  align-items:center;
  gap:14px;
  margin:0 0 18px;
}
.results-back-button {
  width:42px;height:42px;border:1px solid #303b4c;border-radius:11px;background:#121923;color:#f3f6fb;
  font:800 19px/1 inherit;cursor:pointer;transition:.16s ease;
}
.results-back-button:hover { border-color:#8350d5;background:#1b2230;transform:translateX(-1px); }
.results-page-title-line { display:flex;align-items:center;gap:11px;flex-wrap:wrap; }
.results-page-title h1 { margin:0;font-size:28px;letter-spacing:-.025em; }
.results-page-title p { margin:5px 0 0;color:#8e9caf;font-size:12px; }
.results-page-status {
  min-width:132px;padding:10px 13px;border:1px solid #2e3948;border-radius:11px;background:#111821;text-align:right;
}
.results-page-status span { display:block;color:#8290a4;font-size:9px;text-transform:uppercase;letter-spacing:.09em;font-weight:850; }
.results-page-status strong { display:block;margin-top:4px;color:#fff;font-size:13px; }
.results-page-shell {
  border:1px solid #2c3746;border-radius:15px;background:#111720;overflow:hidden;
  box-shadow:0 22px 62px rgba(0,0,0,.25);
}
.results-page-toolbar {
  display:flex;align-items:center;justify-content:space-between;gap:18px;
  min-height:72px;padding:14px 18px;border-bottom:1px solid #293342;background:#121923;
}
.results-page-toolbar .results-import-title h2 { font-size:20px; }
.results-page .results-nav-tab { padding:8px 12px;font-size:12px; }
.results-page .results-race-context {
  grid-template-columns:minmax(300px,1fr) minmax(240px,.8fr);
  padding:13px 18px;
}
.results-step-progress { height:7px;border-radius:999px;background:#242d3a;overflow:hidden; }
.results-step-progress span { display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#8b46f6,#b568ff); }
.results-page-body { padding:20px 18px 26px;background:#0f151d;min-height:520px; }
.results-page-footer {
  position:sticky;bottom:0;z-index:8;
  display:flex;align-items:center;gap:14px;padding:14px 18px;border-top:1px solid #2a3544;background:rgba(13,19,27,.97);
  backdrop-filter:blur(14px);
}
.results-footer-note { flex:1;text-align:center;color:#7f8da0;font-size:11px; }
.results-primary-action { min-width:135px; }
.results-page .results-section-toolbar p,
.results-page .stage-step-copy p { font-size:13px; }
.results-page .result-mode-tabs button { font-size:12px;padding:8px 14px; }
.results-page .results-edit-table { max-height:none; }
.results-page .results-edit-table th { padding:11px 12px;font-size:11px; }
.results-page .results-edit-table td { padding:8px 9px; }
.results-page .result-grid-input { padding:9px 10px;font-size:13px; }
.results-page .stage-entry-row input { padding:10px 12px;font-size:13px; }
.results-page .stage-entry-list { gap:9px; }

/* More compact and readable points breakdown */
.results-page .points-spread-table { max-height:none; }
.results-page .points-breakdown-table {
  width:max-content !important;
  min-width:0 !important;
  table-layout:fixed;
}
.results-page .points-breakdown-table .points-col-number { width:58px; }
.results-page .points-breakdown-table .points-col-driver { width:220px; }
.results-page .points-breakdown-table .points-col-value { width:88px; }
.results-page .points-breakdown-table th {
  padding:11px 8px;font-size:11px;white-space:nowrap;color:#cbd5e4;
}
.results-page .points-breakdown-table td {
  height:52px;padding:7px 8px;font-size:13px;
}
.results-page .points-breakdown-table td:nth-child(2),
.results-page .points-breakdown-table th:nth-child(2) { text-align:left; }
.results-page .points-breakdown-table td:nth-child(2) b { font-size:14px;white-space:nowrap; }
.results-page .point-value-input,
.results-page .penalty-input {
  display:block;width:66px;height:37px;margin:0 auto;padding:6px 5px;
  border:1px solid #46546a;border-radius:9px;background:#0c121a !important;color:#f8fafc !important;
  font-size:14px;font-weight:850;text-align:center;box-shadow:inset 0 0 0 1px rgba(255,255,255,.02);
}
.results-page .point-value-input:hover,
.results-page .penalty-input:hover { border-color:#68778e; }
.results-page .point-value-input:focus,
.results-page .penalty-input:focus { border-color:#9558f5;box-shadow:0 0 0 3px rgba(139,70,246,.17);outline:none; }
.results-page .point-value-input.is-overridden {
  border-color:#d0a82c;background:rgba(160,118,16,.17) !important;color:#ffe072 !important;
}
.results-page .penalty-input { border-color:#6b343b; }
.results-page .penalty-input:focus { border-color:#e1505b;box-shadow:0 0 0 3px rgba(225,80,91,.16); }
.results-page .points-car-number { font-size:14px; }
.results-page .points-total { font-size:15px; }
.results-page .playoff-point-chip { min-width:34px;padding:6px 8px;font-size:13px; }
.results-page .points-edit-note { margin:12px 14px;font-size:12px; }

@media (max-width:900px) {
  .main.results-main { padding:14px 10px 54px; }
  .results-page-heading { grid-template-columns:42px minmax(0,1fr); }
  .results-page-status { display:none; }
  .results-page-toolbar { align-items:flex-start;flex-direction:column; }
  .results-page-toolbar>.btn { align-self:flex-end; }
  .results-page .results-race-context { grid-template-columns:1fr; }
  .results-footer-note { display:none; }
  .results-page-footer { justify-content:space-between; }
}
@media (max-width:600px) {
  .results-page-title h1 { font-size:22px; }
  .results-page-title p { line-height:1.5; }
  .results-page-body { padding:13px 10px 20px; }
  .results-page-toolbar { padding:13px 12px; }
  .results-page .results-nav-tabs { width:100%; }
  .results-page .results-nav-tab { padding:7px 10px;font-size:11px; }
}

/* Version 12.11: expandable race-by-race standings tracker */
.standings-driver-name { white-space:nowrap; }
.standings-expand-toggle {
  width:25px;height:25px;flex:0 0 25px;padding:0;margin-left:-3px;
  display:inline-grid;place-items:center;border:1px solid transparent;border-radius:7px;
  background:transparent;color:#8996a9;cursor:pointer;transition:.18s ease;
}
.standings-expand-toggle span { display:block;font-size:22px;line-height:1;transform:rotate(0deg);transition:transform .18s ease; }
.standings-expand-toggle:hover,.standings-expand-toggle:focus-visible { color:#fff;background:#202936;border-color:#354154;outline:none; }
.standings-expand-toggle.expanded { color:#b778ff;background:rgba(139,70,246,.12);border-color:rgba(139,70,246,.4); }
.standings-expand-toggle.expanded span { transform:rotate(90deg); }
.standings-driver-row.tracker-open td { background:#151c26; }
.standings-tracker-row td { padding:0;background:#0d131b;border-top:0; }
.standings-tracker-row:hover td { background:#0d131b; }
.standings-race-tracker { padding:10px 18px 17px 102px;border-top:1px solid #263141;border-bottom:1px solid #263141; }
.tracker-heading { display:flex;align-items:end;justify-content:space-between;gap:18px;margin-bottom:10px; }
.tracker-heading > div:first-child { display:flex;align-items:baseline;gap:10px;min-width:0; }
.tracker-heading strong { font-size:12px;color:#e7ecf5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.tracker-total { display:flex;align-items:baseline;gap:8px;color:#8f9bad;font-size:10px;text-transform:uppercase;font-weight:800;white-space:nowrap; }
.tracker-total b { color:#fff;font-size:15px; }
.race-points-strip { display:flex;gap:8px;overflow-x:auto;padding:1px 1px 5px;scrollbar-width:thin; }
.race-points-tile {
  min-width:57px;height:52px;padding:5px 7px;border:1px solid #2c3747;border-radius:9px;
  background:#111821;color:#f4f6fa;display:flex;flex-direction:column;align-items:center;justify-content:center;
  cursor:pointer;transition:.16s ease;font-family:inherit;
}
.race-points-tile span { color:#91a1b7;font-size:9px;font-weight:900;letter-spacing:.09em;line-height:1;text-transform:uppercase; }
.race-points-tile strong { margin-top:5px;font-size:15px;line-height:1;font-weight:950; }
.race-points-tile:hover,.race-points-tile:focus-visible { transform:translateY(-1px);border-color:#6d43a8;background:#182131;outline:none; }
.race-points-tile.winner { border-color:rgba(255,201,40,.55);background:rgba(255,201,40,.08); }
.race-points-tile.winner strong { color:#ffd33d; }
.race-points-tile.penalty { border-color:rgba(223,54,61,.48);background:rgba(109,25,30,.16); }
.race-points-tile.penalty strong { color:#ff6269; }
.race-points-tile.did-not-start { opacity:.52;border-style:dashed; }
.empty-tracker { padding:14px 18px 14px 102px;color:var(--muted);font-size:12px; }
@media (max-width:760px) {
  .standings-race-tracker,.empty-tracker { padding-left:16px; }
  .tracker-heading > div:first-child { display:block; }
  .tracker-heading .eyebrow { display:block;margin-bottom:3px; }
  .standings-expand-toggle { width:28px;height:28px;flex-basis:28px; }
}

/* Version 12.12: administrator control panel */
.settings-grid.settings-grid-single {
  grid-template-columns:minmax(0,960px);
  justify-content:start;
}
.control-panel-button {
  display:grid;
  border-color:var(--border);
  background:#111720;
}
.control-panel-button:hover,
.control-panel-button.active {
  color:#fff;
  border-color:#6841a7;
  background:rgba(139,70,246,.16);
}
.control-panel-button svg { width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round; }
.control-panel-backdrop {
  position:fixed;inset:0;z-index:89;background:rgba(0,0,0,.66);backdrop-filter:blur(3px);
  animation:controlPanelFade .18s ease both;
}
.control-panel-drawer {
  position:fixed;top:0;right:0;bottom:0;z-index:90;width:min(470px,94vw);
  display:flex;flex-direction:column;background:#0d1219;border-left:1px solid #303949;
  box-shadow:-25px 0 70px rgba(0,0,0,.52);animation:controlPanelSlide .22s ease both;
}
.control-panel-head {
  min-height:78px;padding:18px 20px;display:flex;align-items:center;justify-content:space-between;gap:16px;
  border-bottom:1px solid var(--border);background:linear-gradient(135deg,rgba(139,70,246,.13),rgba(13,18,25,.96) 55%);
}
.control-panel-head h2 { margin:3px 0 0;font-size:24px;letter-spacing:-.025em; }
.control-panel-head .close { flex:none; }
.control-panel-body { flex:1;overflow:auto;padding:16px;display:flex;flex-direction:column;gap:14px; }
.control-panel-section {
  border:1px solid var(--border);border-radius:12px;background:linear-gradient(180deg,#151c26,#10161e);overflow:hidden;
}
.control-panel-section-head {
  min-height:49px;padding:13px 14px;display:flex;align-items:center;justify-content:space-between;gap:12px;
  border-bottom:1px solid var(--border-soft);
}
.control-panel-section-head>span { font-size:14px;font-weight:900; }
.control-panel-section-head small { color:var(--muted);font-size:10px;text-align:right; }
.control-panel-nav-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:11px; }
.control-panel-nav-grid .nav-btn {
  width:100%;min-height:43px;justify-content:flex-start;border:1px solid #293342;background:#111821;color:#c3ccd8;
}
.control-panel-nav-grid .nav-btn:hover { border-color:#465368;background:#18212d;color:#fff; }
.control-panel-nav-grid .nav-btn.active { color:#c18cff;border-color:rgba(139,70,246,.55);background:rgba(139,70,246,.14); }
.control-panel-action-grid { display:grid;gap:8px;padding:12px; }
.control-panel-action-grid .btn { width:100%;min-height:42px; }
.control-status-list { padding:5px 13px 9px; }
.control-status-row {
  display:grid;grid-template-columns:25px minmax(0,1fr) auto;align-items:center;gap:9px;padding:10px 0;
  border-bottom:1px solid var(--border-soft);font-size:12px;
}
.control-status-row:last-child { border-bottom:0; }
.control-status-row .status-check {
  width:21px;height:21px;border-radius:50%;display:grid;place-items:center;background:#4b3a10;color:#ffcf32;font-weight:950;
}
.control-status-row>b { color:var(--green);text-align:right; }
.control-status-row>b.warning { color:var(--yellow); }
.control-status-row.metric { grid-template-columns:minmax(0,1fr) auto;padding-left:30px; }
.control-status-row.metric>b { max-width:230px;color:#fff;overflow-wrap:anywhere; }
.control-storage-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:12px; }
.control-storage-grid>div { padding:12px;border:1px solid #293343;border-radius:9px;background:#111821; }
.control-storage-grid span { display:block;color:#91a0b5;font-size:10px;font-weight:850; }
.control-storage-grid strong { display:block;margin-top:5px;font-size:21px; }
@keyframes controlPanelFade { from{opacity:0} to{opacity:1} }
@keyframes controlPanelSlide { from{transform:translateX(28px);opacity:.6} to{transform:translateX(0);opacity:1} }
@media (max-width:720px) {
  .control-panel-drawer { width:100%; }
  .control-panel-head { min-height:70px;padding:15px 16px; }
  .control-panel-body { padding:12px; }
  .control-panel-nav-grid { grid-template-columns:1fr 1fr; }
  .settings-grid.settings-grid-single { grid-template-columns:1fr; }
}

/* Version 12.13: tabbed race-center results viewer */
.race-center-modal {
  display:flex;
  flex-direction:column;
  overflow:hidden;
  height:min(94vh,980px);
}
.race-center-modal .modal-head,
.race-center-modal .modal-foot { flex:0 0 auto; }
.race-center-modal .modal-body {
  flex:1 1 auto;
  min-height:0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  padding:16px 18px 18px;
}
.race-center-modal .race-summary-strip { flex:0 0 auto;margin-bottom:14px; }
.race-center-tabs {
  flex:0 0 auto;
  display:flex;
  gap:7px;
  overflow-x:auto;
  padding:2px 0 12px;
  border-bottom:1px solid var(--border);
  scrollbar-width:thin;
}
.race-center-tab {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:38px;
  padding:8px 14px;
  border:1px solid #303a49;
  border-radius:9px;
  background:#0f151d;
  color:#b9c4d4;
  font:inherit;
  font-size:12px;
  font-weight:850;
  white-space:nowrap;
  cursor:pointer;
  transition:border-color .16s ease,background .16s ease,color .16s ease,transform .16s ease;
}
.race-center-tab:hover { border-color:#6540a5;color:#fff;transform:translateY(-1px); }
.race-center-tab.active {
  border-color:#9555ff;
  background:linear-gradient(135deg,#8b46f6,#7330dc);
  color:#fff;
  box-shadow:0 8px 22px rgba(126,60,231,.22);
}
.race-center-tab small {
  min-width:20px;
  height:20px;
  padding:0 6px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:#202936;
  color:#d4dbe6;
  font-size:10px;
}
.race-center-tab.active small { background:rgba(0,0,0,.22);color:#fff; }
.race-center-tab-content {
  flex:1 1 auto;
  min-height:0;
  overflow:hidden;
  padding-top:14px;
}
.race-center-tab-panel {
  height:100%;
  min-height:0;
  display:flex;
  flex-direction:column;
}
.race-center-tab-panel .section-title-row { flex:0 0 auto;margin-bottom:12px; }
.race-center-tab-panel .section-title-row h3 { margin:4px 0 0;font-size:21px; }
.race-center-tab-table {
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  border-radius:10px;
}
.race-center-tab-table table { min-width:980px; }
.race-center-tab-table.compact table { min-width:680px; }
.race-center-tab-table th { top:0;z-index:2; }
.race-center-tab-table td,
.race-center-tab-table th { padding:11px 13px; }
.race-center-points-chip {
  display:inline-grid;
  place-items:center;
  min-width:36px;
  min-height:27px;
  padding:3px 9px;
  border:1px solid #4d596b;
  border-radius:8px;
  background:#1a2330;
  color:#fff;
  font-weight:900;
}
.race-center-points-chip.stage { border-color:#6845a6;background:#261b3d;color:#d9c3ff; }
.race-center-points-chip.bonus { border-color:#8a6b16;background:#2a2411;color:#ffd34f; }
.race-center-total-points { font-size:15px;color:#fff; }
.race-center-empty {
  height:100%;
  min-height:320px;
  display:grid;
  place-content:center;
  justify-items:center;
  text-align:center;
  padding:38px;
  border:1px dashed #354052;
  border-radius:12px;
  background:#0f151d;
  color:var(--muted);
}
.race-center-empty-icon { width:52px;height:52px;border-radius:13px;display:grid;place-items:center;background:#21183a;color:#a96cff;font-size:24px;margin-bottom:12px; }
.race-center-empty h3 { margin:0 0 7px;color:#fff;font-size:19px; }
.race-center-empty p { margin:0;max-width:520px; }
.bonus-summary-grid {
  flex:0 0 auto;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-bottom:16px;
}
.bonus-summary-grid > div {
  min-width:0;
  padding:13px 14px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#10161e;
}
.bonus-summary-grid strong { display:block;margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.bonus-summary-grid small { display:block;margin-top:5px;color:var(--muted); }
.bonus-table-title { margin-top:0; }
.bonus-table table { min-width:1000px; }
.race-center-tab-note { flex:0 0 auto;margin:10px 2px 0;color:var(--muted);font-size:11px; }

@media (max-width:900px) {
  .race-center-modal { height:96vh;max-height:96vh; }
  .race-center-modal .modal-body { padding:13px; }
  .bonus-summary-grid { grid-template-columns:1fr; }
  .bonus-summary-grid strong { white-space:normal; }
}

/* Version 12.14: live standings points and race-to-race position movement */
.standings-movement {
  width:28px;
  min-width:28px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:11px;
  font-weight:950;
  line-height:1;
  letter-spacing:.01em;
}
.standings-movement.move-up { color:#28dc7f; }
.standings-movement.move-down { color:#f04f57; }
.standings-movement.movement-empty { visibility:hidden; }
.standings-table .driver-cell { gap:9px; }

/* Version 12.15: series-specific driver editing and number cards */
.roster-list.with-edit .roster-row {
  grid-template-columns:58px minmax(190px,1.25fr) minmax(190px,1.35fr) repeat(5,minmax(54px,.52fr)) 42px;
}
.roster-name { flex-wrap:wrap; }
.roster-name > small {
  flex-basis:100%;
  color:var(--muted);
  font-size:10px;
  font-weight:650;
  margin-top:-3px;
}
.roster-team { display:flex;align-items:center;gap:8px;min-width:0; }
.roster-team > span:first-child { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.team-owner-mark { color:#f4cb38;font-size:14px; }
.driver-number-card {
  width:50px;height:36px;border-radius:8px;display:grid;place-items:center;overflow:hidden;
  border:1px solid #344052;background:#0c1118;box-shadow:inset 0 0 0 1px rgba(255,255,255,.025);
}
.driver-number-card.compact { width:50px;height:36px; }
.driver-number-card img { width:100%;height:100%;object-fit:contain;display:block; }
.roster-edit-cell { display:grid;place-items:center; }
.roster-edit-button {
  width:34px;height:34px;border-radius:9px;border:1px solid #3b4657;background:#171e28;color:#d8e0ec;
  display:grid;place-items:center;font-size:16px;font-weight:900;cursor:pointer;transition:.16s ease;
}
.roster-edit-button:hover { border-color:#9d62ff;background:#251b39;color:#fff;transform:translateY(-1px); }
.driver-edit-intro {
  display:grid;grid-template-columns:auto 1fr;align-items:center;gap:13px;margin-bottom:18px;padding:13px;
  border:1px solid var(--border);border-radius:11px;background:#10161f;
}
.driver-edit-intro > div:last-child { display:flex;flex-direction:column;gap:4px; }
.driver-edit-intro b { font-size:14px; }
.driver-edit-intro span { color:var(--muted);font-size:11px;line-height:1.45; }
.driver-edit-grid { gap:14px; }
.manufacturer-choice-grid { display:flex;flex-wrap:wrap;gap:8px; }
.manufacturer-choice {
  position:relative;min-height:43px;display:inline-flex;align-items:center;gap:8px;padding:7px 11px;
  border:1px solid #344052;border-radius:10px;background:#121922;color:#e8edf5;cursor:pointer;transition:.15s ease;
}
.manufacturer-choice:hover { border-color:#65748a;background:#17202c; }
.manufacturer-choice:has(input:checked),.manufacturer-choice.selected:has(input:checked) {
  border-color:#9452f4;background:rgba(139,70,246,.13);box-shadow:0 0 0 2px rgba(139,70,246,.1);
}
.manufacturer-choice input { position:absolute;opacity:0;pointer-events:none; }
.manufacturer-choice-visual { width:52px;height:25px;display:grid;place-items:center; }
.manufacturer-choice-visual img { max-width:52px;max-height:24px;object-fit:contain; }
.manufacturer-none-mark { width:28px;height:22px;border-radius:6px;display:grid;place-items:center;background:#222b38;color:#8995a8; }
.manufacturer-choice b { font-size:12px; }
.owner-checkbox {
  display:grid!important;grid-template-columns:auto 1fr;column-gap:9px;align-items:center;padding:12px 13px;
  border:1px solid #344052;border-radius:10px;background:#10161f;cursor:pointer;
}
.owner-checkbox input { width:auto!important;grid-row:1 / span 2;accent-color:#8b46f6; }
.owner-checkbox span { font-weight:850; }
.owner-checkbox small { color:var(--muted);font-size:10px;font-weight:500; }
.driver-number-upload {
  display:grid;grid-template-columns:78px 1fr auto;align-items:center;gap:13px;padding:12px;
  border:1px dashed #46536a;border-radius:11px;background:#10161f;cursor:pointer;transition:.16s ease;
}
.driver-number-upload:hover { border-color:#9452f4;background:#151c27; }
.driver-number-upload > input { position:absolute;opacity:0;pointer-events:none; }
.driver-number-upload-preview {
  width:78px;height:48px;border-radius:8px;border:1px solid #354154;background:#0b1017;display:grid;place-items:center;overflow:hidden;
}
.driver-number-upload-preview img { width:100%;height:100%;object-fit:contain; }
.driver-number-upload-preview strong { font-size:19px;font-style:italic; }
.driver-number-upload > span:nth-of-type(2) { display:flex;flex-direction:column;gap:3px; }
.driver-number-upload b { font-size:12px; }
.driver-number-upload small { color:var(--muted);font-size:10px;line-height:1.4; }
.driver-number-upload-icon { width:34px;height:34px;border-radius:9px;display:grid;place-items:center;background:#211735;color:#b780ff;font-size:18px; }
.remove-number-card { margin-top:8px;display:flex!important;align-items:center;gap:7px;color:#ff9aa0!important;font-size:11px;cursor:pointer; }
.remove-number-card input { width:auto!important;accent-color:#d94853; }
.profile-photo.has-number-card { border-radius:13px;width:82px;background:#0b1017;padding:4px; }
.profile-photo.has-number-card img { width:100%;height:100%;object-fit:contain;border-radius:9px; }
@media (max-width:1100px) {
  .roster-list.with-edit .roster-row { grid-template-columns:50px minmax(170px,1.3fr) minmax(150px,1fr) repeat(3,.52fr) 42px; }
  .roster-list.with-edit .roster-row > :nth-child(6),
  .roster-list.with-edit .roster-row > :nth-child(7) { display:none; }
  .roster-list.with-edit .roster-row > :nth-child(9) { display:grid; }
}
@media (max-width:780px) {
  .roster-list.with-edit .roster-row { grid-template-columns:48px minmax(155px,1.5fr) minmax(120px,1fr) 52px 40px; }
  .roster-list.with-edit .roster-row > :nth-child(n+5) { display:none; }
  .roster-list.with-edit .roster-row > :nth-child(9) { display:grid; }
  .driver-number-upload { grid-template-columns:64px 1fr auto; }
  .driver-number-upload-preview { width:64px;height:42px; }
}
@media (max-width:520px) {
  .roster-list.with-edit .roster-row { grid-template-columns:44px minmax(150px,1fr) 38px; }
  .roster-list.with-edit .roster-row > :nth-child(3),
  .roster-list.with-edit .roster-row > :nth-child(4) { display:none; }
  .roster-list.with-edit .roster-row > :nth-child(9) { display:grid; }
  .manufacturer-choice-grid { display:grid;grid-template-columns:1fr 1fr; }
  .manufacturer-choice { min-width:0;padding:7px; }
  .driver-number-upload { grid-template-columns:58px 1fr; }
  .driver-number-upload-preview { width:58px;height:40px; }
  .driver-number-upload-icon { display:none; }
}

/* Version 12.16: full-time championship eligibility */
.type-chip.part-time { background:#2b1745;color:#c997ff;border:1px solid #6f3eaa; }
.driver-type-choice-grid { display:grid;grid-template-columns:1fr 1fr;gap:10px; }
.driver-type-choice {
  position:relative;display:grid;grid-template-columns:1fr auto;align-items:center;gap:12px;min-height:68px;padding:12px 13px;
  border:1px solid #344052;border-radius:11px;background:#10161f;cursor:pointer;transition:.16s ease;
}
.driver-type-choice:hover { border-color:#66758c;background:#151d28; }
.driver-type-choice:has(input:checked),.driver-type-choice.selected:has(input:checked) { border-color:#9452f4;background:rgba(139,70,246,.13);box-shadow:0 0 0 2px rgba(139,70,246,.1); }
.driver-type-choice input { position:absolute;opacity:0;pointer-events:none; }
.driver-type-choice > span:first-of-type { display:flex;flex-direction:column;gap:4px; }
.driver-type-choice b { font-size:13px; }
.driver-type-choice small { color:var(--muted);font-size:10px;line-height:1.4; }
.ineligible-chip { padding:3px 6px;border:1px solid #6e516f;border-radius:999px;background:#2a1b2c;color:#d7a5dc;font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.03em; }
.championship-ineligible td { background:rgba(110,81,111,.035); }
.standings-cutoff-divider td { padding:0!important;border-top:0!important;background:#10151d!important; }
.standings-cutoff-divider span { display:flex;align-items:center;gap:10px;padding:5px 13px;color:#ef5a61;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.04em; }
.standings-cutoff-divider span::before,.standings-cutoff-divider span::after { content:"";height:1px;flex:1;background:repeating-linear-gradient(90deg,#7b2b31 0 7px,transparent 7px 12px); }
@media (max-width:680px) { .driver-type-choice-grid { grid-template-columns:1fr; } }

/* Version 12.17: schedule import, postseason banners, and live countdowns */
.winner strong[data-race-countdown] { font-variant-numeric:tabular-nums; letter-spacing:.02em; }
.postseason-race-banner { border-color:#3b4657; box-shadow:0 0 0 1px rgba(0,0,0,.18); }


/* Version 12.21: editable track library */
.track-manager-intro { display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:16px;padding:15px;border:1px solid var(--border);border-radius:12px;background:#101720; }
.track-manager-intro p { margin:5px 0 0;color:var(--muted);font-size:12px;line-height:1.5; }
.track-manager-list { display:flex;flex-direction:column;gap:10px; }
.track-manager-row { display:grid;grid-template-columns:124px minmax(0,1fr) auto;gap:14px;align-items:center;padding:12px;border:1px solid var(--border);border-radius:12px;background:#10161f; }
.track-manager-row:hover { border-color:#3c485a;background:#131b26; }
.track-manager-image { width:124px;height:70px;border:1px solid #354052;border-radius:9px;overflow:hidden;background:#0c1118;display:grid;place-items:center;color:#768398;font-size:22px; }
.track-manager-image img { width:100%;height:100%;object-fit:cover; }
.track-manager-copy { min-width:0;display:grid;gap:4px; }
.track-manager-copy strong { font-size:14px;color:#f4f7fb; }
.track-manager-copy span,.track-manager-copy small { color:var(--muted);font-size:11px;line-height:1.4; }
.track-manager-copy small { white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.track-manager-actions { display:flex;gap:7px;align-items:center; }
.track-edit-banner { min-height:110px;margin-top:10px;border:1px solid #394557;border-radius:10px;background-position:center;background-size:cover;display:flex;align-items:flex-end;padding:12px;color:#fff;font-weight:800;text-shadow:0 2px 8px #000; }
.compact-empty { padding:35px 20px; }
@media (max-width:760px) {
  .track-manager-intro { align-items:stretch;flex-direction:column; }
  .track-manager-row { grid-template-columns:84px minmax(0,1fr); }
  .track-manager-image { width:84px;height:58px; }
  .track-manager-actions { grid-column:1/-1;justify-content:flex-end; }
}
@media (max-width:520px) {
  .track-picker-actions { gap:5px; }
  .track-add-button,.track-edit-button { width:40px; }
}

/* Version 12.23: square number cards, NASCAR-inspired roster, and result identities */
.driver-number-card {
  width:58px;
  height:58px;
  aspect-ratio:1;
  flex:0 0 auto;
  border-radius:12px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border:1px solid #354154;
  background:#0b1017;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.03);
}
.driver-number-card.table { width:42px;height:42px;border-radius:10px; }
.driver-number-card.recent { width:36px;height:36px;border-radius:9px; }
.driver-number-card.roster { width:118px;height:118px;border-radius:16px;border-color:#3b475a;background:#080d13; }
.driver-number-card img { width:100%;height:100%;object-fit:contain;display:block;padding:3px; }
.driver-number-card.table img,
.driver-number-card.recent img {
  padding:0;
  object-fit:cover;
  border-radius:inherit;
}
.driver-number-card.roster img {
  padding:0;
  object-fit:cover;
  border-radius:inherit;
}
.driver-number-card.fallback {
  background:linear-gradient(145deg,#252f3f,#121821);
  color:#fff;
  font-size:18px;
  font-style:italic;
  font-weight:950;
}
.driver-number-card.roster.fallback { font-size:36px; }

.standings-driver-row td { padding-top:9px;padding-bottom:9px; }
.standings-table .driver-cell { min-height:44px; }
.result-driver-cell { display:flex;align-items:center;gap:11px;min-width:210px; }
.result-driver-cell > div { min-width:0; }
.result-driver-cell b { display:inline-block;max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle; }
.race-center-tab-table td { height:60px; }
.race-center-tab-table td:first-child { width:62px; }
.race-center-tab-table .manufacturer-logo { max-height:22px; }
.recent-result-row { grid-template-columns:28px 36px minmax(0,1fr) auto;min-height:55px; }

.roster-driver-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(390px,1fr));
  gap:16px;
  align-items:stretch;
}
.roster-driver-card {
  position:relative;
  min-width:0;
  min-height:190px;
  display:grid;
  grid-template-columns:126px minmax(0,1fr);
  gap:16px;
  padding:16px;
  border:1px solid #2f3948;
  border-radius:15px;
  background:linear-gradient(145deg,#131a24 0%,#0e141c 100%);
  box-shadow:0 9px 26px rgba(0,0,0,.14);
  cursor:pointer;
  overflow:hidden;
  transition:transform .17s ease,border-color .17s ease,background .17s ease;
}
.roster-driver-card::before {
  content:"";
  position:absolute;
  left:0;right:0;top:0;
  height:3px;
  background:var(--roster-accent,#8b46f6);
  opacity:.9;
}
.roster-driver-card:hover { transform:translateY(-2px);border-color:#526075;background:linear-gradient(145deg,#17202c,#111821); }
.roster-card-number { display:grid;place-items:center;align-self:center; }
.roster-card-body { min-width:0;display:flex;flex-direction:column;gap:10px; }
.roster-card-heading { display:flex;align-items:flex-start;justify-content:space-between;gap:10px;min-width:0; }
.roster-card-heading > div { min-width:0; }
.roster-card-heading h2 { margin:0;color:#fff;font-size:20px;line-height:1.08;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.roster-card-heading p { margin:5px 0 0;color:#8996a9;font-size:10px;font-weight:750; }
.roster-card-team { display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap; }
.roster-card-team > span { color:#7f8da1;font-size:9px;font-weight:900;letter-spacing:.1em;text-transform:uppercase; }
.roster-card-team > strong { max-width:100%;color:#e8edf5;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.roster-owner-badge {
  display:inline-flex;align-items:center;gap:4px;
  padding:4px 7px;border:1px solid rgba(255,202,43,.42);border-radius:7px;
  background:rgba(255,202,43,.08);color:#ffd24a;font-size:9px;text-transform:uppercase;letter-spacing:.04em;
}
.roster-card-tags { display:flex;align-items:center;gap:7px;flex-wrap:wrap; }
.roster-info-chip {
  min-height:31px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:5px 9px;
  border:1px solid #344052;
  border-radius:8px;
  background:#111821;
  color:#e8edf5;
}
.roster-info-chip.type-chip { font-size:10px; }
.roster-info-chip.manufacturer-chip { min-width:72px; }
.roster-info-chip .manufacturer-logo { max-width:70px;max-height:21px; }
.roster-card-stats {
  margin-top:auto;
  display:grid;
  grid-template-columns:repeat(5,minmax(46px,1fr));
  gap:6px;
}
.roster-card-stats > div {
  min-width:0;
  padding:7px 5px;
  border:1px solid #2e3948;
  border-radius:8px;
  background:#0d131b;
  text-align:center;
}
.roster-card-stats span { display:block;color:#7f8da1;font-size:8px;font-weight:900;letter-spacing:.06em;text-transform:uppercase;white-space:nowrap; }
.roster-card-stats b { display:block;margin-top:4px;color:#f4f6fa;font-size:13px; }
.roster-card-stats .points { border-color:rgba(139,70,246,.42);background:rgba(139,70,246,.08); }
.roster-card-stats .points b { color:#c99aff; }
.roster-driver-card .roster-edit-button { flex:0 0 auto; }

@media (max-width:900px) {
  .roster-driver-grid { grid-template-columns:repeat(auto-fit,minmax(340px,1fr)); }
  .roster-driver-card { grid-template-columns:106px minmax(0,1fr);min-height:176px;padding:14px; }
  .driver-number-card.roster { width:100px;height:100px; }
}
@media (max-width:600px) {
  .roster-driver-grid { grid-template-columns:1fr; }
  .roster-driver-card { grid-template-columns:88px minmax(0,1fr);gap:12px;min-height:166px;padding:13px; }
  .driver-number-card.roster { width:82px;height:82px;border-radius:13px; }
  .roster-card-heading h2 { font-size:17px; }
  .roster-card-stats { grid-template-columns:repeat(3,1fr); }
  .roster-card-stats > div:nth-child(4) { display:none; }
  .result-driver-cell { min-width:180px; }
}

/* Version 12.25: streamlined NASCAR-inspired roster cards */
.roster-driver-card {
  min-height:166px;
  grid-template-columns:126px minmax(0,1fr);
  align-items:center;
}
.roster-card-body {
  gap:9px;
  justify-content:center;
}
.roster-card-heading p {
  margin-top:5px;
  font-size:10px;
  color:#8996a9;
}
.roster-card-team {
  gap:6px;
  min-height:22px;
}
.roster-card-team > strong {
  font-size:12px;
  color:#e8edf5;
}
.roster-owner-crown {
  display:inline-grid;
  place-items:center;
  width:23px;
  height:23px;
  color:#ffd24a;
  font-size:14px;
  line-height:1;
}
.roster-card-footer {
  margin-top:4px;
  display:flex;
  align-items:center;
  gap:10px;
  min-height:38px;
  flex-wrap:wrap;
}
.roster-card-manufacturer {
  min-width:80px;
  min-height:34px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
}
.roster-card-manufacturer .manufacturer {
  padding:0;
  border:0;
  background:transparent;
}
.roster-card-manufacturer .manufacturer-logo {
  width:auto;
  height:30px;
  max-width:104px;
  max-height:30px;
  object-fit:contain;
}
.roster-card-manufacturer .manufacturer-fallback {
  color:#b9c3d2;
  font-size:10px;
}
.roster-card-footer .roster-info-chip.type-chip {
  min-width:38px;
  min-height:31px;
  padding:5px 9px;
  flex:0 0 auto;
}
.roster-win-badge {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  min-width:38px;
  height:34px;
  padding:0 9px;
  border:1px solid rgba(255,202,43,.4);
  border-radius:9px;
  background:rgba(255,202,43,.08);
  color:#ffd24a;
  font-size:16px;
  line-height:1;
}
.roster-win-badge b {
  color:#ffe47b;
  font-size:11px;
  letter-spacing:.02em;
}
.roster-card-stats,
.roster-owner-badge,
.roster-info-chip.manufacturer-chip {
  display:none !important;
}
@media (max-width:900px) {
  .roster-driver-card { min-height:158px; }
  .roster-card-manufacturer .manufacturer-logo { height:27px;max-height:27px;max-width:94px; }
}
@media (max-width:600px) {
  .roster-driver-card { min-height:148px; }
  .roster-card-footer { gap:8px; }
  .roster-card-manufacturer { min-width:68px; }
  .roster-card-manufacturer .manufacturer-logo { height:24px;max-height:24px;max-width:82px; }
}

/* Version 12.26: driver type beside name and wins anchored bottom-right */
.roster-driver-name-line {
  min-width:0;
  display:flex;
  align-items:center;
  gap:8px;
}
.roster-driver-name-line h2 {
  min-width:0;
  flex:0 1 auto;
}
.roster-driver-name-line .roster-info-chip.type-chip {
  flex:0 0 auto;
  min-width:34px;
  min-height:27px;
  padding:4px 8px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:10px;
}
.roster-card-footer {
  padding-right:54px;
}
.roster-win-badge {
  position:absolute;
  right:16px;
  bottom:16px;
  z-index:2;
}
@media (max-width:600px) {
  .roster-driver-name-line { gap:6px; }
  .roster-driver-name-line .roster-info-chip.type-chip {
    min-width:31px;
    min-height:25px;
    padding:3px 7px;
  }
  .roster-card-footer { padding-right:48px; }
  .roster-win-badge { right:13px;bottom:13px; }
}

/* Version 12.27: clearer roster team and owner indicators */
.roster-card-team {
  gap:9px;
  min-height:28px;
}
.roster-card-team > strong {
  font-size:15px;
  line-height:1.2;
  font-weight:850;
  color:#f2f5fa;
}
.roster-owner-crown {
  width:29px;
  height:29px;
  color:#ffd12f;
  font-size:20px;
  filter:drop-shadow(0 0 5px rgba(255,193,7,.35));
}
@media (max-width:600px) {
  .roster-card-team > strong { font-size:14px; }
  .roster-owner-crown { width:27px;height:27px;font-size:18px; }
}

/* Version 12.29: share-ready standings PNG controls */
.standings-graphic-tools {
  margin-top:18px;
  padding:20px 22px;
  border:1px solid var(--border);
  border-radius:14px;
  background:linear-gradient(135deg,#131a24 0%,#0d131b 100%);
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:20px;
}
.standings-graphic-copy h3 { margin:4px 0 5px;font-size:18px; }
.standings-graphic-copy p { margin:0;color:var(--muted);font-size:12px;line-height:1.5; }
.standings-graphic-actions { display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap; }
.standings-graphic-actions .btn { min-height:42px;white-space:nowrap; }
.standings-graphic-actions .cutline-download {
  border-color:#6e5720;
  background:linear-gradient(180deg,#2b2513,#18150d);
  color:#ffd55a;
}
.standings-graphic-actions .cutline-download:hover { border-color:#c79b20;background:#332a12; }
.standings-graphic-note { grid-column:1/-1;color:#8f9bad;font-size:11px; }
@media (max-width:760px) {
  .standings-graphic-tools { grid-template-columns:1fr;align-items:stretch; }
  .standings-graphic-actions { justify-content:stretch; }
  .standings-graphic-actions .btn { flex:1 1 220px; }
}

/* Substitute driver points split */
.substitute-editor-row td {
  background:linear-gradient(90deg,rgba(139,70,246,.105),rgba(17,24,33,.98));
  border-top-color:rgba(169,111,255,.24);
  border-bottom-color:rgba(169,111,255,.24);
}
.substitute-editor-row:hover td { background:linear-gradient(90deg,rgba(139,70,246,.15),#151d28); }
.substitute-editor-cell { min-width:230px; }
.substitute-control { display:flex;align-items:center;gap:7px;min-width:220px; }
.substitute-toggle {
  min-width:62px;height:32px;padding:0 10px;border:1px solid #3b4657;border-radius:8px;
  background:#111821;color:#aeb9ca;font:850 11px/1 inherit;white-space:nowrap;cursor:pointer;
}
.substitute-toggle:hover,.substitute-toggle:focus-visible { border-color:#9a5af2;color:#fff;outline:none; }
.substitute-toggle.active { border-color:#9a5af2;background:rgba(139,70,246,.16);color:#d7b3ff; }
.substitute-control input {
  width:145px;min-width:145px;height:32px;padding:6px 9px;border:1px solid #543b77;border-radius:8px;
  background:#0d131c;color:#f4efff;font-size:11px;font-weight:750;
}
.substitute-control input:focus { border-color:#aa68ff;box-shadow:0 0 0 2px rgba(139,70,246,.15);outline:none; }
.race-import-table table { min-width:1540px; }

.substitute-result-row td { background:rgba(139,70,246,.10) !important; }
.substitute-result-row:hover td { background:rgba(139,70,246,.16) !important; }
.substitute-beneficiary-row td { background:rgba(38,181,121,.085) !important; }
.substitute-beneficiary-row:hover td { background:rgba(38,181,121,.13) !important; }
.substitute-status-chip {
  display:inline-flex;align-items:center;max-width:230px;margin-top:4px;padding:3px 7px;border:1px solid rgba(174,105,255,.5);
  border-radius:999px;background:rgba(139,70,246,.14);color:#c996ff;font-size:8px;font-weight:950;letter-spacing:.05em;
  text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.substitute-status-chip.beneficiary { border-color:rgba(49,211,139,.46);background:rgba(35,166,108,.12);color:#58e7a4; }
.result-driver-cell .substitute-status-chip { display:flex;width:max-content; }

.points-driver-name { display:flex;flex-direction:column;align-items:flex-start;gap:1px; }
.points-split-cell { min-width:128px;text-align:left !important; }
.points-split-cell small { display:block;margin-top:3px;color:#8b98aa;font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:130px; }
.points-split-chip { display:inline-flex;padding:4px 7px;border-radius:7px;font-size:9px;font-weight:900;white-space:nowrap; }
.points-split-chip.substitute { background:rgba(139,70,246,.16);border:1px solid rgba(164,100,250,.46);color:#d2a7ff; }
.points-split-chip.beneficiary { background:rgba(33,170,107,.13);border:1px solid rgba(47,210,136,.43);color:#5ce9a7; }

.race-points-tile { position:relative; }
.race-points-tile.substitute { border-color:rgba(164,95,249,.68);background:rgba(98,42,164,.18);box-shadow:inset 0 0 0 1px rgba(164,95,249,.09); }
.race-points-tile.substitute strong { color:#c892ff; }
.race-points-tile.substitute-beneficiary { border-color:rgba(46,206,133,.62);background:rgba(29,121,82,.16); }
.race-points-tile.substitute-beneficiary strong { color:#55e6a1; }
.race-points-tile em {
  position:absolute;right:3px;top:3px;padding:2px 4px;border-radius:4px;background:#7b3fc2;color:#fff;
  font-size:6px;font-style:normal;font-weight:950;letter-spacing:.04em;
}
.race-points-tile.substitute-beneficiary em { background:#19794f; }

.recent-result-row.substitute-result-row { border-left:3px solid #9d57ef; }
.recent-substitute-label {
  display:inline-flex;margin-left:5px;padding:2px 4px;border-radius:4px;background:rgba(139,70,246,.2);color:#c897ff;
  font-size:7px;font-weight:950;vertical-align:middle;
}

@media(max-width:700px){
  .substitute-control { min-width:190px; }
  .substitute-control input { width:118px;min-width:118px; }
}

/* v12.35 — substitute controls on the final points step */
.points-col-substitute { width:250px; }
.points-substitute-cell { min-width:240px;text-align:left !important;vertical-align:middle; }
.points-substitute-editor { display:flex;flex-direction:column;align-items:flex-start;gap:6px; }
.points-substitute-cell .substitute-control { min-width:220px; }
.points-substitute-cell .substitute-control input { width:145px;min-width:145px; }
.points-substitute-summary { display:flex;flex-direction:column;align-items:flex-start;gap:3px;max-width:220px; }
.points-substitute-summary small { color:#9ba7b8;font-size:9px;line-height:1.25;white-space:normal; }
.points-substitute-summary.beneficiary small { color:#7fcfa9; }
.points-substitute-na { color:#748196;font-size:10px;font-weight:800; }
.points-breakdown-table th:nth-child(3) { text-align:left; }
@media (max-width:1100px) {
  .points-col-substitute { width:220px; }
  .points-substitute-cell { min-width:210px; }
  .points-substitute-cell .substitute-control { min-width:195px; }
  .points-substitute-cell .substitute-control input { width:118px;min-width:118px; }
}

/* Version 12.37: season finale and champion banner */
.season-final-setting {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 250px);
  gap: 20px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(246, 201, 0, .28);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(246, 201, 0, .09), rgba(255, 255, 255, .015));
}
.season-final-setting strong { display: block; margin-top: 4px; font-size: 18px; }
.season-final-setting p { margin: 6px 0 0; color: var(--muted); line-height: 1.45; }
.season-final-setting .field { margin: 0; }
.season-champion-banner {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  margin: 0 0 20px;
  padding: 24px 28px;
  min-height: 146px;
  border: 2px solid var(--champion-accent, #f6c900);
  border-radius: 18px;
  background:
    radial-gradient(circle at 8% 50%, color-mix(in srgb, var(--champion-accent, #f6c900) 28%, transparent), transparent 29%),
    linear-gradient(110deg, color-mix(in srgb, var(--champion-accent, #f6c900) 22%, #111722), #111722 55%, #0c1119);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.season-champion-banner::after {
  content: '';
  position: absolute;
  right: -90px;
  top: -110px;
  width: 360px;
  height: 360px;
  border: 44px solid color-mix(in srgb, var(--champion-accent, #f6c900) 8%, transparent);
  border-radius: 50%;
  pointer-events: none;
}
.season-champion-crown {
  position: relative;
  z-index: 1;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--champion-accent, #f6c900) 72%, white);
  color: var(--champion-accent, #f6c900);
  background: color-mix(in srgb, var(--champion-accent, #f6c900) 14%, #151a22);
  box-shadow: 0 0 28px color-mix(in srgb, var(--champion-accent, #f6c900) 20%, transparent);
}
.season-champion-crown span { font-size: 48px; line-height: 1; transform: translateY(-2px); }
.season-champion-copy { position: relative; z-index: 1; min-width: 0; }
.season-champion-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--champion-accent, #f6c900);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.season-champion-name-line { display: flex; align-items: center; gap: 12px; min-width: 0; }
.season-champion-name-line .driver-number-card { width: 48px; height: 48px; flex: 0 0 48px; }
.season-champion-name-line h2 { margin: 0; font-size: clamp(30px, 4vw, 48px); line-height: 1; }
.season-champion-copy p { margin: 10px 0 0; color: #aeb8c8; font-size: 16px; font-weight: 700; }
.season-champion-copy p span { margin: 0 5px; color: var(--champion-accent, #f6c900); }
.season-champion-final {
  position: relative;
  z-index: 1;
  min-width: 190px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  background: rgba(5, 8, 13, .42);
  text-align: right;
}
.season-champion-final span,
.season-champion-final small { display: block; color: #8e9aad; }
.season-champion-final span { font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.season-champion-final strong { display: block; margin: 4px 0; color: #fff; font-size: 22px; }
.season-champion-final small { max-width: 240px; line-height: 1.35; }
@media (max-width: 820px) {
  .season-final-setting { grid-template-columns: 1fr; }
  .season-champion-banner { grid-template-columns: auto minmax(0, 1fr); padding: 20px; }
  .season-champion-final { grid-column: 1 / -1; text-align: left; }
}
@media (max-width: 540px) {
  .season-champion-banner { grid-template-columns: 1fr; text-align: center; }
  .season-champion-crown { margin: 0 auto; }
  .season-champion-name-line { justify-content: center; }
  .season-champion-final { text-align: center; }
}

/* Version 12.38: sortable standings headers and roster filter controls */
.table-sort-button {
  width:100%;
  display:inline-flex;
  align-items:center;
  justify-content:flex-start;
  gap:7px;
  padding:0;
  border:0;
  background:transparent;
  color:#c1cad7;
  font-size:12px;
  font-weight:850;
  text-align:left;
  white-space:nowrap;
  cursor:pointer;
}
.table-sort-button:hover { color:#fff; }
.table-sort-button.active { color:#cfa8ff; }
.table-sort-arrow {
  min-width:14px;
  color:#6f7d91;
  font-size:12px;
  font-weight:950;
  line-height:1;
  text-align:center;
}
.table-sort-button.active .table-sort-arrow { color:#a867ff; }
.sortable-standings-table th { padding-top:12px;padding-bottom:12px; }
.standings-table.sortable-standings-table { min-width:1480px; }
.standings-position-cell { display:flex;align-items:center;gap:6px;min-width:74px; }
.standings-position-cell .standings-movement { width:26px;min-width:26px; }
.standings-number-column { width:72px; }
.standings-number-column .driver-number-card { margin:0 auto; }
.standings-driver-primary { display:flex;align-items:center;gap:8px;min-width:190px; }
.standings-driver-primary .standings-driver-name { white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.standings-team-column { min-width:150px;max-width:230px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#dfe5ee;font-weight:700; }
.standings-manufacturer-column { min-width:116px; }
.standings-manufacturer-column > div { display:flex;align-items:center;min-height:28px; }
.standings-manufacturer-column .manufacturer-logo { max-width:92px;max-height:25px; }

.roster-filter-panel {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
  padding:14px 16px;
  border:1px solid var(--border);
  border-radius:12px;
  background:linear-gradient(145deg,#141b25,#0f151d);
}
.roster-filter-heading { flex:0 0 auto;min-width:145px; }
.roster-filter-heading .eyebrow { display:block;margin-bottom:4px; }
.roster-filter-heading strong { display:block;color:#f1f4f8;font-size:15px; }
.roster-filter-controls { flex:1;display:flex;align-items:flex-end;justify-content:flex-end;gap:12px;min-width:0; }
.roster-filter-controls .search { max-width:none;min-width:260px; }
.roster-sort-control { min-width:245px;display:flex;flex-direction:column;gap:5px; }
.roster-sort-control > span { color:#8f9caf;font-size:10px;font-weight:900;letter-spacing:.08em;text-transform:uppercase; }
.roster-sort-control select {
  width:100%;
  min-height:40px;
  padding:9px 34px 9px 11px;
  border:1px solid var(--border);
  border-radius:9px;
  background:#10151d;
  color:#fff;
  outline:none;
  cursor:pointer;
}
.roster-sort-control select:focus { border-color:#7440c5;box-shadow:0 0 0 3px rgba(139,70,246,.12); }

@media (max-width:1050px) {
  .roster-filter-panel { align-items:flex-start;flex-direction:column; }
  .roster-filter-controls { width:100%;justify-content:flex-start;flex-wrap:wrap; }
  .roster-filter-controls .search { flex:1 1 320px; }
  .roster-sort-control { flex:1 1 245px; }
}
@media (max-width:650px) {
  .roster-filter-controls { flex-direction:column;align-items:stretch; }
  .roster-filter-controls .search,.roster-sort-control { min-width:100%;width:100%; }
  .roster-filter-controls .btn { width:100%; }
}

/* Version 12.40: full-screen login slideshow and administrator manager */
.auth-shell {
  position:relative;
  display:block;
  min-height:100svh;
  overflow:hidden;
  isolation:isolate;
  background:#080b10;
}
.auth-slideshow {
  position:absolute;
  inset:0;
  z-index:0;
  overflow:hidden;
  background:#080b10;
}
.auth-slide {
  position:absolute;
  inset:-2px;
  opacity:0;
  transform:scale(1.025);
  background-position:center;
  background-repeat:no-repeat;
  background-size:cover;
  transition:opacity 1.45s ease,transform 9s ease;
  will-change:opacity,transform;
}
.auth-slide.active { opacity:1;transform:scale(1); }
.auth-slide-fallback {
  background:
    radial-gradient(circle at 18% 18%,rgba(139,70,246,.32),transparent 31%),
    radial-gradient(circle at 80% 78%,rgba(35,112,183,.16),transparent 35%),
    repeating-linear-gradient(118deg,transparent 0 46px,rgba(255,255,255,.018) 46px 48px),
    linear-gradient(145deg,#151c27 0%,#090d13 72%);
}
.auth-background-fade {
  position:absolute;
  inset:0;
  z-index:1;
  pointer-events:none;
  background:
    linear-gradient(90deg,rgba(4,6,9,.26) 0%,rgba(4,6,9,.08) 35%,rgba(5,8,12,.28) 53%,rgba(6,9,14,.78) 68%,rgba(7,10,15,.97) 82%,#080b10 100%),
    linear-gradient(180deg,rgba(0,0,0,.18) 0%,rgba(0,0,0,.06) 52%,rgba(0,0,0,.48) 100%);
  box-shadow:inset 0 0 180px rgba(0,0,0,.48);
}
.auth-brand-floating {
  position:absolute;
  top:clamp(28px,4vw,68px);
  left:clamp(28px,4.2vw,76px);
  z-index:3;
  margin:0;
  filter:drop-shadow(0 4px 18px rgba(0,0,0,.55));
}
.auth-brand-floating.auth-brand-top { display:flex; }
.auth-brand-floating img { width:96px;height:44px; }
.auth-brand-floating span { color:#f3f5f9;border-left-color:rgba(255,255,255,.38);text-shadow:0 2px 8px rgba(0,0,0,.8); }
.auth-form-panel {
  position:relative;
  z-index:2;
  min-height:100svh;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  padding:clamp(28px,5vw,82px) clamp(34px,7.2vw,150px);
  background:transparent;
}
.auth-card {
  width:min(500px,100%);
  max-height:calc(100svh - 64px);
  overflow:auto;
  padding:28px;
  border:1px solid rgba(104,119,141,.42);
  border-radius:18px;
  background:linear-gradient(180deg,rgba(20,27,37,.94),rgba(12,17,24,.95));
  box-shadow:0 34px 100px rgba(0,0,0,.62),0 0 0 1px rgba(255,255,255,.025) inset;
  backdrop-filter:blur(18px) saturate(115%);
  scrollbar-width:thin;
}
.auth-card::-webkit-scrollbar { width:8px; }
.auth-card::-webkit-scrollbar-thumb { background:#354154;border-radius:8px; }
.auth-slide-dots {
  position:absolute;
  z-index:3;
  left:50%;
  bottom:26px;
  display:flex;
  gap:7px;
  transform:translateX(-50%);
  pointer-events:none;
}
.auth-slide-dot {
  width:7px;
  height:7px;
  border-radius:50%;
  background:rgba(255,255,255,.28);
  box-shadow:0 1px 5px rgba(0,0,0,.6);
  transition:width .25s ease,background .25s ease;
}
.auth-slide-dot.active { width:24px;border-radius:10px;background:#fff; }
.auth-mobile-logo { display:none; }

.login-slideshow-panel-body { padding:12px; }
.login-slideshow-panel-body>p { margin:0 0 11px;color:var(--muted);font-size:11px;line-height:1.55; }
.login-slideshow-panel-body>.btn { width:100%;min-height:42px; }
.login-slideshow-manager-list { display:grid;gap:8px;margin-top:12px; }
.login-slideshow-manager-row {
  display:grid;
  grid-template-columns:76px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:8px;
  border:1px solid #293444;
  border-radius:10px;
  background:#101720;
}
.login-slideshow-thumb { width:76px;height:48px;overflow:hidden;border-radius:7px;background:#080b10;border:1px solid #334055; }
.login-slideshow-thumb img { width:100%;height:100%;display:block;object-fit:cover; }
.login-slideshow-info { min-width:0; }
.login-slideshow-info strong { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:#eef2f7; }
.login-slideshow-info span { display:block;margin-top:4px;color:#7f8da2;font-size:10px; }
.login-slideshow-actions { display:flex;align-items:center;gap:4px; }
.login-slideshow-actions .icon-action { width:30px;height:30px;min-width:30px;padding:0; }
.login-slideshow-actions .icon-action.danger { color:#ff7a82;border-color:rgba(229,61,71,.35); }
.login-slideshow-actions .icon-action:disabled { opacity:.25;cursor:not-allowed; }
.login-slideshow-empty { margin-top:12px;padding:14px;border:1px dashed #334054;border-radius:10px;background:#0e141c;text-align:center; }
.login-slideshow-empty strong { display:block;color:#e6ebf2;font-size:12px; }
.login-slideshow-empty span { display:block;margin-top:5px;color:#7e8b9e;font-size:10px;line-height:1.5; }

@media (max-width:900px) {
  .auth-background-fade {
    background:linear-gradient(180deg,rgba(5,8,12,.42),rgba(6,9,14,.76) 42%,rgba(7,10,15,.97) 100%);
    box-shadow:inset 0 0 100px rgba(0,0,0,.48);
  }
  .auth-brand-floating { display:none!important; }
  .auth-form-panel { justify-content:center;padding:24px; }
  .auth-card { width:min(540px,100%);max-height:calc(100svh - 48px); }
  .auth-mobile-logo { display:flex; }
  .auth-slide-dots { bottom:12px; }
}
@media (max-width:560px) {
  .auth-form-panel { align-items:flex-start;padding:14px;padding-top:20px; }
  .auth-card { padding:20px;border-radius:14px;max-height:calc(100svh - 34px); }
  .auth-form-grid { grid-template-columns:1fr; }
  .auth-form-grid .full { grid-column:auto; }
  .login-slideshow-manager-row { grid-template-columns:62px minmax(0,1fr); }
  .login-slideshow-thumb { width:62px;height:44px; }
  .login-slideshow-actions { grid-column:1/-1;justify-content:flex-end; }
}

/* v12.42 — exhibition race points notice */
.points-edit-note.exhibition-note {
  border-color: rgba(245, 185, 55, .52);
  background: rgba(91, 66, 13, .22);
}
.points-edit-note.exhibition-note .override-dot {
  background: #f5bd3f;
  box-shadow: 0 0 0 4px rgba(245, 189, 63, .12);
}

/* v12.44 — historical driver profiles and roster removal */
.driver-profile-modal { width:min(980px,calc(100vw - 36px)); }
.driver-profile-modal .modal-body { padding:22px; }
.driver-profile-section-head { display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px; }
.career-profile-stats { grid-template-columns:repeat(7,minmax(0,1fr)); }
.driver-history-section { margin-top:24px;padding-top:20px;border-top:1px solid var(--border); }
.driver-history-toolbar { display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:14px; }
.driver-history-toolbar h3 { margin:4px 0 0;font-size:20px; }
.driver-profile-series-filter { display:grid;gap:6px;min-width:280px; }
.driver-profile-series-filter span { color:var(--muted);font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.08em; }
.driver-profile-series-filter select { min-height:42px; }
.driver-history-list { display:grid;gap:12px; }
.driver-history-season { position:relative;overflow:hidden;border:1px solid var(--border);border-left:5px solid var(--profile-series-color,#8b46f6);border-radius:12px;background:linear-gradient(135deg,rgba(255,255,255,.025),rgba(255,255,255,0)),#111821;padding:16px; }
.driver-history-season::after { content:"";position:absolute;inset:0 0 auto auto;width:180px;height:100%;background:linear-gradient(90deg,transparent,color-mix(in srgb,var(--profile-series-color,#8b46f6) 10%,transparent));pointer-events:none; }
.driver-history-season-head { position:relative;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:13px; }
.driver-history-season-head h3 { margin:0;font-size:18px; }
.driver-history-season-head p { margin:4px 0 0;color:var(--muted);font-size:13px; }
.driver-history-status { position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;min-height:28px;padding:0 10px;border:1px solid #435066;border-radius:999px;background:#182130;color:#9eabbf;font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.05em;white-space:nowrap; }
.driver-history-status.active { border-color:rgba(45,211,122,.5);background:rgba(23,95,59,.42);color:#58e59a; }
.driver-history-status.archived { border-color:rgba(144,157,178,.35);color:#b3becd; }
.driver-history-status.removed { border-color:rgba(238,91,103,.42);background:rgba(90,30,37,.34);color:#ff8992; }
.driver-history-stats { position:relative;z-index:1;display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:8px; }
.driver-history-stats .profile-stat { padding:10px 7px; }
.driver-history-stats .profile-stat strong { font-size:18px; }

@media (max-width:900px) {
  .career-profile-stats { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .driver-history-stats { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media (max-width:620px) {
  .driver-history-toolbar { align-items:stretch;flex-direction:column; }
  .driver-profile-series-filter { min-width:0;width:100%; }
  .career-profile-stats,.driver-history-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .driver-history-season-head { align-items:flex-start; }
}
