.cockpit-ready { --cockpit-accent: #74b6ff; --cockpit-active: #16385c; }
.cockpit-ready[data-car-accent="orange"] { --cockpit-accent: #ffb26e; --cockpit-active: #4c2d1b; }
.cockpit-ready [hidden] { display: none !important; }
.cockpit-ready header.term-bar { gap: 10px; padding: 10px 24px; }
.cockpit-ready .term-dots, .cockpit-ready #lampTask, .cockpit-ready #phaseBadge { display: none; }
.cockpit-ready .term-title { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; }
.cockpit-ready .term-title::before { content: ""; }
.cockpit-ready .competition-identity { background: #122131; border-bottom-width: 1px; }
.cockpit-ready .competition-identity__mode { border: 0; border-radius: 0; padding: 0; }
.cockpit-ready .competition-identity strong { color: var(--cockpit-accent); }
.cockpit, .cockpit-details, .cockpit-stop { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
.cockpit { max-width: 1480px; margin: 0 auto; padding: 22px 24px 12px; font-size: 16px; }
.cockpit button, .cockpit select, .cockpit input { font-family: inherit; font-size: 14px; min-height: 42px; border-radius: 7px; }
.cockpit button:disabled { opacity: .55; }
.cockpit button:focus-visible { outline-color: var(--cockpit-accent); }
.cockpit-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.cockpit-kicker { font-size: 12px; color: var(--cockpit-accent); letter-spacing: .1em; }
.cockpit h1 { margin: 3px 0 0; font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -.04em; font-weight: 650; }
.cockpit h2 { margin: 0; font-size: 16px; font-weight: 650; }
.cockpit-health { display: grid; justify-items: end; gap: 6px; font-size: 13px; color: var(--dim); }
.cockpit-health button { padding: 7px 12px; border-color: var(--cockpit-accent); color: var(--cockpit-accent); }
.cockpit-connection-details { padding: 14px 16px; margin-bottom: 18px; border: 1px solid #395067; border-radius: 8px; }
.cockpit-link-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cockpit-link-grid > div { min-width: 0; display: grid; align-content: start; gap: 6px; }
.cockpit-link-grid span { color: #91a7b9; font-size: 12px; }
.cockpit-link-grid strong { color: #e3c693; font-size: 15px; }
.cockpit-link-grid [data-tone="ok"] strong { color: #9cdabc; }
.cockpit-link-grid p, #cockpitConnectionResult { margin: 0; font-size: 13px; line-height: 1.6; color: #a7bac9; overflow-wrap: anywhere; }
#cockpitConnectionResult { margin-top: 12px; padding-top: 10px; border-top: 1px solid #293c4e; }
@media (max-width: 700px) { .cockpit-link-grid { grid-template-columns: 1fr; gap: 14px; } }
.cockpit-board-services { border: 1px solid #395067; border-radius: 8px; padding: 14px 16px; margin-bottom: 18px; }
.cockpit-board-services dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 18px; margin: 14px 0; }
.cockpit-board-services dt { font-size: 12px; color: #91a7b9; }
.cockpit-board-services dd { margin: 5px 0 0; font-size: 13px; color: #cfdee9; overflow-wrap: anywhere; }
.cockpit-board-services p { color: #91a7b9; font-size: 12px; line-height: 1.7; margin: 0; }
.cockpit-board-services > button { margin: 12px 0 8px; min-height: 44px; padding: 10px 18px; border-color: var(--cockpit-accent); color: var(--cockpit-accent); }
.cockpit-board-services > button:disabled { opacity: .65; }
#cockpitServiceFeedback { color: #cfdee9; }
@media (max-width: 700px) { .cockpit-board-services dl { grid-template-columns: 1fr; } }
#cockpitConnection { color: var(--warn); font-size: 14px; }
#cockpitConnection[data-tone="ok"] { color: var(--accent); }
.cockpit-modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
.cockpit-modes button { display: grid; grid-template-columns: 30px 1fr; text-align: left; align-items: center; column-gap: 8px; padding: 14px 16px; border-color: #27394b; background: #101a25; }
.cockpit-modes button > span { grid-row: span 2; color: var(--dim); font-family: Menlo, monospace; font-size: 17px; }
.cockpit-modes strong { font-size: 16px; }
.cockpit-modes small { margin-top: 3px; font-size: 12px; color: #91a6b8; }
.cockpit-modes button[aria-pressed="true"] { border-color: var(--cockpit-accent); background: var(--cockpit-active); box-shadow: inset 0 -3px var(--cockpit-accent); }
.cockpit-modes button[aria-pressed="true"] > span { color: var(--cockpit-accent); }
.cockpit-grid { display: grid; grid-template-columns: minmax(180px, .75fr) minmax(270px, 1.6fr) minmax(250px, 1fr); gap: 14px; align-items: stretch; }
.cockpit-grid > * { min-width: 0; border: 1px solid #293c4e; border-radius: 12px; background: #0e1823; }
.cockpit-setup, .cockpit-drive { padding: 20px; }
.cockpit-setup h2 { margin-bottom: 18px; }
.cockpit-setup label { display: grid; gap: 7px; margin: 0 0 15px; font-size: 14px; color: #9aafc0; min-width: 0; }
.cockpit-setup input, .cockpit-setup select { width: 100%; max-width: 100%; min-width: 0; color: var(--fg); padding-inline: 8px; }
.cockpit-setup .known-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cockpit-setup .known-field-row label:first-child { grid-column: 1/-1; }
.cockpit-muted, .cockpit-setup p { font-size: 13px; color: #93a8ba; line-height: 1.7; }
#cockpitClaim button { width: 100%; margin-top: 8px; }
.cockpit-view { display: flex; flex-direction: column; padding: 16px; background: #111f2c; }
.cockpit-view-heading { display: grid; gap: 4px; }
.cockpit-view-heading span { font-size: 12px; color: #8ca4b8; }
#cockpitRouteMap { flex: 1; display: grid; place-items: center; margin-top: 10px; }
#cockpitRouteMap .known-maze-grid { width: 100%; max-width: 380px; border: 0; padding: 0; background: transparent; }
#cockpitRouteMap svg { display: block; width: 100%; max-height: 370px; }
#cockpitExploreMap { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 12px; min-height: 330px; }
.cockpit-empty { text-align: center; font-size: 14px; color: #92a8bc; margin: 8px 10px; }
#cockpitExploreMap pre.ascii { min-height: 160px; text-align: center; max-width: 100%; font-size: clamp(13px, 1.5vw, 20px); background: #0c1620; border: 1px solid #24394b; border-radius: 8px; }
.cockpit-map-tools { display: flex; gap: 8px; margin-top: 8px; }
.cockpit-map-tools button { flex: 1; font-size: 13px; }
.cockpit-drive { display: flex; flex-direction: column; gap: 10px; }
.cockpit-drive h2 { font-size: 23px; line-height: 1.3; letter-spacing: -.035em; }
.cockpit-drive > p { margin: 0; font-size: 14px; line-height: 1.65; color: #a7bac9; }
.cockpit-drive button { width: 100%; }
.cockpit-progress { display: grid; gap: 5px; margin: 6px 0; padding-block: 13px; border-block: 1px solid #2a3b4a; }
.cockpit-progress span { font-size: 12px; color: var(--dim); }
.cockpit-progress strong { font-size: 17px; color: #e4eef5; }
.cockpit-progress small { font-size: 12px; color: #97b0c5; }
.cockpit-drive .cockpit-start { min-height: 54px; background: var(--cockpit-accent); border: 0; color: #0b1824; font-size: 17px; font-weight: 700; }
.cockpit-drive .cockpit-start:disabled { background: #243649; color: #98a9b8; opacity: 1; }
.cockpit-drive .cockpit-start:hover:not(:disabled) { filter: brightness(1.1); color: #0b1824; }
.cockpit-drive .cockpit-gate { padding: 10px 12px; border-left: 3px solid #a57e37; background: #24231e; color: #dbc28b; font-size: 13px; }
.cockpit-drive .cockpit-gate[data-tone="ok"] { border-color: var(--accent); color: #9cdabc; background: #142921; }
.cockpit-feedback:empty { display: none; }
.cockpit-drive .cockpit-feedback { color: #ffc49b; overflow-wrap: anywhere; }
.cockpit-stop { color: #f7bd85; border-color: #806445; padding: 8px 16px; white-space: nowrap; }
.cockpit-telemetry { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 14px; padding: 15px 4px; border-block: 1px solid #253747; }
.cockpit-telemetry > div { display: grid; gap: 7px; padding: 0 16px; border-right: 1px solid #253747; }
.cockpit-telemetry > div:last-child { border-right: 0; }
.cockpit-telemetry span { color: #91a7b9; font-size: 12px; }
.cockpit-telemetry strong { font-family: "SF Mono", Menlo, monospace; font-size: 17px; font-weight: 500; }
.cockpit-evidence-note { font-size: 12px; color: #7e95a8; margin: 12px 0 0; }
.cockpit-marker-status { display: grid; gap: 5px; padding: 12px 16px; margin-bottom: 14px; border: 1px solid #395067; border-radius: 8px; font-size: 13px; color: #acbed0; overflow-wrap: anywhere; }
.cockpit-marker-status strong { color: var(--cockpit-accent); }
#cockpitTakeover { border-color: #b8864d; color: #ffd09b; min-height: 46px; }
#cockpitFinishRemote { min-height: 50px; margin-top: 6px; background: #16385c; border-color: var(--cockpit-accent); color: #ecf5ff; font-size: 16px; }
.remote-print-panel { margin: 20px 24px; padding: 22px; border: 1px solid #395067; border-radius: 8px; }
.remote-print-panel h2 { margin: 0 0 10px; font: 600 20px -apple-system, "PingFang SC", sans-serif; }
.remote-print-panel p { max-width: 850px; font-size: 14px; line-height: 1.7; color: #afc1d0; overflow-wrap: anywhere; }
.remote-print-panel .final-svg svg { width: min(100%, 400px); height: auto; background: white; }
.remote-print-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.remote-print-actions button { min-height: 44px; padding: 10px 18px; font: 14px -apple-system, "PingFang SC", sans-serif; }
.remote-print-panel summary { cursor: pointer; padding-block: 10px; }
.remote-print-panel pre { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 700px) { .remote-print-panel { margin: 16px 12px; padding: 16px; } .remote-print-actions button { flex: 1 1 160px; } }
#cockpitReposition { display: flex; align-items: start; gap: 8px; font-size: 13px; line-height: 1.5; color: #e3c693; }
#cockpitReposition input { width: 18px; min-height: 18px; margin: 3px 0 0; flex: 0 0 18px; }
.cockpit-remote-pad { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; gap: 9px; padding-top: 12px; }
.cockpit-remote-pad > div:not(.cockpit-remote-banner) { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; gap: 7px; }
.cockpit-remote-pad button { min-width: 76px; min-height: 73px; display: grid; gap: 3px; place-content: center; font-size: 23px; border-color: #395067; background: #1b2c3c; opacity: 1; color: #7d96aa; }
.cockpit-remote-pad strong { font-size: 12px; font-weight: 500; }
.cockpit-remote-pad button:enabled { color: #e4eef5; border-color: var(--cockpit-accent); }
.cockpit-remote-pad button:enabled:active { background: var(--cockpit-active); }
.cockpit-drive .cockpit-remote-pad { flex: 0 0 auto; }
.cockpit-drive .cockpit-remote-pad > button { width: calc((100% - 14px) / 3); }
.cockpit-remote-pad p { font-size: 12px; color: #829cb0; text-align: center; }
.cockpit-remote-banner { border: 1px solid #5b5235; color: #dac082; background: #29271e; padding: 8px 12px; font-size: 13px; margin-bottom: 8px; }
.cockpit-details { max-width: 1432px; margin: 14px auto; border: 1px solid #293c4e; border-radius: 8px; background: #0e1721; }
.cockpit-details > summary { cursor: pointer; padding: 16px 20px; font-size: 15px; font-weight: 600; }
.cockpit-details > summary span { margin-left: 15px; font-weight: 400; font-size: 13px; color: #8fa6b9; }
.cockpit { scroll-margin-top: 85px; border-top: 2px solid #395067; }
#cockpitParamSummary { display: block; font-size: 14px; overflow-wrap: anywhere; margin: 8px 0 18px; color: #d8e9f6; }
.cockpit-jump { color: var(--cockpit-accent); text-decoration: none; white-space: nowrap; font-size: 14px; }
@media (min-width: 1500px) { .cockpit { padding-inline: 24px; } }
@media (max-width: 1100px) {
  .cockpit-grid { grid-template-columns: minmax(180px, .8fr) minmax(240px, 1fr); }
  .cockpit-view { grid-column: 1; grid-row: 1 / 3; }
  .cockpit-drive { grid-column: 2; grid-row: 1; }
  .cockpit-setup { grid-column: 2; grid-row: 2; }
  .cockpit-modes button { padding: 12px 10px; grid-template-columns: 1fr; }
  .cockpit-modes button > span { display: none; }
  .cockpit-details { margin-inline: 24px; }
  .cockpit-ready .competition-identity small { display: none; }
}
@media (max-width: 700px) {
  .cockpit { padding: 18px 12px 8px; }
  .cockpit-heading { align-items: flex-start; }
  .cockpit-health { max-width: 145px; font-size: 11px; }
  .cockpit h1 { font-size: 23px; }
  .cockpit-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cockpit-modes button { min-height: 70px; }
  .cockpit-modes strong { font-size: 15px; }
  .cockpit-modes small { font-size: 11px; }
  .cockpit-grid { display: flex; flex-direction: column; }
  .cockpit-drive { order: 0; }
  .cockpit-view { order: 1; }
  .cockpit-setup { order: 2; }
  .cockpit-drive h2 { font-size: 22px; }
  .cockpit-telemetry { grid-template-columns: repeat(2, 1fr); row-gap: 18px; }
  .cockpit-telemetry strong { font-size: 15px; }
  .cockpit-telemetry > div:nth-child(2) { border: 0; }
  .cockpit-details { margin: 12px; }
  .cockpit-details > summary span { display: block; margin: 7px 0 0; }
  .cockpit-ready header.term-bar { padding: 9px 12px; gap: 8px; }
  .cockpit-ready header .term-title { font-size: 13px; }
  .cockpit-ready #lampLink { display: none; }
  .cockpit-ready .estop { padding: 7px 12px; letter-spacing: 0; font-size: 14px; }
  .cockpit-stop { padding: 8px 10px; font-size: 13px; }
  .cockpit-ready .competition-identity { flex-wrap: wrap; gap: 5px 10px; padding-inline: 12px; }
  .cockpit-ready .competition-identity strong { font-size: 13px; }
  .cockpit-ready footer.hint { font-size: 12px; }
}

@media (max-width: 700px) { .cockpit-ready header .term-title { display: none; } .cockpit-jump { font-size: 13px; } }
