/* mb1-20261014 — Map Builder three-plate shell (Lantern Coast bible). Scoped to body.mb-v2. */
@font-face{font-family:'Cinzel';font-style:normal;font-weight:400 700;font-display:block;src:url(/fonts/woff2/s_cinzel_v26_8vIJ7ww63mVu7gt79mT7.woff2) format('woff2');unicode-range:U+0000-00FF,U+2000-206F}
body.mb-v2{--lc-navy:#000F17;--lc-card:#04131E;--lc-copper:#C9773B;--lc-cream:#F2D7AC;--lc-edge:#8A683C;--lc-dim:rgba(242,215,172,.72);--lc-line:rgba(138,104,60,.55);--lc-field:#020d15;--lc-sans:"Source Sans 3",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;--lc-serif:"Cinzel",Georgia,serif;background:var(--lc-navy)!important;background-image:none!important;color:var(--lc-cream)}
body.mb-v2 #editor-view{display:block!important;padding:12px!important;height:calc(100dvh - var(--mb-hdr,64px));box-sizing:border-box;background:var(--lc-navy)}
body.mb-v2 #editor-view>.chrome-bar,body.mb-v2 #editor-view>#layers-rail,body.mb-v2 #editor-view>.status-bar,body.mb-v2 #map-phone-fab,body.mb-v2 #map-phone-sheet,body.mb-v2 [id^="map-phone-"],body.mb-v2 #stamp-popup,body.mb-v2 #selected-stamp-chip,body.mb-v2 #btn-fog-reset,body.mb-v2 .mb-retired,body.mb-v2 #side-panel .panel-close,body.mb-v2 #btn-close-side{display:none!important}
html body.mb-v2 #editor-view .mb-shell{display:grid;grid-template-columns:288px minmax(0,1fr) 280px;gap:12px;height:100%;min-height:0;font-family:var(--lc-sans);color:var(--lc-cream)}
html body.mb-v2 #editor-view .mb-plate{background:var(--lc-card);border:1px solid var(--lc-edge);border-radius:10px;min-height:0;min-width:0;box-sizing:border-box}
html body.mb-v2 #editor-view #mb-left,html body.mb-v2 #editor-view #mb-right{overflow:auto;padding:12px;scrollbar-width:thin;scrollbar-color:var(--lc-edge) transparent}
html body.mb-v2 #editor-view #mb-center{display:flex;flex-direction:column;overflow:hidden}
html body.mb-v2 #editor-view .mb-h{font-family:var(--lc-serif);font-size:15px;font-weight:600;letter-spacing:.04em;margin:0 0 8px;color:var(--lc-cream)}
html body.mb-v2 #editor-view .mb-h3{font-family:var(--lc-serif);font-size:14px;font-weight:600;margin:0 0 6px;color:var(--lc-cream)}
html body.mb-v2 #editor-view .mb-dim{color:var(--lc-dim);font-size:13px}
html body.mb-v2 #editor-view .mb-sec{border-top:1px solid var(--lc-line);padding-top:10px;margin-top:10px}
html body.mb-v2 #editor-view .mb-sec:first-child{border-top:0;margin-top:0;padding-top:0}
html body.mb-v2 #editor-view .mb-sec-h{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
html body.mb-v2 #editor-view .mb-cats{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:10px}
html body.mb-v2 #editor-view .mb-cat{flex:1 1 auto;font:600 12px var(--lc-sans);padding:5px 8px;border-radius:999px;border:1px solid var(--lc-line);background:transparent;color:var(--lc-dim);cursor:pointer}
html body.mb-v2 #editor-view .mb-cat.is-on{border-color:var(--lc-copper);color:var(--lc-cream);background:rgba(201,119,59,.16)}
html body.mb-v2 #editor-view .mb-tiles{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
html body.mb-v2 #editor-view .mb-tile{display:flex;flex-direction:column;align-items:center;gap:3px;padding:7px 2px;border:1px solid var(--lc-line);border-radius:8px;background:var(--lc-field);color:var(--lc-cream);font:500 13px var(--lc-sans);cursor:pointer;min-height:52px}
html body.mb-v2 #editor-view .mb-tile .mb-ico{font-size:17px;line-height:1;color:var(--lc-copper)}
html body.mb-v2 #editor-view .mb-tile:hover{border-color:var(--lc-edge)}
html body.mb-v2 #editor-view .mb-tile.is-on{border-color:var(--lc-copper);background:rgba(201,119,59,.18);box-shadow:inset 0 0 0 1px var(--lc-copper)}
html body.mb-v2 #editor-view .mb-btn{font:600 12px var(--lc-sans);color:var(--lc-cream);background:var(--lc-field);border:1px solid var(--lc-line);border-radius:6px;padding:5px 10px;cursor:pointer;white-space:nowrap;min-height:30px}
html body.mb-v2 #editor-view .mb-btn:hover{border-color:var(--lc-copper)}
html body.mb-v2 #editor-view .mb-btn:disabled{opacity:.4;cursor:default}
html body.mb-v2 #editor-view .mb-btn[aria-pressed=true]{border-color:var(--lc-copper);background:rgba(201,119,59,.18)}
html body.mb-v2 #editor-view .mb-btn.mb-ic{min-width:30px;padding:5px 6px;font-size:14px}
body.mb-v2 #mb-save{background:var(--lc-copper)!important;border-color:var(--lc-copper)!important;color:var(--lc-navy)!important}
html body.mb-v2 #editor-view .mb-shell button{box-sizing:border-box;margin:0;min-width:0;text-transform:none;letter-spacing:normal}
html body.mb-v2 #editor-view .mb-row,html body.mb-v2 #editor-view .mb-col{display:flex;gap:6px;flex-wrap:wrap}html body.mb-v2 #editor-view .mb-col{flex-direction:column}
html body.mb-v2 #editor-view .mb-pad{padding:6px 10px}
html body.mb-v2 #editor-view .mb-opts{margin-top:10px}
html body.mb-v2 #editor-view .mb-shell.mb-opts-off #side-panel{display:none!important}
html body.mb-v2 #editor-view .mb-top{display:flex;align-items:center;gap:6px;padding:8px 10px;border-bottom:1px solid var(--lc-line);flex-wrap:wrap}
html body.mb-v2 #editor-view .mb-vrow{display:inline-flex;align-items:center;gap:4px;padding:0 6px;border-left:1px solid var(--lc-line);border-right:1px solid var(--lc-line)}
html body.mb-v2 #editor-view .mb-sp{flex:1}
html body.mb-v2 #editor-view .mb-zoom{min-width:44px;text-align:center;font-size:12px;color:var(--lc-dim);font-variant-numeric:tabular-nums}
html body.mb-v2 #editor-view .mb-feet{display:inline-flex;align-items:center;gap:3px}
html body.mb-v2 #editor-view .mb-feet input{width:44px;background:var(--lc-field);color:var(--lc-cream);border:1px solid var(--lc-line);border-radius:6px;padding:4px;font:12px var(--lc-sans)}
html body.mb-v2 #editor-view .mb-mapbtn{max-width:260px;overflow:hidden;text-overflow:ellipsis;font-family:var(--lc-serif)}
html body.mb-v2 #editor-view .mb-pop-wrap{position:relative;display:inline-block}
html body.mb-v2 #editor-view .mb-pop{position:absolute;top:calc(100% + 4px);left:0;z-index:60;min-width:240px;max-height:60vh;overflow:auto;background:var(--lc-card);border:1px solid var(--lc-edge);border-radius:8px;padding:6px 0;box-shadow:0 8px 24px rgba(0,0,0,.5)}
html body.mb-v2 #editor-view .mb-pop[hidden]{display:none}
html body.mb-v2 #editor-view .mb-pop-r{left:auto;right:0}html body.mb-v2 #editor-view .mb-pop-sm{min-width:200px}
html body.mb-v2 #editor-view .mb-pop-k{margin:6px 10px 2px;font:600 13px var(--lc-sans);letter-spacing:.08em;text-transform:uppercase;color:var(--lc-dim)}
html body.mb-v2 #editor-view .mb-row-btn{display:block;width:100%;text-align:left;padding:7px 12px;background:none;border:0;color:var(--lc-cream);font:14px var(--lc-sans);cursor:pointer}
html body.mb-v2 #editor-view .mb-row-btn:hover{background:rgba(201,119,59,.16)}
html body.mb-v2 #editor-view .mb-pop label,html body.mb-v2 #editor-view .mb-pop input[type=text]{color:var(--lc-cream)}
html body.mb-v2 #editor-view .mb-pop #map-name{width:100%;box-sizing:border-box;background:var(--lc-field);color:var(--lc-cream);border:1px solid var(--lc-line);border-radius:6px;padding:6px}
html body.mb-v2 #editor-view .mb-stage{position:relative;flex:1;min-height:0}
body.mb-v2 .mb-stage #map-wrap{position:absolute!important;inset:0;width:auto!important;height:auto!important;min-height:0!important}
html body.mb-v2 #editor-view .mb-foot{display:flex;justify-content:space-between;gap:10px;padding:6px 10px;border-top:1px solid var(--lc-line);font-size:13px;color:var(--lc-dim);min-height:28px;align-items:center}
html body.mb-v2 #editor-view .mb-foot #mb-foot-l{display:flex;gap:10px;min-width:0;overflow:hidden;white-space:nowrap}
html body.mb-v2 #editor-view .mb-foot #status,html body.mb-v2 #editor-view .mb-foot #selection-info{color:var(--lc-dim)!important;font-size:13px}
html body.mb-v2 #editor-view .mb-phone-bar{display:none}
html body.mb-v2 #editor-view .mb-right-close{display:none}
/* moved editor panels — recolor only */
body.mb-v2 #side-panel{display:block!important;position:static!important;transform:none!important;width:auto!important;max-height:none!important;background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;margin:0!important;color:var(--lc-cream)}
body.mb-v2 #side-panel[hidden]{display:block!important}
body.mb-v2 #side-panel .context-panel h2,body.mb-v2 #side-panel .context-panel h3{font-family:var(--lc-serif);color:var(--lc-cream)}
body.mb-v2 #mb-left .tool-hint,body.mb-v2 #mb-right .tool-hint{color:var(--lc-dim)}
body.mb-v2 #mb-left input[type=range]{accent-color:var(--lc-copper)}
body.mb-v2 #mb-left button.chip.active,body.mb-v2 #mb-left .chip[aria-pressed=true]{border-color:var(--lc-copper)!important;color:var(--lc-cream)!important}
body.mb-v2 #mb-stamps #stamp-popup-tray{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;max-height:none}
body.mb-v2 #mb-stamps #stamp-collection-row,body.mb-v2 #mb-stamps #stamp-popup-types{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:6px}
body.mb-v2 #layers-paint-panel{display:block!important;position:static!important;background:transparent!important;border:0!important;padding:0!important}
body.mb-v2 #layers-paint-panel.hidden,body.mb-v2 #layers-paint-panel[hidden]{display:block!important}
body.mb-v2 #mb-layers .layer-row,body.mb-v2 #mb-layers li{border-color:var(--lc-line)!important}
html body.mb-v2 #editor-view .mb-insp-stamp{display:flex;gap:10px;align-items:center}
html body.mb-v2 #editor-view .mb-insp-stamp img,html body.mb-v2 #editor-view .mb-insp-empty{width:56px;height:56px;object-fit:contain;border:1px solid var(--lc-line);border-radius:6px;background:var(--lc-field);display:block}
html body.mb-v2 #editor-view .mb-saved-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:6px}
html body.mb-v2 #editor-view .mb-saved-card{display:flex;flex-direction:column;gap:4px;padding:4px;border:1px solid var(--lc-line);border-radius:6px;background:var(--lc-field);color:var(--lc-cream);font:13px var(--lc-sans);cursor:pointer;text-align:left}
html body.mb-v2 #editor-view .mb-saved-card:hover{border-color:var(--lc-copper)}
html body.mb-v2 #editor-view .mb-saved-card span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body.mb-v2 #editor-view .mb-thumb{display:block;aspect-ratio:4/3;background:var(--lc-navy);border-radius:4px;overflow:hidden}
html body.mb-v2 #editor-view .mb-thumb img{width:100%;height:100%;object-fit:cover;display:block}
@media (max-width:1100px){html body.mb-v2 #editor-view .mb-shell{grid-template-columns:250px minmax(0,1fr) 230px}}
/* phone */
@media (max-width:600px){
  body.mb-v2 #editor-view{padding:6px!important;height:auto;min-height:calc(100dvh - var(--mb-hdr,56px))}
  html body.mb-v2 #editor-view .mb-shell{display:flex;flex-direction:column;gap:6px;height:auto}
  html body.mb-v2 #editor-view #mb-center{order:1;height:62dvh;min-height:320px}
  html body.mb-v2 #editor-view #mb-left{order:2;padding:8px}
  html body.mb-v2 #editor-view #mb-left>.mb-h{display:none}
  html body.mb-v2 #editor-view .mb-desk,html body.mb-v2 #editor-view .mb-foot,html body.mb-v2 #editor-view .mb-top #mb-vrow>:not(#mb-grid):not(#mb-fit){display:none!important}
  html body.mb-v2 #editor-view .mb-top #mb-vrow{border:0;padding:0}
  html body.mb-v2 #editor-view .mb-top{flex-wrap:nowrap;overflow-x:auto;padding:6px}
  html body.mb-v2 #editor-view .mb-top::after{content:none}
  html body.mb-v2 #editor-view .mb-shell:not([data-mb-curcat=grid]) .mb-top #mb-fit{display:inline-block}
  html body.mb-v2 #editor-view .mb-mapbtn{max-width:130px}
  html body.mb-v2 #editor-view .mb-cats{flex-wrap:nowrap;overflow-x:auto}
  html body.mb-v2 #editor-view .mb-cat{flex:0 0 auto}
  html body.mb-v2 #editor-view .mb-tiles{display:flex;overflow-x:auto;gap:6px}
  html body.mb-v2 #editor-view .mb-tile{flex:0 0 64px;min-height:48px}
  html body.mb-v2 #editor-view .mb-phone-bar{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;padding:6px;border-top:1px solid var(--lc-line)}
  html body.mb-v2 #editor-view #mb-right{position:fixed;left:0;right:0;bottom:0;max-height:70dvh;z-index:80;border-radius:12px 12px 0 0;transform:translateY(105%);transition:transform .2s}
  html body.mb-v2 #editor-view .mb-shell.mb-right-open #mb-right{transform:none}
  html body.mb-v2 #editor-view #mb-right [data-mb-rsec]{display:none}
  html body.mb-v2 #editor-view #mb-right [data-mb-rsec].is-phone-on{display:block;border-top:0;margin-top:0}
  html body.mb-v2 #editor-view .mb-right-close{display:block;position:absolute;top:8px;right:8px}
  html body.mb-v2 #editor-view #mb-sec-grid .mb-vrow{display:flex!important;flex-wrap:wrap;border:0;padding:0}
}
@media (max-width:600px){html body.mb-v2 #editor-view #mb-center .mb-top #mb-vrow #mb-grid,html body.mb-v2 #editor-view #mb-center .mb-top #mb-vrow #mb-fit{display:inline-block}}
body.mb-v2 #side-panel .context-panel{position:static!important;transform:none!important;max-height:none!important;width:auto!important}
body.mb-v2 #side-panel .context-panel>h2{position:static!important;transform:none!important;margin:10px 0 6px!important;font-size:13px}
body.mb-v2 #stamp-panel>h2{display:none!important}
html body.mb-v2 #editor-view #side-panel.side-panel,html body.mb-v2 #editor-view.has-tool-options #side-panel.side-panel:not([hidden]),html body.mb-v2.map-phone-sheet-peek #editor-view #side-panel.side-panel:not([hidden]),html body.mb-v2.map-phone-sheet-open #editor-view #side-panel.side-panel:not([hidden]){position:static!important;inset:auto!important;transform:none!important;max-height:none!important;height:auto!important;width:auto!important;max-width:none!important;z-index:auto!important;box-shadow:none!important;border-radius:0!important;overflow:visible!important;transition:none!important;padding:0!important}
@media (min-width:601px){html body.mb-v2 #editor-view .mb-top{flex-wrap:nowrap;gap:4px;overflow:visible}html body.mb-v2 #editor-view .mb-top .mb-btn{padding:4px 7px;min-height:28px}html body.mb-v2 #editor-view .mb-top .mb-btn.mb-ic{min-width:26px;padding:4px}html body.mb-v2 #editor-view .mb-mapbtn{max-width:190px}html body.mb-v2 #editor-view .mb-vrow{gap:3px;padding:0 4px}html body.mb-v2 #editor-view .mb-zoom{min-width:36px}html body.mb-v2 #editor-view .mb-feet input{width:36px}}

html body.mb-v2 #editor-view .mb-cat.is-on{background:var(--lc-cream)!important;color:var(--lc-navy)!important;border-color:var(--lc-cream)!important}
@media (max-width:600px){
  html body.mb-v2 #editor-view .mb-shell[data-mb-curcat=draw] .mb-tile:not([data-mb-tcat=draw]),html body.mb-v2 #editor-view .mb-shell[data-mb-curcat=place] .mb-tile:not([data-mb-tcat=place]),html body.mb-v2 #editor-view .mb-shell[data-mb-curcat=sight] .mb-tile:not([data-mb-tcat=sight]),html body.mb-v2 #editor-view .mb-shell[data-mb-curcat=grid] .mb-tile:not([data-mb-tcat=grid]),html body.mb-v2 #editor-view .mb-shell[data-mb-curcat=map] .mb-tiles,html body.mb-v2 #editor-view .mb-shell[data-mb-curcat=file] .mb-tiles{display:none!important}
  html body.mb-v2 #editor-view .mb-tiles{display:flex;flex-wrap:wrap;overflow:visible}
  html body.mb-v2 #editor-view .mb-tile{flex:1 1 0;flex-direction:row;justify-content:center;min-height:32px;padding:4px 6px;font-size:13px;border-radius:6px}
  html body.mb-v2 #editor-view .mb-tile .mb-ico{font-size:13px}
  html body.mb-v2 #editor-view .mb-tile.is-on{background:var(--lc-cream);color:var(--lc-navy);border-color:var(--lc-cream)}
  html body.mb-v2 #editor-view .mb-tile.is-on .mb-ico{color:var(--lc-navy)}
  body.mb-v2 #mb-stamps #stamp-popup-tray{grid-template-columns:repeat(4,1fr)}
}
html body.mb-v2 #mb-shell,html body.mb-v2 .stamp-popup,html body.mb-v2 .map-size-modal,html body.mb-v2 [id$="-popup"]{--da-bg:#000F17!important;--da-bg-elevated:#04131E!important;--da-panel:#04131E!important;--da-ink:#F2D7AC!important;--da-text:#F2D7AC!important;--da-ink-muted:rgba(242,215,172,.72)!important;--da-ink-soft:rgba(242,215,172,.8)!important;--da-metal-orange:#C9773B!important;--da-metal-orange-hi:#d98a4f!important;--da-metal-blue:#8A683C!important;--da-gold:#C9773B!important;--da-gold-hi:#F2D7AC!important;--da-border:#8A683C!important;--da-font-display:"Cinzel",Georgia,serif!important;--da-font-body:var(--lc-sans)!important;font-family:var(--lc-sans)!important}
html body.mb-v2 #mb-shell{--da-accent:#C9773B!important;--da-metal-blue-hi:#C9773B!important;--accent:#C9773B!important;--accent-glow:rgba(201,119,59,.35)!important;--da-line:rgba(138,104,60,.55)!important}
html body.mb-v2 #editor-view #mb-shell select,html body.mb-v2 #editor-view #mb-shell input:not([type=checkbox]):not([type=range]),html body.mb-v2 #editor-view #mb-shell .chip,html body.mb-v2 #editor-view #mb-shell .mini-upload-btn,html body.mb-v2 #editor-view #mb-shell .stamp-upload{background:var(--lc-field)!important;color:var(--lc-cream)!important;border-color:var(--lc-line)!important}
html body.mb-v2 #editor-view #mb-shell .chip.active,html body.mb-v2 #editor-view #mb-shell .chip[aria-pressed=true],html body.mb-v2 #editor-view #mb-shell .chip[aria-selected=true]{background:var(--lc-cream)!important;color:var(--lc-navy)!important;border-color:var(--lc-cream)!important}
html body.mb-v2 #editor-view #mb-shell label,html body.mb-v2 #editor-view #mb-shell .kind,html body.mb-v2 #editor-view #mb-shell .tool-hint{color:var(--lc-dim)!important}
html body.mb-v2 #editor-view #mb-shell button:not(.mb-tile):not(.mb-cat):not(.mb-btn):not(.mb-row-btn):not(.mb-saved-card):not(.chip):not(.stamp-item):not(.wall-overlay-tex):not(.mb-chip):not(.mb-link-kind):not(.mb-lk-row):not(.mb-lk-mark):not(.mb-lk-prev):not(.ua-del):not(.sb-pill){border-color:var(--lc-line)!important;color:var(--lc-cream)!important}
html body.mb-v2 #editor-view #mb-shell #sb-pills .sb-pill.is-on{background:var(--lc-cream)!important;color:var(--lc-navy)!important;border-color:var(--lc-cream)!important}
html body.mb-v2 #editor-view #mb-shell #sb-pills .sb-pill.is-on span{color:var(--lc-navy)!important;opacity:1}
html body.mb-v2 #editor-view #mb-shell .stamp-item{background:var(--lc-field)!important;border-color:var(--lc-line)!important;color:var(--lc-cream)!important}
html body.mb-v2 #editor-view #mb-shell .stamp-item.selected,html body.mb-v2 #editor-view #mb-shell .stamp-item.active{border-color:var(--lc-copper)!important}
html body.mb-v2 #editor-view #mb-shell #stamp-popup-tray{border:0!important;background:transparent!important;padding:0!important}
html body.mb-v2 #editor-view #mb-shell input[type=range]{background:transparent!important;border-color:transparent!important;accent-color:var(--lc-copper)}
html body.mb-v2 #editor-view #mb-shell .wall-overlay-tex,html body.mb-v2 #editor-view #mb-shell #selected-wall-thumb,html body.mb-v2 #editor-view #mb-shell #selected-texture-thumb,html body.mb-v2 #editor-view #mb-shell .selected-stamp-chip{border-color:var(--lc-line)!important;background-color:var(--lc-field)!important}
html body.mb-v2 #editor-view #mb-shell .wall-overlay-tex.is-active{border-color:var(--lc-copper)!important}
/* ---- mb2-20261014: Links tool ---- */
html body.mb-v2 #editor-view .mb-link-kinds{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-bottom:8px}
html body.mb-v2 #editor-view .mb-link-kind{display:flex;flex-direction:column;align-items:center;gap:3px;padding:8px 2px;border:1px solid var(--lc-line);border-radius:8px;background:var(--lc-field);color:var(--lc-cream);font:500 13px var(--lc-sans);cursor:pointer}
html body.mb-v2 #editor-view .mb-link-kind .mb-ico{font-size:18px;color:var(--lc-copper)}
html body.mb-v2 #editor-view .mb-link-kind.is-on{border-color:var(--lc-cream);box-shadow:inset 0 0 0 1px var(--lc-cream)}
html body.mb-v2 #editor-view .mb-field{display:flex;flex-direction:column;gap:3px;margin:8px 0;font-size:13px;letter-spacing:.06em;text-transform:uppercase;color:var(--lc-dim)}
html body.mb-v2 #editor-view .mb-field select,html body.mb-v2 #editor-view .mb-field input{text-transform:none;letter-spacing:normal;font:13px var(--lc-sans);padding:6px;border-radius:6px;border:1px solid var(--lc-line);background:var(--lc-field);color:var(--lc-cream)}
html body.mb-v2 #editor-view .mb-chip{font:600 12px var(--lc-sans);padding:5px 9px;border-radius:6px;border:1px solid var(--lc-line);background:var(--lc-field);color:var(--lc-cream);cursor:pointer;text-transform:none;letter-spacing:normal}
html body.mb-v2 #editor-view .mb-chip.is-on{background:var(--lc-cream);color:var(--lc-navy);border-color:var(--lc-cream)}
html body.mb-v2 #editor-view .mb-lk-h{margin-top:12px;padding-top:8px;border-top:1px solid var(--lc-line)}
html body.mb-v2 #editor-view .mb-lk-list{list-style:none;margin:0;padding:0}
html body.mb-v2 #editor-view .mb-lk-list li{border-bottom:1px solid var(--lc-line)}
html body.mb-v2 #editor-view .mb-lk-row{display:flex;justify-content:space-between;gap:8px;width:100%;padding:7px 2px;background:none;border:0;color:var(--lc-cream);font:13px var(--lc-sans);cursor:pointer;text-align:left}
html body.mb-v2 #editor-view .mb-lk-row.is-on,html body.mb-v2 #editor-view .mb-lk-row:hover{background:rgba(201,119,59,.14)}
html body.mb-v2 #editor-view .mb-lk-foot{display:flex;justify-content:space-between;margin-top:16px}
html body.mb-v2 #editor-view .mb-lk-dest{display:flex;gap:10px;align-items:flex-start;margin:6px 0 10px}
html body.mb-v2 #editor-view .mb-lk-prev{position:relative;width:96px;height:64px;flex:0 0 96px;padding:0;border:1px solid var(--lc-line);border-radius:6px;background:var(--lc-navy);overflow:hidden;cursor:crosshair}
html body.mb-v2 #editor-view .mb-lk-prev img{width:100%;height:100%;object-fit:fill;display:block}
html body.mb-v2 #editor-view .mb-lk-prev i,#mb-link-pick .mb-pick-img i{position:absolute;width:12px;height:12px;margin:-6px 0 0 -6px;border-radius:50%;border:2px solid #F2D7AC;background:#000F17}
html body.mb-v2 #editor-view .mb-check{display:flex;gap:6px;align-items:center;font-size:13px;margin:6px 0}
html body.mb-v2 #editor-view .mb-check input{accent-color:var(--lc-copper)}
html body.mb-v2 #editor-view .mb-lk-acts{justify-content:space-between}
#mb-link-layer{position:absolute;inset:0;pointer-events:none;z-index:6;overflow:hidden}
#mb-link-cap{position:absolute;inset:0;z-index:5;cursor:crosshair;background:transparent}
#mb-link-cap[hidden]{display:none}
#mb-link-layer .mb-lk-mark{position:absolute;width:26px;height:26px;margin:0!important;transform:translate(-50%,-50%);box-sizing:border-box;border-radius:50%;border:2px solid #F2D7AC;background:#000F17;color:#F2D7AC;font:700 13px/1 system-ui,sans-serif;display:flex;align-items:center;justify-content:center;pointer-events:auto;cursor:pointer;padding:0}
#mb-link-layer .mb-lk-mark.is-arrive{border-style:dashed;border-color:#8A683C}
#mb-link-layer .mb-lk-mark.is-on{border-color:#C9773B;box-shadow:0 0 0 2px #C9773B}
#mb-link-layer .mb-lk-tag{position:absolute;transform:translateY(-50%);white-space:nowrap;padding:3px 9px;border-radius:999px;background:#000F17;border:1px solid #8A683C;color:#F2D7AC;font:600 12px "Source Sans 3",system-ui,sans-serif;pointer-events:none}
#mb-link-pick{position:fixed;inset:0;z-index:200;background:rgba(0,15,23,.82);display:flex;align-items:center;justify-content:center;padding:16px}
#mb-link-pick[hidden]{display:none}
#mb-link-pick .mb-pick-sheet{background:#04131E;border:1px solid #8A683C;border-radius:10px;padding:12px;max-width:min(820px,96vw);width:100%;color:#F2D7AC;font-family:"Source Sans 3",system-ui,sans-serif}
#mb-link-pick .mb-sec-h{display:flex;justify-content:space-between;align-items:center}
#mb-link-pick .mb-h{font-family:"Cinzel",Georgia,serif;font-size:15px;margin:0}
#mb-link-pick .mb-btn{font:600 14px "Source Sans 3",sans-serif;color:#F2D7AC;background:#020d15;border:1px solid rgba(138,104,60,.55);border-radius:6px;padding:4px 10px;cursor:pointer}
#mb-link-pick .mb-dim{color:rgba(242,215,172,.72);font-size:13px}
#mb-link-pick .mb-pick-img{position:relative;cursor:crosshair;border:1px solid #8A683C;border-radius:6px;overflow:hidden;background:#000F17}
#mb-link-pick .mb-pick-img img{display:block;width:100%;height:auto;max-height:70vh;object-fit:fill}
#mb-link-pick .mb-pick-blank{aspect-ratio:4/3;display:flex;align-items:center;justify-content:center;color:rgba(242,215,172,.72);font-size:13px;padding:12px;text-align:center}
@media (min-width:601px){html body.mb-v2 #editor-view .mb-tiles{grid-template-columns:repeat(4,1fr)}}
/* mb2: top bar never clips (File ▾ was cut off at 1280/1024 in mb1) — compact first, wrap as last resort */
@media (min-width:601px){html body.mb-v2 #editor-view .mb-top{flex-wrap:wrap;row-gap:4px}}
@media (min-width:601px) and (max-width:1400px){html body.mb-v2 #editor-view .mb-mapbtn{max-width:140px}html body.mb-v2 #editor-view .mb-top>.mb-btn.mb-desk[data-mb-proxy="#btn-export"]{display:none}}
html body.mb-v2 #editor-view .mb-check{flex-wrap:wrap;text-transform:none;letter-spacing:normal;color:var(--lc-cream)!important}
html body.mb-v2 #editor-view .mb-check .mb-dim{flex-basis:100%;padding-left:22px}
html body.mb-v2 #editor-view #mb-shell .mb-check,html body.mb-v2 #editor-view #mb-shell .mb-check *{font-family:var(--lc-sans)!important;text-transform:none!important;letter-spacing:normal!important;font-size:13px!important}
html body.mb-v2 #editor-view #mb-shell .mb-check strong{color:var(--lc-cream)!important;font-weight:700}
html body.mb-v2 #editor-view #mb-shell .mb-check .mb-dim{color:var(--lc-dim)!important;font-size:13px!important}
html body.mb-v2 #editor-view #mb-shell .mb-chip.is-on{color:var(--lc-navy)!important}
html body.mb-v2 #editor-view #mb-shell .mb-check input{display:inline-block!important;width:auto!important;margin:0!important;flex:0 0 auto}
/* mb2b: Two-way row = checkbox + one text block that wraps as normal prose (no narrow column) */
html body.mb-v2 #editor-view #mb-shell .mb-check.mb-check2{display:flex!important;flex-wrap:nowrap!important;align-items:flex-start;gap:8px}
html body.mb-v2 #editor-view #mb-shell .mb-check2 input{margin-top:3px!important}
html body.mb-v2 #editor-view #mb-shell .mb-check2 .mb-check-t{display:block;flex:1 1 auto;min-width:0;line-height:1.35}
html body.mb-v2 #editor-view #mb-shell .mb-check2 .mb-check-t .mb-dim{display:inline!important;padding:0!important;flex-basis:auto!important}
/* mb2b: top bar right edge breathing room so the last control never sits on the plate edge */
@media (min-width:601px){html body.mb-v2 #editor-view .mb-top{padding-right:12px}}

/* fouc1-20261014: body.mb-v2 is now in the HTML; hide the editor until the shell root exists */
@keyframes daShellReveal{to{visibility:visible}}
@media (scripting:enabled){html body.mb-v2:not(:has(#mb-shell)) #editor-view{visibility:hidden;animation:daShellReveal 0s linear 4s forwards}}
/* audit1-20261014: popup labels at the 11px floor */
html body.mb-v2 #template-popup .kind,html body.mb-v2 #texture-popup .mini-upload-btn{font-size:13px!important}

/* mbnew: Map size modal — Lantern Coast bible (navy/card/cream/edge, Cinzel titles ≥14px, Source Sans ≥13px, 8px grid, one copper action). */
html body.mb-v2 #map-size-modal .map-size-backdrop{background:rgba(0,15,23,.82)!important}
html body.mb-v2 #map-size-modal .map-size-sheet{background:#04131E!important;color:#F2D7AC!important;border:1px solid #8A683C!important;border-radius:8px!important;padding:24px!important;gap:16px!important;box-shadow:0 16px 48px rgba(0,0,0,.6)!important;font-family:"Source Sans 3","Source Sans Pro",sans-serif!important;font-size:14px!important;max-width:min(480px,calc(100vw - 32px))!important;width:100%!important}
html body.mb-v2 #map-size-modal .stamp-popup-head{display:flex!important;align-items:center!important;justify-content:space-between!important;margin:0 0 8px!important;padding:0 0 16px!important;border-bottom:1px solid #8A683C!important;background:transparent!important}
html body.mb-v2 #map-size-modal #map-size-title{font-family:"Cinzel",serif!important;font-size:20px!important;font-weight:600!important;letter-spacing:.04em!important;color:#F2D7AC!important;margin:0!important}
html body.mb-v2 #map-size-modal #map-size-close{min-width:40px!important;min-height:40px!important;background:transparent!important;border:1px solid #8A683C!important;color:#F2D7AC!important;border-radius:8px!important;font-size:20px!important;line-height:1!important}
html body.mb-v2 #map-size-modal .tool-hint{font-family:"Source Sans 3","Source Sans Pro",sans-serif!important;font-size:13px!important;color:#F2D7AC!important;opacity:.78!important;margin:0 0 8px!important;line-height:1.5!important}
html body.mb-v2 #map-size-modal .field-row{display:flex!important;flex-direction:column!important;gap:8px!important;margin:0 0 16px!important}
html body.mb-v2 #map-size-modal .field-row>label{font-family:"Source Sans 3","Source Sans Pro",sans-serif!important;font-size:13px!important;font-weight:600!important;letter-spacing:.06em!important;text-transform:uppercase!important;color:#F2D7AC!important}
html body.mb-v2 #map-size-modal .map-size-types,html body.mb-v2 #map-size-modal .map-size-presets{display:flex!important;flex-wrap:wrap!important;gap:8px!important}
html body.mb-v2 #map-size-modal .chip{min-height:40px!important;padding:8px 16px!important;background:#000F17!important;color:#F2D7AC!important;border:1px solid #8A683C!important;border-radius:8px!important;font-family:"Source Sans 3","Source Sans Pro",sans-serif!important;font-size:14px!important;box-shadow:none!important}
html body.mb-v2 #map-size-modal .chip.active{background:#04131E!important;border-color:#F2D7AC!important;box-shadow:inset 0 0 0 1px #F2D7AC!important}
html body.mb-v2 #map-size-modal .map-size-custom{display:flex!important;align-items:center!important;gap:8px!important}
html body.mb-v2 #map-size-modal .map-size-custom input[type="number"]{width:96px!important;min-height:40px!important;padding:8px!important;background:#000F17!important;color:#F2D7AC!important;border:1px solid #8A683C!important;border-radius:8px!important;font-family:"Source Sans 3","Source Sans Pro",sans-serif!important;font-size:14px!important}
html body.mb-v2 #map-size-modal .map-size-actions{display:flex!important;justify-content:flex-end!important;gap:8px!important;margin-top:8px!important;padding-top:16px!important;border-top:1px solid #8A683C!important}
html body.mb-v2 #map-size-modal #map-size-cancel{min-height:40px!important;padding:8px 16px!important;background:transparent!important;color:#F2D7AC!important;border:1px solid #8A683C!important;border-radius:8px!important;font-family:"Source Sans 3","Source Sans Pro",sans-serif!important;font-size:14px!important}
html body.mb-v2 #map-size-modal #map-size-apply{min-height:40px!important;padding:8px 24px!important;background:var(--da-metal-orange,#B8743A)!important;color:#000F17!important;border:1px solid var(--da-metal-orange,#B8743A)!important;border-radius:8px!important;font-family:"Source Sans 3","Source Sans Pro",sans-serif!important;font-size:14px!important;font-weight:700!important}
@media (max-width:600px){html body.mb-v2 #map-size-modal .chip,html body.mb-v2 #map-size-modal #map-size-cancel,html body.mb-v2 #map-size-modal #map-size-apply,html body.mb-v2 #map-size-modal #map-size-close,html body.mb-v2 #map-size-modal .map-size-custom input[type="number"]{min-height:44px!important}html body.mb-v2 #map-size-modal .map-size-sheet{padding:16px!important}}

/* mbfix3: Router material tiles (wide wall art) stay inside the 4-column tray */
html body.mb-v2 #mb-stamps #stamp-popup-tray{grid-template-columns:repeat(4,minmax(0,1fr))!important}
html body.mb-v2 #mb-stamps #stamp-popup-tray .stamp-item{min-width:0!important}
html body.mb-v2 #mb-stamps #stamp-popup-tray .stamp-item img{max-width:100%!important}
/* mbfix4: exact rotation angle field (Lantern Coast inputs; 44px tap on phones) */
html body #stamp-rotate-exact,html body label.stamp-rotate-exact{display:flex!important;align-items:center;gap:8px;margin:4px 0 8px;font-size:13px}
html body label.stamp-rotate-exact input#stamp-rotate-num{width:72px;min-height:32px;padding:4px 8px;border-radius:8px;border:1px solid var(--lc-line,rgba(138,104,60,.55));background:var(--lc-field,#020d15);color:var(--lc-cream,#F2D7AC);font:inherit;font-variant-numeric:tabular-nums}
@media (max-width:760px),(pointer:coarse){html body label.stamp-rotate-exact input#stamp-rotate-num{min-height:44px;width:84px;font-size:16px}}
/* mbfix6: editor-only "Hide light rings & markers" toggle — checkbox inline with its label */
html body .light-hide-row label.check{display:flex!important;align-items:center;gap:8px;min-height:32px;cursor:pointer}
html body .light-hide-row label.check input#light-hide-overlays{flex:0 0 auto;width:18px!important;height:18px;margin:0;accent-color:var(--lc-copper,#C9773B)}
@media (max-width:760px),(pointer:coarse){html body .light-hide-row label.check{min-height:44px}html body .light-hide-row label.check input#light-hide-overlays{width:22px!important;height:22px}}
/* mbfix7: export dialog choices — 44px taps on phones; disabled Export reads as disabled */
html body #export-popup #export-confirm[disabled]{opacity:.5;cursor:not-allowed}
@media (max-width:760px),(pointer:coarse){html body #export-popup label.stamp-check{min-height:44px;display:flex!important;align-items:center;gap:10px}html body #export-popup #export-confirm{min-height:44px}}
html body #export-popup label.stamp-check{display:flex!important;flex-direction:row!important;align-items:center;justify-content:flex-start;gap:10px;min-height:32px;cursor:pointer;text-align:left}
html body #export-popup label.stamp-check input[type=checkbox]{flex:0 0 auto;width:18px!important;height:18px;margin:0;accent-color:var(--lc-copper,#C9773B)}
@media (max-width:760px),(pointer:coarse){html body #export-popup label.stamp-check{min-height:44px}html body #export-popup label.stamp-check input[type=checkbox]{width:22px!important;height:22px}}
/* mscroll1-20261015: the phone layout of the v2 shell is a stacked page (map, then tools/stamp tray below).
   The older v702d fullscreen rules in map-editor.css (≤600px) still locked body.map-hall and #editor-view to
   100dvh with overflow:hidden !important, so everything below the fold was clipped and the page could not
   scroll. Unlock them for the v2 shell only; the map canvas keeps touch-action:none for draw/pan/pinch. */
@media (max-width:600px){
  html body.mb-v2.map-hall{height:auto!important;max-height:none!important;min-height:100dvh;overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior-y:auto}
  html body.mb-v2.map-hall #editor-view,html body.mb-v2.map-hall #editor-view.tool-options-hidden,html body.mb-v2.map-hall #editor-view.has-tool-options{height:auto!important;max-height:none!important;overflow:visible!important}
  /* tool1: the phone stamp tray was the whole library in one grid (~11,000px), so the map page became one long scroll. Keep the stacked layout; the tray scrolls on its own. */
  html body.mb-v2 #mb-stamps #stamp-popup-tray{max-height:min(52dvh,420px)!important;overflow:auto!important}
  html body.mb-v2 #editor-view #mb-right{overflow-y:auto;overscroll-behavior:contain}
  html body.mb-v2.map-hall.smk-open{overflow:hidden!important} /* the full-screen Stamp Maker still locks the page behind it */
  /* tool1: the fixed cookie banner sat on the stamp toolbar (search, sizes). Shorten the map while it is open so that toolbar sits above the banner. The banner itself is unchanged. */
  body.mb-v2.map-hall:has(#da-consent:not([hidden])) #editor-view #mb-center{height:calc(62dvh - 170px)!important;min-height:200px!important}
  body.mb-v2.map-hall:has(#da-consent:not([hidden])) #editor-view{padding-bottom:170px!important}
}

/* uadel1-20261015: the private-tile Delete keeps its own red outline (excluded from the cream button rule above) */

/* b2-20261016: one-line status so a long message cannot grow the footer and shrink/re-centre the map (links_mb marker 10px) */
html body.mb-v2 #editor-view .mb-foot #mb-foot-l{flex:1 1 auto}
html body.mb-v2 #editor-view .mb-foot #status{min-width:0;overflow:hidden;text-overflow:ellipsis}
html body.mb-v2 #map-sample-tip{color:var(--lc-dim,#cbb892);font-size:13px;margin-left:8px;white-space:nowrap}
html body.mb-v2 #editor-view .mb-foot .mb-foot-r{flex:0 0 auto;white-space:nowrap}
/* tr1-20261016: TOOL RAIL (toolrail_spec_v1) — desktop only; phone (<=600px) unchanged */
html body.mb-v2 #editor-view #mb-shell #mb-wall-back,html body.mb-v2 #editor-view #mb-shell .mb-key,html body.mb-v2 #editor-view #mb-shell .mb-rail-g,html body.mb-v2 #editor-view #mb-shell .mb-rail-cat,html body.mb-v2 #editor-view #mb-shell #mb-ctx-h,html body.mb-v2 #editor-view #mb-shell .mb-spager,html body.mb-v2 #editor-view #mb-shell #mb-stab-empty{display:none}
@media (min-width:601px){
  html body.mb-v2 #editor-view #mb-shell.mb-rail{grid-template-columns:342px minmax(0,1fr) 230px;gap:10px}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-left{display:grid;grid-template-columns:66px minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:8px;padding:0;overflow:hidden;background:none;border:0}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-left>.mb-h,html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-left>.mb-cats{display:none}
  /* rail */
  html body.mb-v2 #editor-view #mb-shell.mb-rail .mb-tiles{grid-column:1;display:flex;flex-direction:column;gap:2px;padding:6px 4px;overflow:hidden;background:var(--lc-card);border:1px solid var(--lc-edge);border-radius:10px;box-sizing:border-box;min-height:0}
  html body.mb-v2 #editor-view #mb-shell.mb-rail .mb-rail-g{display:block;margin:6px 0 1px;font:600 9px var(--lc-sans);letter-spacing:.12em;text-transform:uppercase;color:var(--lc-dim);text-align:center}
  html body.mb-v2 #editor-view #mb-shell.mb-rail .mb-rail-g:first-child{margin-top:0}
  html body.mb-v2 #editor-view #mb-shell.mb-rail .mb-tile{position:relative;display:flex;flex:0 0 auto;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-height:39px;height:39px;padding:2px 1px;border:1px solid transparent;border-radius:7px;background:transparent;font:500 10px var(--lc-sans);color:var(--lc-cream);box-shadow:none}
  html body.mb-v2 #editor-view #mb-shell.mb-rail .mb-tile .mb-ico{font-size:15px;line-height:1}
  html body.mb-v2 #editor-view #mb-shell.mb-rail .mb-tile:hover{border-color:var(--lc-line)}
  html body.mb-v2 #editor-view #mb-shell.mb-rail .mb-key{display:block;position:absolute;top:2px;right:4px;font:600 8px var(--lc-sans);color:var(--lc-dim)}
  html body.mb-v2 #editor-view #mb-shell.mb-rail .mb-rail-cat{display:flex}
  html body.mb-v2 #editor-view #mb-shell.mb-rail .mb-tile.is-on{background:var(--lc-cream);color:var(--lc-navy);border-color:var(--lc-cream);box-shadow:none}
  html body.mb-v2 #editor-view #mb-shell.mb-rail .mb-tile.is-on .mb-ico,html body.mb-v2 #editor-view #mb-shell.mb-rail .mb-tile.is-on .mb-key{color:var(--lc-navy)}
  html body.mb-v2 #editor-view #mb-shell.mb-rail[data-mb-curcat=map] .mb-tile.is-on:not(.mb-rail-cat),html body.mb-v2 #editor-view #mb-shell.mb-rail[data-mb-curcat=file] .mb-tile.is-on:not(.mb-rail-cat){background:transparent;color:var(--lc-cream);border-color:var(--lc-line)}
  html body.mb-v2 #editor-view #mb-shell.mb-rail[data-mb-curcat=map] .mb-tile.is-on:not(.mb-rail-cat) .mb-ico,html body.mb-v2 #editor-view #mb-shell.mb-rail[data-mb-curcat=file] .mb-tile.is-on:not(.mb-rail-cat) .mb-ico{color:var(--lc-copper)}
  /* context panel */
  html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-opts{grid-column:2;display:flex;flex-direction:column;margin:0;padding:10px 12px;overflow-x:hidden;overflow-y:auto;scrollbar-width:thin;background:var(--lc-card);border:1px solid var(--lc-edge);border-radius:10px;box-sizing:border-box;min-height:0;min-width:0}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-opts>*{flex:0 0 auto}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-ctx-h{display:block;order:-3;margin-bottom:6px}
  html body.mb-v2 #editor-view #mb-shell.mb-rail .mb-ctx-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-ctx-name{margin:0}
  html body.mb-v2 #editor-view #mb-shell.mb-rail .mb-ctx-key{font:600 10px var(--lc-sans);color:var(--lc-dim);border:1px solid var(--lc-line);border-radius:4px;padding:1px 5px}
  html body.mb-v2 #editor-view #mb-shell.mb-rail .mb-ctx-hint{margin:6px 0 0;font-size:12px}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #side-panel .context-panel>h2{display:none}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-sec-grid,html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-sec-map>.mb-h3,html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-sec-file>.mb-h3,html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-links-left>.mb-h3:first-child{display:none!important}
  /* Stamp: chosen-stamp chip + tabs on top, then the tab's content */
  html body.mb-v2 #editor-view #mb-shell.mb-rail .mb-stabs{display:none;gap:4px;margin-top:8px}
  html body.mb-v2 #editor-view #mb-shell.mb-rail[data-mb-rtool=stamp] .mb-stabs{display:flex}
  html body.mb-v2 #editor-view #mb-shell.mb-rail .mb-stabs button{flex:0 0 auto;font:600 11px var(--lc-sans);padding:4px 6px;border-radius:999px;border:1px solid var(--lc-line);background:transparent;color:var(--lc-cream);cursor:pointer;white-space:nowrap}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-stabs button.is-on{background:var(--lc-cream)!important;color:var(--lc-navy)!important;border-color:var(--lc-cream)!important}
  html body.mb-v2 #editor-view #mb-shell.mb-rail[data-mb-rtool=stamp] #side-panel,html body.mb-v2 #editor-view #mb-shell.mb-rail.mb-wallpick #side-panel{order:-2}
  html body.mb-v2 #editor-view #mb-shell.mb-rail[data-mb-rtool=links] #side-panel{display:none!important}
  html body.mb-v2 #editor-view #mb-shell.mb-rail.mb-wallpick #wall-panel>:not(#selected-wall-chip){display:none!important}
  html body.mb-v2 #editor-view #mb-shell.mb-rail.mb-wallpick #mb-wall-back{display:inline-flex}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-stamps .mb-sec-h{display:flex;align-items:center;justify-content:space-between;gap:6px}
  html body.mb-v2 #editor-view #mb-shell.mb-rail[data-mb-rtool=stamp][data-mb-stab=lib] #stamp-selected-box{display:none!important}
  html body.mb-v2 #editor-view #mb-shell.mb-rail[data-mb-rtool=stamp]:not([data-mb-stab=lib]) #mb-stamps{display:none!important}
  html body.mb-v2 #editor-view #mb-shell.mb-rail[data-mb-stab=look] [data-mb-sgrp=shadow],html body.mb-v2 #editor-view #mb-shell.mb-rail[data-mb-stab=shadow] [data-mb-sgrp=look]{display:none!important}
  html body.mb-v2 #editor-view #mb-shell.mb-rail[data-mb-rtool=stamp]:not([data-mb-stab=lib]) #stamp-selected-box[hidden]~#mb-stab-empty{display:block}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #stamp-selected-box .stamp-selected-preview{display:none}
  /* library: fixed 56px previews, 4 across, pages instead of scrolling */
  html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-stamps #stamp-popup-tray{grid-template-columns:repeat(4,56px)!important;gap:6px;justify-content:space-between;overflow:visible;max-height:none!important;height:auto}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-stamps #stamp-popup-tray .stamp-item-wrap{width:56px;min-width:0}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-stamps #stamp-popup-tray .stamp-item{width:56px;height:56px;min-height:0;padding:2px;box-sizing:border-box}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-stamps #stamp-popup-tray .stamp-item img{width:100%;height:100%;min-width:0;min-height:0;object-fit:contain}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-stamps #stamp-popup-tray .stamp-item .stamp-label,html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-stamps #stamp-popup-tray .stamp-item span:not(.stamp-sel-badge){display:none}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-stamps .mb-poff{display:none!important}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-stamps .mb-spager{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-top:6px;font-size:12px;color:var(--lc-dim)}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-stamps .mb-spager[hidden]{display:none}
  /* compact rows so the tallest panels (Light, Router) fit without scrolling */
  html body.mb-v2 #editor-view #mb-shell.mb-rail #side-panel{padding:0;margin:0;border:0;background:none;overflow:visible}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #side-panel .context-panel{padding:0;margin:0;border:0;background:none}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #side-panel .field-row{margin:0 0 5px;padding:0;gap:3px}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #side-panel .field-row>label,html body.mb-v2 #editor-view #mb-shell.mb-rail #side-panel .stamp-selected-controls>label{font-size:12px;line-height:16px;margin:0;min-height:0}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #side-panel input[type=range]{height:16px;margin:0;padding:0}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #side-panel .stamp-slider-hit{padding:0;margin:0;min-height:0}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #side-panel .check-row{margin-bottom:3px}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #side-panel label.check,html body.mb-v2 #editor-view #mb-shell.mb-rail #side-panel label.stamp-check{min-height:0;padding:1px 0;font-size:12px;line-height:16px}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #side-panel .tool-hint{font-size:11.5px;line-height:15px;margin:0 0 6px}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #side-panel .chip{padding:2px 9px;min-height:24px;font-size:12px}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #side-panel .range-ends{font-size:10px;line-height:12px;margin:0}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #side-panel input[type=color]{height:22px;padding:0 2px}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #side-panel .field-row:has(>input[type=color]){display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:8px}
  /* rt1-20261017: retest c4c88ede. Checkbox + its words on one row (the box was stretched to the panel width, so its label sat on the next line) */
  html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-opts label.check,html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-opts label.stamp-check{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:8px;text-align:left}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-opts label.check>input[type=checkbox],html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-opts label.stamp-check>input[type=checkbox]{width:16px!important;height:16px;min-width:16px;flex:0 0 16px;margin:0!important;display:inline-block!important}
  /* rt1: Select's overlay texture list shows whole (no inner scroll); Measure has no tool panel of its own (it showed Select's leftovers) */
  html body.mb-v2 #editor-view #mb-shell.mb-rail #wall-overlay-tex-grid{max-height:none;overflow:visible}
  html body.mb-v2 #editor-view #mb-shell.mb-rail[data-mb-rtool=measure] #side-panel{display:none!important}
}
@media (min-width:601px) and (max-width:1100px){
  html body.mb-v2 #editor-view #mb-shell.mb-rail{grid-template-columns:316px minmax(0,1fr) 210px}
  /* Four fixed 56px tiles plus gaps are wider than this shell's tray, so the
     fourth column was clipped. Three 56px columns fit; 1101px and up still uses
     the variable columns below. */
  html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-stamps #stamp-popup-tray{grid-template-columns:repeat(3,56px)!important}
}
@media (min-width:1101px){
  html body.mb-v2 #editor-view #mb-shell.mb-rail[data-mb-rtool=stamp] #mb-ctx-key{display:none!important}
  html body.mb-v2 #editor-view #mb-shell.mb-rail[data-mb-rtool=stamp]:not(.mb-wallpick) #mb-stamps-title{display:none!important}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-stamps #stamp-popup-tray{grid-template-columns:repeat(var(--sb-cols,5),minmax(0,1fr))!important;grid-auto-rows:var(--sb-rowh,84px);gap:6px;justify-content:stretch}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-stamps #stamp-popup-tray .stamp-item-wrap{width:auto;min-width:0;height:100%}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-stamps #stamp-popup-tray .stamp-item{display:flex;align-items:center;justify-content:center;width:100%;height:100%;min-height:0;padding:6px;box-sizing:border-box;position:relative;background:#0b1a22!important;border-color:rgba(138,104,60,.45)!important}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-stamps #stamp-popup-tray .stamp-item img{width:100%;height:100%;min-width:0;min-height:0;max-width:none;max-height:none;object-fit:contain;object-position:center;background:transparent!important;border:0!important}
  html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-stamps #stamp-popup-tray .stamp-item .name,html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-stamps #stamp-popup-tray .stamp-item .kind,html body.mb-v2 #editor-view #mb-shell.mb-rail #mb-stamps #stamp-popup-tray .stamp-item .stamp-label{display:none!important}
}

/* ports2-20261018: Links edit buttons are links to Planner › Maps & ports */
html body.mb-v2 #editor-view a.mb-btn{display:inline-flex;align-items:center;text-decoration:none}
html body.mb-v2 #editor-view a.mb-lk-planner{margin:.4rem 0 .2rem}
