:root {
  --bg: #faf7f5; --card: #ffffff; --fg: #2b2422; --muted: #7a6f6b; --line: #ece4df;
  --accent: #c2706b; --accent-fg: #ffffff; --soft: #f6ece9;
  --good: #2e7d5b; --bad: #c0503f; --hold: #8a7f7a; --warn-bg: #fff6e6; --warn-fg: #8a5a00;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1817; --card: #252120; --fg: #f2ece9; --muted: #a89d99; --line: #3a3331;
    --accent: #e0918b; --accent-fg: #1b1817; --soft: #2f2826;
    --good: #6cc39a; --bad: #ef8b7c; --hold: #a89d99; --warn-bg: #3a2f1c; --warn-fg: #f0c674;
  }
}
:root[data-theme="dark"] {
  --bg: #1b1817; --card: #252120; --fg: #f2ece9; --muted: #a89d99; --line: #3a3331;
  --accent: #e0918b; --accent-fg: #1b1817; --soft: #2f2826;
  --good: #6cc39a; --bad: #ef8b7c; --hold: #a89d99; --warn-bg: #3a2f1c; --warn-fg: #f0c674;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 15px/1.6 -apple-system, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", sans-serif; }
a { color: var(--accent); }
.wrap { max-width: 760px; margin: 0 auto; padding: 16px; }
.wide { max-width: 1080px; }
header.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--card); position: sticky; top: 0; z-index: 5; }
.logo { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; text-decoration: none; color: var(--fg); }
.logo span { color: var(--accent); }
nav a { margin-left: 14px; text-decoration: none; color: var(--muted); font-weight: 600; }
nav a.on { color: var(--fg); }
h1 { font-size: 22px; margin: 18px 0 8px; letter-spacing: -0.01em; }
h2 { font-size: 17px; margin: 22px 0 8px; }
h3 { font-size: 15px; margin: 14px 0 6px; }
p { margin: 6px 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
label { display: block; font-weight: 600; margin: 10px 0 4px; }
input[type=text], input[type=tel], input[type=number], input[type=password], select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--fg); font: inherit; }
textarea { min-height: 70px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; margin: 8px 0; }
.check input { margin-top: 5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; user-select: none; background: var(--card); font-size: 14px; }
.chip.on { border-color: var(--accent); background: var(--soft); color: var(--accent); font-weight: 600; }
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 12px; padding: 12px 18px;
  font: inherit; font-weight: 700; cursor: pointer; background: var(--accent); color: var(--accent-fg); text-decoration: none; }
button.ghost, .btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }
button.small, .btn.small { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
button.block, .btn.block { width: 100%; }
button:disabled { opacity: 0.5; cursor: default; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.badge.good { color: var(--good); } .badge.bad { color: var(--bad); } .badge.accent { color: var(--accent); }
.badge.self { background: var(--warn-bg); color: var(--warn-fg); }
.notice { background: var(--warn-bg); color: var(--warn-fg); border-radius: 10px; padding: 10px 12px; margin: 10px 0; font-size: 14px; }
.err { color: var(--bad); font-weight: 600; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 6px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.v-개선 { color: var(--good); font-weight: 700; } .v-악화 { color: var(--bad); font-weight: 700; } .v-유지, .v-판단 { color: var(--hold); }
.age { display: flex; align-items: baseline; gap: 10px; }
.age .big { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; color: var(--accent); }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 12px 4px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.list li a { text-decoration: none; color: var(--fg); }
.step { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 10px 0; }
.step.done { border-color: var(--good); }
.step .thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.thumb { width: 92px; height: 92px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--soft); }
.faceimg { width: 100%; max-height: 420px; object-fit: contain; border-radius: 12px; background: #000; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.9s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }
.foot { margin: 30px 0 20px; text-align: center; font-size: 12px; color: var(--muted); }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 14px 0 6px; }
.tabs button { background: none; color: var(--muted); border-radius: 0; padding: 10px 12px; border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--fg); border-bottom-color: var(--accent); }
svg.chart { width: 100%; height: 160px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 14px; }
.kv div:nth-child(odd) { color: var(--muted); }
.btn.kakao { background: #fee500; color: #191600; }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: 110%; background: var(--card); border: 1px solid var(--line); border-radius: 12px; min-width: 170px; padding: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 20; }
.menu-pop a { display: block; padding: 9px 10px; text-decoration: none; color: var(--fg); border-radius: 8px; }
.menu-pop a:hover { background: var(--soft); }
.avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.tscroll { overflow-x: auto; }
.lock { text-align: center; padding: 28px 16px; }
.lock .big { font-size: 40px; filter: blur(8px); user-select: none; color: var(--accent); font-weight: 800; }
.code { font-size: 36px; font-weight: 800; letter-spacing: 0.2em; font-variant-numeric: tabular-nums; }
.switch { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
header.top { flex-wrap: wrap; }
@media (max-width: 520px) { nav a { margin-left: 10px; font-size: 14px; } }


/* 결과 카드: 요약 띠, 항목 카드, 추이 카드 */
.sumstrip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.sumstrip div { border-radius: 12px; padding: 10px; text-align: center; background: var(--soft); }
.sumstrip b { display: block; font-size: 24px; line-height: 1.2; }
.sumstrip .g b { color: var(--good); } .sumstrip .r b { color: var(--bad); } .sumstrip .h b { color: var(--hold); }
.mgrid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 560px) { .mgrid { grid-template-columns: 1fr 1fr; } }
.mcard { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--card); }
.mcard .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mcard .nm { font-weight: 700; }
.mcard .val { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.mcard .val small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.delta { font-size: 13px; font-weight: 700; white-space: nowrap; }
.delta.good { color: var(--good); } .delta.bad { color: var(--bad); } .delta.hold { color: var(--hold); }
.mcard .src { font-size: 11px; color: var(--muted); margin-top: 2px; }
.mcard svg.spark { width: 100%; height: 56px; display: block; margin-top: 6px; }

/* 시각화: 수준 막대, 피부 지도, 전후 비교, 항목별 작은 그래프 */
.lvl { position: relative; height: 10px; border-radius: 999px; margin: 8px 0 18px; display: flex; overflow: visible; }
.lvl span { flex: 1; }
.lvl span:first-child { background: color-mix(in srgb, var(--good) 35%, transparent); border-radius: 999px 0 0 999px; }
.lvl span:nth-child(2) { background: color-mix(in srgb, var(--hold) 25%, transparent); }
.lvl span:nth-child(3) { background: color-mix(in srgb, var(--bad) 35%, transparent); border-radius: 0 999px 999px 0; }
.lvl i { position: absolute; top: -4px; width: 4px; height: 18px; border-radius: 2px; background: var(--fg); transform: translateX(-2px); }
.lvl i.prev { background: transparent; border: 2px solid var(--muted); width: 8px; height: 8px; top: 1px; border-radius: 50%; transform: translateX(-4px); }
.lvl em { position: absolute; top: 12px; font-size: 10px; color: var(--muted); font-style: normal; transform: translateX(-50%); white-space: nowrap; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 10px; flex-wrap: wrap; }
.seg button { background: transparent; color: var(--muted); border-radius: 0; padding: 8px 12px; font-size: 13px; }
.seg button.on { background: var(--soft); color: var(--accent); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend b { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ba figure { margin: 0; }
.ba img { width: 100%; aspect-ratio: 3/4; max-height: 420px; object-fit: cover; border-radius: 12px; background: var(--soft); }
.ba { max-width: 640px; }
.ba figcaption { font-size: 12px; color: var(--muted); text-align: center; margin-top: 4px; }
.minis { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.mini { border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.mini svg.chart { height: 110px; }

/* ---------- 피부 타입 결과 ---------- */
.typehero { display: grid; grid-template-columns: 1fr 220px; gap: 8px; align-items: center;
  background: linear-gradient(135deg, var(--soft), var(--card) 70%); }
.typehero .th-name { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.3; margin: 4px 0 8px; color: var(--accent); }
.typehero .th-comment { background: var(--card); border-left: 3px solid var(--accent); padding: 8px 10px; border-radius: 0 8px 8px 0; margin-top: 10px; }
.typehero .th-tags { gap: 6px; margin-top: 10px; }
@media (max-width: 560px) { .typehero { grid-template-columns: 1fr; } .typehero svg.radar { max-width: 240px; margin: 0 auto; } }
svg.radar { width: 100%; height: auto; display: block; overflow: visible; }
svg.radar .grid { fill: none; stroke: var(--line); stroke-width: 1; }
svg.radar .shape { fill: color-mix(in srgb, var(--accent) 22%, transparent); stroke: var(--accent); stroke-width: 2; }
svg.radar .dot { fill: var(--accent); }
svg.radar text { font-size: 11px; fill: var(--muted); font-weight: 600; }
svg.hist { width: 100%; height: auto; display: block; margin: 6px 0 4px; }
svg.hist rect { fill: color-mix(in srgb, var(--muted) 30%, transparent); }
svg.hist rect.you { fill: var(--accent); }
svg.hist .axis { stroke: var(--line); }
svg.hist .me { fill: var(--accent); font-size: 11px; font-weight: 800; }
svg.hist .lab { fill: var(--muted); font-size: 10px; }
b.acc { color: var(--accent); }
.cond { height: 10px; border-radius: 999px; background: var(--soft); margin: 10px 0 6px; overflow: hidden; }
.cond span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.agecard { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.expert .ex-sec { margin: 12px 0; }
.expert .ex-h { font-weight: 800; font-size: 13px; color: var(--accent); margin-bottom: 2px; }
.expert .chips .chip { cursor: default; }
.carecta { border: 2px solid var(--accent); }
.carecta h3 { font-size: 18px; margin-top: 4px; }
.care-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 8px 0; background: var(--card); }
.care-item.intro { background: var(--soft); border-color: transparent; }
.care-item p { margin: 4px 0 0; }
.cta-row { display: grid; gap: 8px; margin: 14px 0 6px; }
a.btn { text-decoration: none; }
details.more summary { cursor: pointer; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: "펼치기"; float: right; font-size: 12px; color: var(--muted); }
details.more[open] summary::after { content: "접기"; }
svg.hist .meline { stroke: var(--accent); stroke-width: 2.5; }
.ctabar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); border-top: 1px solid var(--line); }
.ctabar .btn { width: 100%; max-width: 728px; margin: 0 auto; display: flex; }
body:has(.ctabar) .wrap { padding-bottom: 90px; }

/* ---------- 안내 카메라 (camguide.js) ---------- */
body.cam-open { overflow: hidden; }
.cam { position: fixed; inset: 0; z-index: 100; background: #000; display: flex; flex-direction: column; color: #fff; }
.cam-stage { position: relative; flex: 1; overflow: hidden; }
.cam-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.cam-oval { position: absolute; left: 50%; top: 47%; width: min(72vw, 52vh); aspect-ratio: 3 / 4; transform: translate(-50%, -50%);
  border-radius: 50%; border: 3px dashed rgba(255,255,255,.85); transition: border-color .2s; }
.cam-dim { position: absolute; inset: 0; background: rgba(0,0,0,.55); pointer-events: none;
  -webkit-mask: radial-gradient(ellipse min(36vw, 26vh) min(48vw, 34.67vh) at 50% 47%, transparent 99%, #000 100%);
          mask: radial-gradient(ellipse min(36vw, 26vh) min(48vw, 34.67vh) at 50% 47%, transparent 99%, #000 100%); }
.cam-oval.ok { border: 4px solid #4ade80; }
.cam-count { position: absolute; left: 50%; top: 47%; transform: translate(-50%, -50%); font-size: 72px; font-weight: 800; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.cam-prog { position: absolute; left: 10%; right: 10%; bottom: 14px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.25); overflow: hidden; }
.cam-prog span { display: block; height: 100%; width: 0; background: #f87171; }
.cam-panel { background: #111; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
.cam-tip { font-size: 18px; font-weight: 800; text-align: center; min-height: 2.6em; display: flex; align-items: center; justify-content: center; }
.cam-checks { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 6px 0 10px; }
.cam-checks span { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: #2a2a2a; color: #aaa; }
.cam-checks span.on { background: #14532d; color: #86efac; }
.cam-checks span.off { background: #4c1d1d; color: #fca5a5; }
.cam-btns { display: flex; gap: 8px; justify-content: center; }
.cam-btns button.ghost { color: #fff; border-color: #444; }
.cam-sub { color: #aaa; text-align: center; margin: 8px 0 0; }
.cam-checks span.hidden { display: none; }
.cam-target { position: absolute; left: 50%; top: 47%; width: 34px; height: 34px; transform: translate(-50%, -50%); pointer-events: none; }
.cam-target::before, .cam-target::after { content: ""; position: absolute; background: rgba(255,255,255,.9); }
.cam-target::before { left: 16px; top: 0; width: 2px; height: 34px; }
.cam-target::after { top: 16px; left: 0; height: 2px; width: 34px; }
.cam-dot { position: absolute; width: 18px; height: 18px; border-radius: 50%; transform: translate(-50%, -50%); display: none; pointer-events: none;
  background: #f87171; box-shadow: 0 0 0 3px rgba(0,0,0,.35); transition: left .08s linear, top .08s linear; }
.cam-dot.on { display: block; }
.cam-dot.ok { background: #4ade80; }
.cam-move { position: absolute; left: 50%; top: 9%; transform: translateX(-50%); display: none; flex-direction: column; align-items: center; gap: 2px;
  max-width: 86%; text-align: center; pointer-events: none; }
.cam-move.on { display: flex; }
.cam-move b { font-size: 58px; line-height: 1; color: #fde047; text-shadow: 0 2px 10px rgba(0,0,0,.7); }
.cam-move span { font-size: 15px; font-weight: 800; background: rgba(0,0,0,.6); padding: 4px 10px; border-radius: 10px; }
.cam-move.m-l, .cam-move.m-tl { left: 6%; top: 40%; transform: none; align-items: flex-start; text-align: left; max-width: 46%; }
.cam-move.m-r, .cam-move.m-tr { left: auto; right: 6%; top: 40%; transform: none; align-items: flex-end; text-align: right; max-width: 46%; }
.cam-move.m-d, .cam-move.m-chd { top: auto; bottom: 8%; flex-direction: column-reverse; }
.cam-move.m-u b, .cam-move.m-d b { animation: camPulse 1s ease-in-out infinite; }
@keyframes camPulse { 50% { opacity: .45; } }
.cam-oval.shot { border-color: #fff; box-shadow: 0 0 0 9999px rgba(255,255,255,.35); transition: none; }
.cam-steps { display: flex; gap: 6px; justify-content: center; margin-bottom: 6px; }
.cam-steps span { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: #2a2a2a; color: #888; }
.cam-steps span.on { background: #fff; color: #111; font-weight: 800; }
.cam-steps span.done { background: #14532d; color: #86efac; }
.cam-arrow { position: absolute; top: 47%; transform: translateY(-50%); font-size: 64px; font-weight: 800; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.6); display: none; }
.cam-arrow.l { display: block; left: 4%; animation: camL 1.2s ease-in-out infinite; }
.cam-arrow.l::before { content: "←"; }
.cam-arrow.r { display: block; right: 4%; animation: camR 1.2s ease-in-out infinite; }
.cam-arrow.r::before { content: "→"; }
@keyframes camL { 50% { transform: translate(-12px, -50%); } }
@keyframes camR { 50% { transform: translate(12px, -50%); } }
details.consent-more { margin: 4px 0 8px 30px; }
details.consent-more summary { cursor: pointer; color: var(--accent); }
details.consent-more .kv { margin-top: 6px; }
.changehero { border: 2px solid var(--accent); }
.changehero h2 { margin-top: 4px; }
.changehero .tt { margin: 8px 0; font-size: 15px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.changehero .tt span { color: var(--muted); text-decoration: line-through; }
.changehero .tt b { color: var(--accent); }
.changehero .cpoints li { margin: 3px 0; }
.changehero .ax { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }

/* 단계 안내 큰 자막 (음성 안내와 같이) */
.cam-say { position: absolute; left: 50%; top: 20%; transform: translateX(-50%); max-width: 90%; text-align: center; background: rgba(0,0,0,.62); color: #fff;
  font-size: 24px; font-weight: 800; padding: 10px 18px; border-radius: 14px; opacity: 0; transition: opacity .3s; pointer-events: none; }
.cam-say.on { opacity: 1; }
.cam-say, .cam-move span, .cam-tip { word-break: keep-all; }
.cam-wait { position: absolute; inset: 0; z-index: 5; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.cam-wait b { font-size: 20px; }
.cam-wait span { font-size: 14px; color: #aaa; }
.cam-wait i { width: 38px; height: 38px; border-radius: 50%; border: 4px solid #444; border-top-color: #fff; animation: camSpin .9s linear infinite; }
@keyframes camSpin { to { transform: rotate(360deg); } }

/* 레이더 축 판정·가장 약한 축 강조 */
svg.radar text .lv { font-size: 10.5px; font-weight: 700; fill: var(--hold); }
svg.radar text .lv.good { fill: var(--good); } svg.radar text .lv.bad { fill: var(--bad); }
svg.radar text.weak { fill: var(--fg); font-weight: 800; }
svg.radar .dot.weak { fill: var(--bad); stroke: var(--card); stroke-width: 1.5; }

/* 원장 콘솔 상단 메뉴: PC는 펼침(로그아웃은 설정 안), 모바일은 햄버거 */
.navbtn { display: none; background: none; border: 1px solid var(--line); color: var(--fg); font-size: 20px; line-height: 1; padding: 6px 10px; border-radius: 10px; min-height: 0; }
nav.cnav .nav-out { display: none; }
@media (max-width: 640px) {
  header.top { position: sticky; }
  .navbtn:not(.hidden) { display: block; }
  nav.cnav { display: none; position: absolute; right: 12px; top: calc(100% + 6px); background: var(--card); border: 1px solid var(--line); border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 6px; min-width: 170px; z-index: 30; flex-direction: column; }
  nav.cnav.open:not(.hidden) { display: flex; }
  nav.cnav a { margin: 0; padding: 12px 14px; border-radius: 8px; font-size: 16px; }
  nav.cnav a.on { background: var(--soft); }
  nav.cnav .nav-out { display: block; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; color: var(--muted); }
}
.setlist { padding: 0; }
.setitem { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; text-decoration: none; color: var(--fg); border-bottom: 1px solid var(--line); }
.setitem:last-child { border-bottom: 0; }
.setitem > span:first-child { display: flex; flex-direction: column; gap: 3px; }
.setitem > span:last-child { font-size: 22px; }

/* 이전 관리 사진 (가져온 사진) */
.athumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; margin-top: 8px; }
.athumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--soft); cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.88); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; gap: 12px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; border-radius: 8px; }
.lightbox .lb-btns { display: flex; gap: 10px; }

/* 장면별 비교 (가져온 사진을 AI로 맞춘 것) */
.athumb { position: relative; display: block; }
.athumb i { position: absolute; left: 4px; bottom: 4px; font-style: normal; font-size: 10.5px; font-weight: 700; background: rgba(0,0,0,.6); color: #fff; padding: 1px 6px; border-radius: 6px; }
.ascene { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.asc-col { flex: 0 0 auto; width: 132px; display: flex; flex-direction: column; gap: 6px; scroll-snap-align: start; }
.asc-col img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; background: var(--soft); cursor: zoom-in; }
.asc-col img.raw { object-fit: contain; }
.wipe { position: relative; width: 100%; max-width: 420px; aspect-ratio: 3 / 4; margin: 10px auto 6px; border-radius: 12px; overflow: hidden; background: var(--soft); }
.wipe img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.wipe .wline { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25); transform: translateX(-1px); pointer-events: none; }
.wipe .wtag { position: absolute; top: 8px; font-size: 12px; font-weight: 700; background: rgba(0,0,0,.6); color: #fff; padding: 2px 8px; border-radius: 8px; }
.wipe .wtag.l { left: 8px; } .wipe .wtag.r { right: 8px; }

/* 맞춤 좌표로 그린 사진 */
canvas.fitc { display: block; width: 100%; aspect-ratio: 3 / 4; border-radius: 8px; background: #ececec; cursor: zoom-in; }
.wipe canvas { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; cursor: default; }
.lightbox canvas.lbfit { width: min(92vw, calc((100vh - 170px) * 0.75)); height: auto; cursor: default; }

/* 관리 사진 변화 흐름 (원장·고객 공통) */
.flow .fl-title { margin: 0 0 10px; }
.flow .fl-ctl { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.flow .seg { display: inline-flex; background: var(--soft); border-radius: 12px; padding: 3px; gap: 2px; align-self: flex-start; }
.flow .seg button { background: none; color: var(--muted); padding: 7px 16px; border-radius: 9px; min-height: 0; font-weight: 700; }
.flow .seg button.on { background: var(--card); color: var(--fg); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.flow .fl-areas { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.flow .fl-areas::-webkit-scrollbar { display: none; }
.flow .fl-areas .chip { flex: 0 0 auto; }
.flow .fl-sum { font-size: 15px; margin-bottom: 8px; }
.flow .fl-sum b { color: var(--accent); font-size: 17px; }
.flow .wipe { margin: 0 auto 8px; touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; }
.flow .wipe canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.flow .whandle { position: absolute; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: #fff; color: #333;
  display: flex; align-items: center; justify-content: center; font-weight: 800; box-shadow: 0 2px 8px rgba(0,0,0,.3); pointer-events: none; }
.flow input[type=range] { width: 100%; }
.flow .fl-act { justify-content: space-between; margin-top: 4px; }
.flow .fl-side { margin-top: 12px; }
.flow .fl-strip { display: flex; gap: 8px; overflow-x: auto; padding: 6px 2px 4px; scroll-snap-type: x proximity; }
.flow .fl-item { flex: 0 0 auto; width: 84px; background: none; border: 2px solid transparent; border-radius: 12px; padding: 3px; color: var(--fg);
  display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 0; scroll-snap-align: start; position: relative; }
.flow .fl-item canvas { width: 100%; border-radius: 8px; cursor: pointer; }
.flow .fl-item span { font-size: 11px; font-weight: 600; }
.flow .fl-item em { font-style: normal; font-size: 10.5px; font-weight: 800; position: absolute; top: 6px; left: 6px; color: #fff; border-radius: 6px; padding: 0 5px; }
.flow .fl-item.a { border-color: var(--muted); } .flow .fl-item.a em { background: var(--muted); }
.flow .fl-item.b { border-color: var(--accent); } .flow .fl-item.b em { background: var(--accent); }
@media (min-width: 900px) {
  .flow .fl-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
  .flow .fl-side { margin-top: 0; }
  .flow .fl-strip { flex-wrap: wrap; overflow: visible; }
  .flow .fl-item { width: 96px; }
}

/* 뷰티온 추천 화장품 (고객 결과 화면) */
.recs .rgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .recs .rgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.recs .ritem { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--fg); border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: var(--card); }
.recs .ritem img, .recs .rnoimg { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 8px; background: #fff; display: block; }
.recs .rnoimg { background: var(--soft); }
.recs .rname { font-size: 13.5px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.recs .ritem em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--accent); }
/* 운영사: 추천 상품 관리 */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pcard { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.pcard.off { opacity: .55; }
.pcard img, .pnoimg { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 10px; border: 1px solid var(--line); }
.pnoimg { display: flex; align-items: center; justify-content: center; color: var(--muted); background: var(--soft); }
.pform { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; }
@media (max-width: 640px) { .pform { grid-template-columns: 1fr; } }
.pprev { width: 100%; aspect-ratio: 1; border: 1px dashed var(--line); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--muted); margin-bottom: 8px; overflow: hidden; background: #fff; }
.pprev img { width: 100%; height: 100%; object-fit: contain; }
table.cover .cell { min-height: 0; padding: 4px 12px; background: var(--soft); color: var(--fg); border-radius: 8px; font-weight: 700; }
table.cover .cell.zero { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
table.cover .cell.on { outline: 2px solid var(--accent); }

/* 원장 홈: 이용량 한 줄 */
a.card.usageline { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); padding: 14px 18px; }
tr.on td { font-weight: 700; background: var(--soft); }

/* 첫 화면 아래 소개·자주 묻는 질문 (검색 노출용, 화면에도 보임) */
.seo-intro { margin: 28px 0 8px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--fg); }
.seo-intro h2 { font-size: 18px; margin: 0 0 8px; } .seo-intro h3 { font-size: 15px; margin: 18px 0 6px; }
.seo-intro p { font-size: 14px; line-height: 1.7; color: var(--muted); }
.seo-intro details { border-bottom: 1px solid var(--line); padding: 10px 0; } .seo-intro summary { font-weight: 600; font-size: 14px; cursor: pointer; }
.seo-intro details p { margin: 8px 0 0; }

/* 첫 화면: 설명 없이 바로 'AI 피부분석 시작하기' (모바일 우선) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.sc-hero { text-align: center; padding: 18px 0 8px; }
.hero-visual { position: relative; width: 210px; height: 240px; margin: 6px auto 18px; }
.hv-face { position: absolute; left: 50%; top: 0; width: 170px; height: 220px; margin-left: -85px; border-radius: 50% / 46%;
  background: radial-gradient(ellipse at 50% 38%, #fbe8e1 0%, #f3d3c8 55%, #e9bfb2 100%); box-shadow: inset 0 0 0 3px #fff, 0 10px 30px rgba(194,112,107,.25); overflow: hidden; }
.hv-scan { position: absolute; left: 0; right: 0; height: 36px; top: -40px; background: linear-gradient(180deg, transparent, rgba(194,112,107,.45), transparent); animation: hvScan 2.4s ease-in-out infinite; }
@keyframes hvScan { 0% { top: -40px; } 60% { top: 220px; } 100% { top: 220px; } }
.hv-tag { position: absolute; font-size: 12px; font-weight: 700; background: var(--card); color: var(--fg); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,.08); animation: hvPop 3s ease-in-out infinite; }
.hv-tag.t1 { left: -14px; top: 30px; } .hv-tag.t2 { right: -10px; top: 60px; animation-delay: .4s; } .hv-tag.t3 { left: -4px; top: 150px; animation-delay: .8s; } .hv-tag.t4 { right: 0; top: 178px; animation-delay: 1.2s; }
@keyframes hvPop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.hero-shop { font-size: 14px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.hero-title { font-size: 32px; font-weight: 800; letter-spacing: -0.5px; }
.hero-sub { color: var(--muted); margin: 6px 0 20px; font-size: 15px; }
.hero-go { font-size: 18px; padding: 16px; border-radius: 16px; box-shadow: 0 8px 20px rgba(194,112,107,.35); }
.hero-note { margin-top: 10px; }
/* 동의 창 (아래에서 올라옴) */
.sheet { position: fixed; inset: 0; z-index: 150; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet-box { background: var(--card); width: 100%; max-width: 560px; max-height: 88vh; overflow: auto; border-radius: 18px 18px 0 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); }
@media (min-width: 700px) { .sheet { align-items: center; } .sheet-box { border-radius: 18px; } }
.card.upl ul { margin: 6px 0 0; padding-left: 18px; }

.shopconn { padding: 12px 0; border-bottom: 1px solid var(--line); } .shopconn:last-child { border-bottom: 0; }

/* 사진 크게 보기 + 장면 태그 (원장 화면) */
.pbox { position: fixed; inset: 0; z-index: 200; background: #111; display: flex; flex-direction: column; color: #fff; }
.pb-top { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; font-size: 14px; font-weight: 600; }
.pb-x { background: rgba(255,255,255,.12); color: #fff; border: 0; width: 40px; height: 40px; border-radius: 50%; font-size: 18px; min-height: 0; padding: 0; }
.pb-stage { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; padding: 0 8px; }
.pb-img { max-width: 100%; max-height: 100%; display: flex; align-items: center; justify-content: center; }
.pb-img img { max-width: 100%; max-height: calc(100vh - 290px); object-fit: contain; border-radius: 8px; }
.pb-img canvas.pbfit { width: min(92vw, calc((100vh - 290px) * 0.75)); aspect-ratio: 3 / 4; border-radius: 8px; background: #ececec; }
.pb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; font-size: 28px; line-height: 1; padding: 0; min-height: 0; z-index: 2; }
.pb-nav.prev { left: 8px; } .pb-nav.next { right: 8px; }
.pb-panel { background: var(--card); color: var(--fg); border-radius: 18px 18px 0 0; padding: 14px 16px calc(12px + env(safe-area-inset-bottom)); }
.pb-q { margin-bottom: 10px; }
.pb-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pb-seg button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 0; min-height: 0; border-radius: 12px; background: var(--soft); color: var(--fg); border: 2px solid transparent; font-weight: 700; }
.pb-seg button b { font-size: 18px; line-height: 1.2; }
.pb-seg button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.pb-auto { margin: 10px 0 4px; }
.pb-act { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.danger-ghost { background: none; color: var(--bad); border: 1px solid var(--line); }
@media (min-width: 900px) { .pb-panel { max-width: 560px; margin: 0 auto 16px; border-radius: 18px; width: 100%; } }
/* 날짜별 목록의 장면 꼬리표 */
.athumb i { font-size: 11.5px; padding: 2px 8px; left: 5px; bottom: 5px; }
.athumb i.v-front { background: rgba(46,125,91,.9); } .athumb i.v-left, .athumb i.v-right { background: rgba(194,112,107,.92); }
.athumb i.v-etc { background: rgba(80,80,80,.85); } .athumb i.v-none { background: rgba(0,0,0,.55); }
/* 어두운 사진 보기 위의 보조 버튼 (고객 화면 사진 보기 등) */
.lightbox .ghost, .lightbox a.btn.ghost { color: #fff; border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.08); }

/* ---- 모바일 UI 점검 (2026-10-11) ---- */
body { word-break: keep-all; overflow-wrap: anywhere; } /* 한글이 단어 중간에서 끊기지 않게 */
/* 아이폰은 16px보다 작은 입력칸을 누르면 화면을 확대해 버린다 */
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]), select, textarea { font-size: 16px; }
input:not([type]), input[type=email], input[type=search], input[type=url], input[type=date] {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--fg); font-family: inherit; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--accent); flex: none; margin: 2px 0 0; vertical-align: -4px; }
.check { padding: 4px 0; min-height: 32px; cursor: pointer; }
.check input { margin-top: 2px; }
label:has(> input[type=checkbox]), label:has(> input[type=radio]) { cursor: pointer; padding-block: 6px; }
.card > h3:first-child, .card > h2:first-child, .card > .row:first-child > h3 { margin-top: 0; }
/* 탭 모양 버튼 묶음: 줄바꿈 대신 옆으로 밀기 */
.seg { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { white-space: nowrap; flex: none; min-height: 40px; }
/* 막대 그래프 (HTML) */
.bchart { display: flex; align-items: flex-end; gap: 4px; padding-top: 6px; }
.bc { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.bc-a { height: 132px; width: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.bc-v { font-size: 11px; font-weight: 700; line-height: 1.2; white-space: nowrap; margin-bottom: 2px; letter-spacing: -0.03em; }
.bc-b { width: min(70%, 34px); display: flex; flex-direction: column; border-radius: 4px 4px 0 0; overflow: hidden; }
.bc-b i { display: block; min-height: 2px; }
.bc-l { font-size: 11px; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.hbars { display: flex; flex-direction: column; gap: 8px; }
.hb { display: grid; grid-template-columns: minmax(84px, 38%) 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
.hb-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-t { background: var(--soft); border-radius: 6px; height: 14px; overflow: hidden; }
.hb-t i { display: block; height: 100%; border-radius: 6px; }
.hb-v { font-size: 13px; min-width: 2.5em; text-align: right; }
svg.chart text { font-family: inherit; }

.list.leads li { display: block; }
.list.leads li a { color: var(--fg); }
details.extv > summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--accent); padding: 6px 0; }
details.extv .list li { padding: 10px 2px; }

.list li a.chev { font-size: 22px; color: var(--muted); text-decoration: none; padding: 0 4px; }
.grid2 > * { min-width: 0; } /* 안의 그래프·긴 글이 칸을 밀어 화면이 옆으로 넘치지 않게 */
.bchart { gap: 2px; }
@media (max-width: 520px) { .bc-v { font-size: 10px; } .bc-l { font-size: 10px; } }

/* 로그인 전 측정: 알림톡으로 결과 받기 */
.sent-ico { width: 52px; height: 52px; margin: 4px auto 0; border-radius: 50%; background: var(--accent); color: #fff; font-size: 28px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.btn.kakao.busy { opacity: .6; pointer-events: none; }

.feel-out { margin: 10px 0 2px; padding: 10px 12px; border-radius: 10px; background: var(--soft); font-size: 15px; }

.looks { display: grid; gap: 8px; margin-top: 8px; }
.look { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }

.drop { margin-top: 10px; padding: 18px 12px; border: 2px dashed var(--line); border-radius: 12px; text-align: center; color: var(--muted); font-size: 14px; }
.drop.on { border-color: var(--accent); color: var(--accent); background: var(--soft); }

/* 내 기록 첫 화면: 큰 얼굴 사진 + 회차 좌우 넘기기 */
.mhero { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 0; background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; overflow: hidden; margin: 12px 0 18px; }
.mh-photo { position: relative; aspect-ratio: 3 / 4; background: var(--soft); }
.mh-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mh-nophoto { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); }
.mh-over { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 14px 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  background: linear-gradient(transparent, rgba(0,0,0,.62)); color: #fff; }
.mh-over b { font-size: 18px; margin-right: 2px; }
.mh-n { width: 100%; font-size: 12px; opacity: .85; }
.mh-info { padding: 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mh-type { font-size: 21px; font-weight: 800; color: var(--accent); line-height: 1.3; letter-spacing: -0.02em; word-break: keep-all; }
.mh-age { font-size: 14px; color: var(--muted); }
.mh-age b { font-size: 20px; color: var(--fg); margin-left: 4px; }
.mh-head { margin: 0; padding: 8px 10px; background: var(--soft); border-radius: 10px; font-size: 14px; word-break: keep-all; }
.mh-vd { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.mh-vd > span:not(.small) { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--soft); }
.mh-vd .g { color: var(--good); } .mh-vd .r { color: var(--bad); } .mh-vd .h { color: var(--hold); }
.mh-axes { display: flex; flex-direction: column; gap: 7px; }
.mh-ax { display: grid; grid-template-columns: 76px 1fr 52px; gap: 8px; align-items: center; font-size: 13px; }
.mh-ax .bar { height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.mh-ax .bar i { display: block; height: 100%; border-radius: 4px; background: var(--hold); }
.mh-ax .bar i.good { background: var(--good); } .mh-ax .bar i.bad { background: var(--bad); }
.mh-ax .lv { text-align: right; font-weight: 700; color: var(--muted); }
.mh-ax .lv.good { color: var(--good); } .mh-ax .lv.bad { color: var(--bad); }
.mh-info .btn.block { margin-top: auto; text-align: center; }
.vhead { margin: 4px 0 8px; row-gap: 6px; }
.vhead .hint { font-weight: 400; }
.vfilter { gap: 6px; }
.vfilter .chip { font-size: 12px; padding: 4px 10px; color: var(--muted); }
.vfilter .chip.on { color: var(--accent); }
.vstrip { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 10px; margin: 0 -16px 8px; padding-left: 16px; padding-right: 16px;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.vcard { flex: 0 0 104px; scroll-snap-align: start; display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 2px; padding: 0 0 8px; text-align: left;
  background: var(--card); color: var(--fg); border: 2px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; font: inherit; }
.vcard.on { border-color: var(--accent); box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.vc-img { display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 4; background: var(--soft); }
.vc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vc-img em { font-style: normal; font-size: 12px; color: var(--muted); }
.vc-date { font-weight: 800; font-size: 14px; padding: 4px 8px 0; }
.vc-sub { font-size: 11px; color: var(--muted); padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) {
  .mhero { grid-template-columns: 1fr; }
  .mh-photo { aspect-ratio: 4 / 5; max-height: 62vh; width: 100%; }
  .vfilter { width: 100%; }
}

/* ---------- 원장 콘솔: 홈 ---------- */
.hhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 0 12px; }
.hsearch { display: flex; gap: 6px; flex: 1; max-width: 380px; min-width: 220px; }
.hsearch input { flex: 1; margin: 0; }
.qa { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 12px; }
.qa-b { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line);
  text-decoration: none; color: var(--fg); font-weight: 700; font-size: 14px; }
.qa-b b { font-size: 22px; line-height: 1; }
.qa-b.main { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.kpi b { font-size: 24px; letter-spacing: -0.02em; }
.kpi span { font-size: 12px; color: var(--muted); line-height: 1.35; }
.kpi.g b { color: var(--good); }
.todo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.todo .tcard { margin: 6px 0; min-width: 0; }
.tcard h3 { margin-top: 0; }
.cnt { display: inline-block; min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--soft); color: var(--accent); font-size: 13px; text-align: center; }
.cnt.bad { color: var(--bad); }
.pstrip { display: flex; gap: 10px; overflow-x: auto; padding: 2px 0 8px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.pcard { flex: 0 0 112px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 1px; text-decoration: none; color: var(--fg); min-width: 0; }
.pc-img { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--soft); margin-bottom: 4px; }
.pc-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ini { font-size: 34px; font-weight: 800; color: var(--accent); opacity: .75; }
.pc-name { font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-sub { font-size: 11px; color: var(--muted); line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pc-vd, .cc-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.pc-g, .pc-b, .cc-pp { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--soft); }
.pc-g { color: var(--good); } .pc-b { color: var(--bad); } .cc-pp { color: var(--warn-fg); background: var(--warn-bg); }
@media (max-width: 760px) {
  .qa { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .todo { grid-template-columns: 1fr; }
  .hsearch { max-width: none; }
}

/* ---------- 원장 콘솔: 고객 카드 ---------- */
.cfil { margin: 10px 0 6px; gap: 6px; }
.cfil .chip { font-size: 13px; padding: 5px 11px; color: var(--muted); }
.cfil .chip.on { color: var(--accent); }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 8px; }
.ccard { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--fg); min-width: 0; }
.ccard:hover { border-color: var(--accent); }
.cc-img { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background: var(--soft); overflow: hidden; }
.cc-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-k { z-index: 1; }
.cc-k { position: absolute; left: 8px; top: 8px; font-style: normal; font-size: 10px; font-weight: 800; background: #fee500; color: #191600; padding: 1px 6px; border-radius: 999px; }
.cc-body { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px 10px; min-width: 0; }
.cc-body b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-line { font-size: 12px; color: var(--muted); }
.cc-type { font-size: 12px; font-weight: 700; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-type.muted { color: var(--muted); font-weight: 400; }
@media (max-width: 420px) { .cgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }

/* ---------- 원장 콘솔: 고객 상세 맨 위 ---------- */
.chero { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; margin: 10px 0 14px; }
.ch-photo { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--soft); }
.ch-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ch-photo .ini { font-size: 54px; }
.ch-info { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ch-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.ch-stats span { display: flex; flex-direction: column; padding: 6px 10px; border-radius: 10px; background: var(--soft); font-size: 11px; color: var(--muted); min-width: 64px; }
.ch-stats span b { font-size: 15px; color: var(--fg); }
.ch-stats span.pp b { color: var(--warn-fg); }
.ch-stats span.wide { flex-basis: 100%; }
.ch-stats span.wide b { font-size: 13px; }
.ch-act { display: flex; flex-wrap: wrap; gap: 6px; }
.ch-act > * { padding: 9px 14px; font-size: 14px; }
.cinfo summary { cursor: pointer; }
@media (max-width: 560px) { .chero { grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 12px; } .ch-act > * { flex: 1 1 auto; } }

/* ---------- 비포·애프터 ---------- */
.casecats { margin: 10px 0; gap: 6px; }
.casecats .chip { color: var(--muted); }
.casecats .chip.on { color: var(--accent); }
.cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.case { margin: 0; padding: 12px; }
.case.hid { opacity: .55; }
.ba2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ba2 figure { margin: 0; position: relative; }
.ba2 img, .ba2 canvas { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; background: #ececec; cursor: default; }
.ba2 figcaption { position: absolute; left: 6px; bottom: 6px; font-size: 11px; font-weight: 800; color: #fff; background: rgba(0,0,0,.55); padding: 2px 7px; border-radius: 6px; }
.case-info { margin-top: 10px; }
.eff { font-size: 12px; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: var(--soft); color: var(--hold); white-space: nowrap; }
.eff.good { color: #fff; background: var(--good); } .eff.ok { color: var(--good); } .eff.bad { color: var(--bad); }
.tchips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tchips span { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.case-ctl { margin-top: 8px; gap: 6px; }
.catpick { margin-top: 10px; padding: 10px; border-radius: 10px; background: var(--soft); }
.catpick .chip { font-size: 12px; padding: 4px 10px; color: var(--muted); }
.catpick .chip.on { color: var(--accent); }
.consult { position: fixed; inset: 0; z-index: 100; background: #111; color: #fff; display: flex; flex-direction: column; overflow: auto; }
.cs-top { display: flex; gap: 10px; align-items: center; padding: 12px 16px; }
.cs-top .chips { flex: 1; gap: 6px; flex-wrap: nowrap; overflow-x: auto; }
.cs-top .chip { background: #222; border-color: #333; color: #bbb; white-space: nowrap; }
.cs-top .chip.on { background: #fff; color: #111; }
.consult button.ghost { color: #fff; border-color: #444; }
.cs-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0 16px; min-height: 0; }
.cs-main .ba2 { width: 100%; max-width: 1000px; }
.cs-main .ba2 img, .cs-main .ba2 canvas { max-height: 70vh; object-fit: contain; background: #000; }
.cs-main .ba2 figcaption { font-size: 14px; }
.cs-info { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; }
.cs-cat { font-size: 20px; font-weight: 800; }
.cs-nav { display: flex; gap: 14px; align-items: center; margin-top: 6px; }

/* 같은 날 관리 전 → 직후 */
.sdcard h2 { font-size: 18px; }
.sdmode { margin: 10px 0 8px; gap: 6px; }
.sdmode .chip { font-size: 12px; padding: 4px 10px; color: var(--muted); }
.sdmode .chip.on { color: var(--accent); }
.bacmp { position: relative; max-width: 520px; margin: 0 auto; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: #ececec; touch-action: pan-y; }
.bacmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-drag: none; }
.bacmp .bar { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 6px rgba(0,0,0,.4); pointer-events: none; }
.bacmp .bar::after { content: "◀ ▶"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 11px; white-space: nowrap;
  background: #fff; color: #333; padding: 6px 8px; border-radius: 999px; box-shadow: 0 1px 6px rgba(0,0,0,.3); }
.bacmp input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.bacmp .bl { position: absolute; top: 10px; font-size: 12px; font-weight: 800; color: #fff; background: rgba(0,0,0,.55); padding: 3px 8px; border-radius: 6px; pointer-events: none; }
.bacmp .bl.l { left: 10px; } .bacmp .bl.r { right: 10px; }
.sdcard .ba2 { max-width: 640px; margin: 0 auto; }
.sdgood { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sdgood span { display: flex; flex-direction: column; align-items: center; padding: 8px 14px; border-radius: 12px; background: var(--soft); color: var(--good); font-size: 20px; font-weight: 800; }
.sdgood span b { font-size: 12px; color: var(--muted); font-weight: 700; }
.sdlink { text-decoration: none; color: var(--fg); }

.ba3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; max-width: 720px; }
.ba3 figure { margin: 0; position: relative; }
.ba3 img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; background: #ececec; }
.ba3 figcaption { position: absolute; left: 6px; bottom: 6px; font-size: 11px; font-weight: 800; color: #fff; background: rgba(0,0,0,.55); padding: 2px 7px; border-radius: 6px; }
.sdcare { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--soft); }
.sdcare ul { margin: 4px 0 0; padding-left: 18px; }

.sendcard { border-color: var(--accent); }
.sendcard .row { gap: 8px; }
.preview { position: fixed; inset: 0; z-index: 100; background: var(--bg); overflow: auto; }
.pv-bar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); }

.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.tbl th { color: var(--muted); font-weight: 600; }
.tbl .good { color: var(--good); } .tbl .bad { color: var(--warn-fg); }

/* 비밀번호 조건 (passwordForm) */
.pwrules { list-style: none; padding: 0; margin: 6px 0 2px; display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); }
.pwrules li::before { content: "○ "; }
.pwrules li.ok { color: var(--good); }
.pwrules li.ok::before { content: "✓ "; }
span.good { color: var(--good); font-weight: 600; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; }
.staffl li.off { opacity: .55; }

/* 내 피부 성분 가이드 (my.html ingCard) */
.ingcard .ing-h { font-weight: 700; font-size: .92rem; margin: 14px 0 6px; }
.ingcard .ing-h.good { color: var(--good); } .ingcard .ing-h.bad { color: var(--bad); }
.ingcard .inglist { display: grid; gap: 6px; }
.ingcard details.ing { border: 1px solid var(--line, rgba(127,127,127,.25)); border-radius: 10px; padding: 8px 12px; }
.ingcard details.ing summary { cursor: pointer; }
.ingcard details.ing p { margin: 6px 0 0; }
.ingcard .warnline { color: var(--warn-fg); }
.ingcard ul.inga { margin: 0; padding-left: 18px; }
.ingcard ul.inga li { margin: 3px 0; }
b.good { color: var(--good); }

/* 매장 기본 촬영 칸 (정면·왼쪽·오른쪽·영상): 칸마다 촬영 / 사진첩 */
.gslots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.gslot { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.gslot.done { border-color: var(--good); }
.gslot .gs-pic { aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.gslot .gs-pic img { width: 100%; height: 100%; object-fit: cover; }
.gslot .gs-empty { font-size: 2rem; color: var(--muted); }
.gslot .gs-btns { display: flex; gap: 6px; margin-top: 4px; }
.gslot .gs-btns button { flex: 1; padding-left: 4px; padding-right: 4px; }
.gslot .gs-del { align-self: flex-start; }
