/* ───────────────────────── Design tokens ───────────────────────── */
:root {
  --bg: #fbfbfc;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f4f6;
  --surface-3: #ececf0;
  --ink: #0b0b0f;
  --ink-2: #3a3a44;
  --muted: #6b6b78;
  --faint: #9a9aa6;
  --line: #e7e7ec;
  --line-strong: #d6d6de;
  --accent: #6d5dfc;
  --accent-ink: #5545e8;
  --accent-soft: #efedff;
  --coral: #ff6b4a;
  --grad: linear-gradient(120deg, #6d5dfc 0%, #b45cf0 55%, #ff6b4a 100%);
  --ok: #15803d; --ok-soft: #e8f7ee;
  --warn: #b45309; --warn-soft: #fdf3e2;
  --danger: #dc2626; --danger-soft: #fdecec;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(16, 16, 24, .05);
  --shadow: 0 1px 2px rgba(16, 16, 24, .04), 0 6px 20px -6px rgba(16, 16, 24, .10);
  --shadow-lg: 0 24px 60px -18px rgba(16, 16, 24, .28);
  --ring: 0 0 0 3px rgba(109, 93, 252, .22);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --topbar-h: 60px;
  --stage-bg: #f1f1f4;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #09090b;
  --bg-elev: #0f0f12;
  --surface: #111114;
  --surface-2: #18181c;
  --surface-3: #222228;
  --ink: #f5f5f7;
  --ink-2: #d4d4dc;
  --muted: #9b9ba8;
  --faint: #6e6e7a;
  --line: #24242b;
  --line-strong: #33333c;
  --accent: #8b7dff;
  --accent-ink: #a89dff;
  --accent-soft: #1d1a33;
  --ok: #4ade80; --ok-soft: #10261a;
  --warn: #fbbf24; --warn-soft: #2a2010;
  --danger: #f87171; --danger-soft: #2c1414;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -8px rgba(0, 0, 0, .55);
  --shadow-lg: 0 30px 70px -20px rgba(0, 0, 0, .8);
  --ring: 0 0 0 3px rgba(139, 125, 255, .3);
  --stage-bg: #0c0c0f;
  color-scheme: dark;
}

/* ───────────────────────── Base ───────────────────────── */
* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
  transition: background-color .2s ease, color .2s ease;
}
main { outline: none; }
a { color: var(--ink); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
img, canvas, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: var(--accent-soft); }
.ic { flex: none; display: inline-block; vertical-align: middle; }
h1, h2, h3 { letter-spacing: -0.025em; line-height: 1.15; }
.muted { color: var(--muted); }
.center { text-align: center; }
.mono { font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace; font-size: .86em; letter-spacing: 0; }
.small { font-size: .8rem; }
.nowrap { white-space: nowrap; }
.w-auto { width: auto; min-width: 180px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.row-wrap { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-end { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.stack { display: grid; gap: 8px; }
.big { font-size: 1.2rem; padding: 10px 14px; background: var(--surface-2); border-radius: 8px; display: inline-block; user-select: all; }

/* ───────────────────────── Buttons ───────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 500; font-size: .9rem; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, transform .08s ease, box-shadow .15s ease;
  box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--surface-2); border-color: var(--line-strong); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .icon-btn:focus-visible, .tab:focus-visible, .chip:focus-visible, .opt:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn-ai { background: var(--grad); border: 0; color: #fff; box-shadow: 0 6px 20px -8px rgba(109, 93, 252, .7); }
.btn-ai:hover { filter: brightness(1.06); background: var(--grad); }
.btn-small { height: 32px; padding: 0 11px; font-size: .84rem; border-radius: 9px; }
.btn-lg { height: 46px; padding: 0 20px; font-size: .98rem; border-radius: 12px; }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn-danger { color: var(--danger); }
.btn-danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-wa { background: #1faa59; border-color: #1faa59; color: #fff; }
.btn-wa:hover { background: #1a9a50; border-color: #1a9a50; }
.btn-block { width: 100%; }
.btn:disabled, .icon-btn:disabled { opacity: .45; cursor: default; transform: none; }
.busy { opacity: .55; pointer-events: none; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  display: inline-grid; place-items: center; cursor: pointer; flex: none; padding: 0; text-decoration: none;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn.plain { border-color: transparent; background: transparent; }

/* ───────────────────────── Top bar ───────────────────────── */
.announce { background: var(--ink); color: var(--bg); text-align: center; font-size: .82rem; padding: 7px 16px; font-weight: 500; }
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--topbar-h);
  padding: 0 max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); }
.brand .logo-mark { width: 28px; height: 28px; }
.wordmark { font-weight: 700; font-size: 1.08rem; letter-spacing: -0.035em; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a:not(.btn) { white-space: nowrap; color: var(--muted); text-decoration: none; padding: 7px 11px; border-radius: 8px; font-size: .9rem; font-weight: 500; }
.nav a:not(.btn):hover { color: var(--ink); background: var(--surface-2); }
.nav a.active { color: var(--ink); }
.nav .sep { width: 1px; height: 20px; background: var(--line); margin: 0 6px; }
.nav .btn { margin-left: 4px; }
@media (max-width: 760px) { .hide-sm { display: none !important; } }

/* ───────────────────────── Forms ───────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: .8rem; color: var(--ink-2); font-weight: 500; }
.field small { color: var(--muted); font-size: .76rem; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=search], input[type=tel], input[type=url],
input[type=number], input[type=date], input[type=time], select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: var(--surface);
  font-size: .92rem; min-height: 40px; transition: border-color .15s, box-shadow .15s;
}
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
input:disabled, select:disabled, textarea:disabled { opacity: .6; }
textarea { resize: vertical; line-height: 1.45; }
input[type=range] { width: 100%; accent-color: var(--accent); }
input[type=color] { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 3px; background: var(--surface); cursor: pointer; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; gap: 8px; align-items: center; font-size: .9rem; margin-bottom: 10px; cursor: pointer; }
.input-row { display: flex; gap: 8px; }
.input-row input, .input-row select { flex: 1; min-width: 0; }
.form-error { color: var(--danger); background: var(--danger-soft); padding: 9px 12px; border-radius: 10px; font-size: .86rem; }
.hint { color: var(--muted); font-size: .8rem; margin: 8px 0 0; }

/* ───────────────────────── Chips, badges, tabs ───────────────────────── */
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 14px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 13px;
  font-size: .85rem; cursor: pointer; text-decoration: none; color: var(--ink-2); white-space: nowrap; font-weight: 500;
}
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip-sm { padding: 4px 10px; font-size: .78rem; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); vertical-align: middle; border: 1px solid var(--line); }
.badge-paid, .badge-live, .badge-yes { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge-trial, .badge-maybe { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge-expired, .badge-no { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge-ai { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }
.tabs { display: flex; border-bottom: 1px solid var(--line); padding: 0 8px; overflow-x: auto; scrollbar-width: none; flex: none; gap: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  border: 0; background: none; padding: 12px 10px 11px; cursor: pointer; color: var(--muted); font-weight: 500;
  border-bottom: 2px solid transparent; font-size: .86rem; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; text-decoration: none;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--ink); }

/* ───────────────────────── Landing ───────────────────────── */
.hero { position: relative; overflow: hidden; padding: 84px 0 56px; text-align: center; isolation: isolate; }
.hero::before {
  content: ''; position: absolute; inset: -20% -10% auto; height: 620px; z-index: -2;
  background:
    radial-gradient(40% 50% at 30% 30%, rgba(109, 93, 252, .20), transparent 70%),
    radial-gradient(35% 45% at 72% 25%, rgba(255, 107, 74, .16), transparent 70%),
    radial-gradient(30% 40% at 55% 60%, rgba(180, 92, 240, .14), transparent 70%);
  filter: blur(10px);
}
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px; opacity: .5;
  mask-image: radial-gradient(60% 55% at 50% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(60% 55% at 50% 30%, #000 20%, transparent 75%);
}
.eyebrow-pill {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface);
  padding: 5px 12px 5px 6px; border-radius: 999px; font-size: .8rem; color: var(--ink-2); font-weight: 500; box-shadow: var(--shadow-sm); text-decoration: none;
}
.hero h1 { font-size: clamp(2.5rem, 7vw, 4.6rem); font-weight: 700; letter-spacing: -0.045em; line-height: 1.02; margin: 22px auto 18px; max-width: 900px; }
.lead { color: var(--muted); max-width: 620px; margin: 0 auto 32px; font-size: clamp(1rem, 2vw, 1.14rem); line-height: 1.6; }
.prompt {
  max-width: 760px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow-lg); padding: 6px; text-align: left; position: relative;
}
.prompt:focus-within { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: var(--shadow-lg), var(--ring); }
.prompt textarea { border: 0; box-shadow: none; background: transparent; font-size: 1.02rem; padding: 14px 14px 6px; min-height: 92px; resize: none; }
.prompt textarea:focus, .prompt textarea:hover { box-shadow: none; border: 0; }
.prompt-foot { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 6px 8px 8px; }
.prompt-tools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: .8rem; }
.prompt-select { height: 32px; min-height: 32px; width: auto; padding: 0 28px 0 10px; border-radius: 8px; font-size: .82rem; background-color: var(--surface-2); border-color: transparent; }
.send-btn { width: 40px; height: 40px; border-radius: 11px; border: 0; background: var(--ink); color: var(--bg); display: grid; place-items: center; cursor: pointer; transition: transform .1s; flex: none; }
.send-btn:hover { transform: translateY(-1px); }
.examples { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 16px auto 0; max-width: 760px; }
.hero-note { color: var(--faint); font-size: .82rem; margin-top: 18px; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.hero-note span { display: inline-flex; gap: 6px; align-items: center; }

/* Agent demo */
.demo { margin: 64px auto 0; max-width: 1060px; display: grid; grid-template-columns: 340px 1fr; text-align: left;
  border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; }
.demo-side { border-right: 1px solid var(--line); padding: 20px; display: flex; flex-direction: column; gap: 14px; background: var(--bg-elev); }
.demo-head { display: flex; gap: 8px; align-items: center; font-size: .8rem; color: var(--muted); }
.demo-brief { font-size: .9rem; background: var(--surface-2); border-radius: 12px; padding: 12px 14px; color: var(--ink-2); }
.demo-brief b { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 4px; }
.agent-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.agent-steps li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 8px 0; font-size: .86rem; color: var(--muted); align-items: start; }
.agent-steps li b { color: var(--ink); font-weight: 500; display: block; }
.agent-steps .st { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); color: var(--faint); }
.agent-steps .st .ic { visibility: hidden; }
.agent-steps li.done .st { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.agent-steps li.done .st .ic { visibility: visible; }
.agent-steps li.run .st { border-color: var(--accent); }
.agent-steps li.run .st::after { content: ''; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1s ease-in-out infinite; }
.agent-steps li .st { position: relative; }
@keyframes pulse { 50% { opacity: .3; transform: scale(.7); } }
.demo-stage { position: relative; min-height: 440px; display: grid; place-items: center; padding: 28px;
  background: radial-gradient(70% 70% at 50% 40%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%), var(--surface); }
.fan { position: relative; width: 100%; height: 400px; }
.fan .thumb { position: absolute; width: 33%; max-width: 230px; left: 50%; top: 50%; box-shadow: var(--shadow-lg); border-radius: 8px; transition: transform .6s cubic-bezier(.2, .8, .2, 1), opacity .6s; }
.fan .thumb:nth-child(1) { transform: translate(-125%, -50%) rotate(-7deg); }
.fan .thumb:nth-child(2) { transform: translate(-50%, -54%); z-index: 2; }
.fan .thumb:nth-child(3) { transform: translate(25%, -50%) rotate(7deg); }
.fan.collapsed .thumb { transform: translate(-50%, -50%) scale(.9); opacity: 0; }

.section { padding-top: 96px; padding-bottom: 8px; }
.section-head { max-width: 640px; margin-bottom: 32px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.kicker { display: inline-flex; gap: 8px; align-items: center; font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--accent-ink); }
.section-title { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 700; letter-spacing: -0.035em; margin: 10px 0 10px; }
.section-title.sm { font-size: 1.1rem; letter-spacing: -0.02em; margin: 28px 0 12px; font-weight: 600; }
.section-sub { color: var(--muted); font-size: 1.04rem; margin: 0; }

.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.bento > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; position: relative; overflow: hidden; min-height: 200px; display: flex; flex-direction: column; }
.bento .b-lg { grid-column: span 4; } .bento .b-md { grid-column: span 2; } .bento .b-half { grid-column: span 3; }
.bento h3 { margin: 16px 0 6px; font-size: 1.05rem; font-weight: 600; letter-spacing: -0.02em; }
.bento p { margin: 0; color: var(--muted); font-size: .92rem; max-width: 46ch; }
.feat-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.feat-ic.ai { background: var(--grad); color: #fff; border: 0; }
.bento-visual { margin-top: auto; padding-top: 18px; display: flex; gap: 6px; flex-wrap: wrap; }
.mini-rsvp { display: grid; gap: 6px; margin-top: auto; padding-top: 16px; }
.mini-rsvp div { display: flex; justify-content: space-between; align-items: center; font-size: .84rem; padding: 8px 10px; background: var(--surface-2); border-radius: 8px; }
.lang-cloud span { font-size: .8rem; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); }
.mini-thumbs { display: flex; gap: 10px; margin-top: auto; padding-top: 18px; }
.mini-thumbs .thumb { width: 22%; }

.grid { display: grid; gap: 22px 18px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); padding-bottom: 32px; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); } }
.grid-wide { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important; }
.tcard { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 10px; }
.thumb {
  background: var(--surface-2); border-radius: 10px; overflow: hidden; display: grid; place-items: center; aspect-ratio: 5 / 7;
  box-shadow: 0 0 0 1px var(--line), var(--shadow-sm); transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s;
}
.thumb canvas { width: 100%; height: 100%; object-fit: contain; }
a.tcard:hover .thumb, .tcard a.thumb:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--line), var(--shadow-lg); }
.tname { font-weight: 600; font-size: .92rem; line-height: 1.3; letter-spacing: -0.01em; }
.tmeta { color: var(--muted); font-size: .8rem; }
.blank-thumb { border: 1.5px dashed var(--line-strong); background: transparent; box-shadow: none; color: var(--muted); flex-direction: column; gap: 8px; font-size: .88rem; display: flex; justify-content: center; align-items: center; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.steps li { border-top: 1px solid var(--line-strong); padding-top: 18px; }
.steps .num { font-family: ui-monospace, monospace; font-size: .78rem; color: var(--accent-ink); }
.steps b { display: block; margin: 8px 0 4px; font-size: 1.02rem; letter-spacing: -0.02em; }
.steps .desc { color: var(--muted); font-size: .92rem; }

.pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); gap: 16px; justify-content: center; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 26px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.plan-hero { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; border: 1.5px solid transparent; box-shadow: var(--shadow-lg); }
.plan-name { font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.plan-price { font-size: 2.8rem; font-weight: 700; letter-spacing: -0.045em; line-height: 1; }
.plan-price small { font-size: .92rem; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; flex: 1; font-size: .92rem; color: var(--ink-2); }
.plan li { display: flex; gap: 9px; align-items: flex-start; }
.plan li .ic { color: var(--accent); margin-top: 2px; }

.faq { max-width: 760px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 2px; }
.faq summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; letter-spacing: -0.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { transition: transform .2s; color: var(--muted); }
.faq details[open] summary .ic { transform: rotate(180deg); }
.faq p { color: var(--muted); margin: 10px 0 0; }

.cta-band { margin: 96px auto 0; max-width: 1120px; border-radius: 24px; padding: 60px 24px; text-align: center; color: #fff; background: #0b0b0f; position: relative; overflow: hidden; isolation: isolate; border: 1px solid #23232b; }
.cta-band::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(50% 80% at 20% 0%, rgba(109, 93, 252, .55), transparent 70%), radial-gradient(50% 80% at 90% 100%, rgba(255, 107, 74, .4), transparent 70%); }
.cta-band h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); margin: 0 0 10px; letter-spacing: -0.04em; }
.cta-band p { color: #c9c9d6; margin: 0 0 26px; }
.cta-band .btn-primary { background: #fff; color: #0b0b0f; border-color: #fff; }

.footer { border-top: 1px solid var(--line); margin-top: 96px; padding: 44px 20px; }
.footer-inner { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 24px; }
.footer h4 { font-size: .74rem; color: var(--muted); font-weight: 600; margin: 0 0 12px; text-transform: uppercase; letter-spacing: .1em; }
.footer a { display: block; color: var(--ink-2); text-decoration: none; font-size: .9rem; padding: 3px 0; }
.footer a:hover { color: var(--ink); }
.footer .fine { color: var(--faint); font-size: .82rem; margin-top: 12px; max-width: 34ch; }

/* ───────────────────────── Auth ───────────────────────── */
.auth { min-height: calc(100vh - var(--topbar-h)); display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: min(400px, 100%); }
.auth-card .logo-mark { width: 40px; height: 40px; margin-bottom: 20px; }
.auth-card h1 { margin: 0 0 6px; font-size: 1.6rem; font-weight: 700; }
.auth-card .muted { margin: 0 0 24px; }
.switch { text-align: center; margin: 18px 0 0; font-size: .88rem; color: var(--muted); }

/* ───────────────────────── Console ───────────────────────── */
.console { display: grid; grid-template-columns: 248px 1fr; min-height: calc(100vh - var(--topbar-h)); }
.side { border-right: 1px solid var(--line); background: var(--bg-elev); padding: 14px 10px; position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); overflow-y: auto; display: flex; flex-direction: column; }
.side-user { display: flex; gap: 10px; align-items: center; padding: 8px; margin-bottom: 4px; }
.side-user > div { min-width: 0; }
.side-user b { display: block; font-size: .88rem; line-height: 1.25; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user small { color: var(--muted); font-size: .76rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 34px; height: 34px; border-radius: 10px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: .8rem; flex: none; }
.side-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); padding: 16px 10px 6px; font-weight: 600; }
.side-nav { display: flex; flex-direction: column; gap: 1px; }
.side-nav a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-size: .88rem; font-weight: 500; }
.side-nav a .ic { color: var(--muted); }
.side-nav a:hover { background: var(--surface-2); color: var(--ink); }
.side-nav a.active { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.side-nav a.active .ic { color: var(--ink); }
.side-foot { margin-top: auto; padding: 12px 4px 4px; }
.plan-mini { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface); font-size: .8rem; color: var(--muted); }
.plan-mini b { display: block; font-size: .86rem; color: var(--ink); }
.plan-mini .bar { height: 4px; background: var(--surface-3); border-radius: 4px; margin: 10px 0; overflow: hidden; }
.plan-mini .bar i { display: block; height: 100%; background: var(--grad); border-radius: 4px; }
.console-main { padding: 28px 36px 64px; min-width: 0; max-width: 1240px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.page-title { font-size: 1.5rem; font-weight: 700; margin: 0; letter-spacing: -0.03em; }
.page-sub { color: var(--muted); margin: 4px 0 0; font-size: .92rem; }
.banner { background: var(--surface); border: 1px solid var(--line); padding: 10px 14px; border-radius: 12px; margin-bottom: 18px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: .88rem; color: var(--ink-2); }
.banner > .ic { color: var(--accent); }
.banner-warn { background: var(--warn-soft); border-color: transparent; color: var(--ink); }
.banner-warn > .ic { color: var(--warn); }
.banner .spacer { flex: 1; }
.banner > span:not(.spacer) { flex: 1 1 220px; min-width: 0; }
.banner.slim { margin: 0; border-radius: 0; border-width: 0 0 1px; padding: 8px 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 22px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.tile .tl { color: var(--muted); font-size: .8rem; display: flex; gap: 6px; align-items: center; }
.tile b { font-size: 1.7rem; font-weight: 650; line-height: 1.15; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.tile small { color: var(--faint); font-size: .76rem; }
.t-yes b { color: var(--ok); } .t-maybe b { color: var(--warn); } .t-no b { color: var(--danger); }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 8px; }
.quick-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; text-decoration: none; color: var(--ink); display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; transition: border-color .15s, box-shadow .15s; }
.quick-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.quick-card b { display: block; font-size: .92rem; font-weight: 600; }
.quick-card small { color: var(--muted); font-size: .8rem; }
.quick-card > .ic:last-child { color: var(--faint); }
.ccard { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px; position: relative; }
.ccard .menu { position: static; }
.ccard .menu-pop { left: 8px; right: 8px; min-width: 0; bottom: 52px; }
.ccard .thumb { box-shadow: none; border-radius: 8px; }
.ccard-body .tmeta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.ccard-body .tmeta span { display: inline-flex; gap: 4px; align-items: center; }
.card-actions { display: flex; gap: 6px; align-items: center; }
.card-actions .menu { margin-left: auto; }
.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; bottom: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 5px; min-width: 170px; z-index: 30; display: flex; flex-direction: column; }
.menu-pop a, .menu-pop button { display: flex; gap: 8px; align-items: center; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 8px; cursor: pointer; text-decoration: none; color: var(--ink); font-size: .86rem; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--surface-2); }
.menu-pop .danger { color: var(--danger); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 14px; max-width: 720px; }
.panel h3 { margin: 0 0 14px; font-size: .98rem; font-weight: 600; }
.panel summary { cursor: pointer; font-weight: 600; }
.danger-zone summary { color: var(--danger); }
.empty { text-align: center; padding: 72px 20px; color: var(--muted); }
.empty h2 { color: var(--ink); font-size: 1.3rem; margin: 16px 0 6px; }
.empty-ic { width: 48px; height: 48px; border-radius: 14px; display: inline-grid; place-items: center; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.empty.small { padding: 36px 20px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 14px; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: .76rem; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--bg-elev); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table.clickable tbody tr { cursor: pointer; }
.table.clickable tbody tr:hover td { background: var(--surface-2); }
.wrap-cell { max-width: 280px; white-space: pre-wrap; word-break: break-word; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 11px; padding: 3px; gap: 2px; margin-bottom: 16px; flex-wrap: wrap; border: 1px solid var(--line); }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: flex; gap: 7px; align-items: center; padding: 7px 14px; border-radius: 8px; font-size: .86rem; font-weight: 500; color: var(--muted); }
.seg input:checked + span { background: var(--surface); box-shadow: var(--shadow-sm); color: var(--ink); }
.seg input:focus-visible + span { box-shadow: var(--ring); }
.seg-3 { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
.seg-3 span { justify-content: center; padding: 9px 6px; }

/* AI generator page */
.ai-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; max-width: 820px; box-shadow: var(--shadow); }
.ai-panel textarea { font-size: 1rem; }
.ai-run { display: grid; grid-template-columns: 260px 1fr; gap: 24px; margin-top: 24px; max-width: 1100px; align-items: start; }
.ai-run .agent-steps { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 16px; }
.ai-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ai-results .tcard { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.shimmer { aspect-ratio: 5/7; border-radius: 10px; background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface-3) 50%, var(--surface-2) 70%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -100% 0; } }

/* Billing */
.plan-status { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 16px; max-width: 720px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.buy { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; max-width: 720px; }
.buy .section-title.sm { margin-top: 0; }
.months { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 16px 0; }
.month-opt input { position: absolute; opacity: 0; }
.month-opt span { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.month-opt em { font-style: normal; color: var(--muted); font-size: .86rem; }
.month-opt input:checked + span { border-color: var(--accent); box-shadow: var(--ring); }
.month-opt input:focus-visible + span { box-shadow: var(--ring); }
.paywall { text-align: center; padding: 6px 4px; }
.paywall .empty-ic { margin: 0 auto 12px; }
.paywall h2 { margin: 6px 0 8px; font-size: 1.3rem; }
.paywall p { color: var(--muted); margin: 0 0 20px; }

/* ───────────────────────── Editor ───────────────────────── */
.editor { display: grid; grid-template-columns: 1fr 400px; height: calc(100vh - var(--topbar-h)); height: calc(100dvh - var(--topbar-h)); }
.ed-stage { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: radial-gradient(circle at 1px 1px, var(--line-strong) 1px, transparent 0) 0 0 / 20px 20px, var(--stage-bg); }
.ed-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--bg-elev); }
.ed-bar .ed-name { flex: 1; min-width: 60px; border-color: transparent; background: transparent; box-shadow: none; border-radius: 8px; padding: 6px 10px; font-weight: 600; font-size: .95rem; }
.ed-bar .ed-name:hover, .ed-bar .ed-name:focus { border-color: var(--line); background: var(--surface); }
.save-state { color: var(--faint); font-size: .76rem; white-space: nowrap; padding: 0 6px; }
.save-state.err { color: var(--danger); }
.ed-canvas-wrap { flex: 1; min-height: 0; display: grid; place-items: center; padding: 28px; overflow: hidden; }
.ed-canvas-wrap canvas { max-width: 100%; max-height: 100%; width: auto; height: auto; box-shadow: var(--shadow-lg); border-radius: 4px; cursor: pointer; background: #fff; touch-action: none; }
.ed-panel { border-left: 1px solid var(--line); background: var(--bg-elev); display: flex; flex-direction: column; min-height: 0; }
.panel-body { overflow-y: auto; padding: 16px; flex: 1; overscroll-behavior: contain; }
.panel-body h3 { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 22px 0 10px; font-weight: 600; }
.panel-body h3:first-child { margin-top: 2px; }
.block { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 8px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.block.sel { border-color: var(--accent); box-shadow: var(--ring); }
.block-head { display: flex; gap: 2px; align-items: center; margin-bottom: 8px; }
.block-head select { flex: 1; min-height: 32px; padding: 4px 8px; font-size: .82rem; margin-right: 4px; }
.block-head .icon-btn { width: 30px; height: 30px; border-color: transparent; background: transparent; }
.block-head .icon-btn:hover { background: var(--surface-2); }
.block-head .icon-btn.ai { color: var(--accent); }
.block-foot { display: grid; grid-template-columns: 1fr 150px; gap: 8px; align-items: center; margin-top: 8px; }
.block-foot label { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); }
.block-foot select { min-height: 32px; padding: 4px 8px; font-size: .82rem; }
.color-row { display: flex; gap: 6px; }
.color-row input[type=color] { width: 38px; flex: none; height: 32px; }
.linked { font-size: .75rem; color: var(--accent-ink); background: var(--accent-soft); padding: 6px 9px; border-radius: 8px; margin-top: 6px; display: flex; gap: 6px; align-items: center; }
.add-row { display: flex; gap: 8px; margin-top: 6px; }
.add-row select { flex: 1; }
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.swatch { aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--bg-elev); cursor: pointer; position: relative; box-shadow: 0 0 0 1px var(--line); padding: 0; }
.swatch::after { content: ''; position: absolute; right: 1px; bottom: 1px; width: 34%; height: 34%; border-radius: 50%; background: var(--acc); border: 2px solid var(--bg-elev); }
.swatch:hover { box-shadow: 0 0 0 2px var(--accent); }
.opt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.opt { border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 8px 6px; cursor: pointer; font-size: .8rem; text-align: center; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; justify-content: center; }
.opt:hover { border-color: var(--line-strong); color: var(--ink); }
.opt.active { border-color: var(--ink); background: var(--ink); color: var(--bg); font-weight: 500; }
.size-opt { flex-direction: column; padding: 12px 6px; }
.size-opt i { display: block; border: 1.5px solid currentColor; border-radius: 3px; opacity: .6; }
.photo-drop { border: 1.5px dashed var(--line-strong); border-radius: 12px; padding: 24px; text-align: center; cursor: pointer; color: var(--muted); display: grid; gap: 6px; justify-items: center; }
.photo-drop:hover { border-color: var(--accent); color: var(--ink); }
.photo-drop input { display: none; }
.photo-drop b { color: var(--ink); font-weight: 600; }
.photo-prev { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.photo-prev img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ai-out { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.ai-out .spinner { margin: 16px auto 4px; }
.ai-opt { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; font-size: .88rem; line-height: 1.45; }
.ai-opt:hover { border-color: var(--accent); box-shadow: var(--ring); }
.el-edit { background: var(--surface); border: 1px solid var(--accent); box-shadow: var(--ring); border-radius: 12px; padding: 12px; margin-bottom: 8px; }
.el-edit .field { margin-bottom: 8px; }
.sticker-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.sticker { aspect-ratio: 1; font-size: 1.3rem; border: 1px solid transparent; background: var(--surface-2); border-radius: 8px; cursor: pointer; display: grid; place-items: center; padding: 0; }
.sticker:hover { border-color: var(--accent); }
body.editor-mode .announce { display: none; }

/* ───────────────────────── Dialogs ───────────────────────── */
dialog.sheet { border: 1px solid var(--line); padding: 0; border-radius: 18px; width: min(520px, calc(100vw - 24px)); box-shadow: var(--shadow-lg); background: var(--surface); color: var(--ink); }
dialog.sheet.wide { width: min(760px, calc(100vw - 24px)); }
dialog.sheet::backdrop { background: rgba(9, 9, 11, .5); backdrop-filter: blur(3px); }
dialog.sheet[open] { animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.sheet-inner { padding: 20px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sheet-head h2 { margin: 0; font-size: 1.12rem; font-weight: 650; }
.sheet-sub { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 20px 0 10px; font-weight: 600; }
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.share-opt { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px; cursor: pointer; align-items: center; color: var(--ink); }
.share-opt:hover { border-color: var(--line-strong); background: var(--surface-2); }
.share-opt .i { grid-row: span 2; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); }
.share-opt b { font-size: .88rem; font-weight: 600; }
.share-opt small { color: var(--muted); font-size: .75rem; }
.share-link { display: flex; gap: 16px; align-items: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.share-qr { width: 108px; flex: none; background: #fff; border-radius: 8px; padding: 4px; }
.share-qr svg { width: 100%; height: auto; }
.share-link-main { flex: 1; min-width: 0; }
.share-link-main .field { margin-bottom: 10px; }
.share-publish { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.share-publish p { margin: 0 0 12px; font-size: .9rem; color: var(--ink-2); }

/* ───────────────────────── Public card page ───────────────────────── */
.shared { max-width: 1040px; margin: 0 auto; padding: 32px 20px 56px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.shared-card { position: sticky; top: calc(var(--topbar-h) + 20px); }
.shared-card canvas { width: 100%; height: auto; box-shadow: var(--shadow-lg); border-radius: 6px; }
.shared-info h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 8px 0 18px; font-weight: 700; letter-spacing: -0.04em; }
.facts { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 12px; }
.facts li { display: flex; gap: 12px; align-items: flex-start; }
.facts .i { width: 38px; height: 38px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; flex: none; color: var(--ink-2); }
.facts b { display: block; font-weight: 600; }
.facts span { color: var(--muted); font-size: .9rem; }
.countdown { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: -4px 0 20px; max-width: 320px; }
.countdown div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; }
.countdown b { display: block; font-size: 1.5rem; line-height: 1.1; font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.countdown span { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.countdown .today { grid-column: 1 / -1; }
.rsvp-form { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-top: 20px; box-shadow: var(--shadow); }
.rsvp-form h2 { margin: 0 0 14px; font-size: 1.05rem; font-weight: 650; }
.rsvp-done { margin-top: 20px; background: var(--ok-soft); color: var(--ok); border-radius: 14px; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.rsvp-done b { display: inline-flex; gap: 8px; align-items: center; }
.made-with { color: var(--faint); font-size: .8rem; margin-top: 24px; display: flex; gap: 6px; align-items: center; }
.made-with .logo-mark { width: 16px; height: 16px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.shared-visiting { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }

/* ───────────────────────── Admin ───────────────────────── */
.admin { padding-top: 24px; padding-bottom: 56px; }
.admin-tabs { margin-bottom: 22px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 14px 0; color: var(--muted); font-size: .86rem; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; margin: 16px 0 0; font-size: .88rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.back-link { display: inline-flex; gap: 6px; align-items: center; margin-bottom: 14px; text-decoration: none; color: var(--muted); font-size: .88rem; }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.chart { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; position: relative; }
.chart figcaption { font-weight: 600; font-size: .88rem; margin-bottom: 8px; }
.chart svg { width: 100%; height: auto; }
.chart .bar path { fill: var(--accent); }
.chart .bar.hot path { fill: var(--accent-ink); }
.chart .tick line { stroke: var(--line); stroke-width: 1; }
.chart .tick text, .chart .xl { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart-tip { position: absolute; background: var(--ink); color: var(--bg); font-size: .76rem; padding: 5px 9px; border-radius: 8px; pointer-events: none; white-space: nowrap; }
.checklist { list-style: none; padding: 0; display: grid; gap: 8px; max-width: 760px; }
.checklist li { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; align-items: flex-start; }
.checklist li.ok > .ic { color: var(--ok); }
.checklist li.todo > .ic { color: var(--warn); }
.checklist small { display: block; color: var(--muted); }

/* ───────────────────────── Misc ───────────────────────── */
#toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 16px);
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: .88rem; font-weight: 500;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 100; max-width: calc(100vw - 32px); text-align: center; box-shadow: var(--shadow-lg);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.spinner { width: 22px; height: 22px; border: 2px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: spin .7s linear infinite; margin: 64px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ───────────────────────── Responsive ───────────────────────── */
@media (max-width: 980px) {
  .demo { grid-template-columns: 1fr; }
  .demo-side { border-right: 0; border-bottom: 1px solid var(--line); }
  .bento .b-lg, .bento .b-md, .bento .b-half { grid-column: span 6; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .ai-run { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .editor { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .ed-stage { max-height: 52vh; max-height: 52dvh; }
  .ed-canvas-wrap { padding: 14px; }
  .ed-panel { border-left: 0; border-top: 1px solid var(--line); }
  .ed-bar .btn-label { display: none; }
  .shared, .shared-visiting { grid-template-columns: 1fr; gap: 24px; }
  .shared-card { position: static; }
  .console { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-content: start; }
  .side { position: sticky; top: var(--topbar-h); height: auto; z-index: 10; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line);
    display: flex; flex-direction: row; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .side::-webkit-scrollbar { display: none; }
  .side-user, .side-label, .side-foot { display: none; }
  .side-nav { display: contents; }
  .side-nav a { flex: none; white-space: nowrap; padding: 7px 11px; font-size: .86rem; }
  .console-main { padding: 18px 16px 48px; }
  .steps { grid-template-columns: 1fr; }
  .pricing { grid-template-columns: minmax(0, 420px); }
}
@media (max-width: 560px) {
  .section { padding-top: 64px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .grid-wide { grid-template-columns: 1fr !important; }
  .tname { font-size: .86rem; }
  .card-actions .btn-small { padding: 0 9px; }
  .card-actions [data-act=share] .ic { display: none; }
  .demo { margin-top: 40px; }
  .wordmark { font-size: 1rem; }
  .nav a[data-nav="templates"] { display: none; }
  .hero { padding-top: 52px; }
  .fan { height: 300px; }
  .demo-stage { min-height: 320px; padding: 16px; }
  .share-grid { grid-template-columns: 1fr; }
  .share-link { flex-direction: column; align-items: center; }
  dialog.sheet { margin: auto auto 0; border-radius: 18px 18px 0 0; width: 100vw; max-width: 100vw; }
  .sheet-inner { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .kv { grid-template-columns: 1fr; }
  .tile b { font-size: 1.35rem; }
  .footer-inner { grid-template-columns: 1fr; }
  .ai-results { grid-template-columns: 1fr 1fr; }
  .prompt-foot { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
