:root {
  --bg: #f6f7fb; --surface: #ffffff; --ink: #14161f; --muted: #646b7d; --line: #e3e6ef;
  --brand: #4b3df5; --brand-soft: #ecebff; --brand-ink: #ffffff;
  --yes: #0f8a5f; --yes-soft: #e3f6ee; --no: #b4232c; --no-soft: #fdeceb; --mid: #c27b05;
  --shadow: 0 1px 2px rgba(20, 22, 31, .04), 0 8px 24px rgba(20, 22, 31, .06);
  --r: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0f15; --surface: #171923; --ink: #eceef5; --muted: #9aa1b4; --line: #2a2d3b;
    --brand: #8b80ff; --brand-soft: #24204a; --brand-ink: #0e0f15;
    --yes: #3ccf91; --yes-soft: #12301f; --no: #ff7a80; --no-soft: #3a1619; --mid: #f0b44c;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.65 "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  word-break: keep-all; overflow-wrap: anywhere;
}
a { color: var(--brand); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 22px; }
.eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--brand); }
h1, h2, h3 { line-height: 1.3; margin: 0 0 10px; letter-spacing: -.02em; }
h1 { font-size: clamp(30px, 5vw, 48px); font-weight: 800; }
h1 em { font-style: normal; color: var(--brand); }
h2 { font-size: clamp(22px, 3vw, 28px); }
h3 { font-size: 18px; }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; font-size: 20px; }
.logo-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); font-size: 13px; font-weight: 800; }
.logo small { color: var(--muted); font-size: 12px; margin-left: 4px; }
.top nav a { margin-left: 18px; color: var(--muted); text-decoration: none; font-size: 14px; }
.top nav a:hover { color: var(--ink); }

/* hero + form */
.hero { padding: 56px 0 40px; text-align: center; }
.lead { color: var(--muted); font-size: 17px; margin: 0 auto 28px; max-width: 680px; }
.form { text-align: left; max-width: 760px; margin: 0 auto; display: grid; gap: 16px; padding: 26px; }
.form label { display: grid; gap: 6px; font-weight: 700; font-size: 14px; }
.hint { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 6px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
input { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; width: 100%; outline: none; }
input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 6px; min-height: 48px; cursor: text; font-weight: 400; }
.chips:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.chips input { border: 0; box-shadow: none !important; padding: 5px 6px; flex: 1; min-width: 160px; background: transparent; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 5px 6px 5px 12px; font-size: 14px; font-weight: 600; }
.chip button { border: 0; background: none; color: inherit; font-size: 16px; line-height: 1; cursor: pointer; padding: 0 4px; }
.examples { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.examples button { font: inherit; border: 1px dashed var(--line); background: none; color: var(--muted); border-radius: 999px; padding: 3px 10px; cursor: pointer; }
.examples button:hover { color: var(--brand); border-color: var(--brand); }
.btn-main { font: inherit; font-weight: 800; font-size: 17px; border: 0; border-radius: 12px; padding: 15px; background: var(--brand); color: var(--brand-ink); cursor: pointer; }
.btn-main:disabled { opacity: .6; cursor: wait; }
.btn-sub { font: inherit; font-weight: 700; font-size: 14px; border: 1px solid var(--brand); background: var(--surface); color: var(--brand); border-radius: 10px; padding: 9px 16px; cursor: pointer; text-decoration: none; display: inline-block; white-space: nowrap; }
.btn-sub:disabled { opacity: .6; cursor: wait; }
.form-msg { margin: 0; color: var(--no); font-size: 14px; min-height: 1em; }

/* result */
.shared .hero { display: none; }
.shared .result { padding-top: 32px; }
.result { padding: 20px 20px 10px; display: grid; gap: 16px; scroll-margin-top: 70px; }
.res-head { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.score { display: flex; gap: 20px; align-items: center; }
.score h2 { font-size: 22px; margin-bottom: 4px; }
.score p { margin: 0; }
.ring { position: relative; width: 104px; height: 104px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 11; }
.ring .bg { stroke: var(--line); }
.ring .fg { stroke: var(--brand); stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.ring.good .fg { stroke: var(--yes); } .ring.mid .fg { stroke: var(--mid); } .ring.low .fg { stroke: var(--no); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 30px; font-weight: 800; }
.share p { margin: 0 0 8px; }
.share-row { display: flex; gap: 6px; }
.share-row input { font-size: 13px; padding: 9px 11px; }
.share-row button { font: inherit; font-weight: 700; font-size: 14px; border: 0; border-radius: 10px; padding: 0 16px; background: var(--ink); color: var(--surface); cursor: pointer; white-space: nowrap; }
.badge { margin-top: 10px; display: inline-block; padding: 7px 12px; border-radius: 999px; background: var(--yes-soft); color: var(--yes); font-size: 13px; }

.table-card { padding: 0; overflow-x: auto; }
.grid { width: 100%; border-collapse: collapse; min-width: 560px; }
.grid th, .grid td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: center; }
.grid thead th { font-size: 14px; background: var(--bg); }
.grid thead th small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.grid tbody th { text-align: left; font-size: 15px; }
.grid tbody tr:last-child > * { border-bottom: 0; }
.grid th:first-child { width: 28%; }
.cell.done { cursor: pointer; }
.cell.done:hover, .cell.sel { background: var(--brand-soft); }
.yes { color: var(--yes); font-weight: 800; }
.no { color: var(--muted); font-weight: 600; }
.bad { color: var(--no); font-weight: 700; }
.retry { font: inherit; font-size: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 6px; padding: 2px 8px; cursor: pointer; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

.detail-head, .advice-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.detail h3 { font-size: 17px; }
.x { font-size: 24px; line-height: 1; border: 0; background: none; color: var(--muted); cursor: pointer; }
.verdict { border-radius: 10px; padding: 11px 14px; font-weight: 700; margin: 6px 0 12px; }
.verdict.yes { background: var(--yes-soft); color: var(--yes); }
.verdict.no { background: var(--no-soft); color: var(--no); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tag { background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; font-size: 13px; }
.answer { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; max-height: 520px; overflow: auto; }
.md { font-size: 15px; }
.md h4 { margin: 16px 0 6px; font-size: 16px; }
.md p { margin: 0 0 8px; }
.md ul, .md ol { margin: 0 0 8px; padding-left: 22px; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.srcs { font-size: 13px; padding-left: 22px; margin: 0; }
.advice h3 { margin-bottom: 2px; }
.advice-head p { margin: 0; }
.advice .md:not(:empty) { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 6px; }
.again { text-align: center; margin: 4px 0 0; }
.again-btn { display: inline-block; text-decoration: none; padding: 14px 28px; }

/* sections */
.sec { padding: 48px 20px 8px; }
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cols3 p { margin: 0; color: var(--muted); font-size: 15px; }
.num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 14px; margin-bottom: 10px; }
.why p { margin: 0 0 10px; }
.why p:last-child { margin: 0; }
details.card { padding: 0; margin-bottom: 10px; }
details summary { padding: 16px 20px; font-weight: 700; cursor: pointer; }
details p { margin: 0; padding: 0 20px 18px; color: var(--muted); }
.foot { margin-top: 56px; padding: 28px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: center; }

@media (max-width: 760px) {
  .pc { display: none; }
  .hero { padding: 36px 0 28px; }
  .row2, .res-head, .cols3 { grid-template-columns: 1fr; }
  .top nav a { margin-left: 12px; font-size: 13px; }
  .logo small { display: none; }
  .wrap, .result, .sec { padding-left: 16px; padding-right: 16px; }
  .score { gap: 14px; }
  .ring { width: 84px; height: 84px; }
  .ring b { font-size: 24px; }
  .grid { min-width: 0; font-size: 14px; }
  .grid th, .grid td { padding: 11px 6px; }
  .grid thead th { font-size: 13px; }
  .grid thead th small { display: none; }
  .grid tbody th { font-size: 14px; }
  .advice-head { flex-direction: column; }
}
