/* ========================================================================== 
   Histriphy 20.0.46 · Studio launch polish
   Loaded after builder.css. Preserves every existing ID/operation and only
   changes product chrome, spacing, hierarchy and responsive placement.
   ========================================================================== */
@media (min-width:700px){
  .histriphy-builder-page{background:var(--bg)!important}
  .geo-builder-app{--rail:58px;--side:310px;background:var(--bg)!important;color:var(--ink)!important}
  .geo-builder-form{margin:0!important}

  /* Top bar: one product title, one source workflow, one history cluster. */
  .geo-builder-topbar{height:62px!important;min-height:62px!important;padding:9px 12px!important;display:grid!important;grid-template-columns:190px minmax(0,1fr) auto!important;gap:12px!important;align-items:center!important;border-bottom:1px solid var(--border-soft)!important;background:var(--bg-deep)!important;box-shadow:none!important}
  .geo-builder-title-block{gap:9px!important;min-width:0!important}.geo-builder-product-mark{width:32px!important;height:32px!important;border-radius:8px!important}.geo-builder-title-block strong{font:700 13px/1.1 var(--font-body)!important;letter-spacing:-.015em!important}.geo-builder-title-block span{margin-top:3px!important;color:var(--ink-faint)!important;font:500 10px/1.15 var(--font-body)!important;letter-spacing:0!important}
  .geo-builder-source-controls{display:flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;min-width:0!important}.geo-builder-library-select{flex:1 1 280px!important;max-width:360px!important;height:40px!important;padding:0 10px!important;border:1px solid var(--border)!important;border-radius:8px!important;background:var(--bg-card)!important}.geo-builder-library-select>span{display:none!important}.geo-builder-library-select select{height:38px!important;min-width:0!important;font:600 12px/1 var(--font-body)!important;color:var(--ink)!important}
  .geo-builder-top-button,.geo-builder-icon-button{height:40px!important;min-height:40px!important;border:1px solid var(--border)!important;border-radius:8px!important;background:var(--bg-card)!important;color:var(--ink)!important;box-shadow:none!important;font:650 11px/1 var(--font-body)!important}.geo-builder-top-button{padding:0 11px!important;gap:6px!important}.geo-builder-top-button svg,.geo-builder-icon-button svg{width:15px!important;height:15px!important}.geo-builder-top-button:hover,.geo-builder-icon-button:hover:not(:disabled){transform:none!important;border-color:var(--border-strong)!important;background:var(--bg-elevated)!important;box-shadow:none!important}
  .geo-builder-history-controls{display:flex!important;justify-content:flex-end!important;gap:6px!important}.geo-builder-icon-button{width:40px!important;min-width:40px!important;padding:0!important}.geo-builder-clear-button{width:auto!important;min-width:40px!important;color:var(--bad-1)!important}.geo-builder-ai-button{display:none!important}

  /* Workspace hierarchy. */
  .geo-builder-workspace{display:grid!important;grid-template-columns:var(--rail) minmax(0,1fr) var(--side)!important;height:calc(100dvh - 134px)!important;min-height:560px!important;background:var(--bg)!important}.admin-bar .geo-builder-workspace{height:calc(100dvh - 166px)!important}
  .geo-builder-toolrail{padding:8px 5px!important;gap:6px!important;border-right:1px solid var(--border-soft)!important;background:var(--bg-deep)!important}.geo-builder-tool-group{gap:3px!important}.geo-builder-tool-divider{margin:2px 5px!important;background:var(--border-soft)!important}.geo-builder-tool{width:47px!important;min-height:46px!important;padding:5px 3px!important;gap:4px!important;border-radius:8px!important;color:var(--ink-faint)!important;background:transparent!important}.geo-builder-tool:hover{color:var(--ink)!important;background:var(--bg-card)!important;border-color:var(--border-soft)!important}.geo-builder-tool.is-active{color:var(--gold)!important;background:color-mix(in srgb,var(--gold) 8%,var(--bg-card))!important;border-color:color-mix(in srgb,var(--gold) 38%,var(--border))!important;box-shadow:none!important}.geo-builder-tool svg{width:18px!important;height:18px!important}.geo-builder-tool span{font:650 9px/1.05 var(--font-body)!important;letter-spacing:0!important}.geo-builder-mobile-panel-button,.geo-builder-mobile-extra-tools,.geo-builder-mobile-backdrop,.geo-builder-sidebar-close{display:none!important}

  .geo-builder-canvas-wrap,.geo-builder-map{background:var(--map-ocean)!important}.geo-builder-map-hint{top:12px!important;left:50%!important;right:auto!important;transform:translateX(-50%)!important;width:max-content!important;max-width:min(520px,calc(100% - 32px))!important;padding:9px 38px 9px 12px!important;border:1px solid var(--border)!important;border-radius:8px!important;background:color-mix(in srgb,var(--bg-card) 94%,transparent)!important;color:var(--ink-dim)!important;box-shadow:0 12px 34px -26px rgba(0,0,0,.8)!important;backdrop-filter:blur(10px)!important;-webkit-backdrop-filter:blur(10px)!important;font:500 11px/1.4 var(--font-body)!important}.geo-builder-map-hint strong{color:var(--ink)!important}.geo-builder-map-hint button{position:absolute!important;right:5px!important;top:50%!important;transform:translateY(-50%)!important;width:26px!important;height:26px!important;margin:0!important;padding:0!important;display:grid!important;place-items:center!important;border-radius:5px!important;font-size:15px!important;line-height:1!important;color:var(--ink-faint)!important}
  .geo-builder-statusbar{height:30px!important;padding:0 10px!important;border-top:1px solid var(--border-soft)!important;background:color-mix(in srgb,var(--bg-deep) 95%,transparent)!important;color:var(--ink-faint)!important;font:500 9px/1 var(--font-body)!important;letter-spacing:0!important}.geo-builder-statusbar strong{color:var(--ink-dim)!important}
  .geo-builder-map .leaflet-bottom.leaflet-right{right:8px!important;bottom:38px!important;max-width:calc(100% - 16px)!important}.geo-builder-map .leaflet-bottom.leaflet-right .leaflet-control-attribution{max-width:100%!important;margin:0!important;padding:4px 6px!important;border:1px solid var(--border-soft)!important;border-radius:6px!important;background:color-mix(in srgb,var(--bg-deep) 88%,transparent)!important;color:var(--ink-faint)!important;font-size:8px!important;line-height:1.25!important;white-space:normal!important;text-align:right!important}.geo-builder-map .leaflet-control-attribution a{color:var(--ink-dim)!important}

  /* Sidebar: normal readable UI, not microtype. */
  .geo-builder-sidebar{border-left:1px solid var(--border-soft)!important;background:var(--bg-deep)!important;box-shadow:none!important}.geo-builder-tabs{height:48px!important;padding:0 7px!important;border-bottom:1px solid var(--border-soft)!important;background:var(--bg-deep)!important}.geo-builder-tabs button{min-height:47px!important;color:var(--ink-faint)!important;font:650 11px/1 var(--font-body)!important}.geo-builder-tabs button.is-active{color:var(--ink)!important}.geo-builder-tabs button.is-active:after{left:22%!important;right:22%!important;height:2px!important;box-shadow:none!important;background:var(--gold)!important}
  .geo-builder-tab-panel{padding:14px 12px 24px!important}.geo-builder-section-head{gap:10px!important;margin-bottom:11px!important}.geo-builder-section-head strong{font:700 12px/1.2 var(--font-body)!important;color:var(--ink)!important}.geo-builder-section-head span{font:500 10px/1.3 var(--font-body)!important;color:var(--ink-faint)!important}.geo-builder-section-head>button{width:28px!important;height:28px!important;border-radius:7px!important}
  .geo-builder-layer-list{gap:7px!important;max-height:34vh!important}.geo-builder-empty-state{min-height:138px!important;padding:16px!important;border-color:var(--border)!important;border-radius:9px!important}.geo-builder-empty-state strong{font:700 12px/1.2 var(--font-body)!important;color:var(--ink-dim)!important}.geo-builder-empty-state span{max-width:200px!important;margin-top:5px!important;font:500 10px/1.45 var(--font-body)!important;color:var(--ink-faint)!important}.geo-builder-layer-row{padding:9px!important;border-color:var(--border)!important;border-radius:8px!important;background:var(--bg-card)!important}.geo-builder-layer-row .geo-builder-layer-name strong{font:650 11px/1.2 var(--font-body)!important}.geo-builder-layer-row .geo-builder-layer-name span{font:500 9px/1.25 var(--font-body)!important;color:var(--ink-faint)!important}.geo-builder-layer-actions{gap:6px!important;margin-top:9px!important}.geo-builder-layer-actions button,.geo-builder-control-card button,.geo-builder-two-buttons button,.geo-builder-wide-button{min-height:34px!important;padding:7px 8px!important;border-color:var(--border)!important;border-radius:7px!important;background:var(--bg-card)!important;color:var(--ink-dim)!important;font:650 10px/1.2 var(--font-body)!important}.geo-builder-inspector{margin-top:14px!important;padding-top:13px!important;border-color:var(--border-soft)!important}.geo-builder-inspector-grid{gap:6px!important}.geo-builder-inspector-grid>div{min-height:58px!important;padding:9px!important;border-color:var(--border)!important;border-radius:8px!important;background:var(--bg-card)!important}.geo-builder-inspector-grid span{font:600 9px/1.15 var(--font-body)!important;letter-spacing:0!important;text-transform:none!important}.geo-builder-inspector-grid strong{font:700 12px/1.2 var(--font-body)!important}

  /* Operations/project: simplify the language and spacing, keep functionality. */
  .geo-builder-operation-card{padding:13px!important;border-radius:9px!important}.geo-builder-operation-card strong{font-size:12px!important}.geo-builder-operation-card p{font-size:10px!important;line-height:1.45!important}.geo-builder-operation-card small{font-size:9px!important;line-height:1.4!important;color:var(--ink-faint)!important}.geo-builder-operation-button{min-height:36px!important;font:700 10px/1.2 var(--font-body)!important}.geo-builder-operation-grid{gap:7px!important}.geo-builder-operation-grid button{min-height:82px!important;padding:10px!important;border-radius:8px!important}.geo-builder-operation-grid button strong{font-size:11px!important}.geo-builder-operation-grid button span{font-size:9px!important;line-height:1.35!important}.geo-builder-control-card{padding:12px!important;border-radius:9px!important}.geo-builder-control-card label strong{font-size:11px!important}.geo-builder-control-card label span,.geo-builder-control-card small{font-size:9px!important;line-height:1.4!important}.geo-builder-control-card select,.geo-builder-field input,.geo-builder-field select,.geo-builder-field textarea{min-height:40px!important;border-radius:7px!important;font:500 12px/1.35 var(--font-body)!important}.geo-builder-field label{font:650 10px/1.2 var(--font-body)!important;letter-spacing:0!important;text-transform:none!important}.geo-builder-submit-note,.geo-builder-bug-report{font-size:10px!important;line-height:1.45!important}

  .geo-builder-basemap-panel{border:1px solid var(--border)!important;border-radius:10px!important;background:var(--bg-raised)!important;box-shadow:0 18px 54px -30px rgba(0,0,0,.8)!important}.geo-builder-toast{border-radius:8px!important;font-size:11px!important}.geo-builder-draft-banner{border-radius:8px!important;font-size:11px!important}
}

/* Tablet editor: two-row chrome so the map gets real width instead of a
   squeezed single toolbar. */
@media (min-width:700px) and (max-width:1100px){
  .geo-builder-app{--rail:56px!important;--side:276px!important}
  .geo-builder-topbar{height:108px!important;min-height:108px!important;padding:8px 10px 9px!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:42px 42px!important;gap:6px 8px!important}
  .geo-builder-title-block{grid-column:1!important;grid-row:1!important}.geo-builder-history-controls{grid-column:2!important;grid-row:1!important}.geo-builder-source-controls{grid-column:1/-1!important;grid-row:2!important;width:100%!important;justify-content:stretch!important;gap:6px!important}.geo-builder-library-select{max-width:none!important;flex:1 1 auto!important}.geo-builder-source-controls .geo-builder-top-button{flex:0 0 auto!important;padding-inline:9px!important}
  .geo-builder-workspace{height:calc(100dvh - 180px)!important;min-height:500px!important}.admin-bar .geo-builder-workspace{height:calc(100dvh - 212px)!important}
  .geo-builder-tool{width:45px!important;min-height:43px!important}.geo-builder-tool span{font-size:8.5px!important}.geo-builder-tab-panel{padding:12px 10px 22px!important}.geo-builder-operation-grid{grid-template-columns:1fr 1fr!important}
  .geo-builder-map-hint{top:10px!important;max-width:min(420px,calc(100% - 24px))!important;font-size:10px!important}
}

@media (min-width:700px) and (max-width:820px){
  .geo-builder-app{--side:254px!important;--rail:52px!important}.geo-builder-topbar{padding-inline:8px!important}.geo-builder-title-block strong{font-size:12px!important}.geo-builder-title-block span{font-size:9px!important}.geo-builder-library-select select{font-size:11px!important}.geo-builder-source-controls .geo-builder-top-button{padding-inline:7px!important;font-size:10px!important}.geo-builder-source-controls .geo-builder-top-button svg{width:14px!important;height:14px!important}.geo-builder-workspace{grid-template-columns:52px minmax(0,1fr) 254px!important}.geo-builder-toolrail{padding-inline:3px!important}.geo-builder-tool{width:44px!important}.geo-builder-sidebar{min-width:0!important}.geo-builder-tabs button{font-size:10px!important}.geo-builder-map-hint{left:12px!important;right:12px!important;transform:none!important;width:auto!important;max-width:none!important;text-align:left!important}
}

/* Phone decision stays simple and launch-safe. */
@media (max-width:699px){
  .geo-builder-phone-copy h1{max-width:14ch!important}
}

/* ========================================================================== 
   20.0.46 launch QA — Studio desktop/tablet layout reset
   Old builder.css used an overlay sheet for <=900px. Restore the real sidebar
   from 700px upward so tablet is a true three-column editor.
   ========================================================================== */
@media (min-width:700px){
  .geo-builder-sidebar{
    display:flex!important;position:relative!important;z-index:2!important;
    top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;
    width:auto!important;min-width:0!important;max-width:none!important;
    height:auto!important;min-height:0!important;max-height:none!important;
    transform:none!important;opacity:1!important;visibility:visible!important;pointer-events:auto!important;
    border-radius:0!important;overflow:hidden!important;box-shadow:none!important;
  }
  .geo-builder-sidebar:before,.geo-builder-sidebar-close,.geo-builder-mobile-backdrop{display:none!important;content:none!important}
  .geo-builder-workspace{overflow:hidden!important}
  .geo-builder-canvas-wrap{min-width:0!important;overflow:hidden!important}
  .geo-builder-map{min-width:0!important}
  .geo-builder-tabs{flex:0 0 48px!important}
  .geo-builder-tab-panel{min-height:0!important;overflow-y:auto!important;scrollbar-width:thin!important}
  .geo-builder-title-block span{letter-spacing:0!important;text-transform:none!important}
  .geo-builder-product-mark{box-shadow:none!important}
  .geo-builder-operation-card,.geo-builder-control-card,.geo-builder-layer-row,.geo-builder-empty-state{box-shadow:none!important}
}

@media (min-width:700px) and (max-width:1100px){
  .geo-builder-sidebar{grid-column:3!important;grid-row:1!important}
  .geo-builder-canvas-wrap{grid-column:2!important;grid-row:1!important}
  .geo-builder-toolrail{grid-column:1!important;grid-row:1!important}
  .geo-builder-source-controls .geo-builder-top-button{white-space:nowrap!important}
  .geo-builder-statusbar{font-size:10px!important}
}

/* Launch typography pass: Studio controls stay readable at every supported size. */
@media (min-width:700px){
  .geo-builder-title-block span{font-size:10px!important}
  .geo-builder-tool span{font-size:10px!important;line-height:1.05!important}
  .geo-builder-inspector-grid span{font-size:10px!important}
  .geo-builder-layer-row .geo-builder-layer-name span{font-size:10px!important}
  .geo-builder-operation-card p,.geo-builder-operation-card small,
  .geo-builder-operation-grid button span,.geo-builder-control-card label span,
  .geo-builder-control-card small,.geo-builder-submit-note,.geo-builder-bug-report{font-size:10px!important}
  .geo-builder-field label{font-size:10.5px!important}
}
@media (min-width:700px) and (max-width:820px){
  .geo-builder-tool span{font-size:9.5px!important}
}

/* ========================================================================== 
   Histriphy 20.0.46 · Studio tablet resizable panel
   ========================================================================== */
.geo-builder-sidebar-resizer{display:none}

@media (min-width:700px) and (max-width:1100px){
  .geo-builder-app{--side:260px!important}
  .geo-builder-workspace{position:relative!important}
  .geo-builder-sidebar-resizer{
    display:flex!important;
    position:absolute!important;
    z-index:55!important;
    top:0!important;
    bottom:0!important;
    left:calc(100% - var(--side) - 6px)!important;
    width:12px!important;
    align-items:center!important;
    justify-content:center!important;
    cursor:ew-resize!important;
    touch-action:none!important;
    outline:none!important;
  }
  .geo-builder-sidebar-resizer::before{
    content:"";
    position:absolute;
    top:0;
    bottom:0;
    left:50%;
    width:1px;
    background:var(--border-soft);
    transform:translateX(-50%);
  }
  .geo-builder-sidebar-resizer span{
    position:relative;
    z-index:2;
    width:5px!important;
    height:48px!important;
    border:1px solid var(--border)!important;
    border-radius:999px!important;
    background:var(--bg-raised)!important;
    box-shadow:0 8px 20px -16px rgba(0,0,0,.8)!important;
  }
  .geo-builder-sidebar-resizer:hover span,
  .geo-builder-sidebar-resizer:focus-visible span,
  .geo-builder-sidebar-resizer.is-dragging span{border-color:var(--gold)!important;background:color-mix(in srgb,var(--gold) 18%,var(--bg-raised))!important}
  .geo-builder-sidebar-resizer:focus-visible{outline:2px solid color-mix(in srgb,var(--gold) 48%,transparent)!important;outline-offset:-2px!important}
  .geo-builder-sidebar{min-width:220px!important}
  .geo-builder-tab-panel{overscroll-behavior:contain!important}
}

@media (min-width:700px) and (max-width:820px){
  .geo-builder-app{--side:228px!important;--rail:52px!important}
  .geo-builder-workspace{grid-template-columns:52px minmax(0,1fr) var(--side)!important}
  .geo-builder-sidebar-resizer{left:calc(100% - var(--side) - 6px)!important}
  .geo-builder-tab-panel{padding-inline:9px!important}
  .geo-builder-inspector-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

@media (min-width:700px) and (max-width:1100px){
  .geo-builder-sidebar-resizer span{width:14px!important;height:52px!important;display:grid!important;place-items:center!important}
  .geo-builder-sidebar-resizer span::after{content:"";width:3px;height:3px;border-radius:50%;background:var(--ink-faint);box-shadow:0 -7px 0 var(--ink-faint),0 7px 0 var(--ink-faint)}
  .geo-builder-sidebar-resizer:hover span::after,.geo-builder-sidebar-resizer:focus-visible span::after,.geo-builder-sidebar-resizer.is-dragging span::after{background:var(--gold-ink);box-shadow:0 -7px 0 var(--gold-ink),0 7px 0 var(--gold-ink)}
}

/* ========================================================================== 
   20.0.46 · tablet panel comfort + hide/reveal
   ========================================================================== */
@media (min-width:700px) and (max-width:1100px){
  .geo-builder-app{--side:260px!important}
  .geo-builder-sidebar{min-width:236px!important}
  .geo-builder-tab-panel{padding:14px 12px 24px!important}
  .geo-builder-resizer-help{display:none!important}

  /* The existing separator now doubles as a clear hide/reveal control. */
  .geo-builder-sidebar-resizer{width:22px!important;left:calc(100% - var(--side) - 11px)!important}
  .geo-builder-sidebar-resizer::before{left:50%!important}
  .geo-builder-sidebar-resizer span{
    width:18px!important;height:58px!important;border-radius:999px!important;
    background:var(--bg-raised)!important;border-color:var(--border-strong)!important;
  }
  .geo-builder-sidebar-resizer span::after{
    content:""!important;width:3px!important;height:3px!important;border-radius:50%!important;
    background:var(--ink-dim)!important;
    box-shadow:0 -7px 0 var(--ink-dim),0 7px 0 var(--ink-dim)!important;
  }

  .geo-builder-app.is-sidebar-collapsed .geo-builder-workspace{
    grid-template-columns:var(--rail) minmax(0,1fr) 0!important;
  }
  .geo-builder-app.is-sidebar-collapsed .geo-builder-sidebar{
    display:none!important;width:0!important;min-width:0!important;border:0!important;
  }
  .geo-builder-app.is-sidebar-collapsed .geo-builder-sidebar-resizer{
    left:calc(100% - 24px)!important;width:24px!important;
  }
  .geo-builder-app.is-sidebar-collapsed .geo-builder-sidebar-resizer::before{display:none!important}
  .geo-builder-app.is-sidebar-collapsed .geo-builder-sidebar-resizer span{
    width:24px!important;height:58px!important;border-radius:9px 0 0 9px!important;
    border-right:0!important;background:var(--bg-card)!important;
  }
  .geo-builder-app.is-sidebar-collapsed .geo-builder-sidebar-resizer span::after{
    content:"‹"!important;display:grid!important;place-items:center!important;
    width:auto!important;height:auto!important;background:transparent!important;box-shadow:none!important;
    color:var(--gold-ink)!important;font:700 18px/1 var(--font-body)!important;
  }
}

@media (min-width:700px) and (max-width:820px){
  .geo-builder-app{--side:250px!important;--rail:52px!important}
  .geo-builder-workspace{grid-template-columns:52px minmax(0,1fr) var(--side)!important}
  .geo-builder-sidebar-resizer{left:calc(100% - var(--side) - 11px)!important}
  .geo-builder-tab-panel{padding-inline:11px!important}
}
@media (min-width:700px) and (max-width:1100px){
  /* Clear direction beats an ambiguous dotted grip: drag the edge to resize,
     tap the arrow to hide, tap again to restore. */
  .geo-builder-sidebar-resizer span::after{
    content:"›"!important;display:grid!important;place-items:center!important;
    width:auto!important;height:auto!important;background:transparent!important;box-shadow:none!important;
    color:var(--ink-dim)!important;font:700 18px/1 var(--font-body)!important;
  }
  .geo-builder-sidebar-resizer:hover span::after,.geo-builder-sidebar-resizer:focus-visible span::after{color:var(--gold-ink)!important}
  .geo-builder-app.is-sidebar-collapsed .geo-builder-sidebar-resizer span::after{content:"‹"!important;color:var(--gold-ink)!important}
}


/* 20.0.50 runtime dependency diagnostic. Only appears if both CDN sources fail. */
.geo-builder-runtime-error{
  display:grid!important;
  grid-template-columns:1fr auto!important;
  gap:4px 14px!important;
  align-items:center!important;
  width:min(460px,calc(100vw - 32px))!important;
  padding:14px 16px!important;
  border:1px solid rgba(244,104,104,.45)!important;
  background:#1b1111!important;
}
.geo-builder-runtime-error strong{grid-column:1;color:#fff;font-size:.9rem}
.geo-builder-runtime-error span{grid-column:1;color:#e7bcbc;font-size:.78rem;line-height:1.45}
.geo-builder-runtime-error button{grid-column:2;grid-row:1/3;min-height:36px;padding:0 12px;border:1px solid rgba(255,255,255,.15);border-radius:7px;background:#2b1a1a;color:#fff;font-weight:700;cursor:pointer}

/* 20.0.51 emergency vector-renderer guard: editable geometry must remain visible above the basemap. */
.geo-builder-map .leaflet-overlay-pane svg{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
}
.geo-builder-map .leaflet-overlay-pane .leaflet-interactive{
  visibility:visible!important;
  pointer-events:auto!important;
}

/* 20.0.57 — administrator protected-master edit mode. Geometry is editable;
   library identity and project metadata remain visibly locked. */
.geo-builder-admin-edit-card[hidden]{display:none!important}
.geo-builder-admin-edit-card{
  margin:0 0 13px!important;padding:12px!important;border:1px solid color-mix(in srgb,var(--gold) 42%,var(--border))!important;
  border-radius:9px!important;background:color-mix(in srgb,var(--gold) 7%,var(--bg-card))!important;display:flex;flex-direction:column;gap:7px
}
.geo-builder-admin-edit-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.geo-builder-admin-edit-card-head span{font:800 9px/1.2 var(--font-body)!important;letter-spacing:.08em;color:var(--gold)!important}
.geo-builder-admin-edit-card-head button{border:0!important;background:transparent!important;padding:0!important;color:var(--ink-muted)!important;font:700 9px/1.2 var(--font-body)!important;cursor:pointer}
.geo-builder-admin-edit-card-head button:hover{color:var(--ink)!important}
.geo-builder-admin-edit-card>strong{font:750 13px/1.25 var(--font-body)!important;color:var(--ink)!important}
.geo-builder-admin-edit-card>small{font:500 9px/1.45 var(--font-body)!important;color:var(--ink-muted)!important}
.geo-builder-app.is-admin-editing .geo-builder-field input:disabled,
.geo-builder-app.is-admin-editing .geo-builder-category-list input:disabled{cursor:not-allowed!important}
.geo-builder-app.is-admin-editing .geo-builder-field>input:disabled{opacity:.68!important;background:color-mix(in srgb,var(--bg-deep) 82%,var(--bg-card))!important;color:var(--ink-muted)!important}
.geo-builder-app.is-admin-editing .geo-builder-category-list label:has(input:disabled){opacity:.62!important;cursor:not-allowed!important}
.geo-builder-admin-open-button{border-color:color-mix(in srgb,var(--gold) 38%,var(--border))!important}

/* ========================================================================== 
   21.0.13 · React tablet stabilization
   --------------------------------------------------------------------------
   The React engine is production-ready; this block resolves the remaining
   iPad/split-view shell bugs without touching map/geometry rendering.
   ========================================================================== */
@media (min-width:700px) and (max-width:1100px){
  /* The Builder's tablet header must consume the same 64px that the Studio
     height calculation reserves. The old 72px floating header created excess
     dead space and made the Studio feel vertically displaced. */
  body.histriphy-builder-page:has(#histriphy-studio-root) .site-header{
    height:64px!important;min-height:64px!important;top:0!important;
    display:flex!important;align-items:center!important;
  }
  body.admin-bar.histriphy-builder-page:has(#histriphy-studio-root) .site-header{top:32px!important}
  body.histriphy-builder-page:has(#histriphy-studio-root) .site-header .header-inner{
    width:calc(100% - 24px)!important;max-width:1060px!important;
    height:52px!important;min-height:52px!important;margin:6px auto!important;
    padding-inline:10px!important;border-radius:12px!important;
  }
  body.histriphy-builder-page:has(#histriphy-studio-root) .site-header .brand{gap:8px!important}
  body.histriphy-builder-page:has(#histriphy-studio-root) .site-header .brand-mark{
    width:28px!important;height:28px!important;min-width:28px!important;flex-basis:28px!important;
  }
  body.histriphy-builder-page:has(#histriphy-studio-root) .site-header .brand-name{font-size:14px!important}
  body.histriphy-builder-page:has(#histriphy-studio-root) .site-header .mobile-header-cta{
    height:34px!important;min-height:34px!important;padding-inline:12px!important;
  }
  body.histriphy-builder-page:has(#histriphy-studio-root) .site-header .menu-button{
    width:38px!important;height:38px!important;min-width:38px!important;
  }

  /* Let React's --side state control BOTH the grid and the separator. Legacy
     tablet CSS hard-coded the grid width while the React separator followed
     --side, which is why the arrow could float deep inside the map. */
  .histriphy-studio-react .geo-builder-workspace{
    grid-template-columns:var(--rail) minmax(0,1fr) var(--side)!important;
  }
  .histriphy-studio-react .geo-builder-sidebar{
    position:relative!important;inset:auto!important;top:0!important;right:auto!important;bottom:auto!important;left:auto!important;
    align-self:stretch!important;height:100%!important;min-height:0!important;
    margin:0!important;padding:0!important;transform:none!important;
    display:flex!important;flex-direction:column!important;justify-content:flex-start!important;
  }
  /* Tabs start at the top of the sidebar. This removes the large blank shelf
     visible above Layers/Operations/Project in narrow iPad layouts. */
  .histriphy-studio-react .geo-builder-sidebar>.geo-builder-tabs{
    position:relative!important;inset:auto!important;top:0!important;
    width:100%!important;height:46px!important;min-height:46px!important;flex:0 0 46px!important;
    margin:0!important;padding:0 6px!important;align-self:stretch!important;
  }
  .histriphy-studio-react .geo-builder-sidebar>.geo-builder-tabs button{min-height:45px!important}
  .histriphy-studio-react .geo-builder-tab-panel{
    flex:1 1 auto!important;min-height:0!important;margin:0!important;
  }

  /* Anchor the resize/hide handle from the RIGHT edge so it always sits on the
     exact map/sidebar boundary, regardless of custom panel width or split view. */
  .histriphy-studio-react .geo-builder-sidebar-resizer{
    left:auto!important;right:calc(var(--side) - 9px)!important;width:18px!important;
  }
  .histriphy-studio-react .geo-builder-sidebar-resizer span{
    width:14px!important;height:50px!important;border-radius:999px!important;
  }
  .geo-builder-app.is-sidebar-collapsed .histriphy-studio-react .geo-builder-sidebar-resizer{
    left:auto!important;right:0!important;width:24px!important;
  }

  /* Keep the restore-draft card useful without covering most of the editing
     canvas on iPad. */
  .histriphy-studio-react .geo-builder-draft-banner{
    width:min(540px,calc(100vw - var(--side) - var(--rail) - 36px))!important;
    max-width:calc(100vw - 36px)!important;bottom:14px!important;padding:10px!important;
  }
}

@media (min-width:700px) and (max-width:820px){
  body.histriphy-builder-page:has(#histriphy-studio-root) .site-header .header-inner{
    width:calc(100% - 16px)!important;margin:6px 8px!important;padding-inline:9px!important;
  }
  body.histriphy-builder-page:has(#histriphy-studio-root) .site-header .mobile-header-cta{
    height:32px!important;min-height:32px!important;padding-inline:10px!important;font-size:11px!important;
  }
  body.histriphy-builder-page:has(#histriphy-studio-root) .site-header .menu-button{
    width:36px!important;height:36px!important;min-width:36px!important;
  }
  .histriphy-studio-react{--rail:52px}
  .histriphy-studio-react .geo-builder-sidebar>.geo-builder-tabs{padding-inline:3px!important}
  .histriphy-studio-react .geo-builder-sidebar>.geo-builder-tabs button{font-size:9.5px!important}
  .histriphy-studio-react .geo-builder-tab-panel{padding:12px 10px 20px!important}
  .histriphy-studio-react .geo-builder-sidebar-resizer span{width:13px!important;height:48px!important}
  .histriphy-studio-react .geo-builder-draft-banner{
    left:calc(var(--rail) + 10px)!important;right:calc(var(--side) + 10px)!important;
    transform:none!important;width:auto!important;max-width:none!important;
  }
}

@media (min-width:783px) and (max-width:1100px){
  body.admin-bar.histriphy-builder-page:has(#histriphy-studio-root) #geo-builder-app{
    height:calc(100dvh - 96px)!important;
  }
}
@media (min-width:700px) and (max-width:782px){
  body.admin-bar.histriphy-builder-page:has(#histriphy-studio-root) .site-header{top:46px!important}
  body.admin-bar.histriphy-builder-page:has(#histriphy-studio-root) #geo-builder-app{
    height:calc(100dvh - 110px)!important;
  }
}

/* ========================================================================== 
   21.3.17 · Simple Library Search
   Replaces React Studio's browser-native <select> with a compact, keyboard-
   accessible search field. The result surface uses position:fixed so it cannot
   be clipped by responsive topbar scrollers or overflow containers.
   ========================================================================== */
.geo-builder-library-combobox{
  position:relative!important;
  display:flex!important;
  align-items:center!important;
  gap:0!important;
  padding:0 8px!important;
  cursor:text;
  transition:border-color .14s ease,background .14s ease,box-shadow .14s ease;
}
.geo-builder-library-combobox:focus-within,
.geo-builder-library-combobox.is-open{
  border-color:var(--border-strong)!important;
  background:var(--bg-card)!important;
  box-shadow:none!important;
}
.geo-builder-library-label{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.geo-builder-library-search-icon{width:18px;height:18px;display:grid;place-items:center;flex:0 0 18px;color:var(--ink-faint);margin-right:6px}
.geo-builder-library-search-icon svg,.geo-builder-library-clear svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.geo-builder-library-search-input{
  min-width:0!important;
  width:100%!important;
  height:38px!important;
  flex:1 1 auto!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  outline:0!important;
  box-shadow:none!important;
  background:transparent!important;
  color:var(--ink)!important;
  font:600 12px/1 var(--font-body)!important;
  text-overflow:ellipsis;
}
.geo-builder-library-search-input::placeholder{color:var(--ink-dim);font-weight:500;opacity:1}
.geo-builder-library-search-input:disabled{opacity:.58;cursor:not-allowed}
.geo-builder-library-clear{width:28px;height:28px;min-width:28px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--ink-faint);display:grid;place-items:center;cursor:pointer;flex:0 0 auto}
.geo-builder-library-clear:hover,.geo-builder-library-clear:focus-visible{background:var(--bg-elevated);color:var(--ink)}
.geo-builder-library-clear:focus-visible{outline:2px solid var(--border-strong)!important;outline-offset:1px}

.geo-builder-library-results{
  position:fixed!important;
  left:var(--library-menu-left)!important;
  top:var(--library-menu-top)!important;
  width:var(--library-menu-width)!important;
  max-width:calc(100vw - 20px)!important;
  max-height:var(--library-menu-max-height)!important;
  z-index:10050!important;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:1px solid var(--border);
  border-radius:8px;
  background:var(--bg-card);
  color:var(--ink);
  box-shadow:0 8px 20px -10px rgba(0,0,0,.5);
  isolation:isolate;
}
.geo-builder-library-results-list{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:4px;scrollbar-width:thin;scrollbar-color:var(--border-strong) transparent}
.geo-builder-library-result{
  width:100%;
  min-height:36px;
  padding:7px 9px;
  border:0;
  border-radius:6px;
  background:transparent;
  color:var(--ink-dim);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  text-align:left;
  font:600 12px/1.25 var(--font-body);
  cursor:pointer;
}
.geo-builder-library-result:focus-visible{outline:2px solid var(--border-strong)!important;outline-offset:-2px}
.geo-builder-library-result span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.geo-builder-library-result svg{width:15px;height:15px;flex:0 0 15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.geo-builder-library-result:hover,.geo-builder-library-result.is-active{background:var(--bg-elevated);color:var(--ink)}
.geo-builder-library-result.is-selected{color:var(--ink);background:var(--bg-elevated)}
.geo-builder-library-result.is-selected.is-active{background:var(--bg-elevated)}
.geo-builder-library-empty{min-height:36px;padding:9px;display:flex;align-items:center;color:var(--ink-dim);font:500 12px/1.5 var(--font-body)}

:root[data-theme="light"] .geo-builder-library-results{background:var(--bg-card);box-shadow:0 8px 20px -10px rgba(0,0,0,.2)}

@media (max-width:1180px){
  .geo-builder-library-search-input{font-size:11px!important}
}
@media (max-width:820px){
  .geo-builder-library-search-input{font-size:12px!important}
}
@media (max-width:640px){
  .geo-builder-library-search-input{font-size:16px!important}
}
