.tracking-nav {display:flex;align-items:center;justify-content:space-between;gap:16px;margin:18px 0;padding:0 12px;background:#fff;border-bottom:1px solid #d4d9df;}
.tracking-tabs {display:flex;gap:0;border-bottom:1px solid #bbc3ce;}
.tracking-tabs button {border:0;border-radius:0;background:transparent;color:#52606d;padding:14px 20px;font:inherit;font-weight:700;border-bottom:3px solid transparent;}
.tracking-tabs button[aria-selected="true"] {color:#9f2028;border-bottom-color:#bd3038;}
.tracking-help {min-width:42px;width:42px;height:42px;border:1px solid #788392;border-radius:50%;background:transparent;color:inherit;font-size:20px;font-weight:700;padding:0;}
#track-panel {background:#f3f4f6;padding:20px 14px;}
#filters[hidden] {display:none;}
body[data-timing-mode="track"] .statusLine {display:none;}
#track-panel[hidden], #classification-panel[hidden] {display:none !important;}
.tracking-heading {display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px;flex-wrap:wrap;}
.tracking-heading h1 {font-size:24px;margin:0;}
#tracking-status {font-size:14px;color:#52606d;}
#tracking-status[data-online="true"] {color:#126734;}
#tracking-empty {padding:24px 0;color:#52606d;}
#tracking-stages {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,310px),1fr));gap:16px;}
.track-stage {background:#171c24;border:1px solid #485464;border-radius:6px;overflow:hidden;min-width:0;}
.track-stage button {display:block;width:100%;text-align:left;background:none;color:#fff;border:0;border-radius:0;padding:20px;min-height:220px;font:inherit;cursor:pointer;}
.track-stage button:disabled {cursor:default;}
.track-stage button:not(:disabled):hover {background:#242b36;}
.track-stage .stage-heading {display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:16px;}
.stage-number {font-size:17px;font-weight:800;}
.stage-phase {font-size:12px;font-weight:700;color:#bdc6d2;}
.track-stage[data-phase="running"] {border-top:3px solid #48bb78;}
.track-stage[data-phase="running"] .stage-phase {color:#86e0a2;}
.track-stage[data-phase="finishing"] {border-top:3px solid #e6c449;}
.stage-driver {display:block;min-height:44px;font-size:18px;font-weight:700;line-height:1.3;overflow-wrap:anywhere;}
.stage-pass {display:block;color:#bbc4d1;font-size:13px;margin:4px 0 12px;}
.stage-clock {display:block;font-family:Consolas,monospace;font-variant-numeric:tabular-nums;font-size:36px;line-height:1.3;white-space:nowrap;min-height:47px;}
.stage-lap {display:block;color:#b8c5d3;font-size:13px;margin-top:12px;min-height:18px;}
.tracking-dialog {box-sizing:border-box;width:min(600px,calc(100% - 28px));max-height:85dvh;overflow:auto;border:1px solid #bbc3ce;border-radius:8px;padding:26px;background:#fff;color:#17202a;box-shadow:0 12px 40px #0005;font:16px/1.5 system-ui,sans-serif;}
.tracking-dialog::backdrop {background:#0009;}
.tracking-dialog h2 {margin:0 0 12px;font-size:22px;line-height:1.3;overflow-wrap:anywhere;}
.tracking-dialog p {margin:12px 0;}
.dialog-heading {display:flex;align-items:flex-start;gap:16px;justify-content:space-between;}
.tracking-dialog button {font:inherit;border:1px solid #bcc3cb;color:#17202a;background:#fff;border-radius:4px;padding:10px 16px;cursor:pointer;}
.dialog-heading .dialog-close {flex:0 0 40px;min-width:40px;padding:0;width:40px;height:40px;font-size:28px;line-height:1;}
.dialog-actions {display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap;margin-top:24px;}
#intro-read {background:#aa242c;border-color:#aa242c;color:#fff;}
.timing-guide-list dt {font-weight:750;margin-top:18px;}
.timing-guide-list dd {margin:5px 0 0;color:#475361;}
.lap-summary {border-bottom:1px solid #d4d9df;padding-bottom:20px;margin-bottom:14px;}
.lap-summary .stage-clock {font-size:38px;}
.lap-summary small {display:block;color:#52606d;}
.lap-table {display:table;min-width:0;width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums;}
.lap-table th,.lap-table td {padding:10px 8px;border-bottom:1px solid #e0e4e8;background:#fff;color:#17202a;text-align:right;}
.lap-table th:first-child,.lap-table td:first-child {text-align:left;}
.lap-table .best-lap {color:#126734;font-weight:750;}
.lap-table .slower-lap {color:#a8232c;}
.lap-notice {font-size:14px;color:#52606d;}
button.stage-detail-button {font:inherit;color:inherit;padding:4px;border:0;border-radius:2px;background:none;cursor:pointer;min-width:44px;min-height:36px;text-decoration:underline;text-decoration-color:#7e8da1;text-underline-offset:5px;}
button.stage-detail-button:hover {background:#ffffff13;}
.tracking-nav button:focus-visible,.track-stage button:focus-visible,.tracking-dialog button:focus-visible,.stage-detail-button:focus-visible {outline:3px solid #51b8f5;outline-offset:3px;}
@media(min-width:1400px) {#tracking-stages {grid-template-columns:repeat(5,minmax(0,1fr));}.stage-clock {font-size:32px;}.track-stage button {padding:16px;}}
@media(max-width:620px) {
  .tracking-tabs button {padding:12px 14px;font-size:15px;}
  #tracking-stages {grid-template-columns:1fr;gap:10px;}
  .track-stage button {min-height:155px;padding:14px;display:grid;grid-template-columns:minmax(0,1fr) 130px;column-gap:10px;align-items:center;}
  .track-stage .stage-heading {grid-column:1/-1;margin:0 0 10px;}
  .stage-driver {font-size:16px;min-height:42px;grid-column:1;grid-row:2;}
  .stage-pass {grid-column:1;margin:6px 0 0;}
  .stage-clock {grid-column:2;grid-row:2;font-size:25px;text-align:right;min-height:34px;}
  .stage-lap {grid-column:1/-1;margin-top:10px;}
  .tracking-dialog {padding:20px;}
}
