:root {
  color-scheme: light;
  --ink: #182130;
  --ink-soft: #526071;
  --navy: #17283c;
  --navy-2: #233a53;
  --paper: #f5f3ee;
  --panel: #fbfaf7;
  --line: #dedbd3;
  --line-dark: #cbc7bd;
  --accent: #c8703f;
  --accent-soft: #f1dfd1;
  --green: #2f7d63;
  --shadow: 0 30px 80px rgba(34, 40, 48, 0.12), 0 2px 8px rgba(34, 40, 48, 0.06);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.local-file-notice { position: relative; z-index: 5; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 20px; padding: 18px 24px; background: #17283c; color: #fff; font-size: 13px; line-height: 1.6; }
.local-file-notice a { color: #17283c; background: #f2c6a7; padding: 8px 14px; border-radius: 6px; text-decoration: none; font-weight: 700; }
.local-file-notice small { width: 100%; text-align: center; color: #c0cbd5; }
.service-notice { padding: 12px; color: #854924; background: #f5e7db; border-radius: 8px; font-size: 12px; line-height: 1.6; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 13% 8%, rgba(219, 197, 176, 0.34), transparent 25rem),
    radial-gradient(circle at 92% 32%, rgba(184, 198, 207, 0.28), transparent 28rem),
    var(--paper);
}

button, input, select { font: inherit; }
button { color: inherit; }

.page-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.2;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
}

.site-header {
  width: min(1380px, calc(100% - 64px));
  height: 88px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(41, 48, 57, 0.14);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: Georgia, "Songti SC", serif;
  font-weight: 700;
  font-size: 23px;
  letter-spacing: 0.08em;
}

.brand em {
  font: 600 9px/1 Inter, sans-serif;
  letter-spacing: 0.24em;
  color: #7b7a75;
  border-left: 1px solid #c8c4bb;
  padding-left: 12px;
}

.brand-mark {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  transform: rotate(45deg) scale(0.76);
}

.brand-mark i { background: var(--navy); border-radius: 3px; }
.brand-mark i:nth-child(2) { background: var(--accent); }
.brand-mark i:nth-child(3) { background: #8b9bad; }
.brand-mark i:nth-child(4) { background: var(--navy-2); }

.header-meta { display: flex; align-items: center; gap: 18px; }

.privacy-pill, .api-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #64707c;
}

.privacy-pill svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.api-status { padding-left: 18px; border-left: 1px solid var(--line-dark); }
.api-status b { width: 7px; height: 7px; border-radius: 50%; background: #aaa8a2; box-shadow: 0 0 0 4px rgba(170,168,162,.13); }
.api-status.is-online b { background: var(--green); box-shadow: 0 0 0 4px rgba(47,125,99,.13); }
.api-status.is-demo b { background: var(--accent); box-shadow: 0 0 0 4px rgba(200,112,63,.13); }

main { width: min(1380px, calc(100% - 64px)); margin: 0 auto; }

.hero {
  position: relative;
  padding: 74px 0 54px;
  display: grid;
  grid-template-columns: minmax(450px, 1.15fr) minmax(300px, .85fr);
  align-items: end;
}

.eyebrow {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .2em;
  color: #75808a;
}

.eyebrow span { padding: 5px 7px 4px; color: white; letter-spacing: .12em; background: var(--accent); border-radius: 3px; }

.hero h1 {
  margin: 0;
  max-width: 760px;
  font: 600 clamp(46px, 5.2vw, 78px)/1.08 Georgia, "Songti SC", serif;
  letter-spacing: -0.05em;
}

.hero h1 em { color: var(--accent); font-style: normal; }
.hero > p { align-self: center; max-width: 500px; margin: 22px 0 0 auto; font-size: 16px; line-height: 1.85; color: var(--ink-soft); }

.trust-row {
  grid-column: 2;
  display: flex;
  justify-content: flex-end;
  gap: 28px;
  margin-top: 22px;
  color: #5c6670;
  font-size: 11px;
}

.trust-row span { display: flex; align-items: center; white-space: nowrap; }
.trust-row b { margin-right: 7px; font: 500 9px/1 Inter, sans-serif; color: var(--accent); }

.studio-card {
  display: grid;
  grid-template-columns: minmax(420px, 520px) minmax(520px, 1fr);
  min-height: 790px;
  overflow: hidden;
  background: rgba(251, 250, 247, 0.96);
  border: 1px solid rgba(54, 58, 63, 0.14);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.controls-panel { padding: 36px 42px 28px; border-right: 1px solid var(--line); }
.step-heading { display: flex; align-items: flex-start; gap: 14px; }
.step-heading.compact { margin-bottom: 26px; }
.step-heading h2, .preview-topbar h2 { margin: 0 0 4px; font: 600 18px/1.2 Georgia, "Songti SC", serif; letter-spacing: .02em; }
.step-heading p, .preview-topbar p { margin: 0; font-size: 11px; color: #89919a; }

.step-number {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid #c9c3b8;
  color: var(--accent);
  font: 700 10px/1 Inter, sans-serif;
  border-radius: 50%;
}

.step-number.light { color: #e6a57e; border-color: rgba(255,255,255,.34); }

.upload-zone {
  width: 100%;
  height: 134px;
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #f7f5f0;
  border: 1px dashed #bbb7ae;
  border-radius: 12px;
  cursor: pointer;
  transition: .2s ease;
}

.upload-zone:hover, .upload-zone.is-dragging { transform: translateY(-1px); border-color: var(--accent); background: #faf4ef; box-shadow: 0 10px 30px rgba(200,112,63,.08); }
.upload-zone strong { font-size: 13px; }
.upload-zone small { font-size: 10px; color: #92918c; }
.upload-icon { width: 34px; height: 34px; display: grid; place-items: center; margin-bottom: 3px; color: var(--accent); background: var(--accent-soft); border-radius: 50%; }
.upload-icon svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.file-summary {
  height: 74px;
  margin-top: 22px;
  padding: 8px 12px 8px 8px;
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 11px;
  background: #f5f2ec;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.file-thumb { width: 52px; height: 56px; overflow: hidden; border-radius: 6px; background: #ddd; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-summary strong, .file-summary span { display: block; max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-summary strong { font-size: 12px; }
.file-summary span { margin-top: 5px; font-size: 10px; color: #8b9096; }
.file-summary button { padding: 6px 8px; font-size: 10px; color: var(--accent); border: 0; background: transparent; cursor: pointer; }

.divider { height: 1px; margin: 28px 0 25px; background: var(--line); }

fieldset { min-width: 0; margin: 0 0 24px; padding: 0; border: 0; }
legend, .select-field > span { display: block; margin-bottom: 10px; font-size: 11px; font-weight: 700; color: #59636e; }

.segmented { display: grid; gap: 7px; }
.segmented.three { grid-template-columns: repeat(3, 1fr); }
.segmented button, .size-options button {
  min-width: 0;
  padding: 11px 8px 10px;
  text-align: left;
  background: #f7f6f2;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: .18s ease;
}
.segmented button span, .segmented button small, .size-options button span, .size-options button small { display: block; }
.segmented button span, .size-options button span { font-size: 11px; font-weight: 700; }
.segmented button small, .size-options button small { margin-top: 4px; font-size: 9px; color: #92979c; }
.segmented button:hover, .size-options button:hover { border-color: #a9a8a3; }
.segmented button.is-selected, .size-options button.is-selected { color: white; background: var(--navy); border-color: var(--navy); box-shadow: 0 5px 14px rgba(23,40,60,.18); }
.segmented button.is-selected small, .size-options button.is-selected small { color: rgba(255,255,255,.62); }

.field-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 24px; align-items: start; }
.field-grid fieldset { margin-bottom: 22px; }
.select-field { min-width: 0; }
.select-field select { width: 100%; height: 38px; padding: 0 32px 0 11px; color: #49545f; font-size: 11px; background: #f7f6f2; border: 1px solid var(--line); border-radius: 8px; outline: none; }

.swatches { display: flex; gap: 8px; }
.swatches button { width: 27px; height: 27px; display: grid; place-items: center; padding: 0; background: transparent; border: 1px solid transparent; border-radius: 50%; cursor: pointer; }
.swatches button i { width: 19px; height: 19px; background: var(--swatch); border: 1px solid rgba(0,0,0,.1); border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.swatches button:nth-child(1) { --swatch: #e9e7e2; }
.swatches button:nth-child(2) { --swatch: #dde4ea; }
.swatches button:nth-child(3) { --swatch: #f8f8f6; }
.swatches button:nth-child(4) { --swatch: #5c83b2; }
.swatches button:nth-child(5) { --swatch: #b84f4b; }
.swatches button.is-selected { border-color: var(--navy); }

.size-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.size-options button { text-align: center; }

.advanced-panel { margin: -2px 0 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.advanced-panel summary { padding: 14px 0; display: flex; align-items: center; cursor: pointer; list-style: none; font-size: 11px; font-weight: 700; }
.advanced-panel summary::-webkit-details-marker { display: none; }
.advanced-panel summary::after { content: "+"; margin-left: auto; font: 300 18px/1 Inter, sans-serif; color: #92979c; }
.advanced-panel[open] summary::after { content: "−"; }
.advanced-panel summary span { margin-left: 6px; color: #999; font-weight: 400; }
.advanced-body { padding: 2px 0 18px; }

.range-field { display: block; margin-bottom: 14px; }
.range-field > span { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: 10px; color: #68727d; }
.range-field output { color: var(--accent); }
input[type="range"] { accent-color: var(--accent); }
.range-field input { width: 100%; height: 3px; }

.toggle-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid #e8e5de; }
.toggle-row strong, .toggle-row small { display: block; }
.toggle-row strong { font-size: 11px; }
.toggle-row small { margin-top: 3px; font-size: 9px; color: #999; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch i { position: relative; width: 34px; height: 19px; display: block; background: #cbc9c3; border-radius: 20px; cursor: pointer; transition: .2s; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; background: white; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.25); transition: .2s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(15px); }

.card-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 12px; background: #f5f3ee; border-radius: 8px; }
.card-fields label.wide { grid-column: 1 / -1; }
.card-fields .wide { grid-column: 1 / -1; }
.translation-help { margin: 2px 0; color: #707780; font-size: 11px; line-height: 1.6; }
.card-fields span { display: block; margin-bottom: 4px; font-size: 9px; color: #7f868d; }
.card-fields input { width: 100%; height: 32px; padding: 0 9px; font-size: 10px; color: var(--ink); background: white; border: 1px solid #dfdcd4; border-radius: 5px; outline: none; }
.card-fields input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(200,112,63,.1); }

.primary-button {
  width: 100%;
  height: 50px;
  color: white;
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(200,112,63,.25);
  cursor: pointer;
  transition: .2s ease;
}
.primary-button:hover:not(:disabled) { transform: translateY(-1px); background: #ba6233; box-shadow: 0 11px 24px rgba(200,112,63,.3); }
.primary-button:disabled { cursor: not-allowed; background: #c9c6c0; box-shadow: none; }
.button-label, .button-loading { align-items: center; justify-content: center; gap: 9px; font-size: 12px; font-weight: 800; letter-spacing: .05em; }
.button-label { display: flex; }
.button-label svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.button-loading { display: none; }
.button-loading i { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.35); border-top-color: white; border-radius: 50%; animation: spin .8s linear infinite; }
.primary-button.is-loading .button-label { display: none; }
.primary-button.is-loading .button-loading { display: flex; }
@keyframes spin { to { transform: rotate(360deg); } }
.consent-note { margin: 10px 8px 0; text-align: center; font-size: 9px; line-height: 1.55; color: #999; }

.preview-panel { min-width: 0; display: flex; flex-direction: column; color: white; background: var(--navy); }
.preview-topbar { height: 92px; padding: 0 38px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.1); }
.preview-topbar > div { display: flex; align-items: center; gap: 13px; }
.preview-topbar p { color: rgba(255,255,255,.5); }
.mode-badge { padding: 6px 9px; color: rgba(255,255,255,.58); font-size: 9px; letter-spacing: .08em; border: 1px solid rgba(255,255,255,.17); border-radius: 20px; }
.mode-badge.is-ai { color: #bedfce; border-color: rgba(93,179,137,.4); background: rgba(47,125,99,.14); }
.mode-badge.is-demo { color: #f3c6aa; border-color: rgba(216,139,91,.36); background: rgba(200,112,63,.12); }

.preview-stage { position: relative; flex: 1; min-height: 570px; display: grid; place-items: center; padding: 36px; overflow: hidden; background: radial-gradient(circle at 50% 40%, #34485e 0, #21364c 34%, var(--navy) 70%); }
.preview-stage::before { content: ""; position: absolute; inset: 28px; border: 1px solid rgba(255,255,255,.06); pointer-events: none; }
.registration-marks { position: absolute; inset: 28px; pointer-events: none; }
.registration-marks i { position: absolute; width: 13px; height: 13px; border-color: rgba(255,255,255,.24); border-style: solid; }
.registration-marks i:nth-child(1) { top: 0; left: 0; border-width: 1px 0 0 1px; }
.registration-marks i:nth-child(2) { top: 0; right: 0; border-width: 1px 1px 0 0; }
.registration-marks i:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 1px 1px; }
.registration-marks i:nth-child(4) { bottom: 0; right: 0; border-width: 0 1px 1px 0; }

.empty-preview { position: relative; z-index: 1; width: min(380px, 80%); text-align: center; }
.empty-preview strong { display: block; margin-top: 28px; font: 500 16px/1.3 Georgia, "Songti SC", serif; }
.empty-preview p { max-width: 330px; margin: 9px auto 0; color: rgba(255,255,255,.44); font-size: 10px; line-height: 1.7; }
.empty-portrait { position: relative; width: 160px; height: 196px; margin: 0 auto; border: 1px solid rgba(255,255,255,.16); border-radius: 80px 80px 12px 12px; overflow: hidden; background: rgba(255,255,255,.035); }
.empty-portrait::after { content: ""; position: absolute; inset: 9px; border: 1px dashed rgba(255,255,255,.1); border-radius: 72px 72px 9px 9px; }
.empty-portrait .head { position: absolute; top: 38px; left: 53px; width: 54px; height: 66px; background: linear-gradient(145deg, rgba(255,255,255,.22), rgba(255,255,255,.07)); border-radius: 48% 48% 46% 46%; }
.empty-portrait .body { position: absolute; left: 30px; bottom: -17px; width: 100px; height: 96px; background: linear-gradient(145deg, rgba(255,255,255,.18), rgba(255,255,255,.055)); border-radius: 55px 55px 10px 10px; }
.focus { position: absolute; z-index: 2; width: 15px; height: 15px; border-color: #d79167; border-style: solid; }
.focus.a { top: 20px; left: 20px; border-width: 1px 0 0 1px; }
.focus.b { top: 20px; right: 20px; border-width: 1px 1px 0 0; }
.focus.c { bottom: 20px; left: 20px; border-width: 0 0 1px 1px; }
.focus.d { bottom: 20px; right: 20px; border-width: 0 1px 1px 0; }

.portrait-preview { position: relative; z-index: 1; width: 100%; }
.compare-frame { --ratio: .75; --position: 58%; position: relative; width: min(390px, 78%); max-height: 540px; aspect-ratio: var(--ratio); margin: 0 auto; overflow: hidden; background: #dedede; border-radius: 3px; box-shadow: 0 22px 55px rgba(0,0,0,.34); }
.compare-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% var(--object-y, 45%); user-select: none; }
.compare-image.before { filter: saturate(.75) brightness(.82); }
.after-layer { position: absolute; inset: 0; overflow: hidden; clip-path: inset(0 calc(100% - var(--position)) 0 0); }
.after-layer.has-card .compare-image { height: 85.5%; }
.compare-image.after.local-preview { filter: contrast(1.035) saturate(.93) brightness(1.04); }
.compare-line { position: absolute; z-index: 4; top: 0; bottom: 0; left: var(--position); width: 1px; background: rgba(255,255,255,.94); box-shadow: 0 0 10px rgba(0,0,0,.25); }
.compare-line i { position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; display: grid; place-items: center; color: var(--navy); background: white; border-radius: 50%; box-shadow: 0 3px 14px rgba(0,0,0,.22); transform: translate(-50%,-50%); }
.compare-line svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.info-card { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; min-height: 14.5%; padding: 3.2% 6% 2.8%; display: flex; flex-direction: column; justify-content: center; color: var(--navy); background: rgba(255,255,255,.97); }
.info-card strong { font: 700 clamp(10px, 1.15vw, 15px)/1.2 Georgia, "Songti SC", serif; color: #325375; }
.info-card span { margin-top: 2px; font-size: clamp(6px, .65vw, 9px); color: #34404c; }
.info-card small { margin-top: 1px; font-size: clamp(5px, .55vw, 8px); color: #78818a; }
.info-card[hidden] { display: none; }

.compare-control { width: min(390px, 78%); margin: 17px auto 0; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; color: rgba(255,255,255,.45); font-size: 9px; }
.compare-control input { width: 100%; height: 2px; accent-color: #e6a57e; }

.photo-guides { height: 56px; display: flex; justify-content: center; align-items: center; gap: 30px; color: rgba(255,255,255,.48); font-size: 9px; border-top: 1px solid rgba(255,255,255,.07); }
.photo-guides span { display: flex; align-items: center; gap: 7px; }
.photo-guides i { width: 4px; height: 4px; background: #6ba88e; border-radius: 50%; box-shadow: 0 0 0 3px rgba(107,168,142,.12); }

.result-actions { min-height: 80px; padding: 14px 28px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; background: #f5f2ec; border-top: 1px solid #dfdbd2; }
.result-note b, .result-note span { display: block; }
.result-note b { color: var(--navy); font: 600 13px/1.2 Georgia, "Songti SC", serif; }
.result-note span { margin-top: 4px; color: #8a8d8f; font-size: 9px; }
.secondary-button, .download-button { height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 15px; font-size: 10px; font-weight: 700; border-radius: 7px; cursor: pointer; }
.secondary-button { color: var(--navy); background: transparent; border: 1px solid #c9c5bc; }
.download-button { color: white; background: var(--navy); border: 1px solid var(--navy); }
.secondary-button:hover { background: white; }
.download-button:hover { background: #29425e; }
.secondary-button svg, .download-button svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.how-it-works { padding: 62px 4px 70px; display: grid; grid-template-columns: 1fr 1.6fr; align-items: center; gap: 70px; }
.how-it-works > p { margin: 0; max-width: 390px; font: 500 22px/1.5 Georgia, "Songti SC", serif; color: #34404d; }
.process-line { display: grid; grid-template-columns: auto 1fr auto 1fr auto; align-items: center; gap: 20px; }
.process-line > i { height: 1px; background: #cfcac0; }
.process-line span { position: relative; min-width: 105px; }
.process-line b, .process-line small { display: block; }
.process-line b { position: absolute; top: -2px; left: -23px; color: var(--accent); font: 600 9px/1 Inter, sans-serif; }
.process-line span { font: 600 12px/1.2 Georgia, "Songti SC", serif; }
.process-line small { margin-top: 6px; color: #8b8d8a; font: 400 9px/1.2 Inter, sans-serif; }

footer { min-height: 74px; width: min(1380px, calc(100% - 64px)); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; color: #8b8a85; font-size: 9px; border-top: 1px solid rgba(41,48,57,.14); }
footer p { margin: 0; }

.toast { position: fixed; z-index: 20; left: 50%; bottom: 28px; max-width: min(420px, calc(100% - 40px)); padding: 12px 17px; color: white; font-size: 11px; line-height: 1.5; background: rgba(20,31,44,.94); border: 1px solid rgba(255,255,255,.12); border-radius: 8px; box-shadow: 0 16px 35px rgba(0,0,0,.24); opacity: 0; transform: translate(-50%, 15px); pointer-events: none; transition: .25s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: rgba(127,54,45,.96); }

@media (max-width: 1080px) {
  .studio-card { grid-template-columns: minmax(390px, 46%) 1fr; }
  .controls-panel { padding: 32px 30px 26px; }
  .preview-stage { padding: 28px; }
  .result-note { display: none; }
  .result-actions { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .site-header, main, footer { width: min(100% - 32px, 680px); }
  .header-meta .privacy-pill { display: none; }
  .hero { padding: 54px 0 38px; display: block; }
  .hero h1 { font-size: clamp(42px, 11vw, 64px); }
  .hero > p { margin: 22px 0 0; }
  .trust-row { justify-content: flex-start; flex-wrap: wrap; gap: 16px; }
  .studio-card { display: flex; flex-direction: column; }
  .controls-panel { border-right: 0; }
  .preview-panel { min-height: 720px; }
  .how-it-works { grid-template-columns: 1fr; gap: 32px; }
  footer { padding: 24px 0; display: block; }
  footer p { margin-top: 8px; line-height: 1.6; }
}

@media (max-width: 520px) {
  .site-header { height: 72px; }
  .brand em { display: none; }
  .api-status { padding-left: 0; border-left: 0; font-size: 10px; }
  .hero { padding-top: 42px; }
  .hero h1 { font-size: 42px; }
  .hero > p { font-size: 14px; }
  .trust-row { display: none; }
  .studio-card { border-radius: 14px; }
  .controls-panel { padding: 28px 20px 24px; }
  .segmented.three { grid-template-columns: 1fr; }
  .segmented button { text-align: center; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .size-options { grid-template-columns: 1fr 1fr; }
  .preview-panel { min-height: 650px; }
  .preview-topbar { height: 82px; padding: 0 20px; }
  .preview-stage { min-height: 460px; padding: 24px 14px; }
  .compare-frame, .compare-control { width: min(330px, 83%); }
  .photo-guides { gap: 15px; }
  .photo-guides span:last-child { display: none; }
  .result-actions { padding: 12px; }
  .secondary-button, .download-button { padding: 0 9px; }
  .how-it-works { padding: 44px 4px 54px; }
  .process-line { grid-template-columns: 1fr; gap: 22px; padding-left: 26px; }
  .process-line > i { display: none; }
}

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