@import url("assets/theme.css");

* { box-sizing: border-box; }
[hidden] { display: none !important; }
:root { color-scheme: light; --pink: #ff3470; --ink: #241f21; --paper: #f3ebdd; --muted: #65574d; --accent: #b41445; }
body { margin: 0; color: var(--ink); background: var(--paper) url("assets/web/backgrounds/cream-plaster.webp") center / cover; font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, a { -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
#share:disabled { cursor: not-allowed; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--pink); outline-offset: 5px; }
.skip-link { position: fixed; z-index: 10; top: -80px; left: 20px; padding: 12px 18px; background: white; }
.skip-link:focus { top: 10px; }
.site-header { min-height: 88px; padding: 24px 5vw; display: flex; align-items: center; gap: 24px; background: var(--paper); color: var(--ink); border-top: 4px solid var(--pink); }
.brand { width: 198px; flex-shrink: 0; }
.brand img { width: 100%; height: auto; }
.header-note { margin-left: auto; text-transform: uppercase; font-size: 10px; font-weight: 650; letter-spacing: 2.5px; }
.demo-badge { border: 1px solid #75676d; padding: 5px 9px; color: var(--muted); font-size: 10px; letter-spacing: .4px; }
.experience { max-width: 1320px; min-height: calc(100svh - 160px); margin: 0 auto; padding: 48px 5vw 42px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 9%; align-content: center; }
.copy { grid-area: 1 / 1; min-width: 0; }
.steps { display: flex; gap: 24px; margin: 0 0 46px; padding: 0; list-style: none; color: #73696e; font-size: 10px; font-weight: 600; }
.steps li { display: flex; gap: 7px; align-items: center; white-space: nowrap; }
.steps .step-index { font-size: 10px; border-bottom: 2px solid #c6bdc1; padding-bottom: 2px; }
.steps [aria-current] { color: var(--ink); }
.steps [aria-current] .step-index { color: #b41445; border-color: var(--pink); }
.eyebrow { margin: 0 0 18px; font-size: 10px; line-height: 1.6; letter-spacing: 2.4px; text-transform: uppercase; font-weight: 800; }
h1 { margin: 0; font-size: clamp(54px, 5.8vw, 84px); font-weight: 950; line-height: .96; letter-spacing: -4.5px; text-transform: uppercase; }
h1:focus { outline: none; }
h1 em { color: #df174f; font-style: normal; }
.description { max-width: 380px; margin: 24px 0 0; font-size: 16px; line-height: 1.7; color: #65585e; }
.controls { grid-area: 2 / 1; margin-top: 30px; max-width: 410px; align-self: start; }
.actions { display: flex; flex-direction: column; gap: 10px; }
.button { min-height: 54px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid var(--ink); border-radius: 0; padding: 14px 20px; text-decoration: none; font-size: 13px; font-weight: 800; letter-spacing: .2px; transition: background .15s, transform .15s; }
.button img { width: 20px; height: 20px; }
.button > span[aria-hidden] { font-size: 21px; line-height: 1; margin-left: auto; }
.primary { color: #171014; background: var(--pink); border-color: var(--pink); }
.secondary { color: var(--ink); background: transparent; }
@media (hover: hover) { .primary:hover { background: #ff5588; border-color: #ff5588; transform: translateY(-1px); } .secondary:hover { background: #e4ddd9; } .text-button:hover { text-decoration-thickness: 2px; } }
.hint { margin: 15px 0 20px; color: #75676e; font-size: 11px; line-height: 1.8; }
.text-button { border: 0; padding: 6px 0; background: transparent; color: inherit; font-size: 11px; font-weight: 650; text-decoration: underline; text-underline-offset: 4px; }
.text-button > span[aria-hidden] { margin-left: 6px; }
.demo-note { display: flex; align-items: start; gap: 9px; margin: 25px 0 0; padding-top: 15px; border-top: 1px solid #d5cbc9; color: #77656e; font-size: 10px; line-height: 1.7; }
.demo-note > span[aria-hidden] { color: #bd1949; }
.visual { grid-area: 1 / 2 / 3 / 3; position: relative; margin: 0; align-self: center; padding: 24px 35px 0; isolation: isolate; min-width: 0; }
.visual-backdrop { position: absolute; inset: 8% -5% 9%; background: #20181c url("assets/web/backgrounds/street-grunge.webp") center/cover; transform: rotate(-4deg); z-index: -1; }
.visual-index { position: absolute; top: 0; right: 0; font-size: 9px; font-weight: 800; letter-spacing: 2px; }
.portrait { position: relative; aspect-ratio: 9 / 16; max-height: 590px; max-width: 100%; margin: 0 auto; overflow: hidden; background: #151214; box-shadow: 0 16px 32px #1d0d192b; transform: rotate(3deg); }
.portrait > img { width: 100%; height: 100%; object-fit: cover; }
.image-label { position: absolute; right: 12px; bottom: 12px; padding: 5px 8px; color: #fff; background: #161115df; font-size: 9px; letter-spacing: 1px; text-transform: uppercase; }
.visual-caption { display: flex; justify-content: space-between; gap: 12px; margin-top: 27px; font-size: 9px; color: #6d5c64; }
.visual-caption > span:last-child { text-transform: uppercase; letter-spacing: 1px; font-size: 8px; }
body:not([data-step="home"]) .portrait { transform: none; }
body:not([data-step="home"]) .visual-backdrop { transform: rotate(-3deg); }
body[data-step="review"] .portrait { background: #231d20; }
.crop-guide { position: absolute; inset: 0; pointer-events: none; border: 1px solid #ffffffb0; border-radius: inherit; background: linear-gradient(to right, transparent 33.15%, #ffffff50 33.15%, #ffffff50 33.5%, transparent 33.5%, transparent 66.5%, #ffffff50 66.5%, #ffffff50 66.85%, transparent 66.85%), linear-gradient(to bottom, transparent 33.2%, #ffffff50 33.2%, #ffffff50 33.4%, transparent 33.4%, transparent 66.6%, #ffffff50 66.6%, #ffffff50 66.8%, transparent 66.8%); }
.crop-guide span { position: absolute; top: 10px; right: 10px; padding: 3px 7px; border-radius: 3px; background: #171014cc; color: white; font-size: 10px; font-weight: 700; }
.review-links { display: flex; justify-content: flex-end; gap: 12px; margin-top: 4px; }
.processing-note { color: #76636d; font-size: 13px; line-height: 1.7; }
.processing-visual { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; color: white; background: #161016cc; backdrop-filter: blur(8px); font-size: 11px; }
.spinner { display: inline-block; height: 56px; width: 56px; border: 2px solid #cabbac; border-top-color: var(--pink); border-right-color: var(--pink); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.message { margin: 0 0 20px; padding: 12px 14px; background: #e4ded9; font-size: 12px; border-left: 3px solid var(--ink); }
.error { background: #f9dbe2; border-color: #b51542; color: #831136; }
.site-footer { max-width: 1440px; margin: auto; padding: 20px 5vw 26px; display: flex; justify-content: space-between; align-items: center; gap: 16px; color: #76636d; font-size: 9px; border-top: 1px solid #d3c8c9; }
.footer-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px 16px; }
.site-footer .text-button { font-size: 9px; padding: 0; }
.footer-divider { margin: 0 8px; }
.language-switcher { display: flex; align-items: center; justify-content: center; gap: 8px; }
.language-switcher a {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid #a08693; border-radius: 50%; background: #fff9f0;
  font-size: 23px; line-height: 1; text-decoration: none;
}
.language-switcher a[aria-current="page"] { border: 3px solid var(--pink); background: white; box-shadow: 0 0 0 1px var(--ink); }
.language-switcher a[aria-current="page"]::after {
  content: "✓"; position: absolute; right: -3px; bottom: -3px;
  display: grid; place-items: center; width: 16px; height: 16px;
  border-radius: 50%; background: var(--ink); color: white; font: 700 10px/1 system-ui, sans-serif;
}
@media (hover: hover) { .language-switcher a:hover { background: #eadfd2; } }
dialog { width: min(440px, calc(100% - 32px)); max-height: calc(100svh - 48px); padding: 36px; border: 1px solid #cabbac; background: var(--paper) url("assets/web/backgrounds/cream-plaster.webp") center / cover; color: var(--ink); }
dialog::backdrop { background: #e8decccf; backdrop-filter: blur(4px); }
dialog h2 { font-size: 30px; line-height: 1.1; letter-spacing: -1px; }
dialog p:not(.eyebrow) { font-size: 14px; color: #65585e; margin-bottom: 28px; }
.dialog-close { position: absolute; top: 6px; right: 10px; width: 44px; height: 44px; font-size: 28px; border: 0; background: transparent; color: var(--pink); }
.dialog-close:focus-visible { outline: none; }
.noscript { position: fixed; bottom: 0; width: 100%; padding: 20px; background: var(--pink); font-weight: 700; text-align: center; }
@media (min-width: 1500px) { .experience { padding-left: 50px; padding-right: 50px; } }
@media (max-width: 1000px) {
  .experience { column-gap: 6%; padding: 36px 4vw; }
  .steps { gap: 14px; margin-bottom: 32px; }
  .steps li { font-size: 9px; gap: 5px; }
  h1 { font-size: 59px; letter-spacing: -3.5px; }
  .visual { padding: 16px 16px 0; }
  .visual-caption { flex-direction: column; gap: 4px; }
}
@media (max-width: 700px) {
  .site-header { min-height: 69px; padding: 20px 22px; justify-content: space-between; gap: 15px; }
  .brand { width: 163px; }
  .header-note { display: none; }
  .demo-badge { font-size: 8px; padding: 4px 6px; }
  .experience { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; padding: 25px 24px 30px; min-height: 0; max-width: 490px; }
  .copy { grid-area: 1 / 1; }
  .steps { margin: 0 0 25px; gap: 0; justify-content: space-between; }
  .steps li { font-size: 9px; }
  .eyebrow { font-size: 8px; letter-spacing: 1.5px; margin-bottom: 12px; }
  h1 { font-size: clamp(42px, 12.5vw, 63px); letter-spacing: -2.5px; line-height: .97; }
  .description { font-size: 13px; line-height: 1.65; margin: 15px 0 0; max-width: 340px; }
  .visual { grid-area: 2 / 1; width: 100%; max-width: 280px; margin: 23px auto 0; padding: 12px 26px 0; }
  .portrait { max-height: 375px; }
  .visual-backdrop { inset: 12% 0 12%; }
  .visual-index { font-size: 7px; }
  .visual-caption { flex-direction: row; margin-top: 19px; font-size: 8px; }
  .visual-caption > span:last-child { font-size: 7px; letter-spacing: .3px; }
  .controls { grid-area: 3 / 1; margin-top: 25px; max-width: none; }
  .button { min-height: 51px; padding: 13px 18px; font-size: 12px; }
  .hint { margin: 12px 0; font-size: 10px; }
  .demo-note { margin-top: 19px; font-size: 9px; }
  .site-footer { flex-direction: column; padding: 20px 24px; gap: 10px; font-size: 8px; }
  .footer-meta { width: 100%; justify-content: space-between; }
  body:not([data-step="home"]) .eyebrow { display: none; }
  body:not([data-step="home"]) h1 { font-size: 41px; }
  body:not([data-step="home"]) .description { font-size: 12px; margin-top: 12px; }
  body:not([data-step="home"]) .steps { margin-bottom: 20px; }
  body:not([data-step="home"]) .visual { max-width: 240px; margin-top: 17px; padding-top: 0; }
  body:not([data-step="home"]) .portrait { max-height: 330px; }
  body:not([data-step="home"]) .visual-index { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0s !important; transition: none !important; scroll-behavior: auto !important; } }

/* The campaign entrance is separate from the existing photo workflow. */
body[data-step="home"] :is(.site-header, .copy, .visual, .demo-note) { display: none; }
body[data-step="home"] .experience {
  display: block;
  width: 100%; max-width: none; min-height: 0;
  height: calc(100vh - 60px - env(safe-area-inset-bottom, 0px));
  height: calc(100svh - 60px - env(safe-area-inset-bottom, 0px));
  height: calc(100dvh - 60px - env(safe-area-inset-bottom, 0px));
  margin: 0;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}
body[data-step="home"] .site-footer {
  width: 100%; max-width: none; height: calc(60px + env(safe-area-inset-bottom, 0px));
  padding: 8px 24px calc(8px + env(safe-area-inset-bottom, 0px));
  justify-content: center; border: 0;
}
body[data-step="home"] .site-footer > span, body[data-step="home"] .footer-meta > :not(.language-switcher) { display: none; }
body[data-step="home"] .footer-meta { width: auto; justify-content: center; }
body[data-step="home"]:has(.site-footer .language-switcher[hidden]) .experience { height: 100vh; height: 100svh; height: 100dvh; }
body[data-step="home"]:has(.site-footer .language-switcher[hidden]) .site-footer { display: none; }
body[data-step="home"] .controls { position: relative; margin: 0; max-width: none; height: 100%; }
.home-stage {
  position: relative; isolation: isolate; container-type: size;
  width: min(100%, 62vh, 560px); width: min(100%, 62dvh, 560px);
  height: 100%; margin: auto;
  display: grid; grid-template-rows: 1fr;
  justify-items: center; align-items: center;
}
.home-stage::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url("assets/web/home/page-frame-splatter.webp") center / 100% 100% no-repeat;
  pointer-events: none;
}
.home-divider { display: none; }
.home-card {
  position: relative; display: block; padding: 0; border: 0;
  width: 86%; width: min(86%, 42cqh);
  max-width: 100%; aspect-ratio: 274 / 473; max-height: 100%;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: #241f21;
  -webkit-appearance: none; appearance: none;
  container-type: inline-size;
}
.home-card img { position: absolute; object-fit: contain; pointer-events: none; }
.home-title { width: 98%; height: 34%; top: 1%; left: 1%; }
.home-camera { width: 78%; height: 41%; top: 37%; left: 11%; }
.home-ribbon { width: 73%; height: 7.6%; left: 13.5%; bottom: 14.2%; }
.home-cta {
  position: absolute; left: 3%; bottom: 3.5%; width: 94%; height: 9.5%;
  display: flex; align-items: center; justify-content: center; gap: 7px; padding: 0 10px;
  border-radius: 999px; background: var(--pink); color: var(--ink);
  font-size: clamp(13px, 5.8cqw, 17px); font-weight: 800; line-height: 1; white-space: nowrap;
}
.home-cta img { position: static; flex-shrink: 0; width: 1.3em; height: 1.3em; }
.home-responsibility {
  position: absolute; left: 0; right: 0; bottom: .3%;
  font: 9px/1.2 Arial, sans-serif; font-size: 3.25cqw;
  text-align: center; text-transform: uppercase;
}
.home-card:focus-visible { outline: none; }
.home-card:active { transform: scale(.99); }
body[data-step="home"] .message {
  position: absolute; z-index: 2; top: 0; left: 50%; transform: translateX(-50%);
  width: min(90%, 470px); max-height: 23%; overflow-y: auto;
  margin: 8px 0 0; box-shadow: 0 3px 12px #0005;
}

body:not([data-step="home"]) { padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }

body.age-pending { overflow: hidden; }
body.age-pending > :not(#age-gate, script, noscript) { display: none; }
.home-card:disabled { cursor: default; opacity: 1; }
.age-gate {
  width: 100%; height: 100vh; height: 100svh; height: 100dvh; display: flex; overflow-y: auto;
  padding: calc(32px + env(safe-area-inset-top, 0px)) calc(24px + env(safe-area-inset-right, 0px)) calc(32px + env(safe-area-inset-bottom, 0px)) calc(24px + env(safe-area-inset-left, 0px));
  color: var(--ink); text-align: center;
  background: url("assets/web/home/page-frame-splatter.webp") center / min(100%, 560px) 100% no-repeat, var(--paper) url("assets/web/backgrounds/cream-plaster.webp") center / cover;
}
.age-gate-content { flex: none; width: min(100%, 356px); margin: auto; }
.age-brand { width: 82%; height: auto; margin: 0 auto 30px; }
.age-gate .age-kicker { margin: 0 0 12px; font-size: 9px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.age-gate h2 { margin: 0; font-size: clamp(34px, 10vw, 48px); font-weight: 950; line-height: .98; letter-spacing: -1.8px; text-transform: uppercase; }
.age-gate h2:focus { outline: none; }
.age-gate h2 em { color: #fc0261; font-style: normal; }
.age-gate #age-description { margin: 18px auto 26px; max-width: 270px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.age-gate .button { min-height: 50px; padding: 12px 16px; }
.age-gate .secondary { color: var(--ink); border-color: #a08693; background: #fff9f0; }
.age-gate .age-denied { margin: 0; padding: 16px; border-left: 3px solid var(--pink); background: #f1eeea; color: var(--ink); font-size: 13px; line-height: 1.6; }
.age-gate #age-back { margin-top: 16px; color: var(--ink); }
.age-gate .age-responsibility { margin: 24px 0 0; color: var(--muted); font-size: 9px; letter-spacing: 1px; text-transform: uppercase; }
.age-gate .language-switcher { margin-top: 12px; }
@media (hover: hover) { .age-gate .secondary:hover { background: #e8ddca; } }
@media (max-width: 360px), (max-height: 600px) {
  .age-gate { padding-top: calc(25px + env(safe-area-inset-top, 0px)); padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
  .age-brand { margin-bottom: 22px; }
  .age-gate h2 { font-size: 34px; }
  .age-gate #age-description { margin: 14px auto 20px; }
  .age-gate .age-responsibility { margin-top: 18px; }
}

/* Every step of the photo experience shares the entrance artwork. */
.result-brand { display: none; }
body:is([data-step="review"], [data-step="processing"], [data-step="result"]) :is(.site-header, .steps, .eyebrow, .visual-backdrop, .visual-index, .visual-caption, .image-label, .demo-note) { display: none; }
body:is([data-step="review"], [data-step="processing"], [data-step="result"]) .experience {
  --photo-height: clamp(168px, calc(100svh - 465px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)), 410px);
  position: relative; isolation: isolate;
  width: 100%; max-width: 520px; min-height: calc(100svh - 42px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 24px 30px 8px;
}
body:is([data-step="review"], [data-step="processing"], [data-step="result"]) .experience::before {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background: url("assets/web/home/page-frame-splatter.webp") center / 100% 100% no-repeat;
  pointer-events: none;
}
body:is([data-step="review"], [data-step="processing"], [data-step="result"]) .copy { width: 100%; text-align: center; }
body:is([data-step="review"], [data-step="processing"], [data-step="result"]) .result-brand { display: block; width: min(82%, 280px); height: auto; margin: 0 auto 16px; }
body:is([data-step="review"], [data-step="processing"], [data-step="result"]) h1 { font-size: clamp(27px, 7.6vw, 36px); line-height: 1; letter-spacing: -1.2px; }
body:is([data-step="review"], [data-step="processing"], [data-step="result"]) h1 em { color: var(--accent); }
body:is([data-step="review"], [data-step="processing"], [data-step="result"]) .description { max-width: none; margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
body:is([data-step="review"], [data-step="processing"], [data-step="result"]) .visual { width: auto; max-width: 100%; margin: 0; padding: 0; align-self: center; }
body:is([data-step="review"], [data-step="processing"], [data-step="result"]) .portrait {
  width: calc(var(--photo-height) * 9 / 16); height: var(--photo-height);
  max-height: none; max-width: 100%; box-sizing: content-box;
  padding: 5px; background: var(--paper); border-radius: 7px;
  box-shadow: 0 10px 28px #0006;
}
body:is([data-step="review"], [data-step="processing"], [data-step="result"]) .portrait > img { object-fit: contain; }
body:is([data-step="review"], [data-step="processing"], [data-step="result"]) .controls { width: 100%; max-width: 360px; align-self: center; margin: 0; text-align: center; }
.result-panel { padding: 16px; border: 1px solid #cabbac; border-radius: 12px; color: var(--ink); background: #fff9f0f2; }
.result-panel .actions { gap: 9px; }
.result-panel .button { min-height: 60px; padding: 10px 14px; gap: 11px; border-radius: 3px; }
.result-panel .button > .action-copy { display: grid; flex: 1; gap: 4px; margin: 0; text-align: left; font-size: 14px; line-height: 1.2; }
.action-copy strong { font-weight: 850; }
.action-copy small { font-size: 10px; font-weight: 500; letter-spacing: 0; }
.result-panel .button > img { flex-shrink: 0; }
.result-panel #share:disabled { opacity: 1; background: #dfd8da; color: #74636c; border-color: #bcb0b6; }
.result-panel #share:disabled img { opacity: .5; }
.result-panel .hint { margin: 11px 0 0; color: #65585e; font-size: 10px; line-height: 1.5; text-align: left; }
body:is([data-step="review"], [data-step="processing"], [data-step="result"]) #restart { min-height: 48px; margin-top: 8px; padding: 12px 0; color: var(--ink); font-size: 15px; font-weight: 800; text-underline-offset: 5px; }
body[data-step="result"] #restart > span[aria-hidden] { font-size: 18px; }
body:is([data-step="review"], [data-step="processing"], [data-step="result"]) .message { margin: 0 0 12px; color: var(--ink); text-align: left; border-color: var(--pink); border-radius: 3px; }
body:is([data-step="review"], [data-step="processing"], [data-step="result"]) .site-footer { width: 100%; max-width: 520px; padding: 10px 30px 16px; border: 0; color: var(--muted); font-size: 8px; }
body:is([data-step="review"], [data-step="processing"], [data-step="result"]) .site-footer > span:first-child { display: none; }
body:is([data-step="review"], [data-step="processing"], [data-step="result"]) .footer-meta { width: 100%; justify-content: space-between; }
body:is([data-step="review"], [data-step="processing"], [data-step="result"]) .site-footer .text-button { font-size: 8px; }
@media (max-width: 360px), (max-height: 650px) {
  body:is([data-step="review"], [data-step="processing"], [data-step="result"]) .experience { gap: 8px; padding-top: 12px; }
  body:is([data-step="review"], [data-step="processing"], [data-step="result"]) .result-brand { width: 78%; margin-bottom: 8px; }
  body:is([data-step="review"], [data-step="processing"], [data-step="result"]) .result-panel { padding: 12px; }
  body:is([data-step="review"], [data-step="processing"], [data-step="result"]) .result-panel .button { min-height: 55px; padding: 9px 11px; }
  body:is([data-step="review"], [data-step="processing"], [data-step="result"]) .result-panel .button > .action-copy { font-size: 13px; }
}

/* Full-screen reveal and the same image returning to its place in the result. */
html:has(body[data-step="result"]), body[data-step="result"] { overscroll-behavior: none; }
html:has(#result-viewer[open]), body:has(#result-viewer[open]) { overflow: hidden; }
#expand-result-preview { position: absolute; inset: 0; width: 100%; padding: 0; border: 0; background: transparent; color: white; }
#expand-result-preview > span {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 5px; padding: 5px 7px;
  border-radius: 4px; background: #171014e6; white-space: nowrap; font-size: 9px;
}
#expand-result-preview svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; }
#expand-result-preview:focus-visible { outline-offset: -4px; }
body:has(#result-viewer[open]) :is(#portrait-image, #expand-result-preview) { visibility: hidden; }
dialog.result-viewer {
  --viewer-width: calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
  --viewer-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  --viewer-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  border: 0; background: transparent; color: var(--paper); overflow: hidden; isolation: isolate;
}
.result-viewer[open] { display: grid; place-items: center; }
.result-viewer::backdrop { background: transparent; backdrop-filter: none; }
.result-viewer::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--paper) url("assets/web/backgrounds/cream-plaster.webp") center / cover; transition: opacity .65s; }
#result-viewer-image { width: min(var(--viewer-width), calc(var(--viewer-height) * 9 / 16)); height: auto; max-width: none; aspect-ratio: 9 / 16; object-fit: contain; }
#close-result-viewer {
  position: absolute; top: calc(16px + env(safe-area-inset-top, 0px)); right: calc(16px + env(safe-area-inset-right, 0px));
  display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
  border: 1px solid #ffffff80; border-radius: 50%; background: var(--ink); color: var(--pink);
  box-shadow: 0 3px 16px #0008; font-size: 32px; line-height: 1; transition: opacity .2s;
}
.result-viewer.is-closing::before, .result-viewer.is-closing #close-result-viewer { opacity: 0; }
@media (max-width: 360px) { #expand-result-preview > span { gap: 3px; padding: 4px; font-size: 8px; } #expand-result-preview svg { width: 12px; height: 12px; } }

/* Crop gestures move the image inside a fixed 9:16 window. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
body[data-step="review"] .experience { --photo-height: clamp(280px, calc(100svh - 420px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)), 480px); }
body[data-step="review"] .portrait { padding: 0; border-radius: 7px; box-shadow: 0 0 0 4px var(--paper), 0 10px 28px #0006; }
#crop-preview { display: block; width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: grab; }
#crop-preview.is-dragging { cursor: grabbing; }
#crop-preview:focus-visible { outline: 3px solid var(--pink); outline-offset: -5px; }
.crop-tools { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0 0 10px; }
.crop-tools button { min-width: 44px; min-height: 44px; border: 1px solid #a39486; border-radius: 50%; background: #fff9f0; color: var(--ink); font-size: 24px; }
.crop-tools button:disabled { cursor: default; opacity: .4; }
.crop-tools output { min-width: 48px; font-size: 11px; font-variant-numeric: tabular-nums; }
.crop-tools #crop-reset { margin-left: 14px; padding: 6px; border: 0; border-radius: 0; background: transparent; font-size: 11px; }
.review-panel { padding: 12px 14px 4px; border: 1px solid #cabbac; border-radius: 12px; color: var(--ink); background: #fff9f0f2; }
.review-panel .button { border-radius: 3px; }
.review-links .text-button { min-height: 44px; }
body[data-step="review"] #demo-note:not([hidden]) { display: block; margin: 10px 0 0; padding: 0; border: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
body[data-step="review"] #demo-note > span[aria-hidden] { display: none; }
@media (max-width: 360px), (max-height: 650px) {
  body[data-step="review"] .experience { --photo-height: 260px; }
  body[data-step="review"] .description { margin-top: 6px; }
  body[data-step="review"] .crop-tools { margin-bottom: 6px; }
}

/* Keep the framed photo visible while the actual request is in progress. */
body[data-step="processing"] .experience { --photo-height: clamp(204px, calc(100svh - 420px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)), 440px); }
body[data-step="processing"] .processing-visual { inset: 5px; gap: 24px; border-radius: 3px; background: #f3ebdddc; backdrop-filter: blur(7px); container-type: inline-size; }
.processing-caption { max-width: 92%; color: var(--ink); font-size: clamp(14px, 9cqw, 26px); font-weight: 850; line-height: 1.15; text-align: center; text-transform: uppercase; }
.processing-caption em { color: var(--accent); font-style: normal; }
.processing-panel { padding: 18px 20px 6px; border: 1px solid #cabbac; border-radius: 12px; color: var(--ink); background: #fff9f0f2; }
.processing-title { margin: 0; font-size: 15px; font-weight: 800; }
.processing-panel .processing-note { margin: 8px 0 4px; color: #65585e; font-size: 12px; line-height: 1.5; }
.processing-panel #cancel { min-height: 44px; padding: 10px 16px; }
@media (max-width: 360px), (max-height: 650px) {
  .processing-panel { padding: 14px 16px 4px; }
  .processing-panel .processing-note { font-size: 11px; }
  body[data-step="processing"] .processing-visual { gap: 16px; }
}
