/* The creator uses a library and a focused canvas, independent of the driving HUD. */
#editor{position:fixed;inset:0;z-index:20;background:#101c25;color:#edf3f6;font:16px/1.5 system-ui,sans-serif;display:block;overflow:hidden}
#editor *{box-sizing:border-box}#editor button,#editor input,#editor select,#editor textarea{font:inherit;font-size:14px}
#editor button,#editor a{min-height:44px}#editor button{border:1px solid #425465;border-radius:9px;padding:9px 13px;background:#20313f;color:#edf3f6;line-height:1.35}
#editor button:hover{background:#2d4353}#editor button:disabled{opacity:.4;cursor:default}
#editor a{color:#a5d1ec}#editor button:focus-visible,#editor input:focus-visible,#editor select:focus-visible,#editor textarea:focus-visible{outline:2px solid #f2c478;outline-offset:2px}
#editor input,#editor select,#editor textarea{width:100%;min-width:0;min-height:44px;border:1px solid #465c6c;border-radius:7px;padding:9px 10px;margin:6px 0 0;background:#152632;color:#f5f5ee}
#editor input[type=range]{padding:0;border:0;background:transparent;accent-color:#f1c27a;height:26px;min-height:26px;cursor:pointer}
#editor .creator-primary{background:#efbe70;border-color:#efbe70;color:#1a2530;font-weight:650}
#editor .creator-primary:hover{background:#f7d396}
#editor .quiet-button{background:transparent}
.creator-home{height:100%;overflow-y:auto}
.creator-home-header{display:flex;align-items:center;justify-content:space-between;gap:18px;border-bottom:1px solid #344854;padding:24px max(24px,calc((100vw - 1180px)/2))}
.creator-home-header>div{display:flex;gap:20px;align-items:center}.creator-home-header span{font-size:13px;color:#94abba;letter-spacing:.12em}
#editor .creator-brand{color:#f4f4ee;text-decoration:none;font-size:21px;letter-spacing:.13em;font-weight:800}
.creator-home-header nav{gap:10px}.creator-home-header nav a{background:transparent;border:0;padding:10px;color:#bbccda}
.creator-library{max-width:1180px;margin:auto;padding:38px 24px 70px}
.library-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:32px}
.library-heading h1{font-size:32px;letter-spacing:-.025em;margin:0 0 6px}.library-heading p{margin:0;color:#a8bfce}
.library-tabs{display:flex;gap:7px;border-bottom:1px solid #344854;padding-bottom:12px;align-items:center;flex-wrap:wrap}
#editor .library-tabs button{background:transparent;border-color:transparent;color:#a7bfce}
#editor .library-tabs [aria-selected=true]{background:#263c4c;color:#fff;border-color:#516a7b}
#editor .library-tabs .library-refresh{margin-left:auto}
#library-status{color:#a8bfce;font-size:14px;margin:17px 0}
.map-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:20px}
.map-card{border:1px solid #3b5362;border-radius:14px;background:#192a36;overflow:hidden;display:flex;flex-direction:column}
.map-card canvas{height:150px;width:100%;background:#12212d;cursor:default;pointer-events:none}
.map-card-content{padding:17px;display:flex;flex-direction:column;gap:10px;flex:1}
.map-card h2{font-size:17px;font-weight:600;line-height:1.35;margin:0}
.map-card p{font-size:14px;color:#a6bfcd;margin:0}
.map-card .map-card-state{font-size:13px;color:#e5c48b}
.map-card button{margin-top:auto;width:100%}
.map-library-empty{grid-column:1/-1;border:1px dashed #4a6375;border-radius:14px;padding:38px 22px;text-align:center}
.map-library-empty strong{font-size:20px}.map-library-empty p{color:#acc1ce;margin:8px 0 22px}
.recovery-card{padding:18px 20px;border:1px solid #9a7849;border-radius:12px;background:#332f28;margin-bottom:22px;display:flex;align-items:center;gap:20px;justify-content:space-between}
.recovery-card p{font-size:14px;color:#d5c4a8;margin:4px 0 0}
.creator-workspace{height:100%;display:flex;flex-direction:column}
.creator-work-header{padding:12px 18px;display:flex;align-items:center;gap:14px;border-bottom:1px solid #364d5a;flex-shrink:0}
#editor .map-name-label{min-width:100px;flex:1;max-width:380px;margin:0}
#editor .map-name-label input{font-size:17px;font-weight:600;margin:0;background:transparent;border-color:transparent}
#editor .map-name-label input:hover,#editor .map-name-label input:focus{border-color:#465c6c;background:#152632}
#save-state{font-size:13px;color:#b6c8d1;white-space:nowrap}
.creator-main-actions{display:flex;gap:8px;margin-left:auto}
.creator-layout{min-height:0;flex:1;display:grid;grid-template-columns:300px minmax(0,1fr)}
.creator-controls{min-height:0;display:flex;flex-direction:column;background:#172834;border-right:1px solid #364d5a;overflow:hidden}
.creator-tool-tabs{display:flex;flex-shrink:0;gap:4px;padding:12px 10px;border-bottom:1px solid #364d5a}
#editor .creator-tool-tabs button{padding:8px 9px;flex:1;border-color:transparent;background:transparent;color:#a9c0cd;white-space:nowrap}
#editor .creator-tool-tabs [aria-selected=true]{color:#f6d291;border-color:#87704e;background:#3b3b34}
#editor #collapse-tools{display:none;flex:0}
.creator-tool-scroll{overflow-y:auto;overscroll-behavior:contain;padding:20px 16px;scrollbar-width:thin;scrollbar-color:#536f80 #172834}
.tool-panel h2{font-size:18px;margin:0 0 7px}.tool-help{font-size:14px;line-height:1.5;color:#a8bfcc;margin:0 0 18px}
#editor label{display:block;font-size:14px;margin:15px 0;color:#e3ebee}
#editor label>span:not(.field-hint){color:#92aaba;font-size:13px}
.creator-field-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.creator-button-pair{display:flex;gap:8px;margin:12px 0}.creator-button-pair>*{flex:1;min-width:0}
#editor fieldset{border:1px solid #526572;border-radius:10px;padding:12px;margin:22px 0 16px}
#editor legend{font-size:14px;color:#f0ca85;padding:0 6px}
#editor details{border-top:1px solid #344c5a;padding-top:13px;margin-top:18px}
#editor summary{font-size:14px;cursor:pointer;color:#c7d8e0;min-height:34px;line-height:1.5}
#editor details[open]>summary{margin-bottom:10px}
#editor output{display:block;font-size:13px;color:#e9c587;margin-top:2px;font-variant-numeric:tabular-nums}
#editor .field-hint{display:block;color:#99b2c1;font-size:13px;margin-top:5px}
#editor .creator-check{display:flex;align-items:center;gap:10px}#editor .creator-check input{width:20px;height:20px;min-height:20px;margin:0;accent-color:#efbe70}
#editor #palette{display:block;overflow:visible;padding:0;position:static}
.palette-group{margin:20px 0}.palette-group h3{font-size:13px;color:#a7c0ce;font-weight:600;margin:0 0 8px}
.palette-buttons{display:grid;grid-template-columns:1fr 1fr;gap:7px}
#editor #palette button{font-size:14px;min-height:46px;padding:10px 8px;white-space:normal;text-align:left;border-radius:8px}
#editor [data-place][aria-pressed=true]{background:#414030;border-color:#d1ac65;color:#ffdc9e}
#editor .creator-help-link{display:block;margin-top:20px;font-size:14px}
#editor #hazards>div{display:flex;gap:5px;border-bottom:1px solid #3b515e;padding:7px 0}
#editor #hazards .hazard-select{border:0;background:none;flex:1;text-align:left;min-height:44px;font-size:14px}
#editor #hazards .hazard-remove{padding:7px;font-size:13px}
.creator-canvas{display:flex;flex-direction:column;min-height:0;padding:14px;gap:10px;background:#101e28}
.creator-canvas-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:10px;flex-shrink:0}
.view-switch,.canvas-edit-buttons{display:flex;gap:5px}
#editor .view-switch [aria-pressed=true]{background:#385567;border-color:#7497ac}
#editor #edit-tool{width:auto;max-width:170px;margin:0;min-height:42px}
#editor #map-stage{position:relative;flex:1;min-height:140px;border-radius:12px;border:1px solid #3d5666;overflow:hidden;background:#132530}
#editor #map{position:absolute;inset:0;border:0;border-radius:0;min-height:0;width:100%;height:100%}
#editor3d{position:absolute;inset:0}
#editor #map-summary{position:absolute;top:13px;left:13px;right:auto;bottom:auto;padding:6px 10px;color:#d4e6ee;background:#132631de;font-size:13px;border-radius:7px;pointer-events:none}
#editor #dimension-readout{position:absolute;bottom:15px;left:13px;right:auto;max-width:calc(100% - 260px);background:#142630c9;color:#c5d6de;padding:7px 10px;font-size:13px;pointer-events:none;border-radius:7px}
#editor .map-navigation{position:absolute;right:10px;bottom:10px;background:#13222be6;padding:4px;border-radius:9px;display:flex;gap:4px}
#editor .map-navigation button{font-size:14px;min-height:40px;padding:7px 11px}
.creator-empty-canvas{position:absolute;top:35%;left:18px;right:18px;display:flex;flex-direction:column;align-items:center;gap:8px;pointer-events:none;text-align:center;color:#d4e8ef}
.creator-empty-canvas strong{font-size:23px}.creator-empty-canvas span{color:#96b2c1;font-size:15px}
.creator-canvas-help{display:flex;align-items:start;justify-content:space-between;gap:12px;font-size:14px;color:#a6bfcc}
#editor #map-help{font-size:14px;margin:0;line-height:1.5;flex:1}
#editor .creator-canvas-help details{margin:0;border:0;padding:0;max-width:360px}
#editor .creator-canvas-help summary{font-size:13px;min-height:0}
#editor .creator-canvas-help details p{font-size:13px;margin:8px 0 0}
.creator-work-footer{padding:10px 18px;display:flex;align-items:center;justify-content:space-between;gap:20px;border-top:1px solid #344c5a;flex-shrink:0}
#editor-status{font-size:14px;margin:0;color:#c0d2da}
#editor-status[data-error=yes],#publish-status[data-error=yes],#library-status[data-error=yes]{color:#ffbda0}
#map-readiness{font-size:13px;color:#92acbc;text-align:right}
#editor .creator-dialog{width:min(460px,calc(100vw - 28px));max-height:calc(100dvh - 30px);overflow:auto;background:#192d3a;color:#f0f2ed;border:1px solid #526f7e;border-radius:16px;padding:28px;box-shadow:0 25px 100px #0008}
.creator-dialog::backdrop{background:#08121ac7}
.creator-dialog h2{font-size:23px;margin:0 0 15px}.creator-dialog p{font-size:15px;color:#bcd0db}
#editor .dialog-close{position:absolute;right:8px;top:8px;border:0;background:transparent;font-size:22px;min-height:36px}
#editor .leave-options{display:grid;gap:10px;margin-top:20px}
#editor #published-play{display:block;text-align:center;margin-top:18px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
/* Touch tools: the map stays visible while the drawer changes height. */
.sheet-handle-row{display:none}.number-stepper>button{display:none}.number-stepper input{margin-top:6px}
.canvas-modes{display:flex;gap:6px;flex-shrink:0}.canvas-modes>button{flex:1;min-width:0}
#editor .selection-actions,#editor .placement-actions{display:flex;align-items:center;gap:6px;flex-shrink:0}
#selection-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;color:#f3d397}
#editor .selection-actions button{padding:9px 12px}
#editor .placement-actions .creator-primary{flex:1}
#editor #repeat-place[aria-pressed=true]{border-color:#efbe70;color:#ffe0a0;background:#49422f}
#editor #placement-aim{position:absolute;left:50%;top:50%;width:34px;height:34px;transform:translate(-50%,-50%);border:2px solid #ffe0a0;border-radius:50%;box-shadow:0 0 0 3px #0e2428a6;pointer-events:none}
#placement-aim::before,#placement-aim::after{content:'';position:absolute;background:#ffe0a0;box-shadow:0 0 2px #142630}
#placement-aim::before{width:44px;height:2px;left:-7px;top:14px}#placement-aim::after{width:2px;height:44px;left:14px;top:-7px}
#touch-hint{display:none}#editor #creator-help{min-width:44px;font-weight:700;font-size:18px}
#editor .creator-help-steps{padding-left:24px;font-size:15px;color:#bcd0db}.creator-help-steps li{padding:0 0 14px 4px}.creator-help-steps strong{color:#fff}
#editor .nudge-pad{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.nudge-pad button:first-child{grid-column:2}.nudge-pad button:nth-child(2){grid-column:1;grid-row:2}.nudge-pad button:nth-child(3){grid-column:3;grid-row:2}.nudge-pad button:last-child{grid-column:2;grid-row:3}
#editor #palette-search{padding-right:8px}#editor .creator-canvas{min-width:0}#editor .creator-canvas-toolbar{justify-content:space-between}
#editor #map-stage{isolation:isolate}#editor .map-navigation button{min-width:44px;min-height:44px}
#editor .creator-tool-scroll{scroll-padding:16px}#editor #creator-help-dialog{padding-top:46px}
@media(max-width:900px), (max-height:540px) and (max-width:1200px){
 #editor{height:var(--creator-vh,100dvh);padding:env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left)}
 #editor button{touch-action:manipulation;min-height:44px}#editor input,#editor select,#editor textarea{font-size:16px}
 #editor input[type=range]{min-height:44px;height:44px}
 #editor input[type=range]::-webkit-slider-thumb{min-width:26px;min-height:26px}
 #editor .creator-check{min-height:48px}
 .creator-home-header{padding:14px 16px;gap:10px}.creator-home-header>div{display:block}.creator-home-header span{display:block;font-size:12px;margin-top:3px}
 .creator-home-header nav{gap:0}.creator-home-header nav a{font-size:14px;padding:8px}
 .creator-library{padding:25px 16px max(40px,env(safe-area-inset-bottom))}.library-heading{display:block;margin-bottom:24px}.library-heading h1{font-size:28px}.library-heading p{font-size:16px}
 #editor #blank-map{width:100%;margin-top:20px}
 .map-card-grid{grid-template-columns:1fr}.map-card{display:grid;grid-template-columns:100px 1fr}
 .map-card canvas{height:100%;min-height:160px}.map-card-content{padding:14px}.map-card-content p{font-size:14px}
 #editor .library-tabs button{padding:9px 7px;font-size:14px}.library-tabs{gap:3px}
 .recovery-card{align-items:stretch;flex-direction:column;gap:12px;padding:16px}
 .creator-work-header{padding:6px 10px 8px;gap:4px 7px;display:grid;grid-template-columns:auto minmax(0,1fr);position:relative}
 #editor #maps-home{font-size:14px;padding:9px}
 #editor .map-name-label{max-width:none;min-width:0;margin:0;padding-bottom:14px}
 #editor .map-name-label input{font-size:16px;min-height:42px;padding:7px 5px}
 #save-state{position:absolute;right:16px;top:44px;font-size:12px;line-height:15px;max-width:calc(100% - 116px);overflow:hidden;text-overflow:ellipsis}
 .creator-main-actions{grid-column:1/-1;gap:6px;margin:0}.creator-main-actions button{flex:1}
 .creator-layout{display:flex;flex-direction:column;min-height:0;position:relative;padding-bottom:93px}
 .creator-canvas{order:0;flex:1;min-height:140px;padding:7px 8px 6px;gap:6px}
 .creator-canvas-toolbar{gap:5px;flex-wrap:wrap;flex-shrink:0}
 #editor .creator-canvas-toolbar button{font-size:14px;padding:8px 10px;white-space:nowrap}
 .canvas-edit-buttons,.view-switch{gap:4px}
 #editor #edit-tool{min-width:100%;max-width:none;font-size:16px;min-height:44px}
 .creator-canvas-help{display:none}
 #editor #map-stage{min-height:90px;border-radius:12px}
 #editor #map-summary{font-size:12px;top:auto;bottom:8px;left:8px;padding:3px 5px;max-width:calc(100% - 215px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 #editor #dimension-readout{display:none}
 #editor #touch-hint{display:block;position:absolute;top:8px;left:8px;right:8px;pointer-events:none;font-size:13px;line-height:1.35;color:#c3d8e3;background:#142630c9;border-radius:6px;padding:5px 8px;text-align:center}
 #editor .map-navigation{right:5px;bottom:5px;padding:3px;gap:3px}
 #editor .map-navigation button{padding:6px 8px;font-size:13px;min-width:44px;min-height:44px}
 .creator-empty-canvas{top:24%;gap:4px;left:16px;right:16px}.creator-empty-canvas strong{font-size:18px}.creator-empty-canvas span{font-size:14px}
 #editor .canvas-modes button{font-size:14px;padding:8px 6px}
 #editor .selection-actions button{padding:8px;font-size:14px}#editor #selection-remove{color:#ffc5ad}
 #editor .placement-actions button{padding:8px;font-size:14px}#editor .placement-actions .creator-primary{min-width:0;line-height:1.15}
 #editor #selection-name{font-size:14px}
 .creator-controls{position:absolute;left:0;right:0;bottom:0;z-index:4;height:min(42dvh,360px);max-height:calc(100% - 70px);min-height:93px;border-right:0;border-top:1px solid #627887;border-radius:16px 16px 0 0;box-shadow:0 -5px 18px #07131b44}
 .creator-controls[data-sheet=peek]{height:93px}.creator-controls[data-sheet=full]{height:min(72dvh,620px)}
 .sheet-handle-row{display:flex;position:relative;flex-shrink:0;height:44px;justify-content:center;align-items:center}
 #editor #sheet-handle{touch-action:none;position:absolute;inset:0 85px 0;min-height:44px;padding:0;background:transparent;border:0;display:grid;place-items:center;z-index:1}
 #sheet-handle span{display:block;width:42px;height:4px;border-radius:9px;background:#8aa1b0}
 #editor #sheet-size{position:absolute;right:12px;top:0;padding:8px 0;min-height:44px;font-size:12px;border:0;background:none;color:#bdd5e3;z-index:2}
 .creator-tool-tabs{padding:0 10px 5px;gap:5px;align-items:center;border:0}
 #editor .creator-tool-tabs button{min-height:44px;font-size:14px;padding:8px 10px}
 #editor #collapse-tools{display:block;flex:0 0 auto;min-width:44px}
 .creator-tool-scroll{padding:12px 16px 24px;border-top:1px solid #344c5a;flex:1;min-height:0}
 .creator-controls[data-sheet=peek] .creator-tool-scroll{display:none}
 #editor .tool-panel h2{font-size:18px}#editor .tool-help{font-size:14px;margin-bottom:14px}
 #editor label{font-size:14px}.creator-field-pair{gap:10px}
 #editor .number-stepper{display:flex;align-items:stretch;margin-top:6px;min-height:46px;border:1px solid #526a7a;border-radius:9px;overflow:hidden;background:#10232e}
 #editor .number-stepper input{appearance:textfield;-moz-appearance:textfield;margin:0;border:0;border-radius:0;padding:8px 2px;text-align:center;flex:1;width:0;background:transparent;font-size:16px}
 #editor .number-stepper input::-webkit-inner-spin-button,#editor .number-stepper input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
 #editor .number-stepper>button{display:block;flex:0 0 44px;min-width:44px;min-height:46px;font-size:22px;border:0;border-radius:0;padding:4px;background:#29404e;color:#f4d69c}
 #editor .number-stepper:has(input:disabled){opacity:.5}
 .creator-work-footer{padding:5px 12px max(6px,env(safe-area-inset-bottom));gap:0;min-height:31px;max-height:65px;overflow:auto;display:block;background:#101e28}
 #editor-status{font-size:12px;line-height:1.35}#map-readiness{display:none}
 .palette-buttons{grid-template-columns:repeat(3,minmax(0,1fr))}
 #editor #palette button{min-height:54px;text-align:center;font-size:14px;padding:8px 5px}
 #editor .palette-group{margin:16px 0}#editor .creator-tool-scroll fieldset{margin:13px 0;padding:10px}
 #editor #selected-hazard{scroll-margin-top:10px}#editor .creator-dialog{padding:24px 20px;overscroll-behavior:contain}
 #editor .dialog-close{min-width:44px;min-height:44px}
}
@media(min-width:600px) and (max-height:540px) and (max-width:1200px){
 .creator-work-header{grid-template-columns:auto minmax(90px,1fr) auto;padding:5px 10px;gap:8px;min-height:56px}
 #editor .map-name-label{padding-bottom:0}.creator-main-actions{grid-column:auto}.creator-main-actions button{font-size:13px;padding:8px;white-space:nowrap}
 #save-state{display:none}
 .creator-layout{display:grid;grid-template-columns:minmax(220px,32%) minmax(0,1fr);padding-bottom:0}
 .creator-controls,.creator-controls[data-sheet=full],.creator-controls[data-sheet=peek]{position:static;order:0;height:auto;max-height:none;min-height:0;border-top:0;border-right:1px solid #405768;border-radius:0;box-shadow:none}
 .sheet-handle-row{display:none}.creator-tool-tabs{padding:6px;gap:0}#editor .creator-tool-tabs button{padding:6px;font-size:13px}#editor #collapse-tools{display:none}
 .creator-controls[data-sheet=peek] .creator-tool-scroll{display:block}
 .creator-tool-scroll{padding:10px}.creator-canvas{order:1;padding:5px 8px;gap:4px;min-height:0}
 #editor .creator-canvas-toolbar{flex-wrap:nowrap}#editor .creator-canvas-toolbar button{font-size:13px;padding:6px 8px}
 #editor #edit-tool{min-width:0;width:105px;max-width:105px;font-size:13px}
 #editor #map-stage{min-height:60px}#editor #touch-hint{top:4px;font-size:12px;padding:3px 6px}
 #editor #map-summary{display:none}
 #editor .placement-actions button,#editor .canvas-modes button{min-height:44px}
 .creator-work-footer{min-height:24px;padding:3px 10px max(3px,env(safe-area-inset-bottom))}
 .creator-field-pair{grid-template-columns:1fr}.palette-buttons{grid-template-columns:1fr 1fr}
 .creator-empty-canvas{top:28%}.creator-empty-canvas strong{font-size:16px}.creator-empty-canvas span{display:none}
}
@media(max-width:370px){
 #editor .creator-canvas-toolbar button{padding:8px;font-size:13px}.creator-canvas{padding-inline:6px}
 #editor .creator-tool-tabs button{padding:8px}.creator-tool-scroll{padding-inline:12px}
 .creator-field-pair{grid-template-columns:1fr}.creator-home-header nav{flex-direction:column}.creator-home-header nav a{min-height:36px}
}
@media(prefers-reduced-motion:reduce){.creator-controls{transition:none}}

.creator-controls[data-items=browse] #selected-hazard{display:none!important}.creator-controls[data-items=adjust] #items-browser{display:none}

.map-card-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:auto}.map-card-actions>button{flex:1;min-height:44px}#editor .draft-delete{color:#edb3a3;background:transparent;border-color:#6e514b}.palette-buttons kbd{font:11px ui-monospace,monospace;opacity:.6;margin-left:7px}.keyboard-help dl{display:grid;grid-template-columns:minmax(100px,.65fr) 1.4fr;gap:10px 16px;font-size:14px}.keyboard-help dt{font-weight:700;color:#f5d19b}.keyboard-help dd{margin:0;color:#d2dfe2}.keyboard-help{margin:18px 0}#editor .creator-dialog .keyboard-help p{font-size:13px}

#editor .traffic-check{display:flex;align-items:center;justify-content:space-between;gap:.8rem;min-height:44px;cursor:pointer}
#editor .traffic-check input[type=checkbox]{flex:0 0 auto;width:1.4rem;min-width:1.4rem;height:1.4rem;min-height:1.4rem;margin:0;accent-color:#e8bd6f;color-scheme:dark}

#community-publishing{display:grid;gap:12px;margin:18px 0;padding:14px;border:1px solid #ffffff30;border-radius:6px}#community-publishing label{display:flex;align-items:center;gap:10px;min-height:44px}#community-publishing input[type=checkbox]{width:20px;height:20px;flex:none}#community-publishing select{min-height:44px;max-width:100%}#community-publishing p{font-size:12px;line-height:1.5}
/* Creator Studio is a focused modal: native tools stay available underneath. */
.creator-library .library-heading{flex-wrap:wrap;gap:12px}.creator-library .library-heading>div{flex:1 1 220px}.creator-library .library-heading>button{min-height:44px}.driver-studio-note{line-height:1.5}
@media(max-width:600px){.creator-library .library-heading>button{width:100%}}

.creator-library{max-width:1200px;margin:auto;padding:clamp(16px,4vw,40px)}
.library-tabs{display:flex;gap:8px;flex-wrap:wrap;border:0;margin:22px 0}
.library-tabs button{min-height:44px;border-radius:999px;padding:10px 18px}
.library-tabs [aria-selected=true]{background:#d4e5b2;color:#152d25;border-color:#d4e5b2}
.map-card{border-radius:18px;overflow:hidden;background:#112c35;border:1px solid #39515a}
.map-card-content{padding:18px}.map-card-actions{display:flex;gap:10px;flex-wrap:wrap}.map-card-actions button{min-height:44px;flex:1}
@media(max-width:600px){.creator-home-header{padding:16px;gap:12px;flex-wrap:wrap}.creator-home-header nav{gap:14px}.library-heading{display:grid;gap:12px}.library-heading h1{margin:0;font-size:36px}.library-heading>button{width:100%;min-height:52px}.library-tabs{gap:6px}.library-tabs button{font-size:12px;padding:9px 13px}.map-card-grid{grid-template-columns:1fr!important;gap:16px}.map-card>img,.map-card>canvas{width:100%;height:160px;object-fit:cover}.map-card-actions .draft-delete{flex:0 0 auto;padding-inline:14px}.map-card-content h2{font-size:23px;margin:8px 0}}

.branch-builder{border:1px solid #49616b;border-radius:12px;padding:12px;margin:16px 0}.branch-builder summary{cursor:pointer;min-height:40px;font-weight:700}.branch-builder input,.branch-builder select{width:100%;box-sizing:border-box;min-height:44px}.branch-builder input[type=checkbox]{width:auto;min-height:0}.branch-builder label{display:block;margin:10px 0}.branch-builder button{min-height:44px;margin:8px 4px 8px 0}.branch-builder details{padding:10px;border-top:1px solid #48616a}.branch-builder p{font-size:12px;line-height:1.5;color:#b5cbc9}
.creator-offline-cover{position:fixed;inset:0;z-index:200;background:#081821e8;display:grid;place-items:center;padding:24px}.creator-offline-cover[hidden]{display:none}.creator-offline-cover section{max-width:440px;border:1px solid #57716e;border-radius:18px;background:#16323b;padding:24px}.creator-offline-cover a{display:inline-block;background:#d5e3b0;color:#1b332c;padding:12px;border-radius:8px}

.map-rotation{display:flex;gap:4px;flex-wrap:wrap}.map-rotation button{min-height:44px;font-size:12px}.road-drawing-help{padding:14px;background:#18313a;border:1px solid #46616a;border-radius:12px;margin:12px 0}.road-drawing-help p{font-size:13px;line-height:1.5}.road-drawing-help output{display:block;margin-top:10px;color:#b6d1c2}

.map-navigation{flex-wrap:wrap;max-width:calc(100% - 24px)}.map-navigation .map-rotation{flex-basis:100%;justify-content:flex-end}.map-navigation .map-rotation button{padding:6px 9px}@media(max-width:600px){.map-navigation .map-rotation button{font-size:11px}}

/* Quiet inspector, clear mode switch, and one strong action hierarchy. */
#editor{--creator-surface:#13272e;--creator-card:#193239;--creator-border:#345058;--creator-accent:#d8e8ae;background:#0c1c24}
#editor .creator-topbar,#editor .creator-work-header{background:#10242c;border-bottom:1px solid var(--creator-border)}
#editor .creator-controls{background:var(--creator-surface);border-color:var(--creator-border)}
#editor .creator-tool-tabs{padding:8px;gap:5px;background:#10242c;border-bottom:1px solid var(--creator-border)}
#editor .creator-tool-tabs button{border:0;background:transparent;color:#a8bfc4;border-radius:10px;font-size:13px}
#editor .creator-tool-tabs [aria-selected=true]{background:#29454b;color:#f0f5e9}
#editor .tool-panel{padding:18px}#editor .tool-panel h2{font-size:26px;margin:0 0 5px;letter-spacing:.2px}
#editor .tool-help,#editor .field-hint{color:#a9bfc4;font-size:12px;line-height:1.55}
#editor fieldset{min-width:0;border:1px solid var(--creator-border);border-radius:14px;padding:14px;margin:16px 0;background:#172e35}
#editor fieldset:disabled{display:none}#editor legend{font-size:12px;font-weight:700;color:#d8e8ae;padding:0 7px}
#editor input,#editor select,#editor textarea{background:#10262e;border-color:#3b565e;border-radius:10px}
#editor input:focus,#editor textarea:focus{border-color:var(--creator-accent)}
#editor details{border-bottom:1px solid #34505880;padding:4px 0}#editor summary{font-size:13px;font-weight:600;color:#c5d5d5;min-height:44px;display:flex;align-items:center;gap:8px;cursor:pointer}#editor summary::before{content:'＋';font-size:14px;color:#9db6bb}#editor details[open]>summary::before{content:'−'}
#editor .creator-primary,#editor #test-level{background:var(--creator-accent);color:#182a23;border-color:transparent;font-weight:700}
#editor .canvas-modes{background:#0f252d;border:1px solid var(--creator-border);border-radius:14px;padding:4px;gap:4px}
#editor .canvas-modes button{background:transparent;border:0;border-radius:10px;color:#afc6cb;font-weight:650}
#editor .canvas-modes button[aria-pressed=true],#editor .creator-button-pair button[data-place][aria-pressed=true]{background:#d8e8ae;color:#172820;border-color:transparent}
#editor .palette-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}#editor .palette-buttons button{min-height:60px;text-align:left;background:#1b353d;border:1px solid #36545d;border-radius:12px;padding:11px;font-size:12px;box-shadow:0 2px 8px #07151a22}
#editor .palette-buttons button:hover{background:#294952;border-color:#8aa99e}#editor .palette-group h3{font-size:11px;letter-spacing:.09em;text-transform:uppercase;color:#94b1b6;margin:20px 0 10px}
#editor .selection-actions{border:1px solid #48645c;border-radius:12px;background:#18342e;padding:8px;gap:6px}#editor .selection-actions button{border-color:#49665b;background:transparent}
#editor .selection-actions #selection-remove{color:#f3b4a7}#editor #selection-name{font-size:12px;font-weight:650}
#editor .road-drawing-help{background:transparent;border:0;border-left:2px solid #547567;padding:4px 12px;font-size:12px;color:#abc4c3;line-height:1.55}
#editor .creator-work-footer{background:#10242c;border-top:1px solid var(--creator-border)}
#editor .creator-canvas-help{color:#a7bcc1}#editor .creator-canvas-help p{font-size:12px}
#editor .creator-dialog{border:1px solid #47635c;border-radius:20px;background:#132c32}
@media(max-width:900px){#editor .tool-panel{padding:14px}#editor .creator-controls{border-radius:22px 22px 0 0;box-shadow:0 -12px 35px #06121755}#editor .canvas-modes button{min-height:46px}#editor .creator-tool-tabs{padding:6px 10px}#editor .selection-actions{flex-wrap:wrap}#editor .selection-actions span{flex:1;min-width:85px}#editor .palette-buttons{grid-template-columns:repeat(3,minmax(0,1fr))}#editor .palette-buttons button{min-height:64px;font-size:11px;padding:9px}#editor .canvas-modes kbd{display:none}}
@media(max-width:360px){#editor .palette-buttons{grid-template-columns:repeat(2,minmax(0,1fr))}}

#editor .sign-message-preview{display:block;white-space:pre-wrap;overflow-wrap:anywhere;background:#122f2d;border:3px solid #f6e5ad;border-radius:8px;color:#fff9e9;font-size:17px;font-weight:700;text-align:center;line-height:1.4;padding:18px 12px;margin:10px 0;min-height:80px}

/* Unified creator: a canvas-first work area with deliberate tools and a dock. */
#editor{font-family:'DM Sans',system-ui,sans-serif}
#editor [hidden]{display:none!important}
#editor .creator-canvas{display:flex;flex-direction:column;gap:8px;min-width:0;min-height:0;padding:12px}
#editor .canvas-modes{order:-2;display:flex;gap:4px;padding:5px;border:1px solid #3b595e;border-radius:14px;background:#10272e;flex:none;position:static}
#editor .canvas-modes button{flex:1;min-width:0;min-height:44px;border:0;background:transparent;padding:8px;font-size:13px;color:#b8ced3}
#editor .canvas-modes button[aria-pressed=true]{background:#d8e8ae;color:#173127;font-weight:700;box-shadow:0 2px 10px #0002}
#editor .creator-canvas-toolbar{order:-1;flex:none;gap:8px}
#editor #map-stage{flex:1;min-height:100px;overflow:hidden;border:1px solid #3b555f;border-radius:14px}
#editor .creator-canvas-help{display:none}
#editor .selection-actions{position:static;display:flex;flex-direction:column;align-items:stretch;flex:none;gap:7px;background:#17352f;border:1px solid #49665c;border-radius:14px;padding:9px}
#editor .selection-heading{display:flex;align-items:center;gap:12px;justify-content:space-between}
#editor .selection-heading strong{font-size:13px;color:#edcf90}
#editor .selection-heading button{font-size:12px;min-height:34px;padding:6px 9px;background:transparent}
#editor .quick-point{display:flex;gap:16px;flex-wrap:wrap}
#editor .quick-point>div,#editor .quick-rotate{display:flex;align-items:center;gap:7px}
#editor .quick-point span,#editor .quick-rotate span{flex:none;font-size:11px;color:#b4c9c7}
#editor .quick-point output,#editor .quick-rotate output{min-width:50px;text-align:center;font-size:13px;font-variant-numeric:tabular-nums}
#editor .quick-point button,#editor .quick-rotate button{padding:6px;min-width:40px;min-height:40px;background:#29473e;border-color:#49665c}
#editor .selection-buttons{display:flex;gap:6px}
#editor .selection-buttons button{flex:1;padding:6px;min-height:36px;font-size:12px;background:transparent}
#editor .placement-actions{position:static;flex:none;margin:0;border-radius:12px}
#editor .map-navigation{right:10px;bottom:10px;gap:4px;max-width:calc(100% - 20px)}
#editor .map-navigation button{min-height:36px;padding:6px 10px;font-size:12px;background:#112731e8}
#editor .map-rotation{display:flex;flex-basis:100%;justify-content:flex-end;gap:4px}
#editor .map-rotation button{min-height:32px;font-size:11px;padding:4px 8px}
#editor #dimension-readout{display:none}
#editor #map-summary{top:10px;left:12px;font-size:11px;background:transparent;padding:0;color:#c6d7d9}
#editor #touch-hint{display:none}
@media(max-width:900px){
 #editor .creator-layout{display:flex;flex-direction:column;padding:0;overflow:hidden;position:relative}
 #editor .creator-canvas{order:0;flex:1;padding:6px;gap:6px}
 #editor .creator-controls{order:1;position:relative;inset:auto;z-index:1;flex:none;width:100%;height:clamp(180px,29dvh,270px);max-height:54dvh;min-height:0;border:1px solid #3b595e;border-radius:16px 16px 0 0;box-shadow:none}
 #editor .creator-controls[data-sheet=peek]{height:70px;min-height:70px}
 #editor .creator-controls[data-sheet=full]{height:54dvh}
 #editor .sheet-handle-row{height:26px;min-height:26px}
 #editor #sheet-handle,#editor #sheet-size{min-height:26px;height:26px;padding:0}
 #editor #sheet-size{font-size:10px}
 #editor .creator-tool-tabs{padding:0 8px 3px;gap:2px}
 #editor .creator-tool-tabs button{min-height:40px;padding:7px;font-size:12px}
 #editor .quick-point{gap:8px;justify-content:space-between;flex-wrap:nowrap}
 #editor .quick-point>div{gap:3px}
 #editor .quick-point button{min-width:34px;min-height:40px}
 #editor .quick-point output{min-width:43px;font-size:12px}
 #editor .canvas-modes button{padding:7px 3px;font-size:12px}
 #editor .creator-work-footer{min-height:24px;max-height:24px;padding:2px 10px;overflow:hidden}
 #editor .creator-canvas-toolbar{flex-wrap:nowrap}
 #editor .creator-canvas-toolbar button{padding:7px 9px}
}
@media(min-width:600px) and (max-height:540px) and (max-width:1200px){
 #editor .creator-layout{display:grid;grid-template-columns:minmax(220px,30%) minmax(0,1fr)}
 #editor .creator-controls,#editor .creator-controls[data-sheet=peek],#editor .creator-controls[data-sheet=full]{order:0;position:static;width:auto;height:100%;max-height:none;border-radius:0;min-height:0}
 #editor .creator-controls .creator-tool-scroll{display:block}
 #editor .creator-canvas{order:1;min-height:0}
 #editor .sheet-handle-row{display:none}
 #editor .quick-point button,#editor .quick-rotate button{min-height:32px}
 #editor .selection-actions{gap:3px;padding:5px}
 #editor .selection-buttons button{min-height:30px}
}
@media(max-width:350px){#editor .quick-point{gap:3px}#editor .quick-point span{font-size:10px}#editor .quick-point button{min-width:30px}#editor .quick-point output{min-width:40px}#editor .creator-canvas-toolbar button{font-size:12px;padding:6px}}
/* Keep touch controls inside the dock, including on 320 px screens. */
#editor .selection-actions{flex-wrap:nowrap}
#editor .selection-actions>div{min-width:0;max-width:100%}
#editor .quick-point span,#editor .quick-rotate span{min-width:0}
@media(max-width:900px){
 #editor .quick-point{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 #editor .quick-point>div{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:3px}
 #editor .quick-point span{grid-column:1/-1}
 #editor .quick-point button{min-width:44px;min-height:44px}
 #editor .quick-point output{min-width:0;align-self:center}
 #editor .selection-heading strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}
@media(max-width:900px) and (min-height:541px){
 #editor .creator-layout:has(.creator-controls:not([data-sheet=peek])) .quick-point,
 #editor .creator-layout:has(.creator-controls:not([data-sheet=peek])) .quick-rotate,
 #editor .creator-layout:has(.creator-controls:not([data-sheet=peek])) .selection-buttons{display:none}
 #editor .creator-controls{max-height:calc(100dvh - 390px)}
 #editor .creator-controls[data-sheet=full]{height:min(54dvh,calc(100dvh - 390px))}
}
/* Saved-map actions remain readable in narrow mobile cards. */
#editor .map-card-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#editor .map-card-actions>button{min-width:0;padding:10px 8px;white-space:normal}
