:root {
  --bg: #f6f7f9; --card: #ffffff; --text: #111827; --muted: #6b7280; --line: #e5e7eb;
  --green: #15803d; --green-bg: #dcfce7; --yellow: #a16207; --yellow-bg: #fef9c3; --red: #b91c1c; --red-bg: #fee2e2;
  --gray-bg: #f3f4f6; --accent: #111827;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f17; --card: #151b26; --text: #e5e7eb; --muted: #9ca3af; --line: #263041;
    --green: #4ade80; --green-bg: #14321f; --yellow: #facc15; --yellow-bg: #3a3210; --red: #f87171; --red-bg: #3b1616;
    --gray-bg: #1f2633; --accent: #e5e7eb;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif; }
.hidden { display: none !important; }
a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--red); min-height: 1.2em; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 18px; margin: 8px 0; }
header { position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 12px 16px 6px; border-bottom: 1px solid var(--line); }
main { padding: 12px 16px 96px; max-width: 640px; margin: 0 auto; }
nav { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
nav button { flex: 1; padding: 12px 0; border: 0; background: none; color: var(--muted); font-size: 14px; }
nav button.on { color: var(--text); font-weight: 700; }
button { font: inherit; cursor: pointer; }
button[type=submit], .small-btn { background: var(--accent); color: var(--bg); border: 0; border-radius: 10px; padding: 10px 16px; }
.small-btn { padding: 6px 12px; font-size: 14px; }
button.ghost { background: none; border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 8px 14px; }
input, select { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); margin-top: 4px; }
label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
label.check { display: flex; gap: 8px; align-items: center; }
label.check input { width: auto; margin: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.row { display: flex; gap: 8px; align-items: center; }
.between { justify-content: space-between; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin: 10px 0; }
.login { max-width: 360px; margin: 18vh auto 0; display: flex; flex-direction: column; gap: 10px; }
.seg { display: inline-flex; background: var(--gray-bg); border-radius: 10px; padding: 3px; gap: 3px; }
.seg.wide { display: flex; margin: 12px 0 4px; }
.seg.wide button { flex: 1; }
.seg button { border: 0; background: none; color: var(--muted); padding: 6px 14px; border-radius: 8px; font-size: 15px; }
.seg button.on { background: var(--card); color: var(--text); font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.c-green { background: var(--green-bg); color: var(--green); }
.c-yellow { background: var(--yellow-bg); color: var(--yellow); }
.c-red { background: var(--red-bg); color: var(--red); }
.c-none { background: var(--gray-bg); color: var(--muted); }
.light { display: flex; gap: 10px; align-items: flex-start; }
.dot { width: 14px; height: 14px; border-radius: 50%; margin-top: 5px; flex: none; }
.dot.c-green { background: var(--green); } .dot.c-yellow { background: var(--yellow); } .dot.c-red { background: var(--red); } .dot.c-none { background: var(--muted); }
.chips { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.chip { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.chip summary { list-style: none; display: flex; gap: 8px; align-items: center; cursor: pointer; }
.chip summary::-webkit-details-marker { display: none; }
.chip .name { font-weight: 600; }
.chip .text { margin-top: 4px; font-size: 14px; }
.cand h3 { margin: 0; font-size: 17px; }
.cand .plan { margin-top: 6px; font-size: 15px; }
.reasons { margin: 6px 0 0; padding-left: 18px; font-size: 14px; color: var(--muted); }
.list-item { padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.empty { text-align: center; padding: 28px 8px; }
.empty .big { font-size: 20px; font-weight: 700; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; font-size: 14px; }
.info { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--muted); color: var(--muted); font-size: 12px; line-height: 16px; text-align: center; margin-left: 4px; cursor: pointer; }
.quote { margin: 5px 0; padding: 12px; }
.big-num { font-size: 20px; font-weight: 700; margin: 2px 0; }
.link { cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
