:root {
  --bg: #ffffff;
  --card: #ffffff;
  --ink: #1d1d1b;
  --muted: #6b6a64;
  --line: #e3e1da;
  --accent: #1f5f8b;
  --accent-ink: #ffffff;
  --ok: #1e7a4c;
  --ok-bg: #e5f3ea;
  --warn: #8a5a00;
  --warn-bg: #fbf0d9;
  --bad: #a1332b;
  --bad-bg: #f8e3e0;
  --info-bg: #eef2f6;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161614;
    --card: #161614;
    --ink: #eceae4;
    --muted: #a3a199;
    --line: #34332f;
    --accent: #6fb0dc;
    --accent-ink: #0d1b24;
    --ok: #7fd1a3;
    --ok-bg: #1d3327;
    --warn: #f0c26a;
    --warn-bg: #3a2e14;
    --bad: #f0928a;
    --bad-bg: #3d1f1c;
    --info-bg: #252a30;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", sans-serif;
  word-break: keep-all;
}
main, .top, .foot { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.banner { background: var(--warn-bg); color: var(--warn); padding: 8px 16px; text-align: center; font-size: 14px; font-weight: 600; }
.top { padding-top: 28px; padding-bottom: 8px; }
.top h1 { margin: 0; font-size: 28px; letter-spacing: -0.02em; }
.lede { margin: 4px 0 0; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 16px 0; }
fieldset { border: 0; padding: 0; margin: 18px 0 0; }
legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
label { display: block; font-size: 14px; color: var(--muted); }
input, select {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px; font: inherit; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; min-height: 44px;
}
.row { margin-top: 10px; }
.row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hint { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.tabs { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; background: var(--bg); padding: 4px; border-radius: 12px; }
.tabs button, .seg button {
  font: inherit; border: 0; border-radius: 9px; padding: 10px; min-height: 44px; cursor: pointer; background: transparent; color: var(--muted);
}
.tabs button[aria-selected="true"] { background: var(--card); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { border: 1px solid var(--line); background: var(--bg); color: var(--ink); flex: 1; }
.seg button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.bag { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 8px; align-items: end; margin-top: 8px; }
.bag .x { font: inherit; border: 0; background: none; color: var(--muted); min-height: 44px; padding: 0 6px; cursor: pointer; }
.link { font: inherit; background: none; border: 0; color: var(--accent); padding: 10px 0; cursor: pointer; font-weight: 600; }

/* 결과 */
.summary { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.airline h2 { margin: 0; font-size: 19px; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.airline h2 small { font-size: 13px; color: var(--muted); font-weight: 500; }
.compare { background: var(--info-bg); border-radius: 10px; padding: 10px 12px; margin-top: 10px; font-size: 14px; }
.compare p { margin: 2px 0; }
.fare { border-top: 1px solid var(--line); padding: 12px 0 2px; margin-top: 12px; }
.fare-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.fare-name { font-weight: 700; }
.fare-allow { font-size: 13px; color: var(--muted); }
.badge { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.b-free { background: var(--ok-bg); color: var(--ok); }
.b-ok { background: var(--info-bg); color: var(--ink); }
.b-warn { background: var(--warn-bg); color: var(--warn); }
.b-bad { background: var(--bad-bg); color: var(--bad); }
.scen-when { font-size: 13px; font-weight: 700; margin: 10px 0 2px; color: var(--muted); }
.channels { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 6px; }
.ch { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.ch-label { font-size: 12px; color: var(--muted); }
.ch-total { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.ch-total.dim { font-size: 14px; font-weight: 600; color: var(--muted); }
.ch.best { border-color: var(--ok); }
.ch details { font-size: 12px; color: var(--muted); margin-top: 4px; }
.ch details summary { cursor: pointer; }
.ch ul, .notes { margin: 4px 0 0; padding-left: 18px; }
.notes { font-size: 13px; color: var(--muted); }
.cite { font-size: 12px; color: var(--muted); margin-top: 6px; }
.cite a { color: var(--accent); }
.empty { color: var(--muted); }
.carry-row { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding: 10px 0; }
.carry-row:first-child { border-top: 0; }
.foot { color: var(--muted); font-size: 13px; padding-bottom: 40px; }
@media (max-width: 420px) {
  .row.three { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .top h1 { font-size: 24px; }
}

/* 고르기 버튼 */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips.stack { flex-direction: column; }
.chip {
  font: inherit; text-align: left; border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  border-radius: 10px; padding: 9px 12px; min-height: 44px; cursor: pointer;
}
.chip small { display: block; color: var(--muted); font-size: 12px; }
.chip[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--card); font-weight: 700; }
.chip.mini { min-height: 34px; padding: 4px 10px; font-size: 13px; }
fieldset.sub { margin-top: 14px; }
.bag-wrap { border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 8px; }
.bag-wrap:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.bag-chips { margin-top: 6px; }

/* 예약 전 비교 막대 */
.ladder { background: var(--info-bg); border-radius: 12px; padding: 12px; margin-top: 10px; }
.ladder h3 { margin: 0 0 8px; font-size: 14px; }
.lrow { display: grid; grid-template-columns: 7.5em 1fr; gap: 8px; align-items: center; margin: 6px 0; font-size: 13px; }
.lname { font-weight: 700; line-height: 1.25; }
.lname small { display: block; font-weight: 500; color: var(--muted); }
.bars { display: grid; gap: 3px; }
.bar { position: relative; height: 22px; border-radius: 6px; background: var(--card); overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; background: var(--accent); opacity: .22; border-radius: 6px; }
.bar.airport i { background: var(--warn); }
.bar.zero i { width: 0 !important; }
.bar span { position: relative; padding: 0 8px; line-height: 22px; font-weight: 700; white-space: nowrap; }
.verdict { margin: 10px 0 0; padding-top: 8px; border-top: 1px solid var(--line); font-size: 14px; }
.verdict b { color: var(--ok); }

/* 물건 확인 */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
textarea { display: block; width: 100%; padding: 12px; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; resize: vertical; }
.examples { margin-top: 8px; }
.tally { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; }
.item-row { padding: 14px 16px; }
.item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.item-name { font-weight: 800; font-size: 17px; }
.item-raw { font-size: 12px; color: var(--muted); }
.item-head select { width: auto; min-height: 34px; padding: 4px 8px; font-size: 13px; margin-top: 4px; }
.verdicts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.vcell { border-radius: 10px; padding: 8px 10px; }
.vcell .k { font-size: 12px; font-weight: 600; opacity: .8; }
.vcell .v { font-size: 17px; font-weight: 800; }
.v-allowed { background: var(--ok-bg); color: var(--ok); }
.v-conditional { background: var(--info-bg); color: var(--ink); }
.v-ask, .v-pending_review { background: var(--warn-bg); color: var(--warn); }
.v-prohibited { background: var(--bad-bg); color: var(--bad); }
.cond { font-size: 14px; margin: 8px 0 0; }
.ask-block { margin-top: 10px; }
.ask-block .q { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.scen-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.scen-table td { padding: 6px 4px; border-top: 1px solid var(--line); vertical-align: top; }
.scen-table td.vv { font-weight: 700; white-space: nowrap; }
.cta { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 16px; }
.cta button { font: inherit; border: 1px solid var(--accent); color: var(--accent); background: var(--card); border-radius: 10px; padding: 10px 14px; min-height: 44px; cursor: pointer; font-weight: 700; }

.notice h3 { margin: 0 0 4px; font-size: 16px; }
.links { margin: 8px 0 0; padding-left: 18px; font-size: 14px; }
.links li { margin: 4px 0; }
.links a { color: var(--accent); font-weight: 600; }
.links small { color: var(--muted); }

/* 물건별 안내 페이지 */
.crumb { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.crumb a, .src a { color: var(--accent); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.tbl th { font-size: 12px; color: var(--muted); font-weight: 600; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 700; padding: 10px 16px; border-radius: 10px; }
.src { padding-left: 18px; font-size: 14px; }
.src li { margin: 4px 0; }
.muted { color: var(--muted); }
@media (max-width: 560px) { .tbl.verdict td:nth-child(4), .tbl.verdict th:nth-child(4) { display: none; } }
.facts { padding-left: 18px; font-size: 14px; }
.facts li { margin: 4px 0; }
.facts b { font-weight: 600; margin-right: 4px; }
