:root {
  --bg: #0b0c10;
  --bg-2: #101219;
  --panel: #15171f;
  --panel-2: #1d2029;
  --border: #272b37;
  --text: #eceef3;
  --muted: #9aa1b2;
  --accent: #6d5efc;
  --accent-2: #a855f7;
  --accent-hover: #7f72ff;
  --accent-soft: rgba(109, 94, 252, .14);
  --rec: #ef4444;
  --ok: #22c55e;
  --gold: #f5b942;
  --warn-bg: #3a2f12;
  --warn-text: #fcd58a;
  --err-bg: #3b1518;
  --err-text: #fca5a5;
  --info-bg: #17223b;
  --info-text: #a9c3ff;
  --stage: #07080b;
  --shadow: 0 12px 40px rgba(0, 0, 0, .35);
  --radius: 18px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-2: #eef0f6;
  --panel: #ffffff;
  --panel-2: #f1f2f7;
  --border: #e2e5ee;
  --text: #14161c;
  --muted: #5d6473;
  --accent: #5b4cf0;
  --accent-2: #9333ea;
  --accent-hover: #4a3ce0;
  --accent-soft: rgba(91, 76, 240, .10);
  --warn-bg: #fff6e0;
  --warn-text: #7a5300;
  --err-bg: #fdecec;
  --err-text: #9b1c1c;
  --info-bg: #eaf0ff;
  --info-text: #2346a0;
  --stage: #111318;
  --shadow: 0 12px 40px rgba(20, 24, 40, .08);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
button, select, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.grad-text { background: linear-gradient(100deg, var(--accent), var(--accent-2) 60%, #ec4899); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}
.nav .wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -.01em; color: var(--text); text-decoration: none; }
.logo { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: grid; place-items: center; flex: none; }
.logo span { width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 3.5px var(--rec); }
.nav-links { display: flex; gap: 22px; margin-left: 18px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 550; }
.nav-links a:hover { color: var(--text); }
.nav-links a { position: relative; padding: 6px 0; transition: color .15s; }
.nav-links a.active { color: var(--text); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform: scaleX(0); transition: transform .2s ease;
}
.nav-links a.active::after { transform: scaleX(1); }
.mobile-menu a.active { color: var(--accent); }
:root:not([data-theme="light"]) .mobile-menu a.active { color: #b9b2ff; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.plan-pill {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--panel);
  font-size: 13px; font-weight: 650; white-space: nowrap;
}
.plan-pill .pdot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.plan-pill.pro { border-color: transparent; background: linear-gradient(100deg, var(--accent), var(--accent-2)); color: #fff; }
.plan-pill.pro .pdot { background: var(--gold); }
.plan-pill.empty .pdot { background: var(--gold); }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--panel); display: grid; place-items: center; flex: none;
}
.icon-btn:hover { background: var(--panel-2); }
.icon-btn svg { width: 18px; height: 18px; }
:root[data-theme="light"] .moon, :root:not([data-theme="light"]) .sun { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 11px; border: 1px solid var(--border);
  background: var(--panel-2); font-weight: 600; text-decoration: none; color: var(--text);
  white-space: nowrap; transition: transform .12s, background .15s, filter .15s;
}
.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn.primary { background: linear-gradient(100deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; box-shadow: 0 6px 20px rgba(109, 94, 252, .35); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.1); }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--rec); border-color: transparent; color: #fff; }
.btn.big { height: 54px; padding: 0 28px; font-size: 17px; border-radius: 14px; }
.btn.block { width: 100%; }
.btn.small { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn .dot { width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 4px var(--rec); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 64px 0 40px; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 520px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(closest-side at 25% 50%, rgba(109, 94, 252, .30), transparent),
    radial-gradient(closest-side at 75% 40%, rgba(236, 72, 153, .18), transparent);
  filter: blur(10px);
}
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 650;
}
:root:not([data-theme="light"]) .eyebrow { color: #b9b2ff; }
.hero h1 { font-size: clamp(36px, 5.2vw, 60px); line-height: 1.05; letter-spacing: -.035em; margin: 18px 0 16px; font-weight: 800; }
.hero p.lead { font-size: 18px; color: var(--muted); margin: 0 0 28px; max-width: 520px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.trust { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 22px; color: var(--muted); font-size: 13.5px; }
.trust span { display: inline-flex; align-items: center; gap: 6px; }
.trust svg { width: 16px; height: 16px; color: var(--ok); }

.mock {
  position: relative; border-radius: 18px; background: var(--panel); border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35); overflow: hidden; transform: perspective(1200px) rotateY(-6deg) rotateX(3deg);
}
.mock-bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.mock-body { position: relative; aspect-ratio: 16 / 10; padding: 18px; display: grid; grid-template-columns: 30% 1fr; gap: 14px; }
.mock-side, .mock-main { border-radius: 10px; background: var(--panel-2); }
.mock-main { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.mock-line { height: 10px; border-radius: 6px; background: var(--border); }
.mock-chart { flex: 1; border-radius: 8px; background: linear-gradient(180deg, var(--accent-soft), transparent); position: relative; overflow: hidden; }
.mock-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mock-face {
  position: absolute; right: 6%; bottom: 8%; width: 24%; aspect-ratio: 1; border-radius: 50%;
  border: 4px solid #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  background: radial-gradient(circle at 50% 38%, #f3c9a6 0 17%, transparent 18%),
              radial-gradient(ellipse at 50% 92%, #6d5efc 0 38%, transparent 39%),
              linear-gradient(160deg, #2b2f45, #1b1e2c);
}
.mock-rec {
  position: absolute; left: 14px; top: 58px; display: flex; align-items: center; gap: 6px;
  background: rgba(0, 0, 0, .65); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
}
.mock-rec i { width: 8px; height: 8px; border-radius: 50%; background: var(--rec); animation: blink 1s steps(2, start) infinite; }

/* ---------- Sections ---------- */
section.block { padding: 72px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -.025em; margin: 10px 0 10px; line-height: 1.15; }
.section-head p { color: var(--muted); margin: 0; font-size: 16.5px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- Recorder app ---------- */
.app-section { padding: 8px 0 40px; }
.app {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start;
}
.notice {
  grid-column: 1 / -1; display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; border-radius: 12px; font-size: 14px;
}
.notice.error { background: var(--err-bg); color: var(--err-text); }
.notice.warn { background: var(--warn-bg); color: var(--warn-text); }
.notice.info { background: var(--info-bg); color: var(--info-text); }
.notice p { margin: 0; flex: 1; }
.notice button { background: none; border: 0; padding: 0 4px; font-size: 18px; line-height: 1; opacity: .7; }
.notice button:hover { opacity: 1; }

.stage-card { padding: 14px; }
.stage { position: relative; aspect-ratio: 16 / 9; background: var(--stage); border-radius: 12px; overflow: hidden; }
.placeholder {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  color: #8b92a5; font-size: 14px; padding: 20px;
  background:
    radial-gradient(circle at 30% 20%, rgba(109, 94, 252, .20), transparent 55%),
    radial-gradient(circle at 80% 90%, rgba(236, 72, 153, .10), transparent 50%);
}
.placeholder svg { width: 44px; height: 44px; opacity: .6; margin-bottom: 8px; }
.placeholder strong { display: block; color: #d6d9e2; font-size: 16px; font-weight: 600; }
.bubble {
  position: absolute; aspect-ratio: 1; object-fit: cover; background: #222;
  border: 3px solid rgba(255, 255, 255, .92); box-shadow: 0 8px 22px rgba(0, 0, 0, .4);
  transition: width .2s, border-radius .2s;
}
.bubble.mirror { transform: scaleX(-1); }
.bubble.shape-circle { border-radius: 50%; }
.bubble.shape-rounded { border-radius: 18%; }
.bubble.pos-br { right: 3%; bottom: 5%; }
.bubble.pos-bl { left: 3%; bottom: 5%; }
.bubble.pos-tr { right: 3%; top: 5%; }
.bubble.pos-tl { left: 3%; top: 5%; }
.cam-status {
  position: absolute; left: 12px; bottom: 12px; font-size: 12px; color: #c9cdd8;
  background: rgba(0, 0, 0, .5); padding: 4px 10px; border-radius: 999px; border: 0; font: inherit; font-size: 12px;
}
.cam-status:disabled { cursor: default; opacity: 1; }
.cam-status.clickable { cursor: pointer; color: #fff; background: rgba(109, 94, 252, .85); padding: 7px 14px; font-size: 13px; font-weight: 600; }
.cam-status.clickable:hover { background: rgba(109, 94, 252, 1); }
#liveCanvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: none; }
body[data-state="countdown"] #liveCanvas,
body[data-state="recording"] #liveCanvas,
body[data-state="paused"] #liveCanvas,
body[data-state="stopping"] #liveCanvas { display: block; }
body[data-state="countdown"] .pre,
body[data-state="recording"] .pre,
body[data-state="paused"] .pre,
body[data-state="stopping"] .pre { display: none; }

.countdown {
  position: absolute; inset: 0; display: none; place-items: center;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: clamp(64px, 14vw, 140px); font-weight: 800;
}
body[data-state="countdown"] .countdown { display: grid; }
.countdown span { animation: pop 1s ease-out infinite; }
@keyframes pop { 0% { transform: scale(1.35); opacity: 0; } 25% { opacity: 1; } 100% { transform: scale(.9); opacity: .85; } }

.rec-badge {
  position: absolute; top: 12px; left: 12px; display: none; align-items: center; gap: 8px;
  background: rgba(0, 0, 0, .6); color: #fff; padding: 5px 12px 5px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums;
}
body[data-state="recording"] .rec-badge,
body[data-state="paused"] .rec-badge { display: flex; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rec); animation: blink 1s steps(2, start) infinite; }
body[data-state="paused"] .rec-dot { animation: none; background: var(--gold); }
@keyframes blink { to { visibility: hidden; } }

.controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 4px 2px; }
.start-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hint { color: var(--muted); font-size: 13px; }
.rec-controls { display: none; align-items: center; gap: 10px; flex-wrap: wrap; }
body[data-state="countdown"] .rec-controls,
body[data-state="recording"] .rec-controls,
body[data-state="paused"] .rec-controls,
body[data-state="stopping"] .rec-controls { display: flex; }
body[data-state="countdown"] .start-wrap,
body[data-state="recording"] .start-wrap,
body[data-state="paused"] .start-wrap,
body[data-state="stopping"] .start-wrap { display: none; }
.timer { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 70px; }
.timer small { font-size: 14px; color: var(--muted); font-weight: 600; }
kbd {
  font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  padding: 3px 6px; border-radius: 5px; border: 1px solid var(--border); border-bottom-width: 2px;
  background: var(--panel-2); color: var(--text);
}
.shortcuts { display: flex; gap: 14px; color: var(--muted); font-size: 13px; align-items: center; flex-wrap: wrap; }

.result-card { padding: 14px; display: none; }
body[data-state="done"] .result-card { display: block; }
body[data-state="done"] .stage-card { display: none; }
.result-card video { width: 100%; border-radius: 12px; background: #000; display: block; max-height: 70vh; }
.result-meta { display: flex; gap: 22px; flex-wrap: wrap; padding: 14px 4px 4px; }
.result-meta div { display: flex; flex-direction: column; }
.result-meta small { color: var(--muted); font-size: 12px; }
.result-meta b { font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; padding: 12px 4px 2px; }
.result-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 12px; font-weight: 650; }
.result-head .ok-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
.upsell {
  margin: 12px 4px 2px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px;
}

/* Settings panel */
.settings { padding: 16px; }
.tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; margin: 14px 0 6px;
  border-radius: 12px; background: var(--panel-2); border: 1px solid var(--border);
}
.tabs button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px;
  border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 13.5px; font-weight: 600;
}
.tabs button svg { width: 16px; height: 16px; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { background: var(--panel); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.tab-panel { padding: 4px 2px 0; }
.tab-panel .row:first-child { margin-top: 12px; }
.settings h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 0 10px; font-weight: 700; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0; }
.field { margin: 12px 0; }
.field > label, .field > .label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
select, .input {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--panel-2);
}
textarea.input { height: auto; padding: 10px 12px; resize: vertical; font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 3px; border-radius: 11px; background: var(--panel-2); border: 1px solid var(--border); }
.seg.grid2 { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
.seg button { border: 0; background: transparent; border-radius: 8px; height: 32px; font-size: 13px; color: var(--muted); font-weight: 550; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.seg button[aria-pressed="true"] { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
:root[data-theme="light"] .seg button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.seg button.locked::after { content: "PRO"; font-size: 9px; font-weight: 800; letter-spacing: .04em; padding: 1px 4px; border-radius: 4px; background: var(--gold); color: #3a2a00; }
.switch {
  appearance: none; -webkit-appearance: none; width: 40px; height: 23px; border-radius: 999px; margin: 0;
  background: var(--border); position: relative; cursor: pointer; flex: none; transition: background .15s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%;
  background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(17px); }
.switch:disabled { opacity: .5; cursor: not-allowed; }
.note { font-size: 12.5px; color: var(--muted); background: var(--panel-2); border-radius: 10px; padding: 9px 11px; margin: 10px 0 0; }
.format { font-size: 13px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--border); }
.format b { font-weight: 650; }
.small-print { font-size: 12px; color: var(--muted); margin-top: 16px; }

/* Usage card */
.usage {
  margin: 0; padding: 14px; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-soft), transparent 80%); border: 1px solid var(--border);
}
.usage-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.usage-title { font-weight: 700; font-size: 14.5px; }
.usage-sub { color: var(--muted); font-size: 13px; margin: 4px 0 10px; }
.meter { display: flex; gap: 6px; margin-bottom: 12px; }
.meter i { flex: 1; height: 7px; border-radius: 4px; background: var(--border); }
.meter i.on { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.badge { font-size: 11px; font-weight: 800; letter-spacing: .04em; padding: 3px 8px; border-radius: 999px; background: var(--panel-2); color: var(--muted); }
.badge.gold { background: var(--gold); color: #3a2a00; }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { padding: 22px; }
.feature .ficon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px;
  background: var(--accent-soft); color: var(--accent);
}
:root:not([data-theme="light"]) .feature .ficon { color: #b9b2ff; }
.feature .ficon svg { width: 22px; height: 22px; }
.feature h4 { margin: 0 0 6px; font-size: 16.5px; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.step { padding: 22px; position: relative; }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 800; margin-bottom: 12px;
}
.step h4 { margin: 0 0 6px; font-size: 16.5px; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: stretch; }
.price-card { padding: 24px 22px; display: flex; flex-direction: column; position: relative; }
.price-card.featured { border: 2px solid transparent; background: linear-gradient(var(--panel), var(--panel)) padding-box, linear-gradient(135deg, var(--accent), var(--accent-2), #ec4899) border-box; }
.price-card .tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); }
.price-card h4 { margin: 0; font-size: 18px; }
.price-card .desc { color: var(--muted); font-size: 14px; margin: 4px 0 18px; min-height: 42px; }
.price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.price b { font-size: 42px; letter-spacing: -.03em; font-weight: 800; }
.price > span { color: var(--muted); font-size: 14px; }
.price-note { font-size: 12.5px; color: var(--muted); margin-bottom: 18px; min-height: 19px; }
.price-card ul { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 9px; font-size: 14.5px; flex: 1; }
.price-card li { display: flex; gap: 9px; align-items: flex-start; }
.price-card li svg { width: 17px; height: 17px; flex: none; margin-top: 2px; color: var(--ok); }
.price-card li.no { color: var(--muted); }
.price-card li.no svg { color: var(--muted); }
.current-tag { font-size: 12.5px; color: var(--ok); font-weight: 700; text-align: center; margin-top: 8px; min-height: 18px; }
.pay-methods { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 22px; color: var(--muted); font-size: 13px; align-items: center; }
.pay-methods .chip { padding: 5px 11px; border: 1px solid var(--border); border-radius: 999px; background: var(--panel); font-weight: 600; color: var(--text); }
.pay-methods .chip.upi { border-color: var(--accent); color: var(--accent); }
:root:not([data-theme="light"]) .pay-methods .chip.upi { color: #b9b2ff; }

/* ---------- Extension ---------- */
.ext-card { padding: 34px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 34px; align-items: center; overflow: hidden; position: relative; }
.ext-card h2 { font-size: clamp(26px, 3.2vw, 36px); letter-spacing: -.025em; margin: 10px 0; line-height: 1.15; }
.ext-card p { color: var(--muted); margin: 0 0 20px; }
.ext-steps { margin: 16px 0 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; }
.ext-steps li { margin: 4px 0; }
.ext-visual { position: relative; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--border); padding: 14px; }
.ext-toolbar { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--panel); border: 1px solid var(--border); }
.ext-toolbar .url { flex: 1; height: 26px; border-radius: 999px; background: var(--panel-2); }
.ext-toolbar .ext-icon { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: grid; place-items: center; box-shadow: 0 0 0 4px var(--accent-soft); }
.ext-toolbar .ext-icon span { width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 3px var(--rec); }
.ext-pop { margin: 12px 0 0 auto; width: 78%; border-radius: 12px; background: var(--panel); border: 1px solid var(--border); padding: 14px; box-shadow: var(--shadow); }
.ext-pop .mock-line { margin: 8px 0; }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { padding: 4px 18px; border-radius: 14px; background: var(--panel); border: 1px solid var(--border); }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 20px; line-height: 1; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 16px; color: var(--muted); }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--border); padding: 32px 0 40px; margin-top: 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; gap: 20px; justify-content: space-between; flex-wrap: wrap; align-items: center; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }

/* ---------- Dialogs ---------- */
dialog {
  border: 1px solid var(--border); border-radius: 22px; padding: 0; background: var(--panel); color: var(--text);
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); box-shadow: 0 30px 90px rgba(0, 0, 0, .5);
}
dialog::backdrop { background: rgba(5, 6, 10, .6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
dialog[open] { animation: rise .2s ease-out; }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }
.dlg { padding: 26px; position: relative; }
.dlg h3 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.02em; padding-right: 30px; }
.dlg .sub { color: var(--muted); margin: 0 0 18px; font-size: 14.5px; }
.dlg-close { position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--panel-2); font-size: 20px; line-height: 1; color: var(--muted); }
.dlg-close:hover { color: var(--text); }
.plan-options { display: grid; gap: 10px; }
.plan-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left;
  padding: 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--panel-2);
}
.plan-opt:hover:not(:disabled) { border-color: var(--accent); }
.plan-opt.best { border: 2px solid var(--accent); }
.plan-opt b { display: block; font-size: 16px; }
.plan-opt small { color: var(--muted); font-size: 13px; }
.plan-opt .amt { font-size: 22px; font-weight: 800; white-space: nowrap; }
.wait-box { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--panel-2); font-size: 14px; color: var(--muted); display: flex; gap: 10px; align-items: center; }
.wait-box svg { width: 20px; height: 20px; flex: none; }
.wait-box b { color: var(--text); font-variant-numeric: tabular-nums; }
.dlg-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; font-size: 13px; color: var(--muted); }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
:root:not([data-theme="light"]) .linkish { color: #b9b2ff; }
.form-row { display: flex; gap: 8px; margin-top: 8px; }
.form-row .input { flex: 1; min-width: 0; }
.stack { display: grid; gap: 8px; margin-top: 8px; }
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.success-icon { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: rgba(34, 197, 94, .15); color: var(--ok); margin-bottom: 14px; }
.success-icon svg { width: 30px; height: 30px; }
.kv { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.kv span { color: var(--muted); }
details.lost summary { cursor: pointer; color: var(--muted); font-size: 13.5px; margin-top: 4px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 100;
  max-width: min(560px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 12px;
  background: #1c1f2a; color: #fff; box-shadow: 0 12px 40px rgba(0, 0, 0, .4); font-size: 14px;
  border-left: 4px solid var(--accent);
}
.toast.error { border-left-color: var(--rec); }
.toast.warn { border-left-color: var(--gold); }
.toast.ok { border-left-color: var(--ok); }

.offscreen { position: fixed; left: 0; top: 0; width: 2px; height: 2px; opacity: 0; pointer-events: none; overflow: hidden; z-index: -1; }

/* ---------- Legal pages ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: 40px 20px 20px; }
.legal h1 { font-size: 34px; letter-spacing: -.02em; margin: 0 0 6px; }
.legal .updated { color: var(--muted); margin: 0 0 26px; }
.legal h2 { font-size: 19px; margin: 28px 0 8px; }
.legal p, .legal li { color: var(--muted); }
.legal strong { color: var(--text); }

/* ---------- Extension recorder page ---------- */
body.ext .app-section { padding-top: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .mock { transform: none; max-width: 620px; }
  .features, .steps { grid-template-columns: 1fr 1fr; }
  .pricing { grid-template-columns: 1fr 1fr; }
  .ext-card { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .nav-links { display: none; }
}
@media (max-width: 640px) {
  .pricing { grid-template-columns: 1fr; }
  .wrap { padding: 0 16px; }
  .hero { padding: 40px 0 24px; }
  section.block { padding: 52px 0; }
  .features, .steps { grid-template-columns: 1fr; }
  .ext-card { padding: 22px; }
  .btn.big { width: 100%; }
  .cta-row .btn { width: 100%; }
  .plan-pill .pl-long { display: none; }
  .dlg { padding: 22px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Compact settings rows */
.field.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shape-ic { display: block; width: 14px; height: 14px; border: 2px solid currentColor; border-radius: 4px; }
.shape-ic.circle { border-radius: 50%; }
.settings .field { margin: 10px 0; }
.settings .row { margin: 8px 0; }

/* Guide (SEO) pages */
.guide-hero { padding-bottom: 8px; }
.guide-hero .wrap { grid-template-columns: 1fr; max-width: 860px; text-align: center; }
.guide-hero p.lead { margin-left: auto; margin-right: auto; max-width: 640px; }
.guide-hero .cta-row { justify-content: center; }
.guide-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }
.guide-card { padding: 26px; display: flex; flex-direction: column; }
.guide-card h2 { margin: 0 0 14px; font-size: 22px; letter-spacing: -.02em; }
.guide-steps { margin: 0; padding: 0; list-style: none; counter-reset: gs; display: grid; gap: 12px; }
.guide-steps li { counter-increment: gs; display: flex; gap: 12px; color: var(--muted); }
.guide-steps li::before {
  content: counter(gs); flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 800; font-size: 13px;
}
.guide-points { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 10px; flex: 1; }
.guide-points li { display: flex; gap: 9px; }
.guide-points svg { width: 17px; height: 17px; flex: none; margin-top: 3px; color: var(--ok); }
.related { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin-top: 28px; color: var(--muted); font-size: 14px; }
@media (max-width: 800px) { .guide-grid { grid-template-columns: 1fr; } }

/* ---------- Polish ---------- */
.menu-btn { display: none; }
.mobile-menu {
  display: grid; padding: 8px 16px 16px; border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 96%, transparent);
}
.mobile-menu a { padding: 13px 4px; color: var(--text); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--border); }
.mobile-menu a:last-child { border-bottom: 0; }

.usecases { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 18px; font-size: 13px; color: var(--muted); }
.usecases a {
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel);
  color: var(--text); text-decoration: none; font-weight: 600; transition: border-color .15s, color .15s;
}
.usecases a:hover { border-color: var(--accent); color: var(--accent); }

.mobile-card { grid-column: 1 / -1; padding: 28px 22px; text-align: center; }
.mobile-card h3 { margin: 6px 0 8px; font-size: 21px; letter-spacing: -.02em; }
.mobile-card p { margin: 0 auto 18px; color: var(--muted); max-width: 420px; }
.mobile-ic { width: 58px; height: 58px; margin: 0 auto 8px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
:root:not([data-theme="light"]) .mobile-ic { color: #b9b2ff; }
.mobile-ic svg { width: 30px; height: 30px; }
.mobile-actions { display: grid; gap: 10px; max-width: 320px; margin: 0 auto; }
body.is-mobile .app > div:not(.mobile-card):not(.notice),
body.is-mobile .app > aside { display: none; }

.site-footer { padding: 48px 0 28px; }
.site-footer .wrap { display: grid; }
.footer-grid { grid-template-columns: 1.6fr 1fr 1.3fr 1fr; gap: 28px; align-items: start !important; }
.footer-brand p { margin: 12px 0 10px; max-width: 300px; }
.footer-brand a:not(.brand) { color: var(--accent); }
:root:not([data-theme="light"]) .footer-brand a:not(.brand) { color: #b9b2ff; }
.site-footer nav { display: flex; flex-direction: column; gap: 9px; width: auto; order: 0; font-size: 14px; }
.site-footer h4 { margin: 0 0 4px; color: var(--text); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.footer-bottom { display: flex !important; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13px; }

.notfound { padding: 90px 0 40px; text-align: center; }
.notfound .nf-code { font-size: clamp(80px, 16vw, 150px); font-weight: 800; letter-spacing: -.05em; line-height: 1; background: linear-gradient(100deg, var(--accent), var(--accent-2) 60%, #ec4899); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notfound h1 { font-size: clamp(26px, 4vw, 38px); letter-spacing: -.02em; margin: 14px 0 8px; }
.notfound .lead { color: var(--muted); margin: 0 0 26px; }
.notfound .cta-row { justify-content: center; }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .menu-btn { display: grid; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .plan-pill { padding: 0 11px; }
  .hero h1 { margin-top: 14px; }
}
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
@media (max-width: 380px) { .nav .brand [data-app-name] { display: none; } }

/* ---------- Language menu & currency ---------- */
body[data-cur="INR"] [data-cur-only="USD"], body[data-cur="USD"] [data-cur-only="INR"] { display: none !important; }
.lang-wrap { position: relative; }
.lang-btn { width: auto; padding: 0 10px; gap: 6px; display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 700; letter-spacing: .03em; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 200px; padding: 6px;
  display: grid; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
  animation: rise .15s ease-out;
}
.lang-menu button {
  text-align: left; border: 0; background: transparent; padding: 9px 12px; border-radius: 9px; font-size: 14px; font-weight: 550;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.lang-menu button:hover { background: var(--panel-2); }
.lang-menu button[aria-checked="true"] { color: var(--accent); }
:root:not([data-theme="light"]) .lang-menu button[aria-checked="true"] { color: #b9b2ff; }
.lang-menu button[aria-checked="true"]::after { content: "✓"; font-weight: 800; }
.cur-toggle { display: inline-flex; align-items: center; gap: 4px; margin-top: 16px; padding: 4px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel); font-size: 13px; color: var(--muted); }
.cur-toggle > span { padding: 0 8px 0 10px; }
.cur-toggle button { border: 0; background: transparent; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 13px; color: var(--muted); }
.cur-toggle button[aria-pressed="true"] { background: linear-gradient(100deg, var(--accent), var(--accent-2)); color: #fff; }
@media (max-width: 640px) {
  .lang-btn span { display: none; }
  .lang-btn { padding: 0; width: 38px; justify-content: center; }
}

/* Hero preview comes alive */
.mock-face { animation: float 5s ease-in-out infinite; }
.mock-chart path { stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 2.4s .4s ease-out forwards; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
/* Japanese: break lines between phrases, not inside words */
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3, :lang(ja) h4 { word-break: auto-phrase; }
