:root {
  --bg: #070b12;
  --bg-alt: #0f1724;
  --panel: #121a28;
  --panel-alt: #1a2538;
  --border: #32415b;
  --text: #f2f5fb;
  --muted: #aab6cf;
  --accent: #ff4d00;
  --success: #2ec27e;
  --warning: #ffb020;
  --danger: #ff4d4f;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 12% -15%, rgba(255, 77, 0, 0.25), transparent 40%),
    radial-gradient(circle at 92% -10%, rgba(0, 158, 255, 0.18), transparent 36%),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

body.live-page {
  overflow-x: hidden;
}

h1,
h2,
h3 {
  margin: 0 0 0.6rem;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  letter-spacing: 0.02em;
}

a {
  color: var(--accent);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 0 0 1px rgba(255, 77, 0, 0.12), 0 10px 30px rgba(0, 0, 0, 0.32);
}

.muted {
  color: var(--muted);
  font-size: 0.85rem;
}

.flash {
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 600;
}

.flash.success {
  border: 1px solid rgba(46, 194, 126, 0.35);
  background: rgba(46, 194, 126, 0.17);
  color: var(--success);
}

.flash.error {
  border: 1px solid rgba(255, 77, 79, 0.35);
  background: rgba(255, 77, 79, 0.18);
  color: var(--danger);
}

.btn {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-size: 0.9rem;
}

.btn:hover {
  border-color: var(--accent);
}

.btn-primary {
  background: var(--accent);
  color: #111;
  border-color: var(--accent);
  font-weight: 700;
}

.btn-danger {
  border-color: rgba(255, 77, 79, 0.35);
  color: var(--danger);
}

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

input,
select,
button,
textarea {
  font: inherit;
}

input[type="text"],
input[type="date"],
input[type="number"],
input[type="url"],
input[type="file"],
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0b111b;
  color: var(--text);
  padding: 9px 10px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.92rem;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
}

.admin-shell {
  max-width: 1140px;
  margin: 0 auto;
  padding: 14px;
  display: grid;
  gap: 14px;
}

.form-grid {
  display: grid;
  gap: 10px;
}

.form-grid .full-width {
  grid-column: 1 / -1;
}

.logo-list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.logo-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  background: var(--panel-alt);
}

.logo-item img {
  width: auto;
  height: 42px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  padding: 4px;
}

.mapping-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 850px;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--border);
  padding: 8px;
  text-align: left;
}

.admin-table thead {
  background: var(--panel-alt);
  color: var(--muted);
}

.live-shell {
  max-width: 1160px;
  margin: 0 auto;
  padding: 12px;
  display: grid;
  gap: 12px;
}

.loading {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  color: var(--muted);
}

.event-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.event-title {
  font-size: clamp(1.6rem, 5vw, 2.5rem);
  margin: 0;
}

.event-sub {
  font-size: clamp(0.95rem, 2.7vw, 1.1rem);
  color: var(--muted);
}

.event-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.logo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.logo-row img {
  height: 38px;
  width: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 3px;
}

.badges {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 4px 9px;
  font-size: 0.76rem;
  font-weight: 700;
}

.badge.live-on {
  color: var(--success);
  border-color: rgba(46, 194, 126, 0.35);
  background: rgba(46, 194, 126, 0.17);
}

.badge.live-off {
  color: var(--warning);
  border-color: rgba(255, 176, 32, 0.35);
  background: rgba(255, 176, 32, 0.17);
}

.tabs,
.mapping-tabs {
  display: grid;
  gap: 8px;
}

.tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tab {
  border: 1px solid var(--border);
  background: var(--panel-alt);
  color: var(--muted);
  border-radius: 10px;
  padding: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
}

.tab.active,
.mapping-btn.active {
  border-color: var(--accent);
  background: rgba(255, 77, 0, 0.2);
  color: var(--accent);
}

.mapping-scroll {
  overflow-x: auto;
  display: flex;
  gap: 8px;
  padding-bottom: 2px;
}

.mapping-select-wrap {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  max-width: 360px;
}

.mapping-select-wrap label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
}

.mapping-select {
  border: 1px solid var(--border);
  background: #0b111b;
  color: var(--text);
  border-radius: 10px;
  padding: 10px;
}

.mapping-btn {
  border: 1px solid var(--border);
  background: var(--panel-alt);
  color: var(--muted);
  border-radius: 10px;
  padding: 8px 11px;
  font-weight: 600;
  white-space: nowrap;
}

.toolbar {
  display: grid;
  gap: 8px;
}

.toolbar input {
  width: 100%;
}

.table-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  overflow: hidden;
}

.table-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-alt);
  font-size: 0.8rem;
  color: var(--muted);
}

.status {
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 4px 8px;
  font-weight: 700;
}

.status.fresh { color: var(--success); border-color: rgba(46,194,126,0.4); }
.status.cached { color: #76c6ff; border-color: rgba(118,198,255,0.4); }
.status.stale { color: var(--warning); border-color: rgba(255,176,32,0.4); }
.status.error { color: var(--danger); border-color: rgba(255,77,79,0.4); }
.status.inactive { color: var(--muted); }

.table-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.result-table {
  --sticky-pos-width: 32px;
  --sticky-start-width: 38px;
  --sticky-driver-width: 126px;
  width: max-content;
  border-collapse: separate;
  border-spacing: 0;
  min-width: max(100%, 900px);
  font-size: 0.84rem;
}

.result-table thead {
  background: var(--panel-alt);
}

.result-table th,
.result-table td {
  border-bottom: 1px solid var(--border);
  padding: 0.28rem 0.2rem;
  text-align: left;
  white-space: nowrap;
  background-clip: padding-box;
  vertical-align: middle;
}

.result-table tbody tr:nth-child(even) {
  background: #0f1521;
}

.result-table .col-pos,
.result-table .col-number {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.result-table .col-run,
.result-table .col-total,
.result-table .col-gap {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.result-table .col-run {
  width: 72px;
  min-width: 68px;
  max-width: 82px;
}

.result-table .col-pos {
  width: var(--sticky-pos-width);
  min-width: var(--sticky-pos-width);
  max-width: var(--sticky-pos-width);
}

.result-table .col-number {
  width: var(--sticky-start-width);
  min-width: var(--sticky-start-width);
  max-width: var(--sticky-start-width);
}

.result-table .col-name {
  width: var(--sticky-driver-width);
  min-width: var(--sticky-driver-width);
  max-width: var(--sticky-driver-width);
  white-space: normal;
}

.result-table .col-country {
  width: 38px;
  min-width: 38px;
  max-width: 38px;
  text-align: center;
}

.result-table .col-class {
  width: 74px;
  min-width: 74px;
  max-width: 74px;
  white-space: normal;
  text-align: center;
}

.result-table .col-total {
  width: 72px;
  min-width: 72px;
  max-width: 72px;
}

.result-table .col-gap {
  width: 70px;
  min-width: 70px;
  max-width: 70px;
}

.result-table .sticky-col-1 {
  position: sticky;
  left: 0;
  z-index: 8;
  background: #0d141f;
  box-shadow: 1px 0 0 rgba(12, 34, 66, 0.88);
}

.result-table thead .sticky-col-1 {
  background: var(--panel-alt);
  z-index: 12;
}

.result-table .sticky-col-2 {
  position: sticky;
  left: var(--sticky-pos-width);
  z-index: 8;
  background: #0d141f;
  box-shadow: 1px 0 0 rgba(12, 34, 66, 0.88);
}

.result-table thead .sticky-col-2 {
  background: var(--panel-alt);
  z-index: 12;
}

.result-table .sticky-col-3 {
  position: sticky;
  left: calc(var(--sticky-pos-width) + var(--sticky-start-width));
  z-index: 8;
  background: #0d141f;
  box-shadow: 1px 0 0 rgba(12, 34, 66, 0.88), 8px 0 12px -10px rgba(0, 0, 0, 0.7);
}

.result-table thead .sticky-col-3 {
  background: var(--panel-alt);
  z-index: 12;
  box-shadow:
    inset 0 -1px 0 rgba(12, 34, 66, 0.88),
    1px 0 0 rgba(12, 34, 66, 0.88),
    8px 0 12px -10px rgba(0, 0, 0, 0.7);
}

.driver-cell {
  display: flex;
  flex-direction: column;
  line-height: 1.18;
  min-width: 0;
}

.driver-name-line {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.driver-name {
  font-weight: 700;
  color: var(--text);
  min-width: 0;
}

.driver-car {
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--muted);
  white-space: normal;
}

.follow-star {
  border: 0;
  background: transparent;
  color: #8da8cf;
  cursor: pointer;
  width: 22px;
  min-width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0;
  touch-action: manipulation;
}

.follow-star:hover {
  color: #ffd36a;
  background: rgba(255, 211, 106, 0.1);
}

.follow-star.is-followed {
  color: #ffd36a;
}

.follow-star:focus-visible {
  outline: 2px solid #4b82d0;
  outline-offset: 1px;
}

.followed-panel {
  display: grid;
  gap: 6px;
}

.followed-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.followed-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.followed-driver-btn {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #0b1d39;
  color: var(--text);
  padding: 4px 6px 4px 10px;
  font-size: 0.72rem;
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.followed-driver-btn:hover {
  border-color: #4b82d0;
}

.followed-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  margin-left: 2px;
  color: #ffd36a;
  font-size: 0.86rem;
  line-height: 1;
  background: rgba(255, 211, 106, 0.08);
}

.followed-driver-btn:hover .followed-remove {
  background: rgba(255, 211, 106, 0.16);
}

.run-cell {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 1.12;
}

.run-time {
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.run-penalty {
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffbf66;
}

.result-table td.total-value {
  font-weight: 700;
  color: #f7fbff;
}

.result-table tbody tr.row-followed {
  background: #102848;
}

.result-table tbody tr.row-followed:nth-child(even) {
  background: #113056;
}

.result-table tbody tr.row-followed-flash td {
  animation: row-followed-flash 1.6s ease-out;
}

.result-table tbody tr.row-followed-flash .sticky-col-1,
.result-table tbody tr.row-followed-flash .sticky-col-2,
.result-table tbody tr.row-followed-flash .sticky-col-3 {
  animation: row-followed-flash-sticky 1.6s ease-out;
}

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

.nat-flag {
  width: 16px;
  height: 12px;
  display: block;
  flex: 0 0 auto;
  border-radius: 2px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.notice {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  color: var(--muted);
  background: var(--panel-alt);
}

.notice.warning {
  border-color: rgba(255,176,32,0.35);
  color: var(--warning);
  background: rgba(255,176,32,0.12);
}

.notice.error {
  border-color: rgba(255,77,79,0.35);
  color: var(--danger);
  background: rgba(255,77,79,0.13);
}

.archive-page {
  background:
    radial-gradient(circle at 15% 0%, rgba(255, 77, 0, 0.14), transparent 35%),
    radial-gradient(circle at 85% 0%, rgba(75, 130, 208, 0.12), transparent 30%),
    linear-gradient(180deg, #07152c 0%, #050f22 100%);
}

.archive-shell {
  max-width: 1160px;
  margin: 0 auto;
  padding: 16px 12px 32px;
  display: grid;
  gap: 12px;
}

.archive-hero {
  padding: 18px 18px 16px;
}

.archive-hero h1 {
  font-size: clamp(1.7rem, 5vw, 2.7rem);
  margin-bottom: 4px;
}

.archive-kicker {
  color: #7f9dcb;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
  line-height: 1.15;
}

.archive-intro {
  max-width: 680px;
  color: #b8c9e7;
  font-size: 0.94rem;
  line-height: 1.45;
}

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

.archive-card {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.archive-card-series {
  color: #8facd7;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.archive-card-title {
  font-size: 1.15rem;
  line-height: 1.15;
  margin: 0;
}

.archive-card-meta,
.archive-meta-list,
.archive-result-meta,
.archive-admin-exports {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.archive-card-meta {
  color: #b8c9e7;
}

.archive-admin-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.archive-admin-list {
  display: grid;
  gap: 12px;
}

.archive-admin-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--panel-alt);
  display: grid;
  gap: 10px;
}

.archive-live-page .lt-live-pill.archive-mode {
  background: #ffb020;
  color: #101826;
}

.archive-live-page .lt-updated-label,
.archive-live-page .lt-updated-value {
  color: #e5efff;
}

.archive-live-page .table-meta > span {
  color: #9fb9e2;
}

.archive-live-page .table-meta > a {
  display: none;
}

@keyframes row-followed-flash {
  0% {
    box-shadow: inset 0 0 0 999px rgba(255, 211, 106, 0.34);
  }

  100% {
    box-shadow: inset 0 0 0 999px rgba(255, 211, 106, 0);
  }
}

@keyframes row-followed-flash-sticky {
  0% {
    box-shadow:
      inset 0 0 0 999px rgba(255, 211, 106, 0.34),
      1px 0 0 rgba(12, 34, 66, 0.88);
  }

  100% {
    box-shadow:
      inset 0 0 0 999px rgba(255, 211, 106, 0),
      1px 0 0 rgba(12, 34, 66, 0.88);
  }
}

@media (min-width: 760px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .toolbar {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .tabs {
    max-width: 540px;
  }
}

@media (max-width: 759px) {
  .archive-shell {
    padding-top: 12px;
  }

  .archive-card-meta,
  .archive-meta-list,
  .archive-result-meta,
  .archive-admin-exports {
    font-size: 0.84rem;
  }
}

/* Live Portal V2 Visual Refresh (scoped only to public page) */
.live-page {
  background: linear-gradient(180deg, #07152c 0%, #050f22 100%);
}

.live-page .live-shell {
  max-width: 100%;
  margin: 0;
  padding: 0;
  gap: 0;
}

.live-page .live-shell > .panel,
.live-page .live-shell > #results-area {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.live-page .panel {
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-color: #1a3356;
  background: #091a35;
  box-shadow: none;
  padding: 8px 10px;
}

.live-page .lt-head {
  padding-top: 8px;
  padding-bottom: 8px;
  overflow-x: clip;
}

.live-page .lt-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
}

.live-page .lt-head-main {
  min-width: 0;
}

.live-page .lt-kicker {
  color: #7f9dcb;
  font-size: 0.66rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 3px;
  line-height: 1.15;
}

.live-page .lt-title {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  font-size: clamp(1.42rem, 4.9vw, 2.05rem);
  font-weight: 800;
  line-height: 1.03;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.live-page .lt-race-line {
  margin-top: 4px;
  color: #b8c9e7;
  font-size: 0.8rem;
  line-height: 1.25;
}

.live-page .lt-status-block {
  display: grid;
  grid-auto-flow: row;
  grid-template-columns: auto;
  justify-items: end;
  align-content: end;
  gap: 2px;
  white-space: nowrap;
  padding-bottom: 1px;
}

.live-page .lt-live-pill {
  border-radius: 999px;
  font-size: 0.74rem;
  padding: 4px 14px;
  border-width: 0;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.live-page .lt-live-pill.live-on {
  background: #24c95f;
  color: #fff;
}

.live-page .lt-live-pill.live-off {
  background: #ff9800;
  color: #111;
}

.live-page .lt-updated-label {
  font-size: 0.74rem;
  color: #9cb4dc;
  line-height: 1.2;
}

.live-page .lt-updated-value {
  font-size: 0.9rem;
  color: #e5efff;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.live-page .lt-logo-row {
  margin-top: 6px;
}

.live-page .lt-logo-row img {
  height: 30px;
}

.live-page .lt-head-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.live-page .lt-head-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #275088;
  background: #0b2345;
  color: #e6f0ff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
}

.live-page .lt-head-link:hover {
  border-color: #4b82d0;
  background: #12315d;
}

.live-page .lt-controls {
  border-top: 1px solid #1f365d;
  padding-top: 8px;
  padding-bottom: 8px;
  overflow-x: clip;
  display: grid;
  gap: 7px;
}

.live-page .lt-tabs {
  max-width: none;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 3px;
  border: 1px solid #1d3962;
  border-radius: 11px;
  background: #08172f;
}

.live-page .tab {
  border: 0;
  background: transparent;
  color: #9ab3db;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  min-height: 34px;
  line-height: 1;
}

.live-page .tab.active {
  background: #102949;
  color: #fff;
  box-shadow: inset 0 0 0 1px #3f78c8;
}

.live-page .lt-mapping-scroll {
  margin-top: 0;
}

.live-page .mapping-btn {
  border-color: #1f3f6c;
  background: #0a1a35;
  color: #a7c0e6;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.78rem;
}

.live-page .mapping-btn.active {
  background: #0f2d57;
  color: #ffffff;
  border-color: #4b82d0;
}

.live-page .absolute-mode-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid #1d3a62;
  border-radius: 10px;
  background: #09162b;
  width: fit-content;
}

.live-page .absolute-mode-btn {
  border: 0;
  background: transparent;
  color: #9ab3db;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  min-height: 32px;
  line-height: 1;
}

.live-page .absolute-mode-btn.active {
  background: #0f2d57;
  color: #fff;
  box-shadow: inset 0 0 0 1px #4b82d0;
}

.live-page .mapping-select-wrap label {
  color: #8facd7;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.live-page .mapping-select {
  background: #08162d;
  border-color: #234672;
  color: #f2f7ff;
  border-radius: 10px;
  min-height: 36px;
  padding: 7px 10px;
}

.live-page .toolbar {
  margin-top: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
}

.live-page .followed-panel {
  margin-top: 2px;
}

.live-page .followed-title {
  color: #8facd7;
}

.live-page .followed-driver-btn {
  border-color: #234672;
  background: #08162d;
  color: #dce9ff;
}

.live-page .followed-driver-btn:hover {
  border-color: #3f78c8;
}

.live-page .followed-remove {
  background: rgba(255, 211, 106, 0.12);
}

.live-page .toolbar input {
  background: #08162d;
  border-color: #234672;
  color: #f2f7ff;
  border-radius: 10px;
  min-height: 36px;
  padding: 7px 10px;
  font-size: 0.8rem;
}

.live-page .toolbar input::placeholder {
  color: #7f9fcf;
}

.live-page .toolbar .btn {
  background: #0d2546;
  border-color: #2f5f9d;
  color: #dce9ff;
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.8rem;
  border-radius: 10px;
  justify-self: start;
  white-space: nowrap;
}

.live-page #results-area {
  border-top: 1px solid #1f365d;
}

.live-page .lt-table-panel {
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  background: #08162d;
  overflow: hidden;
}

.live-page .table-meta {
  background: #0a1d3a;
  border-bottom-color: #1a3358;
  color: #afc4e7;
  padding: 6px 8px;
  gap: 6px;
  justify-content: flex-start;
  font-size: 0.72rem;
}

.live-page .table-meta > span,
.live-page .table-meta > a {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid #1d3a62;
  border-radius: 999px;
  padding: 0 8px;
  background: #0a1830;
  color: #9fb9e2;
  text-decoration: none;
  line-height: 1;
}

.live-page .table-meta > a {
  color: #ff8c4b;
  border-color: #6a3f26;
}

.live-page .status {
  font-size: 0.68rem;
  padding: 0 8px;
  min-height: 22px;
}

.live-page .table-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  -webkit-overflow-scrolling: touch;
  touch-action: auto;
  overscroll-behavior-x: auto;
}

.live-page .result-table {
  --sticky-pos-width: 30px;
  --sticky-start-width: 36px;
  --sticky-driver-width: 116px;
  width: max-content;
  min-width: max(100%, 980px);
  font-size: 0.84rem;
}

.live-page .result-table thead {
  background: #0d2343;
}

.live-page .result-table th {
  color: #96b8e6;
  text-transform: uppercase;
  font-size: 0.64rem;
  letter-spacing: 0.05em;
  border-bottom-color: #1d3d68;
  padding-top: 5px;
  padding-bottom: 5px;
  line-height: 1.1;
}

.live-page .result-table th.col-pos,
.live-page .result-table th.col-number,
.live-page .result-table th.col-name {
  font-size: 0.58rem;
}

.live-page .result-table td {
  border-bottom-color: #173257;
  padding-top: 4px;
  padding-bottom: 4px;
  font-size: 0.8rem;
}

.live-page .result-table td.col-pos,
.live-page .result-table td.col-number {
  font-size: 0.72rem;
}

.live-page .result-table td.col-name {
  font-size: 0.77rem;
}

.live-page .result-table th.col-pos,
.live-page .result-table td.col-pos,
.live-page .result-table th.col-number,
.live-page .result-table td.col-number,
.live-page .result-table th.col-name,
.live-page .result-table td.col-name {
  padding-left: 4px;
  padding-right: 4px;
}

.live-page .result-table .col-run {
  width: 68px;
  min-width: 64px;
  max-width: 78px;
}

.live-page .result-table th.col-country,
.live-page .result-table td.col-country,
.live-page .result-table th.col-class,
.live-page .result-table td.col-class {
  text-align: center;
}

.live-page .result-table .col-country {
  width: 36px;
  min-width: 36px;
  max-width: 36px;
}

.live-page .result-table .col-class {
  width: 68px;
  min-width: 68px;
  max-width: 68px;
}

.live-page .result-table tbody tr {
  background: #081a36;
}

.live-page .result-table tbody tr:nth-child(even) {
  background: #0a1f3d;
}

.live-page .result-table tbody tr.row-followed {
  background: #123257;
}

.live-page .result-table tbody tr.row-followed:nth-child(even) {
  background: #143960;
}

.live-page .result-table tbody tr.row-followed-flash td {
  animation: live-row-followed-flash 1.6s ease-out;
}

.live-page .result-table tbody tr.row-followed-flash .sticky-col-1,
.live-page .result-table tbody tr.row-followed-flash .sticky-col-2,
.live-page .result-table tbody tr.row-followed-flash .sticky-col-3 {
  animation: live-row-followed-flash-sticky 1.6s ease-out;
}

.live-page .result-table .sticky-col-1,
.live-page .result-table .sticky-col-2,
.live-page .result-table .sticky-col-3 {
  background: #081a36;
}

.live-page .result-table thead .sticky-col-1,
.live-page .result-table thead .sticky-col-2,
.live-page .result-table thead .sticky-col-3 {
  background: #0d2343;
}

.live-page .result-table tbody tr:nth-child(even) .sticky-col-1,
.live-page .result-table tbody tr:nth-child(even) .sticky-col-2,
.live-page .result-table tbody tr:nth-child(even) .sticky-col-3 {
  background: #0a1f3d;
}

.live-page .result-table tbody tr.row-followed .sticky-col-1,
.live-page .result-table tbody tr.row-followed .sticky-col-2,
.live-page .result-table tbody tr.row-followed .sticky-col-3 {
  background: #123257;
}

.live-page .result-table tbody tr.row-followed:nth-child(even) .sticky-col-1,
.live-page .result-table tbody tr.row-followed:nth-child(even) .sticky-col-2,
.live-page .result-table tbody tr.row-followed:nth-child(even) .sticky-col-3 {
  background: #143960;
}

.live-page .driver-name {
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.06;
}

.live-page .driver-cell {
  line-height: 1.08;
}

.live-page .follow-star {
  color: #9cb8e3;
}

.live-page .follow-star:hover {
  background: rgba(255, 211, 106, 0.12);
}

.live-page .follow-star.is-followed {
  color: #ffd36a;
}

.live-page .run-penalty {
  color: #ffca80;
  font-size: 0.6rem;
  font-weight: 600;
}

.live-page .driver-car {
  color: #8eaed8;
  font-size: 0.62rem;
  margin-top: 1px;
}

.live-page .nat-flag {
  width: 19px;
  height: 13px;
  display: block;
  border-radius: 2px;
}

.live-page .nat-cell {
  width: 100%;
  justify-content: center;
  gap: 4px;
}

.live-page .nat-cell span {
  display: none;
}

.live-page .notice {
  border-color: #2a4674;
  background: #091a35;
  color: #a8c2e9;
  border-radius: 0;
  padding: 8px 10px;
  font-size: 0.78rem;
}

@keyframes live-row-followed-flash {
  0% {
    box-shadow: inset 0 0 0 999px rgba(255, 211, 106, 0.26);
  }

  100% {
    box-shadow: inset 0 0 0 999px rgba(255, 211, 106, 0);
  }
}

@keyframes live-row-followed-flash-sticky {
  0% {
    box-shadow:
      inset 0 0 0 999px rgba(255, 211, 106, 0.26),
      1px 0 0 rgba(12, 34, 66, 0.88);
  }

  100% {
    box-shadow:
      inset 0 0 0 999px rgba(255, 211, 106, 0),
      1px 0 0 rgba(12, 34, 66, 0.88);
  }
}

@media (max-width: 860px) {
  .live-page .lt-head-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .live-page .lt-status-block {
    justify-items: start;
    white-space: normal;
  }

  .live-page .lt-updated-label,
  .live-page .lt-updated-value {
    font-size: 0.76rem;
  }

  .live-page .result-table {
    font-size: 0.78rem;
    --sticky-pos-width: 25px;
    --sticky-start-width: 32px;
    --sticky-driver-width: 164px;
    min-width: max-content;
  }

  .live-page .result-table th,
  .live-page .result-table td {
    padding-left: 4px;
    padding-right: 4px;
    padding-top: 3px;
    padding-bottom: 3px;
    line-height: 1.02;
  }

  .live-page .result-table th.col-pos,
  .live-page .result-table th.col-number,
  .live-page .result-table th.col-name {
    font-size: 0.56rem;
  }

  .live-page .result-table td.col-pos,
  .live-page .result-table td.col-number {
    font-size: 0.68rem;
  }

  .live-page .result-table td.col-country,
  .live-page .result-table td.col-class,
  .live-page .result-table td.col-run,
  .live-page .result-table td.col-total,
  .live-page .result-table td.col-gap {
    font-size: 0.68rem;
  }

  .live-page .result-table th.col-country,
  .live-page .result-table th.col-class,
  .live-page .result-table th.col-run,
  .live-page .result-table th.col-total,
  .live-page .result-table th.col-gap {
    font-size: 0.56rem;
  }

  .live-page .result-table td.col-name {
    font-size: 0.73rem;
  }

  .live-page .result-table .col-run {
    width: 50px;
    min-width: 46px;
    max-width: 56px;
  }

  .live-page .result-table .col-country {
    width: 30px;
    min-width: 30px;
    max-width: 30px;
  }

  .live-page .result-table .col-class {
    width: 48px;
    min-width: 48px;
    max-width: 48px;
  }

  .live-page .result-table .col-total {
    width: 62px;
    min-width: 62px;
    max-width: 62px;
  }

  .live-page .result-table .col-gap {
    width: 60px;
    min-width: 60px;
    max-width: 60px;
  }

  .live-page .run-time {
    font-size: 0.58rem;
  }

  .live-page .run-penalty {
    font-size: 0.5rem;
  }

  .live-page .driver-name {
    font-size: 0.74rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .live-page .driver-car {
    font-size: 0.54rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .live-page .follow-star {
    width: 18px;
    min-width: 18px;
    height: 18px;
    font-size: 0.8rem;
  }

  .live-page .followed-driver-btn {
    font-size: 0.68rem;
    padding: 3px 7px;
  }

  .live-page .followed-remove {
    width: 24px;
    min-width: 24px;
    height: 24px;
    font-size: 0.9rem;
  }

  .live-page .nat-flag {
    width: 18px;
    height: 12px;
  }

  .live-page .tab {
    padding: 6px 11px;
    min-height: 33px;
    font-size: 0.88rem;
  }

  .live-page .absolute-mode-btn {
    min-height: 31px;
    font-size: 0.74rem;
    padding: 6px 9px;
  }

  .live-page .toolbar {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .live-page .toolbar .btn {
    justify-self: start;
    min-height: 34px;
  }
}

@media (max-width: 430px) {
  .live-page .result-table {
    --sticky-pos-width: 23px;
    --sticky-start-width: 30px;
    --sticky-driver-width: 150px;
  }

  .live-page .result-table .col-run {
    width: 46px;
    min-width: 42px;
    max-width: 52px;
  }

  .live-page .result-table .col-class {
    width: 42px;
    min-width: 42px;
    max-width: 42px;
  }

  .live-page .result-table .col-total {
    width: 55px;
    min-width: 55px;
    max-width: 55px;
  }

  .live-page .result-table .col-gap {
    width: 53px;
    min-width: 53px;
    max-width: 53px;
  }

  .live-page .result-table .col-country {
    width: 28px;
    min-width: 28px;
    max-width: 28px;
  }

  .live-page .follow-star {
    width: 17px;
    min-width: 17px;
    height: 17px;
    font-size: 0.76rem;
  }
}

@media (min-width: 861px) {
  .live-page .lt-status-block {
    grid-auto-flow: column;
    grid-template-columns: auto auto auto;
    align-items: center;
    gap: 8px;
    justify-items: start;
  }

  .live-page .toolbar {
    grid-template-columns: minmax(260px, 1fr) auto;
  }
}
