/* ============================================================
   儿童机票与婴儿票费用计算器 · 独立视觉：晴空蓝 + 登机牌
   ============================================================ */

.cft-page {
  --cft-bg: #eef6fc;
  --cft-bg-2: #e2eef8;
  --cft-card: #ffffff;
  --cft-soft: #f2f8fd;
  --cft-soft-2: #e2edf6;
  --cft-ink: #10283c;
  --cft-muted: #5c7890;
  --cft-line: #d5e5f2;
  --cft-accent: #1668a8;
  --cft-accent-2: #3f9fd8;
  --cft-sky: #7ec8ea;
  --cft-warm: #d97706;
  --cft-ok: #147a55;
  --cft-warn: #a35a08;
  --cft-bad: #b42318;
  --cft-shadow: 0 12px 34px rgba(22, 78, 120, .1);

  background: var(--cft-bg);
  color: var(--cft-ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.75;
  padding-bottom: 48px;
  transition: background-color .2s ease, color .2s ease;
}

:root[data-theme="dark"] .cft-page {
  --cft-bg: #0a1620;
  --cft-bg-2: #0f2130;
  --cft-card: #102330;
  --cft-soft: #142b3b;
  --cft-soft-2: #1b3a4e;
  --cft-ink: #e6f1f8;
  --cft-muted: #93b0c4;
  --cft-line: #22415a;
  --cft-accent: #5db6ea;
  --cft-accent-2: #8ed3f5;
  --cft-sky: #4f9dc4;
  --cft-warm: #f0a44e;
  --cft-ok: #5fd39c;
  --cft-warn: #f0b45f;
  --cft-bad: #f08a80;
  --cft-shadow: 0 12px 34px rgba(0, 0, 0, .42);
}

html[data-theme="dark"] .cft-page { color-scheme: dark; }

.cft-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 20px 0;
}

/* ---------- 面包屑 ---------- */
.cft-crumb { font-size: 13px; color: var(--cft-muted); margin-bottom: 14px; }
.cft-crumb a { color: var(--cft-muted); text-decoration: none; }
.cft-crumb a:hover { color: var(--cft-accent); }

/* ---------- Hero ---------- */
.cft-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 250px;
  gap: 22px;
  align-items: center;
  background:
    radial-gradient(600px 220px at 92% -20%, rgba(126, 200, 234, .38), transparent 70%),
    linear-gradient(135deg, var(--cft-bg-2), var(--cft-card) 76%);
  border: 1px solid var(--cft-line);
  border-radius: 22px;
  padding: 26px 28px;
  box-shadow: var(--cft-shadow);
  margin-bottom: 20px;
}
.cft-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--cft-accent);
  background: rgba(22, 104, 168, .1);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 8px;
}
.cft-hero h1 { font-size: 28px; line-height: 1.35; margin: 0 0 10px; letter-spacing: -.01em; }
.cft-hero p { margin: 0; font-size: 14.5px; color: var(--cft-muted); max-width: 650px; }
.cft-hero p b { color: var(--cft-ink); }
.cft-hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cft-hero-meta span {
  font-size: 12px;
  color: var(--cft-accent);
  background: var(--cft-soft);
  border: 1px solid var(--cft-line);
  border-radius: 8px;
  padding: 4px 10px;
}

/* 登机牌 */
.cft-pass {
  position: relative;
  background: var(--cft-card);
  border: 1px solid var(--cft-line);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 10px 24px rgba(22, 78, 120, .11);
  transform: rotate(-2deg);
}
.cft-pass::before,
.cft-pass::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--cft-bg);
  border: 1px solid var(--cft-line);
  border-radius: 50%;
  top: 50%;
  margin-top: -8px;
}
.cft-pass::before { left: -9px; border-left-color: transparent; }
.cft-pass::after { right: -9px; border-right-color: transparent; }
.cft-pass-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--cft-muted);
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--cft-line);
  margin-bottom: 8px;
}
.cft-pass-top b { color: var(--cft-accent); letter-spacing: .04em; }
.cft-pass-body { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.cft-pass-body span { font-size: 24px; font-weight: 800; letter-spacing: .04em; }
.cft-pass-body em { font-style: normal; color: var(--cft-sky); font-size: 15px; }
.cft-pass-rows { margin-top: 8px; font-size: 11px; color: var(--cft-muted); line-height: 1.9; }
.cft-pass-rows i {
  display: inline-block;
  width: 46px;
  font-style: normal;
  color: var(--cft-muted);
  opacity: .8;
}
.cft-pass-rows b { color: var(--cft-ink); font-weight: 600; }

/* ---------- 提示条 ---------- */
.cft-error {
  display: none;
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  color: var(--cft-warn);
  background: rgba(217, 119, 6, .1);
  border: 1px solid rgba(217, 119, 6, .3);
}
.cft-error.on { display: block; }

/* ---------- 布局 ---------- */
.cft-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 410px;
  gap: 20px;
  align-items: start;
  margin-bottom: 22px;
}
.cft-col { min-width: 0; }

/* ---------- 卡片 ---------- */
.cft-card {
  background: var(--cft-card);
  border: 1px solid var(--cft-line);
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: var(--cft-shadow);
  margin-bottom: 18px;
}
.cft-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.cft-card-head h2 { font-size: 17px; margin: 0; letter-spacing: -.01em; }
.cft-card-head span { font-size: 12.5px; color: var(--cft-muted); }

/* ---------- 表单 ---------- */
.cft-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}
.cft-fields.gap { margin-top: 12px; }
.cft-field { min-width: 0; }
.cft-field.full { grid-column: 1 / -1; }
.cft-field.gap { margin-top: 12px; }
.cft-field > label {
  display: block;
  font-size: 12.5px;
  color: var(--cft-muted);
  margin-bottom: 5px;
}
.cft-unit {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--cft-soft);
  border: 1px solid var(--cft-line);
  border-radius: 11px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cft-unit:focus-within {
  border-color: var(--cft-accent-2);
  box-shadow: 0 0 0 3px rgba(63, 159, 216, .16);
}
.cft-unit input,
.cft-unit select {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 42px;
  padding: 0 34px 0 12px;
  border: 0;
  background: transparent;
  color: var(--cft-ink);
  font-size: 15px;
  font-family: inherit;
  outline: none;
}
.cft-unit select { padding-right: 30px; appearance: none; -webkit-appearance: none; cursor: pointer; }
.cft-unit > em {
  position: absolute;
  right: 12px;
  bottom: 0;
  height: 42px;
  display: flex;
  align-items: center;
  font-style: normal;
  font-size: 12.5px;
  color: var(--cft-muted);
  pointer-events: none;
}
.cft-caret {
  position: absolute;
  right: 13px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -5px;
  border-right: 2px solid var(--cft-muted);
  border-bottom: 2px solid var(--cft-muted);
  transform: rotate(45deg);
  pointer-events: none;
}

/* 分段选择 */
.cft-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  background: var(--cft-soft);
  border: 1px solid var(--cft-line);
  border-radius: 11px;
}
.cft-seg label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--cft-muted);
  transition: background-color .15s ease, color .15s ease;
}
.cft-seg input { position: absolute; opacity: 0; width: 0; height: 0; }
.cft-seg label:has(input:checked) { background: var(--cft-card); color: var(--cft-accent); box-shadow: 0 1px 4px rgba(22, 78, 120, .14); font-weight: 700; }
.cft-seg label:has(input:focus-visible) { outline: 2px solid var(--cft-accent-2); outline-offset: 1px; }

/* 复选项 */
.cft-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin-top: 12px; }
.cft-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--cft-ink);
  background: var(--cft-soft);
  border: 1px solid var(--cft-line);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}
.cft-check input { width: 15px; height: 15px; accent-color: var(--cft-accent); flex: none; }
.cft-check input:disabled + span { opacity: .45; }

.cft-hint { margin: 12px 0 0; font-size: 12.5px; color: var(--cft-muted); line-height: 1.8; }
.cft-hint b { color: var(--cft-ink); }

/* 票种即时提示 */
.cft-classbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 9px 12px;
  background: var(--cft-soft);
  border: 1px dashed var(--cft-line);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--cft-muted);
}
.cft-classbar b { color: var(--cft-accent); font-size: 13px; }

/* ---------- 按钮 ---------- */
.cft-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 18px; }
.cft-btn {
  height: 42px;
  padding: 0 18px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: var(--cft-accent);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform .12s ease, background-color .15s ease, box-shadow .15s ease;
}
.cft-btn:hover { background: #125a93; box-shadow: 0 6px 16px rgba(22, 104, 168, .24); }
.cft-btn:active { transform: translateY(1px); }
.cft-btn.ghost { background: var(--cft-card); border-color: var(--cft-line); color: var(--cft-ink); }
.cft-btn.ghost:hover { border-color: var(--cft-accent-2); box-shadow: none; }
.cft-btn.link { background: transparent; color: var(--cft-accent); padding: 0 6px; }
.cft-btn.link:hover { background: transparent; text-decoration: underline; box-shadow: none; }
.cft-btn.small { height: 36px; padding: 0 13px; font-size: 13px; }

/* ---------- 右侧汇总 ---------- */
.cft-summary {
  position: sticky;
  top: 14px;
  background: var(--cft-card);
  border: 1px solid var(--cft-line);
  border-radius: 18px;
  padding: 20px 20px 18px;
  box-shadow: var(--cft-shadow);
}
.cft-sum-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.cft-sum-head h2 { font-size: 16px; margin: 0; }
.cft-ticket-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--cft-accent);
  background: rgba(22, 104, 168, .1);
  border-radius: 999px;
  padding: 4px 11px;
  white-space: nowrap;
}
.cft-ticket-badge.bb { color: var(--cft-warm); background: rgba(217, 119, 6, .12); }
.cft-ticket-badge.warn { color: var(--cft-bad); background: rgba(180, 35, 24, .1); }

.cft-fare { padding: 2px 0 12px; border-bottom: 1px dashed var(--cft-line); }
.cft-fare > span { display: block; font-size: 12.5px; color: var(--cft-muted); margin-bottom: 2px; }
.cft-fare b { font-size: 40px; line-height: 1.1; letter-spacing: -.02em; color: var(--cft-accent); font-variant-numeric: tabular-nums; }
.cft-fare b em { font-style: normal; font-size: 19px; margin-left: 2px; }
.cft-fare small { display: block; margin-top: 4px; font-size: 12px; color: var(--cft-muted); }

.cft-rows { padding: 10px 0 4px; }
.cft-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  padding: 5px 0;
  color: var(--cft-muted);
}
.cft-row b { color: var(--cft-ink); font-variant-numeric: tabular-nums; }
.cft-row.total {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--cft-line);
  font-size: 14.5px;
  color: var(--cft-ink);
}
.cft-row.total b { color: var(--cft-accent); font-size: 19px; }
.cft-row.alt b { color: var(--cft-ok); }
.cft-row.alt.up b { color: var(--cft-warn); }

.cft-sum-note {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.75;
  color: var(--cft-muted);
  background: var(--cft-soft);
  border-radius: 10px;
  padding: 8px 11px;
}

/* 行李 / 摇篮 */
.cft-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.cft-box {
  background: var(--cft-soft);
  border: 1px solid var(--cft-line);
  border-radius: 12px;
  padding: 10px 12px;
}
.cft-box h3 { font-size: 12px; margin: 0 0 4px; color: var(--cft-muted); font-weight: 600; letter-spacing: .02em; }
.cft-box b { display: block; font-size: 15px; margin-bottom: 2px; }
.cft-box small { display: block; font-size: 11.5px; color: var(--cft-muted); line-height: 1.65; }
.cft-box.ok b { color: var(--cft-ok); }
.cft-box.warn b { color: var(--cft-warn); }
.cft-box.bad b { color: var(--cft-bad); }

/* 建议 */
.cft-tips { list-style: none; margin: 12px 0 0; padding: 0; }
.cft-tips li {
  position: relative;
  padding-left: 16px;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--cft-muted);
  margin-bottom: 5px;
}
.cft-tips li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .68em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cft-accent-2);
}
.cft-tips li b { color: var(--cft-ink); }

/* ---------- 批量 ---------- */
.cft-textarea {
  width: 100%;
  min-height: 108px;
  resize: vertical;
  padding: 12px 14px;
  border: 1px solid var(--cft-line);
  border-radius: 12px;
  background: var(--cft-soft);
  color: var(--cft-ink);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Microsoft YaHei", monospace;
  font-size: 13px;
  line-height: 1.8;
  outline: none;
}
.cft-textarea:focus { border-color: var(--cft-accent-2); box-shadow: 0 0 0 3px rgba(63, 159, 216, .15); }
.cft-batch-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cft-batch-count { margin-top: 10px; font-size: 12.5px; color: var(--cft-muted); }
.cft-batch-count b { color: var(--cft-accent); }

/* ---------- 表格 ---------- */
.cft-tbl-wrap { overflow-x: auto; margin: 14px -4px 0; }
.cft-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 520px;
}
.cft-table th,
.cft-table td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--cft-line);
  vertical-align: middle;
}
.cft-table th {
  font-size: 12px;
  font-weight: 600;
  color: var(--cft-muted);
  background: var(--cft-soft);
  white-space: nowrap;
}
.cft-table td { color: var(--cft-ink); }
.cft-table tr:last-child td { border-bottom: 0; }
.cft-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cft-table td.ok { color: var(--cft-ok); font-weight: 600; }
.cft-table td.warn { color: var(--cft-warn); font-weight: 600; }
.cft-table td.bad { color: var(--cft-bad); font-weight: 600; }
.cft-table td.err { color: var(--cft-bad); font-size: 12.5px; }
.cft-table tr.sum td { background: var(--cft-soft); font-weight: 700; }

/* ---------- 内容块 ---------- */
.cft-block {
  background: var(--cft-card);
  border: 1px solid var(--cft-line);
  border-radius: 18px;
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: var(--cft-shadow);
}
.cft-block > h2 {
  font-size: 19px;
  margin: 0 0 10px;
  letter-spacing: -.01em;
  padding-left: 12px;
  border-left: 4px solid var(--cft-accent-2);
  line-height: 1.3;
}
.cft-block > p { margin: 0 0 10px; font-size: 14px; color: var(--cft-muted); }
.cft-block > p b { color: var(--cft-ink); }
.cft-block .cft-table { min-width: 560px; }

.cft-list { list-style: none; margin: 8px 0 0; padding: 0; }
.cft-list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 7px;
  font-size: 13.5px;
  color: var(--cft-muted);
  line-height: 1.85;
}
.cft-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .72em;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--cft-accent-2);
  transform: rotate(45deg);
}
.cft-list li b { color: var(--cft-ink); }

.cft-faq details {
  border-bottom: 1px solid var(--cft-line);
  padding: 10px 0;
}
.cft-faq details:last-child { border-bottom: 0; padding-bottom: 0; }
.cft-faq summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--cft-ink);
  list-style: none;
  position: relative;
  padding-right: 24px;
}
.cft-faq summary::-webkit-details-marker { display: none; }
.cft-faq summary::after {
  content: "+";
  position: absolute;
  right: 2px;
  top: -1px;
  font-size: 18px;
  color: var(--cft-accent-2);
  transition: transform .18s ease;
}
.cft-faq details[open] summary::after { transform: rotate(45deg); }
.cft-faq details p {
  margin: 8px 0 2px;
  font-size: 13.5px;
  color: var(--cft-muted);
  line-height: 1.85;
}

.cft-disclaimer {
  font-size: 12.5px;
  color: var(--cft-muted);
  line-height: 1.9;
  background: var(--cft-soft);
  border: 1px dashed var(--cft-line);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 0 0 8px;
}

/* ---------- 显隐 ---------- */
.cft-page [hidden] { display: none !important; }

/* ---------- 响应式 ---------- */
@media (max-width: 1060px) {
  .cft-grid { grid-template-columns: 1fr; }
  .cft-summary { position: static; }
  .cft-hero { grid-template-columns: 1fr 210px; }
}
@media (max-width: 760px) {
  .cft-shell { padding: 14px 14px 0; }
  .cft-hero { grid-template-columns: 1fr; padding: 22px 20px; }
  .cft-pass { max-width: 260px; }
  .cft-fields { grid-template-columns: 1fr; }
  .cft-checks { grid-template-columns: 1fr; }
  .cft-hero h1 { font-size: 23px; }
  .cft-fare b { font-size: 34px; }
  .cft-boxes { grid-template-columns: 1fr; }
  .cft-summary { padding: 16px; }
  .cft-card, .cft-block { padding: 17px 16px; }
  .cft-card-head { flex-direction: column; align-items: flex-start; gap: 2px; }
  .cft-table { min-width: 460px; }
}
@media (max-width: 420px) {
  .cft-pass { display: none; }
  .cft-hero-meta span { font-size: 11.5px; }
  .cft-fare b { font-size: 31px; }
}

/* ---------- 打印 ---------- */
@media print {
  .cft-page { background: #fff; color: #111; padding: 0; }
  .cft-crumb, .cft-actions, .cft-batch-actions, .cft-hero-meta, .cft-pass, .cft-tips { display: none !important; }
  .cft-hero, .cft-card, .cft-summary, .cft-block { box-shadow: none; border-color: #ccc; break-inside: avoid; }
  .cft-grid { grid-template-columns: 1fr 1fr; }
  .cft-summary { position: static; }
}
