@font-face { font-family: Manrope; src: url('./assets/fonts/Manrope.ttf') format('truetype'); font-weight: 200 800; font-display: swap; }
:root {
  font-family: Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color-scheme: light;
  --ink: #10271f; --paper: #f7f9f8; --surface: #fff; --muted: #607169;
  --line: #dfe7e2; --accent: #8cebc9; --accent-ink: #26765b;
  --ease: cubic-bezier(.22, 1, .36, 1); --touch: 44px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { border: 0; background: none; color: inherit; cursor: pointer; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button:disabled { cursor: default; opacity: .55; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #258463; outline-offset: 4px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
h1, h2, p { margin: 0; }
[hidden] { display: none !important; }
.icon-library, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 650; letter-spacing: -1px; line-height: 1; }
.brand-mark { width: 32px; height: 36px; fill: var(--ink); stroke: none; }
/* A mint edge in the existing split-U mark is repeated in the comparison divider. */
.brand-mark use { fill: var(--ink); }
#i-mark path:last-child { fill: #70deb8; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 56px; padding: 0 20px; border-radius: 16px; font-size: 15px; font-weight: 600; transition: background 160ms var(--ease), transform 160ms var(--ease), box-shadow 160ms var(--ease); }
.button-primary { background: linear-gradient(#19372b, #10271f); color: #fff; border: 1px solid #0d241b; box-shadow: inset 0 1px 0 #ffffff14, 0 4px 8px #10271f0e; }
.button-primary:hover { background: #224837; box-shadow: inset 0 1px 0 #ffffff14, 0 4px 12px #10271f18; }
.button:active:not(:disabled) { transform: scale(.985); }
.button-outline { background: #fff; border: 1px solid var(--line); }
.button-outline:hover { background: #edf2ee; }
.cta-arrow { margin-left: auto; width: 18px; height: 18px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: var(--touch); height: var(--touch); border-radius: 50%; flex-shrink: 0; }
.icon-button:hover { background: #10271f08; }
.about-button { border: 1px solid #dce5df; background: #ffffff70; }
.home { display: flex; flex-direction: column; min-height: 100svh; }
.site-header { max-width: 1280px; width: 100%; height: 96px; padding: 0 48px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.home-main { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); grid-template-areas: 'copy visual' 'actions visual'; grid-template-rows: auto auto; gap: 32px 100px; align-content: center; width: 100%; max-width: 1200px; margin: auto; padding: 32px 48px 48px; }
.home-copy { grid-area: copy; align-self: end; }
.eyebrow { font-size: 13px; font-weight: 500; color: var(--accent-ink); margin-bottom: 20px; }
.home h1 { font-size: clamp(48px, 4.5vw, 64px); line-height: 1.08; font-weight: 600; letter-spacing: -.05em; }
.home h1 span { display: block; }
.intro { color: var(--muted); font-size: 16px; line-height: 1.7; margin-top: 24px; max-width: 330px; }
.home-visual { grid-area: visual; border-radius: 28px; padding: 6px; border: 1px solid #fff; background: #fff; box-shadow: 0 20px 48px -20px #10271f2a, 0 2px 6px #10271f08, 0 0 0 1px #10271f07; }
.hero-comparison { height: min(560px, calc(100svh - 208px)); min-height: 440px; border-radius: 22px; }
.home-actions { grid-area: actions; align-self: start; max-width: 344px; }
.upload-button { width: 100%; justify-content: flex-start; }
.formats { font-size: 12px; color: var(--muted); text-align: center; margin-top: 12px; }
.formats span { margin: 0 6px; }
.home-note { font-size: 12px; line-height: 1.65; color: var(--muted); margin-top: 28px; max-width: 300px; }
.site-footer { display: flex; justify-content: space-between; align-items: center; width: 100%; max-width: 1280px; padding: 8px 48px 20px; margin: 0 auto; font-size: 11px; color: var(--muted); }
.site-footer button { min-height: 44px; font-size: 11px; padding: 0 0 0 16px; }
.comparison { position: relative; overflow: hidden; isolation: isolate; background: #d8d9d7; }
.portrait { position: absolute; inset: 0; background-repeat: no-repeat; background-position: center; background-size: contain; }
.sample-natural, .sample-beauty { background-image: url('./assets/portrait-comparison.png'); background-size: 200% auto; }
.sample-natural { background-position: right center; }
.sample-beauty { background-position: left center; }
.hero-comparison .sample-beauty, .hero-comparison .sample-natural { background-size: var(--hero-image-width, 200%) var(--hero-image-height, auto); }
.hero-comparison .sample-beauty { background-position: var(--hero-before-x, left) center; }
.hero-comparison .sample-natural { background-position: var(--hero-after-x, right) center; }
.before-layer { clip-path: inset(0 calc(100% - var(--split)) 0 0); }
.photo-labels { position: absolute; top: 16px; left: 16px; right: 16px; display: flex; justify-content: space-between; gap: 8px; pointer-events: none; z-index: 2; }
.photo-labels span { padding: 8px 12px; border-radius: 20px; font-size: 11px; line-height: 1; font-weight: 600; color: #fff; background: #17291fe0; border: 1px solid #ffffff12; }
.photo-labels span:last-child { color: #102b20; background: #a4f1d5; border-color: #ffffff42; }
.split-line { position: absolute; z-index: 2; top: 0; bottom: 0; left: 0; width: 100%; border-left: 2px solid var(--accent); transform: translateX(var(--split)); pointer-events: none; }
.split-handle { position: absolute; top: 51%; left: -1px; width: 44px; height: 44px; border-radius: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; background: #f7fffb; color: #183b2b; box-shadow: 0 3px 12px #0002, 0 0 0 1px #fff8; }
.hero-revealed .split-line, .hero-revealed .photo-labels span:first-child,
.hero-original .split-line, .hero-original .photo-labels span:last-child { opacity: 0; }
.split-handle svg { width: 22px; height: 22px; }
.comparison-range { position: absolute; z-index: 3; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.comparison:has(.comparison-range:focus-visible) { outline: 3px solid #278564; outline-offset: 4px; }
.hero-analysis { position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 4; padding: 12px 14px; border: 1px solid #e5fff126; border-radius: 14px; background: #10271ff2; color: #fff; box-shadow: 0 4px 16px #00000012; }
.analysis-heading { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #bbd9cd; line-height: 16px; }
.analysis-heading svg { width: 14px; height: 14px; color: #a4f1d5; }
.analysis-window { height: 24px; overflow: hidden; margin-top: 4px; }
.analysis-track { transition: transform 360ms var(--ease); }
.analysis-track>div { height: 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; line-height: 24px; white-space: nowrap; }
.analysis-track>div>span:last-child { color: #a4f1d5; font-size: 11px; }
.analysis-progress { height: 2px; background: #ffffff1f; margin-top: 8px; border-radius: 2px; overflow: hidden; }
.analysis-progress span { display: block; height: 100%; background: #a4f1d5; transform: scaleX(0); transform-origin: left; }
.analysis-open { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; }
.photo-footnote { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 24px 12px 12px; text-align: center; font-size: 10px; color: #fff; background: linear-gradient(transparent, #0006); pointer-events: none; }
.drop-overlay { display: none; position: absolute; z-index: 10; inset: 12px; border: 2px dashed #3b9e7a; border-radius: 24px; background: #f0faf6f2; align-items: center; justify-content: center; flex-direction: column; gap: 20px; pointer-events: none; }
.drag-active .drop-overlay { display: flex; }
.drop-overlay svg { width: 36px; height: 36px; }
.drop-overlay h2 { font-size: 24px; font-weight: 600; }
.editor { min-height: 100svh; }
.editor-header { height: 80px; max-width: 1240px; margin: 0 auto; padding: 0 32px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.editor-header>:first-child { justify-self: start; }
.editor-header>:nth-child(n+3) { justify-self: end; grid-column: 3; grid-row: 1; }
.editor-title { font-size: 15px; font-weight: 600; }
.editor-title:focus { outline: none; }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 56px; max-width: 1120px; padding: 8px 32px 40px; margin: 0 auto; align-items: center; }
.workspace { height: calc(100svh - 128px); min-height: 480px; max-height: 820px; display: flex; flex-direction: column; min-width: 0; background: #14251e; border: 1px solid #0d2119; border-radius: 28px; box-shadow: 0 16px 40px -24px #10271f48, inset 0 1px 0 #ffffff0a; overflow: hidden; }
.photo-stage { display: flex; align-items: center; justify-content: center; flex: 1; min-height: 0; padding: 16px; }
.editor-comparison { width: 100%; height: 100%; border-radius: 16px; background: #14251e; }
.editor-comparison .portrait { background-color: #14251e; }
.compare-hint { color: #c1d0c6; font-size: 11px; text-align: center; padding: 0 16px 20px; }
.editor:not(.has-result) .compare-hint { display: none; }
.original-only .before-layer { clip-path: none; }
.original-only .split-line, .original-only .comparison-range, .original-only .photo-labels span:last-child { display: none; }
.edit-panel { padding: 28px; border-radius: 24px; background: var(--surface); border: 1px solid #e2e8e4; box-shadow: 0 8px 24px #10271f06; }
.sheet-grabber { display: none; }
.panel-kicker { color: var(--accent-ink); font-size: 12px; font-weight: 500; margin-bottom: 12px; }
.panel-heading h1 { font-size: 30px; line-height: 1.18; letter-spacing: -.8px; font-weight: 600; }
.panel-heading>p:last-child { font-size: 13px; line-height: 1.6; color: var(--muted); margin-top: 12px; }
.purchase-summary { display: flex; align-items: center; gap: 12px; padding: 20px 0; margin: 12px 0 4px; border-bottom: 1px solid var(--line); }
.purchase-icon { display: grid; place-items: center; width: 40px; height: 40px; background: #f0f5f2; border-radius: 12px; }
.purchase-summary strong, .purchase-summary small { display: block; }
.purchase-summary strong { font-size: 13px; font-weight: 600; }
.purchase-summary small { font-size: 11px; color: var(--muted); margin-top: 4px; }
.purchase-lock { margin-left: auto; width: 16px; height: 16px; color: #6a7d70; }
.panel-actions { margin-top: 24px; }
.panel-actions>.button { width: 100%; font-size: 13px; gap: 8px; }
.panel-actions>.button .cta-arrow { width: 16px; height: 16px; }
.replace-link { display: block; font-size: 12px; min-height: 44px; padding: 8px 0; width: 100%; color: #52695c; margin-top: 4px; }
.replace-link:hover { color: var(--ink); text-decoration: underline; }
.availability-note, .result-note { color: var(--muted); font-size: 10px; line-height: 1.5; text-align: center; margin-top: 4px; }
.payment-status { font-size: 12px; line-height: 1.6; color: #3c5f4e; background: #edf6f1; border-radius: 12px; padding: 12px; margin-top: 16px; }
.preparation-overlay { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.scan-line { position: absolute; inset: 0; background: linear-gradient(transparent 80%, #a4f1d520); border-bottom: 1px solid #a4f1d5; animation: scan-pass 2400ms var(--ease) both; }
.scan-corner { position: absolute; width: 24px; height: 24px; border-color: #d5ffeb; border-style: solid; border-width: 0; }
.top-left { left: 16px; top: 16px; border-left-width: 1px; border-top-width: 1px; border-radius: 8px 0 0; }
.top-right { right: 16px; top: 16px; border-right-width: 1px; border-top-width: 1px; border-radius: 0 8px 0 0; }
.bottom-left { left: 16px; bottom: 16px; border-left-width: 1px; border-bottom-width: 1px; border-radius: 0 0 0 8px; }
.bottom-right { right: 16px; bottom: 16px; border-right-width: 1px; border-bottom-width: 1px; border-radius: 0 0 8px; }
.preparation-state { margin-top: 28px; padding-bottom: 20px; }
.preparation-progress { height: 3px; border-radius: 4px; overflow: hidden; background: #e4eee8; }
.preparation-progress span { display: block; height: 100%; background: #49ae87; transform-origin: left; animation: prepare-bar 2400ms var(--ease) both; }
.preparation-state p { margin-top: 12px; color: var(--muted); font-size: 12px; }
/* Keep the blurred surface isolated from stale WebView compositor tiles. */
.is-locked .editor-comparison .portrait { filter: blur(20px); transform: scale(1.12); backface-visibility: hidden; }
.is-locked .photo-labels { display: none; }
.locked-preview { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; color: #fff; text-align: center; background: #09221b30; }
.lock-medallion { width: 60px; height: 60px; margin-bottom: 4px; border: 1px solid #ffffff55; border-radius: 50%; background: #ffffff20; box-shadow: inset 0 1px 0 #ffffff24, 0 4px 16px #0000000a; display: grid; place-items: center; }
.lock-medallion svg { width: 24px; height: 24px; }
.locked-preview strong { font-size: 18px; font-weight: 500; letter-spacing: -.4px; }
.locked-preview>span:last-child { font-size: 10px; color: #f1f7f3; }
.is-locked .availability-note { margin-top: 4px; }
.is-locked .result-note { margin-top: 8px; }
@keyframes scan-pass { from { transform: translateY(-100%); } to { transform: translateY(100%); } }
@keyframes prepare-bar { from { transform: scaleX(.05); } to { transform: scaleX(1); } }
.has-result .panel-actions { margin-top: 28px; }
.save-error { font-size: 12px; line-height: 1.6; color: #a0372d; padding-top: 12px; }
dialog { width: min(440px, calc(100% - 32px)); border: 1px solid #e5ebe6; border-radius: 24px; background: #fbfdfb; color: var(--ink); padding: 24px; max-height: calc(100svh - 48px); overflow-y: auto; box-shadow: 0 24px 80px #051d2233; }
dialog::backdrop { background: #0c1b1959; backdrop-filter: blur(4px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: -4px -8px 20px 0; }
.dialog-heading h2 { font-size: 21px; font-weight: 600; letter-spacing: -.5px; }
#dialog-content { color: var(--muted); font-size: 13px; line-height: 1.75; }
#dialog-content p+p { margin-top: 16px; }
#dialog-content strong { color: var(--ink); font-weight: 600; }
#dialog-done { width: 100%; margin-top: 24px; }
.guide-steps { padding: 0; margin: 0 0 24px; list-style: none; counter-reset: step; }
.guide-steps li { position: relative; padding-left: 36px; margin-bottom: 20px; counter-increment: step; }
.guide-steps li::before { content: counter(step); position: absolute; top: 0; left: 0; color: var(--accent-ink); width: 24px; height: 24px; background: #e7f4ed; border-radius: 50%; text-align: center; }
.export-visual { position: relative; display: flex; height: 260px; gap: 4px; border-radius: 16px; overflow: hidden; background: #14251e; }
.export-thumb { flex: 1; background-position: center; background-repeat: no-repeat; background-size: contain; }
.export-visual p { position: absolute; bottom: 0; left: 0; right: 0; padding: 20px 8px 12px; text-align: center; font-size: 10px; color: #fff; background: linear-gradient(transparent, #0008); }
.preview-only .export-before { display: none; }
.export-options { display: flex; gap: 4px; padding: 4px; margin-top: 20px; border-radius: 14px; background: #eaf0ec; }
.export-options button { flex: 1; min-height: 44px; border-radius: 10px; font-size: 12px; }
.export-options button[aria-pressed=true] { background: #fff; box-shadow: 0 1px 4px #10271f12; font-weight: 600; }
.export-note { font-size: 11px; color: var(--muted); text-align: center; margin: 16px 0; }
.export-actions { display: flex; gap: 8px; }
.export-actions>.button { flex: 1; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: max(24px, var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))); transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); padding: 12px 20px; border-radius: 16px; background: #11271fee; color: #fff; font-size: 13px; line-height: 1.6; box-shadow: 0 8px 24px #10271f24; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0ms !important; animation: none !important; scroll-behavior: auto !important; } }
