dialog.tour-dialog {
  width:488px;
  max-width:calc(100vw - 24px);
  max-height:calc(100dvh - 20px);
}
.tour-dialog .dialog-inner {padding:23px 26px 21px}
.tour-dialog h2 {margin:8px 0 15px;font-size:clamp(29px,6vw,38px)}
.tour-dialog #dialogActions:empty {display:none}
.tour-sheet {color:var(--ink);font-family:var(--body)}
.tour-log,.tour-result,.tour-setup {min-width:0}
.tour-table {width:100%;border-collapse:collapse;table-layout:fixed;color:var(--ink);font-family:var(--body)}
.tour-table thead {border-top:2px solid var(--ink);border-bottom:1px solid #90917c}
.tour-table thead th,.tour-setup legend,.tour-total>span {
  font:700 11px/1.2 var(--narrow);text-transform:uppercase;letter-spacing:.09em
}
.tour-table thead th {padding:6px 0 5px;color:#505b4b;text-align:right}
.tour-table thead th:first-child {width:54%;text-align:left}
.tour-table tbody tr {border-bottom:1px solid #aaa992}
.tour-table tbody td,.tour-table tbody th {padding:6px 0}
.tour-table .tour-stage {text-align:left;font-size:15px;line-height:1.13}
.tour-identity {display:flex;align-items:baseline;gap:8px}
.tour-index {font:700 11px/1 var(--mono);color:#646d5a}
.tour-current .tour-index {color:var(--red)}
.tour-substage {display:block;margin:3px 0 0 22px;color:#5c6453;font:12px/1 var(--body)}
.tour-current .tour-substage {color:#9b3324;font-weight:650}
.tour-time,.tour-target {text-align:right;white-space:nowrap;font:700 16px/1.1 var(--mono);letter-spacing:-.07em}
.tour-target {color:#5d6756;font-weight:400}
.tour-detail {display:flex;justify-content:space-between;align-items:baseline;gap:8px;padding-top:7px;font-size:14px}
.tour-detail b {white-space:nowrap;font:700 16px/1 var(--mono);letter-spacing:-.06em}
.tour-penalty {color:#765443;font-size:12px}
.tour-penalty b {font-size:13px}
.tour-setup {margin:17px 0 0;padding:0;border:0}
.tour-setup legend {margin:0 0 6px;padding:0;color:#495544}
.tour-choices {display:grid;grid-template-columns:1fr 1fr;gap:6px}
.tour-tyre {
  display:flex;flex-direction:column;align-items:stretch;gap:5px;
  background:#f8edcf45;border:1px solid #92947c;padding:8px 9px;cursor:pointer
}
.tour-tyre:has(input:checked) {border-color:#a33826;background:#f2d5ab;box-shadow:inset 3px 0 #aa3e2d}
.tour-tyre:has(input:focus-visible) {outline:2px solid #313f32;outline-offset:2px}
.tour-tyre:has(input:disabled) {cursor:default;background:#ddd6c2;border-style:dashed;color:#616555}
.tour-tyre-head {display:flex;align-items:center;gap:6px;font:700 15px/1.15 var(--body)}
.tour-tyre input {margin:0;width:14px;height:14px;accent-color:#a43828}
.tour-tyre-note {font:13px/1.24 var(--body)}
.tour-stock {color:#775139;font:600 11px/1.1 var(--narrow)}
.tour-tyre:has(input:disabled) .tour-stock {color:#585d4f}
.tour-actions {display:flex;align-items:center;gap:12px;margin-top:15px}
.tour-go,.tour-back {min-height:42px;padding:7px 12px;font:700 16px/1.15 var(--body)}
.tour-go {flex:1;background:var(--red);border:1px solid #892e21;color:#fff2d9;box-shadow:0 2px 0 #7c2a21}
.tour-go:hover {background:#a63223}
.tour-back {border:0;background:none;color:var(--ink);text-decoration:underline;text-underline-offset:3px}
.tour-result {margin-bottom:15px}
.tour-total {display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:0 0 6px;border-bottom:2px solid var(--ink)}
.tour-total>strong {font:700 clamp(32px,8vw,44px)/1.07 var(--mono);letter-spacing:-.105em;font-variant-numeric:tabular-nums}
.tour-delta b {color:#983c2b}
.tour-delta.tour-within b {color:#365c43}
@media (max-width:400px) {
  .tour-dialog .dialog-inner {padding:17px 14px 15px}
  .tour-dialog h2 {margin-bottom:12px}
  .tour-tyre {padding:7px}
  .tour-table thead th:first-child {width:51%}
  .tour-identity {gap:5px}
  .tour-substage {margin-left:19px}
}
@media (max-width:366px) and (max-height:650px) {
  .tour-dialog .dialog-inner{padding:12px}
  .tour-dialog .tour-explainer{font-size:13px;margin-bottom:7px}
  .tour-dialog h2{margin:5px 0 9px}
  .tour-table tbody td,.tour-table tbody th{padding:4px 0}
  .tour-setup{margin-top:10px}.tour-actions{margin-top:10px}
}
@media (max-height:510px) and (min-width:590px) {
  dialog.tour-dialog {width:728px;max-height:calc(100dvh - 12px)}
  .tour-dialog .dialog-inner {padding:12px 18px}
  .tour-dialog h2 {font-size:29px;margin:4px 0 9px}
  .tour-sheet {display:grid;grid-template-columns:minmax(0,1.06fr) minmax(0,1fr);column-gap:20px;align-items:start}
  .tour-setup {margin:0}
  .tour-actions {grid-column:1/-1;justify-content:flex-end;margin-top:12px}
  .tour-go {flex:0 1 220px}
  .tour-result {margin:0}
}
