/* =========================================================
   엠자모 — 디자인 토큰
   ========================================================= */
:root {
  --bg: #f7f5f1;          /* 따뜻한 흰색 */
  --surface: #ffffff;
  --surface-2: #efebe4;
  --text: #17181a;
  --text-2: #55524c;
  --muted: #696560;
  --border: #e4dfd6;
  --accent: #8a6a2f;      /* 브론즈: 강조 글자·선택 테두리 */
  --primary: #17181a;     /* 주 버튼 */
  --primary-strong: #000000;
  --on-primary: #f7f5f1;
  --primary-soft: #efe7d8;
  --chip: #17181a;
  --on-chip: #ffffff;
  --hair: #2b2a28;        /* 일러스트 머리카락 면 */
  --skin: #f3e8da;        /* 일러스트 피부·두피 */
  --tint: #eee5d6;        /* 정보·설명 띠 배경 */
  --panel-shadow: 0 1px 2px rgba(23,24,26,.05), 0 8px 24px rgba(23,24,26,.07);
  --ico-bg: #f3ecdf;
  --hl: rgba(201, 169, 110, .28); /* 굵은 글씨 형광펜 */
  --line-art: #17181a;    /* 일러스트 선 */
  --band: #17181a;        /* 헤더·푸터 띠 */
  --on-band: #ece8e1;
  --on-band-2: #a7a39b;
  --band-line: #2e2f33;
  --brand: #c9a96e;       /* 로고 M자 (띠 위) */
  --danger: #b3261e;      /* 경고 신호 결과에만 사용 */
  --danger-soft: #fbeaea;
  --focus: #8a6a2f;

  --radius: 6px;
  --radius-sm: 4px;
  --maxw: 1080px;
  --gutter: 20px;
  --tabbar-h: 60px;
  --tap: 48px;

  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17181a;
    --surface: #1f2023;
    --surface-2: #232428;
    --text: #ece8e1;
    --text-2: #b3afa7;
    --muted: #8d8981;
    --border: #2e2f33;
    --accent: #c9a96e;
    --primary: #c9a96e;
    --primary-strong: #d8bc86;
    --on-primary: #17181a;
    --primary-soft: #2c2820;
    --chip: #ece8e1;
    --on-chip: #17181a;
    --hair: #5e5952;
    --skin: #d6c4ab;
    --tint: #1f2124;
    --panel-shadow: 0 0 0 1px #2e2f33;
    --ico-bg: #2a2b2f;
    --hl: rgba(201, 169, 110, .22);
    --line-art: #8c8478;
    --band: #26282c;
    --on-band: #ece8e1;
    --on-band-2: #a7a39b;
    --band-line: #34363b;
    --danger: #ff8a80;
    --danger-soft: #3a1f1d;
    --focus: #c9a96e;
  }
}

/* =========================================================
   기본
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh;
}
body > main { flex: 1 0 auto; }
img, svg { max-width: 100%; height: auto; }
[hidden] { display: none !important; }
a { color: var(--primary); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.35; letter-spacing: -0.01em; }
h1 { font-size: 1.6rem; margin: 1.2rem 0 .6rem; }
h2 { font-size: 1.3rem; margin: 2.2rem 0 .7rem; }
h3 { font-size: 1.1rem; margin: 1.6rem 0 .5rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
main.wrap { padding-bottom: 2.5rem; min-height: 60vh; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* =========================================================
   헤더 (짙은 띠)
   ========================================================= */
.site-header { background: var(--band); color: var(--on-band); border-bottom: 1px solid var(--band-line); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; color: var(--on-band); text-decoration: none; min-height: var(--tap); }
.brand .logo-mark { color: var(--brand); }
.top-nav { display: none; align-items: center; gap: .25rem; }
.nav-group { position: relative; }
.nav-group summary, .nav-link {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; min-height: var(--tap);
  padding: 0 .85rem; color: var(--on-band-2); text-decoration: none; font-size: .95rem;
}
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after { content: ""; width: .4em; height: .4em; margin-left: .45em; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.nav-group summary:hover, .nav-link:hover, .nav-group[open] summary { color: var(--on-band); }
.nav-group ul { position: absolute; right: 0; top: 100%; margin: 0; padding: .35rem 0; list-style: none; min-width: 210px; background: var(--band); border: 1px solid var(--band-line); border-top: 0; }
.nav-group ul a { display: flex; align-items: center; min-height: var(--tap); padding: 0 1rem; color: var(--on-band); text-decoration: none; font-size: .95rem; }
.nav-group ul a:hover { background: var(--band-line); }

/* 모바일 하단 탭 바 */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(3, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--bg); border-top: 1px solid var(--border);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: var(--muted); text-decoration: none; font-size: .78rem; }
.tabbar svg { width: 22px; height: 22px; }
.tabbar a[aria-current="page"] { color: var(--text); font-weight: 700; }

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .top-nav { display: flex; }
  .tabbar { display: none; }
  h1 { font-size: 2.2rem; }
}

/* =========================================================
   푸터 (짙은 띠)
   ========================================================= */
.site-footer { background: var(--band); color: var(--on-band-2); border-top: 1px solid var(--band-line); padding: 1.6rem 0 2rem; margin-top: 3rem; font-size: .88rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 .25rem; margin: 0 0 .5rem -.6rem; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .6rem; color: var(--on-band); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-note { margin-bottom: .4rem; }
.footer-copy { margin: 0; }

/* =========================================================
   공통 컴포넌트
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 52px; padding: 0 1.4rem; border-radius: var(--radius-sm); border: 1.5px solid transparent;
  font: inherit; font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer;
  background: var(--primary); color: var(--on-primary);
}
.btn:hover { background: var(--primary-strong); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--text); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-block { display: flex; width: 100%; }

.disclaimer-box { margin: 2rem 0; padding: .9rem 1rem; background: var(--surface-2); border-radius: 10px; font-size: .9rem; color: var(--text-2); }
.disclaimer-box strong::before { content: "ⓘ "; color: var(--accent); }
.disclaimer-box strong { display: block; margin-bottom: .2rem; color: var(--text); }
.disclaimer-box p { margin-bottom: .3rem; }
.disclaimer-box a { color: var(--text-2); }

.hero .safe-note, .safe-note { display: flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--muted); margin: .6rem 0 0; }
.safe-note svg { width: 14px; height: 14px; flex: none; }

.ad-slot { margin: 2rem 0; min-height: 100px; }
.ad-label { display: block; font-size: .75rem; color: var(--muted); margin-bottom: .25rem; }

.notice { padding: .9rem 1rem; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); }

/* 선으로 구분하는 목록 (카드 대신) */
.row-label { font-size: .85rem; color: var(--muted); margin: 1.8rem 0 .2rem; font-weight: 500; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows a { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 60px; padding: .6rem 0; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; }
.rows a:hover b { text-decoration: underline; text-underline-offset: 4px; }
.rows b { font-weight: 600; }
.rows small { color: var(--muted); font-size: .88rem; text-align: right; flex: none; }

/* 본문형 페이지 */
.prose { max-width: 680px; }
.prose .lead { font-size: 1.08rem; color: var(--text-2); }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .35rem; }
.prose table { width: 100%; border-collapse: collapse; font-size: .93rem; margin: 1rem 0; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--border); padding: .55rem .6rem; text-align: left; vertical-align: top; }
.prose th { border-bottom: 1.5px solid var(--text); font-weight: 600; }
.prose th, .prose td:not(:last-child) { white-space: nowrap; }
.prose td:last-child { min-width: 14em; }
.meta-updated { margin-top: 2rem; font-size: .88rem; color: var(--muted); }

/* =========================================================
   홈
   ========================================================= */
/* 다시 온 사람: 지난 기록 안내 (이 기기 안의 임시 사진 날짜로만 판단) */
.ret { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; margin: 16px 0 0; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border: 0; box-shadow: var(--panel-shadow); border-radius: 12px; text-decoration: none; color: var(--text); }
.ret-k { font-size: .8rem; color: var(--muted); }
.ret-d { grid-column: 1; font-size: .95rem; }
.ret-go { grid-row: 1 / span 2; grid-column: 2; font-weight: 700; font-size: .9rem; color: var(--accent); }

.hero h1 { font-size: 1.85rem; line-height: 1.3; letter-spacing: -.025em; margin: 1.4rem 0 .7rem; font-weight: 700; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { color: var(--text-2); margin: 0; }
.cta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 1.3rem; }
.cta-card { display: grid; gap: 3px; padding: 15px 14px; background: var(--primary); color: var(--on-primary); border-radius: var(--radius); text-decoration: none; }
.cta-card:hover { background: var(--primary-strong); }
.cta-card b { font-size: 1rem; }
.cta-card span { font-size: .78rem; opacity: .8; }
.alt { display: grid; margin-top: .8rem; border-top: 1px solid var(--border); }
.alt a { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 52px; padding: 10px 0; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: .93rem; }
.alt a span { color: var(--text-2); font-size: .84rem; text-align: right; }

/* 겹쳐 찍기 시연 (일러스트 + CSS 애니메이션) */
.demo { margin: 1.6rem 0 0; }
.demo-frame { position: relative; aspect-ratio: 3 / 4; max-width: 300px; margin: 0 auto; background: #0d0e0f; border-radius: var(--radius); overflow: hidden; }
.demo-frame .illust { position: absolute; inset: 8% 6%; width: 88%; height: 84%; }
.demo-ghost, .demo-live, .demo-wipe { position: absolute; inset: 0; }
.demo-ghost { opacity: .35; }
.demo-live { animation: d-live 7s infinite; }
.demo-guide { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: rgba(255,255,255,.7); stroke-width: 1.4; stroke-dasharray: 6 6; animation: d-hide 7s infinite; }
.demo-ok { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); background: #c9a96e; color: #17181a; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; opacity: 0; animation: d-ok 7s infinite; }
.demo-wipe { opacity: 0; animation: d-show 7s infinite; }
.demo-wipe span { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; left: 50%; animation: d-wipe 7s infinite; }
.demo-wipe span::after { content: "‹ ›"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #17181a; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.demo-tag { position: absolute; bottom: 8px; font-size: .72rem; color: #ece8e1; background: rgba(0,0,0,.55); padding: 2px 7px; border-radius: 3px; opacity: 0; animation: d-show 7s infinite; }
.demo-tag.l { left: 8px; } .demo-tag.r { right: 8px; }
.demo figcaption { position: relative; height: 1.6em; margin-top: .6rem; text-align: center; font-size: .9rem; color: var(--text-2); }
.demo figcaption span { position: absolute; left: 0; right: 0; }
.demo .c1 { animation: d-hide 7s infinite; } .demo .c2 { opacity: 0; animation: d-show 7s infinite; }
@keyframes d-live { 0% { transform: translate(18px, -14px) scale(1.1); } 35%, 100% { transform: none; } }
@keyframes d-ok { 0%, 36% { opacity: 0; } 40%, 52% { opacity: 1; } 55%, 100% { opacity: 0; } }
@keyframes d-hide { 0%, 52% { opacity: 1; } 56%, 96% { opacity: 0; } 100% { opacity: 1; } }
@keyframes d-show { 0%, 54% { opacity: 0; } 58%, 95% { opacity: 1; } 100% { opacity: 0; } }
@keyframes d-wipe { 0%, 58% { left: 50%; } 72% { left: 22%; } 86% { left: 78%; } 95%, 100% { left: 50%; } }
@media (prefers-reduced-motion: reduce) {
  .demo * { animation: none !important; }
  .demo .c2, .demo-ok, .demo-wipe, .demo-tag { display: none; }
}

.steps { margin-top: 2.4rem; }
.steps h2 { font-size: 1.2rem; margin: 0 0 .3rem; }
.steps ol { list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; padding: 1rem 0; border-bottom: 1px solid var(--border); align-content: start; }
.steps .n { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--text); display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.steps b { font-size: 1.02rem; }
.steps p { margin: .15rem 0 0; color: var(--text-2); font-size: .95rem; }
.more { margin-top: .6rem; }

@media (min-width: 900px) {
  .ret { max-width: 560px; margin-top: 28px; }
  .home-top { display: grid; grid-template-columns: 1fr 360px; gap: 72px; align-items: center; padding-top: 1.5rem; }
  .hero h1 { font-size: 2.7rem; }
  .hero .lead { font-size: 1.08rem; max-width: 470px; }
  .cta, .alt { max-width: 470px; }
  .demo-frame { max-width: 360px; }
  .steps ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .steps li { grid-template-columns: 1fr; border-bottom: 0; border-top: 2px solid var(--text); }
  .more { max-width: 560px; }
}

/* 도구 페이지 머리 */
.tool-head .lead { color: var(--text-2); font-size: 1.05rem; }

/* 가이드 목록 */
.guide-list { list-style: none; padding: 0; margin: 0; }
.guide-list a { display: block; padding: 1rem 0; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); }
.guide-list strong { display: block; font-size: 1.05rem; margin-bottom: .15rem; }
.guide-list span { color: var(--muted); font-size: .93rem; }

/* =========================================================
   사진 도구 — 시작 화면
   ========================================================= */
html.no-scroll, html.no-scroll body { overflow: hidden; }
.photo-privacy { display: flex; gap: .7rem; padding: 1rem; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); margin: 1rem 0 .5rem; }
.photo-privacy svg { width: 22px; height: 22px; flex: none; color: var(--accent); margin-top: .15rem; }
.photo-privacy strong { display: block; }
.photo-privacy p { margin: .2rem 0 0; font-size: .93rem; color: var(--text-2); }
.photo-howto { padding-left: 1.2rem; margin: .3rem 0 1.2rem; }
.photo-howto li { margin-bottom: .35rem; }
.photo-actions { display: grid; gap: .6rem; max-width: 440px; }
.photo-pc-note { display: none; margin: 0 0 .9rem; font-size: .9rem; color: var(--text-2); }
@media (pointer: fine) { .photo-pc-note { display: block; } }
.photo-actions .is-suggested { border-width: 2px; }
.photo-msg { margin: .9rem 0 0; padding: .8rem 1rem; border-radius: var(--radius); background: var(--surface-2); font-size: .95rem; max-width: 440px; }
.photo-msg.is-error { background: var(--primary-soft); }
.photo-tips ul { padding-left: 1.2rem; }
@media (min-width: 900px) {
  .photo-tool { display: grid; grid-template-columns: 1fr 400px; grid-template-areas: "info panel"; gap: 48px; align-items: start; }
  .photo-info { grid-area: info; }
  .photo-info h2:first-child { margin-top: 1rem; }
  .photo-panel { grid-area: panel; position: sticky; top: 84px; margin-top: 1rem; padding: 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
  .photo-panel .photo-actions, .photo-panel .photo-msg { max-width: none; }
  .photo-tips { max-width: 680px; }
}
.photo-tips li { margin-bottom: .5rem; }

/* =========================================================
   촬영 화면 · 비교 화면 (항상 어두운 배경, 광고 없음)
   ========================================================= */
.cam, .cmp {
  position: fixed; inset: 0; z-index: 100; background: #0d0e0f; color: #ece8e1;
  display: flex; flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.cam[hidden], .cmp[hidden] { display: none; }
.cam-top { position: relative; z-index: 4; display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 4px; flex: none; }
.cam-title { font-weight: 600; font-size: .95rem; }
.cam-ic { width: 48px; height: 48px; display: grid; place-items: center; background: none; border: 0; color: inherit; cursor: pointer; border-radius: 50%; }
.cam-ic svg, .cam-side svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.cam-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 8px; }
.cam-box {
  position: relative; overflow: hidden; background: #000; border-radius: 4px;
  aspect-ratio: 3 / 4; height: 100%; max-height: 100%; max-width: 100%;
}
@supports not (aspect-ratio: 3 / 4) { .cam-box { width: 75vw; height: 100vw; } }
.cam-box video, .cam-ghost { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam.is-mirrored video, .cam.is-mirrored .cam-ghost { transform: scaleX(-1); }
.cam-ghost { pointer-events: none; }
.cam-guide { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; fill: none; stroke: rgba(255,255,255,.85); stroke-width: 1.6; filter: drop-shadow(0 0 1.5px rgba(0,0,0,.8)); }
.cam-guide .dash { stroke-dasharray: 6 6; stroke-width: 1.2; }
.cam-guide text { fill: rgba(255,255,255,.9); stroke: none; font-size: 11px; font-family: var(--font); }
.cam-count { position: absolute; inset: 0; display: grid; place-items: center; font-size: 96px; font-weight: 800; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.6); pointer-events: none; }
.cam-first { position: absolute; left: 10px; right: 10px; bottom: 10px; margin: 0; padding: .55rem .75rem; font-size: .82rem; line-height: 1.5; background: rgba(0,0,0,.6); border-radius: 4px; }

.cam-ghostbar { display: flex; align-items: center; gap: .7rem; padding: .6rem 20px 0; font-size: .85rem; flex: none; width: 100%; max-width: 520px; margin: 0 auto; }
.cam-ghostbar input { flex: 1; accent-color: #c9a96e; height: 32px; }
.cam-ghostbar output { width: 3em; text-align: right; font-variant-numeric: tabular-nums; }
.cam-bottom { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 14px 16px 18px; flex: none; width: 100%; max-width: 520px; margin: 0 auto; }
.cam-side { justify-self: center; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 72px; min-height: 56px; background: none; border: 0; color: #ece8e1; font: inherit; font-size: .78rem; cursor: pointer; }
.shutter { width: 72px; height: 72px; border-radius: 50%; border: 4px solid #fff; background: transparent; padding: 4px; cursor: pointer; }
.shutter span { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; transition: transform .1s; }
.shutter:active span { transform: scale(.9); }
.cam.is-counting .shutter span { background: #c9a96e; }

.cam-sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; background: #1f2023; padding: 1rem 16px calc(1rem + env(safe-area-inset-bottom)); border-radius: 12px 12px 0 0; display: grid; gap: .4rem; }
.cam-sheet[hidden] { display: none; }
.cam-sheet-title { margin: 0 0 .3rem; font-weight: 700; }
.cam-sheet button { min-height: 52px; text-align: left; padding: 0 1rem; background: #2a2b2f; color: #ece8e1; border: 0; border-radius: 6px; font: inherit; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.cam-sheet button small { color: #a7a39b; }

.cam-preview { position: absolute; inset: calc(56px + env(safe-area-inset-top)) 0 0 0; z-index: 2; background: #0d0e0f; display: flex; flex-direction: column; overflow-y: auto; }
.cam-preview[hidden] { display: none; }
.pv-box { flex: 1 0 auto; min-height: 240px; display: grid; place-items: center; padding: 0 8px; }
.pv-box img { max-width: 100%; max-height: 58vh; border-radius: 4px; }
.pv-panel { padding: 12px 20px 20px; display: grid; gap: .6rem; max-width: 480px; width: 100%; margin: 0 auto; }
.pv-note { margin: 0; font-size: .82rem; color: #a7a39b; line-height: 1.55; }
.pv-actions, .pv-after { display: grid; gap: .5rem; }
.pv-after[hidden] { display: none; }
.pv-status { margin: 0; font-size: .9rem; }
.cam .btn, .cmp .btn { background: #c9a96e; color: #17181a; }
.cam .btn-secondary, .cmp .btn-secondary { background: transparent; color: #ece8e1; border-color: #5a5852; }
.cam .btn-secondary:hover, .cmp .btn-secondary:hover { background: #26282c; }
.pwa { padding: .9rem 1rem; background: #1f2023; border-radius: 6px; }
.pwa[hidden] { display: none; }
.pwa p { margin: .25rem 0 .6rem; font-size: .9rem; color: #b3afa7; }
.pwa-actions { display: flex; gap: .5rem; }
.pwa-actions .btn { min-height: 44px; flex: 1; }

/* 비교 화면 */
.cmp-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 16px 24px; display: grid; grid-auto-rows: max-content; gap: .9rem; align-content: start; max-width: 720px; width: 100%; margin: 0 auto; }
.cmp-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cmp-slot { display: grid; gap: .35rem; font-size: .85rem; }
.cmp-slot-label { color: #a7a39b; }
.cmp-pick { display: flex; align-items: center; gap: .6rem; min-height: 64px; padding: 6px; background: #1f2023; border: 1px dashed #4a4945; border-radius: 6px; color: #ece8e1; font: inherit; cursor: pointer; text-align: left; }
.cmp-thumb { width: 42px; height: 56px; border-radius: 3px; background: #2a2b2f center / cover no-repeat; flex: none; }
.cmp-date { display: grid; gap: .2rem; color: #a7a39b; }
.cmp-date input { min-height: 44px; padding: 0 .5rem; background: #1f2023; color: #ece8e1; border: 1px solid #3a3b3f; border-radius: 6px; font: inherit; color-scheme: dark; width: 100%; }
.cmp-date-hint { color: #c9a96e; font-size: .78rem; line-height: 1.4; min-height: 0; }
.cmp-views { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #3a3b3f; border-radius: 6px; overflow: hidden; }
.cmp-views button { min-height: 44px; background: none; border: 0; color: #a7a39b; font: inherit; font-size: .92rem; cursor: pointer; }
.cmp-views button + button { border-left: 1px solid #3a3b3f; }
.cmp-views [aria-checked="true"] { background: #ece8e1; color: #17181a; font-weight: 700; }
.cmp-stage { display: grid; gap: 6px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.cmp-stage[data-view="side"] { grid-template-columns: 1fr 1fr; }
.cmp-stage[data-view="wipe"], .cmp-stage.is-adjust { touch-action: none; }
.cmp-stage[data-view="side"], .cmp-stage[data-view="wipe"], .cmp-stage[data-view="overlay"] { max-width: 520px; width: 100%; justify-self: center; }
.cmp-frame { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: #000; border-radius: 4px; }
.cmp-stage.is-adjust .cmp-frame { outline: 2px solid #c9a96e; outline-offset: -2px; cursor: move; }
.cmp-frame img { position: absolute; max-width: none; pointer-events: none; }
.cmp-handle { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 4px rgba(0,0,0,.7); pointer-events: none; }
.cmp-handle::after { content: "‹ ›"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 36px; height: 36px; border-radius: 50%; background: #fff; color: #17181a; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.cmp-empty { grid-column: 1 / -1; margin: 0; padding: 3rem 1rem; text-align: center; color: #8d8981; border: 1px dashed #3a3b3f; border-radius: 6px; }
.cmp-ctrl { display: flex; align-items: center; gap: .7rem; font-size: .85rem; color: #a7a39b; }
.cmp-ctrl[hidden] { display: none; }
.cmp-ctrl input { flex: 1; accent-color: #c9a96e; height: 32px; }
.cmp-tools { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.cmp-tools [aria-pressed="true"] { background: #ece8e1; color: #17181a; border-color: #ece8e1; }
.cmp-hint { margin: 0; font-size: .85rem; color: #c9a96e; }
.cmp-hint[hidden] { display: none; }
.cmp-status { margin: 0; font-size: .9rem; min-height: 1em; }
.cmp-note { margin: 0; font-size: .8rem; color: #8d8981; line-height: 1.55; }
.cmp .btn[disabled] { opacity: .4; cursor: not-allowed; }
@media (min-width: 1000px) {
  /* PC: 왼쪽 조작, 오른쪽 사진 */
  .cmp-body { max-width: 1180px; grid-template-columns: 340px 1fr; column-gap: 32px; grid-auto-flow: dense; }
  .cmp-body > * { grid-column: 1; }
  .cmp-body > .cmp-stage { grid-column: 2; grid-row: 1 / span 9; max-width: none; width: 100%; align-self: start; }
  .cmp-stage[data-view="wipe"] .cmp-frame, .cmp-stage[data-view="overlay"] .cmp-frame { width: 100%; max-width: calc(100vh - 110px); justify-self: center; }
  .cmp-stage[data-view="side"] .cmp-frame { max-height: calc(100vh - 90px); }
  .cmp-slots { grid-template-columns: 1fr; }
}

/* =========================================================
   그림 체크 도구
   ========================================================= */
.check-note { color: var(--text-2); font-size: .95rem; }
.check-howto { padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); font-size: .95rem; }
.check-howto p { margin: 0 0 .4rem; } .check-howto p:last-child { margin: 0; }
.check-howto a { color: var(--text); font-weight: 600; }
.check-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 1.4rem 0 1rem; border-bottom: 1px solid var(--border); }
.check-tabs [role="tab"] { min-height: 48px; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; font: inherit; color: var(--muted); cursor: pointer; }
.check-tabs [aria-selected="true"] { color: var(--text); font-weight: 700; border-bottom-color: var(--text); }
.check { margin-top: 1rem; }
.check-prompt { font-weight: 600; margin: 0 0 .7rem; }
.check-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
@media (min-width: 640px) { .check-grid { grid-template-columns: repeat(3, 1fr); } .check-grid--4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px) { .check-grid--5 { grid-template-columns: repeat(5, 1fr); } }
.check-card {
  width: 100%; height: 100%; display: grid; justify-items: center; gap: .1rem; padding: .8rem .5rem .7rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  font: inherit; color: var(--text); cursor: pointer;
}
.check-card .illust { width: 74%; max-width: 150px; }
.check-num { font-size: .85rem; color: var(--muted); font-weight: 600; margin-top: .3rem; }
.check-label { font-size: .88rem; line-height: 1.35; text-align: center; }
.check-card:hover { border-color: var(--text-2); }
.check-card[aria-checked="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.check-card[aria-checked="true"] .check-num { color: var(--accent); }
.check-card[aria-checked="true"] .check-num::before { content: "✓ "; }
.check-fignote { font-size: .8rem; color: var(--muted); margin: .6rem 0 0; }
.check-actions { display: grid; gap: .6rem; margin-top: 1rem; max-width: 520px; }
.check-go[disabled] { opacity: .45; cursor: default; }
.check-mine { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: 1rem; max-width: 520px; }
.check-mine figure { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .5rem; display: grid; place-items: center; }
.check-mine img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px; }
.check-mine .illust { width: 80%; }
.check-mine figcaption { font-size: .8rem; color: var(--muted); margin-top: .3rem; }
.check-mine-hint { grid-column: 1 / -1; margin: 0; font-size: .8rem; color: var(--muted); }
.check.has-result .check-actions { display: none; }
.check-result { margin-top: 1.5rem; padding: 1.25rem; background: var(--surface); border: 0; box-shadow: var(--panel-shadow); border-radius: 12px; display: grid; gap: .8rem; max-width: 640px; scroll-margin-top: 76px; }
.check-result:focus { outline: none; }
.check-result-head { display: grid; grid-template-columns: 88px 1fr; gap: 1rem; align-items: start; }
.check-result h2 { margin: 0 0 .3rem; font-size: 1.2rem; }
.check-result-head p { margin: 0; color: var(--text-2); }
.check-record { margin: 0; font-size: .95rem; }
.check-consult { padding: .8rem 1rem; background: var(--surface-2); border-radius: var(--radius); }
.check-consult p { margin: .2rem 0 0; font-size: .93rem; }
.check-consult-low { margin: 0; font-size: .9rem; color: var(--text-2); }

/* 관찰 가이드: 먼저 볼 세 곳 */
.look { display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: center; padding: 16px; margin: .5rem 0 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); max-width: 720px; }
.look-fig { position: relative; }
.look-fig .illust { width: 100%; display: block; }
.look-marks { position: absolute; inset: 0; width: 100%; height: 100%; }
.look-title { font-size: 1.05rem; margin: 0 0 .2rem; }
.look-intro { margin: 0 0 .6rem; font-size: .88rem; color: var(--text-2); }
.look-list { margin: 0; padding-left: 1.25rem; display: grid; gap: .5rem; }
.look-list li::marker { font-weight: 700; color: var(--accent); }
.look-list b { display: block; font-size: .97rem; }
.look-list span { display: block; font-size: .88rem; color: var(--text-2); line-height: 1.5; }
.near-title { font-size: 1.05rem; margin: 1.8rem 0 .3rem; }
.near-title small { font-weight: 400; color: var(--muted); font-size: .85rem; }
.check-fignote { font-size: .86rem; color: var(--text-2); margin: 0 0 .9rem; max-width: 720px; }
@media (min-width: 900px) { .look { grid-template-columns: 180px 1fr; padding: 24px; gap: 28px; } }

/* =========================================================
   첫 화면 다이어트: 제목·한 줄 설명 → 기능 → 상세 설명
   ========================================================= */
.tool-head h1 { font-size: 1.45rem; margin: 1rem 0 .25rem; }
.tool-head .lead { font-size: .95rem; margin: 0 0 .9rem; }
.photo-panel { margin-top: .2rem; }
.photo-panel .safe-note { margin-top: .7rem; }
.photo-info h2 { font-size: 1.1rem; margin: 2rem 0 .5rem; }
.photo-info .photo-privacy { margin-top: 1rem; }
.check { margin-top: .4rem; }
.check-prompt { margin: 0 0 .55rem; font-size: .95rem; }
.check-prompt small { font-weight: 400; color: var(--muted); font-size: .8rem; }
.check-tabs { margin: .2rem 0 .7rem; }
.check-card { padding: .55rem .4rem .5rem; }
.check-card .illust { width: 62%; }
.check-label { font-size: .82rem; }
.check-look { padding: .75rem .9rem; background: var(--surface-2); border-radius: var(--radius); font-size: .92rem; }
.check-look p { margin: 0 0 .3rem; }
.check-look ol { margin: 0; padding-left: 1.2rem; font-weight: 600; }
.tool-detail { margin-top: 2.2rem; max-width: 720px; }
.tool-detail > h2 { font-size: 1.1rem; margin: 1.8rem 0 .4rem; }
.tool-detail > p { color: var(--text-2); font-size: .95rem; }
/* 홈 첫 화면 */
.hero h1 { font-size: 1.6rem; margin: 1rem 0 .4rem; }
.hero .lead { font-size: .95rem; }
.cta { margin-top: 1rem; }
@media (min-width: 900px) {
  .tool-head h1 { font-size: 2rem; margin-top: 1.6rem; }
  .tool-head .lead { font-size: 1.05rem; }
  .check-card .illust { width: 70%; }
  .hero h1 { font-size: 2.7rem; margin-top: 1.4rem; }
  .hero .lead { font-size: 1.08rem; }
}
@media (min-width: 900px) { .check-grid--6 { grid-template-columns: repeat(6, 1fr); } .check-grid--4 { max-width: 760px; } }

/* =========================================================
   점검 반영: 버튼과 설명 구분
   ========================================================= */
/* 보조 동작은 버튼이 아니라 글자 링크로 (주 버튼과 무게 차이) */
.link-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0; background: none; border: 0; font: inherit; font-size: .92rem; font-weight: 600; color: var(--text); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--border); cursor: pointer; }
.link-btn:hover { text-decoration-color: currentColor; }
.link-btn.is-suggested { color: var(--accent); text-decoration-color: currentColor; }
.photo-panel .link-btn { margin-top: .3rem; }
.check-actions { margin-top: .6rem; gap: .3rem; }
/* PC 안내는 실제 PC 폭에서만 */
.photo-pc-note { display: none !important; }
@media (min-width: 900px) and (pointer: fine) { .photo-pc-note { display: block !important; } }
.photo-privacy-text { color: var(--text-2); font-size: .95rem; }
.photo-howto li { color: var(--text); }
/* 관찰 가이드: 휴대폰에서는 그림 위, 글 아래로 쌓기 */
@media (max-width: 599px) {
  .look { grid-template-columns: 1fr; justify-items: start; }
  .look-fig { width: 120px; justify-self: center; }
}
/* 비교 화면: 보조 버튼은 낮게 */
.cmp-tools .btn { min-height: 44px; font-size: .9rem; font-weight: 600; }

/* 비교 화면: 층·기준선·날짜 표시 */
.cmp-layer { position: absolute; inset: 0; overflow: hidden; }
.cmp-frame .cam-guide { display: none; z-index: 2; }
.cmp-stage.is-adjust .cmp-frame .cam-guide { display: block; }
.cmp-badge { position: absolute; top: 8px; z-index: 3; padding: 3px 8px; border-radius: 4px; background: rgba(0,0,0,.65); color: #fff; font-size: .78rem; font-weight: 700; pointer-events: none; font-variant-numeric: tabular-nums; }
.cmp-badge.l { left: 8px; } .cmp-badge.r { right: 8px; }
.cmp-badge.c { left: 50%; transform: translateX(-50%); background: #c9a96e; color: #17181a; }
.cmp-badge.c.is-a { background: #ece8e1; }
.cmp-handle { z-index: 3; }
.cmp-ctrl--col { flex-direction: column; align-items: stretch; gap: .5rem; }
.cmp-ctrl-note { margin: 0; font-size: .82rem; color: #a7a39b; }
.cmp-op-row { display: flex; align-items: center; gap: .7rem; }
.cmp-op-row input { flex: 1; accent-color: #c9a96e; height: 32px; }
.cmp-seg { display: flex; align-items: center; gap: 0; border: 1px solid #3a3b3f; border-radius: 6px; overflow: hidden; }
.cmp-seg button { flex: 1; min-height: 40px; background: none; border: 0; color: #a7a39b; font: inherit; font-size: .88rem; cursor: pointer; }
.cmp-seg button + button { border-left: 1px solid #3a3b3f; }
.cmp-seg [aria-pressed="true"] { background: #ece8e1; color: #17181a; font-weight: 700; }
.cmp-target span { padding: 0 .8rem; font-size: .82rem; color: #a7a39b; white-space: nowrap; border-right: 1px solid #3a3b3f; align-self: stretch; display: flex; align-items: center; }
.cmp .cmp-tools .btn[aria-pressed="true"] { background: #ece8e1; color: #17181a; border-color: #ece8e1; }

/* =========================================================
   자가 체크리스트
   ========================================================= */
.cl { max-width: 720px; }
.cl-group { border: 0; margin: 0 0 1.4rem; padding: 0; }
.cl-group legend { font-size: 1.05rem; font-weight: 700; padding: 0; margin-bottom: .2rem; }
.cl-hint { margin: 0 0 .4rem; font-size: .85rem; color: var(--text-2); }
.cl-q { padding: .8rem 0; border-bottom: 1px solid var(--border); }
.cl-q p { margin: 0 0 .5rem; font-size: .97rem; line-height: 1.55; }
.cl-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cl-opts--3 { grid-template-columns: 1fr 1fr 1fr; }
.cl-opts label { position: relative; }
.cl-opts input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.cl-opts span { display: flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); font-size: .92rem; color: var(--text-2); }
.cl-opts input:checked + span { background: var(--chip); color: var(--on-chip); border-color: var(--chip); font-weight: 700; }
.cl-opts input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.cl-bar { padding-top: .3rem; }
.cl-bar .btn[disabled] { opacity: .55; cursor: default; }
.cl-nosave { margin: .4rem 0 0; font-size: .8rem; color: var(--muted); text-align: center; }
.cl-result { max-width: 720px; display: grid; gap: .9rem; }
.cl-result:focus { outline: none; }
.cl-result h2 { font-size: 1.25rem; margin: 0 0 .3rem; }
.cl-result p { margin: 0; }
.cl-warn { padding: 1rem 1.1rem; border-radius: 12px; background: var(--danger-soft); }
.cl-warn h2::before { content: "⚠ "; }
.cl-warn h2 { color: var(--danger); }
.cl-picked-t { margin-top: .6rem !important; font-size: .85rem; font-weight: 700; }
.cl-picked { margin: .2rem 0 0; padding-left: 1.2rem; font-size: .92rem; }
.cl-res { padding: 1rem 1.1rem; border-radius: 12px; background: var(--surface); box-shadow: var(--panel-shadow); }
.cl-count { font-size: .85rem; color: var(--muted); }
.cl-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 900px) { .cl-bar { max-width: 480px; } .cl-cta { max-width: 480px; } }
.cl-q { scroll-margin: 80px 0 160px; }
.cl-group:last-of-type { padding-bottom: .5rem; }

.cmp-flip { justify-self: start; min-height: 36px; padding: 0 .7rem; background: #1f2023; border: 1px solid #3a3b3f; border-radius: 6px; color: #ece8e1; font: inherit; font-size: .82rem; cursor: pointer; }
.cmp-flip[aria-pressed="true"] { background: #ece8e1; color: #17181a; border-color: #ece8e1; font-weight: 700; }
.cmp-tools:has(.btn[hidden]) { grid-template-columns: 1fr; }
.ios-hint { margin: -.1rem 0 0; font-size: .8rem; color: #c9a96e; text-align: center; }

/* 비교 기준선 (위치 맞추기 중에만 표시, 끌어서 이동) */
.cmp-guides { position: absolute; inset: 0; z-index: 2; display: none; pointer-events: none; }
.cmp-stage.is-adjust .cmp-guides { display: block; }
.gl { position: absolute; pointer-events: auto; touch-action: none; }
.gl-y { left: 0; right: 0; height: 32px; margin-top: -16px; cursor: ns-resize; }
.gl-x { top: 0; bottom: 0; width: 32px; margin-left: -16px; cursor: ew-resize; }
.gl::before { content: ""; position: absolute; background: none; }
.gl-y::before { left: 0; right: 0; top: 15px; border-top: 2px dashed #c9a96e; filter: drop-shadow(0 0 1px rgba(0,0,0,.9)); }
.gl-x::before { top: 0; bottom: 0; left: 15px; border-left: 2px dashed #c9a96e; filter: drop-shadow(0 0 1px rgba(0,0,0,.9)); }
.gl.is-drag::before { border-style: solid; border-color: #fff; }
.gl span { position: absolute; padding: 2px 7px; border-radius: 999px; background: #c9a96e; color: #17181a; font-size: .7rem; font-weight: 700; white-space: nowrap; pointer-events: none; }
.gl-y span { right: 4px; top: 50%; transform: translateY(-50%); }
.gl-x span { bottom: 34px; left: 50%; transform: translateX(-50%); }

/* 위치 맞추기: 한 장 크게, 단계 안내, 점 표시 */
.cmp.is-aligning .cmp-slots, .cmp.is-aligning .cmp-views, .cmp.is-aligning .cmp-ctrl, .cmp.is-aligning .cmp-tools,
.cmp.is-aligning [data-cmp="save"], .cmp.is-aligning .cmp-status, .cmp.is-aligning .cmp-note, .cmp.is-aligning .ios-hint, .cmp.is-aligning .cmp-hint { display: none !important; }
.cmp-stage[data-view="align"] { max-width: 520px; width: 100%; justify-self: center; touch-action: none; }
.cmp-align { display: grid; gap: .6rem; }
.cmp-align-msg { margin: 0; font-size: .95rem; line-height: 1.5; }
.cmp-align-msg strong { color: #c9a96e; }
.cmp-align-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.cmp-align-btns button { min-height: 40px; padding: 0 .8rem; background: #1f2023; border: 1px solid #3a3b3f; border-radius: 6px; color: #ece8e1; font: inherit; font-size: .85rem; cursor: pointer; }
.cmp-align-btns button[aria-pressed="true"] { background: #ece8e1; color: #17181a; font-weight: 700; }
.cmp-align-btns .is-primary { margin-left: auto; background: #c9a96e; color: #17181a; border-color: #c9a96e; font-weight: 700; padding: 0 1.2rem; }
.cmp-stage[data-view="align"]:not(.is-fine) .cmp-frame { cursor: crosshair; }
.cmp-stage[data-view="align"] .cmp-guides { display: none; }
.cmp-stage[data-view="align"].is-fine .cmp-guides { display: block; }
.cmp-stage[data-view="align"].is-fine:not(.is-lines) .gl { pointer-events: none; }
.cmp-stage[data-view="align"].is-fine:not(.is-lines) .gl::before { opacity: .55; }
.cmp-marks { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.mk { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 2px solid #fff; background: rgba(201,169,110,.85); color: #17181a; font-size: .7rem; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 1px rgba(0,0,0,.6); }
.mk-a { background: rgba(201,169,110,.9); }
.mk-b { background: rgba(236,232,225,.9); }
.cmp-stage.is-fine .mk-a { background: transparent; color: #fff; text-shadow: 0 0 2px #000; }

/* 함께 확대 · 표시선 */
.cmp-stage[data-view="side"], .cmp-stage[data-view="overlay"] { touch-action: none; }
.cmp-tools { display: flex !important; gap: .5rem; } .cmp-tools .btn { flex: 1; padding: 0 .5rem; }
.cmp-zoom-hint { margin: -.3rem 0 0; font-size: .8rem; color: #8d8981; line-height: 1.5; }
.mkline { position: absolute; left: 0; right: 0; height: 32px; margin-top: -16px; z-index: 3; cursor: ns-resize; touch-action: none; }
.mkline::before { content: ""; position: absolute; left: 0; right: 0; top: 15px; border-top: 2px dashed #c9a96e; filter: drop-shadow(0 0 1px rgba(0,0,0,.9)); }
.mkline span { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); padding: 2px 7px; border-radius: 999px; background: #c9a96e; color: #17181a; font-size: .7rem; font-weight: 700; pointer-events: none; }
.cmp-tools [data-cmp="mark"][aria-pressed="true"] { background: #ece8e1; color: #17181a; border-color: #ece8e1; }

.hero-kicker { margin: 1rem 0 0 !important; font-size: .85rem !important; font-weight: 700; color: var(--accent) !important; letter-spacing: .01em; }
.hero-kicker + h1 { margin-top: .25rem !important; }

/* 정사각형: 홈 시연 그림은 작게, 비교 화면 사진 칸은 정사각형 */
.demo-frame { aspect-ratio: 1 / 1; max-width: 220px; }
.demo-frame .illust { inset: 6% 12%; width: 76%; height: 88%; }
.demo { margin-top: 1.2rem; }
@media (min-width: 900px) { .demo-frame { max-width: 340px; } }
.cmp-frame { aspect-ratio: 1 / 1; }

/* =========================================================
   구역 나누기: 정보(띠) · 기능(패널) · 설명(띠)
   ========================================================= */
.band { margin: 0 calc(-1 * var(--gutter)); padding: 1.4rem var(--gutter); background: var(--tint); }
@media (min-width: 1120px) { .band { margin-inline: calc(50% - 50vw); padding-inline: calc(50vw - 50% + var(--gutter)); } }
.band-info { padding-top: .6rem; padding-bottom: 1.6rem; }
.band-info .hero-kicker { margin-top: .8rem !important; }
.band-info h1 { font-size: 1.6rem; line-height: 1.3; letter-spacing: -.025em; margin: .25rem 0 .5rem; font-weight: 700; }
.band-info h1 em { font-style: normal; color: var(--accent); }
.band-info .lead { margin: 0; color: var(--text-2); font-size: .95rem; }
.pc-only { display: none; }
.panel { position: relative; margin: -.9rem 0 0; padding: 1rem 1rem .9rem; background: var(--surface); border-radius: 12px; box-shadow: var(--panel-shadow); }
.panel-title { margin: 0 0 .7rem; font-size: .8rem; font-weight: 700; letter-spacing: .04em; color: var(--accent); }
.panel .cta { margin-top: 0; }
.panel .alt a:last-child { border-bottom: 0; }
.panel .safe-note { margin-top: .5rem; }
.band-how { margin-top: 2rem; }
.band-how h2 { font-size: 1.15rem; margin: 0 0 .8rem; }
.how-grid { display: grid; gap: 1rem; }
.band-how .demo { margin: 0; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.steps li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; padding: .85rem .9rem; border: 0; background: var(--surface); border-radius: 10px; }
.steps .n { width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-primary); display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
[data-theme] .steps .n, .steps .n { color: #fff; }
@media (prefers-color-scheme: dark) { .steps .n { color: #17181a; } }
.section-h { font-size: 1.15rem; margin: 2rem 0 .8rem; }

/* 카드형 메뉴 */
.hub-list { display: grid; gap: .7rem; margin-top: .4rem; }
.hub-card { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; background: var(--surface); border-radius: 12px; box-shadow: var(--panel-shadow); text-decoration: none; color: var(--text); min-height: 84px; }
.hub-card:hover { box-shadow: 0 0 0 2px var(--accent); }
.hub-ico { width: 56px; height: 56px; border-radius: 12px; background: var(--ico-bg); color: var(--accent); display: grid; place-items: center; overflow: hidden; }
.hub-ico svg { width: 32px; height: 32px; }
.hub-ico .illust { width: 44px; height: 44px; }
.hub-txt b { display: block; font-size: 1.02rem; }
.hub-txt span { display: block; font-size: .86rem; color: var(--text-2); line-height: 1.45; margin-top: 2px; }
.hub-go { color: var(--accent); font-weight: 700; font-size: 1.1rem; }
.hub-foot { margin-top: 1.2rem; font-size: .88rem; color: var(--text-2); }
.tool-head { margin: 0 calc(-1 * var(--gutter)) 1rem; padding: .2rem var(--gutter) 1rem; background: var(--tint); }
@media (min-width: 1120px) { .tool-head { margin-inline: calc(50% - 50vw); padding-inline: calc(50vw - 50% + var(--gutter)); } }
.tool-head h1 { margin-top: .9rem; }
.tool-head .lead { margin-bottom: 0; }

@media (min-width: 900px) {
  .pc-only { display: block; }
  .m-only { display: none; }
  .band-info { padding-top: 1.5rem; padding-bottom: 3rem; }
  .info-grid { display: grid; grid-template-columns: 1fr 300px; gap: 64px; align-items: center; }
  .band-info h1 { font-size: 2.6rem; }
  .band-info .lead { font-size: 1.08rem; max-width: 520px; }
  .panel { margin-top: -1.8rem; padding: 1.4rem 1.6rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; align-items: start; }
  .panel-title { grid-column: 1 / -1; }
  .panel .alt { margin-top: 0; border-top: 0; }
  .panel .safe-note { grid-column: 1 / -1; }
  .band-how { padding-top: 2rem; padding-bottom: 2.4rem; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .steps li { grid-template-columns: 1fr; }
  .hub-list--2 { grid-template-columns: 1fr 1fr; }
  .hub-list { max-width: 960px; }
  .demo-frame { max-width: 300px; }
}

/* =========================================================
   하단 메뉴 바: 더 눈에 띄게 (짙은 띠 + 금색 선택 표시)
   ========================================================= */
.tabbar { background: var(--band); border-top: 0; box-shadow: 0 -4px 16px rgba(0,0,0,.18); }
.tabbar a { position: relative; color: var(--on-band-2); font-size: .8rem; font-weight: 600; gap: 3px; }
.tabbar svg { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { color: var(--brand); }
.tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); }
.nav-link[aria-current="page"] { color: var(--brand); }
.band-info .hero-kicker { color: #6e5422 !important; }
@media (prefers-color-scheme: dark) { .band-info .hero-kicker { color: #c9a96e !important; } }

/* PC: 사진 고르기·지난 사진 선택 창은 가운데 작은 창으로 */
@media (min-width: 900px) {
  .cam-sheet { left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -50%); width: 380px; border-radius: 12px; padding: 1.2rem; box-shadow: 0 0 0 100vmax rgba(0,0,0,.55), 0 12px 40px rgba(0,0,0,.5); }
}
.cmp .cam-sheet { position: fixed; }
.cmp .link-btn { color: #ece8e1; text-decoration-color: #5a5852; }

/* =========================================================
   글 페이지 (소개·개인정보·약관·면책·문의, 앞으로 가이드도 같은 틀)
   머리 띠 → 목차 → 흰 본문 카드. 왼쪽 막대 장식은 쓰지 않음.
   ========================================================= */
.doc-head { margin: 0 calc(-1 * var(--gutter)); padding: 1rem var(--gutter) 2.6rem; background: var(--tint); }
@media (min-width: 1120px) { .doc-head { margin-inline: calc(50% - 50vw); padding-inline: calc(50vw - 50% + var(--gutter)); } }
.doc-head h1 { margin: .4rem 0 .4rem; }
.doc-head .lead { margin: 0; color: var(--text-2); font-size: 1rem; max-width: 680px; }
.doc-meta { margin: .6rem 0 0; font-size: .82rem; color: var(--muted); }
.doc-toc { position: relative; margin: -1.6rem 0 1rem; padding: .9rem 1rem; background: var(--surface); border-radius: 12px; box-shadow: var(--panel-shadow); max-width: 760px; }
.doc-toc p { margin: 0 0 .4rem; font-size: .78rem; font-weight: 700; color: var(--accent); letter-spacing: .04em; }
.doc-toc ol { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; counter-reset: t; }
.doc-toc li { counter-increment: t; }
.doc-toc a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 .75rem; border-radius: 999px; background: var(--surface-2); color: var(--text); text-decoration: none; font-size: .85rem; }
.doc-toc a::before { content: counter(t); font-weight: 700; color: var(--accent); font-size: .78rem; }
.doc-toc a:hover { background: var(--primary-soft); }
.doc-body { position: relative; max-width: 760px; margin: 0; padding: 1.2rem 1.1rem 1.4rem; background: var(--surface); border-radius: 12px; box-shadow: var(--panel-shadow); counter-reset: h2; }
.doc-head + .doc-body { margin-top: -1.6rem; }
.doc-body > :first-child { margin-top: 0; }
.doc-body h2 { counter-increment: h2; display: flex; align-items: center; gap: .55rem; font-size: 1.12rem; margin: 2rem 0 .6rem; scroll-margin-top: 76px; }
.doc-body h2::before { content: counter(h2); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--primary-soft); color: var(--accent); font-size: .8rem; font-weight: 800; display: grid; place-items: center; }
.doc-body h2:first-child, .doc-body > p:first-child + h2 { margin-top: .4rem; }
.doc-body strong { background: linear-gradient(transparent 62%, var(--hl) 62%); padding: 0 .1em; }
.doc-body ul { list-style: none; padding-left: 0; }
.doc-body ul > li { position: relative; padding-left: 1.1rem; }
.doc-body ul > li::before { content: ""; position: absolute; left: .2rem; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.doc-body ol { padding-left: 1.3rem; }
.doc-body ol > li::marker { color: var(--accent); font-weight: 700; }
.doc-body table { border-radius: 8px; }
.doc-body th { background: var(--surface-2); border-bottom: 0; }
.doc-body a { color: var(--accent); }
.doc-body .btn { color: var(--on-primary); }
@media (min-width: 900px) {
  .doc-head { padding-top: 1.6rem; padding-bottom: 3.2rem; }
  .doc-body { padding: 2rem 2.4rem 2.2rem; }
  .doc-toc { padding: 1rem 1.4rem; }
}
.doc-body--plain h2::before { display: none; }

/* 목차: 기본 접힘 (한 줄), 누르면 펼침 */
.doc-toc { padding: 0; }
.doc-toc summary { list-style: none; display: flex; align-items: center; gap: .5rem; min-height: 48px; padding: 0 1rem; cursor: pointer; font-size: .9rem; font-weight: 700; color: var(--text); }
.doc-toc summary::-webkit-details-marker { display: none; }
.doc-toc summary span { font-size: .75rem; font-weight: 700; color: var(--accent); background: var(--primary-soft); border-radius: 999px; padding: 1px 8px; }
.doc-toc summary::after { content: ""; margin-left: auto; width: .5em; height: .5em; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.doc-toc[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.doc-toc ol { padding: 0 1rem 1rem; }
.doc-toc--plain a::before { display: none; }

/* =========================================================
   하단 메뉴 바 B: 바닥에서 띄운 둥근 바, 선택은 금색 둥근 칸
   ========================================================= */
:root { --tabbar-h: 84px; }
.tabbar {
  left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom));
  height: 64px; padding: 6px; gap: 4px;
  border-radius: 20px; border: 0;
  background: var(--band);
  box-shadow: 0 8px 24px rgba(0,0,0,.28), 0 0 0 1px rgba(255,255,255,.04);
}
.tabbar a { border-radius: 15px; color: #c9c4bb; font-size: .78rem; font-weight: 600; gap: 2px; }
.tabbar a[aria-current="page"] { background: var(--brand); color: #17181a; }
.tabbar a[aria-current="page"]::before { display: none; }
.tabbar svg { width: 22px; height: 22px; }
.doc-toc summary span { color: var(--text); }

/* 지난 기록 안내 + 닫기: 정보 띠 안 맨 위, 두 줄 이내 */
.ret-wrap { position: relative; margin: .8rem 0 .4rem; }
.ret-wrap .ret { margin: 0; display: flex; align-items: center; gap: 10px; padding: 10px 52px 10px 14px; border-radius: 12px; }
.ret-txt { flex: 1; min-width: 0; display: grid; }
.ret-txt small, .ret-txt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ret-txt small { font-size: .78rem; color: var(--muted); }
.ret-txt b { font-size: .95rem; }
.ret-wrap .ret-go { flex: none; padding: 6px 12px; border-radius: 999px; background: var(--primary); color: var(--on-primary); font-size: .82rem; font-weight: 700; }
.ret-x { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center; background: none; border: 0; border-radius: 50%; color: var(--muted); cursor: pointer; }
.ret-x svg { width: 18px; height: 18px; }
.ret-x:hover { background: var(--surface-2); }
.ret-wrap.is-due .ret { box-shadow: 0 0 0 2px var(--brand), var(--panel-shadow); }
@media (min-width: 900px) { .ret-wrap { max-width: 560px; margin-top: 0; } }

/* =========================================================
   그림 파일(WebP) 표시: 흰 배경 그림을 둥근 타일로 (다크 모드에서도 자연스럽게)
   ========================================================= */
img.illust { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; border-radius: 10px; background: #fff; object-fit: cover; }
.check-card img.illust { width: 92%; max-width: 200px; }
.check-card { padding: .5rem .5rem .55rem; }
.check-result-head img.illust { width: 88px; }
.check-mine img.illust { width: 100%; }
.look-fig img.illust { width: 100%; }
.hub-ico img.illust { width: 56px; height: 56px; border-radius: 12px; }
.hub-ico { overflow: hidden; }
.demo-frame { background: #fff; }
.demo-frame img.illust { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; }
.demo-guide { stroke: rgba(23,24,26,.35) !important; }
@media (prefers-color-scheme: dark) { img.illust { filter: brightness(.94); } }

/* =========================================================
   홈 (시안 B): 제목+기록 버튼 / 예시 비교 화면 / 신뢰 띠 / 할 수 있는 것 / 비교 이미지 예시
   ========================================================= */
/* 줄바꿈: 의미 단위로 끊고(.nw), 문단은 줄 길이를 고르게 */
.nw { display: inline-block; }
h1, h2, .lead, .sm figcaption, .feat p, .rp p, .hub-txt span { text-wrap: balance; }
p { text-wrap: pretty; }
.hero-b .hero-kicker { margin-top: .9rem !important; }
.hero-b h1 { font-size: 1.7rem; line-height: 1.32; letter-spacing: -.025em; margin: .3rem 0 .55rem; font-weight: 700; }
.hero-b h1 em { font-style: normal; color: var(--accent); }
.hero-b .lead { margin: 0 0 1.1rem; color: var(--text-2); font-size: .97rem; }
.cta-b { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.cta-b .cta-card { padding: 16px 14px; gap: 4px; border-radius: 10px; }
.cta-b .cta-card b { font-size: 1.2rem; letter-spacing: -.01em; }
.cta-b .cta-card span { font-size: .8rem; }
.subl { display: flex; flex-direction: column; margin-top: .6rem; }
.subl a { display: flex; align-items: center; min-height: 40px; color: var(--text); font-weight: 600; font-size: .92rem; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--border); }
.hero-b .safe-note { margin-top: .3rem; }
.hb-after { margin-top: 1.4rem; display: grid; gap: 1.2rem; }

/* 예시 비교 화면 (자동으로 움직이는 슬라이드) */
.sm { margin: 0; }
.sm-bar { display: flex; gap: 10px; align-items: center; font-size: .85rem; color: var(--text-2); margin-bottom: 8px; }
.sm-tag { background: var(--brand); color: #17181a; font-weight: 700; font-size: .75rem; padding: 2px 8px; border-radius: 999px; }
.sm-frame { position: relative; aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: var(--panel-shadow); }
.sm-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sm-a, .sm-b { position: absolute; inset: 0; }
.sm-b { clip-path: inset(0 0 0 50%); animation: sm-w 6s ease-in-out infinite; }
.sm-line, .sm-handle { position: absolute; top: 0; bottom: 0; left: 50%; animation: sm-l 6s ease-in-out infinite; }
.sm-line { width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 4px rgba(0,0,0,.5); }
.sm-handle span { position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%); width: 36px; height: 36px; border-radius: 50%; background: #fff; color: #17181a; display: grid; place-items: center; font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.sm-date { position: absolute; top: 12px; background: rgba(0,0,0,.65); color: #fff; font-size: .78rem; font-weight: 700; padding: 3px 8px; border-radius: 4px; }
.sm-date.l { left: 12px; } .sm-date.r { right: 12px; }
.sm-mark { position: absolute; left: 0; right: 0; top: 56%; border-top: 2px dashed #c9a96e; }
.sm-mark span { position: absolute; right: 8px; top: -12px; background: #c9a96e; color: #17181a; font-size: .7rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.sm figcaption { margin-top: 10px; font-size: .88rem; color: var(--text-2); }
@keyframes sm-w { 0%, 100% { clip-path: inset(0 0 0 30%); } 50% { clip-path: inset(0 0 0 70%); } }
@keyframes sm-l { 0%, 100% { left: 30%; } 50% { left: 70%; } }
@media (prefers-reduced-motion: reduce) { .sm-b, .sm-line, .sm-handle { animation: none; } }

/* 신뢰 띠 */
.trust { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.trust li { display: grid; grid-template-columns: 32px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 12px; background: var(--surface); border-radius: 12px; box-shadow: var(--panel-shadow); }
.trust svg { grid-row: 1 / span 2; width: 32px; height: 32px; padding: 6px; border-radius: 9px; background: var(--ico-bg); color: var(--accent); }
.trust b { font-size: .86rem; }
.trust span { font-size: .74rem; color: var(--text-2); }

/* 할 수 있는 것 (모바일: 옆으로 넘겨 보기) */
.feats { margin-top: 2rem; }
.feats h2 { font-size: 1.15rem; margin: 0 0 .8rem; }
.feat-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 10px; }
.feat { flex: 0 0 78%; scroll-snap-align: start; display: block; padding: 14px; background: var(--surface); border-radius: 14px; box-shadow: var(--panel-shadow); color: var(--text); text-decoration: none; }
.feat b { display: block; font-size: 1.02rem; margin-top: 12px; }
.feat p { margin: .3rem 0 0; font-size: .88rem; color: var(--text-2); }
.feat-vis { aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; }
.vis-check { grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 10px; place-items: stretch; }
.vis-check div { background: #fff; border-radius: 8px; overflow: hidden; border: 1.5px solid transparent; }
.vis-check div.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.vis-check img, .vis-cmp img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vis-cam { background: #0d0e0f; }
.cam-mock { position: relative; height: 88%; aspect-ratio: 3 / 4; border-radius: 6px; overflow: hidden; background: #fff; }
.cam-mock img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.cam-mock svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ghost-tag { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); background: #c9a96e; color: #17181a; font-size: .68rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.vis-cmp { grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px; place-items: stretch; background: #17181a; }
.vis-cmp div { position: relative; background: #fff; border-radius: 6px; overflow: hidden; }
.vis-cmp span { position: absolute; top: 6px; left: 6px; background: rgba(0,0,0,.65); color: #fff; font-size: .68rem; font-weight: 700; padding: 1px 6px; border-radius: 3px; }

/* 비교 이미지 예시 */
.rp { margin-top: 2rem; display: grid; gap: 16px; padding: 18px; background: var(--surface); border-radius: 16px; box-shadow: var(--panel-shadow); }
.rp h2 { font-size: 1.15rem; margin: 0 0 .4rem; }
.rp p { color: var(--text-2); margin: 0 0 1rem; }
.rp-img { background: #17181a; border-radius: 12px; padding: 12px; }
.rp-head, .rp-foot { display: flex; justify-content: space-between; gap: 8px; color: #a7a39b; font-size: .72rem; }
.rp-head span { display: grid; width: 50%; }
.rp-head b { color: #ece8e1; font-size: .95rem; }
.rp-pics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.rp-pics div { background: #fff; border-radius: 4px; overflow: hidden; }
.rp-pics img { width: 100%; display: block; aspect-ratio: 1 / 1; object-fit: cover; }
.rp-foot b { color: #c9a96e; flex: none; }

@media (min-width: 900px) {
  .hb-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; padding: 1.4rem 0 .6rem; }
  .hero-b h1 { font-size: 2.6rem; }
  .hero-b .lead { font-size: 1.08rem; max-width: 520px; }
  .cta-b { max-width: 500px; }
  .cta-b .cta-card { padding: 20px 18px; }
  .cta-b .cta-card b { font-size: 1.32rem; }
  .cta-b .cta-card span { font-size: .85rem; }
  .subl { flex-direction: row; gap: 4px 22px; }
  .hero-b .trust { grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 1.8rem; }
  .hero-b .trust li { grid-template-columns: 40px 1fr; padding: 14px 16px; }
  .hero-b .trust svg { width: 40px; height: 40px; padding: 8px; }
  .hero-b .trust b { font-size: .95rem; } .hero-b .trust span { font-size: .8rem; }
  .hero-b.band { padding-bottom: 2.4rem; }
  .feats { margin-top: 3rem; } .feats h2 { font-size: 1.4rem; margin-bottom: 1rem; }
  .feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 0; padding: 0; overflow: visible; }
  .feat { padding: 16px; }
  .feat:hover { box-shadow: 0 0 0 2px var(--accent); }
  .rp { margin-top: 3rem; grid-template-columns: 1fr 1.3fr; gap: 48px; align-items: center; padding: 28px; }
  .rp h2 { font-size: 1.4rem; }
  .rp-img { padding: 14px; }
  .rp-head { font-size: .75rem; } .rp-head b { font-size: 1rem; }
}
/* 화면 크기별 표시: 뒤에 오는 display 규칙에 덮이지 않게 */
@media (max-width: 899px) { .pc-only { display: none !important; } }
@media (min-width: 900px) { .m-only { display: none !important; } }
@media (min-width: 900px) { .m-br { display: none; } }

/* ===== 도구 페이지 아래: 자세히 알아보기 + 자주 묻는 질문 ===== */
.more, .faq { max-width: 760px; margin-top: 2.4rem; }
.more-title { font-size: 1.2rem; margin: 0 0 .9rem; padding-bottom: .6rem; border-bottom: 1px solid var(--border); }
.more h3 { font-size: 1.02rem; margin: 1.5rem 0 .4rem; }
.more p { color: var(--text-2); font-size: .95rem; line-height: 1.75; margin: 0 0 .6rem; }
.faq details { background: var(--surface); border-radius: 12px; box-shadow: var(--panel-shadow); margin: 0 0 .6rem; }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: .8rem; min-height: 52px; padding: .7rem 1rem; cursor: pointer; font-weight: 700; font-size: .96rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--accent); font-weight: 700; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0; padding: 0 1rem 1rem; color: var(--text-2); font-size: .94rem; line-height: 1.7; }

/* 홈 휴대폰: 버튼 아래 가로 예시 띠 (시안 C) */
.sm-strip { margin: .9rem 0 .3rem; }
.sm-strip .sm-frame { aspect-ratio: 2 / 1; }
.sm-strip .sm-frame img { object-position: 50% 72%; }
.hb-after { margin-top: 1rem; }

/* ===== 가이드 글 ===== */
.guide-kicker { margin: .2rem 0 0; font-size: .82rem; font-weight: 700; }
.guide-kicker a { color: var(--accent); text-decoration: none; }
.doc-meta { margin: .5rem 0 0; font-size: .82rem; color: var(--muted); }
.guide-article { line-height: 1.8; }
.guide-article p { margin: 0 0 .9rem; }
.g-fig { margin: 1.2rem 0 1.4rem; }
.g-fig img { display: block; width: 100%; height: auto; border-radius: 10px; background: var(--surface-2); }
.g-fig figcaption { margin-top: .5rem; font-size: .84rem; color: var(--muted); line-height: 1.5; }
.cite { font-size: .7em; line-height: 0; margin-left: 1px; }
.cite a { text-decoration: none; font-weight: 700; padding: 0 2px; }
.guide-article table td:last-child { min-width: 12em; }
.guide-tool { margin: 2rem 0 0; padding: 1.1rem; border-radius: 12px; background: var(--primary-soft); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .7rem; }
.guide-tool p { margin: 0; font-weight: 700; }
.doc-body h2.g-sub { counter-increment: none; font-size: 1.08rem; margin: 2.2rem 0 .7rem; }
.doc-body h2.g-sub::before { display: none; }
.g-faq { margin-top: 0; }
.see-doctor { margin-top: 0; }
.see-doctor ul { margin: 0; padding: .9rem 1rem .5rem; border-radius: 12px; background: var(--surface-2); }
.see-doctor li { font-size: .92rem; }
.guide-sources ol { padding-left: 1.3rem; font-size: .84rem; color: var(--text-2); line-height: 1.6; }
.guide-sources li { margin-bottom: .45rem; word-break: break-word; scroll-margin-top: 80px; }
.guide-sources a { color: var(--text-2); }
.guide-draft, .guide-affiliate { font-size: .84rem; padding: .6rem .8rem; border-radius: 8px; background: var(--surface-2); color: var(--text-2); }
/* 메인 2번 카드: 촬영 가이드 선을 15% 올린 것에 맞춰 그림도 올리고, 아래는 흐리게 */
.cam-mock img { transform: translateY(-15%); }
.cam-mock::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 26%; background: linear-gradient(transparent, #fff 70%); }
.cam-mock .ghost-tag { z-index: 1; }

/* 가이드: 광고는 본문 카드 밖 바탕에 (시안 Y) */
.guide-article { max-width: 760px; }
.doc-head + .guide-article > .g-card:first-child { margin-top: -1.6rem; }
.g-card + .g-card, .ad-out + .g-card { margin-top: 0; }
.g-cont { counter-reset: none; }
.ad-out { margin: 1.4rem 0; }
.ad-out .ad-label { letter-spacing: .04em; }
.g-card > :last-child { margin-bottom: 0; }

/* 가이드 그림 크게 보기 */
.g-zoom { position: relative; display: block; cursor: zoom-in; border-radius: 10px; }
.g-zoom-ic { position: absolute; right: 8px; top: 8px; width: 32px; height: 32px; border-radius: 8px; background: rgba(23,24,26,.62); display: grid; place-items: center; }
.g-zoom-ic svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lb { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(10,10,11,.94); color: #fff; }
.lb::backdrop { background: transparent; }
.lb[open] { display: flex; flex-direction: column; }
.lb-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 56px 8px 8px; overflow: auto; touch-action: pinch-zoom pan-x pan-y; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; background: #f7f5f1; }
.lb-cap { margin: 0; padding: .6rem 1rem calc(1rem + env(safe-area-inset-bottom)); font-size: .88rem; line-height: 1.5; color: #d8d4cc; text-align: center; }
.lb-x { position: absolute; top: calc(8px + env(safe-area-inset-top)); right: 8px; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); display: grid; place-items: center; cursor: pointer; }
.lb-x svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; }
html.lb-on { overflow: hidden; }
@media (min-width: 900px) { .lb-stage { padding: 64px 40px 12px; } }

/* ===== 가이드 목록 (시안 B: 큰 섬네일 + 제목만) ===== */
.glist-head { padding-bottom: 1.4rem; }
/* 목록은 설명 띠와 겹치지 않게 띠 아래에서 시작 (섬네일 배경이 띠와 같은 아이보리라 겹치면 경계가 안 보임) */
.glist { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; gap: 16px; }
.glist-card { display: block; border-radius: 14px; overflow: hidden; background: var(--surface); box-shadow: var(--panel-shadow); color: var(--text); text-decoration: none; height: 100%; }
.glist-img { display: block; aspect-ratio: 1200 / 630; background: var(--surface-2); }
.glist-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.glist-title { display: block; padding: 13px 15px 15px; font-size: 1.02rem; line-height: 1.45; word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; }
.glist-card:hover .glist-title { color: var(--accent); }
@media (min-width: 900px) {
  .glist { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .glist-title { font-size: .98rem; }
}

/* 한국어 제목: 단어 중간에서 줄이 바뀌지 않게 */
h1, h2, h3, .lead { word-break: keep-all; overflow-wrap: anywhere; }

/* ===== PC 상단 메뉴 (시안 C): 현재 메뉴 금색 칸 + 펼침 메뉴 ===== */
.top-nav .nav-link { border-radius: 999px; min-height: 38px; margin: 0 2px; padding: 0 1rem; color: #c9c5bd; }
.top-nav .nav-link:hover, .nav-group[open] > summary { background: rgba(255,255,255,.08); color: #fff; }
.top-nav > .nav-link[aria-current="page"], .top-nav .nav-group.is-current > summary.nav-link { background: var(--brand); color: #17181a !important; font-weight: 700; }
.site-header :focus-visible { outline-color: var(--brand); }
.nav-group > summary::after { width: .38em; height: .38em; margin-left: .5em; }
.nav-group > ul { right: auto; left: 50%; transform: translateX(-50%); top: calc(100% + 8px); min-width: 250px; padding: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 12px 32px rgba(0,0,0,.25); }
.nav-group > ul a { display: block; min-height: 0; padding: 10px 12px; border-radius: 8px; color: var(--text); }
.nav-group > ul a b { display: block; font-size: .95rem; }
.nav-group > ul a small { display: block; margin-top: 2px; font-size: .8rem; color: var(--muted); }
.nav-group > ul a:hover, .nav-group > ul a:focus-visible, .nav-group > ul a[aria-current="page"] { background: var(--primary-soft); }

/* ===== 자가 체크리스트: 한 문항씩 (자바스크립트가 켜지면 .is-step) ===== */
.cl-art, .cl-rart { display: none; }
.cl.is-step { max-width: 560px; margin: 0 auto; background: var(--surface); border-radius: 16px; box-shadow: var(--panel-shadow); padding: 18px 18px 14px; }
.cl-prog { display: flex; align-items: center; gap: 10px; font-size: .82rem; font-weight: 700; color: var(--muted); }
.cl-track { flex: 1; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.cl-track i { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 4px; transition: width .25s; }
.is-step .cl-group { margin: 0; }
.is-step .cl-group legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.is-step .cl-hint { display: none; }
.is-step .cl-q { border: 0; padding: 16px 0 4px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.is-step .cl-q[hidden] { display: none; }
.cl-sec { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--accent); }
.cl-sec--warn { background: var(--danger-soft); color: var(--danger); }
.is-step .cl-art { display: block; width: 120px; height: 120px; margin: 14px auto 4px; padding: 14px; border-radius: 50%; background: var(--ico-bg); object-fit: contain; }
.is-step .cl-q > p:focus { outline: none; }
.is-step .cl-q > p { margin: 10px 0 16px; font-size: 1.22rem; font-weight: 800; line-height: 1.45; letter-spacing: -.3px; word-break: keep-all; text-wrap: balance; }
.is-step .cl-opts, .is-step .cl-opts--3 { width: 100%; grid-template-columns: 1fr; gap: 10px; }
.is-step .cl-opts span { min-height: 54px; border-radius: 12px; border-width: 1.5px; font-size: 1.02rem; color: var(--text); }
@media (hover: hover) { .is-step .cl-opts label:hover span { border-color: var(--text-2); } }
.is-step .cl-bar { display: none; }
.cl-stepnav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }
.cl-stepnav .link-btn { min-height: 44px; font-weight: 700; }
.cl-nosave-s { font-size: .76rem; color: var(--muted); text-align: right; }
.is-step ~ .cl-result, .cl-result { max-width: 560px; margin: 0 auto; }
.cl-result .cl-warn, .cl-result .cl-res { text-align: center; padding: 22px 18px; border-radius: 16px; }
.cl-result .cl-rart { display: block; width: 120px; height: 120px; margin: 0 auto 12px; padding: 14px; border-radius: 50%; background: var(--ico-bg); object-fit: contain; }
.cl-warn .cl-rart { background: #fff; }
.cl-warn h2::before { content: none; }
.cl-picked { text-align: left; }
.cl-chips { text-align: center; }
.cl-chips p { margin: 0 0 6px; font-size: .82rem; font-weight: 700; color: var(--muted); }
.cl-chips ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.cl-chips li { font-size: .82rem; background: var(--primary-soft); color: var(--accent); padding: 5px 11px; border-radius: 999px; font-weight: 600; }
.cl-result .cl-cta { grid-template-columns: 1fr; max-width: none; }
.cl-result #cl-again { justify-self: center; }
/* 도구 페이지 "자세히 알아보기": 접는 카드 (자주 묻는 질문과 같은 모양) */
.more-item { background: var(--surface); border-radius: 12px; box-shadow: var(--panel-shadow); margin: 0 0 .6rem; }
.more-item summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: .8rem; min-height: 52px; padding: .7rem 1rem; cursor: pointer; }
.more-item summary::-webkit-details-marker { display: none; }
.more-item summary::after { content: "+"; flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--accent); font-weight: 700; }
.more-item[open] summary::after { content: "−"; }
.more .more-item h3 { margin: 0; font-size: .96rem; }
.more .more-item p { padding: 0 1rem; }
.more .more-item p:last-child { padding-bottom: 1rem; margin-bottom: 0; }
.more-title { border-bottom: 0; padding-bottom: 0; }

/* ===== 사진 기록 페이지 (시안 C): 짙은 기능 카드 → 3단계 → 요령 카드 → 접는 설명 ===== */
.photo-tool { display: block; max-width: 760px; }
.photo-tool .photo-panel { position: static; margin: .4rem 0 0; padding: 18px; border: 0; border-radius: 18px; background: var(--band); color: var(--on-band); box-shadow: var(--panel-shadow); }
.ptool-row { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.ptool-pv { flex: none; width: 104px; height: auto; aspect-ratio: 3 / 4; border-radius: 12px; object-fit: cover; background: #000; }
.ptool-txt h2 { margin: 0; font-size: 1.08rem; color: #fff; }
.ptool-txt p { margin: .3rem 0 0; font-size: .86rem; line-height: 1.55; color: var(--on-band-2); }
.photo-tool .photo-actions { max-width: none; gap: 10px; }
.photo-panel .btn { min-height: 54px; border-radius: 12px; font-size: 1rem; }
.photo-panel .btn:not(.btn-secondary) { background: var(--brand); border-color: var(--brand); color: #17181a; }
.photo-panel .btn:not(.btn-secondary):hover { background: #d8bc86; }
.photo-panel .btn-secondary { background: transparent; border: 1.5px solid #55575c; color: #fff; }
.photo-panel .btn-secondary:hover { border-color: #8b8d92; }
.photo-panel .link-btn { color: var(--on-band); margin-top: .7rem; }
.photo-panel .safe-note { color: var(--on-band-2); margin: .6rem 0 0; }
.photo-panel .photo-pc-note { color: var(--on-band-2); }
.photo-panel .photo-msg { color: #fff; }
.photo-panel :focus-visible { outline-color: var(--brand); }
.psteps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.psteps li { background: var(--surface); border-radius: 12px; padding: 10px 6px; text-align: center; font-size: .8rem; line-height: 1.4; color: var(--text-2); box-shadow: 0 1px 2px rgba(23,24,26,.04); }
.psteps b { display: block; font-size: 1.15rem; color: var(--accent); }
.photo-tool .photo-info h2 { font-size: 1.12rem; margin: 1.8rem 0 .7rem; }
.ptips { list-style: none; margin: 0 0 .7rem; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ptips li { background: var(--surface); border-radius: 14px; padding: 12px; box-shadow: var(--panel-shadow); display: flex; flex-direction: column; }
.ptips img { width: 58px; height: 58px; object-fit: contain; margin-bottom: 6px; }
.ptips b { font-size: .93rem; }
.ptips span { margin-top: 2px; font-size: .8rem; line-height: 1.45; color: var(--muted); }
.ptips-all h3 { margin: 0; font-size: .96rem; }
.ptips-all .photo-howto { margin: 0; padding: 0 1rem 1rem 2.1rem; font-size: .92rem; line-height: 1.6; }
@media (min-width: 900px) {
  .photo-tool { display: block; }
  .photo-tool .photo-panel { position: static; margin-top: 1rem; padding: 24px; display: grid; grid-template-columns: 170px 1fr; column-gap: 26px; align-items: start; }
  .photo-tool .ptool-row { display: contents; }
  .photo-tool .ptool-pv { width: 170px; grid-row: 1 / span 6; }
  .photo-tool .ptool-txt { margin-bottom: 16px; }
  .photo-tool .ptool-txt h2 { font-size: 1.3rem; }
  .photo-tool .ptool-txt p { font-size: .95rem; }
  .photo-tool .photo-actions { grid-template-columns: 1fr 1fr; }
  .photo-tool .photo-info h2:first-child { margin-top: 1.8rem; }
  .ptips { grid-template-columns: repeat(4, 1fr); }
  .psteps { gap: 12px; }
  .psteps li { font-size: .88rem; padding: 14px 8px; }
}

/* ===== 그림 체크 페이지: 그림 고르기를 기능 카드로 묶음 ===== */
.check { background: var(--surface); border-radius: 16px; box-shadow: var(--panel-shadow); padding: 16px; max-width: 760px; }
.check-prompt { margin-top: 0; }
.check .check-card { box-shadow: none; border: 1px solid var(--border); }
.check-tabs { max-width: 760px; }
.tool-detail { max-width: 760px; }
.tool-detail .more-item p { padding: 0 1rem; color: var(--text-2); font-size: .94rem; line-height: 1.7; }
.tool-detail .more-item p:last-child { padding-bottom: 1rem; margin-bottom: 0; }
.tool-detail .more-item h3 { margin: 0; font-size: .96rem; }
.tool-detail .look { border: 0; border-radius: 16px; box-shadow: var(--panel-shadow); margin-bottom: .9rem; }
@media (min-width: 900px) { .check { padding: 24px; } }
.check .check-result { box-shadow: none; border: 0; background: transparent; padding: 4px 0 0; }
.tool-detail .look { max-width: 760px; }

/* ===== 작은 보완 ===== */
/* 고르는 페이지: 일러스트 아이콘 */
.hub-ico--img { width: 64px; height: 64px; }
.hub-ico--img img { width: 80%; height: 80%; object-fit: contain; }
.hub-ico--cover img { width: 100%; height: 100%; object-fit: cover; }
.hub-card { grid-template-columns: 64px 1fr auto; }
/* 문서 표: 휴대폰에서는 카드 모양 */
@media (max-width: 640px) {
  .doc-body table.t-cards, .doc-body table.t-cards tbody, .doc-body table.t-cards tr, .doc-body table.t-cards td { display: block; width: 100%; }
  .doc-body table.t-cards { overflow: visible; }
  .doc-body table.t-cards thead { display: none; }
  .doc-body table.t-cards tr { background: var(--surface-2); border-radius: 10px; padding: .6rem .8rem; margin-bottom: .6rem; }
  .doc-body table.t-cards td { border: 0; padding: .2rem 0; white-space: normal; min-width: 0; }
  .doc-body table.t-cards td::before { content: attr(data-label); display: block; font-size: .74rem; font-weight: 700; color: var(--accent); }
  .doc-body table.t-cards td:first-child { font-weight: 700; }
  .doc-body table.t-cards td:first-child::before { display: none; }
}
/* 소개: 운영 원칙을 카드로 */
.page-about .doc-body ol { list-style: none; padding: 0; display: grid; gap: 10px; counter-reset: pr; }
.page-about .doc-body ol > li { counter-increment: pr; position: relative; background: var(--surface-2); border-radius: 12px; padding: .9rem 1rem .9rem 3.2rem; margin: 0; }
.page-about .doc-body ol > li::before { content: counter(pr); position: absolute; left: 1rem; top: .95rem; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #17181a; font-weight: 800; font-size: .82rem; display: grid; place-items: center; }
.page-about .doc-body ol > li strong { background: none; display: block; }
/* 404 */
.nf-list { max-width: 560px; margin: 1.2rem 0; }
/* 푸터: 휴대폰에서 메뉴 5개가 한 줄에 들어가게 */
@media (max-width: 480px) {
  .footer-links { gap: 0; margin-left: -.4rem; }
  .footer-links a { padding: 0 .4rem; font-size: .82rem; }
}

/* ===== 촬영 직후 화면: 저장 → 바로 비교 / 첫 기록 다음 촬영일 ===== */
.pv-box { flex: none; min-height: 0; padding: 4px 16px 0; }
.pv-box img { max-height: 46vh; border-radius: 10px; }
.pv-panel { gap: 10px; padding: 12px 16px 24px; color: #fff; }
.pv-status { display: flex; gap: 8px; font-size: .86rem; color: #cfcac0; line-height: 1.5; }
.pv-status > span:first-child { color: var(--brand); font-weight: 800; }
.pv-panel .btn { min-height: 52px; border-radius: 12px; font-size: 1rem; }
.pv-panel .btn:not(.btn-secondary) { background: var(--brand); border-color: var(--brand); color: #17181a; }
.pv-panel .btn-secondary { background: transparent; border: 1.5px solid #4a4c51; color: #fff; }
.pv-panel .btn[disabled] { opacity: .55; }
.pv-pair, .pv-first { background: #1d1f22; border-radius: 14px; padding: 12px; display: grid; gap: 10px; }
.pv-pair[hidden], .pv-first[hidden], .pfile[hidden], .cmp-next[hidden] { display: none; }
.pv-pair-row { display: flex; align-items: center; gap: 8px; }
.pv-pair-row img { width: 60px; height: 76px; object-fit: cover; border-radius: 8px; background: #000; }
.pv-pair-row > span { color: var(--brand); font-weight: 800; }
.pv-pair-row b { display: block; font-size: .96rem; }
.pv-pair-row .pv-pair-sub { display: block; font-size: .8rem; color: #a7a39b; margin-top: 2px; }
.pv-tag { justify-self: start; font-size: .72rem; font-weight: 700; color: #17181a; background: var(--brand); border-radius: 999px; padding: 2px 9px; }
.pv-next { display: flex; gap: 12px; align-items: center; }
.pv-next p { margin: 0; font-size: .84rem; color: #cfcac0; line-height: 1.5; }
.pv-next-d { flex: none; width: 60px; height: 60px; border-radius: 12px; background: #2a2c30; display: grid; place-content: center; text-align: center; font-size: .7rem; font-weight: 700; color: #cfcac0; line-height: 1.2; }
.pv-next-d b { display: block; font-size: 1.2rem; color: var(--brand); }
.pv-retake { justify-self: center; color: #cfcac0; }
/* 비교 저장 후 다음 할 일 */
.cmp-next { display: grid; gap: 10px; margin: 6px 0 4px; padding: 12px; border-radius: 14px; background: #1d1f22; }
.cmp-next .link-btn { justify-self: center; color: #cfcac0; }
/* 카메라를 못 쓸 때만 보이는 기본 카메라 링크 */
.pfile { margin-top: .7rem; }
.pfile p { margin: .2rem 0 0; font-size: .8rem; color: var(--on-band-2); line-height: 1.5; }

/* ===== 비교 화면 정리 ===== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* 한 열: 휴대폰·PC 모두 위 설정 → 아래 비교 */
.cmp-body { max-width: 680px; }
@media (min-width: 1000px) {
  .cmp-body { max-width: 680px; grid-template-columns: 1fr; column-gap: 0; }
  .cmp-body > * { grid-column: 1 !important; }
  .cmp-body > .cmp-stage { grid-row: auto !important; max-width: 640px !important; justify-self: center; }
  .cmp-stage[data-view="side"] .cmp-frame { max-height: none; }
  .cmp-stage[data-view="wipe"] .cmp-frame, .cmp-stage[data-view="overlay"] .cmp-frame { max-width: 480px; }
  .cmp-slots { grid-template-columns: 1fr 1fr !important; }
  /* PC: 사이트 위에 뜨는 가운데 창 */
  .cmp { inset: auto; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(760px, calc(100vw - 80px)); height: calc(100vh - 48px); border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.5); padding: 0; }
  .cmp > .cam-top { border-radius: 18px 18px 0 0; }
}
.cmp-dim { position: fixed; inset: 0; z-index: 99; background: rgba(10,10,11,.62); }
.cmp-dim[hidden] { display: none; }
@media (max-width: 999px) { .cmp-dim { display: none; } }
/* 위쪽 알림 띠 */
.cmp-notice { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #1d1f22; font-size: .86rem; color: #cfcac0; }
.cmp-notice[hidden] { display: none; }
.cmp-notice-ic { color: var(--brand); font-weight: 800; }
.cmp-notice-new { margin-left: auto; flex: none; min-height: 36px; padding: 0 2px; background: none; border: 0; color: #ece8e1; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
/* 사진 카드 */
.cmp-slots { gap: 6px; }
.cmp-slot { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 10px; row-gap: 2px; align-items: center; background: #1d1f22; border-radius: 12px; padding: 10px; font-size: .85rem; min-width: 0; }
.cmp-slot .cmp-pick { grid-column: 1; grid-row: 1 / span 2; width: 44px; min-height: 0; padding: 0; border: 0; background: none; }
.cmp-slot .cmp-thumb { width: 44px; height: 56px; border-radius: 6px; border: 1px dashed #4a4945; }
.cmp-slot .cmp-thumb[style*="url"] { border: 0; }
.cmp-slot-label { grid-column: 2; grid-row: 1; font-size: .78rem; color: #a7a39b; }
.cmp-slot .cmp-date { grid-column: 2; grid-row: 2; display: block; min-width: 0; }
.cmp-slot .cmp-date input { min-height: 0; height: 28px; padding: 0; border: 0; background: none; font-size: 1rem; font-weight: 800; color: #fff; width: 100%; min-width: 0; }
.cmp-slot .cmp-date input:disabled { opacity: 0; }
.cmp-slot .cmp-date-hint { grid-column: 1 / -1; font-size: .74rem; }
.cmp-slot .cmp-date-hint:empty { display: none; }
.cmp-slot-acts { grid-column: 1 / -1; display: flex; gap: 6px; margin-top: 8px; }
.cmp-act { flex: 1; min-height: 36px; border-radius: 8px; border: 1px solid #3a3b3f; background: transparent; color: #ece8e1; font: inherit; font-size: .82rem; cursor: pointer; }
.cmp-act:hover { border-color: #6b6862; }
.cmp-act[hidden] { display: none; }
.cmp-act.cmp-flip[aria-pressed="true"] { background: #ece8e1; color: #17181a; }
@media (max-width: 520px) {
  .cmp-slot { padding: 8px; column-gap: 8px; }
  .cmp-slot .cmp-date input { font-size: .86rem; }
  .cmp-slot-acts { flex-direction: column; }
}
/* 아래쪽 글씨: 팁 · 저장 · 주의 문구 */
.cmp-zoom-hint { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: .82rem; line-height: 1.5; color: #a7a39b; }
.cmp-zoom-hint i { font-style: normal; flex: none; width: 18px; height: 18px; border-radius: 50%; background: #2a2c30; color: var(--brand); display: grid; place-items: center; font-size: .7rem; font-weight: 800; margin-top: 1px; }
.cmp-status { margin: 0; font-size: .86rem; color: #cfcac0; text-align: center; }
.cmp-status:empty { display: none; }
.cmp-note { margin: 6px 0 0; padding-top: 12px; border-top: 1px solid #26282c; text-align: center; font-size: .76rem; line-height: 1.5; color: #9a968e; }

/* ===== 홈: 예시 화면 헤어라인 ↔ 정수리 번갈아 (6초씩) ===== */
.sm-c { opacity: 0; animation: sm-swap 12s step-end infinite; }
.sm-c img { object-position: 50% 50% !important; }
.sm-b.sm-c { animation: sm-w 6s ease-in-out infinite, sm-swap 12s step-end infinite; }
.sm-mark { animation: sm-swap-out 12s step-end infinite; }
@keyframes sm-swap { 0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0; } }
@keyframes sm-swap-out { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }
.sm-k { display: inline-grid; font-weight: 700; color: var(--text); }
.sm-k b { grid-area: 1 / 1; font-weight: 700; }
.sm-k b:first-child { animation: sm-swap-out 12s step-end infinite; }
.sm-k b:last-child { opacity: 0; animation: sm-swap 12s step-end infinite; }
@media (prefers-reduced-motion: reduce) { .sm-c, .sm-mark, .sm-k b { animation: none; } }
/* 홈 "그림으로 비교하기": 윗줄 헤어라인 / 아랫줄 정수리 + 줄 이름 */
.vis-check { position: relative; }
.vc-lab { position: absolute; left: 14px; z-index: 2; font-size: .68rem; font-weight: 800; color: #fff; background: #17181a; border-radius: 999px; padding: 2px 8px; }
.vc-1 { top: 14px; }
.vc-2 { top: calc(50% + 4px); }
/* 휴대폰 가로 예시 띠: 정수리는 머리 전체가 PC와 같은 방향으로 보이고, 가마가 가운데 오도록 */
.sm-strip .sm-c { background: #fff; }
.sm-strip .sm-c img { object-fit: contain !important; transform: translateY(18%) scale(1.45); }

/* ===== 두 사진 비교하기 전용 페이지: 비교 화면을 본문에 바로 ===== */
.cmp.is-inline { position: static; inset: auto; transform: none; width: auto; height: auto; max-width: 760px; z-index: auto; border-radius: 18px; box-shadow: var(--panel-shadow); padding: 4px 0; }
.cmp.is-inline > .cam-top { display: none; }
.cmp.is-inline .cmp-body { overflow: visible; padding: 16px; max-width: none; }
.cmp.is-inline .cam-sheet { position: fixed; }
.cmp-kind { display: flex; gap: 6px; margin: .4rem 0 12px; }
.cmp-kind a { padding: 9px 18px; border-radius: 999px; font-weight: 700; font-size: .92rem; background: var(--surface); color: var(--text); text-decoration: none; box-shadow: var(--panel-shadow); }
.cmp-kind a[aria-current="page"] { background: #17181a; color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cmp-kind a[aria-current="page"] { background: var(--brand); color: #17181a; } }

/* ===== 관련 가이드 ===== */
.rg-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0 0 10px; }
.rg-h h2 { margin: 0; font-size: 1.12rem; }
.rg-h a { font-size: .82rem; font-weight: 700; color: var(--accent); text-decoration: none; white-space: nowrap; }
.rg-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rg-c { display: grid; grid-template-columns: 120px 1fr; align-items: center; background: var(--surface); border-radius: 12px; overflow: hidden; box-shadow: var(--panel-shadow); color: var(--text); text-decoration: none; height: 100%; }
.rg-c img { display: block; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }
.rg-c b { padding: 8px 12px; font-size: .88rem; line-height: 1.45; word-break: keep-all; }
.rg-c:hover b { color: var(--accent); }
.rg { margin: 2rem 0 0; }
.rg-end { margin: 2rem auto 1.4rem; max-width: 760px; }
.rg-home { max-width: var(--maxw); margin: 2.6rem auto 0; }
/* 도구 페이지 배치 */
.tool-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.tool-main, .tool-more { min-width: 0; }
@media (min-width: 900px) {
  .rg-row .rg-list { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .rg-row .rg-c { grid-template-columns: 1fr; align-items: start; }
  .rg-row .rg-c b { padding: 10px 13px 13px; }
}
@media (min-width: 1080px) {
  .tool-grid { grid-template-columns: minmax(0, 760px) 280px; column-gap: 40px; align-items: start; }
  .tool-main { grid-column: 1; grid-row: 1; }
  .tool-more { grid-column: 1; grid-row: 2; }
  .rg-side { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 84px; margin-top: .4rem; }
  .rg-side .rg-c { grid-template-columns: 1fr; align-items: start; }
  .rg-side .rg-c b { padding: 9px 11px 11px; font-size: .84rem; }
  .rg-side .rg-h h2 { font-size: .98rem; }
}
@media (max-width: 520px) {
  .cmp.is-inline .cmp-body { padding: 12px; }
  .cmp-slot .cmp-date input { font-size: .8rem; letter-spacing: -.02em; }
  .cmp-slot .cmp-date input::-webkit-calendar-picker-indicator { width: 12px; margin-left: 0; padding: 0; }
}
/* 관련 가이드 카드 내용 */
.rg-c .rg-t { display: block; min-width: 0; }
.rg-c .rg-t b { display: block; padding: 0; }
.rg-c .rg-t small { display: none; }
.rg-ic { display: none; }
.rg-c > .rg-t { padding: 8px 12px; font-size: .88rem; line-height: 1.45; }
@media (min-width: 900px) { .rg-row .rg-c > .rg-t { padding: 10px 13px 13px; } }
/* 휴대폰: 그림 + 분류 + 제목 (시안 C) */
@media (max-width: 899px) {
  .rg-c { display: flex; gap: 12px; align-items: center; padding: 10px 12px; }
  .rg-c .rg-th { display: none; }
  .rg-ic { display: grid; flex: none; width: 64px; height: 64px; border-radius: 50%; background: var(--tint); place-items: center; }
  .rg-ic img { width: 76%; height: 76%; object-fit: contain; }
  .rg-c > .rg-t { padding: 0; }
  .rg-c .rg-t small { display: inline-block; font-size: .7rem; font-weight: 700; color: var(--accent); background: var(--primary-soft); border-radius: 999px; padding: 1px 8px; margin-bottom: 4px; }
  .rg-c .rg-t b { font-size: .93rem; line-height: 1.45; word-break: keep-all; }
}

/* ===== 가운데 정렬 (도구·가이드·문서 페이지): 본문 폭 760px ===== */
.tool-grid { display: flex !important; flex-direction: column; align-items: stretch !important; max-width: 760px; margin: 0 auto; }
.tool-grid .rg-tool { position: static; margin-top: 2rem; }
@media (min-width: 900px) { .tool-grid .rg-tool { order: 3; margin-top: 2.6rem; } }
.tool-head > *, .doc-head > * { max-width: 760px !important; margin-left: auto !important; margin-right: auto !important; }
.doc-toc, .doc-body, .guide-article, .disclaimer-box, .cmp-kind, .cmp.is-inline { margin-left: auto; margin-right: auto; }
.disclaimer-box { max-width: 760px; }
.photo-tool, .check, .check-tabs, .tool-detail, .more, .faq { margin-left: auto; margin-right: auto; }
.cmp-kind { max-width: 760px; }
/* 카메라를 못 쓸 때 안내 (짙은 기능 카드 안) */
.photo-panel .photo-msg { margin: .8rem 0 0; padding: .75rem .9rem; border-radius: 10px; background: rgba(255,255,255,.08); color: #ece8e1; font-size: .88rem; line-height: 1.55; }
.photo-panel .photo-msg.is-error { background: rgba(201,169,110,.16); color: #f3e6cc; }
.cam-failed .photo-pc-note { display: none !important; }
.photo-panel .pfile { margin-top: .6rem; }
/* 그림 확대 아이콘: 그림 속 제목을 덜 가리게 작고 옅게 */
.g-zoom-ic { width: 26px; height: 26px; top: 6px; right: 6px; background: rgba(23,24,26,.42); }
.g-zoom-ic svg { width: 15px; height: 15px; }

/* ===== 휴대폰: 헤더는 고정하지 않고, 아래 메뉴바는 내릴 때 숨김·올리면 다시 보임 (시안 B) ===== */
@media (max-width: 899px) {
  .site-header { position: static; }
  .tabbar { transition: transform .25s ease; will-change: transform; }
  html.tb-hide .tabbar { transform: translateY(calc(100% + 24px)); }
  .doc-body h2, .guide-sources li, .cl-q { scroll-margin-top: 16px; }
}
@media (prefers-reduced-motion: reduce) { .tabbar { transition: none; } }
/* 휴대폰: 2열 표는 왼쪽 칸 폭을 줄이고 줄바꿈 허용 (오른쪽이 잘리지 않게) */
@media (max-width: 640px) {
  .doc-body table:not(.t-cards) { display: table; table-layout: fixed; width: 100%; }
  .doc-body table:not(.t-cards) th, .doc-body table:not(.t-cards) td { white-space: normal; min-width: 0; word-break: keep-all; overflow-wrap: anywhere; }
  .doc-body table:not(.t-cards) th:first-child, .doc-body table:not(.t-cards) td:first-child { width: 34%; }
}
/* 색 대비 보강 (접근성): 연한 바탕 위 작은 브론즈 글씨 */
.rg-c .rg-t small, .guide-kicker a, .glist-tag { color: #6e5323; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rg-c .rg-t small, :root:not([data-theme="light"]) .guide-kicker a { color: var(--accent); } }
/* 기능 카드: 버튼과 아래 안내 글씨 사이를 띄우고 구분선으로 나눔 */
.photo-panel .photo-actions + * { margin-top: 0; }
.photo-panel .pc-info { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); display: grid; gap: 8px; }
.photo-panel .pc-info > * { margin: 0 !important; }
.photo-panel .pc-info .photo-pc-note { font-size: .86rem; line-height: 1.55; }
.photo-panel .pc-info .safe-note { font-size: .82rem; }
.photo-panel .photo-actions ~ .photo-msg { margin-top: 18px !important; }
.photo-panel .pfile { margin-top: 12px; }
.photo-panel .pfile p { margin-top: 4px; }
/* 제목 영역과 본문 줄 맞춤
   - 고르는 페이지(체크·사진 기록): 본문도 제목과 같은 760px 가운데 열
   - 가이드 목록: 본문이 넓으므로 제목도 본문과 같은 넓은 폭에 맞춤 */
.hub-list, .hub-foot { max-width: 760px !important; margin-left: auto; margin-right: auto; }
.doc-head.glist-head > * { max-width: none !important; }
@media (min-width: 1120px) { .doc-head.glist-head { padding-inline: calc(50vw - 50%); } }
