:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1f2328;
  --muted: #5b6470;
  --line: #e4e1da;
  --accent: #c8102e;
  --accent-soft: #fdecef;
  --ok: #1a7f37;
  --warn-bg: #fff6e0;
  --warn-line: #e8c46a;
  --radius: 10px;
  --max: 760px;
  --sun: #f4b43a;
  --mount: #5b7fa6;
  --snow: #ffffff;
  --plane: #c8102e;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --surface: #1d2024;
    --text: #e8e6e3;
    --muted: #a3abb5;
    --line: #2e3238;
    --accent: #ff5a6e;
    --accent-soft: #3a1d22;
    --ok: #4ac26b;
    --warn-bg: #2f2814;
    --warn-line: #8a6d1f;
    --mount: #3d5a7a;
    --snow: #e8e6e3;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  line-height: 1.7;
  font-size: 17px;
}
a { color: var(--accent); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding-top: 12px; padding-bottom: 12px; }
.logo { font-weight: 800; color: var(--text); text-decoration: none; font-size: 19px; }
.logo span { color: var(--accent); }
.nav { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); }

main { padding: 24px 0 48px; }
h1 { font-size: 28px; line-height: 1.35; margin: 8px 0 12px; }
h2 { font-size: 21px; margin: 36px 0 10px; padding-top: 8px; border-top: 1px solid var(--line); }
h3 { font-size: 18px; margin: 24px 0 8px; }
.lead { color: var(--muted); font-size: 18px; }
.meta { color: var(--muted); font-size: 14px; }
.breadcrumb { font-size: 14px; color: var(--muted); }
.breadcrumb a { color: var(--muted); }

.notice {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 15px;
  margin: 16px 0;
}
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 16px 0; }
.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  color: var(--text);
  text-decoration: none;
}
.card:hover { border-color: var(--accent); }
.card strong { display: block; margin-bottom: 4px; }
.card small { color: var(--muted); }

table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; display: block; overflow-x: auto; }
th, td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: var(--surface); }

/* checklist */
.checklist { list-style: none; padding: 0; margin: 12px 0; }
.checklist li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 6px 0;
}
.checklist label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; cursor: pointer; }
.checklist input { width: 20px; height: 20px; margin-top: 4px; flex: none; accent-color: var(--accent); }
.checklist li.done { opacity: .6; }
.checklist li.done .item-text { text-decoration: line-through; }
.checklist .item-note { display: block; color: var(--muted); font-size: 14px; }
.checklist li[hidden] { display: none; }
.tag { display: inline-block; font-size: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; margin-left: 6px; color: var(--muted); }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.toolbar button, .filters button {
  font: inherit; font-size: 15px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 6px 14px; cursor: pointer;
}
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.filters fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin: 0; }
.filters legend { font-size: 14px; color: var(--muted); padding: 0 4px; }
.filters label { margin-right: 10px; font-size: 15px; white-space: nowrap; }
.progress { flex: 1 1 200px; height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0; background: var(--ok); transition: width .2s; }
.progress-label { font-size: 14px; color: var(--muted); }

.sources { font-size: 14px; color: var(--muted); }
.sources li { margin: 4px 0; word-break: break-all; }

.site-footer { border-top: 1px solid var(--line); padding: 24px 0 40px; font-size: 14px; color: var(--muted); }
.site-footer a { color: var(--muted); margin-right: 12px; }

/* planner */
.planner { scroll-margin-top: 12px; }
.steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 16px; font-size: 14px; color: var(--muted); counter-reset: s; }
.steps li { counter-increment: s; display: flex; align-items: center; gap: 6px; }
.steps li::before { content: counter(s); width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); display: inline-grid; place-items: center; font-size: 12px; }
.steps li.on { color: var(--text); font-weight: 600; }
.steps li.on::before { background: var(--accent); border-color: var(--accent); color: #fff; }
.steps li + li::after { content: none; }
.planner.has-result .steps { display: none; }

.hero { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.hero > div { flex: 1 1 280px; }
.hero h1 { margin-top: 0; }
.hero-art { width: 200px; max-width: 45%; height: auto; flex: none; }
@media (max-width: 480px) { .hero-art { width: 140px; max-width: none; margin: 0 auto; } }
.soon { color: var(--muted); font-size: 14px; margin-top: 10px; }
.btn { white-space: nowrap; }
.w-icon { width: 34px; height: 34px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.weather { display: flex; gap: 12px; align-items: flex-start; }
.todo li { display: flex; align-items: flex-start; flex-wrap: wrap; }
.todo li > label { flex: 1 1 0; min-width: 0; }
.todo .info {
  flex: none; margin: 8px 6px 0 0; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer;
}
.todo .info.on { border-color: var(--accent); color: var(--accent); }
.todo li > .d { flex-basis: 100%; padding: 0 12px 10px 38px; color: var(--muted); font-size: 14px; }
.ad-slot:empty { display: none; }

/* v3: 한 번 누르면 다음 단계 */
.picked { display: flex; flex-wrap: wrap; gap: 6px; min-height: 0; }
.pill { font: inherit; font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.pill:hover { color: var(--accent); border-color: var(--accent); }
.chips.big { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.chips.big .chip { padding: 14px 10px; border-radius: var(--radius); font-size: 16px; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.chips.big .chip small { margin: 0; font-weight: 400; }
.chips.big .chip:hover { border-color: var(--accent); color: var(--accent); }

.toggles { display: flex; gap: 8px; margin: 10px 0 4px; flex-wrap: wrap; }
.toggle { font-size: 14px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; cursor: pointer; background: var(--surface); }
.toggle input { accent-color: var(--accent); margin-right: 4px; }

.parts { display: flex; justify-content: space-between; list-style: none; padding: 0; margin: 18px 0 8px; position: relative; }
.parts::before { content: ""; position: absolute; left: 18px; right: 18px; top: 17px; height: 2px; background: var(--line); }
.parts li { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); position: relative; flex: 1; text-align: center; }
.parts button { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); background: var(--bg); color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; }
.parts button.on { border-color: var(--accent); color: var(--accent); }
.parts button.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
@media (max-width: 420px) { .parts li span { display: none; } }

.part-title { display: flex; align-items: center; gap: 8px; border: none; margin: 12px 0 8px; padding: 0; }
.part-title .g-count { font-size: 15px; }
#part .todo { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 6px; }
#part .todo li:first-child { border-top: none; }
.part-nav { display: flex; justify-content: space-between; gap: 8px; margin: 16px 0; }
.part-nav .btn:only-child, .part-nav #next { margin-left: auto; }

.finish { text-align: center; padding: 24px 0; }
.finish-art { width: 96px; height: 96px; }
.finish h2 { border: none; margin: 12px 0 4px; }
.actions.center { justify-content: center; }
.print-only { display: none; }
.todo .d[hidden] { display: none; }

.q { border: none; padding-top: 0; margin: 24px 0 12px; font-size: 20px; }
.country-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.country {
  font: inherit; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 10px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--text); cursor: pointer; font-weight: 600;
}
.country svg { width: 48px; height: 32px; }
.country:hover:not(:disabled) { border-color: var(--accent); }
.country:disabled { cursor: default; color: var(--muted); font-weight: 400; opacity: .7; }
.country small { font-size: 12px; }

.dates { display: flex; gap: 12px; flex-wrap: wrap; }
.dates label { display: flex; flex-direction: column; font-size: 14px; color: var(--muted); flex: 1 1 140px; }
.dates input { font: inherit; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); margin-top: 4px; }
.hint { color: var(--muted); font-size: 15px; margin: 16px 0 8px; }
.error { color: var(--accent); font-size: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-size: 15px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer;
}
.chip small { margin-left: 6px; font-size: 11px; color: var(--muted); }
.chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.options { display: flex; gap: 16px; flex-wrap: wrap; margin: 16px 0 0; font-size: 15px; }
.options input { accent-color: var(--accent); }

.actions { display: flex; gap: 8px; margin: 20px 0 8px; flex-wrap: wrap; }
.btn { font: inherit; font-weight: 600; padding: 10px 20px; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; }
.btn:disabled { opacity: .4; cursor: default; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); font-weight: 400; }
.btn.small { padding: 6px 14px; font-size: 14px; }

.result-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.summary { font-size: 16px; }
.summary strong { font-size: 20px; }
.dday { color: var(--accent); font-weight: 700; }
.weather { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 12px 0; font-size: 15px; }
.weather p { margin: 4px 0; }
.weather small { color: var(--muted); display: block; margin-top: 4px; }
.flag { display: inline-block; margin-top: 4px; color: var(--accent); font-weight: 600; }
.progress-row { display: flex; align-items: center; gap: 10px; margin: 12px 0; }

.group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 8px 0; }
.group summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; font-weight: 600; }
.group summary::-webkit-details-marker { display: none; }
.group summary::after { content: "▾"; margin-left: auto; color: var(--muted); }
.group[open] summary::after { content: "▴"; }
.g-icon { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; flex: none; }
.g-count { color: var(--muted); font-weight: 400; font-size: 14px; }
.todo { list-style: none; margin: 0; padding: 0 6px 8px; }
.todo li { border-top: 1px solid var(--line); }
.todo label { display: flex; gap: 10px; padding: 10px 8px; cursor: pointer; align-items: flex-start; }
.todo input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--accent); }
.todo .t { display: block; }
.todo .d { display: block; color: var(--muted); font-size: 14px; }
.todo .more { font-size: 13px; }
.todo li.done .t { text-decoration: line-through; color: var(--muted); }
.urgent { font-style: normal; font-size: 11px; color: #fff; background: var(--accent); border-radius: 4px; padding: 1px 6px; margin-left: 4px; vertical-align: middle; }

.below { margin-top: 48px; }
.link-list { padding-left: 18px; }
.link-list li { margin: 6px 0; }
.more-link { font-size: 15px; }

@media print {
  .group { break-inside: avoid; }
  .actions, .result-head button, .below { display: none; }
  #planner > *:not(#printable) { display: none !important; }
  .print-only { display: block !important; }

  .site-header, .site-footer, .toolbar, .filters, .notice { display: none; }
  .checklist li { border: none; }
  body { background: #fff; color: #000; }
}
