.event-results {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius, 15px);
}
.er-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px 10px; }
.er-header h2 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.03em; }
.er-session-status { color: var(--muted); font-size: 11px; font-weight: 650; white-space: nowrap; }
.er-demo { color: var(--accent); }
.er-sessions { display: flex; flex-shrink: 0; gap: 6px; padding: 0 16px 12px; overflow-x: auto; }
.er-session { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 128px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); color: var(--muted); cursor: pointer; }
.er-session strong { font-size: 12px; font-weight: 650; }
.er-session span { font-size: 10px; white-space: nowrap; }
.er-session:hover { background: var(--surface-hover); color: var(--text); }
.er-session.is-active { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--accent-dim); }
.er-toolbar { display: flex; align-items: center; gap: 12px; flex-shrink: 0; min-height: 48px; padding: 8px 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.er-control { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; min-width: 0; }
.er-control select { width: auto; max-width: 230px; min-width: 0; height: 30px; padding: 4px 26px 4px 8px; border: 1px solid var(--line); border-radius: 5px; color: var(--text); background: var(--surface); font-size: 11px; cursor: pointer; }
.er-control select:disabled { opacity: .55; cursor: default; }
.er-row-count { margin-left: auto; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.er-ask { border: 1px solid var(--line); background: var(--surface); color: var(--accent); padding: 7px 10px; border-radius: 5px; font-size: 11px; font-weight: 650; cursor: pointer; white-space: nowrap; }
.er-ask:hover { background: var(--surface-hover); }
.er-table-wrap { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-color: var(--line) transparent; }
.er-table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; font-size: 12px; font-variant-numeric: tabular-nums; }
.er-table caption, .er-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; clip: rect(0, 0, 0, 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; border: 0; }
.er-table thead { position: sticky; top: 0; z-index: 2; }
.er-table thead th { padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-raised); color: var(--muted); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .055em; white-space: nowrap; }
.er-table td, .er-table tbody th { padding: 8px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.er-table tbody th { font-weight: 400; }
.er-table tbody tr:hover { background: var(--surface-hover); }
.er-table .er-select-cell { width: 30px; padding-right: 0; }
.er-select-cell input { display: block; width: 14px; height: 14px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.er-select-cell input:disabled { opacity: .25; cursor: default; }
.er-position { width: 56px; font-variant-numeric: tabular-nums; }
.er-position strong { font-size: 13px; font-weight: 650; }
.er-position small, .er-class-cell small, .er-best small { display: block; margin-top: 2px; color: var(--subtle); font-size: 9px; font-weight: 400; white-space: nowrap; }
.er-entry { min-width: 180px; }
.er-open-car { display: flex; align-items: center; width: 100%; min-width: 0; border: 0; padding: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.er-open-car .er-car-number { flex-shrink: 0; }
.er-open-car .er-entry-copy { min-width: 0; }
.er-open-car:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 3px; }
.er-history-arrow { margin-left: auto; padding-left: 10px; color: var(--subtle); font-size: 17px; }
.er-table [data-result-history] { cursor: pointer; }
.er-open-car:hover .er-team, .er-open-car:hover .er-history-arrow { color: var(--accent); }
.er-entry .er-car-number { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 26px; padding: 0 4px; margin-right: 9px; border: 1px solid color-mix(in srgb, var(--er-class) 40%, transparent); border-radius: 5px; background: color-mix(in srgb, var(--er-class) 8%, transparent); color: var(--er-class); font-weight: 700; vertical-align: middle; }
.er-entry-copy { display: inline-flex; flex-direction: column; vertical-align: middle; gap: 3px; max-width: 260px; }
.er-team { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.er-entry-detail { font-size: 10px; color: var(--muted); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.er-mobile-class { display: none; }
.er-class-label { color: var(--er-class); font-size: 11px; font-weight: 600; }
.er-table .er-numeric { text-align: right; white-space: nowrap; }
.er-best { font-weight: 550; }
.er-class-best { color: var(--zr2, #bf9ae9); }
.er-personal-best { color: var(--zp2, #87d69f); }
.er-status-cell { font-size: 11px; color: var(--muted); }
.er-empty { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; min-height: 180px; padding: 28px 22px; text-align: center; }
.er-empty-symbol { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); font-size: 22px; }
.er-empty h3 { margin: 0 0 8px; font-size: 17px; font-weight: 650; }
.er-empty p { max-width: 360px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.er-footer { flex-shrink: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 9px 16px; border-top: 1px solid var(--line); background: var(--surface-soft); }
.er-footer p { margin: 0; max-width: 620px; color: var(--subtle); font-size: 10px; line-height: 1.4; }
.er-compare-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; font-size: 10px; color: var(--muted); }
.er-compare-actions button { border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 5px; background: var(--accent-dim); color: var(--accent); padding: 7px 12px; font-size: 11px; font-weight: 650; white-space: nowrap; cursor: pointer; }
.er-compare-actions button:disabled { opacity: .4; cursor: default; }
@media (max-width: 900px) {
  .er-table .er-status-cell { display: none; }
  .er-entry-copy { max-width: 190px; }
  .er-table thead th, .er-table td, .er-table tbody th { padding-left: 9px; padding-right: 9px; }
}
@media (max-width: 640px) {
  .event-results { border-radius: 9px; }
  .er-header { padding: 11px 10px 9px; }
  .er-header h2 { font-size: 16px; }
  .er-sessions { gap: 5px; padding: 0 10px 9px; }
  .er-session { flex: 1; min-width: 96px; padding: 7px 9px; }
  .er-session strong { font-size: 11px; }
  .er-session span { font-size: 9px; }
  .er-toolbar { gap: 7px; min-height: 42px; padding: 6px 9px; flex-wrap: wrap; }
  .er-control { gap: 5px; }
  .er-control > span { display: none; }
  .er-control select { font-size: 10px; max-width: 172px; padding-left: 6px; }
  .er-class-control select { max-width: 120px; }
  .er-ask { font-size: 10px; padding: 7px 8px; }
  .er-row-count { display: none; }
  .er-table { font-size: 11px; }
  .er-table thead th { font-size: 9px; padding-top: 9px; padding-bottom: 9px; letter-spacing: .025em; }
  .er-table thead th, .er-table td, .er-table tbody th { padding-left: 6px; padding-right: 6px; }
  .er-table .er-select-cell { width: 24px; padding-right: 0; }
  .er-table .er-class-cell { display: none; }
  .er-mobile-class { display: inline; }
  .er-position { width: 28px; }
  .er-position strong { font-size: 12px; }
  .er-position small { font-size: 8px; }
  .er-entry { min-width: 100px; }
  .er-entry .er-car-number { min-width: 25px; height: 23px; margin-right: 5px; padding: 0 3px; font-size: 11px; }
  .er-entry-copy { max-width: min(25vw, 145px); }
  .er-team { font-size: 10px; }
  .er-entry-detail { font-size: 9px; }
  .er-table .er-gap { font-size: 10px; }
  .er-footer { padding: 8px 10px; gap: 7px; }
  .er-footer p { font-size: 9px; }
  .er-compare-actions { width: 100%; justify-content: space-between; }
}
