.editor-shell{--ed-bg:#08131d;--ed-panel:#11222d;--ed-line:#34505d;--ed-cyan:#8be4eb;--ed-purple:#dc9ae4;display:flex;flex-direction:column;gap:14px;color:#e7f1f2;background:radial-gradient(circle at 80% 0%,#2d193a66,transparent 35%),var(--ed-bg);font:13px/1.4 "Segoe UI","Microsoft YaHei",sans-serif;min-width:0;max-height:min(92dvh,1000px);overflow:auto;padding:24px;border:1px solid #56717b;box-shadow:0 24px 90px #000b}.editor-shell *{box-sizing:border-box}.editor-shell button,.editor-shell input,.editor-shell select{font:inherit}.editor-shell button,.editor-shell select,.editor-shell input{border:1px solid var(--ed-line);border-radius:3px;color:#e7f1f2;background:#112631}.editor-shell button{cursor:pointer;padding:8px 11px;transition:background .15s,border-color .15s}.editor-shell button:hover:not(:disabled){background:#20404b;border-color:#76bfcd}.editor-shell button:focus-visible,.editor-shell input:focus-visible,.editor-shell select:focus-visible{outline:2px solid var(--ed-cyan);outline-offset:2px}.editor-shell button:disabled{opacity:.35;cursor:not-allowed}.editor-shell input,.editor-shell select{min-width:0;width:100%;padding:8px}.editor-header,.editor-footer,.editor-section-title,.editor-wave-actions,.editor-finish,.editor-file-actions,.editor-header-actions{display:flex;align-items:center;gap:8px}.editor-header{justify-content:space-between;align-items:flex-start;border-bottom:1px solid var(--ed-line);padding-bottom:15px}.editor-header h2{margin:2px 0 3px;font-size:23px;letter-spacing:2px}.editor-header p{margin:0;color:#92a9b2;font-size:11px}.editor-kicker{font-size:9px;letter-spacing:2px;color:var(--ed-cyan)}.editor-header-actions{flex-wrap:wrap;justify-content:flex-end}.editor-header-actions button{white-space:nowrap}.editor-toolbar{display:flex;flex-wrap:wrap;gap:6px;padding:10px;background:#0c1b25;border:1px solid #2d4654}.editor-toolbar button{font-size:11px;padding:7px 9px}.editor-toolbar button.active{background:#18505b;border-color:#8ce4e9;color:#e2ffff;box-shadow:inset 0 0 0 1px #51a8b7}.editor-toolbar .editor-tool-select{width:auto;min-width:110px;font-size:11px;padding:6px}.editor-toolbar .editor-tool-select[hidden]{display:none}.editor-layout{display:grid;grid-template-columns:minmax(0,1.9fr) minmax(270px,.9fr);gap:15px;min-height:0}.editor-map-panel,.editor-panel{background:#0e1b25;border:1px solid #2f4855}.editor-map-panel{padding:12px;min-width:0}.editor-section-title{justify-content:space-between;margin-bottom:10px}.editor-section-title strong{font-size:12px;letter-spacing:1px}.editor-section-title span{font-size:10px;color:#8ca6b1;text-align:right}.editor-map{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));aspect-ratio:12/10;border:1px solid #678078;background:#27382f;min-width:0;touch-action:none}.editor-cell{position:relative!important;display:block;min-width:0;min-height:0;padding:0!important;border:1px solid #1c303288!important;border-radius:0!important;overflow:visible;background:#35483c!important;cursor:crosshair!important}.editor-cell:nth-child(3n){background:#3b4b3d!important}.editor-cell.editor-high{background:#786d53!important;box-shadow:inset 0 0 0 2px #b39e6b88,inset 0 8px 12px #e2bb6a19}.editor-cell:hover{z-index:3;outline:2px solid #a5f4f3;outline-offset:-2px}.editor-cell.editor-ramp-origin{outline:3px solid #e9c782;z-index:4}.editor-cell>span{pointer-events:none}.editor-cell svg{display:block;width:100%;height:100%}.editor-rock,.editor-tower,.editor-base{position:absolute;inset:5%;z-index:1}.editor-rock{color:#a3a391}.editor-tower{color:#e7ce92}.editor-base{color:#94e2e7}.editor-start{position:absolute;z-index:3;top:2%;left:2%;display:grid;place-items:center;width:24%;aspect-ratio:1;border-radius:50%;font-size:10px;font-weight:800;background:#78e5ee;color:#08313b;box-shadow:0 0 6px #66e5f3}.editor-enemy-stack{position:absolute;z-index:4;inset:6%;display:flex;align-items:flex-end;justify-content:flex-end;gap:1px}.editor-enemy{display:block;width:62%;height:72%;border:1px solid #e0a1dc;border-radius:3px;background:#37203cdd;color:#f4b9e9;box-shadow:0 2px 6px #000a}.editor-enemy+ .editor-enemy{margin-left:-45%}.editor-enemy-selected{border:2px solid #fff6b6;box-shadow:0 0 10px #f7e6a6}.editor-enemy-more{font-size:9px;color:white;background:#6c3266;padding:1px 2px}.editor-ramp-marks{position:absolute;inset:0;z-index:5}.editor-ramp-edge{position:absolute;background:repeating-linear-gradient(90deg,#ffe4a6 0 3px,#9d774a 3px 6px);box-shadow:0 0 4px #000;display:block}.editor-ramp-edge.east,.editor-ramp-edge.west{top:30%;bottom:30%;width:5px}.editor-ramp-edge.east{right:-3px}.editor-ramp-edge.west{left:-3px}.editor-ramp-edge.north,.editor-ramp-edge.south{left:30%;right:30%;height:5px}.editor-ramp-edge.north{top:-3px}.editor-ramp-edge.south{bottom:-3px}.editor-map-legend{display:flex;flex-wrap:wrap;gap:7px 13px;padding-top:10px;color:#a8bdc3;font-size:10px}.editor-side{display:flex;flex-direction:column;gap:10px;min-width:0}.editor-panel{padding:13px}.editor-field{display:block;color:#a9bdc5;font-size:10px;margin-bottom:9px}.editor-field input{display:block;margin-top:4px;color:#e7f1f2;font-size:12px}.editor-two{display:grid;grid-template-columns:1fr 1fr;gap:9px}.editor-wave-actions{margin-bottom:10px}.editor-wave-actions select{flex:1}.editor-wave-actions button{white-space:nowrap;padding:8px}.editor-pattern{display:flex;flex-wrap:wrap;gap:6px}.editor-pattern button{font-size:10px;padding:6px 8px}.editor-pattern button.chosen{border-color:#bd81cb;background:#51345a;color:#f5d5f5}.editor-help{margin:8px 0 0;color:#78939e;font-size:10px}.editor-enemy-list{max-height:150px;overflow:auto;display:grid;gap:4px}.editor-enemy-row{display:flex;gap:4px}.editor-enemy-row.selected .editor-enemy-pick{border-color:#d3a4db;background:#49314d}.editor-enemy-pick{flex:1;text-align:left;font-size:11px;padding:6px}.editor-enemy-remove{width:30px;color:#efadae!important;padding:5px!important}.editor-selected{border-top:1px solid #2e4653;margin-top:10px;padding-top:9px;color:#adbec6;font-size:10px}.editor-selected strong{color:#e9c3e7}.editor-selected p{margin:5px 0}.editor-selected button{font-size:10px;padding:5px 7px}.editor-footer{justify-content:space-between;border-top:1px solid var(--ed-line);padding-top:14px;align-items:flex-end}.editor-file-actions{flex-wrap:wrap}.editor-file-actions button{white-space:nowrap;font-size:11px}.editor-finish{flex-direction:column;align-items:flex-end;min-width:220px}.editor-message{max-width:540px;text-align:right;color:#aac1ca;font-size:11px;white-space:normal}.editor-message[data-tone="error"]{color:#ff9d9d}.editor-message[data-tone="success"]{color:#9de6ce}#editor-play{background:#17616b;border-color:#81dce3;color:#ecffff;font-weight:700;white-space:nowrap}.editor-shell button[hidden],.editor-shell input[hidden]{display:none}@media(max-width:900px){.editor-shell{padding:15px;max-height:92dvh}.editor-layout{grid-template-columns:1fr}.editor-side{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.editor-side .editor-panel:last-child{grid-column:1/-1}.editor-footer{align-items:stretch;flex-direction:column}.editor-finish{align-items:flex-start}.editor-message{text-align:left}}@media(max-width:550px){.editor-shell{padding:10px;gap:9px}.editor-header{flex-direction:column;gap:10px}.editor-header h2{font-size:19px}.editor-toolbar{gap:4px}.editor-toolbar button{font-size:10px;padding:6px}.editor-side{display:flex}.editor-map-panel{padding:5px}.editor-start{font-size:6px}.editor-map-legend{font-size:8px}.editor-file-actions button{font-size:10px;padding:7px}}

/* Keep the desktop board, properties, and actions in separate scroll regions. */
@media(max-width:900px){
  .editor-shell> *{flex-shrink:0}
  .editor-layout{min-height:auto}
  .editor-footer{background:var(--ed-bg)}
}
@media(min-width:901px){
  .editor-shell{height:min(92dvh,1000px);overflow:hidden}
  .editor-header,.editor-toolbar,.editor-footer{flex:0 0 auto}
  .editor-layout{flex:1 1 auto;min-height:0;overflow:hidden}
  .editor-map-panel{min-height:0;overflow:auto}
  .editor-map{width:min(100%,calc((92dvh - 390px)*var(--editor-ratio,1)));max-width:100%;margin-inline:auto}
  .editor-side{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding-right:4px}
  .editor-footer{position:relative;z-index:10;background:var(--ed-bg)}
}
.editor-random-site{position:absolute;inset:0;z-index:5;border:2px dashed #ffcc83;color:#ffe5ae;background:#a76e3222;text-align:left;font-size:15px;font-weight:bold;pointer-events:none}
