/* ============================================================
   NeuroArt Studio — design system (premium pass, 2026-07-13)
   Black-platinum + single amber — approved base, preserved.
   Structure layered on top: strict 8pt · two-layer depth ·
   unified radii · amber-as-material · ease-out motion.
   Display: Manrope · Body: Inter · Numerals: JetBrains Mono
   ============================================================ */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --bg: #0A0A0B;            /* black platinum — near-black, neutral */
  --bg-soft: #121214;
  --surface: rgba(216, 222, 232, 0.05);   /* platinum-tinted neutrals */
  --surface-2: rgba(216, 222, 232, 0.085);
  --surface-3: rgba(216, 222, 232, 0.13);
  --surface-solid: #16161A;
  --surface-solid-2: #1F1F24;

  --ink: #F2F4F8;           /* platinum white */
  --ink-dim: #AEB4C0;
  --ink-faint: #6E7480;
  --ink-faint-card: #868C9C;  /* AA-safe on tinted card surfaces (4.5:1+) */
  --ink-ghost: rgba(242, 244, 248, 0.5);

  --line: rgba(216, 222, 232, 0.10);
  --line-strong: rgba(216, 222, 232, 0.20);

  --accent: #F5B400;        /* amber — the single accent */
  --accent-2: #FFC93C;
  --accent-soft: #FFD86B;
  --accent-glow: rgba(245, 180, 0, 0.45);
  --gold: #D8DEE8;          /* platinum (premium highlight) */
  --violet: #F5B400;        /* single-accent strategy: type tints collapse to amber */
  --magenta: #F5B400;
  --teal: #F5B400;

  --good: #5EE08A;
  --bad: #FF6259;

  /* dark text/icon drawn ON the amber accent (buttons, thumb, mark) */
  --on-accent: #1A1300;

  --tint-image: var(--accent);
  --tint-video: var(--violet);
  --tint-music: var(--magenta);

  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 24px;
  --r-pill: 999px;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --shadow-1: 0 1px 0 rgba(216, 222, 232, 0.05) inset, 0 10px 30px -16px rgba(0, 0, 0, 0.7);
  /* raised card (TZ §5.2): surface/2 + soft drop shadow */
  --shadow-raised: 0 8px 24px rgba(0, 0, 0, 0.42), 0 1px 0 rgba(255, 255, 255, 0.05) inset;
  --shadow-2: 0 24px 70px -24px rgba(0, 0, 0, 0.85);

  /* motion — ease-out exponential, no bounce/elastic */
  --dur-1: 150ms; --dur-2: 200ms; --dur-3: 280ms;
  --ease-out-quart: cubic-bezier(.25, 1, .4, 1);

  /* spacing — strict 8pt scale (TZ §2.2) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 40px; --s-8: 48px; --s-9: 64px;

  --ff-display: "Manrope", system-ui, sans-serif;
  --ff-body: "Inter", system-ui, sans-serif;
  --ff-mono: "JetBrains Mono", ui-monospace, monospace;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overscroll-behavior: none; }
body {
  font-family: var(--ff-body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(120% 80% at 50% -10%, #17151A 0%, var(--bg) 55%),
    var(--bg);
}
button { font-family: inherit; color: inherit; cursor: pointer; border: none; background: none; -webkit-tap-highlight-color: transparent; }
input, textarea { font-family: inherit; color: inherit; }
::selection { background: var(--accent-glow); color: #fff; }
svg { display: block; }

/* ── Atmosphere ─────────────────────────────────────────── */
.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 0.9  0 0 0 0 0.7  0 0 0 0.9 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.5; }
.glow--a { width: 60vw; height: 60vw; left: -22vw; top: -24vw; background: radial-gradient(circle, var(--accent) 0%, transparent 65%); opacity: 0.38; animation: drift1 18s ease-in-out infinite; }
.glow--b { width: 55vw; height: 55vw; right: -24vw; top: 8vw; background: radial-gradient(circle, #3D2E00 0%, transparent 65%); opacity: 0.5; animation: drift2 22s ease-in-out infinite; }
.glow--c { width: 50vw; height: 50vw; left: 18vw; bottom: -30vw; background: radial-gradient(circle, var(--gold) 0%, transparent 60%); opacity: 0.14; animation: drift3 26s ease-in-out infinite; }
@keyframes drift1 { 50% { transform: translate(8vw, 6vw) scale(1.1); } }
@keyframes drift2 { 50% { transform: translate(-7vw, 10vw) scale(0.9); } }
@keyframes drift3 { 50% { transform: translate(10vw, -8vw) scale(1.15); } }

/* ── Device frame ───────────────────────────────────────── */
.device {
  position: relative;
  z-index: 1;
  width: min(100vw, 420px);
  height: min(100dvh, 900px);
  background: linear-gradient(180deg, #0C0C0E 0%, #08080A 100%);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: none;
}
@media (min-width: 480px) {
  body { padding: 24px; }
  .device {
    border-radius: 46px;
    border: 1px solid var(--line-strong);
    box-shadow: var(--shadow-2), 0 0 0 10px #050507, 0 0 0 11px #15151A;
    height: min(100dvh - 48px, 880px);
  }
  .device__notch {
    position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
    width: 116px; height: 30px; background: #050507; border-radius: 20px; z-index: 40;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.04) inset;
  }
}
@media (max-width: 479px) { .device__notch { display: none; } }

/* ── Status bar ─────────────────────────────────────────── */
.statusbar {
  flex: 0 0 auto;
  height: 44px;
  padding: 0 26px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--ink);
  padding-top: env(safe-area-inset-top, 0);
  position: relative; z-index: 20;
}
@media (min-width: 480px) { .statusbar { padding-top: 18px; } }
.statusbar__brand { font-family: var(--ff-display); font-size: 11px; letter-spacing: 0.32em; color: var(--ink-faint); }

/* ── App shell ──────────────────────────────────────────── */
.app {
  flex: 1 1 auto;
  display: flex; flex-direction: column;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

/* ── Top bar ────────────────────────────────────────────── */
.topbar {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 12px;
  position: relative; z-index: 15;
}
.topbar__back { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); }
.topbar__back svg { width: 22px; height: 22px; transition: transform .25s var(--ease); }
.topbar__back:active svg { transform: translateX(-3px); }
.topbar__back[hidden] { visibility: hidden; }
.topbar__center { text-align: center; min-width: 0; }
.topbar__title { font-family: var(--ff-display); font-weight: 600; font-size: 16px; letter-spacing: -0.01em; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__sub { font-size: 11px; color: var(--ink-faint); margin-top: 2px; letter-spacing: 0.04em; text-transform: uppercase; min-height: 13px; }
.topbar__trail { display: flex; align-items: center; gap: 8px; min-width: 44px; justify-content: flex-end; }

.iconbtn { display: grid; place-items: center; border-radius: 50%; color: var(--ink); transition: background .2s, transform .15s; }
.iconbtn:active { transform: scale(0.92); }

/* balance pill in topbar */
.balpill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px 7px 10px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(216,222,232,0.16), rgba(245,180,0,0.10));
  border: 1px solid rgba(216,222,232,0.30);
  font-family: var(--ff-mono); font-weight: 600; font-size: 13px; color: var(--gold);
  line-height: 1; white-space: nowrap;
}
.balpill__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.balpill.balpill--buy { color: var(--accent-2); border-color: rgba(255,201,60,0.4); background: linear-gradient(135deg, rgba(245,180,0,0.2), rgba(245,180,0,0.06)); }

/* ── Screen base ────────────────────────────────────────── */
.screen {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  padding: 8px 20px 40px;       /* TZ §2.2: generous edge air + bottom scroll room */
  scrollbar-width: none;
}
.screen::-webkit-scrollbar { display: none; }
.screen > * {
  opacity: 0;
  transform: translateY(11px);
  animation: rise .5s var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * 48ms);
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* ── Type ───────────────────────────────────────────────── */
.display { font-family: var(--ff-display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.02; }
.eyebrow { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent-2); }
.h1 { font-family: var(--ff-display); font-weight: 700; font-size: 26px; letter-spacing: -0.02em; line-height: 1.06; }
.h2 { font-family: var(--ff-display); font-weight: 600; font-size: 19px; letter-spacing: -0.01em; line-height: 1.15; }
.lede { font-size: 14.5px; line-height: 1.55; color: var(--ink-dim); }
.cap { font-size: 12px; color: var(--ink-faint); letter-spacing: 0.02em; }
.mono { font-family: var(--ff-mono); font-variant-numeric: tabular-nums; }
.grad-text { color: var(--accent); }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 16px 20px; border-radius: var(--r-md);            /* TZ §7.1: ~52px height, r16 */
  font-weight: 700; font-size: 15.5px; line-height: 1;
  width: 100%;
  transition: transform var(--dur-1) var(--ease-out-quart), box-shadow var(--dur-2), background var(--dur-2), opacity var(--dur-2);
  user-select: none;
}
.btn svg { width: 19px; height: 19px; }
.btn:active { transform: scale(0.97); }                       /* TZ §7.4: pressed 0.97, ~110ms ease-out */
.btn--primary {
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--accent-2) 40%, var(--accent) 100%);
  color: var(--on-accent);
  box-shadow: 0 10px 26px -10px var(--accent-glow), 0 1px 0 rgba(255,255,255,0.45) inset, 0 -2px 6px rgba(0,0,0,0.18) inset;
}
.btn--primary:hover { box-shadow: 0 14px 34px -10px var(--accent-glow), 0 1px 0 rgba(255,255,255,0.5) inset, 0 -2px 6px rgba(0,0,0,0.18) inset; }
.btn--primary:active { box-shadow: 0 6px 16px -8px var(--accent-glow), 0 1px 0 rgba(255,255,255,0.35) inset; }
.btn--ghost { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.btn--ghost:hover { background: var(--surface-3); }
.btn--link { background: transparent; color: var(--accent-2); box-shadow: inset 0 0 0 1px rgba(255,201,60,0.35); }
.btn--link:hover { background: rgba(255,201,60,0.08); }
.btn--soft { background: linear-gradient(135deg, rgba(255,201,60,0.18), rgba(245,180,0,0.10)); color: var(--accent-2); border: 1px solid rgba(255,201,60,0.28); }
.btn--danger { background: rgba(255,98,89,0.12); color: var(--bad); border: 1px solid rgba(255,98,89,0.28); }
.btn--block + .btn--block { margin-top: 9px; }
.btn[disabled], .btn.is-disabled { opacity: 0.45; pointer-events: none; }   /* TZ §7.5: readable, not "broken" */
.btn__sub { font-size: 12px; font-weight: 600; opacity: 0.72; font-family: var(--ff-mono); }
.btn--lg { padding: 17px 20px; font-size: 16px; border-radius: var(--r-lg); }
.btn--sm { padding: 10px 14px; font-size: 13px; width: auto; border-radius: var(--r-sm); }

/* ── Card ───────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.card--solid { background: var(--surface-solid); }
/* TZ §5.2 raised card — surface/2 + soft drop shadow, for featured/hero surfaces */
.card--raised { background: var(--surface-2); border-color: var(--line-strong); box-shadow: var(--shadow-raised); }

/* ── Chips / segment ────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 600; color: var(--ink-dim);
}
.chip--accent { color: var(--accent-2); border-color: rgba(255,201,60,0.32); background: rgba(255,201,60,0.10); }
.chip--violet { color: var(--violet); border-color: rgba(245,180,0,0.32); background: rgba(245,180,0,0.10); }
.chip--magenta { color: var(--magenta); border-color: rgba(245,180,0,0.32); background: rgba(245,180,0,0.10); }
.chip--muted { color: var(--ink-faint); }

/* ── Toggle switch ──────────────────────────────────────── */
.switch { position: relative; width: 46px; height: 28px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.switch__track { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line); transition: background .25s var(--ease); }
.switch__thumb { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink-dim); transition: transform .28s var(--ease-out), background .25s; }
.switch input:checked ~ .switch__track { background: linear-gradient(135deg, var(--accent-2), var(--accent)); border-color: transparent; }
.switch input:checked ~ .switch__thumb { transform: translateX(18px); background: var(--on-accent); }

/* ── Setting row (constructor + options) ────────────────── */
.row {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 15px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line);
  transition: background .2s, transform .12s, border-color .2s;
}
.row:active { transform: scale(0.99); }
.row--btn { cursor: pointer; width: 100%; text-align: left; }
.row--btn:hover { background: var(--surface-2); border-color: var(--line-strong); }
.row__ico { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 11px; display: grid; place-items: center; font-size: 18px; background: var(--surface-3); color: var(--accent-2); }
.row__ico svg { width: 19px; height: 19px; }
.row__main { flex: 1 1 auto; min-width: 0; }
.row__label { font-size: 14px; font-weight: 600; color: var(--ink); }
.row__hint { font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.row__val { font-family: var(--ff-mono); font-size: 13px; font-weight: 600; color: var(--ink-dim); white-space: nowrap; }
.row__chev { color: var(--ink-faint); flex: 0 0 auto; }
.row__chev svg { width: 18px; height: 18px; }
.row__val.is-accent { color: var(--accent-2); }
/* small sub-hint rendered as a sibling of a setting row (e.g. vocal toggle) */
.row-note { font-size: 11.5px; color: var(--ink-faint); line-height: 1.4; padding: 0 4px; }

/* ── Textarea / field ───────────────────────────────────── */
.field { position: relative; }
.field__ta {
  width: 100%; resize: none; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line);
  padding: 16px; font-size: 15px; line-height: 1.45; color: var(--ink);
  transition: border-color .2s, background .2s; min-height: 96px;
}
.field__ta::placeholder { color: var(--ink-faint); }
.field__ta:focus { outline: none; border-color: rgba(255,201,60,0.5); background: var(--surface-2); box-shadow: 0 0 0 4px rgba(245,180,0,0.10); }
.field__ta--lg { min-height: 140px; font-size: 16px; }
.field__bar { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding: 0 4px; }
.field__count { font-family: var(--ff-mono); font-size: 11px; color: var(--ink-faint); }
.field__tools { display: flex; gap: 6px; }
.toolbtn {
  display: inline-flex; align-items: center; gap: 5px; padding: 7px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: var(--ink-dim);
  background: var(--surface-2); border: 1px solid var(--line); transition: all .18s;
}
.toolbtn svg { width: 14px; height: 14px; }
.toolbtn:active { transform: scale(0.95); }
.toolbtn:disabled { opacity: 0.4; pointer-events: none; }
.toolbtn--accent { color: var(--accent-2); border-color: rgba(255,201,60,0.3); }

/* ── Lyrics: structural-tag chips ───────────────────────── */
.lyr-tags {
  display: flex; gap: 6px; margin-bottom: 10px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.lyr-tags::-webkit-scrollbar { display: none; }
.lyr-tag {
  flex: 0 0 auto; min-height: 36px; padding: 8px 12px; border-radius: 999px;
  white-space: nowrap; font-size: 12.5px; font-weight: 600; color: var(--accent-2);
  background: rgba(255,201,60,0.10); border: 1px solid rgba(255,201,60,0.32);
  transition: background .18s, transform .12s, border-color .18s;
}
.lyr-tag:active { transform: scale(0.94); }
.lyr-tag:hover { background: rgba(255,201,60,0.18); border-color: rgba(255,201,60,0.5); }

/* ── Segmented control (formats / presets) ──────────────── */
.segmented { display: flex; gap: 6px; flex-wrap: wrap; }
.seg {
  flex: 1 1 0; min-width: 0; padding: 11px 6px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--line);
  font-weight: 600; font-size: 13px; color: var(--ink-dim);
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  transition: all .2s var(--ease); text-align: center;
}
.seg:active { transform: scale(0.96); }
.seg.is-active {
  background: linear-gradient(135deg, rgba(255,201,60,0.22), rgba(245,180,0,0.12));
  border-color: rgba(255,201,60,0.55); color: var(--ink);
  box-shadow: 0 6px 18px -10px var(--accent-glow);
}
.seg__px { font-family: var(--ff-mono); font-size: 10px; color: var(--ink-faint); }
.seg.is-active .seg__px { color: var(--accent-soft); }

/* ratio visual box */
.ratio-box {
  width: 26px; height: 26px; position: relative; border-radius: 3px;
  border: 1.5px solid currentColor; opacity: 0.8;
}
.ratio-box::after { content: ""; position: absolute; inset: 0; border-radius: 2px; background: currentColor; opacity: 0.18; }

/* ── Section spacing ────────────────────────────────────── */
.section { margin-top: 28px; }
.section:first-child { margin-top: 4px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; padding: 0 2px; }
.section__label { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); }

/* ════════════════════ MENU ════════════════════ */
.menu-hero { padding: 6px 4px 4px; }
.menu-hero__brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.mark {
  width: 40px; height: 40px; border-radius: 13px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  display: grid; place-items: center; color: var(--on-accent);
  box-shadow: 0 8px 22px -8px var(--accent-glow);
  font-family: var(--ff-display); font-weight: 800; font-size: 20px;
}
.menu-hero__title { font-family: var(--ff-display); font-weight: 800; font-size: 24px; letter-spacing: -0.025em; line-height: 1; }
.menu-hero__sub { font-size: 12px; color: var(--ink-faint); margin-top: 3px; }

.catgrid { display: grid; gap: 12px; }
.cat {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 14px;
  padding: 18px; border-radius: var(--r-xl); cursor: pointer;
  border: 1px solid var(--line); text-align: left; width: 100%;
  transition: transform .18s var(--ease), box-shadow .25s;
}
.cat:active { transform: scale(0.985); }
.cat__art { position: absolute; inset: 0; z-index: 0; opacity: 0.9; }
.cat__art::before { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, rgba(8,14,28,0.45) 0%, rgba(8,14,28,0.15) 55%, transparent 100%); }
.cat__body { position: relative; z-index: 1; }
.cat__emoji { font-size: 30px; line-height: 1; margin-bottom: 8px; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4)); }
.cat__title { font-family: var(--ff-display); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.cat__desc { font-size: 12.5px; color: var(--ink-ghost); margin-top: 3px; }
.cat__arrow { position: relative; z-index: 1; margin-left: auto; color: var(--ink); opacity: 0.7; }
.cat__arrow svg { width: 22px; height: 22px; }
.cat--image { background: linear-gradient(120deg, #16161A, #0E0E12); }
.cat--image .cat__art { background: radial-gradient(120% 140% at 85% 20%, rgba(255,201,60,0.55), transparent 60%); }
.cat--video { background: linear-gradient(120deg, #16161A, #0E0E12); }
.cat--video .cat__art { background: radial-gradient(120% 140% at 85% 20%, rgba(245,180,0,0.5), transparent 60%); }
.cat--music { background: linear-gradient(120deg, #16161A, #0E0E12); }
.cat--music .cat__art { background: radial-gradient(120% 140% at 85% 20%, rgba(245,180,0,0.5), transparent 60%); }

.tilegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  display: flex; flex-direction: column; gap: 9px;
  padding: 16px; border-radius: var(--r-lg); cursor: pointer; text-align: left;
  background: var(--surface); border: 1px solid var(--line);
  transition: transform .16s var(--ease), background .2s;
}
.tile:active { transform: scale(0.97); }
.tile:hover { background: var(--surface-2); }
.tile__ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; background: var(--surface-3); }
.tile__title { font-weight: 700; font-size: 14px; }
.tile__sub { font-size: 11.5px; color: var(--ink-faint); }

/* ════════════════════ CONSTRUCTOR ════════════════════ */
.ctor-promptwrap { position: relative; }
.ctor-costbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(216,222,232,0.10), rgba(245,180,0,0.05));
  border: 1px solid rgba(216,222,232,0.22);
}
.ctor-costbar__l { display: flex; flex-direction: column; gap: 2px; }
.ctor-costbar__cap { font-size: 11px; color: var(--ink-faint); letter-spacing: 0.02em; }
.ctor-costbar__big { font-family: var(--ff-display); font-weight: 700; font-size: 19px; color: var(--ink); }
.ctor-costbar__big .mono { color: var(--gold); }
.ctor-costbar__r { text-align: right; }
.ctor-costbar__bal { font-family: var(--ff-mono); font-size: 12px; color: var(--ink-dim); }
.ctor-costbar__bal b { color: var(--ink); }
.ctor-costbar.is-low { border-color: rgba(255,98,89,0.4); background: linear-gradient(135deg, rgba(255,98,89,0.12), rgba(255,98,89,0.04)); }

.refsmini { display: flex; flex-wrap: wrap; gap: 7px; }
.refsmini__pill { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-dim); }

/* ════════════════════ MODEL PICK / CARDS ════════════════════ */
.modelcard {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 15px; border-radius: var(--r-lg); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line);
  transition: transform .16s var(--ease), border-color .2s, background .2s; position: relative;
}
.modelcard:active { transform: scale(0.985); }
.modelcard:hover { border-color: var(--line-strong); background: var(--surface-2); }
.modelcard.is-active { border-color: rgba(255,201,60,0.5); background: linear-gradient(135deg, rgba(255,201,60,0.10), rgba(245,180,0,0.03)); box-shadow: 0 8px 24px -14px var(--accent-glow); }
.modelcard__ico { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 13px; display: grid; place-items: center; font-size: 21px; background: var(--surface-3); }
.modelcard__main { flex: 1 1 auto; min-width: 0; }
.modelcard__name { display: flex; align-items: center; gap: 7px; font-family: var(--ff-display); font-weight: 600; font-size: 15.5px; }
.modelcard__desc { font-size: 12px; color: var(--ink-faint); margin-top: 3px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.modelcard__price { font-family: var(--ff-mono); font-weight: 600; font-size: 13px; color: var(--accent-2); white-space: nowrap; }
.modelcard__price small { color: var(--ink-faint); font-weight: 500; }
.star { color: var(--gold); font-size: 13px; }

/* ════════════════════ CABINET ════════════════════ */
.balhero {
  position: relative; overflow: hidden;
  padding: 24px 20px; border-radius: var(--r-xl);
  background: linear-gradient(135deg, #16161A 0%, #0E0E12 100%);
  border: 1px solid rgba(216,222,232,0.22);
}
.balhero__glow { position: absolute; width: 220px; height: 220px; right: -70px; top: -90px; background: radial-gradient(circle, var(--accent) 0%, transparent 65%); opacity: 0.4; filter: blur(20px); }
.balhero__cap { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); position: relative; }
.balhero__num { font-family: var(--ff-display); font-weight: 800; font-size: 48px; line-height: 1; margin-top: 8px; position: relative; letter-spacing: -0.02em; }
.balhero__num .unit { font-size: 16px; color: var(--ink-dim); font-weight: 600; margin-left: 6px; }
.balhero__rub { font-family: var(--ff-mono); font-size: 13px; color: var(--ink-faint); margin-top: 10px; position: relative; }
.statrow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { padding: 15px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.stat__cap { font-size: 11px; color: var(--ink-faint); letter-spacing: 0.02em; }
.stat__val { font-family: var(--ff-display); font-weight: 700; font-size: 22px; margin-top: 4px; }
.stat__sub { font-size: 11px; color: var(--ink-faint); margin-top: 3px; }

/* ── PWA install CTA (cabinet) ── */
.pwa-card { padding: 0; }
.pwa-cta { position: relative; display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; padding: 16px 18px; border-radius: var(--r-lg); font-family: var(--ff-display); font-weight: 700; font-size: 15.5px; color: var(--on-accent); background: linear-gradient(135deg, #FFD86B 0%, #F5B400 100%); border: 1px solid rgba(216,222,232,0.6); box-shadow: 0 10px 26px -14px var(--accent-glow); cursor: pointer; transition: transform .12s; animation: pwaPulse 2.1s ease-in-out infinite; }
.pwa-cta:active { transform: scale(0.985); }
.pwa-cta__ico { font-size: 18px; }
.pwa-card__hint { font-size: 11.5px; color: var(--ink-faint); margin-top: 8px; text-align: center; }
@keyframes pwaPulse { 0%, 100% { box-shadow: 0 10px 26px -14px var(--accent-glow), 0 0 0 0 rgba(216,222,232,0); } 50% { box-shadow: 0 10px 26px -10px var(--accent-glow), 0 0 0 6px rgba(216,222,232,0.16); } }
@media (prefers-reduced-motion: reduce) { .pwa-cta { animation: none; } }

/* ════════════════════ HISTORY ════════════════════ */
.gencard { display: flex; gap: 13px; padding: 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.gencard__thumb { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 11px; display: grid; place-items: center; font-size: 20px; background: var(--surface-3); position: relative; }
.gencard__thumb::after { content: ""; position: absolute; inset: 0; border-radius: 11px; box-shadow: 0 0 0 1px var(--line) inset; }
.gencard__main { flex: 1 1 auto; min-width: 0; }
.gencard__prompt { font-size: 13.5px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gencard__meta { font-size: 11.5px; color: var(--ink-faint); margin-top: 4px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.gencard__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-faint); }
.gencard__price { font-family: var(--ff-mono); font-size: 12px; font-weight: 600; color: var(--ink-dim); white-space: nowrap; }
.gencard.is-clickable { cursor: pointer; transition: transform .12s, border-color .2s, background .2s; }
.gencard.is-clickable:active { transform: scale(0.99); }
.gencard.is-clickable:hover { border-color: var(--line-strong); background: var(--surface-2); }
.gencard__side { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 7px; flex: 0 0 auto; }
.gencard__dl { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 15px; background: var(--surface-3); color: var(--accent-2); border: 1px solid var(--line); transition: background .18s, transform .12s; }
.gencard__dl:hover { background: rgba(255,201,60,0.12); }
.gencard__dl:active { transform: scale(0.92); }
.status-pill { font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em; }
.status--done { color: var(--good); background: rgba(94,224,138,0.12); }
.status--failed { color: var(--bad); background: rgba(255,98,89,0.12); }
.status--processing, .status--pending { color: var(--gold); background: rgba(216,222,232,0.12); }
.empty { text-align: center; padding: 56px 24px; color: var(--ink-faint); }
.empty__ico { display: inline-grid; place-items: center; color: var(--ink-faint); opacity: 0.55; margin-bottom: 14px; }
.empty__ico svg { width: 44px; height: 44px; }

/* infinite-scroll sentinel + spinner at the bottom of the history list */
.history-sentinel { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 16px 8px; color: var(--ink-faint); font-size: 12px; }
.history-sentinel[hidden] { display: none; }
.history-loader { border-color: rgba(216, 222, 232, 0.22); border-top-color: var(--accent-2); }

/* ════════════════════ TOPUP / TARIFFS ════════════════════ */
.tariff { position: relative; padding: 18px; border-radius: var(--r-lg); cursor: pointer; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); transition: transform .16s var(--ease), border-color .2s, background .2s; }
.tariff:active { transform: scale(0.985); }
.tariff:hover { border-color: var(--line-strong); }
.tariff--feat { border-color: rgba(255,201,60,0.45); background: linear-gradient(135deg, rgba(255,201,60,0.10), rgba(245,180,0,0.02)); box-shadow: 0 10px 30px -16px var(--accent-glow); }
.tariff__ribbon { position: absolute; top: 14px; right: 14px; font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-2); }
.tariff__name { font-family: var(--ff-display); font-weight: 700; font-size: 19px; }
.tariff__tokens { font-family: var(--ff-display); font-weight: 800; font-size: 30px; margin-top: 6px; letter-spacing: -0.01em; }
.tariff__tokens .unit { font-size: 13px; color: var(--ink-dim); font-weight: 600; }
.tariff__desc { font-size: 12.5px; color: var(--ink-faint); margin-top: 6px; line-height: 1.4; }
.tariff__est { font-size: 12px; color: var(--ink-dim); margin-top: 7px; font-weight: 500; }
.tariff__price { display: flex; align-items: baseline; gap: 8px; margin-top: 14px; padding-top: 13px; border-top: 1px dashed var(--line); }
.tariff__rub { font-family: var(--ff-mono); font-weight: 700; font-size: 20px; }
.tariff__per { font-size: 11.5px; color: var(--ink-faint); }

/* ── Paywall: hero + global term selector + tier cards ── */
.pw-hero { padding: 6px 2px 2px; }
.pw-hero__eyebrow { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent-2); }
.pw-hero__title { font-family: var(--ff-display); font-weight: 800; font-size: 30px; letter-spacing: -0.025em; line-height: 1.04; margin-top: 9px; text-wrap: balance; }
.pw-hero__lede { font-size: 14px; line-height: 1.5; color: var(--ink-dim); margin-top: 10px; max-width: 38ch; text-wrap: pretty; }

/* Global term selector — one segmented control drives every card */
.pw-terms {
  display: flex; gap: 6px; margin-top: 20px; padding: 5px;
  border-radius: var(--r-pill); background: var(--bg-soft);
  border: 1px solid var(--line);
}
.pw-term {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 6px; border-radius: var(--r-pill);
  font-weight: 700; font-size: 13.5px; color: var(--ink-dim);
  transition: color .2s var(--ease), background .2s var(--ease), transform .14s;
}
.pw-term:active { transform: scale(0.96); }
.pw-term__save { font-family: var(--ff-mono); font-size: 10px; font-weight: 700; color: var(--good); letter-spacing: 0.02em; }
.pw-term.is-active {
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--accent-2) 45%, var(--accent) 100%);
  box-shadow: 0 6px 18px -8px var(--accent-glow), 0 1px 0 rgba(255,255,255,0.4) inset;
}
.pw-term.is-active .pw-term__save { color: var(--on-accent); opacity: 0.8; }

/* Horizontal carousel of tariff cards (left → right): trial + tiers.
   overflow-x:auto forces overflow-y to auto too (CSS spec), which would clip
   the ribbons that straddle each card's top — so the top padding reserves room
   for them (≈ half-ribbon height + clearance). */
.pw-rail {
  display: flex; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 20px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  margin: 24px -20px 4px; padding: 28px 20px 14px;
}
.pw-rail::-webkit-scrollbar { display: none; }
.pw-rail > .pw-card { flex: 0 0 64%; scroll-snap-align: start; min-width: 0; }

/* Carousel pagination dots + term-selector label */
.pw-dots { display: flex; justify-content: center; gap: 6px; margin: 14px 0 0; }
.pw-dot { width: 7px; height: 7px; padding: 0; border-radius: 50%; background: var(--line-strong); transition: width .28s var(--ease), background .25s; }
.pw-dot.is-active { width: 20px; border-radius: var(--r-pill); background: var(--accent-2); }
.pw-terms-label { font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 8px 2px; }
.pw-card {
  position: relative; padding: 20px; border-radius: var(--r-xl);
  background: linear-gradient(180deg, rgba(216,222,232,0.06), rgba(216,222,232,0.025));
  border: 1px solid var(--line-strong); cursor: pointer;
  transition: transform .18s var(--ease-out), border-color .2s, box-shadow .2s, background .2s;
}
.pw-card:active { transform: scale(0.985); }
.pw-card:hover { border-color: rgba(216,222,232,0.34); }
.pw-card--feat {
  border-color: rgba(255,201,60,0.62);
  background: linear-gradient(160deg, rgba(255,201,60,0.18) 0%, rgba(245,180,0,0.04) 48%, rgba(216,222,232,0.05) 100%);
  box-shadow: 0 22px 54px -20px var(--accent-glow), 0 1px 0 rgba(255,201,60,0.28) inset;
  padding-top: 30px;
}

.pw-ribbon {
  position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%);
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: var(--on-accent); font-family: var(--ff-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap;
  padding: 7px 15px; border-radius: var(--r-pill); box-shadow: 0 8px 20px -6px var(--accent-glow);
}
.pw-ribbon--ghost { background: var(--surface-solid-2); color: var(--gold); border: 1px solid var(--line-strong); box-shadow: none; }

.pw-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pw-card__title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pw-card__name { font-family: var(--ff-display); font-weight: 800; font-size: 22px; letter-spacing: -0.01em; line-height: 1.05; }
.pw-card__tag { font-size: 12px; font-weight: 500; color: var(--ink-faint-card); line-height: 1.2; }
.pw-card--feat .pw-card__tag { color: var(--accent-soft); }

.pw-card__tokens { font-family: var(--ff-display); font-weight: 700; font-size: 18px; color: var(--ink-dim); margin-top: 8px; line-height: 1.15; }
.pw-card__tokens .unit { font-size: 12px; color: var(--ink-faint-card); font-weight: 600; margin-left: 6px; }

.pw-card__ests { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.pw-est {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  font-size: 12px; color: var(--ink-dim); font-weight: 500;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 5px 11px;
}
.pw-card--feat .pw-est { color: var(--accent-soft); border-color: rgba(255,201,60,0.30); background: rgba(255,201,60,0.08); }

/* Feature checklist */
.pw-feats { list-style: none; display: flex; flex-direction: column; gap: 7px; margin-top: 14px; }
.pw-feat { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--ink-dim); line-height: 1.3; }
.pw-feat > svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--accent-2); margin-top: 1px; }
.pw-card--feat .pw-feat { color: var(--ink); }
.pw-card--feat .pw-feat > svg { color: var(--accent); }

/* Price + CTA — big accent monthly price is THE number; smaller term total below */
.pw-card__price { margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--line); }
.pw-card__mo { display: flex; align-items: baseline; gap: 3px; }
.pw-card__rub { font-family: var(--ff-mono); font-weight: 800; font-size: 36px; letter-spacing: -0.02em; color: var(--accent-2); line-height: 1; }
.pw-card__cur { font-size: 14px; font-weight: 700; color: var(--ink-dim); }
.pw-card__term { margin-top: 7px; display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; font-size: 12.5px; }
.pw-card__term[hidden] { display: none; }
.pw-card__old { font-family: var(--ff-mono); color: var(--ink-dim); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.pw-card__old[hidden] { display: none; }
.pw-card__sum { font-family: var(--ff-mono); font-weight: 600; color: var(--ink-dim); }

.pw-card__cta {
  margin-top: 13px; padding: 14px; text-align: center; border-radius: var(--r-md);
  font-family: var(--ff-display); font-weight: 700; font-size: 15px;
  background: var(--surface-solid-2); border: 1px solid var(--line-strong); color: var(--ink);
  transition: transform .14s var(--ease), background .2s;
}
.pw-card:active .pw-card__cta { transform: scale(0.985); }
.pw-card__cta--feat {
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--accent-2) 45%, var(--accent) 100%);
  color: var(--on-accent); border-color: transparent;
  box-shadow: 0 12px 28px -10px var(--accent-glow), 0 1px 0 rgba(255,255,255,0.4) inset;
}

/* Trust bar */
.pw-trust {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; column-gap: 6px; row-gap: 4px;
  margin-top: 22px; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line);
  font-family: var(--ff-mono); font-size: 11px; color: var(--ink-dim); letter-spacing: 0.02em; text-align: center;
}
.pw-trust__sep { color: var(--ink-ghost); }

/* pricing table */
.pricegroup { margin-bottom: 6px; }
.pricegroup__head { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.pricegroup__title { font-family: var(--ff-display); font-weight: 600; font-size: 14px; }
.pricegroup__hint { font-family: var(--ff-mono); font-size: 11px; color: var(--ink-faint); }
.priceline { display: flex; align-items: center; justify-content: space-between; padding: 10px 13px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); }
.priceline + .priceline { margin-top: 6px; }
.priceline__name { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.priceline__tok { font-family: var(--ff-mono); font-weight: 600; font-size: 12.5px; color: var(--accent-2); }

/* ════════════════════ GENERATING — signature scene (TZ §11) ════════════════════ */
.genstage { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 62vh; text-align: center; padding: 12px 0 4px; }
.genstage__eta { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent-2); display: inline-flex; align-items: center; gap: 9px; }
.genstage__eta::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent-glow); animation: genpulse 1.4s ease-in-out infinite; }

/* ghost card = placeholder of the future result */
.ghost { position: relative; width: min(74%, 232px); aspect-ratio: var(--ar, 1/1); margin-top: 30px; }
.ghost__skel { position: absolute; inset: 0; border-radius: var(--r-lg); overflow: hidden; background: linear-gradient(155deg, var(--surface-solid-2), var(--surface-solid) 70%); border: 1px solid var(--line-strong); box-shadow: var(--shadow-raised); }
.ghost__skel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 22%, rgba(255,255,255,0.08) 42%, rgba(255,210,100,0.16) 50%, rgba(255,255,255,0.08) 58%, transparent 78%); transform: translateX(-100%); animation: genshimmer 1.9s var(--ease) infinite; }
.ghost__mark { position: absolute; inset: 0; display: grid; place-items: center; color: var(--accent-2); opacity: 0.9; animation: genbreathe 2.6s ease-in-out infinite; }
.ghost__mark svg { width: 44px; height: 44px; }
/* animated amber ring around the ghost — "soft animated border" */
.ghost__ring { position: absolute; inset: -10px; border-radius: calc(var(--r-lg) + 10px); padding: 2px; background: conic-gradient(from 0deg, var(--accent) 0deg, var(--accent-soft) 45deg, transparent 140deg, transparent 225deg, rgba(216,222,232,0.55) 300deg, transparent 360deg); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: genspin 3s linear infinite; filter: drop-shadow(0 0 10px var(--accent-glow)); }
@keyframes genshimmer { 100% { transform: translateX(100%); } }
@keyframes genspin { to { transform: rotate(360deg); } }
@keyframes genbreathe { 50% { transform: scale(1.07); opacity: 0.6; } }
@keyframes genpulse { 50% { opacity: 0.3; transform: scale(0.75); } }

.genstage__title { font-family: var(--ff-display); font-weight: 700; font-size: 19px; margin-top: 28px; }
.genstage__sub { font-size: 13px; color: var(--ink-faint); margin-top: 6px; max-width: 32ch; line-height: 1.45; }

/* trajectory → gallery destination: the result is "moving" to your gallery */
.genrail { display: flex; align-items: center; gap: 10px; margin-top: 30px; font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); }
.genrail__line { position: relative; width: 68px; height: 2px; border-radius: 999px; background: var(--line-strong); overflow: hidden; }
.genrail__dot { position: absolute; top: 50%; left: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); transform: translateY(-50%); animation: gentravel 1.7s var(--ease) infinite; }
.genrail__dest { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-dim); }
.genrail__dest svg { width: 14px; height: 14px; color: var(--accent-2); }
@keyframes gentravel { 0% { left: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: 100%; opacity: 0; } }

/* shared spinner keyframe — kept for .loader */
@keyframes spin { to { transform: rotate(360deg); } }

/* ════════════════════ RESULT ════════════════════ */
.result { }
.result__art { position: relative; width: 100%; max-width: 340px; aspect-ratio: var(--ar, 1/1); max-height: 56vh; margin-inline: auto; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line-strong); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-raised); animation: resultIn var(--dur-3) var(--ease-out-quart) both; }
@keyframes resultIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: none; } }
.result__art .rs-bg { position: absolute; inset: 0; }
.result__art .rs-emoji { position: relative; color: var(--ink); filter: drop-shadow(0 8px 20px rgba(0,0,0,0.5)); }
.result__art .rs-emoji svg { width: 56px; height: 56px; }
.result__art .rs-type { position: absolute; top: 12px; left: 12px; }
.result__art .rs-prompt { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 13px; font-size: 12px; color: var(--ink); background: linear-gradient(0deg, rgba(6,10,22,0.85), transparent); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.result__done { display: flex; align-items: center; gap: 9px; margin-top: 16px; padding: 13px 15px; border-radius: var(--r-md); background: rgba(94,224,138,0.10); border: 1px solid rgba(94,224,138,0.25); }
.result__done__ico { color: var(--good); display: inline-grid; place-items: center; }
.result__done__ico svg { width: 18px; height: 18px; }
.result__done__t { font-size: 13.5px; }
.result__done__t b { color: var(--good); }

/* real media from producer_st */
.rs-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #0A0A0B; }
.rs-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(7,19,37,0.55); color: #fff; font-size: 17px; padding-left: 3px; pointer-events: none; border: 1px solid rgba(255,255,255,0.25); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.rs-audio { width: 100%; margin-top: 14px; }
.rs-dl { display: inline-block; margin-top: 14px; color: var(--accent-2); font-weight: 700; font-size: 13px; text-decoration: none; padding: 9px 16px; border-radius: 999px; border: 1px solid rgba(255,201,60,0.32); background: rgba(255,201,60,0.08); }
.rs-dl:hover { background: rgba(255,201,60,0.14); }
.rs-dl[hidden] { display: none; }
/* download / share action row on the result screen */
.rs-actions { display: flex; gap: 9px; margin-top: 16px; }
.rs-actions .btn { flex: 1; }

/* ════════════════════ INFO / LEGAL ════════════════════ */
.infostub { padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.infostub__ico { font-size: 30px; margin-bottom: 12px; }
.linkcard { display: flex; align-items: center; gap: 13px; width: 100%; text-align: left; padding: 15px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); transition: background .2s, transform .14s; }
.linkcard:hover { background: var(--surface-2); }
.linkcard:active { transform: scale(0.99); }
.linkcard__ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 18px; background: var(--surface-3); }
.linkcard__main { flex: 1; min-width: 0; }
.linkcard__t { font-weight: 700; font-size: 14px; }
.linkcard__s { font-size: 11.5px; color: var(--ink-faint); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linkcard__ext { color: var(--ink-faint); }
.linkcard__ext svg { width: 16px; height: 16px; }

/* ════════════════════ REF UPLOAD ════════════════════ */
.refdrop {
  display: block;
  border: 1.5px dashed rgba(255,201,60,0.5); border-radius: var(--r-lg);
  padding: 32px 16px; text-align: center; cursor: pointer;
  background: linear-gradient(135deg, rgba(255,201,60,0.12), rgba(245,180,0,0.04));
  box-shadow: 0 8px 24px -16px var(--accent-glow);
  transition: border-color .2s, background .2s, transform .12s;
}
.refdrop:hover { border-color: rgba(255,201,60,0.8); background: linear-gradient(135deg, rgba(255,201,60,0.18), rgba(245,180,0,0.06)); }
.refdrop:active { transform: scale(0.99); }
/* The native file input must never render (a stray dark block was covering
   the dropzone). Force-hide it regardless of the `hidden` attribute. */
#refInput { display: none !important; }
.refdrop__ico { font-size: 36px; margin-bottom: 10px; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3)); }
.refdrop__t { font-weight: 700; font-size: 15px; color: var(--ink); }
.refdrop__s { font-size: 12px; color: var(--ink-dim); margin-top: 5px; }
.refthm { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.refthm__t { aspect-ratio: 1; border-radius: 10px; overflow: hidden; position: relative; background: var(--surface-3); }
.refthm__t img { width: 100%; height: 100%; object-fit: cover; }
.refthm__del { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,0.6); color: #fff; display: grid; place-items: center; font-size: 13px; line-height: 1; }
.reftab { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px 2px; }
.reftab::-webkit-scrollbar { display: none; }
.reftab__t { flex: 0 0 auto; padding: 9px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--ink-dim); background: var(--surface); border: 1px solid var(--line); white-space: nowrap; }
.reftab__t.is-active { color: var(--accent-2); border-color: rgba(255,201,60,0.5); background: rgba(255,201,60,0.10); }
.reftab__count { font-family: var(--ff-mono); font-size: 11px; opacity: 0.7; margin-left: 4px; }

/* ════════════════════ AUTH / LOGIN ════════════════════ */
.mark--xl { width: 64px; height: 64px; border-radius: 20px; font-size: 32px; margin: 0 auto; box-shadow: 0 14px 36px -12px var(--accent-glow); }
.login-code {
  display: inline-block; margin-top: 18px; padding: 14px 24px 14px 30px; border-radius: var(--r-md);
  font-family: var(--ff-mono); font-weight: 700; font-size: 32px; letter-spacing: 0.34em;
  color: var(--gold); background: linear-gradient(135deg, rgba(216,222,232,0.12), rgba(245,180,0,0.06));
  border: 1px solid rgba(216,222,232,0.3);
}
.cmdline { display: flex; align-items: center; gap: 10px; }
.cmdline__code { flex: 1 1 auto; min-width: 0; font-family: var(--ff-mono); font-size: 13.5px; font-weight: 600; color: var(--ink); background: var(--surface-3); padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.cmdline__code::-webkit-scrollbar { display: none; }

/* ════════════════════ DURATION SLIDER ════════════════════ */
.row--slider { margin-bottom: 2px; }
.slider-wrap { padding: 14px 4px 2px; }
.slider {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) var(--p, 50%), var(--surface-3) var(--p, 50%), var(--surface-3) 100%);
  outline: none; cursor: pointer;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent)); border: 2px solid var(--on-accent);
  box-shadow: 0 4px 12px -4px var(--accent-glow); cursor: pointer;
}
.slider::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--on-accent);
  background: linear-gradient(135deg, var(--accent-2), var(--accent)); cursor: pointer;
}
.slider-edges { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; font-family: var(--ff-mono); font-size: 10.5px; color: var(--ink-faint); }
.slider-edges__cur { color: var(--accent-2); font-size: 12.5px; font-weight: 700; }

/* ════════════════════ DOCK ════════════════════ */
.dock {
  flex: 0 0 auto; padding: 12px 18px calc(16px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, transparent, rgba(7,12,22,0.85) 30%);
  position: relative; z-index: 12;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.dock[hidden] { display: none; }
/* when the tab nav is also present (generation screen) it carries the safe-area */
.has-tabnav .dock { padding-bottom: 12px; }
.dock__row { display: flex; gap: 9px; }
.dock__row .btn { flex: 1; }
.dock__hint { text-align: center; font-size: 11px; color: var(--ink-faint); margin-top: 8px; }

/* home indicator (removed — the tab bar / dock carry the bottom safe-area) */

/* ════════════════════ SHEET ════════════════════ */
.sheet-veil { position: fixed; inset: 0; z-index: 80; background: rgba(5,8,16,0.6); backdrop-filter: blur(3px); opacity: 0; transition: opacity .28s; }
.sheet-veil[hidden] { display: none; }
.sheet-veil.is-shown { opacity: 1; }
.sheet {
  position: fixed; z-index: 81; left: 50%; bottom: 0; transform: translate(-50%, 100%);
  width: min(100vw, 420px);
  max-height: 82dvh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #16161A, #0E0E12);
  border-radius: 28px 28px 0 0;
  border: 1px solid var(--line-strong); border-bottom: none;
  box-shadow: 0 -20px 60px -10px rgba(0,0,0,0.7);
  transition: transform .36s var(--ease-out); padding-bottom: env(safe-area-inset-bottom, 0px);
}
.sheet[hidden] { display: flex; }
.sheet.is-shown { transform: translate(-50%, 0); }
.sheet__grip { width: 40px; height: 4px; border-radius: 999px; background: var(--line-strong); margin: 10px auto 4px; flex: 0 0 auto; }
.sheet__head { padding: 8px 20px 12px; flex: 0 0 auto; border-bottom: 1px solid var(--line); }
.sheet__head .h2 { font-size: 17px; }
.sheet__head .cap { margin-top: 3px; }
.sheet__body { padding: 16px 20px 24px; overflow-y: auto; scrollbar-width: none; }
.sheet__body::-webkit-scrollbar { display: none; }
.sheet__close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-dim); }
.sheet__close svg { width: 16px; height: 16px; }

.sheet__list { display: flex; flex-direction: column; gap: 8px; }
.sheetopt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 14px 15px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line);
  transition: background .18s, transform .14s, border-color .18s;
}
.sheetopt:hover { background: var(--surface-2); }
.sheetopt:active { transform: scale(0.98); }
.sheetopt.is-active { border-color: rgba(255,201,60,0.5); background: linear-gradient(135deg, rgba(255,201,60,0.12), rgba(245,180,0,0.03)); }
.sheetopt__main { flex: 1; min-width: 0; }
.sheetopt__t { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.sheetopt__s { font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.sheetopt__check { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex: 0 0 auto; display: grid; place-items: center; }
.sheetopt.is-active .sheetopt__check { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.sheetopt__check svg { width: 13px; height: 13px; opacity: 0; transition: opacity .15s; }
.sheetopt.is-active .sheetopt__check svg { opacity: 1; }

/* ════════════════════ TOAST ════════════════════ */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 24px);
  z-index: 90; max-width: 360px; width: max-content;
  padding: 13px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  background: rgba(16,26,44,0.96); border: 1px solid var(--line-strong); color: var(--ink);
  box-shadow: var(--shadow-2); opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .3s var(--ease-out);
  display: flex; align-items: center; gap: 9px;
}
.toast[hidden] { display: none; }
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }
.toast--bad { border-color: rgba(255,98,89,0.4); }
.toast--bad .toast__ico { color: var(--bad); }
.toast--good { border-color: rgba(94,224,138,0.4); }
.toast--good .toast__ico { color: var(--good); }
.toast__ico { font-size: 16px; }

/* ════════════════════ LIGHTBOX (full-size result preview) ════════════════════ */
.lightbox {
  position: fixed; inset: 0; z-index: 95;
  background: rgba(5, 8, 16, 0.94); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 56px 18px 24px;
  opacity: 0; transition: opacity .22s var(--ease);
}
.lightbox[hidden] { display: none; }
.lightbox.is-shown { opacity: 1; }
.lightbox__close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink); z-index: 2; }
.lightbox__close:active { transform: scale(0.92); }
.lightbox__close svg { width: 18px; height: 18px; }
.lightbox__body { flex: 1 1 auto; min-height: 0; width: 100%; max-width: 540px; display: flex; align-items: center; justify-content: center; }
.lb-media { max-width: 100%; max-height: 100%; border-radius: var(--r-md); object-fit: contain; box-shadow: var(--shadow-2); }
.lb-audiowrap { text-align: center; }
.lb-audiowrap .lb-emoji { font-size: 72px; margin-bottom: 18px; filter: drop-shadow(0 8px 24px rgba(0,0,0,0.5)); }
.lb-audio { width: min(420px, 100%); }
.lb-empty { text-align: center; color: var(--ink-faint); }
.lb-empty .lb-emoji { font-size: 64px; margin-bottom: 12px; opacity: 0.6; }
.lightbox__bar { flex: 0 0 auto; width: 100%; max-width: 540px; margin-top: 18px; text-align: center; }
.lb-prompt { font-size: 13.5px; color: var(--ink-dim); line-height: 1.45; margin-bottom: 6px; }
.lb-meta { font-size: 11.5px; color: var(--ink-faint); margin-bottom: 14px; }

/* spinner (used inside buttons during async ops) */
.loader {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(7, 19, 37, 0.3); border-top-color: var(--on-accent);
  animation: spin 0.7s linear infinite; display: inline-block;
}

/* ════════════════════ UTIL ════════════════════ */
.spacer { flex: 1; }
.muted { color: var(--ink-faint); }
.tcenter { text-align: center; }
.row-gap-sm > * + * { margin-top: 8px; }
.row-gap > * + * { margin-top: 11px; }
.nowrap { white-space: nowrap; }
.divider { height: 1px; background: var(--line); margin: 4px 0; }
.kbd { font-family: var(--ff-mono); font-size: 11px; padding: 2px 6px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-dim); }

/* hide caret flicker on long press */
* { -webkit-tap-highlight-color: transparent; }

@media (prefers-reduced-motion: reduce) {
  .screen > * { animation: none; opacity: 1; transform: none; }
  .glow { animation: none; }
  .ghost__ring, .ghost__skel::after, .ghost__mark, .genstage__eta::before, .genrail__dot { animation: none; }
  .ghost__ring { opacity: 0.5; }
  .result__art { animation: none; }
}

/* ── Subscriptions (#11) ─────────────────────────────────────── */
.tariff--sub { border-color: rgba(216,222,232,0.40); background: linear-gradient(135deg, rgba(216,222,232,0.12), rgba(245,180,0,0.03)); box-shadow: 0 12px 34px -18px rgba(216,222,232,0.55); }
.tariff--sub .tariff__ribbon { color: var(--gold); }
.subbadge { padding: 16px; }
.subbadge__head { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--good); display: flex; align-items: center; gap: 8px; }
.subbadge__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(94,224,138,0.18); }

/* ── Share banner (#12) ──────────────────────────────────────── */
.share-banner { padding: 14px; }
.share-banner__head { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 10px; }
.share-banner__media { width: 100%; max-height: 56vh; object-fit: contain; border-radius: var(--r-md); display: block; background: #000; }
.share-banner__media:not([controls]) { max-height: 40vh; }

/* ── TOPUP: term picker + disabled packs ─────────────────────── */
.termrow { display: flex; gap: 8px; margin-top: 12px; }
.termbtn { flex: 1; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; padding: 10px 11px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--bg-soft); cursor: pointer; transition: transform .14s var(--ease), border-color .2s, background .2s; }
.termbtn:active { transform: scale(0.97); }
.termbtn:hover { border-color: var(--line-strong); background: rgba(245,180,0,0.06); }
.termbtn__label { font-size: 11px; color: var(--ink-dim); letter-spacing: 0.02em; }
.termbtn__price { font-family: var(--ff-display); font-weight: 700; font-size: 15px; color: var(--ink); }
.tariff:disabled, .tariff[disabled] { opacity: 0.45; cursor: not-allowed; }
.tariff:disabled:active { transform: none; }

/* ── Inspiration cards (home screen) ─────────────────────────── */
.insprow { display: flex; flex-direction: column; gap: 10px; }
.insp { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: transform .14s var(--ease), border-color .2s, background .2s; text-align: left; }
.insp:active { transform: scale(0.985); }
.insp:hover { border-color: var(--line-strong); background: rgba(245,180,0,0.05); }
.insp__emoji { font-size: 24px; line-height: 1; }
.insp__body { flex: 1; min-width: 0; }
.insp__title { font-family: var(--ff-display); font-weight: 600; font-size: 15px; color: var(--ink); }
.insp__type { font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.insp__arrow { color: var(--ink-faint); display: grid; place-items: center; }
.insp__arrow svg { width: 18px; height: 18px; }

/* ════════════════════ HOME (redesign) ════════════════════ */
.home__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 2px 4px; }
.home__brand { display: flex; align-items: center; gap: 11px; }
.home__brandtext { line-height: 1; }
.home__brandname { font-family: var(--ff-display); font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }
.home__brandsub { font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.3em; color: var(--accent-2); text-transform: uppercase; margin-top: 4px; }
.home__headright { display: flex; align-items: center; gap: 8px; }
.subchip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 999px; font-family: var(--ff-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: var(--gold); background: linear-gradient(135deg, rgba(216,222,232,0.16), rgba(216,222,232,0.05)); border: 1px solid rgba(216,222,232,0.32); }
.subchip__crown { font-size: 12px; }
.home__tokens { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px 8px 11px; border-radius: 999px; background: linear-gradient(135deg, rgba(216,222,232,0.14), rgba(245,180,0,0.06)); border: 1px solid rgba(216,222,232,0.28); transition: background .2s, transform .12s; }
.home__tokens:active { transform: scale(0.96); }
.home__tokens-star { color: var(--gold); font-size: 13px; line-height: 1; filter: drop-shadow(0 0 6px rgba(216,222,232,0.5)); }
.home__tokens-val { font-family: var(--ff-mono); font-weight: 700; font-size: 14px; color: var(--ink); }
.home__tokens-unit { font-size: 11px; color: var(--ink-dim); font-weight: 600; }

.home__hero { margin-top: 26px; }
.home__title { font-family: var(--ff-display); font-weight: 800; font-size: 30px; letter-spacing: -0.025em; line-height: 1.04; margin-top: 8px; }
.home__lede { font-size: 14px; line-height: 1.5; color: var(--ink-dim); margin-top: 10px; max-width: 30ch; }

/* small text action used in section heads ("Смотреть все →", "Сбросить") */
.section__link { font-family: var(--ff-mono); font-size: 11px; font-weight: 600; color: var(--accent-2); letter-spacing: 0.02em; }
.section__link:active { opacity: 0.7; }

/* ── Create cards (home: Изображение / Видео / Музыка) ──── */
.creategrid { display: grid; gap: 12px; margin-top: 4px; }
.createcard {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 14px;
  padding: 18px; border-radius: var(--r-xl); cursor: pointer;
  border: 1px solid var(--line); text-align: left; width: 100%;
  transition: transform .18s var(--ease), box-shadow .25s, border-color .2s;
}
.createcard:active { transform: scale(0.985); }
.createcard__art { position: absolute; inset: 0; z-index: 0; }
.createcard__art::before { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, rgba(7,14,38,0.6) 0%, rgba(7,14,38,0.2) 50%, transparent 100%); }
.createcard__body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 3px; }
.createcard__emoji { font-size: 26px; line-height: 1; margin-bottom: 5px; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.45)); }
.createcard__name { font-family: var(--ff-display); font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.createcard__desc { font-size: 12.5px; color: var(--ink-ghost); }
.createcard__go { position: relative; z-index: 1; margin-left: auto; color: var(--ink); opacity: 0.6; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(216,222,232,0.08); border: 1px solid var(--line); }
.createcard__go svg { width: 18px; height: 18px; }
.createcard--image { background: linear-gradient(120deg, #16161A, #0E0E12); }
.createcard--image .createcard__art { background: radial-gradient(120% 140% at 85% 20%, rgba(245,180,0,0.55), transparent 60%); }
.createcard--video { background: linear-gradient(120deg, #16161A, #0E0E12); }
.createcard--video .createcard__art { background: radial-gradient(120% 140% at 85% 20%, rgba(245,180,0,0.5), transparent 60%); }
.createcard--music { background: linear-gradient(120deg, #16161A, #0E0E12); }
.createcard--music .createcard__art { background: radial-gradient(120% 140% at 85% 20%, rgba(245,180,0,0.5), transparent 60%); }

/* ════════════════════ CONSTRUCTOR: type switcher + style picker ════════════════════ */
.typeswitch { display: flex; gap: 4px; padding: 4px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.typeswitch__t {
  flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 4px; border-radius: 11px;
  font-family: var(--ff-body); font-weight: 600; font-size: 12px; color: var(--ink-dim);
  transition: all .2s var(--ease); min-width: 0;
}
.typeswitch__t svg { width: 18px; height: 18px; flex: 0 0 auto; }
.typeswitch__t span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.typeswitch__t:active { transform: scale(0.96); }
.typeswitch__t.is-active {
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 6px 16px -9px var(--accent-glow);
}

/* ═══ CONSTRUCTOR: stable/swappable regions + 2×2 grid (no full re-render) ═══ */
/* Exempt the swappable regions from the screen-rise animation — its `forwards`
   fill would lock opacity:1 and block the swap crossfade. They render at
   opacity:1 and crossfade on type / option / style changes instead. */
.ctor-region { animation: none; opacity: 1; transform: none; transition: opacity 150ms var(--ease-out-quart), transform 150ms var(--ease-out-quart); }
.ctor-region.is-out { opacity: 0; transform: translateY(6px); }

.ctor-modelrow { display: flex; flex-direction: column; gap: 10px; }

/* 2×2 settings grid + compact value cards (Пропорции / Разрешение / Длительность / Звук …) */
.ctorgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.optcard {
  display: flex; flex-direction: column; gap: 7px;
  padding: 13px 14px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line);
  cursor: pointer; text-align: left; width: 100%;
  transition: transform var(--dur-1) var(--ease-out-quart), background var(--dur-2), border-color var(--dur-2);
}
.optcard:active { transform: scale(0.97); }
.optcard:hover { background: var(--surface-2); border-color: var(--line-strong); }
.optcard--accent { border-color: rgba(255,201,60,0.42); background: linear-gradient(135deg, rgba(255,201,60,0.10), rgba(245,180,0,0.02)); }
.optcard__top { display: flex; align-items: center; gap: 8px; }
.optcard__ico { color: var(--ink-faint); display: inline-grid; place-items: center; }
.optcard__ico svg { width: 18px; height: 18px; }
.optcard--accent .optcard__ico { color: var(--accent-2); }
.optcard__label { flex: 1; font-size: 12px; color: var(--ink-faint); letter-spacing: 0.01em; }
.optcard__val { font-family: var(--ff-mono); font-weight: 700; font-size: 16px; color: var(--ink); }
.optcard--model .optcard__val { font-family: var(--ff-body); font-weight: 600; font-size: 15px; }   /* model name, not a number */
.optcard__sub { font-size: 11px; color: var(--ink-faint); margin-top: -3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctor-prompt { min-height: 148px; }

/* ════════════════════ INSPIRATION tab ════════════════════ */
.inspfilt-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 4px 20px; -webkit-overflow-scrolling: touch; }
.inspfilt-row::-webkit-scrollbar { display: none; }
.inspfilt { flex: 0 0 auto; padding: 9px 15px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-dim); background: var(--surface); border: 1px solid var(--line); white-space: nowrap; transition: all .18s var(--ease); }
.inspfilt:active { transform: scale(0.95); }
.inspfilt.is-active { color: var(--on-accent); background: linear-gradient(135deg, var(--accent-2), var(--accent)); border-color: transparent; box-shadow: 0 6px 18px -10px var(--accent-glow); }

.inspgrid { column-count: 2; column-gap: 4px; }
.inspcard { break-inside: avoid; margin-bottom: 4px; display: block; padding: 0; appearance: none; -webkit-appearance: none; border-radius: var(--r-lg); cursor: pointer; background: none; border: none; transition: transform .16s var(--ease), border-color .2s, background .2s; overflow: hidden; position: relative; }
.inspcard:active { transform: scale(0.97); }
.inspcard:hover { border-color: var(--line-strong); }
.inspcard__art { width: 100%; display: block; position: relative; overflow: hidden; }
.inspcard__art--emoji { aspect-ratio: 1/1; display: grid; place-items: center; }
.inspcard__art img { display: block; width: 100%; height: auto; }
.inspcard__art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255,255,255,0.13), transparent 55%); }
.inspcard__emoji { position: relative; font-size: 34px; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5)); }
.inspcard__body { display: flex; flex-direction: column; gap: 2px; padding: 0 2px 3px; }
.inspcard__title { font-family: var(--ff-display); font-weight: 600; font-size: 13.5px; }
.inspcard__type { font-size: 11px; color: var(--ink-faint); }

/* ════════════════════ PERSISTENT TAB NAVIGATION ════════════════════ */
.tabnav { flex: 0 0 auto; position: relative; z-index: 14; padding: 6px 10px calc(8px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(180deg, transparent, rgba(6,12,28,0.92) 38%); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.tabnav[hidden] { display: none; }
.tabnav__row { position: relative; display: flex; align-items: flex-end; justify-content: space-between; padding: 7px 6px; border-radius: 22px; background: linear-gradient(180deg, rgba(20,20,24,0.82), rgba(10,10,12,0.92)); border: 1px solid var(--line-strong); box-shadow: 0 1px 0 rgba(216,222,232,0.08) inset, 0 14px 40px -18px rgba(0,0,0,0.8); }
.tabnav__item { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; color: var(--ink-faint); transition: color .2s var(--ease), transform .12s; min-width: 0; }
.tabnav__item:active { transform: scale(0.92); }
.tabnav__item.is-active { color: var(--accent-2); }
.tabnav__ico { width: 23px; height: 23px; display: grid; place-items: center; position: relative; }
.tabnav__ico svg { width: 22px; height: 22px; }
.tabnav__item.is-active .tabnav__ico { filter: drop-shadow(0 0 7px var(--accent-glow)); }
.tabnav__label { font-size: 9.5px; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap; }
.tabnav__badge {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--accent-2);
  color: #1a1a1a;
  font-family: var(--ff-display);
  font-size: 9.5px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg), 0 0 10px var(--accent-glow);
  animation: tabnav-badge-pop .32s var(--ease);
  pointer-events: none;
  z-index: 2;
}
@keyframes tabnav-badge-pop {
  from { transform: scale(0); }
  60%  { transform: scale(1.18); }
  to   { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .tabnav__badge { animation: none; }
}

/* center Create FAB — raised, glowing platinum-azure star */
.tabnav__fab { flex: 0 0 auto; position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: -28px; padding: 0 6px; }
.tabnav__star {
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; color: var(--on-accent);
  background: radial-gradient(120% 120% at 30% 25%, var(--accent-soft) 0%, var(--accent-2) 35%, var(--accent) 100%);
  border: 1px solid rgba(216,222,232,0.5);
  box-shadow: 0 12px 30px -8px var(--accent-glow), 0 1px 0 rgba(255,255,255,0.4) inset;
  transition: transform .15s var(--ease);
  animation: fabGlow 2.4s ease-in-out infinite;
}
.tabnav__star svg { width: 26px; height: 26px; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.25)); }
.tabnav__fab:active .tabnav__star { transform: scale(0.93); }
.tabnav__fab.is-active .tabnav__fab-label { color: var(--accent-2); }
.tabnav__fab.is-active .tabnav__star { animation: none; filter: drop-shadow(0 0 10px var(--accent-glow)); }
.tabnav__fab-label { font-family: var(--ff-display); font-weight: 700; font-size: 10px; color: var(--accent-soft); letter-spacing: 0.02em; }
@keyframes fabGlow {
  0%, 100% { box-shadow: 0 12px 30px -8px var(--accent-glow), 0 1px 0 rgba(255,255,255,0.4) inset; }
  50% { box-shadow: 0 0 0 6px rgba(245,180,0,0.12), 0 16px 38px -8px var(--accent-glow), 0 1px 0 rgba(255,255,255,0.5) inset; }
}
@media (prefers-reduced-motion: reduce) { .tabnav__star { animation: none; } }

/* ════════════════════ APP BAR (persistent header) ════════════════════ */
.appbar { flex: 0 0 auto; padding: 10px 16px 8px; padding-top: max(10px, env(safe-area-inset-top, 0px)); position: relative; z-index: 20; }
@media (min-width: 480px) { .appbar { padding-top: 18px; } }
.appbar__in { display: flex; align-items: center; gap: 10px; min-width: 0; }
.appbar__spacer { flex: 1; min-width: 4px; }
.appbar__back { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: var(--surface); border: 1px solid var(--line); transition: transform .15s, background .2s; }
.appbar__back:active { transform: scale(0.92); }
.appbar__back svg { width: 20px; height: 20px; }
.appbar__title { font-family: var(--ff-display); font-weight: 600; font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar__brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.appbar__wordmark { display: flex; flex-direction: column; line-height: 1; }
.appbar__na { font-family: var(--ff-display); font-weight: 800; font-size: 15px; letter-spacing: -0.01em; }
.appbar__st { font-family: var(--ff-mono); font-size: 9px; letter-spacing: 0.3em; color: var(--accent-2); text-transform: uppercase; margin-top: 2px; }
.mark--sm { width: 32px; height: 32px; border-radius: 10px; font-size: 16px; box-shadow: 0 6px 16px -8px var(--accent-glow); }

/* combined token + subscription chip */
.appbar__chip { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; padding: 7px 12px; border-radius: 999px; background: linear-gradient(135deg, rgba(216,222,232,0.14), rgba(245,180,0,0.06)); border: 1px solid rgba(216,222,232,0.26); transition: background .2s, transform .12s; }
.appbar__chip:active { transform: scale(0.96); }
.appbar__chip-star { color: var(--gold); font-size: 12px; line-height: 1; filter: drop-shadow(0 0 5px rgba(216,222,232,0.5)); }
.appbar__chip-tok { font-weight: 700; font-size: 13px; color: var(--ink); }
.appbar__chip-sep { width: 1px; height: 14px; background: rgba(216,222,232,0.22); }
.appbar__chip-sub { display: inline-flex; align-items: center; gap: 4px; font-family: var(--ff-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; color: var(--gold); }
.appbar__chip-crown { font-size: 11px; }

/* ════════════════════ HOME: minimalist create row ════════════════════ */
.home__hero { margin-top: 18px; }
.createcards { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 2px; }
.createcard-mini { display: flex; flex-direction: column; align-items: center; gap: 11px; padding: 18px 8px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: transform .16s var(--ease), border-color .2s, background .2s; }
.createcard-mini:active { transform: scale(0.97); }
.createcard-mini:hover { border-color: var(--line-strong); background: var(--surface-2); }
.createcard-mini__ico { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; color: var(--accent-2); background: linear-gradient(135deg, rgba(245,180,0,0.18), rgba(245,180,0,0.04)); border: 1px solid rgba(245,180,0,0.24); box-shadow: 0 6px 16px -10px var(--accent-glow); }
.createcard-mini__ico svg { width: 23px; height: 23px; }
.createcard-mini__name { font-family: var(--ff-display); font-weight: 600; font-size: 12.5px; color: var(--ink); }

/* media-backed cards + home teaser thumb */
.insp__thumb { width: 44px; height: 44px; flex: 0 0 auto; border-radius: var(--r-sm); background-size: cover; background-position: center; background-color: var(--surface-2); }
.inspcard__art--media { line-height: 0; }
.inspcard__art--media::after { background: linear-gradient(160deg, rgba(0,0,0,0.20), transparent 60%); }
.inspcard__art--video { padding: 0; }
.inspcard__video { width: 100%; height: auto; display: block; }
.inspcard__play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(10,10,12,0.55); color: var(--ink); font-size: 13px; padding-left: 2px; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); transition: opacity .25s ease; pointer-events: none; }
.inspcard.is-playing .inspcard__play { opacity: 0; }
.inspcard__pin { position: absolute; top: 6px; right: 7px; z-index: 2; font-size: 13px; color: var(--accent-2); filter: drop-shadow(0 1px 3px rgba(0,0,0,0.6)); }

/* ════════════════════ INSPIRATION CMS · ADMIN ════════════════════ */
.acard { display: flex; gap: 12px; padding: 11px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.acard + .acard { margin-top: 8px; }
.acard__thumb { width: 64px; height: 64px; flex: 0 0 auto; border-radius: var(--r-sm); background-size: cover; background-position: center; position: relative; }
.acard__thumb--ph { display: grid; place-items: center; background: var(--surface-2); font-size: 22px; }
.acard__play { position: absolute; inset: 0; margin: auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(10,10,12,0.55); color: var(--ink); font-size: 10px; padding-left: 2px; }
.acard__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.acard__t { font-family: var(--ff-display); font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acard__meta { font-size: 11px; color: var(--ink-faint); }
.acard__acts { display: flex; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.mini { padding: 5px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--ink-dim); background: var(--surface-2); border: 1px solid var(--line); transition: all .16s var(--ease); }
.mini:active { transform: scale(0.94); }
.mini.is-on { color: var(--on-accent); background: linear-gradient(135deg, var(--accent-2), var(--accent)); border-color: transparent; }
.mini--danger { color: var(--bad); border-color: rgba(255,98,89,0.30); }

/* admin create form */
.adraft__prevwrap { margin-top: 12px; }
.adraft__prev { width: 100%; max-height: 260px; object-fit: contain; border-radius: var(--r-md); background: var(--surface-2); display: block; }
.adraft__ph { padding: 28px 12px; text-align: center; color: var(--ink-faint); font-size: 12.5px; border-radius: var(--r-md); background: var(--surface); border: 1px dashed var(--line-strong); }
.fld { display: block; }
.fld__label { display: block; font-size: 11px; font-weight: 600; color: var(--ink-dim); margin-bottom: 6px; letter-spacing: 0.01em; }
.fld__input { width: 100%; box-sizing: border-box; padding: 11px 13px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-family: var(--ff-body); font-size: 14px; resize: vertical; }
.fld__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.fld--check { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-dim); cursor: pointer; }
.fld--check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* gallery card: media thumb (photo + video preview) */
.gencard__thumb--ph { font-size: 20px; }
.gencard__thumb[style*="background-image"] { background-size: cover; background-position: center; }
.gencard__thumb--video video { width: 100%; height: 100%; object-fit: cover; border-radius: 11px; display: block; }
.gencard__play { position: absolute; inset: 0; margin: auto; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(10,10,12,0.6); color: var(--ink); font-size: 9px; padding-left: 2px; z-index: 2; }

/* lightbox actions row */
.lb-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.lb-btn--danger { color: var(--bad); border-color: rgba(255,98,89,0.30); }

/* Inspiration: admin in-tab management (▲▼ + visibility on tap) */
.inspcard { position: relative; }
.inspcard.is-manage { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-glow); }
.inspcard__off { position: absolute; top: 8px; left: 8px; z-index: 3; font-size: 10px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--ink); background: rgba(10,10,12,0.66); padding: 2px 7px; border-radius: 999px; }
.inspm__hint { margin: 2px 2px 12px; }
.inspm__bar { position: absolute; top: 8px; left: 8px; right: 8px; z-index: 3; display: flex; justify-content: center; gap: 7px; }
.inspm__b { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; color: var(--ink); background: rgba(10,10,12,0.62); border: 1px solid var(--line-strong); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.inspm__b:active { transform: scale(0.92); }
.inspm__b.is-off { color: var(--bad); }

/* ── Pull-to-refresh ───────────────────────────────────── */
.ptr {
  flex: 0 0 auto;
  height: 0;
  overflow: hidden;
  display: flex; align-items: flex-end; justify-content: center;
  transition: height .2s var(--ease-out);
  background: transparent;
}
.ptr__sp {
  width: 26px; height: 26px; margin-bottom: 10px;
  border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.14);
  border-top-color: var(--accent);
  opacity: 0;
  transition: opacity .15s, transform .15s;
}
.ptr.is-pull .ptr__sp { opacity: 1; }
.ptr.is-armed .ptr__sp { border-top-color: var(--accent-2); transform: scale(1.1); }
.ptr.is-spin .ptr__sp { animation: spin .8s linear infinite; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .ptr.is-spin .ptr__sp { animation: none; } }

/* ── Prompt enhance sheet ── */
.enh { display: flex; flex-direction: column; gap: 14px; }
.enh--loading { align-items: center; justify-content: center; padding: 24px 0; color: var(--ink-dim); gap: 10px; }
.enh__summary { background: linear-gradient(135deg, rgba(255,201,60,0.10), rgba(245,180,0,0.02)); border: 1px solid rgba(255,201,60,0.25); border-radius: 14px; padding: 12px 14px; font-size: 13.5px; line-height: 1.45; color: var(--ink); }
.enh__qs { display: flex; flex-direction: column; gap: 12px; }
.enh__ql { font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--ink); }
.enh__opts { display: flex; flex-wrap: wrap; gap: 6px; }
.enh__opt { font: inherit; font-size: 12.5px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink-dim); cursor: pointer; transition: all .15s; }
.enh__opt.is-active { border-color: var(--accent); background: rgba(255,201,60,0.14); color: var(--ink); }
.enh__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.enh__chip { font: inherit; font-size: 12.5px; padding: 6px 11px; border-radius: 999px; border: 1px dashed var(--line-strong); background: transparent; color: var(--ink-dim); cursor: pointer; transition: all .15s; }
.enh__chip.is-active { border-style: solid; border-color: var(--accent); background: rgba(255,201,60,0.14); color: var(--ink); }
.enh__ta { width: 100%; min-height: 56px; resize: vertical; font: inherit; font-size: 13.5px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink); box-sizing: border-box; }
.enh__ta:focus { outline: none; border-color: var(--accent); }
.enh__btns { display: flex; gap: 8px; }
.enh__btns .toolbtn { flex: 1; }
.enh__full { width: 100%; }
.enh__result { display: flex; flex-direction: column; gap: 10px; }
.enh__rh { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); }
.enh__prompt { font-size: 14px; line-height: 1.5; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.enh__prompt--sm { font-size: 13px; }
.enh__deltas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.enh__delta { font-size: 12.5px; color: #7bd88f; }
.enh__why { font-size: 12.5px; color: var(--ink-faint); font-style: italic; }
.enh__err { text-align: center; padding: 16px 0; color: var(--ink-dim); }
.enh--chat { height: 60vh; }
.enh__thread { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 2px; margin-bottom: 10px; scrollbar-width: none; }
.enh__thread::-webkit-scrollbar { display: none; }
.enh__cap { font-size: 13px; color: var(--ink-faint); padding: 8px 2px; }
.enh__bubble { font-size: 13.5px; line-height: 1.45; padding: 9px 12px; border-radius: 14px; max-width: 88%; word-wrap: break-word; }
.enh__bubble--user { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 4px; }
.enh__bubble--ai { align-self: flex-start; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.enh__inline { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.enh__input { display: flex; gap: 8px; align-items: flex-end; }
.enh__input .enh__ta { min-height: 44px; flex: 1; }
.enh__input .toolbtn { flex: 0 0 auto; }

/* ════════════════════ ICON SIZING (inline SVG glyphs) ════════════════════ */
/* Provider brand marks — monochrome platinum, amber when the card is active */
.modelcard__ico svg { width: 22px; height: 22px; color: var(--ink-dim); }
.modelcard.is-active .modelcard__ico svg { color: var(--accent-2); }

/* Pricing screen — provider chip + content-type group header */
.priceline__prov { display: inline-flex; align-items: center; flex: 0 0 auto; }
.priceline__prov svg { width: 15px; height: 15px; color: var(--ink-dim); }
.pricegroup__title { display: inline-flex; align-items: center; gap: 7px; }
.pricegroup__title svg { width: 15px; height: 15px; color: var(--accent-2); }

/* Reference upload — tabs, drop zone, thumbnails */
.reftab__t { display: inline-flex; align-items: center; gap: 6px; }
.reftab__t svg { width: 14px; height: 14px; }
.reftab__t.is-active svg { color: var(--accent-2); }
.refdrop__ico svg { width: 36px; height: 36px; color: var(--accent-2); }
.refthm__t svg { position: absolute; inset: 0; margin: auto; width: 26px; height: 26px; color: var(--ink-dim); }

/* Paywall — estimates, features, trust bar */
.pw-est svg { width: 13px; height: 13px; flex: 0 0 auto; color: var(--accent-2); }
.pw-card--feat .pw-est svg { color: var(--accent); }
.pw-types { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.pw-types svg { width: 13px; height: 13px; color: var(--accent-2); }
.pw-card--feat .pw-types svg { color: var(--accent); }
.pw-types i { font-style: normal; }
.pw-types__dot { color: var(--ink-faint); }
.pw-trust > span { display: inline-flex; align-items: center; gap: 5px; }
.pw-trust svg { width: 13px; height: 13px; color: var(--accent-2); }
.pw-trust i { font-style: normal; }

/* Profile rows + info cards + PWA + account glyphs */
.linkcard__ico { color: var(--accent-2); }
.linkcard__ico svg { width: 18px; height: 18px; }
.infostub__ico { color: var(--accent-2); }
.infostub__ico svg { width: 30px; height: 30px; }
.pwa-cta__ico svg { width: 18px; height: 18px; }
.stat__sub svg { width: 11px; height: 11px; vertical-align: -1.5px; }

/* Gallery card thumbnail placeholder + download button */
.gencard__thumb--ph svg { width: 20px; height: 20px; color: var(--ink-dim); }
.gencard__dl svg { width: 16px; height: 16px; }

/* Toast + error sheet glyphs */
.toast__ico { display: inline-grid; place-items: center; }
.toast__ico svg { width: 16px; height: 16px; }
.err-emoji { display: inline-block; color: var(--accent-2); }
.err-emoji svg { width: 44px; height: 44px; }

/* Lightbox — media placeholder + meta + action buttons */
.lb-emoji svg { width: 56px; height: 56px; color: var(--ink-dim); }
.lb-meta__ico { display: inline-flex; align-items: center; vertical-align: -2px; margin-right: 4px; }
.lb-meta__ico svg { width: 13px; height: 13px; }
.btn--sm svg { width: 15px; height: 15px; }
