:root {
  --bg: #f4efe6;
  --paper: #fbf8f1;
  --paper-deep: #eee7db;
  --ink: #211e1a;
  --ink-soft: #48423a;
  --muted: #776e62;
  --line: #ded4c6;
  --accent: #be5b3a;
  --accent-dark: #99442a;
  --accent-soft: #f2dacc;
  --gold: #c29a58;
  --olive: #697257;
  --olive-soft: #e0e3d3;
  --dark: #231f1b;
  --dark-2: #302a24;
  --dark-3: #3d362e;
  --cream: #f7eee1;
  --radius: 16px;
  --shadow: 0 18px 50px rgba(42, 33, 24, 0.14);
  --display: Georgia, "Times New Roman", "Noto Serif", serif;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, canvas { max-width: 100%; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 400; letter-spacing: -0.015em; }
p { margin: 0; }

.wrap { width: min(1240px, calc(100% - 48px)); margin: 0 auto; }
.mobile-only { display: none; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: 0.13em; text-transform: uppercase;
  font-weight: 700; color: var(--accent);
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.muted { color: var(--muted); }
.lede { color: var(--ink-soft); font-size: 17px; }

/* ---------------- top bar ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(244, 239, 230, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(222, 212, 198, 0.7);
}
.topbar-inner { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; color: var(--ink); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--accent);
  display: grid; place-items: center; color: var(--cream); flex: none;
}
.brand-mark svg { width: 21px; height: 21px; }
.brand-text { text-align: left; line-height: 1; }
.brand-text strong { display: block; font-family: var(--display); font-size: 17px; letter-spacing: 0.06em; }
.brand-text span { font-size: 8.5px; letter-spacing: 0.22em; color: var(--muted); }
.nav { display: flex; gap: 4px; margin-left: 18px; }
.nav a {
  color: var(--ink-soft); text-decoration: none; font-size: 13.5px;
  padding: 8px 12px; border-radius: 9px;
}
.nav a:hover { background: var(--paper); color: var(--ink); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; border-radius: 999px;
  background: #ebe5d9; color: var(--ink-soft); font-size: 11.5px; padding: 7px 12px;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--olive); }
.btn {
  border: 1px solid transparent; border-radius: 10px; padding: 11px 18px;
  font-size: 14px; font-weight: 600; color: var(--ink); background: var(--paper);
  transition: transform 0.12s ease, background 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-dark { background: var(--ink); color: var(--cream); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-light { background: var(--cream); color: var(--ink); }
.btn-sm { padding: 8px 12px; font-size: 12.5px; border-radius: 9px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ---------------- landing hero ---------------- */
.hero { padding: 54px 0 34px; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 54px; align-items: center; }
.hero h1 { font-size: clamp(42px, 6vw, 78px); line-height: 0.98; margin: 16px 0 0; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lede { margin-top: 20px; max-width: 540px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.hero-meta { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 28px; color: var(--muted); font-size: 12.5px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta i { width: 7px; height: 7px; border-radius: 50%; background: var(--olive); }
.hero-meta span:nth-child(2) i { background: var(--gold); }
.hero-meta span:nth-child(3) i { background: var(--accent); }

/* phone mockup with draggable before/after */
.phone-wrap { display: flex; justify-content: center; }
.phone {
  width: min(390px, 92%);
  background: #17130f; border-radius: 44px; padding: 11px;
  box-shadow: 0 40px 80px rgba(45, 33, 22, 0.28), inset 0 0 0 1px #3a332b;
  transform: rotate(-1.5deg);
}
.phone-screen {
  position: relative; border-radius: 34px; overflow: hidden; background: #0d0b09;
  aspect-ratio: 9 / 17.4;
}
.phone-screen::before {
  content: ""; position: absolute; z-index: 4; top: 9px; left: 50%; transform: translateX(-50%);
  width: 96px; height: 22px; border-radius: 12px; background: #17130f;
}
.phone-ui { position: absolute; inset: 0; display: flex; flex-direction: column; }
.phone-top { position: relative; z-index: 5; padding: 42px 16px 10px; display: flex; justify-content: space-between; color: #f4e9d7; font-size: 10px; letter-spacing: 0.08em; }
.phone-photo { position: relative; flex: 1; margin: 4px 12px; border-radius: 12px; overflow: hidden; }
.phone-photo img, .phone-photo .after-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.phone-photo .after-img { clip-path: inset(0 0 0 var(--split, 52%)); }
.phone-photo .divider {
  position: absolute; top: 0; bottom: 0; left: var(--split, 52%); width: 2px;
  background: rgba(255, 250, 240, 0.85); z-index: 2;
}
.phone-photo .divider::after {
  content: "↔"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 30px; height: 30px; border-radius: 50%; background: #fff7ea; color: #3b332a;
  display: grid; place-items: center; font-size: 13px; box-shadow: 0 4px 10px rgba(0,0,0,.2);
}
.phone-photo input[type="range"] {
  position: absolute; inset: auto 0 0 0; z-index: 3; width: 100%; height: 34px;
  opacity: 0; cursor: ew-resize;
}
.phone-tags { position: absolute; z-index: 3; left: 10px; bottom: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.phone-tags span {
  background: rgba(251, 247, 239, 0.92); border-radius: 8px; padding: 5px 8px;
  font-size: 9.5px; color: #2c2620; display: inline-flex; align-items: center; gap: 5px;
}
.phone-tags i { width: 5px; height: 5px; border-radius: 50%; background: var(--olive); }
.phone-tags span:nth-child(2) i { background: var(--accent); }
.phone-bottom { padding: 10px 14px 18px; }
.phone-slider-row { display: flex; align-items: center; gap: 8px; color: #cbbda8; font-size: 9px; }
.phone-slider { flex: 1; height: 3px; border-radius: 3px; background: #4a4137; position: relative; }
.phone-slider::after { content: ""; position: absolute; inset: 0 42% 0 0; background: var(--gold); border-radius: 3px; }
.phone-chips { display: flex; gap: 6px; margin-top: 12px; overflow: hidden; }
.phone-chips span { border-radius: 7px; padding: 5px 8px; background: #2c2620; color: #bfb09b; font-size: 8.5px; white-space: nowrap; }
.phone-chips span:first-child { background: var(--accent); color: #fff; }
.phone-caption { text-align: center; color: var(--muted); font-size: 11.5px; margin-top: 18px; }

/* ---------------- stat strip ---------------- */
.stats {
  margin-top: 26px; background: var(--paper); border: 1px solid var(--line);
  border-radius: 14px; padding: 18px 26px; display: flex; align-items: center; gap: 34px; flex-wrap: wrap;
}
.stat strong { display: block; font-family: var(--display); font-size: 30px; font-weight: 400; line-height: 1; }
.stat span { font-size: 11.5px; color: var(--muted); }
.stat-sep { width: 1px; height: 30px; background: var(--line); }
.stats .note { margin-left: auto; font-size: 10.5px; color: var(--muted); max-width: 300px; }

/* ---------------- sections ---------------- */
section.block { padding: 88px 0 0; }
.section-head { max-width: 760px; }
.section-head h2 { font-size: clamp(32px, 4vw, 48px); line-height: 1.04; margin-top: 12px; }
.section-head p { margin-top: 14px; color: var(--ink-soft); font-size: 16px; max-width: 640px; }
.section-head.center { margin: 0 auto; text-align: center; }
.section-head.center p { margin-left: auto; margin-right: auto; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 32px; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 15px;
  padding: 22px; transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card .icon {
  width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft);
  display: grid; place-items: center; color: var(--accent-dark); margin-bottom: 13px;
}
.card .icon.olive { background: var(--olive-soft); color: var(--olive); }
.card .icon svg { width: 20px; height: 20px; }
.card h3 { font-size: 20px; margin-bottom: 6px; }
.card p { color: var(--muted); font-size: 13.5px; }
.card .badge {
  display: inline-block; margin-top: 12px; font-size: 9.5px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent); font-weight: 700;
}

/* assistant dark panel */
.assistant {
  margin-top: 32px; background: var(--dark); color: var(--cream);
  border-radius: 20px; padding: 36px; display: grid; grid-template-columns: 1fr 1fr; gap: 36px;
}
.assistant h2 { font-size: clamp(30px, 3.5vw, 44px); line-height: 1.03; margin-top: 10px; }
.assistant p { color: #bcb0a0; margin-top: 12px; font-size: 14.5px; max-width: 440px; }
.assistant .steps { display: grid; gap: 9px; }
.assistant .step { display: flex; gap: 12px; align-items: flex-start; }
.assistant .step b {
  flex: none; width: 28px; height: 28px; border-radius: 8px; background: #3a322a;
  color: var(--gold); font-size: 10px; font-weight: 600; display: grid; place-items: center;
}
.assistant .step strong { display: block; font-size: 13.5px; color: var(--cream); font-weight: 600; }
.assistant .step span { font-size: 11.5px; color: #a0917d; }

/* research */
.research-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 30px; }
.research-card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; }
.research-card.dark { background: var(--dark); border-color: var(--dark); color: var(--cream); }
.research-top { display: flex; justify-content: space-between; align-items: center; font-size: 10px; color: var(--muted); }
.research-card.dark .research-top { color: #ad9f8b; }
.research-top b { color: var(--accent); font-weight: 700; }
.research-card.dark .research-top b { color: var(--gold); }
.research-card h3 { font-size: 26px; margin: 10px 0 6px; }
.research-card .strength { font-size: 12.5px; color: var(--ink-soft); }
.research-card.dark .strength { color: #cdbfab; }
.research-card .weak-label { margin-top: 14px; font-size: 9.5px; letter-spacing: 0.1em; color: var(--accent); font-weight: 700; }
.research-card.dark .weak-label { color: var(--gold); }
.research-card .weak { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.research-card.dark .weak { color: #b6a993; }
.research-card .answer { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--olive); }
.research-card.dark .answer { border-color: #4a4137; color: var(--cream); }
.sources { margin-top: 16px; font-size: 11px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

/* unique split */
.unique { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 52px; margin-top: 34px; align-items: start; }
.unique h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.03; margin-top: 10px; }
.unique p { margin-top: 14px; color: var(--muted); font-size: 14.5px; }
.unique-list { display: grid; gap: 14px; }
.unique-item { display: flex; gap: 13px; }
.unique-item b {
  flex: none; width: 32px; height: 32px; border-radius: 9px; background: var(--accent-soft);
  color: var(--accent-dark); font-size: 10px; display: grid; place-items: center;
}
.unique-item:nth-child(even) b { background: var(--olive-soft); color: var(--olive); }
.unique-item strong { display: block; font-size: 15px; }
.unique-item span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* PWA section */
.pwa-panel {
  margin-top: 30px; background: var(--dark); border-radius: 22px; padding: 40px;
  color: var(--cream); display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px;
}
.pwa-panel h2 { font-size: clamp(30px, 3.8vw, 46px); line-height: 1.03; margin-top: 10px; }
.pwa-panel p { color: #bcb0a0; margin-top: 12px; font-size: 14.5px; max-width: 500px; }
.pwa-steps { counter-reset: s; display: grid; gap: 12px; margin-top: 22px; }
.pwa-step { display: flex; gap: 12px; font-size: 13px; color: #d6c9b7; }
.pwa-step b {
  counter-increment: s; flex: none; width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid #5a4f42; display: grid; place-items: center; font-size: 10px; color: var(--gold);
}
.pwa-step b::before { content: counter(s, decimal-leading-zero); }
.pwa-install {
  background: #2d2721; border: 1px solid #463d33; border-radius: 16px; padding: 22px;
  display: flex; flex-direction: column; gap: 12px; align-self: start;
}
.pwa-install h3 { font-size: 21px; }
.pwa-install p { font-size: 12.5px; color: #b3a591; margin: 0; }
.pwa-url {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 11.5px;
  background: #1b1713; border: 1px solid #3f362d; border-radius: 9px; padding: 10px 12px;
  color: var(--gold); word-break: break-all;
}
.install-state { font-size: 11px; color: #9c8d79; display: flex; align-items: center; gap: 7px; }
.install-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--olive); }
.pwa-features { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.pwa-features span { font-size: 10px; border: 1px solid #4c4238; border-radius: 999px; padding: 5px 9px; color: #c2b4a0; }

/* CTA + footer */
.cta {
  margin-top: 30px; background: var(--dark); color: var(--cream); border-radius: 20px;
  padding: 40px; display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap;
}
.cta h2 { font-size: clamp(30px, 4vw, 48px); line-height: 1.02; }
.cta p { color: #b9ac99; margin-top: 10px; font-size: 14px; max-width: 560px; }
footer { padding: 44px 0 60px; }
.footer-grid { display: flex; gap: 56px; justify-content: space-between; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 26px; }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col strong { display: block; font-size: 11px; margin-bottom: 7px; }
.footer-col a, .footer-col span { display: block; font-size: 12px; color: var(--muted); text-decoration: none; margin: 3px 0; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 26px; font-size: 10.5px; color: var(--muted); }

/* ---------------- studio ---------------- */
.studio-view { display: none; min-height: 100vh; background: var(--bg); }
body.in-studio .studio-view { display: block; }
body.in-studio #landing-view { display: none; }
body.in-studio > .topbar { display: none; }
.studio-head {
  position: sticky; top: 0; z-index: 50; background: rgba(244, 239, 230, 0.94);
  backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.studio-head-inner { display: flex; align-items: center; gap: 14px; height: 64px; }
.studio-head .file-name { font-size: 12px; color: var(--muted); max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: none; }
.studio-tabs { display: flex; gap: 3px; margin-left: 8px; }
.studio-tabs button {
  border: 0; background: transparent; color: var(--muted); font-size: 12.5px;
  padding: 7px 12px; border-radius: 8px;
}
.studio-tabs button.active { background: var(--dark); color: var(--cream); }
.studio-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.studio-body { display: grid; grid-template-columns: minmax(0, 1fr) 372px; min-height: calc(100vh - 64px); }
.stage { background: #26211c; display: flex; flex-direction: column; min-width: 0; }
.stage-toolbar {
  background: #2c2620; color: #c0b3a1; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; font-size: 10.5px; letter-spacing: 0.04em; flex-wrap: wrap;
}
.stage-toolbar .grow { flex: 1; }
.tool-btn {
  background: #3a322a; border: 1px solid #50463a; color: var(--cream);
  border-radius: 7px; padding: 6px 10px; font-size: 11px;
}
.tool-btn.on { background: var(--cream); color: var(--dark); border-color: var(--cream); }
.tool-btn.gold { background: var(--gold); color: var(--dark); border-color: var(--gold); font-weight: 600; }
.canvas-area { flex: 1; padding: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 340px; }
.canvas-frame { position: relative; max-width: 100%; max-height: calc(100vh - 240px); box-shadow: 0 24px 60px rgba(0,0,0,0.4); background: #151210; line-height: 0; }
.canvas-frame canvas { display: block; max-width: 100%; max-height: calc(100vh - 240px); width: auto; height: auto; }
.canvas-frame .layer-after { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--split, 56%)); }
.canvas-labels {
  position: absolute; inset: 0; pointer-events: none; z-index: 3;
  font-size: 9.5px; letter-spacing: 0.12em; color: rgba(255, 250, 240, 0.92);
}
.canvas-labels span:first-child { position: absolute; top: 8px; left: 10px; }
.canvas-labels span:last-child { position: absolute; top: 8px; right: 10px; }
.canvas-frame .split-line {
  position: absolute; top: 0; bottom: 0; left: var(--split, 56%); width: 1px;
  background: rgba(255,250,240,0.8); z-index: 3; pointer-events: none;
}
.canvas-frame .split-line::after {
  content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 18px; height: 18px; border-radius: 50%; background: var(--cream);
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.canvas-empty {
  color: #a49581; text-align: center; padding: 40px; font-size: 13px;
}
.canvas-empty strong { display: block; color: var(--cream); font-family: var(--display); font-size: 24px; margin-bottom: 6px; font-weight: 400; }
.compare-row { width: min(100%, 620px); margin-top: 16px; display: flex; align-items: center; gap: 12px; color: #a49581; font-size: 10px; }
.compare-row input[type="range"] { flex: 1; accent-color: var(--gold); }
.stage-foot { padding: 0 20px 14px; color: #8d7f6c; font-size: 10.5px; display: flex; justify-content: space-between; gap: 10px; }

.inspector { background: var(--paper); border-left: 1px solid var(--line); overflow-y: auto; max-height: calc(100vh - 64px); }
.inspector-inner { padding: 16px 18px 60px; }
.panel { display: none; }
.panel.active { display: block; }
.diag-card { background: var(--paper-deep); border: 1px solid var(--line); border-radius: 13px; padding: 14px; }
.diag-top { display: flex; gap: 12px; align-items: center; }
.score-ring {
  --score: 70; --ring: var(--accent);
  width: 58px; height: 58px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--ring) calc(var(--score) * 1%), #d9cdbb 0);
  position: relative;
}
.score-ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--paper-deep); }
.score-ring b { position: relative; font-family: var(--display); font-size: 18px; font-weight: 400; }
.diag-card h3 { font-family: var(--display); font-size: 19px; line-height: 1.1; }
.diag-card .sub { font-size: 10px; color: var(--muted); margin-top: 2px; }
.diag-notes { margin-top: 10px; display: grid; gap: 7px; }
.diag-note { display: flex; gap: 8px; font-size: 11px; align-items: flex-start; }
.diag-note i { width: 7px; height: 7px; border-radius: 50%; background: var(--olive); margin-top: 5px; flex: none; }
.diag-note.lvl1 i { background: var(--gold); }
.diag-note.lvl2 i { background: var(--accent); }
.diag-note b { display: block; font-size: 11px; }
.diag-note span { color: var(--muted); font-size: 10px; }
.big-btn {
  width: 100%; border: 0; border-radius: 10px; background: var(--accent); color: #fff;
  padding: 12px; font-size: 13.5px; font-weight: 700; margin-top: 10px;
}
.big-btn.alt { background: var(--dark); }
.sub-row { display: flex; justify-content: space-between; align-items: center; margin-top: 7px; font-size: 10px; color: var(--muted); }
.text-btn { border: 0; background: transparent; color: var(--accent); font-size: 11px; padding: 2px; }
.group-title { font-size: 9px; letter-spacing: 0.11em; font-weight: 700; color: var(--accent); margin: 16px 0 6px; }
.slider-row { margin: 7px 0; }
.slider-row .lab { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-soft); margin-bottom: 2px; }
.slider-row .lab output { color: var(--muted); font-size: 10px; }
input[type="range"].slider { width: 100%; height: 20px; accent-color: var(--accent); }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 8px 0; }
.switch-row .txt strong { display: block; font-size: 11.5px; font-weight: 600; }
.switch-row .txt span { display: block; font-size: 9.5px; color: var(--muted); }
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch i { display: block; width: 38px; height: 22px; border-radius: 11px; background: #c8bfb1; transition: background .15s; }
.switch i::after { content: ""; display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--cream); margin: 3px; transition: transform .15s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(16px); }
.hint {
  background: #f5e8d6; border: 1px solid #e1c7a3; border-radius: 9px;
  padding: 9px 10px; font-size: 10.5px; color: #795430; margin-top: 10px;
}
.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 10px; }
.filter-card {
  position: relative; border: 1px solid var(--line); border-radius: 9px; overflow: hidden;
  background: #f5f0e7; text-align: left; padding: 0; color: var(--ink);
}
.filter-card canvas { width: 100%; height: 64px; object-fit: cover; display: block; }
.filter-card .name { display: flex; justify-content: space-between; align-items: center; padding: 5px 7px; font-size: 10.5px; gap: 4px; }
.filter-card .name i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.filter-card.selected { border: 2px solid var(--accent); }
.filter-card.selected .name { font-weight: 700; }
.filter-intro h3 { font-family: var(--display); font-size: 23px; }
.filter-intro p { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.crop-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 7px; }
.crop-buttons .tool-btn { padding: 8px 6px; font-size: 10.5px; }

/* batch */
.batch-head h3 { font-family: var(--display); font-size: 23px; }
.batch-head p { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.dropzone {
  margin-top: 10px; border: 1.5px dashed #cdbfa9; border-radius: 11px; background: #f6f1e8;
  padding: 20px 12px; text-align: center; color: var(--muted); font-size: 11px; cursor: pointer;
}
.dropzone strong { display: block; color: var(--ink); font-size: 13px; margin-bottom: 3px; }
.dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.batch-controls { display: grid; gap: 8px; margin-top: 12px; }
.seg { display: flex; background: #eee7db; border-radius: 9px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; border-radius: 7px; background: transparent; font-size: 10px; padding: 7px 5px; color: var(--ink-soft); }
.seg button.active { background: var(--dark); color: var(--cream); }
.field { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 10.5px; color: var(--muted); }
.field select { border: 1px solid var(--line); background: var(--paper); border-radius: 7px; padding: 6px 7px; font-size: 10.5px; max-width: 180px; color: var(--ink); }
.batch-list { margin-top: 12px; display: grid; gap: 6px; max-height: 300px; overflow-y: auto; }
.batch-item { display: flex; align-items: center; gap: 8px; background: #f5f0e7; border: 1px solid var(--line); border-radius: 9px; padding: 6px; }
.batch-item img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex: none; background: #ddd3c3; }
.batch-item .info { flex: 1; min-width: 0; }
.batch-item .info b { display: block; font-size: 10.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-item .info span { font-size: 9px; color: var(--muted); }
.batch-item .state { font-size: 9px; flex: none; color: var(--muted); }
.batch-item.done { border-color: #b9c4a8; }
.batch-item.done .state { color: var(--olive); }
.batch-item.error { border-color: #d9a78f; }
.batch-item.error .state { color: var(--accent); }
.batch-item .x { border: 0; background: transparent; color: #a2937f; font-size: 14px; padding: 2px 4px; }
.batch-actions { display: grid; gap: 6px; margin-top: 10px; }
.progress { height: 6px; border-radius: 6px; background: #e2d8c8; overflow: hidden; margin-top: 10px; display: none; }
.progress.show { display: block; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.batch-note { font-size: 10px; color: var(--muted); margin-top: 8px; line-height: 1.5; }

/* export sheet */
.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(24, 19, 15, 0.55); z-index: 90;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.sheet-backdrop.open { display: flex; }
.sheet { background: var(--paper); border-radius: 18px; width: min(420px, 100%); padding: 24px; box-shadow: var(--shadow); }
.sheet h3 { font-size: 26px; }
.sheet p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.sheet .field { margin-top: 14px; font-size: 12px; }
.sheet .field select { font-size: 12px; }
.sheet .actions { display: flex; gap: 8px; margin-top: 18px; }
.sheet .actions .btn { flex: 1; }
.sheet .meta { font-size: 10.5px; color: var(--muted); margin-top: 12px; line-height: 1.6; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  background: var(--dark); color: var(--cream); border-radius: 11px; padding: 11px 18px;
  font-size: 12px; z-index: 120; opacity: 0; pointer-events: none; transition: all .18s;
  max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast b { color: var(--gold); font-weight: 600; }

/* busy overlay */
.busy { position: fixed; inset: 0; background: rgba(24,19,15,.55); z-index: 110; display: none; place-items: center; }
.busy.show { display: grid; }
.busy-card { background: var(--paper); border-radius: 14px; padding: 22px 26px; text-align: center; min-width: 260px; }
.busy-card strong { display: block; font-family: var(--display); font-size: 20px; }
.busy-card span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.spinner { width: 26px; height: 26px; border: 3px solid #e4d9c8; border-top-color: var(--accent); border-radius: 50%; margin: 0 auto 10px; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; gap: 36px; }
  .hero p.lede { max-width: 620px; }
  .phone { width: min(340px, 84%); }
  .cards { grid-template-columns: 1fr 1fr; }
  .research-grid { grid-template-columns: 1fr 1fr; }
  .research-card:last-child { grid-column: span 2; }
  .unique { grid-template-columns: 1fr; gap: 26px; }
  .assistant, .pwa-panel { grid-template-columns: 1fr; }
  .studio-body { grid-template-columns: 1fr; }
  .inspector { max-height: none; border-left: 0; border-top: 1px solid var(--line); }
  .canvas-frame, .canvas-frame canvas { max-height: 52vh; }
}
@media (max-width: 820px) {
  .wrap { width: calc(100% - 32px); }
  .nav { display: none; }
  .topbar-actions .pill { display: none; }
  .mobile-only { display: inline-flex; }
  .hero { padding-top: 30px; }
  .hero h1 { font-size: clamp(40px, 10vw, 58px); }
  section.block { padding-top: 62px; }
  .cards, .research-grid { grid-template-columns: 1fr; }
  .research-card:last-child { grid-column: auto; }
  .stats { gap: 18px; padding: 16px 18px; }
  .stat-sep { display: none; }
  .stats .note { margin-left: 0; }
  .assistant, .pwa-panel, .cta { padding: 24px; }
  .studio-body { grid-template-columns: 1fr; }
  .studio-head-inner { gap: 8px; }
  .studio-head .brand-text { display: none; }
  .studio-actions #undo, .studio-actions #redo { display: none; }
  #export-open .lbl { display: none; }
  .studio-tabs { flex: 1; }
  .studio-tabs { margin-left: 0; overflow-x: auto; }
  .studio-head .file-name { display: none; }
  .studio-actions .btn span { display: none; }
  .stage-toolbar { font-size: 9.5px; }
  .canvas-area { padding: 12px; }
  .canvas-frame, .canvas-frame canvas { max-height: 44vh; }
  .footer-grid { gap: 26px; }
}
@media (max-width: 420px) {
  .phone { transform: none; }
  .hero h1 { font-size: 38px; }
  .footer-cols { gap: 30px; }
  .filter-grid { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto; }
}

/* manual retouch palette */
.canvas-frame .layer-retouch {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 2; opacity: 0;
}
.canvas-frame.retouch .layer-retouch { pointer-events: auto; cursor: crosshair; opacity: 1; }
.canvas-frame.retouch .layer-after { clip-path: none; }
.canvas-frame.retouch .canvas-labels,
.canvas-frame.retouch .split-line { display: none; }
.retouch-head h3 { font-family: var(--display); font-size: 23px; }
.retouch-head p { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.retouch-tools { display: grid; gap: 6px; margin-top: 10px; }
.retouch-tool {
  display: flex; gap: 9px; align-items: center; text-align: left; width: 100%;
  background: #f5f0e7; border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 9px; color: var(--ink);
}
.retouch-tool.active { border: 1.6px solid var(--accent); background: #f6e9dc; }
.retouch-tool .ic {
  width: 32px; height: 32px; flex: none; border-radius: 9px; background: #e8e0d4;
  display: grid; place-items: center; color: var(--ink-soft);
}
.retouch-tool.active .ic { background: var(--accent); color: #fff; }
.retouch-tool .ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.retouch-tool b { display: block; font-size: 12px; font-weight: 600; }
.retouch-tool span { display: block; font-size: 9.5px; color: var(--muted); line-height: 1.3; }
.retouch-hint { font-size: 9.5px; color: var(--muted); margin-top: 5px; }
.big-btn.gold { background: var(--gold); color: var(--dark); }
.retouch-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 7px; }
.retouch-actions .tool-btn { background: #f1ebe0; color: var(--ink); border-color: var(--line); padding: 8px 6px; font-size: 10px; }
.retouch-status {
  background: var(--paper-deep); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px; margin-top: 10px;
}
.rs-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 9.5px; color: var(--muted); }
.rs-top b { font-size: 8.8px; letter-spacing: 0.1em; color: var(--accent); }
.rs-sub { font-size: 11px; margin-top: 5px; color: var(--ink-soft); }
.retouch-status p { font-size: 9.6px; color: var(--muted); margin-top: 4px; }

/* retouch landing section */
.retouch-landing { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 48px; align-items: center; }
.retouch-shot {
  position: relative; border-radius: 18px; overflow: hidden; background: #241f1a;
  box-shadow: 0 30px 70px rgba(42, 33, 24, 0.28);
}
.retouch-shot img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 32%; }
.shot-chip {
  position: absolute; top: 14px; left: 14px; display: inline-flex; align-items: center; gap: 7px;
  background: rgba(28, 23, 19, 0.82); color: var(--cream); border: 1px solid #5a4f42;
  border-radius: 9px; padding: 7px 10px; font-size: 11px; backdrop-filter: blur(6px);
}
.shot-chip i { width: 6px; height: 6px; border-radius: 50%; background: #d66054; }
.shot-caption {
  position: absolute; bottom: 12px; left: 14px; right: 14px; color: rgba(247, 238, 225, 0.72);
  font-size: 10px; letter-spacing: 0.02em;
}
.retouch-landing h2 { font-size: clamp(34px, 4.4vw, 52px); line-height: 1.02; margin-top: 10px; }
.retouch-landing .lede { margin-top: 14px; color: var(--muted); font-size: 14.5px; max-width: 520px; }
.retouch-points { display: grid; gap: 12px; margin-top: 22px; }
.retouch-points > div { display: flex; gap: 12px; }
.retouch-points b {
  flex: none; width: 32px; height: 32px; border-radius: 9px; background: var(--accent-soft);
  color: var(--accent-dark); font-size: 10px; display: grid; place-items: center;
}
.retouch-points strong { display: block; font-size: 14px; }
.retouch-points span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.bench-panel {
  margin-top: 20px; padding: 14px 16px; border-radius: 12px;
  background: #eee8dd; border: 1px solid var(--line);
}
.bench-top { display: block; font-size: 9px; letter-spacing: 0.12em; color: var(--accent-dark); font-weight: 600; }
.bench-panel strong { display: block; font-size: 12.5px; margin-top: 3px; color: var(--ink); }
.bench-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 10.5px; color: var(--ink-soft); }
.bench-row b { font-weight: 500; color: var(--muted); }
.bench-bar { height: 7px; border-radius: 4px; background: #ded6c9; overflow: hidden; margin-top: 4px; }
.bench-bar i { display: block; height: 100%; background: #a68460; }
.bench-bar.text i { background: var(--olive); }
.bench-panel small { display: block; margin-top: 9px; font-size: 9.2px; line-height: 1.5; color: var(--muted); }
.texture-note {
  margin-top: 9px; padding: 9px 11px; border-radius: 9px;
  background: #efe8dc; border: 1px solid var(--line);
}
.texture-note b { display: block; font-size: 9px; letter-spacing: 0.1em; color: var(--accent-dark); }
.texture-note span { display: block; font-size: 10px; line-height: 1.45; color: var(--ink-soft); margin-top: 2px; }
@media (max-width: 900px) {
  .retouch-landing { grid-template-columns: 1fr; gap: 26px; }
  .retouch-shot img { aspect-ratio: 4 / 3; object-position: center 30%; }
}
