/* Переезд Discord сохраняет знакомую иконку в оформлении ASPIRE. */
.migration-banner { display:grid; grid-template-columns:52px minmax(0,1fr) auto; align-items:center; gap:20px; padding:22px 24px; margin:0 0 26px; border:1px solid var(--border); border-left:3px solid var(--action); border-radius:8px; background:linear-gradient(110deg,color-mix(in srgb,var(--action) 7%,var(--surface)),var(--surface) 65%); }
.migration-symbol { display:grid; place-items:center; width:52px; height:52px; border:1px solid color-mix(in srgb,#818cf8 50%,var(--border)); border-radius:12px; color:#c7ccff; background:color-mix(in srgb,#5865f2 14%,var(--surface)); }
.migration-symbol svg { width:30px; height:30px; }
.migration-copy { min-width:0; }
.migration-copy .eyebrow { color:var(--cyan); font-size:10px; }
.migration-banner h2 { margin:6px 0 8px; color:var(--text); font:700 clamp(18px,2vw,23px)/1.3 var(--font-body); }
.migration-banner p { max-width:760px; margin:8px 0 0; color:var(--muted); font-size:13px; line-height:1.65; }
.migration-banner .migration-banner-button { display:inline-flex; align-items:center; justify-content:center; gap:12px; min-height:44px; padding:12px 16px; text-align:center; white-space:normal; font-size:13px; }
.migration-landing { grid-template-columns:52px minmax(0,1fr); align-items:start; max-width:940px; margin:0 auto; padding:28px; }
.migration-landing form { margin:22px 0 14px; }
.migration-landing .migration-copy > p + p { margin-top:14px; }
.social-telegram { --social-color:#2aabee; }
html[data-theme="light"] .migration-symbol { color:#515bc5; }
@media(max-width:800px) { .migration-banner { grid-template-columns:42px minmax(0,1fr); gap:14px; padding:18px; }.migration-symbol { width:42px; height:42px; border-radius:9px; }.migration-symbol svg { width:25px; height:25px; }.migration-banner:not(.migration-landing) .migration-banner-button { grid-column:1/-1; justify-self:start; }.migration-landing { padding:20px; } }
@media(max-width:500px) { .migration-banner .migration-banner-button { width:100%; }.migration-landing { grid-template-columns:minmax(0,1fr); }.migration-banner h2 { font-size:19px; }.migration-banner p { font-size:12px; } }

:root {
  color-scheme: dark;
  --bg: #0b0e11;
  --surface: #13171b;
  --surface-2: #191e23;
  --surface-alt: #1d2329;
  --surface-3: #252d35;
  --card-bg: rgba(255, 255, 255, 0.03);
  --border: #30383f;
  --text: #f2f4f5;
  --muted: #a2adb6;
  --accent: #ff845d;
  --accent-rgb: 255, 132, 93;
  --accent-dim: rgba(var(--accent-rgb), 0.12);
  --accent-hover: #ffac8f;
  --action: #fa6538;
  --action-hover: #ff8059;
  --action-ink: #101315;
  --cyan: #55d9df;
  --event-short: #55d9df;
  --event-short-rgb: 85, 217, 223;
  --event-championship: #f0c84b;
  --event-championship-rgb: 240, 200, 75;
  --event-championship-sprint: #d6b879;
  --event-championship-sprint-rgb: 214, 184, 121;
  --spectrum: linear-gradient(110deg, #fa5829 0%, #ef9c37 19%, #54b782 39%, #38c5ce 57%, #2773da 78%, #4557cc 100%);
  --white-strong: #ffffff;
  --green: #59c99a;
  --green-dim: rgba(47, 158, 100, 0.14);
  --red: #f47376;
  --red-dim: rgba(244, 115, 118, 0.12);
  --silver: #c7ccd1;
  --bronze: #c17a44;
  --gold: #e8b923;

  /* Единая типографика для русского интерфейса и английских имён. */
  --font-display: 'Oswald', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', 'Inter', monospace;
}

* { box-sizing: border-box; }

:root[data-theme="light"] {
  color-scheme: light;
  --bg:#eef0f1;
  --surface:#ffffff;
  --surface-2:#f3f5f5;
  --surface-alt:#e9eded;
  --surface-3:#e0e6e7;
  --card-bg:rgba(30,45,65,.035);
  --border:#c8d1d3;
  --text:#182127;
  --muted:#56656e;
  --accent:#ab3919;
  --accent-rgb:171, 57, 25;
  --accent-hover:#872b12;
  --accent-dim:rgba(var(--accent-rgb),.08);
  --cyan:#176b78;
  --green:#167343;
  --red:#b91c1c;
  --silver:#596576;
  --bronze:#8b512a;
  --gold:#896408;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
}

a { color: inherit; }
.skip-link { position:fixed; z-index:100; top:8px; left:16px; transform:translateY(-150%); padding:10px 16px; border:2px solid var(--accent); border-radius:6px; background:var(--surface); color:var(--text); }
.skip-link:focus { transform:none; }

.display-settings-bar { max-width:1180px; margin:0 auto; padding:10px 24px; display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; font-size:12px; border-bottom:1px solid var(--border); }
.display-settings { position:relative; margin-left:auto; }
.display-settings summary { cursor:pointer; color:var(--text); padding:6px 0; }
.display-settings-panel { position:absolute; z-index:20; right:0; top:100%; width:min(360px,calc(100vw - 32px)); padding:18px; border:1px solid var(--border); border-radius:10px; background:var(--surface); box-shadow:0 10px 30px rgba(0,0,0,.25); display:grid; gap:10px; }
.display-settings-panel select { width:100%; min-width:0; background:var(--surface-2); color:var(--text); border:1px solid var(--border); border-radius:6px; padding:10px; font:inherit; }
.display-settings-panel p { margin:0; font-size:12px; }
.cal-event-time { font-size:10px; color:var(--text); white-space:nowrap; }
@media(max-width:600px) { .display-settings-bar { padding:8px 16px; } .display-settings-panel { max-height:70dvh; overflow:auto; } }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

html { scroll-behavior: smooth; }

/* Полная страница появляется сразу; локальные эффекты остаются у элементов. */

.mono { font-family: var(--font-mono); }

/* ---------- Header ---------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.flag-strip {
  height: 8px;
  background:linear-gradient(90deg, var(--accent), transparent 60%);
  opacity:.85;
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 24px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 6px;
}

.brand-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: 0.01em;
  margin: 0 0 18px;
}

.tabs {
  display: flex;
  gap: 4px;
}

.tab {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--muted);
  padding: 10px 16px;
  border-bottom: 3px solid transparent;
}

.tab.is-active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

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

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Layout ---------- */

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 56px;
}

/* Админка: рабочая зона шире, без лишних боковых полей */
.page-admin {
  max-width: 1600px;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.page-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  margin: 0;
}

.muted { color: var(--muted); }

.site-footer {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 13px;
  font-family: var(--font-mono);
}

/* ---------- Flash messages ---------- */

.flash-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.flash {
  padding: 12px 16px;
  padding-right: 36px;
  border-radius: 6px;
  font-size: 14px;
  border: 1px solid var(--border);
  position: relative;
  cursor: pointer;
  animation: flash-in 0.2s ease-out;
}

.flash-dismiss {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  color: inherit;
  opacity: 0.5;
  cursor: pointer;
  padding: 0 4px;
}
.flash-dismiss:hover { opacity: 1; }

@keyframes flash-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.flash-success { background: var(--green-dim); border-color: var(--green); }
.flash-error { background: var(--red-dim); border-color: var(--red); }
.flash-warning { background: var(--accent-dim); border-color: var(--accent); }
.flash-info { background: var(--surface-2); border-color: var(--border); }

.steam-avatar {
  display: block;
  border-radius: 8px;
  border: 2px solid var(--border);
  margin-top: 10px;
}

.pilot-main-col, .pilot-side-col { min-width: 0; }
.pilot-side-col .section-title { margin-bottom: 8px; }

.pilot-steam-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.pilot-steam-line .steam-avatar {
  margin-top: 0;
  width: 40px;
  height: 40px;
}

/* ---------- Заявки (карточка пилота / команда) ---------- */

.discord-link-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  font-size: 16px;
  font-weight: 700;
}

.card-cta {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--surface-2);
}

.field-error {
  display: block;
  color: var(--red);
  font-size: 12px;
  margin-top: 4px;
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--red); }

.number-free { color: var(--green); }
.number-taken { color: var(--red); }
.number-card { color: var(--accent); font-weight: 600; }
.number-acc { color: var(--muted, #888); opacity: 0.6; }

.application-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: var(--surface-2);
}
.application-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.application-name {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 17px;
}
.pilot-number-inline {
  font-family: var(--font-display);
  color: var(--accent);
  margin-left: 6px;
}
.application-bio {
  margin: 10px 0 0;
  font-size: 13px;
  white-space: pre-wrap;
}
.application-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}
.application-reject {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1;
  min-width: 260px;
}
.application-reject .reason-input { flex: 1; }

/* Заявка-подтверждение личности: имя совпало с уже участвовавшим пилотом */
.claim-box {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: 6px;
  background: var(--surface);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
}
.claim-box.claim-match { border-color: var(--accent); }
.claim-box.claim-diff { border-color: var(--red); }
.claim-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.claim-badge.claim-ok { color: var(--accent); border-color: var(--accent); }
.claim-badge.claim-bad { color: var(--red); border-color: var(--red); }
.claim-note { width: 100%; }

/* P0: diff старого/нового в change-заявке */
.claim-box.claim-diff { display: block; }
.change-diff {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}
.cd-row {
  display: grid;
  grid-template-columns: 64px 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.cd-label { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.cd-old { color: var(--muted); text-decoration: line-through; opacity: 0.8; }
.cd-arrow { color: var(--muted); }
.cd-new { color: var(--text); font-weight: 600; }

.pilot-profile-line {
  margin: 8px 0 0;
  font-size: 13px;
}
.pilot-bio {
  font-size: 13px;
  white-space: pre-wrap;
  margin: 0 0 16px;
  color: var(--text);
}

/* ---------- Дайджест на главной ---------- */

.home-digest { margin-bottom: 28px; }

.digest-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.digest-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--surface-2);
  text-decoration: none;
  color: inherit;
}
.digest-card:hover { border-color: var(--accent); }

.digest-card-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}
.digest-track {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
}
.digest-meta { font-size: 11px; }

.digest-podium {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.digest-podium-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.digest-pilot {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.digest-points { font-size: 12px; }

/* ---------- Buttons ---------- */

.btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 10px 18px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn-primary { background: var(--action); color: var(--action-ink); }
.btn-primary:hover { background: var(--action-hover); }

.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-danger { background: transparent; border: 1px solid var(--red); color: var(--red); }
.btn-danger:hover { background: var(--red-dim); color: var(--text); }

.btn-sm { padding: 6px 12px; font-size: 13px; }

.btn-danger-ghost {
  background: transparent;
  border-color: var(--red);
  color: var(--red);
}
.btn-danger-ghost:hover {
  background: var(--red-dim);
  color: var(--red);
  border-color: var(--red);
}

/* Компактные строки списка сезонов */
.board-compact .board-row { padding: 8px 12px; font-size: 14px; }
.board-compact .board-row .btn-sm { padding: 4px 10px; font-size: 12px; }
.board-compact .col-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

.board-seasons .board-row {
  grid-template-columns: minmax(180px, 2fr) 120px 64px 64px 120px minmax(220px, auto);
}
@media (max-width: 920px) {
  .board-seasons .board-row {
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
  }
  .board-seasons .col-actions { justify-content: flex-start; }
}

/* ---------- Timing board ---------- */

.board {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.board-row {
  display: grid;
  grid-template-columns: 64px 1fr 90px 90px;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.board-row:last-child { border-bottom: none; }

.board-head {
  background: var(--surface-alt);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.col-num { text-align: right; }
.col-status { text-align: right; }
.col-sess { text-align: right; }
.sess-btn.session-sess {
  display: inline-block;
  padding: 2px 8px;
  margin-left: 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.season-rounds-board .board-row {
  grid-template-columns: 90px 1fr auto;
}
.season-rounds-board .col-sess {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.season-rounds-board .sess-wrap {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.season-rounds-board .sess-start {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.points { font-weight: 700; color: var(--accent); }

.pos-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
}

.pos-badge-sm { width: 28px; height: 28px; font-size: 13px; }

.is-p1 .pos-badge { border-color: var(--gold); color: var(--gold); }
.is-p2 .pos-badge { border-color: var(--silver); color: var(--silver); }
.is-p3 .pos-badge { border-color: var(--bronze); color: var(--bronze); }

/* Отчёт по одной гонке — 5 колонок вместо 4 */
.board-standings .board-row { grid-template-columns: 48px 38px minmax(110px, 1fr) 82px 70px 70px; gap: 8px; }
.board-standings-public .board-row { grid-template-columns: 48px 38px minmax(110px, 1fr) 82px 70px; }
.board-standings .col-team { text-align: left; }

/* Публичный список пилотов — карточки в стиле личной карточки, 2 в ряд */
.pilots-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.pilot-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.pilot-card:hover { border-color: var(--accent); }
.pilot-card-main { min-width: 0; }
.pilot-card-number {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  min-width: 60px;
}
.pilot-card-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
}
.pilot-card-meta {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.pilot-card-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.pilot-card-side .pilot-status { margin-left: 0; }
.pilot-card-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(74, 122, 190, 0.5);
  background: rgba(38, 64, 110, 0.4);
  color: #a9c6f0;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.pilot-filter {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  min-width: 0;
}
.pilot-count { font-size: 12px; white-space: nowrap; }
.pilot-status {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  vertical-align: 1px;
  white-space: nowrap;
}

/* Гонка: Поз | № | Пилот | Машина | Круг | Круги | [Время] | [Очки] | Статус */
.board-race .col-name,
.board-session .col-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.board-race .col-name .penalty-badge {
  margin-left: 6px;
  white-space: nowrap;
}

/* Фиолетовый — классическая гоночная маркировка лучшего круга сессии (как в реальном тайминге) */
.laptime-fastest { color: #b660ff; font-weight: 700; }

/* ---------- Pills ---------- */

.pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.03em;
}

.pill-finish { background: rgba(245, 245, 245, 0.12); color: var(--white-strong); }
.pill-dnf { background: var(--red-dim); color: var(--red); }
.pill-muted { background: var(--surface-alt); color: var(--muted); }
.pill-open { background: var(--green-dim); color: var(--green); }
.pill-closed { background: var(--red-dim); color: var(--red); }

/* ---------- Empty state ---------- */

.empty-state {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 40px 24px;
  text-align: center;
}

.empty-state p { margin: 0 0 8px; }
.empty-state .btn { margin-top: 12px; }

/* ---------- Upload card ---------- */

.upload-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
}

.upload-text { display: flex; flex-direction: column; gap: 4px; }

.upload-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

input[type="file"] {
  color: var(--muted);
  font-size: 13px;
  max-width: 220px;
}

/* ---------- Race list ---------- */

.race-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.race-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
}

.race-card-error { border-color: var(--red); }

.race-card-main { display: flex; flex-direction: column; gap: 2px; }

.race-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
}

a.race-name:hover { color: var(--accent); }

.race-meta { font-size: 13px; color: var(--muted); }
.error-text { color: var(--red); }

.race-card-side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ---------- Forms ---------- */

.exception-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 28px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--muted); font-family: var(--font-mono); }

.field input {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
  min-width: 220px;
}

.field input:focus,
input[type="file"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.intro-text { max-width: 60ch; margin-bottom: 20px; }

/* ---------- Detail page ---------- */

.back-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 16px;
}

.back-link:hover { color: var(--accent); }

/* ---------- Danger zone ---------- */

.danger-zone {
  margin-top: 32px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.danger-zone summary {
  cursor: pointer;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
}

.reset-form { margin-top: 12px; }
.reset-form .muted { margin-bottom: 10px; font-size: 13px; }

/* ---------- Admin layout / sidebar ---------- */

.admin-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.admin-sidebar {
  flex: 0 0 220px;
  width: 220px;
  position: sticky;
  top: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-nav-group {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-nav-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 10px 2px;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  border-left: 3px solid transparent;
}

.admin-request-count {
  display: inline-flex;
  flex: 0 0 auto;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.admin-request-count.has-pending {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: var(--red-dim);
  color: #ff7770;
}
.admin-request-count.is-clear {
  border-color: rgba(47, 158, 100, 0.45);
  background: var(--green-dim);
  color: #74d69f;
}
.admin-card strong .admin-request-count { vertical-align: middle; }

.admin-nav-link:hover {
  background: var(--surface-3);
}

.admin-nav-link.is-active {
  background: var(--surface-3);
  border-left-color: var(--accent);
  color: var(--white-strong);
}

.admin-content {
  flex: 1;
  min-width: 0;
}

.sanction-notice, .sanction-history {
  padding: 16px 20px; margin: 16px 0; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 12px;
}
.sanction-notice { border-left: 3px solid var(--accent); }
.sanction-notice.is-probation { border-left-color: var(--gold); }
.sanction-notice p, .sanction-history p { margin: 8px 0; overflow-wrap: anywhere; }
.sanction-notice .muted { font-size: 13px; }
.home-suspensions { margin: 0 0 20px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px; }
.home-suspensions summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.home-suspensions li { margin: 10px 0; }

/* Второстепенные инструменты доступны, но не спорят с рабочими действиями. */
.admin-sidebar { max-height: calc(100dvh - 32px); overflow-y: auto; }
.admin-navigation-shell > summary { display: none; cursor: pointer; padding: 10px; font-weight: 600; }
.admin-nav-more { margin-top: 6px; width: 100%; }
.admin-nav-more > summary {
  cursor: pointer; padding: 10px; color: var(--muted); font-size: 12px;
  border-radius: 8px;
}
.admin-nav-more > summary:hover { color: var(--text); background: var(--surface-3); }
.admin-nav-more[open] > summary { color: var(--text); }
.admin-nav-system { border-top: 1px solid var(--border); margin-top: 14px; padding-top: 6px; }
.admin-section-nav {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px;
  padding: 10px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px;
}
.admin-section-nav a {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px;
  border-radius: 7px; font-size: 13px; color: var(--text); text-decoration: none;
}
.admin-section-nav a:hover, .admin-section-nav a:focus-visible { background: var(--surface-3); }
.admin-section-nav a.admin-section-important { color: var(--accent); font-weight: 700; }
.admin-section, .page-admin [id] { scroll-margin-top: 20px; }
.admin-section { margin: 18px 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.admin-section > summary {
  cursor: pointer; padding: 16px 18px; font-size: 16px; font-weight: 600;
}
.admin-section > .admin-section-body { padding: 0 18px 18px; }
.admin-section > summary .muted { font-size: 12px; font-weight: 400; margin-left: 8px; }
.admin-save-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px 0; }
.page-admin #settings-form { max-width: none; padding: 0; border: 0; background: transparent; }
.page-admin #settings-form .admin-section-body > .field { max-width: 820px; }
.admin-secondary-actions { margin: 12px 0; }
.admin-secondary-actions > summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 8px 0; }
.admin-secondary-actions[open] > form { margin: 10px 0; }

.preset-bar {
  margin: 2px 0 16px;
}

.preset-bar .field-hint {
  display: block;
  margin-bottom: 6px;
}

td.ovr {
  background: var(--surface-3);
  color: var(--gold);
  font-weight: 600;
}

/* колонка спринт-этапа в матрице зачёта (очки по шкале спринта) */
td.sprint-cell {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

/* ---------- Responsive ---------- */

@media (max-width: 820px) {
  .admin-navigation-shell > summary { display: list-item; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar {
    width: 100%;
    flex: none;
    position: static;
    max-height: none;
  }
  .admin-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }
  .admin-nav-group {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 0;
    width: 100%;
  }
  .admin-nav-title { display: block; width: 100%; }
  .admin-nav-link {
    border-left: none;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    font-size: 13px;
    padding: 6px 10px;
  }
  .admin-nav-link.is-active { border-left: none; border-bottom-color: var(--accent); }
  .admin-content { overflow-x: auto; }
  .admin-content > table,
  .admin-content > .table-wrap > table,
  .season-detail-table { display: block; width: 100%; overflow-x: auto; }
}

@media (max-width: 600px) {
  .header-inner { padding: 18px 16px 0; }
  .menu-toggle { display: flex; }
  .tabs {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding-bottom: 12px;
  }
  .tabs.is-open { display: flex; }
  .tab {
    border-bottom: 1px solid var(--border);
    border-left: 3px solid transparent;
    padding: 10px 12px;
  }
  .tab.is-active { border-left-color: var(--accent); border-bottom-color: var(--border); }
  .page { padding: 24px 16px 48px; }
  .board-row { grid-template-columns: 44px 1fr 60px 60px; padding: 10px 12px; gap: 6px; font-size: 14px; }
  .board-standings .board-row { grid-template-columns: 30px 28px minmax(70px, 1fr) 42px 40px 40px; gap: 4px; }
  .board-standings-public .board-row { grid-template-columns: 30px 28px minmax(70px, 1fr) 42px 40px; }
  .board-race .board-row {
    grid-template-columns:
      28px
      var(--col-delta, 0px)
      28px
      minmax(70px, 1.2fr)
      42px
      minmax(60px, 1fr)
      44px
      28px
      var(--col-time, 0px)
      var(--col-points, 0px)
      56px;
    font-size: 11px; padding: 6px 8px; column-gap: 4px;
  }
  .board-race.has-delta { --col-delta: 24px; }
  .board-race.has-time { --col-time: 48px; }
  .board-race.has-points { --col-points: 28px; }
  .board-session .board-row {
    grid-template-columns: 32px 30px minmax(70px, 1.2fr) 42px minmax(60px, 1fr) 40px 72px;
    font-size: 12px; padding: 6px 8px;
  }
  .pilots-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Новые компоненты для ACC СНГ ---------- */

.tab-quiet { color: var(--muted); font-size: 13px; }
.tab-quiet:hover { color: var(--accent); }

.status-pill {
  margin-left: 8px;
  font-size: 11px;
  vertical-align: middle;
}

/* ---------- Статистика: широкая таблица ---------- */

.stats-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  white-space: nowrap;
}

.stats-table th, .stats-table td {
  padding: 10px 14px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.stats-table th {
  background: var(--surface-alt);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.stats-table th.sortable { cursor: pointer; user-select: none; }
.stats-table th.sortable:hover { color: var(--accent); }

.stats-table td.al, .stats-table th.al { text-align: left; }
.stats-table td a:not(.team-tag) { text-decoration: none; font-weight: 600; }
.stats-table td a:not(.team-tag):hover { color: var(--accent); }
.stats-table tr:last-child td { border-bottom: none; }
.stats-table td.accent { color: var(--accent); font-weight: 700; }

.stats-table th.sortable.sort-asc::after { content: " ↑"; color: var(--accent); }
.stats-table th.sortable.sort-desc::after { content: " ↓"; color: var(--accent); }

.stats-legend {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  background: var(--surface);
}

.stats-legend summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text);
}

.stats-legend ul {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.stats-legend strong { color: var(--text); }

.stats-note { margin-top: 12px; font-size: 13px; }

/* ---------- Карточки статистики пилота ---------- */

.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.stat-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 22px;
}

.stat-value.accent { color: var(--accent); }

.stat-label {
  font-size: 12px;
  color: var(--muted);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  margin: 24px 0 12px;
}

.section-subtitle {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 16px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

/* ---------- Финиши по местам ---------- */

.place-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
  gap: 8px;
}

.place-cell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.place-cell.is-p1 { border-color: var(--gold); }
.place-cell.is-p2 { border-color: var(--silver); }
.place-cell.is-p3 { border-color: var(--bronze); }

.place-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.place-count {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
}

/* ---------- Гонки: карточка-ссылка ---------- */

/* ---------- Гонки: карточки уик-эндов ---------- */

.weekend-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.weekend-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
}

.weekend-card-error { border-color: var(--red); }

.weekend-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.weekend-bulk-add { margin-left: auto; }

.weekend-track {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
}

.weekend-date { font-family: var(--font-mono); font-size: 13px; }

.weekend-sessions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.session-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.session-btn:hover { border-color: var(--accent); color: var(--accent); }
.session-count { font-weight: 400; font-size: 12px; }
.session-added { margin-left: 2px; }

.session-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.session-delete {
  position: absolute;
  top: -6px;
  right: -6px;
  opacity: 0;
  transition: opacity 0.15s;
}

.session-item:hover .session-delete { opacity: 1; }

.session-delete button {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--red);
  background: var(--bg);
  color: var(--red);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.session-delete button:hover { background: var(--red); color: var(--white-strong); }

/* Touch devices: always show session-delete (no hover state) */
@media (hover: none) {
  .session-delete { opacity: 1; }
}

.duplicate-note {
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-dim);
  border-radius: 6px;
  padding: 6px 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.race-card { text-decoration: none; color: inherit; }
.race-arrow { color: var(--muted); font-size: 18px; }
a.race-card:hover .race-arrow { color: var(--accent); }
a.race-card:hover .race-name { color: var(--accent); }

/* ---------- Логин ---------- */

.login-form {
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
}

/* ---------- Админ-панель: карточки разделов ---------- */

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-card strong {
  font-family: var(--font-display);
  font-size: 17px;
}

.admin-card:hover { border-color: var(--accent); }
.admin-card:hover strong { color: var(--accent); }

/* ---------- Формы: строки полей ---------- */

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.form-row .field { flex: 1; min-width: 160px; }

.field-checkbox label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}

.announcement-form,
.exception-form.stacked {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  max-width: 640px;
  margin-bottom: 24px;
}

.practice-toggle-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}

.field-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.field-inline label {
  margin: 0;
  white-space: nowrap;
}

.field-inline input {
  width: 90px;
  min-width: 0;
}

.field-hint {
  font-size: 12px;
  color: var(--muted);
}

.session-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
}

.session-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.session-row .checkbox-label {
  width: 130px;
  flex-shrink: 0;
}

.session-row input[type="text"] {
  flex: 1;
  max-width: 220px;
}

.session-row.is-disabled { opacity: 0.45; }

.durations-row {
  display: flex;
  gap: 16px;
}

.durations-row .field { flex: 1; }

.multiplier-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.multiplier-wrap input { width: 80px; min-width: 0; }

.multiplier-x {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent);
}

.pitstop-checks {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

select {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
}

.announcement-output {
  width: 100%;
  max-width: 640px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 16px;
  line-height: 1.6;
}

/* ---------- Пилоты: поиск + инлайн-формы ---------- */

.search-input {
  display: block;
  width: 100%;
  max-width: 320px;
  margin-bottom: 16px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
}

.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.number-input {
  width: 56px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  color: var(--text);
  font-family: var(--font-mono);
  text-align: center;
}

.warning-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  justify-content: center;
}


/* ---------- Discord в шапке и футере ---------- */

.tab-discord {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #7289da !important;
  border-bottom-color: transparent;
}
.tab-discord:hover {
  color: #a5b4fc !important;
  border-bottom-color: #7289da;
}
.discord-icon { flex-shrink: 0; }
.discord-label { white-space: nowrap; }

.footer-discord-link {
  color: #7289da;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}
.footer-discord-link:hover {
  color: #a5b4fc;
}

/* ---------- Классы машин ---------- */

.class-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: middle;
  border: 1px solid transparent;
}
.class-gt3 { color: #4a9eff; background: rgba(74, 158, 255, 0.14); border-color: rgba(74, 158, 255, 0.35); }
.class-gt4 { color: #2f9e64; background: rgba(47, 158, 100, 0.14); border-color: rgba(47, 158, 100, 0.35); }
.class-gt2 { color: #e8a838; background: rgba(232, 168, 56, 0.14); border-color: rgba(232, 168, 56, 0.35); }
.class-cup { color: #c7ccd1; background: rgba(199, 204, 209, 0.12); border-color: rgba(199, 204, 209, 0.3); }
.class-st { color: #b660ff; background: rgba(182, 96, 255, 0.14); border-color: rgba(182, 96, 255, 0.35); }
.class-challenge { color: var(--accent); background: rgba(var(--accent-rgb), 0.14); border-color: rgba(var(--accent-rgb), 0.35); }
.class-tcx { color: #96999e; background: rgba(150, 153, 158, 0.14); border-color: rgba(150, 153, 158, 0.3); }
.class-other { color: var(--muted); background: var(--surface-alt); border-color: var(--border); }

.class-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.class-dot.class-gt3 { background: #4a9eff; }
.class-dot.class-gt4 { background: #2f9e64; }
.class-dot.class-gt2 { background: #e8a838; }
.class-dot.class-cup { background: #c7ccd1; }
.class-dot.class-st { background: #b660ff; }
.class-dot.class-challenge { background: var(--accent); }
.class-dot.class-tcx { background: #96999e; }

.class-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.class-tab {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  padding: 8px 14px;
  cursor: pointer;
}
.class-tab:hover { color: var(--text); border-color: var(--accent); }
.class-tab.is-active {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-dim);
}
.results-panel.is-hidden { display: none; }

@media (max-width: 600px) {
  .discord-label { display: none; }
}


/* ---------- Штрафы и изменение позиций ---------- */

.penalty-badge {
  display: inline-block;
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--red);
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

.pill-dsq {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid var(--red);
}
.board-row.is-dsq { opacity: 0.72; }

.pos-delta {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  display: inline-block;
  min-width: 28px;
  text-align: center;
}
.pos-up { color: var(--green); }
.pos-down { color: var(--red); }
.pos-same { color: var(--muted); }

.col-delta { text-align: center; }

.penalty-editor {
  margin-top: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  background: var(--surface);
}
.penalty-editor summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
}
.penalty-table-wrap { overflow-x: auto; margin-top: 12px; }
.penalty-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.penalty-table th, .penalty-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.penalty-table th {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--surface-alt);
}
.penalty-table .center { text-align: center; }
.penalty-input {
  width: 80px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  color: var(--text);
  font-family: var(--font-mono);
}
.reason-input {
  width: 100%;
  min-width: 140px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  color: var(--text);
}


.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.footer-donate-link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-yellow, #f5a623);
  text-decoration: none;
  transition: opacity .15s;
}
.footer-donate-link:hover { opacity: .8; }

/* Неброский нижний блок документов и контактов. */
.footer-legal {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 22px auto 0;
  padding: 14px 12px 0;
  max-width: 1000px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}
.footer-legal a { padding: 5px 0; text-decoration: none; }
.footer-legal a:hover,
.footer-legal a:focus-visible { color: var(--text); text-decoration: underline; }
.legal-page { max-width: 860px; margin: 0 auto; }
.legal-page h1 { font-family: var(--font-display); font-size: clamp(24px, 4vw, 36px); line-height: 1.2; }
.legal-page-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 20px 0 28px; font-size: 13px; color: var(--muted); }
.legal-page-nav a { padding: 5px 0; text-underline-offset: 4px; }
.legal-page-nav a[aria-current="page"] { color: var(--text); }
.legal-document { font-size: 15px; line-height: 1.75; overflow-wrap: anywhere; }
.legal-document h2 { margin: 30px 0 12px; font-size: 20px; line-height: 1.4; }
.legal-document p { margin: 0 0 14px; }
.legal-document ul { padding-left: 22px; }
.legal-document li { margin-bottom: 8px; }
.legal-contact { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.legal-contact a { color: var(--text); overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .footer-legal { gap: 4px 14px; }
  .footer-contact { flex-basis: 100%; }
}
.discord-widget-wrap {
  margin-top: 8px;
  text-align: center;
}
.discord-widget-wrap summary {
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #7289da;
  margin-bottom: 10px;
}
.discord-widget-container {
  width: 100%;
  max-width: 350px;
  margin: 0 auto;
}
.discord-widget-container iframe {
  width: 100%;
  height: 400px;
  border-radius: 8px;
  background: #2c2f33;
}
.discord-widget-wrap iframe {
  border-radius: 8px;
  max-width: 100%;
  background: #2c2f33;
}


/* ---------- Расписание на главной ---------- */

.schedule-section {
  margin-bottom: 40px;
}
.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.schedule-card {
  display: flex;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  align-items: flex-start;
  min-height: 120px;
}
.schedule-card-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 44px;
  line-height: 1.2;
}
.schedule-card-day .day-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--accent);
}
.schedule-card-day .day-date {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  font-family: var(--font-mono);
}
.schedule-card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 4px;
}
.schedule-card-meta {
  font-size: 13px;
  margin-bottom: 10px;
}
.schedule-sessions {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}

/* ---------- Админка: дни недели ---------- */

.day-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 10px;
}
.day-block summary {
  cursor: pointer;
  list-style: none;
}
.day-block summary::-webkit-details-marker { display: none; }
.day-fields {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.day-announcement {
  margin-bottom: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
}
.day-announcement summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
}
.day-announcement .announcement-output {
  margin-top: 10px;
}


.week-toolbar {
  display: flex;
  gap: 8px;
  margin: 8px 0 14px;
  flex-wrap: wrap;
}
.days-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}
.day-block:not([open]) {
  min-height: auto;
  height: auto;
  align-self: start;
}
.day-block[open] {
  align-self: start;
}
@media (max-width: 900px) {
  .days-grid { grid-template-columns: 1fr; }
}
.day-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 0;
}
.day-block summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.day-block summary::-webkit-details-marker { display: none; }
.day-summary-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.day-date-hint {
  font-size: 12px;
  font-family: var(--font-mono);
}
.day-fields.compact {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field-narrow { max-width: 110px; }
.dur-input {
  width: 48px;
  padding: 4px 6px;
  font-size: 13px;
}
.compact-sessions {
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}
.form-actions-row, .webhook-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.schedule-export { margin-top: 28px; }
.week-meta-row { margin-bottom: 12px; }


/* ---------- Соцсети в шапке ---------- */
.social-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
  margin-right: 12px;
}
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  line-height: 1;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.social-btn:hover { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.25); }
.social-btn.is-disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}
.social-twitch:hover { color: #9146ff; }
.social-tiktok:hover { color: #69c9d0; }
.social-youtube:hover { color: #ff0000; }
.social-discord:hover { color: #7289da; }

@media (max-width: 700px) {
  .social-btn span { display: none; }
  .social-links { margin-right: 6px; gap: 3px; }
  .social-btn { padding: 5px 6px; }
}


/* Сессии в форме анонса */
.session-toggles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}
.session-toggle-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.session-toggle-card.is-off {
  opacity: 0.5;
  background: #141414;
}
.session-toggle-card.is-off input[type="text"],
.session-toggle-card.is-off .dur-input {
  background: #0d0d0d !important;
  color: #555 !important;
  border-color: #2a2a2a !important;
  pointer-events: none;
  opacity: 0.7;
}
.session-toggle-card .dur-input {
  width: 56px;
  max-width: 100%;
  padding: 6px 8px;
  font-size: 13px;
}
.session-toggle-card label.checkbox-label {
  font-weight: 600;
  font-size: 13px;
}

/* Кликабельные карточки расписания */
a.schedule-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
a.schedule-card-link .schedule-card {
  transition: border-color .15s, transform .12s, box-shadow .15s;
  cursor: pointer;
  height: 100%;
}
a.schedule-card-link:hover .schedule-card {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  transform: translateY(-1px);
}
.schedule-card-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--accent);
  font-family: var(--font-mono);
}

/* Вкладки сессий уик-энда */
.weekend-session-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.weekend-session-tabs > a,
.weekend-session-tabs > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  min-width: 140px;
  justify-content: center;
}
.weekend-session-tabs a.is-active,
.weekend-session-tabs a:hover {
  border-color: var(--accent);
  color: #fff;
  background: rgba(var(--accent-rgb), 0.15);
}
.weekend-session-tabs span.is-missing {
  opacity: 0.4;
  cursor: default;
}


/* Межкласс picker */
.class-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.toggle-multiclass {
  font-weight: 600;
  font-size: 13px;
}
.class-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.class-chip {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.class-chip input { display: none; }
.class-chip span {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.class-chip input:checked + span {
  border-color: var(--accent);
  color: #fff;
  background: rgba(var(--accent-rgb), 0.2);
}
.is-hidden { display: none !important; }

/* ---- Календарь / недельный список на главной ---- */
.schedule-view-switch {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.schedule-view-switch a {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
}
.schedule-view-switch a.is-active {
  border-color: var(--accent);
  color: #fff;
  background: rgba(var(--accent-rgb), 0.15);
}
.week-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.week-nav .week-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
}

.cal-month {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.cal-head {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 0;
  font-family: var(--font-mono);
}
.cal-cell {
  min-height: 88px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cal-cell.is-other {
  opacity: 0.35;
}
.cal-cell.is-today {
  border-color: var(--red);
  background: rgba(var(--accent-rgb), 0.08);
  box-shadow: inset 0 0 0 1px var(--red);
}
.cal-cell.is-past {
  background: rgba(0, 0, 0, 0.18);
}
.cal-cell.is-past .cal-daynum {
  color: var(--muted);
}
.cal-cell.is-past .cal-event {
  opacity: 1;
}
.cal-cell.is-past .cal-event:hover {
  opacity: 1;
}
.cal-cell.is-today.is-past {
  background: rgba(var(--accent-rgb), 0.08);
}
.cal-daynum {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--muted);
}
.cal-event {
  display: block;
  text-decoration: none;
  color: inherit;
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 11px;
  line-height: 1.3;
  margin-top: 2px;
}
.cal-event:hover {
  background: rgba(var(--accent-rgb), 0.25);
}
.cal-event-track {
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 12px;
}
.cal-event-meta {
  color: var(--muted);
  font-size: 10px;
}
.cal-empty {
  flex: 1;
}

.week-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.week-list-card {
  display: flex;
  gap: 16px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, transform .12s;
  align-items: flex-start;
}
a.week-list-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.week-list-day {
  min-width: 56px;
  text-align: center;
}
.week-list-day .wd {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--accent);
  display: block;
}
.week-list-day .dt {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
}
.week-list-body { flex: 1; }
.week-list-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 4px;
}
.week-list-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
.week-list-sessions {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.week-list-empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 10px;
}

@media (max-width: 700px) {
  .cal-month { gap: 3px; }
  .cal-cell { min-height: 64px; padding: 4px; }
  .cal-event-track { font-size: 10px; }
  .cal-head { font-size: 10px; }
}


/* Brand title as home link */
a.brand-text-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
a.brand-text-link:hover .brand-title {
  color: var(--accent);
}

/* Calendar event styles by race type */
.cal-event.style-sprint {
  background: rgba(56, 132, 255, 0.18);
  border-color: rgba(56, 132, 255, 0.55);
}
.cal-event.style-race {
  background: rgba(var(--accent-rgb), 0.14);
  border-color: rgba(var(--accent-rgb), 0.45);
}
.cal-event.style-championship {
  background: rgba(234, 179, 8, 0.18);
  border-color: rgba(234, 179, 8, 0.55);
}
.cal-event.style-endurance {
  background: rgba(249, 115, 22, 0.18);
  border-color: rgba(249, 115, 22, 0.55);
}

.week-list-card.style-sprint { border-left: 3px solid #3884ff; }
.week-list-card.style-race { border-left: 3px solid var(--accent); }
.week-list-card.style-championship { border-left: 3px solid #eab308; }
.week-list-card.style-endurance { border-left: 3px solid #f97316; }

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--muted);
}
.cal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lg-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
  border: 1px solid transparent;
}
.lg-dot.style-sprint { background: rgba(56, 132, 255, 0.5); border-color: #3884ff; }
.lg-dot.style-race { background: rgba(var(--accent-rgb), 0.45); border-color: var(--accent); }
.lg-dot.style-championship { background: rgba(234, 179, 8, 0.5); border-color: #eab308; }
.lg-dot.style-endurance { background: rgba(249, 115, 22, 0.5); border-color: #f97316; }

.kind-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.kind-form select {
  max-width: 180px;
}


/* Объявления на главной */
.league-news-panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 28px;
}
.league-news-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.league-news-body {
  font-size: 15px;
  line-height: 1.55;
  white-space: normal;
  min-height: 72px;
}
.league-news-body ul, .league-news-body ol { margin: 8px 0; padding-left: 1.4em; }
.league-news-body li { margin: 3px 0; }
.league-news-body p { margin:0 0 12px; }
.league-news-body p:last-child { margin-bottom:0; }
.league-news-body h3 { margin:20px 0 8px; font:600 20px var(--font-display); }
.league-news-body h3:first-child { margin-top:0; }
.league-news-body li > ul,.league-news-body li > ol { margin:5px 0; }
.news-toolbar { flex-wrap:wrap; }
.league-news-meta {
  margin-top: 12px;
  font-size: 12px;
}

/* Компактный список гонок */
.races-list-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.races-search-input {
  flex: 1;
  min-width: 180px;
  max-width: 360px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.races-compact-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.race-compact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  border-left-width: 3px;
}
.race-compact-card.style-sprint { border-left-color: #3884ff; }
.race-compact-card.style-race { border-left-color: var(--accent); }
.race-compact-card.style-championship { border-left-color: #eab308; }
.race-compact-card.style-endurance { border-left-color: #f97316; }
.rc-title { font-size: 14px; }
.race-compact-card .rc-main { flex:1; min-width:0; text-decoration:none; }
.race-compact-card:focus-within { border-color:var(--accent); }
.rc-date { font-size: 12px; font-family: var(--font-mono); }
.rc-sessions { display: flex; gap: 6px; flex-wrap: wrap; }
.rc-session {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
}
.rc-session:hover { border-color: var(--accent); color: #fff; }

/* Статистика: вертикальные заголовки */
.stats-table-compact th.th-rot {
  height: 88px;
  vertical-align: bottom;
  padding: 4px 2px;
  width: 36px;
  max-width: 42px;
}
.stats-table-compact th.th-rot > span {
  display: inline-block;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
  font-size: 11px;
  line-height: 1.2;
  max-height: 80px;
}
.stats-table-compact th.th-rot .th-sub {
  font-size: 10px;
  opacity: 0.85;
  margin-top: 2px;
}
.stats-table-compact th.th-name {
  min-width: 120px;
}
.stats-table-compact td {
  padding: 6px 4px;
  text-align: center;
  font-size: 13px;
}
.stats-table-compact td.al { text-align: left; padding-left: 8px; }

/* Кастомный confirm в стиле сайта */
.site-confirm {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.site-confirm.is-open {
  display: flex;
}
.site-confirm-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
.site-confirm-card p {
  margin: 0 0 16px;
  font-size: 15px;
}
.site-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}


/* === Форма недели: исправление наложения === */
.days-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
  align-items: start !important;
}
.day-block {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
/* Развёрнутый день занимает всю ширину — сосед не сжимается */
.day-block[open] {
  grid-column: 1 / -1 !important;
}
.day-block:not([open]) {
  grid-column: auto !important;
}
.day-fields,
.day-fields.compact {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  min-width: 0 !important;
}
.day-fields .form-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  min-width: 0 !important;
}
.day-fields .form-row .field {
  flex: 1 1 140px !important;
  min-width: 0 !important;
  max-width: 100% !important;
}
.day-fields .field-narrow {
  flex: 1 1 100px !important;
  max-width: 160px !important;
}
.day-fields input[type="text"],
.day-fields select {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
.session-toggles {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
}
.session-toggle-card {
  min-width: 0 !important;
  overflow: hidden !important;
}
.session-toggle-card input[type="text"],
.session-toggle-card .dur-input {
  width: 100% !important;
  max-width: 72px !important;
}
.class-picker {
  min-width: 0 !important;
}
.pitstop-checks {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px 14px !important;
}
@media (max-width: 900px) {
  .days-grid {
    grid-template-columns: 1fr !important;
  }
  .day-block[open] {
    grid-column: auto !important;
  }
}

/* Статистика: полная ширина, читаемые заголовки */
.stats-scroll {
  width: 100%;
  overflow-x: auto;
}
.stats-table-wide {
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
}
.stats-table-wide th,
.stats-table-wide td {
  padding: 10px 12px;
  white-space: nowrap;
  font-size: 13px;
}
.stats-table-wide th.al,
.stats-table-wide td.al {
  white-space: normal;
  min-width: 140px;
  text-align: left;
}
.stats-table-wide th {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.stats-table-wide td.mono {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Тулбар дней */
.schedule-week-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 20px;
}
.schedule-week-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 165px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}
.schedule-week-card span { color: var(--muted); font-size: 12px; }
.schedule-week-card.is-selected { border-color: var(--accent); }
.schedule-week-card:hover { border-color: var(--accent); }
.schedule-week-new { justify-content: center; color: var(--accent); }
.day-races { padding: 10px 12px 14px; }
.race-editor { margin-bottom: 8px; border: 1px solid var(--border); border-radius: 8px; }
.race-editor > summary { cursor: pointer; display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; }
.race-editor > .day-fields { padding: 8px 12px 12px; }
.race-editor-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }

.planned-event-card { max-width: 720px; margin: 0 auto; text-align: left; padding: 24px; }
.planned-event-title { font-size: 18px; margin: 18px 0 14px !important; }
.planned-event-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin: 14px 0 24px; }
.planned-event-facts > div { min-width: 0; }
.planned-event-facts dt { color: var(--muted); font-size: 12px; }
.planned-event-facts dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.planned-session-list { display: grid; gap: 8px; margin-bottom: 22px; }
.planned-session { display: grid; grid-template-columns: minmax(130px, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; }
.planned-session .mono { font-weight: 600; }
@media (max-width: 600px) {
  .planned-event-facts { grid-template-columns: 1fr; }
  .planned-session { grid-template-columns: 1fr auto; }
  .planned-session .muted { grid-column: 1 / -1; }
}

.week-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}


/* Крупнее кнопки FP/Q/R в списке недели */
.week-list-sessions { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.week-list-sessions li {
  display: inline-flex;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  font-size: 14px;
  font-weight: 600;
  min-width: 110px;
  justify-content: center;
}
.rc-session {
  padding: 10px 16px !important;
  font-size: 14px !important;
  min-width: 72px;
  justify-content: center;
}

/* Темы админки по роли */
body.admin-theme-red {
  --admin-accent: var(--accent);
  --admin-glow: rgba(var(--accent-rgb), 0.25);
}
body.admin-theme-green {
  --admin-accent: #22c55e;
  --admin-glow: rgba(34, 197, 94, 0.22);
}
body.admin-theme-yellow {
  --admin-accent: #eab308;
  --admin-glow: rgba(234, 179, 8, 0.22);
}
body.admin-theme-red .site-header,
body.admin-theme-green .site-header,
body.admin-theme-yellow .site-header {
  box-shadow: inset 0 -2px 0 var(--admin-accent);
}
body.admin-theme-red .flag-strip,
body.admin-theme-green .flag-strip,
body.admin-theme-yellow .flag-strip {
  background: linear-gradient(90deg, var(--admin-accent), transparent 60%);
  opacity: 0.85;
}
.tab-admin-red { color: #ff8a80 !important; }
.tab-admin-green { color: #86efac !important; }
.tab-admin-yellow { color: #fde047 !important; }
.admin-grid .admin-card {
  border-color: color-mix(in srgb, var(--admin-accent, var(--border)) 40%, var(--border));
}
.admin-grid .admin-card:hover {
  border-color: var(--admin-accent, var(--accent));
  box-shadow: 0 0 0 1px var(--admin-glow, transparent);
}

.role-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  border-left-width: 4px;
}
.role-card.role-red { border-left-color: var(--accent); }
.role-card.role-green { border-left-color: #22c55e; }
.role-card.role-yellow { border-left-color: #eab308; }
.role-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.role-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
}
.news-toolbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.news-img {
  max-width: 100%;
  border-radius: 8px;
  margin: 8px 0;
  display: block;
}
.league-news-body img.news-img { max-height: 360px; object-fit: contain; }
.news-preview-wrap {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.news-preview-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.news-preview {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--surface);
  min-height: 40px;
}
.news-preview ul, .news-preview ol { margin: 8px 0; padding-left: 1.4em; }
.news-preview li { margin: 2px 0; }
.news-upload-form {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}


/* ---- tables (admin dashboard recent races) ---- */
.table-wrap { overflow-x: auto; margin-top: 8px; }
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
table.data-table th,
table.data-table td {
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--border);
}
table.data-table th {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}


/* ========== P0: Dashboard summary + primary/secondary ========== */
.dash-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
  padding: 16px;
  background: linear-gradient(180deg, var(--surface-alt), var(--surface));
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.dash-summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.dash-summary-item.is-warn { border-color: rgba(var(--accent-rgb), 0.45); }
.dash-summary-item.is-ok { border-color: rgba(47, 158, 100, 0.45); }
.dash-summary-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.dash-summary-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
}
.dash-summary-hint {
  font-size: 12px;
  color: var(--muted);
}
.dash-warn-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dash-warn-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.dash-warn-list a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dashed var(--border);
}
.dash-warn-list a:hover { color: var(--accent); border-color: var(--accent); }

.admin-grid-primary {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}
.admin-card-primary {
  padding: 22px 20px;
  min-height: 96px;
  border-width: 2px;
}
.admin-card-primary strong {
  font-size: 19px;
}

.dash-secondary { margin-top: 12px; }
.admin-grid-secondary {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}
.admin-card-secondary {
  padding: 12px 14px;
  min-height: auto;
  opacity: 0.92;
}
.admin-card-secondary strong {
  font-size: 14px;
}
.admin-card-secondary .muted {
  font-size: 12px;
}

/* ========== P0: Pilot card ========== */
.pilot-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.pilot-hero-main {
  display: flex;
  align-items: center;
  gap: 16px;
}
.pilot-number {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  min-width: 72px;
}
.pilot-name {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.01em;
}
.pilot-hero-side {
  display: flex;
  align-items: center;
  gap: 16px;
}
.pilot-hero-points {
  text-align: right;
  display: flex;
  flex-direction: column;
}
.pilot-layout {
  display: grid;
  grid-template-columns: 1fr minmax(200px, 280px);
  gap: 20px;
  align-items: start;
}
.me-profile-form { max-width: 480px; padding: 18px; }
.me-profile-form textarea { display: block; width: 100%; padding: 10px 12px; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 6px; font: inherit; resize: vertical; }
.me-profile-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.me-applications { display: grid; gap: 8px; min-width: 0; }
/* Справочник пилота: нативные раскрывающиеся ответы и лёгкий поиск. */
.help-inline-links { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0 20px; color: var(--muted); font-size: 12px; }
.footer-inner .help-inline-links { margin: 0; }
.help-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 22px 0 26px; }
.help-search-column { display: grid; grid-template-rows: auto 1fr; gap: 10px; min-width: 0; }
.help-tools-label { font-size: 13px; color: var(--muted); }
.help-search { min-width: 0; padding: 20px; border: 1px solid var(--border); border-top: 3px solid var(--accent); background: var(--surface); border-radius: 8px; }
.help-search input { width: 100%; min-width: 0; border: 1px solid var(--border); border-radius: 6px; padding: 12px; background: var(--surface-alt); color: var(--text); font: inherit; }
.help-search p { font-size: 12px; margin: 8px 0 0; }
.help-search p:empty { display: none; }
.help-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-content: start; }
.help-topics-label { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.help-color-registration { --help-color: #269dff; }
.help-color-connection { --help-color: #00d69b; }
.help-color-liveries { --help-color: #a66aff; }
.help-color-race { --help-color: #ff922b; }
.help-color-results { --help-color: #ffd028; }
.help-color-troubleshooting { --help-color: #00c9e8; }
.help-topic { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid #3c3e44; border-left: 4px solid var(--help-color); border-radius: 8px; background: var(--surface-alt); color: var(--text); font-size: 14px; font-weight: 600; line-height: 1.4; text-decoration: none; transition: background .15s, border-color .15s; }
.help-topic:hover { background: #292126; border-top-color: var(--accent); border-right-color: var(--accent); border-bottom-color: var(--accent); color: #fff; text-decoration: none; }
.help-topic-number { display: grid; place-items: center; flex: 0 0 28px; height: 28px; border-radius: 6px; background: var(--help-color); color: #101114; font: 700 14px var(--font-mono); }
.help-section-number, .faq-question-number { color: var(--help-color); font-family: var(--font-mono); }
.faq-question-number { margin-right: 6px; }
.header-help-links { display: flex; gap: 8px; flex-wrap: wrap; align-items:center; align-self: center; margin-left: auto; }
.header-help-links a { display: inline-flex; align-items: center; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-alt); color: var(--text); text-decoration: none; font-size: 12px; font-weight: 600; }
.header-help-links a:first-child { border-left: 3px solid var(--accent); }
.header-help-links a:hover { border-color: var(--accent); background: rgba(var(--accent-rgb), .1); }
.header-help-links a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.header-help-links a { gap:6px; box-sizing:border-box; height:36px; line-height:1; }
.header-timezone { position:relative; line-height:0; }
.header-timezone summary,.theme-toggle { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:36px; padding:8px 12px; box-sizing:border-box; border:1px solid var(--border); border-radius:6px; background:var(--surface-alt); color:var(--text); font:600 12px var(--font-body); cursor:pointer; list-style:none; }
.header-timezone summary::-webkit-details-marker { display:none; }
.header-timezone summary,.theme-toggle { height:36px; line-height:1; }
.header-timezone summary:hover,.theme-toggle:hover { border-color:var(--accent); }
.header-timezone summary:focus-visible,.theme-toggle:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.header-timezone .display-settings-panel { position:absolute; right:0; top:calc(100% + 10px); width:min(340px,calc(100vw - 32px)); box-sizing:border-box; z-index:100; padding:20px; border:1px solid var(--border); border-radius:10px; background:var(--surface); box-shadow:0 12px 40px #0004; display:grid; gap:12px; }
.header-timezone:not([open]) .display-settings-panel { display:none; }
.header-timezone .display-settings-panel { line-height:1.5; }
.header-timezone select { width:100%; min-width:0; }
.header-timezone .display-settings-panel p { margin:0; font-size:12px; line-height:1.5; }
.theme-toggle { width:38px; padding:6px; font-size:21px; }
.theme-icon-dark,html[data-theme="light"] .theme-icon-light { display:none; }
html[data-theme="light"] .theme-icon-dark { display:inline; }
@media(prefers-reduced-motion:no-preference) {
  .theme-changing body,.theme-changing .site-header,.theme-changing .pilot-card { transition:background-color .25s ease,color .25s ease,border-color .25s ease; }
  .theme-changing .theme-toggle { animation:theme-turn .28s ease; }
  @keyframes theme-turn { from { transform:rotate(-50deg); } to { transform:rotate(0); } }
}
@media(max-width:700px) {
  .header-help-links { position:relative; }
  .header-timezone { position:static; }
  .header-timezone .display-settings-panel { left:0; right:auto; }
  .header-timezone summary,.theme-toggle,.header-help-links a { height:40px; min-height:40px; }
}
@media (max-width: 700px) { .header-help-links { width: 100%; margin: 0; } .header-help-links a { padding: 7px 10px; } }
.help-section { scroll-margin-top: 20px; margin-bottom: 12px; border: 1px solid var(--border); border-left: 3px solid var(--help-color); border-radius: 10px; background: var(--surface); }
.help-section-heading { cursor: pointer; padding: 18px 20px; color: var(--text); font-size: 17px; font-weight: 600; line-height: 1.5; }
.help-section-heading::marker { color: var(--help-color); }
.help-section-heading::-webkit-details-marker { color: var(--help-color); }
.help-section-count { float: right; margin-left: 12px; font-size: 12px; font-weight: 400; color: var(--muted); }
.help-section-body { padding: 0 16px 8px; }
.help-rules-banner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 18px 22px; margin: 0 0 22px; background: rgba(232,185,35,.045); border: 1px solid rgba(232,185,35,.24); border-left: 3px solid var(--gold); border-radius: 10px; }
.help-rules-banner strong { color: var(--gold); font-size: 15px; }
.help-rules-banner p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.help-banner-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn.help-action { color: #a9d4f3; background: rgba(74,145,200,.12); border: 1px solid rgba(121,185,232,.35); white-space: normal; }
.btn.help-action:hover { background: rgba(74,145,200,.23); border-color: #79b9e8; }
.btn.help-action-discord { color: #c9caff; background: rgba(88,101,242,.13); border-color: rgba(138,147,255,.4); }
.btn.help-action-discord:hover { background: rgba(88,101,242,.25); border-color: #8a93ff; }
.btn.help-rules-action { color: #edcf70; background: rgba(232,185,35,.1); border: 1px solid rgba(232,185,35,.35); white-space: normal; }
.btn.help-rules-action:hover { background: rgba(232,185,35,.2); border-color: var(--gold); }
.help-topic:focus-visible, .help-section-heading:focus-visible, .faq-item summary:focus-visible { outline: 2px solid #79b9e8; outline-offset: 3px; }
.faq-item { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); margin-bottom: 8px; scroll-margin-top: 20px; }
.faq-item summary { cursor: pointer; padding: 16px 20px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.faq-item[open] summary { border-bottom: 1px solid var(--border); }
.faq-answer { padding: 8px 20px 18px; font-size: 14px; line-height: 1.75; overflow-wrap: anywhere; }
.faq-answer ol, .faq-answer ul { padding-left: 22px; }
.faq-answer li { margin: 8px 0; }
.faq-answer pre { white-space: pre; overflow-x: auto; max-width: 100%; padding: 16px; background: var(--bg); border-radius: 6px; font-size: 12px; line-height: 1.7; }
.faq-sources { display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.help-pending { color: var(--muted); font-size: 13px; }
.rules-panel { padding: 22px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); margin-bottom: 16px; overflow-wrap: anywhere; }
.rules-panel h3 { margin-top: 0; }
.rules-panel p { font-size: 14px; line-height: 1.7; color: var(--muted); }
.rules-text { white-space: pre-wrap; line-height: 1.8; font-size: 14px; }
.rules-draft { padding: 20px; background: var(--surface-alt); border-left: 3px solid var(--gold); border-radius: 8px; margin-bottom: 22px; }
.rules-draft p { margin-bottom: 0; font-size: 13px; line-height: 1.7; color: var(--muted); }
.rules-outline { display:flex; flex-wrap:wrap; gap:14px; }
.rules-outline > .rules-panel { flex:1 1 calc(50% - 7px); min-width:0; box-sizing:border-box; }
.rules-outline .rules-panel { margin: 0; }
.help-settings-form { margin-bottom: 32px; }
.help-settings-form textarea { min-width: 0; width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-alt); color: var(--text); font: inherit; resize: vertical; }
.help-section[hidden], .faq-item[hidden], #faq-empty[hidden] { display: none; }
@media (max-width: 760px) { .help-tools { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .rules-outline { grid-template-columns: 1fr; } .faq-item summary { padding: 14px 16px; } .faq-answer { padding: 6px 16px 16px; } .help-search, .rules-panel, .help-rules-banner { padding: 16px; } .help-topic { padding: 12px; font-size: 13px; } .help-section-heading { padding: 16px 12px; font-size: 15px; } .help-section-count { float: none; display: block; margin-left: 20px; } .help-section-body { padding: 0 8px 8px; } }
.cabinet-onboarding { margin: 18px 0 28px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.onboarding-head { padding: 22px 24px 0; }
.onboarding-head h2 { margin: 6px 0 8px; }
.onboarding-head p { margin: 0; max-width: 720px; font-size: 13px; line-height: 1.6; }
.onboarding-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; list-style: none; margin: 0; padding: 24px; }
.onboarding-step { position: relative; display: flex; align-items: flex-start; gap: 10px; min-width: 0; padding: 14px 10px; border: 1px solid var(--border); border-radius: 8px; }
.onboarding-step:not(:last-child)::after { content: '→'; position: absolute; right: -13px; top: 22px; color: var(--muted); font-size: 14px; }
.onboarding-marker { display: grid; place-items: center; flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--surface-alt); font: 700 14px var(--font-mono); }
.onboarding-step strong { display: block; font-size: 13px; line-height: 1.4; }
.onboarding-state { display: block; margin-top: 6px; font-size: 11px; color: var(--muted); }
.onboarding-step p { font-size: 12px; line-height: 1.5; color: var(--muted); margin: 8px 0 0; }
.onboarding-step.is-current { border-color: var(--accent); background: var(--surface-alt); }
.onboarding-step.is-current .onboarding-marker { background: var(--accent); color: #101216; }
.onboarding-step.is-done .onboarding-marker { color: var(--green, #65c79a); background: rgba(101, 199, 154, .12); }
.onboarding-step.is-done .onboarding-state { color: var(--green, #65c79a); }
.onboarding-step.is-waiting .onboarding-marker { color: var(--muted); }
.onboarding-next { border-top: 1px solid var(--border); padding: 20px 24px; }
.onboarding-next > p { max-width: 780px; font-size: 13px; line-height: 1.6; margin: 8px 0 16px; color: var(--muted); }
.onboarding-account-help { margin-top: 16px; color: var(--muted); font-size: 12px; }
.onboarding-account-help summary { cursor: pointer; }
.cabinet-onboarding > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px; cursor: pointer; list-style: none; }
.cabinet-onboarding > summary::-webkit-details-marker { display: none; }
.onboarding-summary { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.onboarding-check { color: var(--green, #65c79a); font-size: 20px; }
.cabinet-onboarding.is-complete[open] > summary { border-bottom: 1px solid var(--border); }
.cabinet-competitions { margin: 0 0 30px; }
.cabinet-section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.cabinet-section-head h3 { margin: 0; }
.cabinet-competitions > p { font-size: 13px; line-height: 1.6; }
.cabinet-entry > div { flex: 1 1 250px; min-width: 0; }
.cabinet-entry p { font-size: 13px; line-height: 1.6; margin: 8px 0 0; color: var(--muted); }
.cabinet-entry .me-application-crews { padding: 8px 0 0; }
.cabinet-open-seasons { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.cabinet-season-link { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); overflow-wrap: anywhere; }
.cabinet-season-link:hover { border-color: var(--accent); }
.cabinet-season-link span { font-size: 12px; color: var(--muted); }
@media (max-width: 960px) { .onboarding-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .onboarding-step:nth-child(2)::after { content: none; } }
@media (max-width: 540px) { .onboarding-head, .onboarding-next { padding: 18px; } .onboarding-steps { grid-template-columns: 1fr; gap: 10px; padding: 18px; } .onboarding-step:not(:last-child)::after { content: none; } .cabinet-onboarding > summary { padding: 16px 18px; align-items: flex-start; flex-direction: column; } .onboarding-summary { font-size: 13px; } .cabinet-open-seasons { grid-template-columns: 1fr; } }
.me-application { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; min-width: 0; }
.me-application-title { min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.me-application .pill { flex: 0 0 auto; }
.me-application-crews { display: grid; gap: 4px; padding: 0 12px 8px; font-size: 12px; line-height: 1.6; }
.pilot-side-col { min-width: 0; }
@media (max-width: 800px) {
  .pilot-layout { grid-template-columns: 1fr; }
  .pilot-name { font-size: 26px; }
  .pilot-number { font-size: 36px; }
}
.stat-cards-compact {
  margin-bottom: 12px;
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
}
.stat-cards-compact .stat-card {
  padding: 8px 10px;
  gap: 2px;
}
.stat-cards-compact .stat-value {
  font-size: 16px;
}
.stat-cards-compact .stat-label {
  font-size: 10px;
}
.place-grid-side {
  grid-template-columns: repeat(4, 1fr);
}

/* ========== Pilot card: единый формат стат-карточек + недавние гонки ========== */
.pilot-card-layout {
  grid-template-columns: minmax(0, 1fr) minmax(200px, 300px);
  gap: 24px;
}
@media (max-width: 860px) {
  .pilot-card-layout { grid-template-columns: 1fr; }
}
.stat-cards-unified {
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.stat-cards-unified .stat-card { padding: 10px 12px; }
.stat-cards-unified .stat-value { font-size: 18px; }
.stat-cards-unified .stat-label { font-size: 11px; }
.identity-cards { margin-top: 4px; }
.pilot-first-race { display:grid; line-height:1.05; white-space:nowrap; }
.pilot-first-race small { margin-top:3px; color:var(--muted); font-size:12px; font-weight:600; }
.pilot-stats-empty { margin-bottom:16px; }
.pilot-competition-bar { margin-bottom:16px; }
.pilot-stats-loading { display:none; color:var(--muted); font-size:13px; }
#pilot-stats-controls[aria-busy="true"] .pilot-stats-loading { display:inline; }

.pill-status {
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 13px;
  padding: 5px 12px;
}

.recent-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.recent-result {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-left: 3px solid var(--border);
  font-size: 12px;
}
.recent-result .rr-track {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recent-result .rr-date {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.recent-result .rr-flag { font-size: 14px; }
.recent-result .rr-place { display: inline-flex; }
.recent-result.style-weekend { border-left-color: var(--red); }
.recent-result.style-championship { border-left-color: var(--gold); }
.recent-result.style-endurance { border-left-color: #f97316; }

.pilot-track-records { margin-top: 28px; }
.side-records-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
}

/* ========== P0: Pilots admin toolbar ========== */
.pilots-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
.pilots-toolbar .search-input {
  flex: 1;
  min-width: 180px;
}
.pilots-toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sort-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
}
.sort-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}


/* ===== P1 status colors (admin races) ===== */
.status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
.status-chip {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.status-not-added {
  background: rgba(150, 153, 158, 0.12);
  color: var(--muted);
  border-color: var(--border);
}
.status-added {
  background: rgba(47, 158, 100, 0.16);
  color: #6ee7a8;
  border-color: rgba(47, 158, 100, 0.45);
}
.status-recent {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.5);
}
.status-dup {
  background: rgba(234, 179, 8, 0.15);
  color: #fde047;
  border-color: rgba(234, 179, 8, 0.45);
}
.weekend-card.is-not-added { border-left: 3px solid var(--muted); }
.weekend-card.is-added { border-left: 3px solid var(--green); }
.weekend-card.is-recent { border-left: 3px solid #3b82f6; }
.weekend-card.has-dups { box-shadow: inset 0 0 0 1px rgba(234, 179, 8, 0.25); }
.session-item.is-not-added { opacity: 0.95; }
.session-item.is-added .session-btn { border-color: rgba(47, 158, 100, 0.35); }
.session-item.is-recent .session-btn { border-color: rgba(59, 130, 246, 0.5); }
.admin-race-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

/* ===== P2 public filters / stage card ===== */
.public-filters {
  margin: 12px 0 4px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.stage-card-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}
.stage-card-line .sc-sep { color: var(--muted); }

/* ===== P4 section colors on dashboard ===== */
.section-announcements { color: #86efac; }
.section-settings { color: #fca5a5; }
.section-pilots { color: #fde047; }
.section-races { color: #93c5fd; }
.dash-secondary .section-announcements + .admin-grid .admin-card {
  border-color: rgba(34, 197, 94, 0.35);
}
.dash-secondary .section-settings + .admin-grid .admin-card {
  border-color: rgba(239, 68, 68, 0.35);
}
.dash-secondary .section-pilots + .admin-grid .admin-card {
  border-color: rgba(234, 179, 8, 0.35);
}

/* roles permission matrix */
.roles-perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.role-perm-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.role-perm-card.role-color-green { border-color: rgba(34, 197, 94, 0.45); }
.role-perm-card.role-color-yellow { border-color: rgba(234, 179, 8, 0.45); }
.rank-rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.rank-card-wrap {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: box-shadow 0.15s, opacity 0.15s;
}
.rank-card-wrap.rank-dragging { opacity: 0.35; box-shadow: 0 0 0 2px var(--accent, #3b82f6); }
.rank-card-inner { overflow: hidden; }
.rank-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 36px 10px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.rank-card-header::-webkit-details-marker { display: none; }
.rank-card-header::marker { display: none; content: ''; }
.rank-drag-handle {
  position: absolute;
  right: 10px;
  top: 10px;
  cursor: grab;
  color: var(--muted, #888);
  font-size: 18px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  z-index: 2;
}
.rank-drag-handle:hover { background: var(--border, #333); }
.rank-drag-handle:active { cursor: grabbing; }
.rank-card-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--border, #333);
  color: var(--text, #fff);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.rank-card-color {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.rank-card-name {
  font-weight: 600;
  font-size: 14px;
}
.rank-card-id {
  font-size: 11px;
  font-family: monospace;
}
.rank-card-chevron {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted, #888);
  transition: transform 0.15s;
}
.rank-card-inner[open] > .rank-card-header .rank-card-chevron { transform: rotate(90deg); }
.rank-card-body {
  padding: 0 14px 14px;
}
.rank-card-top {
  display: flex;
  gap: 8px;
  align-items: end;
  margin-bottom: 10px;
}
.rank-color-picker {
  width: 32px;
  height: 26px;
  padding: 1px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  cursor: pointer;
  flex-shrink: 0;
}
.rank-params-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 12px;
}
.rank-param-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
}
.rank-req-check {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  accent-color: var(--accent, #3b82f6);
}
.rank-label {
  font-size: 12px;
  color: var(--text);
  min-width: 90px;
  flex-shrink: 0;
}
.perm-checks {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.perm-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.perm-group-title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
}
.perm-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
}
.role-badge.role-color-green { color: #86efac; }
.role-badge.role-color-yellow { color: #fde047; }
.role-badge.role-color-red { color: #fca5a5; }


/* Championship sprint — близко к жёлтому */
.cal-event.style-championship_sprint,
.cal-event.style-championship-sprint {
  border-left-color: #fbbf24;
  background: rgba(251, 191, 36, 0.14);
}
.week-list-card.style-championship_sprint,
.week-list-card.style-championship-sprint { border-left: 3px solid #fbbf24; }
.race-compact-card.style-championship_sprint,
.race-compact-card.style-championship-sprint { border-left-color: #fbbf24; }
.lg-dot.style-championship-sprint,
.lg-dot.style-championship_sprint {
  background: rgba(251, 191, 36, 0.55);
  border-color: #fbbf24;
}

/* Stage cards: larger track + duration, sessions gray small */
.stage-card-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
}
.stage-card-main .sc-track {
  font-family: var(--font-display);
  font-size: 1.05em;
  font-weight: 700;
}
.stage-card-main .sc-dur {
  font-family: var(--font-mono);
  font-size: 0.95em;
  color: var(--text);
  font-weight: 600;
}
.stage-sessions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.sess-tag {
  font-size: 11px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  text-decoration: none;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.sess-tag:hover { color: var(--text); border-color: var(--muted); }
.cal-legend {
  flex-wrap: wrap;
  row-gap: 6px;
}


/* ===== Compact calendar events (one line) ===== */
.cal-cell {
  min-height: 72px;
  max-height: 120px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 5px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cal-event {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 4px;
  padding: 2px 4px;
  font-size: 10px;
  line-height: 1.2;
  margin-top: 1px;
  border: 1px solid transparent;
  border-left-width: 3px;
  overflow: hidden;
  max-width: 100%;
}
.cal-event-line {
  display: flex;
  align-items: baseline;
  gap: 3px;
  white-space: nowrap;
  overflow: hidden;
  min-width: 0;
  width: 100%;
}
.cal-event-line .sc-flag {
  flex: 0 0 auto;
  font-size: 10px;
}
.country-flag-icon {
  display: inline-block;
  width: 1.35em;
  height: 0.95em;
  object-fit: cover;
  vertical-align: -0.04em;
  border-radius: 2px;
}
.cal-event-line .sc-track {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 10px;
}
.cal-event-line .sc-dur {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
}

/* 3 global categories */
.cal-event.style-weekend,
.week-list-card.style-weekend,
.race-compact-card.style-weekend {
  border-left-color: #64748b;
  background: rgba(100, 116, 139, 0.12);
  border-color: rgba(100, 116, 139, 0.35);
}
.cal-event.style-championship,
.week-list-card.style-championship,
.race-compact-card.style-championship {
  border-left-color: #eab308;
  background: rgba(234, 179, 8, 0.14);
  border-color: rgba(234, 179, 8, 0.4);
}
.cal-event.style-endurance,
.week-list-card.style-endurance,
.race-compact-card.style-endurance {
  border-left-color: #f97316;
  background: rgba(249, 115, 22, 0.14);
  border-color: rgba(249, 115, 22, 0.4);
}
.lg-dot.style-weekend { background: rgba(100, 116, 139, 0.5); border-color: #64748b; }
.lg-dot.style-championship { background: rgba(234, 179, 8, 0.55); border-color: #eab308; }
.lg-dot.style-endurance { background: rgba(249, 115, 22, 0.55); border-color: #f97316; }

.cal-legend-note {
  font-size: 11px;
  margin-left: 4px;
}
.week-list-card.style-weekend { border-left: 3px solid #64748b; }
.week-list-card.style-championship { border-left: 3px solid #eab308; }
.week-list-card.style-endurance { border-left: 3px solid #f97316; }
.race-compact-card.style-weekend { border-left-color: #64748b; }
.race-compact-card.style-championship { border-left-color: #eab308; }
.race-compact-card.style-endurance { border-left-color: #f97316; }

/* week/list: single line title */
.week-list-title.stage-card-main,
.rc-title.stage-card-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
}
.week-list-title .sc-track,
.rc-title .sc-track {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.week-list-title .sc-dur,
.rc-title .sc-dur {
  flex-shrink: 0;
  font-family: var(--font-mono);
  color: var(--muted);
}


/* ===== Calendar size + colors (v2) ===== */
.cal-cell {
  min-height: 96px;
  max-height: 160px;
  padding: 6px 7px;
  gap: 3px;
}
.cal-event {
  padding: 4px 6px;
  font-size: 11px;
  border-radius: 5px;
  margin-top: 2px;
}
.cal-event-line .sc-flag { font-size: 11px; }
.cal-event-line .sc-track {
  font-size: 12px;
  font-weight: 700;
}
.cal-event-line .sc-dur {
  font-size: 10px;
  color: var(--text);
  opacity: 0.85;
}
.event-timing { display:flex; align-items:center; flex-wrap:wrap; gap:3px 8px; margin-top:4px; font-size:10px; line-height:1.4; color:var(--muted); }
.event-start { display:inline-flex; align-items:center; gap:4px; white-space:nowrap; }
.event-start strong { color:var(--text); font-size:11px; font-weight:600; }
.event-duration { white-space:nowrap; padding-left:7px; border-left:1px solid var(--border); }
.event-duration:first-child { padding-left:0; border-left:0; }
.week-list-card .event-timing { font-size:12px; margin-top:6px; }
.week-list-card .event-start strong { font-size:13px; }

/* Уикенд — голубой (как старый спринт) */
.cal-event.style-weekend,
.week-list-card.style-weekend,
.race-compact-card.style-weekend {
  border-left-color: #3884ff !important;
  background: rgba(56, 132, 255, 0.14) !important;
  border-color: rgba(56, 132, 255, 0.4) !important;
}
.week-list-card.style-weekend { border-left: 3px solid #3884ff !important; }
.race-compact-card.style-weekend { border-left-color: #3884ff !important; }
.lg-dot.style-weekend {
  background: rgba(56, 132, 255, 0.55) !important;
  border-color: #3884ff !important;
}

/* Практика — серый */
.cal-event.style-practice,
.week-list-card.style-practice,
.race-compact-card.style-practice {
  border-left-color: #6b7280 !important;
  background: rgba(107, 114, 128, 0.14) !important;
  border-color: rgba(107, 114, 128, 0.4) !important;
}
.week-list-card.style-practice { border-left: 3px solid #6b7280 !important; }
.lg-dot.style-practice {
  background: rgba(107, 114, 128, 0.5) !important;
  border-color: #6b7280 !important;
}

.cal-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0 14px;
}
.cal-legend-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.cal-legend-dur {
  font-size: 12px;
  padding-left: 2px;
}
.cal-legend-dur .leg-sep { opacity: 0.5; }


/* ===== Category colors v3 ===== */
.cal-event.style-weekend-sprint,
.week-list-card.style-weekend-sprint,
.race-compact-card.style-weekend-sprint,
.cal-event.style-weekend {
  border-left-color: #3884ff !important;
  background: rgba(56, 132, 255, 0.16) !important;
  border-color: rgba(56, 132, 255, 0.45) !important;
}
.week-list-card.style-weekend-sprint { border-left: 3px solid #3884ff !important; }
.lg-dot.style-weekend-sprint, .lg-dot.style-weekend {
  background: rgba(56, 132, 255, 0.55) !important;
  border-color: #3884ff !important;
}

.cal-event.style-weekend-race,
.week-list-card.style-weekend-race,
.race-compact-card.style-weekend-race {
  border-left-color: var(--accent) !important;
  background: rgba(var(--accent-rgb), 0.14) !important;
  border-color: rgba(var(--accent-rgb), 0.4) !important;
}
.week-list-card.style-weekend-race { border-left: 3px solid var(--accent) !important; }
.lg-dot.style-weekend-race {
  background: rgba(var(--accent-rgb), 0.5) !important;
  border-color: var(--accent) !important;
}

/* Чемп. спринт — светлее жёлтый */
.cal-event.style-championship-sprint,
.cal-event.style-championship_sprint,
.week-list-card.style-championship-sprint,
.week-list-card.style-championship_sprint,
.race-compact-card.style-championship-sprint,
.race-compact-card.style-championship_sprint {
  border-left-color: rgb(255, 235, 100) !important;
  background: rgba(255, 235, 100, 0.22) !important;
  border-color: rgba(255, 235, 100, 0.55) !important;
}
.week-list-card.style-championship-sprint,
.week-list-card.style-championship_sprint { border-left: 3px solid rgb(255, 235, 100) !important; }
.lg-dot.style-championship-sprint {
  background: rgba(255, 235, 100, 0.8) !important;
  border-color: rgb(255, 222, 0) !important;
}

/* Чемпионат гонка */
.cal-event.style-championship,
.week-list-card.style-championship,
.race-compact-card.style-championship {
  border-left-color: rgb(255, 222, 0) !important;
  background: rgba(255, 222, 0, 0.2) !important;
  border-color: rgba(255, 222, 0, 0.55) !important;
}
.week-list-card.style-championship { border-left: 3px solid rgb(255, 222, 0) !important; }
.lg-dot.style-championship {
  background: rgba(255, 222, 0, 0.8) !important;
  border-color: rgb(255, 222, 0) !important;
}

/* Session buttons FP Q R */
.sess-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.sess-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}
.sess-btn.session-fp { background: rgba(100,116,139,0.35); border-color: rgba(148,163,184,0.5); }
.sess-btn.session-q { background: rgba(56,132,255,0.3); border-color: rgba(56,132,255,0.55); }
.sess-btn.session-r { background: rgba(var(--accent-rgb), 0.35); border-color: rgba(var(--accent-rgb), 0.55); }
.sess-btn:hover { filter: brightness(1.2); }

a.race-compact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
a.race-compact-card:hover {
  border-color: var(--accent);
  background: rgba(255,255,255,0.03);
}
a.race-compact-card .rc-sessions {
  flex-shrink: 0;
  margin-left: auto;
}

/* Weekend page session tabs — larger, no participant count */
.weekend-session-tabs > a,
.weekend-session-tabs > span {
  font-size: 16px !important;
  font-weight: 700 !important;
  padding: 12px 22px !important;
  letter-spacing: 0.02em;
}
.weekend-session-tabs a.is-active {
  background: var(--action) !important;
  color: var(--action-ink) !important;
}


/* ===== Event style colors FINAL (hyphen + underscore) ===== */
.cal-event,
.week-list-card,
.race-compact-card {
  border-style: solid;
  border-width: 1px;
}
.cal-event {
  border-left-width: 3px !important;
}

.cal-event.style-weekend-sprint, .cal-event.style-weekend_sprint,
.week-list-card.style-weekend-sprint, .week-list-card.style-weekend_sprint,
.race-compact-card.style-weekend-sprint, .race-compact-card.style-weekend_sprint {
  border-color: rgba(var(--event-short-rgb), 0.5) !important;
  border-left-color: var(--event-short) !important;
  background: rgba(var(--event-short-rgb), 0.16) !important;
}
.lg-dot.style-weekend-sprint { background: rgba(var(--event-short-rgb),0.55) !important; border-color: var(--event-short) !important; }

.cal-event.style-weekend-race, .cal-event.style-weekend_race,
.week-list-card.style-weekend-race, .week-list-card.style-weekend_race,
.race-compact-card.style-weekend-race, .race-compact-card.style-weekend_race {
  border-color: rgba(var(--accent-rgb), 0.45) !important;
  border-left-color: var(--accent) !important;
  background: rgba(var(--accent-rgb), 0.14) !important;
}
.lg-dot.style-weekend-race { background: rgba(var(--accent-rgb), 0.5); border-color: var(--accent); }

.cal-event.style-championship-sprint, .cal-event.style-championship_sprint,
.week-list-card.style-championship-sprint, .week-list-card.style-championship_sprint,
.race-compact-card.style-championship-sprint, .race-compact-card.style-championship_sprint {
  --event-format-color: var(--event-championship-sprint);
  border-color: rgba(var(--event-championship-sprint-rgb), 0.36) !important;
  border-left-color: var(--event-championship-sprint) !important;
  background: rgba(var(--event-championship-sprint-rgb), 0.10) !important;
}
.lg-dot.style-championship-sprint { background: rgba(var(--event-championship-sprint-rgb),0.3) !important; border-color: var(--event-championship-sprint) !important; }

.cal-event.style-championship,
.week-list-card.style-championship,
.race-compact-card.style-championship {
  --event-format-color: var(--event-championship);
  border-color: rgba(var(--event-championship-rgb), 0.65) !important;
  border-left-color: var(--event-championship) !important;
  background: rgba(var(--event-championship-rgb), 0.24) !important;
}
.lg-dot.style-championship { background: rgba(var(--event-championship-rgb),0.85) !important; border-color: var(--event-championship) !important; }
.calendar-event-format { display:block; margin-top:4px; color:var(--event-format-color,var(--text)); font:700 9px/1.4 var(--font-body); }
.week-list-card .calendar-event-format { font-size:11px; }
.calendar-scroll { overflow-x:auto; }
.calendar-scroll .cal-cell { max-height:none; }
.calendar-scroll .cal-event { flex-shrink:0; }
.calendar-scroll-hint { display:none; }
@media(max-width:700px) { .calendar-scroll .cal-month { min-width:840px; }.calendar-scroll-hint { display:block; margin:8px 0; font-size:11px; line-height:1.6; } }

.cal-event.style-endurance,
.week-list-card.style-endurance,
.race-compact-card.style-endurance {
  border-color: rgba(249, 115, 22, 0.5) !important;
  border-left-color: #f97316 !important;
  background: rgba(249, 115, 22, 0.16) !important;
}
.lg-dot.style-endurance { background: rgba(249,115,22,0.55); border-color: #f97316; }

.cal-event.style-practice,
.week-list-card.style-practice,
.race-compact-card.style-practice {
  border-color: rgba(107, 114, 128, 0.5) !important;
  border-left-color: #6b7280 !important;
  background: rgba(107, 114, 128, 0.16) !important;
}
.lg-dot.style-practice { background: rgba(107,114,128,0.5); border-color: #6b7280; }

/* ===== Pill style colors (calendar page) ===== */
.pill.style-weekend-sprint, .pill.style-weekend_sprint {
  background: rgba(var(--event-short-rgb), 0.16) !important;
  border-color: rgba(var(--event-short-rgb), 0.5) !important;
  color: var(--event-short) !important;
}
.pill.style-weekend-race, .pill.style-weekend_race {
  background: rgba(var(--accent-rgb), 0.14) !important;
  border-color: rgba(var(--accent-rgb), 0.45) !important;
  color: #fca5a5 !important;
}
.pill.style-championship-sprint, .pill.style-championship_sprint {
  background: rgba(var(--event-championship-sprint-rgb), 0.10) !important;
  border-color: rgba(var(--event-championship-sprint-rgb), 0.36) !important;
  color: var(--event-championship-sprint) !important;
}
.pill.style-championship {
  background: rgba(var(--event-championship-rgb), 0.24) !important;
  border-color: rgba(var(--event-championship-rgb), 0.65) !important;
  color: var(--event-championship) !important;
}
.pill.style-endurance {
  background: rgba(249, 115, 22, 0.16) !important;
  border-color: rgba(249, 115, 22, 0.5) !important;
  color: #fdba74 !important;
}
.pill.style-practice {
  background: rgba(107, 114, 128, 0.16) !important;
  border-color: rgba(107, 114, 128, 0.5) !important;
  color: #9ca3af !important;
}

.week-list-card { border-left-width: 3px !important; }
.race-compact-card { border-left-width: 3px !important; }


/* Pilot hero: «Пилот» над номером, слева */
.pilot-id-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.pilot-eyebrow {
  color: var(--muted) !important;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
}
.pilot-id-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.pilot-hero.has-team .pilot-number { color: var(--pilot-team-primary); }
.pilot-card.has-team .pilot-card-number { color: var(--pilot-team-primary); }

/* Site version */
.site-version {
  color: var(--muted);
  font-size: 11px;
  font-family: var(--font-mono);
  opacity: 0.55;
  margin-left: auto;
  padding-left: 12px;
  cursor: pointer;
  list-style: none;
}
.site-version::-webkit-details-marker { display: none; }
.changelog-wrap { position: relative; margin-left: auto; }
.changelog-popup {
  display: none;
  position: absolute;
  bottom: 24px;
  right: 0;
  width: 420px;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  z-index: 100;
}
.changelog-wrap[open] .changelog-popup { display: block; }
.changelog-popup h3 {
  font-size: 16px;
  margin: 0 0 14px;
  color: var(--text);
}
.changelog-body { font-size: 13px; line-height: 1.5; }
.cl-ver { margin-bottom: 14px; }
.cl-ver:last-child { margin-bottom: 0; }
.cl-ver h4 {
  font-size: 13px;
  color: var(--accent);
  margin: 0 0 6px;
  font-family: var(--font-mono);
}
.cl-ver ul {
  margin: 0;
  padding-left: 1.2em;
  color: var(--muted);
}
.cl-ver li { margin: 2px 0; }
.footer-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* FP Q R — единый серый */
.sess-btn,
.sess-btn.session-fp,
.sess-btn.session-q,
.sess-btn.session-r {
  background: rgba(148, 163, 184, 0.18) !important;
  border-color: rgba(148, 163, 184, 0.45) !important;
  color: #e2e8f0 !important;
}
.sess-btn:hover {
  background: rgba(148, 163, 184, 0.32) !important;
  filter: none;
}

/* Дни недели — не красные */
.week-list-day .wd {
  color: var(--muted) !important;
}
.week-list-day .dt {
  color: var(--muted) !important;
}

/* Podium badges endurance */
.pos-badge.pos-gold {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1a1a1a;
}
.pos-badge.pos-silver {
  background: linear-gradient(135deg, #e2e8f0, #94a3b8);
  color: #1a1a1a;
}
.pos-badge.pos-bronze {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #fff;
}
.board-row.is-p1 { background: rgba(251, 191, 36, 0.08); }
.board-row.is-p2 { background: rgba(148, 163, 184, 0.08); }
.board-row.is-p3 { background: rgba(180, 83, 9, 0.08); }
.total-time { font-weight: 600; letter-spacing: 0.02em; }


/* ===== Results board grids (race / session / endurance / delta) ===== */
/* ===========================================================================
   Сетка протокола гонки — аддитивная.
   Опциональные колонки (дельта / время / очки) включаются классами
   has-delta / has-time / has-points и добавляют свой трек. Отсутствующая
   колонка = трек 0px, поэтому число колонок больше не расходится с CSS.
   gap не используем: он давал бы отступ и для нулевых треков.
   =========================================================================== */
.board-race .board-row {
  display: grid;
  grid-template-columns:
    44px                      /* позиция */
    var(--col-delta, 0px)     /* отыгранные позиции */
    38px                      /* номер */
    78px                      /* команда */
    minmax(180px, 1.35fr)     /* пилот и штрафы */
    minmax(120px, 1fr)        /* машина */
    96px                      /* лучший и средний круг */
    52px                      /* круги */
    var(--col-time, 0px)      /* итоговое время */
    var(--col-points, 0px)    /* очки */
    68px;                     /* статус */
  gap: 0;
  column-gap: 8px;
  align-items: center;
  padding: 8px 12px;
}
.board-race.has-delta { --col-delta: 30px; }
.board-race.has-time { --col-time: 88px; }
.board-race.has-points { --col-points: 48px; }

.board-session .board-row {
  grid-template-columns: 48px 38px 78px minmax(180px, 1.3fr) minmax(120px, 1fr) 70px 110px;
  padding: 8px 12px;
  gap: 8px;
}
.board-race .col-delta { text-align: center; min-width: 28px; }
.results-board .col-team { text-align: center; min-width: 42px; white-space: nowrap; overflow: visible; }
.col-team .team-tag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
#stats-table th:first-child, #stats-table td:first-child { width: 36px; }
#stats-table th:nth-child(2), #stats-table td:nth-child(2) { width: 42px; }
.board-race .col-name,
.board-session .col-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.total-time { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Таблицы страницы «Рекорды» ----------
   У них своё число колонок; без явной сетки они наследовали шаблон зачёта
   (64px 1fr 90px 90px) и разъезжались. */
.board-records-long .board-row {
  grid-template-columns: minmax(160px, 1.8fr) 70px 96px minmax(120px, 1.2fr);
  gap: 12px;
}
.board-records-stable .board-row {
  grid-template-columns: 44px minmax(140px, 1.4fr) 90px 96px 70px minmax(140px, 1.3fr);
  gap: 12px;
}
@media (max-width: 720px) {
  .board-records-long .board-row {
    grid-template-columns: minmax(90px, 1.4fr) 44px 68px minmax(80px, 1fr);
    gap: 6px; font-size: 12px; padding: 8px 10px;
  }
  .board-records-stable .board-row {
    grid-template-columns: 28px minmax(80px, 1.3fr) 60px 68px 44px;
    gap: 6px; font-size: 12px; padding: 8px 10px;
  }
  .board-records-stable .col-track-meta { display: none; }
}


/* Pilot name links in results */
a.pilot-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted rgba(255,255,255,0.25);
}
a.pilot-link:hover {
  color: var(--accent, #f5c542);
  border-bottom-color: var(--accent, #f5c542);
}

/* Digest: лента карточек с постоянной обводкой по типу события */
.home-digest { margin-bottom: 28px; }
.digest-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
}
.digest-controls .btn { width: 30px; padding-left: 0; padding-right: 0; }
.digest-viewport,
.panel-viewport {
  position: relative;
  height: 360px;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 16px;
  padding: 18px 20px;
  overflow: hidden;
}
.home-panel-seasons .panel-viewport { overflow-y: auto; }
.digest-slide,
.panel-slide {
  display: none;
  animation: digestIn 0.25s ease;
}
.digest-slide.is-active,
.panel-slide.is-active { display: block; max-height: 100%; overflow-y: auto; }
@keyframes digestIn {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: none; }
}
.digest-kicker {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 4px;
}
.digest-title {
  margin: 0 0 4px;
  font-size: 1.1rem;
  line-height: 1.25;
}
.digest-meta { margin: 0 0 10px; font-size: 0.75rem; }
.digest-podium {
  list-style: none;
  margin: 0;
  padding: 0;
}
.digest-podium-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  margin-bottom: 4px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
}
.digest-podium-row.is-p1 { background: rgba(255, 215, 0, 0.12); }
.digest-podium-row.is-p2 { background: rgba(192, 192, 192, 0.1); }
.digest-podium-row.is-p3 { background: rgba(205, 127, 50, 0.12); }
.digest-podium-row .pos {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.digest-list {
  margin: 0;
  padding-left: 1.2em;
  line-height: 1.7;
}
.digest-slide .digest-list li::marker { color: var(--muted); }
.digest-body { white-space: pre-wrap; }
.digest-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 0;
}
.digest-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--muted, #888);
  opacity: 0.45;
  cursor: pointer;
  padding: 0;
}
.digest-dot.is-active { background: var(--accent, #f5c542); opacity: 1; }
.digest-counter {
  font-family: var(--font-mono);
  font-size: 12px;
}

/* Донаты (тест-фича) */
.donate-panel {
  margin: 28px 0;
  max-width: 560px;
}
.donate-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.pill-warn {
  background: rgba(255, 165, 0, 0.15);
  border: 1px solid rgba(255, 165, 0, 0.4);
  color: #ffb14a;
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.donate-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.donate-tab {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
}
.donate-tab:hover { border-color: var(--accent); color: var(--text); }
.donate-tab.is-active { border-color: var(--accent); color: var(--accent); }
.donate-variant { display: none; }
.donate-variant.is-active { display: block; }
.donate-iframe-wrap {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  background: var(--surface);
  overflow: hidden;
  min-height: 150px;
}

/* Архив чемпионатов на странице зачёта */
.archive-blocks {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.archive-block {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 4px 16px;
}
.archive-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  list-style: none;
}
.archive-summary::-webkit-details-marker { display: none; }
.archive-summary::before {
  content: '▸';
  color: var(--muted);
  margin-right: 10px;
  transition: transform 0.15s ease;
}
.archive-block[open] .archive-summary::before { transform: rotate(90deg); }
.archive-count { font-family: var(--font-mono); font-size: 12px; }

.penalty-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
  white-space: nowrap;
  vertical-align: middle;
}
.penalty-badge:is(.penalty-admin,.penalty-acc) {
  background: color-mix(in srgb,var(--red) 12%,var(--surface));
  color: var(--red);
  border: 1px solid var(--border);
}
.penalty-badge.penalty-correction {
  color: var(--text);
  border: 1px solid var(--border);
}

/* Компактный блок рекордов на карточке пилота */
.pilot-side-col .side-records {
  margin: 0;
}
.side-records-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.side-records-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  font-size: 12px;
  line-height: 1.25;
}
.side-records-list .sr-track {
  font-weight: 600;
  font-size: 12px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side-records-list .sr-time {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 12px;
  justify-self: end;
}
.side-records-list .sr-meta {
  grid-column: 1 / -1;
  font-size: 9px;
  opacity: 0.45;
}
.side-records-list .sr-sectors {
  grid-column: 2;
  justify-self: end;
  display: inline-flex;
  gap: 3px;
}
.side-records-list .sr-sector {
  display: inline-block;
  padding: 0 4px;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
  opacity: 0.8;
}

/* Компактные результаты чемпионатов на карточке пилота */
.champ-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 520px;
}
.champ-res-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  font-size: 12px;
}
.champ-res-row .cr-track {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.champ-res-row .cr-place { display: inline-flex; }
.champ-res-row .cr-points {
  min-width: 30px;
  text-align: right;
  font-weight: 600;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* Рекорды: карточки-аккордеоны */
.records-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.record-track-card {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  margin-bottom: 10px;
  background: rgba(255,255,255,0.02);
  overflow: hidden;
}
.record-track-card > summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
}
.record-track-card > summary::-webkit-details-marker { display: none; }
.record-track-card[open] > summary {
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.record-track-card .rtc-best {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}
.record-track-card .rtc-body {
  padding: 8px 12px 12px;
}
.record-track-card .rtc-row {
  display: grid;
  grid-template-columns: 28px 1fr auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 6px 4px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.record-track-card .rtc-row:last-child { border-bottom: none; }
.rtc-meta {
  font-size: 10px;
  opacity: 0.45;
  color: var(--muted);
}
.rtc-sectors {
  display: inline-flex;
  gap: 3px;
  font-size: 10px;
  opacity: 0.7;
}
.rtc-sector {
  display: inline-block;
  padding: 1px 4px;
  border-radius: 4px;
  border: 1px solid transparent;
}
.rtc-sector.is-best {
  color: #c084fc;
  border-color: rgba(192, 132, 252, 0.45);
  background: rgba(147, 51, 234, 0.18);
  opacity: 1;
  font-weight: 700;
}
a.track-plain-link {
  text-decoration: none;
}
a.track-plain-link:hover { color: var(--accent); }

/* ---------- Кабинет: статистика, страна, выход ---------- */

.pilot-flag {
  font-size: 22px;
  line-height: 1;
  margin-left: 8px;
  vertical-align: middle;
}

.me-footer-actions {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding-top:12px; border-top:1px solid var(--border); font-size:12px;
}

.country-select {
  position: relative;
  max-width: 360px;
}

.cs-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  font: inherit;
  color: var(--text);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
}
.cs-btn:hover { border-color: var(--accent); }
.cs-placeholder { color: var(--muted); }
.cs-flag { font-size: 18px; line-height: 1; }
.cs-name { font-weight: 500; }
.cs-code { margin-left: auto; font-size: 11px; }

.cs-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 40;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.cs-search {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}

.cs-list {
  list-style: none;
  margin: 0;
  padding: 4px;
  max-height: 260px;
  overflow-y: auto;
}

.cs-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.cs-opt:hover { background: var(--surface-alt); }
.cs-opt.is-selected { background: rgba(var(--accent-rgb), 0.15); }
.cs-opt .cs-code { margin-left: auto; }

/* Алиасы в админке (известные ники) */
.alias-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  margin: 0 4px 4px 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-alt);
  font-size: 12px;
}
.alias-x {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
}
.alias-x:hover { color: var(--accent); }
.alias-add-form { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; }

/* Кнопка-карточка в админке */
.admin-card-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
}

/* Главная: чемпионаты (60%) + дайджест (40%) — одинаковые по высоте карточки */
.home-panels {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 28px;
}
.home-panel,
.home-panel .home-digest,
.home-panel .panel-carousel,
.home-panel .digest {
  min-width: 0;
}
.home-panel-seasons .home-digest,
.home-panel-digest .home-digest {
  margin-bottom: 0;
  height: 100%;
}
/* Заголовок панели выравнивается по левому краю */
.home-panel .panel-head {
  width: 100%;
  max-width: 620px;
  margin-left: 0;
  margin-right: auto;
}
.home-panel-digest .panel-head { max-width: 460px; }
.panel-carousel { display: flex; flex-direction: column; }
.panel-viewport {
  position: relative;
  height: 360px;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  background: var(--card, rgba(255,255,255,0.04));
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 16px;
  padding: 18px 20px;
  overflow: hidden;
}
/* Чемпионатам — приоритет: карточка шире дайджеста, выравнивание по левому краю */
.home-panel-seasons .panel-viewport {
  max-width: 620px;
  margin-left: 0;
  margin-right: auto;
}
.panel-slide {
  display: none;
  animation: digestIn 0.25s ease;
}
.panel-slide.is-active { display: flex; flex-direction: column; }
.seasons-panel-list { display: flex; flex-direction: column; gap: 14px; }
.season-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.season-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.season-card-title { font-family: var(--font-display, Oswald, sans-serif); font-size: 16px; }
.season-card-dates { margin: 0; font-size: 12px; }
.season-card-desc { margin: 0; font-size: 13px; }
.season-card-next { margin: 0; font-size: 12px; }
.season-rounds {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}
.season-rounds li {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.season-rounds .sc-flag { font-size: 14px; line-height: 1; }
.season-round-num {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent);
}
.season-round-date { margin-left: auto; font-size: 12px; white-space: nowrap; }
.season-slots {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.season-slots .slots-count {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent);
}
.season-card .btn { align-self: flex-start; }
.season-card-btn { margin-top: 4px; }

/* Этапы сезона в карточке: компактные мини-карточки + внутренняя прокрутка */
.rounds-windows { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.rounds-window { display: none; flex-direction: column; gap: 5px; }
.rounds-window.is-active { display: flex; }
.round-mini {
  display: grid;
  grid-template-columns: auto 20px 1fr auto auto;
  align-items: center;
  gap: 3px 8px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  line-height: 1.25;
  cursor: pointer;
}
.round-mini.is-current { cursor: pointer; }
.rm-chev {
  font-size: 12px;
  color: var(--muted);
  transition: transform 0.15s ease;
  justify-self: end;
}
.round-row.is-open .rm-chev { transform: rotate(180deg); }
.round-detail {
  display: none;
  padding: 4px 8px 8px 28px;
}
.round-row.is-open .round-detail { display: block; }
.sess-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: 12px;
}
.sess-name { color: var(--text); }
.sess-dur { color: var(--muted); }
.sess-time {
  margin-left: auto;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.round-mini.is-past { background:var(--surface-2); border-style:dashed; }
.round-mini.is-past .rm-track { color:var(--muted); }
.round-mini.is-current {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.rm-flag { font-size: 15px; line-height: 1; }
.rm-info {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}
.rm-num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--muted);
  flex-shrink: 0;
}
.rm-track {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rm-meta {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.rm-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}
.rm-badge-urgent {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.4);
}
.rm-badge-far {
  background: var(--surface-alt);
  color: var(--muted);
  border: 1px solid var(--border);
}
.rounds-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}
.rounds-arrow {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  width: 26px;
  height: 22px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 0;
}
.rounds-arrow:hover { border-color: var(--accent); }
.rounds-count { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
/* Раскрытие этапа на главной без размеров большого расписания. */
#seasons-carousel .round-mini { width: 100%; color: var(--text); text-align: left; font-family: inherit; }
#seasons-carousel .round-mini:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#seasons-carousel .round-detail { padding: 6px 8px; }
#seasons-carousel .round-row.is-open .round-detail { display: grid; gap: 5px; }
.home-session { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 12px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 11px; }
.home-session-code { font-weight: 700; text-decoration: none; color: var(--accent); }
.home-session-duration, .home-session-start { white-space:nowrap; }
.home-session-start { display:flex; align-items:center; justify-content:flex-end; gap:8px; min-width:42px; }
.season-participation { color: #64d994; }
.season-panel-actions { margin: 12px 0 0; text-align: center; }
.digest-record-time { font-size: 1rem; font-weight: 700; white-space: nowrap; }
.digest-record-row { grid-template-columns: minmax(0, 1fr) auto; }
.digest-member-row, .digest-team-row { grid-template-columns: minmax(0, 1fr) auto; }
.digest-slide .pilot-link { min-width: 0; overflow-wrap: anywhere; }
.digest-number { min-width: 42px; font-size: 12px; font-weight: 700; }
.digest-team-row { border-left: 3px solid var(--team-primary); }
.digest-team-colors { display: flex; gap: 3px; }
.digest-team-colors i { width: 10px; height: 16px; border: 1px solid rgba(255,255,255,.25); border-radius: 3px; background: var(--team-primary); }
.digest-team-colors i:nth-child(2) { background: var(--team-secondary); }
.digest-team-colors i:nth-child(3) { background: var(--team-accent); }
.digest-action { margin: 16px 0 0; }
/* Одна область прокрутки: обычный подиум помещается целиком, длинные новости доступны. */
.digest .panel-viewport { display:flex; }
.digest .panel-slide.is-active { display:block; flex:1; min-width:0; min-height:0; max-height:none; overflow-y:auto; scrollbar-gutter:stable; padding:0 4px 2px 0; }
.digest .panel-slide.is-active > :last-child { margin-bottom:0; }
.season-standings-table { width: max-content; min-width: 100%; }
.season-standings-table th, .season-standings-table td { white-space: nowrap; }
.season-standings-table th:nth-child(3), .season-standings-table td:nth-child(3) { position: sticky; left: 0; background: var(--surface); z-index: 3; min-width: 160px; box-shadow: 1px 0 0 var(--border); }
.season-standings-table thead th:nth-child(3) { z-index: 4; }
.season-round-heading { display: inline-block; font-size: 11px; }
@media (max-width: 600px) {
  #seasons-carousel .rm-info { flex-direction: column; align-items: flex-start; gap: 2px; }
  #seasons-carousel .rm-meta { white-space: normal; }
  #seasons-carousel .rm-badge { white-space: normal; max-width: 90px; }
}
@media (max-width: 900px) {
  .home-panels { grid-template-columns: 1fr; }
  .home-panel-seasons .panel-viewport { height: auto; min-height: 300px; overflow: visible; }
  #seasons-carousel .panel-slide.is-active { max-height: none; overflow: visible; }
}

/* Команды: список */
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.team-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 16px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}
.team-card:hover { border-color: var(--accent); }
.team-card-head { display: flex; align-items: center; gap: 16px; min-width: 0; }
.team-card-head > div:last-child { min-width: 0; }
.team-logo { width: 80px; height: 80px; flex: 0 0 80px; }
.team-logo img { width: 80px; height: 80px; object-fit: contain; border-radius: 10px; background: var(--surface-alt); }
.team-logo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  background: var(--surface-alt);
  color: #fff;
  font-weight: 700;
  font-family: var(--font-display, Oswald, sans-serif);
  font-size: 30px;
}
.team-logo-mini { width: 22px; height: 22px; object-fit: contain; vertical-align: -5px; border-radius: 4px; margin-right: 4px; }
.team-card-name { display: flex; align-items: flex-start; flex-direction: column; gap: 5px; }
.team-card-name strong { font-family: var(--font-display, Oswald, sans-serif); font-size: 21px; line-height: 1.15; }
.team-card-desc { margin: 0; font-size: 12px; line-height: 1.4; white-space: pre-line; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.team-description { white-space: pre-wrap; }

/* Тег и цвет команды */
.team-tag {
  --tag-primary: var(--team-primary, var(--pilot-team-primary, var(--muted)));
  --tag-secondary: var(--team-secondary, var(--pilot-team-secondary, var(--surface-alt)));
  --tag-accent: var(--team-accent, var(--pilot-team-accent, var(--text)));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  box-sizing: border-box;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 26px;
  padding: 2px 7px;
  border: 2px solid var(--tag-primary);
  border-radius: 6px;
  color: var(--tag-accent);
  background: var(--tag-secondary);
  font: 700 11px/1 var(--font-mono, monospace);
  letter-spacing: .08em;
  white-space: nowrap;
  vertical-align: middle;
  text-decoration: none;
  transition: box-shadow .18s ease, background-color .18s ease, filter .18s ease;
}
.team-tag:is(:hover, :focus-visible), a:focus-visible .team-tag {
  color: var(--tag-accent);
  background: var(--tag-secondary);
  text-decoration: none;
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--tag-primary) 75%, transparent);
}
.team-color-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  vertical-align: 0;
  margin-left: 2px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.team-crown { font-size: 13px; }

/* Форма команды */
.team-tag-input { text-transform: uppercase; letter-spacing: 3px; font-weight: 700; }
.team-color-row { display: flex; gap: 8px; align-items: center; }
.team-color-picker {
  width: 46px;
  height: 38px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-alt);
  cursor: pointer;
}
.team-color-hex { flex: 1; font-family: var(--font-mono, monospace); }
.team-logo-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.team-logo-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
}

/* История гонки: общий стиль аналитики, цвет только у смысла события. */
.race-feed { margin:26px 0; padding:22px; border:1px solid var(--border); border-radius:12px; background:var(--surface); min-width:0; max-width:100%; contain:inline-size; }
.round-result-date { margin:7px 0 0; font-size:12px; }
.race-feed [hidden] { display:none !important; }
.race-feed-heading .eyebrow { display:block; }
.story-highlights { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:20px; margin:18px 0 12px; padding-bottom:18px; border-bottom:1px solid var(--border); }
.story-highlights dt { color:var(--muted); font-size:11px; }
.story-highlights dd { margin:5px 0; font-size:18px; font-weight:600; overflow-wrap:anywhere; }
.story-highlights small { display:block; font-size:11px; color:var(--muted); }
.story-highlights .story-best-time { color:#d2b5ff; }
.story-controls { display:flex; flex-wrap:wrap; align-items:end; gap:12px; margin:18px 0 12px; }
.story-controls label { display:flex; flex-direction:column; gap:5px; color:var(--muted); font-size:11px; }
.story-search { flex:1; min-width:180px; max-width:360px; }
.story-controls input,.story-controls select { min-width:0; padding:9px 11px; font:12px var(--font-body); color:var(--text); border:1px solid var(--border); border-radius:6px; background:var(--surface-alt); }
.story-lap-select select { min-width:145px; }
.story-reset,.story-lap-navigation button,.story-show-more { padding:9px 12px; font:12px var(--font-body); border:1px solid var(--border); border-radius:6px; background:var(--surface-alt); color:var(--text); cursor:pointer; }
.story-reset:hover,.story-lap-navigation button:hover,.story-show-more:hover { border-color:var(--accent-hover); }
.story-view-tabs { margin-left:auto; padding:0; }
.story-category-filters { display:flex; flex-wrap:wrap; gap:7px; }
.story-category-filters button { display:inline-flex; align-items:center; gap:7px; border:1px solid #54565b; border-radius:6px; background:var(--surface-alt); color:var(--text); padding:8px 10px; font:11px var(--font-body); cursor:pointer; }
.story-category-filters button[aria-pressed=false] { opacity:.45; border-color:var(--border); background:transparent; }
.story-category-filters button span { color:var(--muted); font:10px var(--font-mono); }
.story-category-dot { width:6px; height:6px; display:inline-block; border-radius:50%; background:currentColor; }
.story-color-fast { color:#bf9aff; }.story-color-penalty { color:#e47b72; }.story-color-pit { color:#e2b46b; }.story-color-position { color:#8bc7f5; }.story-color-status { color:#aeb6bf; }
.story-more-filters { margin:12px 0; font-size:11px; color:var(--muted); }
.story-more-filters summary { cursor:pointer; }.story-more-filters > div { display:flex; gap:16px; flex-wrap:wrap; padding:12px 0 0; }
.story-more-filters label { display:flex; gap:6px; align-items:center; }.story-more-filters input { accent-color:var(--accent); }
.story-chart-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:16px 0 8px; }
.story-chart-toolbar > span { font:600 12px var(--font-body); }
.story-chart-wrap { position:relative; min-width:0; max-width:100%; margin:0 0 8px; }
.story-scroll-note { color:var(--muted); font-size:10px; margin:8px 0; line-height:1.6; }
.story-chart { width:100%; max-width:100%; min-width:0; overflow-x:auto; scrollbar-width:thin; scrollbar-color:#4b4d52 var(--surface-alt); border-radius:7px; background:var(--surface-alt); }
.story-chart svg { display:block; max-width:none; height:285px; user-select:none; }
.story-ruler-baseline,.story-ruler-mark { stroke:#666a72; stroke-width:1; }
.story-ruler-tick { cursor:ew-resize; outline:none; }
.story-ruler-tick[aria-pressed=true] .story-ruler-mark,.story-ruler-tick:hover .story-ruler-mark,.story-ruler-tick:focus .story-ruler-mark { stroke:#ff8178; stroke-width:2; }
.story-ruler-tick[aria-pressed=true] text,.story-ruler-tick:hover text,.story-ruler-tick:focus text { fill:#ff9b93; }
.story-ruler-tick:focus rect { stroke:var(--accent-hover); stroke-width:1; }
.story-chart-lane { fill:currentColor; font:11px var(--font-body); }
.story-chart-selected { fill:rgba(var(--accent-rgb), .07); stroke:rgba(var(--accent-rgb), .4); stroke-width:1; }
.story-chart-divider { stroke:var(--border); stroke-dasharray:3 3; }
.story-chart-range { stroke:currentColor; stroke-width:7; opacity:.35; stroke-linecap:round; }
.story-chart-point { cursor:pointer; outline:none; }
.story-chart-point:focus > circle:first-child { stroke:var(--text); stroke-width:1; }
.story-marker-fact { fill:currentColor; stroke:var(--surface-alt); stroke-width:1; }
.story-marker-estimate { fill:var(--surface-alt); stroke:currentColor; stroke-width:2; }
.story-point-count { fill:#17181b; font:600 9px var(--font-mono); pointer-events:none; }.story-point-count.is-estimate { fill:currentColor; }
.story-chart-tooltip { position:absolute; z-index:4; pointer-events:none; min-width:170px; max-width:300px; padding:10px 12px; border-radius:7px; border:1px solid #8b4b45; background:var(--surface-3); box-shadow:0 8px 24px rgba(0,0,0,.35); }
.story-chart-tooltip strong,.story-chart-tooltip span,.story-chart-tooltip small { display:block; font-size:11px; }
.story-chart-tooltip strong { color:#ff9b93; }.story-chart-tooltip span { margin:4px 0; }.story-chart-tooltip small { color:var(--muted); line-height:1.5; font-size:10px; }.story-chart-tooltip .story-tooltip-estimate { color:#e2b46b; margin-top:5px; }
.story-tooltip-entry { padding:6px 0; border-top:1px solid var(--border); }
.story-chart-tooltip .story-tooltip-pilot { color:var(--text); font-size:12px; }
.story-chart-tooltip .story-tooltip-value { font-size:11px; margin:3px 0; }
.story-chart-key { display:flex; flex-wrap:wrap; gap:8px 16px; margin:10px 0 18px; font-size:10px; color:var(--muted); }
.story-chart-key > span { display:flex; align-items:center; gap:6px; }
.story-key-fact { display:inline-block; width:7px; height:7px; background:var(--muted); border-radius:50%; }.story-key-estimate { display:inline-block; width:7px; height:7px; border:1px solid var(--muted); transform:rotate(45deg); }
.story-list-toolbar { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 0; border-top:1px solid var(--border); }
.story-list-toolbar strong { font-size:14px; }.story-list-toolbar .muted { display:block; font-size:10px; margin-top:3px; }
.story-lap-navigation { display:flex; gap:6px; }.story-lap-navigation button { padding:6px 12px; }.story-lap-navigation button:disabled { opacity:.35; cursor:default; }
.story-list { max-height:600px; overflow:auto; scrollbar-width:thin; scrollbar-color:#4b4d52 var(--surface); }
.story-event-group { margin:0 0 14px; }.story-event-group h4 { position:sticky; top:0; z-index:1; padding:9px 0; margin:0; background:var(--surface); color:var(--muted); font:600 12px var(--font-body); }
.story-event { display:grid; grid-template-columns:50px minmax(0,1fr) minmax(100px,160px); align-items:center; gap:12px; margin-bottom:6px; padding:12px; border:1px solid var(--border); border-left:3px solid #54565b; border-radius:7px; background:rgba(255,255,255,.02); }
.story-category-fast { border-left-color:#aa77ed; }.story-event.story-event-penalty { border-left-width:1px; border-color:var(--border); }.story-category-pit { border-left-color:#c6a069; }.story-category-position { border-left-color:#6aa1c9; }
.story-event-lap { display:flex; flex-direction:column; align-items:center; color:var(--muted); text-align:center; }.story-event-lap small { font:10px var(--font-body); }.story-event-lap strong { font-size:17px; color:var(--text); }.story-event-lap > span { font:9px/1.5 var(--font-body); }
.story-event-pilot { display:flex; gap:8px; align-items:center; flex-wrap:wrap; font:600 14px var(--font-body); }.story-event-pilot a { text-decoration:none; overflow-wrap:anywhere; }.story-event-pilot a:hover { color:var(--accent-hover); }
.story-pilot-number { display:inline-flex; align-items:center; justify-content:center; min-width:32px; padding:2px 5px; background:var(--surface-3); border:1px solid #494c53; border-radius:4px; font-size:10px; font-weight:500; color:var(--silver); }
.story-event-title { display:flex; gap:7px; align-items:center; flex-wrap:wrap; font-size:12px; margin-top:4px; }
.story-quality { display:inline-block; font:9px var(--font-body); color:var(--muted); padding:2px 5px; border:1px solid var(--border); border-radius:4px; }.story-quality-estimated { color:#e2b46b; border-color:rgba(226,180,107,.25); }.story-quality-admin { color:#ff9b93; border-color:rgba(var(--accent-rgb), .3); }
.story-event-note { margin:6px 0 0; color:#b0b3b9; font-size:11px; line-height:1.6; }
.story-unknown-note { margin:0 0 14px; padding:10px 12px; border-left:2px solid #62666f; background:var(--surface-alt); color:var(--muted); font-size:11px; line-height:1.6; }
.story-event-result { display:flex; flex-direction:column; align-items:flex-end; gap:6px; text-align:right; min-width:0; }.story-event-result strong { font-size:14px; overflow-wrap:anywhere; }.story-category-fast .story-event-result strong { color:#d2b5ff; }

.story-rule-links { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-top:8px; }
.story-rule-ref {
  max-width:100%; min-height:26px; padding:4px 8px; border:1px solid var(--border); border-radius:6px;
  color:var(--text); font-size:12px; line-height:1.35; overflow-wrap:anywhere;
}
a.story-rule-ref { text-decoration:underline; text-underline-offset:2px; }
a.story-rule-ref:is(:hover,:focus-visible) { border-color:var(--accent); color:var(--accent-hover); }

.story-penalty-type,
.steward-fields select.steward-penalty-kind:has(option:checked:not([value=""],[value="none"])) {
  color:var(--red);
  background-color:color-mix(in srgb,var(--red) 12%,var(--surface));
}
.story-penalty-type { border:1px solid var(--border); border-radius:6px; padding:4px 8px; }
.steward-penalty-kind option { color:var(--text); background-color:var(--surface); }
.story-position-change { font:12px var(--font-mono); }.story-position-change.is-gain { color:#64ce96; }.story-position-change.is-loss { color:#ff827a; }
.story-analysis-link { font:10px var(--font-body); color:var(--muted); text-decoration:none; }.story-analysis-link:hover { color:var(--accent-hover); }
.story-show-more { display:block; margin:12px auto; }.story-empty { margin:10px 0 20px; color:var(--muted); font-size:12px; line-height:1.7; }
.story-data-note { margin:18px 0 0; }.story-data-note p { max-width:900px; }
.story-controls :focus-visible,.story-category-filters button:focus-visible,.story-more-filters summary:focus-visible,.story-lap-navigation button:focus-visible,.story-show-more:focus-visible { outline:2px solid var(--accent-hover); outline-offset:2px; }
@media(max-width:760px) {
  .race-feed { padding:14px; }.story-highlights { gap:12px; grid-template-columns:repeat(2,minmax(0,1fr)); }.story-highlights dd { font-size:16px; }
  .story-controls { gap:9px; }.story-search { flex-basis:100%; max-width:none; }.story-lap-select { flex:1; }.story-lap-select select { width:100%; }.story-view-tabs { width:100%; margin-left:0; padding-top:4px; }
  .story-category-filters { gap:6px; }.story-category-filters button { padding:7px 9px; font-size:10px; }
  .story-event { grid-template-columns:35px minmax(0,1fr); gap:8px; padding:10px; }.story-event-result { grid-column:2; flex-direction:row; align-items:center; justify-content:space-between; flex-wrap:wrap; text-align:left; }.story-event-pilot { font-size:12px; }.story-event-title { font-size:11px; }
  .story-event-lap strong { font-size:15px; }.story-chart-tooltip { max-width:230px; }.story-chart-key { gap:8px; }
  .story-scroll-note { display:block; }
}
@media(max-width:360px) { .story-highlights { grid-template-columns:1fr; gap:13px; }.story-event-result strong { font-size:13px; } }


/* Редактор этапа: компактные сессии и регламент пит-стопов */
.round-sessions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin: 6px 0;
}
.round-sessions .field { margin: 0; }
.field-narrow { flex: 0 0 96px; min-width: 96px; }
.sess-input { width: 88px; }

.round-pit {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  margin: 8px 0;
  padding: 8px 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.round-extra {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin: 8px 0;
}
.perm-check-strong {
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  align-self: center;
}

/* Условия участия по трассам */
.track-cond-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.track-cond-row .cond-track { min-width: 200px; }
.track-cond-row .cond-time { width: 150px; }
.track-cond-row .cond-hint {
  font-size: 12px;
  color: var(--muted);
  align-self: center;
  min-height: 16px;
}
.track-cond-row .cond-remove {
  background: transparent;
  border: none;
  color: var(--red);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 2px 6px;
}

/* Быстрые пресеты сессий */
.quick-presets { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* Переключатель «Показывать на сайте» */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-slider {
  width: 46px; height: 26px; border-radius: 999px;
  background: var(--border); position: relative; transition: background .15s;
  flex: 0 0 auto;
}
.switch-slider::before {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; transition: transform .15s;
}
.switch input:checked + .switch-slider { background: var(--accent); }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }
.switch-label { font-weight: 600; }

/* Заметная панель быстрых пресетов сессий */
.quick-presets-bar {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  padding: 8px 10px; margin: 10px 0;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px;
}

/* Сетка полей этапа (3 строки) */
.round-grid {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end;
  margin: 8px 0;
}
.round-grid .field { margin: 0; }

/* Горизонтальный блок галочек пит-стопов внутри сетки */
.round-pit-inline {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  padding: 6px 10px;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px;
}

/* Список этапов (карточки) и цветные действия */
.round-list { display: flex; flex-direction: column; gap: 10px; }
.round-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: 10px;
}
.round-card-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.round-idx {
  font-size: 16px; font-weight: 700; color: var(--accent);
  background: var(--white-strong); border: 1px solid var(--border);
  border-radius: 8px; padding: 4px 10px;
}
.round-meta { min-width: 0; }
.round-title { font-size: 15px; font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.round-sub { font-size: 12px; margin-top: 2px; }
.round-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.round-move {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  font-weight: 700;
}
.round-move:hover:not(:disabled) { background: var(--accent); color: var(--white-strong) !important; }
.pill-sprint {
  background: #fff3d6; color: #9a6b00; border: 1px solid #f0cf8a;
  font-size: 11px; padding: 1px 8px; border-radius: 999px; font-weight: 600;
}
.round-tags { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-left: 4px; }

/* Быстрые пресеты: переключатель спринта прижат вправо */
.switch-right { margin-left: auto; }

/* PQR отдельно слева, блок пит-стопов отдельно справа */
.round-split { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin: 8px 0; }
.round-pqr { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-end; }
.round-pqr .field-narrow { min-width: 78px; }
.round-pqr .sess-input { width: 60px; }
.round-pqr .field-narrow + .field-narrow { border-left: 1px solid var(--border); padding-left: 18px; }
.round-pit-box {
  flex: 1 1 320px; min-width: 280px;
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px 12px; background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: 8px;
}
.round-pit-grid.pit-disabled { opacity: .55; }
.pit-hint { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Уменьшенные поля сервера/заметки */
.field-sm { flex: 0 1 220px !important; min-width: 180px; }

/* Две колонки формы этапа: слева — вся информация про гонку,
   справа — сервер / пароль / заметка / спринт */
.round-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
  margin-top: 10px;
}
.round-col-left,
.round-col-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.round-subblock {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-soft);
}
.round-session-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.round-session-grid .sess-input { width: 100%; }
.round-pit-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
@media (max-width: 760px) {
  .round-cols { grid-template-columns: 1fr; }
  .round-session-grid { grid-template-columns: 1fr 1fr; }
}

/* Сводка раскрывашки редактирования этапа скрыта — открывается кнопкой «Править» */
.round-edit > summary {
  display: none;
}

/* Ссылки без подчёркивания */
a.unlink { color: inherit; text-decoration: none; }
a.unlink:hover { text-decoration: underline; }

/* Таблица зачёта сезона */
.standings-table td, .standings-table th { padding: 8px 12px; }
.standings-table tr.is-p1 { background: rgba(251, 191, 36, 0.08); }
.standings-table tr.is-p2 { background: rgba(148, 163, 184, 0.06); }
.standings-table tr.is-p3 { background: rgba(180, 83, 9, 0.06); }
.standings-table .pos-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; font-weight: 700; font-size: 13px;
}

/* Компактные чипы сессий в таблице расписания */
.sess-compact { display: flex; flex-wrap: wrap; gap: 2px 4px; align-items: center; text-align: left; }
.sess-chip {
  display: inline-block; padding: 2px 6px; border-radius: 4px;
  font-size: 11px; font-family: var(--font-mono, monospace); white-space: nowrap;
}
.sess-chip.session-fp { background: rgba(100,116,139,0.25); color: #94a3b8; }
.sess-chip.session-q { background: rgba(56,132,255,0.2); color: #6da8ff; }
.sess-chip.session-r { background: rgba(var(--accent-rgb), 0.25); color: #ff6b6b; }

/* Таблица расписания сезонов: выравнивание и шрифт даты */
.season-schedule-board .board-row { grid-template-columns: 100px 1fr auto; gap: 8px; }
.season-schedule-board .col-date { font-size: 12px; white-space: nowrap; }
.season-schedule-board .col-sess { text-align: left; font-size: 13px; }
.sess-row { display: flex; gap: 10px; align-items: stretch; }
.sess-block {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 4px 10px; border-radius: 6px;
  background: var(--surface-alt, rgba(255,255,255,0.06));
  border: 1px solid var(--border, rgba(255,255,255,0.08));
}
.sess-block-name { font-size: 12px; font-weight: 600; white-space: nowrap; }
.sess-block-time { font-size: 11px; font-family: var(--font-mono, monospace); color: var(--muted, #888); white-space: nowrap; }

/* Сессии этапа — компактная строка */
.round-sessions { display: flex; flex-direction: column; gap: 6px; }
.rs-row { display: inline-flex; align-items: center; gap: 10px; }
.rs-name { font-size: 14px; }
.rs-dur, .rs-time { font-size: 13px; color: var(--muted, #888); }

/* Погодные пилюли с тонированным фоном */
.pill-weather-sunny { background: rgba(250,204,21,0.15); color: #facc15; }
.pill-weather-cloudy { background: rgba(148,163,184,0.15); color: #94a3b8; }
.pill-weather-rainy { background: rgba(56,132,255,0.15); color: #6da8ff; }

@media (max-width: 600px) {
  .board-race .board-row {
    grid-template-columns: 28px var(--col-delta, 0px) 28px minmax(70px, 1.2fr) 42px minmax(60px, 1fr) 44px 28px var(--col-time, 0px) var(--col-points, 0px) 56px;
    font-size: 11px; padding: 6px 8px; column-gap: 4px;
  }
  .board-race.has-delta { --col-delta: 24px; }
  .board-race.has-time { --col-time: 48px; }
  .board-race.has-points { --col-points: 28px; }
  .board-session .board-row {
    grid-template-columns: 32px 30px minmax(70px, 1.2fr) 42px minmax(60px, 1fr) 40px 72px;
    font-size: 12px; padding: 6px 8px; gap: 4px;
  }
}

/* Загруженный протокол использует ту же спокойную карточку фактов, что и анонс этапа. */
.result-overview {
  margin: 0 0 24px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.result-overview-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.result-overview-heading h3 { margin: 5px 0 0; font-size: 22px; }
.result-overview-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}
.result-overview-facts > div {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-alt);
}
.result-overview-facts dt { color: var(--muted); font-size: 12px; }
.result-overview-facts dd { margin: 5px 0 0; font-weight: 650; overflow-wrap: anywhere; }
.result-overview-facts .result-overview-fastest { grid-column: 1 / -1; }
.result-overview-fastest dd { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.result-overview-fastest .mono { color: #c990ff; font-size: 18px; }
.result-board-title { margin: 24px 0 12px; }

/* У таблицы остаются все колонки и штрафы; на узком экране она прокручивается. */
.results-board { overflow-x: auto; }
.results-board .board-row { min-width: 940px; }
.results-board.board-session .board-row { min-width: 760px; }
.results-board.board-race.has-points .board-row { min-width: 940px; }
.results-board .col-pilot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px 5px;
  white-space: normal;
  overflow: visible;
}
.results-board .col-pilot .pilot-link {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.results-board .pilot-penalties { display: inline-flex; flex-wrap: wrap; gap: 3px; min-width: 0; }
.results-board .pilot-penalties .penalty-badge { margin-left: 0; }
.results-board .col-lap-times { display:flex; flex-direction:column; align-items:flex-end; gap:2px; line-height:1.15; white-space:nowrap; }
.results-board .col-lap-times small { color:var(--muted); font-size:10px; font-weight:400; }
.results-board .pill-finish { min-width:38px; padding:3px 5px; text-align:center; font-size:24px; line-height:1; }
.results-board .board-head > span { text-align:left; }
.results-board .col-race-number,
.results-board .board-head > .col-race-number { text-align:center; }
.results-board .board-head { position: sticky; top: 0; z-index: 1; }
.results-board { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.results-board .board-head { background: var(--surface-alt); color: var(--muted); text-transform: uppercase; font-size: 10px; letter-spacing: .04em; min-height: 42px; }
.results-board .board-row:not(.board-head) { min-height: 66px; border-bottom: 1px solid rgba(255,255,255,.055); }
.results-board .board-row:not(.board-head):hover { background-color: rgba(255,255,255,.035); }
.results-board .col-car { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.results-board .car-model-short { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--muted); }
.results-board .class-pill { font-size: 10px; padding: 2px 6px; border-radius: 4px; background: rgba(61,154,215,.1); color: #8ebcd7; border: 1px solid rgba(61,154,215,.25); }
.results-board .class-pill.class-gt4 { background: rgba(71,171,139,.1); color: #89cfb7; border-color: rgba(71,171,139,.25); }
.results-board .total-time { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; white-space: nowrap; }
.results-board .total-time small { color: var(--muted); font-size: 10px; font-weight: 400; }
.results-board .col-lap-times { align-items: flex-start; }
.review-row-button { border: 1px solid rgba(var(--accent-rgb), .5); border-radius: 5px; padding: 4px 8px; font: inherit; font-size: 11px; background: rgba(var(--accent-rgb), .09); color: var(--text); cursor: pointer; }
.review-row-button:hover { border-color: var(--accent); color: var(--text); }
.review-voted { color: var(--muted); font-size: 10px; }
.review-voted.review-positive { color: #6dd7a4; }
.review-voted.review-negative { color: #ff7878; }
.results-board .board-head > .col-team, .results-board .board-head > .col-delta, .results-board .board-head > .col-laps { text-align: center; }
.results-board .col-laps { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; }
.results-board .col-laps small { font-size: 10px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.result-legend { margin: 14px 0; color: var(--muted); font-size: 12px; }
.result-legend summary { cursor: pointer; color: var(--text); }
.result-legend p { line-height: 1.7; max-width: 900px; }
.race-review-info, .review-notices, .review-alert { padding: 18px; margin: 18px 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.race-review-info p, .race-review-info small, .review-submit-warning { color: var(--muted); font-size: 12px; line-height: 1.6; }
.review-dialog { width: min(620px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; border: 1px solid var(--border); border-top: 3px solid var(--accent); border-radius: 12px; padding: 24px; background: var(--surface); color: var(--text); }
.review-dialog::backdrop { background: rgba(0,0,0,.75); }
.review-dialog h3 { margin: 12px 0; }
.review-dialog p { font-size: 13px; line-height: 1.6; }
.review-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.review-choice { display: flex; align-items: center; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: 7px; font-size: 13px; cursor: pointer; }
.review-choice:has(input:checked) { border-color: currentColor; background: rgba(255,255,255,.045); }
.review-choice small { display: block; color: var(--muted); font-size: 10px; line-height: 1.5; margin-top: 5px; }
.review-positive { color: #6dd7a4; }
.review-negative { color: #ff7878; }
.review-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.reputation-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.reputation-tag { padding: 5px 9px; border: 1px solid currentColor; border-radius: 6px; font-size: 12px; background: var(--surface); }
.review-ledger { overflow-x: auto; }
.review-ledger table { width: 100%; border-collapse: collapse; font-size: 13px; }
.review-ledger th, .review-ledger td { text-align: left; vertical-align: top; padding: 12px; border-bottom: 1px solid var(--border); }
.review-ledger small { display: block; color: var(--muted); margin-top: 5px; font-size: 11px; }
.review-alert input, .review-ledger input { display: block; margin-top: 8px; width: 100%; padding: 8px; color: var(--text); background: var(--surface-alt); border: 1px solid var(--border); border-radius: 5px; }
@media (min-width: 721px) { .results-board.board-race .board-row { grid-template-columns: 40px var(--col-delta, 0px) 36px 72px minmax(200px, 1.6fr) minmax(105px, .8fr) 94px 46px var(--col-time, 0px) var(--col-points, 0px) 56px; } }
@media (max-width: 460px) { .review-dialog { padding: 16px; } .review-choice { padding: 9px; font-size: 12px; } }

@media (max-width: 820px) {
  .admin-layout .admin-content { width: 100%; max-width: 100%; }
}

@media (max-width: 720px) {
  .result-overview { padding: 16px; }
  .result-overview-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .results-board.board-race .board-row {
    grid-template-columns: 44px var(--col-delta, 0px) 38px 70px minmax(180px, 1.35fr) minmax(120px, 1fr) 94px 52px var(--col-time, 0px) var(--col-points, 0px) 64px;
    column-gap: 8px;
    font-size: 12px;
    padding: 8px 12px;
  }
  .results-board.board-race.has-delta { --col-delta: 30px; }
  .results-board.board-race.has-time { --col-time: 88px; }
  .results-board.board-race.has-points { --col-points: 48px; }
  .results-board.board-session .board-row {
    grid-template-columns: 48px 38px 70px minmax(180px, 1.3fr) minmax(120px, 1fr) 70px 110px;
    gap: 8px;
    font-size: 12px;
    padding: 8px 12px;
  }
}
.application-filters, .application-bulk-actions, .application-pages {
  display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 14px 0 20px;
}
.application-filters label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.application-filters input, .application-filters select { min-width: 145px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface, #1b1b1b); color: inherit; }
.application-filters input[type=search] { min-width: 200px; }
.application-pages { justify-content: center; align-items: center; }
.analytics-summary { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.analytics-summary > div { display: flex; flex-direction: column; min-width: 120px; padding: 15px 20px; border: 1px solid var(--border); border-radius: 8px; }
.analytics-summary strong { font-size: 24px; }
.analytics-summary span { color: var(--muted); }
.analytics-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 800px) { .analytics-columns { grid-template-columns: 1fr; } }

/* Одна шкала статистики на карточке и в общей таблице. */
.pilot-stats-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 8px; }
.pilot-stats-heading .section-title { margin: 0 0 4px; }
.pilot-stats-heading p { margin: 0; font-size: 13px; }
.pilot-scope-switch { margin: 14px 0 20px; }
.stats-intro { margin: 8px 0 16px; font-size: 13px; line-height: 1.5; }
.stats-intro p { margin: 0 0 5px; }
.pilot-performance-table th { position: sticky; top: 0; z-index: 2; background: var(--surface); }
.pilot-performance-table th.sortable { cursor: pointer; }
.pilot-performance-table tbody tr[hidden] { display: none; }
.pilot-stats-scroll {
  max-height: min(70vh, 720px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.pilot-stats-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Единый зачёт: один выбор соревнования, две компактные таблицы. */
.standings-competition-bar { display:grid; gap:8px; justify-items:start; margin:0 0 20px; }
.standings-competition-picker { display:grid; gap:7px; width:min(100%,420px); }
.standings-competition-meta { display:flex; align-items:center; flex-wrap:wrap; gap:6px 18px; min-height:20px; }
.standings-competition-bar label { font-size:13px; color:var(--muted); font-weight:600; }
.standings-competition-select { width:100%; padding:10px 34px 10px 12px; border:1px solid var(--border); border-radius:8px; color:var(--text); background:var(--surface); font:600 14px var(--font-body); }
.standings-competition-select optgroup[label="Чемпионаты"], .standings-competition-select optgroup[label="Завершённые сезоны"] { color:var(--gold); }
.standings-competition-select optgroup[label="Другие гонки"] { color:#68a9f5; }
.standings-competition-select option { color:var(--text); background:var(--surface); }
.standings-competition-note { color:var(--muted); font-size:13px; }
.standings-loading { display:none; color:var(--muted); font-size:13px; }
.standings-overview[aria-busy="true"] .standings-loading { display:inline; }
.standings-context-link, .standings-archive-link a { color:var(--muted); font-size:13px; text-decoration:none; border-bottom:1px solid var(--border); }
.standings-context-link:hover, .standings-archive-link a:hover { color:var(--text); border-color:var(--accent); }
.standings-competition-title { margin:0 0 16px; font:600 20px var(--font-display); }
.standings-dual { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; align-items:start; }
.standings-card { min-width:0; overflow:hidden; border:1px solid var(--border); border-radius:12px; background:var(--surface); }
.standings-card-head { display:flex; justify-content:space-between; align-items:center; padding:16px 18px 12px; }
.standings-card-head h3 { margin:1px 0 0; font:600 21px var(--font-display); }
.standings-card-count { display:inline-flex; align-items:center; justify-content:center; min-width:30px; height:30px; padding:0 7px; border:1px solid var(--border); border-radius:50%; color:var(--muted); font:600 12px var(--font-mono); }
.standings-mini-scroll { overflow-x:auto; }
.standings-mini-table { width:100%; border-collapse:collapse; font-size:13px; }
.standings-mini-table th { padding:9px 12px; background:var(--surface-2); color:var(--muted); font-size:11px; font-weight:700; text-align:left; }
.standings-mini-table th:first-child, .standings-mini-table td:first-child { width:64px; text-align:center; }
.standings-mini-table th:last-child, .standings-mini-table td:last-child { width:72px; text-align:right; padding-right:18px; }
.standings-mini-table td { padding:10px 12px; border-top:1px solid var(--border); vertical-align:middle; }
.standings-mini-table tr:hover td { background:rgba(255,255,255,.025); }
.standings-mini-table a:not(.team-tag) { text-decoration:none; font-weight:600; }
.standings-mini-table a:not(.team-tag):hover { color:var(--accent); }
.standings-mini-table .pos-badge { margin:auto; }
.standings-team-name { display:flex; align-items:center; gap:8px; min-width:0; }
.standings-pilot-name a, .standings-team-name a:not(.team-tag) { display:block; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.standings-pilot-table { table-layout:fixed; }
.standings-pilot-table th, .standings-pilot-table td { padding-left:6px; padding-right:6px; }
.standings-pilot-table th:nth-child(1), .standings-pilot-table td:nth-child(1) { width:54px; }
.standings-pilot-table th:nth-child(2), .standings-pilot-table td:nth-child(2) { width:40px; text-align:center; }
.standings-pilot-table th:nth-child(3), .standings-pilot-table td:nth-child(3) { width:78px; text-align:center; }
.standings-pilot-table th:last-child, .standings-pilot-table td:last-child { width:70px; }
.standings-js .standings-card .is-extra { display:none; }
.standings-js .standings-card.is-expanded .is-extra { display:table-row; }
.standings-card-more { display:none; width:100%; padding:12px; border:0; border-top:1px solid var(--border); background:transparent; color:var(--muted); cursor:pointer; font:600 13px var(--font-body); }
.standings-js .standings-card-more { display:block; }
.standings-card-more:hover { color:var(--text); background:var(--surface-2); }
.standings-card .empty-state { margin:0; padding:20px; }
.standings-rule { margin:14px 0 22px; font-size:13px; }
.standings-details-list { display:grid; gap:10px; }
.standings-details { border:1px solid var(--border); border-radius:10px; background:var(--surface); }
.standings-details > summary { display:flex; justify-content:space-between; gap:12px; padding:14px 18px; cursor:pointer; font:600 15px var(--font-display); list-style:none; }
.standings-details > summary::-webkit-details-marker { display:none; }
.standings-details[open] > summary { border-bottom:1px solid var(--border); color:var(--text); }
.standings-details > summary span { color:var(--muted); transition:transform .2s; }
.standings-details[open] > summary span { transform:rotate(180deg); }
.standings-details-body { padding:16px; }
.standings-details-body .stats-scroll { max-width:100%; }
.standings-archive-link { margin:20px 0 0; }
@media (max-width:850px) { .standings-dual { grid-template-columns:1fr; } }
@media (max-width:540px) { .standings-card-head { padding:13px 14px 10px; } .standings-mini-table td { padding:8px 7px; } .standings-mini-table th { padding:8px 7px; } .standings-mini-table th:first-child, .standings-mini-table td:first-child { width:44px; } .standings-mini-table th:last-child, .standings-mini-table td:last-child { width:58px; padding-right:10px; } .standings-pilot-table th:nth-child(2), .standings-pilot-table td:nth-child(2) { width:32px; } .standings-pilot-table th:nth-child(3), .standings-pilot-table td:nth-child(3) { width:62px; } .standings-pilot-table th:last-child, .standings-pilot-table td:last-child { width:55px; } .standings-details-body { padding:10px; } }
#stats-table.pilot-performance-table th:nth-child(1), #stats-table.pilot-performance-table td:nth-child(1) { position: sticky; left: 0; min-width: 38px; background: var(--surface); z-index: 3; }
#stats-table.pilot-performance-table th:nth-child(2), #stats-table.pilot-performance-table td:nth-child(2) { position: sticky; left: 38px; min-width: 68px; background: var(--surface); z-index: 3; }
#stats-table.pilot-performance-table th:nth-child(3), #stats-table.pilot-performance-table td:nth-child(3) { position: sticky; left: 106px; min-width: 190px; width: 190px; max-width: 190px; background: var(--surface); z-index: 3; }
#stats-table.pilot-performance-table td:nth-child(3) a { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#stats-table.pilot-performance-table th:nth-child(4), #stats-table.pilot-performance-table td:nth-child(4) { position: sticky; left: 296px; min-width: 92px; width: 92px; max-width: 92px; background: var(--surface); z-index: 3; box-shadow: 1px 0 0 var(--border); }
#stats-table.pilot-performance-table thead th:nth-child(-n+4) { z-index: 4; }
@media (max-width: 700px) { #stats-table.pilot-performance-table th:nth-child(3), #stats-table.pilot-performance-table td:nth-child(3) { min-width: 135px; width:135px; max-width:135px; } #stats-table.pilot-performance-table th:nth-child(4), #stats-table.pilot-performance-table td:nth-child(4) { left:241px; min-width:75px; width:75px; max-width:75px; } }
.archive-section { margin:24px 0 30px; }
.archive-season-list { display:grid; gap:8px; }
.archive-season-link { display:flex; justify-content:space-between; gap:16px; align-items:center; padding:15px 18px; border:1px solid var(--border); border-radius:10px; background:var(--surface); text-decoration:none; }
.archive-season-link:hover { border-color:var(--accent); }
.archive-season-link small { margin-left:8px; color:var(--muted); }
.archive-race-open { margin-left:auto; white-space:nowrap; font-size:12px; }
@media (max-width:540px) { .archive-season-link { align-items:flex-start; flex-direction:column; gap:4px; } .archive-race-open { display:none; } }

.steam-games-table-wrap { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.steam-games-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.steam-games-table th, .steam-games-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.steam-games-table tr:last-child td { border-bottom: 0; }
.steam-games-table th { text-align: left; color: var(--muted); background: var(--surface-alt); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.steam-games-table th:last-child, .steam-games-table td:last-child { text-align: right; white-space: nowrap; }
.steam-games-table tbody tr:not(.is-unavailable) td:last-child { color: var(--accent); font-weight: 700; }
.steam-games-table tbody tr.is-unavailable { color: var(--muted); opacity: .65; }
.steam-games-note { margin: 8px 0 0; font-size: 12px; line-height: 1.4; }
/* Команды: акценты на карточке, нейтральные таблицы результатов. */
.team-editor { display:grid;grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr);gap:32px;max-width:1000px; }
.team-editor .news-form { display:flex;flex-direction:column;gap:18px; }
.team-editor textarea { display:block;width:100%;padding:10px 12px;background:var(--surface-2);color:var(--text);border:1px solid var(--border);border-radius:6px;font:inherit;resize:vertical; }
.team-editor input[type="file"] { width:100%; }
.team-editor input[type="color"] { border:1px solid var(--border);border-radius:8px;background:var(--surface-2); }
.team-design-panel { padding:24px;border:1px solid var(--border,#29303a);border-radius:16px;align-self:start; }
.team-colors { display:flex;gap:16px;margin:20px 0; }
.team-colors label { display:grid;gap:8px;font-size:13px; }
.team-colors input { width:68px;height:42px;padding:3px;cursor:pointer; }
.team-preview { margin-top:24px;overflow:hidden; }
.team-preview-banner { display:flex;align-items:center;gap:16px;background:var(--team-secondary);border-top:5px solid var(--team-primary);padding:22px; }
.team-preview-banner img { width:64px;height:64px;object-fit:contain; }
.team-preview-result { display:flex;gap:20px;align-items:center;padding:16px 0; }
.team-preview-result > :first-child { font-weight:700;font-size:22px; }
.team-profile-banner { display:flex;gap:24px;align-items:center;padding:30px;margin:16px 0 26px;background:var(--team-secondary);color:var(--team-accent);border-left:5px solid var(--team-primary);border-radius:14px; }
.team-profile-banner img { width:100px;height:100px;object-fit:contain;border-radius:10px; }
.team-profile-banner h2 { margin:8px 0; }
.team-profile-banner > div > .team-tag { margin-bottom: 4px; }
.team-roster-row { display:flex;gap:18px;align-items:center;flex-wrap:wrap;padding:16px 0;border-bottom:1px solid var(--border,#29303a); }
.team-roster-row small { display:block;margin-top:4px; }
.team-roster-actions { margin-left:auto;display:flex;gap:8px;flex-wrap:wrap;align-items:center; }
.team-roster-actions form { display:flex;gap:5px;align-items:center;flex-wrap:wrap; }
.team-roster-actions select { max-width:160px; }
.team-invite-form { display:flex;gap:10px;flex-wrap:wrap;align-items:center; }
.team-invite-form label { flex-basis:100%; }
.team-owned-list { display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px; }
.team-owned-list p { flex-basis:100%; }
.team-close { margin-top:32px; }
.admin-rename { margin-top: 8px; }
.admin-rename-form { display: flex; flex-direction: column; gap: 12px; padding: 14px 0; text-align: left; }
.admin-rename-form .field input { min-width: 0; width: 100%; }
.admin-rename-form .btn { align-self: flex-start; }
.team-scope-switch { margin-bottom:16px; }
.season-entry-notice { margin:16px 0 20px; padding:16px 20px; line-height:1.5; }
.season-entry-notice strong { display:block; margin-bottom:4px; font-size:15px; }
.season-entry-notice a { display:inline-block; margin-top:4px; font-weight:700; }
.analytics-filters { display:flex;gap:16px;align-items:end;flex-wrap:wrap;margin:24px 0; }
.analytics-filters label { display:grid;gap:6px; }
.analytics-filters input { min-height:42px;padding:9px 12px;border:1px solid var(--border);border-radius:6px;background:var(--surface-2);color:var(--text);font:inherit;color-scheme:dark;max-width:100%; }
@media(max-width:760px) { .team-editor{grid-template-columns:1fr}.team-design-panel{order:-1}.team-roster-actions{margin-left:0;width:100%}.team-profile-banner{padding:20px;gap:16px}.team-profile-banner img{width:64px;height:64px} }

/* Общая линия вторичных показателей протокола. */
.results-board .board-row:not(.board-head) .col-car, .results-board .board-row:not(.board-head) .col-lap-times, .results-board .board-row:not(.board-head) .col-laps, .results-board .board-row:not(.board-head) .total-time {
  display: grid; grid-template-rows: 20px 14px; row-gap: 2px; line-height: 1.2; align-items: center;
}
.results-board .col-car { justify-items: start; }
.results-board .col-laps,.results-board .total-time { justify-items: center; text-align:center; align-self:center; }
.results-board .board-head .col-laps { display:block; line-height:inherit; }
.results-board .board-head .col-total-time { text-align:center; }
.results-board .col-lap-times small, .results-board .col-laps small, .results-board .total-time small, .results-board .car-model-short { line-height: 14px; }
.reputation-squares { display: inline-flex; vertical-align: middle; gap: 3px; margin-left: 6px; flex-shrink: 0; }
.reputation-square { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 3px; background: rgba(255,255,255,.065); border: 1px solid rgba(255,255,255,.09); color: white; font: 700 9px/1 sans-serif; cursor: help; }
.reputation-square.is-positive { background: #227c52; border-color: #39a871; }
.reputation-square.is-negative { background: #b53137; border-color: #e34c54; }
.reputation-square:focus-visible { outline: 2px solid white; outline-offset: 2px; }
.review-alert-group { border: 1px solid var(--border); border-radius: 8px; margin: 12px 0; background: var(--surface); }
.review-alert-group > summary { padding: 12px; cursor: pointer; }
.review-bulk-form { padding: 12px; border-top: 1px solid var(--border); }
.review-alert-item, .review-select-all { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 7px 0; font-size: 12px; }
.review-alert-item small { color: var(--muted); margin-left: auto; }
.review-bulk-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.review-bulk-controls input { flex: 1; min-width: 180px; padding: 8px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface-alt); color: var(--text); }
.review-ledger input[type=checkbox] { width: auto; }

.pilot-card-meta .reputation-squares { margin-left: 7px; vertical-align: middle; }
.reputation-square { box-sizing: border-box; flex: 0 0 16px; overflow: hidden; }
.reputation-square.is-large-count { font-size: 7px; }

.pilot-card-main { flex: 1; }
.pilot-card .pilot-id-row { flex-wrap: nowrap; gap: 10px; }
.pilot-card .pilot-card-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pilot-card .pilot-card-number, .pilot-card .pilot-flag, .pilot-card-side { flex-shrink: 0; }

.records-controls { margin: 16px 0; }
.records-controls label { display: flex; flex-direction: column; gap: 7px; max-width: 380px; color: var(--muted); font-size: 12px; }
.records-controls select { padding: 10px 12px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; }
.records-scroll { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.records-table { width: 100%; min-width: 760px; }
.records-table th { white-space: nowrap; }
.records-table td { vertical-align: middle; }
.records-subline { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.records-table .reputation-squares { display: flex; margin: 4px 0 0; }

.record-icon { color: var(--accent); display: inline-block; margin-right: 3px; }

.record-icon svg { width: 16px; height: 16px; vertical-align: -3px; }
.record-icon.is-fastest { color: #b660ff; }

/* Lap analysis stays outside the classification grid. */
.session-analysis { margin:26px 0; padding:22px; background:var(--surface); border:1px solid var(--border); border-radius:12px; }
.analysis-heading,.analysis-pilot-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.analysis-heading h3,.analysis-pilot-heading h4 { margin:4px 0; font-size:23px; }
.analysis-facts { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:20px 0; }
.analysis-facts > div { padding:14px; border:1px solid var(--border); border-radius:8px; background:var(--surface-alt); }
.analysis-facts dt { color:var(--muted); font-size:11px; margin-bottom:7px; }
.analysis-facts dd { margin:0; font-size:20px; color:var(--text); }
.analysis-facts small { display:block; color:var(--muted); font-size:10px; margin-top:5px; }
.analysis-intro,.analysis-method { color:var(--muted); font-size:12px; line-height:1.7; }
.analysis-compare select { min-width:0; color:var(--text); background:var(--surface-alt); border:1px solid var(--border); border-radius:6px; padding:9px 12px; font:inherit; font-size:12px; }
.analysis-pilots { border:1px solid var(--border); border-radius:8px; overflow:hidden; }
.pilot-analysis { border-bottom:1px solid var(--border); scroll-margin-top:85px; }
.pilot-analysis:last-child { border-bottom:0; }
.pilot-analysis > summary { list-style:none; display:grid; grid-template-columns:minmax(160px,1fr) 110px 120px 96px; align-items:center; gap:18px; padding:15px; cursor:pointer; font-size:13px; }
.pilot-analysis > summary::-webkit-details-marker { display:none; }
.pilot-analysis > summary:hover { background:var(--surface-alt); }
.pilot-analysis[open] > summary { border-bottom:1px solid var(--border); background:var(--surface-alt); }
.analysis-pilot-name { overflow-wrap:anywhere; }
.analysis-summary-pace small,.analysis-summary-run small { display:block; font-family:var(--font-body); font-size:10px; color:var(--muted); margin-top:3px; }
.analysis-open-label { color:var(--text); font-size:11px; text-align:right; }
.analysis-open-label span { color:var(--accent-hover); margin-left:5px; }
.analysis-body { padding:20px; }
.analysis-pilot-heading h4 { font-size:19px; }
.analysis-pilot-heading .muted { font-size:12px; }
.analysis-tabs { display:flex; gap:6px; overflow-x:auto; padding:18px 0; }
.analysis-tabs button { white-space:nowrap; background:var(--surface-alt); border:1px solid var(--border); border-radius:6px; color:var(--muted); font:inherit; font-size:12px; padding:8px 12px; cursor:pointer; }
.analysis-tabs button.is-active { background:var(--accent-dim); color:#ff827a; border-color:rgba(var(--accent-rgb), .5); }
.analysis-tabs button:focus-visible,.pilot-analysis > summary:focus-visible { outline:2px solid var(--accent-hover); outline-offset:2px; }
.analysis-body [hidden],.analysis-table tr[hidden] { display:none !important; }
.analysis-table-wrap { overflow:auto; max-height:540px; border:1px solid var(--border); border-radius:7px; margin:12px 0; }
.analysis-table { width:100%; border-collapse:collapse; font-family:var(--font-mono); font-size:12px; }
.analysis-table th,.analysis-table td { text-align:right; padding:11px 13px; white-space:nowrap; border-bottom:1px solid var(--border); }
.analysis-table th { color:var(--muted); background:var(--surface-alt); font:11px var(--font-body); position:sticky; top:0; z-index:1; text-align:right; }
.analysis-table th:first-child,.analysis-table td:first-child { text-align:left; }
.analysis-table tbody tr:last-child td { border-bottom:0; }
.analysis-table td.analysis-text { font-family:var(--font-body); text-align:left; }
.lap-table .lap-valid { background:rgba(255,255,255,.035); }
.lap-table .lap-invalid { background:rgba(var(--accent-rgb), .13); color:var(--text); }
.lap-table .lap-unknown { color:var(--muted); }
.lap-table .lap-best { background:rgba(159,105,224,.16); }
.lap-table .lap-best-invalid { background:rgba(159,105,224,.09); }
.lap-table .lap-best td:first-child { border-left:3px solid #bf9aff; }
.lap-table .lap-valid:not(.lap-best) td:first-child { border-left:3px solid #5c646a; }
.lap-table .lap-invalid td:first-child { border-left:3px solid #e35d59; }
.analysis-table td.sector-personal-best { background:rgba(159,105,224,.32); color:#e4d1ff; box-shadow:inset 0 -2px #aa77ed; }
.lap-status { display:inline-block; font:10px var(--font-body); padding:4px 7px; border-radius:4px; }
.lap-status-valid { color:#c4c9ce; background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.12); }
.lap-status-invalid { color:#ffb5ae; background:rgba(var(--accent-rgb), .16); border:1px solid rgba(var(--accent-rgb), .35); }
.lap-best-label { display:block; font:9px var(--font-body); color:#d2b5ff; margin-top:4px; }
.sector-reading { display:inline-grid; grid-template-columns:minmax(7ch,auto) 12px; align-items:center; gap:6px; }
.sector-value { text-align:right; }
.sector-trend { display:inline-block; text-align:center; font:9px var(--font-body); }
.sector-trend.is-flat { color:var(--muted); }
.sector-trend.is-gain { color:#64ce96; }.sector-trend.is-loss { color:#ff827a; }
.analysis-lap-tools { display:flex; justify-content:space-between; gap:15px; align-items:center; font-size:11px; color:var(--muted); margin:12px 0; flex-wrap:wrap; }
.analysis-lap-tools input { accent-color:var(--accent); }
.lap-marker-legend { display:flex; flex-wrap:wrap; gap:9px 13px; align-items:center; }
.lap-swatch { display:inline-block; width:8px; height:8px; border-radius:50%; background:#94999f; margin:0 5px 0 0; }
.lap-swatch:first-child { margin-left:0; }.lap-swatch.invalid { background:#ed5b55; }.lap-swatch.best { background:#bf9aff; }
.lap-swatch.invalid { transform:rotate(45deg); }.lap-swatch.pit { background:#e2b46b; }
.lap-swatch.invalid,.lap-swatch.pit { border-radius:1px; }
.lap-swatch.best { outline:1px solid #bf9aff; outline-offset:2px; }
.lap-swatch.best-invalid { background:transparent; border:2px solid #bf9aff; border-radius:0; transform:rotate(45deg); }
.lap-swatch.after-pit { background:transparent; border:1px solid #e2b46b; border-radius:50%; }
.analysis-chart { margin:12px 0; position:relative; }
.analysis-chart svg { display:block; width:100%; min-width:280px; background:var(--surface-alt); border-radius:7px; }
.analysis-chart small { display:block; color:var(--muted); font-size:10px; margin-top:7px; }
.analysis-chart-grid { stroke:var(--border); stroke-width:1; }.analysis-chart-label { fill:var(--muted); font:11px var(--font-mono); }
.analysis-chart-line { fill:none; stroke:#89929b; stroke-width:2; }
.analysis-chart-line.is-gain { stroke:#57b58b; }.analysis-chart-line.is-loss { stroke:#d76660; }
.analysis-chart-line.is-best { stroke:#bf9aff; stroke-width:2.5; }.analysis-chart-line.is-invalid-best { stroke-dasharray:4 3; }
.analysis-chart-line.is-comparing { stroke:#e47b72; stroke-width:2.2; stroke-dasharray:7 3; vector-effect:non-scaling-stroke; }
.analysis-chart-dot { fill:#d2d5da; }
.analysis-chart-invalid { fill:#ed5b55; }.analysis-chart-best { fill:#bf9aff; stroke:#eadbff; stroke-width:1.5; }
.analysis-chart-best-invalid { fill:var(--surface-alt); stroke:#bf9aff; stroke-width:2.5; }
.analysis-chart-best-ring { fill:none; stroke:#bf9aff; stroke-width:1; opacity:.65; }.analysis-chart-best-ring.is-peer { stroke:#69b4ef; }
.analysis-chart-peer { fill:none; stroke:#69b4ef; stroke-width:2.2; stroke-dasharray:3 3; vector-effect:non-scaling-stroke; }.analysis-chart-peer-dot { fill:#69b4ef; }
.analysis-chart-dot.is-unknown,.analysis-chart-peer-dot.is-unknown { fill:var(--surface-alt); stroke:#a6a3b0; stroke-width:2; }
.analysis-chart-pit { fill:#e2b46b; stroke:#ffe0ae; stroke-width:1; }.analysis-chart-pit.is-peer { stroke:#69b4ef; stroke-width:2; }
.analysis-chart-after-pit { fill:none; stroke:#e2b46b; stroke-width:1.5; }
.analysis-chart-point { cursor:crosshair; outline:none; }.analysis-chart-point:focus > circle:first-child { stroke:var(--text); stroke-width:1; }
.analysis-chart-tooltip { position:absolute; z-index:3; pointer-events:none; min-width:150px; max-width:270px; padding:10px 13px; border-radius:7px; background:var(--surface-3); border:1px solid #b34c45; box-shadow:0 8px 24px rgba(0,0,0,.35); }
.analysis-chart-tooltip strong,.analysis-chart-tooltip span { display:block; }.analysis-chart-tooltip strong { font-size:11px; color:#ff9b93; }.analysis-chart-tooltip .mono { font-size:18px; margin-top:4px; }
.analysis-chart-tooltip small { font-size:10px; color:var(--muted); margin-top:5px; }.analysis-chart-tooltip.is-peer { border-color:#5796c5; }.analysis-chart-tooltip.is-peer strong { color:#8dcaf8; }
.analysis-compare { display:flex; align-items:center; gap:10px; font-size:12px; color:var(--muted); }.analysis-compare select { max-width:70%; }
.analysis-warning { font-size:12px; line-height:1.6; color:#eac58d; background:rgba(234,197,141,.06); border-left:2px solid #ae874e; padding:10px 13px; }
.analysis-records { margin-top:20px; }.analysis-records > summary { font-size:13px; cursor:pointer; }
@media(max-width:760px) {
  .session-analysis { padding:14px; }.analysis-facts { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .analysis-facts > div { padding:11px; }.analysis-facts dd { font-size:17px; }
  .pilot-analysis > summary { grid-template-columns:minmax(120px,1fr) 85px 75px; gap:9px; padding:13px 10px; }
  .analysis-summary-run { display:none; }.analysis-body { padding:12px; }
  .analysis-heading h3 { font-size:21px; }.analysis-heading .btn { font-size:10px; padding:6px; }
}

/* Site red and peer blue; purple is reserved for best laps and sectors. */
.analysis-heading,.race-feed-heading { cursor:pointer; list-style:none; }
.analysis-heading::-webkit-details-marker,.race-feed-heading::-webkit-details-marker { display:none; }
.analysis-section-title { display:block; font:600 23px var(--font-display); margin-top:4px; }
.analysis-heading > span:first-child .eyebrow { display:block; }
.section-fold-label { display:flex; align-items:center; gap:9px; color:var(--muted); font:11px var(--font-body); flex-shrink:0; }
.fold-open { display:none; }details[open] > summary .fold-open { display:inline; }details[open] > summary .fold-closed { display:none; }
.fold-chevron { font-size:20px; transition:transform .15s; }details[open] > summary .fold-chevron { transform:rotate(180deg); }
.analysis-session-strip { font-size:12px; margin:14px 0 10px; }
.analysis-session-strip a { color:#ff827a; text-decoration:none; }
.race-feed-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.race-feed-fold > .analysis-method { margin:12px 0; }
.analysis-data-note { margin:12px 0; font-size:11px; color:var(--muted); }.analysis-data-note summary { cursor:pointer; }.analysis-data-note p { margin:6px 0; line-height:1.5; }
.analysis-comparison-controls { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; margin:16px 0 0; }
.analysis-comparison-controls select { max-width:300px; border-color:rgba(105,180,239,.3); }
.comparison-primary { color:#ff9b93; }.comparison-peer { color:#8bc7f5; }
.pace-summary { display:flex; align-items:baseline; gap:12px; flex-wrap:wrap; margin:12px 0; padding:14px 0; border-bottom:1px solid var(--border); }
.pace-summary > span { font-size:14px; }.pace-summary > strong { font-size:24px; color:var(--text); }.pace-summary > small { font-size:11px; color:var(--muted); }
.pace-support { grid-template-columns:repeat(3,minmax(0,1fr)); }.pace-support dd { font-size:19px; }
.comparison-event-cards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.comparison-pace-result { font-size:13px; margin:8px 0 16px; }
.comparison-table { table-layout:fixed; }
.comparison-table th { font:600 14px var(--font-body); padding:15px 13px; white-space:normal; overflow-wrap:anywhere; }
.comparison-table th:first-child { width:50%; }
.comparison-table th.comparison-primary,.comparison-table th.comparison-peer { width:25%; min-width:130px; text-align:center; }
.comparison-table th.comparison-primary { color:#ff9b93; }.comparison-table th.comparison-peer { color:#8bc7f5; }
.comparison-table th.comparison-primary::before,.comparison-table th.comparison-peer::before { content:''; display:inline-block; width:8px; height:8px; background:currentColor; border-radius:50%; margin-right:7px; }
.comparison-table td:not(:first-child) { text-align:center; }
.comparison-table td:first-child { white-space:normal; }
.comparison-metric-note { display:block; font:11px/1.5 var(--font-body); color:var(--muted); margin-top:5px; }
.comparison-value { display:inline-flex; gap:9px; align-items:center; }
.comparison-winner { display:inline-block; width:6px; height:6px; flex:0 0 6px; border-radius:50%; }
.comparison-winner.is-winner { background:currentColor; box-shadow:0 0 0 2px rgba(255,255,255,.04); }
.comparison-key { color:var(--muted); font-size:10px; }
.comparison-main-metric { background:rgba(255,255,255,.025); }.comparison-main-metric .comparison-value { font-size:22px; font-weight:600; }
.comparison-main-metric td:first-child { font-weight:600; }
.analysis-facts .analysis-fact-primary dd { font-size:24px; color:#d2b5ff; }
[data-standalone-lap-best] > strong { color:#d2b5ff; }
.comparison-event-card { padding:15px; border:1px solid var(--border); border-radius:7px; max-height:280px; overflow:auto; }.comparison-event-card h5 { font-size:13px; margin:0 0 13px; }.comparison-event-card strong { font-size:11px; color:var(--text); }.comparison-event-card p { font-size:11px; color:var(--muted); line-height:1.5; }
.analysis-extra { margin:18px 0; }.analysis-extra > summary { font-size:12px; cursor:pointer; color:var(--muted); }
.lap-pit-mark { display:inline-block; font:9px var(--font-body); color:#f0ca8f; background:rgba(226,180,107,.09); border:1px solid rgba(226,180,107,.3); border-radius:4px; padding:2px 5px; margin-left:6px; }.lap-after-pit { color:#e2b46b; margin-left:6px; }
.analysis-pit-list { display:grid; gap:8px; }.analysis-pit-list > div { display:flex; align-items:center; gap:10px; flex-wrap:wrap; font-size:12px; padding:12px; border:1px solid rgba(226,180,107,.2); border-radius:7px; }.analysis-pit-list > div > span:last-child { color:var(--muted); font-size:11px; }
@media(max-width:760px) {
  .analysis-section-title { font-size:21px; }.section-fold-label { font-size:10px; gap:5px; }
  .analysis-comparison-controls { align-items:stretch; }.analysis-compare { width:100%; }.analysis-comparison-controls select { flex:1; max-width:75%; }
  .pace-summary { gap:8px; }.pace-summary > small { flex-basis:100%; }
  .comparison-main-metric .comparison-value { font-size:17px; }
  .pace-support { grid-template-columns:1fr; }.comparison-event-cards { grid-template-columns:1fr; }
  .analysis-chart-tooltip { max-width:230px; }.analysis-chart-tooltip .mono { font-size:16px; }
}
@media(max-width:640px) {
  .comparison-table,.comparison-table thead,.comparison-table tbody { display:block; width:100%; }
  .comparison-table thead { position:sticky; top:0; z-index:2; background:var(--surface-alt); }
  .comparison-table tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .comparison-table th { position:static; min-width:0 !important; width:auto !important; padding:11px 7px; white-space:normal; overflow-wrap:anywhere; text-align:center; font-size:12px; }
  .comparison-table th:first-child { grid-column:1 / -1; text-align:left; padding-bottom:0; }
  .comparison-table td { padding:8px 7px; text-align:center; }
  .comparison-table td:first-child { grid-column:1 / -1; border-bottom:0; padding:10px 8px 0; white-space:normal; font-size:11px; }
  .comparison-table td:not(:first-child) { min-width:0; overflow-wrap:anywhere; white-space:normal; }
  .comparison-value { gap:6px; }
}
@media(max-width:360px) { .comparison-main-metric .comparison-value { font-size:14px; } }

/* Светлая тема: цветовые статусы остаются различимыми на светлом фоне. */
html[data-theme="light"] .social-btn,
html[data-theme="light"] .weekend-session-tabs a:is(.is-active,:hover),
html[data-theme="light"] .class-chip input:checked + span,
html[data-theme="light"] .schedule-view-switch a.is-active,
html[data-theme="light"] .rc-session:hover,
html[data-theme="light"] .pill-finish,
html[data-theme="light"] .sess-btn,
html[data-theme="light"] .team-logo-placeholder { color:var(--text); }
html[data-theme="light"] .session-toggle-card.is-off { background:var(--surface-alt); }
html[data-theme="light"] .session-toggle-card.is-off :is(input[type="text"],.dur-input) { background:var(--surface-2) !important; color:var(--muted) !important; border-color:var(--border) !important; }
html[data-theme="light"] :is(.flash-error,.flash-danger,.review-negative,.review-voted.review-negative,.story-color-penalty,.story-quality-admin,.story-position-change.is-loss,.sector-trend.is-loss,.comparison-primary,.comparison-table th.comparison-primary,.analysis-session-strip a,.analysis-tabs button.is-active,.analysis-chart-tooltip strong,.story-chart-tooltip strong,.story-ruler-tick[aria-pressed=true] text) { color:#a51d19; }
html[data-theme="light"] :is(.flash-success,.review-positive,.review-voted.review-positive,.story-position-change.is-gain,.sector-trend.is-gain) { color:#146b42; }
html[data-theme="light"] :is(.laptime-fastest,.result-overview-fastest .mono,.story-color-fast,.story-category-fast .story-event-result strong,.lap-best-label,.analysis-facts .analysis-fact-primary dd,[data-standalone-lap-best] > strong) { color:#7333ad; }
html[data-theme="light"] :is(.story-color-position,.comparison-peer,.comparison-table th.comparison-peer,.analysis-chart-tooltip.is-peer strong,.class-gt3,.class-gt4,.class-st,.class-cup,.sess-chip.session-q,.pill-weather-rainy,.results-board .class-pill) { color:#245b8e; }
html[data-theme="light"] :is(.story-color-pit,.story-quality-estimated,.story-chart-tooltip .story-tooltip-estimate,.analysis-warning,.lap-pit-mark,.lap-after-pit,.pill-weather-sunny) { color:#805517; }
html[data-theme="light"] :is(.story-event-note,.story-color-status,.lap-status-valid,.sess-chip.session-fp,.pill-weather-cloudy) { color:var(--muted); }
html[data-theme="light"] :is(.sess-chip.session-r,.lap-status-invalid) { color:#a51d19; }
html[data-theme="light"] .analysis-table td.sector-personal-best { color:#53227f; }
html[data-theme="light"] .results-board .board-row:not(.board-head) { border-bottom-color:var(--border); }
html[data-theme="light"] :is(.results-board .board-row:not(.board-head):hover,.standings-mini-table tr:hover td) { background:var(--surface-2); }
html[data-theme="light"] .reputation-square:not(.is-positive):not(.is-negative) { color:var(--muted); background:var(--surface-2); border-color:var(--border); }
html[data-theme="light"] .story-point-count { fill:var(--surface); }
html[data-theme="light"] .story-point-count.is-estimate { fill:currentColor; }
html[data-theme="light"] .story-ruler-tick[aria-pressed=true] text { fill:#a51d19; }
html[data-theme="light"] .analysis-chart-line.is-best,
html[data-theme="light"] .analysis-chart-best-ring { stroke:#7333ad; }
html[data-theme="light"] .analysis-chart-best { fill:#7333ad; }
html[data-theme="light"] :is(.analysis-chart-peer,.analysis-chart-best-ring.is-peer) { stroke:#245b8e; }
html[data-theme="light"] .analysis-chart-peer-dot { fill:#245b8e; }
html[data-theme="light"] .analysis-chart-dot { fill:#596576; }
html[data-theme="light"] .help-topic:hover { background:var(--surface-2); color:var(--text); }
html[data-theme="light"] .round-move { background:var(--surface); }
html[data-theme="light"] .discord-widget-container { background:#313338; }
html[data-theme="light"] .number-card { color:var(--accent); }
html[data-theme="light"] .penalty-editor .number-card { color:var(--text) !important; }
html[data-theme="light"] .admin-nav-link.is-active { color:var(--text); }
html[data-theme="light"] :is(.admin-request-count.has-pending,.pos-down) { color:#a51d19; }
html[data-theme="light"] :is(.admin-request-count.is-clear,.season-participation,.pos-up) { color:#146b42; }
html[data-theme="light"] .story-highlights .story-best-time { color:#7333ad; }
html[data-theme="light"] .cal-cell.is-past { background:var(--surface-2); }
html[data-theme="light"] .record-icon.is-fastest { color:#7333ad; }

.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.pilot-personal-panel { padding:24px; border:1px solid var(--border); border-radius:12px; background:var(--surface); min-height:180px; }
.pilot-profile-avatar { float:right; object-fit:cover; border-radius:14px; margin:0 0 16px 20px; }
.pilot-personal-details { display:grid; gap:16px; margin:20px 0; }
.pilot-personal-details div { display:grid; grid-template-columns:90px minmax(0,1fr); gap:12px; }
.pilot-personal-details dt { color:var(--muted); font-size:13px; }
.pilot-personal-details dd { margin:0; overflow-wrap:anywhere; }
.pilot-personal-panel .pilot-bio { clear:both; white-space:pre-line; }
.device-model-field input[type="checkbox"] { width:auto; }
.device-model-field [hidden], .device-model-field[hidden] { display:none; }
@media(max-width:480px) {
  .pilot-personal-panel { padding:18px; }
  .pilot-profile-avatar { width:64px; height:64px; }
  .pilot-personal-details div { grid-template-columns:1fr; gap:4px; }
}

/* Лицензия отражает темп; цвета команды остаются на номере и теге. */
[data-license] { --license-color:var(--muted); }
[data-license="Amateur"] { --license-color:#a0a5ae; }
[data-license="Bronze"] { --license-color:var(--bronze); }
[data-license="Silver"] { --license-color:var(--silver); }
[data-license="Gold"] { --license-color:var(--gold); }
[data-license="PRO"], [data-license="Platinum"] { --license-color:#98d8dd; }
html[data-theme="light"] [data-license="Amateur"] { --license-color:#606773; }
html[data-theme="light"] [data-license="PRO"], html[data-theme="light"] [data-license="Platinum"] { --license-color:#276d77; }
.licensed-card {
  --card-color:var(--license-color);
  border-top:3px solid var(--card-color);
  background:linear-gradient(115deg, color-mix(in srgb, var(--card-color) 7%, transparent), transparent 70%), var(--surface);
}
.licensed-card.has-team:not([data-card-color-source="license"]) { --card-color:var(--pilot-team-primary); }
.licensed-card:hover { border-top-color:var(--card-color); }
.pilot-license-display { position:relative; display:inline-flex; }
.crew-season-settings { border:1px solid var(--border); border-radius:10px; padding:16px; margin:16px 0; }
.crew-roster-fieldset { border:0; padding:0; min-width:0; }
.crew-roster-fieldset { overflow:auto; }
.crew-roster-fieldset input[type="number"] { width:70px; padding:6px; border:1px solid var(--border); border-radius:5px; background:var(--surface-3); color:var(--text); }
.crew-change-form select, .crew-change-form textarea { width:100%; padding:10px; border:1px solid var(--border); border-radius:7px; background:var(--surface-3); color:var(--text); font:inherit; }
.crew-roster-fieldset input[type="checkbox"], .crew-season-settings input[type="checkbox"] { width:auto; }
.crew-change-form summary { cursor:pointer; }
.crew-change-form form { display:grid; gap:14px; padding-top:16px; }
.crew-result-title { font-size:14px; }
.crew-result-names { display:flex; flex-wrap:wrap; gap:4px 12px; margin-top:5px; font-family:var(--font-body); font-size:12px; font-weight:400; white-space:normal; }
.crew-result-names a { color:var(--muted); }
.crew-result-names a:hover { color:var(--text); }
.crew-standings { margin:24px 0; }
.crew-session { margin:24px 0; }
.crew-session-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:14px; }
.crew-session-card { border:1px solid var(--border); background:var(--surface); border-radius:10px; min-width:0; }
.crew-session-card > summary { display:flex; align-items:center; gap:14px; padding:16px; cursor:pointer; }
.crew-session-card > summary > strong { font:500 28px var(--font-display); color:var(--crew-color,var(--accent)); }
.crew-car-heading { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; }
.crew-session-card > summary > span:last-child { margin-left:auto; font-size:12px; }
.crew-session-card > summary > span:nth-child(2) { min-width:0; font-size:14px; overflow-wrap:anywhere; }
.crew-session-card > summary > span:last-child { flex-shrink:0; }
.crew-session-body { border-top:1px solid var(--border); padding:16px; }
.crew-stints { list-style:none; margin:0; padding:0; display:grid; gap:6px; }
.crew-stints li { display:grid; grid-template-columns:55px minmax(0,1fr) auto; gap:10px; padding:8px 0; border-bottom:1px solid var(--border); font-size:13px; }
.crew-stint-range { color:var(--muted); font-variant-numeric:tabular-nums; }
@media(max-width:760px) { .crew-session-grid { grid-template-columns:1fr; } .crew-stints li { grid-template-columns:50px minmax(0,1fr); } .crew-stints small { grid-column:2; } }
@media(max-width:480px) {
  .crew-roster-fieldset table { table-layout:fixed; width:100%; }
  .crew-roster-fieldset th, .crew-roster-fieldset td { padding:8px 4px; font-size:12px; overflow-wrap:anywhere; }
  .crew-roster-fieldset th:nth-child(1) { width:54px; }
  .crew-roster-fieldset th:nth-child(3) { width:52px; }
  .crew-roster-fieldset th:nth-child(4) { width:62px; }
  .crew-roster-fieldset input[type="number"] { width:48px; }
}
.team-contributions { font-family:var(--font-body); font-size:13px; text-align:left; }
.team-contributions > summary { list-style:none; cursor:pointer; color:var(--muted); font-size:17px; text-align:right; }
.team-contribution-total { color:var(--accent); font-size:14px; }
.team-contributions > summary::-webkit-details-marker { display:none; }
.team-contributions > summary:hover { color:var(--text); }
.team-contributions[open] { min-width:min(240px,45vw); }
.team-contributions-body { padding:12px; margin-top:8px; border:1px solid var(--border); background:var(--surface); border-radius:8px; font-weight:400; color:var(--text); white-space:normal; }
.team-contributions-body > strong { font-size:12px; color:var(--muted); }
.team-contributions-body ul { list-style:none; padding:0; margin:8px 0 0; }
.team-contributions-body li { display:flex; justify-content:space-between; gap:16px; padding:5px 0; }
.team-contributions-body li > :first-child { min-width:0; overflow-wrap:anywhere; }
.pilot-color-marker { position:absolute; top:-6px; right:-6px; width:16px; height:16px; display:inline-grid; place-items:center; border-radius:4px; }
.pilot-color-marker::before { content:""; width:10px; height:10px; border:2px solid var(--surface); border-radius:3px; background:var(--marker-color,var(--license-color)); box-shadow:0 0 0 1px var(--border); }
.license-badge {
  position:relative;
  display:inline-flex; align-items:center; justify-content:center; padding:3px 7px;
  border:1px solid color-mix(in srgb, var(--license-color) 20%, var(--border));
  border-radius:5px; color:color-mix(in srgb, var(--license-color) 70%, var(--text));
  background:color-mix(in srgb, var(--license-color) 3%, var(--surface));
  white-space:nowrap;
}
.license-badge strong { font-family:var(--font-body); font-size:12px; line-height:1.5; font-weight:500; }
.license-badge[data-license="pending"] { padding-inline:4px; }
.license-badge[data-license="pending"] strong { font-size:11px; }
.license-caption { font-size:11px; color:var(--muted); }
.license-state { font-size:11px; color:var(--muted); }
.license-explainer { margin:12px 0 20px; color:var(--muted); font-size:13px; }
.license-explainer summary { cursor:pointer; padding:5px 0; }
.license-explainer p { max-width:820px; line-height:1.65; }
.pilot-card .license-caption { display:none; }
.pilot-hero .license-badge strong { font-size:13px; }
.pilot-hero-side { display:flex; flex-direction:column; align-items:center; gap:8px; }

/* Плотность каталога сохраняется отдельно для пилотов и команд. */
.directory-view-switch { display:flex; flex-wrap:wrap; gap:4px; margin:12px 0 18px; }
.directory-view-switch button {
  padding:9px 13px; border:1px solid var(--border); border-radius:7px;
  background:var(--surface); color:var(--muted); font:inherit; font-size:13px; cursor:pointer;
}
.directory-view-switch button[aria-pressed="true"] { background:var(--surface-3); border-color:var(--text); color:var(--text); }
.directory-view-switch button:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.pilot-expanded, .pilot-avatar, .pilot-card-brief { display:none; }
.directory-empty[hidden] { display:none; }
.directory-facts { display:flex; flex-wrap:wrap; gap:16px 24px; margin:16px 0 10px; }
.directory-facts dt { font-size:11px; color:var(--muted); }
.directory-facts dd { margin:2px 0 0; font-family:var(--font-display); font-size:24px; color:var(--text); }
.pilot-directory { align-items:stretch; }
.pilot-directory[data-view="medium"] { grid-auto-rows:1fr; }
.pilot-directory .pilot-card { display:grid; grid-template-columns:minmax(0,1fr) 94px; gap:12px; align-items:center; min-height:104px; padding:18px; box-sizing:border-box; }
.pilot-directory .pilot-card-main { min-width:0; }
.pilot-directory .pilot-id-row { display:grid; grid-template-columns:48px 46px minmax(0,1fr) 24px; gap:8px; align-items:center; }
.pilot-directory .pilot-card-name { min-width:0; font-size:18px; text-overflow:ellipsis; white-space:nowrap; overflow:hidden; border-bottom:0; text-decoration:none; }
.pilot-directory .pilot-card-number { font-size:25px; }
.pilot-directory .pilot-card-side { display:flex; flex-direction:column; align-items:center; gap:9px; min-width:0; }
.pilot-directory .reputation-squares { display:inline-flex; gap:4px; margin:0; min-height:22px; }
.pilot-directory .reputation-square { display:inline-flex; flex:0 0 22px; width:22px; height:22px; box-sizing:border-box; }
.pilot-directory .pilot-flag { display:flex; align-items:center; justify-content:center; margin:0; }
.pilot-directory .country-flag-icon { width:24px; height:16px; object-fit:contain; }
.pilot-number-cell,.pilot-team-cell { min-width:0; }
.pilot-directory:not([data-view="list"]) :is(.pilot-number-cell,.pilot-team-cell,.pilot-flag) > .muted { visibility:hidden; }
.pilot-list-heading { display:none; }
.pilot-directory[data-view="large"] { grid-template-columns:repeat(2,minmax(0,1fr)); grid-auto-rows:1fr; }
.pilot-directory[data-view="large"] .pilot-card { position:relative; padding:20px; align-items:start; grid-template-rows:auto 1fr; gap:18px; }
.pilot-directory[data-view="large"] .pilot-card-main { display:grid; grid-column:1/-1; grid-template-columns:minmax(0,1fr); gap:10px; align-items:center; }
.pilot-directory[data-view="large"] .pilot-card-side { position:absolute; top:20px; right:20px; width:94px; }
.pilot-directory[data-view="large"] .pilot-avatar { display:flex; align-items:center; justify-content:center; width:64px; height:64px; background:var(--surface-3); border-radius:12px; color:var(--card-color); font:500 34px var(--font-display); }
.pilot-avatar img { width:100%; height:100%; object-fit:cover; border-radius:inherit; }
.pilot-directory[data-view="large"] .pilot-id-row { display:flex; flex-wrap:nowrap; gap:14px; min-width:0; width:100%; }
.pilot-directory[data-view="large"] :is(.pilot-number-cell,.pilot-team-cell,.pilot-flag):has(> .muted) { display:none; }
.pilot-directory[data-view="large"] :is(.pilot-number-cell,.pilot-team-cell,.pilot-flag) { flex:0 0 auto; }
.pilot-directory[data-view="large"] .pilot-card-name { white-space:nowrap; font-size:32px; }
.pilot-directory[data-view="large"] .pilot-card-number { font-size:48px; min-width:0; }
.pilot-directory[data-view="large"] .country-flag-icon { width:30px; height:20px; }
.pilot-directory[data-view="large"] .pilot-expanded { display:grid; grid-template-columns:minmax(0,3fr) minmax(0,2fr); gap:20px; grid-column:1/-1; width:100%; border-top:1px solid var(--border); padding-top:18px; min-height:130px; }
.pilot-directory[data-view="large"] .pilot-expanded:not(:has(.pilot-personal-summary)) { grid-template-columns:1fr; }
.pilot-description { min-width:0; display:flex; flex-direction:column; }
.pilot-expanded-team { font-size:13px; color:var(--text); }
.pilot-card-bio { font-size:14px; color:var(--muted); line-height:1.65; overflow-wrap:anywhere; display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden; margin:12px 0; }
.pilot-personal-summary { display:grid; align-content:start; gap:18px; margin:0; padding-left:18px; border-left:1px solid var(--border); }
.pilot-personal-summary dt { color:var(--muted); font-size:12px; }
.pilot-personal-summary dd { margin:4px 0 0; font-size:16px; overflow-wrap:anywhere; }
.pilot-device-model { display:block; color:var(--muted); font-size:13px; margin-top:4px; }
.pilot-global-stats { display:flex; gap:32px; margin:auto 0 0; padding-top:12px; }
.pilot-global-stats > div { display:flex; align-items:baseline; gap:8px; }
.pilot-global-stats dt { color:var(--muted); font-size:12px; }
.pilot-global-stats dd { order:-1; margin:0; font:500 26px var(--font-display); }
.pilot-game-hours { list-style:none; display:flex; flex-wrap:wrap; gap:8px 14px; padding:0; margin:12px 0 0; font-size:12px; color:var(--muted); }
.pilot-game-hours strong { font-weight:500; color:var(--text); }
.pilot-directory[data-view="list"] { grid-template-columns:1fr; gap:6px; }
.pilot-directory[data-view="list"] .pilot-card,.pilot-directory[data-view="list"] .pilot-list-heading { grid-template-columns:65px 70px minmax(180px,1fr) 60px 112px; gap:14px; padding:10px 16px; }
.pilot-directory[data-view="list"] .pilot-card { min-height:82px; border-radius:7px; }
.pilot-directory[data-view="list"] .pilot-card-main,.pilot-directory[data-view="list"] .pilot-id-row { display:contents; }
.pilot-directory[data-view="list"] .pilot-list-heading { display:grid; color:var(--muted); font-size:11px; align-items:center; }
.pilot-directory[data-view="list"] .pilot-list-heading span:nth-last-child(-n+2) { text-align:center; }
.pilot-directory[data-view="list"] .pilot-card-number { font-size:23px; }
.pilot-directory[data-view="list"] .pilot-card-name { font-family:var(--font-body); font-size:15px; }

/* В карточках личность читается одной строкой; колонки нужны только списку. */
.pilot-directory[data-view="medium"] .pilot-id-row { display:flex; flex-wrap:nowrap; gap:12px; }
.pilot-directory[data-view="medium"] .pilot-number-cell,
.pilot-directory[data-view="medium"] .pilot-team-cell { display:inline-flex; flex:0 0 auto; }
.pilot-directory[data-view="medium"] :is(.pilot-number-cell,.pilot-team-cell,.pilot-flag):has(> .muted) { display:none; }
.pilot-directory[data-view="medium"] .pilot-card-number { font-size:40px; min-width:0; }
.pilot-directory[data-view="medium"] .pilot-card-name { font-size:24px; white-space:nowrap; min-width:0; }
.pilot-directory[data-view="medium"] .pilot-flag { flex:0 0 auto; }
.pilot-directory[data-view="medium"] .country-flag-icon { width:30px; height:20px; }
.pilot-directory[data-view="medium"] .pilot-card-brief { display:flex; flex-wrap:wrap; gap:6px 18px; margin:8px 0 0; font-size:12px; }
.pilot-card-brief > div { display:flex; align-items:baseline; gap:6px; }
.pilot-card-brief dt { color:var(--muted); }
.pilot-card-brief dd { margin:0; color:var(--text); }
@media(max-width:960px) {
  .pilot-directory[data-view="large"] { grid-template-columns:1fr; }
}
@media(max-width:760px) {
  .pilot-directory[data-view="large"] .pilot-card { position:relative; padding:18px; }
  .pilot-directory[data-view="large"] .pilot-card-main { grid-column:1/-1; grid-template-columns:minmax(0,1fr); gap:18px; }
  .pilot-directory[data-view="large"] .pilot-avatar { width:64px; height:64px; }
  .pilot-directory[data-view="large"] .pilot-card-side { position:absolute; top:18px; right:18px; width:94px; }
  .pilot-directory[data-view="large"] .pilot-card-name { font-size:26px; }
  .pilot-directory[data-view="large"] .pilot-card-number { font-size:40px; }
  .pilot-directory[data-view="large"] .pilot-id-row { gap:10px; }
  .pilot-directory[data-view="large"] .pilot-expanded { grid-template-columns:1fr; gap:20px; min-height:0; }
  .pilot-personal-summary { grid-template-columns:repeat(2,minmax(0,1fr)); border-left:0; border-top:1px solid var(--border); padding:16px 0 0; }
}
.team-directory .team-card-head { text-decoration:none; color:var(--text); }
.team-directory .team-card { border-color:color-mix(in srgb,var(--team-primary) 24%,var(--border)); background:linear-gradient(115deg,color-mix(in srgb,var(--team-primary) 5%,transparent),transparent 70%),var(--surface); }
.team-directory .team-card:hover { border-color:var(--team-primary); }
.team-directory .team-card-name strong { overflow-wrap:anywhere; }
.team-directory .team-card-desc { display:block; -webkit-line-clamp:unset; line-clamp:unset; overflow:visible; border-left:2px solid var(--team-primary); padding:10px 12px; background:color-mix(in srgb,var(--team-primary) 4%,var(--surface-alt)); border-radius:0 6px 6px 0; }
.team-directory .team-card-desc > span { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; line-clamp:3; overflow:hidden; }
.team-directory[data-view="large"] .team-card-desc > span { display:block; -webkit-line-clamp:unset; line-clamp:unset; }
.team-member-count { font-size:12px; }
.team-card-owner { display:flex; flex-wrap:wrap; gap:5px 8px; margin:5px 0; font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.team-card-owner > span:last-child { min-width:0; }
.team-card-roster { display:none; }
.team-directory .team-logo :is(img,.team-logo-fallback)[hidden] { display:none; }
.team-directory[data-view="large"] { grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr)); align-items:start; }
.team-directory[data-view="large"] .team-card { padding:20px; gap:12px; }
.team-directory[data-view="large"] .team-card-head { flex-direction:column; align-items:stretch; gap:18px; }
.team-directory[data-view="large"] .team-logo { width:100%; height:140px; flex:auto; border-radius:10px; background:linear-gradient(120deg,color-mix(in srgb,var(--team-primary) 22%,var(--surface-2)),var(--surface-2)); display:flex; align-items:center; justify-content:center; }
.team-directory[data-view="large"] .team-logo img { width:100%; height:140px; background:transparent; }
.team-directory[data-view="large"] .team-logo-fallback { width:76px; height:76px; font-size:38px; }
.team-directory[data-view="large"] .team-card-name { flex-direction:row; flex-wrap:wrap; align-items:center; gap:10px; margin-bottom:8px; }
.team-directory[data-view="large"] .team-card-name strong { font-size:27px; }
.team-directory[data-view="large"] .team-card-desc { display:block; overflow:visible; }
.team-directory:is([data-view="large"],[data-view="list"]) .team-card-roster { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; border-top:1px solid color-mix(in srgb,var(--team-primary) 24%,var(--border)); padding-top:16px; }
.team-roster-group h3 { font:500 12px var(--font-body); margin:0 0 8px; color:var(--muted); }
.team-roster-group ul { padding:0; margin:0; list-style:none; display:grid; gap:7px; }
.team-roster-group li { display:grid; grid-template-columns:46px minmax(0,1fr); align-items:baseline; gap:4px 8px; font-size:14px; overflow-wrap:anywhere; }
.team-roster-group a { color:var(--text); text-decoration:none; overflow-wrap:anywhere; }
.team-roster-group a:hover { color:var(--team-primary); }
.team-roster-number { color:var(--team-primary); font:600 20px var(--font-display); white-space:nowrap; }
.team-roster-role { font-size:11px; grid-column:2; }
.team-roster-empty { color:var(--muted); }
.team-directory[data-view="list"] { grid-template-columns:1fr; gap:6px; }
.team-directory[data-view="list"] .team-card { display:grid; grid-template-columns:minmax(200px,1fr) minmax(0,2fr); grid-template-areas:"identity roster" "owner roster" "description roster"; align-items:start; align-content:start; gap:12px 28px; padding:20px; border-radius:7px; }
.team-directory[data-view="list"] .team-card-head { grid-area:identity; }
.team-directory[data-view="list"] .team-card-roster { grid-area:roster; border-top:0; border-left:1px solid color-mix(in srgb,var(--team-primary) 24%,var(--border)); padding:0 0 0 24px; }
.team-directory[data-view="list"] .team-logo { width:40px; height:40px; flex:0 0 40px; }
.team-directory[data-view="list"] .team-logo img, .team-directory[data-view="list"] .team-logo-fallback { width:40px; height:40px; }
.team-directory[data-view="list"] .team-card-name { flex-direction:row; flex-wrap:wrap; align-items:center; gap:8px; }
.team-directory[data-view="list"] .team-card-name strong { font:600 19px var(--font-display); }
.team-directory[data-view="list"] .team-card-owner { grid-area:owner; justify-content:flex-start; text-align:left; margin:0; }
.team-directory[data-view="list"] .team-card-desc { grid-area:description; }
@media(max-width:850px) {
  .team-directory[data-view="list"] .team-card { grid-template-columns:1fr; grid-template-areas:"identity" "owner" "description" "roster"; }
  .team-directory[data-view="list"] .team-card-roster { border-left:0; border-top:1px solid color-mix(in srgb,var(--team-primary) 24%,var(--border)); padding:16px 0 0; }
}
@media (max-width:600px) {
  .directory-view-switch button { min-height:44px; padding:9px 10px; }
  .pilot-directory .pilot-card { padding:12px; grid-template-columns:minmax(0,1fr) 80px; gap:10px; }
  .pilot-directory .pilot-id-row { grid-template-columns:44px 42px minmax(0,1fr) 22px; gap:6px; }
  .pilot-directory[data-view="medium"] .pilot-card-main { grid-column:1/-1; }
  .pilot-directory[data-view="medium"] .pilot-card-side { grid-column:1/-1; justify-self:end; }
  .pilot-directory[data-view="medium"] .pilot-id-row { gap:8px; }
  .pilot-directory[data-view="medium"] .pilot-card-name { font-size:22px; }
  .pilot-directory[data-view="medium"] .pilot-card-number { font-size:34px; }
  .pilot-directory[data-view="large"] .pilot-card-name { font-size:23px; }
  .pilot-directory[data-view="large"] .pilot-card-number { font-size:36px; }
  .pilot-directory[data-view="large"] .pilot-id-row { gap:8px; }
  .pilot-directory[data-view="list"] { overflow-x:auto; }
  .pilot-directory[data-view="list"] .pilot-card,.pilot-directory[data-view="list"] .pilot-list-heading { grid-template-columns:44px 44px minmax(130px,1fr) 30px 86px; gap:8px; min-width:410px; padding:10px; }
  .pilot-directory[data-view="list"] .pilot-card-number { font-size:20px; }
  .team-directory[data-view="large"] .team-card { padding:16px; }
  .team-directory[data-view="list"] .team-card { gap:14px; padding:16px; }
}
@media(max-width:480px) {
  .team-directory:is([data-view="large"],[data-view="list"]) .team-card-roster { grid-template-columns:1fr; }
}

/* ---------- ASPIRE League: графит, белая типографика, спектральный свет ---------- */
body {
  background-image: radial-gradient(ellipse at 95% 0%, rgba(37, 120, 145, .07), transparent 45%);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--bg); }
.site-header {
  /* Шапка и оригинальная графика сохраняют тёмный фон в обеих темах. */
  --text: #f2f4f5;
  --muted: #a2adb6;
  --surface: #13171b;
  --surface-2: #191e23;
  --surface-alt: #1d2329;
  --border: #343d45;
  --accent: #ff845d;
  --accent-rgb: 255, 132, 93;
  --cyan: #55d9df;
  background: #0d1114;
  color: var(--text);
  color-scheme: dark;
  border-bottom-color: #30383f;
}
body[class*="admin-theme-"] .site-header { box-shadow: none; }
.flag-strip, body[class*="admin-theme-"] .flag-strip {
  height: 3px;
  background: transparent;
  border: 0;
  opacity: 1;
}
.page-progress { position:fixed; z-index:90; inset:0 0 auto; height:3px; overflow:hidden; background:var(--surface); pointer-events:none; }
.page-progress-fill { height:100%; overflow:hidden; transform-origin:left; transition:transform .9s linear; }
.page-progress-fill::before { content:''; display:block; width:140%; height:100%; background:var(--spectrum); animation:spectrum-drift 60s ease-in-out infinite alternate; animation-delay:var(--spectrum-delay,0ms); }
.flag-strip.is-loading .page-progress-fill::before, .flag-strip.is-paused .page-progress-fill::before { animation-play-state:paused; }
.flag-strip.is-starting .page-progress-fill { transition:none; }
.flag-strip.is-finishing .page-progress-fill { transition-duration:.6s; transition-timing-function:ease-out; }
@keyframes spectrum-drift { to { transform:translateX(-28.5714%); } }
@media(prefers-reduced-motion:reduce) {
  .page-progress-fill, .flag-strip.is-finishing .page-progress-fill { transition:none; }
  .page-progress-fill::before { width:100%; animation:none; }
}
.header-inner { max-width: 1280px; padding: 22px 32px 0; gap: 22px 18px; align-items: center; }
.brand-row { gap: 0; }
a.brand-text-link { display: flex; align-items: center; gap: 18px; text-decoration: none; }
.brand-logo-window { position: relative; display: block; width: 152px; height: auto; aspect-ratio:2089 / 543; overflow: hidden; flex-shrink: 0; }
.brand-logo { position: absolute; width: 122.45%; height: auto; max-width: none; left: -7.42%; top: -67.22%; }
html[data-theme="light"] .brand-logo { filter:none; }
.brand-caption { display: flex; flex-direction: column; gap: 5px; padding-left: 18px; border-left: 1px solid var(--border); }
.brand-caption .brand-title { margin: 0; font: 700 17px/1.2 var(--font-body); letter-spacing: .035em; text-transform: uppercase; }
.brand-caption .brand-eyebrow { margin: 0; font: 10px/1.3 var(--font-body); letter-spacing: .11em; color: var(--muted); }
.social-links { order: 2; display: flex; margin: 0 0 0 22px; gap: 5px; }
.social-btn { width: 30px; height: 30px; padding: 6px; justify-content: center; border: 0; background: transparent; color: var(--muted); border-radius: 4px; }
.social-btn span { display: none; }
.social-btn:hover { background: #222a31; color: var(--text); }
html[data-theme="light"] .site-header .social-btn { color: var(--muted); }
.header-help-links { gap: 6px; }
.header-help-links a, .header-timezone summary, .theme-toggle { background: transparent; border-color: var(--border); color: var(--text); border-radius: 4px; }
.header-help-links a:first-child { border-left: 1px solid var(--border); }
.header-help-links a:hover, .header-timezone summary:hover, .theme-toggle:hover { background: var(--surface-alt); border-color: #76818b; }
.tabs { flex-basis: 100%; gap: 5px; border-top: 1px solid var(--border); padding-top: 6px; }
.tab { padding: 13px 16px; font: 600 13px/1.4 var(--font-body); letter-spacing: .015em; border-bottom-width: 2px; text-align: center; }
.tab.is-active { color: #fff; border-bottom-color: var(--cyan); }
.tab:hover { background: rgba(255,255,255,.025); }
/* Контур внутри ссылки: внешняя тень не должна заменять боковые границы. */
.site-header .tab { position:relative; }
.site-header .tab::after { content:''; position:absolute; inset:0; border:1px solid transparent; border-radius:3px; pointer-events:none; transition:border-color .18s ease; }
.site-header .tab:is(:hover,:focus-visible) { z-index:1; }
.site-header .tab:is(:hover,:focus-visible)::after { border-color:color-mix(in srgb,var(--cyan) 45%,var(--border)); }
.page { max-width: 1280px; padding: 32px 32px 64px; }
.page-admin { max-width: 1600px; }
.page-head h2 { letter-spacing: .025em; }
.eyebrow { font: 600 10px/1.5 var(--font-body); letter-spacing: .16em; color: var(--muted); text-transform: uppercase; }
.btn { border-radius: 4px; font-family: var(--font-body); font-size: 13px; font-weight: 600; letter-spacing: .01em; transition: background .16s, border-color .16s, color .16s; }
.btn-primary { border-color: transparent; }
.btn-ghost:hover { background: var(--accent-dim); }
input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), select, textarea { border-radius: 5px; }
input:focus, select:focus, textarea:focus { border-color: var(--cyan); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
:where(.card, .panel, .admin-card, .role-card, .pilot-personal-panel, .team-card, .pilot-card, .crew-session-card, .standings-card, .race-compact-card) { border-radius: 7px; }
:where(.table-wrap, .board, .results-board, .public-filters, .standings-competition-bar) { border-radius: 6px; }
:where(.board-head, thead th) { letter-spacing: .035em; }
:where(.board-row, table tr) { transition: background .15s; }
.home-panels { gap: 24px; margin-top: 32px; }
.home-panel .panel-head { min-height: 72px; padding-top: 4px; border-top: 1px solid var(--border); }
.home-panel .panel-head h2 { font-size: 26px; }
.panel-viewport { border-radius: 6px; }
.digest-kicker { color: var(--cyan); letter-spacing: .06em; }
.schedule-section { scroll-margin-top: 24px; }
.public-filters { background: var(--surface); border: 1px solid var(--border); padding: 18px 20px; }
.schedule-view-switch { border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.schedule-view-switch a { border-radius: 4px; }
.schedule-view-switch a.is-active { background: var(--surface-3); color: var(--text); border-color: var(--border); }
.cal-month { border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.cal-cell { background: var(--surface); }
.cal-head { font-family: var(--font-body); letter-spacing: .1em; color: var(--muted); }
.cal-cell.is-today { background: color-mix(in srgb, var(--cyan) 5%, var(--surface)); box-shadow: inset 0 2px var(--cyan); }
.cal-cell.is-today .cal-daynum { color: var(--cyan); }
.admin-sidebar { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 14px 8px; }
.admin-nav-link { border-radius: 3px; }
.admin-nav-link.is-active { border-left-color: var(--cyan); background: color-mix(in srgb, var(--cyan) 7%, var(--surface)); color: var(--text); }
.admin-nav-title { letter-spacing: .12em; }
.admin-grid .admin-card { border-color: var(--border); }
.admin-grid .admin-card:hover { border-color: var(--muted); box-shadow: none; }
.analysis-tabs button.is-active { color: var(--accent); border-color: var(--accent); }
.footer-brand { display: inline-flex; gap: 12px; align-items: center; text-decoration: none; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.footer-brand img { display: block; border-radius: 50%; }
.footer-brand small { display: block; font-weight: 400; color: var(--muted); font-size: 9px; letter-spacing: .1em; margin-top: 4px; }
.site-footer { background: var(--surface); border-top: 1px solid var(--border); }
.footer-inner { max-width: 1280px; gap: 20px; padding-left: 32px; padding-right: 32px; }

/* Главная: исходный логотип без перерисовки, только кадрирование в шапке. */
.aspire-hero {
  position: relative;
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid #30383f;
  border-radius: 8px;
  background: #0c1013;
  color: #f6f7f8;
}
.aspire-hero-copy { position: relative; z-index: 1; padding: 38px 0 38px 36px; }
.aspire-kicker { display: flex; align-items: center; gap: 9px; color: #adb9c0; font: 500 9px/1.5 var(--font-body); letter-spacing: .12em; text-transform: uppercase; }
.aspire-kicker i { width: 5px; height: 5px; background: #5bd7d6; flex-shrink: 0; }
.aspire-hero h1 { margin: 24px 0 20px; font: italic 800 clamp(42px, 4.8vw, 64px)/.95 var(--font-body); letter-spacing: -.055em; }
.aspire-hero h1 span { color: #b7c2ca; }
.aspire-hero-copy p { max-width: 300px; margin: 0; color: #adb9c0; font-size: 13px; line-height: 1.8; }
.aspire-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 26px; }
.aspire-hero-actions .btn { display: inline-flex; gap: 22px; align-items: center; padding: 13px 16px; }
.aspire-text-link { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 500; text-decoration: none; color: #d1d9df; }
.aspire-text-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 5px; }
.aspire-hero-art { position: relative; min-width: 0; align-self: stretch; display: flex; align-items: center; }
.aspire-hero-art::before { content: ''; position: absolute; z-index: 1; inset: 0; pointer-events: none; background: linear-gradient(90deg, #0c1013 0%, transparent 18%); }
.aspire-hero-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.aspire-hero-foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 24px; padding: 14px 36px; border-top: 1px solid #293137; color: #8d9ba6; font: 9px var(--font-mono); letter-spacing: .12em; }
.aspire-spectrum { margin-left: auto; height: 2px; width: 135px; background: var(--spectrum); }

@media (max-width: 1100px) {
  .social-links { margin-left: 12px; }
  .brand-caption { display: none; }
  .tab { padding: 13px 12px; }
  .aspire-hero-actions { gap: 16px; }
}
@media (max-width: 800px) {
  .header-inner { padding: 18px 20px 0; gap: 18px 12px; }
  .header-help-links { gap: 5px; }
  .header-help-links a { padding: 8px; }
  .tab { font-size: 12px; padding: 12px 9px; }
  .page { padding: 24px 20px 48px; }
  .page-admin { padding-right: 16px; padding-left: 16px; }
  .aspire-hero { grid-template-columns: 1fr 1.1fr; }
  .aspire-hero-copy { padding: 28px 0 28px 24px; }
  .aspire-hero h1 { font-size: 48px; }
  .aspire-kicker { font-size: 8px; letter-spacing: .07em; }
  .aspire-hero-actions { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  .header-inner { display: grid; grid-template-columns: minmax(0,1fr) 40px; gap: 14px 8px; padding: 15px 16px 12px; }
  .brand { grid-column: 1; grid-row: 1; }
  .brand-logo-window { width: 125px; }
  .social-links { gap: 1px; margin-left: 10px; }
  .social-btn { width: 26px; height: 28px; padding: 5px; }
  .menu-toggle { grid-column: 2; grid-row: 1; display: flex; width: 40px; height: 40px; }
  .header-help-links { grid-column: 1 / -1; grid-row: 2; width: 100%; margin: 0; flex-wrap: nowrap; }
  .header-help-links a { padding: 8px 10px; font-size: 11px; }
  .header-timezone { margin-left: auto; }
  .header-timezone summary { font-size: 11px; padding: 8px; }
  .theme-toggle { flex-shrink: 0; }
  .tabs { grid-column: 1 / -1; grid-row: 3; display: none; padding-top: 8px; padding-bottom: 0; }
  .tabs.is-open { display: flex; }
  .tab, .tab:first-child { padding: 12px; border-bottom: 0; border-left: 2px solid transparent; border-radius: 3px; font-size: 13px; }
  .tab.is-active { border-left-color: var(--cyan); background: var(--surface-alt); }
  .page { padding: 20px 16px 40px; }
  .aspire-hero { display: flex; flex-direction: column; align-items: stretch; }
  .aspire-hero-art { order: -1; aspect-ratio: 1.775; }
  .aspire-hero-art img { height: auto; object-fit: contain; }
  .aspire-hero-art::before { background: linear-gradient(0deg, #0c1013 0%, transparent 20%); }
  .aspire-hero-copy { padding: 8px 24px 28px; }
  .aspire-hero h1 { font-size: 48px; margin: 18px 0; }
  .aspire-hero h1 br { display: none; }
  .aspire-hero h1 span::before { content: ' '; }
  .aspire-hero-copy p { max-width: 100%; }
  .aspire-hero-actions { flex-direction: row; align-items: center; gap: 16px; margin-top: 20px; }
  .aspire-hero-actions .btn { font-size: 12px; gap: 16px; }
  .aspire-hero-foot { padding: 12px 24px; gap: 12px; font-size: 8px; }
  .aspire-hero-foot > span:nth-child(2) { display: none; }
  .aspire-spectrum { width: 100px; }
  .home-panels { margin-top: 24px; gap: 24px; }
  .public-filters { padding: 14px; }
  .footer-inner { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 360px) {
  .brand-logo-window { width: 112px; }
  .social-links { margin-left: 4px; }
  .social-btn { width: 23px; }
  .header-help-links a { font-size: 10px; padding: 8px; }
  .aspire-hero h1 { font-size: 40px; }
  .aspire-hero-copy { padding-left: 20px; padding-right: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Уточнение компоновки: соцсети, чтение карточек и компактный подвал. */
.social-twitch { --social-color: #b28aff; }
.social-tiktok { --social-color: #50e0dc; }
.social-youtube { --social-color: #ff6666; }
.social-discord { --social-color: #9a9fff; }
.site-header .social-btn:is(:hover, :focus-visible),
html[data-theme="light"] .site-header .social-btn:is(:hover, :focus-visible) {
  color: var(--social-color);
  background: color-mix(in srgb, var(--social-color) 10%, transparent);
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--social-color) 45%, transparent));
}
.social-btn:focus-visible { outline-color: var(--social-color); }
.home-panels { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.home-panel .panel-head, .home-panel-digest .panel-head,
.home-panel .panel-viewport, .home-panel-seasons .panel-viewport { max-width: none; width: 100%; margin-left: 0; margin-right: 0; }
.home-panel .panel-head { min-height: 74px; align-items: center; }
.home-panel .panel-head h2 { font: 600 22px/1.3 var(--font-body); letter-spacing: -.025em; }
.home-panel .digest-title { font-size: 25px; line-height: 1.3; }
.digest-meta { font-size: 12px; line-height: 1.6; }
.digest-podium-row .pilot-link { font: 500 13px/1.5 var(--font-body); }
.btn { line-height: 1.45; }
.pilot-directory .pilot-card-name { font: 600 20px/1.3 var(--font-body); letter-spacing: -.025em; }
.pilot-directory[data-view="large"] .pilot-card-name { font-size: 24px; }
.pilot-directory[data-view="list"] .pilot-card-name { font-size: 14px; }
.pilot-directory .pilot-card-side { gap: 6px; }
.pilot-directory .reputation-squares { gap: 3px; min-height: 16px; }
.pilot-directory .reputation-square { width: 16px; height: 16px; flex: 0 0 16px; border-radius: 3px; font-size: 9px; }
.pilot-directory .reputation-square.is-large-count { font-size: 7px; }
.reputation-square:focus-visible { outline-color: var(--cyan); }
.site-footer { padding: 0; text-align: left; font-family: var(--font-body); }
.footer-inner { display: grid; grid-template-columns: minmax(0,1fr) auto auto; grid-template-areas: 'brand navigation version' 'contacts contacts version'; align-items: center; gap: 9px 24px; margin: 0 auto; padding: 18px 32px; }
.footer-brand { grid-area: brand; gap: 9px; font-size: 11px; letter-spacing: .025em; }
.footer-brand small { font-size: 10px; letter-spacing: 0; text-transform: none; margin-top: 2px; }
.footer-nav { grid-area: navigation; display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; }
.footer-nav a, .footer-contacts a { text-decoration: none; }
.footer-nav a:hover, .footer-email:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.footer-contacts { grid-area: contacts; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 12px; line-height: 1.5; }
.footer-email { overflow-wrap: anywhere; }
.footer-social-link:hover, .footer-social-link:focus-visible { color: var(--social-color); }
html[data-theme="light"] .footer-social-link.social-twitch { --social-color: #7338b5; }
html[data-theme="light"] .footer-social-link.social-tiktok { --social-color: #176b78; }
html[data-theme="light"] .footer-social-link.social-youtube { --social-color: #b91c1c; }
html[data-theme="light"] .footer-social-link.social-discord { --social-color: #4e47ad; }
.footer-inner .changelog-wrap { grid-area: version; align-self: start; justify-self: end; margin: 0; }
.site-version { font-size: 11px; padding: 3px 0 3px 12px; }
.changelog-popup { width: min(420px, calc(100vw - 32px)); text-align: left; }
@media (max-width: 900px) {
  .home-panels { grid-template-columns: minmax(0,1fr); }
  .home-panel .panel-head { min-height: 66px; }
  .footer-inner { grid-template-columns: minmax(0,1fr) auto; grid-template-areas: 'brand version' 'navigation navigation' 'contacts contacts'; padding: 16px 20px; gap: 10px; }
}
@media (max-width: 480px) {
  .footer-inner { padding: 16px; }
  .footer-nav { gap: 10px 16px; }
  .footer-contacts { gap: 6px 12px; }
  .footer-email { flex-basis: 100%; }
  .pilot-directory .pilot-card-name, .pilot-directory[data-view="medium"] .pilot-card-name { font-size: 17px; }
  .pilot-directory[data-view="list"] .pilot-card-name { font-size: 13px; }
}

/* Компактное обучение: немодальная подсказка и мягкий фокус без блокировки сайта. */
.help-tours { padding:18px; margin:0 0 22px; border:1px solid var(--border); border-radius:8px; background:var(--surface); }
.help-tours h3 { margin:5px 0 6px; font:700 20px/1.3 var(--font-body); }
.help-tours > div > p { max-width:760px; font-size:13px; line-height:1.6; margin:0 0 16px; }
.help-tour-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.help-tour-options > div { display:flex; flex-direction:column; gap:6px; min-width:0; padding:12px; border:1px solid var(--border); border-radius:6px; background:var(--surface-2); }
.help-tour-options .btn { align-self:flex-start; padding:0; border:0; background:none; color:var(--text); text-align:left; white-space:normal; font-weight:700; }
.help-tour-options .btn:hover { color:var(--cyan); transform:none; box-shadow:none; }
.help-tour-options span { font-size:12px; line-height:1.5; }
.tour-completion { color:var(--cyan); }
.tour-completion:empty { display:none; }
.site-tour-dialog, .site-tour-resume, .site-tour-welcome { --tour-panel:#202a33; --tour-border:#5c7485; --tour-muted:#c1ccd5; }
html[data-theme="light"] :is(.site-tour-dialog,.site-tour-resume,.site-tour-welcome) { --tour-panel:#fff; --tour-border:#8b9ca7; --tour-muted:#4c5b65; }
.site-tour-dialog { position:fixed; inset:0; z-index:1100; width:100%; height:100%; max-width:none; max-height:none; margin:0; padding:0; border:0; background:transparent; color:var(--text); overflow:hidden; pointer-events:none; }
.site-tour-dialog:not([open]) { display:none; }
.site-tour-shade { position:fixed; inset:0; width:100%; height:100%; pointer-events:none; animation:tour-shade-in .2s ease-out; }
.site-tour-shade > rect { fill:rgba(0,5,10,.55); }
html[data-theme="light"] .site-tour-shade > rect { fill:rgba(8,18,27,.36); }
.site-tour-dialog.is-loading .site-tour-hole { display:none; }
.site-tour-dialog.is-unfocused .site-tour-shade { opacity:0; }
.site-tour-ring { position:fixed; pointer-events:none; border:1px solid color-mix(in srgb,var(--cyan) 70%,transparent); border-radius:8px; box-shadow:0 0 12px 3px color-mix(in srgb,var(--cyan) 13%,transparent); }
.site-tour-card { position:fixed; width:min(350px,calc(100vw - 28px)); max-height:calc(100dvh - 28px); overflow-y:auto; padding:16px; border:1px solid var(--tour-border); border-radius:8px; background:var(--tour-panel); box-shadow:0 14px 48px #0006; pointer-events:auto; animation:tour-card-in .2s ease-out; }
.site-tour-card-top { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.site-tour-progress { color:var(--cyan); font:600 11px/1.5 var(--font-body); }
.site-tour-close { display:grid; place-items:center; flex:0 0 28px; width:28px; height:28px; padding:0; border:0; border-radius:4px; background:transparent; color:var(--tour-muted); font:24px/1 var(--font-body); cursor:pointer; }
.site-tour-close:hover { background:var(--surface-3); color:var(--text); }
.site-tour-card h3 { margin:7px 0 9px; color:var(--text); font:700 18px/1.35 var(--font-body); }
.site-tour-text { margin:0 0 12px; color:var(--text); font:400 13px/1.65 var(--font-body); }
.site-tour-target-note { font-size:12px; line-height:1.5; color:var(--tour-muted); }
.site-tour-outline { margin:0 0 12px; border:1px solid var(--tour-border); border-radius:5px; background:transparent; }
.site-tour-outline > summary { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px; font:600 12px/1.5 var(--font-body); cursor:pointer; list-style:none; }
.site-tour-outline > summary::-webkit-details-marker { display:none; }
.site-tour-outline > summary::after { content:'⌄'; color:var(--tour-muted); }
.site-tour-outline[open] > summary::after { content:'⌃'; }
.site-tour-outline > summary span { margin-left:auto; font-size:10px; font-weight:400; color:var(--tour-muted); }
.site-tour-outline nav { display:grid; gap:3px; padding:0 6px 6px; max-height:190px; overflow-y:auto; }
.site-tour-outline nav button { display:flex; align-items:center; gap:8px; width:100%; padding:7px; border:1px solid transparent; border-radius:4px; text-align:left; background:transparent; color:var(--tour-muted); font:500 12px/1.4 var(--font-body); cursor:pointer; }
.site-tour-outline nav button:hover { color:var(--text); background:var(--surface-2); }
.site-tour-outline nav button[aria-current="step"] { color:var(--text); border-color:var(--tour-border); background:color-mix(in srgb,var(--cyan) 9%,var(--tour-panel)); }
.site-tour-step-mark { display:grid; place-items:center; width:19px; height:19px; flex:0 0 19px; border:1px solid var(--tour-border); border-radius:4px; font-size:10px; }
.site-tour-outline .is-complete .site-tour-step-mark { color:var(--cyan); border-color:var(--cyan); }
.site-tour-understood { display:flex; align-items:center; gap:8px; margin:0 0 12px; font-size:12px; cursor:pointer; }
.site-tour-understood input { width:15px; height:15px; margin:0; accent-color:var(--cyan); }
.site-tour-actions { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.site-tour-actions button:disabled { opacity:.4; cursor:default; }
.site-tour-explore { display:block; padding:8px 0 0; border:0; background:transparent; color:var(--tour-muted); font:500 11px/1.5 var(--font-body); text-align:left; cursor:pointer; }
.site-tour-explore:hover { color:var(--cyan); }
.site-tour-hint { margin:8px 0 0; color:var(--tour-muted); font-size:10px; line-height:1.5; }
.site-tour-explanation { display:none; padding:0 0 10px; border:0; background:none; color:var(--cyan); font:600 11px/1.5 var(--font-body); text-align:left; cursor:pointer; }
.site-tour-dialog.is-loading .site-tour-ring { visibility:hidden; }
.site-tour-dialog.is-loading .site-tour-progress { display:inline-flex; align-items:center; gap:8px; }
.site-tour-dialog.is-loading .site-tour-progress::before { content:''; width:11px; height:11px; border:1px solid var(--tour-border); border-top-color:var(--cyan); border-radius:50%; animation:control-spin .7s linear infinite; }
.site-tour-resume { position:fixed; bottom:16px; right:16px; z-index:1090; display:flex; align-items:center; gap:12px; max-width:min(540px,calc(100vw - 32px)); padding:12px; border:1px solid var(--tour-border); border-radius:8px; background:var(--tour-panel); box-shadow:0 6px 28px #0004; color:var(--text); }
.site-tour-resume > div { min-width:0; display:grid; gap:4px; }
.site-tour-resume strong { font:600 12px/1.4 var(--font-body); }
.site-tour-resume span { font:400 11px/1.5 var(--font-body); color:var(--tour-muted); }
.site-tour-welcome { position:fixed; right:16px; bottom:16px; z-index:1090; width:min(360px,calc(100vw - 32px)); padding:18px; border:1px solid var(--tour-border); border-radius:8px; background:var(--tour-panel); box-shadow:0 6px 28px #0004; color:var(--text); }
.site-tour-welcome > .site-tour-close { float:right; }
.site-tour-welcome h3 { font:700 20px/1.4 var(--font-body); margin:8px 0; }
.site-tour-welcome p { font-size:13px; line-height:1.6; color:var(--tour-muted); }
.site-tour-welcome > div { display:flex; gap:8px; flex-wrap:wrap; }
.registration-practice { max-width:1000px; margin:0 auto; }
.practice-intro h2 { margin:8px 0 12px; }
.practice-intro > p { max-width:780px; font-size:14px; line-height:1.7; }
.practice-intro-actions { display:flex; flex-wrap:wrap; gap:8px; }
.practice-progress { display:flex; flex-wrap:wrap; gap:8px; padding:0; margin:22px 0 16px; list-style:none; counter-reset:practice; }
.practice-progress li { display:flex; align-items:center; gap:7px; padding:7px 10px; border:1px solid var(--border); border-radius:5px; color:var(--muted); font:600 12px/1.4 var(--font-body); counter-increment:practice; }
.practice-progress li::before { content:counter(practice); }
.practice-progress .is-complete::before { content:'✓'; }
.practice-progress .is-complete { color:var(--cyan); }
.practice-progress [aria-current="step"] { border-color:var(--cyan); color:var(--text); background:color-mix(in srgb,var(--cyan) 8%,var(--surface)); }
.practice-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:16px; }
.practice-panel { min-width:0; padding:18px; background:var(--surface); border:1px solid var(--border); border-radius:8px; scroll-margin-top:90px; }
.practice-panel-heading { display:flex; align-items:center; flex-wrap:wrap; gap:9px; }
.practice-number { display:grid; place-items:center; width:24px; height:24px; border:1px solid var(--border); border-radius:5px; color:var(--cyan); font-size:12px; }
.practice-panel h3 { margin:0; font:700 16px/1.4 var(--font-body); }
.practice-status { color:var(--muted); font-size:11px; margin-left:auto; }
.practice-panel p { font-size:13px; line-height:1.65; color:var(--muted); }
.practice-panel fieldset { min-width:0; margin:0; padding:0; border:0; }
.practice-panel fieldset:disabled { opacity:.55; }
.practice-panel label { display:grid; gap:6px; font-size:12px; font-weight:600; }
.practice-fields { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:12px; }
.practice-panel input, .practice-panel select { width:100%; min-width:0; padding:10px; color:var(--text); background:var(--surface-2); border:1px solid var(--border); border-radius:5px; font:400 14px var(--font-body); }
.practice-panel [aria-invalid="true"] { border-color:var(--red); }
.practice-panel .practice-error { color:var(--red); }
.practice-result { margin:14px 0; padding:14px; border:1px solid var(--border); border-radius:6px; background:var(--surface-2); }
.practice-result strong { font-size:14px; }
.practice-result p { margin-bottom:0; }
.practice-result.is-approved { border-color:var(--cyan); }
.practice-result.is-approved strong { color:var(--cyan); }
@media(max-width:700px) { .help-tour-options,.practice-grid { grid-template-columns:1fr; }.help-tours { padding:14px; }.help-tour-options { gap:8px; }.help-tour-options > div { padding:10px; }.site-tour-card { padding:14px; }.site-tour-text { font-size:12px; line-height:1.6; }.site-tour-hint { display:none; }.site-tour-explanation { display:block; }.site-tour-card.is-compact :is(.site-tour-text,.site-tour-outline,.site-tour-understood,.site-tour-hint) { display:none; }.site-tour-resume { gap:8px; }.practice-panel { padding:14px; } }
@media(max-height:550px) { .site-tour-hint { display:none; }.site-tour-outline nav { max-height:110px; }.site-tour-text { max-height:24dvh; overflow-y:auto; } }
@keyframes tour-shade-in { from { opacity:0; } to { opacity:1; } }
@keyframes tour-card-in { from { opacity:0; translate:0 4px; } to { opacity:1; translate:0 0; } }
@keyframes control-spin { to { rotate:360deg; } }

/* Единая обратная связь: цвет, мягкий свет и небольшое нажатие без сдвига вёрстки. */
:where(button, .btn, .tab, .class-tab, .admin-nav-link, .schedule-view-switch a, .weekend-session-tabs a, .class-chip span, .switch-slider, .header-timezone summary, .admin-section > summary, .faq-item > summary) {
  --control-glow:var(--accent);
  transition:background-color .18s ease,color .18s ease,border-color .18s ease,box-shadow .22s ease,filter .2s ease,transform .16s ease;
}
:where(.tab, .admin-nav-link, .schedule-view-switch a, .directory-view-switch button, .theme-toggle, .menu-toggle, .site-tour-outline button) { --control-glow:var(--cyan); }
:where(.btn-danger, .btn-danger-ghost, .review-negative) { --control-glow:var(--red); }
@media (hover:hover) {
  :where(button, .btn, .tab, .class-tab, .admin-nav-link, .schedule-view-switch a, .weekend-session-tabs a, .header-timezone summary):not(:disabled):not([aria-disabled="true"]):hover {
    box-shadow:0 0 0 1px color-mix(in srgb,var(--control-glow) 22%,transparent),0 0 15px color-mix(in srgb,var(--control-glow) 12%,transparent);
  }
  .btn:not(:disabled):not([aria-disabled="true"]):hover { transform:translateY(-1px); }
  .btn-primary:not(:disabled):hover { box-shadow:0 3px 16px color-mix(in srgb,var(--action) 28%,transparent); }
  .switch:hover .switch-slider { box-shadow:0 0 0 3px var(--accent-dim),0 0 14px color-mix(in srgb,var(--accent) 16%,transparent); }
}
:where(button, .btn):not(:disabled):not([aria-disabled="true"]):active { transform:translateY(0) scale(.985); }
:where(button, .btn):disabled { transform:none; box-shadow:none; cursor:not-allowed; }
:where(button, .btn, .tab, .class-tab, .schedule-view-switch a):focus-visible { box-shadow:0 0 0 4px color-mix(in srgb,var(--control-glow) 16%,transparent); }
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), select, textarea) { transition:border-color .18s ease,background-color .18s ease,box-shadow .18s ease; }
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), select, textarea):focus { box-shadow:0 0 0 3px color-mix(in srgb,var(--cyan) 12%,transparent); }
.switch-slider::before { transition:transform .22s cubic-bezier(.2,.7,.2,1),box-shadow .2s ease; }
.switch input:focus-visible + .switch-slider { outline:2px solid var(--cyan); outline-offset:3px; }
.switch input:checked + .switch-slider::before { box-shadow:0 0 8px rgba(255,255,255,.2); }
@media (prefers-reduced-motion:reduce) {
  .site-tour-card, .site-tour-shade, .site-tour-progress::before { animation:none !important; }
  :where(button, .btn):hover, :where(button, .btn):active { transform:none !important; }
}

/* Сезонные категории: один читаемый протокол с переключением класса. */
.class-standings { margin:20px 0; padding:22px; min-width:0; }
.class-standings-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
.class-standings-tabs .btn { text-align:center; justify-content:center; }
.class-scroll-hint { display:none; }
.class-board-search { display:flex; align-items:center; gap:12px; max-width:430px; margin:18px 0; }
.class-board-search input { min-width:0; width:100%; padding:10px 12px; border:1px solid var(--border); background:var(--surface); color:var(--text); font:inherit; border-radius:5px; }
.class-result-place { display:block; white-space:nowrap; color:var(--muted); font-size:11px; margin-top:4px; }
.class-results-table td { vertical-align:middle; }
.license-badge[data-cup] { color:var(--cup-text); background:var(--cup-bg); border:1px solid var(--cup-border, var(--cup-bg)); }
[data-cup="PRO"] { --cup-bg:#f5f5f5; --cup-text:#17191c; }
[data-cup="PRO-AM"] { --cup-bg:#17191c; --cup-text:#f5f5f5; --cup-border:#6d727b; }
[data-cup="AM"] { --cup-bg:#ba2638; --cup-text:#fff; }
[data-cup="SILVER CUP"] { --cup-bg:#bfc5cf; --cup-text:#17191c; }
[data-cup="NATIONAL"] { --cup-bg:var(--surface-3); --cup-text:var(--text); --cup-border:var(--border); }
.class-admin-pilot { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin:12px 0; padding:12px 0; border-top:1px solid var(--border); }
.class-admin-pilot form { display:flex; flex-wrap:wrap; gap:8px; }
.season-license-status { margin:16px 0; }
@media(max-width:600px) {
  .class-standings { padding:14px; }
  .class-standings-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; }
  .class-standings-tabs .btn { padding:9px 5px; font-size:12px; }
  .class-standings-tabs .btn:first-child { grid-column:1 / -1; }
  .class-standings-tabs-cups { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .class-scroll-hint { display:block; font-size:12px; }
}

/* Контрастные подписи событий в светлой теме. */
html[data-theme="light"] { --event-short:#176f79; --event-short-rgb:23,111,121; --event-championship:#805d00; --event-championship-rgb:128,93,0; --event-championship-sprint:#806b3c; --event-championship-sprint-rgb:128,107,60; }

/* Публичные страницы: единый ритм, компактное расписание и призовые места. */
.social-instagram { --social-color:#ed80b1; }
html[data-theme="light"] .footer-social-link.social-instagram { --social-color:#a62c70; }
.aspire-hero-art { aspect-ratio:2558/1441; }
.aspire-hero-art img { object-fit:contain; }
.donate-panel { position:relative; display:flex; align-items:center; justify-content:space-between; gap:32px; max-width:none; margin:30px 0 0; padding:28px 30px; border:1px solid var(--border); border-radius:7px; background:linear-gradient(115deg,rgba(var(--accent-rgb),.065),transparent 60%),var(--surface); overflow:hidden; }
.donate-panel::before { content:''; position:absolute; inset:0 0 auto; height:2px; background:var(--spectrum); opacity:.65; }
.donate-copy { max-width:620px; min-width:0; }
.donate-copy h2 { margin:9px 0 10px; font-size:23px; }
.donate-copy p { margin:0; color:var(--muted); font-size:13px; line-height:1.7; }
.donate-action { display:flex; flex-direction:column; align-items:center; gap:10px; flex-shrink:0; }
.donate-action .btn { display:inline-flex; align-items:center; gap:24px; }
.donate-action > span { font-size:10px; letter-spacing:.04em; }
.season-page-head { align-items:flex-start; }
.season-page-head h2 { margin-bottom:10px; }
.season-page-head .page-actions { padding-top:8px; }
.season-summary-bar { display:flex; flex-wrap:wrap; gap:12px 32px; padding:17px 20px; margin-bottom:14px; border:1px solid var(--border); border-radius:7px; background:var(--surface); color:var(--muted); font-size:12px; }
.season-summary-bar strong { color:var(--text); margin-right:5px; font-variant-numeric:tabular-nums; }
.season-registration-status { margin-left:auto; }
.season-overview > .standings-details { margin:12px 0; }
.season-overview > .standings-details > summary { gap:12px; }
.season-overview > .standings-details > summary > span:last-child { margin-left:auto; }
.season-description { white-space:pre-line; margin:0; line-height:1.7; }
.season-round-count { margin-left:auto; font:11px var(--font-body); color:var(--muted); }
.season-rounds-panel[open] > summary .season-round-count { transform:none; }
.season-rounds-scroll { max-height:320px; overflow:auto; overscroll-behavior-y:contain; scrollbar-gutter:stable; }
.season-schedule-board { border:0; border-radius:0; margin:0; min-width:740px; }
.season-schedule-board .board-row { grid-template-columns:112px minmax(175px,1fr) minmax(390px,1.7fr); padding:11px 18px; gap:16px; align-items:center; }
.season-schedule-board .board-head { position:sticky; top:0; z-index:2; background:var(--surface-2); padding-top:9px; padding-bottom:9px; }
.season-schedule-board .col-date { font-size:12px; }
.season-schedule-board .col-date small { display:block; margin-bottom:5px; color:var(--muted); font:10px var(--font-body); }
.season-schedule-board .sc-track { font:600 14px var(--font-body); }
.season-schedule-board .round-tags { margin-top:5px; gap:5px; }
.season-schedule-board .pill { font-size:9px; padding:2px 6px; }
.season-schedule-board .sess-row { display:flex; justify-content:flex-start; gap:18px; flex-wrap:nowrap; }
.season-schedule-board .sess-block { min-width:100px; padding:0; border:0; border-radius:0; background:transparent; display:flex; flex-direction:column; align-items:flex-start; gap:4px; }
.season-schedule-board .sess-block-name { color:var(--muted); font:10px var(--font-body); text-transform:none; letter-spacing:0; }
.season-schedule-board .sess-block-time { font:12px var(--font-mono); color:var(--text); }
.session-next-day { font-size:9px; color:var(--muted); }
.season-results-head { margin:26px 0 15px; }
.season-results-head h3 { margin:6px 0 0; font-size:23px; }
.season-pilot-board .standings-mini-scroll { max-height:540px; overflow:auto; overscroll-behavior-y:contain; }
.season-pilot-board .standings-mini-table { width:100%; min-width:680px; }
.season-pilot-board thead { position:sticky; top:0; z-index:2; }
.season-pilot-board .reputation-squares { margin-left:7px; }
.team-directory:is([data-view="medium"],[data-view="large"]) { align-items:stretch; }
.team-directory .team-card { min-width:0; justify-content:flex-start; align-content:start; }
.team-directory[data-view="medium"] .team-card-head { min-height:96px; }
.team-directory[data-view="medium"] .team-card-desc { min-height:calc(3 * 1.4em + 20px); }
.team-directory .team-card > * { min-width:0; }
.team-directory .team-card-desc { white-space:normal; overflow-wrap:anywhere; }
.team-directory:is([data-view="medium"],[data-view="large"]) .team-card-desc > span { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; line-clamp:3; overflow:hidden; }
.team-directory .team-roster-group { align-self:start; }
.records-overview .page-head { margin-bottom:20px; }
.records-overview .page-head p { font-size:13px; margin-bottom:0; }
.records-overview .records-tabs { display:flex; flex-wrap:wrap; padding:6px; gap:4px; border:1px solid var(--border); border-radius:7px; background:var(--surface); }
.records-overview .records-tabs a { flex:1 1 170px; justify-content:center; text-align:center; padding:12px 16px; }
.records-controls { display:flex; flex-wrap:wrap; gap:14px; padding:16px 18px; border:1px solid var(--border); border-radius:7px; background:var(--surface); }
.records-controls label { flex:1 1 210px; max-width:420px; }
.record-track-card { border:1px solid var(--border); border-radius:7px; background:var(--surface); }
.record-track-card > summary { padding:16px 20px; gap:18px; }
.record-track-card > summary::after { content:'+'; color:var(--muted); font-size:20px; font-weight:400; }
.record-track-card[open] > summary::after { content:'−'; }
.record-track-card[open] > summary { border-bottom:1px solid var(--border); }
.rtc-track-name { flex:1; font:600 17px var(--font-body); }
.rtc-track-name small { display:block; margin-top:6px; color:var(--muted); font:10px var(--font-body); }
.record-track-card .rtc-best { opacity:1; color:var(--muted); font-size:11px; }
.record-track-card .rtc-body { padding:0; overflow:auto; }
.record-track-card .rtc-row { grid-template-columns:28px minmax(165px,1fr) 100px 190px minmax(155px,1fr); min-width:760px; gap:14px; padding:13px 20px; border-bottom:1px solid var(--border); }
.rtc-meta { opacity:1; color:var(--muted); line-height:1.6; }
.rtc-sectors { opacity:1; }
.records-table thead { position:sticky; top:0; z-index:2; background:var(--surface-2); }
.records-scroll { max-height:650px; overscroll-behavior:contain; }
:is(.stats-table tr,.standings-mini-table tr,.board-row,.rtc-row).is-p1 { --podium-color:var(--gold); --podium-fill:color-mix(in srgb,var(--gold) 14%,transparent); }
:is(.stats-table tr,.standings-mini-table tr,.board-row,.rtc-row).is-p2 { --podium-color:var(--silver); --podium-fill:color-mix(in srgb,var(--silver) 12%,transparent); }
:is(.stats-table tr,.standings-mini-table tr,.board-row,.rtc-row).is-p3 { --podium-color:var(--bronze); --podium-fill:color-mix(in srgb,var(--bronze) 15%,transparent); }
:is(.stats-table tbody tr,.standings-mini-table tbody tr):is(.is-p1,.is-p2,.is-p3) > td,
:is(.board-row,.rtc-row):is(.is-p1,.is-p2,.is-p3) { background:var(--podium-fill) !important; }
:is(.stats-table tbody tr,.standings-mini-table tbody tr):is(.is-p1,.is-p2,.is-p3) > td:first-child { box-shadow:inset 3px 0 var(--podium-color); }
:is(.is-p1,.is-p2,.is-p3) .pos-badge { color:var(--podium-color); border-color:var(--podium-color); background:color-mix(in srgb,var(--podium-color) 10%,transparent); }
@media(max-width:700px) {
  .donate-panel { flex-direction:column; align-items:flex-start; padding:22px; gap:20px; }
  .donate-action { align-items:flex-start; }
  .season-summary-bar { gap:12px 20px; }
  .season-registration-status { margin-left:0; width:100%; }
  .season-page-head { flex-direction:column; }
  .season-rounds-scroll { max-height:300px; }
  .record-track-card > summary { padding:14px; flex-wrap:wrap; gap:10px; }
  .rtc-track-name { flex-basis:calc(100% - 30px); }
  .record-track-card > summary::after { order:-1; }
  .record-track-card .rtc-best { font-size:10px; }
}

/* Команды: отдельная обложка, постоянные секции и понятное управление составом. */
.team-card-cover { display:none; text-decoration:none; }
.team-directory[data-view="large"] .team-card { display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:auto 100px 20px 76px 1fr; justify-content:stretch; align-items:start; gap:12px; overflow:hidden; }
.team-directory[data-view="large"] .team-card-cover { position:relative; display:flex; align-items:center; justify-content:center; margin:-20px -20px 0; width:calc(100% + 40px); aspect-ratio:8/3; overflow:hidden; background:radial-gradient(ellipse at 15% 90%,color-mix(in srgb,var(--team-primary) 28%,transparent),transparent 65%),linear-gradient(125deg,var(--team-secondary),var(--surface-2)); }
.team-card-cover img { display:block; width:100%; height:100%; object-fit:contain; }
.team-card-cover > span { font:italic 700 clamp(38px,5vw,64px) var(--font-body); letter-spacing:.12em; color:color-mix(in srgb,var(--team-accent) 30%,transparent); }
.team-directory[data-view="large"] .team-card-head { display:grid; grid-template-columns:72px minmax(0,1fr); align-items:center; gap:16px; width:100%; height:100px; }
.team-directory[data-view="large"] .team-logo { width:72px; height:72px; border-radius:7px; background:var(--surface-alt); }
.team-directory[data-view="large"] .team-logo img,.team-directory[data-view="large"] .team-logo-fallback { width:72px; height:72px; border-radius:7px; object-fit:contain; }
.team-directory[data-view="large"] .team-card-name { display:flex; flex-direction:column; align-items:flex-start; gap:7px; margin:0 0 5px; }
.team-directory[data-view="large"] .team-card-name strong { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-clamp:2; overflow:hidden; font-size:22px; line-height:1.15; }
.team-directory[data-view="large"] .team-card-owner { margin:0; height:20px; flex-wrap:nowrap; overflow:hidden; }
.team-directory[data-view="large"] .team-card-owner > span:last-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.team-directory[data-view="large"] .team-card-desc { height:76px; width:100%; margin:0; overflow:hidden; }
.team-directory[data-view="large"] .team-card-roster { align-self:stretch; width:100%; }
.team-directory .team-roster-group h3 { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.team-directory .team-roster-group ul { grid-auto-rows:56px; align-content:start; }
.team-roster-group h3 small { font:10px var(--font-mono); }
.team-directory .team-roster-group li { height:56px; grid-template-rows:auto auto; row-gap:2px; align-content:center; }
.team-directory .team-roster-group li > .team-roster-number { grid-row:1; grid-column:1; align-self:baseline; }
.team-directory .team-roster-group li > a,.team-directory .team-roster-group li > span:not(.team-roster-number) { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-clamp:2; overflow:hidden; line-height:1.3; }
.team-directory .team-roster-empty { border:1px dashed var(--border); border-radius:5px; padding:0 6px; font-size:12px; }
.team-directory[data-view="large"] .team-roster-group ul { min-height:182px; }
.team-profile-cover { margin:16px 0 0; aspect-ratio:8/3; max-height:320px; overflow:hidden; border:1px solid var(--border); border-radius:7px 7px 0 0; }
.team-profile-cover img { display:block; width:100%; height:100%; object-fit:contain; }
.team-application-cover { display:block; width:100%; max-height:180px; object-fit:contain; border-radius:5px; margin:14px 0; }
.team-profile-banner.has-cover { margin-top:0; border-radius:0 0 7px 7px; }
.team-media-fields { min-width:0; margin:0; padding:16px; border:1px solid var(--border); border-radius:7px; }
.team-media-fields legend { padding:0 7px; font-weight:600; }
.team-media-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.team-media-grid input[type="file"] { width:100%; font-size:12px; }
.team-media-remove { display:flex; gap:8px; align-items:center; color:var(--muted); font-size:12px; }
.team-media-remove input { width:auto; }
.team-media-error { color:var(--red); font-size:12px; }
.team-preview { padding:0; gap:0; }
.team-preview-cover { aspect-ratio:8/3; overflow:hidden; background:linear-gradient(120deg,var(--team-secondary),color-mix(in srgb,var(--team-primary) 45%,var(--surface))); }
.team-preview-cover img { width:100%; height:100%; object-fit:contain; }
.team-preview-identity { display:flex; gap:14px; align-items:center; padding:16px; }
.team-preview-identity > img { width:64px; height:64px; object-fit:contain; border-radius:6px; }
.team-preview-identity h3 { font-size:20px; margin:8px 0 0; overflow-wrap:anywhere; }
.team-preview > p { padding:0 16px 16px; margin:0; font-size:12px; }
.team-roster-editor { scroll-margin-top:20px; }
.team-roster-guide { padding:14px 16px; margin:14px 0; border-left:2px solid var(--team-primary,var(--cyan)); background:var(--surface); border-radius:0 6px 6px 0; }
.team-roster-guide strong { font-size:13px; }
.team-roster-guide p { color:var(--muted); font-size:12px; line-height:1.7; margin:5px 0 0; }
.team-roster-status:empty { display:none; }
.team-roster-status { font-size:13px; padding:12px 14px; border:1px solid var(--border); border-radius:5px; background:var(--surface); }
.team-roster-status.is-success { color:var(--green); }
.team-roster-status.is-error { color:var(--red); }
.team-roster-columns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:16px; }
.team-roster-section { min-width:0; padding:14px; border:1px solid var(--border); border-radius:7px; background:var(--surface); }
.team-roster-section-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-bottom:12px; }
.team-roster-section-head h3 { margin:0; font-size:17px; }
.team-roster-section-head > span { color:var(--muted); font:11px var(--font-mono); }
.team-member-card { padding:14px 0; border-top:1px solid var(--border); }
.team-member-identity { display:grid; grid-template-columns:38px minmax(0,1fr); gap:10px; align-items:center; }
.team-member-identity a { font-size:13px; font-weight:600; overflow-wrap:anywhere; }
.team-member-number { font-size:17px; color:var(--team-primary,var(--text)); }
.team-member-identity small { display:block; margin-top:5px; color:var(--muted); font-size:10px; }
.team-member-identity .reputation-squares { display:flex; margin:5px 0 0; }
.team-member-controls { display:flex; flex-direction:column; align-items:stretch; gap:8px; margin-top:12px; }
.team-move-button { width:100%; justify-content:center; gap:8px; }
.team-swap-picker,.team-member-more { border:1px solid var(--border); border-radius:5px; font-size:11px; }
.team-swap-picker > summary,.team-member-more > summary { cursor:pointer; padding:10px; line-height:1.5; }
.team-swap-picker p { color:var(--muted); font-size:11px; line-height:1.6; margin:0; padding:0 10px 10px; }
.team-swap-option { display:flex; align-items:center; flex-wrap:wrap; gap:7px; text-align:left; width:100%; padding:11px 10px; border:0; border-top:1px solid var(--border); border-radius:0; background:transparent; color:var(--text); font:12px var(--font-body); cursor:pointer; }
.team-swap-option:hover { background:var(--surface-alt); color:var(--cyan); }
.team-swap-option small { margin-left:auto; color:var(--muted); font-size:10px; }
.team-member-more { color:var(--muted); border-color:transparent; }
.team-member-more > div { display:grid; gap:8px; padding:0 8px 8px; }
.team-member-more button { width:100%; }
.team-empty-slot { display:flex; gap:10px; align-items:center; min-height:60px; margin-top:10px; padding:14px; border:1px dashed var(--border); border-radius:5px; color:var(--muted); font-size:12px; }
.team-empty-slot > span { font-size:22px; color:var(--border); }

/* Боковая навигация главной и кабинета на широком экране. */
.edge-preview-rail { display:none; color:var(--muted); }
.home-with-rails { position:relative; min-width:0; }
.edge-preview-track { display:none; }
@media(min-width:1720px) {
  .edge-preview-track { position:absolute; top:0; bottom:0; z-index:5; display:block; width:min(192px,calc((100vw - 1280px)/2 - 40px)); pointer-events:none; }
  .edge-preview-track-left { right:calc(100% + 56px); }
  .edge-preview-track-right { left:calc(100% + 56px); }
  .edge-preview-rail { position:sticky; top:16px; display:block; width:100%; max-height:calc(100dvh - 32px); overflow:auto; scrollbar-width:thin; pointer-events:auto; }
}
.edge-preview-left { padding:4px 0; }
.edge-preview-right { padding:18px 15px; border:1px solid color-mix(in srgb,var(--border) 65%,transparent); border-radius:5px; background:linear-gradient(145deg,color-mix(in srgb,var(--cyan) 3%,transparent),transparent 70%),var(--surface); }
.edge-rail-eyebrow { display:block; margin-bottom:12px; font:500 9px/1.5 var(--font-body); letter-spacing:.14em; text-transform:uppercase; color:var(--muted); }
.edge-preview-rail h2 { font:600 15px/1.4 var(--font-body); color:var(--text); margin:0 0 18px; overflow-wrap:anywhere; }
.edge-preview-left h2 { font-size:13px; font-weight:500; }
.edge-preview-left nav { display:flex; flex-direction:column; border-left:1px solid var(--border); }
.edge-preview-left nav a { display:flex; align-items:center; gap:10px; margin-left:-1px; padding:11px 8px 11px 12px; border-left:2px solid transparent; text-decoration:none; color:var(--muted); font:11px/1.5 var(--font-body); transition:color .18s,border-color .18s; }
.edge-preview-left nav a > span { font:9px var(--font-mono); color:color-mix(in srgb,var(--muted) 55%,var(--bg)); }
.edge-preview-left nav a:is(:hover,[aria-current="location"]) { color:var(--text); border-left-color:var(--cyan); }
.edge-preview-left nav a[aria-current="location"] > span { color:var(--cyan); }
.edge-rail-signature { display:flex; align-items:center; gap:9px; margin-top:28px; font:8px var(--font-mono); letter-spacing:.12em; color:color-mix(in srgb,var(--muted) 65%,var(--bg)); }
.edge-rail-signature i { width:22px; height:1px; background:var(--spectrum); opacity:.65; }
.edge-event-type { display:inline-block; padding:3px 6px; margin:0 0 15px; border:1px solid var(--border); border-radius:3px; font-size:9px; color:var(--text); }
.edge-event-type[data-kind="championship_sprint"] { color:var(--event-championship-sprint); border-color:rgba(var(--event-championship-sprint-rgb),.36); background:rgba(var(--event-championship-sprint-rgb),.1); }
.edge-event-type[data-kind="championship"] { color:var(--event-championship); border-color:rgba(var(--event-championship-rgb),.65); background:rgba(var(--event-championship-rgb),.24); }
.edge-event-type[data-kind="public"] { color:var(--cyan); border-color:color-mix(in srgb,var(--cyan) 35%,var(--border)); }
.edge-event-flag { display:block; margin:0 0 8px; }
.edge-event-flag .flag-icon { width:25px; height:auto; }
.edge-preview-right h2 { font-size:19px; line-height:1.25; margin-bottom:10px; }
.edge-event-series { margin:0 0 17px; color:var(--muted); font:11px/1.7 var(--font-body); }
.edge-event-date { display:flex; flex-direction:column; gap:6px; padding:13px 0; border-top:1px solid var(--border); }
.edge-event-date strong { color:var(--text); font:500 14px var(--font-mono); }
.edge-event-date > span { font-size:10px; }
.edge-event-countdown { border-top:1px solid var(--border); padding:13px 0 17px; }
.edge-event-countdown > span { display:block; margin-bottom:8px; font-size:9px; }
.edge-event-countdown strong { color:var(--cyan); font:500 11px/1.6 var(--font-mono); font-variant-numeric:tabular-nums; white-space:nowrap; }
.edge-event-link { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:10px 0; border-top:1px solid var(--border); color:var(--text); font-size:11px; text-decoration:none; }
.edge-event-link:hover { color:var(--cyan); }
.edge-calendar-link { display:block; margin-top:10px; color:var(--muted); font-size:10px; text-decoration:none; }
.edge-calendar-link:hover { color:var(--text); }
.edge-preview-right.is-championship,
.next-start.is-championship { border-inline-start:3px solid var(--event-championship); }
.is-championship .edge-event-type,
.next-start.is-championship .next-start-season { color:var(--event-championship); }
.next-championship { display:grid;gap:4px;min-width:0;padding:10px 12px;margin-top:10px;
  border:1px solid color-mix(in srgb,var(--event-championship) 45%,var(--border));border-radius:6px;
  background:color-mix(in srgb,var(--event-championship) 10%,var(--surface));
  color:var(--text);font-size:12px;text-decoration:none;overflow-wrap:anywhere; }
.next-championship span { color:var(--event-championship);font-weight:600; }
.next-championship small { color:var(--muted); }
.next-championship:hover strong { text-decoration:underline; }
.next-start > .next-championship { flex:1 0 100%;grid-column:1/-1;margin-top:0; }
.next-start-season { overflow-wrap:anywhere;font-size:12px; }
.next-start-countdown { margin:0;font-size:12px; }
@media(max-width:700px) { .next-start-season,.next-start-countdown { grid-column:1; } }
.edge-preview-rail[hidden] { display:none; }

/* Обратная связь при обычной навигации: без изменения размеров и блокировки ссылки. */
.is-navigation-pending { position:relative !important; cursor:progress; }
.navigation-spinner { position:absolute; inset:0; z-index:3; display:grid; place-items:center; border-radius:inherit; background:color-mix(in srgb,var(--surface) 94%,transparent); pointer-events:none; }
.navigation-spinner::before { content:''; width:14px; height:14px; border:2px solid color-mix(in srgb,var(--cyan) 24%,transparent); border-top-color:var(--cyan); border-radius:50%; animation:control-spin .7s linear infinite; }
.btn-primary .navigation-spinner { background:var(--action); }
.btn-primary .navigation-spinner::before { border-color:color-mix(in srgb,var(--bg) 25%,transparent); border-top-color:var(--bg); }
@media(prefers-reduced-motion:reduce) { .navigation-spinner::before { animation:none; } }

/* Прежний характер типографики, компактные одинаковые строки зачёта. */
.btn { font-family:var(--font-display); font-weight:600; font-size:14px; }
.pilot-directory .pilot-card-name, .pilot-directory[data-view="list"] .pilot-card-name { font-family:var(--font-display); font-weight:700; font-style:normal; }
.directory-view-switch button { font-family:var(--font-display); font-weight:600; font-size:14px; }
.standings-competition-select, .standings-competition-select optgroup, .standings-competition-select option { font-family:var(--font-body); font-style:normal; font-weight:600; color:var(--text); }
.standings-competition-select optgroup[label] { color:var(--muted); font-style:normal; }
.standings-mini-table .pos-badge, .season-matrix-table .pos-badge { width:24px; height:24px; min-width:24px; border-radius:4px; font-size:12px; padding:0; display:inline-flex; align-items:center; justify-content:center; }
.standings-dual .standings-mini-table tbody tr { height:55px; }
.standings-dual .standings-mini-table td { padding-block:7px; }
.standings-dual .standings-card-head { min-height:80px; }
.standings-pilot-name .reputation-squares { display:inline-flex; margin:0; gap:3px; }
.teams-toolbar { display:grid; grid-template-columns:minmax(200px,1.7fr) repeat(3,minmax(160px,1fr)); gap:10px; }
.teams-toolbar .search-input, .teams-toolbar .pilot-filter { width:100%; min-width:0; }
.teams-toolbar .pilot-count { grid-column:1/-1; }
.team-directory .team-card[hidden], #teams-empty[hidden] { display:none !important; }

/* Кабинет: единая сетка, явный допуск и связанные поля рядом. */
.cabinet-update-badge { display:inline-flex; position:static; align-items:center; justify-content:center; flex:none; min-width:20px; height:20px; padding:0 5px; margin-left:6px; box-sizing:border-box; border-radius:10px; background:var(--action); color:#0b0e11; font:700 10px/20px var(--font-body); letter-spacing:0; text-align:center; font-variant-numeric:tabular-nums; vertical-align:middle; }
.cabinet { display:grid; min-width:0; gap:20px; scroll-margin-top:20px; }
.cabinet > .pilot-hero { margin:0; }
.cabinet-actions, .cabinet-history-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.cabinet-actions .btn { min-height:40px; }
.cabinet-history-actions { margin-inline-start:auto; }
.cabinet-my-races { display:inline-flex; align-items:center; flex-wrap:wrap; gap:8px; color:var(--cyan); border-color:color-mix(in srgb,var(--cyan) 65%,var(--border)); background:color-mix(in srgb,var(--cyan) 10%,var(--surface)); }
.cabinet-my-races:hover { background:color-mix(in srgb,var(--cyan) 18%,var(--surface)); }
.cabinet-race-count, .cabinet-race-new { display:inline-block; padding:2px 7px; border-radius:5px; font-size:12px; font-weight:700; font-variant-numeric:tabular-nums; }
.cabinet-race-count { color:var(--cyan); background:color-mix(in srgb,var(--cyan) 15%,var(--surface)); }
.cabinet-race-new { color:var(--action-ink); background:var(--action); }
.cabinet-race-list { display:grid; gap:8px; list-style:none; padding:0; margin:16px 0; }
.cabinet-race-list > li { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:10px 16px; padding:14px 16px; margin:0; }
.cabinet-race-label { display:grid; gap:4px; min-width:0; overflow-wrap:anywhere; }
.cabinet-race-label small, .cabinet-race-pagination { color:var(--muted); font-size:13px; }
.cabinet-race-pagination { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:10px; }
.cabinet-protests {
  --protest-accent:#ff9aa5; display:inline-flex; align-items:center; gap:8px;
  color:var(--protest-accent); border:1px solid var(--protest-accent);
  background:color-mix(in srgb,var(--protest-accent) 12%,var(--surface));
}
html[data-theme="light"] .cabinet-protests { --protest-accent:#a02238; }
.cabinet-protests:hover { color:var(--protest-accent); background:color-mix(in srgb,var(--protest-accent) 20%,var(--surface)); }
.cabinet-protest-count {
  min-width:22px; padding:2px 6px; text-align:center; border-radius:5px; color:var(--surface);
  background:var(--protest-accent); font-weight:800; font-variant-numeric:tabular-nums;
}
#cabinet-connections, #cabinet-sanctions { scroll-margin-top:20px; }
#cabinet-sanctions:empty { display:none; }
#cabinet-sanctions .sanction-notice { margin:0 0 6px; padding:10px 14px; }
#cabinet-sanctions .sanction-notice:last-child { margin-bottom:0; }
#cabinet-sanctions .sanction-notice p { margin:4px 0; }
.cabinet-races { display:grid; grid-template-columns:minmax(0,1fr); gap:16px; }
.cabinet-races .latest-race { min-width:0; margin:0; padding:18px; }
@media(min-width:1720px) {
  .cabinet-races:not(:has(.latest-race)) { display:contents; }
}
@media(max-width:1719px) {
  .cabinet-shell :is(.edge-preview-track,.edge-preview-rail) { display:block; }
  .cabinet-shell .edge-preview-track-left { margin-bottom:20px; }
  .cabinet-shell .edge-preview-left nav { flex-flow:row wrap; border-left:0; border-top:1px solid var(--border); }
  .cabinet-shell .edge-preview-left nav a { margin:-1px 0 0; padding:9px 12px; border-left:0; border-top:2px solid transparent; }
  .cabinet-shell .edge-preview-left nav a:is(:hover,[aria-current="location"]) { border-top-color:var(--cyan); }
  .cabinet-shell .edge-rail-signature { display:none; }
  .cabinet-races .edge-preview-track-right { grid-column:2; }
  .cabinet-races { grid-template-columns:minmax(0,1fr) minmax(200px,.42fr); align-items:start; }
}
.latest-race h3 { margin:6px 0 0; font-size:23px; overflow-wrap:anywhere; }
.latest-race-facts { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(96px,100%),1fr)); gap:10px 16px; margin:16px 0; }
.latest-race-facts div { display:grid; gap:4px; overflow-wrap:anywhere; }
.latest-race-facts dt { color:var(--muted); font-size:12px; }
.latest-race-facts dd { margin:0; font-size:14px; font-weight:600; }
.cabinet-card-actions { display:flex; flex-wrap:wrap; gap:6px 16px; font-size:13px; }
.profile-unsaved-note { padding:11px 13px; border-left:3px solid var(--action); background:color-mix(in srgb,var(--action) 7%,var(--surface)); font-size:12px; line-height:1.6; }
.profile-leave-dialog { width:min(460px,calc(100% - 32px)); padding:24px; color:var(--text); background:var(--surface); border:1px solid var(--border); border-top:3px solid var(--action); border-radius:8px; }
.profile-leave-dialog::backdrop { background:rgba(4,7,10,.78); backdrop-filter:blur(4px); }
.profile-leave-dialog h3 { margin:0 0 12px; font:700 22px/1.3 var(--font-display); }.profile-leave-dialog p { color:var(--muted); font-size:13px; line-height:1.65; }.profile-leave-dialog > div { display:flex; gap:10px; flex-wrap:wrap; margin-top:20px; }.profile-leave-dialog .btn { white-space:normal; text-align:center; }
.cabinet-layout { grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); align-items:start; gap:18px; margin:0; }
.cabinet-layout > .pilot-main-col, .cabinet-layout > .pilot-side-col { min-width:0; display:grid; gap:14px; }
.cabinet-panel { padding:20px; margin:0; border:1px solid var(--border); border-radius:7px; background:var(--surface); min-width:0; scroll-margin-top:20px; }
.cabinet-panel .news-form { max-width:none; padding:0; border:0; background:none; }
.cabinet-panel .section-title { margin-top:0; }
.cabinet-panel .device-model-field { margin:10px 0 0; }
.cabinet-panel .checkbox-label { font-size:12px; line-height:1.5; }
.cabinet-logout-dialog { border-top-color:var(--red); }
.cabinet-card-request { margin-top:22px; padding:16px; border:1px solid var(--border); border-radius:6px; background:var(--surface-alt); }
.cabinet-card-request h3 { margin:0 0 10px; font-size:15px; }
.cabinet-card-request-row { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px 16px; }
.cabinet-card-request-row p { margin:4px 0 0; font-size:12px; }
.cabinet-card-request .flash { margin:12px 0 0; }
.me-acc-profile-form .field input { width:8ch; text-transform:uppercase; }
.profile-color-example { display:flex; align-items:center; justify-content:space-between; gap:16px; width:fit-content; margin-top:6px; padding:7px 10px; border:1px solid var(--border); border-left:3px solid var(--card-color); border-radius:5px; background:var(--surface-alt); }
.profile-color-number { color:var(--card-color); font-size:13px; font-weight:700; }
.country-picker { border:1px solid var(--border); border-radius:5px; background:var(--surface-alt); }
.country-picker summary { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:40px; padding:8px 10px; color:var(--text); cursor:pointer; list-style:none; }
.country-picker summary::-webkit-details-marker { display:none; }
.country-picker summary::after { content:'⌄'; color:var(--muted); }
.country-picker[open] summary::after { transform:rotate(180deg); }
.country-picker-menu { padding:8px; border-top:1px solid var(--border); }
.country-picker-options { display:grid; align-content:start; max-height:180px; margin-top:6px; overflow:auto; overscroll-behavior:contain; }
.country-picker-options button { padding:8px; background:none; border:0; border-radius:4px; color:var(--text); text-align:start; font:inherit; cursor:pointer; }
.country-picker-options button:is(:hover,:focus-visible,.is-selected) { background:color-mix(in srgb,var(--cyan) 13%,var(--surface)); color:var(--cyan); }
.country-picker-menu p { margin:10px 4px 4px; font-size:12px; }
.cabinet-admission { margin:8px 0 14px; color:var(--muted); font-size:13px; }
.cabinet-admission strong { color:var(--text); }
.device-model-field .checkbox-label { display:flex; align-items:center; gap:8px; white-space:normal; }
.device-model-field .checkbox-label input[type="checkbox"] { width:16px; height:16px; min-width:16px; flex:0 0 16px; margin:0; }
.status-positive { color:var(--green); }.status-restricted { color:var(--red); }
.cabinet-competitions .me-applications { gap:6px; margin:10px 0; }
.cabinet-competitions .cabinet-entry {
  display:flex; flex-wrap:wrap; align-items:flex-start; gap:6px 12px;
  padding:10px; border:1px solid var(--border); border-radius:5px;
}
.cabinet-competitions .cabinet-entry > div { flex:1 1 220px; }
.cabinet-entry p { font-size:12px; line-height:1.55; }
.cabinet-entry-status { font-size:12px; font-weight:700; }
.cabinet-crew-reminder, .cabinet-transfer, .cabinet-season-classes {
  margin:10px 0; padding:9px 11px; border-left:2px solid var(--border); font-size:13px; overflow-wrap:anywhere;
}
.cabinet-crew-reminder { border-left-color:var(--action); }
.cabinet-team-link {
  display:flex; flex-wrap:wrap; justify-content:space-between; gap:4px 12px;
  padding:8px 0; text-decoration:none; overflow-wrap:anywhere;
}
.cabinet-team-link > span { font-size:12px; color:var(--muted); }
.cabinet .team-owned-list { margin:6px 0; }
.cabinet .team-owned-list p { margin:0; }
.cabinet .card-cta { margin:0 0 10px; padding:0; }
.cabinet .card-cta p { margin:0; font-size:13px; }
.cabinet .me-profile-form .form-row { gap:10px; }
.cabinet .me-profile-form .form-row .field { min-width:min(170px,100%); }
@media (max-width:680px) {
  .cabinet-races { grid-template-columns:minmax(0,1fr); }
  .cabinet-races .edge-preview-track-right { grid-column:1; }
  .cabinet-history-actions { margin-inline-start:0; }
  .latest-race-facts { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
.cabinet-open-seasons { grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr)); }
.crew-name-form { max-width:620px; margin:20px 0; }
.crew-name-controls { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-top:8px; }.crew-name-controls input { flex:1; min-width:180px; }

/* Итоги сезона: подиум и факты из сохранённого зачёта. */
.season-finale { margin:24px 0; padding:26px; border:1px solid color-mix(in srgb,var(--gold) 45%,var(--border)); border-radius:8px; background:radial-gradient(ellipse at 100% 0%,color-mix(in srgb,var(--gold) 9%,transparent),transparent 65%),var(--surface); scroll-margin-top:20px; }
.season-finale > .eyebrow { color:var(--gold); }
.season-finale > h2 { margin:12px 0 24px; font:600 clamp(24px,3vw,34px)/1.25 var(--font-display); }
.finale-podiums { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.finale-board h3 { margin:0 0 14px; color:var(--muted); font:600 13px var(--font-body); }
.finale-podium { list-style:none; padding:0; margin:0; display:grid; gap:8px; }
.finale-place { display:flex; align-items:center; gap:14px; padding:14px; border:1px solid var(--border); border-radius:5px; background:var(--surface-2); --medal:var(--gold); }
.finale-place.is-p2 { --medal:var(--silver); }.finale-place.is-p3 { --medal:var(--bronze); }
.finale-place.is-p1 { padding-block:22px; border-color:color-mix(in srgb,var(--gold) 45%,var(--border)); background:color-mix(in srgb,var(--gold) 10%,var(--surface)); }
.finale-place.is-p2, .finale-place.is-p3 { background:color-mix(in srgb,var(--medal) 6%,var(--surface)); }
.finale-medal { font:600 25px var(--font-display); color:var(--medal); }.finale-place > div { flex:1; min-width:0; }
.finale-place-title { display:block; margin-bottom:5px; color:var(--medal); font-size:10px; }
.finale-place a:not(.team-tag) { color:var(--text); font:600 19px/1.25 var(--font-display); text-decoration:none; overflow-wrap:anywhere; }
.finale-place > strong { font-size:16px; color:var(--medal); text-align:right; }.finale-place small { display:block; margin-top:4px; font:10px var(--font-body); color:var(--muted); }
.finale-facts { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin:24px 0 0; padding-top:20px; border-top:1px solid var(--border); }
.finale-facts strong { display:block; font:600 26px var(--font-display); }.finale-facts span { color:var(--muted); font-size:11px; }
.finale-records { margin-top:24px; }
.finale-records > h3 { margin:0 0 12px; font:600 19px/1.3 var(--font-display); }
.finale-highlights { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr)); gap:12px; }
.finale-highlight { display:flex; flex-direction:column; gap:9px; min-width:0; padding:14px; border:1px solid var(--border); border-radius:5px; background:var(--surface-2); }
.finale-highlight h4 { margin:0; font:600 13px/1.4 var(--font-body); }
.finale-highlight-value { display:flex; align-items:baseline; gap:6px; }
.finale-highlight-value strong { color:var(--gold); font:600 clamp(28px,3vw,38px)/1 var(--font-display); }
.finale-highlight.is-gain .finale-highlight-value strong { color:var(--green); }
.finale-highlight-value span, .finale-highlight p { color:var(--muted); font-size:12px; }
.finale-highlight p { margin:auto 0 0; padding-top:4px; line-height:1.5; }
.finale-highlight-holders { display:grid; gap:5px; list-style:none; padding:0; margin:0; }
.finale-highlight-holders > li { min-width:0; overflow-wrap:anywhere; }
.finale-highlight-holders .entity-identity { flex-wrap:wrap; }
.finale-highlight-run { display:block; width:fit-content; max-width:100%; margin-top:2px; color:var(--muted); font-size:12px; }
.finale-highlight-run span { color:var(--text); white-space:nowrap; }
.finale-highlight-ties { font-size:12px; }
.finale-highlight-ties summary { cursor:pointer; color:var(--muted); }
.finale-highlight-ties ul { margin-top:5px; }
.finale-thanks { font-size:12px; color:var(--muted); margin:20px 0 0; }
.digest-champions { display:grid; gap:12px; margin:16px 0; }.digest-champions > div > span { display:block; color:var(--gold); font-size:10px; margin-bottom:5px; }.digest-champions strong { font:600 19px/1.3 var(--font-display); }
.season-matrix { margin:18px 0; }.season-matrix-scroll { overflow:auto; max-height:540px; scrollbar-gutter:stable; }
.season-matrix-table { width:100%; border-collapse:collapse; font-size:12px; }.season-matrix-table th { position:sticky; top:0; z-index:1; background:var(--surface-2); white-space:nowrap; }
.season-matrix-table th, .season-matrix-table td { padding:8px 10px; height:42px; }.season-matrix-table td:not(.al), .season-matrix-table th:not(.al) { text-align:center; }
.season-matrix-table .al { min-width:170px; }.season-matrix-table small { display:block; color:var(--muted); font:8px var(--font-body); }
.crew-standing-identity { display:flex; align-items:center; gap:8px; white-space:nowrap; }
.crew-info-trigger { border:0; padding:3px; font:15px var(--font-body); color:var(--muted); background:none; cursor:pointer; }.crew-info-trigger:hover, .crew-info-trigger:focus-visible { color:var(--cyan); }
.crew-info-popover { position:fixed; inset:auto; margin:0; width:min(330px,calc(100vw - 24px)); max-height:min(480px,calc(100dvh - 24px)); overflow:auto; padding:18px; color:var(--text); background:var(--surface); border:1px solid var(--border); border-radius:7px; box-shadow:0 12px 40px #0006; }
.crew-info-popover h4 { margin:0 0 5px; font:600 18px var(--font-display); }.crew-info-popover > p { margin:0 0 12px; font-size:11px; }.crew-info-popover section { padding:10px 0; border-top:1px solid var(--border); }
.crew-info-popover section strong, .crew-info-popover small { display:block; font-size:11px; }.crew-info-popover small { color:var(--muted); margin-top:4px; }.crew-info-popover section p { font-size:12px; line-height:1.6; margin:8px 0 0; }.crew-board-hint { margin:12px 16px; }
/* Лига и участники: полные названия, командные цвета и явная идентичность. */
.site-header .tab { font-family:var(--font-display); font-size:15px; font-weight:700; letter-spacing:.02em; }
.entity-name, :where(.stats-table,.standings-mini-table,.results-board,.digest,.finale-podium,.crew-visible-roster) a[href*="/stats/"], :where(.stats-table,.standings-mini-table,.results-board,.digest,.finale-podium) a[href*="/teams/"]:not(.team-tag), .standings-team-name > span { font-family:var(--font-display); font-weight:600; font-style:normal; }
.stats-table td.al a[href*="/teams/"]:not(.team-tag), .stats-table td.al a[href*="/stats/"] { font-size:15px; }
#team-standings-details td.al { font-family:var(--font-display); font-size:15px; font-weight:600; }
.pilot-inline-number { color:var(--text); font:600 1em/1.3 var(--font-display); white-space:nowrap; }
.crew-identity-cell { min-width:330px !important; width:38%; }
.season-matrix-table .crew-standing-identity .crew-team-fullname { --entity-color:color-mix(in srgb,var(--team-primary) 72%,var(--text)); color:var(--entity-color); font:600 18px var(--font-display); white-space:normal; }
.crew-entry-name { display:block; margin:5px 0 7px; color:color-mix(in srgb,var(--team-primary) 60%,var(--text)); font-size:11px; }
.crew-visible-roster { display:flex; flex-wrap:wrap; gap:4px 12px; list-style:none; padding:0; margin:0; }
.crew-visible-roster li { display:inline-flex; align-items:baseline; gap:5px; }
.crew-visible-roster a { font-size:13px !important; text-decoration:none; }
.crew-visible-roster .pilot-inline-number { font-size:13px; }
.season-matrix-table td.crew-identity-cell { padding-block:12px; }
.crew-standing-identity { white-space:normal; }
.crew-standing-identity > .team-tag { flex:none; }
.navigation-spinner.navigation-spinner-inline { position:static; display:inline-flex; vertical-align:middle; width:14px; height:14px; margin-left:7px; background:none; }
.navigation-spinner-inline::before { width:11px; height:11px; border-width:1.5px; }
.cal-event .cal-event-line { padding-right:18px; }
.cal-event .navigation-spinner.navigation-spinner-inline { position:absolute; inset:5px 5px auto auto; width:14px; height:14px; margin:0; background:none; }
.standings-competition-select { border-left:3px solid var(--cyan); border-color:color-mix(in srgb,var(--cyan) 40%,var(--border)); border-left-color:var(--cyan); background:linear-gradient(100deg,color-mix(in srgb,var(--cyan) 7%,transparent),transparent 85%),var(--surface); font-weight:700; }
.standings-competition-select optgroup[label="Завершённые сезоны"] { color:var(--gold); font-weight:700; }
.standings-competition-select optgroup[label="Другие гонки"] { color:var(--cyan); font-weight:700; }
.standings-competition-bar label { color:var(--text); font-weight:700; }
.pilot-champion-badge { display:inline-flex; gap:5px; padding:3px 7px; border:1px solid color-mix(in srgb,var(--gold) 40%,var(--border)); border-radius:4px; color:var(--gold); font:600 11px var(--font-body); text-decoration:none; }
.pilot-championship-titles { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; margin:14px 0 20px; }
.pilot-championship-titles a { display:inline-flex; align-items:center; gap:8px; padding:10px 13px; color:var(--gold); background:color-mix(in srgb,var(--gold) 6%,var(--surface)); border:1px solid color-mix(in srgb,var(--gold) 30%,var(--border)); border-radius:5px; font:600 15px var(--font-display); text-decoration:none; }
.pilot-championship-titles small { color:var(--muted); font:10px var(--font-body); }
.champion-ribbon { display:flex; align-items:center; flex-wrap:wrap; gap:15px 24px; margin:22px 0; padding:15px 20px; background:color-mix(in srgb,var(--gold) 5%,var(--surface)); border:1px solid color-mix(in srgb,var(--gold) 30%,var(--border)); border-radius:6px; }
.champion-ribbon .eyebrow { color:var(--gold); }.champion-season { display:block; margin-top:4px; color:var(--muted); font-size:11px; text-decoration:none; }
.champion-identity, .digest-winner-identity { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.champion-identity .entity-name { font-size:20px; color:var(--text); text-decoration:none; }
.champion-results { margin-left:auto; color:var(--muted); font-size:11px; text-decoration:none; }
.digest-winner-identity .entity-name { font-size:21px; color:var(--text); text-decoration:none; line-height:1.3; }
.entity-identity { display:inline-flex; flex-wrap:wrap; align-items:center; gap:7px; min-width:0; max-width:100%; vertical-align:middle; }
.digest-podium-row > .entity-identity { flex:1; }
.digest-winner-identity .pilot-inline-number, .champion-identity .pilot-inline-number { font-size:20px; }
:is(.entity-name, a.pilot-link), :where(.stats-table,.standings-mini-table,.results-board,.digest,.finale-podium,.crew-visible-roster,.team-roster-group,.team-member-identity,.team-card-owner,.story-event-pilot) a:is([href^="/stats/"],[href^="/teams/"]):not(.team-tag,.btn) {
  font-family:var(--font-display); font-weight:700; font-style:normal;
  text-decoration:none; border-bottom:0; border-radius:3px;
}
:is(.entity-name, a.pilot-link):is(:hover,:focus-visible), :where(.stats-table,.standings-mini-table,.results-board,.digest,.finale-podium,.crew-visible-roster,.team-roster-group,.team-member-identity,.team-card-owner,.story-event-pilot) a:is([href^="/stats/"],[href^="/teams/"]):not(.team-tag,.btn):is(:hover,:focus-visible) {
  color:var(--entity-color,inherit);
  text-decoration:none; border-bottom:0;
  text-shadow:none;
  background-color:transparent;
}
.digest .pilot-link { font-family:var(--font-display); font-weight:700; font-size:16px; }
.digest-winner-identity .pilot-link { font-size:21px; }
.team-profile-banner h2 a { font:inherit; }
.team-card-head { border-radius:6px; }
.digest .digest-number { color:var(--text); }
.home-panels { grid-template-columns:minmax(0,11fr) minmax(0,9fr); }
.home-panel-seasons .panel-viewport { overflow:hidden; }
.home-panel-seasons .panel-slide.is-active { overflow-y:auto; scrollbar-gutter:stable; max-height:100%; padding-right:10px; }
.home-panel-seasons .round-mini { gap:7px; }
.cabinet-entry-extra { margin-top:12px; padding-top:10px; border-top:1px solid var(--border); font-size:11px; }
.cabinet-entry-extra > summary { color:var(--muted); cursor:pointer; line-height:1.6; }
.cabinet-entry-extra[open] > summary { color:var(--cyan); }
.cabinet-entry-extra .me-application-crews { max-height:200px; overflow:auto; }

/* Размеры подписей участников; прямоугольный тег остаётся самостоятельным элементом. */
.entity-identity { --identity-font-size:16px; font-size:var(--identity-font-size); }
.champion-identity .entity-identity, .digest-winner-identity .entity-identity { --identity-font-size:20px; }
.finale-place .entity-identity { --identity-font-size:19px; }
.finale-highlights .entity-identity { --identity-font-size:13px; }
.crew-standing-identity { align-items:center; }
.standings-pilot-team { vertical-align:middle; }
.standings-dual .standings-pilot-name a, .standings-dual .standings-team-name a:not(.team-tag) { font:700 16px/1.35 var(--font-display); }
.standings-dual .team-tag { min-height:22px; padding:1px 6px; border-radius:5px; font-size:10px; }
.standings-dual .standings-pilot-table th:nth-child(3), .standings-dual .standings-pilot-table td:nth-child(3) { width:64px; }
.standings-pilot-identity { display:flex; flex-wrap:wrap; align-items:center; gap:5px 8px; min-width:0; }
.standings-pilot-identity > a { max-width:100%; }
.standings-pilot-identity .reputation-squares { flex:none; }
.standings-pilot-identity .reputation-square { width:14px; height:14px; flex:0 0 14px; }
.pos-badge { box-sizing:border-box; flex:none; aspect-ratio:1; line-height:1; }
.standings-mini-table .pos-badge, .season-matrix-table .pos-badge { min-height:24px; max-height:24px; max-width:24px; }
.team-directory .team-roster-group li { grid-template-rows:auto 12px; align-items:baseline; }
.team-directory .team-roster-group li > a, .team-directory .team-roster-group li > span:not(.team-roster-number,.team-roster-role) { grid-row:1; grid-column:2; }
.team-directory .team-roster-group li > .team-roster-role { grid-column:2; grid-row:2; }
.team-directory .team-roster-number { font:600 16px/1.3 var(--font-display); }

/* Цвет команды у номеров сохраняется; только дайджест использует акцент сайта. */
:is(.pilot-number-value,.pilot-inline-number,.team-roster-number,.team-member-number) { color:var(--number-team-color,var(--team-primary,var(--text))); }
.digest :is(.pilot-number-value,.pilot-inline-number,.digest-number) { color:var(--accent); }
.pilot-number-value { opacity:1; font-variant-numeric:tabular-nums; }

/* Шапка без текста — неподвижный мягкий акцент под содержимым. */
body { isolation:isolate; }
body::before { content:''; position:fixed; inset:0; z-index:-1; pointer-events:none; background:url('../brand/aspire-ambient.png') center/cover no-repeat; opacity:.15; }
html[data-theme="light"] body::before { filter:invert(1) hue-rotate(180deg) saturate(.6); opacity:.38; }
@media(max-width:700px) { body::before { opacity:.08; }html[data-theme="light"] body::before { opacity:.24; }.champion-identity .entity-identity { --identity-font-size:18px; } }
@media(max-width:900px) { .home-panels { grid-template-columns:minmax(0,1fr); }.home-panel-seasons .panel-slide.is-active { max-height:none; overflow:visible; padding-right:0; } }
@media(max-width:700px) { .champion-results { margin-left:0; } }
@media(max-width:1000px) { .teams-toolbar { grid-template-columns:repeat(2,minmax(0,1fr)); }.finale-podiums { grid-template-columns:1fr; } }
@media(max-width:700px) { .cabinet-layout { grid-template-columns:minmax(0,1fr); }.season-finale { padding:16px; }.finale-facts { grid-template-columns:repeat(2,minmax(0,1fr)); }.finale-highlights { grid-template-columns:1fr; }.teams-toolbar { grid-template-columns:1fr; } }
@media(max-width:1000px) { .team-roster-columns { grid-template-columns:1fr; } }
@media(max-width:600px) {
  .team-directory[data-view="large"] .team-card-cover { margin:-16px -16px 0; width:calc(100% + 32px); }
  .team-directory[data-view="large"] .team-card { grid-template-rows:auto 100px 20px 76px 1fr; }
  .team-media-grid { grid-template-columns:1fr; }
  .team-swap-option,.team-move-button { min-height:44px; }
}

/* Ближайший старт, действия пилота и компактное знакомство. */
.next-start { display:flex; align-items:center; gap:18px; flex-wrap:wrap; padding:15px 18px; margin:0 0 20px; border:1px solid var(--border); border-left:3px solid var(--action); border-radius:6px; background:var(--surface); }
.next-start-heading { display:grid; gap:4px; flex:1; min-width:140px; }.next-start-heading strong { font:600 20px/1.2 var(--font-display); }.next-start-when { display:grid; gap:3px; font-size:13px; }.next-start-when small { color:var(--muted); font-size:11px; }.next-start .btn { flex-shrink:0; }
.server-copy-row { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin:10px 0 0; overflow-wrap:anywhere; }.server-copy-row .mono { min-width:0; overflow-wrap:anywhere; }.event-calendar-action { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin:22px 0 0; }.event-calendar-action small { font-size:11px; }
.find-me-actions { display:flex; justify-content:flex-end; gap:8px; margin-bottom:12px; }.my-result-highlight { scroll-margin:24px; }.action-feedback { position:fixed; z-index:1200; bottom:18px; left:50%; transform:translateX(-50%); max-width:calc(100vw - 32px); padding:11px 16px; border:1px solid var(--cyan); border-radius:6px; background:var(--surface); color:var(--text); font-size:13px; box-shadow:0 4px 20px #0003; }.action-feedback[hidden] { display:none; }
.site-tour-welcome.site-tour-welcome { display:flex; align-items:center; gap:8px; width:auto; max-width:calc(100vw - 32px); padding:10px 12px; border-radius:8px; }.site-tour-welcome strong { font-size:12px; white-space:nowrap; }.site-tour-welcome.site-tour-welcome .btn { min-height:32px; padding:6px 9px; font-size:11px; }.site-tour-welcome.site-tour-welcome .site-tour-close { float:none; flex:none; width:28px; height:32px; padding:0; margin:0; }
.digest-dots { flex-wrap:wrap; min-width:0; gap:2px; }.digest-dot, .digest-dot.is-active { width:24px; height:24px; background:transparent; display:grid; place-items:center; flex-shrink:0; }.digest-dot::before { content:''; width:8px; height:8px; border-radius:50%; background:var(--muted); }.digest-dot.is-active::before { background:var(--accent); }
.directory-reset[hidden] { display:none; }.analysis-comparison-controls { display:flex; flex-wrap:wrap; align-items:end; gap:12px; }
.week-session-list { display:grid; gap:6px; margin-top:10px; }.week-session { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:10px; padding:7px 9px; border:1px solid color-mix(in srgb,var(--border) 70%,transparent); border-radius:5px; background:var(--surface); }.week-session > span:first-child { display:grid; gap:2px; }.week-session strong { font-size:11px; font-weight:600; }.week-session small { color:var(--muted); font-size:10px; }.week-session > .mono { text-align:right; font-size:10px; }
@media(max-width:600px) {
  .next-start { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px 12px; padding:12px 14px; margin-bottom:16px; }.next-start-heading { min-width:0; }.next-start-heading strong { font-size:19px; }.next-start-when { grid-column:1; font-size:12px; }.next-start .btn { grid-column:2; grid-row:1/3; max-width:115px; padding:10px; white-space:normal; text-align:center; font-size:12px; }
  .week-nav { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:8px; }.week-nav .week-label { min-width:0; text-align:center; font-size:12px; }.week-nav .btn { padding:9px 10px; font-size:11px; white-space:normal; }
  .week-list { display:grid; gap:10px; }.week-list-card { border-radius:8px; padding:14px 12px; align-items:start; gap:12px; }.week-list-day { min-width:42px; padding-right:10px; border-right:1px solid var(--border); }.week-list-body { min-width:0; }.week-list-title { font-size:16px; }.week-list-card .muted { line-height:1.6; }
  .schedule-section .public-filters .form-row { display:grid; grid-template-columns:1fr 1fr; gap:10px; }.schedule-section .public-filters .field:first-child { grid-column:1/-1; }.schedule-section .public-filters .field { min-width:0 !important; }.schedule-section .public-filters select, .schedule-section .public-filters input { width:100%; min-width:0; }.schedule-section .public-filters .btn { min-height:36px; }
  .site-tour-welcome.site-tour-welcome { left:12px; right:12px; bottom:12px; justify-content:space-between; max-width:none; padding:8px; gap:5px; }.site-tour-welcome strong { font-size:11px; }.site-tour-welcome.site-tour-welcome .btn { padding:6px; font-size:10px; }
  .server-copy-row .btn { min-height:36px; }
}

/* Действия рядом с результатом и адаптивные фильтры. */
.icon-button { display:inline-flex; align-items:center; justify-content:center; width:40px; min-width:40px; height:40px; padding:0; flex-shrink:0; }
.icon-button svg { display:block; pointer-events:none; }
.server-copy-row { display:grid; grid-template-columns:minmax(0,1fr) 40px; gap:8px; }
.server-copy-row .mono { font-family:var(--font-mono); }
.server-copy-row:has(#server-password) { grid-template-columns:auto minmax(0,1fr) 40px; }
.find-me-button { border-color:color-mix(in srgb,var(--cyan) 55%,var(--border)); color:var(--text); background:color-mix(in srgb,var(--cyan) 8%,var(--surface)); min-height:40px; }
.find-me-actions { margin:0; }
.result-personal-actions,.analysis-heading-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.result-personal-actions [hidden] { display:none; }
:is(.stats-table tbody tr,.standings-mini-table tbody tr,.board-row).my-result-highlight { --podium-color:var(--cyan); --podium-fill:color-mix(in srgb,var(--cyan) 12%,transparent); }
:is(.stats-table tbody tr,.standings-mini-table tbody tr).my-result-highlight > td { background:var(--podium-fill); box-shadow:inset 0 1px color-mix(in srgb,var(--cyan) 28%,transparent),inset 0 -1px color-mix(in srgb,var(--cyan) 28%,transparent); }
:is(.stats-table tbody tr,.standings-mini-table tbody tr).my-result-highlight > td:first-child { box-shadow:inset 3px 0 var(--cyan),inset 0 1px color-mix(in srgb,var(--cyan) 28%,transparent),inset 0 -1px color-mix(in srgb,var(--cyan) 28%,transparent); }
.board-row.my-result-highlight { background:color-mix(in srgb,var(--cyan) 12%,var(--surface)); box-shadow:inset 3px 0 var(--cyan),inset 0 1px color-mix(in srgb,var(--cyan) 28%,transparent),inset 0 -1px color-mix(in srgb,var(--cyan) 28%,transparent); }
.my-result-highlight:focus { outline:none; }
.calendar-filter-fields { display:grid; grid-template-columns:minmax(160px,1.5fr) minmax(160px,1fr) minmax(110px,.7fr) auto; gap:12px; align-items:end; }
.calendar-filter-fields .field { min-width:0; margin:0; }
.calendar-filter-fields :is(input,select) { width:100%; min-width:0; max-width:100%; box-sizing:border-box; }
.calendar-filter-actions { display:flex; gap:8px; }
.calendar-filter-actions .btn { min-height:42px; }
.analysis-pilot-heading > div:first-child { min-width:0; overflow-wrap:anywhere; }
.analysis-heading-actions { flex-shrink:0; }
.analysis-chart svg { min-width:0; }
@media(min-width:1720px) { .home-with-rails:has(.edge-preview-right:not([hidden])) > .next-start { display:none; } }
@media(max-width:900px) {
  .calendar-filter-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .calendar-filter-search { grid-column:1/-1; }
  .calendar-filter-actions { grid-column:1/-1; }
  .calendar-filter-actions .btn { flex:1; }
}
@media(max-width:600px) {
  .calendar-filters { padding:12px; }
  .calendar-filter-fields { grid-template-columns:minmax(0,1fr); gap:12px; }
  .calendar-filter-fields :is(.field,.calendar-filter-actions) { grid-column:1; }
  .calendar-filter-fields :is(input,select) { font-size:16px; height:44px; }
  .calendar-filter-fields label { display:block; margin-bottom:5px; font-size:12px; }
  .schedule-view-switch { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); width:100%; }
  .schedule-view-switch a { text-align:center; min-width:0; padding:11px 6px; }
  .cal-legend-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .cal-legend-item { white-space:normal; font-size:10px; line-height:1.4; }
  .standings-competition-bar { width:100%; box-sizing:border-box; justify-items:stretch; }
  .standings-competition-picker { width:100%; min-width:0; }
  .standings-competition-select { min-width:0; width:100%; max-width:100%; font-size:16px; }
  .standings-competition-meta { align-items:stretch; width:100%; }
  .standings-competition-meta .find-me-button { width:100%; }
  .result-overview-heading { align-items:flex-start; flex-wrap:wrap; }
  .result-personal-actions { width:100%; }
  .result-personal-actions .btn { flex:1; min-height:44px; font-size:12px; padding:9px; }
  .analysis-pilot-heading { align-items:flex-start; gap:8px; }
  .analysis-heading-actions { gap:5px; }
  .analysis-heading-actions .pill { display:none; }
  .analysis-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; overflow:visible; }
  .analysis-tabs button { white-space:normal; min-height:40px; padding:8px 6px; }
  .analysis-comparison-controls { display:block; }
  .analysis-compare { display:grid; grid-template-columns:minmax(0,1fr); gap:6px; }
  .analysis-comparison-controls .analysis-compare select { min-width:0; max-width:100%; width:100%; font-size:16px; }
  .pilots-toolbar { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; gap:8px; }
  .pilots-toolbar > .search-input { grid-column:1/-1; min-width:0; width:100%; }
  .pilots-toolbar :is(select,input) { min-width:0; max-width:100%; width:100%; font-size:16px; box-sizing:border-box; }
  .pilots-toolbar .pilots-toolbar-actions { grid-column:1/-1; min-width:0; flex-wrap:wrap; }
}
/* Все декоративные полосы используют ту же фазу и паузу, что верхняя. */
.aspire-spectrum,.edge-rail-signature i { position:relative; overflow:hidden; background:none; }
.aspire-spectrum::before,.edge-rail-signature i::before { content:''; display:block; width:140%; height:100%; background:var(--spectrum); }
.donate-panel::before { width:140%; right:auto; }
.aspire-spectrum::before,.donate-panel::before,.edge-rail-signature i::before { animation:spectrum-drift 60s ease-in-out infinite alternate; animation-delay:var(--spectrum-delay,0ms); }
html:has(.flag-strip:is(.is-loading,.is-paused)) :is(.aspire-spectrum,.donate-panel,.edge-rail-signature i)::before { animation-play-state:paused; }
@media(prefers-reduced-motion:reduce) {
  .aspire-spectrum::before,.donate-panel::before,.edge-rail-signature i::before { width:100%; animation:none; }
}

/* Общий фон информационных блоков продолжает прозрачное оформление главной. */
.page:not(.page-admin) { --panel-fill:color-mix(in srgb,var(--surface) 28%,transparent); }
.page:not(.page-admin) :is(.card,.panel,.board,.standings-card,.standings-details,.class-standings,.record-track-card,.records-controls,.records-scroll,.result-overview,.session-analysis,.cabinet-panel,.cabinet-onboarding,.cabinet-entry,.season-summary-bar,.help-section,.help-search,.help-rules-banner,.faq-item,.rules-panel,.practice-panel,.team-roster-section,.team-roster-guide,.team-roster-status,.pilot-personal-panel,.pilot-stats-panel,.next-start) { background-color:var(--panel-fill); }
.page:not(.page-admin) .records-tabs { background-color:var(--panel-fill); }
/* Пилот и заезд слева, сектора и итоговый круг — в конце строки. */
.record-track-card .lap-records-table { width:100%; min-width:0; table-layout:fixed; margin:0; border-collapse:collapse; }
.lap-records-table .lap-position-col { width:54px; }
.lap-records-table .lap-sector-col { width:86px; }
.lap-records-table .lap-time-col { width:120px; }
.record-track-card .lap-records-table :is(th,td) { min-width:0; padding:13px 12px; text-align:right; vertical-align:middle; }
.record-track-card .lap-records-table .al { text-align:left; }
.record-track-card .lap-records-table :is(.lap-record-pilot,.lap-record-event) { white-space:normal; }
.record-track-card .lap-records-table :is(th,td):first-child { text-align:center; }
.lap-records-table th { color:var(--muted); font:600 10px var(--font-body); white-space:nowrap; }
.lap-records-table td { border-top:1px solid var(--border); font-size:12px; }
.lap-records-table .lap-record-pilot a { font-size:19px; overflow-wrap:anywhere; }
.lap-record-event { color:var(--muted); overflow-wrap:anywhere; line-height:1.5; }
.lap-record-event > span { display:block; color:var(--text); font-size:12px; }
.lap-record-event .records-subline { font-size:10px; }
.lap-records-table .rtc-sector { padding:3px 0; border:0; font-size:11px; }
.lap-records-table .rtc-sector.is-best { background:none; color:#c084fc; }
html[data-theme="light"] .lap-records-table .rtc-sector.is-best { color:#7333ad; }
.lap-records-table .lap-record-time { font-size:17px; color:var(--text); }
@media(max-width:900px) {
  .lap-records-table colgroup { display:none; }
  .lap-records-table thead { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  .record-track-card .lap-records-table,.lap-records-table tbody { display:block; width:100%; }
  .lap-records-table .lap-record-row { display:grid; grid-template-columns:30px repeat(3,minmax(0,1fr)); gap:0; padding:14px; border-top:1px solid var(--border); }
  .lap-records-table .lap-record-row:first-child { border-top:0; }
  .record-track-card .lap-records-table .lap-record-row > td { padding:4px 0; border:0; background:none !important; box-shadow:none; }
  .lap-records-table .lap-record-row:is(.is-p1,.is-p2,.is-p3) { background:var(--podium-fill); box-shadow:inset 3px 0 var(--podium-color); }
  .lap-records-table .lap-record-position { grid-column:1; grid-row:1/3; align-self:start; }
  .lap-records-table .lap-record-position .pos-badge { min-width:24px; width:24px; height:24px; font-size:12px; }
  .lap-records-table .lap-record-pilot { grid-column:2/4; grid-row:1; }
  .lap-records-table .lap-record-pilot a { font-size:18px; }
  .lap-records-table .lap-record-time { grid-column:4; grid-row:1/3; align-self:start; padding-top:4px; font-size:15px; }
  .lap-records-table .lap-record-time::before { content:attr(data-label); display:block; margin-bottom:3px; color:var(--muted); font:500 9px var(--font-body); }
  .lap-records-table .lap-record-event { grid-column:2/4; grid-row:2; padding-top:0; padding-right:8px; }
  .lap-records-table .lap-record-event > span { font-size:11px; }
  .lap-records-table .lap-record-sector { grid-row:3; text-align:left; margin-top:10px; padding-top:9px; border-top:1px solid color-mix(in srgb,var(--border) 70%,transparent); }
  .lap-records-table .lap-record-sector:nth-child(4) { grid-column:2; }
  .lap-records-table .lap-record-sector:nth-child(5) { grid-column:3; }
  .lap-records-table .lap-record-sector:nth-child(6) { grid-column:4; text-align:right; }
  .lap-records-table .lap-record-sector::before { content:attr(data-label); display:block; color:var(--muted); font:500 9px var(--font-body); }
  .records-controls label { min-width:0; max-width:100%; }
  .records-controls select { min-width:0; width:100%; max-width:100%; }
}
@media(max-width:600px) {
  .records-overview .records-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .records-overview .records-tabs a { min-width:0; padding:10px 6px; font-size:11px; }
  .records-controls { padding:12px; }
  .records-controls select { font-size:16px; }
}

/* Последний результат и сводка экипажей: чёткие границы без плотной заливки. */
.latest-race.card { border:1px solid color-mix(in srgb,var(--cyan) 35%,var(--border)); border-left:3px solid var(--cyan); border-radius:7px; }
.crew-summary-scroll { min-width:0; }
.crew-summary-table { width:100%; min-width:0; table-layout:fixed; }
.crew-summary-table :is(th,td):first-child { width:60px; text-align:center; }
.crew-summary-table :is(th,td):nth-child(4) { width:80px; text-align:center; }
.crew-summary-table :is(th,td):last-child { width:88px; text-align:right; }
.crew-summary-table :is(td.crew-summary-identity,td.crew-summary-pilots) { white-space:normal; overflow-wrap:anywhere; }
.crew-summary-table td { vertical-align:middle; padding-block:14px; }
.crew-summary-name { display:flex; flex-wrap:wrap; gap:6px 10px; align-items:baseline; }
.crew-summary-name strong { font:700 20px/1.3 var(--font-display); }
.crew-summary-number { color:var(--muted); font-size:12px; }
.crew-summary-team { display:flex; flex-wrap:wrap; align-items:center; gap:7px; margin-top:7px; color:var(--muted); font:500 12px var(--font-body) !important; text-decoration:none; }
.crew-summary-team .team-tag { flex:none; }
.crew-summary-pilots ul { display:flex; flex-wrap:wrap; gap:6px 16px; list-style:none; margin:0; padding:0; }
.crew-summary-pilots li { display:inline; line-height:1.4; }
.crew-summary-pilots a { font:600 17px var(--font-display); }
.crew-summary-pilots .pilot-inline-number { font-size:12px; color:var(--muted); }
@media(max-width:700px) {
  .crew-summary-table,.crew-summary-table tbody { display:block; width:100%; }
  .crew-summary-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  .crew-summary-table tbody tr { display:grid; grid-template-columns:32px minmax(0,1fr) 58px; padding:14px; border-top:1px solid var(--border); gap:8px 10px; }
  .crew-summary-table tbody tr:is(.is-p1,.is-p2,.is-p3) { background:var(--podium-fill); box-shadow:inset 3px 0 var(--podium-color); }
  .crew-summary-table tbody tr.my-result-highlight { background:var(--podium-fill); box-shadow:inset 3px 0 var(--cyan); }
  .crew-summary-table tbody tr > td { width:auto !important; min-width:0; padding:0; border:0; box-shadow:none !important; background:none !important; }
  .crew-summary-table tbody .crew-summary-position { grid-column:1; grid-row:1; align-self:start; }
  .crew-summary-table .pos-badge { min-width:28px; width:28px; height:28px; font-size:12px; }
  .crew-summary-table tbody .crew-summary-identity { grid-column:2/4; grid-row:1; }
  .crew-summary-name strong { font-size:20px; }
  .crew-summary-table tbody .crew-summary-pilots { grid-column:2/4; grid-row:2; text-align:left; }
  .crew-summary-pilots ul { gap:5px 14px; }
  .crew-summary-table tbody .crew-summary-total { grid-column:3; grid-row:3; display:flex; justify-content:flex-end; align-items:baseline; gap:6px; font-size:19px; text-align:right; }
  .crew-summary-table tbody .crew-summary-starts { grid-column:2; grid-row:3; align-self:center; font-size:11px; color:var(--muted); text-align:left; }
  .crew-summary-starts::before { content:attr(data-label) ': '; font-family:var(--font-body); }
  .crew-summary-total::before { content:attr(data-label); color:var(--muted); font:500 10px var(--font-body); }
  .crew-summary-table .crew-summary-empty td { grid-column:1/-1; white-space:normal; text-align:left; }
}
.crew-summary-table tbody tr[hidden] { display:none; }

/* Компактная сводка сессии с фактами и явно указанными условиями. */
.weekend-session-tabs a.is-active { background:var(--action) !important; border-color:var(--action); color:var(--action-ink) !important; }
.weekend-session-tabs a:is(:hover,:focus-visible) { background:var(--action); border-color:var(--action); color:var(--action-ink); }
.result-overview { padding:14px 16px; margin-bottom:18px; }
.result-overview-heading { margin-bottom:8px; gap:8px 14px; }
.result-overview-title { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 10px; min-width:0; }
.result-overview-title h3 { font:600 18px var(--font-display); margin:0; }
.result-overview-title > span { font-size:11px; }
.result-overview .result-personal-actions .btn { min-height:32px; padding:6px 10px; font-size:11px; }
.result-overview-meta { display:flex; flex-wrap:wrap; gap:5px 20px; margin:0; }
.result-overview-meta > div { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px; }
.result-overview-meta dt { color:var(--muted); font-size:10px; }
.result-overview-meta dd { margin:0; font-size:12px; font-weight:600; }
.result-key-facts { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr)); gap:10px 20px; margin:12px 0 0; padding-top:10px; border-top:1px solid var(--border); }
.result-key-facts > div { min-width:0; }
.result-key-facts dt { color:var(--muted); font-size:10px; line-height:1.4; }
.result-key-facts dd { margin:4px 0 0; font:600 18px/1.25 var(--font-display); overflow-wrap:anywhere; }
.result-key-facts dd.mono { font:600 15px/1.4 var(--font-mono); }
.result-key-facts small { display:block; margin-top:3px; color:var(--muted); font-size:11px; overflow-wrap:anywhere; }
.result-conditions { display:flex; flex-wrap:wrap; gap:8px 26px; border-top:1px solid var(--border); margin:10px 0 0; padding-top:9px; }
.result-conditions > div { min-width:0; max-width:100%; }
.result-conditions dt { display:inline; color:var(--muted); font-size:10px; margin-right:7px; }
.result-conditions dd { display:inline; margin:0; font-size:11px; line-height:1.6; overflow-wrap:anywhere; }
.result-conditions small { display:block; color:var(--muted); font-size:9px; }
.result-pit-rules { margin-left:7px; }
/* Три группы футера начинаются на одной линии, служебные ссылки — тихим нижним рядом. */
.footer-inner { max-width:1280px; display:grid; grid-template-areas:none; grid-template-columns:minmax(280px,1.5fr) minmax(160px,1fr) minmax(180px,1fr); align-items:start; gap:24px 48px; padding:28px 32px 24px; }
.footer-identity { min-width:0; }
.footer-brand { display:flex; align-items:center; gap:12px; font-size:20px; line-height:1.3; letter-spacing:.02em; text-decoration:none; }
.footer-brand img { width:40px; height:40px; flex:none; }
.footer-brand small { display:block; margin-top:4px; font-size:10px; font-weight:400; letter-spacing:0; }
.footer-identity > .footer-email { display:inline-block; margin:12px 0 0 52px; font-size:12px; text-decoration:none; }
.footer-group { grid-area:auto; display:flex; flex-direction:column; align-items:start; gap:9px; min-width:0; font-size:12px; }
.footer-group-title { display:block; margin:2px 0 3px; color:var(--muted); font:600 9px/1.4 var(--font-body); letter-spacing:.12em; text-transform:uppercase; }
.footer-group a { color:var(--muted); text-decoration:none; line-height:1.5; }
.footer-group a:hover { color:var(--text); }
.footer-social-links { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px 24px; }
.footer-bottom { max-width:1280px; margin:0 auto; display:flex; justify-content:space-between; align-items:center; gap:14px 24px; padding:10px 32px 14px; border-top:1px solid var(--border); }
.footer-bottom .footer-legal { display:flex; flex-wrap:wrap; justify-content:flex-start; gap:3px 18px; max-width:none; padding:0; margin:0; border:0; font-size:10px; line-height:1.4; color:var(--muted); }
.footer-bottom .footer-legal a { display:inline-flex; align-items:center; min-height:24px; padding:3px 0; }
.footer-bottom .changelog-wrap { flex:none; margin:0; }
.footer-bottom .site-version { font-size:10px; padding:5px 0; color:var(--muted); min-height:24px; }
@media(max-width:900px) {
  .footer-inner { grid-template-columns:minmax(220px,1.2fr) minmax(130px,1fr) minmax(140px,1fr); gap:24px; padding:24px 20px; }
  .footer-brand { font-size:18px; }
  .footer-bottom { padding-inline:20px; }
}
@media(max-width:600px) {
  .weekend-session-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
  .weekend-session-tabs > a,.weekend-session-tabs > span { min-width:0; padding:11px 5px !important; font-size:12px !important; letter-spacing:0; text-align:center; }
  .result-overview { padding:12px; }
  .result-overview .result-personal-actions .btn { min-height:40px; font-size:11px; }
  .result-overview-meta { gap:5px 14px; }
  .result-key-facts { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:10px; }
  .result-key-facts dd { font-size:17px; }
  .result-key-facts dd.mono { font-size:14px; }
  .result-conditions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .result-conditions dt { display:block; margin-bottom:3px; }
  .result-pit-rules { display:block; margin-left:0; }
  .footer-inner { grid-template-columns:repeat(2,minmax(0,1fr)); padding:24px 16px 20px; gap:22px 20px; }
  .footer-identity { grid-column:1/-1; }
  .footer-identity > .footer-email { margin-left:52px; }
  .footer-group { gap:8px; font-size:11px; }
  .footer-social-links { gap:8px 14px; }
  .footer-bottom { align-items:start; padding:10px 16px 14px; gap:12px; }
  .footer-bottom .footer-legal { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:3px 12px; font-size:9px; }
  .footer-bottom .footer-legal a { min-width:0; }
  .footer-bottom .site-version { font-size:9px; white-space:nowrap; }
}

/* Параметры гонки и условия: заметные значения, подробности по запросу. */
.result-overview-meta { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px 20px; padding:10px 12px; border:1px solid color-mix(in srgb,var(--action) 25%,var(--border)); border-radius:7px; background:color-mix(in srgb,var(--action) 5%,transparent); }
.result-overview-meta > div { display:block; }
.result-overview-meta dt { font-size:10px; line-height:1.4; }
.result-overview-meta dd { margin-top:3px; font:600 20px/1.2 var(--font-display); overflow-wrap:anywhere; }
.result-overview-meta > div:first-child dd { color:var(--action); }
.result-key-facts { margin-top:10px; padding-top:0; border-top:0; gap:10px; }
.result-key-facts > .result-fact { padding:10px 12px; border:1px solid transparent; border-radius:7px; }
.result-key-facts > .is-fastest { border-color:color-mix(in srgb,#b98ae8 46%,var(--border)); background:color-mix(in srgb,#b98ae8 6%,transparent); }
.result-key-facts .is-fastest dt { color:var(--text); font-weight:600; }
.result-key-facts .is-fastest dd { color:#d2a2ff; }
html[data-theme="light"] .result-key-facts .is-fastest dd { color:#7333ad; }
.result-conditions { align-items:center; }
.pitstop-summary { display:inline-flex; align-items:center; gap:5px; vertical-align:middle; max-width:100%; }
.pitstop-info-button { display:inline-grid; place-items:center; flex:none; width:30px; height:30px; min-width:30px; padding:0; border:0; border-radius:50%; color:var(--cyan); background:transparent; cursor:pointer; }
.pitstop-info-button:hover { background:color-mix(in srgb,var(--cyan) 12%,transparent); }
.pitstop-popover { width:min(340px,calc(100vw - 32px)); padding:20px; border:1px solid color-mix(in srgb,var(--cyan) 35%,var(--border)); border-radius:9px; color:var(--text); background:var(--surface); box-shadow:0 12px 42px #0005; text-align:left; }
.pitstop-popover::backdrop { background:#0002; }
.pitstop-popover h4 { margin:0 0 10px; font:600 21px var(--font-display); }
.pitstop-popover p,.pitstop-popover li { font:400 13px/1.6 var(--font-body); }
.pitstop-popover ul { padding-left:18px; }
.pitstop-popover small { display:block; font-size:10px; margin:12px 0; }
.pitstop-popover > .btn { margin-top:8px; }
.planned-event-card { max-width:820px; border:1px solid color-mix(in srgb,var(--cyan) 24%,var(--border)); border-left:3px solid var(--action); border-radius:9px; background:linear-gradient(125deg,color-mix(in srgb,var(--action) 6%,transparent),transparent 45%,color-mix(in srgb,var(--cyan) 5%,transparent)),color-mix(in srgb,var(--surface) 45%,transparent); }
.planned-event-status { display:flex; align-items:center; gap:8px; margin:0 0 18px; color:var(--cyan); font-size:11px; }
.planned-status-dot { width:6px; height:6px; flex:none; border-radius:50%; background:var(--cyan); }
.planned-event-title { margin:0 0 12px !important; font:600 22px var(--font-display); }
.planned-event-facts { grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin:14px 0 20px; padding:14px; border:1px solid var(--border); border-radius:7px; background:color-mix(in srgb,var(--cyan) 4%,transparent); }
.planned-event-facts dt { font-size:10px; }
.planned-event-facts dd { font:600 17px/1.3 var(--font-display); }
.planned-session { border-left:2px solid var(--cyan); background:color-mix(in srgb,var(--cyan) 4%,transparent); }
.planned-session.is-race { border-left-color:var(--action); background:color-mix(in srgb,var(--action) 5%,transparent); }
.planned-pitstops { display:flex; align-items:center; flex-wrap:wrap; gap:5px 12px; padding-top:12px; border-top:1px solid var(--border); font-size:12px; }
.planned-pitstops > .muted { font-size:11px; }
.server-access { width:100%; max-width:480px; margin-top:18px; padding:10px; border:1px solid color-mix(in srgb,var(--cyan) 28%,var(--border)); border-radius:7px; background:color-mix(in srgb,var(--cyan) 4%,transparent); }
.server-credential { display:grid; grid-template-columns:80px minmax(0,1fr) 36px; gap:8px; align-items:center; padding-top:7px; }
.server-credential:first-child { padding-top:0; }
.server-credential-label { color:var(--muted); font-size:10px; }
.server-credential .mono { min-width:0; font-size:12px; line-height:1.6; overflow-wrap:anywhere; }
.server-credential > .icon-button { width:36px; height:36px; min-width:36px; min-height:36px; padding:0; margin:0; }
@media(max-width:600px) {
  .result-overview-meta { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 16px; }
  .result-overview-meta dd { font-size:19px; }
  .result-key-facts > .result-fact { padding:9px; }
  .result-key-facts dt { font-size:9px; }
  .result-conditions { align-items:start; }
  .pitstop-info-button { width:32px; height:32px; min-width:32px; }
  .planned-event-card { padding:16px; }
  .planned-event-facts { grid-template-columns:repeat(2,minmax(0,1fr)); padding:12px; gap:12px; }
  .planned-event-facts dd { font-size:16px; }
  .server-credential { grid-template-columns:minmax(0,1fr) 36px; gap:2px 8px; }
  .server-credential-label { grid-column:1; grid-row:auto; }
  .server-credential .mono { grid-column:1; }
  .server-credential > .icon-button { grid-column:2; grid-row:1/3; }
}

/* Сводка и уведомления: компактный нейтральный каркас, акцент только на значении. */
.result-overview { max-width:960px; padding:12px 14px; }
.page:not(.page-admin) .result-overview { background-color:var(--surface); }
.result-overview-meta { display:flex; flex-wrap:wrap; gap:9px 26px; padding:8px 0; border:0; border-bottom:1px solid var(--border); border-radius:0; background:none; }
.result-overview-meta > div { display:flex; align-items:baseline; gap:6px; }
.result-overview-meta dd { margin:0; font:600 16px/1.3 var(--font-display); }
.result-overview-meta > div:first-child dd { color:var(--text); }
.result-key-facts { grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:8px 18px; margin-top:8px; }
.result-key-facts > .result-fact { padding:5px 0; border:0; border-radius:0; background:none; }
.result-key-facts .is-fastest dt { color:var(--muted); font-weight:400; }
.result-key-facts .is-fastest dd { color:#d2a2ff; text-decoration:underline; text-decoration-color:var(--cyan); text-underline-offset:5px; text-decoration-thickness:2px; }
html[data-theme="light"] .result-key-facts .is-fastest dd { color:#7333ad; }
.result-conditions { margin-top:7px; padding-top:6px; gap:6px 22px; }
.home-panel .panel-viewport { height:304px; min-height:0; padding:14px 16px; display:flex; overflow:hidden; }
.home-panel .panel-slide.is-active { flex:1; min-width:0; min-height:0; max-height:100%; overflow-y:auto; padding:0 4px 0 0; scrollbar-gutter:stable; }
.home-panel .digest-controls { justify-content:center; gap:6px; margin-top:8px; }
.home-panel .digest-controls > .btn { display:grid; place-items:center; flex:none; width:28px; height:28px; min-width:28px; min-height:28px; padding:0; margin:0; border-radius:4px; line-height:1; }
.home-panel .digest-controls > .btn svg { display:block; }
.home-panel .digest-dots { gap:0; }
.home-panel .digest-dot,.home-panel .digest-dot.is-active { width:20px; height:28px; padding:0; margin:0; }
.home-panel .digest-dot::before { width:8px; height:8px; }
.site-header .tabs { min-width:0; max-width:100%; flex-wrap:wrap; }
.notice-list { display:grid; gap:10px; max-width:900px; margin-top:18px; }
.notice-item { display:flex; justify-content:space-between; gap:18px; padding:14px 16px; border:1px solid var(--border); border-radius:6px; background:color-mix(in srgb,var(--surface) 28%,transparent); }
.notice-item.is-unread { border-left:2px solid var(--cyan); }
.notice-item small { color:var(--muted); font-size:10px; }
.notice-item h3 { margin:5px 0; font:600 20px var(--font-display); }
.notice-item p { margin:5px 0 0; font-size:12px; overflow-wrap:anywhere; }
.notice-item > form { align-self:center; flex:none; }
.notice-read-all { margin-top:14px; }
.admin-queue-notice { display:flex; justify-content:space-between; gap:12px; padding:14px 16px; border:1px solid var(--border); border-radius:6px; text-decoration:none; }
.admin-queue-notice span { color:var(--muted); font-size:12px; }
.application-bulk-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin:18px 0; padding:12px; border:1px solid var(--border); border-radius:6px; }
.application-bulk-actions label { display:flex; align-items:center; gap:7px; font-size:12px; }
.application-bulk-actions small { flex-basis:100%; font-size:10px; }
.application-select { align-self:center; margin-right:6px; }
.application-select input { width:18px; height:18px; accent-color:var(--action); }
@media(max-width:600px) {
  .result-overview { padding:12px; }
  .result-overview-meta { gap:7px 18px; }
  .result-overview-meta dt { font-size:9px; }
  .result-overview-meta dd { font-size:15px; }
  .result-key-facts { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .result-key-facts > .result-fact { padding:5px 0; }
  .notice-item { flex-direction:column; gap:10px; }
  .notice-item > form { align-self:start; }
  .admin-queue-notice { flex-wrap:wrap; }
  .application-bulk-actions > .btn { flex:1 1 130px; }
}

/* Уведомления доступны с любой страницы, без дополнительной вкладки навигации. */
.ingest-filters { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)) auto; gap:10px; align-items:end; margin:18px 0; }
.ingest-filters label { display:grid; gap:5px; font-size:11px; color:var(--muted); min-width:0; }
.ingest-filters :is(input,select),.ingest-action-controls select { width:100%; min-width:0; box-sizing:border-box; }
.ingest-filters :is(input,select),.review-pilot-filter select { min-height:38px; padding:8px 10px; border:1px solid var(--border); border-radius:4px; background:var(--surface-alt); color:var(--text); font:400 12px var(--font-body); }
.ingest-filters button { min-height:38px; }
.ingest-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; padding:14px; margin:16px 0; border:1px solid var(--border); border-radius:6px; background:var(--surface); }
.ingest-actions label { display:flex; align-items:center; gap:7px; font-size:12px; }
.ingest-actions > small { flex-basis:100%; font-size:11px; line-height:1.6; }
.ingest-action-controls { display:flex; flex:1 0 100%; flex-wrap:wrap; gap:8px; }
.ingest-action-controls select { flex:1 1 240px; }
.ingest-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr)); gap:12px; margin:18px 0; }
.ingest-card { position:relative; min-width:0; padding:14px; border:1px solid var(--border); border-radius:6px; background:var(--panel-fill,var(--surface)); }
.ingest-card.is-staged { border-style:dashed; }
.ingest-card.is-planned-removal { border-color:var(--red); }
.ingest-card.is-planned-removal .ingest-card-head strong { text-decoration:line-through; text-decoration-color:var(--red); }
.ingest-action-preview { margin:10px 0 0; color:var(--cyan); font-size:10px; line-height:1.5; }
.ingest-card.is-planned-removal .ingest-action-preview { color:var(--red); }
.ingest-card-head { display:flex; align-items:center; gap:9px; min-width:0; padding-right:26px; }
.ingest-card-head > div { flex:1; min-width:0; }
.ingest-card-head strong { display:block; overflow-wrap:anywhere; font:600 20px var(--font-display); }
.ingest-card-head small { display:block; color:var(--muted); font-size:10px; margin-top:4px; }
.ingest-card input[type=checkbox] { flex:none; width:18px; height:18px; accent-color:var(--action); }
.ingest-badges { display:flex; flex-wrap:wrap; align-items:center; gap:5px 10px; margin-top:10px; color:var(--muted); font-size:10px; }
.ingest-category { border:1px solid var(--border); border-radius:4px; padding:3px 6px; font-weight:600; }
.ingest-category:is(.category-matched,.category-linked) { color:var(--cyan); border-color:color-mix(in srgb,var(--cyan) 40%,var(--border)); }
.ingest-category.category-public { color:var(--accent); }
.ingest-reason,.ingest-impact { color:var(--muted); font-size:11px; line-height:1.5; margin:9px 0; overflow-wrap:anywhere; }
.ingest-impact { color:var(--cyan); }
.ingest-sessions { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.ingest-sessions > div { display:flex; align-items:center; border:1px solid var(--border); border-radius:4px; }
.ingest-sessions a { display:flex; align-items:center; gap:6px; min-height:34px; padding:6px 8px; font-size:12px; text-decoration:none; }
.ingest-sessions small { color:var(--muted); font-size:9px; }
.ingest-sessions button,.ingest-hide button { display:grid; place-items:center; width:28px; height:32px; padding:0; background:transparent; color:var(--muted); border:0; font-size:18px; cursor:pointer; }
.ingest-hide { position:absolute; top:10px; right:8px; margin:0; }
.ingest-hide button { border:1px solid var(--border); border-radius:4px; width:28px; height:28px; }
.ingest-hide button:hover,.ingest-sessions button:hover { color:var(--red); background:var(--red-dim); }
.ingest-card :is(a,button,input):focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }
.ingest-month-scroll { overflow:auto; max-width:100%; margin-top:16px; }
.ingest-month { display:grid; grid-template-columns:repeat(7,minmax(140px,1fr)); min-width:980px; }
.ingest-day { min-height:100px; padding:7px; border:1px solid var(--border); min-width:0; }
.ingest-day > time { display:block; margin-bottom:7px; color:var(--muted); font-size:12px; }
.ingest-day .ingest-card + .ingest-card { margin-top:8px; }
.ingest-card.is-compact { padding:8px; }
.ingest-card.is-compact .ingest-card-head { display:block; padding-right:0; }
.ingest-card.is-compact .ingest-card-head > div { margin-top:4px; }
.ingest-card.is-compact .ingest-card-head strong { font-size:16px; }
.ingest-card.is-compact .ingest-badges { gap:5px; font-size:9px; }
.ingest-card.is-compact .ingest-category { padding:3px; }
.ingest-card.is-compact :is(.ingest-reason,.ingest-impact) { display:none; }
.ingest-card.is-compact .ingest-sessions { gap:4px; }
.ingest-card.is-compact .ingest-sessions a { font-size:11px; padding:4px; min-height:30px; }
.ingest-card.is-compact .ingest-sessions small { display:none; }
.ingest-card.is-compact .ingest-hide { top:7px; right:5px; }
.ingest-plan { display:grid; gap:5px; padding:10px; margin-top:8px; background:var(--surface); border:1px solid var(--border); border-radius:4px; font-size:12px; }
.ingest-plan :is(small,span) { color:var(--muted); font-size:10px; }
.ingest-week { display:grid; gap:14px; margin:18px 0; }
.review-pilot-filter { display:grid; grid-template-columns:auto minmax(180px,420px) auto; justify-content:start; align-items:center; gap:10px; margin:20px 0; }
.review-pilot-filter select { width:100%; min-width:0; }
.review-ledger table { min-width:720px; }
.review-summary table { min-width:0; width:100%; }
.review-summary th:first-child { width:46%; }
.review-bulk-controls input { min-height:38px; padding:8px; min-width:0; flex:1 1 240px; }
.ingest-scroll-hint { display:none; }
@media(hover:hover) { .ingest-hide,.ingest-sessions form { opacity:0; }.ingest-card:hover .ingest-hide,.ingest-card:focus-within .ingest-hide,.ingest-sessions > div:hover form,.ingest-sessions > div:focus-within form { opacity:1; } }
@media(max-width:800px) { .ingest-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }.ingest-actions { padding:12px; }.ingest-action-controls > .btn { flex:1 1 170px; }.review-pilot-filter { grid-template-columns:minmax(0,1fr) auto; }.review-pilot-filter label { grid-column:1/-1; }.ingest-scroll-hint { display:block; font-size:11px; color:var(--muted); } }
@media(max-width:400px) { .ingest-action-controls select { flex-basis:100%; }.ingest-card { padding:11px; }.ingest-sessions a { gap:4px; } }
[hidden] { display:none !important; }
.processing-consent { min-width:0; margin:14px 0; padding:0; border:0; }
.processing-consent legend { padding:0 5px; font-size:12px; }
.processing-consent label { display:flex; align-items:flex-start; gap:9px; font:400 12px/1.6 var(--font-body); }
.processing-consent input[type="checkbox"] { width:18px; height:18px; min-width:18px; margin:2px 0 0; accent-color:var(--action); }
.processing-consent small { display:block; margin-top:8px; color:var(--muted); font-size:11px; line-height:1.6; }
.header-notifications { position:relative; flex:none; }
.notification-toggle { position:relative; display:grid; place-items:center; box-sizing:border-box; width:36px; height:36px; padding:0; border:1px solid var(--border); border-radius:4px; color:var(--text); background:transparent; cursor:pointer; list-style:none; }
.notification-toggle::-webkit-details-marker { display:none; }
.notification-toggle:hover,.header-notifications[open] .notification-toggle { background:var(--surface-alt); border-color:var(--cyan); }
.notification-total { position:absolute; top:-6px; right:-5px; min-width:16px; padding:2px 3px; border-radius:8px; background:var(--action); color:#17110b; font:700 9px/1 var(--font-body); text-align:center; }
.notification-dropdown { position:fixed; top:140px; right:12px; z-index:1100; display:flex; flex-direction:column; width:400px; max-width:calc(100vw - 16px); max-height:min(520px,70vh); overflow:hidden; padding:14px; border:1px solid var(--border); border-radius:8px; background:var(--bg); box-shadow:0 12px 36px #0005; color:var(--text); }
.notification-dropdown .notification-panel { display:flex; flex-direction:column; min-height:0; }
.notification-dropdown [data-notice-scope] { overflow:auto; min-height:0; overscroll-behavior:contain; }
.notification-dropdown :is(.notification-dropdown-heading,.notification-tabs,.notification-all-link) { flex:none; }
.notification-dropdown-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:8px; }
.notification-dropdown-heading > strong { font:600 20px var(--font-display); }
.notification-close { width:30px; height:30px; padding:0; border:1px solid var(--border); border-radius:4px; color:var(--muted); background:transparent; font-size:22px; cursor:pointer; }
.notification-tabs { display:flex; gap:4px; padding-bottom:10px; }
.notification-tabs > button { display:flex; align-items:center; justify-content:center; gap:6px; min-height:36px; padding:6px 12px; border:1px solid transparent; border-radius:4px; color:var(--muted); background:transparent; font:600 12px var(--font-body); cursor:pointer; }
.notification-tabs > button[aria-selected="true"] { color:var(--text); background:var(--surface-alt); border-color:var(--border); }
.notification-items { display:grid; gap:0; list-style:none; padding:0; margin:0; }
.notification-item { position:relative; padding:12px 0 12px 10px; border-top:1px solid var(--border); }
.notification-item.is-unread::before { content:''; position:absolute; left:0; top:32px; width:4px; height:4px; border-radius:50%; background:var(--cyan); }
.notification-item time { display:block; color:var(--muted); font-size:10px; margin-bottom:4px; }
.notification-item strong { display:block; font:600 13px/1.4 var(--font-body); }
.notification-item p { margin:4px 0 8px; font:400 12px/1.5 var(--font-body); overflow-wrap:anywhere; color:var(--muted); }
.notification-item form { display:flex; align-items:center; flex-wrap:wrap; gap:8px 16px; }
.notification-item button { min-height:32px; border:0; padding:4px 0; background:none; color:var(--cyan); font:600 11px var(--font-body); cursor:pointer; }
.notification-item .notification-mark { color:var(--muted); }
.notification-read-all { margin-top:8px; }
.notification-empty { margin:0; padding:14px 0; color:var(--muted); font-size:12px; line-height:1.6; }
.notification-status { margin:8px 0 0; font-size:11px; }
.notification-status:empty { display:none; }
.header-help-links .notification-all-link { display:block; height:auto; min-height:0; padding:12px 0 0; margin-top:10px; border:0; border-top:1px solid var(--border); border-radius:0; background:none; color:var(--muted); font:500 11px var(--font-body); }
.header-help-links .notification-empty a { display:inline; height:auto; padding:0; border:0; background:none; font:inherit; color:var(--cyan); }
.notification-panel :is(button,a):focus-visible,.notification-toggle:focus-visible { outline:2px solid var(--cyan); outline-offset:3px; }
.result-overview-title { align-items:center; gap:10px; }
.result-overview-title h3 { font:600 21px/1.25 var(--font-display); }
.result-overview-title > span { font:500 11px/1.4 var(--font-body); border-left:1px solid var(--border); padding-left:10px; }
.result-overview-meta dt { font-size:11px; }
.result-conditions { align-items:start; }
.result-conditions > div { display:grid; grid-template-columns:auto minmax(0,1fr); gap:8px; align-items:center; }
.result-conditions dt { display:block; margin:0; font-size:11px; }
.result-conditions dd { display:flex; align-items:center; min-height:32px; margin:0; font-size:12px; }
@media(max-width:600px) {
  .notification-toggle { width:40px; height:40px; }
  .header-help-links { gap:4px; }
  .header-help-links > a { padding:6px; font-size:10px; }
  .header-timezone summary { padding:6px; font-size:10px; gap:3px; }
  .theme-toggle { width:36px; }
  .notification-dropdown { padding:12px; }
  .result-conditions > div { grid-template-columns:minmax(0,1fr); gap:2px; }
  .result-overview-meta dt { font-size:10px; }
}

/* Слайды главной и общий редактор изображений. */
.hero-pause { width:34px; height:34px; padding:7px; display:grid; place-items:center; color:var(--muted); }
.hero-pause svg { fill:currentColor; }
.hero-pause[data-state=playing] .hero-play-symbol,.hero-pause[data-state=paused] .hero-pause-symbol { display:none; }
.hero-event { background:var(--hero-tone,#0c1013); }
.hero-event .aspire-hero-art::before { background:linear-gradient(90deg,var(--hero-tone,#0c1013) 0%,transparent 22%); }
.image-upload-tools { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin:6px 0; min-width:0; }
.image-upload-tools span { font-size:11px; line-height:1.6; overflow-wrap:anywhere; }
.image-editor-dialog { width:min(760px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); padding:18px; border:1px solid var(--border); border-radius:10px; background:var(--bg); color:var(--text); overflow:auto; }
.image-editor-dialog::backdrop { background:#000b; }
.image-editor-head { display:flex; justify-content:space-between; gap:12px; align-items:center; }
.image-editor-head h3 { margin:0; font-size:22px; }.image-editor-dialog > p { font-size:12px; line-height:1.6; }
.image-editor-dialog canvas { display:block; width:100%; height:auto; background:var(--surface); border-radius:6px; touch-action:none; }
.image-editor-controls { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:16px; }
.image-editor-controls label { display:grid; gap:8px; min-width:0; font-size:12px; }
.image-editor-controls :is(input,select) { width:100%; min-width:0; box-sizing:border-box; }
.image-editor-controls select { min-height:38px; border:1px solid var(--border); border-radius:5px; background:var(--surface); color:var(--text); padding:8px; }
.image-editor-controls input { accent-color:var(--action); }.image-editor-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:18px; }
@media(max-width:600px) { .hero-event .aspire-hero-art::before { background:linear-gradient(0deg,var(--hero-tone,#0c1013) 0%,transparent 22%); }.image-editor-dialog { padding:12px; }.image-editor-controls { gap:12px; } }
.hero-track { display:grid; position:relative; align-items:stretch; }.hero-slide { grid-area:1/1; min-width:0; }.hero-slide > .aspire-hero { height:100%; box-sizing:border-box; }.hero-controls button:focus-visible { outline:2px solid var(--cyan); outline-offset:3px; }
.role-perm-card > summary strong { min-width:0; overflow-wrap:anywhere; }.role-perm-card > summary { flex-wrap:wrap; }.role-edit-form .field :is(input,select) { min-width:0; max-width:100%; width:100%; box-sizing:border-box; }
.role-expiry { max-width:340px; margin:12px 0; }.role-expiry label { display:grid; gap:6px; }.role-expiry input[type=date],.role-create-custom input { min-width:0; max-width:100%; width:100%; box-sizing:border-box; padding:10px; border:1px solid var(--border); border-radius:5px; background:var(--surface); color:var(--text); font:400 13px var(--font-body); }.role-expiry input:disabled { opacity:.45; }.role-expiry small { display:block; margin-top:6px; font-size:11px; line-height:1.5; }.role-create-custom .field { flex:1 1 220px; margin:0; }.role-create-custom { margin-bottom:16px; }.role-create-custom .btn { white-space:normal; }
.hero-carousel { margin-bottom:24px; }.hero-carousel .aspire-hero { margin-bottom:0; }.hero-event :is(h1,h2) { font:700 clamp(30px,3.5vw,56px)/1.08 var(--font-display); margin:18px 0; overflow-wrap:anywhere; }.hero-event p { white-space:pre-line; }.hero-event:not(:has(.aspire-hero-art)) .aspire-hero-copy { grid-column:1/-1; padding-right:36px; }.hero-controls { display:flex; align-items:center; justify-content:center; gap:10px; margin:10px 0; }.hero-dots { display:flex; flex-wrap:wrap; gap:4px; }.hero-dot { display:grid; place-items:center; width:20px; height:30px; padding:0; border:0; background:none; cursor:pointer; }.hero-dot::before { content:''; width:8px; height:8px; border-radius:50%; background:var(--muted); }.hero-dot[aria-current=true]::before { background:var(--accent); }
.banner-edit-form { display:grid; gap:14px; max-width:900px; }.banner-edit-form label { display:grid; gap:6px; min-width:0; font-size:12px; }.banner-edit-form :is(input:not([type=checkbox]),textarea),.banner-options :is(input,select) { width:100%; min-width:0; box-sizing:border-box; padding:10px; border:1px solid var(--border); border-radius:5px; color:var(--text); background:var(--surface); }.banner-edit-form .checkbox-label { display:flex; white-space:normal; }.banner-admin-preview { max-width:100%; max-height:240px; object-fit:contain; }.banner-options,.banner-order-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin:16px 0; }.banner-options label { display:flex; align-items:center; gap:10px; }.banner-options input { width:auto; }.license-diagnostics td { white-space:normal; vertical-align:top; }.license-diagnostics td:last-child { min-width:260px; }.role-perm-card > summary { cursor:pointer; display:flex; justify-content:space-between; gap:12px; }.role-create-custom { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }.roles-perm-grid { align-items:start; }
.ingest-list[data-layout=rows] { grid-template-columns:1fr; }.ingest-list[data-layout=rows] .ingest-card { display:grid; grid-template-columns:minmax(210px,2fr) minmax(160px,1fr) minmax(150px,1fr); gap:8px 16px; align-items:start; }.ingest-list[data-layout=rows] .ingest-card-head { grid-column:1; }.ingest-list[data-layout=rows] .ingest-primary-status { grid-column:2; margin:0; }.ingest-list[data-layout=rows] .ingest-event-facts { grid-column:3; margin:0; border:0; padding:0; }.ingest-list[data-layout=rows] .ingest-sessions { grid-column:2/-1; margin:0; }.ingest-list[data-layout=rows] .ingest-action-preview { grid-column:1/-1; }.ingest-table-wrap { max-width:100%; overflow:auto; }.ingest-table { min-width:780px; }.ingest-table img { width:20px; height:14px; margin-right:6px; }.ingest-table .ingest-cycle { margin:auto; }.ingest-table .ingest-action-preview { max-width:150px; white-space:normal; }
@media(max-width:800px) { .ingest-list[data-layout=rows] .ingest-card { display:block; }.ingest-list[data-layout=rows] .ingest-event-facts { margin-top:10px; }.ingest-list[data-layout=rows] .ingest-sessions { margin-top:10px; } }
.team-heading-layout { display:grid; grid-template-columns:minmax(0,1fr) 240px; gap:24px; align-items:start; margin:16px 0 24px; }.team-heading-card { min-width:0; overflow:hidden; border-radius:7px; }.team-heading-card .team-profile-cover { width:100%; margin:0; max-height:none; aspect-ratio:8/3; box-sizing:border-box; }.team-heading-card .team-profile-banner { width:100%; margin:0; box-sizing:border-box; }.team-heading-owner { min-width:0; padding:20px 0; }.team-heading-owner .entity-name { display:block; margin-top:12px; overflow-wrap:anywhere; }.team-heading-owner p { font-size:12px; line-height:1.6; }
@media(max-width:800px) { .team-heading-layout { grid-template-columns:1fr; gap:12px; }.team-heading-owner { padding:0; }.team-heading-owner .entity-name { display:inline; margin-left:12px; }.team-heading-owner p { display:none; } }
.preset-assist-state.is-allowed { color:var(--green); }.preset-assist-state.is-forbidden { color:var(--red); }
.preset-catalog-filters { display:flex; flex-wrap:wrap; align-items:end; gap:10px; margin-top:20px; }.preset-catalog-filters label { display:grid; gap:5px; flex:1 1 160px; min-width:0; font-size:12px; color:var(--muted); }.preset-catalog-filters label:first-child { flex-grow:2; }.preset-catalog-filters :is(input,select) { width:100%; min-width:0; min-height:38px; padding:8px 10px; box-sizing:border-box; border:1px solid var(--border); border-radius:5px; background:var(--surface); color:var(--text); }.preset-catalog-status { font-size:12px; margin:12px 0; }
.preset-list-content { min-width:0; flex:1; }.preset-list .preset-list-track { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:10px 0; }.preset-list-track img { width:24px; height:16px; object-fit:cover; border-radius:2px; }.preset-list-track strong { font-size:16px; }.preset-list-track > span { color:var(--muted); font-size:11px; }
.preset-list .preset-list-description { font-size:12px; line-height:1.6; margin:10px 0; white-space:pre-line; }.preset-list-sessions { display:flex; flex-wrap:wrap; gap:6px; margin:10px 0; }.preset-list-sessions > span { padding:5px 7px; border:1px solid var(--border); border-radius:4px; font-size:11px; color:var(--muted); }.preset-list-sessions strong { color:var(--text); }.preset-list .preset-list-weather { margin:10px 0; color:var(--muted); }.preset-list-weather > strong { color:var(--text); }.preset-host-description { font-size:11px; margin:8px 0; color:var(--muted); }.preset-host-description summary { cursor:pointer; }.preset-host-description p { white-space:pre-wrap; overflow-wrap:anywhere; }
.notification-items { gap:7px; }.notification-item { padding:12px; border:1px solid var(--border); border-radius:6px; background:color-mix(in srgb,var(--surface) 55%,transparent); }.notification-item.is-unread { border-left:3px solid var(--cyan); background:color-mix(in srgb,var(--surface-alt) 82%,var(--cyan) 18%); }.notification-item.is-unread::before { display:none; }.notification-item-heading { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:5px 12px; margin-bottom:5px; }.notification-item-heading time { margin:0; }.notification-state { font-size:10px; color:var(--muted); }.is-unread .notification-state { color:var(--cyan); font-weight:700; }
.ingest-card { --ingest-type-color:var(--muted); }.ingest-card.type-championship { --ingest-type-color:var(--event-championship); }.ingest-card.type-championship-sprint { --ingest-type-color:var(--event-championship-sprint); }.ingest-card.type-weekend-sprint { --ingest-type-color:var(--event-short); }.ingest-card.type-weekend-race { --ingest-type-color:var(--accent); }.ingest-card.type-endurance { --ingest-type-color:#f97316; }
.ingest-card[data-type-known=true] { border-left:3px solid var(--ingest-type-color); background:color-mix(in srgb,var(--ingest-type-color) 7%,var(--surface)); }.ingest-primary-status { display:flex; flex-wrap:wrap; gap:5px 10px; margin-top:10px; font-size:11px; }.ingest-primary-status > * { flex-basis:100%; }.ingest-kind-label { color:var(--ingest-type-color); }.ingest-connection { color:var(--muted); }.ingest-connection.is-linked { color:var(--text); font-weight:600; }.ingest-compact-facts { display:flex; flex-wrap:wrap; gap:6px 12px; margin:9px 0; color:var(--muted); font-size:10px; }.ingest-compact-facts strong { color:var(--text); }
.ingest-protocols { margin-top:9px; font-size:10px; color:var(--muted); }.ingest-protocols > summary { cursor:pointer; }.ingest-card.is-compact .ingest-card-head { display:grid; grid-template-columns:1fr auto; align-items:center; gap:5px; }.ingest-card.is-compact .ingest-card-head > .ingest-event-title { grid-column:1/-1; grid-row:2; margin:0; }.ingest-card.is-compact .ingest-cycle { grid-column:2; grid-row:1; width:26px; height:26px; }.ingest-card.is-compact .ingest-card-head strong { font-size:15px; }.ingest-card.is-compact .ingest-card-head small { font-size:10px; }.ingest-card.is-compact .ingest-event-title img { width:19px; height:13px; }.ingest-card.is-compact .ingest-primary-status { font-size:10px; line-height:1.45; }.ingest-card.is-compact .ingest-reason { display:block; }
.ingest-legend { display:flex; flex-wrap:wrap; gap:8px 14px; margin:15px 0; color:var(--muted); font-size:11px; }.lg-dot.style-unresolved { background:var(--muted); border-color:var(--muted); }
.ingest-card[data-type-known].is-marked-hide { background:color-mix(in srgb,var(--surface) 45%,transparent); border-color:var(--muted); }.ingest-card[data-type-known].is-marked-delete { background:color-mix(in srgb,var(--red) 9%,var(--surface)); border-color:var(--red); }
.ingest-card-head { padding-right:0; }
.ingest-event-title strong { display:flex; align-items:center; gap:9px; }
.ingest-event-title img { flex:none; width:24px; height:16px; object-fit:cover; border-radius:2px; }
.ingest-cycle { display:grid; place-items:center; flex:none; width:34px; height:34px; border:1px solid var(--border); border-radius:5px; background:transparent; color:var(--muted); cursor:pointer; }
.ingest-cycle svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.ingest-cycle:hover { color:var(--text); border-color:var(--cyan); }
.ingest-card.is-marked-hide { background:color-mix(in srgb,var(--surface) 45%,transparent); border-color:var(--muted); }
.ingest-card.is-marked-hide > :not(.ingest-card-head):not(.ingest-action-preview) { opacity:.5; }
.ingest-card.is-marked-hide .ingest-action-preview { color:var(--muted); }
.ingest-card.is-marked-delete { background:color-mix(in srgb,var(--red) 9%,var(--surface)); border-color:var(--red); }
.ingest-card.is-marked-delete .ingest-cycle,.ingest-card.is-marked-delete .ingest-action-preview { color:var(--red); }
.ingest-event-facts { display:flex; flex-wrap:wrap; gap:10px 24px; padding:10px 0; margin:10px 0 0; border-block:1px solid var(--border); }
.ingest-event-facts div { display:flex; align-items:baseline; gap:6px; min-width:0; }.ingest-event-facts dt { color:var(--muted); font-size:10px; }.ingest-event-facts dd { margin:0; font:600 14px var(--font-display); }
.ingest-diagnostics { margin-top:10px; font-size:10px; color:var(--muted); }.ingest-diagnostics summary { cursor:pointer; }
.ingest-session-code { display:none; }.ingest-sessions a { flex-wrap:wrap; }.ingest-sessions a small { white-space:nowrap; }
.ingest-card.is-compact .ingest-session-code { display:inline; }.ingest-card.is-compact .ingest-session-name { display:none; }.ingest-card.is-compact .ingest-event-facts { gap:7px 12px; }
.ingest-plan-toolbar { display:flex; align-items:center; flex-wrap:wrap; flex-basis:100%; gap:10px; }.ingest-plan-toolbar > small { flex-basis:100%; font-size:11px; line-height:1.6; }.ingest-plan-toolbar > strong { font-size:12px; margin-right:auto; }
.ingest-plan-selection { display:flex; flex:1 0 100%; flex-wrap:wrap; gap:8px; }.ingest-plan-selection select { min-width:0; max-width:100%; padding:8px; border:1px solid var(--border); border-radius:4px; background:var(--surface-alt); color:var(--text); font:12px var(--font-body); }
.ingest-other-actions { flex-basis:100%; padding-top:10px; border-top:1px solid var(--border); }.ingest-other-actions summary { cursor:pointer; color:var(--muted); font-size:12px; }.ingest-other-actions .ingest-action-controls { margin:12px 0; }.ingest-other-actions > small { display:block; font-size:11px; line-height:1.6; color:var(--muted); }
#ingest-workspace { position:relative; min-width:0; }#ingest-workspace.is-busy { pointer-events:none; opacity:.65; }#ingest-workspace.is-busy::before { content:'Обновление…'; position:absolute; top:8px; right:8px; z-index:2; padding:5px 8px; background:var(--surface); border-radius:4px; font-size:12px; color:var(--cyan); }
@media(max-width:500px) { .ingest-plan-selection > * { flex:1 1 150px; }.ingest-plan-toolbar > .btn { flex:1 1 130px; white-space:normal; }.ingest-event-title strong { font-size:19px; }.ingest-event-facts { gap:8px 16px; } }
.preset-editor .checkbox-label { white-space:normal; flex-direction:row; overflow-wrap:anywhere; }
.preset-editor input[type=checkbox] { min-width:18px; padding:0; }
.preset-list { display:grid; gap:12px; margin-top:22px; }
.preset-list-card { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:16px; border:1px solid var(--border); border-radius:8px; background:var(--surface); min-width:0; }
.preset-list-card h3 { margin:0 0 5px; font:600 21px var(--font-display); overflow-wrap:anywhere; }.preset-list-card h3 a { color:var(--text); text-decoration:none; }.preset-list-card p { margin:0 0 5px; font-size:12px; overflow-wrap:anywhere; }.preset-list-card small { font-size:10px; }
.preset-import { margin:18px 0; padding:14px; border:1px solid var(--border); border-radius:7px; }.preset-import summary,.preset-delete summary { cursor:pointer; font-size:13px; }.preset-import-form { display:flex; align-items:end; flex-wrap:wrap; gap:12px; margin-top:14px; }.preset-import-form label { display:grid; gap:6px; min-width:0; font-size:12px; }.preset-import-form input[type=file] { width:100%; max-width:330px; min-width:0; }.preset-import-form small { flex-basis:100%; font-size:11px; line-height:1.6; }
.preset-source { display:flex; align-items:center; flex-wrap:wrap; gap:8px 18px; padding:12px 14px; margin:16px 0; border-left:2px solid var(--cyan); background:var(--surface); border-radius:4px; }.preset-source strong,.preset-source a { font-size:12px; overflow-wrap:anywhere; }.preset-source small { flex-basis:100%; color:var(--muted); font-size:11px; }
.preset-section-nav { display:flex; flex-wrap:wrap; gap:6px; margin:18px 0; }.preset-section-nav a { padding:8px 10px; border:1px solid var(--border); border-radius:5px; color:var(--muted); text-decoration:none; font-size:11px; }.preset-section-nav a:hover { color:var(--text); border-color:var(--cyan); }
.preset-group { margin:12px 0; border:1px solid var(--border); border-radius:8px; background:color-mix(in srgb,var(--surface) 40%,transparent); scroll-margin-top:18px; min-width:0; }.preset-group > summary { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:6px 12px; cursor:pointer; padding:14px 16px; }.preset-group > summary strong { font:600 20px var(--font-display); }.preset-group > summary > span { font-size:10px; }.preset-group > summary::after { content:'⌄'; color:var(--muted); }.preset-group-body { padding:0 16px 16px; min-width:0; }.preset-override { padding:5px 0 14px; font-size:12px; }
.preset-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 18px; min-width:0; margin:0; padding:0; border:0; }.preset-fields.is-inherited { opacity:.55; }.preset-field { display:flex; flex-direction:column; gap:5px; min-width:0; margin:0; }.preset-field label { font-size:12px; line-height:1.5; }.preset-field :is(input:not([type=checkbox]),select,textarea),.preset-launch-fields :is(input,select) { width:100%; min-width:0; box-sizing:border-box; min-height:40px; padding:9px 10px; border:1px solid var(--border); border-radius:5px; background:var(--surface); color:var(--text); font:400 13px var(--font-body); }.preset-field:has(textarea) { grid-column:1/-1; }.preset-field .field-hint { font-size:10px; line-height:1.6; }.preset-field.has-error :is(input,select,textarea) { border-color:#e96f5e; }.preset-editor input[type=checkbox] { flex:none; width:18px; height:18px; accent-color:var(--action); margin:1px 0 0; }.preset-editor .checkbox-label { display:flex; align-items:start; gap:8px; line-height:1.5; }
.preset-fields[data-preset-group=sessions] { grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }.preset-session { min-width:0; padding:12px; border:1px solid var(--border); border-radius:6px; }.preset-session-heading { margin-bottom:14px; }.preset-session-fields { min-width:0; border:0; padding:0; margin:0; display:grid; gap:12px; }.preset-session-fields:disabled { opacity:.5; }.preset-session-note { grid-column:1/-1; margin:0; font-size:11px; line-height:1.7; }.preset-launch-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; min-width:0; padding:14px 0; margin:0; border:0; }.preset-launch-fields:disabled { opacity:.5; }.preset-launch-fields label { font-size:12px; margin-bottom:6px; }.preset-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin:20px 0; }.preset-actions .btn,.preset-import-form .btn { white-space:normal; text-align:center; }.preset-delete { margin:22px 0; color:var(--muted); }.preset-delete form { margin-top:12px; }
@media(max-width:800px) { .preset-fields[data-preset-group=sessions] { grid-template-columns:1fr; }.preset-session-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }.preset-list-card { align-items:start; flex-direction:column; }.preset-list-card .page-actions { width:100%; flex-wrap:wrap; } }
@media(max-width:500px) { .preset-fields,.preset-launch-fields { grid-template-columns:1fr; }.preset-group > summary { padding:12px; }.preset-group-body { padding:0 12px 12px; }.preset-actions .btn { flex:1 1 130px; }.preset-import-form { display:grid; grid-template-columns:minmax(0,1fr); }.preset-import-form small { min-width:0; }.preset-section-nav { gap:4px; }.preset-section-nav a { padding:8px; font-size:10px; } }
.champion-number {
  border: 1px solid var(--accent);
  border-left: 4px solid var(--accent);
  margin-block: 20px;
  padding: clamp(16px, 3vw, 28px);
  overflow-wrap: anywhere;
}
.champion-number h3 { margin-block: 8px 12px; }
.champion-number-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.champion-number-actions .btn { white-space: normal; }
/* Регламент: цвет раздела повторяется в навигации и карточке. */
.rules-page { --rules-orange:#ffa17a; --rules-cyan:#76dce5; --rules-green:#89dfa9; --rules-amber:#f2c96a; --rules-violet:#c3a5f2; --rules-pink:#f39dbb; --rules-blue:#90bdf3; }
[data-theme="light"] .rules-page { --rules-orange:#a8421d; --rules-cyan:#096e78; --rules-green:#216c42; --rules-amber:#825b12; --rules-violet:#7044a3; --rules-pink:#a7335d; --rules-blue:#2e609f; }
.rules-color-entry { --rule-color:var(--rules-orange); }
.rules-color-start { --rule-color:var(--rules-cyan); }
.rules-color-racing { --rule-color:var(--rules-green); }
.rules-color-flags { --rule-color:var(--rules-amber); }
.rules-color-qualifying { --rule-color:var(--rules-violet); }
.rules-color-conduct { --rule-color:var(--rules-pink); }
.rules-color-penalties { --rule-color:var(--rules-orange); }
.rules-chapter.rules-color-penalties { flex-basis:100%; }
.rules-color-protests { --rule-color:var(--rules-blue); }
.rules-hero { padding:clamp(22px,4vw,42px); margin-bottom:20px; border:1px solid color-mix(in srgb,var(--accent) 45%,var(--border)); border-top:4px solid var(--action); border-radius:18px; background:linear-gradient(115deg,color-mix(in srgb,var(--action) 13%,var(--surface)),var(--surface) 62%,color-mix(in srgb,var(--rules-cyan) 9%,var(--surface))); }
.rules-hero-top { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; }
.rules-hero .eyebrow { color:var(--accent); }
.rules-hero h2 { margin:24px 0 18px; font-size:clamp(30px,4vw,48px); line-height:1.15; }
.rules-hero h2 span { color:var(--accent); }
.rules-hero .intro-text { max-width:890px; margin:0; color:var(--text); font-size:15px; line-height:1.8; }
.rules-hero-tags { display:flex; flex-wrap:wrap; gap:8px; margin-top:24px; }
.rules-hero-tags span { padding:7px 11px; border:1px solid color-mix(in srgb,var(--accent) 32%,var(--border)); border-radius:6px; color:var(--accent); background:color-mix(in srgb,var(--action) 8%,var(--surface)); font-size:11px; font-weight:600; }
.rules-full-document { display:flex; align-items:center; gap:20px; border-color:color-mix(in srgb,var(--action) 50%,var(--border)); border-left:4px solid var(--action); background:linear-gradient(100deg,color-mix(in srgb,var(--action) 11%,var(--surface)),var(--surface)); }
.rules-full-document > div { flex:1; }
.rules-full-document .eyebrow { color:var(--accent); }
.rules-full-document h3 { margin:6px 0; font-size:22px; }
.rules-full-document p { margin:0; }
.rules-document-mark { display:grid; place-items:center; flex:none; width:48px; height:48px; border-radius:12px; color:var(--action-ink); background:var(--action); font-size:28px; }
.rules-section-label { margin:32px 0 14px; }
.rules-section-label h3 { margin:6px 0; }
.rules-toc { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:0 0 28px; }
.rules-toc a { display:flex; align-items:center; gap:12px; padding:14px; border:1px solid color-mix(in srgb,var(--rule-color) 28%,var(--border)); border-radius:10px; background:color-mix(in srgb,var(--rule-color) 8%,var(--surface)); color:var(--text); text-decoration:none; font-size:13px; line-height:1.45; font-weight:600; }
.rules-toc a:hover { border-color:var(--rule-color); background:color-mix(in srgb,var(--rule-color) 15%,var(--surface)); }
.rules-topic-number { color:var(--rule-color); font:600 19px var(--font-display); }
.rules-topic-arrow { color:var(--rule-color); margin-left:auto; }
.rules-chapter { display:flex; flex-direction:column; padding:24px; border-color:color-mix(in srgb,var(--rule-color) 32%,var(--border)); border-top:3px solid var(--rule-color); background:linear-gradient(160deg,color-mix(in srgb,var(--rule-color) 9%,var(--surface)),var(--surface) 65%); scroll-margin-top:100px; }
.rules-chapter-heading { display:flex; align-items:center; gap:14px; margin-bottom:8px; }
.rules-chapter-number { display:grid; place-items:center; flex:none; width:42px; height:42px; border:1px solid color-mix(in srgb,var(--rule-color) 35%,transparent); border-radius:10px; background:color-mix(in srgb,var(--rule-color) 13%,var(--surface)); color:var(--rule-color); font:600 22px var(--font-display); }
.rules-chapter-heading h3 { margin:0; font-size:21px; line-height:1.3; }
.rules-chapter ul { padding-left:19px; margin:8px 0 20px; }
.rules-chapter li { margin:10px 0; line-height:1.75; font-size:14px; }
.rules-chapter li::marker { color:var(--rule-color); }
.rules-chapter .rules-reference { padding-top:14px; border-top:1px solid color-mix(in srgb,var(--rule-color) 22%,var(--border)); margin:auto 0 0; font-size:12px; }
.rules-reference a { color:var(--rule-color); text-underline-offset:3px; }
.rules-reference-label { margin:0 0 9px; color:var(--muted); }
.rules-point-links { display:flex; flex-wrap:wrap; gap:4px; }
.rules-point-links a { display:inline-flex; align-items:center; justify-content:center; min-height:28px; padding:3px 7px; border:1px solid color-mix(in srgb,var(--rule-color) 35%,var(--border)); border-radius:5px; background:color-mix(in srgb,var(--rule-color) 8%,var(--surface)); font-size:12px; font-weight:600; text-decoration:none; }
.rules-point-links a:hover { background:color-mix(in srgb,var(--rule-color) 16%,var(--surface)); border-color:var(--rule-color); }
.rules-point-links a:focus-visible { outline:2px solid var(--rule-color); outline-offset:3px; }
/* Допуск: отдельный фон, читаемый статус и три отметки финишей. */
.season-signup-card { padding:clamp(18px,3vw,28px); margin:18px 0 24px; border:1px solid color-mix(in srgb,var(--action) 40%,var(--border)); border-top:4px solid var(--action); border-radius:16px; background:linear-gradient(115deg,color-mix(in srgb,var(--action) 8%,var(--surface)),var(--surface) 65%); }
.season-signup-card .eyebrow { color:var(--accent); }
.season-signup-card h3 { margin:6px 0 10px; }
.season-signup-card .page-actions { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
.season-my-entry { width:fit-content; max-width:100%; margin-top:8px; font-size:13px; }
.season-my-entry summary { cursor:pointer; padding:4px 0; color:var(--muted); font-weight:600; }
.season-my-entry summary.season-entry-approved { color:var(--green); }
.season-my-entry summary.season-entry-rejected { color:var(--red); }
.season-my-entry summary:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.season-my-entry dl { display:flex; flex-wrap:wrap; gap:8px 20px; margin:10px 0; }
.season-my-entry dt { color:var(--muted); }
.season-my-entry dd { margin:2px 0 0; overflow-wrap:anywhere; }
.season-entry-conditions { padding-left:20px; line-height:1.7; }
.admission-progress { margin:16px 0; padding:16px 18px; border:1px solid color-mix(in srgb,currentColor 50%,var(--border)); border-left:4px solid currentColor; border-radius:12px; background:linear-gradient(110deg,color-mix(in srgb,currentColor 11%,var(--surface)),color-mix(in srgb,currentColor 4%,var(--surface))); line-height:1.55; }
.admission-label { display:block; margin-bottom:6px; font-size:10px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; }
.admission-progress strong { display:block; }
.admission-progress p { color:var(--muted); font-size:13px; margin:6px 0 0; }
.admission-complete { color:#71df9c; }
.admission-incomplete { color:#ff9696; }
.admission-guest { color:#76dce5; }
[data-theme="light"] .admission-complete { color:#19834c; }
[data-theme="light"] .admission-incomplete { color:#b53232; }
[data-theme="light"] .admission-guest { color:#096e78; }
.admission-race-steps { display:flex; gap:8px; margin:12px 0; }
.admission-race-steps span { display:grid; place-items:center; width:34px; height:28px; border:1px solid color-mix(in srgb,currentColor 45%,var(--border)); border-radius:6px; color:var(--muted); background:var(--surface); font:600 12px var(--font-body); }
.admission-race-steps .is-complete { color:var(--action-ink); background:#71df9c; border-color:#71df9c; }
[data-theme="light"] .admission-race-steps .is-complete { color:#fff; background:#216c42; border-color:#216c42; }
.cabinet-season-option { min-width:0; }
@media(max-width:600px) {
  .rules-toc { grid-template-columns:1fr; }
  .rules-full-document { align-items:stretch; flex-direction:column; }
  .rules-document-mark { display:none; }
  .rules-hero h2 span { display:block; }
  .rules-chapter { padding:18px; }
  .rules-chapter-heading h3 { font-size:20px; }
  .season-signup-card .page-actions { flex-direction:column; align-items:stretch; }
  .admission-progress strong { overflow-wrap:anywhere; }
}

/* Настраиваемые баннеры сохраняют типографику ASPIRE HIGHER. */
.hero-event.hero-font-hero :is(h1,h2) { font:italic 800 clamp(36px,4.8vw,64px)/.98 var(--font-body); letter-spacing:-.055em; }
.hero-event.hero-font-body :is(h1,h2) { font-family:var(--font-body); }
.hero-event.hero-font-display :is(h1,h2) { font-family:var(--font-display); }
.hero-event.hero-layout-left .aspire-hero-art { grid-column:1; grid-row:1; }
.hero-event.hero-layout-left .aspire-hero-copy { grid-column:2; grid-row:1; padding:38px 36px; }
.hero-event.hero-layout-left .aspire-hero-art::before { background:linear-gradient(270deg,var(--hero-tone,#0c1013),transparent 25%); }
.hero-event.hero-layout-full .aspire-hero-art { position:absolute; inset:0; z-index:0; width:100%; height:100%; }
.hero-event.hero-layout-full .aspire-hero-art img { width:100%; height:100%; }
.hero-event.hero-layout-full { display:flex; flex-direction:column; align-items:stretch; }
.hero-event.hero-layout-full .aspire-hero-copy { flex:1; display:flex; flex-direction:column; justify-content:center; }
.hero-event.hero-layout-full .aspire-hero-art::before { background:linear-gradient(90deg,rgba(5,9,12,.94),rgba(5,9,12,.75) 50%,rgba(5,9,12,.4)); }
.hero-event.hero-layout-full .aspire-hero-copy { grid-column:1/-1; padding:38px 36px; max-width:800px; }
.hero-event.hero-layout-full .aspire-hero-foot { margin-top:auto; }
.hero-event.hero-fit-contain .aspire-hero-art img { object-fit:contain; }
.hero-event.hero-fit-cover .aspire-hero-art img { object-fit:cover; }
.hero-event.hero-position-left .aspire-hero-art img { object-position:left; }
.hero-event.hero-position-right .aspire-hero-art img { object-position:right; }
.hero-event.hero-position-top .aspire-hero-art img { object-position:top; }
.hero-event.hero-position-bottom .aspire-hero-art img { object-position:bottom; }
.hero-event .aspire-hero-copy p { max-width:600px; }
.banner-edit-form select { width:100%; padding:10px; background:var(--surface); color:var(--text); border:1px solid var(--border); border-radius:6px; }
@media(max-width:600px) {
.hero-event.hero-layout-left .aspire-hero-copy { grid-column:1; grid-row:1; padding:24px; }
.hero-event.hero-layout-left .aspire-hero-art { grid-column:1; grid-row:2; }
.hero-event.hero-layout-left .aspire-hero-art::before { background:linear-gradient(0deg,var(--hero-tone,#0c1013),transparent 25%); }
.hero-event.hero-layout-full .aspire-hero-copy { padding:24px; }
.hero-event.hero-font-hero :is(h1,h2) { font-size:38px; }
}
/* Редактор баннеров и переносы фирменного заголовка. */
.hero-event {container-type:inline-size;}
.hero-event .aspire-hero-copy :is(h1,h2) {font-size:min(var(--banner-heading-size,76px),14cqw); overflow-wrap:anywhere;}
.banner-title-line {display:block;}
.hero-event .aspire-hero-actions {flex-direction:row;justify-content:flex-start;align-items:center;column-gap:12px;row-gap:9px;}
.hero-event .aspire-hero-actions > .aspire-text-link {min-height:44px;align-self:center;}
.banner-admission {flex:0 0 100%;font:600 12px/1.5 Inter,sans-serif;min-width:0;}
.banner-admission.is-ready {color:#69e8a5;}
.banner-admission.is-pending {color:#ffb4a7;}
.banner-preview-shell {padding:16px;border:1px solid var(--border);border-radius:14px;background:var(--surface);margin:18px 0;container-type:inline-size;}
.banner-live-preview {max-width:100%;container-type:inline-size;}
.banner-live-preview .hero-event {min-height:380px;}
.banner-live-preview .hero-event :is(h1,h2) {font-size:min(var(--banner-heading-size,76px),14cqw);}
.banner-live-preview.is-mobile {max-width:390px;}
.banner-live-preview.is-mobile .hero-event :is(h1,h2) {font-size:clamp(28px,14cqw,calc(var(--banner-heading-size,76px)*.65));}
.banner-live-preview.is-mobile .aspire-hero-copy {padding:24px;}
.banner-live-preview.is-mobile .aspire-hero-art {width:100%;}
.banner-live-preview.is-mobile .hero-layout-full .aspire-hero-art {height:100%;}
.banner-live-preview .aspire-hero-actions {pointer-events:none;}
.hero-event .aspire-hero-art {overflow:hidden;min-height:260px;}
.hero-event .aspire-hero-art img,.hero-event .aspire-hero-art video {transform:translate(var(--banner-image-x,0%),var(--banner-image-y,0%)) scale(var(--banner-image-scale,1));transform-origin:center;}
.hero-event .aspire-hero-art video {position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;}
.hero-event .aspire-hero-art video.is-playing,.banner-live-preview .aspire-hero-art video {opacity:1;}
.hero-event.hero-fit-contain .aspire-hero-art video {object-fit:contain;}
.hero-event.hero-position-left .aspire-hero-art video {object-position:left;}
.hero-event.hero-position-right .aspire-hero-art video {object-position:right;}
.hero-event.hero-position-top .aspire-hero-art video {object-position:top;}
.hero-event.hero-position-bottom .aspire-hero-art video {object-position:bottom;}
.banner-live-preview .aspire-hero-art {cursor:grab;touch-action:none;}
.banner-live-preview .aspire-hero-art:active {cursor:grabbing;}
.banner-live-preview .aspire-hero-art img {pointer-events:none;user-select:none;}
.banner-edit-form input[type=range] {width:100%;accent-color:var(--action);}
.banner-edit-form output {font:12px var(--font-mono);color:var(--accent);}
.banner-video-options {padding:14px;border:1px solid var(--border);border-radius:8px;}
.banner-video-options summary {cursor:pointer;font-weight:600;}
.banner-order-actions {align-items:flex-end;flex-wrap:wrap;}
.banner-order-actions input {max-width:85px;}
.banner-edit-form {width:100%;min-width:0;grid-template-columns:minmax(0,1fr);}
.banner-edit-form .form-row {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr));}
.banner-edit-form .form-row > label {min-width:0;}
.banner-edit-form input[type=color] {height:44px;padding:4px;cursor:pointer;}
@media(max-width:600px) {.hero-event .aspire-hero-copy :is(h1,h2) {font-size:clamp(28px,14cqw,calc(var(--banner-heading-size,76px)*.65));}}
.admission-issues {display:grid;gap:16px;}
.admission-issue {padding:20px;border:1px solid #d4a744;border-left:5px solid #d4a744;border-radius:12px;}
.admission-issue.is-critical {border-color:#e56868;}
.season-format-options {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;border:0;padding:12px 0;}
.season-format-option {display:grid;grid-template-columns:auto 1fr;gap:8px;padding:18px;background:var(--surface);border:1px solid var(--border);border-radius:12px;cursor:pointer;}
.season-format-option:has(input:checked) {border-color:var(--accent);background:color-mix(in srgb,var(--accent) 9%,var(--surface));}
.season-format-option span {grid-column:1/-1;font-size:13px;color:var(--muted);line-height:1.6;}
.season-extra-settings {margin:20px 0;}
.standings-dual:has(>section:only-child) {grid-template-columns:1fr;}
@media(max-width:700px) {.season-format-options {grid-template-columns:1fr;}}
/* Кабинет: заметная подготовка и компактные разделы после её завершения. */
.cabinet-fold {padding:0;overflow:hidden;scroll-margin-top:24px;}
.cabinet-fold > summary {display:flex;align-items:center;gap:10px;padding:13px 16px;cursor:pointer;list-style:none;color:var(--text);font-weight:700;line-height:1.5;}
.cabinet-fold > summary::-webkit-details-marker {display:none;}
.cabinet-fold > summary::after {content:'⌄';margin-left:auto;color:var(--accent);font-size:20px;flex:none;}
.cabinet-fold[open] > summary::after {transform:rotate(180deg);}
.cabinet-fold > summary:focus-visible {outline:2px solid var(--accent);outline-offset:-3px;}
.cabinet-fold > summary > small {margin-left:auto;color:var(--muted);font-size:11px;font-weight:500;}
.cabinet-fold[open] > summary {border-bottom:1px solid var(--border);}
.cabinet-fold-body {padding:16px;min-width:0;}
.cabinet-readiness {margin:0;border:1px solid color-mix(in srgb,var(--action) 45%,var(--border));border-left:4px solid var(--action);border-radius:12px;background:var(--surface);}
.cabinet-readiness.needs-action {background:linear-gradient(120deg,color-mix(in srgb,var(--action) 16%,var(--surface)),var(--surface) 75%);}
.cabinet-readiness.needs-action > summary {color:var(--accent);}
.cabinet-readiness.is-complete { margin-top:12px; border:1px solid var(--border); border-radius:6px; }
.cabinet-readiness-status {display:flex;flex-wrap:wrap;gap:8px;margin-left:auto;}
.cabinet-readiness-status small {padding:4px 9px;border:1px solid color-mix(in srgb,var(--accent) 30%,var(--border));border-radius:20px;font-size:11px;font-weight:600;}
.cabinet-readiness .eyebrow {color:var(--accent);}
.cabinet-readiness .processing-consent {border-color:color-mix(in srgb,var(--action) 55%,var(--border));}
.cabinet-readiness .processing-consent a,.cabinet-rules-links a {color:var(--accent);text-underline-offset:3px;}
.cabinet-rules-notice {color:var(--text);}
.cabinet-rules-notice h3 {margin:8px 0;font-size:22px;}
.cabinet-rules-links {display:flex;flex-wrap:wrap;gap:12px;margin:16px 0;}
.cabinet-readiness .cabinet-onboarding {margin-bottom:0;}
.cabinet-readiness .onboarding-head {border-top:3px solid var(--action);background:color-mix(in srgb,var(--action) 9%,var(--surface));padding-bottom:16px;}
.cabinet-readiness .onboarding-next {background:color-mix(in srgb,var(--action) 6%,var(--surface));}
.cabinet-help-links {gap:8px;}
.cabinet-help-links > span {display:none;}
.cabinet-help-links a {display:inline-flex;align-items:center;min-height:38px;padding:8px 13px;border:1px solid color-mix(in srgb,var(--action) 45%,var(--border));border-radius:7px;background:color-mix(in srgb,var(--action) 9%,var(--surface));color:var(--accent);font-weight:700;text-decoration:none;}
.cabinet-help-links a:is(:hover,:focus-visible) {background:color-mix(in srgb,var(--action) 18%,var(--surface));border-color:var(--accent);}
@media(max-width:600px) {.cabinet-fold > summary {flex-wrap:wrap;padding:10px 12px;gap:6px;}.cabinet-fold > summary > small,.cabinet-readiness-status {margin-left:0;}.cabinet-fold > summary::after {margin-left:auto;}.cabinet-fold-body {padding:15px;}.cabinet-readiness-status {width:100%;order:2;}.cabinet-rules-notice h3 {font-size:19px;}}

/* Рабочая область баннеров: широкий просмотр, общая сетка и ровные действия. */
.banner-admin .banner-edit-form {max-width:none;gap:24px;}
.banner-admin .admin-section {overflow:clip;}
.banner-admin .admin-section[open] {border-color:color-mix(in srgb,var(--accent) 45%,var(--border));}
.banner-list-heading {display:flex;align-items:center;gap:16px;list-style:none;}
.banner-list-heading::-webkit-details-marker {display:none;}
.banner-list-heading::after {content:'＋';margin-left:auto;color:var(--accent);font-size:22px;}
details[open] > .banner-list-heading::after {content:'−';}
.banner-list-number {flex:none;color:var(--accent);font:600 18px var(--font-mono);}
.banner-list-heading img {width:88px;height:48px;object-fit:cover;border-radius:6px;border:1px solid var(--border);}
.banner-list-title {min-width:0;overflow-wrap:anywhere;font:600 20px var(--font-display);}
.banner-list-title small {display:block;margin-top:4px;font:400 11px var(--font-body);color:var(--muted);}
.banner-list-state {margin-left:auto;flex:none;font-size:11px;padding:5px 9px;border-radius:20px;background:var(--surface-3);color:var(--muted);}
.banner-list-state.is-visible {color:var(--green);background:var(--green-dim);}
.banner-preview-shell {margin:0;padding:0;overflow:hidden;border-radius:10px;background:var(--bg);width:100%;}
.banner-preview-toolbar {display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:16px 18px;border-bottom:1px solid var(--border);}
.banner-preview-toolbar strong {display:block;font-size:14px;margin-top:4px;}
.banner-eyebrow {display:block;font:600 10px/1.6 var(--font-body);letter-spacing:.12em;color:var(--accent);}
.banner-preview-tools {display:flex;align-items:end;gap:10px;}
.banner-preview-tools label {font-size:11px;display:grid;gap:4px;}
.banner-preview-tools select {min-width:140px;}
.banner-preview-stage {padding:16px;background:repeating-conic-gradient(var(--surface) 0% 25%,var(--surface-2) 0% 50%) 0 0/20px 20px;}
.banner-live-preview {width:100%;margin:auto;}
.banner-live-preview .hero-event {margin:0;grid-area:auto;}
.banner-live-preview.is-mobile {width:390px;max-width:100%;}
.banner-preview-hint {margin:0;padding:12px 18px;font-size:11px;line-height:1.65;color:var(--muted);border-top:1px solid var(--border);}
.banner-preview-dialog {width:calc(100vw - 32px);max-width:1440px;max-height:calc(100dvh - 32px);padding:0;border:1px solid var(--border);border-radius:12px;background:var(--bg);color:var(--text);overflow:auto;}
.banner-preview-dialog::backdrop {background:#000c;backdrop-filter:blur(6px);}
.banner-preview-dialog .banner-preview-shell {border:0;}
.banner-preview-dialog .banner-preview-toolbar {position:sticky;top:0;z-index:3;background:var(--surface);}
.banner-settings-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start;}
.banner-settings-card {display:grid;gap:16px;min-width:0;padding:22px;border:1px solid var(--border);border-radius:10px;background:var(--surface);}
.banner-settings-card h3 {display:flex;align-items:center;gap:10px;margin:0 0 4px;font:600 20px var(--font-display);}
.banner-settings-card h3 > span {font:500 11px var(--font-mono);color:var(--accent);padding:6px;border:1px solid var(--border);border-radius:5px;}
.banner-settings-card p {margin:0;font-size:11px;line-height:1.7;}
.banner-edit-form label,.video-library-form label {font-weight:500;line-height:1.6;}
.banner-edit-form small,.video-library-form small {font-size:11px;line-height:1.6;font-weight:400;}
.banner-edit-form .form-row {gap:14px;margin:0;grid-template-columns:repeat(2,minmax(0,1fr));}
.banner-admin :is(input:not([type=checkbox]):not([type=range]),select,textarea),.banner-preview-toolbar select {box-sizing:border-box;min-width:0;max-width:100%;width:100%;padding:10px 12px;border:1px solid var(--border);border-radius:6px;background:var(--bg);color:var(--text);font:400 13px/1.5 var(--font-body);}
.banner-admin :is(input:not([type=checkbox]):not([type=range]),select),.banner-preview-toolbar select {min-height:42px;}
.banner-admin input[type=color] {padding:5px;}
.banner-admin input[type=file] {font-size:11px;}
.banner-admin input[type=file]::file-selector-button {border:0;border-radius:4px;padding:6px 10px;margin-right:10px;background:var(--surface-3);color:var(--text);cursor:pointer;}
.banner-admin .btn:not(.banner-live-preview .btn),.banner-preview-toolbar .btn {display:inline-flex;align-items:center;justify-content:center;min-height:42px;line-height:1.4;padding:10px 16px;margin:0;width:auto;white-space:normal;text-align:center;}
.banner-admin [hidden],.banner-preview-dialog [hidden] {display:none!important;}
.banner-settings-card > .btn {justify-self:start;}
.banner-save-bar {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:18px;padding:18px;border:1px solid var(--border);border-radius:10px;background:var(--surface);}
.banner-save-bar > label:not(.checkbox-label) {max-width:280px;}
.banner-save-bar .checkbox-label,.video-library-form .checkbox-label {display:flex;align-items:center;gap:10px;}
.banner-save-bar input[type=checkbox],.video-library-form input[type=checkbox] {width:18px;height:18px;accent-color:var(--action);}
.banner-options {padding:18px;border:1px solid var(--border);border-radius:10px;background:var(--surface);align-items:end;}
.banner-options label {display:grid;gap:6px;font-size:12px;}
.banner-options input {max-width:140px;}
.banner-options small {flex:1 1 200px;align-self:center;}
.banner-order-actions {padding-top:18px;border-top:1px solid var(--border);gap:10px;align-items:end;}
.banner-order-actions > strong {width:100%;font-size:12px;color:var(--muted);}
.banner-order-actions form {display:flex;align-items:end;gap:8px;margin:0;}
.banner-order-actions label {display:grid;gap:4px;font-size:11px;}
.banner-order-actions form:last-child:has(.btn-danger-ghost) {margin-left:auto;}
.banner-video-options {display:grid;gap:12px;}
.banner-video-options > label {margin-top:12px;}
.banner-video-options > .btn {margin-top:14px;}
.video-library-form {display:grid;gap:20px;}.video-library-form > .btn {justify-self:start;}
.video-library-form label {display:grid;gap:7px;min-width:0;font-size:12px;}
.league-video-preference {display:flex;justify-content:flex-end;margin:-4px 0 22px;}
.league-video-preference .btn {font:500 11px var(--font-body);padding:8px 12px;}
.league-videos {padding:28px;margin-bottom:28px;border:1px solid var(--border);border-radius:12px;background:linear-gradient(115deg,var(--accent-dim),var(--surface) 55%);}
.league-videos-head {display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:22px;}
.league-videos h2 {margin:4px 0;font:600 30px var(--font-display);}.league-videos-head p {margin:6px 0;color:var(--muted);font-size:13px;}.league-videos-head > span {font-size:11px;}
.league-video-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start;}
.league-video-card {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:center;padding:22px;border:1px solid var(--border);border-radius:9px;background:var(--surface);}
.league-video-card h3 {margin:4px 0;font:600 23px var(--font-display);}.league-video-card .muted {font:11px var(--font-mono);}
.league-video-card video {grid-column:1/-1;width:100%;aspect-ratio:16/9;border-radius:6px;background:#000;}.league-video-card video[hidden] {display:none;}
.league-video-state {grid-column:1/-1;margin:0;font-size:12px;color:var(--muted);}.league-video-state:empty {display:none;}
/* Явные ячейки исключают перенос картинки отдельной строкой при смене компоновки. */
.hero-track,.banner-live-preview {container:banner-frame / inline-size;}
.hero-event.aspire-hero {display:grid;grid-template-columns:minmax(0,calc(100% - var(--banner-image-width,57%))) minmax(0,var(--banner-image-width,57%));grid-template-rows:minmax(0,1fr) auto;min-height:var(--banner-height,420px);align-items:stretch;}
.hero-event.aspire-hero > .aspire-hero-copy {grid-column:1;grid-row:1;min-width:0;width:auto;padding:36px;align-self:center;}
.hero-event.aspire-hero > .aspire-hero-art {grid-column:2;grid-row:1;position:relative;inset:auto;width:auto;height:auto;aspect-ratio:auto;min-width:0;order:0;}
.hero-event.aspire-hero > .aspire-hero-art :is(img,video) {position:absolute;inset:0;width:100%;height:100%;}
.hero-event.aspire-hero > .aspire-hero-foot {grid-column:1/-1;grid-row:2;min-width:0;position:relative;z-index:2;background:var(--banner-footer-color,#05090c);color:var(--banner-footer-ink,#ffffff);}
.hero-event.aspire-hero.hero-layout-left {grid-template-columns:minmax(0,var(--banner-image-width,57%)) minmax(0,calc(100% - var(--banner-image-width,57%)));}
.hero-event.aspire-hero.hero-layout-left > .aspire-hero-copy {grid-column:2;grid-row:1;}
.hero-event.aspire-hero.hero-layout-left > .aspire-hero-art {grid-column:1;grid-row:1;}
.hero-event.aspire-hero.hero-layout-full {grid-template-columns:minmax(0,1fr);}
.hero-event.aspire-hero.hero-layout-full > .aspire-hero-copy {grid-column:1;grid-row:1;max-width:800px;}
.hero-event.aspire-hero.hero-layout-full > .aspire-hero-art {grid-area:auto;position:absolute;inset:0;width:100%;height:100%;z-index:0;}
.hero-event.aspire-hero:not(:has(.aspire-hero-art)) > .aspire-hero-copy {grid-column:1/-1;}
.hero-event.aspire-hero > .aspire-hero-art::before {opacity:var(--banner-overlay,1);}
.hero-event.aspire-hero.hero-background-transparent {background:transparent;}
@container banner-frame (max-width:600px) {
  .hero-event.aspire-hero > .aspire-hero-copy {padding:24px;}
  .hero-event.aspire-hero.hero-mobile-stack:not(.hero-layout-full) > .aspire-hero-copy {grid-column:1/-1;grid-row:1;}
  .hero-event.aspire-hero.hero-mobile-stack:not(.hero-layout-full) > .aspire-hero-art {grid-column:1/-1;grid-row:2;min-height:0;aspect-ratio:var(--banner-image-ratio,1.7778);}
  .hero-event.aspire-hero.hero-mobile-stack:not(.hero-layout-full) > .aspire-hero-foot {grid-row:3;}
  .hero-event.aspire-hero.hero-mobile-stack:not(.hero-layout-full) > .aspire-hero-art::before {background:linear-gradient(0deg,var(--hero-tone,#0c1013),transparent 25%);}
  .hero-event.aspire-hero.hero-mobile-side > .aspire-hero-copy {padding:16px;}
  .hero-event.aspire-hero.hero-mobile-side > .aspire-hero-copy :is(h1,h2) {font-size:min(var(--banner-heading-size,76px),8cqw);}
}
@media(max-width:800px) {.banner-settings-grid,.league-video-grid {grid-template-columns:minmax(0,1fr);}.banner-settings-card {padding:16px;}.banner-save-bar > .btn {width:100%;}.league-videos-head {align-items:start;flex-direction:column;gap:8px;}.banner-preview-toolbar {padding:12px;}.banner-preview-stage {padding:8px;}}
@media(max-width:500px) {.banner-list-heading {gap:9px;}.banner-list-heading img {width:52px;height:38px;}.banner-list-title {font-size:16px;}.banner-list-state {font-size:9px;padding:4px 6px;}.banner-preview-tools {width:100%;}.banner-preview-tools label {flex:1;}.banner-preview-toolbar select {min-width:0;}.banner-settings-card .form-row {grid-template-columns:minmax(0,1fr);}.banner-options {gap:14px;}.banner-options small {flex-basis:100%;}.banner-order-actions form:last-child:has(.btn-danger-ghost) {margin-left:0;}.league-videos {padding:18px;}.league-video-card {padding:16px;}.banner-save-bar {padding:14px;}}

/* Библиотека недель и пошаговая подготовка пресетов. */
.schedule-library {margin:20px 0;display:grid;gap:10px;}
.schedule-month {border:1px solid var(--border);border-radius:8px;background:var(--surface);}
.schedule-month > summary {display:flex;justify-content:space-between;gap:16px;padding:12px 16px;cursor:pointer;list-style:revert;}
.schedule-month > summary::after {content:'＋';}.schedule-month[open] > summary::after {content:'−';}
.schedule-month .schedule-week-list {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr));gap:8px;padding:0 12px 12px;margin:0;}
.schedule-month .schedule-week-card {display:grid;gap:4px;padding:10px 12px;min-width:0;overflow-wrap:anywhere;}
.schedule-week-state {font-size:11px;color:var(--accent);}
.schedule-preset-checklist {list-style:none;padding:0;margin:0;display:grid;gap:6px;}
.schedule-preset-checklist li {display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--border);}
.schedule-preset-checklist li > span {display:grid;gap:4px;min-width:0;overflow-wrap:anywhere;}
.schedule-preset-checklist .btn {flex-shrink:0;}
.week-schedule-form .days-grid {display:grid;grid-template-columns:minmax(0,1fr);gap:8px;}
.week-schedule-form .day-block {margin:0;}.week-schedule-form .day-block > summary {padding:12px 16px;}
.week-schedule-form .race-editor {margin:8px 0;}.week-schedule-form .form-row {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(160px,100%),1fr));gap:12px;}
.week-schedule-form input:required:user-invalid {border-color:var(--danger,#ff6b6b);}
.preset-actions {position:sticky;bottom:0;z-index:5;background:var(--surface);padding:14px;border:1px solid var(--border);border-radius:8px;}
/* На узком экране медиа получает собственную область, в том числе у фонового баннера. */
@container banner-frame (max-width:600px) {
  .hero-event.aspire-hero {min-height:0;grid-template-rows:auto auto auto;}
  .hero-event.aspire-hero.hero-mobile-stack {grid-template-columns:minmax(0,1fr);}
  .hero-event.aspire-hero.hero-mobile-stack > .aspire-hero-copy {grid-column:1;grid-row:1;max-width:none;padding:22px;}
  .hero-event.aspire-hero.hero-mobile-stack > .aspire-hero-art {position:relative;inset:auto;grid-column:1;grid-row:2;width:100%;height:auto;min-height:0;aspect-ratio:var(--banner-image-ratio,1.7778);max-height:420px;z-index:0;}
  .hero-event.aspire-hero.hero-mobile-stack > .aspire-hero-foot {grid-column:1;grid-row:3;}
  .hero-event.aspire-hero.hero-mobile-stack > .aspire-hero-art::before {background:linear-gradient(0deg,var(--hero-tone,#0c1013),transparent 15%);}
  .hero-event.aspire-hero.hero-mobile-side {grid-template-columns:minmax(0,calc(100% - var(--banner-image-width,57%))) minmax(0,var(--banner-image-width,57%));grid-template-rows:auto auto;}
  .hero-event.aspire-hero.hero-mobile-side > .aspire-hero-copy {grid-column:1;grid-row:1;padding:14px;}
  .hero-event.aspire-hero.hero-mobile-side > .aspire-hero-art {position:relative;inset:auto;grid-column:2;grid-row:1;width:100%;height:auto;min-height:0;align-self:center;aspect-ratio:var(--banner-image-ratio,1.7778);}
  .hero-event.aspire-hero.hero-mobile-side > .aspire-hero-foot {grid-column:1/-1;grid-row:2;}
  .hero-event.aspire-hero.hero-mobile-side.hero-layout-left > .aspire-hero-copy {grid-column:2;}
  .hero-event.aspire-hero.hero-mobile-side.hero-layout-left > .aspire-hero-art {grid-column:1;}
  .hero-event.aspire-hero.hero-mobile-side.hero-layout-left {grid-template-columns:minmax(0,var(--banner-image-width,57%)) minmax(0,calc(100% - var(--banner-image-width,57%)));}
}
@media(max-width:600px) {.schedule-preset-checklist li {align-items:start;flex-direction:column;}.schedule-month .schedule-week-list {grid-template-columns:minmax(0,1fr);}.week-toolbar {flex-wrap:wrap;}}

/* Гайдлайн использует те же цветовые разделы и карточки, что и регламент. */
.rules-topic-number {flex:0 0 30px;min-width:30px;white-space:nowrap;font-variant-numeric:tabular-nums;text-align:center;line-height:1.2;}
.rules-topic-arrow {flex-shrink:0;}.rules-toc a > span:nth-child(2) {min-width:0;}
.rules-chapter-number {white-space:nowrap;font-variant-numeric:tabular-nums;line-height:1;}
.rules-chapter-heading {align-items:flex-start;}.rules-chapter-heading h3 {min-width:0;align-self:center;}
.pilot-guide-page .guide-document-actions {display:flex;flex-wrap:wrap;align-items:center;gap:14px;margin-top:24px;padding-top:22px;border-top:1px solid color-mix(in srgb,var(--accent) 24%,var(--border));}
.pilot-guide-page .guide-document-actions .btn {display:inline-flex;align-items:center;justify-content:center;min-height:46px;margin:0;padding:12px 18px;line-height:1.4;white-space:normal;}
.pilot-guide-page .guide-document-actions .btn-ghost {border-color:var(--rules-cyan);color:var(--rules-cyan);background:color-mix(in srgb,var(--rules-cyan) 9%,var(--surface));}
.guide-section-body {line-height:1.75;}.guide-section-body > p:first-child {margin-top:8px;}
.guide-section-body p {margin-bottom:18px;}.guide-section .rules-reference {margin-top:auto;}
.pilot-guide-page .guide-section {flex-basis:calc(50% - 7px);}
.pilot-guide-page #guide-4,.pilot-guide-page .guide-section:has(.guide-table-wrap) {flex-basis:100%;}

/* Явное ознакомление перед заявкой; без JS поля остаются внутри формы. */
.season-documents-fields { margin:18px 0; padding:0; border:0; min-width:0; }
.season-documents-fields legend { padding:0; font-weight:700; }
.season-document-check { display:flex; align-items:flex-start; gap:12px; margin:12px 0; padding:14px; border:1px solid var(--border); border-radius:10px; background:var(--surface); line-height:1.6; cursor:pointer; }
.season-document-check input[type="checkbox"] { flex:0 0 20px; width:20px; height:20px; min-height:0; margin:3px 0 0; accent-color:var(--action); }
.season-document-check:has(input:checked) { border-color:var(--accent); background:color-mix(in srgb,var(--action) 9%,var(--surface)); }
.season-document-check:has(input:focus-visible) { outline:2px solid var(--accent); outline-offset:3px; }
.season-document-check a { text-underline-offset:3px; }
.season-documents-dialog { box-sizing:border-box; width:min(600px,calc(100% - 24px)); max-height:calc(100dvh - 32px); padding:clamp(18px,4vw,30px); color:var(--text); background:var(--surface); border:1px solid var(--border); border-top:4px solid var(--action); border-radius:16px; overflow:auto; }
.season-documents-dialog::backdrop { background:rgb(0 0 0 / 72%); }
.season-documents-dialog h3 { margin:10px 0 20px; font-size:26px; }
.season-documents-dialog .eyebrow { color:var(--accent); }
.season-documents-dialog .page-actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:24px; }
.season-documents-dialog .page-actions .btn { flex:1 1 210px; white-space:normal; }
@media (max-width:620px) {
  .rules-outline > .rules-panel,.pilot-guide-page .guide-section { flex-basis:100%; }
}
.guide-table-wrap {max-width:100%;overflow-x:auto;}.guide-penalties {width:100%;min-width:0;table-layout:fixed;}
.guide-penalties caption {text-align:left;padding:12px 0;color:var(--muted);font-size:12px;}
.guide-penalties :is(th,td) {white-space:normal;overflow-wrap:anywhere;vertical-align:top;text-align:left;padding:12px;line-height:1.6;}
.guide-penalties thead th {color:var(--rule-color);background:color-mix(in srgb,var(--rule-color) 12%,var(--surface));}
.guide-penalties tbody th {font-weight:600;width:42%;}
@media(max-width:600px) {.pilot-guide-page .guide-document-actions {gap:12px;margin-top:22px;padding-top:20px;}.pilot-guide-page .guide-document-actions .btn {width:100%;box-sizing:border-box;}.guide-penalties :is(th,td) {padding:8px;font-size:12px;}.pilot-guide-page > .page-actions {display:flex;flex-wrap:wrap;gap:12px;margin-top:24px;}}

/* Экипажи, подготовка сервера и разбор протестов. */
.sport-form {display:grid;gap:16px;max-width:780px}
.sport-form label,.sport-form-grid label {display:flex;flex-direction:column;gap:7px;min-width:0}
.sport-form input:not([type=checkbox]),.sport-form textarea,.sport-form select,.sport-form-grid input:not([type=checkbox]),.sport-form-grid select {width:100%;max-width:100%;box-sizing:border-box}
.sport-form textarea {resize:vertical;min-height:76px}
.sport-form-grid,.sport-detail-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start}
.sport-detail-grid>.card {min-width:0}
.sport-check {flex-direction:row!important;align-items:center;gap:10px!important;line-height:1.5}
.sport-check input {flex:0 0 auto}
.sport-actions {display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:16px 0}
.sport-actions .btn {white-space:normal;text-align:center;max-width:100%}
.sport-table-scroll {max-width:100%;overflow-x:auto;margin:18px 0}
.sport-table-scroll table {min-width:600px;width:100%}
.entry-list-issues {margin:0;padding-inline-start:1.2em;text-align:start;color:var(--red)}
.entry-list-selection-error[hidden] {display:none}
.sport-form-grid input,.sport-form-grid select {min-width:0}
.sport-options {min-width:0;margin:16px 0;padding:14px;border:1px solid var(--border);border-radius:10px}
.sport-options legend {max-width:100%;overflow-wrap:anywhere;padding:0 6px}
.sport-list {display:grid;gap:14px}
.sport-list a.card {display:block;color:inherit;text-decoration:none;overflow-wrap:anywhere}
.sport-case-row {display:flex!important;gap:16px;justify-content:space-between;align-items:center}
.sport-case-row>div {min-width:0}
.sport-notice {border-left:3px solid var(--accent,#fa6538);padding:16px;overflow-wrap:anywhere}
.sport-prewrap {white-space:pre-wrap;overflow-wrap:anywhere}
.sport-message {padding:12px 0;border-bottom:1px solid var(--border)}
.sport-message small {display:block}
@media(max-width:700px){.sport-form-grid,.sport-detail-grid{grid-template-columns:1fr}.sport-case-row{align-items:flex-start;flex-direction:column}.sport-form .btn{width:100%;white-space:normal}.sport-options{padding:10px}}

.crew-roster-fieldset .sport-table-scroll table {min-width:0;table-layout:fixed}
.crew-roster-fieldset .sport-table-scroll th:first-child {width:64px}
.crew-roster-fieldset .sport-table-scroll td {overflow-wrap:anywhere}

.sport-page-head{gap:16px;flex-wrap:wrap}.sport-page-head>div{min-width:0}
.sport-page-head h2,.sport-heading,.sport-detail-grid>.card{overflow-wrap:anywhere}

/* Одна заметная область администрирования протокола. */
.race-admin-editor{margin-top:32px;padding:clamp(14px,3vw,24px);border:1px solid var(--border);border-top:3px solid var(--accent);border-radius:12px;background:color-mix(in srgb,var(--accent) 5%,var(--surface))}
.race-admin-editor>header h3{margin:5px 0;font-size:22px}.race-admin-editor>header p{margin:6px 0 18px}.race-admin-editor .eyebrow{color:var(--accent)}
.start-grid-list{list-style:none;padding:0;margin:18px 0;display:grid;gap:8px}
.start-grid-row{display:grid;grid-template-columns:32px minmax(0,1fr) 78px 62px 72px;align-items:center;gap:14px;padding:12px;border:1px solid var(--border);border-radius:9px;background:var(--surface);transition:background-color .14s,border-color .14s}
.start-grid-row.is-dragging{opacity:.35;border-style:dashed;pointer-events:none}
.start-grid-ghost{position:fixed;top:0;left:0;z-index:10000;box-sizing:border-box;margin:0;pointer-events:none;opacity:1;border-color:var(--accent);background:color-mix(in srgb,var(--accent) 12%,var(--surface));box-shadow:0 12px 32px #0005;will-change:transform;transition:none}
.start-grid-handle,.start-grid-move button{min-width:30px;min-height:34px;padding:4px;background:var(--surface-alt);border:1px solid var(--border);border-radius:6px;color:var(--text);font-size:18px}
.start-grid-handle{touch-action:none;cursor:grab;user-select:none}.start-grid-handle:active{cursor:grabbing}
.start-grid-move{display:flex;gap:5px}.start-grid-move button:disabled{opacity:.35}
.start-grid-list button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.start-grid-position,.start-grid-finish{display:grid;gap:6px;min-width:0;margin:0}.start-grid-position small,.start-grid-finish small{font-size:11px;color:var(--muted);line-height:1.2}
.start-grid-position .penalty-input{width:100%;height:38px;box-sizing:border-box;min-width:0;font-size:16px}.start-grid-finish strong{display:flex;align-items:center;min-height:38px;font-size:21px;font-variant-numeric:tabular-nums}
.start-grid-pilot{display:flex;align-items:center;gap:14px;min-width:0;overflow-wrap:anywhere}.start-grid-number{font-size:28px;font-weight:800;font-variant-numeric:tabular-nums;flex:0 0 auto;min-width:38px;text-align:center}
.start-grid-identity{display:flex;align-items:center;flex-wrap:wrap;gap:7px 12px;min-width:0}.start-grid-identity strong{font-size:16px;line-height:1.4}
.start-grid-reset{padding:4px 7px;min-height:28px;border:1px solid var(--border);border-radius:5px;background:var(--surface-alt);color:var(--muted);font:inherit;font-size:11px;cursor:pointer}
.start-grid-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin:16px 0}.start-grid-toolbar>span{flex:1 1 260px;font-size:12px;line-height:1.5}.start-grid-toolbar .btn{white-space:normal}
.weather-library{padding:14px;margin-bottom:18px;border:1px solid var(--border);border-radius:9px;background:var(--surface)}
.weather-library .sport-actions{align-items:flex-end}.weather-library select{flex:1 1 220px;min-width:0;max-width:100%}.weather-library label{min-width:0;display:grid;gap:6px;flex:1 1 220px}
.weather-library input,.weather-library select{box-sizing:border-box;min-height:42px;padding:9px 10px;color:var(--text);background:var(--surface-alt);border:1px solid var(--border);border-radius:6px;font:inherit}
.weather-library input{width:100%;min-width:0}.weather-library [data-weather-status]{overflow-wrap:anywhere}
@media(max-width:620px){.start-grid-row{grid-template-columns:26px 62px minmax(0,1fr) 62px;gap:8px;padding:8px}.start-grid-handle{grid-column:1;grid-row:1/3;min-width:26px}.start-grid-pilot{grid-column:2/-1;gap:10px}.start-grid-position{grid-column:2}.start-grid-finish{grid-column:3}.start-grid-move{grid-column:4;gap:4px;align-self:end;padding-bottom:2px}.start-grid-move button{min-width:29px}.start-grid-number{font-size:26px}.start-grid-identity strong{font-size:15px}.start-grid-toolbar .btn{width:100%}}
@media(max-width:500px){.weather-library .btn{width:100%}}
@media(prefers-reduced-motion:reduce){.start-grid-row{transition:none}}

.protest-callout{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:18px;margin:20px 0 26px;padding:20px;border:1px solid #cf4d58;border-left:4px solid #cf4d58;border-radius:10px;background:color-mix(in srgb,#cf4d58 7%,var(--surface))}
.protest-callout>div{flex:1 1 290px;min-width:0}.protest-callout h3{margin:0 0 7px;font-size:22px}.protest-callout p{margin:0;color:var(--muted);font-size:13px;line-height:1.6;overflow-wrap:anywhere}
.protest-callout .protest-submit{background:#b82735;color:#fff;border:1px solid #e16c76;padding:13px 22px;font-size:15px;text-align:center;white-space:normal}.protest-callout .protest-submit:hover{background:#9e202c}
.protest-deadline{padding:16px 0;line-height:1.7}.protest-deadline-settings{margin:16px 0 22px}.protest-deadline-settings .sport-form{margin-top:18px}
.result-overview-heading{align-items:flex-start}.result-actions{display:grid;justify-items:end;gap:7px;margin-left:auto;min-width:0;max-width:100%}.result-actions .result-personal-actions{justify-content:flex-end}.result-actions .result-protest-action{background:#b82735;color:#fff;border:1px solid #e16c76;font-size:11px;padding:7px 12px;min-height:32px;white-space:normal;text-align:center}.result-actions .result-protest-action:hover{background:#9e202c}.result-actions .my-analysis-button{color:#d3bbff;border-color:#9671bd;background:color-mix(in srgb,#9671bd 12%,var(--surface))}.result-actions .find-me-button{color:#a0d8ff;border-color:#4f97bf}html[data-theme="light"] .result-actions .my-analysis-button{color:#64328b}html[data-theme="light"] .result-actions .find-me-button{color:#155c89}
.session-participation{padding:14px 18px;margin:18px 0}.session-participation>summary{cursor:pointer;font-weight:600}.session-participation-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:8px;margin:16px 0}.session-participation-list label{display:flex;gap:10px;padding:10px;border:1px solid var(--border);border-radius:6px;background:var(--surface);overflow-wrap:anywhere;line-height:1.5}.session-participation .field-hint{font-size:12px}
.acc-penalty-summary{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0 18px}.acc-penalty-summary>div{padding:10px 14px;border:1px solid var(--border);border-radius:6px;background:var(--surface)}.acc-penalty-summary dt{font-size:11px;color:var(--muted)}.acc-penalty-summary dd{margin:6px 0 0;font-size:21px;font-weight:700;font-variant-numeric:tabular-nums}
.neutralization-candidates{margin:16px;padding:16px;border:1px solid #c9a230;border-left:4px solid #c9a230;border-radius:6px;background:repeating-linear-gradient(135deg,transparent,transparent 8px,#c9a23012 8px,#c9a23012 12px),var(--surface);font-size:13px;line-height:1.6;overflow-wrap:anywhere}.neutralization-candidates>p{margin:8px 0}.neutralization-candidates>small{color:var(--muted)}
.neutralization-editor{margin:16px;padding:14px 16px}.neutralization-editor>summary{cursor:pointer;font-weight:600}.neutralization-editor .field-hint{font-size:12px;line-height:1.6;color:var(--muted)}.neutralization-row{display:grid;grid-template-columns:minmax(140px,175px) 86px 86px minmax(140px,1fr) auto;gap:10px;align-items:end;padding:12px 0;border-bottom:1px solid var(--border)}.neutralization-row label{min-width:0;display:flex;flex-direction:column;gap:6px;font-size:12px}.neutralization-row :is(input,select){width:100%;min-width:0;box-sizing:border-box;min-height:40px;border:1px solid var(--border);border-radius:6px;padding:8px;background:var(--surface);color:var(--text);font:inherit}.neutralization-row .neutralization-note>span{display:inline;font-size:10px}.neutralization-row .btn{min-height:40px;font-size:12px}.neutralization-editor-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}.neutralization-editor-actions .btn{white-space:normal}.neutralization-candidates .btn{font-size:11px;min-height:34px;margin:4px 0 4px 8px;padding:5px 9px}.neutralization-periods{display:flex;flex-wrap:wrap;gap:10px;list-style:none;padding:0;margin:16px}.neutralization-period{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:6px 12px;padding:10px 14px;border:1px solid #b39031;border-radius:6px;background:color-mix(in srgb,#c9a230 9%,var(--surface));font-size:12px}.neutralization-period strong{font:700 13px var(--font-mono)}.neutralization-period.is-vsc{border-style:dashed}.neutralization-period small{grid-column:1/-1;color:var(--muted);overflow-wrap:anywhere;max-width:60ch}.neutralization-key{display:inline-block;width:24px;height:14px;flex:none;vertical-align:middle;border:1px solid #c9a230;border-radius:2px}.neutralization-key.is-sc{background:repeating-linear-gradient(135deg,#352b10,#352b10 5px,#79601e 5px,#79601e 8px)}.neutralization-key.is-vsc{background:repeating-linear-gradient(45deg,#d7ad4215,#d7ad4215 5px,#d7ad4260 5px,#d7ad4260 8px);border-style:dashed}.story-neutralization-band{stroke:#c9a230;stroke-width:1;vector-effect:non-scaling-stroke}.story-neutralization.is-vsc .story-neutralization-band{stroke-dasharray:4 3}.story-neutralization-label-bg{fill:#352b10;stroke:#ecc44c;stroke-width:1}.story-neutralization-label{font:700 11px var(--font-mono);fill:#ffe295}.story-neutralization.is-vsc .story-neutralization-label-bg{fill:#fff0b2;stroke-dasharray:3 2}.story-neutralization.is-vsc .story-neutralization-label{fill:#473800}
@media(max-width:820px){.neutralization-row{grid-template-columns:minmax(0,1fr) 90px 90px}.neutralization-note{grid-column:1/3}.neutralization-row>[data-neutralization-remove]{grid-column:3}}
@media(max-width:600px){.result-actions{width:100%}.result-actions .result-protest-action{min-height:40px}.session-participation{padding:12px}.session-participation .btn{max-width:100%;white-space:normal}.neutralization-editor{margin:12px;padding:12px}.neutralization-periods{margin:12px}.neutralization-row{grid-template-columns:repeat(2,minmax(0,1fr))}.neutralization-row>label:first-child,.neutralization-row>.neutralization-note{grid-column:1/-1}.neutralization-row>[data-neutralization-remove]{grid-column:2}.neutralization-candidates .btn{margin-left:0}}
.neutralization-row [aria-invalid="true"] { border-color: var(--red); }
.neutralization-editor .field-error[hidden] { display: none; }
/* Протесты используют общие поверхности, шрифты и поля сайта. */
.site-header .header-admin-tools{flex-basis:100%;justify-content:flex-end;margin:0;padding:8px 0 0;border-top:1px solid var(--border);gap:8px;flex-wrap:wrap;order:4}
.site-header .tabs .header-admin-tools{flex:0 0 auto;align-self:stretch;align-items:stretch;justify-content:flex-end;margin:0 0 0 auto;padding:0;border:0;gap:4px;flex-wrap:nowrap;order:0}
.site-header .tabs:has(.header-admin-tools){flex-wrap:nowrap;overflow-x:auto;align-items:stretch}
.site-header .tabs .tab{flex-shrink:0}
.site-header .tabs .account-tab { margin-inline-start:auto; display:inline-flex; align-items:center; justify-content:center; gap:7px; white-space:nowrap; }
.site-header .tabs .header-admin-tools + .account-tab { margin-inline-start:0; }
.account-tab-avatar { width:24px; height:24px; flex:none; border-radius:50%; object-fit:cover; }
.account-tab-initial { display:grid; place-items:center; background:var(--surface-alt); border:1px solid var(--border); color:var(--text); }
.warning-author { display:block; margin-top:4px; overflow-wrap:anywhere; }
.admin-pilot-card-select { max-width:min(260px, 70vw); }
.site-header .tabs .header-admin-tools>a{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:5px;height:100%;min-height:44px;white-space:nowrap;padding:8px;font-size:12px;line-height:1.4;border-radius:4px}
.site-header .tabs .header-admin-link.role-color-red{color:#fca5a5;border-color:#bd5961}.site-header .tabs .header-admin-link.role-color-yellow{color:#fde047;border-color:#aa8c23}.site-header .tabs .header-admin-link.role-color-green{color:#86efac;border-color:#348354}
html[data-theme=light] .tabs .header-admin-link.role-color-red{color:#a52634}html[data-theme=light] .tabs .header-admin-link.role-color-yellow{color:#735600}html[data-theme=light] .tabs .header-admin-link.role-color-green{color:#17633b}
.protest-archive-result{margin-top:14px;padding:12px;border:1px solid var(--border);border-radius:6px;background:var(--surface-alt);font-size:13px}.protest-archive-result>p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}
@media(max-width:700px){.site-header .tabs:has(.header-admin-tools){flex-wrap:wrap;overflow-x:visible}.site-header .tabs .header-admin-tools{margin-left:0;flex-wrap:wrap}.site-header .tabs .header-admin-tools>a{height:40px;min-height:40px}}
.header-admin-tools a{display:inline-flex;align-items:center;gap:7px;padding:7px 10px;border:1px solid var(--border);border-radius:5px;text-decoration:none;color:var(--text);font-size:12px;line-height:1.4;background:var(--surface)}
.header-admin-tools .admin-queue-icon{color:var(--queue-color);border-color:color-mix(in srgb,var(--queue-color) 55%,var(--border));background:color-mix(in srgb,var(--queue-color) 7%,var(--surface))}.header-admin-tools [data-admin-count]{font-weight:800;font-variant-numeric:tabular-nums;color:var(--queue-color)}
.admin-nav-link[class*=queue-] .admin-request-count,.admin-card[class*=queue-] .admin-request-count{color:var(--queue-color);border-color:var(--queue-color);background:color-mix(in srgb,var(--queue-color) 12%,var(--surface))}
.admin-nav-link[class*=queue-]{border-left:2px solid var(--queue-color,var(--border))}
.admin-queue-dashboard{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:24px}.admin-queue-dashboard>a{flex:1 1 190px;margin:0;border-left:3px solid var(--queue-color);color:var(--queue-color)}.admin-queue-dashboard .admin-request-count{color:var(--queue-color);border-color:var(--queue-color);background:color-mix(in srgb,var(--queue-color) 10%,var(--surface))}
.protest-page .protest-filters{display:flex;align-items:flex-end;flex-wrap:wrap;gap:8px;padding:12px}.protest-filters label{display:grid;gap:4px;font-size:11px;flex:1 1 125px;min-width:0;margin:0}.protest-filters input,.protest-filters select{width:100%;min-width:0;box-sizing:border-box;min-height:34px!important;padding:6px 8px!important;font-size:12px!important}.protest-filters .sport-actions{margin:0;gap:6px}.protest-filters .btn{font-size:12px;padding:8px}
.protest-state-submitted{--case-color:#e26672}.protest-state-reviewing{--case-color:#469be1}.protest-state-materials{--case-color:#d6a63c}.protest-state-proposed{--case-color:#ad8bec}.protest-state-approved,.protest-state-revoking{--case-color:#e3994f}.protest-state-published{--case-color:#52ac88}.protest-state-revoked{--case-color:var(--muted)}
.protest-page .sport-case-row{border-left:4px solid var(--case-color);background:color-mix(in srgb,var(--case-color) 6%,var(--surface));padding:14px 18px}.protest-state-label{display:inline-block;padding:3px 8px;border:1px solid var(--case-color);border-radius:5px;color:var(--text);background:color-mix(in srgb,var(--case-color) 15%,var(--surface));font-size:12px}.protest-page .sport-case-row h3{margin:8px 0;font-size:19px}.sport-case-row p{margin:8px 0}
.protest-party-author{--party-color:#469be1}.protest-party-target{--party-color:#e26672}.protest-party-other{--party-color:#ad8bec}.protest-page .protest-parties{gap:5px}.protest-page .protest-person{padding:7px 10px;gap:10px;border-left:3px solid var(--party-color)}.protest-person .protest-number{font-size:19px;min-width:42px}.protest-person>div{display:flex;align-items:baseline;flex-wrap:wrap;gap:3px 10px}.protest-person small{margin:0;font-size:11px}.protest-person small:first-of-type{color:var(--party-color)}
html[data-theme=light] .protest-party-author{--party-color:#2168a2}html[data-theme=light] .protest-party-target{--party-color:#b12838}html[data-theme=light] .protest-party-other{--party-color:#7952b3}.header-admin-tools a:focus-visible{outline:2px solid var(--cyan);outline-offset:3px}
.protest-materials{list-style:none;padding:0!important;display:flex;gap:8px;flex-wrap:wrap}.protest-materials a{display:block;border:1px solid var(--cyan);border-radius:5px;padding:7px 12px;background:color-mix(in srgb,var(--cyan) 8%,var(--surface));font-size:13px;text-decoration:none}
.protest-work{padding:12px 16px!important}.protest-work .sport-form{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px}.protest-work h3{flex-basis:100%;margin:0!important;font-size:18px}.protest-work label{flex:1 1 320px;margin:0}.protest-work textarea{min-height:54px;max-height:180px}.protest-work .sport-actions{margin:0}.protest-revoke{border-left:3px solid #e26672}
@media(max-width:700px){.protest-filters label{flex-basis:calc(50% - 8px)}.protest-filters .sport-actions{width:100%}.site-header .header-admin-tools{justify-content:flex-start}.protest-work .sport-actions{width:100%}}
.protest-page{display:grid;gap:18px;min-width:0}.protest-panel{box-sizing:border-box;min-width:0;padding:clamp(16px,3vw,24px);border:1px solid var(--border);border-radius:10px;background:var(--surface);overflow-wrap:anywhere}
.protest-heading{border-top:3px solid #cf4d58}.protest-heading h2{margin:9px 0 14px;font-family:var(--font-display);font-size:clamp(25px,4vw,36px);line-height:1.2}.protest-heading p{margin:10px 0 0}
.protest-page h3{margin:0 0 18px;font-family:var(--font-display);font-size:21px;line-height:1.3}.protest-page h3:not(:first-child){margin-top:26px}
.protest-page .sport-form{max-width:none}.protest-form{gap:18px}.protest-form>.sport-actions{margin:0}.protest-panel>label,.protest-fields>label{margin-top:15px}
.protest-page :is(input:not([type=checkbox]),textarea,select){min-height:44px;padding:11px 12px;border:1px solid var(--border);border-radius:6px;background:var(--surface-alt);color:var(--text);font:inherit;font-size:14px;line-height:1.5}
.protest-page :is(input,textarea,select,button,a,summary):focus-visible{outline:2px solid var(--cyan);outline-offset:3px}.protest-page input[type=checkbox]{width:18px;height:18px;accent-color:var(--cyan)}
.protest-page .field-hint{font-size:12px;line-height:1.7}.protest-page .protest-deadline{margin:0;line-height:1.8}.protest-fields{min-width:0;margin:18px 0 0;padding:16px;border:1px solid var(--border);border-radius:8px;background:var(--surface-alt)}
.protest-fields legend{padding:0 6px;max-width:100%;font-weight:700;overflow-wrap:anywhere}.protest-extra{margin-top:18px}.protest-extra summary,.protest-deadline-settings summary{cursor:pointer;line-height:1.6}
.protest-choices{display:grid;gap:8px;max-height:300px;overflow:auto;padding:8px 0}.protest-choices label{padding:10px;border:1px solid var(--border);border-radius:5px;background:var(--surface)}
.protest-page [hidden]{display:none!important}.protest-parties{display:grid;gap:12px}.protest-person{display:flex;align-items:center;gap:14px;padding:14px;border:1px solid var(--border);border-radius:7px;background:var(--surface-alt)}.protest-person>div{min-width:0}.protest-number{font:700 25px var(--font-display);flex:0 0 auto}.protest-person small{display:block;color:var(--muted);line-height:1.7;margin-top:4px}
.protest-evidence,.protest-decision{padding:16px;margin:18px 0;border:1px solid var(--border);border-left:3px solid var(--cyan);border-radius:6px;background:var(--surface-alt)}.protest-evidence p:last-child{margin-bottom:0}.protest-materials{padding-left:22px;line-height:2}.protest-status{padding:6px 10px;border:1px solid #cf4d58;border-radius:5px;color:var(--text);font-size:13px;background:color-mix(in srgb,#cf4d58 10%,var(--surface))}
.protest-sanctions{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr));gap:16px}.protest-sanctions .protest-fields{margin:0}.protest-resolution .btn{justify-self:start}.protest-submit{background:#b82735;color:#fff;border:1px solid #e16c76}.protest-submit:hover{background:#9e202c}
.protest-page .sport-case-row{color:var(--text);text-decoration:none}.protest-page .sport-case-row:hover{border-color:var(--cyan)}
.header-admin-tools{display:flex;align-items:center;gap:6px;margin-left:auto;min-width:0}.header-help-links .admin-queue-icon{display:inline-flex;gap:7px;min-width:46px;padding:7px 9px;box-sizing:border-box;border-color:color-mix(in srgb,var(--queue-color) 65%,var(--border));color:var(--queue-color);background:color-mix(in srgb,var(--queue-color) 9%,var(--surface));font-variant-numeric:tabular-nums;font-size:13px}.admin-queue-icon>span:first-child{font-size:17px;font-weight:800}.queue-season{--queue-color:#d6a63c}.queue-cards{--queue-color:#469be1}.queue-protests{--queue-color:#e26672}.header-help-links .admin-queue-icon:hover{border-color:var(--queue-color)}.header-help-links .admin-queue-icon.is-empty{background:var(--surface)}.header-help-links .header-admin-link{font-size:12px;padding:8px 10px}.admin-queue-notice.queue-protests{border-left:3px solid var(--queue-color)}
html[data-theme=light] .queue-season{--queue-color:#8b6407}html[data-theme=light] .queue-cards{--queue-color:#2168a2}html[data-theme=light] .queue-protests{--queue-color:#b12838}
@media(max-width:700px){.protest-sanctions{grid-template-columns:1fr}.protest-panel{padding:16px}.header-admin-tools{flex-wrap:wrap;justify-content:flex-end}.protest-page .sport-actions .btn{box-sizing:border-box;max-width:100%;white-space:normal}.protest-person{padding:11px;gap:10px}.protest-resolution .btn{justify-self:stretch}.protest-fields{padding:12px}}
@media(max-width:600px){.protest-callout{padding:16px}.protest-callout .protest-submit{width:100%;box-sizing:border-box}}

/* Общие смысловые цвета разделов и уведомлений. */
.tone-neutral{--section-color:#8b9ba8;--section-ink:#c4ccd2}
.tone-manager{--section-color:#49b982;--section-ink:#84d9ae}
.tone-cards{--section-color:#548fd7;--section-ink:#9ec6f7}
.tone-season{--section-color:#d2ae40;--section-ink:#efd482}
.tone-protests{--section-color:#d85464;--section-ink:#ffa2ad}
.tone-director{--section-color:#ad3e56;--section-ink:#fca6b8}
.tone-discord{--section-color:#9d7ae1;--section-ink:#cdb6ff}
.tone-race{--section-color:#37a8b5;--section-ink:#8bdde6}
html[data-theme="light"] .tone-neutral{--section-ink:#53606c}html[data-theme="light"] .tone-manager{--section-ink:#176842}html[data-theme="light"] .tone-cards{--section-ink:#265f9f}html[data-theme="light"] .tone-season{--section-ink:#775900}html[data-theme="light"] .tone-protests{--section-ink:#a62b3b}html[data-theme="light"] .tone-director{--section-ink:#8f1732}html[data-theme="light"] .tone-discord{--section-ink:#684097}html[data-theme="light"] .tone-race{--section-ink:#146876}
.admin-workspace-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:14px;margin:20px 0}
.admin-workspace-card{display:flex;flex-direction:column;gap:10px;min-width:0;padding:20px;border:1px solid var(--border);border-left:4px solid var(--section-color);border-radius:8px;background:color-mix(in srgb,var(--section-color) 5%,var(--surface));color:var(--text);text-decoration:none;overflow-wrap:anywhere}
.admin-workspace-card:hover,.admin-workspace-card:focus-visible{border-color:var(--section-color);background:color-mix(in srgb,var(--section-color) 11%,var(--surface))}
.admin-workspace-card>strong{font:600 21px var(--font-display);color:var(--section-ink)}.admin-workspace-card>span{font-size:13px;line-height:1.6;color:var(--muted)}.admin-workspace-card>small{font-size:11px;color:var(--section-ink);margin-top:auto}
.admin-dashboard-groups{display:grid;gap:22px;margin-top:24px}.admin-dashboard-group{min-width:0}.admin-dashboard-group-title{margin:0 0 10px;font:600 12px var(--font-body);color:var(--section-ink);letter-spacing:.06em;text-transform:uppercase}.admin-dashboard-group .admin-workspace-grid{grid-template-columns:repeat(2,minmax(0,1fr));margin:0}.admin-workspace-main{display:flex;flex:1;flex-direction:column;gap:10px;color:inherit;text-decoration:none}.admin-workspace-main strong{font:600 21px var(--font-display);color:var(--section-ink)}.admin-workspace-main span{font-size:13px;line-height:1.6;color:var(--muted)}.admin-workspace-main small{font-size:11px;color:var(--section-ink);margin-top:auto}.admin-workspace-shortcut{align-self:flex-start;margin-top:6px;padding:8px 12px;border:1px solid var(--section-color);border-radius:5px;background:color-mix(in srgb,var(--section-color) 12%,var(--surface));color:var(--section-ink);font-size:12px;text-decoration:none}.admin-workspace-shortcut:is(:hover,:focus-visible){background:color-mix(in srgb,var(--section-color) 22%,var(--surface))}
.admin-toolbox{min-width:0;margin-bottom:24px;padding:16px;border:1px solid var(--border);border-radius:8px;background:var(--surface)}.admin-tool-search{margin:0 0 12px}.admin-tool-search>label{display:block;margin-bottom:7px;color:var(--muted);font-size:11px}.admin-tool-search-controls{display:flex;gap:8px}.admin-tool-search input{flex:1;min-width:0;padding:10px 12px;border:1px solid var(--border);border-radius:5px;background:var(--bg);color:var(--text);font:inherit;font-size:13px}.admin-tool-search-results{padding:0 0 14px}.admin-tool-search-results[hidden],.admin-tool-result[hidden]{display:none!important}.admin-tool-search-results>ul{padding:0;margin:0;list-style:none;display:grid;gap:6px}.admin-tool-search-count{font-size:12px;color:var(--muted);line-height:1.6}.admin-tool-result{display:flex;align-items:center;gap:10px;border:1px solid var(--border);border-left:3px solid var(--section-color);border-radius:5px}.admin-tool-result>a{flex:1;min-width:0;padding:10px 12px;color:var(--section-ink);text-decoration:none;overflow-wrap:anywhere}.admin-tool-result small{display:block;margin-top:5px;color:var(--muted);font-size:11px;line-height:1.5}.admin-favorite-form{display:inline-flex;flex:none;margin:0}.admin-favorite-toggle{display:grid;place-items:center;width:36px;height:36px;flex:none;padding:0;border:1px solid transparent;border-radius:5px;background:transparent;color:var(--muted);font-size:23px;line-height:1;cursor:pointer}.admin-favorite-toggle[aria-pressed="true"]{color:#d2ae40}.admin-favorite-toggle:is(:hover,:focus-visible){border-color:#d2ae40;background:color-mix(in srgb,#d2ae40 9%,var(--surface));color:#d2ae40}.admin-favorite-toggle:disabled{opacity:.5;cursor:wait}.admin-workspace-card{position:relative}.admin-workspace-card>.admin-favorite-form{position:absolute;top:10px;right:10px}.admin-workspace-card>.admin-workspace-main{padding-right:24px}.admin-workspace-card:focus-within{border-color:var(--section-color)}.admin-tool-result>.admin-favorite-form{margin-right:6px}.admin-favorites-heading{display:flex;gap:8px;align-items:center;margin-bottom:8px;font-size:12px}.admin-favorites-heading small{color:var(--muted);font-variant-numeric:tabular-nums}.admin-favorites-list{display:flex;flex-wrap:wrap;gap:7px}.admin-favorite-link{display:flex;align-items:center;max-width:100%;min-width:0;border:1px solid var(--border);border-left:3px solid var(--section-color);border-radius:5px}.admin-favorite-link>a{padding:9px 8px 9px 11px;color:var(--section-ink);font-size:12px;text-decoration:none;overflow-wrap:anywhere}.admin-favorites-empty{margin:0;color:var(--muted);font-size:11px;line-height:1.6}.admin-toolbox-status{font-size:11px;color:var(--muted);margin:8px 0 0}.admin-toolbox-status:empty{display:none}html[data-theme="light"] .admin-favorite-toggle[aria-pressed="true"]{color:#8b6800}@media(max-width:600px){.admin-toolbox{padding:12px}.admin-tool-search-controls .btn{padding:6px 10px}.admin-favorite-link{width:100%}.admin-favorite-link>a{flex:1}.admin-tool-result>a{font-size:13px}}
.admission-filters,.admission-selection-bar,.admission-confirm-actions{display:flex;align-items:flex-end;flex-wrap:wrap;gap:10px;margin:18px 0}.admission-filters label{min-width:180px;flex:1}.admission-filters label:first-child{flex:3;min-width:min(100%,280px)}.admission-filters select,.admission-action-fields select,.admission-action-fields input,.admission-bulk-actions textarea{box-sizing:border-box;width:100%;min-width:0;margin-top:6px;padding:10px;border:1px solid var(--border);border-radius:5px;background:var(--surface);color:var(--text);font:inherit}.admission-help{font-size:12px;line-height:1.7;color:var(--muted)}.admission-issue-heading{display:flex;gap:12px;align-items:center}.admission-issue-heading h3{margin:6px 0 10px}.admission-issue-heading input{width:20px;height:20px;flex:none;accent-color:#d2ae40}.admission-session-list{display:grid;gap:12px;list-style:none;padding:0;margin:8px 0 0}.admission-session-list>li{min-width:0;padding:12px;border:1px solid var(--border);border-radius:6px;background:var(--surface)}.admission-session-link{display:flex;align-items:center;gap:10px;color:var(--text);text-decoration:none}.admission-session-link:hover strong{text-decoration:underline}.admission-session-link>span{min-width:0}.admission-session-link strong{font-size:14px}.admission-session-link small{display:block;margin-top:5px;color:var(--muted);font-size:11px}.admission-session-code{padding:7px;border:1px solid currentColor;border-radius:4px;font-family:var(--font-mono);color:#7fb2ef}.admission-session-code.is-q{color:#e2c269}.admission-session-code.is-fp{color:#7acb9f}html[data-theme="light"] .admission-session-code.is-r{color:#265f9f}html[data-theme="light"] .admission-session-code.is-q{color:#775900}html[data-theme="light"] .admission-session-code.is-fp{color:#176842}.admission-source-issues{padding-left:18px;font-size:13px;line-height:1.6;margin:10px 0}.admission-source-footer{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;font-size:11px;color:var(--muted);overflow-wrap:anywhere}.admission-bulk-actions{padding:20px;margin:20px 0;border:1px solid var(--border);border-left:4px solid #d2ae40;border-radius:8px;background:var(--surface)}.admission-action-fields{display:grid;grid-template-columns:2fr 1fr;gap:14px;margin-bottom:14px}.admission-action-fields [hidden]{display:none}.admission-selection-bar{align-items:center}.admission-selection-bar output{margin-left:auto;font-size:12px;color:var(--muted)}
@media(max-width:650px){.admin-dashboard-group .admin-workspace-grid,.admission-action-fields{grid-template-columns:1fr}.admission-filters label{flex-basis:100%}.admission-selection-bar output{flex-basis:100%;margin-left:0}.admission-bulk-actions{padding:14px}.admission-issue{padding:14px}.admission-session-link strong{font-size:13px}}
.admin-workspace-nav>.admin-nav-link,.admin-nav-link.tone-neutral{border-left:3px solid var(--section-color);color:var(--section-ink)}.admin-workspace-nav>.admin-nav-link.is-active{background:color-mix(in srgb,var(--section-color) 12%,var(--surface))}.admin-workspace-nav .admin-request-count{background:color-mix(in srgb,var(--section-color) 16%,var(--surface));color:var(--section-ink)}
.admin-workspace-subnav{display:grid;gap:4px;margin:5px 0 12px 12px;padding-left:10px;border-left:1px solid var(--border)}.admin-workspace-subnav>a{padding:6px;color:var(--muted);font-size:12px;line-height:1.5;text-decoration:none}.admin-workspace-subnav>a:is(:hover,.is-active){color:var(--section-ink)}.admin-workspace-summary{grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:20px}.admin-workspace-summary small{display:block;color:var(--muted)}
.discord-pilot-name strong{color:var(--section-ink);font-weight:500}.discord-pilot-name small{display:block;font-size:10px;color:var(--muted)}
.pilot-number-edit>summary{cursor:pointer;font:500 10px var(--font-body);color:var(--muted);margin-top:5px}.pilot-number-edit form{display:flex;flex-wrap:wrap;gap:5px;max-width:140px;padding-top:8px}.stats-table tr:target{outline:2px solid var(--cyan);outline-offset:-2px}
.notification-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 8px;flex:none;padding-bottom:10px;border-bottom:1px solid var(--border);margin-bottom:8px}.notification-toolbar .notification-tabs{padding:0;flex-wrap:wrap}.notification-toolbar .notification-read-all{margin:0}.notification-toolbar .notification-read-all .btn{padding:5px 8px;min-height:32px;font-size:11px}.notification-toolbar [hidden]{display:none!important}
html[data-theme="light"] .notification-dropdown{--bg:#eef0f1;--surface:#fff;--surface-2:#f3f5f5;--surface-alt:#e9eded;--border:#c8d1d3;--text:#182127;--muted:#56656e;--cyan:#176b78;color:var(--text)}
.notification-item[class*="tone-"]{border-left:3px solid var(--section-color);background:color-mix(in srgb,var(--section-color) 4%,var(--surface))}.notification-item[class*="tone-"].is-unread{background:color-mix(in srgb,var(--section-color) 10%,var(--surface))}.notification-item .notice-category{color:var(--section-ink);font-size:10px;font-weight:600}.notification-item-heading{flex-wrap:wrap;gap:5px 10px}.admin-notification-item .admin-request-count{background:color-mix(in srgb,var(--section-color) 16%,var(--surface));color:var(--section-ink)}.admin-notification-intro{font-size:11px;color:var(--muted);line-height:1.5;padding:4px 0 12px}.notification-admin-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.notification-admin-actions form{margin:0}.notification-page .notification-items{margin-top:16px}.notification-page .notification-item{padding:16px}.notification-page .notification-item>div>strong{font-size:17px}.notification-page .notification-item p{font-size:13px;line-height:1.7}
.calendar-time-preference{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 0 auto;font-size:11px}.calendar-time-preference label{color:var(--muted)}.calendar-time-preference select{width:auto;max-width:100%;padding:7px;border:1px solid var(--border);border-radius:5px;background:var(--surface);color:var(--text);font:inherit}.calendar-time-preference .btn{font-size:11px;min-height:34px}
.registration-deadline{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 20px;padding:14px 18px;margin:16px 0;border:1px solid #b39335;border-left:3px solid #d2ae40;border-radius:7px;background:color-mix(in srgb,#d2ae40 7%,var(--surface));font-size:13px}.registration-deadline small{color:var(--muted)}.registration-deadline strong{font-variant-numeric:tabular-nums}.registration-deadline.is-expired{border-color:var(--border);color:var(--muted)}.registration-deadline-settings{padding:14px;margin:16px 0;border:1px solid var(--border);border-radius:6px}.registration-deadline-settings>.check{display:flex;gap:8px;align-items:center}.registration-deadline-settings .field{margin-top:12px}.registration-deadline-settings [hidden]{display:none}
@media(max-width:600px){.calendar-time-preference{grid-column:1/-1;flex-basis:100%;margin:8px 0 0;min-width:0}.admin-workspace-summary{grid-template-columns:1fr}.notification-tabs>button{padding:6px 8px}.admin-workspace-card{padding:16px}.registration-deadline{padding:12px}.notification-page .notification-item{padding:12px}}

.registration-deadline.registration-deadline-banner {
  flex: 0 0 100%;
  min-width: 0;
  justify-content: flex-start;
  gap: 3px 12px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #e8edf0;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.registration-deadline-banner small { color: inherit; }
.registration-deadline-banner strong { color: #ffdb83; }
.registration-deadline-banner.is-expired strong { color: inherit; }
.hero-background-transparent .registration-deadline-banner,
.hero-background-transparent .registration-deadline-banner strong { color: var(--text); }
.season-signup-card > .registration-deadline:last-child { margin-bottom: 0; }

/* Страница команды: акцент палитры и нейтральный текст в обеих темах. */
.team-page { --team-side-width:clamp(240px,29%,320px); }
.team-page :is(.team-heading-layout,.team-body-layout) {
  display:grid; grid-template-columns:minmax(0,1fr) var(--team-side-width); gap:18px; align-items:start;
}
.team-page .team-heading-layout { align-items:stretch; }
.team-page .team-profile-banner {
  height:100%; background:var(--surface); color:var(--text);
  background:linear-gradient(115deg,color-mix(in srgb,var(--team-primary) 22%,var(--surface)),color-mix(in srgb,var(--team-secondary) 16%,var(--surface)));
}
.team-page .team-profile-banner.has-cover { height:auto; }
.team-page .team-profile-banner h1 { margin:6px 0; font:600 clamp(24px,4vw,42px)/1.1 var(--font-display); overflow-wrap:anywhere; }
.team-page .team-profile-banner img { flex:none; }
.team-page .team-profile-banner > div { min-width:0; }
.team-page .team-profile-banner h1 + span { font-size:13px; color:var(--muted); }
.team-page .team-tinted {
  --team-tint:13%; --panel-fill:color-mix(in srgb,var(--team-primary) var(--team-tint),var(--surface));
  padding:16px; border:1px solid var(--border); border-radius:8px; min-width:0;
  background:var(--surface);
  background:var(--panel-fill);
}
.team-page .team-facts { display:grid; align-content:start; gap:14px; border-top:3px solid var(--team-primary); }
.team-facts > div + div { padding-top:12px; border-top:1px solid var(--border); }
.team-facts .entity-name { display:block; margin-top:6px; overflow-wrap:anywhere; }
.team-facts p { color:var(--muted); margin:6px 0 0; line-height:1.55; font-size:13px; }
.team-facts > .btn { justify-self:start; }
.team-body-layout:has(> .team-main:only-child) { grid-template-columns:minmax(0,1fr); }
.team-main,.team-controls-column { min-width:0; display:grid; align-content:start; gap:14px; }
.team-about :is(h3,p),.team-membership p { margin:0; overflow-wrap:anywhere; }
.team-about h3 { font-size:15px; }
.team-about > :is(h3,p) + :is(h3,p),.team-membership p + form { margin-top:8px; }
.team-roster-editor > .section-title { margin-top:0; }
.team-page .team-roster-guide { margin:0 0 12px; }
.team-page .team-roster-guide summary { cursor:pointer; font-weight:600; }
.team-page .team-roster-columns { gap:12px; }
.team-page .team-roster-section { border-top:3px solid var(--team-primary); }
.team-page .team-roster-section[data-seat="reserve"] { --team-tint:7%; border-top-color:color-mix(in srgb,var(--team-primary) 55%,var(--border)); }
.team-page .team-roster-section-head > span { padding:4px 7px; border:1px solid var(--border); border-radius:5px; background:var(--surface); white-space:nowrap; }
.team-page .team-member-card { margin-top:7px; padding:12px; border:1px solid var(--border); border-radius:6px; background:var(--surface); }
.team-page .team-member-identity { grid-template-columns:42px minmax(0,1fr); }
.team-page .team-member-number {
  display:grid; place-items:center; min-height:36px; border-radius:5px;
  color:color-mix(in srgb,var(--number-team-color) 38%,var(--text));
  background:color-mix(in srgb,var(--number-team-color) 10%,var(--surface));
}
.team-page .team-empty-slot { min-height:50px; box-sizing:border-box; margin-top:7px; padding:8px 12px; }
.team-page :is(.team-move-button,.team-swap-picker > summary,.team-member-more > summary) { min-height:36px; box-sizing:border-box; }
.team-management { display:grid; gap:10px; align-content:start; overflow-wrap:anywhere; scroll-margin-top:20px; }
.team-management :is(h2,h3,p,.team-close) { margin:0; }
.team-management h2 { font:600 23px/1.2 var(--font-display); margin-top:4px; }
.team-management h3 { font:600 14px/1.4 var(--font-body); }
.team-management p { font-size:13px; line-height:1.55; }
.team-management > .btn { justify-self:start; white-space:normal; }
.team-management-block { display:grid; gap:8px; padding-top:12px; border-top:1px solid var(--border); }
.team-management-block h3 { display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.team-management-block .team-roster-row { gap:8px; padding:8px 0; }
.team-management-block .team-roster-actions { margin:0; }
.team-management .team-invite-form { display:grid; gap:8px; justify-items:start; }
.team-management :is(input:not([type=checkbox]),.admin-rename-form) { width:100%; min-width:0; box-sizing:border-box; }
.team-management input[name=pilot_name] { padding:9px 10px; border:1px solid var(--border); border-radius:5px; background:var(--surface); color:var(--text); font:inherit; }
.team-management .team-close > summary { cursor:pointer; padding:6px 0; font-size:13px; }
.team-page :is(a,button,summary,input):focus-visible,.pilot-history-list a:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }
@media (max-width:880px) {
  .team-page :is(.team-heading-layout,.team-body-layout) { grid-template-columns:minmax(0,1fr); gap:12px; }
}
@media (min-width:650px) {
  .team-page .team-roster-columns { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:420px) {
  .team-page .team-profile-banner { padding:16px 12px; gap:12px; }
  .team-page .team-profile-banner img { width:52px; height:52px; }
}

/* Короткий список протоколов и закрытый экран участия. */
.pilot-recent-races { margin-top:14px; }
.pilot-recent-races > .section-title { margin-top:0; }
.pilot-history-list { list-style:none; margin:0; padding:0; display:grid; gap:6px; }
.pilot-history-list a {
  display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:10px;
  padding:10px 12px; min-height:42px; box-sizing:border-box; border:1px solid var(--border);
  border-radius:6px; color:var(--text); background:var(--surface); text-decoration:none; overflow-wrap:anywhere;
}
.pilot-history-list a:is(:hover,:focus-visible) { border-color:var(--cyan); }
.pilot-history-list a :is(time,.muted) { font:12px var(--font-mono); color:var(--muted); }
.pilot-history-list a > :last-child { justify-self:end; color:var(--cyan); }
.admin-pilot-races a { grid-template-columns:minmax(0,1fr) 150px minmax(104px,auto) auto; }
.admin-pilot-races a .pill { justify-self:start; }
.admin-pilot-admissions { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,225px),1fr)); gap:10px; }
.admin-pilot-admission { min-width:0; padding:14px; overflow-wrap:anywhere; }
.admin-pilot-admission :is(h4,p,ul) { margin:0 0 8px; }
.admin-pilot-admission ul { padding-left:16px; }
.admin-workspace-summary { grid-template-columns:repeat(auto-fit,minmax(min(100%,175px),1fr)); }
.admin-workspace-summary .btn { align-self:flex-start; margin-top:auto; white-space:normal; }
@media (max-width:600px) {
  .admin-pilot-races a { grid-template-columns:minmax(0,1fr) auto; }
  .admin-pilot-races a > .pill { grid-column:1; grid-row:2; }
  .admin-pilot-races a > .muted { grid-column:2; grid-row:2; }
}

.pilot-picker-search { display:none; }
.has-pilot-search .pilot-picker-search { display:grid; gap:5px; max-width:330px; margin:8px 0; color:var(--muted); font-size:12px; }
.pilot-picker-search input { box-sizing:border-box; width:100%; }
.pilot-picker-search small:empty { position:absolute; }
[data-pilot-option][hidden] { display:none !important; }

.standings-js .standings-card[data-pilot-searching] .is-extra:not([hidden]) { display:table-row; }
.standings-card[data-pilot-searching] .standings-card-more { display:none; }


/* Журнал live-судейства */
.steward-upload, .steward-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin-block: 16px;
}
.steward-upload .field { flex: 0 1 360px; min-width: 0; }
.steward-entry {
  min-width: 0;
  margin: 0 0 16px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.steward-entry legend { padding-inline: 6px; font-weight: 650; }
.steward-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 10px;
  margin-block: 10px;
}
.steward-fields .field {
  min-width: 0;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 6px;
}
.steward-fields :is(input, select, textarea) { width: 100%; min-width: 0; }
.steward-fields .steward-field-review {
  border-color: #b9851d;
  background: color-mix(in srgb, #e9aa32 13%, var(--surface));
}
.steward-field-review small { color: var(--text); }
.steward-eye { display: inline-flex; position: relative; align-items: center; gap: 8px; padding: 6px 8px; cursor: pointer; }
.steward-eye input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.steward-eye:focus-within { outline: 2px solid currentColor; outline-offset: 2px; }
.steward-eye input:not(:checked) ~ .steward-eye-hidden,
.steward-eye input:not(:checked) ~ svg .steward-eye-slash,
.steward-eye input:checked ~ .steward-eye-visible { display: none; }
.steward-source summary { cursor: pointer; }
.steward-source dl { margin: 8px 0 0; }
.steward-source dl div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px; padding-block: 4px; }
.steward-source dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
