:root {
  --primary: #111111;
  --primary-soft: #2a2a2a;
  --accent: #c7a46a;
  --background: #f5f3ef;
  --surface: #ffffff;
  --surface-2: #ece9e3;
  --text: #151515;
  --muted: #6f6b64;
  --line: #dedbd5;
  --success: #137a51;
  --warning: #a35c00;
  --danger: #b3261e;
  --shadow: 0 14px 42px rgba(20, 20, 20, .08);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

html[data-theme="dark"] {
  --background: #111111;
  --surface: #1b1b1b;
  --surface-2: #242424;
  --text: #f6f4ef;
  --muted: #b6b0a7;
  --line: #353535;
  --primary: #f7f5f0;
  --primary-soft: #e4dfd5;
  --shadow: 0 18px 44px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
img { max-width: 100%; display: block; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.is-hidden { display: none !important; }
.noscript { padding: 18px; background: #fff1cc; color: #5d3d00; text-align: center; }

.app-shell { min-height: 100vh; padding-bottom: calc(98px + var(--safe-bottom)); }
.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(16px, 4vw, 42px);
  background: rgba(255,255,255,.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
html[data-theme="dark"] .topbar { background: rgba(20,20,20,.88); }
.brand-lockup { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-logo-wrap {
  width: 88px;
  height: 50px;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  flex: 0 0 auto;
  box-shadow: 0 7px 20px rgba(0,0,0,.16);
}
.brand-logo { width: 100%; height: 100%; object-fit: contain; }
.brand-copy { min-width: 0; }
.brand-copy h1 { margin: 1px 0 2px; font-size: clamp(18px, 4vw, 26px); line-height: 1.05; letter-spacing: -.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-copy p:last-child { margin: 0; color: var(--muted); font-size: 12px; }
.eyebrow { margin: 0; font-weight: 800; font-size: 10px; letter-spacing: .16em; color: var(--muted); }
.header-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
}
.icon-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(0,0,0,.07); }
.icon-btn svg { width: 20px; height: 20px; }

.business-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 12px clamp(16px, 4vw, 42px);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.business-strip::-webkit-scrollbar { display: none; }
.business-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
}
.business-chip:hover { border-color: var(--text); }
.business-chip svg { width: 18px; height: 18px; }

.status-banner, .demo-banner {
  margin: 14px auto 0;
  width: min(1160px, calc(100% - 28px));
  border-radius: 16px;
  padding: 13px 15px;
}
.status-banner.warning { background: #fff3d9; color: #6a4200; border: 1px solid #f2d49a; }
html[data-theme="dark"] .status-banner.warning { background: #3a2c10; color: #ffe0a3; border-color: #5d491f; }
.demo-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, #181818, #34312d);
  color: #fff;
  box-shadow: var(--shadow);
}
.demo-banner div { display: grid; gap: 3px; }
.demo-banner strong { font-size: 14px; }
.demo-banner span { color: rgba(255,255,255,.72); font-size: 12px; }
.text-btn { border: 0; background: transparent; color: inherit; text-decoration: underline; font-weight: 800; white-space: nowrap; }

.stepper {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(5, minmax(66px, 1fr));
  gap: 8px;
  width: min(1160px, calc(100% - 28px));
  margin: 14px auto 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 24px rgba(0,0,0,.04);
  overflow-x: auto;
}
.step-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 46px;
  padding: 8px 10px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
}
.step-tab.is-active { background: var(--text); color: var(--surface); }
.step-tab.is-complete:not(.is-active) { color: var(--success); }
.step-index {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 10px;
}

.main-content { width: min(1160px, calc(100% - 28px)); margin: 22px auto 36px; }
.step-panel { display: none; animation: panelIn .28s ease both; }
.step-panel.is-active { display: block; }
@keyframes panelIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-heading h2 { margin: 4px 0 5px; font-size: clamp(26px, 6vw, 42px); line-height: 1; letter-spacing: -.045em; }
.section-heading p:last-child { margin: 0; color: var(--muted); font-size: 14px; }
.date-pill, .progress-summary {
  flex: 0 0 auto;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}
.progress-summary { display: grid; gap: 2px; }
.progress-summary strong { color: var(--text); font-size: 18px; }

.surface {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}
.form-card { padding: clamp(18px, 4vw, 34px); }
.form-grid { display: grid; gap: 16px; }
.form-grid.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: grid; gap: 8px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 800; }
.field b { color: var(--danger); }
.field small { color: var(--muted); line-height: 1.35; }
.field input, .field select, .field textarea, .caption-textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--background);
  color: var(--text);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input, .field select { min-height: 50px; padding: 0 14px; }
.field textarea, .caption-textarea { padding: 13px 14px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .caption-textarea:focus { border-color: var(--text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 12%, transparent); }
.full-width { grid-column: 1 / -1; }
.phone-input { display: grid; grid-template-columns: 86px 1fr; gap: 8px; }
.consent-block { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.check-row { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.4; }
.check-row input { width: 19px; height: 19px; accent-color: #111; flex: 0 0 auto; }
.important-check { padding: 15px; border-radius: 15px; background: var(--surface-2); font-weight: 700; }
.usage-options { display: grid; gap: 10px; margin: 16px 0 0; padding: 15px; border: 1px solid var(--line); border-radius: 15px; }
.usage-options legend { padding: 0 7px; color: var(--muted); font-size: 12px; font-weight: 800; }
.usage-options label { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.usage-options input { accent-color: #111; }
.privacy-note { display: flex; align-items: flex-start; gap: 9px; margin: 15px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.privacy-note svg { flex: 0 0 auto; width: 20px; height: 20px; }

.consent-gate { padding: 14px 16px; border-radius: 15px; margin-bottom: 14px; background: #fff3d9; color: #6a4200; font-weight: 700; }
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.photo-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.photo-card.is-complete { border-color: color-mix(in srgb, var(--success) 55%, var(--line)); }
.photo-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(145deg, #e9e6e0, #dcd8d1);
}
html[data-theme="dark"] .photo-media { background: linear-gradient(145deg, #282828, #1f1f1f); }
.photo-media img { width: 100%; height: 100%; object-fit: contain; background: #ece9e3; }
.photo-placeholder { width: 100%; height: 100%; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--muted); }
.photo-placeholder svg { width: 46px; height: 46px; margin: 0 auto 12px; }
.photo-placeholder strong { display: block; color: var(--text); margin-bottom: 4px; }
.photo-status {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.7);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}
.photo-card.is-complete .photo-status { background: rgba(19,122,81,.9); }
.photo-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.photo-body { padding: 15px; }
.photo-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.photo-title-row h3 { margin: 0; font-size: 18px; }
.position-label { font-size: 10px; color: var(--muted); letter-spacing: .12em; font-weight: 800; }
.photo-instruction { min-height: 38px; margin: 8px 0 13px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.photo-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.photo-actions button, .photo-actions label { min-height: 42px; font-size: 12px; }
.photo-actions .action-full { grid-column: 1 / -1; }
.photo-warning { margin: 10px 0 0; padding: 9px 10px; border-radius: 11px; background: #fff3d9; color: #6a4200; font-size: 11px; }
.file-input-hidden { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }

.primary-btn, .secondary-btn, .danger-btn, .capture-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 17px;
  border-radius: 14px;
  font-weight: 850;
  font-size: 13px;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s;
}
.primary-btn { border: 1px solid var(--text); background: var(--text); color: var(--surface); }
.secondary-btn { border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.danger-btn { border: 1px solid var(--danger); background: var(--danger); color: #fff; }
.primary-btn:hover:not(:disabled), .secondary-btn:hover:not(:disabled), .danger-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(0,0,0,.1); }
.primary-btn svg { width: 19px; height: 19px; }
.wide-btn { width: 100%; }

.generation-controls { padding: clamp(18px, 4vw, 28px); }
.control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: end; margin-bottom: 16px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; }
.switch-row span { display: grid; gap: 3px; }
.switch-row strong { font-size: 13px; }
.switch-row small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.switch-row input { appearance: none; width: 46px; height: 26px; border-radius: 999px; background: var(--line); position: relative; flex: 0 0 auto; transition: .2s; }
.switch-row input::after { content: ""; position: absolute; width: 20px; height: 20px; top: 3px; left: 3px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.18); transition: .2s; }
.switch-row input:checked { background: #111; }
.switch-row input:checked::after { transform: translateX(20px); }
.compact-field select { min-height: 47px; }
.generate-available-row { grid-column: 1 / -1; color: var(--muted); }
.helper-text { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.generating-card { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.generating-card div:last-child { display: grid; gap: 3px; }
.generating-card span { color: var(--muted); font-size: 12px; }
.spinner { width: 30px; height: 30px; border: 3px solid var(--line); border-top-color: var(--text); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { margin-top: 16px; padding: 48px 20px; text-align: center; border: 1px dashed var(--line); border-radius: 24px; color: var(--muted); }
.empty-state h3 { margin: 8px 0 4px; color: var(--text); }
.empty-state p { margin: 0; }
.empty-icon { width: 58px; height: 58px; margin: 0 auto; display: grid; place-items: center; border-radius: 18px; background: var(--surface-2); color: var(--text); font-size: 25px; }
.compact-empty { padding: 36px 20px; }
.design-preview-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 16px; }
.design-preview-card { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.design-preview-card img { width: 100%; max-height: 560px; object-fit: contain; background: #d9d5ce; }
.design-preview-meta { display: flex; justify-content: space-between; gap: 10px; padding: 13px 15px; }
.design-preview-meta strong { font-size: 13px; }
.design-preview-meta span { color: var(--muted); font-size: 11px; }

.share-layout { display: grid; gap: 16px; }
.share-card, .caption-card, .danger-card { padding: clamp(18px,4vw,28px); }
.share-card h3, .caption-card h3, .danger-card h3 { margin: 0 0 12px; font-size: 21px; }
.action-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.action-span { grid-column: 1 / -1; }
.caption-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.caption-header p { margin: -7px 0 14px; color: var(--muted); font-size: 12px; }
.language-field { width: min(180px, 45%); }
.caption-textarea { min-height: 280px; line-height: 1.55; margin-bottom: 12px; }
.share-disclaimer { margin: 13px 0 0; padding: 12px; border-radius: 13px; background: var(--surface-2); color: var(--muted); font-size: 12px; line-height: 1.45; }
.danger-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.danger-card h3 { margin-bottom: 5px; }
.danger-card p { margin: 0; color: var(--muted); font-size: 12px; }
.danger-actions { display: flex; gap: 9px; flex-wrap: wrap; }

.app-footer { width: min(1160px, calc(100% - 28px)); margin: 0 auto 20px; padding: 22px 4px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 11px; }
.app-footer div { display: grid; gap: 4px; }
.app-footer strong { color: var(--text); font-size: 13px; }
.app-footer p { margin: 0; text-align: right; }

.sticky-action-bar {
  position: fixed;
  z-index: 20;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: minmax(88px,auto) 1fr minmax(88px,auto);
  align-items: center;
  gap: 10px;
  min-height: 78px;
  padding: 12px clamp(14px,4vw,32px) calc(12px + var(--safe-bottom));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(20px);
  box-shadow: 0 -10px 30px rgba(0,0,0,.07);
}
.sticky-btn { min-height: 48px; }
.sticky-progress { display: grid; gap: 2px; text-align: center; min-width: 0; }
.sticky-progress strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sticky-progress span { color: var(--muted); font-size: 10px; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: end center;
  padding: 18px 14px calc(18px + var(--safe-bottom));
  background: rgba(0,0,0,.62);
  backdrop-filter: blur(8px);
}
.modal-sheet {
  width: min(680px, 100%);
  max-height: min(92vh, 900px);
  overflow-y: auto;
  border-radius: 28px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 28px 80px rgba(0,0,0,.34);
  animation: sheetIn .25s ease both;
}
@keyframes sheetIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 20px 20px 12px; }
.modal-header h2 { margin: 3px 0 0; font-size: 25px; letter-spacing: -.035em; }
.camera-instruction { margin: 0; padding: 0 20px 14px; color: var(--muted); font-size: 13px; }
.camera-viewport { position: relative; aspect-ratio: 3/4; overflow: hidden; background: #111; }
.camera-viewport video, .camera-viewport canvas { width: 100%; height: 100%; object-fit: cover; }
.alignment-guide { position: absolute; inset: 0; pointer-events: none; }
.head-guide { position: absolute; top: 9%; left: 23%; width: 54%; height: 58%; border: 2px solid rgba(255,255,255,.9); border-radius: 48% 48% 43% 43% / 40% 40% 56% 56%; box-shadow: 0 0 0 999px rgba(0,0,0,.12); }
.shoulder-guide { position: absolute; left: 10%; bottom: -11%; width: 80%; height: 42%; border: 2px solid rgba(255,255,255,.75); border-radius: 50% 50% 0 0; }
.camera-grid { position: absolute; inset: 0; pointer-events: none; }
.camera-grid i { position: absolute; background: rgba(255,255,255,.42); }
.camera-grid i:nth-child(1), .camera-grid i:nth-child(2) { top: 0; bottom: 0; width: 1px; }
.camera-grid i:nth-child(1) { left: 33.333%; } .camera-grid i:nth-child(2) { left: 66.666%; }
.camera-grid i:nth-child(3), .camera-grid i:nth-child(4) { left: 0; right: 0; height: 1px; }
.camera-grid i:nth-child(3) { top: 33.333%; } .camera-grid i:nth-child(4) { top: 66.666%; }
.camera-safe-note { position: absolute; bottom: 13px; left: 50%; transform: translateX(-50%); padding: 7px 10px; border-radius: 999px; background: rgba(0,0,0,.62); color: #fff; font-size: 11px; font-weight: 800; white-space: nowrap; }
.camera-sheet .status-banner { width: auto; margin: 12px 18px 0; }
.camera-toolbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 16px 18px 20px; }
.grid-toggle { justify-content: flex-start; }
.capture-btn { width: 70px; height: 70px; padding: 0; border-radius: 50%; border: 4px solid var(--surface); outline: 3px solid var(--text); background: transparent; }
.capture-btn span { width: 52px; height: 52px; border-radius: 50%; background: var(--text); }
.file-label { position: relative; overflow: hidden; min-height: 44px; font-size: 12px; }
.file-label input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.adjust-sheet, .settings-sheet { padding-bottom: 20px; }
.adjust-sheet > .helper-text { padding: 0 20px; margin-top: 0; }
.adjust-canvas-wrap { margin: 14px 20px; overflow: hidden; border-radius: 18px; background: #d9d5ce; touch-action: none; }
.adjust-canvas-wrap canvas { display: block; width: 100%; height: auto; aspect-ratio: 4/5; }
.range-field { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 0 20px 15px; font-size: 12px; font-weight: 800; }
.range-field input { width: 100%; accent-color: #111; }
.adjust-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; padding: 0 20px; }
.settings-switch { margin: 4px 20px 16px; }
.settings-note { margin: 0 20px 16px; padding: 15px; border-radius: 15px; background: var(--surface-2); }
.settings-note strong { font-size: 13px; }
.settings-note p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.settings-sheet > .wide-btn { width: calc(100% - 40px); margin: 0 20px; }
.confirm-sheet { max-width: 420px; padding: 28px; text-align: center; }
.confirm-icon { width: 58px; height: 58px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); font-size: 27px; font-weight: 900; }
.confirm-sheet h2 { margin: 0 0 8px; }
.confirm-sheet p { margin: 0 0 20px; color: var(--muted); line-height: 1.5; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.toast-region { position: fixed; z-index: 200; left: 50%; bottom: calc(92px + var(--safe-bottom)); transform: translateX(-50%); width: min(92vw, 420px); display: grid; gap: 8px; pointer-events: none; }
.toast { padding: 13px 15px; border-radius: 14px; background: #111; color: #fff; box-shadow: 0 16px 36px rgba(0,0,0,.25); font-size: 13px; font-weight: 700; animation: toastIn .22s ease both; }
.toast.success { background: #116b48; }
.toast.error { background: #9f231c; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (min-width: 880px) {
  .topbar { position: sticky; top: 0; }
  .photo-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .photo-card:nth-child(5) { grid-column: span 1; }
  .modal { place-items: center; }
  .modal-sheet { max-height: 90vh; }
}

@media (max-width: 720px) {
  .brand-logo-wrap { width: 72px; height: 44px; border-radius: 12px; }
  .brand-copy p:last-child { display: none; }
  .header-actions .icon-btn { width: 41px; height: 41px; }
  .stepper { justify-content: start; grid-template-columns: repeat(5, minmax(88px,1fr)); }
  .section-heading { align-items: flex-start; }
  .date-pill { display: none; }
  .form-grid.two-col, .control-grid { grid-template-columns: 1fr; }
  .full-width, .generate-available-row { grid-column: auto; }
  .photo-grid { grid-template-columns: 1fr; }
  .design-preview-grid { grid-template-columns: 1fr; }
  .danger-card { align-items: stretch; flex-direction: column; }
  .danger-actions { display: grid; grid-template-columns: 1fr; }
  .app-footer { align-items: flex-start; flex-direction: column; }
  .app-footer p { text-align: left; }
  .sticky-progress { display: none; }
  .sticky-action-bar { grid-template-columns: 1fr 1fr; }
  .caption-header { flex-direction: column; }
  .language-field { width: 100%; }
  .camera-toolbar { grid-template-columns: 1fr auto 1fr; }
  .file-label { padding: 0 10px; }
}

@media (max-width: 420px) {
  .topbar { padding-inline: 13px; }
  .brand-copy h1 { font-size: 17px; }
  .brand-logo-wrap { width: 64px; }
  .header-actions { gap: 5px; }
  .header-actions .icon-btn { width: 38px; height: 38px; }
  .main-content, .stepper, .demo-banner, .status-banner, .app-footer { width: calc(100% - 20px); }
  .action-grid { grid-template-columns: 1fr; }
  .action-span { grid-column: auto; }
  .camera-toolbar { gap: 7px; padding-inline: 12px; }
  .grid-toggle span { display: none; }
  .file-label { font-size: 11px; }
  .adjust-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

.image-preview-sheet { width: min(920px, 100%); overflow: hidden; }
.full-preview-wrap { display: grid; place-items: center; min-height: 55vh; max-height: 76vh; padding: 16px; overflow: auto; background: #111; }
.full-preview-wrap img { max-width: 100%; max-height: 70vh; object-fit: contain; transform-origin: center; }
