/* IPSELLA — plum, rose gold and powder. Display: Bodoni Moda. Text: Manrope. */
:root {
  --plum: #2B0F24;
  --plum-deep: #1D0A18;
  --plum-raised: #3A1631;
  --line: #57284B;
  --rose: #D9A08F;
  --rose-light: #F2C9B8;
  --powder: #F6E7E1;
  --muted: #CBA9A6;
  --bordeaux: #7A1E3A;
  --bordeaux-hi: #9A2A4C;
  --ok: #8FD3A8;
  --warn: #F2B866;
  --radius: 14px;
  --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--powder); font-family: var(--sans); font-size: 16px; line-height: 1.55;
  background: radial-gradient(60rem 40rem at 90% -10%, rgba(217, 160, 143, .16), transparent 60%), radial-gradient(50rem 40rem at -10% 30%, rgba(122, 30, 58, .35), transparent 60%), var(--plum-deep);
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--rose-light); outline-offset: 2px; }
[hidden] { display: none !important; }

.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem max(16px, env(safe-area-inset-left)); background: rgba(29, 10, 24, .82); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(87, 40, 75, .6); }
.brand { display: flex; align-items: center; gap: .55rem; color: var(--powder); text-decoration: none; }
.brand span { font-family: var(--display); font-size: 1.45rem; font-weight: 600; letter-spacing: .22em; }
.demo-badge { padding: .25rem .7rem; border: 1px solid var(--rose); border-radius: 999px; color: var(--rose-light); font-size: .7rem; font-weight: 800; letter-spacing: .16em; }

main { width: min(1200px, 100% - 32px); margin: 0 auto; }
.hero { padding: clamp(2.2rem, 7vw, 5rem) 0 clamp(1.5rem, 4vw, 2.6rem); max-width: 760px; }
.eyebrow { margin: 0 0 .6rem; color: var(--rose); font-size: .74rem; font-weight: 800; letter-spacing: .24em; }
.hero h1 { margin: 0; font-family: var(--display); font-weight: 500; font-size: clamp(2.6rem, 9vw, 5.4rem); line-height: 1; letter-spacing: -.01em; text-wrap: balance; }
.hero h1 em { color: var(--rose-light); font-style: italic; }
.lead { margin: 1rem 0 0; max-width: 34rem; color: var(--muted); font-size: clamp(1rem, 2.4vw, 1.15rem); }

.panel { background: linear-gradient(180deg, rgba(58, 22, 49, .92), rgba(43, 15, 36, .92)); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1rem, 3vw, 1.6rem); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.layout { display: grid; grid-template-columns: 1fr; gap: 1.2rem; align-items: start; }
@media (min-width: 900px) { .layout { grid-template-columns: minmax(380px, 460px) 1fr; } .studio { position: sticky; top: 84px; } }

.steps { list-style: none; margin: 0 0 1.1rem; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.steps.full { grid-template-columns: repeat(2, 1fr); }
.steps button { width: 100%; min-height: 64px; display: flex; align-items: center; gap: .5rem; padding: .55rem .6rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(29, 10, 24, .5); text-align: left; }
.steps button[aria-current="step"] { border-color: var(--rose); background: rgba(217, 160, 143, .12); }
.steps button:disabled { opacity: .45; cursor: not-allowed; }
.step-dot { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--plum-deep); border: 1px solid var(--rose); color: var(--rose-light); font-size: .78rem; font-weight: 800; }
.steps button.done .step-dot { background: var(--rose); color: var(--plum); }
.step-text { min-width: 0; display: grid; }
.step-text strong { font-size: .74rem; letter-spacing: .08em; line-height: 1.25; }
.step-count { color: var(--muted); font-size: .7rem; }

.step-intro { margin-bottom: 1rem; }
.step-intro h2 { margin: 0 0 .25rem; font-family: var(--display); font-weight: 500; font-size: 1.6rem; }
.step-intro p { margin: 0; color: var(--muted); font-size: .95rem; }

.drop { position: relative; display: grid; place-items: center; min-height: 190px; padding: .8rem; border: 1.5px dashed var(--rose); border-radius: 12px; background: rgba(29, 10, 24, .55); cursor: pointer; text-align: center; overflow: hidden; }
.drop:hover { background: rgba(217, 160, 143, .08); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop img { max-width: 100%; max-height: 300px; border-radius: 8px; object-fit: contain; }
.drop-text strong { display: block; color: var(--rose-light); font-size: .85rem; letter-spacing: .14em; }
.drop-text small { color: var(--muted); }
.drop.has-image .drop-text { position: absolute; bottom: .6rem; left: 50%; transform: translateX(-50%); padding: .3rem .8rem; border-radius: 999px; background: rgba(29, 10, 24, .85); white-space: nowrap; }
.drop.has-image .drop-text small { display: none; }

.wish-box { display: grid; gap: .5rem; margin-top: 1rem; }
.wish-box label, .options label, .feedback label { color: var(--muted); font-size: .74rem; font-weight: 700; letter-spacing: .12em; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chips button { padding: .45rem .85rem; border: 1px solid var(--line); border-radius: 999px; background: rgba(29, 10, 24, .6); font-size: .85rem; }
.chips button:hover { border-color: var(--rose); color: var(--rose-light); }
textarea, input[type="email"], select { width: 100%; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: 10px; background: var(--plum-deep); }
textarea { resize: vertical; }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: 1rem; }
.options label { display: grid; gap: .35rem; }

.consent { margin-top: 1rem; }
.consent label { display: flex; gap: .55rem; align-items: flex-start; font-size: .9rem; color: var(--powder); cursor: pointer; }
.consent input { margin-top: .25rem; accent-color: var(--rose); width: 18px; height: 18px; flex: none; }
.fine-print { margin: .35rem 0 0 1.7rem; color: var(--muted); font-size: .68rem; line-height: 1.4; opacity: .8; }
.consent.nudge { animation: nudge .45s; }
@keyframes nudge { 25%, 75% { transform: translateX(-5px); } 50% { transform: translateX(5px); } }

.primary { width: 100%; min-height: 58px; margin-top: 1.1rem; display: flex; align-items: center; justify-content: center; gap: .6rem; border: 0; border-radius: 999px; background: linear-gradient(120deg, var(--bordeaux), var(--bordeaux-hi) 55%, #B4536A); color: #fff; font-weight: 800; letter-spacing: .14em; box-shadow: 0 12px 30px rgba(122, 30, 58, .45); }
.primary:hover { filter: brightness(1.08); }
.primary:disabled { opacity: .6; cursor: wait; }
.primary.not-ready { filter: saturate(.55) brightness(.9); }
#generateHint { font-weight: 600; letter-spacing: .04em; opacity: .85; font-size: .85rem; }
.secondary { width: 100%; min-height: 50px; margin-top: .6rem; border: 1px solid var(--rose); border-radius: 999px; background: transparent; color: var(--rose-light); font-weight: 800; letter-spacing: .1em; }
.message { min-height: 1.4rem; margin: .7rem 0 0; color: var(--rose-light); font-size: .92rem; }

.col-title { margin: .3rem 0 .8rem; font-family: var(--display); font-weight: 500; font-size: 1.6rem; }
.empty { color: var(--muted); }
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 1rem; }
.result { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--plum); }
.result-media { position: relative; background: #12060F; }
.result-media img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: contain; }
.busy-overlay { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: .6rem; background: rgba(29, 10, 24, .78); text-align: center; font-weight: 700; }
.busy-overlay small { color: var(--muted); font-weight: 500; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid rgba(246, 231, 225, .2); border-top-color: var(--rose); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.result-copy { padding: .8rem .9rem 1rem; }
.result-copy .tag { color: var(--rose); font-size: .7rem; font-weight: 800; letter-spacing: .14em; }
.result-copy p { margin: .25rem 0 0; color: var(--muted); font-size: .85rem; }
.qa { display: block; margin-top: .35rem; font-size: .8rem; }
.qa.pass { color: var(--ok); }
.qa.warn { color: var(--warn); }
.hint { display: block; margin-top: .35rem; color: var(--muted); font-size: .8rem; }
.result-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; }
.result-actions a, .result-actions button { flex: 1 1 0; min-width: 0; padding: .6rem .3rem; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--powder); font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-align: center; text-decoration: none; white-space: nowrap; }
.result-actions a:hover, .result-actions button:hover { border-color: var(--rose); }
.result-actions button:disabled { opacity: .5; cursor: not-allowed; }

.feedback, .full { margin-top: 1.4rem; max-width: 640px; }
.feedback h2, .full h2 { margin: 0 0 1rem; font-family: var(--display); font-weight: 500; font-size: clamp(1.6rem, 4vw, 2.2rem); }
#feedbackForm { display: grid; gap: .55rem; }
.stars { display: flex; gap: .3rem; margin-bottom: .4rem; }
.stars button { flex: 1 1 0; min-width: 0; max-width: 52px; height: 48px; padding: 0; border: 0; background: none; font-size: 2.2rem; line-height: 1; color: rgba(246, 231, 225, .25); }
.stars button.on { color: var(--rose-light); }
.check { display: flex; gap: .5rem; align-items: center; color: var(--powder) !important; letter-spacing: 0 !important; font-weight: 500 !important; font-size: .92rem !important; }
.check input { accent-color: var(--rose); width: 18px; height: 18px; }
.form-note { min-height: 1.3rem; margin: .3rem 0 0; color: var(--rose-light); }
.inline-form { display: flex; flex-wrap: wrap; gap: .5rem; }
.inline-form input { flex: 1 1 220px; }
.inline-form button { padding: .8rem 1.3rem; border: 0; border-radius: 999px; background: var(--bordeaux); color: #fff; font-weight: 800; letter-spacing: .1em; }

.compare-dialog { width: min(1100px, 100vw - 16px); height: min(92vh, 900px); max-width: none; max-height: none; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--plum-deep); color: var(--powder); }
.compare-dialog[open] { display: grid; grid-template-rows: auto 1fr auto; }
.compare-dialog::backdrop { background: rgba(10, 3, 8, .8); }
.compare-head { display: flex; justify-content: space-between; align-items: center; padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.compare-head button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--plum-raised); font-size: 1.4rem; }
.compare-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; min-height: 0; padding: 6px; }
.compare-stage figure { margin: 0; display: grid; grid-template-rows: auto 1fr; min-height: 0; }
.compare-stage figcaption { padding: .3rem; color: var(--rose); font-size: .7rem; font-weight: 800; letter-spacing: .16em; text-align: center; }
.compare-image { overflow: auto; min-height: 0; background: #12060F; border-radius: 8px; display: grid; place-items: center; }
.compare-image img { max-width: 100%; max-height: 100%; }
.zoom-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .6rem 1rem; border-top: 1px solid var(--line); }
.zoom-bar button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: transparent; }
.zoom-bar input { flex: 1 1 120px; accent-color: var(--rose); }
.zoom-bar a { padding: .55rem 1.1rem; border-radius: 999px; background: var(--bordeaux); color: #fff; font-weight: 800; letter-spacing: .1em; text-decoration: none; }
@media (max-width: 640px) { .compare-stage { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; } }

.link-button { display: block; margin: .8rem auto 0; padding: .4rem; border: 0; background: none; color: var(--muted); font-size: .88rem; text-decoration: underline; text-underline-offset: 3px; }
.link-button:hover { color: var(--rose-light); }
.photo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 84px)); gap: .45rem; margin-top: .7rem; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--plum-deep); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(29, 10, 24, .85); font-size: 1rem; line-height: 1; }
.thumb span { position: absolute; left: 4px; bottom: 4px; padding: .05rem .4rem; border-radius: 999px; background: rgba(29, 10, 24, .85); font-size: .7rem; font-weight: 800; }
.refs { display: grid; gap: .45rem; margin-top: .4rem; }
.refs-label { color: var(--muted); font-size: .74rem; font-weight: 700; letter-spacing: .12em; }
.refs-row { display: grid; grid-template-columns: repeat(3, minmax(0, 96px)); gap: .45rem; }
.ref-add { position: relative; display: grid; place-items: center; aspect-ratio: 1; padding: .3rem; font-size: .66rem !important; line-height: 1.25; border: 1.5px dashed var(--rose); border-radius: 10px; color: var(--rose-light); font-size: .75rem; font-weight: 800; text-align: center; cursor: pointer; }
.ref-add input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.refs-help { color: var(--muted); font-size: .78rem; }
.rate-toast { position: fixed; z-index: 30; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(460px, calc(100% - 24px)); display: flex; align-items: center; gap: .7rem; padding: .9rem 2.6rem .9rem 1rem; border: 1px solid var(--rose); border-radius: 18px; background: var(--plum); box-shadow: 0 18px 50px rgba(0, 0, 0, .55); animation: rise .35s ease-out; }
.rate-toast span { flex: 1; font-size: .9rem; line-height: 1.35; }
.rate-toast strong { color: var(--rose-light); }
.rate-toast #rateGo { flex: none; padding: .7rem 1rem; border: 0; border-radius: 999px; background: linear-gradient(120deg, var(--bordeaux), var(--bordeaux-hi)); color: #fff; font-weight: 800; letter-spacing: .08em; }
.rate-x { position: absolute; top: 6px; right: 8px; width: 30px; height: 30px; border: 0; background: none; color: var(--muted); font-size: 1.3rem; }
@keyframes rise { from { transform: translate(-50%, 20px); opacity: 0; } }
.tip { margin-top: .5rem !important; padding: .6rem .8rem; border-left: 3px solid var(--rose); background: rgba(217, 160, 143, .08); border-radius: 0 10px 10px 0; font-size: .86rem !important; }
.from-gallery { width: 100%; min-height: 48px; margin-top: .6rem; border: 1px dashed var(--rose); border-radius: 12px; background: transparent; color: var(--rose-light); font-weight: 800; letter-spacing: .12em; }
.result-actions .next { flex-basis: 100%; border-color: var(--rose); color: var(--rose-light); }
.gallery-dialog { width: min(820px, 100vw - 16px); max-height: 88vh; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--plum-deep); color: var(--powder); }
.gallery-dialog::backdrop { background: rgba(10, 3, 8, .8); }
.gallery-dialog #galleryDone { width: auto; height: auto; padding: .55rem 1.1rem; border: 0; border-radius: 999px; background: var(--bordeaux); color: #fff; font-weight: 800; font-size: .85rem; letter-spacing: .1em; }
.gallery-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .6rem; padding: 1rem; overflow: auto; max-height: calc(88vh - 70px); }
.pick { position: relative; padding: 0; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--plum); }
.pick img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.pick span { position: absolute; left: 6px; bottom: 6px; padding: 0 .45rem; border-radius: 999px; background: rgba(29, 10, 24, .85); font-size: .62rem; font-weight: 800; letter-spacing: .08em; }
.pick.on { border-color: var(--rose-light); }
.style-box { display: grid; gap: .45rem; margin-top: 1rem; }
.style-label { color: var(--muted); font-size: .74rem; font-weight: 700; letter-spacing: .12em; }
.style-seg { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.style-seg button { display: grid; gap: .15rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(29, 10, 24, .55); text-align: left; font-weight: 800; letter-spacing: .06em; }
.style-seg button small { color: var(--muted); font-weight: 500; letter-spacing: 0; font-size: .74rem; }
.style-seg button.on { border-color: var(--rose); background: rgba(217, 160, 143, .14); }
.examples { margin: .1rem 0 0; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.examples b { color: var(--rose-light); font-weight: 700; }
.result-actions .hide { flex-basis: 100%; border-color: transparent; color: var(--muted); font-weight: 600; }
footer { padding: 3rem 16px 2.5rem; text-align: center; color: var(--muted); font-family: var(--display); font-style: italic; letter-spacing: .08em; }

@media (max-width: 420px) {
  .options { grid-template-columns: 1fr; }
  .steps button { flex-direction: column; align-items: flex-start; min-height: 78px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }
