/* Claire Brow Preview — mobile-first. Cool blush-grey paper, espresso ink, rosewood pigment accent. */
:root {
  --bg: #F4F1F0;
  --surface: #FFFFFF;
  --surface-2: #F8F5F4;
  --ink: #2A2120;
  --ink-2: #4A3F3D;
  --muted: #776B69;
  --line: #E4DCDA;
  --accent: #8E3B4E;
  --accent-2: #B5576A;
  --accent-ink: #FFFFFF;
  --ok: #3F7A5C;
  --warn: #A0672A;
  --warn-bg: #FBF3E8;
  --shadow: 0 1px 2px rgba(42, 33, 32, .05), 0 8px 28px rgba(42, 33, 32, .06);
  --radius: 18px;
  --serif: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, "Noto Serif KR", serif;
  --sans: "Hanken Grotesk", "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: max(16px, env(safe-area-inset-left));
  --gutter-r: max(16px, env(safe-area-inset-right));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151110; --surface: #1F1918; --surface-2: #261F1E; --ink: #F2EBE9; --ink-2: #D9CFCC; --muted: #A69896;
    --line: #382E2C; --accent: #D98C9C; --accent-2: #E7A7B4; --accent-ink: #1A1212; --ok: #7FC3A0; --warn: #E2AE6E; --warn-bg: #2E241A;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.25); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #151110; --surface: #1F1918; --surface-2: #261F1E; --ink: #F2EBE9; --ink-2: #D9CFCC; --muted: #A69896;
  --line: #382E2C; --accent: #D98C9C; --accent-2: #E7A7B4; --accent-ink: #1A1212; --ok: #7FC3A0; --warn: #E2AE6E; --warn-bg: #2E241A;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.25); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
:lang(ko) body, html:lang(ko) { word-break: keep-all; }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -.01em; }
h1 { font: 500 clamp(34px, 9vw, 58px)/1.04 var(--serif); letter-spacing: -.02em; text-wrap: balance; }
html:lang(ko) h1 { font-family: var(--sans); font-weight: 700; letter-spacing: -.03em; line-height: 1.18; font-size: clamp(30px, 8vw, 50px); }
h2 { font: 500 24px/1.2 var(--serif); }
html:lang(ko) h2 { font-family: var(--sans); font-weight: 700; font-size: 21px; letter-spacing: -.02em; }
h3 { font: 600 15px/1.3 var(--sans); letter-spacing: .01em; margin: 0 0 6px; }
p { margin: 0; }
a { color: inherit; }
button, input, label { font: inherit; color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 10px; }

/* header */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(10px, env(safe-area-inset-top)) var(--gutter-r) 10px var(--gutter);
  background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; min-width: 0; }
.brand-word { font: italic 500 26px/1 var(--serif); letter-spacing: -.01em; }
.brand-sub { font: 600 10.5px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface); }
.lang button { border: 0; background: none; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--muted); min-height: 32px; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

main { max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter-r) 24px var(--gutter); }

/* hero */
.hero { display: grid; gap: 22px; padding: 30px 0 22px; }
.eyebrow { font: 600 11.5px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
html:lang(ko) .eyebrow { letter-spacing: .04em; }
.lead { margin-top: 14px; color: var(--ink-2); font-size: 17px; max-width: 34em; }
.badges { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.badges li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 9px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.badges svg { width: 16px; height: 16px; color: var(--accent); }
.hero-art { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px 14px; box-shadow: var(--shadow); }
.mapping-art { width: 100%; height: auto; }
.mapping-art .guide line { stroke: var(--accent-2); stroke-width: 1.1; opacity: .8; }
.mapping-art .brow-shape { fill: var(--ink); opacity: .09; }
.mapping-art .hairs path { fill: none; stroke: var(--ink); stroke-width: .9; stroke-linecap: round; opacity: .72; }
.mapping-art .pts circle { fill: var(--accent); }
.swatches-art { display: flex; gap: 6px; margin-top: 10px; justify-content: center; }
.swatches-art span { width: 26px; height: 10px; border-radius: 6px; background: var(--c); }

/* cards & steps */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 16px; box-shadow: var(--shadow); margin-top: 14px; min-width: 0; }
.step-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.step-head .link-btn { margin-left: auto; }
.num { font: italic 500 15px/1 var(--serif); color: var(--accent); }
.hint { color: var(--muted); font-size: 14.5px; margin-bottom: 14px; }
.note { color: var(--muted); font-size: 13px; margin-top: 8px; }
.msg { font-size: 14px; color: var(--ink-2); margin-top: 10px; min-height: 0; }
.msg:empty { display: none; }
.msg.err { color: var(--warn); }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.actions.stack { flex-direction: column; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-weight: 600; font-size: 15px;
  cursor: pointer; text-decoration: none; transition: transform .15s ease, background .15s ease, border-color .15s ease; user-select: none;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { border-color: color-mix(in srgb, var(--ink) 30%, var(--line)); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--ink) 88%, var(--accent)); }
.btn.ghost { background: transparent; }
.btn.big { min-height: 54px; font-size: 16px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.link-btn { border: 0; background: none; padding: 6px 0; color: var(--accent); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* quality chips */
.quality { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; }
.quality li { display: flex; flex-wrap: wrap; column-gap: 8px; row-gap: 0; align-items: baseline; padding-left: 30px !important; position: relative; font-size: 14px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); }
.quality li::before { content: ""; position: absolute; left: 12px; top: 15px; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.quality li span { color: var(--muted); }
.quality li.warn span { color: var(--ink-2); }
.quality li.warn { background: var(--warn-bg); color: var(--ink); }
.quality li.warn::before { background: var(--warn); }
.quality b { font-weight: 600; }

/* workspace */
.workspace { display: grid; gap: 0; }
.compare { position: relative; margin-top: 12px; border-radius: 14px; overflow: hidden; background: var(--surface-2); aspect-ratio: 4 / 5; touch-action: pan-y; }
.compare .view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.compare .before { clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0); }
.handle { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 0; pointer-events: none; }
.handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: rgba(255,255,255,.95); box-shadow: 0 0 0 .5px rgba(0,0,0,.15); }
.handle span { position: absolute; top: 50%; left: -19px; width: 38px; height: 38px; margin-top: -19px; border-radius: 50%; background: rgba(255,255,255,.96); box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.handle span::before, .handle span::after { content: ""; position: absolute; top: 13px; border: 6px solid transparent; }
.handle span::before { left: 3px; border-right-color: #2A2120; }
.handle span::after { right: 3px; border-left-color: #2A2120; }
.compare input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: ew-resize; }
.tag { position: absolute; top: 12px; padding: 5px 10px; border-radius: 999px; font: 600 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; background: rgba(255,255,255,.88); color: #2A2120; pointer-events: none; }
html:lang(ko) .tag { letter-spacing: 0; font-size: 12px; }
.tag-b { left: 12px; } .tag-a { right: 12px; }
.sample-note { font-size: 12px; color: var(--muted); margin-top: 6px; }
.view-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14.5px; font-weight: 500; min-height: 40px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 40px; height: 24px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.notice { margin-top: 12px; padding: 12px 14px; border-radius: 12px; font-size: 14px; }
.notice.warn { background: var(--warn-bg); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); }
.disclaimer { margin-top: 14px; font-size: 13px; color: var(--muted); padding-left: 12px; border-left: 2px solid var(--accent-2); }

.video-block { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.video-stage { margin-top: 10px; border-radius: 14px; overflow: hidden; background: #111; aspect-ratio: 4 / 5; position: relative; }
.video-stage canvas, .video-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }

/* procedures */
.procs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.proc { text-align: left; border: 1px solid var(--line); background: var(--surface-2); border-radius: 14px; padding: 12px 12px 11px; cursor: pointer; position: relative; min-height: 86px; transition: border-color .15s, background .15s; }
.proc b { display: block; font-weight: 600; font-size: 14.5px; line-height: 1.25; padding-right: 8px; }
.proc small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; margin-top: 4px; }
.proc[aria-checked="true"] { border-color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--ink); }
.proc .rbadge { position: absolute; top: -8px; right: 10px; font: 700 10px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; background: var(--accent); color: var(--accent-ink); padding: 4px 7px; border-radius: 999px; }
html:lang(ko) .proc .rbadge { letter-spacing: 0; }

.rec { margin-top: 16px; padding: 14px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); }
.pill { display: inline-block; font: 600 11.5px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
html:lang(ko) .pill { letter-spacing: 0; font-size: 12.5px; }
.rec-face { margin-top: 8px; font: 500 18px/1.3 var(--serif); }
html:lang(ko) .rec-face { font-family: var(--sans); font-weight: 700; font-size: 16px; }
.rec-why { margin: 8px 0 4px; padding-left: 18px; font-size: 14px; color: var(--ink-2); display: grid; gap: 4px; }

.opts { margin-top: 16px; display: grid; gap: 14px; }
.opt { display: grid; gap: 8px; }
.opt-l { font: 600 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
html:lang(ko) .opt-l { letter-spacing: 0; font-size: 13px; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface-2); }
.seg button { flex: 1 1 0; border: 0; background: none; padding: 0 10px; min-height: 38px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(42,33,32,.14); }
.seg.small button { min-height: 32px; font-size: 13px; padding: 0 12px; }
.seg.small { flex: 0 0 auto; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.sw { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 12px; padding: 7px 7px 8px; background: var(--surface-2); cursor: pointer; text-align: left; }
.sw i { display: block; height: 26px; border-radius: 7px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.sw b { font-size: 12.5px; font-weight: 600; line-height: 1.2; }
.sw code { font: 500 10.5px/1 var(--mono); color: var(--muted); letter-spacing: .02em; }
.sw[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--surface); }

.ai { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); cursor: pointer; margin: 6px 0 10px; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
#step3 .ai { margin-top: 14px; }
.simtag { position: absolute; right: 12px; top: 44px; padding: 5px 10px; border-radius: 999px; font: 600 11px/1 var(--sans); letter-spacing: .04em; pointer-events: none; background: rgba(42,33,32,.62); color: #fff; }
.gen { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(28,22,22,.55); color: #fff; text-align: center; backdrop-filter: blur(2px); }
.gen[data-state="ai"] { display: none; }
.gen[data-state="empty"], .gen[data-state="error"], .gen[data-state="preview"] { background: rgba(28,22,22,.62); }
.gen-in { max-width: 300px; display: grid; gap: 10px; justify-items: center; }
.gen-title { margin: 0; font: italic 500 22px/1.2 var(--serif, Georgia, serif); }
.gen-text { margin: 0; font-size: 14px; line-height: 1.5; opacity: .92; }
.spin { width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.3); border-top-color: #fff; animation: spin 1s linear infinite; }
.gen:not([data-state="making"]) .spin { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }
.compare:not(.has-result) .handle, .compare:not(.has-result) input[type=range], .compare:not(.has-result) .tag-a { display: none; }
.compare:not(.has-result) .before { clip-path: none; }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.g-item { position: relative; display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.g-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.g-item:hover img { transform: scale(1.04); }
.g-cap { position: absolute; left: 6px; bottom: 6px; right: 6px; font: 600 10px/1.2 var(--sans); color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.55); }

/* booking */
.book h3 { margin-top: 20px; }
.how { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-2); font-size: 14.5px; }

.foot { max-width: 1160px; margin: 0 auto; padding: 20px var(--gutter-r) max(28px, env(safe-area-inset-bottom)) var(--gutter); color: var(--muted); font-size: 12.5px; display: grid; gap: 4px; }
.foot .ig { margin-top: 6px; font-weight: 600; }

/* sheets (camera / manual) */
.sheet { position: fixed; inset: 0; z-index: 50; background: #0E0B0B; color: #fff; display: flex; flex-direction: column; }
.sheet.light { background: var(--bg); color: var(--ink); }
.cam-wrap { position: relative; flex: 1; overflow: hidden; }
.cam-wrap video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.cam-guide { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cam-tip { position: absolute; left: 0; right: 0; top: max(18px, env(safe-area-inset-top)); text-align: center; font-weight: 600; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.cam-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px var(--gutter-r) max(18px, env(safe-area-inset-bottom)) var(--gutter); }
.cam-bar .spacer { width: 84px; }
.btn.light { color: #fff; border-color: rgba(255,255,255,.3); }
.shutter { width: 72px; height: 72px; border-radius: 50%; border: 4px solid #fff; background: rgba(255,255,255,.2); cursor: pointer; }
.shutter:active { background: rgba(255,255,255,.5); }
.manual-tip { padding: max(16px, env(safe-area-inset-top)) var(--gutter-r) 10px var(--gutter); font-size: 14.5px; }
.manual-stage { flex: 1; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; touch-action: none; }
.manual-stage canvas { max-width: 100%; max-height: 100%; touch-action: none; }

/* tablet / desktop */
@media (min-width: 720px) {
  .hero { grid-template-columns: 1.15fr .85fr; align-items: center; padding: 48px 0 28px; }
  .card { padding: 26px 24px; }
  .procs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gallery { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
  .actions.stack { flex-direction: row; }
}
@media (min-width: 980px) {
  .workspace:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); column-gap: 16px; align-items: start; }
  .workspace .viewer { position: sticky; top: 72px; grid-column: 1; grid-row: 1 / span 2; }
  .workspace .controls, .workspace .export { grid-column: 2; }
  .workspace .procs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
