/* kakao-search — minimal, secure, no external fonts/CDNs */

:root {
  --bg: #f8fafc;
  --fg: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --card: #ffffff;
  --accent: #1f2937;
  --accent-fg: #ffffff;
  --err: #b91c1c;
  --ok: #065f46;
  --mark: #fef3c7;
  --radius: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --fg: #e5e7eb;
    --muted: #94a3b8;
    --line: #1f2937;
    --card: #111827;
    --accent: #f3f4f6;
    --accent-fg: #0b1220;
    --err: #f87171;
    --ok: #34d399;
    --mark: #78350f;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.wrap {
  max-width: 880px;
  margin: 32px auto 80px;
  padding: 0 16px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--fg);
  text-decoration: none;
}

.nav a {
  margin-left: 12px;
  color: var(--muted);
  text-decoration: none;
}
.nav a:hover { text-decoration: underline; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 24px;
}

h1 { margin: 0 0 8px; font-size: 22px; }

.muted { color: var(--muted); font-size: 14px; }

label {
  display: block;
  margin: 14px 0 4px;
  font-weight: 600;
  font-size: 14px;
}

input[type="text"], input[type="password"], input[type="search"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: var(--card);
  color: var(--fg);
  font: inherit;
}
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0;
  font-weight: 400;
}

button, .btn {
  display: inline-block;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: 6px;
  padding: 9px 14px;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}
button:hover, .btn:hover { filter: brightness(0.95); }

.err {
  color: var(--err);
  border: 1px solid var(--err);
  border-radius: 6px;
  padding: 8px 12px;
  margin-top: 16px;
  background: rgba(185, 28, 28, 0.05);
}

.kbd {
  display: inline-block;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 10px;
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}
.result-table th, .result-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 14px;
}
.result-table th { background: var(--bg); font-weight: 600; }
.result-table mark { background: var(--mark); padding: 0 2px; border-radius: 3px; }

.auth-debug {
  margin-top: 24px;
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}
.auth-debug pre {
  background: var(--bg);
  padding: 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  overflow: auto;
  max-height: 200px;
}

.foot {
  margin-top: 32px;
  text-align: center;
  color: var(--muted);
}

#qr { max-width: 220px; image-rendering: pixelated; }
