/* =====================================================================================================================
   mapbow  -  THE STUDIO AND THE MAP VIEWER ("Spectrum Velocity", app edition)

   Loaded after mapbow.css (the design system: tokens, buttons, inputs, toasts) on /studio, /m/<map> and /embed/<map>.
   A full-viewport map with sharp, glass panels floating over it: square corners, hairlines, the chamfer on buttons,
   hexagon icon tiles, and the spectrum as a line of light on the edge of whatever is active.

       .st-top      top bar            .st-rail   icon rail (bottom tab bar on phones)
       .st-panel    slide-out panel    .st-insp   inspector (bottom sheet on phones)
       .st-stage    the map stage, with the device preview frame (.st-device)
       .st-toolcard the active tool's helper card        .st-legend   the legend
       .mb-popup    map popups and their templates      .vw-*        the shared-map viewer

   GLASS. Only what floats over the map is glass (panels, inspector, tool card, search, legend, popups); the top bar, the
   rail and the status bar sit beside the map and are solid, so nothing is blurred that doesn't need to be. The blur is
   a GPU cost on every map frame, so it is kept moderate and people choose: html.glass-clear (more see-through, less
   blur), the default, html.glass-frost (more frosted), or html.no-glass (solid, no blur at all - also the default on
   2-core devices and for prefers-reduced-transparency; default.aspx sets these before first paint).

   Coded By Darko G.
   ===================================================================================================================== */

body.app { margin: 0; height: 100vh; height: 100dvh; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
.app * { box-sizing: border-box; }
.st { --top: 56px; --rail: 72px; --status: 30px; --st-accent: #3BA7FF; --ease: cubic-bezier(.2, .8, .2, 1);
      --glass: rgba(12, 16, 23, .6); --glass-2: rgba(13, 17, 24, .88); --glass-blur: 16px; --glass-sat: 1.5; --glass-line: rgba(255, 255, 255, .1); --glass-hi: rgba(255, 255, 255, .045);
      --bar: #080B10; --tip-bg: #0A0D12; --tip-fg: #F3F5F8; --pop-shadow: 0 24px 60px -24px rgba(0, 0, 0, .85); 
      /* secondary and caption text sit on dark glass over a busy map: a step lighter than the site's */
      --text-2: #DDE2EA; --muted: #B4BDCA; --dim: #8F99A8; position: fixed; inset: 0; }
[data-theme="light"] .st { --st-accent: #2563EB; --glass: rgba(255, 255, 255, .68); --glass-2: rgba(255, 255, 255, .92); --glass-line: rgba(10, 13, 18, .11); --glass-hi: rgba(10, 13, 18, .035);
      --bar: #FFFFFF; --tip-bg: #0A0D12; --tip-fg: #FFFFFF; --pop-shadow: 0 24px 60px -24px rgba(10, 13, 18, .45); --text-2: #2A3039; --muted: #555D69; --dim: #848C97; }
html.glass-clear .st { --glass: rgba(12, 16, 23, .38); --glass-2: rgba(13, 17, 24, .74); --glass-blur: 12px; --glass-sat: 1.7; }
html.glass-clear[data-theme="light"] .st { --glass: rgba(255, 255, 255, .46); --glass-2: rgba(255, 255, 255, .8); }
html.glass-frost .st { --glass: rgba(12, 16, 23, .8); --glass-2: rgba(13, 17, 24, .94); --glass-blur: 22px; }
html.glass-frost[data-theme="light"] .st { --glass: rgba(255, 255, 255, .8); --glass-2: rgba(255, 255, 255, .96); }
html.no-glass .st { --glass: var(--surface-solid); --glass-2: var(--surface-solid); }

.st-panel, .st-insp, .st-search, .st-toolcard, .st-legend, .vw-card, .vw-badge, .st-modal, .mb-popup .maplibregl-popup-content, .st-search-out, .maplibregl-ctrl-group {
    background: var(--glass); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat)); backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat)); border: 1px solid var(--glass-line); }
.st-modal, .st-search-out, .mb-popup .maplibregl-popup-content { background: var(--glass-2); }
html.no-glass .st-panel, html.no-glass .st-insp, html.no-glass .st-search, html.no-glass .st-toolcard, html.no-glass .st-legend, html.no-glass .vw-card, html.no-glass .vw-badge, html.no-glass .st-modal,
html.no-glass .mb-popup .maplibregl-popup-content, html.no-glass .st-search-out, html.no-glass .maplibregl-ctrl-group { -webkit-backdrop-filter: none; backdrop-filter: none; }
.st-top, .st-rail, .st-status { background: var(--bar); border: 0 solid var(--glass-line); }
.st-rot90 { transform: rotate(90deg); }
.st [hidden] { display: none !important; }
.st ::selection { background: #3BA7FF; color: #fff; }
.st * { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--muted) 45%, transparent) transparent; }
.st ::-webkit-scrollbar { width: 6px; height: 6px; }
.st ::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted) 45%, transparent); }
.st ::-webkit-scrollbar-thumb:hover { background: var(--st-accent); }

/* ---- top bar ------------------------------------------------------------------------------------------------- */
.st-top { position: absolute; top: 0; left: 0; right: 0; height: var(--top); display: flex; align-items: center; gap: 12px; padding: 0 12px 0 12px; z-index: 40; border-bottom-width: 1px; }
.st-top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--spectrum); opacity: .7; }
.st-logo { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; padding: 4px 6px 4px 2px; flex: none; }
.st-logo svg { width: 32px; height: 32px; }
.st-logo-word { font: 800 19px/1 var(--font-display); font-stretch: 112%; letter-spacing: -.02em; }
.st-logo-word b { background: var(--spectrum); -webkit-background-clip: text; background-clip: text; color: transparent; }
.st-title-wrap { display: flex; flex-direction: column; min-width: 0; flex: 1 1 260px; max-width: 420px; padding-left: 12px; border-left: 1px solid var(--glass-line); }
.st-title { background: transparent; border: 1px solid transparent; color: var(--text); font: 700 14px/1.2 var(--font-display); font-stretch: 108%; padding: 4px 8px; border-radius: 0; width: 100%; outline: none; text-overflow: ellipsis; transition: border-color .2s, background .2s; }
.st-title:hover { border-color: var(--glass-line); }
.st-title:focus { border-color: var(--st-accent); background: var(--glass-hi); }
.st-save { font: 500 10.5px var(--font-mono); color: var(--muted); padding: 0 9px; white-space: nowrap; }
.st-save.is-saving i { animation: st-pulse 1s infinite; }
.st-save.is-saved i { color: var(--c-teal); }
.st-save.is-error { color: var(--c-pink); }
.st-top-mid { display: flex; align-items: center; gap: 10px; margin: 0 auto; }
.st-top-end { display: flex; align-items: center; gap: 8px; flex: none; }
.st-seg { display: flex; gap: 0; padding: 0; background: transparent; box-shadow: inset 0 0 0 1px var(--glass-line); }
.st-seg .st-ibtn + .st-ibtn { box-shadow: inset 1px 0 0 var(--glass-line); }
.st-ibtn { width: 34px; height: 34px; border-radius: 0; border: 0; background: transparent; color: var(--muted); display: inline-grid; place-items: center; cursor: pointer; font-size: 15px; transition: background-color .15s, color .15s, box-shadow .15s; position: relative; flex: none; }
.st-ibtn:hover { background: var(--glass-hi); color: var(--text); }
.st-ibtn.is-on, .st-ibtn[aria-pressed="true"] { background: color-mix(in srgb, var(--st-accent) 14%, transparent); color: var(--text); box-shadow: inset 0 -2px 0 var(--st-accent); }
.st-seg .st-ibtn.is-on { box-shadow: inset 0 -2px 0 var(--st-accent); }
.st-ibtn:disabled { opacity: .3; cursor: default; }
.st-ibtn:focus-visible, .st-pill:focus-visible, .st-rail button:focus-visible { outline: 2px solid var(--st-accent); outline-offset: -2px; }
.st-pill { --cut: 7px; height: 34px; border-radius: 0; clip-path: var(--chamfer); padding: 0 14px; border: 0; box-shadow: inset 0 0 0 1px var(--glass-line); background: transparent; color: var(--text);
    font: 700 11px var(--font-display); font-stretch: 118%; letter-spacing: .1em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 7px; cursor: pointer; transition: background .25s, color .2s, box-shadow .2s; }
.st-pill:hover { box-shadow: inset 0 0 0 1px var(--text); }
.st-pill[aria-pressed="true"] { background: var(--primary-grad); color: #fff; box-shadow: none; }
/* 3D and, once tilted, the globe: two chamfered pills locked together */
.st-pillset { display: inline-flex; align-items: center; gap: 4px; }
.st-globe-pill.is-in { animation: st-pill-in .38s var(--ease); }
@keyframes st-pill-in { from { opacity: 0; transform: translateX(-8px) scale(.92); } to { opacity: 1; transform: none; } }
.st-globe-pill[aria-pressed="true"] { background: linear-gradient(115deg, #3BA7FF 0%, #8B5CF6 60%, #FF4D8D 100%); }
.st-theme i { position: absolute; transition: opacity .25s, transform .35s var(--ease); }
.st-theme .fa-sun-bright { opacity: 0; transform: rotate(-60deg) scale(.6); }
[data-theme="light"] .st-theme .fa-moon { opacity: 0; transform: rotate(60deg) scale(.6); }
[data-theme="light"] .st-theme .fa-sun-bright { opacity: 1; transform: none; }
.st-theme[aria-pressed="true"] { background: transparent; box-shadow: none; }
.st-cart em { position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; background: var(--c-pink); color: #fff; font: 700 10px/16px var(--font-mono); font-style: normal; padding: 0 4px; }
.st-avatar { width: 36px; height: 34px; clip-path: var(--hex); display: grid; place-items: center; color: var(--text); background: var(--glass-hi); text-decoration: none; font: 800 14px var(--font-display); transition: background .2s; }
.st-avatar:hover { background: var(--glass-line); color: var(--text); }
.st-avatar.is-user { background: var(--primary-grad); color: #fff; }
.st-top .btn-sm { height: 34px; }

/* ---- rail ---------------------------------------------------------------------------------------------------- */
.st-rail { position: absolute; top: var(--top); left: 0; bottom: var(--status); width: var(--rail); display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 8px 0; z-index: 35; border-right-width: 1px; }
.st-rail button { position: relative; width: 100%; padding: 10px 0 8px; border: 0; border-radius: 0; background: transparent; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer;
    font: 700 8.5px var(--font-display); font-stretch: 118%; letter-spacing: .12em; text-transform: uppercase; transition: color .18s, background-color .18s; }
.st-rail button i { font-size: 18px; transition: transform .25s var(--ease); }
.st-rail button:hover { color: var(--text); background: var(--glass-hi); }
.st-rail button:hover i { transform: translateY(-1px); }
.st-rail button::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(180deg, #19E3B1, #3BA7FF, #8B5CF6); transform: scaleY(0); transition: transform .25s var(--ease); }
.st-rail button.is-on { color: var(--text); background: color-mix(in srgb, var(--st-accent) 10%, transparent); }
.st-rail button.is-on::before { transform: none; }
.st-rail button.is-on i { background: var(--spectrum); -webkit-background-clip: text; background-clip: text; color: transparent; }
.st-rail-gap { flex: 1; }

/* ---- panels -------------------------------------------------------------------------------------------------- */
.st-panel, .st-insp { position: absolute; top: calc(var(--top) + 10px); bottom: calc(var(--status) + 10px); width: 356px; z-index: 34; border-radius: 0; display: flex; flex-direction: column; box-shadow: var(--pop-shadow); animation: st-in .24s var(--ease); }
.st-panel::before, .st-insp::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 2px; background: var(--spectrum); z-index: 2; }
.st-panel { left: calc(var(--rail) + 10px); }
.st-insp { right: 10px; width: 336px; animation-name: st-in-r; }
.st-panel.is-closing { animation: st-out .16s ease-in forwards; }
.st-insp.is-closing { animation: st-out-r .16s ease-in forwards; }
.st-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 10px 12px 16px; border-bottom: 1px solid var(--glass-line); }
.st-panel-head h2 { margin: 0; font: 800 12px var(--font-display); font-stretch: 125%; letter-spacing: .12em; text-transform: uppercase; display: flex; align-items: center; gap: 9px; min-width: 0; }
.st-panel-head h2 > i { color: var(--st-accent); font-size: 14px; }
.st-panel-body { flex: 1; overflow-y: auto; padding: 14px 16px 18px; overscroll-behavior: contain; }
.st-sec { margin: 0 0 20px; }
.st-sec > h3, .st-h { font: 700 9.5px var(--font-display); font-stretch: 125%; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.st-sec > h3::before, .st-h::before { content: ""; width: 14px; height: 2px; flex: none; background: var(--spectrum); }
.st-sec > h3 .st-h-end, .st-h .st-h-end { margin-left: auto; text-transform: none; letter-spacing: 0; font: 500 11px var(--font-body); }
.st-p { font-size: 12.5px; color: var(--muted); line-height: 1.55; margin: 0 0 12px; }
.st-row { display: flex; align-items: center; gap: 8px; }
.st-row > .grow { flex: 1; min-width: 0; }
.st-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.st-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.st-grid3 .btn { padding: 0 6px; }
.st-field { margin: 0 0 12px; }
.st-field > label, .st-lbl { display: block; font: 600 11.5px var(--font-body); color: var(--muted); margin: 0 0 6px; }
.st-lbl-row { display: flex !important; justify-content: space-between; }
.st-lbl-row a { color: var(--st-accent); font-weight: 600; }
.st-field .input, .st-field .select, .st-field .textarea { width: 100%; }
.st .input, .st .select, .st .textarea { font-size: 13px; height: 40px; padding: 0 11px; }
.st .select { padding-right: 32px; background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; }
.st .textarea { height: auto; min-height: 0; padding: 10px 11px; }
.st .help { font-size: 11px; color: var(--muted); }
.st-range { display: flex; align-items: center; gap: 10px; }
.st-range input[type=range] { flex: 1; accent-color: var(--st-accent); }
.st-range output { font: 500 11.5px var(--font-mono); color: var(--muted); min-width: 42px; text-align: right; }
.st-switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; font-size: 13px; cursor: pointer; }
.st-switch input { appearance: none; -webkit-appearance: none; width: 36px; height: 20px; border-radius: 0; background: var(--glass-line); position: relative; cursor: pointer; transition: background .25s; flex: none; margin: 0; }
.st-switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; background: #fff; transition: transform .25s var(--ease); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.st-switch input:checked { background: var(--primary-grad); }
.st-switch input:checked::after { transform: translateX(16px); }
.st-switch input:focus-visible { outline: 2px solid var(--st-accent); outline-offset: 2px; }
.st-switch small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; line-height: 1.4; }
.st-check { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; cursor: pointer; margin-top: 6px; }
.st-check input { accent-color: var(--st-accent); margin: 0; }
.st-checks { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.st-empty { text-align: center; padding: 26px 12px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.st-empty i { font-size: 30px; display: block; margin-bottom: 10px; background: var(--spectrum); -webkit-background-clip: text; background-clip: text; color: transparent; }
.st-empty b { display: block; color: var(--text); font: 800 13px var(--font-display); font-stretch: 118%; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
.st-divider { height: 1px; background: var(--glass-line); margin: 14px 0; border: 0; }
.st-kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 12.5px; margin: 0; }
.st-kv dt { color: var(--muted); }
.st-kv dd { margin: 0; font-family: var(--font-mono); text-align: right; }
.st-big-num { font: 800 26px var(--font-display); letter-spacing: -.02em; }
.st-big-num small { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 4px; }

/* floating labels in the studio: the label rests inside the field and glides up to a caption on focus / with a value */
@supports selector(:has(*)) {
    .st-field:has(> label + :is(.input, .textarea, .select)) { position: relative; }
    .st .st-field > label + :is(.input, .select) { height: 46px; padding-top: 17px; padding-bottom: 2px; }
    .st .st-field > label + .textarea { padding-top: 23px; }
    .st-field > label:has(+ :is(.input, .textarea, .select)) {
        position: absolute; z-index: 2; left: 12px; top: 23px; margin: 0; transform: translateY(-50%); transform-origin: 0 50%; max-width: calc(100% - 40px); pointer-events: none;
        color: var(--muted); font: 500 13px/1.3 var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: top .28s var(--ease), transform .28s var(--ease), color .3s var(--ease); }
    .st-field > label:has(+ .textarea) { top: 21px; }
    .st-field > label:has(+ :is(.input, .textarea):is(:focus, :not(:placeholder-shown))), .st-field > label:has(+ .select) { top: 11px; transform: translateY(-50%) scale(.8); }
    .st-field > label:has(+ :is(.input, .textarea, .select):focus) { color: var(--fl-focus); }
    .st-field > label + :is(.input, .textarea)::placeholder { color: transparent; transition: color .2s .1s; }
    .st-field > label + :is(.input, .textarea):focus::placeholder { color: var(--dim); }
}

/* ---- layer list ---------------------------------------------------------------------------------------------- */
.st-layers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.st-layer { display: flex; align-items: center; gap: 9px; padding: 8px 6px 8px 8px; border: 1px solid var(--glass-line); background: var(--glass-hi); cursor: pointer; transition: border-color .2s, background-color .2s, box-shadow .2s, opacity .2s; user-select: none; animation: st-rise .25s var(--ease) both; }
.st-layer:hover { border-color: var(--line-strong); }
.st-layer.is-sel { border-color: color-mix(in srgb, var(--st-accent) 60%, transparent); background: color-mix(in srgb, var(--st-accent) 9%, transparent); box-shadow: inset 2px 0 0 var(--st-accent); }
.st-layer.is-off { opacity: .5; }
.st-layer.is-drag { opacity: .35; }
.st-layer.is-over { box-shadow: 0 -2px 0 var(--st-accent); }
.st-grip { color: var(--dim); cursor: grab; font-size: 12px; }
.st-sw { width: 32px; height: 29px; clip-path: var(--hex); flex: none; display: grid; place-items: center; color: #fff; font-size: 12px; background: var(--c, #3BA7FF); }
.st-layer-txt { flex: 1; min-width: 0; }
.st-layer-txt b { display: block; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-layer-txt span { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.st-layer .st-ibtn { width: 26px; height: 26px; font-size: 12px; }
.st-layer .st-rm:hover { color: var(--c-pink); background: color-mix(in srgb, var(--c-pink) 12%, transparent); }
.st-layers-note { margin-top: 12px; display: flex; gap: 8px; }
.st-layers-note i { color: var(--c-teal); margin-top: 2px; }
.st-badge { display: inline-flex; align-items: center; gap: 4px; font: 700 8.5px/1 var(--font-display); font-stretch: 118%; letter-spacing: .1em; text-transform: uppercase; padding: 3px 6px; border-radius: 0; background: var(--glass-line); color: var(--text); }
.st-badge.free { background: rgba(25, 227, 177, .16); color: var(--c-teal); }
.st-badge.owned { background: rgba(139, 92, 246, .2); color: #C4B5FD; }
.st-badge.locked { background: rgba(255, 77, 141, .18); color: var(--c-pink); }
.st-badge.mine { background: rgba(59, 167, 255, .16); color: #7CC4FF; }
.st-badge.filt { background: rgba(255, 181, 71, .16); color: var(--c-amber); }
.st-badge.on { background: var(--c-teal); color: #04241C; }
[data-theme="light"] .st-badge.free { color: #047857; } [data-theme="light"] .st-badge.owned { color: #6D28D9; } [data-theme="light"] .st-badge.mine { color: #1D4ED8; } [data-theme="light"] .st-badge.filt { color: #B45309; } [data-theme="light"] .st-badge.locked { color: #BE185D; }

/* ---- add data & import --------------------------------------------------------------------------------------- */
.st-meter { padding: 12px 14px; background: color-mix(in srgb, var(--c-teal) 7%, transparent); border: 1px solid color-mix(in srgb, var(--c-teal) 28%, transparent); border-left: 3px solid var(--c-teal); margin-bottom: 12px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.st-meter-top { color: var(--text); font-size: 12.5px; }
.st-meter b { font-weight: 700; color: var(--text); }
.st-meter a { color: var(--st-accent); }
.st-meter-bar { height: 5px; margin: 8px 0 8px; display: flex; gap: 3px; }
.st-meter-bar i { flex: 1; background: var(--glass-line); transition: background .3s; }
.st-meter-bar i.on { background: var(--c-teal); }
.st-importcard { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; margin-bottom: 12px; text-align: left; cursor: pointer; color: var(--text); background: color-mix(in srgb, var(--c-violet) 9%, transparent); border: 1px solid color-mix(in srgb, var(--c-violet) 35%, transparent); position: relative; transition: border-color .2s, box-shadow .25s; }
.st-importcard::after { content: ""; position: absolute; top: -1px; right: -1px; width: 10px; height: 10px; background: linear-gradient(225deg, var(--c-violet) 0 50%, transparent 50%); }
.st-importcard:hover { border-color: var(--c-violet); box-shadow: inset 0 2px 0 var(--c-violet); }
.st-importcard b { display: block; font: 800 11.5px var(--font-display); font-stretch: 118%; letter-spacing: .06em; text-transform: uppercase; }
.st-importcard small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 3px; line-height: 1.4; }
.st-importcard > i { margin-left: auto; color: var(--muted); transition: transform .3s var(--ease); }
.st-importcard:hover > i { transform: translateX(3px); color: var(--text); }
.st-free-note { display: flex; gap: 10px; padding: 11px 12px; margin-bottom: 12px; font-size: 12.5px; line-height: 1.45; color: var(--text-2); border: 1px solid color-mix(in srgb, var(--c-teal) 30%, transparent); border-left: 3px solid var(--c-teal); background: color-mix(in srgb, var(--c-teal) 7%, transparent); }
.st-free-note i { color: var(--c-teal); margin-top: 2px; }
.st-free-note b { color: var(--text); }
.st-dropzone { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 14px; margin-bottom: 18px; cursor: pointer; color: var(--muted); text-align: center; background: var(--glass-hi);
    border: 1px dashed color-mix(in srgb, var(--st-accent) 55%, transparent); transition: border-color .2s, background-color .2s, transform .2s var(--ease); font-size: 11.5px; }
.st-dropzone i { font-size: 26px; color: var(--st-accent); margin-bottom: 4px; transition: transform .3s var(--ease); }
.st-dropzone b { color: var(--text); font: 800 11.5px var(--font-display); font-stretch: 118%; letter-spacing: .08em; text-transform: uppercase; }
.st-dropzone:hover, .st-dropzone.is-over { border-color: var(--st-accent); border-style: solid; background: color-mix(in srgb, var(--st-accent) 8%, transparent); }
.st-dropzone:hover i, .st-dropzone.is-over i { transform: translateY(-3px); }
.st-tiplist { margin: 0 0 12px; padding-left: 18px; font-size: 12px; color: var(--muted); line-height: 1.55; }
.st-tiplist b { color: var(--text); }
.st-csearch { position: relative; margin-bottom: 12px; }
.st-csearch i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; pointer-events: none; }
.st .st-csearch .input { padding-left: 34px; width: 100%; height: 38px; }
.st-clist { display: flex; flex-direction: column; gap: 1px; }
.st-citem { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 0; cursor: pointer; border: 0; background: transparent; color: var(--text); text-align: left; font: 500 13px var(--font-body); width: 100%; transition: background-color .15s, box-shadow .15s; }
.st-citem:hover, .st-citem:focus-visible { background: var(--glass-hi); box-shadow: inset 2px 0 0 var(--st-accent); outline: none; }
.st-citem .flag { font-size: 18px; width: 24px; text-align: center; }
.st-citem em { margin-left: auto; font-style: normal; font-size: 10.5px; color: var(--muted); font-family: var(--font-mono); }
.st-world { margin-bottom: 12px; border: 1px solid var(--glass-line); }
.st-chead { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--glass-hi); border: 1px solid var(--glass-line); margin-bottom: 12px; }
.st-chead .flag { font-size: 30px; }
.st-chead b { font: 800 14px var(--font-display); font-stretch: 112%; display: block; }
.st-chead span { font-size: 11.5px; color: var(--muted); }
.st-chead .st-ibtn { margin-left: auto; }
.st-tgroup { margin-bottom: 16px; }
.st-tgroup h4 { font: 700 9.5px var(--font-display); font-stretch: 125%; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; display: flex; gap: 7px; align-items: center; }
.st-tgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.st-type-cell { position: relative; display: flex; }
.st-type { position: relative; flex: 1; display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 10px; border: 1px solid var(--glass-line); border-radius: 0; background: var(--glass-hi); color: var(--text); cursor: pointer; font: 600 12px/1.25 var(--font-body);
    transition: transform .2s var(--ease), border-color .2s, background-color .2s, box-shadow .2s; min-height: 84px; }
.st-type::after { content: ""; position: absolute; top: -1px; right: -1px; width: 9px; height: 9px; background: linear-gradient(225deg, var(--c) 0 50%, transparent 50%); opacity: .8; }
.st-type:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 60%, transparent); background: color-mix(in srgb, var(--c) 9%, transparent); box-shadow: inset 0 2px 0 var(--c); }
.st-type:disabled { opacity: .35; cursor: default; transform: none; box-shadow: none; }
.st-type .st-sw { width: 30px; height: 27px; font-size: 11px; background: var(--c); }
.st-type small { color: var(--muted); font-weight: 500; font-size: 10px; font-family: var(--font-mono); }
.st-type .st-badge { position: absolute; top: 8px; right: 8px; }
.st-type.is-added { border-color: color-mix(in srgb, var(--c-teal) 70%, transparent); background: color-mix(in srgb, var(--c-teal) 8%, transparent); box-shadow: inset 0 2px 0 var(--c-teal); }
.st-type-rm { position: absolute; right: 6px; bottom: 6px; width: 26px; height: 26px; border: 0; display: grid; place-items: center; cursor: pointer; font-size: 12px; color: var(--text); background: var(--glass-line); transition: background-color .15s, color .15s, transform .2s var(--ease); z-index: 2; }
.st-type-rm:hover { background: var(--c-pink); color: #fff; transform: scale(1.08); }

/* ---- draw & tools -------------------------------------------------------------------------------------------- */
.st-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.st-tool { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 14px 4px 10px; border: 1px solid var(--glass-line); border-radius: 0; background: var(--glass-hi); color: var(--text); cursor: pointer;
    font: 600 11px/1.2 var(--font-body); text-align: center; transition: transform .2s var(--ease), border-color .2s, background-color .2s, box-shadow .2s; }
.st-tool i { font-size: 18px; color: var(--muted); transition: color .2s, transform .25s var(--ease); }
.st-tool:hover { border-color: color-mix(in srgb, var(--st-accent) 50%, transparent); transform: translateY(-1px); box-shadow: inset 0 2px 0 var(--st-accent); }
.st-tool:hover i { color: var(--text); transform: scale(1.08); }
.st-tool.is-on { background: color-mix(in srgb, var(--st-accent) 14%, transparent); border-color: var(--st-accent); box-shadow: inset 0 2px 0 var(--st-accent); }
.st-tool.is-on i { color: var(--st-accent); }
.st-tool kbd { position: absolute; top: 4px; right: 4px; font: 500 9px var(--font-mono); color: var(--dim); border: 1px solid var(--glass-line); border-radius: 0; padding: 0 3px; background: none; box-shadow: none; }
.st-tools-sec { margin-bottom: 18px; }

/* ---- the tool card (floating, top centre) -------------------------------------------------------------------- */
.st-toolcard { position: absolute; top: 66px; left: 50%; transform: translateX(-50%); z-index: 6; border-radius: 0; padding: 12px 14px; min-width: 300px; max-width: min(460px, calc(100% - 24px)); box-shadow: var(--pop-shadow); animation: st-drop .24s var(--ease); font-size: 13px; }
.st-toolcard::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 2px; background: var(--spectrum); }
.st-toolcard header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.st-toolcard header b { font: 800 11.5px var(--font-display); font-stretch: 125%; letter-spacing: .1em; text-transform: uppercase; }
.st-toolcard header .st-ibtn { margin-left: auto; width: 28px; height: 28px; }
.st-toolcard .st-tc-ico { width: 32px; height: 29px; clip-path: var(--hex); display: grid; place-items: center; background: var(--primary-grad); color: #fff; font-size: 12px; flex: none; }
.st-toolcard p { margin: 0 0 8px; color: var(--muted); line-height: 1.5; }
.st-tc-result { font: 800 22px var(--font-display); font-stretch: 112%; letter-spacing: -.01em; margin: 4px 0 8px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.st-tc-result small { font: 500 11.5px var(--font-mono); color: var(--muted); }
.st-tc-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.st-tc-row { display: flex; gap: 6px; align-items: center; margin: 6px 0; flex-wrap: wrap; }
.st .st-tc-row .input, .st .st-tc-row .select { height: 34px; }
.st .st-tc-row > .input, .st .st-tc-row > .select { width: auto; min-width: 0; flex: 0 1 auto; }
.st .st-tc-row > [style*="flex:1"] { flex: 1 1 120px; }
.st-swatches { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.st-swatch { width: 26px; height: 26px; border-radius: 0; border: 0; cursor: pointer; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); padding: 0; transition: transform .15s var(--ease), box-shadow .15s; }
.st-swatch:hover { transform: scale(1.1); }
.st-swatch.is-on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text); }
.st-swatch.erase { background: repeating-linear-gradient(45deg, transparent 0 4px, var(--glass-line) 4px 6px); box-shadow: inset 0 0 0 1px var(--line-strong); }
.st-swatch.auto { background: linear-gradient(135deg, var(--bg) 50%, var(--text) 50%); }
.st-copy { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: var(--glass-hi); border: 1px solid var(--glass-line); font: 500 12px var(--font-mono); margin: 4px 0; }
.st-copy span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-copy .st-ibtn { width: 26px; height: 26px; font-size: 12px; }

/* ---- the stage and the device frames ------------------------------------------------------------------------ */
.st-stage { position: absolute; top: var(--top); left: var(--rail); right: 0; bottom: var(--status); overflow: hidden; display: grid; place-items: center; transition: background .3s; }
.st-stage.is-device { background-color: var(--bg); background-image: linear-gradient(var(--grid-line, rgba(255, 255, 255, .03)) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line, rgba(255, 255, 255, .03)) 1px, transparent 1px); background-size: 24px 24px; }
.st-device { position: relative; width: 100%; height: 100%; transition: width .4s var(--ease), height .4s var(--ease), border-radius .4s, border-width .4s; overflow: hidden; }
.st-stage.is-device .st-device { border: 12px solid #05070d; border-radius: 44px; box-shadow: 0 0 0 2px #2a3242, 0 40px 90px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 255, 255, .05); }
.st-stage.device-tablet .st-device { border-radius: 30px; border-width: 14px; }
.st-stage.device-mobile .st-device::before, .st-stage.device-landscape .st-device::before { content: ""; position: absolute; z-index: 20; background: #05070d; border-radius: 0 0 16px 16px; top: 0; left: 50%; width: 120px; height: 26px; transform: translateX(-50%); pointer-events: none; }
.st-stage.device-landscape .st-device::before { top: 50%; left: 0; width: 26px; height: 120px; transform: translateY(-50%); border-radius: 0 16px 16px 0; }
.st-device-label { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); font: 600 10.5px var(--font-mono); color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.st-map { position: absolute; inset: 0; transition: background-color .4s; }
.st-stage-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--muted); font: 600 10.5px var(--font-display); font-stretch: 118%; letter-spacing: .14em; text-transform: uppercase; z-index: 30; background: var(--bg); transition: opacity .45s; }
.st-stage-loading.is-done { opacity: 0; pointer-events: none; }
.st-viewer .st-stage-loading { position: fixed; }
.st-spinner { width: 40px; height: 40px; border-radius: 50%; border: 3px solid rgba(148, 163, 184, .18); border-top-color: var(--c-teal); border-right-color: var(--c-violet); animation: st-spin .8s linear infinite; }

/* ---- search -------------------------------------------------------------------------------------------------- */
.st-search { position: absolute; top: 12px; left: 12px; z-index: 7; width: min(360px, calc(100% - 120px)); border-radius: 0; display: flex; align-items: center; box-shadow: var(--pop-shadow); transition: box-shadow .2s, border-color .2s; }
.st-search:focus-within { border-color: var(--st-accent); box-shadow: 0 0 0 1px var(--st-accent), var(--pop-shadow); }
.st-search > i { padding: 0 4px 0 13px; color: var(--muted); font-size: 13px; }
.st-search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--text); font: 500 13px var(--font-body); padding: 11px 12px 11px 6px; }
.st-search input::placeholder { color: var(--muted); }
.st-search-out { position: absolute; top: calc(100% + 6px); left: -1px; right: -1px; border-radius: 0; box-shadow: var(--pop-shadow); overflow: hidden; max-height: 360px; overflow-y: auto; animation: st-rise .18s var(--ease); }
.st-search-out { max-height: min(430px, 62vh); padding-bottom: 4px; }
.st-sres-h { padding: 10px 12px 5px; font: 700 9px var(--font-display); font-stretch: 118%; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.st-sres-h::after { content: ""; flex: 1; height: 1px; background: var(--glass-line); }
.st-sres { display: flex; gap: 11px; align-items: center; padding: 8px 12px; cursor: pointer; font-size: 13px; border: 0; background: transparent; color: var(--text); width: 100%; text-align: left; transition: background-color .12s, box-shadow .12s; }
.st-sres:hover, .st-sres.is-on { background: color-mix(in srgb, var(--st-accent) 12%, transparent); box-shadow: inset 2px 0 0 var(--st-accent); }
.st-sres-ico { width: 30px; height: 27px; flex: none; display: grid; place-items: center; clip-path: var(--hex); background: color-mix(in srgb, var(--st-accent) 16%, transparent); color: var(--st-accent); font-size: 12px; }
.st-sres-ico.flag { background: var(--glass-hi); font-size: 15px; }
.st-sres.is-on .st-sres-ico { background: var(--st-accent); color: #fff; }
.st-sres-t { flex: 1; min-width: 0; }
.st-sres-t b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-sres-t mark { background: none; color: var(--st-accent); font-weight: 700; }
.st-sres small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.st-sres em { flex: none; font: 600 9px var(--font-display); font-style: normal; font-stretch: 112%; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--glass-line); padding: 3px 6px; max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-sres-note { display: flex; align-items: center; gap: 9px; padding: 11px 13px; color: var(--muted); font-size: 12px; }
.st-spin-sm { width: 13px; height: 13px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--muted) 30%, transparent); border-top-color: var(--st-accent); animation: st-spin .7s linear infinite; flex: none; }

/* ---- legend -------------------------------------------------------------------------------------------------- */
.st-legend { position: absolute; left: 12px; bottom: 40px; z-index: 6; border-radius: 0; padding: 10px 12px; max-width: 260px; max-height: 46%; overflow-y: auto; font-size: 12px; box-shadow: var(--pop-shadow); animation: st-rise .25s var(--ease); }
.st-legend h4 { margin: 0 0 6px; font: 700 9.5px var(--font-display); font-stretch: 125%; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.st-legend h4 button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0; transition: transform .25s var(--ease); }
.st-legend.is-collapsed h4 button { transform: rotate(180deg); }
.st-lg-item { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.st-lg-item .k { width: 13px; height: 13px; border-radius: 0; flex: none; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.st-lg-item .k.pt { clip-path: var(--hex); width: 14px; }
.st-lg-item .k.ln { height: 3px; }
.st-lg-item label { display: flex; align-items: center; gap: 8px; cursor: pointer; flex: 1; min-width: 0; }
.st-lg-item label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-lg-item input { margin: 0; accent-color: var(--st-accent); }
.st-lg-sub { padding-left: 22px; }
.st-legend.is-collapsed .st-lg-body { display: none; }

/* ---- status bar --------------------------------------------------------------------------------------------- */
.st-status { position: absolute; left: 0; right: 0; bottom: 0; height: var(--status); display: flex; align-items: center; gap: 14px; padding: 0 12px; z-index: 36; border-top-width: 1px; font-size: 11px; color: var(--muted); }
.st-coords { border: 0; background: transparent; color: inherit; font-size: 11px; cursor: pointer; padding: 3px 6px; }
.st-coords:hover { background: var(--glass-hi); color: var(--text); }
.st-status-gap { flex: 1; }
.st-free { display: inline-flex; gap: 6px; align-items: center; }
.st-free b { color: var(--text); }
.st-open-full { color: var(--text); text-decoration: none; font-weight: 600; }

/* ---- inspector bits ----------------------------------------------------------------------------------------- */
.st-colors { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.st-colors input[type=color] { width: 28px; height: 28px; border: 0; padding: 0; background: none; cursor: pointer; }
.st-swatch-g { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); }
.st-cp-btn { position: relative; display: grid; place-items: center; color: var(--text); font-size: 11px; background: conic-gradient(from 200deg, #FF4D8D, #FFB547, #FDE047, #19E3B1, #3BA7FF, #8B5CF6, #FF4D8D); }
.st-cp-btn i { width: 18px; height: 18px; display: grid; place-items: center; background: var(--glass-2); }
.st-cp-btn.is-on { background: var(--c); }
.st-cp-btn.is-on i { background: rgba(0, 0, 0, .35); color: #fff; }
.st-shapes { display: flex; gap: 4px; }
.st-shapes button { flex: 1; height: 40px; border: 1px solid var(--glass-line); background: var(--glass-hi); color: var(--muted); cursor: pointer; display: grid; place-items: center; transition: border-color .15s, color .15s, background-color .15s; }
.st-shapes button svg { width: 22px; height: 22px; fill: currentColor; }
.st-shapes button:hover { color: var(--text); border-color: var(--line-strong); }
.st-shapes button.is-on { color: var(--st-accent); border-color: var(--st-accent); background: color-mix(in srgb, var(--st-accent) 12%, transparent); box-shadow: inset 0 -2px 0 var(--st-accent); }

/* THE COLOUR PICKER - a floating card (a bottom sheet on phones): solid or gradient */
.st-cp { position: fixed; z-index: 120; width: 268px; padding: 12px; background: var(--glass-2); border: 1px solid var(--glass-line); box-shadow: var(--pop-shadow), 0 0 0 1px rgba(0, 0, 0, .2);
    -webkit-backdrop-filter: blur(var(--glass-blur, 16px)) saturate(1.4); backdrop-filter: blur(var(--glass-blur, 16px)) saturate(1.4); color: var(--text); font-family: var(--font-body);
    opacity: 0; transform: translateY(6px) scale(.98); transform-origin: top left; transition: opacity .16s var(--ease), transform .2s var(--ease); }
.st-cp::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 2px; background: var(--spectrum); }
.st-cp.is-open { opacity: 1; transform: none; }
.st-cp.is-closing { opacity: 0; transform: translateY(4px); }
html.no-glass .st-cp { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--surface-solid); }
.st-cp.is-sheet { left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); transform-origin: bottom center; }
.st-cp-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 10px; box-shadow: inset 0 0 0 1px var(--glass-line); }
.st-cp-tabs button { height: 30px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font: 700 10px var(--font-display); font-stretch: 118%; letter-spacing: .12em; text-transform: uppercase; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.st-cp-tabs button.is-on { background: var(--text); color: var(--bg); }
.st-cp-gpane { display: none; }
.st-cp[data-mode="grad"] .st-cp-gpane { display: block; }
.st-cp-bar { position: relative; height: 26px; margin: 4px 9px 14px; }
.st-cp-bar-fill { position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.st-cp-stops { position: absolute; inset: 0; }
.st-cp-stop { position: absolute; top: 50%; width: 18px; height: 34px; margin: -17px 0 0 -9px; padding: 0; border: 2px solid #fff; background: var(--c); cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .45); transition: transform .15s var(--ease); }
.st-cp-stop.is-on { transform: scale(1.12); outline: 2px solid var(--st-accent); outline-offset: 1px; z-index: 1; }
.st-cp-gtools { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.st-cp-dial { position: relative; width: 54px; height: 54px; flex: none; border-radius: 50%; border: 1px solid var(--glass-line); background: var(--glass-hi); cursor: grab; touch-action: none; display: grid; place-items: center; }
.st-cp-dial:focus-visible { outline: 2px solid var(--st-accent); outline-offset: 2px; }
.st-cp-dial i { position: absolute; left: 50%; top: 5px; width: 2px; height: 22px; margin-left: -1px; background: var(--st-accent); transform-origin: 50% 22px; }
.st-cp-dial i::after { content: ""; position: absolute; left: -3px; top: -2px; width: 8px; height: 8px; background: var(--st-accent); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.st-cp-dial span { font: 600 10px var(--font-mono); color: var(--text); margin-top: 18px; }
.st-cp-gbtns { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.st-cp-mini { height: 26px; padding: 0 8px; border: 1px solid var(--glass-line); background: var(--glass-hi); color: var(--text); cursor: pointer; font: 700 9.5px var(--font-display); font-stretch: 112%; letter-spacing: .08em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 5px; }
.st-cp-mini:hover:not(:disabled) { border-color: var(--st-accent); }
.st-cp-mini:disabled { opacity: .35; cursor: default; }
.st-cp-angles { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; width: 100%; }
.st-cp-angles button { height: 20px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; padding: 0; }
.st-cp-angles button:hover { color: var(--text); }
.st-cp-angles button.is-on { color: var(--st-accent); background: color-mix(in srgb, var(--st-accent) 14%, transparent); }
.st-cp-presets { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin-bottom: 12px; }
.st-cp-preset { height: 22px; border: 0; padding: 0; cursor: pointer; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); transition: transform .15s var(--ease); }
.st-cp-preset:hover { transform: translateY(-1px); }
.st-cp-preset.is-on { box-shadow: 0 0 0 2px var(--glass-2), 0 0 0 3px var(--text); }
.st-cp-sv { --h: red; position: relative; height: 138px; cursor: crosshair; touch-action: none; background: linear-gradient(0deg, #000, transparent), linear-gradient(90deg, #fff, var(--h)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.st-cp-sv-knob { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 2px solid #fff; background: var(--k); box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .4); pointer-events: none; }
.st-cp-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.st-cp-hue { position: relative; flex: 1; height: 14px; cursor: pointer; touch-action: none; background: linear-gradient(90deg, #f00, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.st-cp-hue-knob { position: absolute; top: -3px; width: 8px; height: 20px; margin-left: -4px; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .4); pointer-events: none; }
.st-cp-eye { width: 30px; justify-content: center; padding: 0; }
.st-cp-now { width: 34px; height: 30px; flex: none; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); clip-path: var(--hex); }
.st-cp-hex { display: flex; align-items: center; flex: 1; min-width: 0; height: 30px; border: 1px solid var(--glass-line); background: var(--input-bg); }
.st-cp-hex:focus-within { border-color: var(--st-accent); }
.st-cp-hex span { font: 700 8.5px var(--font-display); font-stretch: 118%; letter-spacing: .12em; color: var(--muted); padding: 0 6px 0 8px; }
.st-cp-hex input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--text); font: 600 12px var(--font-mono); outline: 0; text-transform: uppercase; }
.st-cp-rgb { font-size: 10px; color: var(--muted); white-space: nowrap; }
.st-cp-sws, .st-cp-recent { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; margin-top: 10px; }
.st-cp-recent { grid-template-columns: auto repeat(10, 1fr); align-items: center; }
.st-cp-recent:empty { display: none; }
.st-cp-recent > span { font: 700 8.5px var(--font-display); font-stretch: 118%; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.st-cp-sw { aspect-ratio: 1; border: 0; padding: 0; cursor: pointer; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); transition: transform .12s var(--ease); }
.st-cp-sw:hover { transform: scale(1.15); }
.st-cp-sw.is-on { box-shadow: 0 0 0 2px var(--glass-2), 0 0 0 3px var(--text); }
[data-theme="light"] .st-cp-sw, [data-theme="light"] .st-cp-preset, [data-theme="light"] .st-swatch-g { box-shadow: inset 0 0 0 1px rgba(10, 13, 18, .14); }
.st-icons { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; max-height: 168px; overflow-y: auto; padding: 1px; }
.st-icons button { aspect-ratio: 1; border-radius: 0; border: 1px solid transparent; background: var(--glass-hi); color: var(--text); cursor: pointer; font-size: 13px; display: grid; place-items: center; transition: background-color .15s, border-color .15s; }
.st-icons button:hover { border-color: var(--line-strong); }
.st-icons button.is-on { border-color: var(--st-accent); background: color-mix(in srgb, var(--st-accent) 16%, transparent); }
.st-tabs { display: flex; gap: 0; padding: 0; background: transparent; box-shadow: inset 0 0 0 1px var(--glass-line); margin-bottom: 14px; }
.st-tabs button { flex: 1; border: 0; background: transparent; color: var(--muted); font: 700 9.5px var(--font-display); font-stretch: 118%; letter-spacing: .1em; text-transform: uppercase; padding: 9px 4px; cursor: pointer; border-radius: 0; transition: color .2s, background-color .2s, box-shadow .2s; }
.st-tabs button + button { box-shadow: inset 1px 0 0 var(--glass-line); }
.st-tabs button:hover { color: var(--text); }
.st-tabs button.is-on { background: color-mix(in srgb, var(--st-accent) 13%, transparent); color: var(--text); box-shadow: inset 0 -2px 0 var(--st-accent); }
.st-tabs button i { margin-right: 4px; }
.st-tabbody { animation: st-fade .2s; }
.st-fieldlist { display: flex; flex-direction: column; gap: 1px; max-height: 210px; overflow-y: auto; border: 1px solid var(--glass-line); padding: 5px; }
.st-fieldlist label { display: flex; gap: 8px; align-items: center; font-size: 12.5px; padding: 3px 4px; cursor: pointer; }
.st-fieldlist label:hover { background: var(--glass-hi); }
.st-fieldlist input { accent-color: var(--st-accent); margin: 0; }
.st-classes { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.st-thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--glass-line); display: block; margin-bottom: 8px; }
.st-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.st-danger { color: var(--c-pink) !important; }
.st-danger:hover { background: var(--c-pink) !important; color: #fff !important; box-shadow: none !important; }
.st-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 10px; }
.st-chip { border: 1px solid var(--glass-line); background: var(--glass-hi); color: var(--text-2); font: 500 11.5px var(--font-body); padding: 4px 8px; cursor: pointer; transition: border-color .15s, color .15s; }
.st-chip em { font-style: normal; color: var(--muted); font-family: var(--font-mono); font-size: 10px; }
.st-chip:hover { border-color: var(--st-accent); color: var(--text); }
.st-tokens .st-chip { font-family: var(--font-mono); font-size: 10.5px; }
.st-result { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; padding: 10px 12px; background: var(--glass-hi); border: 1px solid var(--glass-line); font-size: 12.5px; color: var(--muted); }
.st-result b { color: var(--text); font: 800 16px var(--font-display); }

/* popup template picker */
.st-ptpls { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.st-ptpl { display: flex; flex-direction: column; gap: 5px; padding: 6px; border: 1px solid var(--glass-line); background: var(--glass-hi); color: var(--text); cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
.st-ptpl:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.st-ptpl.is-on { border-color: var(--st-accent); box-shadow: inset 0 -2px 0 var(--st-accent); }
.st-ptpl b { font: 700 8.5px var(--font-display); font-stretch: 118%; letter-spacing: .08em; text-transform: uppercase; text-align: center; }
.st-ptpl-art { height: 38px; display: flex; flex-direction: column; gap: 3px; padding: 5px; background: var(--glass-2); border: 1px solid var(--glass-line); overflow: hidden; }
.st-ptpl-art i { display: block; height: 4px; background: var(--muted); opacity: .45; }
.st-ptpl-art i:first-child { height: 5px; width: 70%; opacity: .9; background: var(--text); }
.st-ptpl-art i:nth-child(3) { width: 55%; }
.st-ptpl-art.t-card { box-shadow: inset 0 2px 0 var(--st-accent); }
.st-ptpl-art.t-banner i:first-child, .st-ptpl-art.t-photo i:first-child { height: 13px; width: auto; margin: -5px -5px 2px; background: var(--st-accent); opacity: 1; }
.st-ptpl-art.t-photo i:first-child { height: 18px; background: linear-gradient(135deg, #19E3B1, #3BA7FF, #8B5CF6); }
.st-ptpl-art.t-compact { flex-direction: row; align-items: center; gap: 4px; }
.st-ptpl-art.t-compact i:first-child { width: 8px; height: 8px; background: var(--st-accent); flex: none; }
.st-ptpl-art.t-compact i { flex: 1; }
.st-ptpl-art.t-table i { height: 5px; }
.st-ptpl-art.t-table i:nth-child(2) { background: var(--text); opacity: .2; }
.st-ptpl-art.t-minimal { box-shadow: inset 2px 0 0 var(--st-accent); }
.st-ptpl-art.t-custom { align-items: center; justify-content: center; color: var(--st-accent); font-size: 15px; }
.st-pdesigns { display: flex; flex-wrap: wrap; gap: 5px; }
.st-pchip { display: inline-flex; border: 1px solid var(--glass-line); background: var(--glass-hi); }
.st-pchip button { border: 0; background: none; color: var(--text); font: 600 11.5px var(--font-body); padding: 5px 8px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.st-pchip button + button { color: var(--muted); padding: 5px 7px; box-shadow: inset 1px 0 0 var(--glass-line); }
.st-pchip button:hover { color: var(--text); background: var(--glass-hi); }
.st-pchip-c { width: 10px; height: 10px; background: var(--c); }

/* ---- basemaps ------------------------------------------------------------------------------------------------ */
.st-bms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.st-bm { border: 1px solid var(--glass-line); border-radius: 0; padding: 0; background: var(--glass-hi); cursor: pointer; overflow: hidden; color: var(--text); text-align: left; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
.st-bm:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.st-bm.is-on { border-color: var(--st-accent); box-shadow: inset 0 -2px 0 var(--st-accent); }
.st-bm span { display: block; aspect-ratio: 1.25; background: #1f2937 center / cover no-repeat; }
.st-bm b { display: block; font: 600 10.5px var(--font-body); padding: 5px 6px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-globe-opts { padding: 10px 0 0 12px; margin: 2px 0 4px; border-left: 2px solid var(--glass-line); animation: st-fade .25s; }

/* ---- modals -------------------------------------------------------------------------------------------------- */
.st-modal-root { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.st-scrim { position: fixed; inset: 0; background: rgba(2, 4, 8, .62); display: grid; place-items: center; padding: 18px; pointer-events: auto; animation: st-fade .2s; }
[data-theme="light"] .st-scrim { background: rgba(10, 13, 18, .45); }
.st-modal { width: min(560px, 100%); max-height: calc(100vh - 36px); overflow-y: auto; border-radius: 0; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .8); animation: st-pop .28s var(--ease); position: relative; }
.st-modal::before { content: ""; position: sticky; display: block; top: 0; left: 0; right: 0; height: 2px; margin-bottom: -2px; background: var(--spectrum); z-index: 3; }
.st-modal.wide { width: min(820px, 100%); }
.st-modal.full { width: min(1180px, 100%); height: min(820px, calc(100vh - 36px)); display: flex; flex-direction: column; overflow: hidden; }
.st-modal-head { padding: 22px 24px 4px; display: flex; gap: 14px; align-items: flex-start; }
.st-modal-head h2 { margin: 0; font: 800 17px/1.15 var(--font-display); font-stretch: 118%; letter-spacing: .01em; text-transform: uppercase; }
.st-modal-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.st-modal-head .st-ibtn { margin-left: auto; }
.st-modal-body { padding: 16px 24px 24px; }
.st-modal-foot { padding: 14px 24px 18px; display: flex; gap: 8px; justify-content: flex-end; align-items: center; border-top: 1px solid var(--glass-line); flex-wrap: wrap; }
.st-foot-note { margin-right: auto; font-size: 12px; color: var(--muted); display: inline-flex; gap: 7px; align-items: center; }
.st-foot-note > i { color: var(--c-teal); }
.st-mh-ico { width: 48px; height: 44px; clip-path: var(--hex); display: grid; place-items: center; font-size: 19px; color: #fff; background: var(--primary-grad); flex: none; }

/* start sheet */
.st-start { width: min(920px, 100%); }
.st-start-hero { padding: 32px 32px 6px; position: relative; overflow: hidden; }
.st-start-hero::after { content: ""; position: absolute; left: 32px; bottom: -6px; width: 60px; height: 2px; background: var(--spectrum); }
.st-start-hero h2 { position: relative; margin: 0; font: 800 30px/1.02 var(--font-display); font-stretch: 125%; letter-spacing: -.01em; text-transform: uppercase; }
.st-start-hero h2 em { font-style: normal; background: var(--spectrum); -webkit-background-clip: text; background-clip: text; color: transparent; }
.st-start-hero p { position: relative; color: var(--muted); font-size: 14.5px; margin: 12px 0 0; max-width: 580px; }
.st-start-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 26px 32px 32px; }
.st-start-card { text-align: left; border: 1px solid var(--glass-line); border-radius: 0; padding: 18px; background: var(--glass-hi); color: var(--text); cursor: pointer; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; position: relative; animation: st-rise .35s var(--ease) both; }
.st-start-card:nth-child(2) { animation-delay: .04s; } .st-start-card:nth-child(3) { animation-delay: .08s; } .st-start-card:nth-child(4) { animation-delay: .12s; } .st-start-card:nth-child(5) { animation-delay: .16s; } .st-start-card:nth-child(6) { animation-delay: .2s; }
.st-start-card::after { content: ""; position: absolute; top: -1px; right: -1px; width: 12px; height: 12px; background: linear-gradient(225deg, var(--c) 0 50%, transparent 50%); }
.st-start-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 60%, transparent); box-shadow: inset 0 2px 0 var(--c), var(--pop-shadow); }
.st-start-card i { font-size: 20px; width: 50px; height: 45px; clip-path: var(--hex); display: grid; place-items: center; background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--c); margin-bottom: 14px; }
.st-start-card b { display: block; font: 800 12.5px var(--font-display); font-stretch: 118%; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 6px; }
.st-start-card span { font-size: 12.5px; color: var(--muted); line-height: 1.45; }

/* unlock card */
.st-unlock-hero { padding: 28px 24px 18px; text-align: center; position: relative; overflow: hidden; background: linear-gradient(180deg, color-mix(in srgb, var(--c-violet) 14%, transparent), transparent); }
.st-unlock-hero .st-sw { width: 62px; height: 56px; font-size: 22px; margin: 0 auto 12px; }
.st-unlock-hero h2 { margin: 0; font: 800 17px var(--font-display); font-stretch: 118%; text-transform: uppercase; letter-spacing: .02em; }
.st-unlock-hero p { margin: 6px auto 0; color: var(--muted); font-size: 13px; max-width: 420px; }
.st-offer { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--glass-line); background: var(--glass-hi); margin-bottom: 8px; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.st-offer:hover { border-color: var(--st-accent); }
.st-offer:has(input:checked) { border-color: var(--st-accent); box-shadow: inset 3px 0 0 var(--st-accent); }
.st-offer.best { border-color: rgba(139, 92, 246, .55); background: rgba(139, 92, 246, .08); }
.st-offer input { accent-color: var(--st-accent); width: 18px; height: 18px; }
.st-offer div { flex: 1; }
.st-offer b { display: block; font-size: 13.5px; }
.st-offer span { font-size: 12px; color: var(--muted); }
.st-offer strong { font: 800 20px var(--font-display); font-stretch: 112%; }
.st-ticks { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); }
.st-ticks li::before { content: "\2713"; color: var(--c-teal); font-weight: 800; margin-right: 8px; }
.st-cart-list { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 12px; }
.st-cart-item { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 8px 10px; background: var(--glass-hi); border: 1px solid var(--glass-line); }
.st-cart-item span { flex: 1; }
.st-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--muted); }
.st-total b { font: 800 22px var(--font-display); color: var(--text); }

/* share & export */
.st-modal .st-row > label.small { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.st .st-modal .st-row > label.small .select { height: 32px !important; width: auto; padding: 0 28px 0 8px !important; }
.st-share-link { display: flex; gap: 6px; }
.st-share-link .input { flex: 1; font-family: var(--font-mono); font-size: 12px; }
.st-code { width: 100%; min-height: 96px; font: 12px/1.5 var(--font-mono) !important; resize: vertical; }
.st-socials { display: flex; gap: 6px; flex-wrap: wrap; }
.st-socials a { width: 42px; height: 38px; clip-path: var(--hex); display: grid; place-items: center; background: var(--glass-line); color: var(--text); text-decoration: none; font-size: 15px; transition: background-color .2s, color .2s, transform .2s var(--ease); }
.st-socials a:hover { transform: translateY(-2px); background: var(--st-accent); color: #fff; }
.st-formats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.st-format { text-align: left; padding: 14px; border: 1px solid var(--glass-line); border-radius: 0; background: var(--glass-hi); color: var(--text); cursor: pointer; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; position: relative; }
.st-format:hover { transform: translateY(-2px); border-color: var(--st-accent); box-shadow: inset 0 2px 0 var(--st-accent); }
.st-format i.fi { font-size: 20px; margin-bottom: 8px; display: block; background: var(--spectrum); -webkit-background-clip: text; background-clip: text; color: transparent; }
.st-format b { display: block; font: 800 11.5px var(--font-display); font-stretch: 112%; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 4px; }
.st-format span { font-size: 11.5px; color: var(--muted); line-height: 1.4; display: block; }
.st-format.is-locked { cursor: default; }
.st-format.is-locked:hover { transform: none; box-shadow: none; border-color: var(--glass-line); }
.st-format.is-locked::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, color-mix(in srgb, var(--bg) 55%, transparent)); }
.st-format .lk { position: absolute; top: 12px; right: 12px; color: var(--muted); font-size: 12px; }
.st-upsell { padding: 16px; margin-bottom: 16px; background: color-mix(in srgb, var(--c-violet) 10%, transparent); border: 1px solid rgba(139, 92, 246, .4); border-left: 3px solid var(--c-violet); }
.st-upsell b { font: 800 12px var(--font-display); font-stretch: 118%; letter-spacing: .05em; text-transform: uppercase; display: block; margin-bottom: 6px; }
.st-upsell p { margin: 0 0 10px; font-size: 13px; color: var(--muted); }

/* the import preview, the attribute table, statistics */
.st-preview-table { overflow-x: auto; border: 1px solid var(--glass-line); margin-bottom: 14px; }
.st-preview-table table, .st-table { border-collapse: collapse; width: 100%; font-size: 12px; }
.st-preview-table th, .st-table th { text-align: left; font: 700 9px var(--font-display); font-stretch: 118%; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; background: var(--glass-hi); border-bottom: 1px solid var(--glass-line); white-space: nowrap; }
.st-preview-table td, .st-table td { padding: 6px 10px; border-bottom: 1px solid var(--glass-line); white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.st-table-body { flex: 1; display: flex; flex-direction: column; min-height: 0; padding-bottom: 16px; }
.st-table-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.st-table-bar .st-csearch { margin: 0; flex: 1 1 240px; max-width: 420px; }
.st-table-wrap { flex: 1; min-height: 0; overflow: auto; border: 1px solid var(--glass-line); }
.st-table-sm { max-height: 280px; margin-bottom: 18px; }
.st-table thead th { position: sticky; top: 0; z-index: 1; background: var(--glass-2); cursor: pointer; user-select: none; }
.st-table thead th:hover, .st-table thead th.is-sort { color: var(--text); }
.st-table tbody tr { transition: background-color .12s; }
.st-table tbody tr:hover { background: color-mix(in srgb, var(--st-accent) 7%, transparent); }
.st-table td[contenteditable] { cursor: text; outline: none; }
.st-table td[contenteditable]:focus { box-shadow: inset 0 0 0 1px var(--st-accent); background: var(--glass-hi); white-space: normal; text-overflow: clip; }
.st-table .st-tn { width: 46px; text-align: right; color: var(--muted); font-family: var(--font-mono); }
.st-table .st-tn button { border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; padding: 2px 4px; }
.st-table .st-tn button:hover { color: var(--st-accent); }
.st-table .st-ibtn { width: 24px; height: 24px; font-size: 11px; }
.st-more { margin: 10px auto; display: flex; }
.st-statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; background: var(--glass-line); border: 1px solid var(--glass-line); margin-bottom: 18px; }
.st-statgrid > div { background: var(--glass-2); padding: 14px 16px; }
.st-statgrid b { display: block; font: 800 22px/1.1 var(--font-display); font-stretch: 118%; }
.st-statgrid span { font-size: 11.5px; color: var(--muted); }
.st-bars { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.st-bar { display: grid; grid-template-columns: minmax(80px, 34%) 1fr auto; gap: 10px; align-items: center; font-size: 12.5px; }
.st-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: capitalize; }
.st-bar i { height: 10px; width: var(--w); background: var(--primary-grad); transform-origin: left; animation: st-grow .5s var(--ease) both; }
.st-bar b { font: 600 11.5px var(--font-mono); color: var(--muted); }
.st .st-inline-select { display: inline-block; width: auto; height: 28px; font: 600 11px var(--font-body); letter-spacing: 0; text-transform: none; padding: 0 28px 0 8px; margin-left: 4px; }
/* the popup designer */
.st-designer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 24px; align-items: start; }
.st-designer-preview { position: sticky; top: 0; }
.st-pop-preview { margin-top: 6px; padding: 26px 18px; display: grid; place-items: center; min-height: 260px; border: 1px solid var(--glass-line);
    background-color: var(--bg); background-image: linear-gradient(var(--glass-line) 1px, transparent 1px), linear-gradient(90deg, var(--glass-line) 1px, transparent 1px); background-size: 22px 22px; }
.st-pop-mock { position: relative !important; transform: none !important; width: 100%; display: flex; justify-content: center; }
.st-pop-mock .maplibregl-popup-content { width: 100%; animation: none; }

/* tooltip, drop overlay, tip boxes, progress */
.st-tip { position: fixed; z-index: 200; pointer-events: none; background: var(--tip-bg); color: var(--tip-fg); font: 600 11px var(--font-body); padding: 6px 9px; border-radius: 0; box-shadow: 0 10px 24px rgba(0, 0, 0, .35); white-space: nowrap; border-left: 2px solid #3BA7FF; animation: st-fade .15s; }
.st-drop { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; background: rgba(5, 7, 11, .72); animation: st-fade .15s; }
.st-drop div { border: 2px dashed #3BA7FF; padding: 50px 70px; text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; color: #C3CAD5; background: rgba(5, 7, 11, .6); animation: st-pop .25s var(--ease); }
.st-drop i { font-size: 40px; color: #3BA7FF; }
.st-drop b { font: 800 18px var(--font-display); font-stretch: 118%; text-transform: uppercase; letter-spacing: .04em; color: #fff; }
.st-noscript { position: fixed; inset: 0; display: grid; place-items: center; text-align: center; padding: 30px; background: var(--bg); color: var(--text); z-index: 300; }
.st-tipbox { display: flex; gap: 10px; padding: 11px 12px; background: color-mix(in srgb, var(--st-accent) 8%, transparent); border: 1px solid color-mix(in srgb, var(--st-accent) 28%, transparent); border-left: 3px solid var(--st-accent); font-size: 12.5px; line-height: 1.45; margin-bottom: 14px; }
.st-tipbox i { color: var(--st-accent); margin-top: 2px; }
.st-tipbox button { margin-left: auto; align-self: flex-start; border: 0; background: none; color: var(--muted); cursor: pointer; }
.st-kbds { display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; font-size: 12.5px; }
.st-kbds kbd { font: 500 10.5px var(--font-mono); border: 1px solid var(--glass-line); border-bottom-width: 2px; border-radius: 0; padding: 1px 6px; color: var(--text); background: var(--glass-hi); box-shadow: none; }
.st-links { display: flex; flex-direction: column; gap: 2px; }
.st-links a { color: var(--text); text-decoration: none; font-size: 13px; padding: 7px 8px; display: flex; gap: 10px; align-items: center; transition: background-color .15s, box-shadow .15s; }
.st-links a:hover { background: var(--glass-hi); box-shadow: inset 2px 0 0 var(--st-accent); }
.st-links a i { color: var(--muted); width: 16px; }
.st-progress { height: 3px; background: var(--glass-line); overflow: hidden; margin-top: 8px; }
.st-progress i { display: block; height: 100%; width: 0; background: var(--spectrum); transition: width .2s; }

/* toasts in the app: above the status bar, with an action button */
.app .toasts { bottom: 44px; }
.toast-act { padding-right: 8px; }
.toast-btn { margin-left: 6px; border: 0; background: transparent; color: var(--st-accent, #3BA7FF); font: 800 10px var(--font-display); font-stretch: 118%; letter-spacing: .12em; text-transform: uppercase; padding: 8px 10px; cursor: pointer; box-shadow: inset 0 0 0 1px currentColor; white-space: nowrap; transition: background-color .15s, color .15s; }
.toast-btn:hover { background: var(--st-accent, #3BA7FF); color: #fff; box-shadow: none; }
[data-theme="light"] .toast-btn { color: #2563EB; }

/* ---- map popups ---------------------------------------------------------------------------------------------- */
.mb-popup { max-width: 92vw !important; }
.mb-popup .maplibregl-popup-content { color: var(--text); border-radius: 0; padding: 0; box-shadow: var(--pop-shadow); overflow: hidden; min-width: 220px; font-family: var(--font-body); animation: mb-pop-in .2s var(--ease); }
.mb-popup .maplibregl-popup-tip { border-top-color: var(--glass-line) !important; border-bottom-color: var(--glass-line) !important; }
.mb-popup.maplibregl-popup-anchor-bottom .maplibregl-popup-tip, .mb-popup.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip, .mb-popup.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: var(--glass-2) !important; }
.mb-popup.maplibregl-popup-anchor-top .maplibregl-popup-tip, .mb-popup.maplibregl-popup-anchor-top-left .maplibregl-popup-tip, .mb-popup.maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: var(--glass-2) !important; }
.mb-popup .maplibregl-popup-close-button { color: var(--muted); font-size: 18px; width: 28px; height: 28px; right: 3px; top: 3px; border-radius: 0; z-index: 3; transition: color .15s, background-color .15s; }
.mb-popup .maplibregl-popup-close-button:hover { color: var(--text); background: var(--glass-hi); }
.mb-pop-wrap { --c: #3BA7FF; }
.mb-pop { position: relative; }
.mb-pop-in { padding: 13px 15px 14px; }
.mb-pop-img { width: 100%; height: 150px; object-fit: cover; display: block; }
.mb-pop-kind { font: 700 9px var(--font-display); font-stretch: 118%; letter-spacing: .14em; text-transform: uppercase; color: var(--c, var(--muted)); display: flex; gap: 6px; align-items: center; margin-bottom: 5px; }
.mb-pop h3 { margin: 0 26px 6px 0; font: 800 14.5px/1.2 var(--font-display); font-stretch: 108%; letter-spacing: 0; color: inherit; }
.mb-pop p { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); line-height: 1.5; white-space: pre-wrap; }
.mb-pop dl { margin: 6px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 12px; }
.mb-pop dt { color: var(--muted); text-transform: capitalize; }
.mb-pop dd { margin: 0; word-break: break-word; }
.mb-pop a { color: var(--c, #3BA7FF); text-decoration: none; }
.mb-pop a:hover { text-decoration: underline; }
.mb-pop-actions { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.mb-pop-actions a { font: 700 9.5px var(--font-display); font-stretch: 118%; letter-spacing: .1em; text-transform: uppercase; padding: 7px 10px; background: transparent; box-shadow: inset 0 0 0 1px var(--glass-line); color: inherit !important; display: inline-flex; gap: 6px; align-items: center; transition: background-color .15s, color .15s, box-shadow .15s; text-decoration: none !important; }
.mb-pop-actions a:hover, .mb-pop-actions a.is-primary { background: var(--cg, var(--c)); color: #fff !important; box-shadow: none; }
.mb-pop-actions a.is-primary:hover { filter: brightness(1.08); }
/* the address card a search opens */
.mb-pop-place h3 { margin-bottom: 8px; }
.mb-pop-addr { font-style: normal; display: grid; gap: 1px; font-size: 12.5px; line-height: 1.45; color: var(--text-2); margin: 0 0 10px; padding-left: 10px; border-left: 2px solid var(--glass-line); }
.mb-pop-addr span:first-child { color: var(--text); font-weight: 500; }
.mb-pop-coords { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 9px; border: 1px solid var(--glass-line); background: var(--glass-hi); color: var(--muted); cursor: pointer; font-size: 11.5px; text-align: left; transition: border-color .15s, color .15s; }
.mb-pop-coords .mono { flex: 1; color: var(--text); font-size: 11.5px; }
.mb-pop-coords:hover { border-color: var(--c); color: var(--text); }
.mb-pop-place .mb-pop-actions { margin-top: 10px; }
.mb-pop-body { font-size: 12.5px; line-height: 1.55; color: inherit; }
.mb-pop-body b { font-weight: 700; }
/* templates */
.mb-pop--card { box-shadow: inset 0 2px 0 var(--c); }
.mb-pop--card .mb-pop-img + .mb-pop-in { box-shadow: inset 0 2px 0 var(--c); }
.mb-pop-band { padding: 13px 40px 12px 15px; background: var(--cg, var(--c)); color: #fff; }
.mb-pop-band .mb-pop-kind { color: rgba(255, 255, 255, .82); }
.mb-pop-band h3 { margin: 0; color: #fff; }
.mb-popup .maplibregl-popup-content:has(.mb-pop-band, .mb-pop-hero) .maplibregl-popup-close-button { color: rgba(255, 255, 255, .85); }
.mb-pop-hero { position: relative; min-height: 170px; display: flex; align-items: flex-end; color: #fff; overflow: hidden; }
.mb-pop-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mb-pop-hero > div { position: relative; width: 100%; padding: 30px 15px 12px; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .78)); }
.mb-pop-hero .mb-pop-kind { color: rgba(255, 255, 255, .85); }
.mb-pop-hero h3 { margin: 0; color: #fff; font-size: 16px; }
.mb-pop--compact .mb-pop-in { display: flex; gap: 10px; align-items: flex-start; padding: 11px 36px 11px 13px; }
.mb-pop-dot { width: 12px; height: 11px; flex: none; margin-top: 3px; background: var(--cg, var(--c)); clip-path: var(--hex); }
.mb-pop--compact h3 { margin: 0 0 2px; font-size: 13.5px; }
.mb-pop--compact p { margin: 0; font-size: 12px; }
.mb-pop-table { grid-template-columns: 1fr !important; gap: 0 !important; border: 1px solid var(--glass-line); margin-top: 8px !important; }
.mb-pop-table dt { padding: 6px 9px 0; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.mb-pop-table dd { padding: 1px 9px 6px; border-bottom: 1px solid var(--glass-line); }
.mb-pop-table dd:last-child { border-bottom: 0; }
.mb-pop-table dt:nth-of-type(even), .mb-pop-table dd:nth-of-type(even) { background: var(--glass-hi); }
.mb-pop--minimal { box-shadow: inset 3px 0 0 var(--c); }
.mb-pop--minimal h3 { margin-bottom: 4px; }
/* people's own designs */
.mbp-l-card { box-shadow: inset 0 2px 0 var(--c); }
.mbp-l-minimal { box-shadow: inset 3px 0 0 var(--c); }
.mbp-bg-light { background: #FFFFFF; color: #0A0D12; --muted: #5C6470; --glass-line: rgba(10, 13, 18, .12); --glass-hi: rgba(10, 13, 18, .04); }
.mbp-bg-dark { background: #0C1017; color: #F3F5F8; --muted: #9AA3B0; --glass-line: rgba(255, 255, 255, .12); --glass-hi: rgba(255, 255, 255, .05); }
.mbp-bg-tint { background: color-mix(in srgb, var(--c) 16%, var(--glass-2)); }
.mb-popup .maplibregl-popup-content:has(.mbp-bg-light) { background: #FFFFFF; }
.mb-popup .maplibregl-popup-content:has(.mbp-bg-dark) { background: #0C1017; }
.mb-popup:has(.mbp-bg-light) .maplibregl-popup-tip { border-top-color: #FFFFFF !important; border-bottom-color: #FFFFFF !important; }
.mb-popup:has(.mbp-bg-dark) .maplibregl-popup-tip { border-top-color: #0C1017 !important; border-bottom-color: #0C1017 !important; }
.mb-popup .maplibregl-popup-content:has(.mbp-round) { border-radius: 14px; }
.mbp-round .mb-pop-actions a { border-radius: 8px; }
.mbp-s-s h3 { font-size: 13px; } .mbp-s-s .mb-pop-body, .mbp-s-s dl, .mbp-s-s p { font-size: 11.5px; }
.mbp-s-l h3 { font-size: 18px; } .mbp-s-l .mb-pop-body, .mbp-s-l dl, .mbp-s-l p { font-size: 14px; }
.mbp-s-l .mb-pop-in { padding: 16px 18px 17px; }

/* MapLibre's own controls, squared */
.maplibregl-ctrl-group { border-radius: 0 !important; box-shadow: var(--pop-shadow) !important; overflow: hidden; }
.maplibregl-ctrl-group button { border-radius: 0 !important; }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--glass-line) !important; }
.maplibregl-ctrl-group button:hover { background-color: var(--glass-hi) !important; }
[data-theme="dark"] .maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1) brightness(1.4); }
.maplibregl-ctrl-scale { background: var(--glass) !important; color: var(--text) !important; border-color: var(--muted) !important; border-radius: 0; font: 600 10px var(--font-mono); }
.maplibregl-ctrl-attrib { font-size: 10.5px; }
.maplibregl-ctrl-attrib.maplibregl-compact { border-radius: 0 !important; }
[data-theme="dark"] .maplibregl-ctrl-attrib.maplibregl-compact { background: rgba(8, 11, 16, .82); color: #cbd5e1; }
[data-theme="dark"] .maplibregl-ctrl-attrib a { color: #cbd5e1; }
.st-map.is-crosshair .maplibregl-canvas-container canvas { cursor: crosshair; }
.st-map.is-pointer .maplibregl-canvas-container canvas { cursor: pointer; }
.st-map.is-move .maplibregl-canvas-container canvas { cursor: move; }

/* ---- viewer -------------------------------------------------------------------------------------------------- */
.st-viewer { position: fixed; inset: 0; }
.viewer-seo { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.vw-device { position: absolute; inset: 0; border: 0 !important; border-radius: 0 !important; }
.vw-card { position: absolute; top: 12px; left: 12px; z-index: 8; width: min(340px, calc(100% - 90px)); border-radius: 0; padding: 16px 18px; box-shadow: var(--pop-shadow); animation: st-rise .35s var(--ease); }
.vw-card::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 2px; background: var(--spectrum); }
.vw-card h1 { margin: 0; font: 800 16px/1.15 var(--font-display); font-stretch: 118%; letter-spacing: .01em; text-transform: uppercase; padding-right: 26px; }
.vw-card p { margin: 8px 0 0; font-size: 13px; line-height: 1.55; color: var(--muted); white-space: pre-wrap; }
.vw-card .st-ibtn { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; }
.vw-card.is-collapsed p, .vw-card.is-collapsed .vw-layers { display: none; }
.vw-layers { margin-top: 12px; border-top: 1px solid var(--glass-line); padding-top: 10px; }
.vw-search { top: auto; left: 12px; }
.app-viewer .vw-search, .app-embed .vw-search { position: absolute; top: auto; bottom: 92px; left: 12px; width: min(300px, calc(100% - 24px)); }
.vw-actions { position: absolute; top: 12px; right: 56px; z-index: 8; display: flex; gap: 8px; }
.vw-actions .btn-ghost { background: var(--glass-2); -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur)); box-shadow: inset 0 0 0 1px var(--glass-line); }
.vw-actions .btn-ghost:hover { background: var(--text); }
.vw-badge { position: absolute; left: 12px; bottom: 14px; z-index: 9; display: flex; align-items: center; gap: 10px; padding: 7px 14px 7px 8px; border-radius: 0; text-decoration: none; color: var(--text); box-shadow: var(--pop-shadow); transition: transform .25s var(--ease), box-shadow .25s; }
.vw-badge::after { content: ""; position: absolute; top: -1px; right: -1px; width: 9px; height: 9px; background: linear-gradient(225deg, #3BA7FF 0 50%, transparent 50%); }
.vw-badge:hover { transform: translateY(-2px); box-shadow: inset 0 2px 0 #3BA7FF, var(--pop-shadow); }
.vw-badge svg { width: 30px; height: 30px; flex: none; }
.vw-badge b { display: block; font: 800 10.5px var(--font-display); font-stretch: 118%; letter-spacing: .08em; text-transform: uppercase; }
.vw-badge em { display: block; font-style: normal; font-size: 11px; color: var(--muted); }
.app-embed .vw-badge { padding: 5px 12px 5px 6px; bottom: 10px; }
.app-embed .vw-badge svg { width: 22px; height: 22px; }
.app-embed .vw-badge em { display: none; }
.vw-legend { left: auto; right: 12px; bottom: 40px; }
.st-viewer .maplibregl-ctrl-bottom-left { margin-bottom: 58px; }
.app-embed .st-viewer .maplibregl-ctrl-bottom-left { margin-bottom: 44px; }

/* ---- embed (tool iframes on /tools/*) ------------------------------------------------------------------------ */
.st.is-embed { --top: 0px; --rail: 0px; }
.st.is-embed .st-top, .st.is-embed .st-rail { display: none; }
.st.is-embed .st-open-full { display: inline-flex !important; gap: 6px; align-items: center; }
.st.is-embed .st-toolcard { top: 64px; }

/* ---- motion (transform + opacity only) ------------------------------------------------------------------------ */
@keyframes st-in { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
@keyframes st-in-r { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
@keyframes st-out { to { opacity: 0; transform: translateX(-10px); } }
@keyframes st-out-r { to { opacity: 0; transform: translateX(10px); } }
@keyframes st-drop { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes st-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes st-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes st-pop { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes st-grow { from { transform: scaleX(0); } to { transform: none; } }
@keyframes mb-pop-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes st-spin { to { transform: rotate(360deg); } }
@keyframes st-pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .st *, .st *::before, .st *::after, .mb-popup * { animation-duration: .001s !important; animation-delay: 0s !important; transition-duration: .001s !important; } }

/* ---- smaller screens ----------------------------------------------------------------------------------------- */
@media (max-width: 1100px) {
    .st-devices, .st-logo-word { display: none; }
    .st-start-grid { grid-template-columns: 1fr 1fr; }
    .st-designer { grid-template-columns: 1fr; }
    .st-designer-preview { position: static; order: -1; }
}
@media (max-width: 760px) {
    .st { --top: 52px; --rail: 0px; --status: 62px; }
    .st-top { gap: 6px; padding: 0 8px; }
    .st-title-wrap { border-left: 0; padding-left: 0; }
    .st-top-mid #st-undo-seg, .st-save { display: none; }
    .st-top-mid { margin: 0; }
    .st-pill span, .st-export span, .st-share span { display: none; }
    .st-pill { padding: 0 11px; }
    .st-top .btn-sm { padding: 0 11px; }
    .st-rail { top: auto; bottom: 0; left: 0; right: 0; width: auto; height: var(--status); flex-direction: row; justify-content: space-around; padding: 2px 4px calc(2px + env(safe-area-inset-bottom)); border-right-width: 0; border-top-width: 1px; z-index: 45; }
    .st-rail button { width: auto; flex: 1; padding: 8px 0 6px; font-size: 7.5px; letter-spacing: .08em; }
    .st-rail button::before { left: 8px; right: 8px; top: 0; bottom: auto; width: auto; height: 2px; transform: scaleX(0); background: var(--spectrum); }
    .st-rail button.is-on::before { transform: none; }
    .st-rail button[data-panel="help"] { display: none; }
    .st-rail-gap { display: none; }
    .st-status { display: none; }
    .st-panel, .st-insp { left: 0; right: 0; width: auto; top: auto; bottom: var(--status); max-height: 66vh; animation-name: st-up; }
    .st-panel.is-closing, .st-insp.is-closing { animation-name: st-down; }
    .st-panel-head::after { content: ""; position: absolute; top: 7px; left: 50%; transform: translateX(-50%); width: 38px; height: 3px; background: var(--glass-line); }
    .st-panel-head { position: relative; padding-top: 18px; }
    .st-insp { z-index: 46; bottom: 0; max-height: 74vh; }
    .st-search { width: calc(100% - 64px); }
    .st-toolcard { top: 62px; min-width: 0; width: calc(100% - 20px); }
    .st-legend { bottom: 12px; right: 10px; max-width: 200px; }
    .st-start-grid { grid-template-columns: 1fr; padding: 16px; }
    .st-start-hero { padding: 24px 20px 4px; }
    .st-start-hero::after { left: 20px; }
    .st-start-hero h2 { font-size: 22px; font-stretch: 112%; }
    .st-tgrid { grid-template-columns: 1fr 1fr; }
    .st-ptpls { grid-template-columns: repeat(4, 1fr); }
    .st-scrim { padding: 0; align-items: end; }
    .st-modal { max-height: 92vh; animation-name: st-up; }
    .st-modal.full { height: 92vh; }
    .vw-actions { top: auto; bottom: 14px; right: 10px; }
    .vw-actions .btn span { display: none; }
    .vw-card { width: calc(100% - 70px); padding: 12px 14px; }
    .app-viewer .vw-search, .app-embed .vw-search { display: none; }
    .app .toasts { bottom: calc(var(--status, 62px) + 72px); }
}
@keyframes st-up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes st-down { to { transform: translateY(30px); opacity: 0; } }
