#raceResults[hidden]{display:none}#raceResults{position:fixed;inset:0;z-index:60;color:#112d48;background:radial-gradient(ellipse at 15% 20%,#fff9 0,transparent 65%),repeating-linear-gradient(135deg,#dde3d650 0 1px,transparent 1px 8px),#f0f1e7;padding:24px;display:grid;place-items:center;overflow:hidden}
#raceResults:before{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(132deg,transparent 90%,#f4c911 90% 93%,#157242 93% 96%,#24497d 96%);opacity:.9}
.results-sheet{position:relative;width:min(1100px,100%);height:100%;max-height:940px;display:flex;flex-direction:column;min-height:0}
.results-top{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-shrink:0;margin-bottom:12px}.results-top img{width:174px;height:auto;object-fit:contain;filter:drop-shadow(0 2px 1px #172b2740)}.results-kicker{font-size:13px;letter-spacing:.2em;font-weight:900;color:#177745}.results-top h1{font-family:Impact,'Arial Black',sans-serif;font-size:clamp(27px,3.5vw,46px);font-weight:900;color:#28558a;letter-spacing:.01em;margin:4px 0 3px;line-height:1.08}.results-circuit{font-weight:800;font-size:12px;margin:0;letter-spacing:.06em}.results-circuit span{color:#576866}
.results-summary{display:flex;align-items:center;flex-wrap:wrap;gap:12px 24px;background:#173e35;color:#fff8d5;padding:12px 18px;border-left:7px solid #f7ce16;font-size:12px;margin-bottom:8px;flex-shrink:0}.results-summary strong{color:#ffdf31;font-size:15px}.results-summary span:last-child{margin-left:auto;color:#cae8b1}
.results-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 8px 8px 0;scrollbar-color:#1d7847 #dce4d3;scrollbar-width:thin}.results-table{border-collapse:separate;border-spacing:0 7px;width:100%;table-layout:fixed;text-align:left;font-weight:800}.results-table thead{position:sticky;top:0;z-index:2}.results-table thead th{padding:9px 8px 4px;background:#eff1e7;color:#28558a;font-size:12px;font-weight:900}.results-table th:nth-child(1){width:60px}.results-table th:nth-child(2){width:65px}.results-table th:nth-child(4),.results-table th:nth-child(5){width:135px}.results-table tbody th,.results-table tbody td{height:35px;padding:6px 9px;background:#ffd014;color:#122516;border-bottom:3px solid #2a568a;font-size:14px;line-height:1.15}.results-table tbody th{font-weight:900}.results-table tbody td:first-child{background:#168247;color:#fff;border-bottom-color:#168247;text-align:center;font-size:19px;border-radius:8px 0 0 3px;clip-path:polygon(15% 0,100% 0,85% 100%,0 100%)}.results-table tbody td:nth-child(2){font-size:19px;font-family:Impact,'Arial Black',sans-serif}.results-table tbody td:last-child{background:#fff;border-radius:0 9px 9px 0;color:#1f3650}.results-table tbody td:nth-last-child(-n+2){font-variant-numeric:tabular-nums;white-space:nowrap}.results-table tbody .results-best{color:#6a2784;background:#f3dcff}.results-table tbody .results-player th{box-shadow:inset 5px 0 #224f7e;padding-left:14px}.results-table tbody .results-player td:first-child{background:#244f83;border-color:#244f83}.results-table tbody .results-player th,.results-table tbody .results-player td:nth-child(2){background:#ffe986}
.results-footnote{font-size:10px;color:#54665f;margin:3px 0 10px;flex-shrink:0}.results-actions{display:flex;gap:10px;flex-shrink:0;flex-wrap:wrap}.results-actions button{width:auto;flex:0 1 auto;border:1px solid #a6b3a4;border-radius:5px;background:#e6e9de;color:#254f47;padding:11px 20px;font-size:12px;font-weight:800;margin:0}.results-actions .results-primary{background:#177946;color:white;border-color:#177946;margin-right:auto}.results-actions button:hover{filter:brightness(1.08)}.results-actions button:focus-visible{outline:3px solid #315d91;outline-offset:3px}
@media(max-height:520px){#raceResults{padding:12px 22px}.results-top{margin-bottom:5px}.results-top img{width:110px}.results-top h1{font-size:26px}.results-kicker{font-size:9px}.results-circuit{font-size:9px}.results-summary{padding:7px 12px;gap:12px;font-size:10px;margin-bottom:2px}.results-summary strong{font-size:11px}.results-table{border-spacing:0 4px}.results-table tbody th,.results-table tbody td{height:28px;padding:5px 7px;font-size:11px}.results-table tbody td:first-child,.results-table tbody td:nth-child(2){font-size:15px}.results-table thead th{font-size:9px;padding:5px 7px 2px}.results-table th:nth-child(1){width:45px}.results-table th:nth-child(2){width:45px}.results-table th:nth-child(4),.results-table th:nth-child(5){width:102px}.results-footnote{font-size:8px;margin:2px 0 6px}.results-actions button{font-size:10px;padding:8px 14px}}
@media(max-width:600px){#raceResults{padding:12px}.results-top img{width:90px}.results-table th:nth-child(1){width:36px}.results-table th:nth-child(2){width:38px}.results-table th:nth-child(4),.results-table th:nth-child(5){width:82px}.results-table tbody th,.results-table tbody td{font-size:10px;padding:6px 4px}.results-table thead th{font-size:8px}.results-summary span:last-child{margin-left:0}.results-actions{gap:5px}.results-actions button{padding:9px 10px}}
@media(min-height:700px){.results-table{border-spacing:0 4px}.results-table tbody th,.results-table tbody td{height:28px;padding:4px 9px;font-size:13px}.results-table tbody td:first-child,.results-table tbody td:nth-child(2){font-size:16px}}


#lapRecords{width:min(1000px,calc(100vw - 20px));height:min(720px,calc(100dvh - 16px));max-height:calc(100dvh - 16px);max-width:none;border:1px solid #d6e0c5;border-radius:10px;padding:14px 20px;background:#f1f3e9;color:#214b3b;box-shadow:0 15px 80px #0009;overflow:hidden}
#lapRecords[open]{display:flex;flex-direction:column;gap:8px}#lapRecords::backdrop{background:#061b17d9;backdrop-filter:blur(4px)}
.records-head{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-shrink:0}.records-head>div{display:flex;align-items:baseline;gap:14px}.records-head span{font-size:9px;letter-spacing:.12em;font-weight:900;color:#197949}.records-head h2{font-size:22px;font-weight:900;margin:0;color:#28558a}.records-head button{width:32px;height:32px;padding:0;background:#214e40;color:white;border:0;border-radius:5px;flex-shrink:0}
.records-filters{display:grid;grid-template-columns:1.1fr 1fr 1fr;gap:14px;flex-shrink:0}:is(#recordsCircuit,#recordsMode,#recordsSource){border:0;padding:0;margin:0;min-width:0}:is(#recordsCircuit,#recordsMode,#recordsSource) legend{font-size:9px;font-weight:800;margin:0 0 3px;padding:0}.records-mode-options,.records-source-options{display:flex;gap:4px}:is(#recordsMode,#recordsSource) button{flex:1;min-width:0;margin:0;padding:6px 8px;min-height:32px;border:1px solid #afbea5;border-radius:4px;background:#e4e9dc;color:#214b3b;font-size:11px;font-weight:800;white-space:nowrap;cursor:pointer}:is(#recordsMode,#recordsSource) button span{display:none}:is(#recordsMode,#recordsSource) button[aria-pressed=true]{background:#197746;color:#fff;border-color:#197746;box-shadow:inset 0 -2px #f3ca12}:is(#recordsMode,#recordsSource) button:hover{filter:brightness(1.06)}:is(#recordsMode,#recordsSource) button:focus-visible{outline:2px solid #28558a;outline-offset:1px}
.records-list{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;container-type:size;scrollbar-width:thin;scrollbar-color:#197746 #dce4d3}.records-list table{border-collapse:separate;border-spacing:0;width:100%;table-layout:fixed;font-size:14px;text-align:left}.records-list thead{position:sticky;top:0;z-index:1;background:#f1f3e9}.records-list thead tr{height:24px}.records-list tbody tr{height:calc((100cqh - 24px)/10)}.records-list td,.records-list th{padding:0 10px;border-bottom:1px solid #cfd9c6;line-height:1.15}.records-list th{color:#28558a;font-size:10px}.records-list th:first-child{width:7%}.records-list th:nth-last-child(-n+2){width:20%}.records-list td:nth-last-child(-n+2){font-variant-numeric:tabular-nums;white-space:nowrap}.records-list td:nth-child(2){overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700}.records-list tbody tr:nth-child(even){background:#e5ebdc}.records-list tbody tr:first-child{background:#ffe47a}.record-source-badge{display:inline;font-size:9px;font-weight:600;color:#55764d;margin-left:8px;white-space:nowrap}
#recordsSourceNote{font-size:10px;margin:0;flex-shrink:0;color:#516859}#recordsEmpty,#recordsMessage{font-size:11px;line-height:1.2;margin:0}#recordsEmpty{padding:14px 0}#recordsMessage{font-weight:700;color:#227241;flex-shrink:0}#recordsMessage:empty{display:none}#recordCandidate{font-size:10px;margin:0;padding:4px 8px;background:#fff3b7;border-left:3px solid #f3ca12;line-height:1.2;flex-shrink:0}#recordCandidate[hidden]{display:none}
@media(max-height:520px){#lapRecords{padding:6px 12px}#lapRecords[open]{gap:4px}.records-head h2{font-size:18px}.records-head span{font-size:8px}.records-head button{width:28px;height:28px}.records-filters{gap:10px}:is(#recordsCircuit,#recordsMode,#recordsSource) legend{font-size:8px;margin-bottom:2px}:is(#recordsMode,#recordsSource) button{min-height:28px;padding:4px 6px;font-size:10px}.records-list table{font-size:11px}.records-list th{font-size:9px}.records-list td,.records-list th{padding:0 6px}.record-source-badge{font-size:8px;margin-left:6px}#recordsSourceNote{font-size:8px}}
@media(max-width:600px) and (orientation:portrait){.records-head>div{display:block}.records-head h2{font-size:18px}.records-filters{grid-template-columns:1fr 1fr;gap:6px}#recordsSource{grid-column:1/-1}.records-list table{font-size:11px}.records-list td,.records-list th{padding:0 4px}.records-list th:nth-last-child(-n+2){width:24%}.record-source-badge{display:block;margin:1px 0 0;font-size:8px}}

/* Keep the driver-type icons readable without enlarging the compact top ten. */
#recordsSource button:not([data-records-source="all"]){font-size:16px;line-height:1}.record-source-badge{font-size:12px}

/* The circuit dropdown: dark green like the track cards, the outline in yellow, a strip of the
   game's colours on top of the open list. */
.records-pick{position:relative}
#recordsCircuitPick{display:flex;align-items:center;gap:9px;width:100%;min-height:32px;margin:0;padding:0 0 0 9px;border:1px solid #d9b93c99;border-radius:5px;background:linear-gradient(160deg,#235040,#143329);box-shadow:inset 0 -2px #f3ca12;color:#fff6dc;text-align:left;cursor:pointer;overflow:hidden}
#recordsCircuitPick:hover{background:linear-gradient(160deg,#2a5c4a,#183b30)}#recordsCircuitPick:focus-visible{outline:2px solid #28558a;outline-offset:1px}
#recordsCircuitPick svg{width:42px;height:21px;flex-shrink:0}#recordsCircuitPick path,#recordsCircuitList path{fill:none;stroke:#f4ce39;stroke-width:5;stroke-linejoin:round}
#recordsCircuitPick b{font-size:12px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}#recordsCircuitPick small{font-size:10px;font-weight:700;color:#b9c9b6;white-space:nowrap;flex-shrink:0}
#recordsCircuitPick i{align-self:stretch;width:30px;margin-left:auto;flex-shrink:0;display:grid;place-items:center;border-left:1px solid #ffffff1f;background:#0000001f}
#recordsCircuitPick i:before{content:'';width:6px;height:6px;margin-top:-3px;border:solid #f4ce39;border-width:0 2px 2px 0;transform:rotate(45deg);transition:transform .15s}
#recordsCircuitPick[aria-expanded=true] i:before{margin-top:3px;transform:rotate(-135deg)}
#recordsCircuitList{position:absolute;z-index:5;top:calc(100% + 5px);left:0;width:max(100%,min(340px,calc(100vw - 60px)));margin:0;padding:8px 5px 5px;list-style:none;border:1px solid #d9b93c88;border-radius:7px;background:linear-gradient(170deg,#1c3c35,#10261f);box-shadow:0 16px 36px #0009;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#f4ce39 #10261f;animation:records-drop .14s ease-out}
#recordsCircuitList:before{content:'';position:absolute;top:0;left:0;right:0;height:3px;background:linear-gradient(90deg,#f4c911 0 34%,#1f9a55 34% 67%,#3b6fae 67%)}
#recordsCircuitList[hidden]{display:none}#recordsCircuitList:focus{outline:none}
#recordsCircuitList li{display:grid;grid-template-columns:58px minmax(0,1fr) auto;grid-template-rows:auto auto;column-gap:10px;align-items:center;padding:6px 10px 6px 8px;border-radius:5px;cursor:pointer;color:#fff6dc}
#recordsCircuitList li+li{margin-top:2px}#recordsCircuitList li.active{background:#ffffff17}#recordsCircuitList li[aria-selected=true]{background:#f4ce3924;box-shadow:inset 3px 0 #f4ce39}
#recordsCircuitList svg{grid-row:1/3;width:58px;height:29px}#recordsCircuitList path{stroke:#9fb2a4;stroke-width:4}#recordsCircuitList li:is(.active,[aria-selected=true]) path{stroke:#f4ce39}
#recordsCircuitList b{font-size:13px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#recordsCircuitList small{font-size:10px;color:#b9c9b6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#recordsCircuitList em{grid-row:1/3;grid-column:3;font-style:normal;font-size:12px;font-weight:800;color:#f4d055;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}#recordsCircuitList em span{display:block;font-size:7px;letter-spacing:.12em;color:#9fb2a4;margin-bottom:1px}#recordsCircuitList em.records-pick-none{font-size:10px;font-weight:700;color:#8ea596}
@keyframes records-drop{from{opacity:0;transform:translateY(-5px)}}
@media(prefers-reduced-motion:reduce){#recordsCircuitList{animation:none}#recordsCircuitPick i:before{transition:none}}
@media(max-height:520px){#recordsCircuitPick{min-height:28px}#recordsCircuitPick svg{width:36px;height:18px}#recordsCircuitPick b{font-size:11px}#recordsCircuitList li{padding:4px 9px 4px 7px}#recordsCircuitList svg{width:48px;height:24px}#recordsCircuitList li{grid-template-columns:48px minmax(0,1fr) auto}}
/* Standing phone: one filter per row, so the circuit name and "Corrida normal" fit. */
@media(max-width:600px) and (orientation:portrait){.records-filters{grid-template-columns:1fr}}

/* A car still on the track at the flag: its estimated time, set apart from the real ones. */
.results-table tbody td.results-estimated{font-style:italic;color:#5a6b78}

/* A retirement says what broke ("ABANDONOU · superaquecimento"): the time column grows to fit it,
   the driver column has room to spare. Narrow screens wrap it instead. */
.results-table.results-has-dnf th:nth-child(5){width:255px}.results-table tbody td.results-dnf{color:#93321d}
@media(max-height:520px){.results-table.results-has-dnf th:nth-child(5){width:200px}}
@media(max-width:600px){.results-table.results-has-dnf th:nth-child(5){width:108px}.results-table tbody td.results-dnf{white-space:normal;font-size:10px;line-height:1.05}}
