.histriphy-builder-page .site-footer{display:none}
.histriphy-builder-page .site-shell{overflow:visible}
.histriphy-builder-page{overflow:hidden;background:var(--n2)}
.geo-builder-app{background:var(--n2);color:var(--ink);min-height:calc(100vh - 76px)}
.geo-builder-form{margin:0}
.geo-builder-topbar{height:64px;padding:0 18px;border-bottom:1px solid color-mix(in srgb, var(--n15) 18%, transparent);background:color-mix(in srgb, var(--n2) 97%, transparent);display:grid;grid-template-columns:minmax(170px,.9fr) minmax(350px,1.35fr) auto minmax(170px,.8fr);align-items:center;gap:18px;position:relative;z-index:40}
.geo-builder-title-block{display:flex;align-items:center;gap:11px;min-width:0}
.geo-builder-product-mark{width:34px;height:34px;border-radius:8px;border:1px solid color-mix(in srgb, var(--gold-4) 35%, transparent);background:color-mix(in srgb, var(--gold-4) 8%, transparent);display:grid;place-items:center;color:var(--gold);flex:0 0 auto}
.geo-builder-product-mark svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.geo-builder-title-block>div{display:flex;flex-direction:column;min-width:0}
.geo-builder-title-block strong{font-size:.92rem;line-height:1.1;white-space:nowrap}
.geo-builder-title-block span{font-size:.68rem;color:var(--ink-faint);margin-top:4px;white-space:nowrap}
.geo-builder-source-controls{display:flex;align-items:center;justify-content:center;gap:10px;min-width:0}
.geo-builder-library-select{display:flex;align-items:center;gap:8px;min-width:0;flex:1;max-width:340px;height:38px;padding:0 10px;border:1px solid color-mix(in srgb, var(--n15) 20%, transparent);border-radius:7px;background:var(--n3)}
.geo-builder-library-select>span{font-size:.68rem;color:var(--ink-faint);white-space:nowrap}
.geo-builder-library-select select{min-width:0;flex:1;background:transparent;border:0;color:var(--ink);font:inherit;font-size:.8rem;outline:none}
.geo-builder-library-select select option{background:var(--n3);color:var(--info-1)}
.geo-builder-top-button,.geo-builder-icon-button{height:38px;border:1px solid color-mix(in srgb, var(--n15) 22%, transparent);border-radius:7px;background:var(--n3);color:var(--ink);display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:.78rem;font-weight:600;transition:.15s ease}
.geo-builder-top-button{padding:0 13px;white-space:nowrap}
.geo-builder-top-button:hover,.geo-builder-icon-button:hover:not(:disabled){border-color:color-mix(in srgb, var(--gold-4) 55%, transparent);background:color-mix(in srgb, var(--gold-4) 8%, transparent)}
.geo-builder-top-button svg,.geo-builder-icon-button svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.geo-builder-history-controls{display:flex;justify-content:flex-end;gap:8px}
.geo-builder-icon-button{width:38px;padding:0}
.geo-builder-icon-button:disabled{opacity:.35;cursor:not-allowed}
.geo-builder-clear-button{color:var(--bad-1)}
.geo-builder-server-message{position:absolute;top:78px;left:50%;transform:translateX(-50%);z-index:80;padding:10px 16px;border-radius:7px;border:1px solid color-mix(in srgb, var(--ok-1) 40%, transparent);background:color-mix(in srgb, var(--ok-2) 95%, transparent);color:var(--ok-1);font-size:.82rem;box-shadow:0 12px 30px rgba(0,0,0,.3)}
.geo-builder-server-message.is-error{border-color:color-mix(in srgb, var(--bad-2) 45%, transparent);background:color-mix(in srgb, var(--bad-2) 96%, transparent);color:var(--bad-1)}
.geo-builder-workspace{display:grid;grid-template-columns:72px minmax(0,1fr) 330px;height:calc(100vh - 140px);min-height:580px}
.admin-bar .geo-builder-workspace{height:calc(100vh - 172px)}
.geo-builder-toolrail{background:var(--n3);border-right:1px solid color-mix(in srgb, var(--n15) 18%, transparent);padding:10px 8px;display:flex;flex-direction:column;gap:9px;z-index:30}
.geo-builder-tool-group{display:flex;flex-direction:column;gap:6px}
.geo-builder-tool{width:54px;min-height:52px;padding:7px 4px;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--n15);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;font-size:.62rem;font-weight:600;transition:.15s ease}
.geo-builder-tool:hover{background:var(--n3);color:var(--info-1);border-color:color-mix(in srgb, var(--n15) 18%, transparent)}
.geo-builder-tool.is-active{color:var(--gold-5);background:color-mix(in srgb, var(--gold-4) 11%, transparent);border-color:color-mix(in srgb, var(--gold-4) 36%, transparent);box-shadow:inset 3px 0 0 var(--gold)}
.geo-builder-tool svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.geo-builder-tool-divider{height:1px;background:color-mix(in srgb, var(--n15) 14%, transparent);margin:2px 4px}
.geo-builder-toolrail-spacer{flex:1}
.geo-builder-canvas-wrap{position:relative;min-width:0;overflow:hidden;background:var(--n2)}
.geo-builder-map{position:absolute;inset:0;z-index:1;background:var(--n2)}
.geo-builder-sidebar{background:var(--n3);border-left:1px solid color-mix(in srgb, var(--n15) 18%, transparent);display:flex;flex-direction:column;min-width:0;z-index:30;overflow:hidden}
.geo-builder-tabs{height:50px;border-bottom:1px solid color-mix(in srgb, var(--n15) 17%, transparent);display:grid;grid-template-columns:repeat(3,1fr);padding:0 8px}
.geo-builder-tabs button{position:relative;border:0;background:transparent;color:var(--n13);font-size:.75rem;font-weight:700}
.geo-builder-tabs button:hover{color:var(--info-1)}
.geo-builder-tabs button.is-active{color:var(--gold-4)}
.geo-builder-tabs button.is-active:after{content:"";position:absolute;left:16px;right:16px;bottom:-1px;height:2px;background:var(--gold);box-shadow:0 0 12px color-mix(in srgb, var(--gold-4) 65%, transparent)}
.geo-builder-tab-panel{display:none;overflow:auto;padding:16px;flex:1;scrollbar-width:thin;scrollbar-color:var(--n5) transparent}
.geo-builder-tab-panel.is-active{display:block}
.geo-builder-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.geo-builder-section-head>div{display:flex;flex-direction:column;gap:3px;min-width:0}
.geo-builder-section-head strong{font-size:.78rem;color:var(--info-1)}
.geo-builder-section-head span{font-size:.65rem;color:var(--n11);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.geo-builder-section-head>button{width:28px;height:28px;border-radius:6px;border:1px solid color-mix(in srgb, var(--gold-4) 35%, transparent);background:color-mix(in srgb, var(--gold-4) 8%, transparent);color:var(--gold);font-size:1.2rem;line-height:1}
.geo-builder-section-head.compact{margin:0 0 10px}
.geo-builder-layer-list{display:flex;flex-direction:column;gap:7px;min-height:160px;max-height:36vh;overflow:auto;padding-right:2px}
.geo-builder-empty-state{min-height:154px;border:1px dashed color-mix(in srgb, var(--n15) 20%, transparent);border-radius:9px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:20px;color:var(--n11)}
.geo-builder-empty-state svg{width:27px;height:27px;fill:none;stroke:var(--n13);stroke-width:1.5;margin-bottom:9px}
.geo-builder-empty-state strong{font-size:.76rem;color:var(--n16)}
.geo-builder-empty-state span{font-size:.66rem;line-height:1.45;max-width:180px;margin-top:4px}
.geo-builder-layer-row{display:grid;grid-template-columns:24px 1fr auto;align-items:center;gap:8px;padding:9px;border:1px solid color-mix(in srgb, var(--n15) 16%, transparent);border-radius:8px;background:var(--n3);transition:.15s ease;cursor:pointer}
.geo-builder-layer-row:hover{border-color:color-mix(in srgb, var(--n15) 36%, transparent)}
.geo-builder-layer-row.is-selected{border-color:color-mix(in srgb, var(--gold-4) 52%, transparent);background:color-mix(in srgb, var(--gold-4) 8%, transparent)}
.geo-builder-layer-row input{accent-color:var(--gold);width:15px;height:15px;margin:0}
.geo-builder-layer-row .geo-builder-layer-name{display:flex;flex-direction:column;min-width:0}
.geo-builder-layer-row .geo-builder-layer-name strong{font-size:.72rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.geo-builder-layer-row .geo-builder-layer-name span{font-size:.61rem;color:var(--n11);margin-top:3px}
.geo-builder-layer-row .geo-builder-layer-eye{width:24px;height:24px;border:0;background:transparent;color:var(--n13);display:grid;place-items:center;padding:0}
.geo-builder-layer-row .geo-builder-layer-eye svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8}
.geo-builder-layer-row.is-hidden{opacity:.52}
.geo-builder-layer-actions{display:grid;grid-template-columns:1fr 1fr 1fr;gap:7px;margin-top:10px}
.geo-builder-layer-actions button,.geo-builder-control-card button,.geo-builder-two-buttons button,.geo-builder-wide-button{min-height:34px;border:1px solid color-mix(in srgb, var(--n15) 20%, transparent);border-radius:6px;background:var(--n3);color:var(--n17);font-size:.67rem;font-weight:600;padding:7px 8px}
.geo-builder-layer-actions button:hover,.geo-builder-control-card button:hover,.geo-builder-two-buttons button:hover,.geo-builder-wide-button:hover{border-color:color-mix(in srgb, var(--gold-4) 45%, transparent);color:var(--gold-5)}
.geo-builder-layer-actions .is-danger{color:var(--bad-1)}
.geo-builder-inspector{border-top:1px solid color-mix(in srgb, var(--n15) 14%, transparent);margin-top:16px;padding-top:15px}
.geo-builder-inspector-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.geo-builder-inspector-grid>div{background:var(--n3);border:1px solid color-mix(in srgb, var(--n15) 12%, transparent);border-radius:7px;padding:10px;display:flex;flex-direction:column;gap:4px}
.geo-builder-inspector-grid span{font-size:.6rem;color:var(--n11);text-transform:uppercase;letter-spacing:.07em}
.geo-builder-inspector-grid strong{font-size:.78rem}
.geo-builder-operation-card{border:1px solid color-mix(in srgb, var(--n15) 16%, transparent);border-radius:9px;background:var(--n3);padding:14px;margin-bottom:12px}
.geo-builder-operation-card.is-featured{border-color:color-mix(in srgb, var(--gold-4) 32%, transparent);background:linear-gradient(145deg,color-mix(in srgb, var(--gold-4) 9%, transparent),color-mix(in srgb, var(--n3) 98%, transparent));box-shadow:0 0 28px color-mix(in srgb, var(--gold-4) 5%, transparent)}
.geo-builder-operation-icon{width:36px;height:36px;border-radius:8px;background:color-mix(in srgb, var(--gold-4) 12%, transparent);color:var(--gold);display:grid;place-items:center;margin-bottom:10px}
.geo-builder-operation-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.geo-builder-operation-card strong{font-size:.79rem}
.geo-builder-operation-card p{font-size:.67rem;line-height:1.5;color:var(--n14);margin:6px 0 11px}
.geo-builder-operation-card small,.geo-builder-control-card small{display:block;font-size:.59rem;line-height:1.45;color:var(--n11);margin-top:8px}
.geo-builder-operation-button{width:100%;height:36px;border:1px solid color-mix(in srgb, var(--gold-4) 48%, transparent);border-radius:7px;background:linear-gradient(180deg,var(--gold-4),var(--gold-3));color:var(--n3);font-size:.7rem;font-weight:800}
.geo-builder-operation-button:hover{filter:brightness(1.06)}
.geo-builder-operation-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px}
.geo-builder-operation-grid>button{min-height:88px;border:1px solid color-mix(in srgb, var(--n15) 15%, transparent);border-radius:8px;background:var(--n3);color:var(--n14);display:flex;flex-direction:column;align-items:flex-start;padding:11px;text-align:left;transition:.15s ease}
.geo-builder-operation-grid>button:hover{border-color:color-mix(in srgb, var(--gold-4) 40%, transparent);background:color-mix(in srgb, var(--gold-4) 6%, transparent);color:var(--gold-4)}
.geo-builder-operation-grid svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;margin-bottom:8px}
.geo-builder-operation-grid strong{font-size:.72rem;color:var(--n22)}
.geo-builder-operation-grid span{font-size:.59rem;line-height:1.35;margin-top:3px}
.geo-builder-control-card{border:1px solid color-mix(in srgb, var(--n15) 14%, transparent);border-radius:9px;background:var(--n3);padding:13px;margin-bottom:12px}
.geo-builder-control-card>label{display:flex;align-items:center;justify-content:space-between;font-size:.72rem;margin-bottom:10px}
.geo-builder-control-card>label span{font-family:var(--font-mono);font-size:.62rem;color:var(--gold-4)}
.geo-builder-control-card input[type=range]{width:100%;accent-color:var(--gold);margin:2px 0 9px}
.geo-builder-control-card>button{width:100%}
.geo-builder-wide-button{width:100%;margin-bottom:8px}
.geo-builder-two-buttons{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.geo-builder-two-buttons button:disabled{opacity:.35;cursor:not-allowed}
.geo-builder-field{margin-bottom:15px}
.geo-builder-field>label{display:block;font-size:.69rem;color:var(--n15);margin-bottom:7px;font-weight:600}
.geo-builder-field input{width:100%;height:40px;padding:0 11px;border:1px solid color-mix(in srgb, var(--n15) 20%, transparent);border-radius:7px;background:var(--n3);color:var(--n23);font:inherit;font-size:.78rem;outline:none}
.geo-builder-field input:focus{border-color:color-mix(in srgb, var(--gold-4) 60%, transparent);box-shadow:0 0 0 3px color-mix(in srgb, var(--gold-4) 8%, transparent)}
.geo-builder-category-list{display:flex;flex-wrap:wrap;gap:6px}
.geo-builder-category-list label{cursor:pointer}
.geo-builder-category-list input{position:absolute;opacity:0;pointer-events:none}
.geo-builder-category-list span{display:inline-flex;padding:7px 9px;border:1px solid color-mix(in srgb, var(--n15) 17%, transparent);border-radius:999px;background:var(--n3);color:var(--n13);font-size:.62rem;transition:.15s ease}
.geo-builder-category-list input:checked+span{background:color-mix(in srgb, var(--gold-4) 13%, transparent);border-color:color-mix(in srgb, var(--gold-4) 50%, transparent);color:var(--gold-4)}
.geo-builder-project-summary{border:1px solid color-mix(in srgb, var(--n15) 14%, transparent);border-radius:8px;background:var(--n3);padding:11px;margin:14px 0;display:flex;flex-direction:column;gap:9px}
.geo-builder-project-summary>div{display:flex;justify-content:space-between;gap:10px;font-size:.64rem}
.geo-builder-project-summary span{color:var(--n11)}
.geo-builder-project-summary strong{font-size:.64rem;color:var(--n17)}
.geo-builder-export-button,.geo-builder-submit-button{width:100%;height:41px;border-radius:7px;font-weight:800;font-size:.73rem;display:flex;align-items:center;justify-content:center;gap:8px}
.geo-builder-export-button{border:1px solid color-mix(in srgb, var(--n15) 24%, transparent);background:var(--n3);color:var(--n22);margin-bottom:8px}
.geo-builder-submit-button{border:1px solid var(--gold-4);background:linear-gradient(180deg,var(--gold-4),var(--gold-3));color:var(--n3)}
.geo-builder-export-button svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8}
.geo-builder-submit-note{text-align:center;color:var(--n11);font-size:.59rem;line-height:1.45;margin:9px 7px 0}
.geo-builder-map-hint{position:absolute;z-index:10;top:14px;left:50%;transform:translateX(-50%);max-width:560px;padding:9px 36px 9px 12px;border:1px solid color-mix(in srgb, var(--gold-4) 34%, transparent);border-radius:7px;background:color-mix(in srgb, var(--n3) 92%, transparent);backdrop-filter:blur(8px);box-shadow:0 10px 28px rgba(0,0,0,.26);font-size:.68rem;color:var(--n18)}
.geo-builder-map-hint strong{color:var(--gold-4)}
.geo-builder-map-hint button{position:absolute;right:5px;top:50%;transform:translateY(-50%);width:28px;height:28px;border:0;border-radius:5px;background:transparent;color:var(--n14);font-size:1.05rem;line-height:1;display:grid;place-items:center;padding:0}
.geo-builder-basemap-panel{position:absolute;z-index:25;left:14px;bottom:45px;width:250px;padding:12px;border:1px solid color-mix(in srgb, var(--n15) 22%, transparent);border-radius:9px;background:color-mix(in srgb, var(--n3) 97%, transparent);box-shadow:0 16px 40px rgba(0,0,0,.42);display:none}
.geo-builder-basemap-panel.is-open{display:block}
.geo-builder-panel-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:10px}
.geo-builder-panel-heading>div{display:flex;flex-direction:column;gap:3px}
.geo-builder-panel-heading strong{font-size:.75rem}
.geo-builder-panel-heading span{font-size:.59rem;color:var(--n11)}
.geo-builder-panel-heading button{width:25px;height:25px;border:0;background:transparent;color:var(--n13);font-size:1.1rem}
.geo-builder-basemap-panel>label{display:flex;align-items:center;gap:9px;padding:7px;border-radius:6px;color:var(--n17);font-size:.68rem;cursor:pointer}
.geo-builder-basemap-panel>label:hover{background:var(--n3);color:var(--n23)}
.geo-builder-basemap-panel input{accent-color:var(--gold)}
.geo-builder-panel-separator{height:1px;background:color-mix(in srgb, var(--n15) 14%, transparent);margin:6px 2px}
.geo-builder-loading{position:absolute;inset:0;z-index:50;background:color-mix(in srgb, var(--n2) 62%, transparent);backdrop-filter:blur(2px);display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--info-1)}
.geo-builder-loading[hidden]{display:none}
.geo-builder-loading strong{font-size:.86rem;margin-top:12px}
.geo-builder-loading small{font-size:.65rem;color:var(--n14);margin-top:5px}
.geo-builder-spinner{width:32px;height:32px;border-radius:50%;border:3px solid color-mix(in srgb, var(--gold-4) 20%, transparent);border-top-color:var(--gold);animation:geoBuilderSpin .8s linear infinite}
@keyframes geoBuilderSpin{to{transform:rotate(360deg)}}
.geo-builder-statusbar{position:absolute;z-index:12;left:0;right:0;bottom:0;height:31px;background:color-mix(in srgb, var(--n2) 92%, transparent);border-top:1px solid color-mix(in srgb, var(--n15) 16%, transparent);display:flex;align-items:center;justify-content:space-between;padding:0 12px;font-size:.59rem;color:var(--n13);pointer-events:none}
.geo-builder-statusbar>div{display:flex;gap:14px;align-items:center}
.geo-builder-statusbar strong{color:var(--n18);font-weight:700}
.geo-builder-statusbar .is-valid{color:var(--ok-1)}
.geo-builder-statusbar .is-invalid{color:var(--bad-1)}
.geo-builder-draft-banner{position:fixed;z-index:100;left:50%;bottom:24px;transform:translateX(-50%);width:min(620px,calc(100% - 32px));padding:12px;border:1px solid color-mix(in srgb, var(--gold-4) 35%, transparent);border-radius:10px;background:color-mix(in srgb, var(--n3) 98%, transparent);box-shadow:0 20px 50px rgba(0,0,0,.45);display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:10px}
.geo-builder-draft-banner[hidden]{display:none}
.geo-builder-draft-banner>div{display:flex;flex-direction:column;gap:3px}
.geo-builder-draft-banner strong{font-size:.76rem}
.geo-builder-draft-banner span{font-size:.63rem;color:var(--n13)}
.geo-builder-draft-banner button{height:34px;padding:0 12px;border-radius:6px;border:1px solid color-mix(in srgb, var(--n15) 22%, transparent);background:var(--n3);color:var(--n17);font-size:.66rem;font-weight:700}
#geo-builder-draft-restore{background:var(--gold);border-color:var(--gold);color:var(--n3)}
.geo-builder-toast-stack{position:fixed;z-index:130;right:22px;bottom:22px;display:flex;flex-direction:column;gap:8px;pointer-events:none}
.geo-builder-toast{min-width:260px;max-width:360px;padding:11px 13px;border:1px solid color-mix(in srgb, var(--n15) 22%, transparent);border-radius:8px;background:color-mix(in srgb, var(--n3) 97%, transparent);box-shadow:0 14px 35px rgba(0,0,0,.38);font-size:.68rem;color:var(--n21);animation:geoBuilderToastIn .2s ease}
.geo-builder-toast.is-success{border-color:color-mix(in srgb, var(--ok-1) 40%, transparent)}
.geo-builder-toast.is-error{border-color:color-mix(in srgb, var(--bad-2) 48%, transparent);color:var(--bad-1)}
@keyframes geoBuilderToastIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.geo-builder-login{min-height:calc(100vh - 76px);display:grid;place-items:center;padding:40px;background:radial-gradient(circle at 50% 36%,color-mix(in srgb, var(--gold-4) 11%, transparent),transparent 34%),linear-gradient(180deg,var(--n2),var(--n2))}
.geo-builder-login-card{max-width:620px;text-align:center;border:1px solid color-mix(in srgb, var(--n15) 18%, transparent);border-radius:14px;background:color-mix(in srgb, var(--n3) 92%, transparent);padding:48px;box-shadow:0 24px 80px rgba(0,0,0,.35)}
.geo-builder-kicker{font-family:var(--font-mono);font-size:.68rem;letter-spacing:.14em;text-transform:uppercase;color:var(--gold)}
.geo-builder-login-card h1{font-family:var(--font-display);font-size:2.25rem;line-height:1.12;margin:14px 0;color:var(--gold-5)}
.geo-builder-login-card p{color:var(--n15);line-height:1.7;margin:0 auto 26px;max-width:520px}
.geo-builder-login-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}
/* Leaflet refinements */
.geo-builder-map .leaflet-control-zoom{margin:14px 0 0 14px;border:1px solid color-mix(in srgb, var(--n15) 25%, transparent);box-shadow:0 8px 24px rgba(0,0,0,.28)}
.geo-builder-map .leaflet-control-zoom a{width:34px;height:34px;line-height:34px;background:var(--n3);color:var(--n21);border-color:color-mix(in srgb, var(--n15) 18%, transparent)}
.geo-builder-map .leaflet-control-zoom a:hover{background:var(--n4);color:var(--gold-4)}
.geo-builder-map .leaflet-control-attribution{bottom:31px;max-width:calc(100% - 18px);padding:4px 7px;background:color-mix(in srgb, var(--n2) 86%, transparent);color:var(--n17);font-size:10px;line-height:1;white-space:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
.geo-builder-map .leaflet-control-attribution::-webkit-scrollbar{display:none}
.geo-builder-map .leaflet-control-attribution a{color:var(--n21);text-decoration:underline;text-underline-offset:2px}
.geo-builder-map .leaflet-interactive{transition:fill-opacity .12s,stroke .12s,filter .12s}
.geo-builder-layer-selected{filter:drop-shadow(0 0 5px color-mix(in srgb, var(--gold-4) 90%, transparent))}
@media (max-width:1120px){
  .geo-builder-topbar{grid-template-columns:180px 1fr auto}.geo-builder-library-select>span{display:none}.geo-builder-workspace{grid-template-columns:64px minmax(0,1fr) 300px}.geo-builder-tool{width:46px}.geo-builder-toolrail{padding-left:7px;padding-right:7px}
}
@media (max-width:900px){
  .histriphy-builder-page{overflow:auto}.geo-builder-app{min-height:auto}.geo-builder-topbar{height:auto;min-height:64px;grid-template-columns:1fr auto;padding:10px 12px}.geo-builder-source-controls{grid-column:1/-1;grid-row:2}.geo-builder-library-select{max-width:none}.geo-builder-workspace,.admin-bar .geo-builder-workspace{height:calc(100vh - 210px);grid-template-columns:58px 1fr}.geo-builder-sidebar{position:absolute;right:0;top:0;bottom:0;width:320px;transform:translateX(100%);transition:.2s ease;box-shadow:-15px 0 40px rgba(0,0,0,.4)}.geo-builder-sidebar.is-mobile-open{transform:none}.geo-builder-tool{width:42px;min-height:48px}.geo-builder-tool span{display:none}.geo-builder-statusbar>div:last-child span:nth-child(n+3){display:none}
}
@media (max-width:600px){
  .geo-builder-title-block strong{font-size:.8rem}.geo-builder-title-block span{display:none}.geo-builder-source-controls{flex-wrap:wrap}.geo-builder-library-select{width:100%;flex-basis:100%}.geo-builder-top-button{flex:1}.geo-builder-history-controls .geo-builder-clear-button{font-size:0;width:38px;padding:0}.geo-builder-workspace,.admin-bar .geo-builder-workspace{height:calc(100vh - 236px)}.geo-builder-map-hint{left:12px;right:12px;transform:none}.geo-builder-statusbar>div:first-child span:first-child{display:none}.geo-builder-draft-banner{grid-template-columns:1fr 1fr}.geo-builder-draft-banner>div{grid-column:1/-1}
}

/* Mobile Studio drawer and touch layout */
.geo-builder-mobile-panel-button,.geo-builder-sidebar-close{display:none}
@media (max-width:900px){
  .geo-builder-mobile-panel-button{display:inline-flex}
  .geo-builder-sidebar{position:fixed;z-index:120;right:0;top:66px;bottom:0;width:min(360px,92vw);transform:translateX(105%);transition:transform .24s cubic-bezier(.2,.8,.2,1);box-shadow:-18px 0 50px rgba(0,0,0,.58)}
  .admin-bar .geo-builder-sidebar{top:98px}
  .geo-builder-sidebar.is-mobile-open{transform:none}
  .geo-builder-sidebar-close{display:grid;place-items:center;position:absolute;z-index:4;right:8px;top:8px;width:34px;height:34px;border:1px solid color-mix(in srgb, var(--n15) 22%, transparent);border-radius:8px;background:var(--n3);color:var(--info-1);font-size:1.15rem}
  .geo-builder-tabs{padding-right:46px}
  .geo-builder-tab-panel{padding-bottom:calc(24px + env(safe-area-inset-bottom))}
  .geo-builder-workspace,.admin-bar .geo-builder-workspace{height:calc(100dvh - 210px);min-height:480px}
  .geo-builder-top-button,.geo-builder-icon-button,.geo-builder-tool,.geo-builder-tabs button,.geo-builder-layer-actions button,.geo-builder-operation-button,.geo-builder-wide-button{touch-action:manipulation}
}
@media (max-width:782px){.admin-bar .geo-builder-sidebar{top:112px}}
@media (max-width:600px){
  .histriphy-builder-page .site-header{position:relative}
  .geo-builder-topbar{gap:8px;padding:9px 10px}
  .geo-builder-title-block{grid-column:1}
  .geo-builder-history-controls{gap:5px}
  .geo-builder-source-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%}
  .geo-builder-library-select{grid-column:1/-1;max-width:none}
  .geo-builder-top-button{width:100%;min-width:0;padding:0 7px;font-size:.67rem}
  .geo-builder-workspace,.admin-bar .geo-builder-workspace{position:relative;height:calc(100dvh - 252px);min-height:420px;grid-template-columns:1fr}
  .geo-builder-toolrail{position:absolute;z-index:32;left:0;right:0;bottom:0;height:58px;padding:5px 8px calc(5px + env(safe-area-inset-bottom));border-right:0;border-top:1px solid color-mix(in srgb, var(--n15) 18%, transparent);display:flex;flex-direction:row;gap:6px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;background:color-mix(in srgb, var(--n3) 97%, transparent)}
  .geo-builder-toolrail::-webkit-scrollbar{display:none}
  .geo-builder-tool-group{flex-direction:row;gap:4px}
  .geo-builder-tool-divider{width:1px;height:40px;margin:4px 2px}
  .geo-builder-toolrail-spacer{display:none}
  .geo-builder-tool{flex:0 0 44px;width:44px;min-height:44px;padding:5px}
  .geo-builder-tool.is-active{box-shadow:inset 0 -3px 0 var(--gold)}
  .geo-builder-tool.is-panel-open{color:var(--gold-5);background:color-mix(in srgb, var(--gold-4) 11%, transparent);border-color:color-mix(in srgb, var(--gold-4) 36%, transparent);box-shadow:inset 0 -3px 0 var(--gold)}
  .geo-builder-canvas-wrap{padding-bottom:58px}
  .geo-builder-statusbar{bottom:58px;height:28px;padding:0 8px}
  .geo-builder-map .leaflet-control-attribution{bottom:86px;font-size:8.5px;max-width:calc(100vw - 16px)}
  .geo-builder-basemap-panel{left:8px;right:8px;bottom:94px;width:auto;max-height:60dvh;overflow:auto}
  .geo-builder-map-hint{top:8px;max-height:72px;overflow:auto;font-size:.62rem}
  .geo-builder-sidebar{top:auto;left:0;right:0;bottom:0;width:100%;height:min(72dvh,620px);border-left:0;border-top:1px solid color-mix(in srgb, var(--n15) 28%, transparent);border-radius:18px 18px 0 0;transform:translateY(105%);box-shadow:0 -20px 55px rgba(0,0,0,.62)}
  .admin-bar .geo-builder-sidebar{top:auto}
  .geo-builder-sidebar.is-mobile-open{transform:translateY(0)}
  .geo-builder-toast-stack{left:10px;right:10px;bottom:74px}
  .geo-builder-toast{min-width:0;max-width:none;width:100%}
  .geo-builder-draft-banner{bottom:70px}
  .geo-builder-loading{padding:20px;text-align:center}
}


.geo-builder-mobile-backdrop{display:none}
@media (max-width:900px){
  body.geo-builder-panel-open{overflow:hidden}
  .geo-builder-mobile-backdrop{display:block;position:fixed;z-index:110;inset:0;border:0;background:color-mix(in srgb, var(--n2) 58%, transparent);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .2s ease,visibility .2s ease}
  body.geo-builder-panel-open .geo-builder-mobile-backdrop{opacity:1;visibility:visible;pointer-events:auto}
}


/* Standalone Histriphy AI preview */
.geo-builder-ai-button{height:40px;min-width:150px;padding:0 13px;border:1px solid color-mix(in srgb, var(--gold-4) 48%, transparent);border-radius:9px;background:linear-gradient(135deg,color-mix(in srgb, var(--gold-4) 14%, transparent),color-mix(in srgb, var(--n9) 12%, transparent));color:var(--gold-5);display:flex;align-items:center;justify-content:center;gap:9px;box-shadow:0 0 25px color-mix(in srgb, var(--gold-4) 8%, transparent);transition:.18s ease}
.geo-builder-ai-button:hover{transform:translateY(-1px);border-color:color-mix(in srgb, var(--gold-4) 80%, transparent);box-shadow:0 8px 26px rgba(0,0,0,.26),0 0 28px color-mix(in srgb, var(--gold-4) 13%, transparent)}
.geo-builder-ai-icon{width:27px;height:27px;border-radius:7px;background:color-mix(in srgb, var(--gold-4) 13%, transparent);display:grid;place-items:center;flex:0 0 auto}
.geo-builder-ai-icon svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.geo-builder-ai-button>span:last-child{display:flex;flex-direction:column;align-items:flex-start;line-height:1.05}
.geo-builder-ai-button strong{font-size:.73rem;color:var(--info-1)}
.geo-builder-ai-button small{font-size:.58rem;color:var(--gold-4);margin-top:4px;text-transform:uppercase;letter-spacing:.08em}
.geo-builder-ai-modal{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;padding:22px}
.geo-builder-ai-modal[hidden]{display:none}
.geo-builder-ai-backdrop{position:absolute;inset:0;border:0;background:color-mix(in srgb, var(--n2) 78%, transparent);backdrop-filter:blur(9px)}
.geo-builder-ai-dialog{position:relative;width:min(520px,100%);padding:34px;border:1px solid color-mix(in srgb, var(--gold-4) 32%, transparent);border-radius:16px;background:radial-gradient(circle at 15% 10%,color-mix(in srgb, var(--gold-4) 11%, transparent),transparent 34%),linear-gradient(145deg,var(--n4),var(--n3));box-shadow:0 30px 100px rgba(0,0,0,.62);opacity:0;transform:translateY(14px) scale(.98);transition:opacity .18s ease,transform .18s ease}
.geo-builder-ai-modal.is-open .geo-builder-ai-dialog{opacity:1;transform:translateY(0) scale(1)}
.geo-builder-ai-close{position:absolute;right:14px;top:14px;width:34px;height:34px;border:1px solid color-mix(in srgb, var(--n15) 20%, transparent);border-radius:8px;background:var(--n3);color:var(--n17);font-size:1.2rem}
.geo-builder-ai-badge{display:inline-flex;padding:6px 9px;border:1px solid color-mix(in srgb, var(--gold-4) 35%, transparent);border-radius:999px;background:color-mix(in srgb, var(--gold-4) 8%, transparent);color:var(--gold-4);font-size:.61rem;font-weight:800;text-transform:uppercase;letter-spacing:.1em}
.geo-builder-ai-mark{width:54px;height:54px;margin:25px 0 17px;border-radius:14px;background:linear-gradient(135deg,color-mix(in srgb, var(--gold-4) 20%, transparent),color-mix(in srgb, var(--n11) 16%, transparent));display:grid;place-items:center;color:var(--gold-4);box-shadow:0 0 30px color-mix(in srgb, var(--gold-4) 12%, transparent)}
.geo-builder-ai-mark svg{width:29px;height:29px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.geo-builder-ai-dialog h2{font-size:1.65rem;line-height:1.1;margin:0 0 10px}
.geo-builder-ai-dialog>p{color:var(--n16);font-size:.88rem;line-height:1.65;margin:0}
.geo-builder-ai-capabilities{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:23px 0}
.geo-builder-ai-capabilities span{padding:10px 11px;border:1px solid color-mix(in srgb, var(--n15) 14%, transparent);border-radius:8px;background:var(--n3);color:var(--n18);font-size:.69rem}
.geo-builder-ai-capabilities span:before{content:'✦';color:var(--gold-4);margin-right:7px}
.geo-builder-ai-soon{width:100%;height:43px;border:1px solid color-mix(in srgb, var(--gold-4) 28%, transparent);border-radius:8px;background:color-mix(in srgb, var(--gold-4) 8%, transparent);color:var(--gold-4);font-size:.74rem;font-weight:800;cursor:not-allowed}
.geo-builder-ai-open{overflow:hidden}

@media(max-width:1180px){
  .geo-builder-topbar{grid-template-columns:minmax(145px,.8fr) minmax(310px,1.35fr) auto minmax(135px,.7fr);gap:10px;padding:0 12px}
  .geo-builder-ai-button{min-width:118px;padding:0 9px}
  .geo-builder-ai-button strong{font-size:.67rem}
}
@media(max-width:900px){
  .geo-builder-ai-button{order:3;min-width:106px;height:38px}
  .geo-builder-ai-button>span:last-child small{display:none}
  .geo-builder-ai-button>span:last-child strong{font-size:.7rem}
}
@media(max-width:600px){
  .geo-builder-ai-button{position:absolute;right:57px;top:8px;width:44px;min-width:44px;padding:0;border-radius:9px}
  .geo-builder-ai-button>span:last-child{display:none}
  .geo-builder-ai-icon{background:transparent;width:22px;height:22px}
  .geo-builder-ai-dialog{padding:27px 22px;border-radius:15px}
  .geo-builder-ai-capabilities{grid-template-columns:1fr}
}

/* Keep the AI control independent without breaking the mobile topbar layout. */
@media(max-width:900px){
  .geo-builder-topbar{grid-template-columns:minmax(0,1fr) auto auto;gap:8px;padding:10px 12px}
  .geo-builder-title-block{grid-column:1;grid-row:1}
  .geo-builder-ai-button{grid-column:2;grid-row:1;order:initial}
  .geo-builder-history-controls{grid-column:3;grid-row:1}
  .geo-builder-source-controls{grid-column:1/-1;grid-row:2}
}
@media(max-width:600px){
  .geo-builder-topbar{grid-template-columns:minmax(0,1fr) auto;padding:9px 10px}
  .geo-builder-title-block{grid-column:1;grid-row:1}
  .geo-builder-history-controls{grid-column:2;grid-row:1}
  .geo-builder-source-controls{grid-column:1/-1;grid-row:2}
}

/* Theme 19.12.5: simple, working geometry controls */
.geo-builder-control-card select{
  width:100%;
  min-height:38px;
  margin:0 0 9px;
  padding:8px 10px;
  border:1px solid color-mix(in srgb, var(--n15) 20%, transparent);
  border-radius:6px;
  background:var(--n3);
  color:var(--n21);
  font-size:.68rem;
}
.geo-builder-control-card select:focus{outline:2px solid color-mix(in srgb, var(--gold-4) 35%, transparent);outline-offset:1px;border-color:color-mix(in srgb, var(--gold-4) 55%, transparent)}

/* Theme 19.16.6: keep Studio map credits, metrics and inspector values readable. */
.geo-builder-statusbar{z-index:22;height:34px;padding:0 13px;border-top-color:var(--n7);background:color-mix(in srgb, var(--n2) 98%, transparent);box-shadow:0 -5px 16px rgba(0,0,0,.28);color:var(--n19);font-size:.64rem;pointer-events:auto;overflow-x:auto;overflow-y:hidden;white-space:nowrap;scrollbar-width:none}
.geo-builder-statusbar::-webkit-scrollbar{display:none}
.geo-builder-statusbar>div{flex:0 0 auto;gap:15px}
.geo-builder-statusbar strong{color:var(--info-1)}
.geo-builder-statusbar .is-valid{color:var(--ok-1);font-weight:700}
.geo-builder-statusbar .is-invalid{color:var(--bad-1);font-weight:700}
.geo-builder-map .leaflet-control-attribution{z-index:23;bottom:34px;max-width:calc(100% - 18px);padding:5px 8px;border:1px solid var(--n8);border-right:0;border-bottom:0;border-radius:5px 0 0;background:color-mix(in srgb, var(--n2) 97%, transparent);box-shadow:0 0 14px rgba(0,0,0,.32);color:var(--info-1);font-size:10.5px;line-height:1.15}
.geo-builder-map .leaflet-control-attribution a{color:var(--n24);font-weight:650;text-decoration-color:var(--n16)}
.geo-builder-inspector-grid>div{border-color:var(--n7);background:var(--n3)}
.geo-builder-inspector-grid span{color:var(--n16);font-size:.63rem;font-weight:650}
.geo-builder-inspector-grid strong{color:var(--info-1);font-size:.84rem}
@media(max-width:980px){
  .geo-builder-statusbar>div:last-child span{display:inline!important}
}
@media(max-width:700px){
  .geo-builder-statusbar{bottom:58px;height:32px;padding:0 9px;font-size:.58rem}
  .geo-builder-statusbar>div{gap:10px}
  .geo-builder-map .leaflet-control-attribution{bottom:90px;max-width:calc(100vw - 16px);font-size:9px}
}

/* Theme 19.19.0: phone-first Studio controls without changing desktop. */
@media(max-width:600px){
  .geo-builder-topbar{
    min-height:142px;
    padding:10px 12px 12px;
    gap:10px;
    grid-template-columns:minmax(128px,1fr) auto;
    align-content:start;
    background:var(--n2);
  }
  .geo-builder-title-block{min-height:44px}
  .geo-builder-product-mark{width:38px;height:38px;border-radius:10px}
  .geo-builder-title-block strong{font-size:.94rem}
  .geo-builder-ai-button{display:none}
  .geo-builder-history-controls{height:44px;gap:6px}
  .geo-builder-icon-button,.geo-builder-history-controls .geo-builder-clear-button{
    width:44px;
    height:44px;
    min-width:44px;
    border-radius:10px;
  }
  .geo-builder-source-controls{gap:8px}
  .geo-builder-library-select{height:44px;padding:0 12px;border-radius:10px}
  .geo-builder-library-select select{font-size:.85rem}
  .geo-builder-top-button{height:44px;border-radius:10px;font-size:.7rem;line-height:1.2}
  .geo-builder-workspace,.admin-bar .geo-builder-workspace{
    height:calc(var(--histriphy-mobile-vh,100dvh) - 208px);
    min-height:360px;
  }
  .geo-builder-toolrail{
    height:calc(112px + env(safe-area-inset-bottom));
    padding:8px 10px calc(8px + env(safe-area-inset-bottom));
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    grid-auto-rows:44px;
    gap:4px 6px;
    overflow:visible;
    background:color-mix(in srgb, var(--n2) 98.5%, transparent);
    box-shadow:0 -10px 30px rgba(0,0,0,.32);
  }
  .geo-builder-tool-group{display:contents}
  .geo-builder-tool-divider,.geo-builder-toolrail-spacer{display:none}
  .geo-builder-tool{
    width:100%;
    min-width:0;
    min-height:44px;
    padding:3px 2px;
    gap:2px;
    border-radius:9px;
  }
  .geo-builder-tool span{display:block;font-size:.56rem;line-height:1}
  .geo-builder-tool svg{width:19px;height:19px}
  .geo-builder-canvas-wrap{padding-bottom:calc(112px + env(safe-area-inset-bottom))}
  .geo-builder-statusbar{
    bottom:calc(112px + env(safe-area-inset-bottom));
    height:36px;
    padding:0 10px;
    gap:12px;
    justify-content:flex-start;
    font-size:.61rem;
  }
  .geo-builder-statusbar>div{gap:11px}
  .geo-builder-statusbar>div:first-child span:first-child{display:none}
  .geo-builder-map .leaflet-bottom.leaflet-right{
    right:8px!important;
    bottom:calc(156px + env(safe-area-inset-bottom))!important;
    max-width:calc(100% - 16px);
  }
  .geo-builder-map .leaflet-bottom.leaflet-right .leaflet-control-attribution{
    max-width:100%;
    padding:5px 7px;
    font-size:9px;
    overflow-x:auto;
  }
  .geo-builder-basemap-panel{bottom:calc(156px + env(safe-area-inset-bottom))}
  .geo-builder-toast-stack{bottom:calc(124px + env(safe-area-inset-bottom))}
  .geo-builder-draft-banner{bottom:calc(124px + env(safe-area-inset-bottom))}
  .histriphy-builder-page .cky-btn-revisit-wrapper{
    bottom:calc(124px + env(safe-area-inset-bottom))!important;
    left:12px!important;
  }
  .geo-builder-sidebar{height:min(78dvh,680px);border-radius:20px 20px 0 0;background:var(--n3)}
  .geo-builder-sidebar::before{content:"";position:absolute;z-index:5;top:7px;left:50%;width:42px;height:4px;border-radius:999px;background:var(--n8);transform:translateX(-50%)}
  .geo-builder-tabs{height:64px;padding:14px 54px 0 8px;background:var(--n3)}
  .geo-builder-tabs button{min-height:48px;font-size:.78rem}
  .geo-builder-sidebar-close{top:14px;right:10px;width:44px;height:44px;border-radius:10px}
}

@media(max-width:390px){
  .geo-builder-topbar{padding-left:9px;padding-right:9px}
  .geo-builder-history-controls{gap:4px}
  .geo-builder-icon-button,.geo-builder-history-controls .geo-builder-clear-button{width:42px;min-width:42px;height:42px}
  .geo-builder-top-button{font-size:.64rem;padding-left:5px;padding-right:5px}
  .geo-builder-top-button svg{width:15px;height:15px}
  .geo-builder-statusbar{font-size:.57rem}
  .geo-builder-statusbar>div{gap:8px}
}

/* Theme 19.17.0: keep the complete basemap credit inside the map viewport. */
.geo-builder-map .leaflet-control-attribution{
  box-sizing:border-box;
  bottom:40px;
  width:max-content;
  max-width:min(360px,calc(100% - 28px));
  margin-right:8px;
  padding:5px 8px;
  border-right:1px solid var(--n8);
  border-bottom:1px solid var(--n8);
  border-radius:5px;
  line-height:1.35;
  text-align:right;
  white-space:nowrap;
  overflow:visible;
}
.geo-builder-map .leaflet-control-attribution a{white-space:nowrap}
@media(max-width:700px){
  .geo-builder-map .leaflet-control-attribution{
    bottom:96px;
    max-width:calc(100vw - 28px);
    margin-right:6px;
    font-size:9px;
  }
}
@media(max-width:340px){
  .geo-builder-map .leaflet-control-attribution{width:auto;white-space:normal}
}

/* Theme 19.17.1: position Leaflet's container, not only its credit box. */
.geo-builder-map .leaflet-bottom.leaflet-right{
  right:10px!important;
  bottom:42px!important;
  z-index:1000;
  max-width:calc(100% - 20px);
}
.geo-builder-map .leaflet-bottom.leaflet-right .leaflet-control-attribution{
  position:relative;
  right:auto;
  bottom:auto!important;
  width:max-content;
  max-width:100%;
  margin:0!important;
}
@media(max-width:700px){
  .geo-builder-map .leaflet-bottom.leaflet-right{
    right:8px!important;
    bottom:96px!important;
    max-width:calc(100% - 16px);
  }
}

/* Final phone placement must follow the older credit compatibility rules. */
@media(max-width:600px){
  .geo-builder-map .leaflet-bottom.leaflet-right{
    right:8px!important;
    bottom:calc(156px + env(safe-area-inset-bottom))!important;
    max-width:calc(100% - 16px);
  }
}

/* ========================================================================== 
   HISTRIPHY FRONTEND REFRESH TEST · Studio chrome
   Keeps every existing ID and operation intact while matching the new site.
   ========================================================================== */
.geo-builder-app{--rail:54px;--side:330px;background:var(--bg);color:var(--ink)}
.geo-builder-app *{box-sizing:border-box}
.histriphy-builder-page .site-header{background:color-mix(in srgb,var(--bg) 96%,transparent)}
.geo-builder-topbar{min-height:58px;height:58px;padding:8px 12px;gap:9px;border-top:0;border-bottom:1px solid var(--border-soft);background:var(--bg-deep);box-shadow:none}
.geo-builder-title-block{gap:9px;min-width:160px}
.geo-builder-product-mark{width:30px;height:30px;border-radius:7px;border:1px solid color-mix(in srgb,var(--gold) 30%,var(--border));background:color-mix(in srgb,var(--gold) 7%,var(--bg-card));color:var(--gold)}
.geo-builder-title-block strong{font-size:.84rem;font-weight:720;letter-spacing:-.015em}
.geo-builder-title-block span{font-family:var(--font-mono);font-size:.57rem;letter-spacing:.045em;color:var(--ink-faint)}
.geo-builder-source-controls{gap:7px}
.geo-builder-library-select{height:38px;max-width:315px;border:1px solid var(--border);border-radius:7px;background:var(--bg-card)}
.geo-builder-library-select>span{font-family:var(--font-mono);font-size:.55rem;letter-spacing:.1em;color:var(--ink-faint)}
.geo-builder-library-select select{height:36px;color:var(--ink);background:transparent}
.geo-builder-top-button,.geo-builder-icon-button{height:38px;min-height:38px;border:1px solid var(--border);border-radius:7px;background:var(--bg-card);color:var(--ink);box-shadow:none;font-size:.72rem;font-weight:650}
.geo-builder-top-button:hover,.geo-builder-icon-button:hover{transform:none;border-color:var(--border-strong);background:var(--bg-elevated)}
.geo-builder-add-country-button{color:var(--ink);border-color:var(--border);background:var(--bg-card)}
.geo-builder-add-country-button:hover{color:var(--gold-soft)!important;border-color:color-mix(in srgb,var(--gold) 40%,var(--border))!important;background:color-mix(in srgb,var(--gold) 6%,var(--bg-card))!important}
.geo-builder-ai-button{height:38px;min-width:145px;border-radius:7px;border-color:color-mix(in srgb,var(--gold) 28%,var(--border));background:var(--bg-card);box-shadow:none}
.geo-builder-ai-button:hover{transform:none;box-shadow:none;background:color-mix(in srgb,var(--gold) 6%,var(--bg-card))}
.geo-builder-history-controls{gap:6px}
.geo-builder-workspace{grid-template-columns:var(--rail) minmax(0,1fr) var(--side);background:var(--bg)}
.geo-builder-toolrail{padding:8px 5px;border-right:1px solid var(--border-soft);background:var(--bg-deep)}
.geo-builder-tool-group{gap:4px}
.geo-builder-tool{width:43px;min-height:48px;padding:5px 3px;border:1px solid transparent;border-radius:7px;color:var(--ink-faint);background:transparent}
.geo-builder-tool:hover{color:var(--ink);background:var(--bg-card);border-color:var(--border-soft)}
.geo-builder-tool.is-active{color:var(--gold);border-color:color-mix(in srgb,var(--gold) 38%,var(--border));background:color-mix(in srgb,var(--gold) 8%,var(--bg-card));box-shadow:none}
.geo-builder-tool svg{width:18px;height:18px}
.geo-builder-tool span{font-size:.54rem;font-weight:650}
.geo-builder-tool-divider{background:var(--border-soft)}
.geo-builder-canvas-wrap{background:var(--map-ocean)}
.geo-builder-map{background:var(--map-ocean)}
.geo-builder-map-hint{top:12px;max-width:520px;padding:10px 13px;border:1px solid var(--border);border-radius:7px;background:color-mix(in srgb,var(--bg-card) 94%,transparent);color:var(--ink-dim);box-shadow:var(--shadow-2);backdrop-filter:blur(10px)}
.geo-builder-map-hint strong{color:var(--ink)}
.geo-builder-map-hint button{color:var(--ink-faint)}
.geo-builder-statusbar{height:29px;border-top:1px solid var(--border-soft);background:color-mix(in srgb,var(--bg-deep) 94%,transparent);color:var(--ink-faint);font-family:var(--font-mono);font-size:.55rem}
.geo-builder-statusbar strong{color:var(--ink-dim)}
.geo-builder-statusbar .is-valid{color:var(--success)}
.geo-builder-sidebar{border-left:1px solid var(--border-soft);background:var(--bg-deep);box-shadow:none}
.geo-builder-tabs{height:47px;border-bottom:1px solid var(--border-soft);background:var(--bg-deep)}
.geo-builder-tabs button{position:relative;color:var(--ink-faint);font-size:.68rem;font-weight:650;background:transparent;border:0}
.geo-builder-tabs button.is-active{color:var(--ink)}
.geo-builder-tabs button.is-active:after{content:"";position:absolute;left:22%;right:22%;bottom:0;height:2px;background:var(--gold)}
.geo-builder-tab-panel{padding:16px 14px 28px}
.geo-builder-section-head strong{font-size:.76rem;color:var(--ink)}
.geo-builder-section-head span{color:var(--ink-faint);font-size:.62rem}
.geo-builder-section-head>button{border-radius:6px;border-color:color-mix(in srgb,var(--gold) 32%,var(--border));background:color-mix(in srgb,var(--gold) 7%,var(--bg-card));color:var(--gold)}
.geo-builder-layer-list{gap:8px}
.geo-builder-empty-state{min-height:150px;padding:18px;border:1px dashed var(--border);border-radius:8px;background:transparent;color:var(--ink-faint)}
.geo-builder-empty-state strong{color:var(--ink-dim)}
.geo-builder-layer-item{border:1px solid var(--border);border-radius:8px;background:var(--bg-card)}
.geo-builder-layer-item.is-selected{border-color:color-mix(in srgb,var(--gold) 50%,var(--border));background:color-mix(in srgb,var(--gold) 5%,var(--bg-card))}
.geo-builder-layer-actions{gap:6px}
.geo-builder-layer-actions button{min-height:35px;border-radius:6px;border-color:var(--border);background:var(--bg-card);color:var(--ink-dim)}
.geo-builder-layer-actions button:hover{color:var(--ink);border-color:var(--border-strong)}
.geo-builder-inspector{margin-top:18px;padding-top:17px;border-top:1px solid var(--border-soft)}
.geo-builder-inspector-grid{gap:7px}
.geo-builder-inspector-grid>div{min-height:58px;padding:10px;border:1px solid var(--border);border-radius:7px;background:var(--bg-card)}
.geo-builder-inspector-grid span{font-family:var(--font-mono);font-size:.54rem;letter-spacing:.08em;color:var(--ink-faint)}
.geo-builder-inspector-grid strong{font-size:.82rem;color:var(--ink)}
.geo-builder-operation-card{border:1px solid var(--border);border-radius:8px;background:var(--bg-card);box-shadow:none}
.geo-builder-operation-card.is-featured{border-color:color-mix(in srgb,var(--gold) 36%,var(--border));background:linear-gradient(145deg,color-mix(in srgb,var(--gold) 5%,var(--bg-card)),var(--bg-card))}
.geo-builder-operation-icon{border-radius:6px;background:color-mix(in srgb,var(--gold) 10%,transparent);color:var(--gold)}
.geo-builder-operation-card strong{color:var(--ink);font-size:.78rem}
.geo-builder-operation-card p,.geo-builder-operation-card small{color:var(--ink-faint);line-height:1.55}
.geo-builder-operation-button{height:38px;border:1px solid var(--gold);border-radius:7px;background:var(--gold);color:var(--on-gold);font-size:.7rem;font-weight:750;box-shadow:none}
.geo-builder-operation-button:hover{filter:brightness(1.04);box-shadow:none}
.geo-builder-operation-grid{gap:7px}
.geo-builder-operation-grid button{min-height:84px;padding:12px;border:1px solid var(--border);border-radius:8px;background:var(--bg-card);color:var(--ink-dim)}
.geo-builder-operation-grid button:hover{border-color:var(--border-strong);background:var(--bg-elevated);color:var(--ink)}
.geo-builder-operation-grid strong{font-size:.73rem;color:var(--ink)}
.geo-builder-operation-grid span{font-size:.6rem;color:var(--ink-faint)}
.geo-builder-control-card{border:1px solid var(--border);border-radius:8px;background:var(--bg-card)}
.geo-builder-control-card select{border-color:var(--border);background:var(--bg-deep)}
.geo-builder-field label,.geo-builder-field>span{color:var(--ink-faint)}
.geo-builder-field input,.geo-builder-field select{background:var(--bg-card);border-color:var(--border);border-radius:7px;color:var(--ink)}
.geo-builder-category-list label{border:1px solid var(--border);border-radius:6px;background:var(--bg-card);color:var(--ink-dim)}
.geo-builder-project-summary{border:1px solid var(--border);border-radius:8px;background:var(--bg-card)}
.geo-builder-export-button{border-color:var(--border);border-radius:7px;background:transparent;color:var(--ink)}
.geo-builder-submit-button{border-radius:7px;background:var(--gold);color:var(--on-gold)}
.geo-builder-submit-note,.geo-builder-bug-report{color:var(--ink-faint)}
.geo-builder-toast{border:1px solid var(--border);border-radius:8px;background:var(--bg-raised);box-shadow:var(--shadow-3);color:var(--ink)}
.geo-builder-toast.is-error{border-color:color-mix(in srgb,var(--error) 48%,var(--border))}
.geo-builder-loading{border:1px solid var(--border);border-radius:10px;background:color-mix(in srgb,var(--bg-raised) 96%,transparent);box-shadow:var(--shadow-3)}
.geo-builder-spinner{border-color:var(--border);border-top-color:var(--gold)}
.geo-builder-basemap-panel{border:1px solid var(--border);border-radius:9px;background:var(--bg-raised);box-shadow:var(--shadow-3)}
.geo-builder-ai-dialog{border-color:var(--border);border-radius:12px;background:var(--bg-raised);box-shadow:var(--shadow-3)}

:root[data-theme="light"] .geo-builder-app{background:var(--bg)}
:root[data-theme="light"] .geo-builder-topbar,:root[data-theme="light"] .geo-builder-toolrail,:root[data-theme="light"] .geo-builder-sidebar,:root[data-theme="light"] .geo-builder-tabs{background:var(--bg-card)}
:root[data-theme="light"] .geo-builder-statusbar{background:rgba(255,255,255,.94)}
:root[data-theme="light"] .geo-builder-map-hint{background:rgba(255,255,255,.94)}

@media (max-width:1180px){.geo-builder-app{--side:310px}.geo-builder-title-block{min-width:145px}.geo-builder-library-select{max-width:270px}}
@media (max-width:900px){.geo-builder-topbar{height:auto;min-height:60px}.geo-builder-sidebar{background:var(--bg-raised)}}
:root[data-theme="light"] .geo-builder-operation-button,
:root[data-theme="light"] .geo-builder-submit-button{background:var(--ink);border-color:var(--ink);color:#fff}

/* ========================================================================== 
   20.0.17-test · Studio tablet / phone stabilization
   ========================================================================== */
@media (max-width:900px){
  .geo-builder-topbar{
    display:flex!important;
    align-items:center!important;
    flex-wrap:wrap!important;
    gap:8px!important;
    min-height:0!important;
    padding:9px 10px!important;
  }
  .geo-builder-title-block{order:1!important;flex:1 1 auto!important;min-width:150px!important}
  .geo-builder-ai-button{order:2!important;flex:0 0 auto!important}
  .geo-builder-history-controls{order:3!important;flex:0 0 auto!important;margin-left:auto!important}
  .geo-builder-source-controls{
    order:4!important;
    flex:1 0 100%!important;
    width:100%!important;
    display:grid!important;
    grid-template-columns:minmax(220px,1fr) repeat(3,max-content)!important;
    gap:7px!important;
  }
  .geo-builder-library-select{min-width:0!important;max-width:none!important}
  .geo-builder-workspace,.admin-bar .geo-builder-workspace{height:calc(100dvh - 218px)!important;min-height:520px!important}
  .geo-builder-sidebar{top:64px!important}
  .admin-bar .geo-builder-sidebar{top:110px!important}
}
@media (max-width:700px){
  .geo-builder-title-block strong{font-size:.76rem!important}
  .geo-builder-title-block span{font-size:.58rem!important}
  .geo-builder-source-controls{grid-template-columns:1fr 1fr 1fr!important}
  .geo-builder-library-select{grid-column:1/-1!important}
  .geo-builder-top-button{min-width:0!important;padding-inline:7px!important;font-size:.66rem!important}
  .geo-builder-workspace,.admin-bar .geo-builder-workspace{height:calc(100dvh - 270px)!important;min-height:430px!important}
  .geo-builder-map .leaflet-control-zoom{margin-top:10px!important;margin-left:10px!important}
}
@media (max-width:480px){
  .geo-builder-ai-button{width:38px!important;min-width:38px!important;height:38px!important;padding:0!important}
  .geo-builder-ai-button>span:last-child{display:none!important}
  .geo-builder-history-controls .geo-builder-clear-button{width:38px!important;min-width:38px!important;padding:0!important;font-size:0!important}
  .geo-builder-history-controls .geo-builder-clear-button svg{margin:0!important}
  .geo-builder-topbar{gap:6px!important;padding:7px 8px!important}
  .geo-builder-source-controls{gap:5px!important}
  .geo-builder-workspace,.admin-bar .geo-builder-workspace{height:calc(100dvh - 260px)!important;min-height:390px!important}
  .geo-builder-sidebar{height:min(76dvh,640px)!important}
  .geo-builder-tab-panel{padding:14px 12px calc(22px + env(safe-area-inset-bottom))!important}
}

/* ========================================================================== 
   20.0.18-test · Studio tablet / phone rebuild
   ========================================================================== */
@media (max-width:960px){
  .histriphy-builder-page{overflow:hidden!important}
  .histriphy-builder-page .site-header{position:sticky!important;top:0!important}
  .geo-builder-app{min-height:0!important;height:calc(100dvh - 64px)!important;overflow:hidden!important}
  .admin-bar .geo-builder-app{height:calc(100dvh - 96px)!important}
  .geo-builder-topbar{
    height:106px!important;min-height:106px!important;padding:8px 12px!important;
    display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:42px 44px!important;
    gap:6px 10px!important;align-items:center!important;
  }
  .geo-builder-title-block{grid-column:1;grid-row:1;min-width:0!important}
  .geo-builder-product-mark{width:30px!important;height:30px!important}
  .geo-builder-title-block strong{font-size:.82rem!important}
  .geo-builder-title-block span{font-size:.6rem!important}
  .geo-builder-ai-button{grid-column:2;grid-row:1;height:36px!important;padding:0 9px!important}
  .geo-builder-source-controls{grid-column:1/-1!important;grid-row:2!important;justify-content:flex-start!important;gap:7px!important;min-width:0!important;overflow-x:auto!important;scrollbar-width:none!important;padding-bottom:1px!important}
  .geo-builder-source-controls::-webkit-scrollbar{display:none!important}
  .geo-builder-library-select{flex:1 0 250px!important;max-width:none!important;height:38px!important}
  .geo-builder-top-button{height:38px!important;flex:0 0 auto!important;padding-inline:11px!important}
  .geo-builder-history-controls{position:absolute!important;right:12px!important;top:11px!important;gap:6px!important;transform:translateY(0)!important}
  .geo-builder-history-controls .geo-builder-clear-button{display:none!important}
  .geo-builder-workspace,.admin-bar .geo-builder-workspace{height:calc(100dvh - 170px)!important;min-height:0!important;grid-template-columns:58px minmax(0,1fr)!important}
  .geo-builder-toolrail{width:58px!important;padding:7px 5px!important;gap:5px!important}
  .geo-builder-tool{width:46px!important;min-height:46px!important;padding:5px 3px!important;font-size:.58rem!important}
  .geo-builder-tool svg{width:18px!important;height:18px!important}
  .geo-builder-sidebar{position:absolute!important;right:0!important;top:0!important;bottom:0!important;width:min(360px,88vw)!important;transform:translateX(102%)!important;transition:transform .2s ease!important;box-shadow:-22px 0 50px -34px rgba(0,0,0,.8)!important;z-index:70!important}
  .geo-builder-sidebar.is-mobile-open{transform:none!important}
  .geo-builder-mobile-backdrop{display:block!important;position:absolute!important;inset:0!important;z-index:65!important;background:rgba(0,0,0,.36)!important;opacity:0!important;pointer-events:none!important;transition:opacity .2s ease!important}
  .geo-builder-mobile-backdrop.is-active{opacity:1!important;pointer-events:auto!important}
  .geo-builder-sidebar-close{display:grid!important}
  .geo-builder-statusbar{font-size:.65rem!important;padding-inline:10px!important}
  .geo-builder-statusbar>div:last-child span:nth-child(n+3){display:none!important}
  .geo-builder-map-hint{max-width:min(520px,calc(100% - 32px))!important;font-size:.72rem!important}
}

@media (max-width:700px){
  .histriphy-builder-page .site-header{display:none!important}
  .geo-builder-app,.admin-bar .geo-builder-app{height:100dvh!important}
  .geo-builder-topbar{height:94px!important;min-height:94px!important;padding:7px 9px!important;grid-template-rows:38px 40px!important;gap:5px 7px!important}
  .geo-builder-title-block{gap:7px!important}
  .geo-builder-product-mark{width:28px!important;height:28px!important}
  .geo-builder-title-block strong{font-size:.78rem!important}
  .geo-builder-title-block span{display:none!important}
  .geo-builder-ai-button{display:none!important}
  .geo-builder-history-controls{right:9px!important;top:7px!important}
  .geo-builder-history-controls .geo-builder-icon-button{width:34px!important;height:34px!important}
  .geo-builder-library-select{flex-basis:200px!important;height:36px!important}
  .geo-builder-library-select>span{display:none!important}
  .geo-builder-library-select select{font-size:.75rem!important}
  .geo-builder-top-button{height:36px!important;padding-inline:10px!important;font-size:.72rem!important}
  .geo-builder-top-button svg{width:14px!important;height:14px!important}
  .geo-builder-add-country-button{display:none!important}
  .geo-builder-workspace,.admin-bar .geo-builder-workspace{height:calc(100dvh - 94px)!important;display:block!important;position:relative!important}
  .geo-builder-canvas-wrap{position:absolute!important;inset:0 0 50px 0!important}
  .geo-builder-toolrail{position:absolute!important;left:0!important;right:0!important;bottom:0!important;width:auto!important;height:50px!important;padding:4px 6px!important;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-around!important;border-right:0!important;border-top:1px solid var(--border-soft)!important;z-index:60!important;background:color-mix(in srgb,var(--bg-card) 96%,transparent)!important;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
  .geo-builder-tool-group{display:contents!important}
  .geo-builder-tool-divider,.geo-builder-toolrail-spacer{display:none!important}
  .geo-builder-tool{width:40px!important;min-height:40px!important;height:40px!important;padding:3px!important;gap:1px!important;border-radius:7px!important;font-size:0!important}
  .geo-builder-tool svg{width:18px!important;height:18px!important}
  .geo-builder-tool.is-active{box-shadow:inset 0 -3px 0 var(--gold)!important}
  .geo-builder-sidebar{left:8px!important;right:8px!important;top:auto!important;bottom:58px!important;width:auto!important;height:min(58dvh,480px)!important;border:1px solid var(--border)!important;border-radius:14px!important;transform:translateY(calc(100% + 80px))!important;box-shadow:0 -18px 50px -26px rgba(0,0,0,.75)!important}
  .geo-builder-sidebar.is-mobile-open{transform:none!important}
  .geo-builder-tabs{height:44px!important}
  .geo-builder-tab-panel{padding:12px!important}
  .geo-builder-map-hint{top:10px!important;left:50%!important;transform:translateX(-50%)!important;max-width:calc(100% - 24px)!important;padding:8px 34px 8px 10px!important;font-size:.68rem!important;line-height:1.4!important}
  .geo-builder-statusbar{bottom:50px!important;height:28px!important;padding:0 8px!important;font-size:.58rem!important}
  .geo-builder-statusbar>div:first-child span:first-child{display:none!important}
  .geo-builder-basemap-panel{left:10px!important;right:10px!important;bottom:60px!important;width:auto!important;max-width:none!important}
  .geo-builder-loading{width:min(88vw,300px)!important}
}

@media (max-width:390px){
  .geo-builder-topbar{height:90px!important;min-height:90px!important;grid-template-rows:36px 38px!important}
  .geo-builder-workspace,.admin-bar .geo-builder-workspace{height:calc(100dvh - 90px)!important}
  .geo-builder-library-select{flex-basis:170px!important}
  .geo-builder-source-controls .geo-builder-top-button:not(#geo-builder-import-button){display:none!important}
  .geo-builder-sidebar{left:5px!important;right:5px!important}
}

/* ========================================================================== 
   20.0.22-test · FINAL responsive Studio authority
   Purpose-built tablet/phone workspace. Desktop >1024px is untouched.
   This block intentionally sits last so older experimental media queries
   cannot win the cascade.
   ========================================================================== */
@media (max-width:1024px){
  .histriphy-builder-page{overflow:hidden!important;background:var(--n2)!important}
  .histriphy-builder-page .site-footer{display:none!important}
  .geo-builder-app{height:calc(100dvh - 64px)!important;min-height:0!important;overflow:hidden!important}
  .admin-bar .geo-builder-app{height:calc(100dvh - 64px)!important}
  .geo-builder-form{height:100%!important;overflow:hidden!important}

  .geo-builder-topbar{
    height:96px!important;min-height:96px!important;padding:7px 12px!important;
    display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-rows:38px 42px!important;gap:5px 9px!important;align-items:center!important;
    background:color-mix(in srgb,var(--n2) 98%,transparent)!important;
  }
  .geo-builder-title-block{grid-column:1!important;grid-row:1!important;min-width:0!important;gap:9px!important}
  .geo-builder-product-mark{width:30px!important;height:30px!important;flex:0 0 30px!important}
  .geo-builder-title-block strong{font-size:.82rem!important}
  .geo-builder-title-block span{font-size:.58rem!important;margin-top:2px!important}
  .geo-builder-ai-button{grid-column:2!important;grid-row:1!important;height:34px!important;padding:0 9px!important;font-size:.68rem!important;margin-right:86px!important}
  .geo-builder-history-controls{position:absolute!important;right:12px!important;top:9px!important;display:flex!important;gap:5px!important;z-index:3!important}
  .geo-builder-history-controls .geo-builder-icon-button{width:34px!important;height:34px!important}
  .geo-builder-history-controls .geo-builder-clear-button{display:none!important}

  .geo-builder-source-controls{
    grid-column:1/-1!important;grid-row:2!important;display:flex!important;align-items:center!important;
    justify-content:flex-start!important;gap:6px!important;min-width:0!important;width:100%!important;
    overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none!important;overscroll-behavior-inline:contain!important;
  }
  .geo-builder-source-controls::-webkit-scrollbar{display:none!important}
  .geo-builder-library-select{flex:1 0 240px!important;max-width:none!important;height:38px!important;min-width:210px!important}
  .geo-builder-library-select>span{display:none!important}
  .geo-builder-library-select select{font-size:.74rem!important}
  .geo-builder-top-button{height:38px!important;min-height:38px!important;flex:0 0 auto!important;padding:0 10px!important;font-size:.68rem!important}
  .geo-builder-top-button svg{width:15px!important;height:15px!important}

  .geo-builder-workspace,.admin-bar .geo-builder-workspace{
    height:calc(100% - 96px)!important;min-height:0!important;display:grid!important;
    grid-template-columns:58px minmax(0,1fr)!important;position:relative!important;overflow:hidden!important;
  }
  .geo-builder-toolrail{
    position:relative!important;inset:auto!important;width:58px!important;height:auto!important;padding:6px 5px!important;
    display:flex!important;flex-direction:column!important;align-items:center!important;gap:4px!important;
    border-right:1px solid color-mix(in srgb,var(--n15) 16%,transparent)!important;border-top:0!important;
    overflow-y:auto!important;overflow-x:hidden!important;background:var(--n3)!important;scrollbar-width:none!important;
  }
  .geo-builder-toolrail::-webkit-scrollbar{display:none!important}
  .geo-builder-tool-group{display:flex!important;flex-direction:column!important;gap:3px!important}
  .geo-builder-tool-divider{display:block!important;width:34px!important;height:1px!important;margin:3px 0!important}
  .geo-builder-toolrail-spacer{display:block!important;flex:1!important}
  .geo-builder-tool{width:46px!important;min-height:46px!important;height:auto!important;padding:5px 2px!important;gap:3px!important;font-size:.56rem!important;border-radius:8px!important}
  .geo-builder-tool svg{width:18px!important;height:18px!important}
  .geo-builder-tool.is-active{box-shadow:inset 3px 0 0 var(--gold)!important}

  .geo-builder-canvas-wrap{position:relative!important;inset:auto!important;min-width:0!important;padding:0!important;overflow:hidden!important}
  .geo-builder-map{position:absolute!important;inset:0!important}
  .geo-builder-statusbar{bottom:0!important;height:29px!important;padding:0 9px!important;font-size:.57rem!important}
  .geo-builder-statusbar>div{gap:9px!important}
  .geo-builder-statusbar>div:last-child span:nth-child(n+3){display:none!important}
  .geo-builder-map-hint{top:10px!important;max-width:min(500px,calc(100% - 24px))!important;font-size:.67rem!important}

  .geo-builder-mobile-backdrop{
    display:block!important;position:absolute!important;inset:0!important;z-index:65!important;border:0!important;
    background:rgba(0,0,0,.4)!important;opacity:0!important;pointer-events:none!important;transition:opacity .2s ease!important;
  }
  .geo-builder-mobile-backdrop.is-active{opacity:1!important;pointer-events:auto!important}
  .geo-builder-sidebar{
    position:absolute!important;z-index:70!important;right:0!important;left:auto!important;top:0!important;bottom:0!important;
    width:min(370px,88vw)!important;height:auto!important;border-radius:0!important;border-left:1px solid var(--border)!important;
    transform:translateX(102%)!important;transition:transform .22s cubic-bezier(.2,.8,.2,1)!important;
    box-shadow:-18px 0 50px rgba(0,0,0,.38)!important;background:var(--n3)!important;
  }
  .geo-builder-sidebar.is-mobile-open{transform:none!important}
  .geo-builder-sidebar-close{display:grid!important;place-items:center!important;position:absolute!important;right:8px!important;top:8px!important;width:34px!important;height:34px!important;z-index:4!important}
  .geo-builder-tabs{height:48px!important;padding-right:48px!important}
  .geo-builder-tabs button{min-height:44px!important;font-size:.7rem!important}
  .geo-builder-tab-panel{padding:14px!important;padding-bottom:calc(18px + env(safe-area-inset-bottom))!important}
  .geo-builder-layer-actions button,.geo-builder-operation-button,.geo-builder-control-card button{min-height:40px!important}
  .geo-builder-toast-stack{right:12px!important;bottom:12px!important;max-width:calc(100vw - 24px)!important}
  .geo-builder-toast{min-width:0!important;width:min(340px,calc(100vw - 24px))!important}
}

@media (max-width:640px){
  .histriphy-builder-page .site-header{display:none!important}
  .histriphy-builder-page .site-shell{height:100dvh!important;overflow:hidden!important}
  .geo-builder-app,.admin-bar .geo-builder-app{height:100dvh!important;min-height:0!important}

  .geo-builder-topbar{
    height:90px!important;min-height:90px!important;padding:6px 8px!important;
    grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:36px 40px!important;gap:4px 7px!important;
  }
  .geo-builder-title-block{gap:7px!important}
  .geo-builder-product-mark{width:28px!important;height:28px!important;flex-basis:28px!important}
  .geo-builder-title-block strong{font-size:.76rem!important}
  .geo-builder-title-block span{display:none!important}
  .geo-builder-ai-button{display:none!important}
  .geo-builder-history-controls{right:8px!important;top:7px!important;gap:4px!important}
  .geo-builder-history-controls .geo-builder-icon-button{width:32px!important;height:32px!important}

  .geo-builder-source-controls{gap:5px!important;overflow-x:hidden!important}
  .geo-builder-library-select{flex:1 1 auto!important;min-width:0!important;height:36px!important;padding:0 8px!important}
  .geo-builder-library-select select{font-size:.71rem!important}
  .geo-builder-top-button{height:36px!important;min-height:36px!important;width:36px!important;padding:0!important;font-size:0!important;border-radius:7px!important}
  .geo-builder-top-button svg{width:15px!important;height:15px!important;margin:0!important}
  .geo-builder-add-country-button{display:none!important}

  .geo-builder-workspace,.admin-bar .geo-builder-workspace{
    height:calc(100% - 90px)!important;display:block!important;position:relative!important;overflow:hidden!important;
  }
  .geo-builder-canvas-wrap{position:absolute!important;inset:0 0 calc(58px + env(safe-area-inset-bottom)) 0!important}

  .geo-builder-toolrail{
    position:absolute!important;z-index:60!important;left:0!important;right:0!important;bottom:0!important;
    width:auto!important;height:calc(58px + env(safe-area-inset-bottom))!important;
    padding:5px 6px calc(5px + env(safe-area-inset-bottom))!important;
    display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:4px!important;
    border-right:0!important;border-top:1px solid color-mix(in srgb,var(--n15) 16%,transparent)!important;
    overflow-x:auto!important;overflow-y:hidden!important;background:color-mix(in srgb,var(--n3) 98%,transparent)!important;
    backdrop-filter:blur(12px)!important;-webkit-backdrop-filter:blur(12px)!important;scrollbar-width:none!important;
  }
  .geo-builder-tool-group{display:flex!important;flex-direction:row!important;gap:3px!important}
  .geo-builder-tool-divider{display:block!important;flex:0 0 1px!important;width:1px!important;height:34px!important;margin:3px 2px!important}
  .geo-builder-toolrail-spacer{display:none!important}
  .geo-builder-tool{flex:0 0 44px!important;width:44px!important;height:44px!important;min-height:44px!important;padding:3px!important;font-size:0!important;gap:0!important;border-radius:8px!important}
  .geo-builder-tool svg{width:18px!important;height:18px!important}
  .geo-builder-tool.is-active{box-shadow:inset 0 -3px 0 var(--gold)!important}
  .geo-builder-mobile-panel-button{display:grid!important;place-items:center!important}

  .geo-builder-statusbar{bottom:0!important;height:27px!important;padding:0 7px!important;font-size:.54rem!important}
  .geo-builder-statusbar>div{gap:6px!important}
  .geo-builder-statusbar>div:first-child span:first-child{display:none!important}
  .geo-builder-statusbar>div:last-child span:nth-child(n+2){display:none!important}
  .geo-builder-map .leaflet-control-attribution{bottom:29px!important;font-size:8px!important;max-width:68%!important}
  .geo-builder-map .leaflet-control-zoom{margin:9px 0 0 9px!important}
  .geo-builder-map .leaflet-control-zoom a{width:32px!important;height:32px!important;line-height:32px!important}
  .geo-builder-map-hint{top:8px!important;left:50%!important;right:auto!important;transform:translateX(-50%)!important;max-width:calc(100% - 20px)!important;padding:7px 30px 7px 9px!important;font-size:.63rem!important;line-height:1.35!important;white-space:normal!important}

  .geo-builder-sidebar{
    position:absolute!important;left:7px!important;right:7px!important;top:auto!important;bottom:calc(64px + env(safe-area-inset-bottom))!important;
    width:auto!important;height:min(66dvh,520px)!important;border:1px solid var(--border)!important;border-radius:15px!important;
    transform:translateY(calc(100% + 90px))!important;box-shadow:0 -22px 60px rgba(0,0,0,.42)!important;
  }
  .geo-builder-sidebar.is-mobile-open{transform:none!important}
  .geo-builder-tabs{height:46px!important;padding:0 44px 0 4px!important}
  .geo-builder-tabs button{font-size:.68rem!important}
  .geo-builder-sidebar-close{right:7px!important;top:6px!important;width:32px!important;height:32px!important}
  .geo-builder-tab-panel{padding:12px!important;padding-bottom:calc(16px + env(safe-area-inset-bottom))!important}
  .geo-builder-operation-grid{gap:7px!important}
  .geo-builder-operation-grid>button{min-height:76px!important;padding:10px!important}
  .geo-builder-field input{height:44px!important}

  .geo-builder-basemap-panel{left:8px!important;right:8px!important;bottom:calc(67px + env(safe-area-inset-bottom))!important;width:auto!important;max-width:none!important;border-radius:12px!important}
  .geo-builder-toast-stack{right:8px!important;bottom:calc(68px + env(safe-area-inset-bottom))!important}
  .geo-builder-toast{width:calc(100vw - 16px)!important;max-width:360px!important;font-size:.65rem!important}
  .geo-builder-draft-banner{left:8px!important;right:8px!important;bottom:calc(68px + env(safe-area-inset-bottom))!important;transform:none!important;width:auto!important;grid-template-columns:1fr 1fr!important;border-radius:12px!important}
  .geo-builder-draft-banner>div{grid-column:1/-1!important}
}

@media (max-width:390px){
  .geo-builder-topbar{height:86px!important;min-height:86px!important;grid-template-rows:34px 38px!important;padding:5px 6px!important}
  .geo-builder-workspace,.admin-bar .geo-builder-workspace{height:calc(100% - 86px)!important}
  .geo-builder-title-block strong{font-size:.72rem!important}
  .geo-builder-library-select select{font-size:.68rem!important}
  .geo-builder-top-button{width:34px!important;height:34px!important;min-height:34px!important}
  .geo-builder-tool{flex-basis:42px!important;width:42px!important;height:42px!important;min-height:42px!important}
  .geo-builder-sidebar{left:5px!important;right:5px!important;height:min(68dvh,500px)!important}
}

/* Admin-bar height accounting for the final responsive Studio workspace. */
@media (min-width:783px) and (max-width:1024px){
  .admin-bar .geo-builder-app{height:calc(100dvh - 96px)!important}
}
@media (min-width:641px) and (max-width:782px){
  .admin-bar .geo-builder-app{height:calc(100dvh - 110px)!important}
}
@media (max-width:640px){
  .admin-bar .geo-builder-app{height:calc(100dvh - 46px)!important}
}
@media (max-width:640px){
  .geo-builder-library-select select,.geo-builder-field input{font-size:16px!important}
}
@media (max-width:1024px){
  .histriphy-builder-page .site-header{position:sticky!important;top:0!important}
  .admin-bar.histriphy-builder-page .site-header{top:32px!important}
}
@media (max-width:782px){
  .admin-bar.histriphy-builder-page .site-header{top:46px!important}
}
@media (max-width:640px){
  .histriphy-builder-page .site-header{display:none!important}
}

/* ==========================================================================\n   20.0.37 — real mobile Studio workspace\n   The landing-page Studio preview is intentionally handled elsewhere. These\n   rules apply only to the actual /build-a-map/ application.\n   ========================================================================== */
.geo-builder-mobile-home,.geo-builder-mobile-extra-tools{display:none}

@media (max-width:699px){
  /* The real Studio becomes the mobile app shell; do not squeeze it under the
     regular site chrome. */
  .histriphy-builder-page .site-header,
  .histriphy-builder-page .site-footer{display:none!important}
  .histriphy-builder-page,
  .histriphy-builder-page .site-shell,
  .histriphy-builder-page .site-main{margin:0!important;padding:0!important;width:100%!important;max-width:none!important;overflow:hidden!important;background:var(--n2)}
  .geo-builder-app{height:100dvh;min-height:0;width:100%;overflow:hidden;background:var(--n2)}
  .geo-builder-form{height:100%;display:flex;flex-direction:column;overflow:hidden}

  /* Compact native-app header: back + title + history on row one, source
     controls on row two. */
  .geo-builder-topbar{position:relative;flex:0 0 94px;height:94px;min-height:94px;display:grid;grid-template-columns:36px minmax(0,1fr) auto;grid-template-rows:40px 40px;align-items:center;gap:5px 8px;padding:7px 10px;border-bottom:1px solid color-mix(in srgb,var(--n15) 18%,transparent);background:color-mix(in srgb,var(--n2) 98%,transparent);z-index:45}
  .geo-builder-mobile-home{display:grid;grid-column:1;grid-row:1;place-items:center;width:34px;height:34px;border:1px solid color-mix(in srgb,var(--n15) 22%,transparent);border-radius:9px;background:var(--n3);color:var(--ink)}
  .geo-builder-mobile-home svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
  .geo-builder-title-block{grid-column:2;grid-row:1;min-width:0;gap:8px}
  .geo-builder-product-mark{width:30px;height:30px;border-radius:7px}
  .geo-builder-product-mark svg{width:17px;height:17px}
  .geo-builder-title-block strong{font-size:.84rem}
  .geo-builder-title-block span{display:block!important;margin-top:2px;font-size:.58rem;color:var(--ink-faint)}
  .geo-builder-history-controls{grid-column:3;grid-row:1;display:flex;gap:5px;align-items:center}
  .geo-builder-history-controls .geo-builder-icon-button,
  .geo-builder-history-controls .geo-builder-clear-button{width:34px;height:34px;min-width:34px;padding:0;font-size:0;border-radius:8px}
  .geo-builder-history-controls .geo-builder-clear-button svg{width:15px;height:15px}
  .geo-builder-ai-button{display:none!important}

  .geo-builder-source-controls{grid-column:1/-1;grid-row:2;display:grid!important;grid-template-columns:minmax(0,1fr) 38px 38px 38px;gap:6px;width:100%;min-width:0}
  .geo-builder-library-select{grid-column:1;grid-row:1;width:100%;height:38px;max-width:none;min-width:0;padding:0 9px;border-radius:8px}
  .geo-builder-library-select>span{display:none}
  .geo-builder-library-select select{font-size:.72rem;text-overflow:ellipsis}
  .geo-builder-source-controls .geo-builder-top-button{width:38px!important;height:38px;min-width:38px!important;padding:0!important;font-size:0!important;border-radius:8px;overflow:hidden}
  .geo-builder-source-controls .geo-builder-top-button svg{width:16px;height:16px;margin:0}

  /* Map is the workspace. */
  .geo-builder-workspace,
  .admin-bar .geo-builder-workspace{position:relative;flex:1 1 auto;height:auto!important;min-height:0!important;display:block!important;overflow:hidden;background:var(--n2)}
  .geo-builder-canvas-wrap{position:absolute;inset:0;padding:0 0 64px!important;overflow:hidden;background:var(--n2)}
  .geo-builder-map{position:absolute;inset:0 0 64px 0}
  .geo-builder-statusbar{display:none!important}
  .geo-builder-map .leaflet-control-attribution{bottom:70px!important;left:8px;right:8px;max-width:calc(100% - 16px)!important;font-size:8px;opacity:.72}
  .geo-builder-map .leaflet-top.leaflet-left{top:7px;left:7px}
  .geo-builder-map .leaflet-control-zoom a{width:32px;height:32px;line-height:32px}
  .geo-builder-map-hint{left:48px!important;right:10px!important;top:8px!important;max-width:none!important;max-height:none!important;min-height:34px;padding:8px 32px 8px 10px!important;border-radius:8px;font-size:.62rem!important;line-height:1.35;overflow:visible!important;background:color-mix(in srgb,var(--n3) 94%,transparent);backdrop-filter:blur(8px)}
  .geo-builder-map-hint button{right:5px;top:50%;transform:translateY(-50%)}

  /* Five primary controls, centered and fully visible. Secondary tools live in
     the Operations sheet instead of creating a clipped horizontal rail. */
  .geo-builder-toolrail{position:absolute!important;z-index:36;left:0!important;right:0!important;bottom:0!important;height:64px!important;padding:7px 10px calc(7px + env(safe-area-inset-bottom))!important;border:0!important;border-top:1px solid color-mix(in srgb,var(--n15) 20%,transparent)!important;background:color-mix(in srgb,var(--n3) 98%,transparent)!important;display:flex!important;align-items:flex-start;justify-content:center;gap:4px!important;overflow:visible!important}
  .geo-builder-tool-group{display:contents!important}
  .geo-builder-tool-divider,.geo-builder-toolrail-spacer{display:none!important}
  .geo-builder-tool{flex:0 0 52px!important;width:52px!important;height:48px!important;min-height:48px!important;padding:5px 2px!important;border-radius:9px;gap:2px!important;color:var(--n18);font-size:.53rem!important}
  .geo-builder-tool svg{width:18px;height:18px}
  .geo-builder-tool span{display:block!important;line-height:1}
  .geo-builder-tool.is-active{box-shadow:inset 0 -2px 0 var(--gold)!important}
  .geo-builder-tool[data-builder-tool="draw-rectangle"],
  .geo-builder-tool[data-builder-tool="cut"],
  .geo-builder-tool[data-builder-tool="remove"],
  #geo-builder-fit,
  #geo-builder-basemap-button{display:none!important}
  .geo-builder-mobile-panel-button{display:flex!important}

  /* Panels are a controlled bottom sheet, not a full-page desktop sidebar. */
  .geo-builder-sidebar{position:fixed!important;z-index:120!important;top:auto!important;left:8px!important;right:8px!important;bottom:8px!important;width:auto!important;height:min(68dvh,590px)!important;max-height:calc(100dvh - 76px)!important;border:1px solid color-mix(in srgb,var(--n15) 24%,transparent)!important;border-radius:18px!important;background:var(--n3)!important;transform:translateY(calc(100% + 18px))!important;transition:transform .22s cubic-bezier(.2,.8,.2,1)!important;box-shadow:0 -18px 60px rgba(0,0,0,.62)!important;overflow:hidden!important}
  .geo-builder-sidebar.is-mobile-open{transform:translateY(0)!important}
  .geo-builder-sidebar:before{content:"";position:absolute;z-index:5;top:7px;left:50%;width:34px;height:4px;border-radius:99px;background:color-mix(in srgb,var(--n18) 55%,transparent);transform:translateX(-50%)}
  .geo-builder-sidebar-close{display:grid!important;right:10px!important;top:12px!important;width:32px!important;height:32px!important;border-radius:8px!important}
  .geo-builder-tabs{height:54px;padding:8px 48px 0 10px;gap:0}
  .geo-builder-tabs button{font-size:.69rem}
  .geo-builder-tabs button.is-active:after{left:10px;right:10px}
  .geo-builder-tab-panel{padding:12px 12px calc(18px + env(safe-area-inset-bottom))!important}
  .geo-builder-layer-list{min-height:110px;max-height:25dvh}
  .geo-builder-empty-state{min-height:110px;padding:14px}
  .geo-builder-inspector{margin-top:12px;padding-top:12px}
  .geo-builder-operation-card{padding:12px!important}
  .geo-builder-operation-card p{font-size:.66rem!important;line-height:1.45}
  .geo-builder-operation-card small{font-size:.58rem!important}
  .geo-builder-operation-grid{gap:7px!important}
  .geo-builder-operation-grid>button{min-height:72px!important;padding:9px!important}
  .geo-builder-control-card{padding:11px!important}

  /* Secondary map tools remain available without bloating the bottom dock. */
  .geo-builder-mobile-extra-tools{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:0 0 10px}
  .geo-builder-mobile-extra-tools button{min-width:0;height:52px;padding:5px;border:1px solid color-mix(in srgb,var(--n15) 18%,transparent);border-radius:9px;background:var(--n4);color:var(--n18);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px}
  .geo-builder-mobile-extra-tools button span{font-size:1rem;line-height:1;color:var(--gold-4)}
  .geo-builder-mobile-extra-tools button strong{font-size:.58rem;line-height:1}

  .geo-builder-basemap-panel{position:fixed!important;z-index:135!important;left:10px!important;right:10px!important;bottom:10px!important;width:auto!important;max-height:58dvh!important;border-radius:16px!important;padding:14px!important;box-shadow:0 -18px 60px rgba(0,0,0,.62)!important}
  .geo-builder-toast-stack{left:10px!important;right:10px!important;bottom:72px!important}
  .geo-builder-toast{width:100%!important;min-width:0!important;max-width:none!important}
  .geo-builder-draft-banner{left:10px!important;right:10px!important;bottom:72px!important;width:auto!important}
  .geo-builder-loading{padding:18px;text-align:center}
  .geo-builder-server-message{top:10px;max-width:calc(100% - 20px)}
}

@media (max-width:360px){
  .geo-builder-topbar{grid-template-columns:34px minmax(0,1fr) auto;padding-left:7px;padding-right:7px;gap:5px}
  .geo-builder-history-controls .geo-builder-icon-button{display:none}
  .geo-builder-history-controls .geo-builder-clear-button{display:inline-flex}
  .geo-builder-source-controls{grid-template-columns:minmax(0,1fr) 36px 36px 36px;gap:4px}
  .geo-builder-source-controls .geo-builder-top-button{width:36px!important;min-width:36px!important}
  .geo-builder-toolrail{padding-left:4px!important;padding-right:4px!important;gap:2px!important}
  .geo-builder-tool{flex-basis:48px!important;width:48px!important}
}
@media (max-width:699px){
  .admin-bar .geo-builder-app{height:calc(100dvh - 46px)}
}

/* ==========================================================================
   20.0.38 — phone Studio product decision
   Phones show a deliberate Studio handoff instead of a compressed editor.
   The full editor remains unchanged from 700px upward.
   ========================================================================== */
.geo-builder-phone-fallback{display:none}

@media (max-width:699px){
  .histriphy-builder-page .site-header,
  .histriphy-builder-page .site-footer{display:none!important}
  .histriphy-builder-page,
  .histriphy-builder-page .site-shell,
  .histriphy-builder-page .site-main{margin:0!important;padding:0!important;width:100%!important;max-width:none!important;background:var(--n2)!important;overflow-x:hidden!important}

  .geo-builder-app{height:auto!important;min-height:100dvh!important;overflow:visible!important;background:var(--n2)!important}
  .geo-builder-login,
  .geo-builder-form{display:none!important}
  .geo-builder-phone-fallback{display:block!important;min-height:100dvh;background:var(--n2);color:var(--ink);padding:0 16px calc(28px + env(safe-area-inset-bottom))}
  .geo-builder-phone-shell{width:min(100%,430px);margin:0 auto}

  .geo-builder-phone-bar{height:58px;display:grid;grid-template-columns:38px 1fr 38px;align-items:center;border-bottom:1px solid color-mix(in srgb,var(--n15) 16%,transparent)}
  .geo-builder-phone-back{grid-column:1;display:grid;place-items:center;width:34px;height:34px;border:1px solid color-mix(in srgb,var(--n15) 24%,transparent);border-radius:9px;background:var(--n3);color:var(--ink);text-decoration:none}
  .geo-builder-phone-back svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
  .geo-builder-phone-brand{grid-column:2;display:flex;justify-content:center;align-items:center;gap:8px;min-width:0}
  .geo-builder-phone-brand img{width:25px;height:25px;object-fit:contain}
  .geo-builder-phone-brand strong{font-size:.82rem;line-height:1;white-space:nowrap}

  .geo-builder-phone-copy{padding:34px 2px 20px;text-align:left}
  .geo-builder-phone-kicker{display:inline-flex;align-items:center;min-height:27px;padding:0 9px;border:1px solid color-mix(in srgb,var(--gold) 32%,transparent);border-radius:999px;background:color-mix(in srgb,var(--gold) 8%,transparent);color:var(--gold-4);font-size:.62rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase}
  .geo-builder-phone-copy h1{margin:15px 0 10px;max-width:360px;color:var(--ink);font-size:clamp(1.85rem,9vw,2.55rem);line-height:1.02;letter-spacing:-.045em}
  .geo-builder-phone-copy p{margin:0;max-width:385px;color:var(--ink-soft);font-size:.88rem;line-height:1.62}

  .geo-builder-phone-preview{position:relative;margin:5px 0 22px;border:1px solid color-mix(in srgb,var(--n15) 20%,transparent);border-radius:14px;background:var(--n3);overflow:hidden}
  .geo-builder-phone-preview:before{content:"";display:block;padding-top:76.8%}
  .geo-builder-phone-preview img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;display:block}

  .geo-builder-phone-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}
  .geo-builder-phone-actions .button{min-height:46px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;margin:0!important;padding:0 14px!important;border-radius:9px!important;font-size:.78rem!important;font-weight:800!important;text-decoration:none!important;white-space:nowrap}
  .geo-builder-phone-note{display:flex;align-items:flex-start;gap:7px;margin:17px 2px 0;color:var(--ink-faint);font-size:.68rem;line-height:1.45}
  .geo-builder-phone-note span{color:var(--gold-4);font-size:.8rem;line-height:1.2}
}

@media (max-width:360px){
  .geo-builder-phone-fallback{padding-left:12px;padding-right:12px}
  .geo-builder-phone-copy{padding-top:28px}
  .geo-builder-phone-copy h1{font-size:1.95rem}
  .geo-builder-phone-actions{grid-template-columns:1fr}
}

/* ========================================================================== 
   20.0.41 — final phone fallback authority
   Builder.css is loaded after wp_head, so the phone handoff must end here.
   ========================================================================== */
@media (max-width:699px){
  .histriphy-builder-page{height:auto!important;min-height:100%!important;overflow-y:auto!important;overflow-x:hidden!important;background:var(--n2)!important}
  .histriphy-builder-page .site-shell{height:auto!important;min-height:100%!important;overflow:visible!important}
  .histriphy-builder-page .site-header,.histriphy-builder-page .site-footer{display:none!important}
  .geo-builder-app,.admin-bar .geo-builder-app{height:auto!important;min-height:100dvh!important;overflow:visible!important;background:var(--n2)!important}
  .geo-builder-form,.geo-builder-login{display:none!important}
  .geo-builder-phone-fallback{display:block!important;min-height:0!important;padding:0 16px calc(30px + env(safe-area-inset-bottom))!important;background:var(--n2)!important;color:var(--ink)!important}
  .geo-builder-phone-shell{width:100%!important;max-width:390px!important;margin:0 auto!important}
  .geo-builder-phone-bar{height:56px!important;display:grid!important;grid-template-columns:36px 1fr 36px!important;align-items:center!important;border-bottom:1px solid var(--border-soft)!important}
  .geo-builder-phone-back{display:grid!important;place-items:center!important;width:34px!important;height:34px!important;border-radius:8px!important}
  .geo-builder-phone-brand{display:flex!important;justify-content:center!important;align-items:center!important;gap:7px!important}.geo-builder-phone-brand img{width:24px!important;height:24px!important}.geo-builder-phone-brand strong{font-size:13px!important}
  .geo-builder-phone-copy{padding:26px 0 16px!important;text-align:left!important}
  .geo-builder-phone-kicker{display:inline-block!important;height:auto!important;min-height:0!important;padding:0!important;border:0!important;background:transparent!important;color:var(--gold)!important;font:700 12px/1.2 var(--font-body)!important;letter-spacing:0!important;text-transform:none!important}
  .geo-builder-phone-copy h1{max-width:13ch!important;margin:8px 0 9px!important;font-size:30px!important;line-height:1.03!important;letter-spacing:-.045em!important}
  .geo-builder-phone-copy p{max-width:38ch!important;margin:0!important;font-size:14px!important;line-height:1.55!important}
  .geo-builder-phone-preview{position:relative!important;width:100%!important;max-width:330px!important;margin:4px auto 16px!important;border-radius:10px!important;overflow:hidden!important;box-shadow:none!important}
  .geo-builder-phone-preview:before{content:""!important;display:block!important;padding-top:72%!important}
  .geo-builder-phone-preview img{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:contain!important}
  .geo-builder-phone-actions{display:flex!important;flex-wrap:wrap!important;gap:8px!important}
  .geo-builder-phone-actions .button{width:auto!important;height:40px!important;min-height:40px!important;padding:0 12px!important;border-radius:8px!important;font-size:12px!important;font-weight:700!important}
  .geo-builder-phone-note{display:block!important;margin:13px 0 0!important;font-size:12px!important;line-height:1.45!important;color:var(--ink-faint)!important}
}
@media (max-width:360px){
  .geo-builder-phone-fallback{padding-left:12px!important;padding-right:12px!important}
}

/* ========================================================================== 
   20.1.0 · Histriphy Precision Pen
   Temporary SVG geometry and a compact, drawing-only control surface.
   ========================================================================== */
.geo-builder-app.is-precision-pen-drawing .geo-builder-map-hint{display:none!important}
.geo-builder-precision-pen-hud[hidden]{display:none!important}
.geo-builder-precision-pen-hud{
  position:absolute;
  z-index:35;
  top:12px;
  left:50%;
  transform:translateX(-50%);
  width:max-content;
  max-width:calc(100% - 96px);
  min-height:42px;
  display:flex;
  align-items:center;
  gap:7px;
  padding:5px 6px;
  border:1px solid color-mix(in srgb,var(--gold) 34%,var(--border));
  border-radius:9px;
  background:color-mix(in srgb,var(--bg-raised) 96%,transparent);
  box-shadow:0 12px 32px rgba(0,0,0,.28);
  color:var(--ink);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  user-select:none;
}
.geo-builder-precision-pen-status{
  min-width:96px;
  height:30px;
  display:flex;
  align-items:center;
  gap:6px;
  padding:0 8px 0 4px;
  border-right:1px solid var(--border-soft);
  white-space:nowrap;
}
.geo-builder-precision-pen-icon{width:25px;height:25px;display:grid;place-items:center;border:1px solid color-mix(in srgb,var(--gold) 30%,var(--border));border-radius:6px;background:color-mix(in srgb,var(--gold) 8%,var(--bg-card));color:var(--gold)}
.geo-builder-precision-pen-icon svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.geo-builder-precision-pen-status strong{font-size:.69rem;line-height:1;font-weight:750}
.geo-builder-precision-pen-status>span:last-child{color:var(--ink-faint);font-family:var(--font-mono);font-size:.57rem;line-height:1}
.geo-builder-precision-pen-actions{display:flex;align-items:center;gap:4px}
.geo-builder-precision-pen-actions button{
  height:30px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  padding:0 9px;
  border:1px solid var(--border);
  border-radius:6px;
  background:var(--bg-card);
  color:var(--ink-dim);
  font:650 .62rem/1 var(--font-body);
  white-space:nowrap;
}
.geo-builder-precision-pen-actions button:hover:not(:disabled){border-color:var(--border-strong);background:var(--bg-elevated);color:var(--ink)}
.geo-builder-precision-pen-actions button:disabled{opacity:.36;cursor:not-allowed}
.geo-builder-precision-pen-actions button.is-primary{border-color:var(--gold);background:var(--gold);color:var(--on-gold);font-weight:750}
.geo-builder-precision-pen-actions button.is-primary:hover:not(:disabled){border-color:var(--gold-soft);background:var(--gold-soft);color:var(--on-gold)}
.geo-builder-precision-pen-actions kbd{padding:2px 4px;border:1px solid color-mix(in srgb,currentColor 22%,transparent);border-radius:4px;background:color-mix(in srgb,currentColor 6%,transparent);font:600 .49rem/1 var(--font-mono);color:inherit;box-shadow:none}
.geo-builder-precision-pen-hint{padding:0 5px 0 2px;color:var(--ink-faint);font:500 .53rem/1.2 var(--font-mono);white-space:nowrap}
:root[data-theme="light"] .geo-builder-precision-pen-hud{background:rgba(255,255,255,.97);box-shadow:0 12px 30px rgba(33,28,18,.16)}

.geo-builder-map.is-precision-pen-active{cursor:crosshair!important}
.geo-builder-map.is-precision-pen-active .leaflet-interactive{cursor:crosshair!important}
.geo-builder-map.is-precision-pen-close,.geo-builder-map.is-precision-pen-close .leaflet-interactive{cursor:pointer!important}
.geo-builder-map.is-precision-pen-space{cursor:grab!important}
.geo-builder-map.is-precision-pen-panning{cursor:grabbing!important}
.geo-builder-map .geo-builder-precision-pen-line,
.geo-builder-map .geo-builder-precision-pen-preview,
.geo-builder-map .geo-builder-precision-pen-vertex{pointer-events:none!important;vector-effect:non-scaling-stroke}
.geo-builder-map .geo-builder-precision-pen-line{stroke:var(--gold-soft)!important;stroke-width:2.25px!important;stroke-linecap:round;stroke-linejoin:round}
.geo-builder-map .geo-builder-precision-pen-preview{stroke:var(--gold-soft)!important;stroke-width:1.75px!important;stroke-dasharray:5 6!important;stroke-linecap:round}
.geo-builder-map .geo-builder-precision-pen-vertex{stroke:#fff1c4!important;fill:var(--gold)!important;stroke-width:2px!important;transition:r .08s ease,stroke-width .08s ease,fill .08s ease}
.geo-builder-map .geo-builder-precision-pen-vertex.is-first.is-close-ready{stroke:var(--ink)!important}
.geo-builder-map .geo-builder-precision-pen-vertex.is-first.is-close-armed{stroke:#fff8df!important;fill:var(--gold-soft)!important;stroke-width:3px!important}
:root[data-theme="light"] .geo-builder-map .geo-builder-precision-pen-line,
:root[data-theme="light"] .geo-builder-map .geo-builder-precision-pen-preview{stroke:#9a6818!important}
:root[data-theme="light"] .geo-builder-map .geo-builder-precision-pen-vertex{stroke:#fff!important;fill:#b77716!important}
:root[data-theme="light"] .geo-builder-map .geo-builder-precision-pen-vertex.is-first.is-close-ready{stroke:#2b2418!important}
:root[data-theme="light"] .geo-builder-map .geo-builder-precision-pen-vertex.is-first.is-close-armed{stroke:#fff!important;fill:#d99520!important}

@media (min-width:700px) and (max-width:1100px){
  .geo-builder-precision-pen-hud{top:10px;max-width:calc(100% - 22px);gap:4px;padding:5px}
  .geo-builder-precision-pen-hint{display:none}
  .geo-builder-precision-pen-status{min-width:88px;padding-right:6px}
  .geo-builder-precision-pen-actions button{padding-inline:8px}
}
@media (min-width:700px) and (max-width:780px){
  .geo-builder-precision-pen-hud{left:10px;right:10px;transform:none;width:auto;justify-content:center}
  .geo-builder-precision-pen-actions kbd{display:none}
}
@media (max-width:699px){
  .geo-builder-precision-pen-hud{display:none!important}
}


/* ========================================================================== 
   20.1.3 · Histriphy Edit Reliability
   Editing is map-native: every real vertex of the selected geometry is shown
   immediately. Middle/helper markers remain hidden to keep dense borders clean.
   ========================================================================== */
.geo-builder-app.is-precision-editing .geo-builder-map .marker-icon-middle,
.geo-builder-app.is-precision-editing .geo-builder-map .leaflet-marker-icon.marker-icon-middle,
.geo-builder-app.is-precision-editing .geo-builder-map [class*="marker-icon-middle"]{display:none!important}
.geo-builder-app.is-precision-editing .geo-builder-map .leaflet-marker-icon.marker-icon:not(.marker-icon-middle){
  width:8px!important;
  height:8px!important;
  margin-left:-4px!important;
  margin-top:-4px!important;
  border:2px solid var(--gold)!important;
  border-radius:50%!important;
  background:#fff!important;
  box-shadow:0 1px 3px rgba(0,0,0,.42)!important;
  opacity:.92!important;
  cursor:grab!important;
  transition:width .08s ease,height .08s ease,margin .08s ease,opacity .08s ease,box-shadow .08s ease!important;
}
.geo-builder-app.is-precision-editing .geo-builder-map .leaflet-marker-icon.marker-icon:not(.marker-icon-middle):hover,
.geo-builder-app.is-precision-editing .geo-builder-map .leaflet-marker-icon.marker-icon:not(.marker-icon-middle):focus{
  width:12px!important;
  height:12px!important;
  margin-left:-6px!important;
  margin-top:-6px!important;
  opacity:1!important;
  border-color:#fff8df!important;
  background:var(--gold)!important;
  box-shadow:0 2px 7px rgba(0,0,0,.46)!important;
  z-index:10000!important;
}
.geo-builder-app.is-precision-editing .geo-builder-map .leaflet-marker-icon.marker-icon:not(.marker-icon-middle):active{cursor:grabbing!important}
.geo-builder-app.is-precision-editing .geo-builder-map .geo-builder-layer-selected{filter:none!important}
.geo-builder-app.is-precision-editing .geo-builder-map .leaflet-interactive{cursor:default}
:root[data-theme="light"] .geo-builder-app.is-precision-editing .geo-builder-map .leaflet-marker-icon.marker-icon:not(.marker-icon-middle){
  border-color:#b77716!important;
  background:#fff!important;
  box-shadow:0 1px 3px rgba(43,36,24,.3)!important;
}

/* Tablet safe zone remains dedicated to Precision Pen; Edit adds no overlay bar. */
@media (min-width:700px) and (max-width:1100px){
  .geo-builder-precision-pen-hud{top:10px;max-width:calc(100% - 22px);gap:4px;padding:5px}
  .geo-builder-precision-pen-hint{display:none}
}
@media (min-width:700px) and (max-width:780px){
  .geo-builder-precision-pen-hud{left:54px;right:8px;transform:none;width:auto;max-width:none;justify-content:center}
  .geo-builder-precision-pen-status{min-width:74px;padding-right:5px}
  .geo-builder-precision-pen-actions kbd{display:none}
  #geo-builder-precision-pen-undo,#geo-builder-precision-pen-redo{width:32px;padding:0;font-size:0}
  #geo-builder-precision-pen-undo::before{content:'↶';font-size:15px;line-height:1}
  #geo-builder-precision-pen-redo::before{content:'↷';font-size:15px;line-height:1}
  #geo-builder-precision-pen-cancel{width:34px;padding:0;font-size:0}
  #geo-builder-precision-pen-cancel::before{content:'×';font-size:17px;line-height:1}
  #geo-builder-precision-pen-finish{padding-inline:8px}
}
.geo-builder-app.is-precision-editing.is-precision-edit-free-move .geo-builder-map .leaflet-marker-icon.marker-icon:not(.marker-icon-middle){
  border-style:dashed!important;
}

/* 20.1.3 Edit reliability: the selected editable path stays visually identical
   to Studio geometry. Geoman's temporary helpers are lifecycle-cleaned in JS;
   this also prevents its transient validation styling from leaving red borders. */
.geo-builder-app.is-precision-editing .geo-builder-map path.geo-builder-layer-selected{
  stroke:#ffd376!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
:root[data-theme="light"] .geo-builder-app.is-precision-editing .geo-builder-map path.geo-builder-layer-selected{
  stroke:#b77716!important;
}

/* ==========================================================================
   20.2.0 · Reshape Border
   A compact control surface plus temporary SVG geometry. Shares the Precision
   Pen visual language so the vertical toolbar and map stay coherent.
   ========================================================================== */
.geo-builder-app.is-reshape-session .geo-builder-map-hint{display:none!important}
.geo-builder-reshape-hud[hidden]{display:none!important}
.geo-builder-reshape-hud{
  position:absolute;
  z-index:35;
  top:12px;
  left:50%;
  transform:translateX(-50%);
  width:max-content;
  max-width:calc(100% - 96px);
  min-height:42px;
  display:flex;
  align-items:center;
  gap:7px;
  padding:5px 6px;
  border:1px solid color-mix(in srgb,var(--gold) 34%,var(--border));
  border-radius:9px;
  background:color-mix(in srgb,var(--bg-raised) 96%,transparent);
  box-shadow:0 12px 32px rgba(0,0,0,.28);
  color:var(--ink);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  user-select:none;
}
.geo-builder-reshape-status{
  min-width:96px;
  height:30px;
  display:flex;
  align-items:center;
  gap:6px;
  padding:0 8px 0 4px;
  border-right:1px solid var(--border-soft);
  white-space:nowrap;
}
.geo-builder-reshape-icon{width:25px;height:25px;display:grid;place-items:center;border:1px solid color-mix(in srgb,var(--gold) 30%,var(--border));border-radius:6px;background:color-mix(in srgb,var(--gold) 8%,var(--bg-card));color:var(--gold)}
.geo-builder-reshape-icon svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.geo-builder-reshape-status strong{font-size:.66rem;line-height:1;font-weight:750}
.geo-builder-reshape-status>span:last-child{color:var(--ink-faint);font-family:var(--font-mono);font-size:.57rem;line-height:1}
.geo-builder-reshape-actions{display:flex;align-items:center;gap:4px}
.geo-builder-reshape-actions button[hidden]{display:none!important}
.geo-builder-reshape-actions button{
  height:30px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  padding:0 9px;
  border:1px solid var(--border);
  border-radius:6px;
  background:var(--bg-card);
  color:var(--ink-dim);
  font:650 .62rem/1 var(--font-body);
  white-space:nowrap;
}
.geo-builder-reshape-actions button:hover:not(:disabled){border-color:var(--border-strong);background:var(--bg-elevated);color:var(--ink)}
.geo-builder-reshape-actions button:disabled{opacity:.36;cursor:not-allowed}
.geo-builder-reshape-actions button.is-primary{border-color:var(--gold);background:var(--gold);color:var(--on-gold);font-weight:750}
.geo-builder-reshape-actions button.is-primary:hover:not(:disabled){border-color:var(--gold-soft);background:var(--gold-soft);color:var(--on-gold)}
.geo-builder-reshape-actions kbd{padding:2px 4px;border:1px solid color-mix(in srgb,currentColor 22%,transparent);border-radius:4px;background:color-mix(in srgb,currentColor 6%,transparent);font:600 .49rem/1 var(--font-mono);color:inherit;box-shadow:none}
:root[data-theme="light"] .geo-builder-reshape-hud{background:rgba(255,255,255,.97);box-shadow:0 12px 30px rgba(33,28,18,.16)}

/* Cursor states mirror Precision Pen so the two drawing tools feel identical. */
.geo-builder-map.is-reshape-active,
.geo-builder-map.is-reshape-active .leaflet-interactive{cursor:crosshair!important}
.geo-builder-map.is-reshape-armed,
.geo-builder-map.is-reshape-armed .leaflet-interactive{cursor:pointer!important}
.geo-builder-map.is-reshape-free,
.geo-builder-map.is-reshape-free .leaflet-interactive{cursor:cell!important}
.geo-builder-map.is-reshape-space{cursor:grab!important}
.geo-builder-map.is-reshape-panning{cursor:grabbing!important}

.geo-builder-map .geo-builder-reshape-path,
.geo-builder-map .geo-builder-reshape-rubber,
.geo-builder-map .geo-builder-reshape-vertex,
.geo-builder-map .geo-builder-reshape-anchor,
.geo-builder-map .geo-builder-reshape-snap,
.geo-builder-map .geo-builder-reshape-result,
.geo-builder-map .geo-builder-reshape-replaced{pointer-events:none!important;vector-effect:non-scaling-stroke}

.geo-builder-map .geo-builder-reshape-path{stroke:var(--gold-soft)!important;fill:none!important;stroke-width:2.25px!important;stroke-linecap:round;stroke-linejoin:round}
.geo-builder-map .geo-builder-reshape-rubber{stroke:var(--gold-soft)!important;fill:none!important;stroke-width:1.75px!important;stroke-dasharray:5 6!important;stroke-linecap:round;opacity:.85}
.geo-builder-map .geo-builder-reshape-vertex{stroke:#fff4cf!important;fill:var(--gold)!important;stroke-width:2px!important}
.geo-builder-map .geo-builder-reshape-anchor{stroke:#fff8df!important;fill:var(--gold-soft)!important;stroke-width:2.5px!important}
/* Snap indicator: a hollow ring for an interpolated boundary point, a brighter
   solid dot when an actual existing vertex takes priority. */
.geo-builder-map .geo-builder-reshape-snap{stroke:#fff8df!important;fill:none!important;stroke-width:2px!important;opacity:.95}
.geo-builder-map .geo-builder-reshape-snap.is-vertex{fill:#fff8df!important;stroke:var(--gold)!important;stroke-width:2.5px!important}
.geo-builder-map .geo-builder-reshape-result{stroke:var(--gold-soft)!important;fill:var(--gold)!important;fill-opacity:.3!important;stroke-width:2.5px!important;stroke-linejoin:round}
.geo-builder-map .geo-builder-reshape-replaced{stroke:#d9534f!important;fill:none!important;stroke-width:2.75px!important;stroke-dasharray:3 5!important;stroke-linecap:round;opacity:.9}

:root[data-theme="light"] .geo-builder-map .geo-builder-reshape-path,
:root[data-theme="light"] .geo-builder-map .geo-builder-reshape-rubber{stroke:#9a6818!important}
:root[data-theme="light"] .geo-builder-map .geo-builder-reshape-vertex{stroke:#fff!important;fill:#b77716!important}
:root[data-theme="light"] .geo-builder-map .geo-builder-reshape-anchor{stroke:#fff!important;fill:#d99520!important}
:root[data-theme="light"] .geo-builder-map .geo-builder-reshape-snap{stroke:#2b2418!important}
:root[data-theme="light"] .geo-builder-map .geo-builder-reshape-snap.is-vertex{fill:#2b2418!important;stroke:#d99520!important}
:root[data-theme="light"] .geo-builder-map .geo-builder-reshape-result{stroke:#9a6818!important;fill:#d99520!important}
:root[data-theme="light"] .geo-builder-map .geo-builder-reshape-replaced{stroke:#b3372f!important}

/* Tablet: the top-centre safe zone is shared with Precision Pen. Only one of
   the two HUDs can ever be visible, so they reuse the same footprint and never
   collide with the toolrail, zoom controls, header or inspector. */
@media (min-width:700px) and (max-width:1100px){
  .geo-builder-reshape-hud{top:10px;max-width:calc(100% - 22px);gap:4px;padding:5px}
  .geo-builder-reshape-status{min-width:88px;padding-right:6px}
  .geo-builder-reshape-actions button{padding-inline:8px}
}
@media (min-width:700px) and (max-width:780px){
  .geo-builder-reshape-hud{left:54px;right:8px;transform:none;width:auto;max-width:none;justify-content:center}
  .geo-builder-reshape-status{min-width:0;padding-right:5px}
  .geo-builder-reshape-status strong{font-size:.58rem;max-width:104px;overflow:hidden;text-overflow:ellipsis}
  .geo-builder-reshape-actions kbd{display:none}
  #geo-builder-reshape-undo,#geo-builder-reshape-redo{width:32px;padding:0;font-size:0}
  #geo-builder-reshape-undo::before{content:"\21B6";font-size:15px;line-height:1}
  #geo-builder-reshape-redo::before{content:"\21B7";font-size:15px;line-height:1}
  #geo-builder-reshape-cancel{width:34px;padding:0;font-size:0}
  #geo-builder-reshape-cancel::before{content:"\00D7";font-size:17px;line-height:1}
  #geo-builder-reshape-apply{padding-inline:8px}
}
@media (max-width:699px){
  .geo-builder-reshape-hud{display:none!important}
}

/* Toolbar disabled state. Reshape is the first tool that gates on selection,
   so the rail needs the same disabled language the rest of Studio already uses
   (see .geo-builder-icon-button:disabled). The hover reset carries !important
   because builder-v46.css re-declares .geo-builder-tool:hover with !important. */
.geo-builder-tool:disabled{opacity:.35;cursor:not-allowed}
.geo-builder-tool:disabled:hover{
  color:var(--ink-faint)!important;
  background:transparent!important;
  border-color:transparent!important;
}
