/* SeeReal 판독 페이지 — 한 열, 카메라 뷰파인더처럼 사진을 프레임 안에 넣고 결과를 도장처럼 찍는 구성 */
[hidden] { display: none !important; }
:root {
  --bg: #f3f6f4;          /* 민트 기운이 살짝 도는 밝은 회색 */
  --surface: #ffffff;
  --ink: #0e1714;         /* 거의 검정, 녹색 기운 */
  --muted: #5b6b65;
  --line: #d6e0db;
  --accent: #0a8f6c;      /* 시리얼 민트를 밝은 배경에서 읽히게 낮춘 값 */
  --accent-ink: #ffffff;
  --accent-soft: #e2f4ed;
  --warn: #c2410c;        /* AI 생성 의심 */
  --warn-soft: #fdebe1;
  --ok: #0a8f6c;          /* 흔적 없음 */
  --ok-soft: #e2f4ed;
  --neutral: #55636a;     /* 범위 밖·판독 불가 */
  --neutral-soft: #e8edef;
  --focus: #0a8f6c;
  --font-body: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1210; --surface: #121c19; --ink: #e8f1ed; --muted: #9db0a8; --line: #24342f;
    --accent: #3ddcaa; --accent-ink: #062018; --accent-soft: #143a2f;
    --warn: #ff8a5c; --warn-soft: #3a1d12; --ok: #3ddcaa; --ok-soft: #143a2f;
    --neutral: #a9b6bb; --neutral-soft: #1d2a2e; --focus: #3ddcaa;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1210; --surface: #121c19; --ink: #e8f1ed; --muted: #9db0a8; --line: #24342f;
  --accent: #3ddcaa; --accent-ink: #062018; --accent-soft: #143a2f;
  --warn: #ff8a5c; --warn-soft: #3a1d12; --ok: #3ddcaa; --ok-soft: #143a2f;
  --neutral: #a9b6bb; --neutral-soft: #1d2a2e; --focus: #3ddcaa;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* 머리 */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--ink); }
.brand-word { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.brand-tag {
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent); border: 1.5px solid currentColor; border-radius: 999px; padding: 1px 8px;
}
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.lang button {
  font: inherit; font-size: 13px; font-weight: 600; border: 0; background: transparent; color: var(--muted);
  padding: 4px 12px; cursor: pointer; min-height: 32px;
}
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* 제목 */
.hero { display: flex; flex-direction: column; gap: 8px; }
.hero h1 {
  margin: 0; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(28px, 7vw, 38px); line-height: 1.2; letter-spacing: -0.03em; text-wrap: balance;
}
.hero p { margin: 0; color: var(--muted); max-width: 40ch; }

/* 뷰파인더(사진 고르기) */
.finder {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 260px;
  text-align: center;
  cursor: pointer;
  transition: background-color .15s ease;
}
.finder::before, .finder::after,
.finder .corner-b::before, .finder .corner-b::after {
  content: ""; position: absolute; width: 26px; height: 26px; border-color: var(--ink); border-style: solid; pointer-events: none;
}
.finder::before { top: 10px; left: 10px; border-width: 3px 0 0 3px; border-top-left-radius: 6px; }
.finder::after { top: 10px; right: 10px; border-width: 3px 3px 0 0; border-top-right-radius: 6px; }
.finder .corner-b::before { bottom: 10px; left: 10px; border-width: 0 0 3px 3px; border-bottom-left-radius: 6px; }
.finder .corner-b::after { bottom: 10px; right: 10px; border-width: 0 3px 3px 0; border-bottom-right-radius: 6px; }
.finder.drag { background: var(--accent-soft); }
.finder[aria-disabled="true"] { cursor: default; }
.finder-icon { width: 44px; height: 44px; color: var(--accent); }
.finder-title { font-weight: 700; font-size: 17px; }
.finder-hint { font-size: 13px; color: var(--muted); }
.finder-specs { font-size: 12px; color: var(--muted); font-family: var(--font-mono); letter-spacing: 0.01em; }

.preview { position: relative; width: 100%; max-width: 100%; display: flex; justify-content: center; }
.preview img { max-height: 320px; max-width: 100%; border-radius: 8px; display: block; object-fit: contain; }
.preview-file {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 10px;
  background: var(--neutral-soft); color: var(--ink); font-size: 14px; max-width: 100%;
}
.file-meta { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }

/* 판독 중: 위에서 아래로 훑는 선 */
.scan { position: absolute; inset: 0; overflow: hidden; border-radius: 8px; pointer-events: none; }
.scan::after {
  content: ""; position: absolute; left: 0; right: 0; height: 3px; top: 0;
  background: var(--accent); box-shadow: 0 0 18px 4px var(--accent);
  animation: sweep 1.6s ease-in-out infinite alternate;
}
@keyframes sweep { from { top: 0; } to { top: calc(100% - 3px); } }
@media (prefers-reduced-motion: reduce) { .scan::after { animation: none; top: 50%; } }

/* 버튼 */
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  font: inherit; font-weight: 700; font-size: 16px; border-radius: 12px; padding: 13px 20px; min-height: 50px;
  cursor: pointer; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); flex: 1 1 auto;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:disabled { opacity: .55; cursor: progress; }
.status { margin: 0; font-size: 14px; color: var(--muted); min-height: 1.6em; }

/* 결과 */
.result {
  background: var(--surface); border-radius: var(--radius); padding: 22px;
  display: flex; flex-direction: column; gap: 14px;
}
.stamp {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 6px; border: 2px solid currentColor;
}
.result-label { margin: 0; font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.3; }
.result-detail { margin: 0; font-weight: 600; }
.result-notice { margin: 0; font-size: 14px; color: var(--muted); padding-top: 12px; border-top: 1px solid var(--line); }
.result-id { margin: 0; font-size: 12px; color: var(--muted); }
.result-id code { font-family: var(--font-mono); color: var(--ink); user-select: all; }

.result[data-kind="ai_suspected"] .stamp { color: var(--warn); background: var(--warn-soft); }
.result[data-kind="no_trace"] .stamp { color: var(--ok); background: var(--ok-soft); }
.result[data-kind="out_of_scope"] .stamp,
.result[data-kind="unreadable"] .stamp,
.result[data-kind="error"] .stamp { color: var(--neutral); background: var(--neutral-soft); }

/* 안내 */
.info { display: flex; flex-direction: column; gap: 18px; }
.info section { display: flex; flex-direction: column; gap: 6px; }
.info h2 { margin: 0; font-size: 15px; font-weight: 800; letter-spacing: -0.01em; }
.info p, .info ul { margin: 0; font-size: 14px; color: var(--muted); }
.info ul { padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }

/* 앱 소개 */
.app {
  border-top: 1px solid var(--line); padding-top: 22px;
  display: flex; flex-direction: column; gap: 10px;
}
.app h2 { margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.app p { margin: 0; font-size: 14px; color: var(--muted); }
.stores { display: flex; gap: 10px; flex-wrap: wrap; }
.store {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 14px; font-weight: 700; font-size: 14px; background: var(--surface);
}
.store svg { width: 18px; height: 18px; }

/* 바닥 */
.foot { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.foot a { color: var(--muted); }
.mail { user-select: all; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap-main { display: flex; flex-direction: column; gap: 16px; }
.finder { overflow: hidden; }
.finder > * { max-width: 100%; min-width: 0; }
.preview img { width: auto; height: auto; min-width: 0; flex: 0 1 auto; }

/* 사진·영상 전환 */
.mode { display: flex; gap: 4px; padding: 4px; background: var(--neutral-soft); border-radius: 12px; align-self: flex-start; }
.mode button {
  font: inherit; font-size: 14px; font-weight: 700; border: 0; background: transparent; color: var(--muted);
  padding: 6px 14px; border-radius: 9px; cursor: pointer; min-height: 36px; display: inline-flex; align-items: center; gap: 6px;
}
.mode button[aria-selected="true"] { background: var(--surface); color: var(--ink); }
.soon { font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 1px 7px; }
.video-panel {
  background: var(--surface); border-radius: var(--radius); padding: 28px 22px;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; min-height: 260px; justify-content: center;
}
.video-panel .finder-icon { color: var(--muted); }
.video-panel p { margin: 0; max-width: 34ch; }
.video-panel .btn { flex: 0 0 auto; opacity: .5; cursor: not-allowed; margin-top: 6px; }

/* 붙여 넣기 안내: 휴대폰에서는 키보드 붙여 넣기가 없으므로 숨김 */
.paste-hint { font-size: 12px; }
@media (hover: none) and (pointer: coarse) { .paste-hint { display: none; } }


/* 사진 처리 고지(업로드 칸 아래 작은 글씨) */
.consent { margin: -4px 0 0; font-size: 12px; color: var(--muted); }
.consent a { color: var(--muted); }

/* 결과 공유 */
.share-note { margin: 0; font-size: 13px; color: var(--muted); }

/* 게임 카드 */
.game-card {
  display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
  transition: border-color .15s ease;
}
.game-card:hover { border-color: var(--accent); }
.game-kicker { font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.game-title { font-family: var(--font-display); font-size: 19px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.35; }
.game-body { font-size: 14px; color: var(--muted); }
.game-cta { margin-top: 4px; font-size: 14px; font-weight: 800; color: var(--accent); }

/* 자주 묻는 질문 */
.faq details { border-top: 1px solid var(--line); padding: 10px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--ink); list-style-position: inside; }
.faq details p { margin: 8px 0 0; }
