:root {
  --ink: #25231f;
  --muted: #746f66;
  --paper: #fbf8f2;
  --cream: #f3eadc;
  --line: rgba(54, 48, 40, 0.13);
  --brown: #5d4435;
  --brown-dark: #3c2c24;
  --gold: #b18a5d;
  --white: #fffdf9;
  --success: #58735f;
  font-family: "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.eyebrow, .audit-details, .test-console, #candidateQcNotice, #materialAuditRecord,
#materialReferenceGrid, #materialStrategy { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: radial-gradient(circle at 85% 5%, rgba(197, 163, 121, 0.18), transparent 24rem), var(--paper);
}
button, textarea, input { font: inherit; }
button { color: inherit; }
img { display: block; width: 100%; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 40px));
  min-height: 78px;
  margin: 0 auto;
  background: rgba(251, 248, 242, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  background: var(--brown);
  font-family: "Songti SC", "STSong", serif;
}
.brand strong, .brand small { display: block; }
.brand strong { letter-spacing: 0.12em; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.status-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.5);
  font-size: 12px;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d0a34b;
  box-shadow: 0 0 0 4px rgba(208,163,75,.13);
}
.status-chip.is-ready .status-dot {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(88,115,95,.13);
}
.status-chip.is-error {
  color: #8a4837;
  border-color: rgba(165, 78, 55, .28);
  background: rgba(255, 244, 239, .82);
}
.status-chip.is-error .status-dot {
  background: #b45f48;
  box-shadow: 0 0 0 4px rgba(180,95,72,.13);
}
.service-warning {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(1180px, calc(100% - 40px));
  margin: 14px auto 0;
  padding: 13px 16px;
  border: 1px solid rgba(165, 78, 55, .28);
  background: #fff4ef;
  color: #714234;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}
.service-warning[hidden] { display: none; }
.service-warning strong { flex: 0 0 auto; }
.resume-notice { display: flex; align-items: center; justify-content: space-between; gap: 22px; width: min(1180px, calc(100% - 40px)); margin: 14px auto 0; padding: 14px 16px; border: 1px solid rgba(88,115,95,.25); background: rgba(237,244,238,.82); }
.resume-notice[hidden] { display: none; }
.resume-notice span, .resume-notice strong, .resume-notice small { display: block; }
.resume-notice small { margin-top: 4px; color: var(--muted); line-height: 1.5; }
.resume-notice .secondary-button { flex: 0 0 auto; min-height: 40px; }

.view { display: none; min-height: calc(100vh - 150px); }
.view.is-active { display: block; }
.narrow-view { width: min(720px, calc(100% - 40px)); margin: 0 auto; padding: 70px 0 100px; }
.hero {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(40px, 7vw, 100px);
  align-items: center;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 62px 0 82px;
}
.hero-copy { max-width: 560px; }
.eyebrow { margin: 0 0 18px; color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: .22em; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif; font-weight: 600; }
.hero h1 { margin-bottom: 24px; font-size: clamp(42px, 3.7vw, 58px); line-height: 1.18; letter-spacing: -.04em; }
.hero-lede { max-width: 500px; margin-bottom: 34px; color: var(--muted); font-size: 17px; line-height: 1.9; }
.primary-button, .secondary-button {
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 650;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.primary-button { color: #fff; background: var(--brown); box-shadow: 0 10px 24px rgba(68,47,36,.14); }
.secondary-button { border: 1px solid var(--line); background: var(--white); }
.audit-details { margin-top: 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.72); padding: 12px 14px; }
.audit-details summary { cursor: pointer; font-weight: 700; }
.audit-details pre { margin: 12px 0 0; max-height: 420px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 12px; line-height: 1.55; color: var(--muted); }
.cost-note { margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.primary-button:hover, .secondary-button:hover { transform: translateY(-2px); }
.primary-button:disabled { cursor: not-allowed; opacity: .42; transform: none; box-shadow: none; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 30px; color: var(--muted); font-size: 13px; }
.hero-facts span::before { content: "·"; margin-right: 8px; color: var(--gold); }
.hero-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  max-height: 690px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 240px 240px 18px 18px;
  background: var(--cream);
  cursor: zoom-in;
  box-shadow: 0 30px 90px rgba(78, 58, 45, .16);
}
.hero-photo img { height: 100%; object-fit: cover; }
.photo-caption {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 7px 10px;
  border-radius: 999px;
  color: rgba(255,255,255,.92);
  background: rgba(44,35,29,.54);
  backdrop-filter: blur(8px);
  font-size: 11px;
}

.template-section { padding: 92px max(20px, calc((100vw - 1180px) / 2)) 110px; background: #eee3d4; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 38px; }
.section-heading h2 { margin: 0; font-size: clamp(30px, 4vw, 46px); }
.section-heading > p { max-width: 380px; margin-bottom: 3px; color: var(--muted); line-height: 1.7; }
.template-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.template-card { min-width: 0; }
.template-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #ddd;
  cursor: zoom-in;
}
.template-image img { height: 100%; object-fit: cover; transition: transform .45s ease; }
.template-image:hover img { transform: scale(1.025); }
.template-image > span {
  position: absolute;
  top: 14px;
  left: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: rgba(35,31,27,.42);
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 50%;
  backdrop-filter: blur(7px);
  font-size: 11px;
}
.tone-studio img { filter: saturate(.82) contrast(.96) brightness(1.03); }
.tone-home img { filter: sepia(.08) saturate(.95) brightness(1.02); object-position: 48% center; }
.tone-magazine img { filter: saturate(.55) contrast(1.16) brightness(.83); object-position: 53% center; }
.template-copy { padding: 20px 4px 8px; }
.template-copy p { margin-bottom: 6px; color: var(--muted); font-size: 12px; letter-spacing: .12em; }
.template-copy h3 { margin-bottom: 18px; font-size: 25px; }
.text-action {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 13px 0;
  border: 0;
  border-top: 1px solid rgba(55,45,37,.22);
  border-bottom: 1px solid rgba(55,45,37,.22);
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.placeholder-note { margin: 30px 0 0; color: var(--muted); font-size: 12px; text-align: center; }

.back-button { margin-bottom: 26px; padding: 8px 0; border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.reuse-card, .generating-card {
  padding: clamp(34px, 6vw, 68px);
  border: 1px solid var(--line);
  background: rgba(255,253,249,.82);
  box-shadow: 0 22px 65px rgba(69,51,40,.09);
}
.reuse-card h1, .generating-card h1 { margin-bottom: 18px; font-size: clamp(36px, 6vw, 55px); }
.reuse-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.8; }
.saved-summary { margin: 28px 0; padding: 16px 18px; border-left: 3px solid var(--gold); background: var(--cream); color: var(--muted); }
.wide-button { width: 100%; margin-top: 12px; }
.change-options { display: none; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.change-options.is-visible { display: block; }
.change-options p { margin-bottom: 12px; font-weight: 650; }
.change-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.change-grid button { min-height: 44px; border: 1px solid var(--line); border-radius: 3px; background: var(--paper); cursor: pointer; }

.flow-shell, .result-shell { width: min(1040px, calc(100% - 40px)); margin: 0 auto; padding: 55px 0 100px; }
.flow-heading, .result-heading { display: flex; align-items: end; justify-content: space-between; gap: 26px; margin-bottom: 28px; }
.flow-heading h1, .result-heading h1 { margin: 0; font-size: clamp(36px, 5vw, 54px); }
.selected-template { padding: 12px 16px; border: 1px solid var(--line); background: var(--white); color: var(--muted); font-size: 13px; }
.selected-template strong { margin-left: 8px; color: var(--ink); }
.upload-reminder { display: flex; align-items: center; gap: 14px; margin: 22px 0; padding: 14px 16px; border: 1px solid rgba(177,138,93,.28); background: rgba(244,233,215,.64); }
.upload-reminder span { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; color: #fff; background: var(--gold); font-size: 11px; }
.upload-reminder p { margin: 0; color: #6d5b49; }
.upload-summary { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; padding: 19px 22px; background: var(--brown-dark); color: #fff; }
.upload-summary strong { font-family: Georgia, serif; font-size: 30px; }
.upload-summary span, .upload-summary p { color: rgba(255,255,255,.66); }
.upload-summary p { margin: 0; font-size: 13px; }
.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.upload-panel { padding: 22px; border: 1px solid var(--line); background: rgba(255,253,249,.82); }
.upload-panel-wide { grid-column: 1 / -1; }
.upload-panel-title, .upload-panel-title > div { display: flex; align-items: center; }
.upload-panel-title { justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.upload-panel-title > div { gap: 10px; }
.upload-panel-title h2 { margin: 0; font-family: inherit; font-size: 17px; }
.upload-panel-title h2 small { color: var(--muted); font-size: 12px; font-weight: 400; }
.upload-panel-title > strong { color: var(--muted); font-size: 12px; }
.upload-grid-unified { grid-template-columns: 1fr; }
.upload-auto-note { margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.upload-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--brown); background: var(--cream); font-family: "Songti SC", serif; font-size: 13px; }
.add-photos {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 20px;
  border: 1px dashed rgba(93,68,53,.32);
  background: rgba(243,234,220,.35);
  cursor: pointer;
}
.add-photos:hover { background: rgba(243,234,220,.66); }
.add-photos input { display: none; }
.add-photos span { margin-bottom: 6px; color: var(--gold); font-size: 32px; font-weight: 200; }
.add-photos strong { font-size: 14px; }
.add-photos-wide { min-height: 110px; }
.thumb-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.thumb { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--cream); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-primary { outline: 3px solid var(--gold); outline-offset: -3px; }
.thumb .remove-thumb { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; color: #fff; background: rgba(24,21,19,.66); cursor: pointer; }
.thumb .primary-thumb { position: absolute; right: 5px; bottom: 5px; left: 5px; min-height: 26px; padding: 4px 6px; border: 0; border-radius: 3px; color: #fff; background: rgba(68,47,36,.82); cursor: pointer; font-size: 10px; }
.thumb .primary-thumb:disabled { background: rgba(177,138,93,.92); cursor: default; }
.thumb em { position: absolute; top: 4px; left: 4px; padding: 3px 5px; color: #fff; background: rgba(63,90,67,.78); font-size: 9px; font-style: normal; }
.note-field { position: relative; display: block; margin-top: 18px; padding: 20px; border: 1px solid var(--line); background: var(--white); }
.note-field > span { display: block; margin-bottom: 10px; font-weight: 650; }
.note-field small { color: var(--muted); font-weight: 400; }
.note-field textarea { width: 100%; min-height: 95px; padding: 12px 0 24px; resize: vertical; border: 0; outline: 0; background: transparent; line-height: 1.7; }
.note-field em { position: absolute; right: 18px; bottom: 14px; color: var(--muted); font-size: 11px; font-style: normal; }
.consent-field { display: flex; align-items: flex-start; gap: 11px; margin-top: 14px; padding: 15px 17px; border: 1px solid var(--line); background: rgba(255,253,249,.72); color: var(--muted); font-size: 12px; line-height: 1.65; }
.consent-field input { flex: 0 0 auto; width: 17px; height: 17px; margin-top: 2px; accent-color: var(--brown); }
.consent-field.needs-attention { border-color: #b86b51; background: #fff5ef; color: #744734; }
.material-review { margin-top: 20px; padding: 24px; border: 1px solid rgba(177,138,93,.42); background: #fff8eb; }
.material-review[hidden] { display: none; }
.material-review .eyebrow { margin-bottom: 8px; }
.material-review h2 { margin-bottom: 10px; font-size: 26px; }
.material-review > p:not(.eyebrow), .material-review li { color: var(--muted); line-height: 1.7; }
.material-review ul { margin: 14px 0; padding-left: 22px; }
.material-reference-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin: 16px 0; }
.material-reference-card { overflow: hidden; border: 1px solid rgba(177,138,93,.34); background: #fff; }
.material-reference-card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--cream); }
.material-reference-card strong, .material-reference-card span { display: block; padding: 6px 8px 0; overflow-wrap: anywhere; }
.material-reference-card strong { color: var(--ink); font-size: 12px; }
.material-reference-card span { padding-top: 3px; padding-bottom: 8px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.material-strategy { margin: 16px 0; padding: 13px 15px; border-left: 3px solid var(--gold); background: rgba(243,234,220,.72); color: #5f5044; font-size: 13px; line-height: 1.7; }
.material-review-actions { display: flex; gap: 10px; margin-top: 18px; }
.sticky-action {
  position: sticky;
  bottom: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
  padding: 16px 18px;
  background: rgba(255,253,249,.92);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 50px rgba(63,47,38,.14);
}
.sticky-action strong, .sticky-action span { display: block; }
.sticky-action span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.sticky-action-simple { justify-content: flex-end; }
.upload-panel.needs-photo { border-color: #a85b47; box-shadow: 0 0 0 3px rgba(168,91,71,.12); }

.generating-card { text-align: center; }
.orbit { position: relative; width: 150px; height: 150px; margin: 0 auto 34px; }
.orbit img { height: 100%; object-fit: cover; border-radius: 50%; }
.orbit span { position: absolute; inset: -10px; border: 1px solid rgba(177,138,93,.38); border-top-color: var(--brown); border-radius: 50%; animation: spin 1.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.generating-card > p:not(.eyebrow) { color: var(--muted); }
.progress-track { height: 5px; margin: 34px 0 16px; overflow: hidden; background: var(--cream); }
.progress-track span { display: block; width: 8%; height: 100%; background: var(--brown); transition: width .6s ease; }
.progress-steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 0 0 28px; padding: 0; list-style: none; color: #aaa39a; font-size: 11px; }
.progress-steps li.is-active, .progress-steps li.is-done { color: var(--brown); font-weight: 650; }
.generating-card > small { color: var(--muted); }

.result-heading > div > p:last-child { max-width: 580px; margin-bottom: 0; color: var(--muted); line-height: 1.7; }
.result-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.result-card { position: relative; overflow: hidden; display: flex; flex-direction: column; background: var(--cream); }
.result-card.is-selected { outline: 4px solid var(--gold); outline-offset: -4px; }
.quality-badge { position: absolute; top: 12px; left: 12px; z-index: 2; padding: 6px 9px; border-radius: 999px; color: #fff; background: rgba(70,101,76,.88); backdrop-filter: blur(6px); font-size: 10px; letter-spacing: .04em; }
.quality-badge-hold { background: rgba(157,103,37,.9); }
.quality-badge-repair, .quality-badge-retry, .quality-badge-reject { background: rgba(139,63,48,.9); }
.result-card img { aspect-ratio: 3 / 4; object-fit: cover; }
.result-card.is-placeholder:nth-child(2) img { filter: saturate(.82) brightness(1.04); object-position: 47% center; }
.result-card.is-placeholder:nth-child(3) img { filter: sepia(.1) saturate(.8) contrast(1.05); object-position: 53% center; }
.result-card.is-placeholder:nth-child(4) img { filter: saturate(.64) contrast(1.18) brightness(.9); }
.result-card footer { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; min-height: 76px; margin-top: -76px; padding: 25px 18px 14px; color: #fff; background: linear-gradient(transparent, rgba(29,24,21,.82)); }
.result-card footer span { font-size: 12px; }
.result-card footer a { color: #fff; font-size: 12px; text-decoration: underline; }
.result-card-actions { display: flex; align-items: center; gap: 10px; }
.select-refine-button { padding: 6px 9px; border: 1px solid rgba(255,255,255,.6); border-radius: 3px; color: #fff; background: rgba(39,32,28,.46); cursor: pointer; font-size: 11px; }
.result-card.is-selected .select-refine-button { color: var(--brown-dark); background: #fff; }
.result-quality-details { position: relative; z-index: 2; padding: 12px 16px 14px; color: var(--muted); background: var(--white); font-size: 12px; line-height: 1.55; }
.result-quality-details summary { color: var(--brown-dark); cursor: pointer; font-weight: 700; }
.result-quality-details ul { margin: 10px 0 0; padding-left: 18px; }
.refine-panel { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-top: 26px; padding: 25px 28px; border: 1px solid rgba(177,138,93,.32); background: rgba(243,234,220,.72); }
.refine-panel[hidden] { display: none; }
.refine-panel .eyebrow { margin-bottom: 8px; }
.refine-panel h2 { margin-bottom: 8px; font-size: 24px; }
.refine-panel p:last-child { max-width: 720px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.refine-panel .primary-button { flex: 0 0 auto; min-width: 190px; }
.result-actions { display: flex; justify-content: center; gap: 12px; margin: 34px 0; }
.download-button { display: inline-flex; align-items: center; justify-content: center; color: inherit; text-decoration: none; }
.refined-result-card { overflow: hidden; border: 1px solid var(--line); background: var(--white); }
.refined-result-card > img { max-height: 78vh; object-fit: contain; background: var(--cream); }
.refined-results-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin: 22px 0 28px; }
.refined-batch-card { overflow: hidden; border: 1px solid var(--line); background: var(--white); box-shadow: 0 14px 34px rgba(65, 48, 39, .08); }
.refined-batch-card > img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; background: var(--cream); }
.refined-batch-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 16px 18px 8px; }
.refined-batch-heading strong { font-size: 15px; }
.refined-batch-heading span { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; color: #fff; background: var(--brown-dark); font-size: 10px; }
.refined-batch-card.final-failed .refined-batch-heading span, .refined-batch-card.final-qc-unavailable .refined-batch-heading span { background: #8d4938; }
.refined-batch-card.final-fallback .refined-batch-heading span { background: #8b6e45; }
.refined-batch-card > p { margin: 0; padding: 0 18px 10px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.refined-batch-card > ul { margin: 0; padding: 0 36px 12px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.refined-batch-actions { display: flex; flex-wrap: wrap; gap: 14px; padding: 13px 18px 17px; border-top: 1px solid var(--line); }
.refined-batch-actions a { color: var(--brown-dark); font-size: 12px; text-decoration: underline; }
.refinement-meta { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.refinement-meta div { padding: 17px 20px; border-right: 1px solid var(--line); }
.refinement-meta div:last-child { border-right: 0; }
.refinement-meta span, .refinement-meta strong { display: block; }
.refinement-meta span { margin-bottom: 6px; color: var(--muted); font-size: 11px; }
.refinement-meta strong { font-size: 13px; }
.manual-qc-note { margin-top: 20px; padding: 18px 20px; border-left: 3px solid var(--gold); background: var(--cream); }
.manual-qc-note p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.manual-qc-note ul { margin: 10px 0 0; padding-left: 20px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.empty-result-card { padding: clamp(34px, 6vw, 62px); border: 1px solid rgba(165,78,55,.25); background: #fff8f4; box-shadow: 0 22px 65px rgba(69,51,40,.09); }
.empty-result-card h1 { margin-bottom: 18px; font-size: clamp(34px, 6vw, 50px); }
.empty-result-card > p:not(.eyebrow), .empty-result-card li { color: var(--muted); line-height: 1.75; }
.empty-result-card ul { margin: 22px 0 28px; padding-left: 22px; }
.test-console { margin-top: 46px; border: 1px solid var(--line); background: #292723; color: #f4efe7; }
.test-console summary { padding: 18px 20px; cursor: pointer; font-weight: 650; }
.test-console > *:not(summary) { margin-right: 20px; margin-left: 20px; }
.console-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(255,255,255,.1); }
.console-grid div { padding: 18px 8px; }
.console-grid span, .console-grid strong { display: block; }
.console-grid span { margin-bottom: 7px; color: #9f9b94; font-size: 11px; }
.console-grid strong { font-size: 13px; word-break: break-all; }
.test-console ol { margin-top: 0; margin-bottom: 20px; padding: 0 0 0 32px; color: #c5c0b8; font: 12px/1.85 ui-monospace, SFMono-Regular, Menlo, monospace; }

.toast { position: fixed; bottom: 28px; left: 50%; z-index: 50; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 999px; color: #fff; background: var(--brown-dark); box-shadow: 0 12px 30px rgba(0,0,0,.2); opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: .25s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.lightbox { width: min(780px, calc(100% - 30px)); max-height: 92vh; padding: 0; border: 0; background: transparent; overflow: visible; }
.lightbox::backdrop { background: rgba(25,22,20,.86); backdrop-filter: blur(7px); }
.lightbox img { max-height: 86vh; object-fit: contain; }
.lightbox button { position: absolute; top: -14px; right: -14px; z-index: 2; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #fff; cursor: pointer; font-size: 24px; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 34px; }
  .hero-photo { max-height: 640px; }
  .section-heading, .flow-heading, .result-heading { align-items: flex-start; flex-direction: column; }
  .template-grid { grid-template-columns: 1fr; }
  .template-card { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: end; }
  .template-copy { padding-bottom: 0; }
  .upload-grid { grid-template-columns: 1fr; }
  .upload-panel-wide { grid-column: auto; }
}
@media (max-width: 560px) {
  .site-header { width: calc(100% - 28px); min-height: 68px; }
  .brand small { display: none; }
  .status-chip { max-width: 150px; }
  .service-warning { align-items: flex-start; flex-direction: column; gap: 2px; width: calc(100% - 28px); text-align: left; }
  .resume-notice { align-items: stretch; flex-direction: column; width: calc(100% - 28px); }
  .hero { width: calc(100% - 28px); padding-bottom: 56px; }
  .hero h1 { font-size: 40px; }
  .template-section { padding: 64px 14px 76px; }
  .template-card { display: block; }
  .flow-shell, .result-shell, .narrow-view { width: calc(100% - 28px); padding-top: 34px; }
  .upload-panel { padding: 16px; }
  .thumb-grid { grid-template-columns: repeat(3, 1fr); }
  .sticky-action { align-items: stretch; flex-direction: column; bottom: 8px; }
  .sticky-action .primary-button { width: 100%; }
  .change-grid, .console-grid { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
  .refined-results-grid { grid-template-columns: 1fr; }
  .result-heading > .secondary-button { width: 100%; }
  .refine-panel { align-items: stretch; flex-direction: column; gap: 18px; padding: 20px; }
  .refine-panel .primary-button { width: 100%; }
  .refinement-meta { grid-template-columns: 1fr 1fr; }
  .refinement-meta div:nth-child(2) { border-right: 0; }
  .refinement-meta div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .material-review-actions { align-items: stretch; flex-direction: column; }
  .progress-steps { grid-template-columns: repeat(3, 1fr); row-gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
.history-list { display: grid; gap: 22px; margin-top: 24px; }
.history-card { padding: 20px; border: 1px solid rgba(74, 52, 40, .16); background: rgba(255, 255, 255, .58); }
.history-card-heading { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; margin-bottom: 14px; }
.history-card-heading strong { font-size: 18px; }
.history-card-heading span { color: var(--muted, #7e756e); font-size: 13px; }
.history-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.history-image-item { overflow: hidden; border: 1px solid transparent; border-radius: 10px; background: rgba(255, 255, 255, .78); }
.history-image-item.is-selected { border-color: #2f6fed; box-shadow: 0 0 0 2px rgba(47, 111, 237, .12); }
.history-images a { position: relative; display: block; color: inherit; text-decoration: none; }
.history-images img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; background: #eee6dc; }
.history-images a span { position: absolute; left: 8px; bottom: 8px; padding: 4px 7px; border-radius: 999px; background: rgba(45, 31, 24, .78); color: white; font-size: 11px; }
.history-refine-toggle,
.history-refine-submit { border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.history-refine-toggle { width: 100%; padding: 11px 8px; color: #241f1b; background: #f4eee6; }
.history-image-item.is-selected .history-refine-toggle { color: #fff; background: #2f6fed; }
.history-refined-status { display: block; padding: 11px 8px; color: #6f675f; text-align: center; }
.history-refine-submit { width: 100%; margin-top: 12px; padding: 13px 16px; border-radius: 999px; color: #fff; background: #1f1c19; }
.history-refine-submit:disabled { cursor: default; color: #8d857d; background: #e6e0d9; }
.quality-paused-card { max-width: 820px; }
.quality-paused-grid { margin: 24px 0; }
.quality-paused-grid:empty { display: none; }
@media (max-width: 700px) { .history-card-heading { align-items: flex-start; flex-direction: column; } }

.image-model-panel { margin: 20px 0; padding: 22px; border: 1px solid #d9cfc4; border-radius: 12px; background: #fffaf3; }
.image-model-panel label { display: block; font-weight: 600; margin-bottom: 10px; }
.image-model-panel select { display: block; width: 100%; max-width: 580px; padding: 12px; font: inherit; color: #49382d; background: #fff; border: 1px solid #baa694; border-radius: 6px; }
.image-model-panel p { margin: 12px 0 0; line-height: 1.65; }

/* 小火炉首页直接展示三种样片，去掉介绍区后收紧顶部留白。 */
#homeView .template-section { padding-top: 48px; min-height: calc(100vh - 150px); }
#homeView .template-image img { object-position: center top; }

/* 小红书测试版：围绕样片、原照片对比和保存，收起内部测试信息。 */
#homeView .template-section { padding-top: 24px; }
.sample-frame { position: relative; overflow: hidden; border-radius: 16px; }
.sample-frame .template-image { width: 100%; border-radius: 0; }
.sample-action { position: absolute; right: 16px; bottom: 16px; border: 1px solid #ffffff75; border-radius: 24px; padding: 11px 16px; color: #fff; background: #25231fd9; font-size: 16px; cursor: pointer; backdrop-filter: blur(8px); }
.template-copy { padding: 15px 2px 22px; }
.template-copy h3 { margin: 0; font-size: 20px; }
.upload-reminder p { margin: 0; line-height: 1.8; }
.upload-reminder strong { display: block; color: var(--ink); }
.upload-summary .text-action { margin-left: auto; font-size: 14px; }
.primary-thumb { display: none; }
.ready-description:empty, #readyDescription:empty { display: none; }
.generating-card { text-align: center; padding: 24px; }
.generating-card h1 { font-size: 28px; margin: 8px 0 24px; }
.waiting-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.waiting-grid div { display: grid; place-items: center; aspect-ratio: 3 / 4; border-radius: 14px; background: #e9e4dc; color: #7f7b74; font-size: 15px; }
.generating-card .wide-button { font-size: 18px; margin: 4px 0; padding: 16px 10px; }
#generationDescription:empty { display: none; }
#generationFootnote { display: block; margin: 24px 0 16px; color: var(--muted); line-height: 1.7; }
.waiting-notice { margin: 18px 0 22px; padding: 16px 18px; background: #f4eadb; color: var(--ink); line-height: 1.7; text-align: left; }
.waiting-notice strong, .waiting-notice span { display: block; }
.waiting-notice strong { margin-bottom: 3px; font-size: 17px; }
.progress-steps { display: grid; grid-template-columns: 1fr; text-align: left; padding: 18px; margin: 0; gap: 14px; background: #fffdf9; border-radius: 14px; }
.progress-steps li { font-size: 16px; }
.candidate-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; }
.comparison-originals, .comparison-output { display: flex; flex-direction: column; gap: 6px; min-width: 0; background: #f0ece6; border-radius: 8px; overflow: hidden; align-items: center; justify-content: center; }
.comparison-originals img { flex: 1; min-height: 0; max-height: 220px; object-fit: contain; }
.comparison-output img { height: auto; aspect-ratio: 3 / 4; object-fit: contain; }
.candidate-comparison img { cursor: zoom-in; }
.candidate-comparison small { font-size: 12px; color: var(--muted); padding: 3px 0 8px; }
.result-card > footer { padding: 12px; margin-top: 0; min-height: 54px; background: #fffdf9; color: var(--ink); }
.result-card > footer a { color: var(--brown); font-size: 15px; }
.select-refine-button { color: var(--brown); border-color: var(--line); background: #f4eee6; font-size: 14px; padding: 8px 12px; }
.result-card .comparison-originals img { aspect-ratio: auto; height: 160px; object-fit: contain; flex: 1; }
.result-card .comparison-output img { object-fit: contain; }
.result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
#resultMeta { display: block; margin-top: 10px; color: var(--muted); font-size: 14px; }
.history-date { font-size: 19px; margin: 12px 0 0; }
.resume-notice { display: none; }
body:has(#homeView.is-active) .resume-notice:not([hidden]) { display: flex; }
.history-card { border-radius: 14px; }
.history-images { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.refined-batch-card img { cursor: zoom-in; object-fit: contain; }
@media (max-width: 700px) {
  .site-header { width: calc(100% - 32px); min-height: 70px; }
  .template-grid { grid-template-columns: 1fr; gap: 20px; }
  .template-image { aspect-ratio: 3 / 4; }
  .result-grid { grid-template-columns: 1fr; }
  .comparison-originals img { max-height: 180px; }
  .generating-card { padding: 18px 12px; }
  .flow-heading h1, .result-heading h1 { font-size: 27px; }
  .sticky-action { gap: 12px; }
  .upload-summary { flex-wrap: wrap; gap: 8px; }
  .history-images { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 小红书测试版手机端外观：与人宠写真小程序保持同一页面语言。 */
:root {
  --ink: #211f1c;
  --muted: #766d65;
  --paper: #f7f3ee;
  --cream: #eee8e1;
  --line: #d8d0c7;
  --brown: #211f1c;
  --brown-dark: #211f1c;
  --gold: #897864;
  --white: #fff;
}

html { background: #ebe7e1; }
body {
  min-width: 320px;
  background: #ebe7e1;
  color: var(--ink);
}

main,
.site-header,
.service-warning,
.resume-notice {
  width: min(100%, 430px);
  margin-right: auto;
  margin-left: auto;
}

main {
  min-height: calc(100vh - 76px);
  background: var(--paper);
  box-shadow: 0 0 42px rgba(48, 39, 29, .08);
}

.site-header {
  position: relative;
  min-height: 76px;
  padding: 20px 18px 10px;
  border: 0;
  background: var(--paper);
  backdrop-filter: none;
}

.brand {
  display: block;
  font-family: "Songti SC", "STSong", serif;
  text-decoration: none;
}

.brand strong {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: .14em;
}

body:has(.view.is-active:not(#homeView)) .site-header { display: none; }
.site-header .status-chip,
body > footer { display: none !important; }

.service-warning,
.resume-notice {
  box-sizing: border-box;
  margin-top: 0;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.view,
.narrow-view,
.flow-shell,
.result-shell {
  width: 100%;
  min-height: calc(100vh - 76px);
  margin: 0;
}

.narrow-view,
.flow-shell,
.result-shell {
  padding: 18px 16px 92px;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
}

.primary-button {
  color: #fff;
  background: #201e1b;
  box-shadow: none;
}

.secondary-button {
  border: 1px solid var(--line);
  background: #fff;
}

.primary-button:hover,
.secondary-button:hover { transform: none; }

.back-button {
  margin: 0 0 16px;
  padding: 8px 2px;
  color: #655d56;
  font-size: 14px;
}

/* 首页：样片就是入口。 */
#homeView .template-section {
  min-height: calc(100vh - 76px);
  padding: 0 16px 42px;
  background: var(--paper);
}

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

.template-card { position: relative; }
.sample-frame {
  position: relative;
  height: auto;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
  background: #ded8d0;
  box-shadow: 0 9px 22px rgba(48, 39, 29, .12);
}

.sample-frame .template-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}

.sample-frame .template-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sample-gradient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(14, 12, 10, .72) 100%);
}

.sample-title {
  position: absolute;
  bottom: 58px;
  left: 12px;
  right: 12px;
  z-index: 2;
  margin: 0;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
}

.sample-action {
  right: auto;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 2;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 999px;
  background: rgba(255, 255, 255, .15);
  font-size: 13px;
  white-space: nowrap;
}
.template-substyle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 13px 14px;
  border-radius: 12px;
  background: #1e1b18;
  color: #fff;
}
.template-substyle strong { font-size: 16px; }
.template-substyle button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 999px;
  color: #fff;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

/* 上次照片确认页。 */
.reuse-card,
.generating-card,
.empty-result-card {
  padding: 24px 18px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
}

.reuse-card h1,
.generating-card h1,
.empty-result-card h1 {
  margin-bottom: 18px;
  font-family: inherit;
  font-size: 26px;
}

.saved-summary {
  margin: 20px 0;
  padding: 14px 16px;
  border: 0;
  border-radius: 12px;
  background: #fff;
}

/* 上传页：只保留一条必要提醒和一个统一入口。 */
#uploadView .flow-shell { padding-bottom: 112px; }
.selected-template[hidden] { display: none !important; }
.upload-reminder {
  display: block;
  margin: 0 0 14px;
  padding: 0 2px;
  border: 0;
  background: transparent;
}

.upload-reminder p {
  color: #675f58;
  font-size: 13px;
  line-height: 1.65;
}

.upload-grid,
.upload-grid-unified { display: block; }
.upload-panel {
  padding: 14px;
  border: 0;
  border-radius: 13px;
  background: #fff;
}

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

#photoThumbs { display: contents; }
.thumb,
.add-photo-tile {
  position: relative;
  width: 100%;
  min-height: 0;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
}

.add-photo-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 6px;
  border: 1px dashed #c9c0b7;
  background: transparent;
  color: #746c64;
}

.add-photo-tile span {
  margin: 0 0 2px;
  color: #746c64;
  font-size: 26px;
  line-height: 1;
}

.add-photo-tile strong {
  font-size: 12px;
  font-weight: 500;
}

.thumb .remove-thumb {
  top: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  font-size: 16px;
}

.upload-summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  margin: 12px 0 0;
  padding: 0 2px;
  background: transparent;
  color: var(--muted);
}

.upload-summary > div { display: flex; align-items: baseline; }
.upload-summary strong {
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
}

.upload-summary span,
.upload-summary p {
  color: var(--muted);
  font-size: 11px;
}

.upload-summary .text-action {
  width: auto;
  margin-left: auto;
  padding: 4px 0;
  border: 0;
  color: #655d56;
  font-size: 11px;
}

.note-field,
.material-review,
.consent-field {
  border-radius: 12px;
  background: #fff;
}

.consent-field {
  margin-top: 12px;
  padding: 12px 13px;
  border: 0;
  color: #746c64;
  font-size: 11px;
}

.material-review { padding: 18px 16px; }
.material-review h2 { font-family: inherit; font-size: 20px; }
.material-review-actions { flex-direction: column; }

.sticky-action {
  position: sticky;
  bottom: 8px;
  z-index: 10;
  display: block;
  margin-top: 14px;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  border: 0;
  background: rgba(247, 243, 238, .96);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.sticky-action > div { display: none; }
.sticky-action .primary-button { width: 100%; }

/* 等待页：时间预期在最前，候选图与阶段状态沿用小程序结构。 */
#generatingView { padding-top: 14px; }
.generating-card { padding: 0; text-align: left; }
.generating-card h1 {
  margin: 0 2px 14px;
  text-align: center;
}

.waiting-notice {
  margin: 0 0 14px;
  padding: 14px;
  border-radius: 11px;
  background: #211f1c;
  color: #fff !important;
}

.waiting-notice strong { font-size: 17px; }
.waiting-notice span {
  margin-top: 3px;
  color: rgba(255, 255, 255, .74);
  font-size: 12px;
  line-height: 1.6;
}

.waiting-grid {
  gap: 8px;
  margin: 8px 0;
}

.waiting-grid div {
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  background: #e8e1d9;
  color: #8d847b;
  font-size: 13px;
}

.generating-card .wide-button {
  min-height: 52px;
  margin: 10px 0;
  font-size: 16px;
}

#generationFootnote { display: none !important; }
.progress-steps {
  gap: 0;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 11px;
  background: #fff;
}

.progress-steps li {
  position: relative;
  min-height: 42px;
  padding: 10px 0 10px 28px;
  color: #999188;
  font-size: 14px;
}

.progress-steps li::before {
  content: "";
  position: absolute;
  top: 13px;
  left: 0;
  width: 14px;
  height: 14px;
  border: 1px solid #c8c0b8;
  border-radius: 50%;
}

.progress-steps li.is-active::before,
.progress-steps li.is-done::before {
  border-color: #211f1c;
  background: #211f1c;
}

/* 结果页：按小程序纵向展示，每张保留原图与写真横向对比。 */
.result-heading {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.result-heading h1,
.flow-heading h1 {
  margin: 0;
  font-family: inherit;
  font-size: 22px;
}

#resultMeta {
  margin-top: 6px;
  color: #766b60;
  font-size: 12px;
}

.result-heading > .secondary-button { width: 100%; }
.result-grid,
.refined-results-grid {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.result-card,
.refined-batch-card {
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: #e6dfd7;
  box-shadow: 0 7px 17px rgba(48, 39, 29, .10);
}

.candidate-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 8px 6px;
}

.comparison-originals,
.comparison-output {
  border-radius: 7px;
  background: #f3eee8;
}

.result-card .comparison-originals img {
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.comparison-output img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.candidate-comparison small {
  padding: 7px 0 8px;
  font-size: 12px;
}

.result-card > footer {
  min-height: 54px;
  margin: 0;
  padding: 9px 12px;
  background: #fff;
  color: var(--ink);
}

.result-card > footer a { color: var(--ink); }
.select-refine-button {
  min-height: 34px;
  padding: 6px 10px;
  border-color: var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
}

.refine-panel {
  align-items: stretch;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border: 0;
  border-radius: 12px;
  background: #fff;
}

.refine-panel h2 { font-family: inherit; font-size: 18px; }
.refine-panel .primary-button { width: 100%; min-width: 0; }
.result-actions { display: grid; gap: 8px; margin: 18px 0 0; }
.result-actions button { width: 100%; }

.refined-batch-card > img {
  aspect-ratio: 3 / 4;
  object-fit: contain;
}

.refined-batch-heading,
.refined-batch-actions { padding-right: 14px; padding-left: 14px; }

/* 制作记录：日期、时间线、两列缩略图。 */
.history-list {
  display: block;
  margin-top: 10px;
}

.history-date {
  margin: 20px 0 10px;
  font-family: inherit;
  font-size: 17px;
}

.history-card {
  position: relative;
  margin: 0 0 14px 10px;
  padding: 12px;
  border: 0;
  border-left: 1px solid #d7cdbf;
  border-radius: 10px;
  background: #fff;
}

.history-card::before {
  content: "";
  position: absolute;
  top: 18px;
  left: -5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #897864;
}

.history-card-heading {
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.history-card-heading strong { font-size: 16px; }
.history-card-heading span { font-size: 11px; }
.history-images { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.history-images img { border-radius: 7px; }

/* 异常、暂停和测试辅助页面也使用同一手机卡片语言。 */
.empty-result-card {
  padding: 18px 2px;
  background: transparent;
}

.quality-paused-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.material-strategy,
.manual-qc-note {
  border: 0;
  border-radius: 11px;
  background: #fff;
}

.lightbox {
  width: min(94vw, 780px);
  max-height: 92vh;
}

@media (min-width: 431px) {
  .site-header,
  main {
    border-right: 1px solid rgba(74, 63, 52, .08);
    border-left: 1px solid rgba(74, 63, 52, .08);
  }
}

@media (max-width: 430px) {
  main,
  .site-header,
  .service-warning,
  .resume-notice { width: 100%; }
}
.entitlement-bar { position: sticky; top: 0; z-index: 18; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; background: rgba(31, 29, 26, .94); color: #fff; font-size: 13px; }
.entitlement-bar span { opacity: .84; }
.order-access-card { margin: 28px auto; padding: 26px 22px; border-radius: 28px; background: #fff; box-shadow: 0 18px 55px rgba(55, 42, 30, .10); }
.order-access-card h1 { margin: 8px 0 12px; font-size: 30px; }
.order-access-card > p { color: #756b62; line-height: 1.7; }
.order-access-card label { display: grid; gap: 8px; margin: 18px 0; font-weight: 700; }
.order-access-card input { width: 100%; min-height: 52px; box-sizing: border-box; border: 1px solid #ded6cc; border-radius: 16px; padding: 0 15px; font: inherit; background: #fbf9f6; }
.order-screenshot input { padding: 13px; }
.order-recovery { margin-top: 20px; border-top: 1px solid #eee7df; padding-top: 18px; }
.order-recovery summary { cursor: pointer; font-weight: 700; }
.support-slot { position: fixed; right: 16px; bottom: 18px; z-index: 20; max-width: 270px; padding: 14px; border-radius: 18px; background: #fff; box-shadow: 0 12px 40px rgba(31, 25, 21, .18); }
.support-slot strong, .support-slot span { display: block; margin-bottom: 8px; }
