:root {
  color-scheme: light;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 25px; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:disabled, select:disabled { cursor: default; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--violet); outline-offset: 4px; }
.shell { width: min(1120px, calc(100% - 72px)); margin-inline: auto; }
.topbar { border-bottom: 1px solid var(--line); }
.header-inner { min-height: 75px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: center; }
.topnav, .header-actions, .footer nav { display: flex; align-items: center; gap: 27px; }
.topnav, .footer nav, .signin { color: var(--muted); font-size: 14px; font-weight: 600; }
.topnav a:hover, .plain:hover, .footer nav a:hover, .signin:hover { color: var(--violet); }
.header-actions { justify-content: flex-end; gap: 10px; white-space: nowrap; }
.signin { padding: 7px; }
.plain { border: 0; padding: 0; color: inherit; background: transparent; font-weight: inherit; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 47px; border: 1px solid transparent; border-radius: 10px; padding: 0 17px; background: var(--violet); color: #fff; font-weight: 700; font-size: 14px; white-space: nowrap; transition: background .2s, transform .2s, box-shadow .2s; }
.button:hover { background: var(--violet-dark); transform: translateY(-2px); }
.button:active { transform: translateY(0); }
.button:disabled { opacity: .52; transform: none; }
.button-small { min-height: 38px; border-radius: 8px; font-size: 13px; padding: 0 12px; gap: 9px; }
.button-primary { box-shadow: 0 3px 6px #3d20a821; }
.button-outline { border-color: var(--line); color: var(--ink); background: var(--panel); }
.button-outline:hover { border-color: #cbb9f6; background: var(--lavender); }
.full { width: 100%; }
.credit-pill, .section-price { display: inline-flex; align-items: center; gap: 7px; border-radius: 100px; color: #5032ae; background: var(--lavender); padding: 8px 12px; font-weight: 700; font-size: 12px; white-space: nowrap; }
.credit-pill.bump { animation: bump .55s ease both; }
.gem { font-size: 15px; line-height: 1; }
@keyframes bump { 45% { transform: scale(1.12); background: #dacfaa; } }

.hero { display: grid; grid-template-columns: .89fr 1.11fr; gap: clamp(35px, 7vw, 105px); align-items: center; padding: 64px 0 57px; }
.hero-copy { padding: 0 0 15px; }
.eyebrow { display: flex; gap: 9px; align-items: center; margin: 0 0 20px; color: #594975; font-size: 11px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.eyebrow > span, .sample-dot { width: 7px; height: 7px; border-radius: 50%; background: #9a73fa; display: inline-block; flex: 0 0 auto; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 400; }
h1 { font-size: clamp(80px, 8.2vw, 124px); line-height: .85; letter-spacing: -.037em; }
h1 em { color: var(--violet); font-weight: 400; }
.intro { max-width: 330px; margin-top: 25px; color: var(--muted); font-size: 17px; line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 21px; margin-top: 27px; }
.text-link { color: #4b405d; font-weight: 700; font-size: 14px; }
.text-link:hover { color: var(--violet); }
.text-link span { margin-left: 4px; }
.hero-figure { min-width: 0; }
.compare { --split: 51%; position: relative; overflow: hidden; isolation: isolate; background: #c4b3ab; border-radius: 17px; }
.hero-compare { aspect-ratio: 1.41; box-shadow: 0 10px 26px #4a35221d; }
.compare-image { position: absolute; width: 100%; height: 100%; inset: 0; object-fit: cover; }
.hero-compare .compare-image { object-position: center 46%; }
.compare-before { clip-path: inset(0 calc(100% - var(--split)) 0 0); }
.compare-divider { position: absolute; left: var(--split); width: 2px; inset-block: 0; background: #fff; transform: translateX(-50%); display: grid; place-content: center; color: var(--ink); }
.compare-divider span { display: grid; place-content: center; width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: 0 1px 12px #1911214d; font-size: 18px; font-weight: 700; white-space: nowrap; }
.compare-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.compare:has(.compare-range:focus-visible) { outline: 2px solid var(--violet); outline-offset: 4px; }
.compare-tag { position: absolute; z-index: 1; pointer-events: none; bottom: 15px; border-radius: 6px; padding: 5px 9px; background: #252028a1; color: white; font-size: 11px; font-weight: 700; backdrop-filter: blur(7px); }
.before-tag { left: 15px; }
.after-tag { right: 15px; }
.hero-figure figcaption { margin-top: 12px; display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 600; }
.hero-figure figcaption > span:first-child { display: flex; gap: 7px; align-items: center; }

.studio { border-top: 1px solid var(--line); padding: 32px 0 58px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 17px; margin-bottom: 23px; }
.section-head h2, .pricing-strip h2, dialog h2 { font-size: clamp(43px, 5vw, 62px); letter-spacing: -.03em; line-height: 1; }
.section-head p, .pricing-strip p { color: var(--muted); margin-top: 7px; font-size: 14px; line-height: 1.45; }
.studio-grid, .result-grid { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(240px, 1fr); gap: 20px; align-items: start; }
.upload-grid, .scene-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.upload-wrap { min-width: 0; }
.upload-card { display: grid; position: relative; min-height: 171px; overflow: hidden; align-items: center; text-align: center; border-radius: 13px; border: 1px dashed #cdbedd; background: #fcfaf8; cursor: pointer; transition: background .18s, border .18s; }
.upload-card:hover, .upload-card.drag-over { border-color: var(--violet); background: #f3edff; }
.upload-card:focus-within { outline: 2px solid var(--violet); outline-offset: 2px; }
.upload-card:has(img:not([hidden])) { border-style: solid; }
.upload-card:has(img:not([hidden])) .upload-placeholder { visibility: hidden; }
.upload-card input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 2; }
.upload-card img { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.upload-placeholder { display: grid; justify-items: center; gap: 6px; padding: 18px 10px; }
.upload-placeholder strong { font-weight: 700; font-size: 15px; }
.upload-placeholder > span:last-child { font-size: 12px; color: var(--muted); }
.upload-icon { display: grid; place-items: center; width: 37px; height: 37px; margin-bottom: 3px; border-radius: 10px; background: var(--lavender); color: var(--violet); font-size: 26px; font-weight: 400; line-height: 1; }
.upload-icon-picture > span { position: relative; width: 16px; height: 13px; border: 1.5px solid currentColor; border-radius: 3px; overflow: hidden; }
.upload-icon-picture > span::before { position: absolute; content: ""; left: 4px; top: 5px; width: 8px; height: 8px; border-top: 1.5px solid; border-left: 1.5px solid; transform: rotate(45deg); }
.image-label { position: absolute; bottom: 8px; left: 8px; border-radius: 6px; background: #27202ab8; color: #fff; padding: 5px 8px; font-size: 11px; font-weight: 600; }
.swap-summary, .result-actions { padding: 19px; border: 1px solid #e5dceb; background: #f5f0fb; border-radius: 14px; }
.summary-symbol { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 9px; background: #e9ddfb; color: #5a33cc; font-weight: 700; font-size: 20px; margin-bottom: 10px; }
.swap-summary h3, .result-actions h3 { font-family: var(--serif); font-size: 31px; font-weight: 400; line-height: 1.05; }
.swap-summary > p:not(.studio-message) { color: var(--muted); font-size: 13px; line-height: 1.5; margin-top: 7px; max-width: 280px; }
.summary-rule { border-top: 1px solid #e5dceb; margin: 15px 0 12px; }
.balance-line { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.balance-line strong { color: var(--ink); }
#start-swap { justify-content: space-between; }
.button-cost { padding: 3px 7px; background: #ffffff26; border-radius: 6px; font-size: 11px; }
.studio-message { margin-top: 9px; font-size: 11px; line-height: 1.5; color: var(--muted); }
.studio-message[data-error] { color: #9a283c; }
.scenes { margin-top: 20px; }
.scenes-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 10px; margin-bottom: 9px; }
.scenes-head h3 { font-size: 14px; }
.scenes-head p { font-size: 12px; color: var(--muted); }
.scene-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.scene { display: flex; flex-direction: column; gap: 5px; min-width: 0; border: 1px solid transparent; border-radius: 10px; padding: 4px; text-align: left; background: transparent; color: var(--ink); transition: border .2s, transform .2s; }
.scene:hover { transform: translateY(-2px); }
.scene[aria-pressed="true"] { border-color: var(--violet); background: #eee5ff; }
.scene img { height: 74px; border-radius: 7px; width: 100%; object-fit: cover; background: #ded1c8; }
.scene span { font-size: 11px; font-weight: 600; padding-inline: 3px; }

.result { margin-top: 42px; padding-top: 24px; border-top: 1px solid var(--line); }
.result-compare { aspect-ratio: 1.35; background: #ebe3f0; }
.result-compare .compare-image { object-fit: contain; }
.result-compare.reveal::after { position: absolute; z-index: 3; content: ""; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 20%, #eaddff9c 47%, #fffcebba 51%, transparent 80%); animation: reveal .7s ease-out both; }
@keyframes reveal { from { transform: translateX(-100%); opacity: .8; } to { transform: translateX(100%); opacity: 0; } }
.result-actions .full { margin-top: 10px; }
.versions { display: flex; gap: 5px; flex-wrap: wrap; margin: 12px 0 5px; }
.versions button { padding: 6px 10px; border: 1px solid #dcd1e8; background: #fff; border-radius: 7px; color: var(--ink); font-size: 12px; }
.versions button[aria-pressed="true"] { border-color: var(--violet); color: var(--violet); }

.pricing-strip { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 25px 27px; background: #eee7f9; border-radius: 16px; margin-bottom: 40px; }
.pricing-strip h2 { font-size: clamp(37px, 4.5vw, 53px); }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.footer .brand { color: var(--ink); font-size: 21px; }
.footer nav { gap: 14px; font-size: 12px; }

dialog { padding: 0; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; width: min(460px, calc(100% - 32px)); max-height: calc(100% - 32px); box-shadow: 0 20px 75px #2415403b; }
dialog[open] { animation: enter .22s ease-out both; }
dialog::backdrop { background: #27203468; backdrop-filter: blur(3px); }
@keyframes enter { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
.dialog-inner { position: relative; padding: 25px; }
.dialog-inner h2 { padding-right: 20px; }
.dialog-inner .eyebrow { margin-bottom: 12px; }
.close { position: absolute; top: 12px; right: 13px; width: 33px; height: 33px; border-radius: 50%; border: 0; background: #f1ece7; color: var(--ink); font-size: 24px; line-height: 1; }
.dialog-copy { margin: 10px 0 17px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.field-label { display: block; margin: 12px 0 5px; font-size: 12px; font-weight: 700; }
.dialog-inner select { width: 100%; border: 1px solid var(--line); border-radius: 8px; background: white; padding: 9px; color: var(--ink); }
.dialog-inner .full { margin-top: 12px; }
.payment-amount { font-size: 21px; font-weight: 700; }
.copy-field { display: flex; align-items: center; gap: 8px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.copy-field code { overflow-wrap: anywhere; font-size: 12px; flex: 1; }
.copy-field .button { min-height: 31px; font-size: 11px; }
.payment-provider { display: block; margin-top: 13px; color: var(--muted); font-size: 11px; }
.payment-reset { color: var(--violet); margin-top: 12px; font-size: 13px; font-weight: 700; }

@media (max-width: 900px) {
  .shell { width: min(100% - 48px, 1120px); }
  .hero { gap: 35px; padding-top: 48px; }
  h1 { font-size: clamp(70px, 10vw, 100px); }
}
@media (max-width: 690px) {
  .shell { width: calc(100% - 32px); }
  .header-inner { min-height: 61px; grid-template-columns: 1fr auto; }
  .topnav { display: none; }
  .brand { font-size: 23px; }
  .hero { grid-template-columns: 1fr; gap: 22px; padding: 38px 0 29px; }
  .hero-copy { padding-bottom: 0; }
  h1 { font-size: clamp(70px, 15vw, 100px); }
  .eyebrow { margin-bottom: 15px; }
  .intro, .hero-actions { margin-top: 18px; }
  .hero-compare { aspect-ratio: 1.45; }
  .studio { padding: 24px 0 34px; }
  .studio-grid, .result-grid { grid-template-columns: 1fr; gap: 17px; }
  .section-head { align-items: start; }
  .section-price { margin-top: 7px; }
  .upload-grid, .scene-grid { gap: 8px; }
  .upload-card { min-height: 140px; }
  .pricing-strip { padding: 17px; margin-bottom: 25px; }
  .footer { flex-wrap: wrap; }
}
@media (max-width: 395px) {
  .header-actions { gap: 5px; }
  .credit-pill { padding: 7px; }
  .section-price { padding: 7px 8px; font-size: 10px; }
  .pricing-strip { flex-wrap: wrap; }
  .scene span { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

.dialog-inner input:not([type="checkbox"]) {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 10px; color: var(--ink);
}
.accept-terms { display: flex; align-items: flex-start; gap: 9px; margin: 16px 0 8px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.accept-terms input { margin: 2px 0 0; accent-color: var(--violet); }
.accept-terms a, .auth-switch button, .legal a:not(.brand) { color: var(--violet-dark); text-decoration: underline; text-underline-offset: 2px; }
.auth-switch { margin-top: 15px; font-size: 13px; color: var(--muted); }
.auth-switch button { font-weight: 700; }
.legal { width: min(690px, calc(100% - 48px)); margin: 0 auto; padding: 47px 0 60px; }
.legal h1 { font-size: clamp(60px, 9vw, 92px); line-height: .95; margin-bottom: 16px; }
.legal h2 { font-size: 34px; margin-top: 25px; }
.legal p, .legal li { font-size: 15px; color: var(--muted); line-height: 1.7; }
.legal .effective { margin-bottom: 29px; }
.legal ul { padding-left: 22px; }
.legal p + p { margin-top: 12px; }
.legal-footer { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 17px; display: flex; gap: 15px; font-size: 14px; }
