/* 확인 페이지 모양 — index.html 의 <style> 에서 옮겼다(요청 238-4 · 전체 CSP: style-src 'self' — 페이지 안 <style> · style= 속성을 안 쓴다). */
:root {
  /* 앱 색(lib/design/tokens.dart) + 흰 바탕에서 읽히게 진하게 한 상태 색(요청 150). 바꾸면 design151.test.mjs 가 대비를 다시 잰다. */
  --hero: #121417; --hero-fg: #F5F6F7; --hero-dim: #A0A4AB; --invite-fg: #C9CDD3;
  --page: #FFFFFF; --ink: #16181C; --ink2: #4B5260; --line: #E4E7EC; --card: #F4F5F7;
  --ok: #15803D; --ok-bg: #ECFDF3; --ok-line: #BBE5C8;
  --unk: #B45309; --unk-bg: #FFFBEB; --unk-line: #F3D9A4;
  --bad: #B91C1C; --bad-bg: #FEF2F2; --bad-line: #F5C2C2;
  --off: #4B5260; --off-bg: #F4F5F7; --off-line: #DADDE3;
  --button: #2563EB; --on-tone: #FFFFFF; --warn: #B91C1C;
  color-scheme: light;
}
/* 🔴 앱 글꼴 Pretendard — 이 페이지 글자 조각을 **이 묶음 안에** 둔다(요청 154 · fonts.test.mjs). 밖에서 받아 오지 않는다 — 보는 사람 주소가 남에게
   안 간다. 600 은 브라우저가 700 을 고른다. 조각에 없는 글자(✓ 같은 기호 · 드문 한글)는 아래 기기 글꼴로. 라이선스 fonts/OFL.txt(SIL OFL 1.1). */
/* 🔴 요청 299 — 글꼴 두 벌(Pretendard 400 · 700, 375KB)은 page.js 가 **사진이 온 뒤** FontFace 로 싣는다(loadFontsAfterPhoto). 여기 글꼴 선언이
   있으면 첫 글자가 그려지자마자 사진과 같은 때 내려받아 느린 회선을 나눠 썼다(299 재기 — 굵은 글꼴이 사진과 겹침). 그 사이 아래 목록의 폰 글꼴로 보인다. */
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font-family: Pretendard, "Pretendard Variable", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", "Malgun Gothic", sans-serif;
  /* 🔴 글씨를 키웠다(결정 98 · ai-testers-166 표 1 의 44 — 「작고 흐리다」): 16 → 17px, 작은 회색 글씨 · 칸 이름도 같이(verify167.test.mjs). */
  font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
main { max-width: 560px; margin: 0 auto; padding-bottom: 24px; }
/* 머리 없는 화면(첫 화면 · 없는 코드 · 바쁨 · 실패)은 여백만. */
main > h1, main > section, main > p { margin-left: 16px; margin-right: 16px; }
h1 { font-size: 1.35rem; line-height: 1.4; margin: 20px 0 8px; letter-spacing: -0.3px; }
.id { color: var(--ink2); font-size: .9rem; word-break: break-all; margin-bottom: 16px; }
section { border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
section h2 { font-size: 1.02rem; margin: 0 0 8px; }
p { margin: 6px 0; }
.dim { color: var(--ink2); font-size: .96rem; }

/* ── 머리 — 사진이 있으면 얇게(앱 이름 · 코드만, 결정 98), 없으면 상태 한 줄 ── */
.hero { background: var(--hero); color: var(--hero-fg); padding: 18px 20px 22px; }
.hero.slim { padding: 14px 20px 12px; }
.hero.slim.has-photo { padding-bottom: 52px; }
.hero .brand { margin: 0; font-size: .94rem; font-weight: 700; color: var(--hero-fg); }
.hero h1.state-title { font-size: 1.45rem; line-height: 1.38; margin: 14px 0 6px; font-weight: 700; color: var(--hero-fg); }
.hero .body { color: var(--hero-fg); }
.hero .id { color: var(--hero-dim); margin: 0; }

/* ── 기호(✓ ? ✕) — 색만으로 말하지 않는다 ── */
.sym { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 22px; height: 22px; border-radius: 50%;
       font-size: 13px; font-weight: 700; line-height: 1; color: var(--on-tone); }

/* ── 사진 — 맨 위, 얇은 머리에 조금 걸쳐 놓인다(결정 98) ── */
.photo-card { margin: -40px 16px 0; border: 0; border-radius: 8px; background: var(--page); padding: 10px 10px 14px;
              box-shadow: 0 12px 32px rgba(0, 0, 0, .28); position: relative; }
.photo-card p { margin: 6px 4px 0; line-height: 1.5; }
/* 큰 글씨 「비교해 보세요」 · 같은지 볼 것 · 작은 판정 줄(결정 98 · 요청 172). */
.photo-card h1.compare-title { font-size: 1.32rem; line-height: 1.42; margin: 14px 4px 6px; letter-spacing: -0.3px; }
.photo-card p.compare { font-size: 1rem; color: var(--ink); }
.status { display: flex; align-items: center; gap: 6px; font-size: .92rem; font-weight: 600; }
.photo-card p.status { margin: 12px 4px 0; }
.status .sym { width: 20px; height: 20px; font-size: 12px; }
.status.ok { color: var(--ok); } .status.ok .sym { background: var(--ok); }
.status.unk { color: var(--unk); } .status.unk .sym { background: var(--unk); }
.status.bad { color: var(--bad); } .status.bad .sym { background: var(--bad); }
/* 🔴 나쁜 결과는 작게 숨기지 않는다 — 빨강 · 크게 · 테두리 칸. */
.status.loud { font-size: 1.12rem; font-weight: 700; padding: 10px 12px; border: 2px solid var(--bad); border-radius: 10px; background: var(--bad-bg); }
/* 「눌러서 크게 보기」 — 사진 단추 안, 사진 **바로 밑**. 🔴 사진 위에 얹지 않는다 — 오른쪽 아래에 얹었더니 맞대 볼 QR · 코드를 가렸다(167 로컬 그림). */
.photo-hint { display: table; margin: 8px auto 0; padding: 5px 12px; border-radius: 999px; background: var(--card);
              color: var(--ink); font-size: .86rem; font-weight: 700; line-height: 1.3; pointer-events: none; }
/* 못 불러왔을 때의 칸 — 사진 모양을 모르니(4:5 · 9:16 · 가로 16:9 — 결정 105) 길게 세우지 않는다. */
.photo { width: 100%; border-radius: 6px; background: var(--card); min-height: 160px;
         display: flex; align-items: center; justify-content: center; color: var(--ink2); }
/* 받는 동안 자리 잡기 — 단추에만(사진 자체에 높이를 주면 가로 사진이 늘어난다). 받으면(onload → .ready) 푼다. */
.photo-open:not(.ready) { min-height: 50vh; }
.photo-img { display: block; width: auto; max-width: 100%; height: auto; max-height: calc(100vh - 32px);
             margin: 0 auto; border-radius: 4px; background: var(--card); }
/* 🔴 사진을 누르면 크게(요청 139 · viewer.js). 단추 모양은 사진 그대로 — 테두리 · 바탕 없이. */
.photo-open { display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none; cursor: zoom-in; border-radius: 4px; }
.photo-open:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.viewer { position: fixed; inset: 0; z-index: 10; background: rgba(0, 0, 0, .94); }
/* 손가락을 직접 받는 곳은 여기뿐 — 페이지 본문의 브라우저 확대는 막지 않는다(접근성). */
.viewer-stage { position: absolute; inset: 0; overflow: hidden; touch-action: none; }
.viewer-img { display: block; width: 100%; height: 100%; object-fit: contain; transform-origin: 0 0; user-select: none; -webkit-user-select: none; }
.viewer-close { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; width: 48px; height: 48px;
                border: 0; border-radius: 24px; background: rgba(255, 255, 255, .16); color: #fff; font-size: 30px; line-height: 48px; cursor: pointer; }
.viewer-close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* ── 단답 색 칸(시안 B) — 초록 ok · 호박 unk · 빨강 bad · 안내 info(검정) ── */
dl.short { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 20px 16px 16px; }
.tile { border: 1px solid var(--line); border-radius: 14px; padding: 12px; min-width: 0; }
.tile.wide { grid-column: 1 / -1; }
.tile dt { font-size: .88rem; color: var(--ink2); margin: 0 0 6px; }
.tile dd { margin: 0; display: flex; gap: 6px; align-items: flex-start; font-size: .95rem; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.tile dd .sym { margin-top: 1px; }
.tile.ok { background: var(--ok-bg); border-color: var(--ok-line); } .tile.ok dd { color: var(--ok); } .tile.ok .sym { background: var(--ok); }
.tile.unk { background: var(--unk-bg); border-color: var(--unk-line); } .tile.unk dd { color: var(--unk); } .tile.unk .sym { background: var(--unk); }
.tile.bad { background: var(--bad-bg); border-color: var(--bad-line); } .tile.bad dd { color: var(--bad); } .tile.bad .sym { background: var(--bad); }
.tile.off { background: var(--off-bg); border-color: var(--off-line); } .tile.off dd { color: var(--off); } .tile.off .sym { background: var(--off); }
.tile.info dd { color: var(--ink); font-weight: 600; }

/* ── 자세히 ── */
details { margin-top: 10px; }
summary { cursor: pointer; color: var(--ink2); }
details.more { margin: 4px 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
details.more > summary { padding: 14px 0; font-weight: 600; color: var(--ink); }
details.more[open] > summary { margin-bottom: 4px; }
.boxes { display: grid; gap: 10px; }
.box { background: var(--card); border-radius: 10px; padding: 12px 14px; }
.box .label { font-weight: 600; }
.box .value { color: var(--ink2); font-size: .96rem; }
.why-compare { margin: 0 0 12px; }
details.expert { margin-top: 14px; }
details.expert > summary { font-weight: 600; }
details.expert[open] > summary { margin-bottom: 10px; }
details.expert dl { margin-top: 12px; }
.box.differs .value { color: var(--warn); font-weight: 600; }
dl { margin: 0; display: grid; grid-template-columns: fit-content(40%) 1fr; gap: 4px 14px; font-size: .96rem; }
dt { color: var(--ink2); }
/* 지문 같은 긴 글자만 끊는다 — 영어 낱말을 중간에서 자르지 않게(2026-10-07, 영어 판에서 「devic e's」). */
dd { margin: 0; overflow-wrap: anywhere; }
/* 좁은 화면에서는 이름을 값 위로 — 이름 칸이 여러 줄로 접히지 않게(걷기 D7). 단답 칸(dl.short · .tile dt)은 클래스가 더 구체적이라 위 칸 모양 그대로. */
@media (max-width: 520px) { dl { grid-template-columns: 1fr; gap: 2px 0; } dt { margin-top: 10px; } dt:first-child { margin-top: 0; } }
@media (max-width: 520px) { dl.short { grid-template-columns: 1fr 1fr; gap: 10px; } }

/* 🔴 **작은 회색 각주로 두지 마라.** 2026-09-29 에 「가짜 값입니다」를 화면 맨
   아래 흐린 글씨로 뒀다가 사람이 가짜 시각·지문을 진짜로 읽었다. */
.note { font-size: .95rem; color: var(--warn); border: 2px solid var(--warn); border-radius: 10px; padding: 12px 14px; margin: 16px; }

/* ── 「나도 찍기」 — 어두운 초대 카드(시안 B · 요청 149). 정직한 확인 아래 맨 끝. ── */
.invite { margin: 20px 16px 8px; background: var(--hero); border-radius: 16px; padding: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.invite p.dim { margin: 0; flex: 1 1 180px; font-size: .9rem; color: var(--invite-fg); line-height: 1.45; }
.invite-go, .invite-soon summary { display: inline-block; padding: 10px 16px; font-size: .9rem; font-weight: 700; color: var(--on-tone);
                                   background: var(--button); border-radius: 10px; text-decoration: none; list-style: none; cursor: pointer; white-space: nowrap; }
.invite-go:focus-visible, .invite-soon summary:focus-visible { outline: 3px solid var(--hero-fg); outline-offset: 2px; }
.invite-soon summary::-webkit-details-marker { display: none; }
.invite-soon { margin-top: 0; }
.invite-soon[open] { flex-basis: 100%; }
.invite-soon p.dim { margin-top: 10px; }

/* ── 사진 파일로 확인하기(요청 154) — 고르기 단추 · 결과 칸(단답 칸과 같은 색 · 기호) ── */
.file-check { margin-top: 16px; }
.file-pick { display: inline-block; margin-top: 8px; padding: 10px 16px; font-weight: 700; font-size: .92rem; color: var(--on-tone);
             background: var(--button); border-radius: 10px; cursor: pointer; }
.file-pick input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file-pick:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; }
.file-result:not(:empty) { margin-top: 12px; }
/* 🔴 「지금 보는 사진」 칸 안(요청 172) — 고르기 전엔 단추만(칸 폭 그대로), 고른 뒤엔 결과 한 줄(칸 색이 결과 색으로). */
.tile.file-check { margin-top: 0; }
.tile.file-check dd { display: block; }
.tile .file-pick { display: block; margin-top: 2px; text-align: center; line-height: 1.4; }
.tile .file-pick[hidden] { display: none; }
.tile .file-result:not(:empty) { margin-top: 0; }
.file-verdict { display: flex; gap: 6px; align-items: flex-start; margin: 0; font-weight: 700; }
.file-verdict .sym { margin-top: 1px; background: var(--off); }
.file-check.ok .file-verdict { color: var(--ok); } .file-check.ok .file-verdict .sym { background: var(--ok); }
.file-check.off .file-verdict { color: var(--off); }
.file-result p.dim { font-weight: 400; margin-top: 6px; }

/* ── 받은 사진과 비교하기(요청 154 → 212 · compare_ui.js) — 위 색 값만 쓴다. ── */
section.compare { margin: 14px 16px 0; }
section.compare h2 { font-size: 1.08rem; margin: 0 0 4px; }
.cmp-pick { position: relative; display: inline-block; margin: 8px 0 4px; padding: 10px 16px; border-radius: 10px; font-weight: 700;
            color: var(--on-tone); background: var(--button); cursor: pointer; }
.cmp-pick:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; }
/* 파일 칸은 보이지 않게만(초점 · 화면 읽기는 그대로) — display:none 이면 키보드로 못 고른다. */
.cmp-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.cmp-verdict { font-weight: 700; margin-top: 10px; }
.cmp-same { color: var(--ink); } .cmp-diff { color: var(--bad); } .cmp-none { color: var(--unk); }
.cmp-note { color: var(--ink2); font-size: .88rem; }
.cmp-preview { display: block; width: 100%; height: auto; margin-top: 10px; border-radius: 6px; background: var(--card); }
.find-picked { margin: 10px 0 0; }

/* ── QR 없는 사진으로 찾기(결정 132 · 요청 221 · find_ui.js) — 첫 화면 아래. 위 색 값만 쓴다. ── */
section.find { margin: 22px 16px 0; padding-top: 16px; border-top: 1px solid var(--line); }
section.find h2 { font-size: 1.08rem; margin: 0 0 4px; }
section.find h3 { font-size: 1rem; margin: 14px 0 2px; }
.find-btn { position: relative; display: inline-block; margin: 10px 0 4px; padding: 10px 16px; border: 0; border-radius: 10px; font: inherit; font-weight: 700;
            color: var(--on-tone); background: var(--button); cursor: pointer; }
.find-btn:focus-within, .find-btn:focus-visible, .find-again:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; }
.find-file, .find-file2 { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.find-again { position: relative; margin-left: 14px; color: var(--button); text-decoration: underline; cursor: pointer; }
.find-stage { position: relative; margin-top: 10px; line-height: 0; user-select: none; overflow: hidden; }
.find-img { display: block; width: 100%; height: auto; border-radius: 6px; }
.find-rect { position: absolute; box-sizing: border-box; border: 2px solid #FFFFFF; outline: 2px solid var(--button);
             box-shadow: 0 0 0 9999px rgba(0,0,0,.45); cursor: move; touch-action: none; }
.find-rect span { position: absolute; width: 28px; height: 28px; background: #FFFFFF; border: 2px solid var(--button); border-radius: 50%; touch-action: none; }
.find-rect span[data-h="nw"] { left: -15px; top: -15px; cursor: nwse-resize; }
.find-rect span[data-h="ne"] { right: -15px; top: -15px; cursor: nesw-resize; }
.find-rect span[data-h="sw"] { left: -15px; bottom: -15px; cursor: nesw-resize; }
.find-rect span[data-h="se"] { right: -15px; bottom: -15px; cursor: nwse-resize; }
.find-actions { margin-top: 6px; }
.find-msg { font-weight: 700; margin-top: 12px; } .find-err { color: var(--unk); }
.find-found { font-weight: 700; margin: 14px 0 8px; }
.find-list { list-style: none; margin: 0; padding: 0; }
.find-cand { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.find-thumb { flex: 0 0 96px; width: 96px; height: 128px; object-fit: cover; border-radius: 6px; background: var(--card); }
.find-meta { flex: 1; min-width: 0; }
.find-when { margin: 0 0 6px; color: var(--ink2); font-size: .92rem; }
.find-pick { padding: 9px 14px; border: 0; border-radius: 10px; font: inherit; font-weight: 700; color: var(--on-tone); background: var(--button); cursor: pointer; }
.find-note { margin-top: 10px; font-size: .88rem; }
/* 후보 맞춰 보기 진행(요청 224) */
.find-bar { height: 6px; margin: 6px 0 0; border-radius: 3px; background: var(--line); overflow: hidden; }
.find-bar span { display: block; height: 100%; background: var(--button); transition: width .2s; }

form.ask { display: flex; gap: 8px; margin: 10px 0 0; }
form.ask input { flex: 1; min-width: 0; padding: 10px 12px; font: inherit;
                 border: 1px solid var(--line); border-radius: 8px;
                 background: var(--page); color: var(--ink); }
form.ask button { padding: 10px 16px; font: inherit; font-weight: 600; border: 0;
                  border-radius: 8px; background: var(--button); color: var(--on-tone); cursor: pointer; }
