:root{--paper:#f5f4f0;--surface:#fff;--ink:#252c29;--muted:#59625c;--line:#dddfd8;--accent:#275b47;--accent-soft:#e8f0ea;--danger:#a2373e;--map-ground:#d8d4c7;--radius:9px;--font:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color-scheme:light;font-family:var(--font);color:var(--ink);font-size:14px;font-synthesis:none}
*{box-sizing:border-box}body{margin:0;min-width:320px;height:100dvh;display:flex;flex-direction:column;overflow:hidden;background:var(--paper)}button,input,textarea,select{font:inherit}button{cursor:pointer;color:inherit}button:disabled{opacity:.38;cursor:not-allowed}button,a,input,select,textarea,summary{outline-offset:3px}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible,#board:focus-visible{outline:2px solid var(--accent)}::selection{background:#c2ddcf;color:#142b20}input,textarea{caret-color:var(--accent)}[hidden]{display:none!important}svg.icon{width:20px;height:20px;display:block;flex:none;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.small-icon .icon{width:14px;height:14px}.app-header{height:76px;min-height:76px;padding:0 26px;display:flex;align-items:center;gap:24px;border-bottom:1px solid var(--line);background:var(--surface)}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--ink);white-space:nowrap}.brand-symbol{height:38px;width:38px;display:grid;place-items:center;background:var(--accent);color:#fff;border-radius:10px}.brand-symbol .icon{width:22px;height:22px}.brand strong{font-size:20px;letter-spacing:-.5px;display:block;line-height:1.3;font-weight:650}.game-name{display:block;font-size:11px;color:var(--muted);margin-top:2px}.save-status{font-size:11px;color:var(--muted);margin-right:auto}.save-status.warning{color:var(--danger)}.header-actions{display:flex;gap:8px;align-items:center}.button{display:inline-flex;justify-content:center;align-items:center;gap:8px;min-height:38px;padding:8px 12px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);font-size:12px;font-weight:550;white-space:nowrap}.button:hover:not(:disabled){background:#eeefea;border-color:#bac1b9}.button .icon{width:17px;height:17px}.button.primary{background:var(--accent);border-color:var(--accent);color:#fff}.button.primary:hover{background:#1c4635}.button.subtle{border-color:transparent;background:transparent}.icon-button{width:32px;height:32px;min-width:32px;display:inline-grid;place-items:center;background:transparent;border:0;border-radius:7px;padding:6px}.icon-button:hover:not(:disabled){background:#e5e8e1}.icon-button .icon{width:18px;height:18px}.plan-bar{min-height:78px;display:flex;align-items:center;gap:24px;padding:12px 26px;border-bottom:1px solid var(--line)}.plan-name{min-width:160px;max-width:330px;flex:1}.plan-name input{font-size:17px;letter-spacing:-.25px;font-weight:600;width:100%;border:1px solid transparent;background:transparent;border-radius:5px;padding:3px 4px;margin-left:-4px;color:var(--ink)}.plan-name input:hover,.plan-name input:focus{border-color:var(--line);background:var(--surface)}.map-name{display:block;font-size:11px;color:var(--muted);margin-top:3px}.phase-nav{display:flex;align-items:center;gap:5px;min-width:0;flex:1;justify-content:flex-end}.phase-tabs{display:flex;align-items:center;overflow:auto;gap:3px;scrollbar-width:thin}.phase-tab{display:flex;align-items:center;gap:8px;min-height:36px;padding:7px 12px;white-space:nowrap;background:transparent;border:1px solid transparent;border-radius:8px;font-size:12px;color:var(--muted)}.phase-tab .step{font-size:11px;display:grid;place-items:center;width:19px;height:19px;border:1px solid #bac2b9;border-radius:50%;font-variant-numeric:tabular-nums}.phase-tab[aria-selected=true]{background:var(--surface);color:var(--accent);border-color:var(--line);font-weight:600}.phase-tab[aria-selected=true] .step{background:var(--accent);border-color:var(--accent);color:#fff}.phase-tab:hover{background:#e9ece5}.panel-toggle{display:none}.workspace{display:flex;flex:1;min-height:0}.tool-rail{width:76px;min-width:76px;overflow-y:auto;scrollbar-width:thin;display:flex;flex-direction:column;align-items:center;padding:16px 10px 12px;gap:3px;border-right:1px solid var(--line);background:var(--surface)}#draw-tools{display:flex;flex-direction:column;gap:4px;width:100%}.tool-button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;width:54px;min-height:51px;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--muted);padding:5px;font-size:11px}.tool-button:hover{background:var(--paper);color:var(--ink)}.tool-button[aria-pressed=true]{background:var(--accent-soft);color:var(--accent);border-color:#bbd2c3}.tool-button .icon{width:20px;height:20px}.tool-divider{height:1px;min-height:1px;background:var(--line);width:32px;margin:9px 0}.map-area{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;padding:0 22px;background:var(--paper)}.map-topline{min-height:54px;display:flex;align-items:center;gap:15px;color:var(--muted);font-size:11px}.map-caption{display:flex;align-items:center;gap:6px;white-space:nowrap}.live-dot{width:6px;height:6px;border-radius:50%;background:#46815c}.map-topline>#phase-indicator{padding-left:14px;border-left:1px solid var(--line);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.zoom-controls{margin-left:auto;display:flex;gap:2px;align-items:center}#fit-map{background:transparent;border:0;font-size:11px;min-width:44px;min-height:32px;color:var(--muted);border-radius:6px}#fit-map:hover{background:#e4e7df}.map-shell{position:relative;flex:1;min-height:120px;overflow:hidden;display:flex;align-items:center;justify-content:center;background:#d8d4c7;border:1px solid #c6c9be;border-radius:12px}#board{width:100%;height:100%;display:block;touch-action:none;user-select:none;cursor:crosshair;background:var(--map-ground);outline-offset:-4px}.map-bottomline{min-height:42px;display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:11px;color:var(--muted)}#object-count{white-space:nowrap;font-variant-numeric:tabular-nums}.start-hint{position:absolute;left:16px;bottom:16px;display:flex;gap:12px;align-items:center;max-width:calc(100% - 32px);background:#fff;padding:12px 10px 12px 14px;border-radius:9px;box-shadow:0 6px 24px #273b2924}.start-hint>.icon,.start-hint>span .icon{color:var(--accent);width:23px;height:23px}.start-hint strong{display:block;font-size:12px;margin-bottom:4px}.start-hint div>span{display:block;font-size:11px;color:var(--muted)}.start-hint .icon-button{margin-left:8px}.map-error{position:absolute;background:var(--surface);padding:20px;border-radius:10px}.inspector{width:284px;min-width:284px;overflow-y:auto;background:var(--surface);padding:20px 18px 18px;border-left:1px solid var(--line);scrollbar-width:thin}.panel-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.panel-heading h2{font-size:14px;font-weight:650;margin:0;letter-spacing:-.2px}#close-panel{display:none}.palette-tabs{display:flex;border-bottom:1px solid var(--line);margin-bottom:13px;gap:14px}.palette-tabs button{padding:0 0 9px;background:none;border:0;border-bottom:2px solid transparent;color:var(--muted);font-size:11px;font-weight:550;min-height:32px;white-space:nowrap}.palette-tabs button[aria-selected=true]{border-bottom-color:var(--accent);color:var(--accent)}.marker-library{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.marker-option{border:1px solid transparent;border-radius:8px;min-height:62px;padding:7px 2px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:6px;background:#f5f6f2;color:#4e5b52;font-size:11px;text-align:center;line-height:1.25;overflow-wrap:anywhere}.marker-option .icon{height:22px;width:22px}.marker-option img{width:26px;height:26px;object-fit:contain}.marker-option:hover{background:#e9eee6;border-color:#cbd5c8}.marker-option[aria-pressed=true]{background:var(--accent-soft);border-color:#779c81;color:var(--accent)}.custom-symbol{margin-top:12px;margin-bottom:18px;font-size:11px}.custom-symbol summary{display:flex;align-items:center;gap:4px;color:var(--accent);cursor:pointer;min-height:28px;list-style:none}.custom-symbol summary .icon{width:14px;height:14px}.custom-form{padding-top:10px}.custom-form p{font-size:11px;line-height:1.5;color:var(--muted);margin:8px 0 0}.custom-form input[type=file]{font-size:11px;padding:6px;height:auto;max-width:100%}.custom-form .button{width:100%;margin-top:10px}.optional{font-weight:400;color:var(--muted)}.tool-settings{padding:17px 0;border-top:1px solid var(--line)}.section-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;min-height:24px}.section-title h3{font-size:12px;margin:0;font-weight:650}.section-title .icon-button{width:26px;height:26px;min-width:26px}.inspector label,.inspector legend{font-size:11px;font-weight:500;display:block;margin-bottom:6px;color:#4c574f}.inspector input:not([type=checkbox]):not([type=range]),.inspector select,.inspector textarea{width:100%;border:1px solid #cfd5cd;background:#fff;border-radius:6px;color:var(--ink);padding:8px 9px;font-size:12px;min-height:35px}.inspector textarea{resize:vertical;line-height:1.5}.inspector input::placeholder,.inspector textarea::placeholder{color:var(--muted);font-size:11px}.inspector input:focus,.inspector textarea:focus,.inspector select:focus{border-color:var(--accent)}.inspector fieldset{border:0;padding:0;margin:14px 0}.colors{display:flex;gap:7px}.color-swatch{width:28px;height:28px;border:2px solid #fff;outline:1px solid var(--line);border-radius:50%;position:relative}.color-swatch[aria-pressed=true]{outline:2px solid var(--ink);outline-offset:1px}.color-swatch[aria-pressed=true]:after{content:"";position:absolute;top:7px;left:7px;width:6px;height:6px;border-radius:50%;background:white;box-shadow:0 1px 2px #0009}.two-fields{display:flex;gap:12px}.two-fields>div{flex:1}.check-row:not([hidden]){display:flex!important;gap:7px;align-items:center;margin-top:13px;margin-bottom:0!important}.check-row input{margin:0}input[type=checkbox],input[type=range]{accent-color:var(--accent)}#radius-field{margin-top:14px}#radius-field label{display:flex;justify-content:space-between}#zone-radius{width:100%;margin:4px 0;height:18px}.field-note{font-size:11px;line-height:1.5;color:var(--muted);margin:3px 0 0}.section-details{padding:14px 0;border-top:1px solid var(--line)}.section-details>summary{cursor:pointer;font-size:12px;font-weight:550;min-height:22px}.details-content{padding-top:12px}.details-content>label:not(:first-child){margin-top:12px}.phase-actions{display:flex;justify-content:space-between;gap:8px;margin-top:7px}.text-button{padding:4px 0;min-height:30px;font-size:11px;color:var(--accent);border:0;background:transparent;text-underline-offset:3px}.text-button:hover{text-decoration:underline}.text-button.danger{color:var(--danger)}.layer-toggles{display:flex;flex-wrap:wrap;gap:8px 12px;margin-bottom:10px}.layer-toggles label{display:flex;align-items:center;gap:4px;font-weight:400;margin:0}.layer-toggles input{margin:0}.object-list{display:flex;flex-direction:column;gap:3px;max-height:180px;overflow:auto}.object-row{display:flex;gap:8px;text-align:left;align-items:center;background:#f5f6f3;border:1px solid transparent;padding:8px 6px;border-radius:5px;font-size:11px}.object-row[aria-pressed=true]{border-color:var(--accent)}.object-row .dot{width:8px;height:8px;border-radius:50%;flex:none}.object-row span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.empty-list{font-size:11px;color:var(--muted);margin:5px 0 10px}.panel-footnote{font-size:11px;line-height:1.6;color:var(--muted);border-top:1px solid var(--line);padding-top:14px;margin:3px 0}.app-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:34px;padding:0 24px;background:var(--surface);border-top:1px solid var(--line);font-size:11px;color:var(--muted)}.app-footer>span:first-child{color:var(--accent)}kbd{font-family:inherit;font-size:11px;border:1px solid var(--line);border-radius:3px;padding:1px 4px;background:#f7f8f5;margin:0 3px 0 9px}.menu{position:fixed;inset:68px 210px auto auto;min-width:235px;border:0;padding:6px;background:var(--surface);border-radius:10px;box-shadow:0 10px 32px #19332322;color:var(--ink);margin:0}.menu button{display:flex;align-items:center;gap:9px;width:100%;padding:10px 9px;border:0;background:transparent;text-align:left;border-radius:6px;font-size:12px}.menu button:hover{background:var(--paper)}.menu .icon{width:17px;height:17px}.menu hr{border:0;border-top:1px solid var(--line);margin:5px}#toast{position:fixed;bottom:48px;left:50%;transform:translateX(-50%);background:#253d30;color:#fff;max-width:min(500px,90vw);padding:12px 18px;border-radius:9px;font-size:12px;line-height:1.5;box-shadow:0 6px 24px #17281b30;z-index:20}dialog{border:0;border-radius:14px;background:var(--surface);color:var(--ink);padding:23px;width:min(520px,calc(100vw - 32px));max-height:85dvh;box-shadow:0 18px 50px #17281b26}dialog::backdrop{background:#19251d66}.dialog-top{display:flex;align-items:center;justify-content:space-between;gap:15px}.dialog-top h2{font-size:19px;margin:0;letter-spacing:-.4px}#dialog-content{font-size:13px;line-height:1.65}#dialog-content ol{padding-left:22px}#dialog-content a{color:var(--accent)}#dialog-content code{font-size:11px;overflow-wrap:anywhere}.help-keys{display:grid;grid-template-columns:1fr 1fr;gap:5px}#presentation-notes{padding:12px 14px;margin:2px 0 10px;background:#fff;border-radius:8px;white-space:pre-wrap;font-size:13px;line-height:1.5;max-height:110px;overflow:auto}#presentation-controls{display:flex;gap:12px;align-items:center;justify-content:center;padding:6px 0 16px}#presentation-step{font-size:12px;min-width:70px;text-align:center}body.presenting .tool-rail,body.presenting .inspector,body.presenting .app-footer,body.presenting .header-actions,body.presenting .panel-toggle,body.presenting #add-phase{display:none}body.presenting .map-area{padding:0 24px}body.presenting #board{cursor:grab}body.presenting .save-status{margin-left:auto;margin-right:0}body.presenting .map-bottomline{min-height:28px}body.presenting #start-hint{display:none}body.presenting #plan-title{pointer-events:none}body.presenting #tool-hint{font-size:11px}
@media(min-width:1500px){.inspector{width:306px;min-width:306px;padding:24px}.map-area{padding:0 30px}.marker-option{min-height:70px}.map-topline{min-height:61px}}
@media(max-width:1100px){.app-header{padding:0 18px;gap:16px}.save-status{display:none}.header-actions{margin-left:auto}.plan-bar{padding:12px 18px;gap:14px}.plan-name{max-width:220px}.inspector{width:258px;min-width:258px;padding:18px 14px}.map-area{padding:0 14px}.map-caption{font-size:11px}.map-topline{gap:7px}.map-topline>#phase-indicator{padding-left:7px}.phase-tab{padding:7px 8px}.tool-rail{width:66px;min-width:66px;padding-left:6px;padding-right:6px}.app-footer>span:nth-child(2){display:none}}
@media(max-width:850px){.inspector{display:none;position:fixed;top:144px;bottom:34px;right:0;width:286px;z-index:9;box-shadow:-8px 12px 30px #20342626}.inspector.open{display:block}#close-panel{display:inline-grid}.panel-toggle{display:inline-flex}.panel-toggle span:last-child{display:none}.phase-nav{justify-content:flex-start}.plan-name{max-width:230px}.plan-bar{flex-wrap:wrap;min-height:110px;gap:8px 14px}.plan-name{max-width:none;flex:1}.phase-nav{order:3;flex-basis:100%;justify-content:flex-start;max-width:100%}.phase-tabs{max-width:calc(100% - 35px)}.app-header{height:65px;min-height:65px}.map-area{padding:0 12px}.start-hint{left:10px;bottom:10px;max-width:calc(100% - 20px)}.app-header .brand strong{font-size:18px}.game-name{font-size:11px}.header-actions .button{padding:8px 9px}.header-actions{gap:4px}.app-footer{padding:0 14px}.map-topline{min-height:44px}.map-topline>#phase-indicator{display:none}}
@media(max-width:530px){.app-header{padding:0 12px;gap:8px}.brand{gap:7px}.brand-symbol{width:31px;height:34px;border-radius:8px}.brand strong{font-size:17px!important}.game-name{font-size:11px}.header-actions .button>span:not(:first-child){display:none}.header-actions .button{min-width:35px;min-height:35px;padding:7px}.plan-bar{padding:8px 13px;min-height:103px}.plan-name input{font-size:15px}.map-name{font-size:11px}.phase-tab{font-size:11px;gap:6px}.tool-rail{width:55px;min-width:55px;padding:9px 4px}.tool-button{width:46px;min-height:47px;font-size:11px;gap:3px}.tool-button .icon{width:19px;height:19px}#draw-tools{gap:2px}.map-area{padding:0 8px}.map-topline{min-height:39px;gap:4px}.map-caption{font-size:11px}.zoom-controls{gap:0}.zoom-controls .icon-button{width:27px;min-width:27px}#fit-map{min-width:33px;font-size:11px}.map-shell{border-radius:8px}.map-bottomline{font-size:11px;min-height:42px}#tool-hint{max-width:190px;line-height:1.4}#object-count{display:none}.start-hint{padding:10px;gap:8px}.start-hint>span{display:none}.start-hint strong{font-size:11px}.start-hint div>span{font-size:11px;line-height:1.4}.start-hint .icon-button{margin-left:0;min-width:24px;width:24px;padding:2px}.app-footer{min-height:32px;font-size:11px;padding:0 12px}.app-footer .text-button{font-size:11px}.menu{top:59px;right:14px}.inspector{top:65px;bottom:32px;max-width:calc(100vw - 55px)}#presentation-controls{gap:6px;flex-wrap:wrap;padding:8px 0}#presentation-controls .button{font-size:11px;padding:6px 9px}body.presenting .map-area{padding:0 10px}body.presenting .plan-bar{min-height:100px}.layer-toggles label{min-height:26px}}
@media(prefers-reduced-motion:no-preference){button{transition:background .14s,border-color .14s,color .14s}#toast{animation:toast-in .18s ease-out}@keyframes toast-in{from{translate:0 6px}to{translate:0 0}}}

.canvas-controls{padding-bottom:16px;margin-bottom:12px;border-bottom:1px solid var(--line)}.canvas-actions{display:flex;gap:6px;margin:10px 0}.canvas-actions .button{flex:1;font-size:11px;padding:7px 6px;gap:5px}.canvas-actions .icon{width:15px;height:15px}.canvas-options{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:6px}.canvas-options label{margin:0}.canvas-options .text-button{grid-column:1/-1;text-align:left;margin-top:4px}.compact-button{background:transparent;border:1px solid var(--line);border-radius:6px;padding:5px 7px;font-size:11px;white-space:nowrap}.object-action-row{display:flex;flex-wrap:wrap;gap:5px 14px;padding:8px 0}.palette-tabs button{padding-left:4px;padding-right:4px}.marker-option.image-option img{width:42px;height:42px;object-fit:contain}.drop-active .map-shell{outline:3px solid var(--accent);outline-offset:-3px}#image-settings{margin-top:12px}#image-settings input[type=range]{padding:0;width:100%;accent-color:var(--accent)}#objective-state{padding:10px;background:var(--accent-soft);border-radius:8px;margin-top:10px}body.presenting #flip-map{display:none}@media(max-width:530px){.map-caption{font-size:11px}.zoom-controls{gap:0}.compact-button{padding:4px;font-size:11px}.map-topline{gap:2px}}

.structure-note{grid-column:1/-1;margin:8px 0 2px;}
.palette-tabs{display:grid;grid-template-columns:1fr 1.35fr .7fr;gap:5px}.palette-tabs button{min-width:0;white-space:normal;line-height:1.35;padding:0 2px 9px}.inspector{overflow-x:hidden}

.team-assignment{padding-bottom:16px;margin-bottom:16px;border-bottom:1px solid var(--line)}.team-assignment .section-title{margin-bottom:8px}.assignment-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px}.assignment-fields>div{min-width:0}.team-assignment .button{width:100%;margin:9px 0 6px}.team-action-buttons{display:flex;flex-wrap:wrap;gap:6px}#team-actions{padding-bottom:12px}#team-actions .field-note{margin-top:6px}#size-field label{display:flex;justify-content:space-between;gap:8px}#marker-size{width:100%;height:28px;margin:0}.marker-option[data-template="magnus"] img,.marker-option[data-template="totem"] img,.marker-option[data-template="storm-gust"] img,.marker-option[data-template="meteor-storm"] img,.marker-option[data-template="lord-of-vermilion"] img{width:38px;height:38px}

#selected-assignment{margin-bottom:12px}

.canvas-controls>summary{font-size:12px;font-weight:600;cursor:pointer;min-height:28px;padding:5px 0}.canvas-expanded{padding-top:12px}.canvas-controls:not([open]){padding-bottom:9px;margin-bottom:12px}.library-heading{grid-column:1/-1;font-size:11px;font-weight:600;margin:6px 0 2px;color:var(--muted)}#label-field{margin-top:12px}#radius-field{margin-bottom:14px}.team-assignment .section-title{min-height:18px;margin-bottom:8px}.team-assignment{padding-bottom:12px;margin-bottom:12px}
/* 2D and 3D use the same editor, selection, and plan. */
.view-switch{display:flex;flex:none;background:#fff;border:1px solid var(--line);border-radius:6px;padding:2px;gap:2px}.view-switch button{border:0;background:transparent;padding:5px 9px;border-radius:4px;font-size:12px;color:var(--muted);cursor:pointer}.view-switch button[aria-pressed=true]{background:var(--accent);color:#fff}.map-topline{flex-wrap:wrap;gap:8px}.map-caption{min-width:0}.map-topline #phase-indicator{display:none}
#board[hidden],#scene-host[hidden]{display:none}#scene-host{position:absolute;inset:0;overflow:hidden}#scene-host canvas{display:block;width:100%;height:100%;touch-action:none}.map-shell.in-3d{position:relative;min-height:260px}.scene-toolbar{position:absolute;top:10px;left:10px;right:10px;display:flex;flex-wrap:wrap;align-items:center;gap:6px;background:#fff;padding:8px;border-radius:9px;border:1px solid #dddfd8;z-index:2}.scene-toolbar[hidden],.scene-status[hidden],.walk-controls[hidden]{display:none}.scene-mode-buttons{display:flex;gap:3px}.scene-mode-buttons button,.walk-controls button{padding:7px 9px;border:0;border-radius:5px;background:#f5f6f2;color:#252c29;font-size:12px;cursor:pointer}.scene-mode-buttons button[aria-pressed=true]{background:#275b47;color:white}.scene-toolbar label,.scene-toolbar select,.scene-toolbar span{font-size:11px}.scene-toolbar select{width:auto;padding:6px;min-height:30px}.scene-status{position:absolute;left:10px;bottom:10px;right:10px;background:#fff;padding:8px 10px;border-radius:6px;color:#59625c;font-size:11px;line-height:1.4;pointer-events:none}.walk-controls{position:absolute;bottom:68px;left:12px;display:flex;gap:4px}.quality-settings input[type=range]{width:100%;accent-color:#275b47}.quality-settings select{margin-bottom:12px}.quality-settings label{display:block;margin:10px 0 6px}.quality-settings output{float:right}.scene-toolbar #scene-resolution{margin-left:auto;font-variant-numeric:tabular-nums}.presenting .scene-toolbar{opacity:.88}
@media(max-width:530px){.map-topline{gap:5px}.map-caption{display:none}.zoom-controls{margin-left:auto}.scene-toolbar{left:5px;right:5px;top:5px;padding:6px;gap:5px}.scene-toolbar #scene-resolution{display:none}.scene-status{left:5px;right:5px;bottom:5px}.scene-mode-buttons button{padding:7px 6px}}
#skill-filters{margin:10px 0 6px}#skill-filters label{display:block;font-size:11px;margin:8px 0 5px}#skill-filters input{margin-bottom:6px}#skill-filters .field-note{margin:8px 0}.marker-library.skill-library{max-height:340px;overflow-y:auto;scrollbar-width:thin;padding-right:3px}.skill-library .marker-option img{width:38px;height:38px}#skill-ground-settings{margin-bottom:16px}#skill-ground-settings>label{display:block;font-size:11px;margin:10px 0 6px}#skill-ground-settings input[type=range]{width:100%;accent-color:#275b47}#skill-ground-settings details summary{cursor:pointer;font-size:11px}#skill-ground-settings output{float:right}

.skill-range-summary{font-size:12px;font-weight:600;margin:6px 0}#skill-ground-settings #zone-level-field{margin-top:12px}#skill-ground-settings #zone-level-field label{font-size:11px;display:block;margin-bottom:5px}#skill-adjustments{margin-top:9px}#skill-adjustments>summary{padding:7px 0;font-size:12px}#skill-adjustments label{display:block;font-size:11px;margin:10px 0 6px}#skill-adjustments #radius-field{margin-top:12px}#skill-ground-settings .object-action-row{gap:12px;flex-wrap:wrap}

#toggle-towers[aria-pressed=true]{background:var(--accent-soft);color:var(--accent)}#tower-count{color:var(--muted);font-weight:400;margin-left:6px}.tower-list{max-height:230px;overflow:auto;display:flex;flex-direction:column;gap:4px;margin-top:9px}.tower-row{display:flex;gap:5px;align-items:center}.tower-row>button{border:0;background:var(--paper);border-radius:5px;padding:6px;font-size:11px;min-height:34px}.tower-row>button:first-child{display:flex;gap:6px;align-items:center;flex:1;text-align:left;min-width:0}.tower-row img{width:26px;height:26px;object-fit:contain}.tower-row .tower-status{font-size:11px;color:var(--accent)}.tower-row .tower-status.destroyed{color:var(--muted);background:#e4e5df}#tower-controls{margin-top:-8px;padding-top:10px}#tower-controls .check-row{margin-bottom:8px}#tower-controls .object-action-row{gap:12px;flex-wrap:wrap}#tower-controls .field-note{margin:8px 0}.map-topline{flex-wrap:wrap}.map-topline .zoom-controls{margin-left:auto}
/* Keep the canvas primary; disclose editing detail only where it is useful. */
.app-header{height:58px;min-height:58px}.plan-bar{min-height:54px;padding-top:8px;padding-bottom:8px}.app-header .brand strong{font-size:17px}.brand-symbol{width:32px;height:32px}.game-name{display:none}.header-actions{margin-left:auto}.save-status{display:none}.save-status.warning{display:inline}.map-area{padding-bottom:14px}.map-topline .map-caption{max-width:180px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.phase-tab{padding:7px 11px}.inspector .panel-heading{margin-bottom:8px}.team-assignment{padding:12px 0}.team-assignment .assignment-fields{margin-bottom:8px}.palette-tabs{grid-template-columns:1fr 1fr 1fr}.skill-filter-options{margin:8px 0 10px;font-size:11px}.skill-filter-options .assignment-fields{margin-top:10px}.tool-settings{padding:12px 0;border-bottom:1px solid var(--line)}.tool-settings .section-title{margin-bottom:10px}.tool-settings #object-detail-options{margin:12px 0}.tool-settings #object-detail-options[open]>div{margin-top:12px}.tool-settings .color-field{margin:12px 0 0}.custom-symbol{margin:12px 0}.page-notes .phase-actions{display:flex;flex-wrap:wrap;gap:10px}.scene-toolbar{width:max-content;max-width:calc(100% - 20px);right:auto}.scene-toolbar #scene-focus:disabled{display:none}.page-menu{inset:112px 280px auto auto;margin:0;width:348px;max-width:calc(100vw - 24px);padding:16px;border:0;border-radius:10px;box-shadow:0 10px 36px #20342630;background:var(--surface);color:var(--ink)}.page-kind{display:grid;grid-template-columns:1fr 1fr;gap:8px}.page-location-heading{display:flex;align-items:center;justify-content:space-between;margin:20px 0 12px;font-size:12px}.page-location-heading select{padding:6px 8px;border:1px solid var(--line);border-radius:6px;background:var(--surface)}.location-grid{display:grid;grid-template-columns:48px repeat(3,1fr);gap:6px;align-items:center;font-size:11px}.location-grid>span{text-align:center;color:var(--muted)}.location-grid>strong{font-weight:500}.location-grid .button{padding:8px 5px;min-height:36px;font-size:11px}.location-grid .crystal-location{grid-column:2/5;margin-top:4px}.page-menu::backdrop{background:transparent}.canvas-controls .field-note{display:none}
@media(max-width:850px){.plan-bar{min-height:92px}.inspector{top:58px;bottom:0}.page-menu{right:12px;top:146px}.map-area{padding-bottom:10px}.panel-toggle span:last-child{display:inline}.panel-toggle{font-size:11px}.map-topline .map-caption{display:none}}
@media(max-width:530px){.app-header{height:54px;min-height:54px}.plan-bar{min-height:88px}.inspector{top:54px}.scene-toolbar{max-width:calc(100% - 10px)}.map-area{padding-bottom:8px}.page-menu{top:140px}.map-topline{flex-wrap:wrap;min-height:64px}.zoom-controls{flex:1;justify-content:flex-end;flex-wrap:wrap}}
@media(min-width:531px) and (max-width:850px){.map-topline .map-caption{display:inline-flex;max-width:160px}}

.structure-state-buttons{display:flex;gap:4px}.structure-state-buttons button{flex:1;padding:8px;border:1px solid var(--line);border-radius:6px;background:var(--surface);font-size:12px}.structure-state-buttons button[aria-pressed=true]{background:var(--accent);color:white;border-color:var(--accent)}
/* A bounded working paper: quiet registration dots, visible edges, overview. */
.map-shell.is-paper,#board{background:var(--map-ground)}
.map-shell.is-paper{background:#e2e6df}.is-paper #board{background:#e2e6df}
.paper-overview{position:absolute;right:12px;bottom:12px;width:116px;padding:4px;background:var(--surface);border:1px solid var(--line);border-radius:6px;z-index:2}.paper-overview svg{display:block;width:100%;height:auto}.paper-overview:hover{border-color:var(--accent)}
.page-kind{grid-template-columns:1fr 1fr}.page-kind [data-new-page=paper]{grid-column:1/-1;background:var(--accent-soft);border-color:#b4cdbd}
.scene-error{position:absolute;inset:0;z-index:4;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:var(--paper);padding:24px;text-align:center}.scene-error p{max-width:36ch;line-height:1.5;margin:0}.scene-error>div{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
@media(max-width:530px){.paper-overview{width:84px;right:8px;bottom:8px}.scene-error{padding:16px}}
