.race-export-dialog{width:min(980px,calc(100vw - 24px));max-width:min(980px,calc(100vw - 24px));padding:0!important;overflow-y:auto;overflow-x:hidden;max-height:calc(100dvh - 24px);overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.race-export-modal{position:relative;padding:22px;border-top:4px solid var(--red);background:#fff}
.race-export-close{position:absolute;top:7px;right:7px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:0;border-radius:4px;background:#fff;color:var(--text);cursor:pointer}
.race-export-close:hover{background:#f3f3f3;color:var(--red)}
.race-export-close:focus-visible{outline:2px solid var(--red);outline-offset:2px}
.race-export-controls{display:grid;grid-template-columns:minmax(220px,1fr) minmax(220px,1fr);gap:12px;margin:24px 0 14px}
.race-export-controls label{display:flex;flex-direction:column;gap:6px;font-size:10px;font-weight:900;letter-spacing:.06em;text-transform:uppercase;color:#6f6f6b}
.race-export-controls select{width:100%;min-width:0;border:1px solid var(--line-dark);border-radius:8px;background:#fff;padding:10px 11px;font-weight:800;color:var(--text)}
.race-export-preview{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:#fff}
.race-export-preview-title{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 14px;background:#171717;color:#fff}
.race-export-preview-title b{font-size:14px}.race-export-preview-title span{font-size:10px;color:#bbb}
.race-export-preview .table-wrap{max-height:min(46vh,520px)}
.race-export-preview th{top:0}.race-export-preview td,.race-export-preview th{white-space:nowrap}
.race-export-preview>small{display:block;padding:9px 12px}
.race-export-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px;flex-wrap:wrap}
.race-export-note{display:block;text-align:right;margin-top:8px}
.q-kart-cell{display:flex;align-items:center;gap:5px}
.q-kart-redraw{width:28px;height:28px;min-width:28px;border:1px solid var(--line);border-radius:7px;background:#fff;cursor:pointer;font-weight:900;color:#555;line-height:1}
.q-kart-redraw:hover{border-color:var(--red);color:var(--red)}
.q-heat-utility-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
@media(max-width:760px){
  .race-export-dialog{width:calc(100vw - 10px);max-width:calc(100vw - 10px)}
  .race-export-modal{padding:16px 12px}
  .race-export-controls{grid-template-columns:1fr}
  .race-export-actions{display:grid;grid-template-columns:1fr}
  .race-export-actions .btn{width:100%}
  .race-export-note{text-align:left}
}
.protocol-table-wrap{overflow:auto;max-height:min(50vh,560px)}
.q-protocol-preview{border-collapse:separate;border-spacing:0;min-width:1280px;width:max-content;font-size:11px}
.q-protocol-preview th,.q-protocol-preview td{border-right:1px solid #d7d7d3;border-bottom:1px solid #d7d7d3;padding:7px 8px;text-align:center;background:#fff}
.q-protocol-preview th:first-child,.q-protocol-preview td:first-child{border-left:1px solid #d7d7d3}
.q-protocol-preview thead tr:first-child th{border-top:1px solid #a8a8a3}
.q-protocol-preview .protocol-fixed{background:#f1f1ef;vertical-align:middle;z-index:3}
.q-protocol-preview .protocol-session-head,.q-protocol-preview .protocol-session-sub{background:#e9ecef}
.q-protocol-preview .protocol-final-head,.q-protocol-preview .protocol-final-cell{background:#fff2a8}
.q-protocol-preview td.protocol-final-cell:last-child{background:#ffe95c;font-weight:900}
.q-protocol-preview .protocol-fastest-cell{background:#e2f0d9}
.q-protocol-preview thead tr:first-child th{position:sticky;top:0}
.q-protocol-preview thead tr:nth-child(2) th{position:sticky;top:34px}
.q-protocol-preview td:nth-child(2),.q-protocol-preview th:nth-child(2){text-align:left;min-width:190px}
.q-protocol-preview td:nth-child(4),.q-protocol-preview th:nth-child(4){text-align:left;min-width:150px}
.q-protocol-preview td:nth-child(5),.q-protocol-preview th:nth-child(5){text-align:left;min-width:120px}

.race-export-group{margin:0 0 24px}.race-export-group h3{margin:0;padding:10px 14px;background:#171717;color:#fff;font-size:16px}.race-export-group .table-wrap{max-height:none;overflow-x:auto;-webkit-overflow-scrolling:touch}.race-export-group+.race-export-group{margin-top:24px}
