/* ================= font: Manrope variable, self-hosted ================= */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/assets/fonts/manrope-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/assets/fonts/manrope-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ================= tokens: neutral surfaces + one blue accent (= guest --g-accent #2fc4e6) ================= */
:root {
  --bg: #09090b;
  --bg-soft: #0e0e11;
  --panel: #121215;
  --panel-2: #1a1a1e;
  --line: #26262b;
  --line-strong: #3a3a41;
  --text: #fafafa;
  --muted: #a1a1aa;
  --accent: #2fc4e6;
  --accent-2: #2fc4e6;
  --accent-hover: #1fb3d6;
  --accent-soft: rgba(47,196,230,.13);
  --accent-ink: #2fc4e6;
  --accent-fg: #2fc4e6;
  --on-accent: #16120d;
  --accent-border: #2fc4e6;
  --ok: #4ade80;
  --warn: #fbbf24;
  --bad: #f87171;
  --bar-official: #3f3f46;
  --bar-fal: #52525b;
  --topbar: rgba(9,9,11,.72);
  --switch-off: #2e2e33;
  --shadow: 0 24px 60px -32px rgba(0,0,0,.85);
  --glow-a: rgba(47,196,230,.07);
  --glow-b: rgba(255,255,255,.035);
  --on-grad: #0a0a0a;
  --radius: 16px;
  --grad: var(--accent);
  --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4f1ec; --bg-soft: #efebe5; --panel: #fbf9f6; --panel-2: #efeae3; --line: #e4ddd3; --line-strong: #d3cabd;
  --text: #1c1915; --muted: #6b6359; --accent: #2fc4e6; --accent-2: #2fc4e6; --accent-hover: #1fb3d6;
  --accent-soft: rgba(21,144,179,.13); --accent-ink: #0b6a85; --accent-fg: #1590b3; --accent-border: #1590b3; --btn-edge: rgba(21,144,179,.6); --on-accent: #16120d; --ok: #16a34a; --warn: #b45309;
  --bad: #dc2626; --bar-official: #d4d4d8; --bar-fal: #a1a1aa; --topbar: rgba(244,241,236,.9); --switch-off: #d3cabd;
  --shadow: 0 24px 60px -36px rgba(0,0,0,.25); --glow-a: rgba(21,144,179,.08); --glow-b: rgba(0,0,0,.02);
  --on-grad: #0a0a0a; color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f1ec; --bg-soft: #efebe5; --panel: #fbf9f6; --panel-2: #efeae3; --line: #e4ddd3; --line-strong: #d3cabd;
    --text: #1c1915; --muted: #6b6359; --accent: #2fc4e6; --accent-2: #2fc4e6; --accent-hover: #1fb3d6;
    --accent-soft: rgba(21,144,179,.13); --accent-ink: #0b6a85; --accent-fg: #1590b3; --accent-border: #1590b3; --btn-edge: rgba(21,144,179,.6); --on-accent: #16120d; --ok: #16a34a; --warn: #b45309;
    --bad: #dc2626; --bar-official: #d4d4d8; --bar-fal: #a1a1aa; --topbar: rgba(244,241,236,.9); --switch-off: #d3cabd;
    --shadow: 0 24px 60px -36px rgba(0,0,0,.25); --glow-a: rgba(21,144,179,.08); --glow-b: rgba(0,0,0,.02);
    --on-grad: #0a0a0a; color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); }
body { transition: background .25s, color .25s; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }

.bg-glow { display: none; }

/* ================= top bar ================= */
.topbar { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  height: 56px; padding: 0 24px; background: var(--bg); border-bottom: 1px solid var(--line); }
.topbar .btn.sm { min-height: 30px; }
.nav a { font-size: 14px; font-weight: 600; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .2px; }
.brand img { width: 28px; height: 28px; }
.nav { display: flex; gap: 4px; justify-self: center; }
.nav a { padding: 7px 14px; border-radius: 999px; color: var(--muted); transition: .15s; }
.nav a:hover { color: var(--text); background: var(--panel-2); }
.nav a.active { color: var(--text); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); }
.top-right { justify-self: end; display: flex; align-items: center; gap: 10px; }
.account { display: flex; align-items: center; gap: 10px; }
.credits-pill { display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.credits-pill b { color: var(--text); }
.credits-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.theme-btn { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2);
  display: grid; place-items: center; cursor: pointer; transition: .15s; }
.theme-btn:hover { border-color: var(--line-strong); }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn .sun { display: none; }
:root[data-theme="light"] .theme-btn .sun { display: block; }
:root[data-theme="light"] .theme-btn .moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-btn .sun { display: block; }
  :root:not([data-theme="dark"]) .theme-btn .moon { display: none; }
}

main { position: relative; z-index: 1; max-width: 1320px; margin: 0 auto; padding: 28px; }

/* ================= buttons / inputs ================= */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer;
  min-height: 38px; padding: 0 16px; border-radius: 10px; font-weight: 600; font-size: 14px; line-height: 1; white-space: nowrap;
  background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent-border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22);
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
.btn:hover { background: var(--accent-hover); }
.btn .ico { flex: none; width: 16px; height: 16px; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line-strong); box-shadow: none; }
.btn.ghost:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line-strong)); background: var(--accent-soft); }
.btn.sm { min-height: 30px; padding: 0 11px; font-size: 13px; border-radius: 8px; gap: 6px; }
.btn.sm .ico { width: 14px; height: 14px; }
.btn.lg { min-height: 44px; padding: 0 20px; font-size: 15px; border-radius: 11px; }
.btn.block { width: 100%; }
.input, textarea.input { width: 100%; padding: 12px 14px; border-radius: 12px; background: var(--bg-soft);
  border: 1px solid var(--line-strong); outline: none; transition: border-color .15s, box-shadow .15s, background .15s; }
.input::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.input:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line-strong)); }
.input:focus { border-color: var(--accent-border); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--panel); }
/* input with a leading icon and an optional trailing button (show password) */
.field { position: relative; display: flex; align-items: center; }
.field > .ico { position: absolute; left: 13px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.field > .input { padding-left: 42px; }
.field:focus-within > .ico { color: var(--accent-fg); }
.field-btn { position: absolute; right: 8px; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px;
  background: none; color: var(--muted); cursor: pointer; }
.field-btn:hover { color: var(--text); background: var(--panel-2); }
.field-btn .ico { width: 18px; height: 18px; }
textarea.input { min-height: 130px; resize: vertical; }
label.lbl { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin: 18px 0 8px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.muted { color: var(--muted); }
.grad-text { color: var(--accent-ink); }

/* ================= landing ================= */
.landing section { margin: 0 0 110px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--accent-ink);
  background: var(--accent-soft); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; }
.eyebrow .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(61,220,151,.6); } 70% { box-shadow: 0 0 0 10px rgba(61,220,151,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,151,0); } }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section-head h2 { font-size: 38px; line-height: 1.12; letter-spacing: -.8px; margin: 14px 0 10px; }
.section-head p { color: var(--muted); font-size: 17px; margin: 0; }

.hero { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: center; min-height: 72vh; padding-top: 20px; }
.hero h1 { font-size: 60px; line-height: 1.04; margin: 18px 0 18px; letter-spacing: -1.6px; }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 560px; margin: 0 0 28px; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 34px; margin-top: 38px; flex-wrap: wrap; }
.hero-stats div b { display: block; font-size: 28px; letter-spacing: -.5px; }
.hero-stats div span { color: var(--muted); font-size: 14px; }
.auth-card { padding: 30px; box-shadow: var(--shadow); }
.tabs { display: flex; gap: 6px; padding: 4px; background: var(--panel-2); border-radius: 12px; margin-bottom: 8px; }
.tabs button { flex: 1; padding: 9px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 600; }
.tabs button.active { background: var(--accent); color: var(--on-accent); }
.form-error { color: var(--bad); font-size: 14px; min-height: 20px; margin-top: 10px; }
.turnstile { margin-top: 16px; }
.bonus-note { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-top: 14px; }
.bonus-note b { color: var(--accent-ink); }
.verify-box { margin-top: 14px; padding: 14px; border-radius: 12px; border: 1px solid var(--line, rgba(127,127,127,.25)); background: var(--accent-soft, rgba(127,127,127,.08)); font-size: 14px; }
.verify-box p { margin: 6px 0 10px; color: var(--muted); }
.verify-box[hidden] { display: none; }

/* showcase marquee */
.marquee { overflow: hidden; margin: 0 -28px 110px; }
.marquee-track { display: flex; gap: 16px; width: max-content; animation: scroll 60s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.shot { position: relative; width: 340px; aspect-ratio: 16/9; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); flex: none; }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot span { position: absolute; left: 10px; bottom: 10px; font-size: 12px; font-weight: 600; color: #fff;
  background: rgba(0,0,0,.55); backdrop-filter: blur(6px); padding: 4px 10px; border-radius: 999px; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* price comparison chart */
.compare { display: grid; grid-template-columns: 1.15fr .85fr; gap: 22px; }
.chart-card { padding: 28px; }
.chart-legend { display: flex; gap: 18px; font-size: 13px; color: var(--muted); margin-bottom: 22px; flex-wrap: wrap; }
.chart-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }
.bar-group { margin-bottom: 22px; }
.bar-group:last-child { margin-bottom: 0; }
.bar-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.bar-head b { font-size: 15px; }
.bar-head .unit { color: var(--muted); font-size: 13px; }
.save-badge { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent);
  padding: 3px 9px; border-radius: 999px; }
.bar-row { display: grid; grid-template-columns: 74px 1fr 64px; align-items: center; gap: 10px; font-size: 13px; margin: 5px 0; }
.bar-row .who { color: var(--muted); }
.bar-track { height: 12px; background: var(--panel-2); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; width: 0; transition: width 1.1s cubic-bezier(.2,.8,.2,1); }
.bar-fill.ours { background: var(--grad); }
.bar-fill.official { background: var(--bar-official); }
.bar-fill.fal { background: var(--bar-fal); }
.bar-row .val { text-align: right; font-variant-numeric: tabular-nums; }
.bar-row.us .who, .bar-row.us .val { color: var(--text); font-weight: 700; }

/* savings calculator */
.calc { padding: 28px; display: flex; flex-direction: column; }
.calc h3 { margin: 0 0 4px; font-size: 20px; }
.calc .chips { margin: 16px 0 6px; }
.range { width: 100%; accent-color: var(--accent); margin: 14px 0 4px; }
.calc .qty { display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; }
.calc .qty b { color: var(--text); }
.calc-out { margin-top: auto; padding-top: 26px; display: grid; gap: 10px; }
.calc-line { display: flex; justify-content: space-between; font-size: 15px; }
.calc-line .muted { font-variant-numeric: tabular-nums; }
.calc-save { margin-top: 6px; padding: 18px; border-radius: 14px; background: var(--accent-soft); border: 1px solid var(--line); text-align: center; }
.calc-save b { display: block; font-size: 40px; letter-spacing: -1px; line-height: 1.1; }
.calc-save span { color: var(--muted); font-size: 14px; }

/* how it works / failover diagram */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { padding: 26px; }
.step .num { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; color: var(--on-accent); background: var(--accent); margin-bottom: 14px; }
.step h3 { margin: 0 0 6px; font-size: 18px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }
.flow { margin-top: 22px; padding: 30px; display: grid; grid-template-columns: auto 1fr auto 1fr auto; align-items: center; gap: 0; }
.node { padding: 14px 18px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); text-align: center; min-width: 150px; }
.node b { display: block; } .node span { font-size: 12px; color: var(--muted); }
.node.core { background: var(--accent-soft); border-color: var(--accent); }
.engines { display: grid; gap: 10px; }
.engine { display: flex; align-items: center; gap: 8px; }
.engine .light { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.engine.standby .light { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.wire { position: relative; height: 0; margin: 0 14px; border-top: 2px dashed var(--line-strong); overflow: visible; }
.wire::after { content: ""; position: absolute; top: -2px; left: -20%; width: 20%; height: 6px; border-radius: 6px; background: var(--grad); animation: packet 2.2s linear infinite; }
@keyframes packet { to { left: 100%; } }

/* models grid */
.models-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mcard { padding: 22px; transition: .2s; }
.mcard:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.mcard .top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.mcard .kind { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.mcard h3 { margin: 0 0 6px; font-size: 18px; }
.mcard p { margin: 0 0 16px; color: var(--muted); font-size: 14px; min-height: 42px; }
.mcard .price-line { display: flex; align-items: baseline; gap: 8px; }
.mcard .price-line b { font-size: 24px; letter-spacing: -.5px; }
.mcard .price-line s { color: var(--muted); font-size: 14px; }

/* FAQ + footer */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); margin: 10px 0 0; }
.cta-band { text-align: center; padding: 56px 28px; border-radius: 24px; background: var(--accent-soft); border: 1px solid var(--line); }
.cta-band h2 { font-size: 36px; margin: 0 0 10px; letter-spacing: -.6px; }
.cta-band p { color: var(--muted); margin: 0 0 24px; }
.footer { border-top: 1px solid var(--line); padding: 26px 0 10px; display: flex; gap: 18px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.footer .sp { margin-left: auto; }

/* ================= studio ================= */
.studio { display: grid; grid-template-columns: 420px 1fr; gap: 24px; align-items: start; }
.controls { position: sticky; top: 86px; max-height: calc(100vh - 110px); overflow: auto; }
.seg { display: flex; gap: 6px; padding: 4px; background: var(--panel-2); border-radius: 12px; }
.seg button { flex: 1; border: 0; padding: 8px; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 600; }
.seg button.active { background: var(--accent); color: var(--on-accent); }
.model-list { display: grid; gap: 8px; }
.model { position: relative; text-align: left; padding: 12px 14px; border-radius: 12px; background: var(--panel-2);
  border: 1px solid var(--line); cursor: pointer; transition: .15s; }
.model:hover { border-color: var(--line-strong); }
.model.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.model.off { opacity: .55; cursor: not-allowed; }
.model .row { display: flex; align-items: center; gap: 8px; }
.model .name { font-weight: 650; }
.model .tag { font-size: 13px; color: var(--muted); margin-top: 2px; }
.model .from { margin-left: auto; font-size: 13px; color: var(--muted); white-space: nowrap; }
.badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }
.badge.down { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; font-size: 14px; }
.chip.active { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.chip small { color: var(--muted); margin-left: 4px; }
.drop { border: 1.5px dashed var(--line-strong); border-radius: 12px; padding: 16px; text-align: center; color: var(--muted); cursor: pointer; transition: .15s; font-size: 14px; }
.drop.hover { border-color: var(--accent); background: var(--accent-soft); }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumb { position: relative; width: 62px; height: 62px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; cursor: pointer; line-height: 1; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.toggle:first-of-type { border-top: 0; }
.toggle .t { font-weight: 600; } .toggle .s { font-size: 13px; color: var(--muted); }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--switch-off); transition: .15s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:disabled + span { opacity: .4; cursor: not-allowed; }
.summary { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 12px; }
.summary .cost { font-size: 22px; font-weight: 700; }
.notice { margin-top: 12px; padding: 10px 12px; border-radius: 10px; font-size: 13px; color: var(--warn);
  background: color-mix(in srgb, var(--warn) 10%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }

/* ================= results ================= */
.feed-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; gap: 16px; }
.feed-head h2 { margin: 0; font-size: 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.tile .media { position: relative; aspect-ratio: 16/10; background: var(--panel-2); display: grid; place-items: center; cursor: zoom-in; overflow: hidden; }
.tile .media img, .tile .media video { width: 100%; height: 100%; object-fit: cover; }
.tile .meta { padding: 12px 14px; display: grid; gap: 6px; }
.tile .prompt { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.tile .row .sp { margin-left: auto; }
.tile .actions { display: flex; gap: 6px; }
.status { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); color: var(--muted); }
.status.done { color: var(--ok); } .status.failed { color: var(--bad); }
.status.running, .status.queued { color: var(--accent-ink); }
.shimmer { position: absolute; inset: 0; background: var(--accent-soft); animation: sh 1.4s ease-in-out infinite alternate; }
@keyframes sh { from { opacity: .35; } to { opacity: 1; } }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .9s linear infinite; z-index: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
.failnote { padding: 18px; font-size: 13px; color: var(--bad); text-align: center; }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ================= pricing ================= */
.page-head { margin-bottom: 26px; }
.page-head h1 { margin: 0 0 6px; font-size: 34px; letter-spacing: -.5px; }
.packs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1240px) { .packs { grid-template-columns: repeat(2, 1fr); } }
.pack { position: relative; padding: 26px; }
.pack.popular { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.pack .ribbon { position: absolute; top: -11px; left: 26px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent); }
.pack .price { font-size: 40px; font-weight: 750; margin: 10px 0 2px; }
.pack .credits { font-size: 18px; font-weight: 600; }
.pack > ul { padding-left: 18px; color: var(--muted); font-size: 14px; }

/* ================= status ================= */
.status-list { display: grid; gap: 10px; }
.status-row { display: flex; align-items: center; gap: 12px; padding: 14px 18px; }
.status-row .light { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 12px var(--ok); }
.status-row .light.off { background: var(--bad); box-shadow: 0 0 12px var(--bad); }
.status-row .sp { margin-left: auto; color: var(--muted); font-size: 14px; }
.admin { margin-top: 30px; }
.admin pre { white-space: pre-wrap; font-size: 12px; color: var(--muted); max-height: 300px; overflow: auto; }
.admin .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; }

/* ================= misc ================= */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none;
  padding: 12px 18px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); transition: .2s; z-index: 50; max-width: 90vw; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.err { border-color: var(--bad); color: var(--bad); }
.lightbox { position: fixed; inset: 0; z-index: 40; background: rgba(5,5,10,.9); display: grid; place-items: center; padding: 30px; }
.lightbox-body img, .lightbox-body video { max-width: 92vw; max-height: 86vh; border-radius: 12px; }
.lightbox-close { position: absolute; top: 18px; right: 22px; font-size: 32px; background: none; border: 0; color: #fff; cursor: pointer; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s, transform .7s; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .marquee-track, .wire::after, .eyebrow .pulse { animation: none; }
}

@media (max-width: 980px) {
  .hero, .studio, .compare { grid-template-columns: 1fr; }
  .controls { position: static; max-height: none; }
  .packs, .steps, .models-grid { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; gap: 10px; justify-items: center; }
  .wire { width: 0; height: 26px; margin: 0; border-top: 0; border-left: 2px dashed var(--line-strong); }
  .wire::after { display: none; }
  .nav { display: none; }
  .hero h1 { font-size: 40px; }
  .section-head h2 { font-size: 30px; }
  main { padding: 18px 16px; }
  .marquee { margin: 0 -16px 80px; }
  .topbar { padding: 12px 16px; gap: 12px; }
  .credits-pill { padding: 6px 10px; }
}

/* calculator bars */
.calc-out { gap: 14px; }
.calc-row { display: grid; gap: 6px; }
.calc-row .bar-track { height: 10px; }
.calc-row .bar-fill { transition: width .35s ease; }

/* ================= server-rendered SEO pages ================= */
a.mcard { color: inherit; text-decoration: none; display: block; }
a.mcard:hover { border-color: var(--accent); }
.seo-page { max-width: 1080px; margin: 0 auto; padding: 28px; }
.seo-page section { margin: 40px 0; }
.seo-hero { text-align: center; padding: 32px 0 8px; }
.seo-hero h1 { font-size: clamp(30px, 4.4vw, 50px); line-height: 1.1; margin: 16px 0 14px; }
.seo-hero .lead, .seo-page .lead { font-size: 18px; color: var(--muted); max-width: 720px; margin: 0 auto 24px; }
.seo-page h2 { font-size: 26px; margin: 0 0 16px; }
.seo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-bottom: 24px; }
.seo-card { display: block; color: inherit; text-decoration: none; padding: 18px; }
.seo-card:hover { border-color: var(--accent); }
.seo-card h3 { margin: 0 0 6px; }
.seo-card p { margin: 6px 0; }
.seo-steps { padding-left: 22px; line-height: 1.8; }
.faq-item { padding: 14px 18px; margin-bottom: 10px; }
.faq-item summary { cursor: pointer; font-weight: 600; }
.faq-item p { color: var(--muted); margin: 10px 0 0; }
.seo-footer { max-width: 1080px; margin: 40px auto 0; padding: 28px; border-top: 1px solid var(--line); font-size: 13px; }
.seo-footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 12px; }
.seo-footer-links a { color: var(--muted); text-decoration: none; }
.seo-footer-links a:hover { color: var(--accent-ink); }
@media (max-width: 640px) { .seo-page { padding: 16px; } }
.legal { max-width: 780px; margin: 0 auto; line-height: 1.7; }
.legal h1 { font-size: 38px; margin: 24px 0 4px; }
.legal h2 { font-size: 20px; margin: 30px 0 8px; }
.legal a { color: var(--accent-ink); }
.legal ul { padding-left: 20px; }

/* ================= landing v2: media-first, one accent ================= */
body.no-scroll { overflow: hidden; }
.l { max-width: 1200px; margin: 0 auto; }
.l h1, .l h2, .l h3 { letter-spacing: -0.03em; }
.l-hero { text-align: center; padding: 72px 0 40px; }
.l-hero h1 { font-size: clamp(42px, 7vw, 88px); line-height: .98; margin: 22px 0 22px; font-weight: 800; }
.l-hero .hl { color: var(--accent-ink); }
:root:not([data-theme="light"]) .l-hero .hl { color: var(--accent-fg); }
.l-lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 620px; margin: 0 auto 32px; }
.l-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.l-note { color: var(--muted); font-size: 14px; margin-top: 18px; }
.l-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel); font-size: 13px; color: var(--muted); }
.l-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(74,222,128,.15); }

.l-wall { margin: 24px calc(50% - 50vw) 96px; display: grid; gap: 14px; overflow: hidden;
}
.l-wall .swiper-wrapper { transition-timing-function: linear !important; }
.l-wall .swiper-slide { width: auto; }
.l-shot { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 18px; overflow: hidden; }
.l-shot img { height: 230px; width: auto; aspect-ratio: 16/9; object-fit: cover; display: block; transition: transform .4s ease; }
.l-shot:hover img { transform: scale(1.04); }
.l-shot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.l-viewer { position: fixed; inset: 0; z-index: 120; background: rgba(5,5,8,.94); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px; padding: 56px 16px 28px; }
.l-viewer img { max-width: min(1600px, 100%); max-height: calc(100vh - 170px); object-fit: contain; border-radius: 14px; }
.l-viewer figcaption { color: #fafafa; text-align: center; max-width: 760px; }
.l-viewer figcaption b { display: block; font-size: 17px; }
.l-viewer figcaption span { color: #a1a1aa; font-size: 14px; }
.l-viewer-x, .l-viewer-nav { position: absolute; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08);
  color: #fff; border-radius: 12px; cursor: pointer; display: grid; place-items: center; }
.l-viewer-x { top: 14px; right: 16px; width: 40px; height: 40px; font-size: 22px; }
.l-viewer-nav { top: 50%; width: 44px; height: 44px; font-size: 22px; transform: translateY(-50%); }
.l-viewer-nav.prev { left: 16px; } .l-viewer-nav.next { right: 16px; }
.l-viewer-x:hover, .l-viewer-nav:hover { background: rgba(255,255,255,.16); }

.l-sec { margin: 0 0 104px; scroll-margin-top: 90px; }
.l-narrow { max-width: 760px; margin-left: auto; margin-right: auto; }
.l-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.l-head h2 { font-size: clamp(30px, 4vw, 44px); margin: 0; font-weight: 800; }
.l-head p { color: var(--muted); margin: 6px 0 0; }
.l-seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.l-seg button { border: 0; background: none; padding: 8px 16px; border-radius: 9px; font-weight: 600; color: var(--muted); cursor: pointer; }
.l-seg button.active { background: var(--accent); color: var(--on-accent); }

.l-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.l-tile { position: relative; display: block; border-radius: 20px; overflow: hidden; aspect-ratio: 4/3;
  background: var(--panel-2); border: 1px solid var(--line); isolation: isolate; }
.l-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; z-index: -2; }
.l-tile::after { display: none; }
.l-tile:hover img { transform: scale(1.05); }
.l-tile:hover { border-color: var(--accent); }
.l-tile.off { opacity: .55; }
.l-tile-body { position: absolute; inset: auto 0 0 0; padding: 14px 18px; color: #fff; background: rgba(10,10,12,.78); border-top: 1px solid rgba(255,255,255,.08); }
.l-tile-top { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.l-kind { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px; border-radius: 999px;
  background: rgba(255,255,255,.16); backdrop-filter: blur(6px); }
.l-tile h3 { margin: 0 0 4px; font-size: 22px; }
.l-tile-price { font-weight: 700; }
.l-tile-price span { font-weight: 400; opacity: .75; }
.l-save { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); }

.l-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.l-step { padding: 26px; border-radius: 20px; border: 1px solid var(--line); background: var(--panel); }
.l-step-n { font-size: 13px; font-weight: 700; color: var(--accent-ink); }
:root:not([data-theme="light"]) .l-step-n { color: var(--accent-fg); }
.l-step h3 { font-size: 20px; margin: 14px 0 6px; }
.l-step p { color: var(--muted); margin: 0; }

.l-packs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1100px) { .l-packs { grid-template-columns: repeat(2, 1fr); } }
.l-pack { padding: 26px; border-radius: 20px; border: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; gap: 8px; }
.l-pack.pop { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.l-pack-top { display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.l-pack-price { font-size: 44px; font-weight: 800; letter-spacing: -.03em; }
.l-pack .btn { margin-top: 12px; }

.l-faq { border-bottom: 1px solid var(--line); padding: 18px 2px; }
.l-faq summary { cursor: pointer; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; }
.l-faq summary::after { content: "+"; color: var(--muted); font-size: 22px; line-height: 1; }
.l-faq[open] summary::after { content: "–"; }
.l-faq p { color: var(--muted); margin: 10px 0 0; }

.l-cta { text-align: center; padding: 64px 24px; border-radius: 28px; border: 1px solid var(--line);
  background: var(--panel); border-color: var(--btn-edge, rgba(47,196,230,.5)); }
.l-cta h2 { font-size: clamp(30px, 4vw, 48px); margin: 0 0 24px; font-weight: 800; }
.l-foot { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; padding: 28px 0 40px;
  border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.l-foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.l-foot a:hover { color: var(--text); }

.l-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; overflow-y: auto;
  background: rgba(0,0,0,.6); backdrop-filter: blur(6px); }
.l-modal-box { position: relative; width: min(440px, 100%); }
.l-modal-box .auth-card { margin: 0; padding-top: 58px; }
.l-modal-x { position: absolute; top: 10px; right: 12px; z-index: 1; width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-size: 20px; cursor: pointer; }

@media (max-width: 860px) {
  .l-steps, .l-packs { grid-template-columns: 1fr; }
  .l-hero { padding-top: 40px; }
  .l-shot img { height: 150px; }
  .l-viewer-nav { display: none; }
}

/* price unit toggle ($ / credits) */
.unit-toggle { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.unit-toggle button { border: 0; background: none; padding: 5px 11px; border-radius: 7px; font-size: 13px; font-weight: 600;
  color: var(--muted); cursor: pointer; }
.unit-toggle button.active { background: var(--accent); color: var(--on-accent); }
.l-head-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.prices-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 36px 0 12px; flex-wrap: wrap; }
.prices-head h2 { margin: 0; }
.summary .unit-toggle { margin-left: auto; margin-right: 10px; }

/* pack API line */
.l-pack-api { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.l-pack-api .ico { width: 16px; height: 16px; }
.l-pack-api.on { color: var(--text); }
.l-pack-api.on .ico { color: var(--accent-fg); }

/* API page */
.narrow { max-width: 860px; margin: 0 auto; }
.narrow > .card { margin-bottom: 18px; }
.key-form { display: flex; gap: 10px; margin-bottom: 14px; }
.key-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.key-row .muted { font-size: 13px; }
.key-new { color: var(--text); }
.key-copy { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.key-copy code { flex: 1; overflow-wrap: anywhere; font-size: 13px; }
.code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; overflow-x: auto; font-size: 13px; }
.api-docs h3 { margin: 18px 0 8px; font-size: 16px; }
.api-docs .code { margin: 0 0 8px; max-width: 100%; }
.api-endpoints td { font-size: 13px; }
.api-endpoints td:nth-child(2) code { white-space: nowrap; }
.api-endpoints td.mk { min-width: 160px; }
.api-keys h2 { margin-top: 0; }
@media (max-width: 600px) {
  .api-endpoints tr { display: grid; grid-template-columns: auto 1fr; border-bottom: 1px solid var(--line); }
  .api-endpoints tbody tr:last-child { border-bottom: 0; }
  .tg-table.api-endpoints td { border-bottom: 0; padding: 7px 10px 2px; }
  .tg-table.api-endpoints td.mk { grid-column: 1 / -1; min-width: 0; padding: 0 10px 8px; }
}
@media (max-width: 600px) { .key-form { flex-direction: column; } }

/* landing API block */
.l-api { display: grid; grid-template-columns: 1fr 1.1fr; gap: 28px; align-items: center; padding: 32px;
  border-radius: 24px; border: 1px solid var(--line); background: var(--panel); }
.l-api h2 { font-size: clamp(28px, 3.6vw, 40px); margin: 14px 0 10px; font-weight: 800; }
.l-api .btn { margin-top: 8px; }
.l-kind-api { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--accent-ink);
  padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--line); }
.l-kind-api .ico { width: 15px; height: 15px; }
.l-api-code { margin: 0; white-space: pre; }
@media (max-width: 860px) { .l-api { grid-template-columns: 1fr; padding: 22px; } }

/* usage picker: web / API / both */
.usage { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 0 0 22px; text-align: center; }
.usage-q { font-weight: 600; }
.usage-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); flex-wrap: wrap; justify-content: center; }
.usage-seg button { display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; background: none; padding: 9px 16px;
  border-radius: 10px; font-weight: 600; color: var(--muted); cursor: pointer; }
.usage-seg button .ico { width: 16px; height: 16px; }
.usage-seg button.active { background: var(--accent); color: var(--on-accent); border-color: var(--accent-border); }
.usage-note { margin: 0; color: var(--muted); font-size: 14px; max-width: 620px; }
.unfit { opacity: .38; filter: grayscale(.6); transition: opacity .2s; }

/* pack feature lists */
.pack-feats { margin: 10px 0 6px; flex: 1; }
.pack-feats-head { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.pack-feats ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.pack-feats li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.pack-feats li .ico { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--accent-fg); }
.pack-fit { font-size: 13px; margin-top: 6px; }

.pack, .l-pack { display: flex; flex-direction: column; }
.pack > .btn, .l-pack > .btn { margin-top: auto; }

/* pack perk chips (.pack-chip): guest.css, neo-brutalist tags */

/* audio results + studio extras */
.audio-tile { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 14px;
  background: var(--panel-2); }
.audio-wave { flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px; opacity: .7; }
.audio-wave i { width: 3px; border-radius: 2px; background: var(--accent); }
.audio-tile audio { width: 100%; }
.char-count { font-size: 12px; text-align: right; margin-top: 4px; }

.currency { display: flex; justify-content: center; margin: -8px 0 22px; }

.seg button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.seg button .ico { width: 16px; height: 16px; }
.bonus-note .ico { width: 18px; height: 18px; color: var(--accent-fg); flex: none; }
.status-group { display: flex; align-items: center; gap: 8px; margin: 22px 0 10px; font-size: 15px; color: var(--muted); }
.status-group .ico { width: 18px; height: 18px; color: var(--accent-fg); }

/* invite page */
.ref-row { display: flex; gap: 10px; flex-wrap: wrap; }
.ref-row .field { flex: 1; min-width: 220px; }
.ref-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.ref-stat { display: flex; flex-direction: column; gap: 2px; }
.ref-stat b { font-size: 26px; }
.ref-steps { padding-left: 20px; display: grid; gap: 8px; color: var(--muted); }
@media (max-width: 600px) { .ref-stats { grid-template-columns: 1fr; } }

.tg-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ================= header credits gauge + popover ================= */
.quota { position: relative; --pct: 0; --ring: var(--accent); }
.quota-btn { display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px 0 4px; border-radius: 999px; cursor: pointer;
  background: transparent; border: 1px solid var(--line-strong); color: var(--text); font: inherit; font-size: 13px; transition: border-color .15s; }
.quota-btn:hover, .quota-btn[aria-expanded="true"] { border-color: var(--ring); }
.quota-btn b { font-variant-numeric: tabular-nums; }
.quota-pop { position: absolute; right: 0; top: calc(100% + 8px); width: 280px; padding: 16px; display: grid; gap: 10px; z-index: 20;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.28); }
.quota-pop[hidden] { display: none; }
.qp-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; }
.qp-head b { font-size: 18px; font-variant-numeric: tabular-nums; }
.qp-head b span { font-size: 13px; font-weight: 500; }
.qp-bar { height: 6px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.qp-bar span { display: block; height: 100%; background: var(--ring); border-radius: inherit; }
.qp-rows { display: grid; gap: 10px; padding: 10px 0 4px; border-top: 1px solid var(--line); margin-top: 2px; }
.qp-row { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; font-size: 14px; }
.qp-row .ico { width: 18px; height: 18px; color: var(--accent-fg); margin-top: 1px; }
.qp-row small { display: block; font-size: 12px; }
@media (max-width: 560px) { .quota-pop { position: fixed; left: 16px; right: 16px; top: 64px; width: auto; } }

/* ================= header: nav icons, separator, avatar menu, accent hairline ================= */
.nav { align-items: center; }
.nav a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; position: relative; }
.nav a .ico { width: 15px; height: 15px; opacity: .7; transition: opacity .15s, color .15s; }
.nav a:hover .ico, .nav a.active .ico { opacity: 1; color: var(--accent-fg); }
.nav-sep { width: 1px; height: 18px; margin: 0 6px; background: var(--line-strong); }
.nav-dot { position: absolute; top: 5px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg); }
.nav-dot[hidden] { display: none; }
.theme-btn { width: 32px; height: 32px; border-radius: 9px; background: transparent; border-color: var(--line-strong); }
.theme-btn svg { width: 16px; height: 16px; }
.acct { position: relative; }
.avatar { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-strong); cursor: pointer; font: inherit; font-weight: 700; font-size: 13px;
  color: var(--accent-ink); background: var(--accent-soft); transition: border-color .15s; }
.avatar:hover, .avatar[aria-expanded="true"] { border-color: var(--accent); }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 6px; z-index: 20; display: grid;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.28); }
.acct-menu[hidden] { display: none; }
.acct-email { padding: 8px 10px 10px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu a, .acct-menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; font: inherit; font-size: 14px;
  color: var(--text); background: none; border: 0; cursor: pointer; }
.acct-menu a:hover, .acct-menu button:hover { background: var(--panel-2); }
.acct-menu #logout { color: var(--muted); border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 4px; }

/* ================= quota extras ================= */
.quota-bump { position: absolute; left: 50%; top: 4px; font-size: 13px; font-weight: 700; color: var(--ring); pointer-events: none;
  animation: qbump 1.3s ease-out forwards; }
.quota-bump.up { color: #4caf50; }
@keyframes qbump { from { opacity: 0; transform: translate(-50%, 0); } 20% { opacity: 1; } to { opacity: 0; transform: translate(-50%, 34px); } }
.qp-tip { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 10px; font-size: 13px; color: var(--text);
  background: var(--accent-soft); }
.qp-tip .ico { width: 16px; height: 16px; color: var(--accent-fg); flex: none; margin-top: 1px; }
.qp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qp-exp { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 10px;
  font-size: 13px; color: var(--text); }
.qp-exp .ico { width: 15px; height: 15px; color: var(--warn); flex: none; }

/* ================= buttons: warn + inline cost ================= */
.btn.warn { background: transparent; color: var(--accent-ink); border-color: var(--accent); box-shadow: none; }
.btn.warn:hover { background: var(--accent-soft); }
.btn-cost { margin-left: 2px; padding: 3px 7px; border-radius: 6px; font-size: 12px; background: rgba(0,0,0,.16); }

/* ================= studio: feed + docked composer ================= */
.studio2 { max-width: 1180px; margin: 0 auto; }
.studio2 .feed-head h1 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 24px; }
.studio2 .feed-head h1 .ico { width: 22px; height: 22px; color: var(--accent-fg); }
.studio2 > .grid { min-height: 38vh; padding-bottom: 24px; }
.composer { position: sticky; bottom: 14px; z-index: 5; margin-top: 8px; padding: 10px; display: grid; gap: 8px;
  background: color-mix(in srgb, var(--panel) 94%, transparent); border: 1px solid var(--line-strong); border-radius: 18px;
  box-shadow: 0 18px 48px rgba(0,0,0,.35); backdrop-filter: blur(10px); transition: border-color .15s, box-shadow .15s; }
.composer:focus-within { border-color: color-mix(in srgb, var(--accent) 50%, var(--line-strong)); }
.composer.drag { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.composer-main { display: flex; align-items: flex-start; gap: 8px; }
.composer-input { flex: 1; min-height: 44px; max-height: 200px; resize: none; padding: 11px 6px; border: 0; outline: none;
  background: transparent; color: var(--text); font: inherit; font-size: 15px; line-height: 1.45; }
.composer-input.lyrics { width: 100%; min-height: 70px; padding: 10px 12px; border-radius: 10px; background: var(--bg-soft);
  border: 1px solid var(--line); font-size: 14px; }
.composer-drop { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; border-radius: 12px; cursor: pointer;
  border: 1px dashed var(--line-strong); background: var(--bg-soft); color: var(--muted); font: inherit; font-size: 14px; }
.composer-drop:hover { border-color: var(--accent); color: var(--text); }
.icon-btn { flex: none; display: grid; place-items: center; width: 40px; height: 40px; margin-top: 2px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line-strong); background: transparent; color: var(--muted); transition: .15s; }
.icon-btn:hover { color: var(--accent-fg); border-color: var(--accent); }
.icon-btn .ico { width: 18px; height: 18px; }
.icon-btn.busy { cursor: progress; color: var(--accent-fg); border-color: var(--accent); }
.btn-spin { display: inline-block; flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong);
  border-top-color: var(--btn, #2fc4e6); border-right-color: var(--btn, #2fc4e6); animation: spin .8s linear infinite; }
.composer-input.improving { opacity: .55; cursor: progress; }
.composer-note.improving-note { display: flex; align-items: center; gap: 8px; color: var(--text); }
.composer-note.improving-note .btn-spin { width: 12px; height: 12px; }
@media (prefers-reduced-motion: reduce) { .btn-spin { animation-duration: 2.4s; } }
.composer-extra { display: grid; gap: 8px; }
.ref-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ref-thumb { position: relative; width: 56px; height: 56px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-strong); }
.ref-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ref-thumb button { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0,0,0,.65); color: #fff; font-size: 13px; line-height: 18px; padding: 0; }
.composer-row { display: flex; align-items: center; gap: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.composer-switches { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; flex-wrap: wrap; }
.composer-go { display: flex; align-items: center; gap: 10px; flex: none; }
.composer-go .char-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.composer-note { font-size: 12px; color: var(--muted); padding: 0 4px; white-space: pre-line; }

/* pills + popovers */
.pill-wrap { position: relative; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: inherit; font-size: 13px; white-space: nowrap; transition: .15s; }
.pill:hover, .pill-wrap.open .pill { border-color: color-mix(in srgb, var(--accent) 60%, var(--line-strong)); background: var(--accent-soft); }
.pill .ico { width: 15px; height: 15px; color: var(--accent-fg); }
.pill-k { color: var(--muted); }
.pill b { font-weight: 600; }
.caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid var(--muted); margin-left: 1px; }
.pill-wrap.open .caret { transform: rotate(180deg); }
.shape { display: inline-block; border: 1.6px solid currentColor; border-radius: 2px; color: var(--accent-fg); flex: none; }
.pop { display: none; position: absolute; left: 0; bottom: calc(100% + 10px); z-index: 30; min-width: 220px; max-height: min(60vh, 460px); overflow: auto; padding: 6px;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: 0 -12px 40px rgba(0,0,0,.35); }
.pop.wide { width: min(380px, calc(100vw - 32px)); }
.pill-wrap.open .pop { display: block; }
.pop-models, .pop-list { display: grid; gap: 2px; }
.pop-model, .pop-item { display: grid; gap: 3px; width: 100%; text-align: left; padding: 9px 10px; border-radius: 10px; border: 1px solid transparent;
  background: none; color: var(--text); font: inherit; cursor: pointer; }
.pop-model:hover, .pop-item:hover { background: var(--panel-2); }
.pop-model.active, .pop-item.active { border-color: var(--accent); background: var(--accent-soft); }
.pop-model:disabled { opacity: .45; cursor: not-allowed; }
.pm-top { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.pm-price { margin-left: auto; font-size: 12px; color: var(--muted); }
.pm-tag, .pop-item small { font-size: 12px; color: var(--muted); line-height: 1.35; }
.pop-shapes, .pop-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; max-width: 300px; }
.pop-shapes .pop-chip { flex-direction: column; justify-content: flex-end; width: 62px; height: 62px; gap: 6px; }
.pop-chip { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 12px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: inherit; font-size: 13px; }
.pop-chip:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line-strong)); }
.pop-chip.active { border-color: var(--accent); background: var(--accent-soft); }
.pop-extras { display: grid; gap: 4px; padding: 4px; min-width: 280px; }
.pop-toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px; border-radius: 10px; cursor: pointer; }
.pop-toggle span:first-child { display: grid; gap: 2px; font-size: 14px; }
.pop-toggle small { font-size: 12px; color: var(--muted); }

/* compact one-line segmented switch */
.seg-inline { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.seg-inline button { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 7px; border: 0; cursor: pointer;
  background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; transition: .15s; }
.seg-inline button:hover:not(:disabled) { color: var(--text); }
.seg-inline button.active { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.25), inset 0 0 0 1px var(--line-strong); }
.seg-inline button:disabled { opacity: .4; cursor: not-allowed; }
.seg-inline button .ico { width: 14px; height: 14px; }
.seg-inline button.active .ico { color: var(--accent-fg); }

/* starters (empty feed) */
.starters { grid-column: 1 / -1; display: grid; gap: 14px; padding: 28px; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.starters-head { display: flex; align-items: center; gap: 10px; }
.starters-head .ico { color: var(--accent-fg); }
.starters-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.starter { display: grid; gap: 6px; text-align: left; padding: 14px; border-radius: 12px; cursor: pointer; font: inherit; font-size: 14px; line-height: 1.4;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); transition: .15s; }
.starter:hover { border-color: var(--accent); transform: translateY(-1px); }
.starter-model { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-ink); }

/* ================= tiles: icon actions over the picture ================= */
.tile-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; opacity: 0; transform: translateY(-4px); transition: .15s; }
.tile:hover .tile-actions, .tile:focus-within .tile-actions { opacity: 1; transform: none; }
@media (hover: none) { .tile-actions { opacity: 1; transform: none; } }
.tile-btn { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; border: 0; cursor: pointer; color: #fff;
  background: rgba(10,10,12,.62); backdrop-filter: blur(6px); transition: background .15s, color .15s; }
.tile-btn:hover { background: rgba(10,10,12,.85); color: var(--accent-fg); }
.tile-btn.on { color: #ffc107; }
.tile-btn.on .ico { fill: currentColor; }
.tile-btn.danger:hover { color: #ef5350; }
.tile-btn .ico { width: 15px; height: 15px; }
.tile-star { position: absolute; top: 8px; left: 8px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px;
  background: rgba(10,10,12,.55); color: #ffc107; }
.tile-star .ico { width: 13px; height: 13px; fill: currentColor; }
.tile-time { font-size: 12px; }

/* ================= gallery tools ================= */
.gal-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gal-search { width: 220px; }
.gal-search .input { padding-top: 7px; padding-bottom: 7px; font-size: 14px; }

/* ================= credit history ================= */
.ref-stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.hist { padding: 6px; }
.hist-row { display: grid; grid-template-columns: 34px 1fr auto auto; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; }
.hist-row + .hist-row { border-top: 1px solid var(--line); }
.hist-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--panel-2); color: var(--muted); }
.hist-row.plus .hist-ic { background: color-mix(in srgb, #4caf50 14%, transparent); color: #4caf50; }
.hist-ic .ico { width: 16px; height: 16px; }
.hist-main { display: grid; gap: 2px; min-width: 0; }
.hist-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-delta { font-variant-numeric: tabular-nums; min-width: 56px; text-align: right; }
.hist-row.plus .hist-delta { color: #4caf50; }

/* ================= support ================= */
.narrow.wide { max-width: 980px; }
.tk-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 16px; }
.tk-q { display: flex; gap: 12px; align-items: center; padding: 14px; color: var(--text); text-decoration: none; transition: border-color .15s; }
.tk-q:hover { border-color: var(--accent); }
.tk-q .ico { color: var(--accent-fg); flex: none; }
.tk-q span { display: grid; gap: 2px; }
.tk-q small { color: var(--muted); font-size: 12px; }
.tk-new h3, .tk-h { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; }
.tk-new h3 .ico { color: var(--accent-fg); }
.tk-h { margin: 28px 0 12px; font-size: 16px; }
.tk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tk-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.tk-list { display: grid; gap: 8px; }
.tk-row { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; color: var(--text); text-decoration: none; }
.tk-row:hover { border-color: var(--accent); }
.tk-main { display: grid; gap: 3px; min-width: 0; }
.tk-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-status { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--panel-2); color: var(--muted); }
.tk-status.open { background: color-mix(in srgb, #f5b041 15%, transparent); color: #e09a1f; }
.tk-status.answered { background: var(--accent-soft); color: var(--accent-ink); }
.back { display: inline-block; margin-bottom: 12px; font-size: 14px; }
.tk-job { display: flex; gap: 12px; align-items: center; padding: 12px 14px; margin-bottom: 14px; }
.tk-job .ico { color: var(--accent-fg); flex: none; }
.tk-job span { display: grid; gap: 2px; min-width: 0; }
.tk-thread { display: grid; gap: 10px; margin-bottom: 14px; }
.tk-msg { max-width: 78%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.tk-msg.me { justify-self: end; background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); border-bottom-right-radius: 4px; }
.tk-msg.support { border-bottom-left-radius: 4px; }
.tk-who { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.tk-body { white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.5; }
select.input { appearance: none; cursor: pointer; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a1a1aa' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: calc(100% - 14px) 50%; background-size: 12px 8px; background-repeat: no-repeat; }

/* ================= site footer ================= */
.site-foot { position: relative; z-index: 1; max-width: 1320px; margin: 40px auto 0; padding: 0 28px 28px; font-size: 14px; }
.site-foot { border-top: 1px solid var(--line); padding-top: 36px; }
.sf-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.sf-brand { display: grid; gap: 12px; align-content: start; }
.sf-brand p { margin: 0; max-width: 340px; font-size: 13px; line-height: 1.5; }
.sf-status { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 5px 10px; border-radius: 999px; font-size: 12px;
  color: var(--text); border: 1px solid var(--line-strong); }
.sf-status .light { width: 8px; height: 8px; border-radius: 50%; background: #4caf50; box-shadow: 0 0 0 3px color-mix(in srgb, #4caf50 22%, transparent); }
.sf-pay { display: flex; flex-wrap: wrap; gap: 7px; }
.sf-pay .pay-tile { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 28px; box-sizing: border-box;
  border-radius: 6px; background: #fff; border: 1.5px solid var(--g-edge, var(--line-strong)); }
.sf-pay .pay-tile img { display: block; height: 16px; width: auto; max-width: 34px; }
.sf-pay .pay-visa img { height: 11px; }
.sf-pay .pay-mastercard img { height: 17px; }
.sf-pay .pay-blik img { height: 20px; width: auto; }   /* official BLIK badge (black, dot over the b) */
.sf-pay .pay-applepay img { height: 21px; max-width: 36px; }
.sf-col { display: grid; gap: 9px; align-content: start; }
.sf-col h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.sf-col h4 .ico { width: 15px; height: 15px; color: var(--accent-fg); }
.sf-col a { color: var(--muted); text-decoration: none; width: fit-content; transition: color .15s; }
.sf-col a:hover { color: var(--text); }
.sf-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 32px; padding-top: 18px;
  border-top: 1px dashed var(--line-strong); font-size: 12px; color: var(--muted); }
.sf-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.sf-listed { margin-left: auto; font-size: 11px; opacity: .75; }
.sf-listed a { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }
.sf-listed a:hover { color: var(--text); opacity: 1; }
.sf-listed a.sf-badge { border-bottom: 0; margin-left: 6px; opacity: .9; }
.sf-listed a.sf-badge img { height: 20px; width: auto; vertical-align: middle; }
@media (max-width: 640px) { .sf-listed { margin-left: 0; width: 100%; } }

@media (max-width: 980px) {
  .sf-top { grid-template-columns: 1fr 1fr; }
  .sf-brand { grid-column: 1 / -1; }
  .tk-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .site-foot { padding: 0 16px 24px; }
  .composer { bottom: 8px; border-radius: 14px; }
  .composer-row { flex-direction: column; align-items: stretch; }
  .composer-switches { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .composer-go { justify-content: space-between; }
  .composer-go .btn { flex: 1; }
  .pop { position: fixed; left: 16px !important; right: 16px; bottom: 96px; width: auto !important; }
  .tk-msg { max-width: 92%; }
  .hist-row { grid-template-columns: 34px 1fr auto; }
  .hist-when { display: none; }
  .gal-search { width: 100%; }
}
.pop-list { min-width: 280px; }
.sf-status.warn .light { background: #f5b041; box-shadow: 0 0 0 3px color-mix(in srgb, #f5b041 22%, transparent); }

/* mobile: nav becomes a scrollable second row under the header */
.brand span { white-space: nowrap; }
@media (max-width: 980px) {
  .topbar { grid-template-columns: 1fr auto; height: auto; row-gap: 0; padding: 0 16px; }
  .topbar > .brand, .topbar > .top-right { height: 52px; display: flex; align-items: center; }
  .nav:not([hidden]) { display: flex; grid-column: 1 / -1; order: 3; justify-self: stretch; overflow-x: auto; scrollbar-width: none;
    margin: 0 -16px; padding: 6px 12px; border-top: 1px solid var(--line); }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; padding: 6px 10px; font-size: 13px; }
  .nav-sep { flex: none; }
}
@media (max-width: 420px) { .brand span { display: none; } }

/* ================= buttons v3: solid accent, shadow on hover ================= */
.btn { position: relative; isolation: isolate; overflow: hidden; border: 0; font-weight: 700; letter-spacing: .005em;
  transition: box-shadow .2s ease, background .15s ease; }
.btn:focus-visible { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent-border); }
.btn:disabled { filter: grayscale(.6); opacity: .5; box-shadow: none; }
.btn.ghost { font-weight: 600; }
.btn-cost { background: rgba(0,0,0,.12); color: #16120d; font-weight: 700; }
.btn.sm { border-radius: 9px; }
.btn.lg { border-radius: 12px; }
.seg-inline button.active { box-shadow: 0 1px 2px rgba(0,0,0,.25), inset 0 0 0 1px rgba(47,196,230,.5); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* ================= buttons v4: solid colours only (no gradients) ================= */
:root { --btn: #2fc4e6; --btn-hover: #1fb3d6; --btn-ink: #16120d; --btn-edge: rgba(47,196,230,.5); }
.btn { background: var(--btn); color: var(--btn-ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 6px 18px -8px rgba(24,150,190,.7); }
.btn::after { display: none; }
.btn:hover { background: var(--btn-hover); filter: none; transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 10px 24px -8px rgba(24,150,190,.85); }
.btn:active { transform: translateY(0); background: #18a0c4; }

.btn.ghost { background: var(--panel); color: var(--text); border: 1px solid var(--btn-edge); box-shadow: none; }
.btn.ghost:hover { background: var(--accent-soft); border-color: var(--btn); box-shadow: 0 6px 18px -12px rgba(24,150,190,.8); }
.btn.ghost .ico { color: var(--btn); }

.btn.warn { background: transparent; border: 1px dashed var(--btn); }
.btn.warn:hover { background: var(--accent-soft); }

.seg button.active, .tabs button.active, .pack .ribbon, .step .num,
.unit-toggle button.active, .usage-seg button.active { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.quota-btn { background: var(--bg); border-color: var(--btn-edge); }
/* no lift on hover: only the shadow deepens */
.btn, .btn:hover, .btn:active, .btn.ghost:hover { transform: none; }
.btn:hover .ico { transform: none; }
.btn:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 12px 28px -6px rgba(24,150,190,.75), 0 3px 8px -2px rgba(0,0,0,.35); }
.btn.ghost:hover { box-shadow: 0 10px 24px -8px rgba(24,150,190,.55), 0 3px 8px -2px rgba(0,0,0,.25); }
.btn:active { box-shadow: inset 0 2px 4px rgba(0,0,0,.18), 0 3px 10px -6px rgba(24,150,190,.6); }
.btn.warn:hover { box-shadow: 0 8px 20px -10px rgba(24,150,190,.6); }
.qp-unit { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 12px; }
.qp-rate { font-size: 11px; line-height: 1.4; }

/* Generate: the one yellow button on the page, same in both themes */
:root { --go-bg: #ffc83d; --go-hover: #f5b923; --go-ink: #1c1405; --go-line: #e5ad1f; }
.btn.go { min-height: 46px; padding: 0 8px 0 18px; gap: 9px; border-radius: 12px; font-size: 15px; font-weight: 800;
  background: var(--go-bg); color: var(--go-ink); border: 1px solid var(--go-line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 22px -10px rgba(255,200,61,.75); }
.btn.go .ico { color: var(--go-ink); width: 17px; height: 17px; }
.btn.go:hover { background: var(--go-hover); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 0 0 3px rgba(255,200,61,.35), 0 12px 28px -8px rgba(255,200,61,.8); }
.btn.go:active { box-shadow: 0 0 0 3px rgba(255,200,61,.45), inset 0 2px 4px rgba(0,0,0,.2); }
.btn.go .btn-cost { background: rgba(28,20,5,.13); color: var(--go-ink); padding: 4px 8px; border-radius: 7px; font-size: 12px; }
.go-kbd { padding: 3px 6px; border-radius: 6px; font-size: 11px; font-weight: 600; line-height: 1; font-family: inherit; color: inherit; opacity: .55;
  border: 1px solid currentColor; }
@media (max-width: 640px) { .go-kbd { display: none; } }

/* ================= compact tiles, loader, two-row feed, side drawer ================= */
.studio2 > .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; min-height: 0; padding-bottom: 20px; }
.tile { border-radius: 12px; }
.tile .media { aspect-ratio: 16/10; }
.tile .meta { padding: 8px 10px 10px; gap: 3px; }
.tile .row { font-size: 12px; gap: 6px; }
.tile .row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .prompt { font-size: 12px; -webkit-line-clamp: 1; }
.tile-time { font-size: 11px; }
.tile-btn { width: 26px; height: 26px; border-radius: 7px; }
.tile-btn .ico { width: 13px; height: 13px; }
.tile-actions { top: 6px; right: 6px; gap: 3px; }
.audio-tile { padding: 10px; gap: 6px; }
.audio-tile audio { height: 30px; }

.gen-loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px;
  background: var(--panel-2); color: var(--muted); font-size: 12px; font-weight: 600; }
.loader { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line-strong); border-top-color: var(--btn, #2fc4e6);
  border-right-color: var(--btn, #2fc4e6); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loader { animation-duration: 2.4s; } }

.view-all[hidden] { display: none; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(8,8,10,.55); opacity: 0; transition: opacity .25s ease; }
.drawer-backdrop.open { opacity: 1; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 61; width: min(760px, 100vw); display: flex; flex-direction: column;
  background: var(--bg); border-left: 1px solid var(--line-strong); box-shadow: -24px 0 60px rgba(0,0,0,.35);
  transform: translateX(100%); transition: transform .26s cubic-bezier(.2,.8,.2,1); }
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 18px; }
.drawer-head h2 .ico { color: var(--btn, #2fc4e6); }
.drawer-head h2 .muted { font-weight: 500; font-size: 14px; }
.drawer-grid { flex: 1; overflow-y: auto; padding: 16px 18px 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-content: start; }
body.no-scroll { overflow: hidden; }
@media (max-width: 640px) { .drawer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (prefers-reduced-motion: reduce) { .drawer, .drawer-backdrop { transition: none; } }
.tile .media { flex: none; }
.drawer-grid { grid-auto-rows: max-content; } .drawer-grid > .tile { min-height: max-content; }
/* scroll lock on <html> so the sticky composer keeps its place under the drawer */
html.no-scroll { overflow: hidden; }
/* drawer: smaller tiles, still 3 per row */
.drawer { width: min(600px, 100vw); }
.drawer-grid { gap: 10px; padding: 14px 16px 20px; }
.drawer-grid .tile .meta { padding: 6px 8px 8px; gap: 2px; }
.drawer-grid .tile .row { font-size: 11px; }
.drawer-grid .tile .prompt, .drawer-grid .tile-time { font-size: 11px; }
.drawer-grid .tile .media { aspect-ratio: 16/9; }
/* sticky composer: always fully on screen with a small gap */
.composer { bottom: 12px; max-height: calc(100vh - 80px); }
.studio2 { padding-bottom: 12px; }

/* ================= details sheet (80 % of the viewport height) ================= */
.tile .media { cursor: pointer; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(8,8,10,.6); opacity: 0; transition: opacity .25s ease; }
.sheet-backdrop.open { opacity: 1; }
.sheet { position: fixed; left: 50%; bottom: 0; z-index: 71; width: min(1180px, 100vw); height: 80vh; display: flex; flex-direction: column;
  background: var(--bg); border: 1px solid var(--line-strong); border-bottom: 0; border-radius: 20px 20px 0 0;
  box-shadow: 0 -24px 60px rgba(0,0,0,.4); transform: translate(-50%, 100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.sheet.open { transform: translate(-50%, 0); }
.sheet-grip { width: 44px; height: 4px; border-radius: 2px; background: var(--line-strong); margin: 8px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 8px 18px 12px; border-bottom: 1px solid var(--line); flex: none; }
.sheet-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 18px; }
.sheet-head h2 .ico { color: var(--btn, #2fc4e6); }
.sheet-x { margin-left: auto; }
.sheet-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 340px; }
.sheet-media { min-height: 0; display: grid; place-items: center; padding: 16px; background: var(--panel-2); border-right: 1px solid var(--line); }
.sheet-media img, .sheet-media video { max-width: 100%; max-height: 100%; border-radius: 12px; object-fit: contain; border: 1px solid var(--line); }
.sheet-audio { width: min(520px, 100%); padding: 24px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--panel); }
.sheet-audio audio { width: 100%; }
.sheet-info { min-height: 0; overflow-y: auto; padding: 16px 18px 20px; display: grid; gap: 16px; align-content: start; }
.sheet-block { display: grid; gap: 6px; }
.sheet-label { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); }
.sheet-prompt { margin: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); font-size: 14px;
  line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.sheet-rows { gap: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.sheet-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; font-size: 13px; }
.sheet-row + .sheet-row { border-top: 1px solid var(--line); }
.sheet-row b { text-align: right; font-weight: 600; }
.sheet-note { margin: 0; font-size: 12px; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.ghost.danger:hover { border-color: #ef5350; color: #ef5350; }
.link-btn { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; cursor: pointer; font: inherit; font-size: 12px;
  font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--accent-ink); }
.link-btn .ico { width: 13px; height: 13px; }
@media (max-width: 860px) {
  .sheet { height: 88vh; }
  .sheet-body { grid-template-columns: 1fr; grid-template-rows: 45% 1fr; }
  .sheet-media { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) { .sheet, .sheet-backdrop { transition: none; } }
.sheet { border-radius: 4px 4px 0 0; } .sheet-media img, .sheet-media video, .sheet-audio, .sheet-prompt, .sheet-rows { border-radius: 4px; }
/* details popup: always centred on screen, compact header */
.sheet { top: 50%; bottom: auto; left: 50%; width: min(1180px, calc(100vw - 32px)); height: 80vh; border: 1px solid var(--line-strong); border-radius: 4px;
  transform: translate(-50%, -46%); opacity: 0; transition: transform .26s cubic-bezier(.2,.8,.2,1), opacity .2s ease; box-shadow: 0 24px 70px rgba(0,0,0,.45); }
.sheet.open { transform: translate(-50%, -50%); opacity: 1; }
.sheet-grip { display: none; }
.sheet-head { padding: 8px 10px 8px 14px; gap: 8px; }
.sheet-head h2 { font-size: 14px; gap: 6px; }
.sheet-head h2 .ico { width: 15px; height: 15px; }
.sheet-head .status { font-size: 11px; }
.sheet-x { width: 28px; height: 28px; margin-top: 0; border-radius: 4px; }
.sheet-x .ico { width: 15px; height: 15px; }
@media (max-width: 860px) { .sheet { height: 88vh; } }
/* centring without translate math: inset 0 + margin auto centres the box in the visible viewport */
.sheet { inset: 0; margin: auto; transform: scale(.97); }
.sheet.open { transform: none; }
html { scrollbar-gutter: stable; }
.sheet-x { border: 0; background: transparent; color: var(--muted); } .sheet-x:hover { border: 0; color: var(--text); background: var(--panel-2); }
/* composer docked to the viewport (not sticky): always fully visible, 12px above the screen edge */
.composer { position: fixed; left: 0; right: 0; bottom: 12px; margin: 0 auto; width: min(1180px, calc(100vw - 32px)); max-height: calc(100vh - 90px); overflow: visible; }
html.has-composer body { padding-bottom: calc(var(--composer-h, 150px) + 24px); }
/* studio pages: no site footer, the docked composer would sit on top of it (footer links stay on every other page) */
html.has-composer .site-foot { display: none; }
.studio2 > .grid { padding-bottom: 8px; }
@media (max-width: 640px) { .composer { bottom: 8px; width: calc(100vw - 16px); } }
/* composer: solid background, grid column may shrink so long switch rows scroll instead of widening the panel */
.composer { grid-template-columns: minmax(0, 1fr); background: var(--panel); backdrop-filter: none; }
.composer-row, .composer-switches, .composer-main { min-width: 0; }

/* comparison pages (/compare/*) */
.cmp-updated { margin: 0 0 12px; font-size: 14px; }
.cmp-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.cmp-pick { padding: 18px 20px; }
.cmp-pick h3 { margin: 0 0 8px; }
.cmp-pick ul { margin: 0; padding-left: 20px; line-height: 1.7; }
.cmp-ex { padding: 16px; margin-bottom: 14px; }
.cmp-ex-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cmp-ex-pair figure { margin: 0; }
.cmp-ex-pair img, .cmp-ex-pair video { width: 100%; border-radius: 10px; border: 1px solid var(--line); display: block; }
.cmp-ex-pair figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.cmp-disclaimer { font-size: 13px; }
@media (max-width: 640px) { .cmp-ex-pair { grid-template-columns: 1fr; } }

/* affiliate dashboard (#/affiliate) */
.aff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 600px) { .aff-grid { grid-template-columns: 1fr; } }

/* ================= checkout consent (EU/PL withdrawal waiver) + AI-generated labels (AI Act art. 50) ================= */
.consent-box { display: flex; gap: 12px; align-items: flex-start; max-width: 760px; margin: 0 auto 22px; padding: 14px 16px; cursor: pointer; font-size: 14px; line-height: 1.45; }
.consent-box input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.consent-copy { display: grid; gap: 6px; }
.consent-box.attention { border-color: var(--accent); }
.ai-badge { display: inline-flex; align-items: center; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); font-size: 11px; font-weight: 600; letter-spacing: .02em; color: var(--muted); white-space: nowrap; }
.media .ai-badge { position: absolute; left: 8px; top: 8px; background: rgba(10,10,12,.72); color: #fff; border-color: transparent; pointer-events: none; }
.ai-note { font-size: 12px; color: var(--muted); margin: 0; }
.ai-note a { color: inherit; text-decoration: underline; }
.tile.starred .media .ai-badge { left: 38px; }

/* ---------- sign in with Google + 2FA ---------- */
.auth-google { margin: 16px 0 4px; }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; }
.btn-google .g-logo { flex: none; }
.auth-or { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-code-h { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.auth-code-hint { font-size: 13px; margin: 12px 0 0; }
/* forgot / reset password (views/landing.js authCard) */
.auth-pw-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.auth-pw-row .lbl { flex: 1; }
.auth-forgot, .auth-back { font-size: 13px; padding: 0; }
.auth-back { margin-top: 12px; }
.link-btn[hidden], .auth-forgot-head[hidden] { display: none; }
.tfa-card > * + * { margin-top: 14px; }
.tfa-steps { margin: 0; padding-left: 20px; display: grid; gap: 18px; }
.tfa-qr { margin: 12px 0 6px; width: max-content; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.tfa-qr svg { display: block; }
.tfa-secret { font-size: 14px; letter-spacing: .04em; word-break: break-all; }
.tfa-code { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.tfa-code .field { flex: 1 1 180px; }
.tfa-on { display: flex; align-items: center; gap: 8px; }
.tfa-recovery { margin-top: 14px; }
.tfa-codes { columns: 2; margin: 12px 0; padding-left: 22px; font-size: 15px; }
.tfa-codes li { margin: 4px 0; }
.tfa-offer h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.tfa-card .row, .tfa-recovery .row, .tfa-offer .row { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 520px) { .tfa-codes { columns: 1; } }

/* gallery toolbar on phones: search full width, filters as a 3+2 chip grid */
@media (max-width: 640px) {
  .page-head.feed-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .gal-tools { width: 100%; min-width: 0; }
  .gal-tools .seg-inline { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); width: 100%; min-width: 0; }
  .gal-tools .seg-inline button { grid-column: span 2; justify-content: center; min-width: 0; padding: 0 6px; }
  .gal-tools .seg-inline button:nth-child(n+4) { grid-column: span 3; }
}
.tk-create { margin: 4px 0 18px; }

/* usage-analytics consent bar (assets/js/consent.js) */
/* box in the bottom-right corner (owner 02.11, like higgsfield.ai), full width on phones; buttons stacked */
.consent-bar { position: fixed; z-index: 90; left: 16px; right: 16px; bottom: 16px;
  background: var(--panel); color: var(--text); border: 1px solid var(--line-strong); border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .18); padding: 16px; display: flex; flex-direction: column; gap: 10px;
  font-size: 13.5px; line-height: 1.45; }
.consent-bar strong { font-size: 15px; }
.consent-bar p { margin: 0; color: var(--muted); }
.consent-bar a { color: var(--accent); }
.consent-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.consent-actions .btn { width: 100%; justify-content: center; }
@media (min-width: 640px) { .consent-bar { left: auto; width: 300px; } }
