/* Arcade editor shell: colours identify tools; the existing canvas and controls
   continue to drive the track model. */
:root{--ui-bg:#071325;--ui-panel:#0b1b31f5;--ui-border:#37567f;--ui-cyan:#4ce2f1;--ui-orange:#ffb54d;--ui-violet:#b78aff}
.editor-topbar{position:fixed;z-index:8;top:0;left:0;right:0;min-height:66px;display:flex;align-items:center;gap:18px;padding:8px 268px 8px 16px;background:linear-gradient(105deg,#071328,#132857 54%,#09172b);border-bottom:2px solid #40a4cc;box-shadow:0 4px 20px #06101fb8}
.topbar-brand{display:flex;align-items:center;gap:9px;flex:none;color:#f4faff}.topbar-brand strong{display:block;font-size:19px;font-style:italic;letter-spacing:.03em;font-weight:900;line-height:1}.topbar-brand strong span{color:#ffb344}.topbar-brand small{display:block;margin-top:4px;color:#a8c6de;font-size:9px;font-weight:800;letter-spacing:.18em}.topbar-mark{display:grid;place-items:center;width:42px;height:42px;border:1px solid #4dd3e1;border-radius:9px;background:#123550;color:#b4faff;font-weight:950;font-size:16px}.topbar-mark span{color:#ffc26a}
.topbar-icon{display:block;width:42px;height:42px;object-fit:contain;flex:none}
.workspace-tabs{display:flex;align-items:center;gap:6px;min-width:0}.workspace-tabs button,.topbar-rail{min-height:42px;padding:8px 14px;color:#d6eafd;background:linear-gradient(#2b4365,#142946);border:1px solid #6082a7;font-size:12px;font-weight:800;box-shadow:inset 0 1px #ffffff22}.workspace-tabs button[aria-pressed=true]{color:#051c2b;background:linear-gradient(#8cf6ff,#27c6e5);border-color:#b1fcff;box-shadow:0 0 14px #32d2ee66,inset 0 1px #fff9}.workspace-tabs button:hover,.topbar-rail:hover{border-color:#b9f8ff}.topbar-current{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#a9c5de;font-size:11px;font-weight:700}.topbar-rail{flex:none}
#panel,#editorPanel{top:80px;bottom:14px;background:var(--ui-panel);border:1px solid var(--ui-border);box-shadow:0 14px 42px #020714a8;backdrop-filter:blur(16px)}
#panel{left:12px;width:284px;padding:8px;overflow:auto}#editorPanel{right:12px;width:354px;overflow:auto;padding:8px}#editorPanel .workspace-page>.block,#editorPanel .workspace-page.block{padding:8px;border:0}#editorPanel .workspace-page .block{padding:12px;border-color:#354c70}
.back-to-menu{position:fixed;top:14px;right:133px;z-index:9;min-height:39px;background:#19304d;border-color:#6889a7;color:#e8f7ff}.editor-toggle{position:fixed;top:14px;right:12px;z-index:9;min-height:39px;background:#19304d;border-color:#6889a7;color:#e8f7ff}
.editor-compass{left:310px;top:81px;width:82px;padding:5px;z-index:3;background:#071b2fec;border-color:#447a99}.editor-compass svg{width:70px;height:70px}#message{left:310px;bottom:14px;max-width:calc(100vw - 690px);z-index:6}
.viewport-tools{position:fixed;z-index:4;top:80px;left:405px;display:flex;align-items:center;gap:6px;padding:5px;border:1px solid #427993;border-radius:9px;background:#0a1d31ed;box-shadow:0 5px 16px #07162b55}.viewport-tools button{min-height:36px;background:#1b3858;border-color:#5d88a7;color:#e4f9ff}.viewport-tools span{padding:0 7px;color:#bad2e0;font-size:11px}.menu-mode .viewport-tools,.driving .viewport-tools{display:none}.rail-collapsed .viewport-tools{left:108px}
.editor-triangle-summary{position:fixed;z-index:8;left:310px;bottom:55px;display:flex;align-items:center;gap:8px;padding:6px 10px;border:1px solid #4c7894;border-radius:7px;background:#0a1d31e8;color:#b9d4e4;font-size:11px;white-space:nowrap;pointer-events:none}.editor-triangle-summary strong{color:#91f4ff;font-variant-numeric:tabular-nums}.menu-mode .editor-triangle-summary,.driving .editor-triangle-summary{display:none}.rail-collapsed .editor-triangle-summary{left:14px}
#panel .block{padding:12px;margin:0 0 10px;border:1px solid #3c557a;border-radius:10px;background:#0e1c36}#panel .library-block{border-color:#8b61cb}#panel .library-block>details>summary{color:#f4eaff;background:linear-gradient(100deg,#5c249a,#342061);border-radius:7px;margin:-6px;padding:10px;font-size:14px;letter-spacing:.02em}#panel .rail-sections{border-color:#bd741e}#panel .rail-sections>h2{margin:-6px -6px 8px;padding:10px;border-radius:7px;background:linear-gradient(100deg,#c16a0a,#714515);color:#fff5d9;font-size:14px;letter-spacing:.02em;text-transform:none}.code-drawer>summary{cursor:pointer;color:#b7ebf6;font-weight:800;padding:4px}.code-drawer .block{margin:7px -4px -4px!important;border:0!important;padding:6px!important}
.rail-sections .editor-history{margin-bottom:9px}.rail-sections .actions{flex-wrap:wrap}.rail-sections .actions>*{min-height:36px}.rail-sections .editor-section-actions{display:grid;grid-template-columns:minmax(0,1fr) 36px 48px minmax(0,1fr)}.rail-sections .editor-section-actions>*{width:auto;min-width:0;padding:5px 3px;font-size:10px}.rail-sections .editor-section-actions>.editor-copy,.rail-sections .editor-section-actions>.editor-split{width:auto}.rail-sections .editor-delete-actions>button{flex:1}.rail-sections .field{color:#c1d5e5}.rail-sections #sectionList{height:205px}
.enhanced-section-list .section-native-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.section-buttons{display:grid;gap:5px;max-height:260px;overflow:auto;padding:3px;scrollbar-color:#6482a5 #102039}.section-button{display:flex;justify-content:flex-start;gap:9px;min-height:42px;width:100%;padding:6px 8px;text-align:left;white-space:normal;border-color:#46658a;background:linear-gradient(110deg,#1c3557,#12243d);font-size:11px}.section-button-icon{display:grid;place-items:center;flex:none;width:30px;height:29px;border-radius:6px;background:#28496a;color:#a8efff;font-size:18px;font-weight:900}.section-button-label{line-height:1.25}.section-button[aria-selected=true]{color:#08232d;background:linear-gradient(100deg,#74edf4,#32bbdf);border-color:#d1ffff;box-shadow:0 0 0 1px #55eaff,0 0 12px #1abbd777}.section-button[aria-selected=true] .section-button-icon{background:#0a7699;color:#fff}
#sectionTitle{margin:0 0 4px;padding:11px 12px;color:#fff9eb;border-radius:8px;background:linear-gradient(100deg,#d67b14,#8d4d13);font-size:15px;letter-spacing:.03em;text-transform:none}#sectionSummary{padding:3px 3px 0;font-size:12px;color:#d2e7f3}#sectionHelp{margin:5px 3px 12px;font-size:11px}#sectionFields,#sectionShapeFields,#sectionDetailFields,#sectionGeometryFields,#sectionRaceFields{border:0;margin:0;padding:0;min-width:0}#editorPanel .editor-grid{grid-template-columns:minmax(0,1fr);gap:0}#editorPanel .editor-wide{grid-column:auto}
.inspector-group{--accent:#4bb8ed;--head1:#245e9e;--head2:#163f72;margin:8px 0;border:1px solid var(--accent);border-radius:9px;background:#0c1c32;overflow:hidden}.inspector-group.green{--accent:#68d475;--head1:#23782d;--head2:#175029}.inspector-group.purple{--accent:#c488fa;--head1:#7036a9;--head2:#482b76}.inspector-group.pink{--accent:#ee75c3;--head1:#a72b83;--head2:#6a285e}.inspector-group.amber{--accent:#f3c65e;--head1:#9e6b10;--head2:#705013}.inspector-group.cyan{--accent:#61dce8;--head1:#087788;--head2:#14515e}.inspector-group.red{--accent:#ff8a9a;--head1:#a93754;--head2:#772f49}
.inspector-group>summary{display:flex;align-items:center;gap:10px;min-height:44px;padding:8px 11px;cursor:pointer;list-style:none;color:#fff;background:linear-gradient(105deg,var(--head1),var(--head2));font-size:14px;font-weight:850;letter-spacing:.01em;box-shadow:inset 0 1px #ffffff35}.inspector-group>summary::-webkit-details-marker{display:none}.inspector-group>summary::after{content:'▾';margin-left:auto;color:#e8f7ff;font-size:14px}.inspector-group[open]>summary::after{content:'▴'}.group-icon{display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:6px;background:#ffffff20;color:white;font-size:18px}.group-body{padding:4px 11px 12px}.group-body .field{color:#d0e0ed;font-size:12px;font-weight:650}.group-body .help{color:#adc1d3;font-size:11px}.inspector-group .editor-apply,.inspector-group button.editor-wide{width:100%;margin-top:10px}.quiet-apply{background:#243b59;border-color:#58789b;color:#e7f4ff}
.start-direction-buttons{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:8px 0}.start-direction-buttons button{min-width:0;min-height:36px;padding:5px;border-color:#4b90a6;background:#17435b;color:#e8fcff;font-weight:800}.start-direction-buttons button[aria-pressed=true]{background:#2fc3d5;color:#061d29;border-color:#a1f5ff}.start-direction-buttons button:focus-visible{outline:2px solid #c4fbff;outline-offset:2px}
.shape-advanced{margin-top:12px}.shape-advanced>summary{cursor:pointer;color:#bce7ff;font-size:12px;font-weight:700}
.choice-hint{display:flex;align-items:center;gap:7px;margin-top:7px;color:#b9d0df;font-size:11px;font-weight:600}.choice-swatch{display:inline-block;width:22px;height:14px;border:1px solid #ffffff75;border-radius:3px;flex:none}
#panel select,#editorPanel select,#panel input[type=text],#editorPanel input[type=text],#panel input[type=number],#editorPanel input[type=number]{min-height:40px;background:#10243c;border-color:#537597;color:#f1f8ff;font-size:13px}#panel button,#editorPanel button{font-size:12px}#editorPanel .editor-advanced>summary{font-size:13px;color:#cbe8ff}#panel .primary,#editorPanel .primary{background:#1fac79;border-color:#7be8bb;color:#031b15}#panel .primary:hover,#editorPanel .primary:hover{background:#54d99f}
.number-stepper{display:grid;grid-template-columns:42px minmax(0,1fr) 42px;gap:5px;width:100%;margin-top:5px}.number-stepper input[type=number]{min-width:0!important;width:100%!important;margin:0!important;text-align:center;font-variant-numeric:tabular-nums;-moz-appearance:textfield;appearance:textfield}.number-stepper input::-webkit-inner-spin-button,.number-stepper input::-webkit-outer-spin-button,.range-number::-webkit-inner-spin-button,.range-number::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.number-stepper .stepper-button{min-height:42px;padding:0;border-color:#5d8ab4;background:linear-gradient(#335b83,#1b3b5e);font-size:21px!important;font-weight:800}.number-stepper .stepper-button:hover{background:#3c79a2;border-color:#9defff}fieldset:disabled .number-stepper .stepper-button{opacity:.4;pointer-events:none}.range-number{display:block;width:90px!important;margin:7px 0 0 auto!important;min-height:36px!important;text-align:right;-moz-appearance:textfield;appearance:textfield}
.number-stepper:has(input:disabled) .stepper-button{opacity:.4;pointer-events:none}
#panel :is(button,input,select,summary):focus-visible,#editorPanel :is(button,input,select,summary):focus-visible,.editor-topbar button:focus-visible,.editor-toggle:focus-visible,.back-to-menu:focus-visible{outline:3px solid #a0f8ff;outline-offset:2px}
.menu-mode .editor-topbar,.driving .editor-topbar{display:none!important}.rail-collapsed #panel{display:none}.rail-collapsed .editor-compass{left:14px}.rail-collapsed #message{left:14px;max-width:calc(100vw - 390px)}
@media(max-width:1200px){.editor-topbar{gap:8px;padding-right:247px}.topbar-brand strong{font-size:16px}.topbar-mark,.topbar-icon{width:35px;height:35px}.workspace-tabs button,.topbar-rail{padding:7px 9px;font-size:11px}.topbar-current{display:none}}
@media(max-width:1000px){
  .editor-topbar{min-height:104px;align-content:flex-start;flex-wrap:wrap;gap:5px;padding:6px 10px}.topbar-brand small,.topbar-mark,.topbar-current{display:none}.topbar-brand{min-height:39px}.topbar-rail{min-height:38px}.workspace-tabs{order:5;flex:0 0 100%;width:100%;overflow:visible}.workspace-tabs button{flex:1 1 0;min-width:0;min-height:39px;padding:5px 6px}.back-to-menu{top:8px;right:132px}.editor-toggle{top:8px;right:10px}
  #panel{top:114px;bottom:8px;width:270px;max-height:none;z-index:7}body:not(.rail-open) #panel{display:none}#editorPanel{top:114px;bottom:8px;width:320px;max-height:none}.editor-compass{top:114px;bottom:auto}.rail-collapsed .editor-compass{left:12px}.rail-collapsed #message{max-width:calc(100vw - 360px)}body.rail-open #editorPanel{visibility:hidden}
  .viewport-tools{left:300px;top:114px}.rail-collapsed .viewport-tools{left:105px}.viewport-tools span{display:none}.editor-triangle-summary{left:300px}.rail-collapsed .editor-triangle-summary{left:12px}
}
@media(max-width:750px){.topbar-brand strong{font-size:14px}.workspace-tabs button{font-size:10px;white-space:normal}.editor-toggle{min-width:105px}#editorPanel{width:min(320px,calc(100vw - 45px))}.viewport-tools,.rail-collapsed .viewport-tools{top:auto;left:8px;bottom:55px}.editor-triangle-summary,.rail-collapsed .editor-triangle-summary{left:auto;right:8px;bottom:105px}.rail-collapsed #message{left:8px;right:8px;bottom:8px;max-width:none;max-height:40px}}
@media(prefers-reduced-motion:reduce){.workspace-tabs button,.section-button{transition:none}}
#builderPackStatus.error{color:#ffb6a9}
#multiTrackActions{border:0;margin:0;padding:0;min-width:0}
#editorPanel .rail-sections{border-color:#bd741e;background:#0e1c36;margin:0 0 12px;border-radius:10px}
#editorPanel .rail-sections>h2{margin:-6px -6px 8px;padding:10px;border-radius:7px;background:linear-gradient(100deg,#c16a0a,#714515);color:#fff5d9;font-size:14px;text-transform:none}
.multi-templates{margin-top:12px;border-top:1px solid #a66fde;padding-top:10px}.multi-templates>summary{cursor:pointer;font-weight:800;color:#e5c8ff}.multi-templates .actions button{flex:1}.multi-templates input,.multi-templates select{width:100%}
#multiCombine:not(:disabled){background:linear-gradient(#52d787,#14945c);border-color:#9bffc5;color:#052817;font-weight:850}
#multiApply:not(:disabled){background:linear-gradient(#62d9f5,#1689b8);border-color:#b6f5ff;color:#06263d;font-weight:850}
.section-button.section-primary[aria-selected=true]{outline:2px solid #ffe36b;outline-offset:-3px}
