:root {
    color-scheme: dark;
    --gold: #F0C040;
    --gold-light: #FFD966;
    --gold-dim: #B08020;
    --bg: #0E0E12;
    --bg2: #16161D;
    --bg3: #1E1E28;
    --bg4: #262632;
    --border: rgba(240,192,64,0.20);
    --border2: rgba(255,255,255,0.08);
    --text: #EDEAE2;
    --text2: #A8A49C;
    --text3: #5C5854;
    --red: #FF5252;
    --green: #4ECFA0;
    --blue: #4A9EE8;
    --font-head: 'Syne', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --page-bg: url('../img/body-bg.jpg');
    --page-bg-opacity: 0.07;
    --radius: 6px;
    --radius-lg: 10px;
  }

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    font-size: 15px;
    line-height: 1.6;
    position: relative;
  }

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: var(--page-bg);
    background-size: cover;
    background-position: center 30%;
    opacity: var(--page-bg-opacity);
    pointer-events: none;
    z-index: 0;
    will-change: transform;
    transform: translateY(calc(var(--scroll-y, 0px) * 0.15));
  }

body > * { position: relative; z-index: 1; }

/* ─── HEADER ─── */

header {
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: hidden;
  }

.header-inner {
    position: relative;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
  }

.header-bg-overlay {
    position: absolute;
    inset: 0;
    background-image: url('https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=1400&q=80');
    background-size: cover;
    background-position: center 40%;
    opacity: 0.08;
    pointer-events: none;
  }

.header-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: 72px;
    padding: 0 2rem;
  }

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
  }

.iracing-wordmark {
    height: 26px;
    display: block;
    filter: brightness(0) invert(1);
    opacity: 0.9;
  }

.header-divider-v {
    width: 1px;
    height: 32px;
    background: rgba(201,168,76,0.3);
  }

.header-driver-name {
    font-family: var(--font-head);
    font-size: calc(20px * var(--tx-scale, 1));
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text);
    line-height: 1;
  }

.header-driver-name span { color: var(--tx-accent, var(--gold)); }

.header-driver-sub {
    font-size: calc(11px * var(--tx-scale, 1));
    color: var(--text3);
    letter-spacing: 0.5px;
    margin-top: 3px;
  }

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
  }

.btn {
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 7px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.15s;
    background: transparent;
    color: var(--text2);
    text-transform: uppercase;
  }

.btn:hover { border-color: var(--gold-dim); color: var(--gold-light); background: rgba(201,168,76,0.05); }

.btn-gold {
    background: var(--gold);
    color: #0D0D0F;
    border-color: var(--gold);
    font-weight: 700;
  }

.btn-gold:hover { background: var(--gold-light); border-color: var(--gold-light); color: #0D0D0F; }

.btn-danger { border-color: rgba(226,75,74,0.3); color: var(--red); }

.btn-home { padding: 7px 10px; color: var(--text3); }

.btn-home:hover { color: var(--gold-light); border-color: var(--gold-dim); }

.btn-danger:hover { background: rgba(226,75,74,0.1); border-color: var(--red); }

.btn-sm { font-size: 12px; padding: 4px 10px; }

.btn-icon { padding: 6px 10px; font-size: 16px; }

/* ─── LAYOUT ─── */

.main {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
  }

/* ─── STATS BAR ─── */

.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 2rem;
  }

.stat-card {
    background: var(--bg3);
    border: 1px solid var(--border2);
    border-left: 2px solid var(--gold-dim);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s;
    text-align: center;
  }

.stat-card:hover { border-left-color: var(--gold); }

.stat-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 40%;
    background: linear-gradient(to right, transparent, rgba(201,168,76,0.03));
    pointer-events: none;
  }

.stat-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text2);
    margin-bottom: 8px;
  }

.stat-value {
    font-family: var(--font-head);
    font-size: 30px;
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
    text-align: center;
  }

.stat-sub {
    font-size: 11px;
    color: var(--text3);
    margin-top: 4px;
  }

/* ─── LICENSE CHIPS ─── */

.licenses-section {
    margin-bottom: 2rem;
  }

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
  }

.section-title {
    font-family: var(--font-head);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text3);
  }

.section-line {
    flex: 1;
    height: 1px;
    background: var(--border2);
  }

.licenses-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

.license-chip {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg3);
    border: 1px solid var(--border2);
    border-radius: var(--radius-lg);
    padding: 14px 20px;
    min-width: 200px;
    flex: 1;
    max-width: 280px;
  }

.license-svg-badge { flex-shrink: 0; }

.license-svg-badge svg { display: block; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4)); }

.license-info { min-width: 0; }

.license-class { font-size: 14px; font-weight: 600; color: var(--text2); }

.license-details {
    display: flex;
    gap: 10px;
    margin-top: 4px;
    font-size: 13px;
    color: var(--text3);
  }

.lic-ir { color: var(--gold); font-weight: 700; font-size: 14px; }

/* ─── SEASONS LAYOUT ─── */

.seasons-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
  }

.season-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: sticky;
    top: 80px;
  }

.season-sidebar-title {
    font-family: var(--font-head);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text3);
    padding: 12px 14px 8px;
    border-bottom: 1px solid var(--border2);
  }

.ssb-group {}

.ssb-year-btn {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 14px;
    font-family: var(--font-head);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.1s;
  }

.ssb-year-btn:hover { background: rgba(255,255,255,0.04); }

.ssb-year-btn .ssb-arrow { font-size: 9px; transition: transform 0.2s; }

.ssb-year-btn.open .ssb-arrow { transform: rotate(90deg); }

.ssb-children { display: none; }

.ssb-children.show { display: block; }

.ssb-all-btn, .ssb-season-btn {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 14px 6px 28px;
    font-size: 13px;
    color: var(--text3);
    transition: all 0.1s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

.ssb-all-btn {
    padding: 8px 14px;
    font-family: var(--font-head);
    font-size: 12px;
    font-weight: 700;
    color: var(--text2);
    border-bottom: 1px solid var(--border2);
  }

.ssb-all-btn:hover, .ssb-season-btn:hover { background: rgba(255,255,255,0.04); color: var(--text2); }

.ssb-all-btn.active, .ssb-season-btn.active {
    background: rgba(240,192,64,0.12);
    color: var(--gold);
  }

.seasons-main { flex: 1; min-width: 0; }

.season-filter-bar { display: none; }

/* hidden — replaced by sidebar */

/* ─── SEASONS ─── */

.seasons-section { }

.season-block {
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: var(--radius-lg);
    margin-bottom: 1.25rem;
    overflow: hidden;
    transition: border-color 0.2s;
  }

.season-block:hover { border-color: rgba(240,192,64,0.2); }

.season-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem 1.25rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border2);
    user-select: none;
  }

.season-head:hover { background: rgba(255,255,255,0.02); }

.season-toggle {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--text3);
    transition: transform 0.2s;
    flex-shrink: 0;
  }

.season-toggle.open { transform: rotate(90deg); }

.season-name {
    font-family: var(--font-head);
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    flex: 1;
  }

.season-meta {
    font-size: 12px;
    color: var(--text3);
    display: flex;
    gap: 16px;
  }

.season-meta span { display: flex; align-items: center; gap: 4px; }

.season-body { padding: 1rem 1.25rem; }

/* ─── SERIES ─── */

.series-block {
    background: var(--bg3);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
  }

.series-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    user-select: none;
  }

.series-head:hover { background: rgba(255,255,255,0.02); }

.series-logo {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    object-fit: contain;
    object-position: center;
    background: var(--bg4);
    flex-shrink: 0;
    padding: 5px;
    box-sizing: border-box;
  }

.series-logo-placeholder {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    background: var(--bg4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--text3);
    font-family: var(--font-head);
    font-weight: 700;
    text-align: center;
    flex-shrink: 0;
    border: 1px solid var(--border2);
    box-sizing: border-box;
  }

.series-name {
    font-family: var(--font-head);
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    flex: 1;
  }

.series-toggle { font-size: 10px; color: var(--text3); width: 16px; transition: transform 0.2s; }

.series-toggle.open { transform: rotate(90deg); }

.series-body { padding: 0 1rem 0.75rem; }

/* ─── WEEKS TABLE ─── */

.weeks-table {
    width: 100%;
    table-layout: fixed;   /* same column positions in every series */
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 0.75rem;
  }

.weeks-table th {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text3);
    padding: 6px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border2);
  }

.weeks-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    color: var(--text2);
    vertical-align: middle;
  }

.weeks-table th:nth-child(1) { width: 56px; }
.weeks-table th:nth-child(3) { width: 96px; }
.weeks-table th:nth-child(4) { width: 96px; }
.weeks-table th:nth-child(5) { width: 130px; }
.weeks-table th:nth-child(6) { width: 0; padding: 0; }   /* empty on the public page; admin.css gives it room for buttons */
.weeks-table tr:last-child td { border-bottom: none; }

.weeks-table tr:hover td { background: rgba(255,255,255,0.02); }

.pos-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 13px;
    background: var(--bg4);
    border: 1px solid var(--border2);
  }

.pos-1 { background: rgba(201,168,76,0.2); border-color: var(--gold-dim); color: var(--gold); }

.pos-2 { background: rgba(180,180,180,0.15); border-color: rgba(180,180,180,0.4); color: #CCC; }

.pos-3 { background: rgba(205,127,50,0.15); border-color: rgba(205,127,50,0.4); color: #CD7F32; }

.pts-value { color: var(--gold); font-weight: 600; font-family: var(--font-head); }

.standing-val { color: var(--text); font-weight: 500; }

/* ─── EMPTY STATE ─── */

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text3);
  }

.empty-icon { font-size: 36px; margin-bottom: 1rem; opacity: 0.5; }

.empty-title { font-size: 16px; font-weight: 500; color: var(--text2); margin-bottom: 6px; }

.empty-desc { font-size: 13px; }

/* ─── MODAL ─── */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 200;
    align-items: center;
    justify-content: center;
  }

.modal-overlay.show { display: flex; }

.modal {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 1rem;
  }

.modal-title {
    font-family: var(--font-head);
    font-size: 20px;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 10px;
  }

.modal-close {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text3);
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
  }

.modal-close:hover { color: var(--text); }

.field {
    margin-bottom: 1rem;
  }

.field label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text3);
    margin-bottom: 6px;
  }

.field input, .field select, .field textarea {
    width: 100%;
    background: var(--bg4);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
    padding: 9px 12px;
    outline: none;
    transition: border-color 0.15s;
    color-scheme: dark;
  }

select, .field select {
    background-color: #26263a;
    color: #e8e0d4;
  }

input[type="date"], input[type="time"], select {
    color-scheme: dark;
  }

.field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--gold-dim);
  }

.field select option { background: var(--bg4); }

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border2);
  }

/* ─── LOGO PICKER ─── */

.logo-picker {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 4px;
  }

.logo-option {
    cursor: pointer;
    border: 2px solid var(--border2);
    border-radius: var(--radius);
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: border-color 0.15s;
    background: var(--bg4);
  }

.logo-option:hover { border-color: var(--gold-dim); }

.logo-option.selected { border-color: var(--gold); }

.logo-option img {
    width: 40px;
    height: 40px;
    object-fit: contain;
  }

.logo-option span {
    font-size: 9px;
    color: var(--text3);
    text-align: center;
    line-height: 1.2;
    font-family: var(--font-head);
    font-weight: 600;
    letter-spacing: 0.3px;
  }

/* ─── TOAST ─── */

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg3);
    border: 1px solid var(--gold-dim);
    border-radius: var(--radius);
    padding: 12px 18px;
    font-size: 13px;
    color: var(--gold-light);
    z-index: 300;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.25s;
    pointer-events: none;
  }

.toast.show { transform: translateY(0); opacity: 1; }

/* ─── LOGO PICKER ─── */

.logo-tile {
    cursor: pointer;
    border: 1.5px solid var(--border2);
    border-radius: var(--radius);
    padding: 6px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: border-color 0.15s, background 0.15s;
    background: var(--bg4);
  }

.logo-tile:hover { border-color: var(--gold-dim); background: rgba(201,168,76,0.05); }

.logo-tile.selected { border-color: var(--gold); background: rgba(201,168,76,0.1); }

.logo-tile img { width: 36px; height: 36px; object-fit: contain; }

.logo-tile span { font-size: 8px; color: var(--text3); text-align: center; line-height: 1.2; font-family: var(--font-head); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; width: 100%; }

.logo-cat-btn.active { border-color: var(--gold-dim); color: var(--gold-light); background: rgba(201,168,76,0.08); }

/* ─── PARALLAX HERO ─── */

.hero-banner {
    position: relative;
    height: 180px;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
  }

.hero-bg {
    position: absolute;
    inset: 0;                      /* fixed: the banner no longer scrolls / shifts */
    background-image: url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: 50% 50%;  /* framing chosen in admin → Appearance → Hero background */
  }

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
      105deg,
      rgba(13,13,15,0.96) 0%,
      rgba(13,13,15,0.80) 38%,
      rgba(13,13,15,0.30) 65%,
      rgba(13,13,15,0.55) 100%
    );
  }

.hero-content {
    position: relative;
    z-index: 2;
    padding: 2.5rem 2.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

.hero-season-tag {
    font-family: var(--font-head);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

.hero-season-tag::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 2px;
    background: var(--gold);
  }

.hero-headline {
    font-family: var(--font-head);
    font-size: calc(56px * var(--tx-scale, 1));
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    letter-spacing: -1px;
    margin-bottom: 0;
  }

.hero-headline span { color: var(--tx-accent, var(--gold)); }

.hero-sub {
    font-size: 14px;
    color: var(--text3);
    letter-spacing: 0.3px;
  }

.hero-flags {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 120px;
    z-index: 1;
    display: flex;
    align-items: stretch;
  }

.hero-flag.checkered {
    flex: 1;
    background-image:
      repeating-conic-gradient(rgba(255,255,255,0.04) 0% 25%, transparent 0% 50%);
    background-size: 20px 20px;
    mask-image: linear-gradient(to right, transparent 0%, black 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 100%);
  }

/* ─── SERIES STANDINGS BAR ─── */

.series-standings-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg4);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    padding: 8px 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
  }

.sbar-item {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 4px 12px;
    border-right: 1px solid var(--border2);
    margin: 0;
  }

.sbar-item:last-of-type { border-right: none; }

.sbar-label { font-size: 9px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text3); margin-bottom: 2px; }

.sbar-val { font-family: var(--font-head); font-size: 22px; font-weight: 700; color: var(--gold); line-height: 1; }

.sbar-total {
    font-size: 11px;
    color: var(--text3);
    margin-top: 3px;
    display: block;
    line-height: 1.3;
  }

/* ─── POSITION COLORS ─── */

.pc-p1   { background: rgba(201,168,76,0.25); color: #E8C96A; border: 1px solid rgba(201,168,76,0.5); font-weight:700; }

.pc-p2   { background: rgba(192,192,192,0.2); color: #D0D0D0; border: 1px solid rgba(192,192,192,0.4); font-weight:700; }

.pc-p3   { background: rgba(205,127,50,0.2);  color: #CD9B5A; border: 1px solid rgba(205,127,50,0.4); font-weight:700; }

.pc-top5 { background: rgba(55,138,221,0.15); color: #6AADEE; border: 1px solid rgba(55,138,221,0.3); }

.pc-top10{ background: rgba(93,202,165,0.12); color: #5DCAA5; border: 1px solid rgba(93,202,165,0.25); }

.pc-top15{ background: rgba(150,180,80,0.12); color: #A0BE50; border: 1px solid rgba(150,180,80,0.25); }

.pc-back { background: rgba(255,255,255,0.04); color: var(--text2); border: 1px solid var(--border2); }

.pc-skip { background: transparent; color: var(--text3); border: 1px solid transparent; font-style:italic; }

.pc-future { background: transparent; color: var(--text3); border: 1px dashed var(--border2); }

/* ─── SKIPPED WEEK ─── */

.week-skipped td { opacity: 0.5; }

.skipped-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text3);
    background: var(--bg4);
    border: 1px solid var(--border2);
    border-radius: 4px;
    padding: 2px 8px;
  }

/* ─── SCROLLBAR ─── */

::-webkit-scrollbar { width: 6px; height: 6px; }

::-webkit-scrollbar-track { background: transparent; }

::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

::-webkit-scrollbar-thumb:hover { background: var(--gold-dim); }

/* ─── RESPONSIVE ─── */

/* ── MOBILE RESPONSIVE ── */

@media (max-width: 768px) {
    header { padding: 0 0.75rem; gap: 0.75rem; }
    .header-title { font-size: 15px; letter-spacing: 1px; }
    .main { padding: 1rem 0.75rem; }

    /* Hero */
    .hero-banner { height: 120px; }
    .hero-headline { font-size: calc(28px * var(--tx-scale, 1)); letter-spacing: -0.5px; }
    .hero-content { padding: 0 1rem; }

    /* Stats */
    .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 1.25rem; }
    .stat-card { padding: 10px 12px; }
    .stat-val { font-size: 22px; }
    .stat-label { font-size: 8px; }

    /* Season blocks */
    .season-head { padding: 0.6rem 0.75rem; gap: 8px; }
    .season-title { font-size: 15px; }
    .series-head { padding: 0.6rem 0.75rem; gap: 8px; }
    .series-logo, .series-logo-placeholder { width: 40px; height: 40px; border-radius: 6px; }
    .series-body { padding: 0 0.75rem 0.6rem; }

    /* Standings bar */
    .series-standings-bar { flex-direction: column; align-items: stretch; gap: 0; padding: 6px 10px; }
    .sbar-item { flex: none; text-align: left; flex-direction: row; align-items: center; justify-content: space-between;
      padding: 6px 0; margin-right: 0; border-right: none; border-bottom: 1px solid var(--border2); }
    .sbar-item:last-child { border-bottom: none; }
    .sbar-label { font-size: 9px; margin-bottom: 0; }
    .sbar-val { font-size: 18px; }


    /* Weeks table */
    .weeks-table { font-size: 12px; }
    .weeks-table th { padding: 4px 6px; font-size: 8px; letter-spacing: 1px; }
    .weeks-table td { padding: 6px; }
    /* Hide Date and Notes columns on mobile */
    .weeks-table th:nth-child(5),
    .weeks-table td:nth-child(5) { display: none; }

    /* Event banner */
    .event-banner { flex-direction: column; }
    .event-banner-poster, .event-banner-poster-placeholder { width: 100%; height: 120px; }
    .event-banner-content { padding: 12px; }
    .event-banner-title { font-size: 16px; }
    .event-countdown-num { font-size: 22px; }
    .event-countdown-label { font-size: 8px; }

    /* Career Results */
    .achiev-group-header { padding: 8px 10px; }
    .achiev-group-name { font-size: 12px; }
    .achiev-table { font-size: 11px; }
    .achiev-table th { padding: 5px 8px; font-size: 8px; }
    .achiev-table td { padding: 6px 8px; }

    /* Seasons layout - sidebar stacks on mobile */
    .seasons-layout { flex-direction: column; gap: 0.75rem; }
    .season-sidebar { width: 100%; position: static; }

    /* Season filter bar */
    .season-filter-bar { flex-wrap: wrap; gap: 6px; }
    .season-filter-btn { font-size: 11px; padding: 4px 10px; }

    /* Section headers */
    .section-title { font-size: 11px; letter-spacing: 2px; }

    /* Series name overflow */
    .series-name { font-size: 14px; }
    .series-head > div { overflow: hidden; }

    /* Modals */
    .field-row { grid-template-columns: 1fr; }
    .logo-picker { grid-template-columns: repeat(3, 1fr); }
  }

@media (max-width: 420px) {
    .hero-banner { height: 100px; }
    .hero-headline { font-size: calc(22px * var(--tx-scale, 1)); }
    .stats-bar { grid-template-columns: 1fr 1fr; gap: 6px; }
    .stat-val { font-size: 18px; }

    /* Hide Points column too on very small screens */
    .weeks-table th:nth-child(5),
    .weeks-table td:nth-child(5) { display: none; }

    .sbar-val { font-size: 16px; }
    .series-logo, .series-logo-placeholder { width: 32px; height: 32px; }

    .event-countdown-num { font-size: 18px; }
  }

/* ── SERIES CHART ── */












/* ── NEXT EVENT BANNER ── */

.event-banner {
    position: relative;
    margin: 0 0 24px 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 180px;
    background: var(--bg2);
    border: 1px solid var(--border);
    display: flex;
    align-items: stretch;
  }

.event-banner-poster {
    width: 220px;
    flex-shrink: 0;
    object-fit: cover;
    object-position: center;
    display: block;
  }

.event-banner-poster-placeholder {
    width: 220px;
    flex-shrink: 0;
    background: var(--bg3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text3);
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
  }

.event-banner-body {
    flex: 1;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
  }

.event-banner-eyebrow {
    font-family: var(--font-head);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 6px;
  }

.event-banner-title {
    font-family: var(--font-head);
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.1;
    margin-bottom: 4px;
  }

.event-banner-dates {
    font-size: 13px;
    color: var(--text2);
    font-weight: 600;
    margin-bottom: 10px;
  }

.event-banner-desc {
    font-size: 12px;
    color: var(--text3);
    line-height: 1.6;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    margin-bottom: 12px;
  }

.event-banner-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
  }

.event-banner-cars {
    font-size: 11px;
    color: var(--text3);
    letter-spacing: 0.5px;
  }

.event-banner-cars span {
    color: var(--text2);
    font-weight: 600;
  }

.event-countdown {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
  }

.event-countdown-unit {
    text-align: center;
    background: var(--bg3);
    border: 1px solid var(--border2);
    border-radius: 6px;
    padding: 4px 8px;
    min-width: 44px;
  }

.event-countdown-num {
    font-family: var(--font-head);
    font-size: 18px;
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
    display: block;
  }

.event-countdown-label {
    font-size: 9px;
    color: var(--text3);
    letter-spacing: 1px;
    text-transform: uppercase;
    display: block;
    margin-top: 2px;
  }

.event-countdown-sep {
    font-size: 18px;
    font-weight: 700;
    color: var(--text3);
    margin-top: -4px;
  }

.event-banner-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--text3);
    font-size: 13px;
    width: 100%;
  }

/* removed - covered by 768px query */

/* ── ACHIEVEMENTS ── */

.achiev-group {
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    margin-bottom: 6px;
    overflow: hidden;
  }

.achiev-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    cursor: pointer;
    background: var(--bg3);
    user-select: none;
  }

.achiev-group-header:hover { background: rgba(240,192,64,0.06); }

.achiev-group-name {
    font-family: var(--font-head);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
  }

.achiev-group-arrow { color: var(--text3); font-size: 12px; }

.achiev-group-body { padding: 0 0 4px; }

.achiev-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    table-layout: fixed;
  }

.achiev-table th {
    text-align: left;
    padding: 7px 14px;
    font-family: var(--font-head);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text3);
    border-bottom: 1px solid var(--border2);
  }

.achiev-table td {
    padding: 8px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

.achiev-table tbody tr:last-child td { border-bottom: none; }

.achiev-table tbody tr:hover td { background: rgba(240,192,64,0.03); }

/* ── SIDEBAR TABS ── */

.sidebar-tabs {
    display: flex;
    border-bottom: 1px solid var(--border2);
  }

.sidebar-tab {
    flex: 1;
    padding: 10px 8px;
    font-family: var(--font-head);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text3);
    background: none;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
  }

.sidebar-tab:hover { color: var(--text2); }

.sidebar-tab.active {
    color: var(--gold);
    border-bottom: 2px solid var(--gold);
  }

/* ── CALENDAR ── */

.calendar-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
    padding: 8px 0;
  }

.calendar-title {
    font-family: var(--font-head);
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
  }

.cal-week-grid {
    display: grid;
    grid-template-columns: 60px repeat(7, 1fr);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    overflow: hidden;
  }

.cal-day-header {
    padding: 8px 4px;
    font-family: var(--font-head);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text3);
    text-align: center;
    background: var(--bg3);
    border-bottom: 1px solid var(--border2);
  }

.cal-time-label {
    padding: 4px 6px;
    font-size: 10px;
    color: var(--text3);
    text-align: right;
    border-right: 1px solid var(--border2);
    border-bottom: 1px solid rgba(255,255,255,0.03);
    background: var(--bg3);
  }

.cal-cell {
    min-height: 40px;
    border-right: 1px solid rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.03);
    position: relative;
    padding: 2px;
  }

.cal-cell:last-child { border-right: none; }

.cal-event {
    font-size: 10px;
    padding: 2px 4px;
    border-radius: 3px;
    background: rgba(240,192,64,0.15);
    border-left: 2px solid var(--gold);
    color: var(--text2);
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: default;
  }

.cal-event.conflict {
    background: rgba(255,82,82,0.15);
    border-left-color: var(--red);
  }

.cal-today { background: rgba(240,192,64,0.04); }

/* Monthly grid */

.cal-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    overflow: hidden;
  }

.cal-month-cell {
    min-height: 80px;
    border-right: 1px solid var(--border2);
    border-bottom: 1px solid var(--border2);
    padding: 4px;
    position: relative;
  }

.cal-month-cell:nth-child(7n) { border-right: none; }

.cal-month-cell.other-month { opacity: 0.3; }

.cal-month-day {
    font-size: 11px;
    font-weight: 600;
    color: var(--text3);
    margin-bottom: 4px;
  }

.cal-month-cell.cal-today .cal-month-day {
    color: var(--gold);
    font-weight: 700;
  }

.ssb-season-btn.archived { opacity: 0.5; }

.ssb-archived-tag {
    display: inline-block;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text3);
    background: var(--bg4);
    border-radius: 3px;
    padding: 1px 4px;
    margin-left: 6px;
    vertical-align: middle;
  }

/* ── CALENDAR WEEK VIEW ── */

.cal-week-wrap { border: 1px solid var(--border2); border-radius: var(--radius); overflow: hidden; }

.cal-week-header { display: flex; background: var(--bg3); border-bottom: 1px solid var(--border2); }

.cal-week-time-hdr { width: 56px; flex-shrink: 0; padding: 8px 4px; }

.cal-week-day-hdr {
    flex: 1; padding: 8px 4px; text-align: center;
    font-family: var(--font-head); font-size: 10px; font-weight: 700;
    letter-spacing: 1px; text-transform: uppercase; color: var(--text3);
  }

.cal-week-day-hdr.cal-today { background: rgba(240,192,64,0.06); }

.cal-week-body { display: flex; }

.cal-week-time-col { width: 56px; flex-shrink: 0; }

.cal-week-time-label {
    display: flex; align-items: flex-start; justify-content: flex-end;
    padding: 2px 6px 0 0; font-size: 10px; color: var(--text3);
    border-right: 1px solid var(--border2);
    box-sizing: border-box;
  }

.cal-week-day-col {
    flex: 1; position: relative; min-width: 0;
    border-right: 1px solid rgba(255,255,255,0.03);
  }

.cal-week-day-col:last-child { border-right: none; }

.cal-week-day-col.cal-today { background: rgba(240,192,64,0.03); }

.cal-week-grid-line {
    position: absolute; left: 0; right: 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    box-sizing: border-box;
  }

.cal-event-block {
    position: absolute; left: 2px; right: 2px;
    background: rgba(240,192,64,0.15);
    border-left: 3px solid var(--gold);
    border-radius: 3px;
    padding: 3px 5px;
    font-size: 10px;
    color: var(--text2);
    overflow: hidden;
    cursor: pointer;
    z-index: 1;
    box-sizing: border-box;
  }

.cal-event-block.conflict {
    background: rgba(255,82,82,0.18);
    border-left-color: var(--red);
  }

.cal-event-block:hover { filter: brightness(1.15); }

/* ─── LIGHT THEME (toggle in header, js/theme.js) ─── */
:root[data-theme="light"] {
    color-scheme: light;
    --gold: #A87400;
    --gold-light: #8A5F00;
    --gold-dim: #C99A2E;
    --bg: #F4F2EC;
    --bg2: #FFFFFF;
    --bg3: #F0EDE5;
    --bg4: #E7E3D8;
    --border: rgba(168,116,0,0.30);
    --border2: rgba(0,0,0,0.10);
    --text: #1C1B18;
    --text2: #56524A;
    --text3: #8A8578;
    --red: #C62828;
    --green: #1F8A63;
    --blue: #1F6FB8;
}
:root[data-theme="light"] body::before { opacity: calc(var(--page-bg-opacity) * 0.6); }
:root[data-theme="light"] select, :root[data-theme="light"] .field select { background-color: var(--bg4); color: var(--text); }
:root[data-theme="light"] input[type="date"], :root[data-theme="light"] input[type="time"], :root[data-theme="light"] select { color-scheme: light; }
:root[data-theme="light"] .hero-banner .hero-headline { color: #fff; }

/* ─── MOBILE LAYOUT (phones) ─── */
body { overflow-x: clip; }
.seasons-main, .season-block, .series-block, .series-body, .season-body { min-width: 0; max-width: 100%; }
@media (max-width: 640px) {
    .main { padding: 1rem 0.75rem; }
    .season-head { flex-wrap: wrap; row-gap: 8px; padding: 0.8rem 0.9rem; }
    .season-name { font-size: 16px; min-width: 0; flex: 1 1 55%; overflow-wrap: anywhere; }
    .season-meta { display: none; }
    .season-body { padding: 0.75rem; }
    .series-head { flex-wrap: wrap; row-gap: 6px; padding: 0.65rem 0.75rem; }
    .series-name { flex: 1 1 calc(100% - 100px); min-width: 0; overflow-wrap: anywhere; }
    .series-head > span[style*="flex-shrink:0"] { flex-shrink: 1 !important; min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
    .series-body { padding: 0 0.75rem 0.75rem; }
    .weeks-table { width: 100%; }
    .weeks-table th, .weeks-table td { padding: 6px 4px; }
    .weeks-table th:nth-child(1) { width: 34px; }
    .weeks-table th:nth-child(3), .weeks-table th:nth-child(4) { width: 62px; }
    .skipped-badge { white-space: normal; font-size: 9px; }
    .event-banner { flex-direction: column; }
    .event-banner-poster, .event-banner-poster-placeholder { width: 100%; height: auto; max-height: 300px; }
    .event-banner-poster-placeholder { height: 80px; }
    .event-banner-body { padding: 14px 16px; }
    .header-content, .header-inner { min-width: 0; }
    table { max-width: 100%; }
}

/* ─── TOP MENU (icon buttons with a caption above; js/menu.js) ─── */
.hdr-btn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; box-sizing: border-box; width: 74px; height: 46px; padding: 5px 4px 6px; line-height: 1; flex: none; }
.hdr-lbl { font-size: 9px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--text3); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.hdr-btn:hover .hdr-lbl { color: var(--gold-light); }
.header-right { flex-wrap: wrap; justify-content: flex-end; }
.menu-panel { max-width: 520px; }
.menu-panel-ico { display: inline-flex; color: var(--gold); }
.menu-panel-body p { margin: 0 0 0.9rem; color: var(--text2); font-size: 14px; line-height: 1.65; }
.menu-panel-body a { color: var(--gold); word-break: break-all; }
.menu-panel-links { display: flex; flex-direction: column; gap: 8px; margin-top: 0.5rem; }
.menu-panel-link { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--border2); border-radius: var(--radius); background: var(--bg3); color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; transition: border-color .15s, background .15s; }
.menu-panel-link:hover { border-color: var(--gold-dim); background: rgba(240,192,64,.07); }
.menu-panel-link svg, .menu-panel-link img { color: var(--gold); flex: none; }
@media (max-width: 640px) {
    .header-content { height: auto; min-height: 72px; flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
    .header-left { flex: 1 1 100%; }
    .header-right { flex: 1 1 100%; gap: 6px; justify-content: flex-start; }
    .hdr-btn { width: 60px; height: 44px; padding: 4px 3px 5px; }
    .hdr-lbl { font-size: 8px; letter-spacing: .3px; }
}

/* uploaded single-colour icons follow the theme (menu item option "Recolour") */
.menu-tint { filter: brightness(0) invert(.8); }
:root[data-theme="light"] .menu-tint { filter: brightness(0) invert(.2); }

/* ─── CONTENT PAGES (page.html: About / Contact) ─── */
.page-card { width: 100%; max-width: none; margin: 0; background: var(--bg2); border: 1px solid var(--border2); border-radius: var(--radius-lg); padding: 2rem 2.25rem; }
.page-title { margin: 0 0 1.25rem; font-family: var(--font-head); font-size: 30px; font-weight: 800; color: var(--gold); line-height: 1.15; }
.page-content { color: var(--text2); font-size: 15px; line-height: 1.75; overflow-wrap: anywhere; }
.page-content > *:first-child { margin-top: 0; }
.page-content p, .page-content > div { margin: 0 0 1rem; }
.page-content h2 { font-family: var(--font-head); font-size: 22px; color: var(--text); margin: 1.6rem 0 .6rem; }
.page-content h3 { font-family: var(--font-head); font-size: 17px; color: var(--text); margin: 1.3rem 0 .5rem; }
.page-content a { color: var(--gold); }
.page-content ul, .page-content ol { margin: 0 0 1rem 1.3rem; padding: 0; }
.page-content li { margin-bottom: .3rem; }
.page-content blockquote { margin: 1rem 0; padding: .4rem 1rem; border-left: 3px solid var(--gold-dim); color: var(--text); background: var(--bg3); border-radius: 0 var(--radius) var(--radius) 0; }
.page-content hr { border: none; border-top: 1px solid var(--border2); margin: 1.5rem 0; }
.page-content img { display: block; max-width: 100%; height: auto; margin: 1rem auto; border-radius: var(--radius); }
.page-content img[data-w="25"] { width: 25%; }
.page-content img[data-w="50"] { width: 50%; }
.page-content img[data-w="75"] { width: 75%; }
.page-content img[data-w="100"] { width: 100%; }
.hdr-btn.active { border-color: var(--gold-dim); }
.hdr-btn.active .hdr-lbl { color: var(--gold); }
.cf { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 14px; }
.cf-row { display: flex; flex-direction: column; gap: 6px; }
.cf label { font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text3); }
.cf label b { color: var(--gold); letter-spacing: 0; text-transform: none; font-size: 14px; }
.cf input, .cf textarea { background: var(--bg4); border: 1px solid var(--border2); border-radius: var(--radius); color: var(--text); font: 400 15px var(--font-body); padding: 10px 12px; outline: none; width: 100%; box-sizing: border-box; }
.cf input:focus, .cf textarea:focus { border-color: var(--gold-dim); box-shadow: 0 0 0 3px rgba(240,192,64,.12); }
.cf textarea { resize: vertical; }
.cf-cap-in { display: flex; gap: 8px; align-items: center; }
.cf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-status { min-height: 1.2em; font-size: 14px; color: var(--green); }
.cf-status.err { color: var(--red); }
.cf .btn-gold { align-self: flex-start; padding: 10px 22px; }
.cf .btn-gold[disabled] { opacity: .6; cursor: default; }
.cf-done { text-align: center; padding: 2rem 0; }
.cf-done h3 { font-family: var(--font-head); color: var(--gold); font-size: 24px; margin: 0 0 .5rem; }
@media (max-width: 640px) { .page-card { padding: 1.25rem 1rem; } .page-title { font-size: 24px; } }
a.hdr-btn, a.hdr-btn:hover { text-decoration: none; }
.pg-img-err { color: var(--text3); font-size: 13px; border: 1px dashed var(--border2); border-radius: var(--radius); padding: 10px 12px; }

/* ─── hero framing editor (admin) ─── */
.hero-banner.hero-editing { cursor: grab; touch-action: none; outline: 2px dashed var(--gold); outline-offset: -2px; user-select: none; }
.hero-banner.hero-editing.dragging { cursor: grabbing; }
.hero-frame-bar { position: absolute; z-index: 5; right: 12px; bottom: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; background: rgba(14,14,18,.88); border: 1px solid var(--border); border-radius: var(--radius); color: #EDEAE2; font-size: 12px; cursor: default; }
.hero-frame-bar label { display: flex; align-items: center; gap: 8px; }
.hero-frame-bar input[type=range] { width: 140px; accent-color: var(--gold); }
.hero-frame-bar button { font: 600 12px var(--font-body); padding: 5px 12px; border-radius: var(--radius); border: 1px solid var(--border2); background: #262632; color: #EDEAE2; cursor: pointer; }
.hero-frame-bar button.primary { background: var(--gold); border-color: var(--gold); color: #1a1500; }
.hero-frame-hint { position: absolute; z-index: 4; left: 50%; top: 10px; transform: translateX(-50%); background: rgba(14,14,18,.8); color: #EDEAE2; font-size: 12px; padding: 4px 12px; border-radius: 12px; pointer-events: none; white-space: nowrap; }
@media (max-width: 640px) { .hero-frame-bar { left: 8px; right: 8px; } .hero-frame-hint { display: none; } }

/* ─── AWARDS GALLERY (js/awards.js) ─── */
.aw-bar { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin: 1.5rem 0 1rem; }
.aw-bar label { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; }
.aw-bar select { background: var(--bg4); color: var(--text); border: 1px solid var(--border2); border-radius: var(--radius); padding: 6px 10px; font: 500 13px var(--font-body); text-transform: none; letter-spacing: 0; }
.aw-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 auto; }
.aw-chip { all: unset; cursor: pointer; padding: 5px 14px; border-radius: 16px; border: 1px solid var(--border2); background: var(--bg3); color: var(--text2); font: 600 13px var(--font-body); }
.aw-chip:hover { border-color: var(--gold-dim); }
.aw-chip.on { background: rgba(240,192,64,.14); border-color: var(--gold-dim); color: var(--gold); }
.aw-chip:focus-visible, .aw-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.aw-group { display: flex; align-items: baseline; gap: 10px; margin: 1.8rem 0 .8rem; font: 700 18px var(--font-head); color: var(--text); }
.aw-group span { font: 600 12px var(--font-body); color: var(--text3); }
.aw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.aw-card { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; background: var(--bg3); border: 1px solid var(--border2); border-radius: var(--radius-lg); overflow: hidden; transition: transform .15s, border-color .15s; }
.aw-card:hover { transform: translateY(-3px); border-color: var(--gold-dim); }
.aw-thumb { position: relative; display: block; aspect-ratio: 3 / 4; background: var(--bg4); overflow: hidden; }
.aw-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; margin: 0; border-radius: 0; }
.aw-pdf { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; color: var(--text3); }
.aw-place { position: absolute; top: 8px; right: 8px; padding: 3px 9px; border-radius: 12px; font: 800 12px var(--font-head); background: rgba(14,14,18,.85); color: var(--text); border: 1px solid var(--border2); }
.aw-place.gold { background: #F0C040; color: #1a1500; border-color: #F0C040; }
.aw-place.silver { background: #C9CED6; color: #12151a; border-color: #C9CED6; }
.aw-place.bronze { background: #C98B54; color: #1c1109; border-color: #C98B54; }
.aw-info { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; }
.aw-info b { font: 700 14px var(--font-head); color: var(--text); line-height: 1.25; }
.aw-info small { font-size: 12px; color: var(--text3); }
.aw-empty { color: var(--text3); padding: 1.5rem 0; }
.aw-box { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.82); display: flex; align-items: center; justify-content: center; padding: 16px; }
.aw-panel { position: relative; width: min(1000px, 100%); height: min(92vh, 900px); background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); display: flex; flex-direction: column; overflow: hidden; }
.aw-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border2); }
.aw-head b { font: 700 16px var(--font-head); color: var(--text); margin-right: 8px; }
.aw-head small { display: block; font-size: 12px; color: var(--text3); margin-top: 2px; }
.aw-head .aw-place { position: static; display: inline-block; vertical-align: middle; }
.aw-actions { display: flex; gap: 6px; }
.aw-actions a.btn { text-decoration: none; }
.aw-view { flex: 1; min-height: 0; background: var(--bg4); display: flex; }
.aw-view iframe { flex: 1; border: 0; width: 100%; height: 100%; background: #fff; }
.aw-view img { max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; border-radius: 0; }
.aw-nav { all: unset; position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 64px; display: flex; align-items: center; justify-content: center; font-size: 34px; color: #fff; background: rgba(14,14,18,.6); cursor: pointer; z-index: 2; }
.aw-nav:hover { background: rgba(240,192,64,.85); color: #1a1500; }
.aw-nav.prev { left: 0; border-radius: 0 8px 8px 0; } .aw-nav.next { right: 0; border-radius: 8px 0 0 8px; }
@media (max-width: 640px) { .aw-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } .aw-box { padding: 0; } .aw-panel { height: 100vh; border-radius: 0; } }
