:root {
  --p: 18% 0 0;
  --pc: 98% 0 0;
  --b1: 100% 0 0;
  --b2: 97% 0 0;
  --b3: 90% 0 0;
  --bc: 20% 0 0;
  --brand: #111111;
  --brand-on: #ffffff;
  --brand-dark: #2b2b2b;
  --brand-ink: #111111;
  --brand-soft: #efefed;
  --coral: #4a4a4a;
  --page: #f7f7f5;
  --surface: #ffffff;
  --surface-2: #efefed;
  --line: #d8d8d4;
  --ink: #202020;
  --muted: #626262;
  --danger: #9f1d1d;
  --warning: #7a4b00;
  --success: #1d633b;
  --focus: #111111;
  --inverse: #111111;
  --inverse-on: #ffffff;
  --radius: .75rem;
  --shadow: 0 12px 32px rgba(0, 0, 0, .07);
  --shadow-soft: 0 6px 18px rgba(0, 0, 0, .045);
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(5.25rem + env(safe-area-inset-top));
}
body.bg-base-200 {
  margin: 0;
  min-width: 320px;
  background: var(--page);
  color: var(--ink);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
  line-height: 1.625;
}
body.font-sans { font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.hidden, [hidden] { display: none !important; }
.is-hidden { display: none !important; }
.skip-link {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 100;
  transform: translateY(-200%);
  border-radius: .75rem;
  background: var(--brand);
  color: var(--brand-on);
  padding: .65rem 1rem;
  font-weight: 700;
}
.skip-link:focus { transform: translateY(0); }

/* 로컬 UI 번들과 별개로 핵심 조작을 보장하는 기본 컴포넌트 */
.btn {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: var(--surface);
  color: var(--ink);
  padding: .65rem 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease, opacity 160ms ease;
}
.btn:hover { border-color: var(--brand); }
.btn:active { opacity: .78; }
.btn:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; opacity: .52; pointer-events: none; }
.btn-primary { border-color: var(--brand); background: var(--brand); color: var(--brand-on); }
.btn-primary:hover { border-color: var(--brand-dark); background: var(--brand-dark); }
.btn-outline { border-color: var(--brand); color: var(--brand-dark); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { min-height: 2.75rem; padding: .5rem .75rem; font-size: .875rem; }
.alert {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: var(--surface);
  padding: 1rem;
}
.alert-error { border-color: #f0b7c1; background: #fff1f3; color: #74152a; }
.alert-warning { border-color: #ecd5a7; background: #fff8e8; color: #67420a; }
.alert-success { border-color: #a8ddc5; background: #edfff6; color: #12543a; }
.badge {
  display: inline-flex;
  min-height: 1.65rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .2rem .65rem;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1;
}
.badge-lg { min-height: 2rem; padding-inline: .8rem; font-size: .85rem; }
.badge-success { border-color: #8bcdb0; background: #e5f9ef; color: #12543a; }
.badge-warning { border-color: #e5c47c; background: #fff5d9; color: #67420a; }
.badge-error { border-color: #eba7b3; background: #ffe7eb; color: #74152a; }
.input, .select, .textarea, .file-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: .55rem;
  background: var(--surface);
  color: var(--ink);
  padding: .75rem .9rem;
}
.input, .select, .file-input { min-height: 3rem; }
.textarea { resize: vertical; }
.input:focus, .select:focus, .textarea:focus, .file-input:focus { border-color: var(--brand); outline: 3px solid rgba(17, 17, 17, .12); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.label { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-block: .4rem; }
.label-text { font-size: .95rem; }
.label-text-alt { font-size: .78rem; }
.radio, .checkbox { flex: 0 0 auto; accent-color: var(--brand); }
.skeleton { position: relative; overflow: hidden; background: #e5e5e2; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); animation: shimmer 1.4s infinite; }
.loading-spinner { width: 1.1rem; height: 1.1rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .75s linear infinite; }
.toast { position: fixed; top: 1rem; left: 50%; z-index: 80; width: min(24rem, calc(100% - 2rem)); transform: translateX(-50%); }

.brand-mark {
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  flex: 0 0 auto;
  overflow: hidden;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 5px 16px rgba(0, 0, 0, .16);
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.42); }
.theme-invariant-black-logo { filter: none !important; opacity: 1 !important; mix-blend-mode: normal !important; }
.site-header { border-bottom: 1px solid rgba(216, 216, 212, .92); background: rgba(255, 255, 255, .92); padding-top: env(safe-area-inset-top); backdrop-filter: blur(18px); }
.site-nav { display: flex; min-height: 4.5rem; align-items: center; gap: 1.5rem; padding: .65rem 1rem; }
.site-brand { display: inline-flex; min-width: 0; min-height: 2.75rem; flex: 1 1 auto; align-items: center; gap: .75rem; color: var(--brand-ink); text-decoration: none; }
.site-brand-copy { display: grid; min-width: 0; gap: .05rem; }
.site-wordmark { color: var(--brand-ink); font-size: .82rem; font-weight: 900; letter-spacing: .14em; line-height: 1.2; }
.site-nav-links { display: none; align-items: center; gap: 1.5rem; }
.site-nav-links a, .site-footer-links a { color: var(--muted); font-size: .82rem; font-weight: 700; text-decoration: none; transition: color 160ms ease; }
.site-nav-links a:hover, .site-footer-links a:hover { color: var(--brand-ink); }
.site-nav-actions { display: flex; flex: 0 0 auto; align-items: center; gap: .4rem; }
.theme-toggle { min-width: 2.75rem; white-space: nowrap; }
.theme-toggle-icon { display: inline-grid; width: 1rem; place-items: center; font-size: 1.05rem; line-height: 1; }
.theme-toggle-label { font-size: .78rem; }
.site-footer { border-top: 1px solid var(--line); background: #111; color: #fff; }
.site-footer-inner { display: grid; gap: 1.75rem; padding: 2.25rem 1rem; }
.site-footer .site-wordmark { color: #fff; }
.site-footer-brand p, .site-footer-notice p { margin: .5rem 0 0; color: rgba(255, 255, 255, .58); font-size: .78rem; }
.site-footer-links { display: flex; flex-wrap: wrap; gap: .65rem 1.1rem; }
.site-footer-links a { display: inline-flex; min-height: 2.75rem; align-items: center; color: rgba(255, 255, 255, .74); }
.site-footer-notice { display: grid; align-content: start; }
.eyebrow { color: var(--brand-dark); font-size: .75rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.text-brand-ink { color: var(--brand-ink) !important; }
.text-primary { color: var(--brand-dark) !important; }
.bg-brand-soft { background: var(--brand-soft) !important; }

.progress-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.progress-rail li {
  position: relative;
  display: flex;
  align-items: center;
  gap: .45rem;
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 700;
}
.progress-rail li::after { content: ""; position: absolute; top: .85rem; right: -.2rem; left: 2rem; height: 1px; background: var(--line); }
.progress-rail li:last-child::after { display: none; }
.progress-rail li span { display: grid; width: 1.75rem; height: 1.75rem; z-index: 1; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); }
.progress-rail .is-current { color: var(--brand-dark); }
.progress-rail .is-current span { border-color: var(--brand); background: var(--brand); color: var(--brand-on); }
.progress-rail.capture-progress { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.form-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: box-shadow 200ms ease;
}
.form-card:hover { box-shadow: 0 14px 36px rgba(0, 0, 0, .08); }
.form-card summary, .privacy-panel summary, .observation-summary-details summary {
  display: flex;
  min-height: 2.75rem;
  cursor: pointer;
  align-items: center;
}
.history-count { margin-left: .5rem; }
.section-number { margin-bottom: .5rem; color: var(--brand-dark); font-size: .7rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.choice-grid { display: grid; grid-template-columns: 1fr; gap: .65rem; }
.choice-grid-2, .choice-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice-chip { position: relative; cursor: pointer; }
.choice-chip input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choice-chip span {
  display: flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: .8rem;
  background: var(--surface);
  padding: .65rem .75rem;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 700;
  text-align: center;
  transition: border-color 200ms ease, background-color 200ms ease, color 200ms ease, transform 200ms ease;
}
.choice-chip:hover span { border-color: #999; }
.choice-chip input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); box-shadow: inset 0 0 0 1px var(--brand); }
.choice-chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice-chip input:disabled + span { cursor: not-allowed; opacity: .5; }

.axis-fieldset {
  display: grid;
  gap: .65rem;
  border: 1px solid var(--line);
  border-radius: .9rem;
  padding: 1rem;
}
.axis-fieldset legend { padding-inline: .4rem; color: var(--brand-ink); font-size: .92rem; font-weight: 800; }
.axis-fieldset label, .stacked-options label { display: flex; min-height: 2.75rem; cursor: pointer; align-items: center; gap: .65rem; border-radius: .6rem; padding: .4rem .45rem; transition: background-color 200ms ease; }
.axis-fieldset label:hover, .stacked-options label:hover { background: var(--surface-2); }
.stacked-options { display: grid; gap: .35rem; }
.stacked-options.compact { grid-template-columns: 1fr; }
.privacy-panel { border: 1px solid var(--line); border-radius: .65rem; background: var(--brand-soft); padding: 1rem; }

/* 10장 얼굴 관찰 우선 촬영 */
.photo-capture-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.capture-progress-count { flex: 0 0 auto; border-radius: 999px; background: var(--inverse); padding: .55rem .8rem; color: var(--inverse-on); font-size: .82rem; letter-spacing: .04em; }
.capture-direction-note { display: grid; gap: .2rem; border-left: 3px solid #111; background: #f4f4f2; padding: .85rem 1rem; color: var(--muted); font-size: .82rem; line-height: 1.55; }
.capture-direction-note strong { color: var(--brand-ink); }
.capture-group { min-width: 0; }
.capture-group legend { display: flex; width: 100%; align-items: center; gap: .55rem; color: var(--brand-ink); font-size: 1rem; font-weight: 850; }
.capture-group legend span { display: grid; width: 1.75rem; height: 1.75rem; place-items: center; border-radius: 50%; background: var(--inverse); color: var(--inverse-on); font-size: .68rem; }
.capture-swipe-hint, .mobile-swipe-hint { display: none; }
.capture-slot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin-top: 1rem; }
.capture-slot { display: grid; min-width: 0; gap: .55rem; border: 1px solid var(--line); border-radius: .8rem; background: var(--surface); padding: .55rem; color: var(--brand-ink); text-align: left; transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease; }
.capture-slot:hover { border-color: #777; transform: translateY(-1px); }
.capture-slot:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.capture-slot.has-photo { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.capture-slot.is-next:not(.has-photo) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.capture-slot.has-error { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.capture-slot.is-processing { cursor: progress; opacity: .72; }
.capture-slot-frame { position: relative; display: grid; aspect-ratio: 4 / 3; overflow: hidden; place-items: center; border-radius: .5rem; background: #f0f0ed; }
.capture-slot-frame > span { display: grid; gap: .2rem; place-items: center; color: #777; text-align: center; }
.capture-slot-frame strong { color: #222; font-size: 1rem; letter-spacing: .06em; }
.capture-slot-frame small { font-size: .68rem; }
.capture-slot-frame img { width: 100%; height: 100%; object-fit: cover; }
.capture-slot-label { overflow: hidden; font-size: .82rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.capture-slot-status { color: var(--muted); font-size: .7rem; }
.capture-slot.has-photo .capture-slot-status { color: #111; font-weight: 750; }
.mood-suggestion-stage { min-width: 0; }
.mood-suggestion-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.mood-model-badge { flex: 0 0 auto; border: 1px solid #111; border-radius: 999px; padding: .38rem .65rem; color: #111; font-size: .64rem; font-weight: 850; letter-spacing: .05em; }
.mood-suggestion-state, .mood-suggestion-error { border: 1px solid var(--line); border-radius: .8rem; background: #f5f5f3; padding: 1rem; color: var(--muted); font-size: .85rem; line-height: 1.6; }
.mood-suggestion-state { display: flex; min-height: 4.25rem; align-items: center; gap: .7rem; }
.mood-suggestion-error { border-color: #777; color: var(--brand-ink); }
.loading-spinner { width: 1.05rem; height: 1.05rem; flex: 0 0 auto; border: 2px solid #ccc; border-top-color: #111; border-radius: 50%; animation: mood-spin .7s linear infinite; }
.mood-keyword-list { display: grid; grid-template-columns: 1fr; gap: .65rem; }
.mood-keyword-option { position: relative; display: grid; min-height: 5rem; cursor: pointer; grid-template-columns: 2rem 1fr; align-items: center; gap: .85rem; border: 1px solid var(--line); border-radius: .8rem; background: var(--surface); padding: .9rem; transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease; }
.mood-keyword-option:hover { border-color: #777; }
.mood-keyword-option:has(input:checked) { border-color: var(--inverse); background: var(--inverse); color: var(--inverse-on); box-shadow: inset 0 0 0 1px var(--inverse); }
.mood-keyword-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.mood-keyword-option:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.mood-keyword-rank { display: grid; width: 2rem; height: 2rem; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: .7rem; font-weight: 850; }
.mood-keyword-copy { display: grid; gap: .2rem; }
.mood-keyword-copy strong { font-size: 1.05rem; }
.mood-keyword-copy small { color: var(--muted); font-size: .72rem; line-height: 1.45; }
.mood-keyword-option:has(input:checked) small { color: rgba(255, 255, 255, .68); }
.observation-summary-details summary { flex-wrap: wrap; gap: .55rem .75rem; color: var(--brand-ink); }
.observation-summary-details summary strong { font-size: .88rem; }
@keyframes mood-spin { to { transform: rotate(360deg); } }
#questionnaire-stage[hidden] { display: none !important; }

/* BLACK ROSE 실시간 카메라: 로컬 판정과 촬영 액션만 담는 독립 모달 */
body.camera-capture-open { overflow: hidden; overscroll-behavior: none; }
.camera-capture-dialog {
  width: min(64rem, calc(100vw - 2rem));
  max-width: none;
  max-height: min(54rem, calc(100dvh - 2rem));
  overflow: hidden;
  border: 0;
  border-radius: 1rem;
  background: transparent;
  color: var(--ink);
  padding: 0;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .32);
}
.camera-capture-dialog:not([open]) { display: none; }
.camera-capture-dialog[open] { display: block; }
.camera-capture-dialog::backdrop { background: rgba(0, 0, 0, .76); backdrop-filter: blur(8px); }
.camera-capture-shell {
  display: grid;
  max-height: min(54rem, calc(100dvh - 2rem));
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: inherit;
  background: var(--surface);
}
.camera-capture-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.15rem;
}
.camera-capture-heading { min-width: 0; }
.camera-capture-kicker { margin: 0 0 .25rem; color: var(--muted); font-size: .64rem; font-weight: 900; letter-spacing: .18em; }
.camera-capture-heading h2 { margin: 0; color: var(--brand-ink); font-size: 1.12rem; font-weight: 900; letter-spacing: -.02em; line-height: 1.3; }
.camera-capture-slot-label { margin: .25rem 0 0; overflow: hidden; color: var(--muted); font-size: .8rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.camera-icon-button {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--brand-ink);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}
.camera-icon-button span { font-size: 1.5rem; font-weight: 300; line-height: 1; }
.camera-icon-button:hover { border-color: var(--brand); background: var(--surface-2); transform: rotate(4deg); }
.camera-capture-body { min-height: 0; overflow-y: auto; background: var(--surface-2); }
.camera-preview-frame {
  position: relative;
  min-height: 20rem;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #080808;
  isolation: isolate;
}
.camera-preview-media,
.camera-preview-media video,
.camera-preview-media canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.camera-preview-media video { z-index: 1; background: #080808; object-fit: cover; }
.camera-preview-media canvas { z-index: 3; pointer-events: none; }
.camera-preview-media video,
.camera-preview-media canvas { transition: transform 180ms ease; }
.camera-preview-media.is-mirrored video,
.camera-preview-media.is-mirrored canvas { transform: scaleX(-1); }
.camera-preview-shade {
  position: absolute;
  z-index: 2;
  inset: 0;
  background: radial-gradient(ellipse 37% 47% at 50% 46%, transparent 0 84%, rgba(0, 0, 0, .43) 86% 100%);
  pointer-events: none;
}
.camera-face-guide {
  position: absolute;
  z-index: 4;
  top: 46%;
  left: 50%;
  width: min(52%, 17rem);
  aspect-ratio: .73;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 50%;
  pointer-events: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.camera-face-guide::before,
.camera-face-guide::after,
.camera-face-guide span::before,
.camera-face-guide span::after {
  position: absolute;
  width: 1.1rem;
  height: 1.1rem;
  border-color: #fff;
  content: "";
}
.camera-face-guide::before { top: -.18rem; left: -.18rem; border-top: 3px solid; border-left: 3px solid; border-radius: .35rem 0 0; }
.camera-face-guide::after { top: -.18rem; right: -.18rem; border-top: 3px solid; border-right: 3px solid; border-radius: 0 .35rem 0 0; }
.camera-face-guide span::before { bottom: -.18rem; left: -.18rem; border-bottom: 3px solid; border-left: 3px solid; border-radius: 0 0 0 .35rem; }
.camera-face-guide span::after { right: -.18rem; bottom: -.18rem; border-right: 3px solid; border-bottom: 3px solid; border-radius: 0 0 .35rem; }
.camera-preview-frame[data-state="ready"] .camera-face-guide { border-color: #a8f2c8; box-shadow: 0 0 0 3px rgba(52, 211, 125, .2), inset 0 0 28px rgba(52, 211, 125, .08); }
.camera-preview-badge {
  position: absolute;
  z-index: 5;
  top: .8rem;
  left: .8rem;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: rgba(0, 0, 0, .58);
  color: #fff;
  padding: .32rem .6rem;
  font-size: .66rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}
.camera-capture-flash { position: absolute; z-index: 8; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.camera-preview-frame.is-capturing .camera-capture-flash { animation: camera-flash 260ms ease-out; }
.camera-live-panel { display: grid; align-content: start; gap: 1rem; background: var(--surface); padding: 1.15rem; }
.camera-live-copy { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: .8rem; }
.camera-live-copy h3 { margin: 0; color: var(--brand-ink); font-size: .95rem; font-weight: 850; line-height: 1.45; }
.camera-live-copy p { margin: .25rem 0 0; color: var(--muted); font-size: .75rem; line-height: 1.55; }
.camera-state-badge {
  display: inline-flex;
  min-height: 1.65rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  padding: .2rem .58rem;
  font-size: .66rem;
  font-weight: 850;
  white-space: nowrap;
}
.camera-state-badge.is-loading::before { width: .55rem; height: .55rem; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; content: ""; animation: spin .75s linear infinite; }
.camera-state-badge.is-ready { border-color: #8bcdb0; background: #e5f9ef; color: #12543a; }
.camera-state-badge.is-adjust { border-color: #e5c47c; background: #fff5d9; color: #67420a; }
.camera-state-badge.is-error { border-color: #eba7b3; background: #ffe7eb; color: #74152a; }
.camera-check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; margin: 0; padding: 0; list-style: none; }
.camera-check-grid li {
  display: grid;
  min-width: 0;
  grid-template-columns: 1.15rem minmax(0, 1fr);
  align-items: center;
  column-gap: .35rem;
  border: 1px solid var(--line);
  border-radius: .55rem;
  background: var(--surface);
  padding: .55rem .6rem;
  color: var(--muted);
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}
.camera-check-grid li > span { grid-row: 1 / span 2; font-size: 1.15rem; line-height: 1; }
.camera-check-grid strong { overflow: hidden; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.camera-check-grid small { overflow: hidden; font-size: .62rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.camera-check-grid li.is-pass { border-color: #8bcdb0; background: #edfff6; color: #12543a; }
.camera-check-grid li.is-pass > span::before { content: "✓"; }
.camera-check-grid li.is-pass > span { font-size: 0; }
.camera-check-grid li.is-pass > span::before { font-size: .8rem; }
.camera-check-grid li.is-fail { border-color: #e5c47c; background: #fff8e8; color: #67420a; }
.camera-check-grid li.is-neutral { border-style: dashed; background: var(--surface-2); color: var(--muted); }
.camera-auxiliary-note { margin: 0; border-left: 3px solid var(--brand); background: var(--surface-2); padding: .72rem .8rem; color: var(--muted); font-size: .72rem; line-height: 1.55; }
.camera-auxiliary-note strong { display: block; margin-bottom: .15rem; color: var(--brand-ink); }
.camera-capture-footer {
  display: grid;
  gap: .7rem;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: .85rem 1.15rem max(.85rem, env(safe-area-inset-bottom));
}
.camera-local-note { margin: 0; color: var(--muted); font-size: .68rem; line-height: 1.45; }
.camera-secondary-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; }
.camera-secondary-actions .btn { min-width: 0; padding-inline: .55rem; font-size: .78rem; }
.camera-shutter { min-height: 3.25rem; border-radius: .65rem; }
.camera-shutter-mark { width: 1rem; height: 1rem; border: 2px solid currentColor; border-radius: 50%; box-shadow: inset 0 0 0 2px transparent; }
.camera-shutter:not(:disabled) .camera-shutter-mark { background: currentColor; box-shadow: inset 0 0 0 2px var(--brand); }

html[data-theme="dark"] .camera-capture-dialog::backdrop { background: rgba(0, 0, 0, .84); }
html[data-theme="dark"] .camera-state-badge.is-ready,
html[data-theme="dark"] .camera-check-grid li.is-pass { border-color: #32634a; background: #172c22; color: #9be2bb; }
html[data-theme="dark"] .camera-state-badge.is-adjust,
html[data-theme="dark"] .camera-check-grid li.is-fail { border-color: #72592e; background: #302616; color: #f6d797; }
html[data-theme="dark"] .camera-state-badge.is-error { border-color: #6f3942; background: #321a1f; color: #ffb8c1; }
html[data-theme="dark"] .camera-auxiliary-note,
html[data-theme="dark"] .camera-check-grid li.is-neutral { background: #20201f; }

@media (min-width: 768px) {
  .camera-capture-body { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(18rem, .8fr); }
  .camera-preview-frame { min-height: 0; aspect-ratio: auto; }
  .camera-live-panel { overflow-y: auto; padding: 1.35rem; }
  .camera-capture-footer { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; }
  .camera-local-note { max-width: 17rem; }
  .camera-secondary-actions { display: flex; }
  .camera-footer-close { display: none; }
  .camera-shutter { min-width: 13rem; }
}

@media (max-width: 639px) {
  .camera-capture-dialog { width: 100vw; height: 100dvh; max-height: none; margin: 0; border-radius: 0; }
  .camera-capture-shell { width: 100%; height: 100dvh; max-height: none; border: 0; border-radius: 0; }
  .camera-capture-header { padding: max(.8rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) .8rem max(1rem, env(safe-area-inset-left)); }
  .camera-capture-body { overscroll-behavior: contain; }
  .camera-preview-frame { min-height: min(50dvh, 31rem); aspect-ratio: 3 / 4; }
  .camera-face-guide { width: min(58%, 15rem); }
  .camera-live-panel { padding: 1rem max(1rem, env(safe-area-inset-right)) 1rem max(1rem, env(safe-area-inset-left)); }
  .camera-capture-footer { padding-right: max(1rem, env(safe-area-inset-right)); padding-left: max(1rem, env(safe-area-inset-left)); }
}

@media (max-width: 379px) {
  .camera-check-grid { grid-template-columns: 1fr; }
  .camera-preview-frame { min-height: 17rem; }
  .camera-secondary-actions .btn { font-size: .72rem; }
}

@keyframes camera-flash { 0% { opacity: 0; } 35% { opacity: .78; } 100% { opacity: 0; } }

/* BLACK ROSE 브랜드 랜딩 */
.page-home #main-content { max-width: 80rem; }
.landing-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6.5rem; }
.landing-page > * { min-width: 0; }
.landing-minimal { gap: 5rem; }
.landing-hero {
  position: relative;
  display: grid;
  gap: 2rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.landing-hero-copy { position: relative; z-index: 2; align-self: center; padding: 2.25rem 1.35rem 0; }
.landing-kicker { color: var(--brand-dark); font-size: .72rem; font-weight: 900; letter-spacing: .16em; }
.landing-kicker span { margin-inline: .3rem; color: #aaa; }
.landing-hero h1 { margin: 1.15rem 0 0; color: var(--brand-ink); font-size: clamp(2.7rem, 6vw, 5rem); font-weight: 900; letter-spacing: -.065em; line-height: 1.02; word-break: keep-all; }
.landing-lead { max-width: 40rem; margin: 1.35rem 0 0; color: var(--muted); font-size: 1rem; line-height: 1.78; }
.landing-actions { display: flex; flex-direction: column; gap: .65rem; margin-top: 1.75rem; }
.landing-primary-cta, .landing-secondary-cta { min-height: 3.25rem; padding-inline: 1.25rem; font-size: .95rem; }
.landing-trust { margin: 1rem 0 0; color: var(--muted); font-size: .78rem; line-height: 1.6; }
.hero-visual { position: relative; display: grid; min-height: 29rem; align-items: end; overflow: hidden; background: #111; padding: 8rem 1.1rem 1.1rem; color: #fff; }
.hero-visual::before { content: ""; position: absolute; inset: 1rem; border: 1px solid rgba(255, 255, 255, .12); pointer-events: none; }
.hero-rose { position: absolute; top: 1rem; right: 50%; display: grid; width: 12rem; transform: translateX(50%); place-items: center; color: rgba(255, 255, 255, .88); }
.hero-rose-logo { display: grid; width: 9.5rem; height: 9.5rem; overflow: hidden; place-items: center; border: 1px solid rgba(255, 255, 255, .22); border-radius: 50%; background: #fff; box-shadow: 0 1rem 3rem rgba(0, 0, 0, .28); }
.hero-rose-logo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.42); }
.hero-rose-wordmark { margin-top: .55rem; font-size: .6rem; font-weight: 900; letter-spacing: .3em; }
.landing-preview { position: relative; z-index: 1; border: 1px solid rgba(255, 255, 255, .2); border-radius: .65rem; background: rgba(255, 255, 255, .07); color: #fff; padding: 1.2rem; scroll-margin-top: 6rem; backdrop-filter: blur(12px); }
.preview-topline { display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: rgba(255, 255, 255, .58); font-size: .66rem; font-weight: 850; letter-spacing: .08em; }
.preview-sample-label { border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; padding: .18rem .5rem; color: #fff; letter-spacing: 0; }
.preview-focus { margin-top: 1.15rem; border-bottom: 1px solid rgba(255, 255, 255, .14); padding-bottom: 1rem; }
.preview-focus p { margin: 0; color: rgba(255, 255, 255, .6); font-size: .72rem; font-weight: 800; }
.preview-focus h2 { margin: .5rem 0 0; font-size: 1.2rem; line-height: 1.48; }
.preview-details { display: grid; gap: .65rem; margin: .9rem 0 0; }
.preview-details div { display: grid; grid-template-columns: 3.1rem 1fr; gap: .65rem; }
.preview-details dt { color: rgba(255, 255, 255, .46); font-size: .72rem; }
.preview-details dd { margin: 0; font-size: .8rem; font-weight: 700; }
.preview-note { margin: .85rem 0 0; color: rgba(255, 255, 255, .45); font-size: .68rem; }
.landing-proof-strip { display: grid; gap: 1px; margin: -3.25rem .75rem 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: .65rem; background: var(--line); list-style: none; box-shadow: var(--shadow-soft); }
.landing-proof-strip li { display: grid; gap: .15rem; background: var(--surface); padding: 1.15rem 1.25rem; }
.landing-proof-strip strong { color: var(--brand-ink); font-size: .88rem; }
.landing-proof-strip span { color: var(--muted); font-size: .77rem; }
.minimal-principles { display: grid; gap: 1px; border: 1px solid var(--line); background: var(--line); }
.minimal-principles > div { display: grid; gap: .25rem; background: var(--surface); padding: 1.25rem; }
.minimal-principles strong { color: var(--brand-ink); font-size: .88rem; }
.minimal-principles span { color: var(--muted); font-size: .78rem; }
.landing-section { scroll-margin-top: 6rem; }
.landing-section-heading { max-width: 45rem; }
.landing-section-heading h2, .landing-evaluation h2, .landing-final-cta h2, .brand-story h2 { margin: .75rem 0 0; color: var(--brand-ink); font-size: clamp(2rem, 6vw, 3.5rem); font-weight: 880; letter-spacing: -.05em; line-height: 1.13; }
.landing-section-heading > p, .landing-evaluation > div > p { margin: 1rem 0 0; color: var(--muted); line-height: 1.75; }
.brand-story { display: grid; gap: 2rem; border-radius: .8rem; background: #111; padding: 2rem 1.35rem; color: #fff; }
.brand-story .eyebrow, .landing-evaluation .eyebrow { color: rgba(255, 255, 255, .58); }
.brand-story h2, .landing-evaluation h2 { color: #fff; }
.brand-story-copy { align-self: end; }
.brand-story-copy p { margin: 0; color: rgba(255, 255, 255, .66); line-height: 1.8; }
.brand-story-copy p + p { margin-top: 1rem; }
.brand-story-copy .brand-story-lead { color: #fff; font-size: 1.05rem; font-weight: 700; }
.brand-story-copy .brand-signature { margin-top: 1.8rem; color: #fff; font-size: 1rem; font-weight: 850; letter-spacing: .04em; }
.brand-signature span { color: rgba(255, 255, 255, .42); font-size: .72rem; }
.landing-steps { display: grid; gap: 1px; margin: 2rem 0 0; padding: 0; border: 1px solid var(--line); background: var(--line); list-style: none; }
.landing-steps li, .landing-output-grid article { background: var(--surface); padding: 1.35rem; }
.landing-step-number, .landing-output-grid article > span { display: inline-flex; min-width: 2rem; min-height: 2rem; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 50%; color: var(--brand-dark); font-size: .68rem; font-weight: 900; }
.landing-steps h3, .landing-output-grid h3, .privacy-grid h3 { margin: 1rem 0 0; color: var(--brand-ink); font-size: 1.02rem; font-weight: 820; }
.landing-steps p, .landing-output-grid p, .privacy-grid p { margin: .55rem 0 0; color: var(--muted); font-size: .85rem; line-height: 1.7; }
.landing-output-grid { display: grid; gap: 1px; margin-top: 2rem; border: 1px solid var(--line); background: var(--line); }
.plan-preview-section { border-block: 1px solid var(--line); padding-block: 3.5rem; }
.plan-preview-grid { display: grid; gap: .75rem; margin-top: 2rem; }
.plan-preview-card { position: relative; min-height: 11rem; border: 1px solid var(--line); background: var(--surface); padding: 1.35rem; }
.plan-preview-card.is-featured { border-color: var(--inverse); background: var(--inverse); color: var(--inverse-on); }
.plan-badge { display: inline-flex; border-radius: 999px; background: var(--brand-soft); padding: .25rem .55rem; color: var(--brand-dark); font-size: .68rem; font-weight: 850; }
.plan-preview-card.is-featured .plan-badge { background: #fff; color: #111; }
.plan-name { margin: .75rem 0 0; color: inherit; font-size: .92rem; font-weight: 800; }
.plan-price { margin: .5rem 0 0; line-height: 1; }
.plan-price strong { font-size: 2rem; letter-spacing: -.04em; }
.plan-price span { margin-left: .15rem; font-size: .85rem; }
.plan-scope { margin: 1rem 0 0; color: var(--muted); font-size: .78rem; }
.plan-preview-card.is-featured .plan-scope { color: rgba(255, 255, 255, .58); }
.plan-preview-action { display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; margin-top: 1.25rem; }
.plan-preview-action p { margin: 0; color: var(--muted); font-size: .75rem; }
.landing-evaluation { display: grid; gap: 1.5rem; border-radius: .8rem; background: #252525; padding: 1.5rem; color: #fff; }
.landing-evaluation > div > p { color: rgba(255, 255, 255, .62); }
.evaluation-card { align-self: center; border: 1px solid rgba(255, 255, 255, .16); border-radius: .6rem; background: rgba(255, 255, 255, .055); padding: 1.25rem; }
.evaluation-card-title { margin: 0; color: rgba(255, 255, 255, .56); font-size: .72rem; font-weight: 820; }
.evaluation-card strong { display: block; margin-top: .35rem; font-size: 1.05rem; }
.evaluation-card ul { margin: 1rem 0 0; padding-left: 1.2rem; color: rgba(255, 255, 255, .76); font-size: .84rem; }
.text-link-on-dark { display: inline-flex; margin-top: 1rem; color: #fff; font-size: .82rem; font-weight: 800; text-decoration-thickness: 1px; text-underline-offset: .25rem; }
.privacy-grid { display: grid; gap: 1px; margin-top: 2rem; border: 1px solid var(--line); background: var(--line); }
.privacy-grid > div { background: var(--surface); padding: 1.35rem; }
.privacy-index { color: #999; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .7rem; }
.privacy-grid h3 { margin-top: .85rem; }
.faq-list { display: grid; gap: .6rem; margin-top: 2rem; }
.faq-list details { border: 1px solid var(--line); border-radius: .55rem; background: var(--surface); padding: 0 1.1rem; }
.faq-list summary { position: relative; cursor: pointer; padding: 1.05rem 2rem 1.05rem 0; color: var(--brand-ink); font-weight: 800; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; top: 50%; right: .1rem; color: var(--brand); font-size: 1.2rem; transform: translateY(-50%); }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { margin: 0; border-top: 1px solid var(--line); padding: 1rem 0 1.15rem; color: var(--muted); font-size: .86rem; line-height: 1.72; }
.landing-final-cta { position: relative; overflow: hidden; border: 1px solid #111; border-radius: .8rem; background: var(--surface); padding: 3rem 1.35rem; text-align: center; }
.landing-final-cta > img { width: 5rem; height: 5rem; margin: 0 auto 1rem; color: #111; }
.landing-final-cta p { margin: 1rem 0 0; color: var(--muted); }
.landing-final-actions { display: flex; flex-direction: column; justify-content: center; gap: .65rem; margin-top: 1.4rem; }

.pilot-notice { display: grid; gap: .8rem; border: 1px solid var(--line); border-radius: .65rem; background: var(--surface); padding: 1.1rem; }
.pilot-notice > div { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; }
.pilot-notice h2 { margin: 0; color: var(--brand-ink); font-size: 1rem; font-weight: 820; }
.pilot-notice p { margin: 0; color: var(--muted); font-size: .85rem; line-height: 1.65; }
.rating-scale-help { display: flex; justify-content: space-between; gap: 1rem; margin: .55rem 0 0; color: var(--muted); font-size: .75rem; }
#feedback-section { scroll-margin-top: 6rem; }

.summary-strip, .report-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.summary-label { margin: 0 0 .15rem; color: var(--muted); font-size: .73rem; font-weight: 700; }
.summary-value { margin: 0; color: var(--brand-ink); font-size: .95rem; font-weight: 800; overflow-wrap: anywhere; }

.result-hero {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  background: #111;
  padding: 1.75rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .18);
}
.result-hero::after { content: ""; position: absolute; top: -6rem; right: -5rem; width: 14rem; height: 14rem; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; box-shadow: 0 0 0 2rem rgba(255,255,255,.04), 0 0 0 4rem rgba(255,255,255,.03); }
.result-pill { display: inline-flex; min-height: 2rem; align-items: center; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; background: rgba(255,255,255,.12); padding: .25rem .75rem; color: #fff; font-size: .78rem; font-weight: 700; }

/* 좌표를 노출하지 않는 10모듈 메이크업 계획 */
.makeup-plan-card, .report-makeup-plan {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.report-makeup-plan { margin-top: 1.5rem; }
.makeup-plan-header { display: flex; flex-direction: column; gap: 1rem; }
.makeup-plan-header h2, .makeup-plan-header h3 { margin: 0; color: var(--brand-ink); font-weight: 850; line-height: 1.35; }
.makeup-plan-header h2 { font-size: 1.35rem; }
.makeup-plan-policy { max-width: 44rem; margin: .45rem 0 0; color: var(--muted); font-size: .85rem; line-height: 1.65; }
.makeup-plan-count {
  display: inline-grid;
  min-width: 3.5rem;
  min-height: 2.35rem;
  align-self: flex-start;
  place-items: center;
  border: 1px solid var(--inverse);
  border-radius: 999px;
  background: var(--inverse);
  color: var(--inverse-on);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .78rem;
  font-weight: 850;
}
.makeup-plan-gradient-key { width: min(100%, 12rem); flex: 0 0 auto; border: 1px solid var(--line); border-radius: .6rem; background: var(--surface); padding: .5rem; }
.makeup-plan-gradient-key span, .makeup-plan-gradient-visual span {
  display: block;
  height: 1.15rem;
  border: 1px solid #bcbcb7;
  border-radius: 999px;
  background: linear-gradient(90deg, #111 0%, #555 34%, #aaa 66%, #f4f4f1 100%);
}
.makeup-plan-hash-row {
  display: grid;
  gap: .3rem;
  margin-top: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.makeup-plan-hash-row span { color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .04em; }
.makeup-plan-hash-row code, .makeup-plan-provenance dd {
  color: var(--brand-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .72rem;
  overflow-wrap: anywhere;
}
.makeup-plan-provenance {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 1.25rem 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: .7rem;
}
.makeup-plan-provenance > div { min-width: 0; border-bottom: 1px solid var(--line); padding: .8rem .9rem; }
.makeup-plan-provenance > div:last-child { border-bottom: 0; }
.makeup-plan-provenance dt { color: var(--muted); font-size: .7rem; }
.makeup-plan-provenance dd { margin: .25rem 0 0; }
.makeup-plan-notices {
  margin-top: 1rem;
  border-left: 3px solid #111;
  background: var(--surface-2);
  padding: .9rem 1rem;
}
.makeup-plan-notices h3 { margin: 0 0 .45rem; color: var(--brand-ink); font-size: .82rem; font-weight: 850; }
.makeup-plan-modules { display: grid; gap: 1rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.makeup-plan-modules > li, .makeup-plan-module {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: .8rem;
  background: var(--surface);
  padding: 1rem;
}
.makeup-plan-module.is-hold, .makeup-plan-module[data-status="hold"], .makeup-plan-module[data-status="abstain"] { border-color: #d6bc87; background: #fffaf0; }
.makeup-plan-module-header {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: .75rem;
  align-items: start;
}
.makeup-plan-module-order {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: .55rem;
  background: var(--inverse);
  color: var(--inverse-on);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .75rem;
  font-weight: 850;
}
.makeup-plan-module-id { margin: 0; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .65rem; overflow-wrap: anywhere; }
.makeup-plan-module-header h3 { margin: .2rem 0 0; color: var(--brand-ink); font-size: 1rem; font-weight: 850; line-height: 1.4; }
.makeup-plan-module-status {
  grid-column: 2;
  justify-self: start;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .25rem .55rem;
  color: var(--brand-ink);
  font-size: .66rem;
  font-weight: 850;
  line-height: 1.2;
}
.is-hold .makeup-plan-module-status, [data-status="hold"] .makeup-plan-module-status, [data-status="abstain"] .makeup-plan-module-status { border-color: #c89c44; background: #fff1c8; color: #67420a; }
.makeup-plan-region { display: flex; flex-wrap: wrap; gap: .35rem .65rem; margin: .9rem 0 0; border-top: 1px solid var(--line); padding-top: .75rem; font-size: .75rem; }
.makeup-plan-region span { color: var(--muted); }
.makeup-plan-region strong { color: var(--brand-ink); overflow-wrap: anywhere; }
.makeup-plan-field-grid { display: grid; grid-template-columns: 1fr; gap: .7rem; margin-top: .85rem; }
.makeup-plan-field { min-width: 0; border: 1px solid var(--line); border-radius: .65rem; background: var(--surface-2); padding: .8rem; color: var(--ink); font-size: .78rem; line-height: 1.55; overflow-wrap: anywhere; }
.makeup-plan-field h4 { margin: 0 0 .45rem; color: var(--brand-ink); font-size: .73rem; font-weight: 900; letter-spacing: .025em; }
.makeup-plan-gradient-visual { margin-bottom: .55rem; border-radius: 999px; }
.makeup-plan-value-list { display: grid; gap: .25rem; margin: 0; padding-left: 1rem; list-style: disc; }
.makeup-plan-nested-list { display: grid; gap: .35rem; margin: 0; }
.makeup-plan-nested-list > div { display: grid; grid-template-columns: minmax(4.5rem, .65fr) minmax(0, 1.35fr); gap: .5rem; }
.makeup-plan-nested-list dt { color: var(--muted); font-size: .7rem; }
.makeup-plan-nested-list dd { min-width: 0; margin: 0; color: var(--brand-ink); font-weight: 700; }
.makeup-plan-evidence-type { margin: .55rem 0 0; border-top: 1px solid var(--line); padding-top: .5rem; color: var(--muted); font-size: .72rem; }
.makeup-plan-evidence-type strong { color: var(--brand-ink); }
.makeup-plan-hold-reason { margin-top: .85rem; border: 1px solid #d6bc87; border-radius: .65rem; background: #fff4d8; padding: .8rem; color: #67420a; }
.makeup-plan-hold-reason strong { font-size: .74rem; }
.makeup-plan-hold-reason p { margin: .25rem 0 0; font-size: .78rem; line-height: 1.55; }
.makeup-plan-empty-value { color: var(--muted); font-style: italic; }
.makeup-plan-empty { margin: 1rem 0 0; border: 1px solid #d6bc87; border-radius: .65rem; background: #fffaf0; padding: .9rem; color: #67420a; font-size: .82rem; }

.uncertainty-card {
  border: 1px solid #d3c8ee;
  border-radius: 1rem;
  background: #f8f5ff;
  padding: 1.25rem;
  overflow-wrap: anywhere;
}
.report-sheet > .uncertainty-card { margin-top: 1.5rem; }
.uncertainty-card.needs-clarification { border-color: #e2bf79; background: #fff8e8; }
.uncertainty-card.is-confirmed { border-color: #a9d8c3; background: #eef9f4; }
.uncertainty-status { margin: 0; color: var(--brand-dark); font-size: .72rem; font-weight: 900; letter-spacing: .08em; }
.uncertainty-card.needs-clarification .uncertainty-status { color: var(--warning); }
.uncertainty-card.is-confirmed .uncertainty-status { color: var(--success); }
.uncertainty-heading { margin: .35rem 0 0; color: var(--brand-ink); font-size: 1.2rem; font-weight: 850; line-height: 1.35; }
.uncertainty-summary { margin: .45rem 0 0; color: var(--muted); font-size: .88rem; line-height: 1.6; }
.uncertainty-question-wrap { margin-top: 1rem; border-top: 1px solid rgba(138, 86, 0, .22); padding-top: 1rem; }
.uncertainty-kicker { margin: 0; color: var(--warning); font-size: .72rem; font-weight: 850; }
.uncertainty-question { margin: .3rem 0 0; color: var(--brand-ink); font-size: 1rem; font-weight: 800; line-height: 1.5; }
.uncertainty-choices { display: grid; grid-template-columns: 1fr; gap: .55rem; margin: .85rem 0 0; padding: 0; list-style: none; }
.uncertainty-choice { border: 1px solid #d8c79f; border-radius: .7rem; background: rgba(255,255,255,.78); padding: .65rem .75rem; color: var(--ink); font-size: .84rem; font-weight: 750; text-align: center; }
.uncertainty-affected, .uncertainty-action { margin: .75rem 0 0; color: var(--muted); font-size: .78rem; line-height: 1.55; }
.uncertainty-affected strong { color: var(--brand-ink); }
.instruction-pending { display: inline-flex; align-items: center; border: 1px solid #d5ad5c; border-radius: .45rem; background: #fff2cd; padding: .1rem .42rem; color: #704600; font-size: .78rem; font-weight: 850; line-height: 1.4; }
.detail-list > .is-uncertain, .report-grid-list > .is-uncertain { background: #fffaf0; }
.detail-list { display: grid; gap: .75rem; }
.detail-list > div { display: grid; grid-template-columns: minmax(5.5rem, .8fr) 1.2fr; gap: 1rem; border-bottom: 1px solid var(--surface-2); padding-bottom: .75rem; }
.detail-list > div:last-child { border-bottom: 0; padding-bottom: 0; }
.detail-list dt { color: var(--muted); font-size: .82rem; }
.detail-list dd { margin: 0; color: var(--brand-ink); font-size: .9rem; font-weight: 700; }
.result-list { display: grid; gap: .65rem; margin: 0; padding: 0; list-style: none; }
.result-list li { position: relative; padding-left: 1.25rem; color: var(--ink); font-size: .9rem; line-height: 1.55; }
.result-list li::before { content: ""; position: absolute; top: .65rem; left: 0; width: .42rem; height: .42rem; border-radius: 50%; background: var(--brand); }
.result-list:empty::after { content: "기록된 항목이 없습니다."; color: var(--muted); font-size: .85rem; }
.step-list { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.step-list li { position: relative; display: grid; grid-template-columns: 2.25rem 1fr; gap: .85rem; min-width: 0; }
.step-list li::before { counter-increment: step; content: counter(step); display: grid; width: 2.25rem; height: 2.25rem; place-items: center; border-radius: .75rem; background: var(--brand-soft); color: var(--brand-dark); font-size: .82rem; font-weight: 900; }
.step-list h4 { margin: 0; color: var(--brand-ink); font-size: .98rem; font-weight: 800; }
.step-list p { margin: .25rem 0 0; color: var(--muted); font-size: .85rem; line-height: 1.55; }
.step-stop { color: var(--brand-dark) !important; font-weight: 700; }
.action-bar { position: sticky; bottom: calc(.75rem + env(safe-area-inset-bottom)); z-index: 20; display: flex; flex-direction: column; gap: .65rem; border: 1px solid rgba(216,216,212,.92); border-radius: .7rem; background: rgba(255,255,255,.95); padding: .75rem; box-shadow: 0 12px 35px rgba(0,0,0,.13); backdrop-filter: blur(12px); }
.action-bar .btn { min-height: 48px; }

.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; padding: 0 0 1.25rem 1.5rem; }
.timeline li::before { content: ""; position: absolute; top: .5rem; bottom: -.25rem; left: .3rem; width: 1px; background: var(--line); }
.timeline li::after { content: ""; position: absolute; top: .45rem; left: 0; width: .65rem; height: .65rem; border: 2px solid var(--brand); border-radius: 50%; background: var(--surface); }
.timeline li:last-child::before { display: none; }
.history-title { color: var(--brand-ink); font-size: .9rem; font-weight: 800; }
.history-detail { margin: .2rem 0; color: var(--ink); font-size: .8rem; line-height: 1.5; overflow-wrap: anywhere; }
.history-meta { color: var(--muted); font-size: .75rem; }
.empty-copy, .empty-state { color: var(--muted); text-align: center; }
.empty-state { border: 1px dashed var(--line); border-radius: .9rem; padding: 2rem 1rem; }
.rating-fieldset { border: 1px solid var(--line); border-radius: .9rem; padding: 1rem; }
.rating-fieldset legend { padding-inline: .4rem; color: var(--brand-ink); font-size: .9rem; font-weight: 800; }
.rating-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; }
.rating-row label { position: relative; cursor: pointer; }
.rating-row input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.rating-row span { display: grid; min-height: 2.75rem; place-items: center; border: 1px solid var(--line); border-radius: .55rem; font-size: .85rem; font-weight: 800; }
.rating-row input:checked + span { border-color: var(--brand); background: var(--brand); color: var(--brand-on); }
.rating-row input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.photo-record-list { display: grid; gap: .8rem; margin: 0; padding: 0; list-style: none; }
.photo-record { min-width: 0; border: 1px solid var(--line); border-radius: .9rem; background: var(--surface-2); padding: 1rem; }
.photo-record-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.photo-record-header h4 { min-width: 0; margin: 0; color: var(--brand-ink); font-size: .98rem; font-weight: 800; }
.photo-delete-button { min-height: 2.75rem; flex: 0 0 auto; }
.photo-record-meta { display: grid; grid-template-columns: minmax(0, 1fr); gap: .7rem; margin: .9rem 0 0; }
.photo-record-meta div { min-width: 0; }
.photo-record-meta dt { color: var(--muted); font-size: .72rem; font-weight: 700; }
.photo-record-meta dd { margin: .18rem 0 0; color: var(--ink); font-size: .82rem; overflow-wrap: anywhere; }
.photo-danger-zone { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: center; border-top: 1px solid #edc5cd; padding-top: 1.25rem; }
.photo-danger-zone .btn { min-height: 48px; width: 100%; white-space: normal; }

.admin-queue-list { display: grid; gap: .65rem; margin: 0; padding: 0; list-style: none; }
.admin-queue-item {
  display: flex;
  width: 100%;
  min-height: 4.75rem;
  min-width: 0;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
  border: 1px solid var(--line);
  border-radius: .9rem;
  background: var(--surface-2);
  padding: .9rem 1rem;
  color: inherit;
  text-align: left;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}
.admin-queue-item:hover { border-color: #999; background: var(--surface); }
.admin-queue-item:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.admin-queue-item.is-selected { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.admin-queue-main { display: grid; min-width: 0; gap: .3rem; }
.admin-queue-id { color: var(--brand-ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; font-weight: 800; overflow-wrap: anywhere; }
.admin-queue-meta { color: var(--muted); font-size: .75rem; line-height: 1.4; overflow-wrap: anywhere; }
.admin-queue-item > .badge { flex: 0 0 auto; }

.photo-card { overflow: hidden; border: 1px solid var(--line); border-radius: .9rem; background: var(--surface-2); }
.photo-card img { display: block; width: 100%; aspect-ratio: 4 / 3; background: #e5e5e2; object-fit: contain; }
.photo-card figcaption { padding: .75rem; color: var(--muted); font-size: .75rem; overflow-wrap: anywhere; }
.observation-item { border-left: 3px solid var(--brand); border-radius: 0 .7rem .7rem 0; background: var(--surface-2); padding: .9rem 1rem; }
.observation-item p { margin: 0; font-size: .88rem; }
.observation-item time { display: block; margin-top: .35rem; color: var(--muted); font-size: .72rem; }

/* 서비스 플랜·주문 포털 */
.commerce-shell { width: min(100%, 68rem); margin-inline: auto; }
.commerce-heading { margin-bottom: 2rem; }
.commerce-heading h1 { margin: .65rem 0 0; color: var(--brand-ink); font-size: clamp(2.45rem, 7vw, 4.6rem); font-weight: 900; line-height: 1.03; letter-spacing: -.055em; }
.commerce-heading p { max-width: 44rem; margin: 1rem 0 0; color: var(--muted); line-height: 1.75; }
.commerce-progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0 0 2rem; padding: 0; border-block: 1px solid var(--line); list-style: none; }
.commerce-progress li { position: relative; display: grid; gap: .35rem; padding: .9rem .25rem; color: #999; text-align: center; }
.commerce-progress li + li { border-left: 1px solid var(--line); }
.commerce-progress span { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .65rem; }
.commerce-progress strong { font-size: clamp(.68rem, 2.5vw, .8rem); font-weight: 750; }
.commerce-progress .is-current { background: var(--inverse); color: var(--inverse-on); }
.offer-fieldset { min-width: 0; margin: 0; border: 0; padding: 0; }
.offer-grid { display: grid; grid-template-columns: 1fr; gap: .75rem; }
.offer-card { position: relative; min-width: 0; cursor: pointer; }
.offer-card > input { position: absolute; top: 1.25rem; right: 1.25rem; z-index: 2; width: 1.2rem; height: 1.2rem; accent-color: var(--brand); }
.offer-card-body { display: grid; min-height: 100%; gap: .75rem; border: 1px solid var(--line); border-radius: .7rem; background: var(--surface); padding: 1.25rem; box-shadow: var(--shadow-soft); transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease; }
.offer-card:hover .offer-card-body { border-color: #777; }
.offer-card > input:focus-visible + .offer-card-body { outline: 3px solid var(--focus); outline-offset: 3px; }
.offer-card > input:checked + .offer-card-body { border-color: var(--inverse); background: var(--inverse); color: var(--inverse-on); box-shadow: none; }
.offer-card-topline { display: flex; min-height: 1.7rem; align-items: center; justify-content: space-between; gap: .75rem; padding-right: 2rem; }
.offer-code { color: #999; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .7rem; }
.offer-name { color: var(--brand-ink); font-size: 1rem; font-weight: 850; }
.offer-price { display: flex; align-items: baseline; color: var(--brand-ink); line-height: 1; }
.offer-price strong { font-size: 2.2rem; letter-spacing: -.045em; }
.offer-price > span { margin-left: .15rem; font-size: .85rem; font-weight: 700; }
.offer-meta { display: flex; flex-wrap: wrap; gap: .25rem; color: var(--muted); font-size: .78rem; }
.offer-rule { height: 1px; margin-block: .2rem; background: var(--line); }
.offer-card-body ul { display: grid; gap: .45rem; margin: 0; padding: 0; color: var(--muted); font-size: .82rem; list-style: none; }
.offer-card-body li { position: relative; padding-left: 1.15rem; }
.offer-card-body li::before { content: ""; position: absolute; top: .63rem; left: 0; width: .35rem; height: .35rem; border-radius: 50%; background: #111; }
.offer-select-label { margin-top: auto; padding-top: .5rem; color: var(--brand-ink); font-size: .78rem; font-weight: 850; }
.offer-card > input:checked + .offer-card-body .offer-name,
.offer-card > input:checked + .offer-card-body .offer-price,
.offer-card > input:checked + .offer-card-body .offer-select-label { color: var(--inverse-on); }
.offer-card > input:checked + .offer-card-body .offer-meta,
.offer-card > input:checked + .offer-card-body ul,
.offer-card > input:checked + .offer-card-body .offer-code { color: rgba(255, 255, 255, .62); }
.offer-card > input:checked + .offer-card-body .offer-rule { background: rgba(255, 255, 255, .16); }
.offer-card > input:checked + .offer-card-body li::before { background: var(--inverse-on); }
.commerce-checkout-note { display: flex; gap: .85rem; margin-top: 1rem; border: 1px solid var(--line); border-radius: .6rem; background: var(--surface-2); padding: 1rem; }
.checkout-note-icon { display: grid; width: 1.55rem; height: 1.55rem; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--inverse); color: var(--inverse-on); font-size: .72rem; font-weight: 900; }
.commerce-checkout-note strong { color: var(--brand-ink); font-size: .84rem; }
.commerce-checkout-note p { margin: .25rem 0 0; color: var(--muted); font-size: .78rem; line-height: 1.6; }
.commerce-submit { min-height: 3.35rem; width: 100%; margin-top: .75rem; }
.plan-comparison { display: grid; gap: 1.5rem; margin-top: 4rem; border-block: 1px solid var(--line); padding-block: 2.5rem; }
.plan-comparison h2 { margin: .6rem 0 0; color: var(--brand-ink); font-size: clamp(1.8rem, 5vw, 2.7rem); letter-spacing: -.04em; }
.plan-comparison ul { display: grid; gap: 0; margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.plan-comparison li { display: grid; gap: .2rem; border-bottom: 1px solid var(--line); padding: .85rem 0; }
.plan-comparison li strong { color: var(--brand-ink); font-size: .84rem; }
.plan-comparison li span { color: var(--muted); font-size: .78rem; }
.commerce-note { margin-top: 2rem; border: 1px solid var(--line); border-radius: .65rem; background: var(--surface); padding: 1.15rem; color: var(--muted); line-height: 1.65; }
.commerce-note strong { color: var(--brand-ink); }
.commerce-note p { margin: .35rem 0 0; font-size: .84rem; }
.commerce-note a { display: inline-flex; min-height: 2.75rem; margin-top: .75rem; align-items: center; color: var(--brand-ink); font-size: .82rem; font-weight: 850; text-underline-offset: .2rem; }
.commerce-note-minimal { border-width: 1px 0 0; border-radius: 0; background: transparent; padding: 1.25rem 0 0; }
.commerce-note-minimal a { margin-top: 0; }
.order-card { border: 1px solid var(--line); border-radius: .7rem; background: var(--surface); padding: 1.25rem; box-shadow: var(--shadow); }
.order-status-line { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding-bottom: 1.15rem; }
.order-status-line h2 { margin: .35rem 0 0; color: var(--brand-ink); font-size: 1.75rem; letter-spacing: -.03em; }
.order-next-action { margin-top: 1.25rem; border-left: 3px solid #111; background: var(--surface-2); padding: .9rem 1rem; }
.order-next-action > span { color: var(--muted); font-size: .68rem; font-weight: 850; letter-spacing: .08em; }
.order-guidance { margin: .25rem 0 0; color: var(--brand-ink); font-size: .9rem; font-weight: 750; line-height: 1.6; }
.order-details { display: grid; grid-template-columns: 1fr; gap: 0; margin: 1.25rem 0 0; border: 1px solid var(--line); overflow: hidden; }
.order-details > div { padding: .9rem 1rem; border-bottom: 1px solid var(--line); }
.order-details > div:last-child { border-bottom: 0; }
.order-details dt { color: var(--muted); font-size: .72rem; }
.order-details dd { margin: .25rem 0 0; color: var(--brand-ink); font-weight: 750; overflow-wrap: anywhere; }
.order-actions { display: flex; flex-direction: column; gap: .65rem; margin-top: 1.25rem; }
.order-security-note { display: flex; align-items: center; gap: 1rem; margin-top: 1.25rem; border: 1px solid var(--line); padding: 1rem; }
.order-security-note img { width: 3.25rem; height: 3.25rem; flex: 0 0 auto; }
.order-security-note strong { color: var(--brand-ink); font-size: .86rem; }
.order-security-note p { margin: .25rem 0 0; color: var(--muted); font-size: .75rem; line-height: 1.55; }
.admin-order-access, .admin-order-controls { display: grid; grid-template-columns: 1fr; gap: .75rem; }
.admin-order-access { margin-bottom: 1.25rem; border: 1px solid var(--line); border-radius: .9rem; background: var(--surface); padding: 1rem; }
.admin-order-access label { color: var(--brand-ink); font-weight: 700; }
.admin-order-list { display: grid; gap: .75rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.admin-order-item { display: grid; gap: 1rem; border: 1px solid var(--line); border-radius: .9rem; background: var(--surface); padding: 1rem; }
.admin-order-item p { margin: .3rem 0 0; color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }

/* 전달 리포트 */
.report-sheet { max-width: 56rem; margin-inline: auto; border: 1px solid var(--line); border-radius: 1.25rem; background: var(--surface); padding: 1.5rem; box-shadow: var(--shadow); }
.report-header { display: grid; grid-template-columns: 1fr; gap: 1.5rem; border-bottom: 1px solid var(--line); padding-bottom: 1.5rem; }
.report-meta { display: grid; gap: .65rem; margin: 0; }
.report-meta div { display: grid; grid-template-columns: 5rem 1fr; gap: .75rem; }
.report-meta dt { color: var(--muted); font-size: .75rem; }
.report-meta dd { margin: 0; color: var(--brand-ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .75rem; overflow-wrap: anywhere; }
.report-summary { margin-top: 1.5rem; box-shadow: none; }
.report-callout { margin-top: 1.5rem; border: 1px solid var(--line); border-radius: .7rem; background: var(--brand-soft); padding: 1.25rem; }
.report-section { margin-top: 1.5rem; border-top: 1px solid var(--line); padding-top: 1.5rem; }
.report-section-heading { display: flex; align-items: center; gap: .75rem; }
.report-section-heading > span { display: grid; width: 2rem; height: 2rem; flex: 0 0 auto; place-items: center; border-radius: .65rem; background: var(--brand-soft); color: var(--brand-dark); font-size: .7rem; font-weight: 900; }
.report-section-heading h2 { margin: 0; color: var(--brand-ink); font-size: 1.2rem; font-weight: 800; }
.report-grid-list { display: grid; grid-template-columns: 1fr; gap: 0; margin: 1.1rem 0 0; border: 1px solid var(--line); border-radius: .8rem; overflow: hidden; }
.report-grid-list > div { border-bottom: 1px solid var(--line); padding: .85rem 1rem; }
.report-grid-list > div:last-child { border-bottom: 0; }
.report-grid-list dt { color: var(--muted); font-size: .72rem; }
.report-grid-list dd { margin: .2rem 0 0; color: var(--brand-ink); font-size: .9rem; font-weight: 700; }
.report-steps { display: grid; gap: .75rem; margin: 1.1rem 0 0; padding: 0; list-style: none; }
.report-steps li { display: grid; grid-template-columns: 2rem 1fr auto; gap: .75rem; align-items: start; border: 1px solid var(--line); border-radius: .8rem; padding: .9rem; }
.report-step-number { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: .65rem; background: var(--brand); color: var(--brand-on); font-size: .78rem; font-weight: 900; }
.report-steps h3 { margin: 0; color: var(--brand-ink); font-size: .95rem; }
.report-steps p { margin: .25rem 0 0; color: var(--muted); font-size: .8rem; }
.report-steps .report-stop { color: var(--brand-dark); font-weight: 700; }
.report-minutes { color: var(--muted); font-size: .72rem; white-space: nowrap; }
.report-two-column { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.report-bullets { display: grid; gap: .55rem; margin: 1rem 0 0; padding-left: 1.2rem; font-size: .88rem; }
.report-notes { margin-top: 1.5rem; border-radius: .9rem; background: #fff7e6; padding: 1.2rem; }
.report-notes h2 { margin: 0; color: var(--brand-ink); font-size: 1rem; font-weight: 800; }
.report-notes ul { margin: .65rem 0 0; padding-left: 1.2rem; font-size: .82rem; }
.report-feedback { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1.5rem; border-radius: 1rem; background: var(--surface-2); padding: 1.25rem; }
.report-feedback ol { margin: 0; padding-left: 1.2rem; font-size: .85rem; }
.report-proof { margin-top: 1.5rem; border-top: 1px solid var(--line); padding-top: 1rem; color: var(--muted); font-size: .72rem; }
.avoid-break { break-inside: avoid; }

/* 화면 설정: 로컬 고정 자산만으로 동작하는 BLACK ROSE 다크 테마 */
html[data-theme="dark"] {
  --p: 92% 0 0;
  --pc: 15% 0 0;
  --b1: 16% 0 0;
  --b2: 12% 0 0;
  --b3: 24% 0 0;
  --bc: 92% 0 0;
  --brand: #f1f1ef;
  --brand-on: #111111;
  --brand-dark: #dededb;
  --brand-ink: #f4f4f2;
  --brand-soft: #292927;
  --coral: #c8c8c4;
  --page: #101010;
  --surface: #191919;
  --surface-2: #242424;
  --line: #3b3b38;
  --ink: #ededeb;
  --muted: #aaa9a5;
  --danger: #ff9da8;
  --warning: #f0c676;
  --success: #7dd3a5;
  --focus: #ffffff;
  --inverse: #f1f1ef;
  --inverse-on: #111111;
  --shadow: 0 14px 38px rgba(0, 0, 0, .34);
  --shadow-soft: 0 7px 22px rgba(0, 0, 0, .24);
  color-scheme: dark;
}

html[data-theme="dark"] .site-header {
  border-bottom-color: rgba(59, 59, 56, .92);
  background: rgba(16, 16, 16, .92);
}
html[data-theme="dark"] .brand-mark,
html[data-theme="dark"] .hero-rose-logo {
  border-color: #d8d8d4;
  background: #ffffff;
}
html[data-theme="dark"] .brand-mark img,
html[data-theme="dark"] .hero-rose-logo img {
  filter: none !important;
  opacity: 1 !important;
  mix-blend-mode: normal !important;
}
html[data-theme="dark"] .btn-primary:hover {
  border-color: #d7d7d3;
  background: #d7d7d3;
}
html[data-theme="dark"] .input::placeholder,
html[data-theme="dark"] .textarea::placeholder { color: #7f7f7b; }
html[data-theme="dark"] .input:focus,
html[data-theme="dark"] .select:focus,
html[data-theme="dark"] .textarea:focus,
html[data-theme="dark"] .file-input:focus { outline-color: rgba(255, 255, 255, .18); }
html[data-theme="dark"] .alert-error { border-color: #6f3942; background: #321a1f; color: #ffb8c1; }
html[data-theme="dark"] .alert-warning { border-color: #72592e; background: #302616; color: #f6d797; }
html[data-theme="dark"] .alert-success { border-color: #32634a; background: #172c22; color: #9be2bb; }
html[data-theme="dark"] .badge-success { border-color: #32634a; background: #172c22; color: #9be2bb; }
html[data-theme="dark"] .badge-warning { border-color: #72592e; background: #302616; color: #f6d797; }
html[data-theme="dark"] .badge-error { border-color: #6f3942; background: #321a1f; color: #ffb8c1; }
html[data-theme="dark"] .skeleton,
html[data-theme="dark"] .photo-card img { background: #30302e; }
html[data-theme="dark"] .skeleton::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent); }
html[data-theme="dark"] .capture-direction-note { border-left-color: var(--brand); background: #20201f; }
html[data-theme="dark"] .capture-slot-frame { background: #292927; }
html[data-theme="dark"] .capture-slot-frame > span { color: #aaa9a5; }
html[data-theme="dark"] .capture-slot-frame strong,
html[data-theme="dark"] .capture-slot.has-photo .capture-slot-status { color: var(--brand-ink); }
html[data-theme="dark"] .mood-model-badge { border-color: var(--line); color: var(--brand-ink); }
html[data-theme="dark"] .mood-suggestion-state,
html[data-theme="dark"] .mood-suggestion-error { background: #20201f; }
html[data-theme="dark"] .loading-spinner { border-color: #666662; border-top-color: #f1f1ef; }
html[data-theme="dark"] .plan-preview-card.is-featured .plan-badge { background: #111; color: #fff; }
html[data-theme="dark"] .plan-preview-card.is-featured .plan-scope { color: rgba(17, 17, 17, .62); }
html[data-theme="dark"] .landing-final-cta { border-color: var(--line); }
html[data-theme="dark"] .action-bar {
  border-color: rgba(59, 59, 56, .95);
  background: rgba(25, 25, 25, .95);
}
html[data-theme="dark"] .makeup-plan-module.is-hold,
html[data-theme="dark"] .makeup-plan-module[data-status="hold"],
html[data-theme="dark"] .makeup-plan-module[data-status="abstain"],
html[data-theme="dark"] .makeup-plan-empty { border-color: #71592d; background: #2b2418; color: #f3d496; }
html[data-theme="dark"] .is-hold .makeup-plan-module-status,
html[data-theme="dark"] [data-status="hold"] .makeup-plan-module-status,
html[data-theme="dark"] [data-status="abstain"] .makeup-plan-module-status,
html[data-theme="dark"] .instruction-pending { border-color: #80652f; background: #352a17; color: #f6d797; }
html[data-theme="dark"] .makeup-plan-hold-reason { border-color: #71592d; background: #302718; color: #f3d496; }
html[data-theme="dark"] .uncertainty-card { border-color: #4c435f; background: #24212b; }
html[data-theme="dark"] .uncertainty-card.needs-clarification { border-color: #72592e; background: #302616; }
html[data-theme="dark"] .uncertainty-card.is-confirmed { border-color: #32634a; background: #172c22; }
html[data-theme="dark"] .uncertainty-choice { border-color: var(--line); background: var(--surface); color: var(--ink); }
html[data-theme="dark"] .detail-list > .is-uncertain,
html[data-theme="dark"] .report-grid-list > .is-uncertain,
html[data-theme="dark"] .report-notes { background: #302718; }
html[data-theme="dark"] .offer-card > input:checked + .offer-card-body .offer-name,
html[data-theme="dark"] .offer-card > input:checked + .offer-card-body .offer-price,
html[data-theme="dark"] .offer-card > input:checked + .offer-card-body .offer-select-label { color: var(--inverse-on); }
html[data-theme="dark"] .offer-card > input:checked + .offer-card-body .offer-meta,
html[data-theme="dark"] .offer-card > input:checked + .offer-card-body ul,
html[data-theme="dark"] .offer-card > input:checked + .offer-card-body .offer-code { color: rgba(17, 17, 17, .66); }
html[data-theme="dark"] .offer-card > input:checked + .offer-card-body .offer-rule { background: rgba(17, 17, 17, .18); }

/* 휴대폰 전용 조작 계층: 같은 디자인을 짧은 화면·터치·노치에 맞춘다. */
@media (max-width: 639px) {
  #main-content {
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-bottom: calc(2.5rem + env(safe-area-inset-bottom));
    padding-left: max(1rem, env(safe-area-inset-left));
  }
  .site-nav {
    min-height: 4.25rem;
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-left: max(1rem, env(safe-area-inset-left));
  }
  .site-footer-inner {
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-bottom: calc(2.25rem + env(safe-area-inset-bottom));
    padding-left: max(1rem, env(safe-area-inset-left));
  }
  .input, .select, .textarea, .file-input { font-size: 1rem; }
  .landing-page, .landing-minimal { gap: 4rem; }
  .landing-hero-copy { padding: 2rem 1.15rem 0; }
  .landing-hero h1 { font-size: clamp(2.45rem, 12vw, 3.2rem); }
  .hero-visual { min-height: 26rem; }

  .capture-swipe-hint {
    display: inline-flex;
    margin-left: auto;
    color: var(--muted);
    font-size: .68rem;
    font-weight: 700;
  }
  .capture-slot-grid {
    grid-template-columns: none;
    grid-auto-columns: min(78%, 14rem);
    grid-auto-flow: column;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: .15rem .1rem .65rem;
    scroll-padding-inline: .1rem;
    scroll-snap-type: inline mandatory;
    scrollbar-color: var(--line) transparent;
    scrollbar-width: thin;
  }
  .capture-slot { scroll-snap-align: center; }
  .capture-slot:active { transform: scale(.985); }
  #photo-section, #questionnaire-stage, #form-errors { scroll-margin-top: calc(5.25rem + env(safe-area-inset-top)); }
  .mobile-flow-action { min-height: 3.25rem; border-radius: .65rem; }

  .mobile-swipe-hint {
    display: flex;
    min-height: 2.75rem;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 750;
  }
  .mobile-swipe-hint::after { content: "→"; color: var(--brand-ink); font-size: 1rem; }
  .offer-grid, .plan-preview-grid {
    grid-template-columns: none;
    grid-auto-columns: min(86%, 20rem);
    grid-auto-flow: column;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: .15rem .1rem .75rem;
    scroll-padding-inline: .1rem;
    scroll-snap-type: inline mandatory;
    scrollbar-color: var(--line) transparent;
    scrollbar-width: thin;
  }
  .offer-card, .plan-preview-card { scroll-snap-align: center; }

  .action-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    bottom: calc(.5rem + env(safe-area-inset-bottom));
    gap: .5rem;
    padding: .65rem;
    padding-bottom: max(.65rem, env(safe-area-inset-bottom));
  }
  .action-bar #feedback-cta { grid-column: 1 / -1; }
  .action-bar:not(:has(#next-recommendation:not(.hidden))) #report-download { grid-column: 1 / -1; }
  .action-bar .btn { min-width: 0; padding-inline: .65rem; white-space: normal; }

  .report-sheet { border-inline: 0; border-radius: .75rem; padding: 1rem; }
  .makeup-plan-card, .report-makeup-plan { padding: 1rem; }
  .report-steps li { grid-template-columns: 2rem minmax(0, 1fr); }
  .report-minutes { grid-column: 2; white-space: normal; }
  .detail-list > div { grid-template-columns: 1fr; gap: .25rem; }
  .order-status-line, .photo-record-header { flex-wrap: wrap; }
  .order-actions .btn { width: 100%; }
}

@media (min-width: 640px) {
  .makeup-plan-header { flex-direction: row; align-items: flex-start; justify-content: space-between; }
  .makeup-plan-module-header { grid-template-columns: 2.25rem minmax(0, 1fr) auto; }
  .makeup-plan-module-status { grid-column: auto; justify-self: end; }
  .makeup-plan-provenance { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .makeup-plan-provenance > div { border-right: 1px solid var(--line); border-bottom: 0; }
  .makeup-plan-provenance > div:last-child { border-right: 0; }
  .offer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .order-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-details > div { border-right: 1px solid var(--line); }
  .order-actions { flex-direction: row; flex-wrap: wrap; }
  .admin-order-access { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .admin-order-access label { grid-column: 1 / -1; }
  .admin-order-item { grid-template-columns: minmax(0, 1fr) minmax(18rem, .8fr); align-items: center; }
  .admin-order-controls { grid-template-columns: minmax(0, 1fr) auto; }
  .landing-actions { flex-direction: row; }
  .landing-proof-strip, .landing-output-grid, .plan-preview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .minimal-principles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .landing-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .privacy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .landing-evaluation { grid-template-columns: minmax(0, 1.2fr) minmax(16rem, .8fr); padding: 2.25rem; }
  .landing-final-cta { padding: 3rem 2rem; }
  .landing-final-actions { flex-direction: row; }
  .plan-preview-action { flex-direction: row; align-items: center; }
  .choice-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mood-keyword-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .summary-strip, .report-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .summary-strip > div + div, .report-summary > div + div { border-left: 1px solid var(--line); padding-left: 1rem; }
  .action-bar { flex-direction: row; }
  .photo-record-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-danger-zone { grid-template-columns: minmax(0, 1fr) auto; }
  .photo-danger-zone .btn { width: auto; max-width: 16rem; }
  .stacked-options.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .report-sheet { padding: 2.25rem; }
  .report-header { grid-template-columns: minmax(0, 1fr) minmax(14rem, .35fr); }
  .report-grid-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-grid-list > div { border-right: 1px solid var(--line); }
  .report-two-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-feedback { grid-template-columns: 1fr 1fr; }
  .uncertainty-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .makeup-plan-card, .report-makeup-plan { padding: 2rem; }
  .makeup-plan-field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-nav { padding-inline: 1.5rem; }
  .site-nav-links { display: flex; }
  .site-footer-inner { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); padding: 2.5rem 1.5rem; }
  .site-footer-notice { justify-self: end; text-align: right; }
  .landing-hero-copy { padding: 3.5rem 2.75rem 0; }
  .brand-story { grid-template-columns: minmax(0, 1.1fr) minmax(18rem, .9fr); padding: 3.25rem; }
  .plan-comparison { grid-template-columns: minmax(16rem, .7fr) minmax(0, 1.3fr); }
  .form-card { padding: 2rem; }
  .result-hero { padding: 2.25rem; }
  .capture-slot-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .landing-hero { grid-template-columns: minmax(0, 1.15fr) minmax(22rem, .85fr); min-height: 43rem; }
  .landing-hero-copy { padding: 3.5rem; }
  .hero-visual { min-height: 100%; }
  .landing-preview { padding: 1.45rem; }
  .landing-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .landing-steps.minimal-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .privacy-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 479px) {
  .site-nav { gap: .6rem; }
  .site-brand-copy, .nav-secondary-action, .theme-toggle-label { display: none; }
  .form-card { padding: 1.15rem; }
  .commerce-heading h1 { font-size: clamp(2.3rem, 12vw, 3.2rem); }
  .commerce-progress strong { font-size: .68rem; }
}

@media (max-width: 389px) {
  .nav-secondary-action { display: none; }
  .progress-rail li { font-size: .75rem; }
  .form-card { padding: 1.2rem; }
  .admin-queue-item { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 339px) {
  .choice-grid-2, .choice-grid-3 { grid-template-columns: 1fr; }
  .makeup-plan-nested-list > div { grid-template-columns: 1fr; }
}

@media (hover: none) {
  .form-card:hover { box-shadow: var(--shadow); }
  .capture-slot:hover, .admin-queue-item:hover { transform: none; }
}

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

@media print {
  @page { size: A4; margin: 12mm; }
  html, body { background: #fff !important; color: #111 !important; }
  body > header, body > footer, .toast, .print\:hidden { display: none !important; }
  #main-content { max-width: none !important; padding: 0 !important; }
  .report-sheet { max-width: none; border: 0; border-radius: 0; padding: 0; box-shadow: none; }
  .report-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .report-summary > div + div { border-left: 1px solid var(--line); padding-left: 1rem; }
  .uncertainty-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .report-section, .report-callout, .report-summary, .report-feedback, .report-notes, .uncertainty-card, .report-makeup-plan { box-shadow: none; }
  .report-makeup-plan { border: 0; padding: 0; }
  .report-makeup-plan-modules { gap: 5mm; }
  .makeup-plan-module { break-inside: avoid-page; box-shadow: none; }
  .makeup-plan-field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .makeup-plan-gradient-key span, .makeup-plan-gradient-visual span {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  a { color: inherit; text-decoration: none; }
}

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

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { transform: translateX(100%); } }
