/* Settings popup. Proportions follow Quantcept's sheet; every colour comes from LunaTerminal's tokens. */

/* ── Palettes (theme.js sets <html data-palette>). Luna is the default in styles.css. ── */
:root[data-palette="slate"] { --bg: #f7f8fa; --bg-inset: #eff1f4; --chip: #e8ebef; --bubble: #e8edf5; --text: #111827; --text-2: #3f4a5a; --text-3: #667085; --placeholder: #98a2b3; --line: #e4e7ec; --line-strong: #d0d5dd; --navy: #1a2740; --side-bg: linear-gradient(165deg, #111c33 0%, #1a2740 55%, #1f2d3f 100%); }
:root[data-palette="slate"][data-theme="dark"] { --bg: #0e1116; --bg-elevated: #161a21; --bg-inset: #1c212a; --chip: #20252f; --bubble: #1c2a3c; --text: #e7e9ee; --text-2: #bcc2cc; --text-3: #8a93a2; --placeholder: #626b79; --line: #272c36; --line-strong: #363c48; --navy: #e0e4ea; --side-bg: linear-gradient(165deg, #0b0e14 0%, #141922 55%, #181e28 100%); }

/* Moonlit replaced Koi pond: a navy night with moon-gold accents; its scene (ui/scene-palettes.js) paints the sky. */
:root[data-palette="moonlit"] { --bg: #dfe5f6; --bg-elevated: #fbfcff; --bg-inset: #eaeefa; --bg-hover: #141d440d; --bg-accent-soft: #7d651414; --chip: #dde3f5; --bubble: #ece7d2; --text: #111a38; --text-2: #3a4670; --text-3: #56628a; --placeholder: #8d97b8; --line: #d3daf0; --line-strong: #bcc6e6; --line-soft: #111a3812; --accent: #7d6514; --accent-hover: #66520f; --accent-ink: #fff; --accent-text: #6e5911; --navy: #111a38; --side-bg: linear-gradient(165deg, #0b1330 0%, #121d48 55%, #1b2a62 100%); }
:root[data-palette="moonlit"][data-theme="dark"] { --bg: #101a3c; --bg-elevated: #111a36; --bg-inset: #16204a; --bg-hover: #ffffff10; --bg-accent-soft: #d8c88a22; --chip: #18224a; --bubble: #1b2650; --text: #e8ecfa; --text-2: #b8c0e0; --text-3: #8f99c2; --placeholder: #626c96; --line: #1f2a52; --line-strong: #2b3868; --line-soft: #ffffff14; --accent: #d8c88a; --accent-hover: #e6d9a2; --accent-ink: #1d1a0c; --accent-text: #e2d49a; --navy: #e2e8fa; --side-bg: linear-gradient(165deg, #070b1c 0%, #0b1330 55%, #101c48 100%); }
/* Koi Pond, Jellyfish and Fireflies (ui/scene-palettes.js): each scene paints its own water or sky, so the
   sidebar and surfaces take their colours from it, as in the concept video's teal pond, deep sea and night meadow. */
:root[data-palette="bluekoi"] { --bg: #d9f0ea; --bg-elevated: #f7fcfa; --bg-inset: #e6f3ef; --bg-hover: #0f3b350d; --bg-accent-soft: #c2581b14; --chip: #d6ebe5; --bubble: #fbe6d6; --text: #0f2a26; --text-2: #35524c; --text-3: #4f6a63; --placeholder: #86a39c; --line: #cbe2dc; --line-strong: #b4d2ca; --line-soft: #0f2a2612; --accent: #c2581b; --accent-hover: #a84a14; --accent-ink: #fff; --accent-text: #a64812; --navy: #0f2a26; --side-bg: linear-gradient(165deg, #0f3a34 0%, #155048 55%, #1d6157 100%); }
:root[data-palette="bluekoi"][data-theme="dark"] { --bg: #1b544c; --bg-elevated: #10322d; --bg-inset: #163d37; --bg-hover: #ffffff10; --bg-accent-soft: #f08a4b24; --chip: #1a443e; --bubble: #22423c; --text: #e8f5f1; --text-2: #b9d4cd; --text-3: #94b5ad; --placeholder: #6a8b83; --line: #24504a; --line-strong: #2f625a; --line-soft: #ffffff14; --accent: #f08a4b; --accent-hover: #f59d66; --accent-ink: #2a1203; --accent-text: #f6a26e; --navy: #def2ec; --side-bg: linear-gradient(165deg, #0a2421 0%, #0e302c 55%, #123a35 100%); }
:root[data-palette="jellyfish"] { --bg: #d6e8f6; --bg-elevated: #f9fcff; --bg-inset: #e8f1f9; --bg-hover: #0b264a0d; --bg-accent-soft: #6b45bf14; --chip: #dde8f4; --bubble: #ece4fb; --text: #0d1f38; --text-2: #354a66; --text-3: #50657f; --placeholder: #8797ad; --line: #d3e1ee; --line-strong: #b9cde0; --line-soft: #0d1f3812; --accent: #6b45bf; --accent-hover: #5a37a8; --accent-ink: #fff; --accent-text: #5c38ad; --navy: #10274d; --side-bg: linear-gradient(165deg, #081a36 0%, #0b2547 55%, #10305a 100%); }
:root[data-palette="jellyfish"][data-theme="dark"] { --bg: #0b2948; --bg-elevated: #0c1f38; --bg-inset: #112a4a; --bg-hover: #ffffff10; --bg-accent-soft: #c29cff24; --chip: #142f52; --bubble: #1c2c4a; --text: #e6eefb; --text-2: #b6c6de; --text-3: #8c9dba; --placeholder: #5f7193; --line: #1c3557; --line-strong: #29466e; --line-soft: #ffffff14; --accent: #c29cff; --accent-hover: #d2b4ff; --accent-ink: #1a0b33; --accent-text: #cdb0ff; --navy: #e0e8f7; --side-bg: linear-gradient(165deg, #04101f 0%, #071a31 55%, #0a2240 100%); }
:root[data-palette="fireflies"] { --bg: #e4ebd8; --bg-elevated: #fbfcf7; --bg-inset: #eef2e6; --bg-hover: #1f2a160d; --bg-accent-soft: #a8680f14; --chip: #e2e9d6; --bubble: #f3e8cf; --text: #1d2716; --text-2: #46523c; --text-3: #5e6a53; --placeholder: #98a48c; --line: #d8e0cc; --line-strong: #c3cdb5; --line-soft: #1d271612; --accent: #9a5f0c; --accent-hover: #824f08; --accent-ink: #fff; --accent-text: #8a550a; --navy: #1d2716; --side-bg: linear-gradient(165deg, #121a10 0%, #18241a 55%, #1f3022 100%); }
:root[data-palette="fireflies"][data-theme="dark"] { --bg: #0d1a14; --bg-elevated: #111f18; --bg-inset: #16271e; --bg-hover: #ffffff0e; --bg-accent-soft: #dff27a1f; --chip: #1a2c22; --bubble: #1d2a1f; --text: #e9f1e4; --text-2: #bccab6; --text-3: #91a18d; --placeholder: #627260; --line: #1f3227; --line-strong: #2c4535; --line-soft: #ffffff12; --accent: #d8ef72; --accent-hover: #e4f590; --accent-ink: #182005; --accent-text: #dcf07e; --navy: #e4eedd; --side-bg: linear-gradient(165deg, #050b08 0%, #08120d 55%, #0c1a13 100%); }

/* Canvases live behind the desk and never receive clicks or keyboard focus. */
.main[data-ambient] { isolation: isolate; background: var(--bg); }
.palette-background { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; opacity: .62; }
/* The three scene palettes paint their own water and sky at full strength and show through the chat, as in the video;
   they quiet themselves behind the reading column, and chat text gets a soft halo in the scene's colour. */
.palette-background:is([data-kind="moonlit"], [data-kind="bluekoi"], [data-kind="jellyfish"], [data-kind="fireflies"]) { opacity: 1; }
:root .main:is([data-ambient="moonlit"], [data-ambient="bluekoi"], [data-ambient="jellyfish"], [data-ambient="fireflies"]) .thread { background: transparent; }
:root .main:is([data-ambient="moonlit"], [data-ambient="bluekoi"], [data-ambient="jellyfish"], [data-ambient="fireflies"]).empty .dock { background: none; }
.main:is([data-ambient="moonlit"], [data-ambient="bluekoi"], [data-ambient="jellyfish"], [data-ambient="fireflies"]) :is(.messages, .suggestions) { text-shadow: 0 0 10px var(--bg), 0 0 3px var(--bg), 0 0 1px var(--bg); }
.main[data-ambient].empty .dock { background: radial-gradient(ellipse at center, color-mix(in srgb, var(--bg) 97%, transparent), color-mix(in srgb, var(--bg) 86%, transparent) 65%, transparent 100%); }
.main[data-ambient] .thread, .main[data-ambient] .page-inner { background: color-mix(in srgb, var(--bg) 93%, transparent); }
/* The scene keeps moving behind every page, not just chat: anything painted in the page's own colour (the page, the
   Finance shell, a 13F card, the Agents, Calendar, Timeline and Activity pages) lets it through instead of covering it
   with the same colour. Panels in their own surface colour stay solid, so their text reads as before. */
#main[data-ambient] :is(.page, .page-inner, .qt-page, .qt-finance, .lab-card.hf, .agent-workspace) { background: transparent; }
#main[data-ambient] .agent-workspace { --aw-bg: transparent; --aw-divider: color-mix(in srgb, var(--line) 75%, var(--bg-elevated)); }
/* What shows data or is a main button stays solid on the scene: outlined buttons, chips, pill toggles, and the lists
   that sit straight on the page (Finance's watchlist and news rail, its suggested questions). Hover and selected tints
   are laid over the solid fill instead of replacing it. */
#main[data-ambient] :is(.btn-ghost, .chip, .hf-quarters) { background-color: var(--bg-elevated); }
#main[data-ambient] .hf-views-track { background-color: color-mix(in srgb, var(--text) 5%, var(--bg)); }
#main[data-ambient] :is(.chip, .qt-finance-prompt):hover { background-color: var(--bg-elevated); background-image: linear-gradient(var(--bg-hover), var(--bg-hover)); }
#main[data-ambient] :is(.chip.on, .chip[aria-pressed="true"]) { background-image: linear-gradient(var(--bg-accent-soft), var(--bg-accent-soft)); }
#main[data-ambient] :is(.qt-finance-rail, .qt-finance-prompts) { background-color: var(--bg); border-radius: 12px; box-shadow: 0 0 0 8px var(--bg); }
/* Headings that now sit on the scene get the chat's soft halo in the page colour. */
#main[data-ambient] :is(.aw-head, .aw-period, .lab-card.hf > .lab-head, .lab-card.hf > .hf-views, .hf-detail-head, .hf-explain, .lab-card.hf > .lab-foot, .qt-finance-section-head, .screen-head, .screen-count, .page-head, .qt-page-head, .qt-finance-titlebar, .qt-finance-nav) { text-shadow: 0 0 10px var(--bg), 0 0 3px var(--bg), 0 0 1px var(--bg); }

/* ── Typeface and chat text ── */
:root[data-ui-font="geist"] { --font-ui: "Geist", ui-sans-serif, system-ui, sans-serif; }
:root[data-ui-font="inter"] { --font-ui: "Inter", ui-sans-serif, system-ui, sans-serif; }
:root[data-ui-font="plex"] { --font-ui: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif; }
:root[data-ui-font="system"] { --font-ui: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
:root[data-chat-font="mono"] :is(.md, .bubble) { font-family: var(--font-mono); font-size: .92em; }
/* Interface zoom keeps full-height pages inside the window. */
.app[data-stock-style="tradingview"] .stock-scene { height: calc(100dvh / var(--ui-scale, 1)); min-height: calc(100dvh / var(--ui-scale, 1)); }
/* Toasts stay visible above the sheet. */
.toast { z-index: 100; }

/* ── Shell ── */
.st-scrim { position: fixed; inset: 0; z-index: 75; display: flex; justify-content: center; align-items: center; padding: 12px 24px; background: #0a1f5c4d; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: st-scrim-in .16s; }
:root[data-theme="dark"] .st-scrim { background: #00000080; }
.st-scrim[data-state="closed"] { animation: st-scrim-out .2s forwards; pointer-events: none; }
.st-scrim[data-state="closed"] .st-window { animation: st-window-out .16s cubic-bezier(.4, 0, 1, 1) forwards; }
.st-window {
  --st-card: var(--bg-elevated); --st-card-border: var(--line); --st-card-shadow: 0 1px 2px #0d192d0f, 0 6px 18px #0a1f5c0d; --st-divider: var(--line);
  --st-rail-text: var(--side-text); --st-rail-text-2: var(--side-text-2); --st-rail-text-3: var(--side-text-3); --st-rail-line: var(--side-line); --st-rail-hover: var(--side-hover); --st-rail-card: #ffffff14; --st-rail-card-border: #ffffff26; --st-rail-accent: #7fd0f7;
  zoom: var(--ui-scale, 1);
  display: flex; flex-direction: column; overflow: hidden; width: min(1080px, 100%); height: min(900px, calc(100dvh / var(--ui-scale, 1) - 24px));
  border-radius: var(--r-xl); background: var(--side-bg); box-shadow: var(--shadow-pop); animation: st-window-in .24s var(--ease-out);
}
.st-window:focus-visible { outline: none; }
:root[data-theme="dark"] .st-window { --st-card-shadow: 0 1px 2px #00000059, 0 8px 22px #0000003d; --st-card-border: var(--line-strong); }
.st-titlebar { display: flex; flex-shrink: 0; justify-content: space-between; align-items: center; gap: 12px; height: 64px; padding: 0 14px 0 28px; color: var(--st-rail-text); box-shadow: inset 0 -1px 0 var(--st-rail-line); }
.st-window-title { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.st-close { display: inline-grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border-radius: var(--r-md); color: inherit; opacity: .8; transition: background-color .12s, opacity .12s; }
.st-close:hover { background: var(--st-rail-hover); opacity: 1; }
.st-back { display: none; align-items: center; gap: 8px; height: 36px; margin-inline-start: -12px; padding: 0 10px; border-radius: var(--r-md); font-size: 15px; font-weight: 600; white-space: nowrap; }
.st-back:hover { background: var(--bg-hover); }
.st-back svg { width: 18px; height: 18px; display: block; }
.st-body { display: flex; flex: 1; min-height: 0; }
.st-rail { display: flex; flex-direction: column; flex-shrink: 0; width: 248px; padding: 16px 12px 14px; overflow-y: auto; box-shadow: inset -1px 0 0 var(--st-rail-line); color: var(--st-rail-text); }
.st-nav { position: relative; display: flex; flex-direction: column; }
.st-nav-ind { position: absolute; top: 0; left: 0; right: 0; height: 38px; border-radius: var(--r-md); background: var(--st-rail-card); box-shadow: inset 0 0 0 1px var(--st-rail-card-border); pointer-events: none; transition: transform .24s var(--ease), height .24s var(--ease), opacity .16s ease; }
.st-nav-ind::before { content: ""; position: absolute; top: 9px; bottom: 9px; inset-inline-start: 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--st-rail-accent); }
.st-nav-group { display: flex; flex-direction: column; }
.st-nav-group + .st-nav-group { margin-top: 16px; }
.st-nav-label { margin: 0 10px 6px; color: var(--st-rail-text-3); font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.st-nav-items { display: flex; flex-direction: column; gap: 2px; }
.st-nav-item { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 0 10px 0 12px; border-radius: var(--r-md); color: var(--st-rail-text-2); font-size: 14px; text-align: start; transition: background-color .12s, color .12s; }
.st-nav-item:hover { background: var(--st-rail-hover); color: var(--st-rail-text); }
.st-nav-item.on, .st-nav-item.on:hover { background: none; color: var(--st-rail-text); font-weight: 500; }
.st-nav-item.on .st-nav-icon { color: var(--st-rail-accent); }
.st-nav-icon { display: grid; place-items: center; flex-shrink: 0; width: 20px; height: 20px; }
.st-nav-icon svg { display: block; width: 16px; height: 16px; }
.st-nav-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.st-nav-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-nav-desc, .st-nav-chevron { display: none; }
.st-rail-foot { display: flex; flex-direction: column; gap: 6px; margin-top: auto; padding-top: 16px; }
.st-me { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-lg); background: var(--st-rail-card); box-shadow: inset 0 0 0 1px var(--st-rail-card-border); }
.st-me .account-avatar { width: 30px; height: 30px; font-size: 12.5px; }
.st-me-text { min-width: 0; }
.st-me-name { overflow: hidden; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.st-me-email { overflow: hidden; color: var(--st-rail-text-3); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.st-me-plan { padding: 2px 7px; border-radius: 999px; background: #7fd0f726; color: var(--st-rail-accent); font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.st-signout { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border-radius: var(--r-md); color: var(--st-rail-text-2); font-size: 14px; transition: background-color .12s, color .12s; }
.st-signout svg { display: block; width: 16px; height: 16px; }
.st-signout:hover { background: #f0616b26; color: #ff9aa2; }
.st-content { flex: 1; min-width: 0; padding: 28px 36px 56px; overflow-y: auto; background: var(--bg); color: var(--text); container: st-settings / inline-size; }
.st-inner { max-width: 760px; margin: 0 auto; animation: st-panel-in .22s var(--ease-out); }
.st-inner[data-entering] > section { animation: st-section-in .22s var(--ease-out) backwards; }
.st-inner[data-entering] > section:nth-of-type(2) { animation-delay: 24ms; }
.st-inner[data-entering] > section:nth-of-type(3) { animation-delay: 48ms; }
.st-inner[data-entering] > section:nth-of-type(4) { animation-delay: 72ms; }
.st-inner[data-entering] > section:nth-of-type(n+5) { animation-delay: 96ms; }
@keyframes st-scrim-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes st-scrim-out { to { opacity: 0; } }
@keyframes st-window-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes st-window-out { to { opacity: 0; transform: translateY(8px) scale(.985); } }
@keyframes st-panel-in { from { opacity: 0; transform: translateY(calc(var(--panel-dir, 0) * 8px)); } to { opacity: 1; transform: none; } }
@keyframes st-section-in { from { opacity: 0; transform: translateY(calc(var(--panel-dir, 0) * 4px)); } }

/* ── Panel parts ── */
.st-i, .st-row-icon svg { display: inline-grid; place-items: center; }
.st-i svg { display: block; width: 15px; height: 15px; }
.st-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.st-header-text { min-width: 0; }
.st-title { margin: 0; font-size: 22px; font-weight: 600; line-height: 1.3; letter-spacing: -.015em; }
.st-desc { max-width: 560px; margin: 4px 0 0; color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
.st-header-actions, .st-section-action, .st-foot-actions { display: flex; flex-shrink: 0; align-items: center; gap: 8px; }
.st-section { margin-bottom: 28px; }
.st-section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 0 4px 10px; }
.st-section-title { margin: 0; font-size: 15px; font-weight: 600; }
.st-section-desc { margin: 3px 0 0; color: var(--text-3); font-size: 13px; line-height: 1.5; }
.st-card { min-width: 0; padding: 0 20px; overflow: hidden; border-radius: var(--r-lg); background: var(--st-card); box-shadow: inset 0 0 0 1px var(--st-card-border), var(--st-card-shadow); }
.st-card-danger { background: color-mix(in srgb, var(--danger) 6%, var(--st-card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 45%, transparent), var(--st-card-shadow); }
.st-row { display: flex; align-items: center; gap: 16px; min-height: 60px; padding: 12px 0; }
.st-row + .st-row, .st-row + .st-card-foot, .st-list + .st-card-foot, .st-entries + .st-card-foot, .st-row + .st-list, .st-list .st-row + .st-row, .st-pad + .st-card-foot, .st-row + .st-sample, .st-entry + .st-entry, .st-entry + .st-card-foot { box-shadow: inset 0 1px 0 var(--st-divider); }
.st-row-icon { display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: var(--r-md); background: var(--bg-inset); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2); }
.st-row-icon svg { display: block; width: 16px; height: 16px; }
.st-row-main { flex: 1; min-width: 0; }
.st-row-label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--text); font-size: 14px; font-weight: 500; }
.st-row-desc { margin-top: 2px; color: var(--text-3); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.st-row-control { display: flex; flex-shrink: 0; justify-content: flex-end; align-items: center; gap: 8px; }
.st-value { overflow: hidden; color: var(--text-2); font-size: 13.5px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.st-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; margin: 0 -20px; padding: 10px 20px; background: color-mix(in srgb, var(--bg-inset) 65%, var(--st-card)); }
.st-foot-hint { color: var(--text-3); font-size: 12.5px; line-height: 1.45; }
.st-pad { padding: 16px 0; }
.st-note { margin: 0; padding: 14px 0; color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
.st-stack .st-note { padding: 0; }
.st-empty { margin: 0; padding: 22px 0; color: var(--text-3); font-size: 13.5px; text-align: center; }
.st-alert { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; padding: 12px 14px; border-radius: var(--r-md); background: color-mix(in srgb, var(--danger) 10%, var(--st-card)); color: var(--danger); font-size: 13.5px; }
.st-skeleton { display: flex; flex-direction: column; gap: 10px; padding: 20px 0; }
.st-skeleton i { display: block; height: 12px; border-radius: 6px; background: var(--bg-inset); animation: st-pulse 1.3s ease-in-out infinite; }
.st-skeleton i:nth-child(1) { width: 40%; } .st-skeleton i:nth-child(2) { width: 85%; } .st-skeleton i:nth-child(3) { width: 70%; }
@keyframes st-pulse { 50% { opacity: .5; } }
.st-sample { margin: 0 -20px; padding: 14px 20px; color: var(--text-2); font-size: 14px; line-height: 1.55; }

.st-btn { display: inline-flex; justify-content: center; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r-md); font-size: 13px; font-weight: 500; white-space: nowrap; text-decoration: none; transition: background-color .12s, color .12s, box-shadow .12s, opacity .12s; }
.st-btn:disabled { cursor: not-allowed; opacity: .5; }
.st-btn-primary { background: var(--accent); color: var(--accent-ink); }
.st-btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.st-btn-secondary { background: var(--st-card); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text); }
.st-btn-secondary:hover:not(:disabled) { background: var(--bg-hover); }
.st-btn-ghost { color: var(--text-2); }
.st-btn-ghost:hover:not(:disabled) { background: var(--bg-hover); color: var(--text); }
.st-btn-danger { background: var(--danger); color: #fff; }
.st-btn-danger:hover:not(:disabled) { background: color-mix(in srgb, var(--danger) 85%, #000); }
:root[data-theme="dark"] .st-btn-danger { color: #24060a; }
.st-btn-danger-ghost { color: var(--danger); }
.st-btn-danger-ghost:hover:not(:disabled) { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.st-icon-btn { display: inline-grid; place-items: center; flex-shrink: 0; width: 30px; height: 30px; border-radius: var(--r-md); color: var(--text-3); transition: background-color .12s, color .12s; }
.st-icon-btn:hover { background: var(--bg-hover); color: var(--text); }
.st-icon-btn.on { color: var(--accent-text); }
.st-pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--chip); color: var(--text-2); font-size: 11.5px; font-weight: 600; line-height: 1; white-space: nowrap; }
.st-pill-ok, .st-pill-info { background: var(--bg-accent-soft); color: var(--accent-text); }
.st-pill-warn { background: color-mix(in srgb, #c48a1e 16%, transparent); color: #8a5f0e; }
:root[data-theme="dark"] .st-pill-warn { color: #e9b95c; }
.st-seg { position: relative; display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-md); background: var(--bg-inset); box-shadow: inset 0 0 0 1px var(--line); }
.st-seg-btn { display: inline-flex; justify-content: center; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--r-sm); color: var(--text-2); font-size: 13px; white-space: nowrap; transition: background-color .12s, color .12s, box-shadow .12s; }
.st-seg-btn svg { width: 14px; height: 14px; }
.st-seg-btn:hover { color: var(--text); }
.st-seg-btn[aria-checked="true"] { background: var(--st-card); box-shadow: 0 1px 2px #0000002e, inset 0 0 0 1px var(--line-strong); color: var(--text); font-weight: 500; }
.st-switch { flex-shrink: 0; position: relative; width: 36px; height: 20px; margin: 0; border-radius: 999px; background: var(--line-strong); cursor: pointer; appearance: none; -webkit-appearance: none; transition: background-color .16s; }
.st-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px #00000040; transition: transform .16s var(--ease); }
.st-switch:checked { background: var(--accent); }
.st-switch:checked::after { transform: translateX(16px); }
.st-switch:disabled { cursor: not-allowed; opacity: .5; }
.st-select, .st-input { width: 100%; min-width: 0; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--st-card); color: var(--text); font-size: 13.5px; outline: 0; }
.st-select { height: 34px; padding-right: 30px; appearance: none; -webkit-appearance: none; background: var(--st-card) var(--chevron) no-repeat right 10px center / 12px; }
.st-input { height: 36px; }
.st-input[type="file"] { height: auto; padding: 8px 10px; }
.st-textarea { height: auto; padding: 10px 12px; line-height: 1.5; resize: vertical; }
.st-mono { font-family: var(--font-mono); font-size: 12.5px; }
.st-select:focus, .st-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--bg-accent-soft); }
.st-input::placeholder { color: var(--placeholder); }
.st-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.st-field-label { color: var(--text-2); font-size: 12.5px; font-weight: 500; }
.st-field-hint { color: var(--text-3); font-size: 12px; line-height: 1.45; }
.st-form-error { margin: 0; color: var(--danger); font-size: 12.5px; line-height: 1.45; }
.st-stack { display: flex; flex-direction: column; gap: 14px; }
.st-stack[hidden], .st-form-error[hidden] { display: none; }
.st-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.st-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.st-details { padding: 12px 0; }
.st-details summary { color: var(--text-2); font-size: 13.5px; cursor: pointer; }
.st-sees { margin: 12px 0 0; max-height: 320px; padding: 12px; overflow: auto; border-radius: var(--r-md); background: var(--bg-inset); color: var(--text-2); font: 12.5px/1.55 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.st-link { padding: 0; color: var(--accent-text); font-size: inherit; font-weight: 500; text-decoration: underline; }
.st-linkback { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px; color: var(--text-2); font-size: 13px; }
.st-linkback:hover { color: var(--text); }

/* Existing account forms keep working inside cards. */
.st-card .account-profile-form { max-width: none; padding: 18px 0 20px; }
.st-card .account-setting-row { margin: 0; padding: 12px 0; min-height: 60px; border: 0; box-shadow: inset 0 -1px 0 var(--st-divider); }
.st-card > div > .account-setting-row:last-child, .st-card > div > .account-setting-row:only-child { box-shadow: none; }
.st-card .account-select { max-width: 300px; width: 300px; }
.st-card .account-hint { margin: 0; padding: 12px 0; }
.st-inner .desktop-download-content > .fin-note:first-child { margin-top: 0; }

/* Appearance */
.st-palettes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.st-palette { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-lg); background: var(--st-card); box-shadow: inset 0 0 0 1px var(--st-card-border), var(--st-card-shadow); text-align: start; transition: box-shadow .14s; }
.st-palette:hover { box-shadow: inset 0 0 0 1px var(--line-strong), var(--st-card-shadow); }
.st-palette.on { box-shadow: inset 0 0 0 2px var(--accent), var(--st-card-shadow); }
.st-preview { display: flex; height: 86px; margin: 2px 2px 0; border-radius: 10px 10px 0 0; overflow: hidden; }
.st-preview-rail { display: flex; flex-direction: column; gap: 5px; width: 26%; padding: 10px 7px; }
.st-preview-rail i { display: block; height: 4px; border-radius: 2px; }
.st-preview-main { flex: 1; display: flex; flex-direction: column; gap: 7px; min-width: 0; padding: 10px; }
.st-preview-title { display: block; width: 44%; height: 5px; border-radius: 2px; }
.st-preview-card { display: flex; flex-direction: column; gap: 5px; flex: 1; padding: 7px; border: 1px solid; border-radius: 6px; }
.st-preview-line { display: block; height: 4px; border-radius: 2px; }
.st-preview-btn { display: block; width: 32%; height: 7px; margin-top: auto; border-radius: 3px; }
.st-palette-text { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; }
.st-palette-name { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; font-weight: 600; color: var(--text); }
.st-palette-name .st-i { color: var(--accent); }
.st-palette-desc { color: var(--text-3); font-size: 12.5px; line-height: 1.4; }
.st-preview { position: relative; }
.st-preview-creature { position: absolute; right: 9px; bottom: 8px; font: 700 13px var(--font-mono); color: var(--text-2); letter-spacing: -1px; transform: rotate(-16deg); }
.st-preview-moonlit { color: #d8c88a; transform: none; letter-spacing: 1px; }
.st-preview-bluekoi { color: #f08a4b; }
.st-preview-jellyfish { color: #c29cff; transform: none; letter-spacing: 0; }
.st-preview-fireflies { color: #e4f590; transform: none; letter-spacing: 2px; text-shadow: 0 0 6px #d8ef72aa; }
.st-accents { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 16px 0; }
.st-accent { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 58px; color: var(--text-2); font-size: 12px; }
.st-accent-dot { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--swatch); color: #fff; box-shadow: inset 0 0 0 1px #00000014; transition: transform .12s; }
.st-accent:hover .st-accent-dot { transform: scale(1.06); }
.st-accent.on { color: var(--text); font-weight: 500; }
.st-accent.on .st-accent-dot { box-shadow: 0 0 0 2px var(--bg-elevated), 0 0 0 4px var(--swatch); }
.st-accent-dot svg { display: block; width: 14px; height: 14px; }
.st-fonts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.st-font { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-lg); background: var(--st-card); box-shadow: inset 0 0 0 1px var(--st-card-border), var(--st-card-shadow); text-align: start; color: var(--text); }
.st-font.on { box-shadow: inset 0 0 0 2px var(--accent), var(--st-card-shadow); }
.st-font-sample { flex-shrink: 0; width: 34px; font-size: 22px; font-weight: 500; text-align: center; }
.st-font-text { display: flex; flex-direction: column; min-width: 0; }
.st-font-name { font-size: 13.5px; font-weight: 600; }
.st-font-desc { color: var(--text-3); font-size: 12.5px; }
.st-font-check { margin-left: auto; color: var(--accent); }
.st-slider { display: flex; align-items: center; gap: 10px; }
.st-slider-small { color: var(--text-3); font-size: 12px; }
.st-slider-large { color: var(--text-3); font-size: 18px; }
.st-range { width: 150px; accent-color: var(--accent); }
.st-slider .st-value { min-width: 40px; text-align: end; }
.st-stepper { display: inline-flex; align-items: center; padding: 3px; border-radius: var(--r-md); background: var(--bg-inset); box-shadow: inset 0 0 0 1px var(--line); }
.st-step { width: 28px; height: 28px; border-radius: var(--r-sm); font-size: 16px; color: var(--text-2); }
.st-step:hover:not(:disabled) { background: var(--st-card); color: var(--text); }
.st-step:disabled { opacity: .4; cursor: not-allowed; }
.st-stepper .st-value { min-width: 48px; text-align: center; color: var(--text); }

/* Security */
.st-list { display: flex; flex-direction: column; }
.st-key { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; padding: 4px 4px 4px 12px; border-radius: var(--r-md); background: var(--bg-inset); box-shadow: inset 0 0 0 1px var(--line); }
.st-key-value { flex: 1; min-width: 0; overflow: hidden; color: var(--text-2); font: 12.5px var(--font-mono); text-overflow: ellipsis; white-space: nowrap; }
.st-codes { margin: 0; padding: 14px; border-radius: var(--r-md); background: var(--bg-inset); font: 13px/1.8 var(--font-mono); column-count: 2; }
.st-qr { display: block; width: 180px; height: 180px; margin: 0 auto; border-radius: var(--r-md); background: #fff; }
.st-secret { display: block; padding: 8px 10px; border-radius: var(--r-md); background: var(--bg-inset); font: 12.5px var(--font-mono); text-align: center; overflow-wrap: anywhere; }

/* Usage */
.st-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 28px; }
.st-tile { padding: 14px 16px; border-radius: var(--r-lg); background: var(--st-card); box-shadow: inset 0 0 0 1px var(--st-card-border), var(--st-card-shadow); }
.st-tile-label { color: var(--text-3); font-size: 12.5px; }
.st-tile-value { margin: 2px 0; font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.st-tile-hint { color: var(--text-3); font-size: 12px; }
.st-chart { padding: 16px 0; }
.st-chart-head { display: flex; justify-content: space-between; gap: 12px; min-height: 20px; margin-bottom: 12px; color: var(--text-3); font-size: 12.5px; }
.st-chart-head b { color: var(--text); font-variant-numeric: tabular-nums; }
.st-bars { display: flex; align-items: flex-end; gap: 3px; height: 132px; }
.st-bar { flex: 1; min-width: 0; border-radius: 3px 3px 0 0; background: var(--accent); transition: opacity .12s; }
.st-bar:hover { opacity: .75; }
.st-bar-empty { background: var(--line); }
.st-chart-axis { display: flex; justify-content: space-between; margin-top: 8px; color: var(--text-3); font-size: 12px; }
.st-breakdown { display: flex; flex-direction: column; gap: 12px; padding: 16px 0; }
.st-bd { display: grid; grid-template-columns: 170px minmax(0, 1fr) 96px; align-items: center; gap: 12px; }
.st-bd-label { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; color: var(--text-2); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.st-bd-track { display: block; height: 8px; overflow: hidden; border-radius: 999px; background: var(--bg-inset); }
.st-bd-fill { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .4s var(--ease-out); }
.st-bd-value { color: var(--text-3); font-size: 12.5px; font-variant-numeric: tabular-nums; text-align: end; }

/* Memory, skills and risk lists */
.st-toolbar { display: flex; flex-direction: column; gap: 10px; padding: 16px 0 12px; }
.st-search { position: relative; display: flex; align-items: center; }
.st-search > .st-i { position: absolute; left: 11px; color: var(--text-3); pointer-events: none; }
.st-search .st-input { padding-left: 33px; }
.st-search-block { margin-bottom: 20px; }
.st-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.st-chip { height: 26px; padding: 0 10px; border-radius: 999px; background: var(--chip); color: var(--text-2); font-size: 12px; }
.st-chip:hover { color: var(--text); }
.st-chip.on { background: var(--accent); color: var(--accent-ink); }
.st-entries { display: flex; flex-direction: column; }
.st-entry { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; }
.st-entry-on { position: relative; }
.st-entry-main { flex: 1; min-width: 0; }
.st-entry-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.st-entry-title { font-size: 14px; font-weight: 600; }
.st-entry-name { font: 500 13px var(--font-mono); }
.st-entry-text { color: var(--text); font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.st-entry-meta { margin-top: 3px; color: var(--text-3); font-size: 12.5px; }
.st-entry-actions { display: flex; flex-shrink: 0; gap: 2px; }
.st-entry-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.st-entry-side { display: flex; flex-direction: column; flex-shrink: 0; align-items: flex-end; gap: 6px; }
.st-entry-side-label { color: var(--text-3); font-size: 11.5px; }
.st-empty-state { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 12px; text-align: center; color: var(--text-3); font-size: 13.5px; }
.st-empty-state b { color: var(--text); font-weight: 600; }
.st-empty-state p { margin: 0 0 8px; }
.st-empty-state > .st-i svg { width: 22px; height: 22px; }
.st-limits { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.st-limit { padding: 3px 7px; border-radius: var(--r-sm); background: var(--bg-inset); color: var(--text-2); font-size: 11.5px; }
.st-meter { display: inline-flex; gap: 2px; }
.st-limit strong { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.st-meter i { display: block; width: 9px; height: 5px; border-radius: 1.5px; background: var(--line-strong); }
.st-meter i.on:nth-child(1) { background: #2e8b57; }
.st-meter i.on:nth-child(2) { background: #759344; }
.st-meter i.on:nth-child(3) { background: #b49533; }
.st-meter i.on:nth-child(4) { background: #cc7436; }
.st-meter i.on:nth-child(5) { background: #c64c45; }
.st-presets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.st-preset { display: flex; flex-direction: column; padding: 14px 16px; border-radius: var(--r-lg); background: var(--st-card); box-shadow: inset 0 0 0 1px var(--st-card-border), var(--st-card-shadow); }
.st-preset-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.st-preset-name { font-size: 14px; font-weight: 600; }
.st-preset-meta { margin-top: 2px; color: var(--text-3); font-size: 12.5px; }
.st-preset-desc { margin: 8px 0 0; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.st-preset-foot { margin-top: auto; padding-top: 12px; }
.st-asset-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px 96px; align-items: center; gap: 8px; }
.st-asset-label { color: var(--text-2); font-size: 13px; }

/* Connectors */
.st-connector-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.st-connector-search { display: flex; gap: 8px; }
.st-connector-search .st-input { flex: 1; min-width: 0; }
.st-connector-results { display: grid; gap: 8px; }
.st-connector-result { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.st-connector-result strong, .st-connector-result small { display: block; }
.st-connector-result small, .st-connector-result p { color: var(--text-3); font-size: 12px; }
.st-connector-preview:empty { display: none; }
.st-connector-preview { padding: 14px; border-top: 1px solid var(--line); }
.st-connector-preview pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow: auto; font: inherit; font-size: 12px; color: var(--text-2); }
.st-connector-callback { display: block; overflow-wrap: anywhere; font-size: 12px; }
.st-dir-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.st-dir-tile { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--st-card); box-shadow: inset 0 0 0 1px var(--st-card-border), var(--st-card-shadow); }
.st-dir-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.st-dir-name { min-width: 0; overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.st-dir-desc { color: var(--text-2); font-size: 13px; line-height: 1.5; }
.st-dir-note { display: flex; gap: 6px; color: var(--text-3); font-size: 12.5px; line-height: 1.45; }
.st-dir-note .st-i { margin-top: 2px; }
.st-dir-note svg { width: 13px; height: 13px; }
.st-dir-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; }
.st-dir-auth { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 12px; }
.st-dir-auth svg { width: 13px; height: 13px; }
.st-dir-action { display: inline-flex; align-items: center; gap: 8px; }

/* Shortcuts */
.st-kbd { display: inline-flex; justify-content: center; align-items: center; min-width: 56px; height: 30px; padding: 0 10px; border-radius: var(--r-md); background: var(--bg-inset); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text); font: 12.5px var(--font-mono); white-space: nowrap; }
button.st-kbd:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.st-kbd.off { color: var(--text-3); }
.st-kbd.recording { box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent-text); }
.st-kbd-fixed { background: none; box-shadow: none; color: var(--text-3); }

/* Nested modal */
.st-modal-scrim { position: fixed; inset: 0; z-index: 2; display: flex; justify-content: center; align-items: center; padding: 20px; background: #0a1f5c40; animation: st-scrim-in .14s; }
:root[data-theme="dark"] .st-modal-scrim { background: #00000080; }
.st-modal { display: flex; flex-direction: column; width: min(440px, 100%); max-height: calc(100dvh - 40px); border-radius: var(--r-xl); background: var(--bg-elevated); color: var(--text); box-shadow: var(--shadow-pop); animation: st-window-in .18s var(--ease-out); }
.st-modal-wide { width: min(620px, 100%); }
.st-modal:focus-visible { outline: none; }
.st-modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 14px 4px 20px; }
.st-modal-head .st-close { color: var(--text-3); }
.st-modal-head .st-close:hover { background: var(--bg-hover); }
.st-modal-title { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.st-modal-body { display: flex; flex-direction: column; gap: 14px; padding: 14px 20px 18px; overflow-y: auto; }
.st-modal-body:empty { display: none; }
.st-modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); }
.st-modal .st-row { padding: 0; min-height: 0; box-shadow: none; }
.st-modal .st-seg { align-self: flex-start; }

/* ── Container and viewport rules ── */
@container st-settings (max-width: 600px) {
  .st-card { padding: 0 16px; }
  .st-card-foot { margin: 0 -16px; padding: 10px 16px; flex-wrap: wrap; }
  .st-sample { margin: 0 -16px; padding: 14px 16px; }
  .st-header { flex-direction: column; align-items: stretch; }
  .st-row { flex-wrap: wrap; gap: 12px; }
  .st-row > .st-row-main { flex: 170px; }
  .st-row > .st-row-control { margin-inline-start: auto; }
  .st-row-field { flex-direction: column; align-items: stretch; gap: 10px; }
  .st-row-field > .st-row-main { flex: none; }
  .st-row-field > .st-row-control { justify-content: flex-start; margin-inline-start: 0; flex-wrap: wrap; }
  .st-row-field .st-seg { width: 100%; }
  .st-row-field .st-seg-btn { flex: 1; }
  .st-card .account-select { width: 100%; max-width: 100%; }
  .st-palettes, .st-fonts, .st-presets, .st-dir-grid { grid-template-columns: 1fr; }
  .st-tiles { grid-template-columns: 1fr 1fr; }
  .st-tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .st-tile-value { font-size: 22px; }
  .st-bd { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .st-bd-track { grid-area: 2 / 1 / auto / -1; }
  .st-range { flex: 1; min-width: 0; width: auto; }
  .st-slider { width: 100%; }
}
@media (max-width: 1000px) {
  .st-rail { width: 210px; }
  .st-titlebar { padding-inline-start: 24px; }
  .st-content { padding: 22px 24px 48px; }
}
@media (hover: none) { .st-entry-actions { opacity: 1; } }
@media (pointer: coarse) { .st-seg-btn { height: 36px; } }
@media (max-height: 500px) {
  .st-scrim { padding: 8px; }
  .st-window { height: calc(100dvh / var(--ui-scale, 1) - 16px); }
  .st-titlebar { height: 48px; }
  .st-rail { padding-top: 10px; }
  .st-content { padding-top: 16px; }
}
@media (max-width: 800px) {
  .st-scrim { padding: 0; }
  .st-window {
    --st-rail-text: var(--text); --st-rail-text-2: var(--text-2); --st-rail-text-3: var(--text-3); --st-rail-line: var(--line); --st-rail-hover: var(--bg-hover); --st-rail-card: var(--st-card); --st-rail-card-border: var(--st-card-border); --st-rail-accent: var(--accent);
    width: 100%; height: calc(100dvh / var(--ui-scale, 1)); border-radius: 0; background: var(--bg); box-shadow: none; animation: st-window-rise .3s var(--ease-out);
  }
  .st-scrim[data-state="closed"] .st-window { animation: st-window-sink .16s cubic-bezier(.4, 0, 1, 1) forwards; }
  .st-titlebar { height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 8px 0 16px; color: var(--text); }
  .st-window-title { font-size: 17px; }
  .st-close:hover { background: var(--bg-hover); }
  .st-window[data-view="panel"] .st-back { display: inline-flex; }
  .st-window[data-view="panel"] .st-window-title { display: none; }
  .st-body { position: relative; overflow: hidden; }
  .st-rail, .st-content { position: absolute; inset: 0; transition: transform .3s var(--ease-out), opacity .3s var(--ease-out), visibility 0s; }
  .st-content { background: var(--bg); padding: 18px 16px calc(48px + env(safe-area-inset-bottom)); }
  .st-window[data-view="panel"] .st-rail { opacity: .6; visibility: hidden; transform: translateX(-24%); transition: transform .3s var(--ease-out), opacity .3s var(--ease-out), visibility 0s linear .3s; }
  .st-window[data-view="list"] .st-content { visibility: hidden; transform: translateX(100%); transition: transform .3s var(--ease-out), visibility 0s linear .3s; }
  .st-rail { width: 100%; padding: 4px 16px calc(20px + env(safe-area-inset-bottom)); background: var(--bg); box-shadow: none; }
  .st-nav-ind { display: none; }
  .st-nav-group + .st-nav-group { margin-top: 0; }
  .st-nav-label { margin: 20px 6px 8px; font-size: 11px; letter-spacing: .07em; }
  .st-nav-items { gap: 0; overflow: hidden; border-radius: var(--r-lg); background: var(--st-card); box-shadow: inset 0 0 0 1px var(--st-card-border), var(--st-card-shadow); }
  .st-nav-item { min-height: 60px; padding: 10px 12px; color: var(--text); font-size: 15px; }
  .st-nav-item + .st-nav-item { box-shadow: inset 0 1px 0 var(--st-divider); }
  .st-nav-item.on, .st-nav-item.on:hover { font-weight: 400; }
  .st-nav-item.on .st-nav-icon { color: inherit; }
  .st-nav-icon { width: 32px; height: 32px; border-radius: var(--r-md); background: var(--bg-inset); color: var(--text-2); }
  .st-nav-desc { display: block; overflow: hidden; color: var(--text-3); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
  .st-nav-chevron { display: grid; place-items: center; color: var(--text-3); }
  .st-nav-chevron svg { display: block; width: 14px; height: 14px; }
  .st-rail-foot { margin-top: 24px; }
  .st-me-plan { background: var(--bg-accent-soft); color: var(--accent-text); }
  .st-signout:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); }
  .st-modal-scrim { padding: 0; align-items: flex-end; }
  .st-modal, .st-modal-wide { width: 100%; max-height: 92dvh; border-radius: var(--r-xl) var(--r-xl) 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .st-grid-2, .st-grid-3 { grid-template-columns: 1fr; }
}
@keyframes st-window-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes st-window-sink { to { opacity: 0; transform: translateY(24px); } }

/* Users (site owner only) */
.st-users-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.st-users-tools .st-input { flex: 1; min-width: 180px; }
.st-users-count { color: var(--text-3); font-size: 12.5px; white-space: nowrap; }
