/* Lumacut — clean, flat, light UI. */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f5f6f7;
  --surface-3: #eceef0;
  --text: #454545;
  --heading: #3b3b3b;
  --muted: #767676;
  --border: #e6e7e9;
  --primary: #2463eb;
  --primary-600: #1c50c8;
  --primary-50: #ebf1fe;
  --danger: #d93a3a;
  --success: #1f9d61;
  --checker-a: #ffffff;
  --checker-b: #e8e8e8;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .08);
  --shadow: 0 16px 48px -16px rgba(0, 0, 0, .18);
  --shadow-lg: 0 24px 70px -20px rgba(0, 0, 0, .22);
  --radius: 20px;
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--heading); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
kbd {
  font: 500 .75em/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: .2em .45em; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; background: var(--surface);
}
code { font: 500 .88em ui-monospace, SFMono-Regular, Menlo, monospace; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.container.narrow { width: min(820px, 100% - 32px); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.spacer { flex: 1; }
svg { flex-shrink: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 500 1rem/1.2 var(--font); padding: .7em 1.4em; border-radius: 999px;
  border: 0; cursor: pointer; white-space: nowrap; color: var(--text); background: var(--surface-3);
  transition: background .15s, color .15s;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 1.1em; height: 1.1em; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-600); }
.btn-ghost { background: var(--surface-3); color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: #e1e3e6; }
.btn-ghost.active { background: var(--primary-50); color: var(--primary); }
.btn-light { background: #fff; color: var(--heading); }
.btn-sm { font-size: .875rem; padding: .55em 1.1em; }
.btn-lg { font-size: 1.1rem; padding: .8em 1.6em; }
.btn-xl { font-size: 1.5rem; padding: .5em 1.4em; min-height: 58px; }
.btn-block { width: 100%; white-space: normal; text-align: center; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: none; color: var(--text); cursor: pointer; font: 500 1.2rem/1 var(--font);
}
.icon-btn:hover:not(:disabled) { background: var(--surface-2); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.icon-btn svg { width: 20px; height: 20px; }
.linkish { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-bottom-color: var(--border); }
.nav { display: flex; align-items: center; gap: 36px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.3rem; color: var(--heading); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.logo-mark { width: 30px; height: 30px; }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-links a { color: var(--text); font-weight: 500; font-size: .95rem; padding: 8px 12px; border-radius: 999px; }
.nav-links a:hover { background: var(--surface-2); text-decoration: none; }
.nav-links a[aria-current] { color: var(--heading); background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-toggle { display: none; }
@media (max-width: 900px) {
  .nav-toggle { display: inline-grid; }
  .nav-links {
    display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column;
    padding: 8px 16px 16px; background: #fff; border-bottom: 1px solid var(--border);
  }
  .site-header.open .nav-links { display: flex; }
  .nav { gap: 12px; }
}
@media (max-width: 360px) { .nav-actions .btn { display: none; } }

/* ---------- hero ---------- */
.hero { padding: 56px 0 96px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.hero-copy { max-width: 500px; justify-self: end; width: 100%; }
.hero-media {
  position: relative; width: 100%; max-width: 440px; aspect-ratio: 16 / 10; border-radius: 24px; overflow: hidden;
  margin-bottom: 36px; background: var(--surface-2);
}
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.hero-cut { position: absolute; inset: 0; animation: hero-swap 9s ease-in-out infinite; }
@keyframes hero-swap {
  0%, 22% { opacity: 0; background: #ffd9a8; }
  30%, 48% { opacity: 1; background: #ffd9a8; }
  56%, 74% { opacity: 1; background: #cfe3ff; }
  82%, 100% { opacity: 0; background: #cfe3ff; }
}
@media (prefers-reduced-motion: reduce) { .hero-cut { animation: none; opacity: 1; background: #cfe3ff; } }
h1 { font-size: clamp(1.9rem, 3.2vw + 1rem, 3.75rem); line-height: 1.12; letter-spacing: -.01em; margin-bottom: 18px; overflow-wrap: break-word; }
.hero-sub { font-size: 1.3rem; font-weight: 500; color: var(--text); margin: 0; }
.tag { display: inline-block; background: var(--primary); color: #fff; border-radius: 999px; padding: 0 .55em; font-weight: 600; }

.hero-upload { max-width: 460px; width: 100%; }
.upload-card {
  background: #fff; border-radius: 32px; box-shadow: var(--shadow-lg); text-align: center;
  padding: 80px 32px 64px; display: flex; flex-direction: column; align-items: center;
}
.upload-alt { margin: 22px 0 0; color: var(--text); font-size: 1.15rem; line-height: 1.4; }
.upload-alt .small { font-size: .85rem; font-weight: 400; }
.url-form { display: flex; gap: 8px; margin-top: 18px; width: 100%; }
.url-form input {
  flex: 1; min-width: 0; font: inherit; font-size: .9rem; padding: .6em 1em; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
}
.url-form input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.resume { margin: 16px 0 0; font-size: .9rem; }
.samples { display: flex; align-items: center; gap: 16px; margin: 36px 0 0 12px; }
.samples p { margin: 0; font-size: .9rem; font-weight: 600; line-height: 1.3; color: var(--text); }
.sample-row { display: flex; gap: 8px; }
.sample {
  width: 56px; height: 56px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: pointer;
  background: var(--surface-2); transition: transform .15s;
}
.sample:hover { transform: scale(1.06); }
.sample img { width: 100%; height: 100%; object-fit: cover; }
.legal { font-size: .75rem; color: var(--muted); margin: 24px 0 0 12px; max-width: 380px; }
.demo-note { font-size: .85rem; margin: 14px 0 0 12px; max-width: 400px; padding: 12px 14px; border-radius: 14px; background: var(--primary-50); color: var(--heading); }
@media (max-width: 900px) {
  .hero { padding: 24px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-copy, .hero-upload { justify-self: center; max-width: 520px; }
  .hero-copy { text-align: center; }
  .hero-media { margin-inline: auto; max-width: 380px; margin-bottom: 24px; }
  .upload-card { padding: 56px 24px 48px; }
  .samples { justify-content: center; margin-left: 0; flex-wrap: wrap; }
  .legal, .demo-note { margin-inline: auto; text-align: center; }
}
@media (max-width: 420px) {
  .hero-sub { font-size: 1.05rem; }
  .upload-card { padding: 40px 18px 32px; border-radius: 24px; }
  .btn-xl { font-size: 1.2rem; padding: .5em 1.1em; min-height: 50px; max-width: 100%; }
  .section { padding: 64px 0; }
}

/* ---------- checker ---------- */
.checker {
  background-color: var(--checker-a);
  background-image:
    linear-gradient(45deg, var(--checker-b) 25%, transparent 25%, transparent 75%, var(--checker-b) 75%),
    linear-gradient(45deg, var(--checker-b) 25%, transparent 25%, transparent 75%, var(--checker-b) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
}

/* ---------- workspace ---------- */
.workspace { padding: 28px 0 80px; }
.recent { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.recent-row { display: flex; gap: 10px; overflow-x: auto; padding: 8px 4px; flex: 1; }
.recent-links { display: flex; gap: 16px; align-items: center; white-space: nowrap; }
.recent-tile { position: relative; flex: 0 0 auto; width: 64px; height: 64px; border-radius: 14px; box-shadow: 0 0 0 1px var(--border); }
.recent-tile.active { box-shadow: 0 0 0 3px var(--primary); }
.recent-tile.failed { box-shadow: 0 0 0 2px var(--danger); }
.recent-tile.add {
  display: grid; place-items: center; cursor: pointer; color: var(--text); border: 0;
  background: var(--surface-3); box-shadow: none;
}
.recent-tile.add:hover { background: #e1e3e6; }
.recent-tile.add svg { width: 24px; height: 24px; }
.recent-open {
  width: 100%; height: 100%; padding: 0; border: 0; border-radius: 14px; overflow: hidden; cursor: pointer;
  display: grid; place-items: center; position: relative;
  background-color: #fff;
  background-image: linear-gradient(45deg, #ececec 25%, transparent 25%, transparent 75%, #ececec 75%), linear-gradient(45deg, #ececec 25%, transparent 25%, transparent 75%, #ececec 75%);
  background-size: 10px 10px; background-position: 0 0, 5px 5px;
}
.recent-open img { width: 100%; height: 100%; object-fit: contain; }
.recent-open .spinner { position: absolute; }
.recent-del {
  position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 50%;
  border: 0; background: var(--heading); color: #fff; cursor: pointer; display: none; place-items: center; padding: 0;
}
.recent-del svg { width: 12px; height: 12px; }
.recent-tile:hover .recent-del, .recent-tile:focus-within .recent-del { display: grid; }
@media (hover: none) { .recent-del { display: grid; } }

.ws-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 260px; gap: 28px;
  background: #fff; border-radius: 32px; box-shadow: var(--shadow-lg); padding: 24px 28px 28px;
}
.ws-main { min-width: 0; }
.ws-tabs, .pill-tabs, .ed-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.ws-tabs { margin-bottom: 16px; }
.ws-tabs button, .pill-tabs button, .ed-tabs button {
  font: 500 .9rem/1 var(--font); color: var(--text); background: none; border: 0; cursor: pointer;
  padding: 10px 16px; border-radius: 999px; white-space: nowrap;
}
.ws-tabs button:hover, .pill-tabs button:hover, .ed-tabs button:hover { background: var(--surface-2); }
.ws-tabs button[aria-selected="true"], .pill-tabs button[aria-selected="true"], .ed-tabs button[aria-selected="true"] {
  background: var(--surface-3); color: var(--heading);
}
.ws-preview { position: relative; min-height: min(60vh, 520px); display: grid; place-items: center; }
.ws-stack { position: relative; border-radius: 8px; overflow: hidden; touch-action: none; }
.ws-stack canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ws-stack.comparing { cursor: ew-resize; }
.cmp-handle { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.12); pointer-events: none; }
.cmp-handle span, .sc-handle span {
  position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; transform: translate(-50%, -50%);
  border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.cmp-handle span::before, .sc-handle span::before {
  content: ''; position: absolute; inset: 0; margin: auto; width: 14px; height: 10px;
  background:
    linear-gradient(135deg, transparent 50%, var(--text) 50%) left / 5px 10px no-repeat,
    linear-gradient(-135deg, transparent 50%, var(--text) 50%) right / 5px 10px no-repeat;
  clip-path: polygon(0 50%, 40% 0, 40% 100%, 0 50%, 100% 50%, 60% 0, 60% 100%);
}
.ws-loading { position: relative; display: grid; place-items: center; width: 100%; height: 100%; }
.ws-loading img { max-height: min(56vh, 480px); max-width: 100%; border-radius: 8px; opacity: .45; }
.ws-loading .scan {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent);
  background-size: 40% 100%; background-repeat: no-repeat; animation: scan 1.6s ease-in-out infinite;
}
@keyframes scan { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.ws-status {
  position: absolute; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  background: #fff; padding: 20px 28px; border-radius: 20px; box-shadow: var(--shadow); min-width: 260px;
}
.ws-status span { color: var(--muted); }
.bar { width: 100%; height: 5px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--primary); border-radius: inherit; transition: width .2s; }
.bar.indeterminate i { width: 35% !important; animation: indet 1.1s ease-in-out infinite; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--primary); animation: spin .8s linear infinite; }
.spinner.sm { width: 22px; height: 22px; }
@keyframes spin { to { transform: rotate(360deg); } }
.ws-error { text-align: center; max-width: 420px; }
.ws-error p { color: var(--muted); }

.ws-tools { display: flex; flex-direction: column; gap: 18px; padding-top: 64px; }
.tool {
  display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; cursor: pointer;
  font: 500 .78rem/1.2 var(--font); color: var(--text); width: 84px; text-align: center; padding: 0;
}
.tool-icon {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3);
  font-size: 1.6rem; font-weight: 400; color: var(--heading); transition: background .15s;
}
.tool-icon svg { width: 22px; height: 22px; }
.tool:hover:not(:disabled) .tool-icon { background: #e1e3e6; }
.tool:disabled { opacity: .4; cursor: not-allowed; }

.ws-side { display: flex; flex-direction: column; gap: 12px; padding-top: 64px; }
.ws-side .small.center { margin: -4px 0 4px; }
.ws-opts { display: grid; gap: 8px; }
.field-inline { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .875rem; font-weight: 500; }
.field-inline select, .select {
  font: 400 .875rem var(--font); padding: 7px 10px; border-radius: 10px;
  border: 1px solid var(--border); background: #fff; color: var(--text); max-width: 62%;
}
.select-block { max-width: none; width: 100%; }
.quick-bg h4, .ws-model h4 { font-size: .85rem; font-weight: 600; color: var(--heading); margin: 10px 0 8px; }
.ws-model { display: grid; gap: 8px; }
.ws-model h4 { margin-bottom: 0; }
.ws-model p { margin: 0; }
@media (max-width: 1000px) {
  .ws-card { grid-template-columns: 1fr; padding: 16px; border-radius: 24px; }
  .ws-tools { flex-direction: row; justify-content: center; padding-top: 0; flex-wrap: wrap; }
  .ws-side { padding-top: 0; }
  .ws-preview { min-height: 300px; }
  .recent { flex-direction: column; align-items: stretch; gap: 4px; }
  .recent-links { justify-content: flex-end; }
}

/* swatches (workspace + editor) */
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw {
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer; padding: 0; position: relative;
  border: 1px solid rgba(0,0,0,.12); background: var(--c, #fff);
}
.sw.active { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--primary); }
.sw-none {
  background-color: #fff;
  background-image: linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%), linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%);
  background-size: 10px 10px; background-position: 0 0, 5px 5px;
}
.sw-blur { background: #c9d2dc; font: 600 .58rem/1 var(--font); color: #333; }
.sw-more { display: grid; place-items: center; background: var(--surface-3); color: var(--text); border-color: transparent; }
.sw-more svg { width: 16px; height: 16px; }
.sw-custom { background: conic-gradient(#e74c3c, #f1c40f, #2ecc71, #3498db, #9b59b6, #e74c3c); display: grid; place-items: center; overflow: hidden; }
.sw-custom::after { content: ''; width: 14px; height: 14px; border-radius: 50%; background: var(--c, transparent); border: 2px solid #fff; }
.sw-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }

/* ---------- home sections ---------- */
.section { padding: 96px 0; }
.section-grey { background: var(--surface-2); }
.section-title { font-size: clamp(1.9rem, 3.4vw, 2.75rem); text-align: center; margin-bottom: 32px; }
.pill-tabs { justify-content: center; margin-bottom: 40px; }

.showcase { max-width: 880px; margin: 0 auto; }
.sc-stage {
  --pos: 50%; position: relative; aspect-ratio: 3 / 2; border-radius: 24px; overflow: hidden;
  cursor: ew-resize; touch-action: none; user-select: none; box-shadow: var(--shadow);
}
/* Both layers use the same crop so the before/after line up exactly. */
.sc-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; pointer-events: none; }
.sc-after { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos)); }
.sc-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.showcase > p { margin-top: 16px; }

.uc-panel {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center;
  max-width: 1000px; margin: 0 auto;
}
.uc-visual { border-radius: 24px; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; }
.uc-visual img { max-width: 82%; max-height: 86%; object-fit: contain; filter: drop-shadow(0 12px 18px rgba(0,0,0,.12)); }
.uc-copy h3 { font-size: 1.9rem; }
.uc-copy p { font-size: 1.05rem; }
.checks { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.checks svg { width: 20px; height: 20px; color: var(--primary); margin-top: 2px; }
@media (max-width: 800px) { .uc-panel { grid-template-columns: 1fr; gap: 28px; } .pill-tabs { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; } }

.steps { list-style: none; padding: 0; margin: 0 auto; max-width: 1000px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; text-align: center; }
.steps h3 { font-size: 1.25rem; }
.steps p { margin: 0; }
.step-n {
  display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--surface-3); color: var(--heading); font-weight: 600; font-size: 1.2rem; margin-bottom: 16px;
}
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 32px; } }

.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; font-weight: 500; font-size: 1.05rem; color: var(--heading); padding: 20px 36px 20px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 6px; top: 16px; font-size: 1.5rem; font-weight: 300; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-right: 36px; }

.cta-inner { display: flex; flex-direction: column; align-items: center; }
.upload-card-sm { width: min(460px, 100%); padding: 48px 32px 40px; }

/* ---------- footer ---------- */
.site-footer { background: var(--surface-2); padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { font-size: .95rem; }
.footer-grid > div > a:not(.brand) { display: block; color: var(--text); padding: 3px 0; font-size: .92rem; }
.footer-grid p { margin-top: 12px; max-width: 34ch; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }

/* ---------- toasts & drop overlay ---------- */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 300; display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); }
.toast {
  background: var(--heading); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 500; font-size: .9rem;
  box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s;
}
.toast.in { opacity: 1; transform: none; }
.toast-error { background: var(--danger); }
.toast-success { background: var(--success); }
.drop-overlay { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; pointer-events: none; background: rgba(36, 99, 235, .88); opacity: 0; transition: opacity .15s; }
.drop-overlay.show { opacity: 1; }
.drop-overlay-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; color: #fff; font-size: 1.6rem; font-weight: 500; border: 3px dashed rgba(255,255,255,.7); border-radius: 28px; padding: clamp(32px, 6vw, 60px) clamp(24px, 8vw, 80px); max-width: calc(100vw - 32px); text-align: center; }
.drop-overlay-inner svg { width: 52px; height: 52px; }

/* ---------- editor ---------- */
.ed-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .45); display: grid; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.ed { display: grid; grid-template-rows: auto 1fr; background: #fff; margin: 16px; border-radius: 24px; overflow: hidden; min-height: 0; }
.ed-top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.ed-title { font-weight: 600; color: var(--heading); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-tools { display: flex; align-items: center; gap: 4px; }
.ed-actions { display: flex; gap: 8px; flex: 1; justify-content: flex-end; }
.ed-sep { width: 1px; height: 22px; background: var(--border); margin: 0 6px; }
.ed-zoom { font: 500 .85rem var(--font); background: none; border: 0; color: var(--text); cursor: pointer; min-width: 52px; padding: 8px 4px; border-radius: 8px; }
.ed-zoom:hover { background: var(--surface-2); }
.ed-body { display: grid; grid-template-columns: 1fr 320px; min-height: 0; }
.ed-stage { position: relative; overflow: hidden; background: var(--surface-2); cursor: grab; touch-action: none; }
.ed-stage.grabbing { cursor: grabbing; }
.ed-stage.brushing { cursor: none; }
.ed-stage.brushing.panning { cursor: grab; }
.ed-canvas { position: absolute; inset: 0; display: block; }
.brush-cursor { position: absolute; left: 0; top: 0; display: none; pointer-events: none; border-radius: 50%; border: 1.5px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.6), inset 0 0 0 1px rgba(0,0,0,.35); }
.ed-stage.panning .brush-cursor, .ed-stage:not(.brushing) .brush-cursor { display: none !important; }
.ed-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); pointer-events: none; background: rgba(0,0,0,.65); color: #fff; padding: 6px 12px; border-radius: 999px; }
.ed-side { border-left: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.ed-tabs { padding: 12px; border-bottom: 1px solid var(--border); gap: 2px; }
.ed-tabs button { padding: 9px 12px; font-size: .82rem; }
.ed-panels { overflow-y: auto; padding: 18px; }
.ed-panel { display: grid; gap: 14px; }
.ed-panel h4 { font-size: .85rem; margin: 6px 0 -4px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tile {
  aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--border); cursor: pointer; padding: 0;
  background: var(--surface-2) center / cover; position: relative; overflow: hidden; color: var(--text);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font: 500 .7rem var(--font);
}
.tile > span { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px; background: rgba(255,255,255,.8); color: #222; }
.tile.active { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--primary); }
.tile-upload { border-style: dashed; }
.tile-upload > span { position: static; background: none; color: inherit; }
.tile-upload svg { width: 20px; height: 20px; }
.tile-wide { aspect-ratio: auto; height: 54px; width: 100%; background: #c9d2dc; }
.tile-wide > span { position: static; background: none; font-size: .85rem; }
.field { display: grid; gap: 6px; font-size: .875rem; font-weight: 500; }
.field > span { display: flex; justify-content: space-between; }
.field output { color: var(--muted); font-weight: 400; }
input[type="range"] { width: 100%; accent-color: var(--primary); }
.disabled { opacity: .45; pointer-events: none; }
.check { display: flex; gap: 8px; align-items: center; font-size: .9rem; font-weight: 500; cursor: pointer; }
.check input { accent-color: var(--primary); width: 16px; height: 16px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); padding: 4px; border-radius: 999px; }
.seg button { font: 500 .9rem var(--font); padding: 9px; border: 0; border-radius: 999px; background: none; color: var(--muted); cursor: pointer; }
.seg button.active { background: #fff; color: var(--heading); box-shadow: var(--shadow-sm); }
.switch { display: flex; align-items: center; gap: 12px; font-weight: 500; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 40px; height: 24px; border-radius: 999px; background: #d3d5d9; position: relative; transition: background .15s; flex: none; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: var(--shadow-sm); }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 500 .82rem var(--font); padding: 7px 13px; border-radius: 999px; cursor: pointer; border: 0; background: var(--surface-3); color: var(--text); }
.chip.active { background: var(--heading); color: #fff; }
@media (max-width: 860px) {
  .ed { margin: 0; border-radius: 0; }
  .ed-body { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .ed-side { border-left: 0; border-top: 1px solid var(--border); max-height: 44vh; }
  .ed-tools .btn span, .ed-title { display: none; }
  .ed-actions { flex: 0; }
  .ed-top { justify-content: space-between; }
  .tiles { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 520px) { .tiles { grid-template-columns: repeat(4, 1fr); } .ed-sep { display: none; } }

/* ---------- shared page pieces ---------- */
.page-head { padding: 48px 0 28px; }
.page-head h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.lead { font-size: 1.1rem; color: var(--text); max-width: 60ch; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.panel h3 { font-size: 1rem; margin: 0; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.eyebrow { display: inline-block; font-size: .85rem; font-weight: 600; color: var(--primary); margin-bottom: 8px; }

/* ---------- bulk ---------- */
.bulk-grid { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; padding-bottom: 72px; }
.bulk-opts { display: grid; gap: 14px; position: sticky; top: 88px; }
.bulk-opts .field-inline select { max-width: 55%; }
.dropzone { border: 2px dashed #cfd3d8; background: var(--surface-2); border-radius: var(--radius); padding: 40px 20px; text-align: center; margin-bottom: 16px; }
.dropzone p { margin: 12px 0 0; color: var(--muted); }
.bulk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.bulk-progress { flex-basis: 100%; }
.bulk-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.bulk-item { background: #fff; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.bulk-thumb { aspect-ratio: 1; display: grid; place-items: center; position: relative; }
.bulk-thumb img { width: 100%; height: 100%; object-fit: contain; }
.bulk-thumb .spinner { position: absolute; }
.bulk-thumb.pending img { opacity: .45; }
.bulk-meta { padding: 10px 12px; display: flex; align-items: center; gap: 4px; border-top: 1px solid var(--border); }
.bulk-name { flex: 1; min-width: 0; font-size: .82rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bulk-status { font-size: .75rem; color: var(--muted); }
.bulk-status.err { color: var(--danger); }
.bulk-meta .icon-btn { width: 32px; height: 32px; }
.bulk-meta .icon-btn svg { width: 17px; height: 17px; }
@media (max-width: 860px) { .bulk-grid { grid-template-columns: 1fr; } .bulk-opts { position: static; } }

/* ---------- library (My images) ---------- */
.lib-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.lib-head .lead { margin: 0; }
.lib-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 14px; }
.lib-toolbar .field-inline select { max-width: none; }
.lib-search { flex: 1 1 220px; min-width: 0; font: inherit; font-size: .9rem; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); }
.lib-search:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.lib-selbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; position: sticky; top: 80px; z-index: 5; background: var(--primary-50); border-radius: 16px; padding: 10px 14px; margin-bottom: 14px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 28px; }
.lib-card { position: relative; background: #fff; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s; }
.lib-card:hover { box-shadow: var(--shadow); }
.lib-card.selected { box-shadow: 0 0 0 2px var(--primary); }
.lib-check { position: absolute; top: 8px; left: 8px; z-index: 2; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgba(255,255,255,.92); box-shadow: var(--shadow-sm); opacity: 0; transition: opacity .15s; cursor: pointer; }
.lib-check input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.lib-card:hover .lib-check, .lib-card.selected .lib-check, .lib-check:focus-within { opacity: 1; }
@media (hover: none) { .lib-check { opacity: 1; } }
.lib-thumb { aspect-ratio: 1; display: grid; place-items: center; }
.lib-thumb img { width: 100%; height: 100%; object-fit: contain; }
.lib-meta { padding: 10px 12px 4px; min-width: 0; }
.lib-name { font-weight: 500; font-size: .88rem; color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-sub { font-size: .75rem; color: var(--muted); }
.lib-actions { display: flex; gap: 2px; padding: 4px 6px 8px; }
.lib-actions .icon-btn { width: 34px; height: 34px; }
.lib-actions .icon-btn svg { width: 17px; height: 17px; }
.lib-empty { padding: 60px 0; }
.lib-settings { margin-bottom: 72px; display: grid; gap: 10px; }
.lib-settings p { margin: 0; }
.lib-settings-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.lib-settings-row .field-inline select { max-width: none; }

/* ---------- docs ---------- */
.docs { display: grid; grid-template-columns: 220px 1fr; gap: 40px; padding-bottom: 72px; align-items: start; }
.docs-nav { position: sticky; top: 92px; display: grid; gap: 2px; }
.docs-nav a { color: var(--text); font-weight: 500; font-size: .92rem; padding: 7px 12px; border-radius: 999px; }
.docs-nav a:hover { background: var(--surface-2); text-decoration: none; }
.docs-body { min-width: 0; }
.docs-body h2 { font-size: 1.6rem; margin-top: 44px; scroll-margin-top: 90px; }
.docs-body h2:first-child { margin-top: 0; }
.docs-body code { background: var(--surface-2); padding: .15em .4em; border-radius: 6px; color: var(--heading); }
pre.code { background: #1f2328; color: #e6edf3; padding: 18px 20px; border-radius: 16px; overflow-x: auto; font: 500 .86rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; margin: 0 0 1.2em; }
pre.code code { background: none; padding: 0; color: inherit; }
.tok-k { color: #ff7b72; } .tok-s { color: #a5d6ff; } .tok-c { color: #8b949e; } .tok-f { color: #d2a8ff; }
table.opts { width: 100%; border-collapse: collapse; font-size: .92rem; margin-bottom: 1.2em; }
table.opts th, table.opts td { text-align: left; padding: 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.opts th { font-size: .85rem; font-weight: 600; color: var(--heading); }
table.opts td:first-child { white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.playground { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pg-out { min-height: 260px; border-radius: 16px; display: grid; place-items: center; padding: 12px; border: 1px solid var(--border); }
.pg-out img { max-height: 320px; }
.pg-controls { display: grid; gap: 10px; align-content: start; }
@media (max-width: 860px) { .docs { grid-template-columns: 1fr; } .docs-nav { position: static; display: flex; flex-wrap: wrap; } .playground { grid-template-columns: 1fr; } }

/* ---------- pricing ---------- */
.plan { background: #fff; border: 1px solid var(--border); border-radius: 24px; padding: 30px; display: flex; flex-direction: column; gap: 14px; }
.plan.featured { border: 0; box-shadow: var(--shadow-lg); }
.plan h3 { font-size: 1.2rem; margin: 0; }
.price { font-size: 3rem; font-weight: 600; color: var(--heading); line-height: 1.1; }
.price small { font-size: 1rem; color: var(--muted); font-weight: 400; }
.plan .checks { margin: 0; flex: 1; }
.plan .checks li { font-weight: 400; font-size: .95rem; }
.price-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.price-main { padding: 36px; }
.price-side { display: grid; gap: 6px; }
.price-side p { margin: 0; }
.costs { display: grid; gap: 14px; margin: 12px 0 0; }
.costs dt { font-weight: 600; font-size: .9rem; color: var(--heading); }
.costs dd { margin: 2px 0 0; font-size: .92rem; }
.costs code { background: var(--surface-2); padding: .1em .35em; border-radius: 5px; color: var(--heading); }
.section-tight { padding: 64px 0 0; }
.section-tight h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.section-tight > .muted.center { max-width: 60ch; margin: 0 auto 18px; }
.section-tight:last-of-type { padding-bottom: 80px; }
.compare-table td:first-child { font-weight: 500; color: var(--heading); }
@media (max-width: 860px) { .price-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .price-main { padding: 24px 20px; } }
