.route-coder { max-width: 1120px; margin: 0 auto; color: #243f44; letter-spacing: 0; }
.route-coder [hidden] { display: none !important; }
.coder-scene { display: block; width: 100%; height: auto; max-height: 190px; object-fit: contain; }
.coder-status, .coder-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 0; }
.coder-status { justify-content: space-between; border-bottom: 1px solid #819f9e; }
.route-coder h2 { font-size: 24px; line-height: 1.35; }
.route-coder h3 { font-size: 18px; margin: 18px 0 8px; }
.route-coder p, .route-coder li, .route-coder h2 { overflow-wrap: anywhere; }
.coder-goal { border-left: 5px solid #247167; background: #edf8f4; padding: 12px 16px; font-weight: 700; }
.coder-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); border-block: 2px solid #819f9e; }
.coder-map-area { padding: 18px; background: #eef8f7; min-width: 0; grid-row: 1 / 3; }
.coder-editor { padding: 18px; min-width: 0; }
.coder-execution { padding: 0 18px 18px; min-width: 0; grid-column: 2; }
.coder-view { display: none; }
.route-coder button, .route-coder select { font: inherit; min-height: 44px; max-width: 100%; border: 1px solid #617f80; border-radius: 5px; background: #fff; color: #243f44; padding: 8px 12px; }
.route-coder button { cursor: pointer; }
.route-coder button:disabled { cursor: default; opacity: .55; }
.route-coder .primary-action { color: #fff; background: #21695f; border-color: #21695f; }
.route-coder :is(button, select, summary):focus-visible { outline: 3px solid #9a3059; outline-offset: 3px; }
.route-coder label { display: block; font-weight: 700; margin-bottom: 6px; }
#coder-case { width: 100%; }
#coder-map { display: block; width: 100%; aspect-ratio: 1; height: auto; margin-top: 12px; overflow: visible; }
#coder-position { min-height: 48px; font-weight: 700; }
.coder-key { font-size: 14px; }
#coder-edit { border: 0; padding: 0; min-width: 0; }
#coder-edit legend { font-weight: 700; font-size: 20px; margin-bottom: 12px; }
.coder-add { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 6px; margin-top: 12px; }
.coder-add label { grid-column: 1 / -1; }
#coder-command { width: 100%; min-width: 0; }
#coder-add { padding: 0; font-size: 26px; }
#coder-main, #coder-pickup { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.coder-line { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 6px; align-items: center; border-left: 4px solid #247167; background: #f1f6f5; padding: 6px; border-radius: 4px; }
.coder-line.is-current { background: #fff0bb; border-left-color: #825813; outline: 2px solid #825813; }
.coder-line-number { font-size: 14px; text-align: center; font-weight: 700; }
.coder-line select { width: 100%; padding-inline: 5px; min-width: 0; font-size: 15px; }
.coder-line-tools { display: flex; gap: 3px; }
.coder-line-tools button { width: 44px; padding: 8px; }
.coder-line-tools svg { width: 22px; height: 22px; display: block; fill: none; stroke: currentColor; stroke-width: 2; }
#coder-main-count, #coder-pickup-count { font-size: 14px; font-weight: 400; }
#coder-feedback { min-height: 54px; font-weight: 700; color: #21695f; }
#coder-feedback.is-error { color: #922b47; }
#coder-trace { max-height: 220px; overflow: auto; padding-left: 28px; }
#coder-trace li { padding: 3px; }
.route-coder summary { min-height: 44px; cursor: pointer; font-weight: 700; }
#coder-ready { padding-block: 20px; }
@media (max-width: 900px) {
    .coder-workspace { grid-template-columns: minmax(0, 1fr); }
    .coder-map-area { padding: 12px; grid-row: auto; }
    .coder-execution { grid-column: 1; }
    #coder-map { max-width: 330px; margin-inline: auto; }
    .coder-view { display: flex; gap: 16px; border: 0; padding: 0; margin: 12px 0; }
    .coder-view legend { font-weight: 700; margin-bottom: 6px; }
    .coder-view label { display: flex; gap: 8px; align-items: center; min-height: 44px; margin: 0; padding: 4px 16px; background: #fff; border: 1px solid #617f80; border-radius: 5px; cursor: pointer; }
    .coder-view label:has(input:checked) { background: #21695f; color: #fff; }
    .coder-view input { accent-color: #21695f; }
    [data-view="test"] .coder-editor, [data-view="build"] .coder-map-area { display: none; }
}
@media (max-width: 480px) { .coder-editor { padding: 14px 0; } .coder-line { grid-template-columns: 24px minmax(0, 1fr); } .coder-line-tools { grid-column: 2; justify-content: end; } .route-coder h2 { font-size: 22px; } }
@media (prefers-reduced-motion: no-preference) { #coder-robot { transition: transform .2s ease-out; } }
