/* bgnix — visual system v2 ("Estudio"): light paper, one ink, lime only as a fill; the transparency checkerboard is the motif.
 * Cheap to render everywhere: no blur, no backdrop-filter, no animated backgrounds; motion = transform/opacity. */
:root {
  --bg: #f6f7f4; --bg-2: #ffffff; --panel: #ffffff; --panel-2: #eef1ea; --soft: #eef1ea;
  --line: #e2e5df; --line-2: #d3d8cf;
  --text: #111312; --ink: #111312; --muted: #5e6560; --dim: #868d88;
  --lime: #c8ff2e; --lime-2: #b4e623; --lime-ink: #3f6212;
  --danger: #d92d41; --violet: #6d4fd6; --cyan: #0891b2; --pink: #db2777;
  --r: 14px; --r-lg: 20px;
  --display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --sans: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --chk-a: #e3e6df; --chk-b: #ffffff;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: not-allowed; opacity: .4; }
h1, h2, h3 { margin: 0; font-family: var(--display); letter-spacing: -.03em; line-height: 1.04; }
p { margin: 0; }
kbd { display: inline-block; min-width: 1.6em; padding: .05em .4em; border-radius: 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--bg-2); font: 600 12px/1.4 var(--sans); color: var(--text); text-align: center; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ic-lg { width: 26px; height: 26px; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.wrap-narrow { width: min(780px, 100% - 40px); }
.checker { background: repeating-conic-gradient(var(--chk-a) 0 25%, var(--chk-b) 0 50%) 0 0 / 20px 20px; }
.only-touch { display: none !important; }
@media (pointer: coarse) { .only-touch { display: inline-flex !important; } .only-desk { display: none !important; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 46px; padding: 0 20px; border-radius: 12px; font-weight: 700; font-size: 15px; white-space: nowrap; transition: transform .15s var(--ease), background .15s, border-color .15s; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn-sm { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn-lg { height: 54px; padding: 0 24px; font-size: 16px; }
.btn-lime { background: var(--lime); color: var(--ink); border: 1px solid var(--lime-2); box-shadow: 0 1px 0 rgba(17, 19, 18, .08); }
.btn-lime:hover:not(:disabled) { background: #d4ff5a; transform: translateY(-1px); }
.btn-ghost { background: var(--bg-2); border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover:not(:disabled) { border-color: var(--line-2); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--text); background: transparent; transition: background .15s; }
.icon-btn:hover:not(:disabled) { background: rgba(17, 19, 18, .06); }
.icon-btn.sm { width: 32px; height: 32px; font-size: 18px; }
.icon-btn.lg { width: 54px; height: 54px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.pill-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.pill-btn[aria-pressed="true"] { background: var(--lime); color: var(--ink); border-color: var(--lime-2); }
.link { color: var(--lime-ink); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 30; background: rgba(246, 247, 244, .96); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; gap: 22px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font: 800 21px/1 var(--display); letter-spacing: -.03em; }
.logo-mark { position: relative; width: 24px; height: 24px; border-radius: 7px; overflow: hidden; background-size: 8px 8px; }
.logo-mark::after { content: ""; position: absolute; inset: 0; background: var(--lime); clip-path: polygon(0 0, 100% 0, 0 100%); }
.nav-links { display: flex; gap: 2px; margin-left: 10px; }
.nav-links a { padding: 8px 12px; border-radius: 10px; color: var(--muted); font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--text); background: rgba(17, 19, 18, .05); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.lang { position: relative; }
.lang summary { list-style: none; display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 10px; border-radius: 10px; color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; text-transform: uppercase; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover { color: var(--text); background: rgba(17, 19, 18, .05); }
.lang .ic { width: 18px; height: 18px; }
.lang-menu { position: absolute; right: 0; top: 46px; min-width: 160px; padding: 6px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); box-shadow: 0 20px 40px -20px rgba(17, 19, 18, .35); display: grid; }
.lang-menu a { padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.lang-menu a:hover, .lang-menu a[aria-current] { background: var(--soft); }
.lang-menu a[aria-current] { font-weight: 700; }

/* ---------- hero: copy + live tool ---------- */
.hero { padding: 52px 0 64px; }
.hero-in { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 18px; }
.eyebrow b { width: 8px; height: 8px; border-radius: 50%; background: #2fbf5b; flex: none; }
.hero h1 { font-size: clamp(38px, 5.4vw, 64px); font-weight: 800; letter-spacing: -.035em; line-height: 1.0; margin-bottom: 18px; text-wrap: balance; }
.hero h1 mark { background: linear-gradient(transparent 62%, var(--lime) 62%); color: inherit; padding: 0 .04em; }
.lead { font-size: 18px; color: var(--muted); max-width: 38ch; margin-bottom: 24px; }
.pillars { display: grid; grid-template-columns: repeat(2, max-content); gap: 10px 26px; margin: 0 0 28px; padding: 0; list-style: none; font: 700 15px var(--sans); }
.pillars li { display: flex; align-items: center; gap: 9px; }
.pillars li::before { content: ""; width: 18px; height: 18px; border-radius: 5px; flex: none; background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4.5 9.3l3 3 6-6.4' fill='none' stroke='%23c8ff2e' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }
.drop { border-radius: 16px; outline: none; }
.drop:focus-visible { box-shadow: 0 0 0 3px var(--ink); }
.drop.over { box-shadow: 0 0 0 3px var(--lime); }
.drop-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.drop-hint { margin-top: 12px; color: var(--muted); font-size: 13px; }
.ai-state { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--soft); }
.ai-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.ai-state.loading i { background: #e0a400; animation: blink 1s ease-in-out infinite; }
.ai-state.ready { color: var(--lime-ink); background: rgba(200, 255, 46, .25); }
.ai-state.ready i { background: #2fbf5b; }
@keyframes blink { 50% { opacity: .3; } }

.tool { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 30px 60px -36px rgba(17, 19, 18, .35); overflow: hidden; }
.tool-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.tool-top .dot { width: 8px; height: 8px; border-radius: 50%; background: #2fbf5b; }
.tool-top .t { margin-right: auto; }
.tool-main { display: grid; grid-template-columns: minmax(0, 1fr) 200px; }
.tool-canvas { padding: 16px; display: grid; gap: 12px; background: var(--soft); }
/* the stage keeps the card's height; the frame inside takes the shape of the chosen size (container units) */
.ba { position: relative; aspect-ratio: 4 / 5; container-type: size; --p: 44%; user-select: none; }
.ba-frame { position: absolute; inset: 0; margin: auto; width: min(100cqw, 100cqh * var(--ar, .8)); aspect-ratio: var(--ar, .8); border-radius: 12px; overflow: hidden; background: #ddd; transition: width .3s var(--ease); }
.ba-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; pointer-events: none; }
/* the "after" side is a box that slides right while its content slides back left by the same amount:
   transform only, so the GPU moves it without repainting the photos on every frame */
.ba-after { position: absolute; inset: 0; overflow: hidden; transform: translateX(var(--p)); }
.ba-after-in { position: absolute; inset: 0; transform: translateX(calc(-1 * var(--p))); }
.ba-handle { position: absolute; inset: 0; pointer-events: none; transform: translateX(var(--p)); }
.ba-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); }
.ba-handle::after { content: ""; position: absolute; top: 50%; left: 0; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'%3E%3Cpath d='M14 12l-5 6 5 6M22 12l5 6-5 6' fill='none' stroke='%23111312' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; box-shadow: 0 4px 14px rgba(0, 0, 0, .22); }
.ba-tag { position: absolute; top: 10px; left: 10px; right: 10px; width: fit-content; max-width: calc(100% - 20px); z-index: 1; padding: 5px 10px; border-radius: 999px; background: rgba(17, 19, 18, .82); color: #fff; font: 600 12px/1.3 var(--sans); pointer-events: none; }
.ba-frame input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100% !important; opacity: 0; margin: 0; cursor: ew-resize; touch-action: pan-y; z-index: 2; }
.ba[data-size="sticker"] #baCut { filter: drop-shadow(3px 0 0 #fff) drop-shadow(-3px 0 0 #fff) drop-shadow(0 3px 0 #fff) drop-shadow(0 -3px 0 #fff) drop-shadow(0 4px 8px rgba(0, 0, 0, .18)); }
.cap { position: absolute; bottom: 10px; font: 600 11px var(--sans); letter-spacing: .06em; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; background: rgba(255, 255, 255, .92); pointer-events: none; }
.cap.l { left: 10px; } .cap.r { right: 10px; }
.tsamples { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.tsamples button { width: 44px; height: 54px; border-radius: 10px; border: 2px solid transparent; overflow: hidden; background: #fff; }
.tsamples button img { width: 100%; height: 100%; object-fit: cover; }
.tsamples button[aria-pressed="true"] { border-color: var(--ink); }
.tool-panel { border-left: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.tool-panel .lbl { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
#tSw { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
#tSw button { aspect-ratio: 1; border-radius: 9px; border: 1px solid var(--line); background-size: 14px 14px; }
#tSw .sw-blur { background-size: cover; background-position: center; }
#tSw button[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 2px; }
.sizes { display: grid; gap: 6px; }
.sizes button { display: flex; justify-content: space-between; align-items: center; gap: 6px; font: 600 13px var(--sans); padding: 9px 10px; border-radius: 9px; border: 1px solid var(--line); background: #fff; text-align: left; }
.sizes button span { color: var(--muted); font-weight: 500; }
.sizes button[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.tool-go { margin-top: auto; display: grid; gap: 6px; }
.tool-go .btn { width: 100%; padding: 0 10px; }
.tool-go small { text-align: center; color: var(--muted); font-size: 12px; line-height: 1.35; }

/* ---------- competitor strip ---------- */
.vs { border-block: 1px solid var(--line); background: var(--panel); }
.vs-in { display: grid; grid-template-columns: 220px repeat(3, minmax(0, 1fr)); }
.vs .c { padding: 18px 16px; border-left: 1px solid var(--line); font-size: 14px; }
.vs .c0 { border-left: 0; padding-left: 0; font: 700 15px var(--display); display: flex; align-items: center; }
.vs .c b { display: block; font: 800 22px var(--display); letter-spacing: -.02em; }
.vs .c em { font-style: normal; color: var(--muted); font-size: 13px; }
.vs .c .us { width: fit-content; background: linear-gradient(transparent 60%, var(--lime) 60%); }

/* ---------- sections ---------- */
.sec { padding: 72px 0; }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.sec h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; margin-bottom: 28px; text-wrap: balance; }
.uses { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.use { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.use-art { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--soft); }
.use-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* original → result, looping, each card a little later than the previous one */
/* same sliding-box trick as the hero (transform only, no repaint per frame) */
.use-mask { position: absolute; inset: 0; overflow: hidden; transform: translateX(-100%); transition: transform 1.15s cubic-bezier(.65, 0, .35, 1); }
.use-mask .use-after { transform: translateX(100%); transition: transform 1.15s cubic-bezier(.65, 0, .35, 1); }
.use.on .use-mask, .use.on .use-mask .use-after { transform: none; }
.use-line { position: absolute; inset: 0; pointer-events: none; transform: translateX(-100%); transition: transform 1.15s cubic-bezier(.65, 0, .35, 1); }
.use-line::after { content: ""; position: absolute; top: 0; bottom: 0; right: -1.5px; width: 3px; opacity: 0; animation: lineOff 1.15s linear; background: var(--lime); box-shadow: 0 0 14px 2px rgba(200, 255, 46, .75); }
.use.on .use-line { transform: translateX(0); }
.use.on .use-line::after { animation-name: lineOn; }
@keyframes lineOn { 0%, 100% { opacity: 0; } 8%, 85% { opacity: 1; } }
@keyframes lineOff { 0%, 100% { opacity: 0; } 8%, 85% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .use-mask, .use-mask .use-after { transform: none; transition: none; } .use-line { display: none; } }
.use .ba-tag { top: 10px; left: 10px; }
.use-tx { padding: 16px 18px 18px; }
.use h3 { font-size: 18px; margin-bottom: 4px; }
.use p { color: var(--muted); font-size: 14px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; counter-reset: s; margin: 0; padding: 0; list-style: none; }
.steps li { border-top: 2px solid var(--ink); padding-top: 14px; }
.steps li::before { counter-increment: s; content: counter(s); display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--lime); font: 800 14px var(--display); margin-bottom: 10px; }
.steps h3 { font-size: 18px; margin-bottom: 6px; }
.steps p { color: var(--muted); font-size: 15px; }
.feats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.feats article { background: var(--panel); padding: 20px; }
.feats .ic { width: 22px; height: 22px; margin-bottom: 12px; }
.feats h3 { font-size: 16px; margin-bottom: 6px; }
.feats p { color: var(--muted); font-size: 14px; }
.cmp { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--panel); }
.cmp-row { display: grid; grid-template-columns: 1.1fr 1fr 1fr; }
.cmp-row > span { padding: 14px 18px; border-top: 1px solid var(--line); font-size: 15px; display: flex; align-items: center; gap: 8px; }
.cmp-head > span { border-top: 0; font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cmp-row > span:first-child { font-weight: 600; }
.cmp .us { background: rgba(200, 255, 46, .14); font-weight: 600; }
.cmp-head .us { color: var(--ink); }
.cmp .us .ic { width: 18px; height: 18px; color: var(--lime-ink); stroke-width: 2.6; }
/* FAQ: bordered cards that open smoothly (height animates where the browser supports it, instant elsewhere) */
:root { interpolate-size: allow-keywords; }
.faq { display: grid; gap: 10px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: border-color .25s, box-shadow .25s; }
.faq details:hover { border-color: var(--line-2); }
.faq details[open] { border-color: color-mix(in srgb, var(--lime-ink) 45%, var(--line)); box-shadow: 0 14px 30px -24px rgba(17, 19, 18, .35); }
.faq summary { font: 700 17px var(--display); cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px; transition: color .2s; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; border-radius: 14px; }
.faq summary .ic { flex: none; width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: var(--soft); color: var(--text); transition: transform .3s var(--ease), background .25s; }
.faq details[open] summary .ic { transform: rotate(45deg); background: var(--lime); }
.faq p { margin: 0; padding: 0 20px 18px; color: var(--muted); }
.faq details::details-content { block-size: 0; overflow: hidden; transition: block-size .32s var(--ease), content-visibility .32s allow-discrete; }
.faq details[open]::details-content { block-size: auto; }
@media (prefers-reduced-motion: reduce) { .faq details::details-content, .faq summary .ic { transition: none; } }
.cta { text-align: center; padding: 48px 24px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); }
.cta h2 { margin-bottom: 10px; }
.cta p { color: var(--muted); margin-bottom: 22px; }
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; }
.foot .logo { font-size: 17px; color: var(--text); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-left: auto; }
.foot-links a { display: inline-flex; align-items: center; min-height: 24px; }
.foot-links a:hover { color: var(--text); }
.copy { width: 100%; font-size: 13px; }
.mbar { display: none; }
.about .about-p { margin-top: 6px; font-size: 18px; line-height: 1.65; color: var(--muted); max-width: 760px; }

@media (max-width: 1080px) { .uses, .feats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 880px) {
  .nav-links { display: none; }
  .hero { padding: 28px 0 40px; }
  .hero-in { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .pillars { margin-bottom: 20px; }
  .tool-main { grid-template-columns: minmax(0, 1fr); }
  .tool-panel { border-left: 0; border-top: 1px solid var(--line); }
  #tSw { grid-template-columns: repeat(8, 1fr); }
  .sizes { grid-template-columns: 1fr 1fr; }
  .vs-in { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vs .c0 { grid-column: 1 / -1; padding: 16px 0 0; }
  .vs .c:nth-child(2) { border-left: 0; padding-left: 0; }
  .vs .c { padding-inline: 10px; } .vs .c b { font-size: 18px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .sec { padding: 56px 0; }
  .mbar { display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--panel); border-top: 1px solid var(--line); padding: 10px max(16px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  .mbar .btn { flex: 1; }
  .mbar { transform: translateY(110%); transition: transform .35s var(--ease); }
  .mbar.show { transform: none; }
  .foot { padding-bottom: 96px; }
  body.ed-open .mbar { display: none; }
}
@media (max-width: 560px) {
  .nav-cta { display: none; }
  .drop-actions .btn { flex: 1 1 100%; }
  .uses { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .use-tx { padding: 12px; }
  .use h3 { font-size: 15px; }
  .use p { font-size: 13px; }
  .feats { grid-template-columns: minmax(0, 1fr); }
  .cmp-row { grid-template-columns: 1fr 1fr; }
  .cmp-row > span:first-child { grid-column: 1 / -1; padding-bottom: 4px; }
  .cmp-row > span:not(:first-child) { border-top: 0; padding-top: 6px; font-size: 14px; }
  .cmp-head > span:first-child { display: none; }
  .foot-links { margin-left: 0; }
}

/* ====================== editor (same structure, light) ====================== */
/* ---------- editor ---------- */
.ed {
  position: fixed; inset: 0; z-index: 60; display: grid; grid-template-rows: auto 1fr auto;
  background: var(--bg); animation: edIn .35s var(--ease);
}
@keyframes edIn { from { opacity: 0; transform: scale(.985); } }
body.ed-open { overflow: hidden; }
.ed-top { display: flex; align-items: center; gap: 12px; padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); border-bottom: 1px solid var(--line); }
.ed-title { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.ed-title strong { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.ed-title span { font-size: 12.5px; color: var(--muted); }
.ed-tools { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.ed-tools .pill-btn { margin-left: 6px; }

.ed-body { display: grid; grid-template-columns: 1fr 360px; min-height: 0; }
.stage {
  position: relative; overflow: hidden; touch-action: none; min-height: 0;
  background: radial-gradient(circle at 50% 40%, #eef1ea, #e3e7df 75%);
}
.stage-inner { position: absolute; inset: 0; display: grid; place-items: center; transform-origin: 0 0; will-change: transform; }
.frame {
  position: relative; border-radius: 6px; overflow: hidden;
  background: repeating-conic-gradient(var(--chk-a) 0 25%, var(--chk-b) 0 50%) 0 0 / 20px 20px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(17, 19, 18, .06);
}
.frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
/* "before" layer: a clipping box that slides down while the canvas inside moves up by the same amount,
   so the photo stays pinned to the frame. Transform only: the GPU does it without repainting the photo,
   so it stays smooth even while the AI is busy (animating top/clip-path repainted every frame). */
.frame .before { position: absolute; top: 0; right: 0; bottom: 0; left: 0; overflow: hidden; transition: transform .9s var(--ease); }
.frame .before canvas { inset: auto; left: 0; bottom: 0; width: var(--fw); height: var(--fh); max-width: none; transition: transform .9s var(--ease); }
.frame .before.wipe { transform: translateY(100%); }
.frame .before.wipe canvas { transform: translateY(-100%); }
.frame .before.cmping, .frame .before.cmping canvas { transition: none; }
.frame.brushing { cursor: none; }
.scan {
  position: absolute; left: 0; right: 0; top: 0; height: 30%; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(200, 255, 46, .10) 70%, rgba(200, 255, 46, .42) 98%, rgba(255, 255, 255, .9));
  transform: translateY(-100%); will-change: transform;
}
/* compositor-only (transform): stays smooth even while the AI keeps every core busy */
.scan.on { opacity: 1; animation: scan 1.8s cubic-bezier(.5, 0, .5, 1) infinite; }
@keyframes scan { from { transform: translateY(-100%); } to { transform: translateY(333.4%); } }
.cmp-handle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 0; display: none; cursor: ew-resize; z-index: 3;
}
.cmp-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: #fff; box-shadow: 0 0 12px rgba(0, 0, 0, .5); }
.cmp-handle i {
  position: absolute; top: 50%; left: 0; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%;
  background: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, .45);
}
.cmp-handle i::before { content: "‹ ›"; position: absolute; inset: 0; display: grid; place-items: center; color: #111; font: 700 16px/1 var(--sans); letter-spacing: 2px; }
.frame.comparing .cmp-handle { display: block; }

.brush-cursor {
  position: absolute; left: 0; top: 0; pointer-events: none; border-radius: 50%; display: none; z-index: 5;
  border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(0, 0, 0, .4);
}
.brush-cursor.erase { background: rgba(255, 40, 70, .22); border-color: #ff5a6a; }
.brush-cursor.restore { background: rgba(200, 255, 46, .18); border-color: #c8ff2e; }
/* − removes, + brings back: readable at a glance without looking at the tool buttons */
.brush-cursor.erase::after, .brush-cursor.restore::after { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font: 700 18px/1 var(--sans); text-shadow: 0 0 3px rgba(0, 0, 0, .8); }
.brush-cursor.erase::after { content: "−"; }
.brush-cursor.restore::after { content: "+"; }

.status {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 6;
  width: min(440px, calc(100% - 32px)); padding: 14px 16px; border-radius: 18px;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line-2); box-shadow: 0 20px 50px -20px rgba(17, 19, 18, .35); animation: up .35s var(--ease);
}
@keyframes up { from { opacity: 0; transform: translate(-50%, 10px); } }
.status-row { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 600; }
.status-bytes { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 500; font-size: 13px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(200, 255, 46, .25); border-top-color: var(--lime-ink); animation: spin .8s linear infinite; flex: none; }
.status.err .spinner { display: none; }
.status.err .status-row { color: var(--danger); }
@keyframes spin { to { transform: rotate(360deg); } }
.bar { margin-top: 12px; height: 6px; border-radius: 99px; background: rgba(17, 19, 18, .08); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--lime), #7dffb0); transition: width .25s; }
.status-note { margin-top: 10px; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.status .btn { margin-top: 12px; }

.zoom {
  position: absolute; right: 14px; bottom: 14px; z-index: 4; display: flex; align-items: center; gap: 2px; padding: 4px;
  border-radius: 14px; background: rgba(255, 255, 255, .9); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.zoom-val { min-width: 54px; height: 32px; border-radius: 10px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.zoom-val:hover { background: rgba(17, 19, 18, .08); }

.panel { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); background: var(--bg-2); }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 10px; border-bottom: 1px solid var(--line); }
.tab {
  display: flex; align-items: center; justify-content: center; gap: 7px; height: 40px; border-radius: 12px;
  color: var(--muted); font-size: 14px; font-weight: 600; transition: background .15s, color .15s;
}
.tab .ic { width: 18px; height: 18px; }
.tab:hover { color: var(--text); }
.tab.on { background: rgba(17, 19, 18, .08); color: var(--text); }
.panes { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.pane { display: none; padding: 18px; flex-direction: column; gap: 16px; }
.pane.on { display: flex; animation: fade .25s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }
.sub-h { margin-top: 6px; color: var(--dim); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.hint { color: var(--muted); font-size: 13px; margin-top: -6px; }

.bg-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.bg-grid .lbl { grid-column: 1 / -1; margin-top: 6px; color: var(--dim); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.sw {
  position: relative; aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--line-2); overflow: hidden;
  transition: transform .15s var(--ease), box-shadow .15s; background-size: cover; background-position: center;
}
.sw:hover { transform: scale(1.06); }
.sw.on { box-shadow: 0 0 0 2px var(--bg-2), 0 0 0 4px var(--lime); }
.sw .ic { position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.sw-none { background: repeating-conic-gradient(#d9ddd5 0 25%, #fff 0 50%) 0 0 / 12px 12px; }
.field { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.field input[type="color"] { width: 44px; height: 32px; border: 1px solid var(--line-2); border-radius: 10px; background: none; padding: 2px; cursor: pointer; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(17, 19, 18, .05); border: 1px solid var(--line); }
.seg button { display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--muted); transition: background .15s, color .15s; }
.seg button .ic { width: 18px; height: 18px; }
.seg button.on { background: var(--text); color: #fff; }
#toolSeg button[data-tool="erase"].on { background: var(--danger); color: #fff; }
#toolSeg button[data-tool="restore"].on { background: var(--lime); color: #0b0d00; }
.seg-sm button { height: 32px; font-size: 13px; padding: 0 10px; }

.range { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; font-size: 14px; color: var(--muted); }
.range input { grid-column: 1 / -1; width: 100%; }
.range output { font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; font-size: 13px; }
input[type="range"] { -webkit-appearance: none; appearance: none; height: 24px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 5px; border-radius: 99px; background: linear-gradient(90deg, var(--lime) var(--p, 50%), rgba(17, 19, 18, .12) var(--p, 50%)); }
input[type="range"]::-moz-range-track { height: 5px; border-radius: 99px; background: rgba(17, 19, 18, .12); }
input[type="range"]::-moz-range-progress { height: 5px; border-radius: 99px; background: var(--lime); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7.5px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: #fff; }

.switch { display: flex; align-items: center; gap: 12px; font-size: 14.5px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch i { position: relative; width: 42px; height: 24px; border-radius: 99px; background: rgba(17, 19, 18, .14); transition: background .2s; flex: none; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.switch input:checked + i { background: var(--lime); }
.switch input:checked + i::after { transform: translateX(18px); background: #0b0d00; }
.switch input:focus-visible + i { outline: 2px solid var(--lime); outline-offset: 2px; }
.lite-note { padding: 12px 14px; border-radius: 14px; background: rgba(139, 92, 246, .12); border: 1px solid rgba(139, 92, 246, .3); color: var(--muted); font-size: 13px; }
.lite-note .link { display: block; margin-top: 6px; color: var(--lime-ink); }

.size-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.size-grid button {
  display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 10px; text-align: left;
  padding: 12px; border-radius: 14px; background: rgba(17, 19, 18, .04); border: 1px solid var(--line); transition: border-color .15s, background .15s;
}
.size-grid button:hover { border-color: var(--line-2); }
.size-grid button.on { border-color: var(--lime-ink); background: rgba(200, 255, 46, .07); }
.size-grid b { font-size: 14px; font-weight: 600; }
.size-grid small { grid-column: 2; color: var(--muted); font-size: 12px; }
.size-grid b:only-of-type { grid-row: span 2; }
.sz { grid-row: span 2; justify-self: center; width: calc(var(--w) * 1px); height: calc(var(--h) * 1px); border-radius: 4px; border: 2px solid var(--muted); }
.size-grid .on .sz { border-color: var(--lime-ink); }
.sz-sub { border-style: dashed; }
.sz-white { background: #fff; border-color: #fff; }
.sz-sticker { border-radius: 8px; border-color: #fff; box-shadow: 0 0 0 2px #25d366; }

.export { padding: 14px 16px; padding-bottom: max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 12px; background: var(--bg-2); }
.export-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.export-meta .seg { flex: none; }
.dims { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; min-height: 24px; padding: 2px 6px; border-radius: 8px; text-decoration: underline dotted; text-underline-offset: 3px; }
.dims:not(:disabled):hover { color: var(--text); background: var(--soft); }
.dims:disabled { opacity: 1; cursor: default; text-decoration: none; }
.export-btns { display: flex; gap: 8px; position: relative; }
.btn-dl .chev { display: none; width: 16px; height: 16px; margin-left: -2px; }
.btn-dl.multi .chev { display: inline-block; }
.btn-dl.multi.icon-only .chev { display: none; }
.dl-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); z-index: 30; display: grid; padding: 6px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(0,0,0,.35); }
.dl-menu[hidden] { display: none; }
.dl-menu button { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 10px; font: inherit; font-weight: 600; color: inherit; background: none; border: 0; text-align: left; cursor: pointer; }
.dl-menu button:hover, .dl-menu button:focus-visible { background: var(--line); }
.dl-menu .ic { width: 18px; height: 18px; flex: none; }
.btn-dl { flex: 1; }

.queue { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--bg); min-height: 0; }
.queue.single { display: none; }
.q-list { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.q-list::-webkit-scrollbar { display: none; }
.q-item { position: relative; flex: none; width: 52px; height: 52px; border-radius: 12px; overflow: hidden; border: 2px solid transparent; background: var(--panel-2); }
.q-item img { width: 100%; height: 100%; object-fit: cover; }
.q-item.on { border-color: var(--lime-ink); }
.q-item::after { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, .6); opacity: 0; transition: opacity .2s; }
.q-item.busy::after, .q-item.wait::after { opacity: 1; }
.q-item.busy::before { content: ""; position: absolute; z-index: 1; inset: 0; margin: auto; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(200, 255, 46, .25); border-top-color: var(--lime-ink); animation: spin .8s linear infinite; }
.q-item.done .q-ok { position: absolute; right: 3px; bottom: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--lime); color: #0b0d00; display: grid; place-items: center; }
.q-ok .ic { width: 11px; height: 11px; stroke-width: 3.2; }
.q-item.err::after { opacity: 1; background: rgba(255, 90, 106, .45); }
.q-add { flex: none; width: 52px; height: 52px; border-radius: 12px; border: 1.5px dashed var(--line-2); color: var(--muted); display: grid; place-items: center; }
.q-add:hover { border-color: var(--lime-ink); color: var(--lime-ink); }
.q-zip { margin-left: auto; flex: none; }

.dropover {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; pointer-events: none;
  background: rgba(246, 247, 244, .88); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.dropover > div {
  display: grid; justify-items: center; gap: 16px; padding: 48px 64px; border-radius: 32px;
  border: 2px dashed var(--lime); color: var(--lime-ink); font: 800 28px/1.1 var(--display); animation: pulse 1.2s ease-in-out infinite;
}
.dropover .ic { width: 48px; height: 48px; }
@keyframes pulse { 50% { transform: scale(1.03); } }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 95; transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; max-width: calc(100% - 32px);
  background: var(--ink); color: #fff; font-size: 14.5px; font-weight: 600; box-shadow: 0 20px 50px -20px rgba(17, 19, 18, .35);
  transition: opacity .25s, transform .35s var(--ease);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast .ic { width: 18px; height: 18px; color: var(--lime); stroke-width: 2.6; }
body.ed-open .toast { bottom: 150px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* cut-out strength (model probability threshold) */
.cutout { padding: 14px 16px 12px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(200, 255, 46, .06), transparent); }
.cutout-h { display: flex; align-items: center; justify-content: space-between; font-size: 14px; font-weight: 600; }
.cutout-h span { display: inline-flex; align-items: center; gap: 8px; }
.cutout-h .ic { width: 17px; height: 17px; color: var(--lime-ink); }
.cutout-h output { min-width: 34px; text-align: center; padding: 2px 8px; border-radius: 8px; background: rgba(17, 19, 18, .07); font-size: 13px; font-variant-numeric: tabular-nums; }
.cutout input { width: 100%; margin-top: 6px; }
.cutout-ends { display: flex; justify-content: space-between; color: var(--dim); font-size: 12px; font-weight: 500; }
#grow::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, rgba(255, 90, 106, .55), rgba(17, 19, 18, .14) 50%, rgba(200, 255, 46, .7));
}

/* hero: AI download / ready indicator */
.ai-state { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); background: rgba(17, 19, 18, .05); }
.ai-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.ai-state.loading i { background: #facc15; animation: blink 1s ease-in-out infinite; }
.ai-state.ready { color: var(--lime-ink); background: rgba(200, 255, 46, .08); }
.ai-state.ready i { background: var(--lime); box-shadow: 0 0 10px var(--lime); }
@keyframes blink { 50% { opacity: .3; } }

/* ---------- the wait: orb, rotating tips, AI-vision dot mesh ---------- */
.status-row { min-height: 24px; }
.status-text { flex: 1; min-width: 0; }
.status-text.in { animation: tipIn .5s var(--ease); }
@keyframes tipIn { from { opacity: 0; transform: translateY(6px); filter: blur(3px); } }
.status-pct { color: var(--lime-ink); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px; }
.orb { position: relative; width: 22px; height: 22px; flex: none; border-radius: 50%; background: conic-gradient(from 0deg, var(--lime), var(--cyan), var(--violet), var(--pink), var(--lime)); animation: spin 1.6s linear infinite; filter: drop-shadow(0 0 8px rgba(200, 255, 46, .55)); }
.orb i { position: absolute; inset: 3px; border-radius: 50%; background: var(--panel); }
.orb i::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--lime); animation: pulse 1.2s ease-in-out infinite; }
.status.err .orb { display: none; }
.bar i { background: linear-gradient(90deg, var(--lime), var(--cyan), var(--violet), var(--lime)); background-size: 300% 100%; animation: flow 2.4s linear infinite; transition: none; }
@keyframes flow { to { background-position: 300% 0; } }
/* one bar, split into the steps of the wait (download → prepare → cut) */
.wsteps { display: flex; gap: 6px; margin-top: 12px; }
.wstep { flex: var(--w, 1); min-width: 0; transition: flex .5s var(--ease); }
.wstep[hidden] { display: none; }
.wstep .bar { margin-top: 0; }
.wstep .bar i { animation: none; background: rgba(200, 255, 46, .55); }
.wstep.on .bar i { animation: flow 2.4s linear infinite; background: linear-gradient(90deg, var(--lime), var(--cyan), var(--violet), var(--lime)); background-size: 300% 100%; }
.wstep.done .bar i { background: var(--lime); }
.wstep span { display: flex; align-items: center; gap: 4px; margin-top: 7px; font-size: 11.5px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .3s; }
.wstep.on span { color: var(--text); }
.wstep.done span { color: var(--lime-ink); }
.wstep.done span::before { content: "✓"; }
.wsteps.single .wstep span { display: none; }
.status-pct { white-space: nowrap; }
.vision { position: absolute; inset: 0; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .5s; }
/* the dotted band rides with the scan line as one moving layer (no per-frame mask repaint) */
.vision::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 24%;
  background: radial-gradient(circle, rgba(200, 255, 46, .95) 1.1px, transparent 1.8px) 0 0 / 16px 16px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 70%, #000 92%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 70%, #000 92%, transparent);
  transform: translateY(-100%);
}
.frame.busy .vision::before { will-change: transform; animation: vision 1.8s cubic-bezier(.5, 0, .5, 1) infinite; }   /* only while working */
@keyframes vision { from { transform: translateY(-100%); } to { transform: translateY(416.7%); } }
.frame.busy .vision { opacity: .9; }
/* dim the photo with a plain overlay: a CSS filter on the canvas costs a second full-size GPU copy */
.frame .before::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: rgba(17, 19, 18, .32); opacity: 0; transition: opacity .6s; }
.frame.busy .before::after { opacity: 1; }
.frame.busy::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 0 0 2px rgba(200, 255, 46, .5), inset 0 0 60px rgba(200, 255, 46, .18);
  animation: pulse 1.6s ease-in-out infinite;
}

/* ---------- editor: half screen keeps the side panel (narrower), phones get photo-first + bottom dock ---------- */
.tab-cut, .ed-add { display: none; }
@media (max-width: 1100px) and (min-width: 761px) {
  .ed-body { grid-template-columns: 1fr 312px; }
  .tabs .tab { font-size: 13px; gap: 5px; }
  .pane { padding: 14px; }
  .bg-grid { gap: 7px; }
  .size-grid { grid-template-columns: repeat(2, 1fr); }
  .export-meta { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .ed { grid-template-rows: auto 1fr; grid-template-columns: minmax(0, 1fr); }
  .ed-top > *, .ed-body > * { min-width: 0; }
  .ed-title { flex: 1; }
  .ed-title strong { max-width: none; }
  .ed-top { padding: 6px 8px; padding-top: max(6px, env(safe-area-inset-top)); gap: 6px; }
  .ed-title strong { max-width: 34vw; font-size: 14px; }
  .ed-title span { font-size: 11.5px; }
  .ed-tools .pill-btn span { display: none; }
  .ed-tools .pill-btn { padding: 0 11px; }
  .ed-add { display: inline-flex; }
  .ed.multi .ed-add { display: none; }
  .queue { display: none; }
  .ed.multi .queue { display: flex; grid-row: 3; padding: 6px 10px; }
  .ed.multi { grid-template-rows: auto 1fr auto; }

  .ed-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .zoom { display: none; }
  /* on phones "share" does what "copy" does (and more): keep one so the download button stays wide */
  #shareBtn:not([hidden]) ~ #copyBtn, .export-btns:has(#shareBtn:not([hidden])) #copyBtn { display: none; }
  .status { bottom: 12px; }
  .panel { border-left: 0; border-top: 1px solid var(--line); max-height: none; }
  /* order inside the panel: sheet (cut-out slider or a pane) → download row → dock */
  .panel .cutout { order: 1; display: none; border-bottom: 0; background: none; padding: 14px 16px 10px; }
  .panel .panes { order: 1; display: none; max-height: 36vh; flex: none; }
  .panel .export { order: 2; }
  .panel .tabs { order: 3; }
  .panel.sheet-open[data-tab="cut"] .cutout { display: block; animation: sheetUp .28s var(--ease); }
  .panel.sheet-open:not([data-tab="cut"]) .panes { display: block; animation: sheetUp .28s var(--ease); }
  @keyframes sheetUp { from { opacity: 0; transform: translateY(14px); } }
  .panel.sheet-open .export { border-top: 1px solid var(--line); }

  .tabs { grid-template-columns: repeat(4, 1fr); gap: 2px; padding: 4px 6px; padding-bottom: max(4px, env(safe-area-inset-bottom)); border-bottom: 0; border-top: 1px solid var(--line); }
  .tab-cut { display: flex; }
  .tab { flex-direction: column; gap: 3px; height: 54px; font-size: 11.5px; font-weight: 600; border-radius: 12px; }
  .tab .ic { width: 21px; height: 21px; }
  .tab.on { background: none; color: var(--text); }
  .tab.on .ic { color: var(--lime-ink); }
  .panel.sheet-open .tab.on { background: rgba(17, 19, 18, .07); }

  .pane { padding: 12px 14px; gap: 10px; }
  .pane .hint { display: none; }
  .range { gap: 0 12px; font-size: 13px; }
  .range output { grid-row: 1; grid-column: 2; }
  .pane .seg button { height: 38px; }
  .pane .sub-h { margin-top: 2px; }
  /* backgrounds: two compact scrolling rows instead of big tiles */
  .bg-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, 46px); grid-template-columns: none; grid-auto-columns: 46px; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; padding: 4px 2px 6px; scrollbar-width: none; }
  .bg-grid::-webkit-scrollbar { display: none; }
  .bg-grid .lbl { display: none; }
  .bg-grid .sw { border-radius: 12px; }
  .size-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .size-grid button { grid-template-columns: 1fr; grid-template-rows: 34px auto; justify-items: center; text-align: center; row-gap: 4px; padding: 8px 4px; border-radius: 12px; }
  .size-grid .sz { grid-row: auto; transform: scale(.85); }
  .size-grid b { font-size: 11.5px; line-height: 1.15; }
  .size-grid b:only-of-type { grid-row: auto; }
  .size-grid button small { display: none; }
  .ed.multi .q-item, .ed.multi .q-add { width: 42px; height: 42px; border-radius: 10px; }

  .export { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
  .export-meta { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
  .export-meta .dims { display: block; font-size: 11.5px; min-height: 22px; padding: 2px 4px; text-align: left; white-space: nowrap; }
  .export-meta .seg-sm button { padding: 0 8px; height: 34px; font-size: 12.5px; }
  .export-btns { flex: 1; display: flex; gap: 6px; min-width: 0; }
  .export-btns .btn-dl { flex: 1; min-width: 0; height: 46px; padding: 0 12px; font-size: 15px; }
  .export-btns .icon-btn.lg { width: 46px; height: 46px; flex: none; }
  body.ed-open .toast { bottom: 150px; }
}

.foot-copy { color: var(--muted); }

/* retouch v2 + region */
.brush-cursor.piece { border-radius: 50%; background: rgba(255, 90, 106, .35); }
.brush-cursor.piece::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #fff; }
#brushOpts.dim { opacity: .4; pointer-events: none; }
.roi-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.roi-row .btn.on { background: var(--lime, #c8ff2e); color: #111; }
.frame.roi-mode { cursor: crosshair; }
.roi-box { position: absolute; z-index: 4; pointer-events: none; border: 2px dashed #fff; border-radius: 4px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .45), 0 0 0 1px rgba(0, 0, 0, .5); }
.frame:has(.roi-box:not([hidden])) { overflow: hidden; }
#toolSeg button, .pane #toolSeg button { flex-direction: column; gap: 4px; height: 58px; font-size: 12.5px; white-space: nowrap; padding: 0 4px; }

/* SEO landing pages */
.about .about-p { margin-top: 18px; font-size: 18px; line-height: 1.65; color: var(--muted); max-width: 760px; }
.ulinks { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.ulink { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; border: 1px solid var(--line); background: rgba(17, 19, 18, .03); color: var(--text); font-weight: 600; font-size: 15px; transition: border-color .2s, background .2s, transform .2s; }
.ulink span { opacity: .8; }
.ulink:hover { border-color: var(--lime-ink); background: rgba(200, 255, 46, .06); transform: translateY(-2px); }
.ulink.on { border-color: var(--lime-ink); color: var(--lime-ink); }
.lang-hint { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 16px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 12px 40px -16px rgba(17, 19, 18, .35); font-size: 14px; white-space: nowrap; animation: langIn .5s var(--ease) both; }
.lang-hint a { color: var(--lime-ink); font-weight: 600; }
.lang-hint button { width: 32px; height: 32px; border-radius: 50%; color: var(--muted); }
.lang-hint button:hover { background: rgba(17, 19, 18, .08); color: var(--text); }
body.ed-open .lang-hint { display: none; }
@keyframes langIn { from { opacity: 0; transform: translate(-50%, 12px); } }
.lang-hint { top: 76px; bottom: auto; }

/* ---------- motion: transform/opacity only (cheap on phones); off with reduced motion ---------- */
.js [data-rv] .kicker, .js [data-rv] h2, .js [data-rv] .uses > *, .js [data-rv] .steps > *, .js [data-rv] .feats > *, .js [data-rv] .cmp, .js [data-rv] .faq, .js [data-rv] .cta, .js .vs[data-rv] .c {
  opacity: 0; transform: translateY(40px) scale(.97);
  transition: opacity .9s cubic-bezier(.16, 1, .3, 1), transform 1s cubic-bezier(.16, 1, .3, 1), box-shadow .3s; transition-delay: calc(var(--i, 0) * 90ms);
}
.js [data-rv].in .kicker, .js [data-rv].in h2, .js [data-rv].in .uses > *, .js [data-rv].in .steps > *, .js [data-rv].in .feats > *, .js [data-rv].in .cmp, .js [data-rv].in .faq, .js [data-rv].in .cta, .js .vs[data-rv].in .c { opacity: 1; transform: none; filter: none; }
/* backwards, not both: once finished the element lets go of the animation; a "forwards" fill keeps it on its own GPU layer and makes Chrome squash everything below it into page-sized layers (~80 MB on a phone) */
.hero-copy > *, .tool { animation: rise .7s var(--ease) backwards; }
.hero-copy > :nth-child(2) { animation-delay: .06s; } .hero-copy > :nth-child(3) { animation-delay: .12s; }
.hero-copy > :nth-child(4) { animation-delay: .18s; } .hero-copy > :nth-child(5) { animation-delay: .24s; } .tool { animation-delay: .15s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.tsamples button { transition: transform .2s var(--ease), border-color .2s; }
.tsamples button:hover { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) {
  .js [data-rv] * { opacity: 1 !important; transform: none !important; }
  .hero-copy > *, .tool { animation: none; }
}

/* queue: remove a photo (always visible on touch, on hover with a mouse) */
.q-cell { position: relative; flex: none; padding: 6px 6px 0 0; }
.q-x { position: absolute; top: 0; right: 0; z-index: 2; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; border: 2px solid var(--bg); opacity: 0; transform: scale(.8); transition: opacity .15s, transform .15s; }
.q-x .ic { width: 12px; height: 12px; stroke-width: 3; }
.q-cell:hover .q-x, .q-x:focus-visible { opacity: 1; transform: none; }
@media (pointer: coarse) { .q-x { opacity: 1; transform: none; } }

/* hero carousel: the outgoing card is a snapshot on top; thumbnails show the auto-advance progress */
.ba-ghost { pointer-events: none; z-index: 3; box-shadow: 0 20px 40px -24px rgba(17, 19, 18, .45); }
.tsamples button { position: relative; overflow: hidden; }
.tsamples button::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--lime); transform: scaleX(0); transform-origin: left; }
.tsamples button.run::after { animation: tprog var(--dur, 2600ms) linear forwards; }
@keyframes tprog { to { transform: scaleX(1); } }

/* ---------- premium motion (from the previous design, re-tuned for the light theme) ---------- */
.w { display: inline-block; }
.js .split .w { opacity: 0; transform: translateY(.5em) rotate(4deg); transition: opacity .8s var(--ease), transform .9s cubic-bezier(.2, .9, .3, 1.2), filter .8s; transition-delay: calc(var(--w) * 70ms + 80ms); }
.js .split.in .w, .js [data-rv].in .split .w { opacity: 1; transform: none; filter: none; }
.js [data-rv] h2.split { opacity: 1; transform: none; filter: none; }
.hero-copy > h1.split { animation: none; }
.js [data-rv] .kicker { letter-spacing: .4em; transition: opacity .9s var(--ease), transform .9s var(--ease), letter-spacing 1.1s var(--ease), filter .9s; }
.js [data-rv].in .kicker { letter-spacing: .14em; }
.js [data-rv] .steps li::before { transform: scale(.3) rotate(-30deg); transition: transform .9s cubic-bezier(.2, 1.1, .4, 1) calc(var(--i, 0) * 90ms + .3s); }
.js [data-rv].in .steps li::before { transform: none; }
.js .cmp-row .us .ic { transform: scale(0); transition: transform .6s cubic-bezier(.2, 1.1, .4, 1); }
.js [data-rv].in .cmp-row .us .ic { transform: none; }
.js [data-rv].in .cmp-row:nth-child(3) .us .ic { transition-delay: .5s; } .js [data-rv].in .cmp-row:nth-child(4) .us .ic { transition-delay: .6s; }
.js [data-rv].in .cmp-row:nth-child(5) .us .ic { transition-delay: .7s; } .js [data-rv].in .cmp-row:nth-child(6) .us .ic { transition-delay: .8s; }
.js [data-rv].in .cmp-row:nth-child(2) .us .ic { transition-delay: .4s; }

.spot { --x: 50%; --y: 50%; position: relative; }
.spot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s; z-index: 1;
  background: radial-gradient(420px circle at var(--x) var(--y), rgba(200, 255, 46, .16), transparent 55%); }
.spot:hover::after { opacity: 1; }
.use.spot::before, .steps li.spot::before { z-index: 2; }
.use.spot::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none; opacity: 0; transition: opacity .35s; z-index: 4;
  background: radial-gradient(300px circle at var(--x) var(--y), var(--lime-ink), rgba(200, 255, 46, .6) 40%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.use.spot:hover::before { opacity: 1; }
.js [data-rv].in .tilt:hover, .tilt:hover { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px); transition: transform .12s linear, box-shadow .3s; transition-delay: 0s; }
.use.tilt:hover { box-shadow: 0 24px 48px -26px rgba(17, 19, 18, .45); }
.use .use-art > img:first-child { transition: transform .8s var(--ease); }
.use:hover .use-art > img:first-child { transform: scale(1.04); }

.magnetic { translate: var(--mx2, 0) var(--my2, 0); transition: translate .35s var(--ease), transform .15s var(--ease), background .15s; }
.btn-lime { position: relative; overflow: hidden; isolation: isolate; }
.btn-lime::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(110px circle at var(--bx, 50%) var(--by, 50%), rgba(255, 255, 255, .75), transparent 60%); }
.btn-lime:hover::after { opacity: 1; }

.nav-links { position: relative; }
.nav-links > a { position: relative; z-index: 1; }
.nav-links > a:hover { background: transparent; }
.nav-pill { position: absolute; z-index: 0; top: 0; bottom: 0; margin: auto 0; height: 36px; border-radius: 10px; background: rgba(17, 19, 18, .06); opacity: 0; pointer-events: none;
  transition: left .35s cubic-bezier(.2, .9, .3, 1.2), width .35s cubic-bezier(.2, .9, .3, 1.2), opacity .25s; }
.nav-progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--sp, 0)); pointer-events: none; background: var(--lime-ink); }
html.fx-high .js .split:not(.in) .w, html.fx-high.js [data-rv]:not(.in) .split .w { filter: blur(6px); }

/* "not happy? fine-tune it" */
.fix { margin-top: 12px; }
.fix-open { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border-radius: 10px; border: 1.5px dashed var(--lime-ink); color: var(--lime-ink); font-weight: 700; font-size: 14px; background: rgba(200, 255, 46, .12); transition: background .2s, transform .15s var(--ease); }
.fix-open:hover { background: rgba(200, 255, 46, .28); }
.fix-open:active { transform: scale(.98); }
.fix-tools { animation: fade .25s var(--ease); }
.fix-tools .hint { margin: 0 0 10px; }
.fix-seg { display: grid; grid-template-columns: repeat(3, 1fr); }
.fix-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.keep { background: #22c55e; } .dot.drop { background: #ff2e88; }
.fix-act { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.fix-act .link { font-size: 13.5px; white-space: nowrap; }
.fix-act .btn { flex: none; }
.guide-c { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
.guide-c[hidden] { display: none; }
.frame .before.guide-show, .frame .before.guide-show canvas { transform: none !important; transition: none; }
.frame .before.guide-show { right: 0 !important; }
.frame.guiding .cmp-handle { display: none; }
.roi-row:not(:has(:not([hidden]))) { display: none; }

/* ---------- features grid: icon tiles, a light that visits one cell at a time, a small loop per icon ---------- */
.feats article { position: relative; transition: background .6s var(--ease); }
.f-ic { position: relative; display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; margin-bottom: 14px; background: rgba(200, 255, 46, .2); color: var(--ink); overflow: hidden;
  transition: background .5s var(--ease), transform .6s cubic-bezier(.2, 1.1, .4, 1), box-shadow .5s; }
.feats .f-ic .ic { width: 22px; height: 22px; margin: 0; }
.js [data-rv] .feats .f-ic { transform: scale(.3) rotate(-30deg); opacity: 0; transition: opacity .5s calc(var(--i, 0) * 90ms + .3s), transform .9s cubic-bezier(.2, 1.1, .4, 1) calc(var(--i, 0) * 90ms + .3s), background .5s, box-shadow .5s; }
.js [data-rv].in .feats .f-ic { transform: none; opacity: 1; }
.feats article::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .7s var(--ease);
  background: radial-gradient(120% 90% at 20% 0%, rgba(200, 255, 46, .22), transparent 60%); }
.feats article.hot::before, .feats article:hover::before { opacity: 1; }
.feats article.hot .f-ic, .feats article:hover .f-ic { background: var(--lime); box-shadow: 0 10px 24px -10px rgba(120, 160, 0, .7); transform: translateY(-3px) rotate(-6deg) scale(1.08); }
.feats article h3 { transition: transform .5s var(--ease); }
.feats article.hot h3 { transform: translateX(3px); }
/* each icon's own loop, only while the grid is on screen and only for the lit / hovered cell */
.feats .f-ic .ic { animation: none 1.4s ease-in-out infinite; }
.feats.live article:is(.hot, :hover) .f-ic .ic { animation-name: var(--fx, fBob); }
[data-f="i-shield"] { --fx: fPulse; } [data-f="i-hd"] { --fx: fZoom; } [data-f="i-feather"] { --fx: fFloat; } [data-f="i-brush"] { --fx: fPaint; }
[data-f="i-palette"] { --fx: fSpin; } [data-f="i-crop"] { --fx: fZoom; } [data-f="i-zip"] { --fx: fBob; } [data-f="i-bolt"] { --fx: fFlash; }
.f-ic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .85) 50%, transparent 65%); transform: translateX(-120%); }
.feats.live article.hot .f-ic::after { animation: fShine 1.7s ease-out .2s; }
@keyframes fShine { to { transform: translateX(120%); } }
@keyframes fPulse { 50% { transform: scale(1.18); } }
@keyframes fZoom { 0%, 100% { transform: scale(1); } 40% { transform: scale(.82); } 70% { transform: scale(1.12); } }
@keyframes fFloat { 0%, 100% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(2px, -3px) rotate(10deg); } }
@keyframes fPaint { 0%, 100% { transform: rotate(0) translate(0, 0); } 30% { transform: rotate(-14deg) translate(-2px, 1px); } 65% { transform: rotate(10deg) translate(2px, -1px); } }
@keyframes fSpin { to { transform: rotate(360deg); } }
@keyframes fBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
@keyframes fFlash { 0%, 100% { transform: scale(1); opacity: 1; } 15% { transform: scale(1.25); } 30% { opacity: .35; } 45% { opacity: 1; transform: scale(1); } }

/* ---------- comparison: our column fills in, checks pop, the others get crossed out, a light glides down ---------- */
.cmp { position: relative; }
.cmp-row { position: relative; transition: background .3s; }
.cmp-row:not(.cmp-head):hover { background: rgba(17, 19, 18, .025); }
.cmp .us { position: relative; overflow: hidden; }
.cmp .them { color: var(--muted); }
.cmp .them .ic { width: 16px; height: 16px; color: #e5484d; stroke-width: 2.6; flex: none; }
.cmp .them em { font-style: normal; text-decoration: line-through 1.5px; text-decoration-color: transparent; }
.cmp-score { margin-left: auto; padding: 2px 9px; border-radius: 999px; background: var(--ink); color: var(--lime); font: 800 12px/1.5 var(--display); letter-spacing: .02em; }
.cmp-score.pop { animation: scorePop .45s cubic-bezier(.2, 1.1, .4, 1); }
@keyframes scorePop { 40% { transform: scale(1.12); } }
.js .cmp:not(.go) .cmp-row:not(.cmp-head) .us { background: transparent; }
.js .cmp .cmp-row:not(.cmp-head) .us { transition: background .5s var(--ease) calc(.6s + var(--r) * .26s); }
.js .cmp .us .ic { transform: scale(0) rotate(-45deg); transition: transform .6s cubic-bezier(.2, 1.1, .4, 1) calc(.7s + var(--r, 0) * .26s); }
.js .cmp.go .us .ic { transform: none; }
.js .cmp .them .ic { transform: scale(0); transition: transform .5s cubic-bezier(.2, 1.1, .4, 1) calc(.85s + var(--r, 0) * .26s); }
.js .cmp.go .them .ic { transform: none; }
.js .cmp .them em { transition: text-decoration-color .5s var(--ease) calc(.95s + var(--r, 0) * .26s), color .5s calc(.95s + var(--r, 0) * .26s); }
.js .cmp.go .them em { text-decoration-color: currentColor; color: var(--muted); }
.cmp-row:not(.cmp-head) .us::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 60%; transform: translateY(-100%); pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(200, 255, 46, .55), transparent); opacity: 0; }
.cmp.live.go .cmp-row:not(.cmp-head) .us::after { animation: colGlide 4.2s ease-in-out infinite; animation-delay: calc(2.2s + var(--r) * .18s); }
@keyframes colGlide { 0% { transform: translateY(-100%); opacity: 0; } 8% { opacity: 1; } 30% { transform: translateY(170%); opacity: 1; } 31%, 100% { transform: translateY(170%); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .js .cmp .us .ic, .js .cmp .them .ic { transform: none; } .js .cmp .them em { text-decoration-color: currentColor; } .js .cmp:not(.go) .cmp-row:not(.cmp-head) .us { background: rgba(200, 255, 46, .14); } }

/* lighter tiers: keep the reveals, drop the continuous extras */
html:is(.fx-mid, .fx-low) .feats.live article .f-ic .ic, html:is(.fx-mid, .fx-low) .cmp.live.go .us::after, html:is(.fx-mid, .fx-low) .feats.live article.hot .f-ic::after { animation: none; }
html.fx-low .tilt:hover { transform: none; }

/* brush preview while choosing size / tool */
.brush-prev { position: absolute; z-index: 6; left: 50%; top: 50%; pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(.85); transition: opacity .3s var(--ease), transform .3s var(--ease); display: grid; justify-items: center; gap: 10px; }
.brush-prev.on { opacity: 1; transform: translate(-50%, -50%); }
.brush-prev i { width: var(--d, 40px); height: var(--d, 40px); border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .45), 0 6px 20px rgba(0, 0, 0, .25); transition: width .12s, height .12s; }
.brush-prev.erase i { background: radial-gradient(circle, rgba(255, 90, 106, .55) 45%, rgba(255, 90, 106, .15) 72%); }
.brush-prev.restore i { background: radial-gradient(circle, rgba(200, 255, 46, .6) 45%, rgba(200, 255, 46, .18) 72%); }
.brush-prev b { padding: 4px 10px; border-radius: 999px; background: rgba(17, 19, 18, .82); color: #fff; font-size: 12.5px; font-weight: 600; white-space: nowrap; }

.brush-row { display: grid; grid-template-columns: 1fr 76px; gap: 14px; align-items: center; }
.bbox { position: relative; width: 76px; height: 76px; border-radius: 14px; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden;
  background: repeating-conic-gradient(#e7e9e4 0 25%, #fff 0 50%) 0 0 / 14px 14px; }
.bbox i { width: var(--d, 40px); height: var(--d, 40px); border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .45); transition: width .1s, height .1s, background .2s; }
.bbox.restore i { background: radial-gradient(circle, rgba(140, 200, 0, .75) 45%, rgba(200, 255, 46, .3) 72%); }
.bbox.erase i { background: radial-gradient(circle, rgba(255, 90, 106, .7) 45%, rgba(255, 90, 106, .25) 72%); }
.bbox.big::after { content: "↗"; position: absolute; right: 5px; top: 3px; font-size: 12px; font-weight: 800; color: var(--ink); }

/* edge softness lives with the cut-out controls */
.cutout .cut-soft { margin-top: 14px; font-size: 14px; color: var(--text); font-weight: 600; }
.cutout .cut-soft input { margin-top: 0; }
/* phones: "not happy?" floats over the photo */
.fix-chip { display: none; }
@media (max-width: 760px) {
  .fix-chip:not([hidden]) { position: absolute; z-index: 6; left: 0; right: 0; margin: 0 auto; width: -webkit-fit-content; width: fit-content; max-width: calc(100% - 24px); top: 12px; display: flex; align-items: center; height: 42px; padding: 0 5px 0 0; border-radius: 999px; white-space: nowrap; overflow: hidden; isolation: isolate;
    background: var(--ink); color: var(--lime); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5), 0 0 0 1px rgba(200, 255, 46, .35); animation: chipIn .5s var(--ease) both .6s; }
  .fix-go { display: inline-flex; align-items: center; gap: 8px; height: 100%; padding: 0 10px 0 15px; color: inherit; font-weight: 700; font-size: 14px; }
  .fix-go .ic { width: 16px; height: 16px; flex: none; }
  .fix-x { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .12); color: #fff; flex: none; }
  .fix-x .ic { width: 13px; height: 13px; stroke-width: 2.6; }
  @keyframes chipIn { from { opacity: 0; transform: translateY(-10px); } }
  .panel.sheet-open ~ * .fix-chip, .ed:has(.panel.sheet-open) .fix-chip { display: none; }
}
@media (max-width: 760px) {
  /* while marking on a phone only the marking tools stay in the sheet: more room for the photo */
  .cutout:has(#fixTools:not([hidden])) > :not(.fix), .fix-tools .hint { display: none; }
}

/* effects (shadow, sticker outline) at the top of the Background tab */
.fx-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.fx-row #outlineRow { grid-column: 1 / -1; }

/* "what should we cut out?" while the AI works, and "this looks busy" after a doubtful cut */
.zone-card:not([hidden]) { position: absolute; z-index: 6; left: 0; right: 0; margin: 0 auto; top: 14px; width: min(420px, calc(100% - 24px)); padding: 12px; border-radius: 16px;
  background: rgba(255, 255, 255, .96); border: 1px solid var(--line); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .45); display: grid; gap: 10px; animation: chipIn .45s var(--ease) both .5s; }
.zone-card b { font-size: 14.5px; text-align: center; color: var(--ink); }
.zone-card div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.zone-card button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 42px; border-radius: 11px; border: 1px solid var(--line); background: var(--bg-2); font-weight: 700; font-size: 14px; color: var(--ink); }
.zone-card button.on { background: var(--ink); color: var(--lime); border-color: var(--ink); }
.zone-card button .ic { width: 16px; height: 16px; }
.zone-card.doubt { top: auto; bottom: 16px; animation-delay: .9s; }
@keyframes chipIn { from { opacity: 0; transform: translateY(-10px); } }

/* sticker outline: thickness + colour */
.outline-row { grid-column: 1 / -1; display: grid; gap: 10px; }
.outline-row[hidden] { display: none; }
.outline-cs { display: flex; gap: 8px; align-items: center; }
.outline-cs button, .oc-custom { width: 30px; height: 30px; border-radius: 50%; background: var(--c); border: 1px solid rgba(17, 19, 18, .2); box-shadow: inset 0 0 0 2px #fff; cursor: pointer; transition: transform .15s var(--ease); }
.outline-cs button.on, .oc-custom.on { outline: 2.5px solid var(--lime-ink); outline-offset: 2px; }
.outline-cs button:hover, .oc-custom:hover { transform: scale(1.1); }
.oc-custom { position: relative; overflow: hidden; background: conic-gradient(#ff4d4d, #ffd84d, #4dff88, #4dd2ff, #8a4dff, #ff4dd2, #ff4d4d); }
.oc-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* a light that crosses "not happy? fine-tune it" every few seconds (transform only, one small layer) */
.fix-chip::after, .fix-open::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 45%; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(200, 255, 46, .55), transparent); transform: translateX(-120%); animation: fixShine 3.6s ease-in-out 1.4s infinite; }
.fix-open::after { background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .9), transparent); }
.fix-open { position: relative; overflow: hidden; isolation: isolate; }
@keyframes fixShine { 0% { transform: translateX(-120%); } 35%, 100% { transform: translateX(330%); } }
@media (prefers-reduced-motion: reduce) { .fix-chip::after, .fix-open::after { animation: none; display: none; } }
html.fx-low .fix-chip::after, html.fx-low .fix-open::after { display: none; }

.smart-sw span { display: grid; gap: 2px; }
.smart-sw small { font-size: 12.5px; color: var(--muted); font-weight: 400; line-height: 1.35; }
@media (max-width: 760px) {
  /* the open sheet never takes more than ~a third of the screen: the photo stays the star */
  .panel .panes { max-height: 30vh; overflow-y: auto; overscroll-behavior: contain; }
  .panel .cutout { max-height: 34vh; overflow-y: auto; }
  .bg-grid { gap: 8px; }
  .bg-grid > button { width: 44px; height: 44px; border-radius: 11px; }
  .fx-row { gap: 4px 10px; padding-bottom: 8px; }
  .fx-row .switch { font-size: 14px; }
  .brush-row { grid-template-columns: 1fr 58px; }
  .bbox { width: 58px; height: 58px; border-radius: 12px; }
  .smart-sw small { display: none; }
  .export { padding-top: 8px; padding-bottom: 8px; }
  .export .btn-dl { height: 46px; }
  .tab { height: 50px; }
}

/* zoom / move bar on the side of the photo (phones and computers) */
.zoom { display: none !important; }
.zbar:not([hidden]) { position: absolute; z-index: 7; right: 12px; top: 0; bottom: 0; margin: auto 0; height: -webkit-fit-content; height: fit-content; display: grid; justify-items: center; gap: 2px; padding: 5px; border-radius: 16px;
  background: rgba(255, 255, 255, .94); border: 1px solid var(--line); box-shadow: 0 12px 30px -14px rgba(0, 0, 0, .35); }
.zbar button { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: var(--ink); }
.zbar button:hover { background: rgba(17, 19, 18, .06); }
.zbar .ic { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.zbar output { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); padding: 1px 0; }
.zbar #zbPan { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 11px 11px; }
.zbar #zbPan[aria-pressed="true"] { background: var(--ink); color: var(--lime); border-radius: 11px; }
.stage.pan-mode, .stage.pan-mode .frame { cursor: grab !important; }
.stage.pan-mode:active { cursor: grabbing !important; }
.stage.pan-mode .brush-cursor { display: none !important; }
@media (max-width: 760px) { .zbar:not([hidden]) { right: 8px; } .zbar button { width: 38px; height: 38px; } }

/* landing pages: how-to steps and tips */
.about .how-h { margin: 34px 0 12px; font-size: 20px; }
.about .how { list-style: none; counter-reset: h; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 760px; }
.about .how li { counter-increment: h; display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.about .how li::before { content: counter(h); grid-row: span 2; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--lime); font: 800 15px var(--display); }
.about .how b { font-size: 16px; }
.about .how span { color: var(--muted); font-size: 15px; line-height: 1.5; }
.about .tips { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--muted); font-size: 16px; line-height: 1.55; max-width: 760px; }
.about .tips li::marker { color: var(--lime-ink); }

/* download button: when its label doesn't fit (narrow phones, long translations) only the icon shows */
.btn-dl .lbl { white-space: nowrap; overflow: hidden; }
.btn-dl.icon-only .lbl { display: none; }
.btn-dl.icon-only .ic { margin: 0; }

/* export resolution: web (long side 2048, the default) or full */
.res-seg { margin-bottom: 6px; }
.res-seg small { font-weight: 500; opacity: .7; font-size: 12px; }
.res-note { font-size: 12.5px; color: var(--muted); margin: 0 0 12px; line-height: 1.35; }
@media (max-width: 760px) { .res-note { display: none; } }

/* "advanced cut": a zoomed pass per subject, on request (slower, more detail) */
.adv { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; margin-bottom: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); }
.adv .ic { width: 20px; height: 20px; flex: none; color: var(--lime-ink); }
.adv span { display: grid; gap: 2px; }
.adv b { font-size: 14.5px; }
.adv small { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.adv[disabled] { opacity: .6; }

/* several photos: copy this photo's look to all of them */
.look-all { margin-top: 10px; font-size: 13.5px; }

/* quick feedback card (once per visit, after the first download) */
.fb { position: fixed; left: 50%; bottom: 24px; z-index: 94; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px);
  padding: 8px 8px 8px 16px; border-radius: 18px; background: var(--ink); color: #fff; font-size: 14.5px; font-weight: 600;
  box-shadow: 0 20px 50px -20px rgba(17, 19, 18, .45); animation: fbIn .35s var(--ease); }
.fb[hidden] { display: none; }
body.ed-open .fb { bottom: 150px; }
@keyframes fbIn { from { opacity: 0; transform: translate(-50%, 20px); } }
.fb-row { display: flex; align-items: center; gap: 4px; }
.fb-row span { margin-right: 6px; }
.fb button { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.fb-row [data-v] { font-size: 20px; width: 40px; height: 40px; border-radius: 12px; }
.fb-row [data-v]:hover { background: rgba(255, 255, 255, .12); }
.fb-x { width: 32px; height: 32px; opacity: .6; display: grid; place-items: center; }
.fb-x .ic { width: 16px; height: 16px; }
.fb-why { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 8px 4px 0; max-width: 340px; }
.fb-why[hidden], .fb-txt[hidden] { display: none; }
.fb-why [data-why] { padding: 8px 12px; border-radius: 999px; background: rgba(255, 255, 255, .12); font-size: 13.5px; }
.fb-why [data-why]:hover { background: rgba(255, 255, 255, .2); }
.fb-txt { display: flex; gap: 6px; width: 100%; }
.fb-txt input { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 10px; border: 0; font: inherit; font-weight: 500; font-size: 16px; }
.fb-txt button { padding: 0 14px; border-radius: 10px; background: var(--lime) !important; color: #111 !important; }

/* invite to try your own photo after playing with the examples (transform/opacity entry only) */
.tnudge { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 14px; background: var(--ink); color: #fff; }
.tnudge[hidden] { display: none; }
.tnudge .tn-t { display: grid; gap: 2px; flex: 1; min-width: 0; font-size: 14px; line-height: 1.3; }
.tnudge .tn-t span { color: rgba(255, 255, 255, .72); font-size: 12.5px; }
.tnudge .btn { white-space: nowrap; padding: 10px 14px; font-size: 14px; }
.tnudge .tn-x { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; background: #fff; color: var(--ink); border: 1px solid var(--line); font-size: 14px; line-height: 1; display: grid; place-items: center; }
.tnudge.in { animation: tnIn .5s var(--ease) both; }
@keyframes tnIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 420px) { .tnudge { flex-wrap: wrap; } .tnudge .btn { flex: 1; } }

/* ---------- 6 nov 2026 audit fixes ---------- */
/* empty cut flagged in the batch */
.q-item.warn .q-ok { background: #ffb020; color: #1d1400; font: 800 11px/1 var(--sans); }
/* where the competitor figures come from (dated) */
.cmp-src { margin-top: 14px; color: var(--muted); font-size: 13px; line-height: 1.45; }
/* "related" links under a landing page's text */
.see-also { color: var(--muted); }
.see-also a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.about-p a { text-decoration: underline; text-underline-offset: 3px; }
/* touch targets: footer links ≥ 44 px tall on touch screens, language menu and demo sizes roomier */
@media (pointer: coarse) {
  .foot-links { gap: 0 14px; }
  .foot-links a { display: inline-flex; align-items: center; min-height: 44px; }
  .lang summary { height: 44px; }
  .sizes button { min-height: 44px; }
}
