:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #14171f;
  --muted: #555c6b;
  --line: #d6dbe6;
  --brand: #1d4ed8;
  --brand-text: #ffffff;
  --scam: #b91c1c;
  --scam-bg: #fde8e8;
  --caution: #f2b705;
  --caution-text: #3d2f00;
  --caution-bg: #fff6d6;
  --safe: #15803d;
  --safe-bg: #e3f6ea;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1218;
    --card: #1a1f29;
    --text: #eef1f7;
    --muted: #a8b0c0;
    --line: #2e3544;
    --brand: #3b6ef5;
    --scam: #ef4444;
    --scam-bg: #3a1414;
    --caution-bg: #3a3010;
    --safe: #22c55e;
    --safe-bg: #10301c;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 19px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Noto Sans KR",
    "Malgun Gothic", sans-serif;
}
main, .top, footer { max-width: 640px; margin: 0 auto; padding: 0 16px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { border-radius: 10px; flex: none; }
h1 { font-size: 1.25rem; margin: 0; line-height: 1.2; }
.brand p { margin: 2px 0 0; color: var(--muted); font-size: .85rem; }
.lang {
  flex: none; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 2px solid var(--line);
  background: var(--card); color: var(--text); font: inherit; font-size: .9rem; font-weight: 600;
}

.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 18px 0 14px; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.tabs button {
  min-height: 56px; border: 0; border-radius: 12px; background: transparent; color: var(--muted);
  font: inherit; font-weight: 700; font-size: .95rem;
}
.tabs button[aria-selected="true"] { background: var(--brand); color: var(--brand-text); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.card p { margin-top: 0; }
label { display: block; font-weight: 700; margin: 6px 0; }
textarea, input[type="text"], input[type="password"] {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 2px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 12px;
}
textarea:focus, input:focus, button:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
input[type="file"] { width: 100%; font: inherit; font-size: .9rem; margin-bottom: 14px; }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 600; }
label.check input { width: 26px; height: 26px; }

button.primary, button.big, .actions button {
  width: 100%; min-height: 60px; border-radius: 14px; font: inherit; font-weight: 800; cursor: pointer;
}
button.primary { border: 0; background: var(--brand); color: var(--brand-text); font-size: 1.1rem; margin-top: 4px; }
button.big { border: 2px solid var(--line); background: var(--card); color: var(--text); }
button:disabled { opacity: .55; cursor: default; }
#demo-acct { margin-bottom: 16px; }

.or { text-align: center; color: var(--muted); margin: 14px 0; font-weight: 600; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.note { color: var(--muted); font-size: .85rem; margin: 8px 2px 0; }

.examples h2 { font-size: 1rem; margin: 22px 0 8px; color: var(--muted); }
.chips { display: flex; flex-direction: column; gap: 8px; }
.chips button {
  text-align: left; min-height: 52px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font: inherit; font-size: .85rem; line-height: 1.35;
}
.chips button span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.busy { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 22px 0;
  font-weight: 700; color: var(--muted); }
.busy[hidden], .error[hidden], .result[hidden] { display: none; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 4px solid var(--line);
  border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

.error { margin: 18px 0; padding: 14px 16px; border-radius: 14px; background: var(--caution-bg);
  border: 2px solid var(--caution); font-weight: 600; }

/* ---- result ---------------------------------------------------------- */
.result { margin: 22px 0 8px; background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  overflow: hidden; scroll-margin-top: 12px; }
.banner { display: flex; align-items: center; gap: 14px; padding: 20px 18px; color: #fff; }
.banner .icon { font-size: 2.6rem; line-height: 1; flex: none; }
.banner h2 { margin: 0; font-size: 1.6rem; line-height: 1.15; }
.banner p { margin: 4px 0 0; font-weight: 600; }
.scam .banner { background: var(--scam); }
.caution .banner { background: var(--caution); color: var(--caution-text); }
.safe .banner { background: var(--safe); }
.body { padding: 16px 18px 18px; }
.body h3 { font-size: 1.05rem; margin: 18px 0 8px; }
.summary { font-size: 1.05rem; margin: 0; }
.loss { font-size: 1.05rem; font-weight: 700; margin: 0 0 10px; }
.loss strong { color: var(--scam); font-size: 1.5rem; display: block; }
ol.steps { padding-left: 1.4em; margin: 0; }
ol.steps li { margin-bottom: 8px; }
.actions { display: grid; gap: 10px; margin-top: 18px; }
.actions .tell { border: 0; background: var(--brand); color: var(--brand-text); }
.actions .clicked { border: 2px solid var(--scam); background: transparent; color: var(--scam); }
.urgent { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--scam-bg);
  border: 2px solid var(--scam); }
.urgent h3 { margin-top: 0; color: var(--scam); }
.sent { margin: 8px 0 0; font-weight: 700; color: var(--safe); }
.sent.failed { color: var(--scam); }

/* "Report a wrong answer": quiet link-style button, then a small form */
.report-wrap { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 8px; }
.report-btn { min-height: 48px; padding: 0; border: 0; background: none; color: var(--muted); font: inherit;
  font-weight: 600; text-decoration: underline; cursor: pointer; }
.report fieldset { border: 1px solid var(--line); border-radius: 12px; margin: 6px 0 10px; padding: 8px 12px; }
.report legend { font-weight: 700; padding: 0 4px; }
.report label.check { align-items: flex-start; margin: 10px 0; font-weight: 600; }
.report label.check input { flex: none; }
.report .note { color: var(--muted); font-size: .9rem; margin: 8px 0; }
.report .send-report { width: 100%; min-height: 52px; border-radius: 14px; border: 2px solid var(--line);
  background: var(--card); color: var(--text); font: inherit; font-weight: 800; cursor: pointer; }

details { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
summary { font-weight: 700; cursor: pointer; min-height: 40px; }
.why { list-style: none; padding: 0; margin: 8px 0 0; }
.why li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.why li:last-child { border-bottom: 0; }
.why .hard::before { content: "● "; color: var(--scam); }
code, .evidence { font-family: var(--mono); font-size: .8rem; word-break: break-all; color: var(--muted); }
.read-shot { display: block; max-width: 100%; max-height: 320px; margin: 8px 0 0; border-radius: 12px;
  border: 1px solid var(--line); }
.read { white-space: pre-wrap; background: var(--bg); border-radius: 12px; padding: 12px; margin: 8px 0 0;
  font-size: .95rem; }
.meta { color: var(--muted); font-size: .8rem; margin-top: 14px; }

/* account watch list */
.checks { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.checks > li { border: 1px solid var(--line); border-left-width: 8px; border-radius: 12px; padding: 10px 12px; }
.checks > li.scam { border-left-color: var(--scam); background: var(--scam-bg); }
.checks > li.caution { border-left-color: var(--caution); background: var(--caution-bg); }
.checks > li.safe { border-left-color: var(--safe); }
.checks .line1 { display: flex; justify-content: space-between; gap: 8px; font-weight: 800; }
.checks .line2 { color: var(--muted); font-size: .9rem; }
.checks ul { margin: 6px 0 0; padding-left: 1.1em; font-size: .9rem; }
.checks img { display: block; width: 100%; max-width: 420px; margin-top: 8px; border-radius: 8px;
  border: 1px solid var(--line); }
.tag { font-size: .75rem; font-weight: 800; padding: 2px 8px; border-radius: 99px; color: #fff;
  white-space: nowrap; align-self: center; }
.scam .tag { background: var(--scam); }
.caution .tag { background: var(--caution); color: var(--caution-text); }
.safe .tag { background: var(--safe); }

footer { color: var(--muted); font-size: .8rem; padding-top: 18px; padding-bottom: 32px; text-align: center; }
footer p { margin: 4px 0; }
footer a { color: inherit; }

/* privacy page */
.privacy { max-width: 640px; margin: 0 auto; padding: 16px 16px 40px; line-height: 1.55; }
.privacy h1 { font-size: 1.4rem; margin: 18px 0 8px; }
.privacy h2 { font-size: 1.05rem; margin: 18px 0 4px; }
.privacy ul { padding-left: 1.2em; }
.privacy li { margin: 6px 0; }
.privacy .dim { color: var(--muted); font-size: .85rem; }

/* passcode screen */
.login { max-width: 440px; margin: 0 auto; padding: 40px 16px; text-align: center; }
.login img { border-radius: 16px; }
.login h1 { font-size: 1.5rem; margin: 14px 0 20px; }
.login h1 span, .login label span { display: block; font-size: .8em; font-weight: 600; color: var(--muted); }
.login form { text-align: left; }
.login input { font-size: 1.4rem; letter-spacing: .2em; text-align: center; }

/* Korean: break lines between words, not in the middle of one */
:lang(ko) body, html:lang(ko) { word-break: keep-all; overflow-wrap: anywhere; }
