:root {
  color-scheme: dark;
  --ink: #0e1012;
  --ink-soft: #111416;
  --surface: #15181b;
  --surface-raised: #1b1f22;
  --line: #303538;
  --line-soft: #23272a;
  --paper: #f3f0ea;
  --paper-soft: #d7d3cc;
  --muted: #a6abad;
  --champagne: #d8b978;
  --champagne-bright: #efcf8a;
  --champagne-ink: #1b1710;
  --success: #82b79b;
  --danger: #dc938b;
  --warning: #d9b878;
  --radius-surface: 16px;
  --radius-control: 12px;
  --safe-top: max(env(safe-area-inset-top, 0px), var(--tg-content-safe-area-inset-top, 0px));
  --safe-right: max(env(safe-area-inset-right, 0px), var(--tg-content-safe-area-inset-right, 0px));
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-content-safe-area-inset-bottom, 0px));
  --safe-left: max(env(safe-area-inset-left, 0px), var(--tg-content-safe-area-inset-left, 0px));
  --viewport-height: var(--tg-viewport-stable-height, 100dvh);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", ui-sans-serif, sans-serif;
}

.history-entry { margin-left: auto; min-height: 44px; margin-right: 8px; }
.privacy-note { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 12px 0; }
.privacy-note a, .privacy-sheet a { color: var(--champagne); text-underline-offset: 3px; }
.privacy-consent label, .privacy-choice { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; font-size: 14px; line-height: 1.5; cursor: pointer; }
.privacy-consent input, .privacy-choice input { flex: 0 0 20px; width: 20px; height: 20px; margin: 2px 0; accent-color: var(--champagne); }
.privacy-consent { margin: 18px 0; }
.privacy-sheet .source-sheet-body { display: grid; gap: 16px; }
.privacy-sheet .source-sheet-body > * { margin: 0; }
.privacy-sheet p { line-height: 1.6; }
.privacy-sheet [hidden] { display: none; }
#erase-confirmation { border-top: 1px solid var(--line); padding-top: 16px; }
#erase-confirmation button { margin-top: 16px; }

:root[data-theme="light"] {
  color-scheme: light;
  --ink: #f3efe8;
  --ink-soft: #ece6dd;
  --surface: #fffaf2;
  --surface-raised: #ffffff;
  --line: #c8bfb1;
  --line-soft: #ddd5ca;
  --paper: #171819;
  --paper-soft: #343637;
  --muted: #606566;
  --champagne: #8e6a2d;
  --champagne-bright: #74511c;
  --champagne-ink: #fffaf0;
  --success: #31694b;
  --danger: #9a4139;
  --warning: #76551f;
}

* {
  box-sizing: border-box;
}

::selection {
  background: var(--champagne-bright);
  color: var(--champagne-ink);
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: var(--champagne) var(--ink-soft);
}

body {
  min-width: 320px;
  min-height: var(--viewport-height);
  margin: 0;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  background: var(--ink);
  color: var(--paper);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
input,
a {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

@media (hover: hover) {
  .primary-button:not(:disabled):hover {
    background: var(--paper);
    border-color: var(--paper);
  }

  .secondary-button:not(:disabled):hover,
  .aspect-option:hover,
  .source-option:hover {
    background: color-mix(in srgb, var(--champagne) 10%, transparent);
  }

  .text-action:hover {
    color: var(--paper);
  }
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
dialog:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--champagne-bright) 80%, white);
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
}

.is-hidden {
  display: none !important;
}

[hidden] {
  display: none !important;
}

.studio-light {
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.studio-light::before {
  content: "";
  position: absolute;
  top: -22rem;
  left: 50%;
  width: min(48rem, 150vw);
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 185, 120, .12), rgba(216, 185, 120, .025) 48%, transparent 70%);
}

:root[data-theme="light"] .studio-light::before {
  opacity: .55;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 780px);
  min-height: var(--viewport-height);
  margin: 0 auto;
  padding: calc(var(--safe-top) + 12px) calc(var(--safe-right) + 18px) calc(var(--safe-bottom) + 28px) calc(var(--safe-left) + 18px);
}

.brand-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  margin-bottom: 20px;
}

.wordmark {
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .36em;
  line-height: 1;
}

.wordmark span {
  color: var(--champagne-bright);
}

.quiet-icon {
  display: inline-grid;
  width: 44px;
  height: 44px;
  padding: 10px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.quiet-icon svg {
  width: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.7;
}

.screen-region {
  min-height: calc(var(--viewport-height) - var(--safe-top) - var(--safe-bottom) - 76px);
}

.studio-screen {
  min-height: inherit;
  padding-bottom: 96px;
  animation: reveal-screen .52s var(--ease-out) both;
}

.screen-region.is-refresh .studio-screen {
  animation: none;
}

.studio-screen.compact-bottom {
  padding-bottom: 40px;
}

@keyframes reveal-screen {
  from {
    opacity: .2;
  }
  to {
    opacity: 1;
  }
}

.section-mark {
  margin: 0 0 12px;
  color: var(--champagne-bright);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .15em;
  line-height: 1.25;
}

.screen-title {
  max-width: 15ch;
  margin: 0 0 12px;
  color: var(--paper);
  font-size: clamp(32px, 9.2vw, 52px);
  font-weight: 540;
  letter-spacing: -.035em;
  line-height: 1.04;
  text-wrap: balance;
}

.screen-title.small {
  max-width: 19ch;
  font-size: clamp(30px, 8vw, 45px);
}

.screen-title:focus,
.fatal-state h1:focus {
  outline: none;
}

.screen-copy {
  max-width: 38rem;
  margin: 0 0 24px;
  color: var(--paper-soft);
  font-size: 16px;
  line-height: 1.5;
}

.screen-copy strong {
  color: var(--paper);
  font-weight: 600;
}

.hero-stage {
  display: grid;
  margin: 0 0 24px;
}

.hero-visual {
  margin: 0 -18px;
  overflow: hidden;
  background: var(--surface);
}

.hero-visual img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}

.hero-caption {
  padding: 20px 0 22px;
}

.hero-caption h1 {
  max-width: 16ch;
  margin: 0 0 10px;
  font-size: clamp(32px, 8.8vw, 48px);
  font-weight: 520;
  letter-spacing: -.03em;
  line-height: 1.02;
  text-wrap: balance;
}

.hero-caption p {
  max-width: 36rem;
  margin: 0;
  color: var(--paper-soft);
  font-size: 16px;
  line-height: 1.5;
}

.hero-stage.is-compact {
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.hero-stage.is-compact .hero-visual { margin: 0; border-radius: var(--radius-control); }
.hero-stage.is-compact .hero-visual img { aspect-ratio: 1; }
.hero-stage.is-compact .hero-caption { padding: 0; }
.hero-stage.is-compact h1 { font-size: clamp(20px, 5.5vw, 28px); }
.hero-stage.is-compact .hero-caption p { display: none; }

/* Lead the first visit with its actual entitlement, above the contact sheet. */
.hero-stage.is-first-free:not(.is-compact) .hero-caption {
  grid-row: 1;
  padding: 0 0 22px;
}

.hero-stage.is-first-free:not(.is-compact) .hero-visual {
  grid-row: 2;
  min-height: 0;
  align-self: center;
}

.hero-stage.is-first-free:not(.is-compact) .hero-visual img {
  height: auto;
  object-fit: contain;
}

.hero-stage.is-first-free .hero-caption h1 {
  max-width: 19ch;
  line-height: 1.08;
}

.free-emphasis {
  display: block;
  color: var(--champagne-bright);
  white-space: nowrap;
}

.hero-caption .free-reassurance {
  margin-top: 12px;
  color: var(--champagne-bright);
  font-size: 14px;
  font-weight: 550;
}

.composer-screen.is-first-free .action-note {
  color: var(--paper);
  font-size: 14px;
  font-weight: 550;
}

.offer-preview {
  display: grid;
  gap: 4px;
  margin: 0 0 22px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.offer-preview strong {
  font-size: 16px;
  font-weight: 600;
}

.offer-preview span {
  color: var(--muted);
  font-size: 14px;
}

.composer-screen {
  padding-bottom: 126px;
}

.composer-block {
  padding: 24px 0 26px;
  border-top: 1px solid var(--line);
}

.composer-block:first-of-type {
  border-top: 0;
}

.composer-block.is-locked {
  opacity: .82;
}

.composer-heading {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 16px;
}

.composer-heading > span {
  padding-top: 4px;
  color: var(--champagne-bright);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .08em;
}

.composer-heading h2 {
  margin: 0 0 4px;
  color: var(--paper);
  font-size: 22px;
  font-weight: 580;
  letter-spacing: -.025em;
}

.composer-heading p {
  max-width: 42rem;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.composer-screen .direction-option {
  min-height: 176px;
}

.composer-screen .direction-option img {
  height: 124px;
}

.selection-mark svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.contact-sheet {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.contact-slot {
  position: relative;
  min-width: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px dashed var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
}

.contact-slot.is-ready,
.contact-slot.is-uploading {
  border-style: solid;
  border-color: var(--champagne);
}

.contact-slot.is-error {
  border-color: var(--danger);
}

.contact-slot > button:not(.slot-remove) {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 132px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.contact-slot > button:disabled {
  cursor: default;
}

.contact-slot > img,
.contact-slot > button > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-status {
  position: absolute;
  right: 7px;
  bottom: 7px;
  left: 7px;
  min-width: 0;
  padding: 5px 7px;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(8, 9, 10, .78);
  color: #f3f0ea;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-plus {
  position: relative;
  display: block;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.contact-plus::before,
.contact-plus::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 1px;
  background: var(--champagne-bright);
  transform: translate(-50%, -50%);
}

.contact-plus::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.contact-slot .slot-remove {
  top: 4px;
  right: 4px;
  width: 44px;
  height: 44px;
}

.slot-remove svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.composer-inline-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.composer-inline-actions > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.direction-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0 10px;
}

.direction-option {
  position: relative;
  min-width: 0;
  min-height: 212px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  transition: border-color .2s ease, transform .2s var(--ease-out), background-color .2s ease;
}

.direction-option:active {
  transform: scale(.985);
}

.direction-option[aria-pressed="true"] {
  border-color: var(--champagne-bright);
  background: color-mix(in srgb, var(--champagne) 7%, var(--surface));
  box-shadow: inset 0 0 0 1px var(--champagne);
}

.direction-option img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  filter: saturate(.78) contrast(1.05);
}

.direction-meta {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  color: var(--paper);
  font-size: 15px;
  font-weight: 600;
}

.selection-mark {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: transparent;
  font-size: 14px;
}

[aria-pressed="true"] .selection-mark {
  border-color: var(--champagne);
  background: var(--champagne);
  color: var(--champagne-ink);
}

.direction-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.studio-locator {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.studio-locator li {
  position: relative;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .06em;
}

.studio-locator li::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line);
}

.studio-locator li.is-current {
  color: var(--champagne-bright);
}

.studio-locator li.is-current::before {
  width: 9px;
  height: 9px;
  top: -5px;
  background: var(--champagne-bright);
  box-shadow: 0 3px 12px rgba(216, 185, 120, .36);
}

.photo-sheet {
  display: grid;
  gap: 10px;
  margin: 22px 0 16px;
}

.photo-slot {
  position: relative;
  min-height: 132px;
  overflow: hidden;
  border: 1px dashed var(--line);
  border-radius: var(--radius-surface);
  background: var(--surface);
}

.photo-slot.is-ready {
  border-style: solid;
  border-color: color-mix(in srgb, var(--success) 58%, var(--line));
}

.photo-slot.is-uploading {
  border-style: solid;
  border-color: var(--champagne);
}

.photo-slot.is-error {
  border-color: var(--danger);
}

.slot-trigger {
  display: grid;
  width: 100%;
  min-height: 132px;
  grid-template-columns: 74px 1fr 34px;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.slot-trigger img {
  width: 74px;
  height: 106px;
  border-radius: var(--radius-control);
  object-fit: cover;
}

.slot-number {
  display: grid;
  width: 48px;
  height: 68px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  color: var(--champagne-bright);
  font-size: 18px;
}

.slot-copy strong,
.slot-copy span {
  display: block;
}

.slot-copy strong {
  margin-bottom: 4px;
  color: var(--paper);
  font-size: 16px;
  font-weight: 600;
}

.slot-copy span {
  color: var(--muted);
  font-size: 13px;
}

.slot-plus,
.slot-check {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--paper-soft);
  font-size: 23px;
  line-height: 1;
}

.slot-check {
  border-color: var(--success);
  color: var(--success);
  font-size: 15px;
}

.slot-remove {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(14, 16, 18, .84);
  background: color-mix(in srgb, var(--ink) 84%, transparent);
  color: var(--paper);
  cursor: pointer;
}

.upload-meter {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  overflow: hidden;
  background: var(--line-soft);
}

.upload-meter span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--champagne-bright);
  transform: scaleX(var(--upload-scale, .12));
  transform-origin: left center;
  transition: transform .16s linear;
}

.slot-error {
  margin: 0;
  padding: 0 12px 12px;
  color: var(--danger);
  font-size: 13px;
}

.upload-error {
  margin: 10px 0;
  padding: 12px 14px 4px;
  border: 1px solid var(--danger);
  border-radius: var(--radius-control);
  background: var(--surface);
}

.upload-error p { margin: 0; color: var(--danger); font-size: 14px; }
.upload-error .text-action { margin-top: 2px; }
.photo-formats { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.action-note { margin: 0; color: var(--paper-soft); font-size: 12px; line-height: 1.3; text-align: center; }
.review-format summary { min-height: 44px; padding: 10px 0; color: var(--champagne-bright); cursor: pointer; }
.review-format[open] summary { margin-bottom: 12px; }
.studio-screen:has(.action-note) { padding-bottom: calc(130px + var(--safe-bottom)); }

.photo-picker {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.text-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--champagne-bright);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--champagne) 55%, transparent);
  text-underline-offset: 5px;
}

.tip-line {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.aspect-stage {
  display: grid;
  place-items: center;
  min-height: 365px;
  margin: 24px 0 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
  background: var(--surface);
}

.aspect-preview {
  position: relative;
  width: min(100%, 265px);
  overflow: hidden;
  border: 1px solid var(--champagne);
  border-radius: 4px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, .27);
}

.aspect-preview[data-aspect="1:1"] { aspect-ratio: 1; }
.aspect-preview[data-aspect="9:16"] { width: min(62%, 210px); aspect-ratio: 9 / 16; }
.aspect-preview[data-aspect="3:4"] { width: min(82%, 245px); aspect-ratio: 3 / 4; }
.aspect-preview[data-aspect="4:3"] { width: min(100%, 300px); aspect-ratio: 4 / 3; }

.aspect-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.aspect-preview::before,
.aspect-preview::after {
  content: "";
  position: absolute;
  z-index: 1;
  width: 18px;
  height: 18px;
  border-color: var(--champagne-bright);
}

.aspect-preview::before {
  top: 8px;
  left: 8px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.aspect-preview::after {
  right: 8px;
  bottom: 8px;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.aspect-label {
  position: absolute;
  z-index: 1;
  top: 10px;
  right: 12px;
  padding: 3px 6px;
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  color: var(--champagne-bright);
  font-size: 13px;
  font-weight: 650;
}

.aspect-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}

.aspect-option {
  position: relative;
  display: grid;
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.aspect-demo,
.aspect-frame,
.aspect-option-copy {
  display: block;
}

.aspect-demo {
  display: grid;
  height: 104px;
  overflow: hidden;
  place-items: center;
  border-radius: 8px;
  background: var(--ink-soft);
}

.aspect-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--paper) 54%, transparent);
  border-radius: 3px;
  background: var(--ink);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .22);
}

.aspect-frame.ratio-1-1 { width: 82px; aspect-ratio: 1; }
.aspect-frame.ratio-9-16 { height: 92px; aspect-ratio: 9 / 16; }
.aspect-frame.ratio-3-4 { height: 92px; aspect-ratio: 3 / 4; }
.aspect-frame.ratio-4-3 { width: 96px; aspect-ratio: 4 / 3; }

.aspect-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  transform: none;
}

.aspect-frame.ratio-4-3 img.aspect-photo-female { object-position: 50% 32%; }
.aspect-frame.ratio-4-3 img.aspect-photo-male { object-position: 50% 15%; }

.aspect-option-copy {
  display: flex;
  min-width: 0;
  padding: 9px 4px 3px;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.aspect-option-copy strong {
  font-size: 17px;
  font-weight: 600;
}

.aspect-option-copy > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
}

.aspect-option[aria-pressed="true"] {
  border-color: var(--champagne-bright);
  background: color-mix(in srgb, var(--champagne) 10%, transparent);
  color: var(--champagne-bright);
}

.aspect-option[aria-pressed="true"] .aspect-option-copy > span {
  color: color-mix(in srgb, var(--champagne-bright) 72%, var(--paper));
}

.aspect-option[aria-pressed="true"] .aspect-frame {
  border-color: var(--champagne-bright);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .28), 0 0 0 1px var(--champagne-bright);
}

.recommendation {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.source-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 22px 0 28px;
}

.source-strip img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-control);
  object-fit: cover;
  border: 1px solid var(--line);
}

.colophon {
  margin: 0 0 24px;
  border-top: 1px solid var(--line);
}

.colophon-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: baseline;
  min-height: 52px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.colophon-row dt {
  color: var(--muted);
}

.colophon-row dd {
  margin: 0;
  color: var(--paper);
  font-weight: 600;
  text-align: right;
}

.colophon-row.is-total {
  min-height: 76px;
  align-items: center;
}

.colophon-row.is-total dd {
  color: var(--champagne-bright);
  font-size: 26px;
  letter-spacing: -.02em;
}

.review-format {
  margin: 0 0 24px;
}

.review-format > span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.delivery-note,
.trust-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 18px;
  color: var(--paper-soft);
  font-size: 14px;
}

.delivery-note svg,
.trust-note svg {
  width: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--champagne-bright);
  stroke-width: 1.6;
}

.sticky-action {
  position: fixed;
  z-index: 20;
  right: max(18px, calc((100vw - 780px) / 2 + 18px + var(--safe-right)));
  bottom: calc(var(--safe-bottom) + 10px);
  left: max(18px, calc((100vw - 780px) / 2 + 18px + var(--safe-left)));
  display: grid;
  gap: 8px;
  padding-top: 20px;
  background: linear-gradient(to bottom, transparent, var(--ink) 22px);
}

.primary-button,
.secondary-button,
.danger-button {
  display: inline-flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 18px;
  border-radius: var(--radius-control);
  cursor: pointer;
  font-size: 16px;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
}

.primary-button {
  border: 1px solid var(--champagne-bright);
  background: var(--champagne-bright);
  color: var(--champagne-ink);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .23);
}

.primary-button:disabled {
  border-color: var(--line);
  background: var(--surface-raised);
  color: var(--muted);
  box-shadow: none;
  cursor: not-allowed;
}

.secondary-button {
  border: 1px solid var(--champagne);
  background: transparent;
  color: var(--champagne-bright);
}

.danger-button {
  border: 1px solid var(--danger);
  background: transparent;
  color: var(--danger);
}

.button-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.state-plate {
  display: grid;
  place-items: center;
  min-height: 300px;
  margin: 22px 0 26px;
  padding: 30px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
  background: var(--surface);
  text-align: center;
}

.state-symbol {
  position: relative;
  display: grid;
  width: 84px;
  height: 84px;
  margin-bottom: 24px;
  place-items: center;
  border: 1px solid var(--champagne);
  border-radius: 50%;
  color: var(--champagne-bright);
  font-size: 28px;
}

.state-symbol.is-active::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px dashed var(--champagne);
  border-radius: 50%;
  animation: spin 7s linear infinite;
}

.state-symbol.is-error {
  border-color: var(--danger);
  color: var(--danger);
}

.state-symbol > svg {
  width: 34px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.state-plate h2 {
  margin: 0 0 10px;
  font-size: 25px;
  font-weight: 560;
  letter-spacing: -.025em;
}

.state-plate p {
  max-width: 34rem;
  margin: 0;
  color: var(--muted);
}

.payment-facts {
  width: 100%;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.payment-facts strong {
  display: block;
  color: var(--paper);
  font-size: 24px;
}

.payment-facts span {
  color: var(--muted);
  font-size: 13px;
}

.contact-progress {
  margin: 24px 0;
  padding: 8px;
  border: 1px solid var(--champagne);
  border-radius: var(--radius-surface);
}

.progress-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.progress-frame {
  position: relative;
  padding: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px dashed var(--line);
  border-radius: 5px;
  background: var(--ink-soft);
}

.progress-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-retry-copy { display: none; }
[data-load-error] img { visibility: hidden; }
[data-load-error] .image-retry-copy {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 4px;
  background: var(--ink-soft);
  color: var(--paper-soft);
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
}

.contact-count {
  margin: 10px 0 2px;
  color: var(--champagne-bright);
  font-size: 14px;
  text-align: center;
}

.timeline {
  margin: 28px 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  min-height: 50px;
  padding: 1px 0 18px 39px;
  color: var(--muted);
}

.timeline li::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--ink);
}

.timeline li::after {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 0;
  left: 11px;
  border-left: 1px solid var(--line);
}

.timeline li:last-child::after { display: none; }

.timeline li.is-done,
.timeline li.is-current {
  color: var(--paper);
}

.timeline li.is-done::before {
  border-color: var(--success);
  background: var(--success);
  box-shadow: inset 0 0 0 5px var(--ink);
}

.timeline li.is-current::before {
  border-color: var(--champagne-bright);
  box-shadow: inset 0 0 0 5px var(--ink), 0 3px 13px rgba(216, 185, 120, .42);
  background: var(--champagne-bright);
}

.offline-note {
  margin: 20px 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  color: var(--paper-soft);
  font-size: 14px;
}

.review-notice {
  display: grid;
  gap: 5px;
  margin-top: 24px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border: 1px solid color-mix(in srgb, var(--warning) 52%, transparent);
  border-radius: var(--radius-control);
  background: var(--surface);
  background: color-mix(in srgb, var(--warning) 9%, transparent);
}

.review-notice strong { color: var(--paper); }
.review-notice span { color: var(--muted); font-size: 14px; }

.results-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.results-intro .screen-title { margin-bottom: 0; }

.result-count {
  flex: 0 0 auto;
  color: var(--champagne-bright);
  font-size: 14px;
}

.result-delivery-status {
  margin: -10px 0 22px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 28px;
}

.result-tile {
  position: relative;
  min-height: 150px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-control);
  background: var(--surface);
  cursor: zoom-in;
}

.result-tile img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  background: #090a0b;
}

.result-tile span {
  position: absolute;
  right: 7px;
  bottom: 7px;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  background: rgba(8, 9, 10, .76);
  color: #f3f0ea;
  font-size: 11px;
}

.next-series {
  margin-top: 32px;
  padding-top: 25px;
  border-top: 1px solid var(--line);
}

.next-series h2 {
  max-width: 20ch;
  margin: 0 0 9px;
  font-size: 24px;
  font-weight: 560;
  letter-spacing: -.02em;
}

.next-series p {
  margin: 0 0 18px;
  color: var(--muted);
}

.action-stack {
  display: grid;
  gap: 10px;
}

.boot-screen {
  display: grid;
  min-height: calc(var(--viewport-height) - 110px);
  place-content: center;
  justify-items: center;
  text-align: center;
}

.aperture {
  position: relative;
  width: 68px;
  height: 68px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.aperture i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 1px;
  transform-origin: 0 0;
  background: var(--champagne-bright);
  animation: aperture 1.8s var(--ease-out) infinite;
}

.aperture i:nth-child(2) { animation-delay: -.6s; }
.aperture i:nth-child(3) { animation-delay: -1.2s; }

@keyframes aperture {
  0% { transform: rotate(0) scaleX(.25); opacity: .2; }
  45% { opacity: 1; }
  100% { transform: rotate(180deg) scaleX(1); opacity: .1; }
}

.boot-title {
  margin: 0 0 6px;
  color: var(--paper);
  font-size: 19px;
  font-weight: 600;
}

.boot-copy {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.fatal-state {
  display: grid;
  min-height: calc(var(--viewport-height) - 120px);
  place-content: center;
  text-align: center;
}

.fatal-state h1 {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 560;
}

.fatal-state p {
  max-width: 32rem;
  margin: 0 auto 20px;
  color: var(--muted);
}

.toast-stack {
  position: fixed;
  z-index: 80;
  top: calc(var(--safe-top) + 14px);
  right: calc(var(--safe-right) + 14px);
  left: calc(var(--safe-left) + 14px);
  display: grid;
  place-items: center;
  pointer-events: none;
}

.toast {
  width: min(100%, 520px);
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-raised);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
  color: var(--paper);
  font-size: 14px;
  animation: toast-in .3s var(--ease-out) both;
}

.toast.is-error { border-color: var(--danger); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-10px); }
}

dialog {
  color: var(--paper);
}

.source-sheet,
.guide-sheet,
.viewer,
.camera-studio {
  border: 0;
  background: var(--surface-raised);
}

.source-sheet::backdrop,
.guide-sheet::backdrop,
.viewer::backdrop,
.camera-studio::backdrop {
  background: rgba(0, 0, 0, .74);
}

.source-sheet,
.guide-sheet {
  width: min(100%, 680px);
  max-height: min(92dvh, 760px);
  margin: auto auto 0;
  padding: 0 18px calc(var(--safe-bottom) + 22px);
  overflow: hidden;
  overscroll-behavior: contain;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -14px 40px rgba(0, 0, 0, .3);
}

.source-sheet[open],
.guide-sheet[open] {
  animation: sheet-in .4s var(--ease-out) both;
}

@keyframes sheet-in {
  from { transform: translateY(35%); opacity: .4; }
}

.sheet-handle-row {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  background: var(--surface-raised);
}

.sheet-handle {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
}

.sheet-handle-row .quiet-icon {
  position: absolute;
  right: -8px;
}

.source-sheet {
  width: min(100%, 560px);
  padding-bottom: calc(var(--safe-bottom) + 18px);
}

.source-sheet-body {
  padding: 0 0 4px;
}

.source-slot-label {
  margin: 0 0 3px;
  color: var(--champagne-bright);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.source-sheet-body h2 {
  margin: 0 0 18px;
  color: var(--paper);
  font-size: 27px;
  font-weight: 580;
  letter-spacing: -.025em;
}

.source-options {
  display: grid;
  gap: 9px;
}

.source-option {
  display: grid;
  width: 100%;
  min-height: 78px;
  grid-template-columns: 48px minmax(0, 1fr) 24px;
  gap: 13px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--paper);
  cursor: pointer;
  text-align: left;
  transition: border-color .2s ease, background-color .2s ease, transform .16s var(--ease-out);
}

.source-option:active {
  transform: scale(.985);
}

.source-option-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--champagne) 48%, var(--line));
  border-radius: 50%;
  background: color-mix(in srgb, var(--champagne) 8%, transparent);
  color: var(--champagne-bright);
}

.source-option-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.source-option-copy {
  min-width: 0;
}

.source-option-copy strong,
.source-option-copy small {
  display: block;
}

.source-option-copy strong {
  margin-bottom: 2px;
  font-size: 16px;
  font-weight: 650;
}

.source-option-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-chevron {
  width: 22px;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.camera-studio {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #08090a;
  color: #f3f0ea;
}

.camera-studio::backdrop {
  background: #08090a;
}

.camera-studio[open] {
  display: block;
}

.camera-shell {
  display: grid;
  width: min(100%, 680px);
  height: 100dvh;
  margin: 0 auto;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #08090a;
}

.camera-bar {
  position: relative;
  z-index: 3;
  display: grid;
  min-height: calc(var(--safe-top) + 64px);
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 8px;
  align-items: end;
  padding: var(--safe-top) calc(var(--safe-right) + 10px) 8px calc(var(--safe-left) + 10px);
  background: #08090a;
}

.camera-icon-button {
  display: grid;
  width: 48px;
  height: 48px;
  padding: 12px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #f3f0ea;
  cursor: pointer;
}

.camera-icon-button svg {
  width: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.camera-title-block {
  min-width: 0;
  align-self: center;
  text-align: center;
}

.camera-title-block span,
.camera-title-block h2 {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.camera-title-block span {
  color: #aaaead;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.camera-title-block h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -.01em;
}

.camera-stage {
  position: relative;
  min-height: 0;
  margin: 0 calc(var(--safe-right) + 10px) 0 calc(var(--safe-left) + 10px);
  overflow: hidden;
  border: 1px solid #25282a;
  border-radius: 20px;
  background: #111315;
}

.camera-stage video,
.camera-stage > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-stage video {
  background: #111315;
}

.camera-stage video.is-mirrored {
  transform: scaleX(-1);
}

.camera-loading,
.camera-error,
.camera-guide {
  position: absolute;
  inset: 0;
}

.camera-loading,
.camera-error {
  display: grid;
  padding: 24px;
  place-content: center;
  justify-items: center;
  background: #111315;
  text-align: center;
}

.camera-loading {
  gap: 13px;
  color: #b9bcbb;
  font-size: 14px;
}

.camera-spinner {
  width: 30px;
  height: 30px;
  border: 2px solid #4c5051;
  border-right-color: #efcf8a;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.camera-error {
  gap: 8px;
}

.camera-error-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 3px;
  place-items: center;
  border: 1px solid #65413e;
  border-radius: 50%;
  color: #e4a19a;
}

.camera-error-icon svg {
  width: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.camera-error strong {
  font-size: 18px;
}

.camera-error p {
  max-width: 300px;
  margin: 0;
  color: #aaaead;
  font-size: 14px;
}

.camera-guide {
  display: grid;
  padding: 22px;
  place-content: center;
  justify-items: center;
  pointer-events: none;
}

.camera-guide span {
  width: min(62vw, 270px);
  height: min(66dvh, 370px);
  max-height: 78%;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 48%;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, .08);
}

.camera-guide p {
  position: absolute;
  right: 16px;
  bottom: 14px;
  left: 16px;
  margin: 0;
  color: rgba(255, 255, 255, .88);
  font-size: 13px;
  text-align: center;
  text-shadow: 0 1px 5px rgba(0, 0, 0, .8);
}

.camera-controls {
  display: grid;
  min-height: calc(var(--safe-bottom) + 116px);
  align-items: center;
  padding: 14px calc(var(--safe-right) + 16px) calc(var(--safe-bottom) + 14px) calc(var(--safe-left) + 16px);
  background: #08090a;
}

.camera-live-actions {
  display: grid;
  place-items: center;
}

.camera-shutter {
  display: grid;
  width: 74px;
  height: 74px;
  padding: 6px;
  place-items: center;
  border: 2px solid #f3f0ea;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: transform .14s ease;
}

.camera-shutter:active {
  transform: scale(.94);
}

.camera-shutter span {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #f3f0ea;
}

.camera-review-actions {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 9px;
}

.camera-error-actions {
  width: min(100%, 420px);
  margin: 0 auto;
}

.camera-review-actions .primary-button,
.camera-review-actions .secondary-button,
.camera-error-actions .primary-button {
  min-height: 54px;
}

.camera-studio .primary-button {
  border-color: #efcf8a;
  background: #efcf8a;
  color: #1b1710;
}

.camera-studio .secondary-button {
  border-color: #d8b978;
  background: transparent;
  color: #efcf8a;
}

.camera-studio button:focus-visible {
  outline-color: #efcf8a;
}

@media (hover: hover) {
  .camera-studio .primary-button:not(:disabled):hover {
    border-color: #f3f0ea;
    background: #f3f0ea;
  }

  .camera-studio .secondary-button:not(:disabled):hover {
    background: rgba(216, 185, 120, .12);
  }
}

.guide-body h2 {
  margin: 0 0 7px;
  font-size: 27px;
  font-weight: 560;
  letter-spacing: -.025em;
}

.guide-body > p:not(.section-mark, .rights-note) {
  margin: 0 0 12px;
  color: var(--paper-soft);
}

.guide-body img {
  width: auto;
  max-width: 100%;
  height: clamp(156px, 28dvh, 237px);
  aspect-ratio: 4 / 3;
  margin: 0 auto 12px;
  object-fit: contain;
  border-radius: var(--radius-surface);
  background: var(--ink);
}

.guide-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-list li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.guide-list span {
  color: var(--champagne-bright);
  font-size: 13px;
}

.rights-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.viewer {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: calc(var(--safe-top) + 8px) calc(var(--safe-right) + 10px) calc(var(--safe-bottom) + 12px) calc(var(--safe-left) + 10px);
  overflow: hidden;
  background: #08090a;
}

.viewer[open] {
  display: grid;
  grid-template: 48px minmax(0, 1fr) 54px / 48px minmax(0, 1fr) 48px;
  align-items: center;
}

.viewer-bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #f3f0ea;
}

.viewer img {
  grid-row: 2;
  grid-column: 1 / -1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#viewer-retry {
  z-index: 3;
  grid-row: 2;
  grid-column: 2;
  justify-self: center;
  max-width: 240px;
}

.viewer-nav {
  z-index: 2;
  grid-row: 2;
  width: 44px;
  height: 54px;
  border: 0;
  background: rgba(0, 0, 0, .48);
  color: #f3f0ea;
  cursor: pointer;
}

.viewer-nav svg {
  width: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.viewer-prev { grid-column: 1; }
.viewer-next { grid-column: 3; }

.viewer-download {
  grid-row: 3;
  grid-column: 1 / -1;
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  color: #efcf8a;
  text-decoration: none;
}

@media (min-width: 720px) {
  .app-shell {
    padding-right: calc(var(--safe-right) + 28px);
    padding-left: calc(var(--safe-left) + 28px);
  }

  .hero-stage {
    grid-template-columns: minmax(0, 1.35fr) minmax(250px, .65fr);
    margin-right: -28px;
    margin-left: -28px;
    overflow: hidden;
    border-radius: var(--radius-surface);
    background: var(--surface);
  }

  .hero-visual {
    min-height: 350px;
    margin: 0;
  }

  .hero-visual img {
    height: 100%;
  }

  .hero-caption {
    display: flex;
    padding: 30px 28px;
    flex-direction: column;
    justify-content: flex-end;
    border-bottom: 0;
  }

  .hero-caption h1 {
    font-size: clamp(34px, 5vw, 42px);
  }

  .hero-stage.is-first-free:not(.is-compact) .hero-visual {
    grid-column: 1;
    grid-row: 1;
  }

  .hero-stage.is-first-free:not(.is-compact) {
    grid-template-columns: minmax(0, 1fr) minmax(280px, .9fr);
  }

  .hero-stage.is-first-free:not(.is-compact) .hero-caption {
    grid-column: 2;
    grid-row: 1;
    padding: 28px 24px;
    justify-content: center;
  }

  .hero-stage.is-first-free:not(.is-compact) .hero-caption h1 {
    font-size: clamp(28px, 4vw, 32px);
  }

  .composer-block > .aspect-choices {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .direction-list {
    gap: 14px;
  }

  .direction-option {
    min-height: 285px;
  }

  .direction-option img {
    height: 230px;
  }

  .photo-layout,
  .aspect-layout,
  .review-layout {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 32px;
    align-items: start;
  }

  .photo-layout .photo-sheet,
  .aspect-layout .aspect-stage,
  .review-layout .source-strip {
    margin-top: 0;
  }

  .review-layout .review-format {
    grid-column: 2;
  }

  .sticky-action {
    right: max(28px, calc((100vw - 780px) / 2 + 28px + var(--safe-right)));
    left: max(28px, calc((100vw - 780px) / 2 + 28px + var(--safe-left)));
  }

  .results-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (max-width: 359px) {
  .app-shell {
    padding-right: calc(var(--safe-right) + 14px);
    padding-left: calc(var(--safe-left) + 14px);
  }

  .hero-visual {
    margin-right: -14px;
    margin-left: -14px;
  }

  .direction-option {
    min-height: 192px;
  }

  .direction-option img { height: 140px; }
  .direction-meta { padding: 9px; font-size: 14px; }
  .aspect-option { min-height: 68px; }
  .aspect-option strong { font-size: 15px; }
  .aspect-option span { font-size: 12px; }
  .sticky-action { right: calc(var(--safe-right) + 14px); left: calc(var(--safe-left) + 14px); }
}

@media (orientation: landscape) and (max-height: 500px) {
  .app-shell { width: min(100%, 900px); }
  .brand-bar { margin-bottom: 8px; }
  .hero-stage {
    grid-template-columns: minmax(0, 1.35fr) minmax(220px, .65fr);
    overflow: hidden;
    border-radius: var(--radius-surface);
    background: var(--surface);
  }
  .hero-visual { min-height: 220px; margin: 0; }
  .hero-visual img { height: 100%; }
  .hero-caption { padding: 22px; border-bottom: 0; align-self: end; }
  .hero-caption h1 { font-size: 30px; }
  .hero-stage.is-first-free:not(.is-compact) .hero-visual { grid-column: 1; grid-row: 1; }
  .hero-stage.is-first-free:not(.is-compact) .hero-caption { grid-column: 2; grid-row: 1; padding: 16px; align-self: start; }
  .hero-stage.is-first-free:not(.is-compact) .hero-caption h1 { font-size: 26px; }
  .hero-stage.is-first-free:not(.is-compact) .hero-caption p { font-size: 14px; }
  .state-plate { min-height: 210px; }

  .guide-sheet {
    width: min(calc(100% - 16px), 760px);
    max-height: calc(100dvh - 8px);
    margin: auto;
    border-radius: var(--radius-surface);
  }

  .guide-body {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(250px, .95fr);
    grid-template-areas:
      "title image"
      "intro image"
      "list image"
      "rights rights";
    column-gap: 18px;
  }

  .guide-body h2 { grid-area: title; }
  .guide-body > p:not(.section-mark, .rights-note) { grid-area: intro; }
  .guide-body img {
    grid-area: image;
    width: 100%;
    height: auto;
    margin: 0;
  }
  .guide-list { grid-area: list; }
  .rights-note { grid-area: rights; }
}

@media (max-height: 680px) {
  .guide-sheet {
    width: min(calc(100% - 12px), 680px);
    max-height: calc(100dvh - 8px);
    margin: auto;
    padding-right: 14px;
    padding-bottom: calc(var(--safe-bottom) + 14px);
    padding-left: 14px;
    border-radius: var(--radius-surface);
  }

  .sheet-handle-row { min-height: 44px; }
  .guide-body h2 { margin-bottom: 4px; font-size: 23px; }
  .guide-body > p:not(.section-mark, .rights-note) {
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.35;
  }
  .guide-body img {
    height: clamp(130px, 24dvh, 164px);
    margin-bottom: 8px;
  }
  .guide-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .guide-list li {
    display: block;
    padding: 7px 0;
    border-top: 1px solid var(--line);
    border-bottom: 0;
    font-size: 12px;
    line-height: 1.25;
  }
  .guide-list span { margin-bottom: 3px; }
  .rights-note { margin-top: 8px; font-size: 10.5px; line-height: 1.3; }
}

@media (orientation: landscape) and (max-height: 500px) and (min-width: 560px) {
  .guide-body img {
    width: min(100%, 230px);
    height: auto;
    margin: 0;
    align-self: start;
    justify-self: center;
  }

  .guide-list {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .guide-list li {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px;
    padding: 5px 0;
    border-top: 0;
    border-bottom: 1px solid var(--line);
  }

  .camera-shell {
    position: relative;
    width: min(100%, 900px);
    grid-template: minmax(0, 1fr) / minmax(0, 1fr) clamp(142px, 22vw, 176px);
    gap: 10px;
    padding: calc(var(--safe-top) + 8px) calc(var(--safe-right) + 8px) calc(var(--safe-bottom) + 8px) calc(var(--safe-left) + 8px);
  }

  .camera-bar {
    position: absolute;
    top: calc(var(--safe-top) + 8px);
    right: calc(var(--safe-right) + clamp(142px, 22vw, 176px) + 18px);
    left: calc(var(--safe-left) + 8px);
    min-height: 64px;
    align-items: start;
    padding: 6px 8px 14px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .7), transparent);
  }

  .camera-icon-button {
    background: rgba(0, 0, 0, .28);
  }

  .camera-stage {
    grid-row: 1;
    grid-column: 1;
    margin: 0;
  }

  .camera-controls {
    min-height: 0;
    grid-row: 1;
    grid-column: 2;
    padding: 8px;
    border-left: 1px solid #25282a;
  }

  .camera-review-actions {
    grid-template-columns: 1fr;
  }

  .camera-guide span {
    width: min(29vw, 178px);
    height: min(72dvh, 280px);
    max-height: 78%;
  }
}

/* Customer navigation and retained sessions share the existing studio palette. */
.utility-sheet h2, .sessions-sheet h2, .example-sheet h2 { margin: 0 0 16px; font-size: clamp(24px, 5vw, 30px); font-weight: 560; letter-spacing: -.025em; line-height: 1.1; }
.utility-sheet p { line-height: 1.6; }
.utility-sheet, .sessions-sheet, .example-sheet, .privacy-sheet { overflow-y: auto; }
.utility-sheet .sheet-handle-row .text-action, .sessions-sheet .sheet-handle-row .text-action, .example-sheet .sheet-handle-row .text-action { position: absolute; right: 0; min-height: 44px; }
.menu-entry { display: grid; width: 100%; min-height: 74px; gap: 5px; padding: 17px 0; text-align: left; border: 0; border-top: 1px solid var(--line); background: transparent; cursor: pointer; }
.menu-entry strong { font-size: 17px; font-weight: 560; }
.menu-entry > span { color: var(--muted); font-size: 14px; }
.support-mail { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.support-address { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin-top: 14px; font-size: 14px; }
.support-address .text-action { min-height: 44px; }
.order-help { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin: 20px 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.order-help .text-action { min-height: 44px; text-align: left; }
.order-reference { color: var(--muted); text-align: center; font-size: 14px; }
.gallery-return, .payment-return, .history-back { min-height: 44px; margin-bottom: 12px; text-align: left; }
.order-receipt { margin: 28px 0 16px; }
.order-receipt > div { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.order-receipt dt { color: var(--muted); }
.order-receipt dd { margin: 0; text-align: right; font-weight: 550; }
.sessions-sheet { width: min(calc(100% - 20px), 680px); max-height: calc(var(--viewport-height) - var(--safe-top) - 12px); }
.history-intro { margin: 0 0 22px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.history-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: baseline; }
.history-heading h2 { margin-bottom: 10px; }
.history-heading > span { color: var(--muted); font-size: 14px; }
.session-list { display: grid; margin-bottom: 20px; }
.session-card { display: grid; grid-template-columns: 68px minmax(0,1fr) 16px; gap: 14px; align-items: center; width: 100%; min-height: 106px; padding: 14px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.session-cover { display: grid; width: 68px; aspect-ratio: 3/4; overflow: hidden; place-items: center; border-radius: 8px; background: var(--surface-raised); color: var(--muted); }
.session-cover img { width: 100%; height: 100%; object-fit: cover; }
.session-cover svg { width: 28px; fill: none; stroke: currentColor; stroke-width: 1.2; }
.session-copy { display: grid; gap: 6px; min-width: 0; }
.session-copy strong { font-size: 17px; font-weight: 550; }
.session-copy > span { color: var(--muted); font-size: 13px; }
.session-copy > .session-status { color: var(--champagne-bright); }
.session-copy > .session-status.is-ready { color: var(--success); }
.session-arrow { color: var(--muted); font-size: 25px; }
.history-empty { display: grid; gap: 16px; padding: 22px 0; }
.history-empty p { margin: 0; font-size: 18px; }
.history-empty > span { color: var(--muted); font-size: 15px; line-height: 1.5; }
.history-more { width: 100%; }
.history-error { color: var(--danger); line-height: 1.5; }
.history-grid { margin-top: 16px; }
.history-grid .result-tile img { object-fit: contain; }
.composer-format > summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 60px; cursor: pointer; list-style: none; }
.composer-format > summary::-webkit-details-marker { display: none; }
.composer-format > summary > span:first-child { display: grid; gap: 5px; }
.composer-format strong { font-size: 17px; font-weight: 550; }
.composer-format [data-format-summary] { color: var(--muted); font-size: 14px; }
.format-edit { color: var(--champagne-bright); font-size: 14px; text-decoration: underline; text-underline-offset: 4px; text-align: right; }
.composer-format > summary:focus-visible { outline: 3px solid var(--champagne); outline-offset: 4px; border-radius: 4px; }
.composer-format[open] .aspect-choices { margin-top: 14px; }
.hero-example { display: block; width: 100%; padding: 0; border: 0; background: transparent; text-align: left; cursor: zoom-in; }
.hero-stage:not(.is-compact) .hero-example img { height: auto; aspect-ratio: 4/3; object-fit: contain; }
.hero-example > span { display: flex; justify-content: space-between; align-items: center; min-height: 32px; padding: 6px 10px; color: var(--muted); font-size: 12px; }
.hero-stage.is-compact .hero-example > span { display: none; }
.hero-stage.is-compact .hero-visual img { aspect-ratio: 4/3; object-fit: contain; }
.example-sheet { width: min(calc(100% - 16px), 900px); }
.example-sheet img { width: 100%; height: auto; object-fit: contain; }
@media (max-width: 599px) and (orientation: portrait) {
  .brand-bar { margin-bottom: 12px; }
  .hero-stage:not(.is-compact) .hero-visual { width: min(100%, 252px); min-height: 0; margin: 0 auto; border-radius: 10px; }
  .hero-stage:not(.is-compact) .hero-visual img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: contain; }
  .hero-stage:not(.is-compact) .hero-caption { grid-row: 1; padding-top: 0; padding-bottom: 18px; }
  .hero-stage:not(.is-compact) .hero-visual { grid-row: 2; }
  .hero-stage { margin-bottom: 16px; }
  .sessions-sheet .source-sheet-body { padding-right: 14px; padding-left: 14px; }
}
@media (max-width: 359px) {
  .wordmark { font-size: 12px; letter-spacing: .28em; }
  .session-card { grid-template-columns: 56px minmax(0,1fr) 12px; gap: 10px; }
  .session-cover { width: 56px; }
  .session-copy strong { font-size: 16px; }
  .session-copy > span { font-size: 12px; }
  .composer-format strong { font-size: 16px; }
  .format-edit { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
