/* 中国签证查询指南 · China Visa Check Guide — modern editorial + travel UI */
:root {
  --paper: #fafaf7;
  --paper-deep: #f2ede2;
  --ink: #1f1c17;
  --ink-soft: #6d6455;
  --ink-mute: #94897a;
  --line: #e5e0d5;
  --line-soft: #eee9dc;
  --cinnabar: #b83a24;
  --cinnabar-deep: #93291a;
  --cinnabar-bg: #fbe9e4;
  --jade: #1e6e54;
  --jade-bg: #e4efe7;
  --blue: #2563a0;
  --blue-bg: #e2ecf5;
  --gold: #8a6d1f;
  --gold-bg: #f4ecd6;
  --red-bg: #fbe4de;
  --card: #ffffff;
  --focus-ring: rgba(184,58,36,.15);
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --en: "Fraunces", "Georgia", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 85% -5%, rgba(184,58,36,.05), transparent 55%),
    radial-gradient(ellipse at -10% 30%, rgba(30,110,84,.05), transparent 45%);
  position: relative;
  overflow-x: hidden;
}

.cloud-bg {
  position: fixed; inset: 0; width: 100%; height: 100%;
  color: var(--ink); pointer-events: none; z-index: 0;
}

main, .site-header, .site-footer { position: relative; z-index: 1; }

/* ---------- header ---------- */
.site-header {
  max-width: 1060px; margin: 0 auto; padding: 26px 24px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; }
.seal {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--cinnabar); color: #fff6ec;
  font-size: 22px; font-weight: 900; border-radius: 8px;
  box-shadow: 2px 3px 0 rgba(147,41,26,.25);
  transform: rotate(-3deg);
}
.brand-text strong { display: block; font-size: 19px; letter-spacing: .06em; }
.brand-text span { font-family: var(--en); font-size: 12px; color: var(--ink-soft); letter-spacing: .12em; text-transform: uppercase; }
.tagline { font-size: 13px; color: var(--ink-soft); letter-spacing: .08em; }
.tagline em { font-family: var(--en); font-style: italic; }

/* ---------- hero ---------- */
main { max-width: 1060px; margin: 0 auto; padding: 0 24px 60px; }
.hero { padding: 52px 0 34px; }
.hero h1 {
  font-size: clamp(40px, 7vw, 72px); font-weight: 900; line-height: 1.12;
  letter-spacing: .02em;
  animation: rise .7s cubic-bezier(.2,.7,.2,1) both;
}
.hero h1 .accent { color: var(--cinnabar); position: relative; }
.hero h1 .accent::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 12px;
  background: rgba(184,58,36,.14); z-index: -1; transform: skewX(-8deg);
}
.hero-sub {
  margin-top: 18px; max-width: 680px; font-size: 16.5px; line-height: 1.85; color: var(--ink-soft);
  animation: rise .7s .12s cubic-bezier(.2,.7,.2,1) both;
}
.hero-sub em { font-family: var(--en); font-style: italic; }
.br-desktop { display: none; }
@media (min-width: 720px) { .br-desktop { display: initial; } }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- form panel ---------- */
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 32px 32px 28px; box-shadow: 0 24px 48px -32px rgba(35,32,26,.28), 0 4px 12px -8px rgba(35,32,26,.08);
  animation: rise .7s .2s cubic-bezier(.2,.7,.2,1) both;
  position: relative; z-index: 5;
}
.panel.animation-done { animation: none; }
.field { margin-bottom: 22px; flex: 1; min-width: 220px; position: relative; }
.field-row { display: flex; gap: 18px; flex-wrap: wrap; }
label, .label-like {
  display: block; font-size: 16.5px; font-weight: 700; margin-bottom: 10px; letter-spacing: .02em;
  color: var(--ink);
}
label em, .label-like em {
  font-family: var(--en); font-style: italic; font-weight: 500;
  font-size: 13px; color: var(--ink-soft); margin-left: 6px;
}
label small, .label-like small { font-weight: 400; color: var(--ink-soft); font-size: 13px; margin-left: 4px; }

input[type="text"], input[type="date"], input[type="number"], select {
  width: 100%; padding: 13px 15px; font-family: var(--serif); font-size: 16px;
  color: var(--ink); background: #fff;
  border: 1.5px solid var(--line); border-radius: 10px; outline: none;
  transition: border-color .18s, box-shadow .18s, background .15s;
}
input:hover, select:hover { border-color: var(--ink-mute); background: #fefdf9; }
input:focus, select:focus {
  border-color: var(--cinnabar);
  box-shadow: 0 0 0 4px var(--focus-ring);
  background: #fff;
}

/* 日期框：点击任意位置即可拉起日历（自绘日历组件） */
input.date-field {
  cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236d6455' stroke-width='1.6' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M3 10h18'/%3E%3C/svg%3E") no-repeat right 12px center;
}

/* 自绘日历面板 */
.cal-panel {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 60;
  background: #fffdf7; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 16px 40px -12px rgba(35,32,26,.35);
  padding: 12px; width: 268px; user-select: none;
}
/* 下方空间不足时向上弹出 */
.cal-panel.flip-up { top: auto; bottom: calc(100% + 4px); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-title { font-size: 14px; font-weight: 700; }
.cal-nav {
  width: 28px; height: 28px; border: 1px solid var(--line); background: #fff; border-radius: 6px;
  cursor: pointer; font-size: 16px; line-height: 1; color: var(--ink);
}
.cal-nav:hover { border-color: var(--ink); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-dow span { font-size: 11px; color: var(--ink-soft); padding: 4px 0; }
.cal-cell {
  font-size: 13.5px; padding: 7px 0; border-radius: 6px; cursor: pointer; font-family: var(--en);
}
.cal-cell:hover { background: var(--paper-deep); }
.cal-cell.empty { cursor: default; }
.cal-cell.empty:hover { background: none; }
.cal-cell.dis { color: #c9c0ad; cursor: not-allowed; }
.cal-cell.dis:hover { background: none; }
.cal-cell.today { color: var(--cinnabar); font-weight: 700; }
.cal-cell.sel { background: var(--cinnabar); color: #fff6ec; font-weight: 700; }
.cal-foot { display: flex; justify-content: space-between; margin-top: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.cal-btn {
  border: none; background: none; font-family: var(--serif); font-size: 12.5px;
  color: var(--ink-soft); cursor: pointer; padding: 3px 6px; border-radius: 5px;
}
.cal-btn:hover { color: var(--ink); background: var(--paper-deep); }

/* searchable nationality */
.search-select { position: relative; }
.search-list[hidden] { display: none !important; }
.search-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 60;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  max-height: 240px; overflow-y: auto; list-style: none;
  box-shadow: 0 14px 30px -14px rgba(35,32,26,.3);
}
.search-list li { padding: 10px 14px; font-size: 14px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.search-list li:hover, .search-list li.active { background: var(--paper-deep); }
.search-list li .en { color: var(--ink-soft); font-family: var(--en); font-size: 12px; }

/* 分类面板（默认展开：热门 + A-Z 分组） */
.search-list.cat-panel {
  max-height: 420px;
  padding: 0;
  overflow: hidden;
  display: block;
}
.search-list.cat-panel > .cat-wrap {
  display: block;
  padding: 0;
  margin: 0;
  cursor: default;
  list-style: none;
  background: #fff;
}
.search-list.cat-panel > .cat-wrap:hover { background: #fff; }
.search-list.cat-panel .cat-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  padding: 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  overflow-x: auto;
  scrollbar-width: thin;
}
.search-list.cat-panel .cat-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink-soft);
  cursor: pointer;
  letter-spacing: .04em;
  font-weight: 600;
  white-space: nowrap;
  transition: color .15s, border-color .15s, background .15s;
}
.search-list.cat-panel .cat-tab:hover { color: var(--ink); background: rgba(0,0,0,.03); }
.search-list.cat-panel .cat-tab.active {
  color: var(--cinnabar);
  border-bottom-color: var(--cinnabar);
  background: #fff;
}
.search-list.cat-panel .cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 2px;
  padding: 10px 8px;
  max-height: 340px;
  overflow-y: auto;
  background: #fff;
}
.search-list.cat-panel .cat-cell {
  padding: 9px 12px;
  font-size: 14px;
  color: var(--ink);
  border-radius: 6px;
  cursor: pointer;
  transition: background .12s, color .12s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  min-height: 36px;
}
.search-list.cat-panel .cat-cell:hover {
  background: rgba(184,58,36,.08);
  color: var(--cinnabar);
}
.search-list.cat-panel .cat-subheader {
  grid-column: 1 / -1;
  padding: 10px 12px 6px;
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: .08em;
  font-weight: 700;
  border-top: 1px dashed var(--line-soft);
  margin-top: 4px;
}
.search-list.cat-panel .cat-subheader:first-child {
  border-top: none;
  margin-top: 0;
}
.search-list.cat-panel .cat-empty {
  padding: 24px;
  color: var(--ink-soft);
  text-align: center;
  font-size: 13.5px;
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .search-list.cat-panel { max-height: 360px; }
  .search-list.cat-panel .cat-grid {
    grid-template-columns: repeat(3, 1fr);
    padding: 8px 6px;
    max-height: 280px;
  }
  .search-list.cat-panel .cat-cell {
    padding: 11px 8px;
    font-size: 14.5px;
    min-height: 42px;
    justify-content: center;
    text-align: center;
  }
  .search-list.cat-panel .cat-tab {
    font-size: 12.5px;
    padding: 10px 12px;
  }
}
@media (max-width: 400px) {
  .search-list.cat-panel .cat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* chips */
.dest-chips, .city-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip input { display: none; }
.chip span {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px 10px 15px;
  border: 1.5px solid var(--line); border-radius: 999px;
  font-size: 15.5px; font-weight: 600;
  cursor: pointer; background: #fff; color: #64615a;
  transition: all .18s ease; user-select: none;
}
.chip span::before {
  content: ''; display: inline-block;
  width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid #cfc9bf; background: #fff;
  transition: all .18s ease;
  flex-shrink: 0;
}
.chip span:hover {
  border-color: #8b8577; color: #2b2822;
  background: #fafaf7;
}
.chip span:hover::before { border-color: #8b8577; }
.chip input:checked + span {
  background: #f4f9f2;
  color: #1f6b3a;
  border-color: #4b9e5f;
  box-shadow: 0 1px 3px rgba(75,158,95,.15);
}
.chip input:checked + span::before {
  background: #4b9e5f; border-color: #4b9e5f;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='3.5,8.5 6.5,11.5 12.5,4.5'/></svg>");
  background-size: 12px 12px;
  background-position: center;
  background-repeat: no-repeat;
}
/* 保留 city 拾取样式（若使用）*/

/* submit */
.go {
  width: 100%; margin-top: 10px; padding: 16px; font-family: var(--serif);
  font-size: 18px; font-weight: 900; letter-spacing: .3em; text-indent: .3em;
  color: #fff6ec; background: var(--cinnabar); border: none; border-radius: 12px;
  cursor: pointer; transition: transform .12s, background .15s, box-shadow .15s;
  box-shadow: 0 14px 32px -14px rgba(184,58,36,.6), 0 2px 6px -2px rgba(184,58,36,.3);
}
.go:hover { background: var(--cinnabar-deep); transform: translateY(-1px); box-shadow: 0 18px 36px -14px rgba(147,41,26,.6); }
.go:active { transform: translateY(1px); box-shadow: 0 4px 10px -6px rgba(147,41,26,.3); }
.go:disabled { opacity: .6; cursor: wait; transform: none; }
.form-err { margin-top: 12px; color: var(--cinnabar-deep); font-size: 14px; }

/* ---------- results ---------- */
#results { margin-top: 34px; animation: rise .6s both; }
.disclaimer-banner {
  background: linear-gradient(180deg, #fff8e8, #fbf1d8);
  border: 1px solid #e6d59a;
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  padding: 14px 18px 14px 44px;
  margin-bottom: 20px;
  font-size: 13.5px;
  line-height: 1.7;
  color: #4a3f22;
  position: relative;
}
.disclaimer-banner::before {
  content: 'ⓘ';
  position: absolute;
  left: 16px;
  top: 12px;
  font-size: 18px;
  color: var(--gold);
  font-weight: 700;
}
.disclaimer-banner strong { color: var(--cinnabar-deep); font-weight: 700; }
.disclaimer-banner a { color: var(--cinnabar); text-decoration: underline; text-underline-offset: 2px; }
.disclaimer-banner a:hover { color: var(--cinnabar-deep); }
.result-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.result-head h2 { font-size: 28px; }
.updated { font-size: 13px; color: var(--ink-soft); }

.card {
  background: var(--card); border: 1px solid var(--line-soft); border-radius: 14px;
  padding: 24px 26px; margin-bottom: 18px; position: relative; overflow: hidden;
  box-shadow: 0 4px 16px -12px rgba(35,32,26,.15);
}
.card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--line); }
.card.st-visa_free::before { background: var(--jade); }
.card.st-transit_240::before, .card.st-transit_240_ok::before { background: var(--blue); }
.card.st-hainan_30::before, .card.st-gd_group::before { background: var(--gold); }
.card.st-visa_required::before, .card.st-blocked::before { background: var(--cinnabar); }
.card.st-partial_block::before { background: #d07a1f; }
.card.st-check::before { background: var(--ink-soft); }

.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.region-name { font-size: 13px; letter-spacing: .14em; color: var(--ink-soft); text-transform: uppercase; font-family: var(--en); }
.badge {
  display: inline-block; padding: 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: .06em;
}
.st-visa_free .badge { background: var(--jade-bg); color: var(--jade); }
.st-transit_240 .badge, .st-transit_240_ok .badge { background: var(--blue-bg); color: var(--blue); }
.st-hainan_30 .badge, .st-gd_group .badge { background: var(--gold-bg); color: var(--gold); }
.st-visa_required .badge, .st-blocked .badge { background: var(--red-bg); color: var(--cinnabar-deep); }
.st-partial_block .badge { background: #f7ecdb; color: #a3660e; }
.st-check .badge { background: var(--paper-deep); color: var(--ink-soft); }

/* 城市级子段卡片（行程段的下一级） */
.card.sub-card { margin-left: 34px; padding: 14px 18px; }
.card.sub-card .region-name { font-size: 12px; }
.card.sub-card h3 { font-size: 16px; margin: 4px 0 8px; }
.card.sub-card ul.details li { font-size: 13.5px; }

.card h3 { font-size: 20px; font-weight: 900; margin: 6px 0 12px; line-height: 1.5; }
.card ul.details { list-style: none; margin-bottom: 14px; }
.card ul.details li {
  font-size: 14.5px; line-height: 1.85; color: #3c362c; padding-left: 18px; position: relative;
}
.card ul.details li::before { content: "·"; position: absolute; left: 4px; color: var(--cinnabar); font-weight: 900; }

.checklist { background: var(--paper-deep); border-radius: 10px; padding: 16px 18px; }
.checklist h4 { font-size: 13px; letter-spacing: .1em; color: var(--ink-soft); margin-bottom: 10px; font-family: var(--en); }
.checklist ul { list-style: none; columns: 1; }
@media (min-width: 720px) { .checklist ul { columns: 2; column-gap: 28px; } }
.checklist li { font-size: 14px; line-height: 1.7; padding: 4px 0 4px 24px; position: none; break-inside: avoid; }
.checklist li::before { content: "✓"; color: var(--jade); font-weight: 900; margin-right: 8px; }

.warnings { margin-bottom: 14px; }
.warnings li {
  background: var(--red-bg); color: var(--cinnabar-deep); border-radius: 8px;
  padding: 10px 14px; font-size: 14px; margin-bottom: 8px; list-style: none;
}

.alt-title { font-size: 16px; margin: 26px 0 12px; color: var(--ink-soft); }
.alt-title em { font-family: var(--en); font-style: italic; font-weight: 500; font-size: 13px; }
.alt-card {
  background: transparent; border: 1px dashed var(--line); border-radius: 12px;
  padding: 16px 18px; margin-bottom: 12px;
}
.alt-card h4 { font-size: 15px; margin-bottom: 6px; }
.alt-card p { font-size: 14px; line-height: 1.8; color: var(--ink-soft); }

.disclaimer {
  margin-top: 26px; font-size: 12.5px; line-height: 1.9; color: var(--ink-soft);
  border-top: 1px solid var(--line); padding-top: 14px;
}

/* ---------- footer ---------- */
.site-footer {
  max-width: 1060px; margin: 0 auto; padding: 20px 24px 40px;
  font-size: 12.5px; color: var(--ink-soft); line-height: 2;
  border-top: 1px solid var(--line);
}
.hotline { font-family: var(--en); letter-spacing: .04em; }
.site-independence {
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .02em;
  padding: 8px 12px;
  background: var(--paper-deep);
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 8px;
}
.footer-links { margin-top: 4px; }
.footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: color .15s, border-color .15s;
}
.footer-links a:hover { color: var(--cinnabar); border-bottom-color: var(--cinnabar); }
.footer-links .sep { margin: 0 8px; color: var(--ink-mute); }
.feedback-line { margin-top: 6px; position: relative; }
.feedback-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--cinnabar);
  font-weight: 600;
  border-bottom: 1px dashed rgba(184,58,36,.4);
  padding-bottom: 1px;
  cursor: help;
  transition: color .15s, border-color .15s;
}
.feedback-trigger:hover, .feedback-trigger:focus-visible {
  color: var(--cinnabar-deep);
  border-bottom-color: var(--cinnabar-deep);
  outline: none;
}
.feedback-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 220px;
  max-width: 300px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 28px -10px rgba(35,32,26,.28), 0 2px 6px -2px rgba(35,32,26,.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, visibility .18s .3s;
  z-index: 100;
  text-align: left;
  white-space: normal;
}
/* 不可见桥接：填充 trigger 与 tooltip 之间的空隙，避免鼠标跨越时 hover 断掉 */
.feedback-tooltip::before {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 0;
  right: 0;
  height: 14px;
}
.feedback-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #fff;
  filter: drop-shadow(0 2px 1px rgba(35,32,26,.08));
}
.feedback-trigger:hover .feedback-tooltip,
.feedback-trigger:focus-visible .feedback-tooltip,
.feedback-tooltip:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition: opacity .18s ease, transform .18s ease, visibility 0s;
}
.feedback-tooltip-title {
  display: block;
  font-size: 11.5px;
  color: var(--ink-soft);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-family: var(--en);
  font-weight: 700;
}
.feedback-email {
  display: inline-block;
  color: var(--cinnabar);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--en);
  word-break: break-all;
  border-bottom: 1px solid transparent;
  transition: border-color .12s, color .12s;
  cursor: text;
  user-select: all;
}
.feedback-email:hover { border-bottom-color: var(--cinnabar); color: var(--cinnabar-deep); }

/* 手机上默认展示（触屏用户 hover 不便）：改为 tap 展开 */
@media (hover: none) {
  .feedback-tooltip {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    min-width: 0;
    max-width: none;
    margin-top: 6px;
    padding: 8px 10px;
    box-shadow: none;
    display: none;
  }
  .feedback-tooltip::after, .feedback-tooltip::before { display: none; }
  .feedback-trigger:focus-visible .feedback-tooltip,
  .feedback-trigger:focus .feedback-tooltip { display: block; }
}

/* third country row */
.third-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.third-row select { flex: 1; min-width: 200px; }
.third-row #third-box { margin-top: 4px; }
#city-toggle { display: inline-block; margin-bottom: 10px; }
#city-toggle + .search-select { margin-top: 4px; }
.field-hint {
  margin-top: 10px; font-size: 14px; line-height: 1.9; color: #3c362c;
  background: var(--paper-deep); border-radius: 8px; padding: 12px 16px;
}
.field-hint br { display: block; content: ""; margin-top: 2px; }

/* city chips picked order */
.chip.city-chip.picked span {
  background: var(--jade); color: #fff; border-color: var(--jade);
}

/* lang switch */
.lang-switch { display: flex; gap: 4px; flex-wrap: wrap; }
.lang-switch button {
  font-family: var(--serif); font-size: 13px; padding: 5px 12px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft); border-radius: 999px;
  transition: all .15s;
}
.lang-switch button:hover { border-color: var(--ink); color: var(--ink); }
.lang-switch button.active {
  background: var(--ink); color: var(--paper); border-color: var(--ink);
}

/* combo search list group header */
.search-list li.list-group {
  font-size: 11px; letter-spacing: .1em; color: var(--ink-soft);
  padding: 8px 14px 2px; cursor: default; font-family: var(--en);
}
.search-select.grow { flex: 1; min-width: 200px; }

/* route tags (ordered city list) */
.route-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.route-tag {
  display: inline-flex; align-items: center; gap: 8px; font-size: 14px;
  background: var(--jade); color: #fff; border-radius: 999px; padding: 6px 12px 6px 6px;
}
.route-tag b {
  width: 22px; height: 22px; display: grid; place-items: center;
  background: rgba(255,255,255,.25); border-radius: 50%; font-size: 12px;
}
.route-tag i { cursor: pointer; font-style: normal; opacity: .8; font-size: 13px; }
.route-tag i:hover { opacity: 1; }

/* warnings inline item */
.warnings-item {
  background: var(--red-bg); color: var(--cinnabar-deep); border-radius: 8px;
  padding: 10px 14px; font-size: 14px; margin-bottom: 10px; list-style: none;
}

/* stay comparison bar */
.stay-bar {
  border-radius: 10px; padding: 12px 16px; margin: 4px 0 14px;
}
.stay-bar.ok { background: var(--jade-bg); }
.stay-bar.over { background: var(--red-bg); }
.stay-nums { display: flex; gap: 18px; flex-wrap: wrap; align-items: baseline; margin-bottom: 8px; font-size: 14px; }
.stay-nums b { font-size: 18px; }
.stay-bar.ok .stay-nums b { color: var(--jade); }
.stay-bar.over .stay-nums b { color: var(--cinnabar-deep); }
.stay-max { color: var(--ink-soft); }
.stay-flag { margin-left: auto; font-weight: 700; font-size: 13px; }
.stay-bar.ok .stay-flag { color: var(--jade); }
.stay-bar.over .stay-flag { color: var(--cinnabar-deep); }
.stay-track { height: 8px; border-radius: 999px; background: rgba(35,32,26,.1); overflow: hidden; }
.stay-fill { height: 100%; border-radius: 999px; }
.stay-bar.ok .stay-fill { background: var(--jade); }
.stay-bar.over .stay-fill { background: var(--cinnabar); }

/* loading skeleton */
.loading { text-align: center; padding: 30px 0; color: var(--ink-soft); font-size: 15px; letter-spacing: .2em; }
.loading::after { content: "…"; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

@media (max-width: 640px) {
  /* moved to the comprehensive mobile block below */
}

/* ---------- flowchart (route visualization) ---------- */
.flow-wrap {
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 4px 0 18px;
}
.flow-wrap.compact { padding: 12px 14px; margin-top: 10px; }
.flow-title {
  font-size: 12px; letter-spacing: .12em; color: var(--ink-soft);
  font-family: var(--en); text-transform: uppercase; margin-bottom: 10px;
}
.flowchart {
  display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px 6px;
}
.flow-node {
  position: relative; flex: 0 1 auto;
  min-width: 108px; max-width: 220px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 8px 12px 8px 32px;
  line-height: 1.35; box-shadow: 0 3px 8px -6px rgba(35,32,26,.2);
}
.flow-node::before {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  font-size: 15px; line-height: 1; color: var(--ink-soft);
}
.flow-node.kind-country::before { content: "✈"; }
.flow-node.kind-port::before    { content: "◈"; }
.flow-node.kind-city::before    { content: "◉"; }
.flow-node.kind-zone::before    { content: "❖"; }
.flow-node .fn-label {
  font-size: 14px; font-weight: 700; color: var(--ink);
  white-space: normal; word-break: break-word;
}
.flow-node .fn-sub {
  font-size: 11.5px; color: var(--ink-soft); margin-top: 2px;
  letter-spacing: .02em;
}
/* tones */
.flow-node.t-origin  { border-color: var(--ink); }
.flow-node.t-origin::before { color: var(--ink); }
.flow-node.t-ok      { border-color: var(--jade); background: var(--jade-bg); }
.flow-node.t-ok::before { color: var(--jade); }
.flow-node.t-ok .fn-label { color: var(--jade); }
.flow-node.t-warn    { border-color: #d07a1f; background: #f7ecdb; }
.flow-node.t-warn::before { color: #a3660e; }
.flow-node.t-warn .fn-label { color: #a3660e; }
.flow-node.t-bad     { border-color: var(--cinnabar); background: var(--red-bg); }
.flow-node.t-bad::before { color: var(--cinnabar-deep); }
.flow-node.t-bad .fn-label { color: var(--cinnabar-deep); }
.flow-node.t-neutral { border-color: var(--line); background: #fdfaf1; }

.flow-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-soft); font-size: 18px; padding: 0 2px; user-select: none;
}
.flow-arrow.bad { color: var(--cinnabar-deep); }

.flow-legend {
  display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px;
  font-size: 12px; color: var(--ink-soft);
}
.flow-legend .lg { display: inline-flex; align-items: center; gap: 5px; }
.flow-legend .sw {
  width: 12px; height: 12px; border-radius: 4px; border: 1.5px solid var(--line);
  display: inline-block;
}
.flow-legend .sw.t-ok   { background: var(--jade-bg); border-color: var(--jade); }
.flow-legend .sw.t-warn { background: #f7ecdb; border-color: #d07a1f; }
.flow-legend .sw.t-bad  { background: var(--red-bg); border-color: var(--cinnabar); }
.flow-legend .sw.t-origin { background: #fff; border-color: var(--ink); }

/* recommendation cards */
.rec-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 20px; margin-bottom: 14px;
  position: relative; overflow: hidden;
}
.rec-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--blue);
}
.rec-card.st-hainan_30::before { background: var(--gold); }
.rec-card.st-visa_free::before { background: var(--jade); }
.rec-head {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.rec-title { font-size: 16px; font-weight: 900; color: var(--ink); }
.rec-tag {
  font-size: 11.5px; letter-spacing: .08em; padding: 2px 10px; border-radius: 999px;
  background: var(--blue-bg); color: var(--blue); font-weight: 700;
}
.rec-card.st-hainan_30 .rec-tag { background: var(--gold-bg); color: var(--gold); }
.rec-card.st-visa_free .rec-tag { background: var(--jade-bg); color: var(--jade); }
.rec-reason {
  font-size: 13.5px; line-height: 1.75; color: var(--ink-soft); margin-bottom: 8px;
}
.rec-notes { list-style: none; margin-top: 8px; }
.rec-notes li {
  font-size: 13px; line-height: 1.75; color: #3c362c;
  padding-left: 16px; position: relative;
}
.rec-notes li::before { content: "·"; position: absolute; left: 4px; color: var(--blue); font-weight: 900; }
.rec-card.st-hainan_30 .rec-notes li::before { color: var(--gold); }

/* ========== SEO 静态内容区（默认折叠·爬虫可索引） ========== */
.seo-content {
  max-width: 820px;
  margin: 30px auto 20px;
  padding: 0;
}
.seo-details {
  background: transparent;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 10px 16px;
}
.seo-details[open] {
  background: var(--card);
  border-style: solid;
  padding: 20px 28px 26px;
  line-height: 1.85;
}
.seo-details > summary {
  cursor: pointer;
  font-size: 13.5px;
  color: var(--ink-soft);
  font-weight: 600;
  letter-spacing: .04em;
  list-style: none;
  padding: 4px 0;
  user-select: none;
  transition: color .15s;
}
.seo-details > summary::-webkit-details-marker { display: none; }
.seo-details > summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 8px;
  color: var(--cinnabar);
  transition: transform .2s;
}
.seo-details[open] > summary::before { transform: rotate(90deg); }
.seo-details > summary:hover { color: var(--ink); }
.seo-details-body { margin-top: 14px; }
.seo-details h2 {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 14px;
  color: var(--ink);
  border-bottom: 2px solid var(--cinnabar);
  padding-bottom: 6px;
  display: inline-block;
}
.seo-details h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 20px 0 8px;
  color: var(--cinnabar-deep);
}
.seo-details p, .seo-details ol li, .seo-details dt, .seo-details dd {
  font-size: 14.5px;
  color: #3c362c;
}
.seo-details p { margin-bottom: 12px; }
.seo-details strong { color: var(--ink); font-weight: 700; }
.seo-details em { color: var(--ink-soft); font-style: italic; }
.seo-details ol { margin: 8px 0 14px 20px; }
.seo-details ol li { margin-bottom: 6px; }
.seo-faq {
  margin-top: 10px;
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}
.seo-faq dt {
  font-weight: 700;
  color: var(--ink);
  margin-top: 12px;
}
.seo-faq dt::before { content: "Q. "; color: var(--cinnabar); }
.seo-faq dd { margin: 4px 0 0 0; color: #3c362c; }
.seo-faq dd::before { content: "A. "; color: var(--jade); font-weight: 700; }

@media (max-width: 640px) {
  .seo-content { margin: 20px auto 10px; }
  .seo-details { padding: 8px 12px; }
  .seo-details[open] { padding: 16px 14px; }
  .seo-details h2 { font-size: 18px; }
  .seo-details h3 { font-size: 15px; margin: 16px 0 6px; }
  .seo-details p, .seo-details ol li, .seo-details dt, .seo-details dd { font-size: 13.5px; }
  .seo-details > summary { font-size: 12.5px; }
}

/* ========== 移动端 / H5 响应式（手机/平板） ========== */
/* 平板 & 大手机 (≤ 900px) */
@media (max-width: 900px) {
  main { padding: 0 18px 50px; }
  .site-header { padding: 20px 18px 0; }
  .hero { padding: 36px 0 24px; }
  .hero-sub { font-size: 14px; line-height: 1.85; }
  .panel { padding: 24px 22px 22px; }
  .field-row { gap: 14px; }
  .card { padding: 20px 20px; }
  .card h3 { font-size: 18px; }
  .card ul.details li { font-size: 14px; line-height: 1.75; }
  .result-head h2 { font-size: 22px; }
}

/* 手机 (≤ 640px) */
@media (max-width: 640px) {
  html { -webkit-text-size-adjust: 100%; }
  body { font-size: 15px; }
  main { padding: 0 12px 40px; }
  .site-header { padding: 14px 14px 0; gap: 10px; }
  .brand-text strong { font-size: 17px; }
  .brand-text span { font-size: 11px; }
  .seal { width: 38px; height: 38px; font-size: 18px; }
  .tagline { display: none; }

  .hero { padding: 24px 0 18px; }
  .hero h1 { font-size: clamp(28px, 8.5vw, 40px); line-height: 1.18; }
  .hero-sub { font-size: 13.5px; line-height: 1.75; margin-top: 12px; }

  .panel { padding: 18px 14px 16px; border-radius: 12px; }
  .field { margin-bottom: 16px; min-width: 100%; }
  .field-row { flex-direction: column; gap: 0; }
  label, .label-like { font-size: 13.5px; margin-bottom: 6px; }

  /* iOS 聚焦不自动放大：input 字号 >=16px */
  input[type="text"], input[type="date"], input[type="number"], select, textarea {
    font-size: 16px; padding: 12px 12px;
  }

  /* 触摸友好的 chip */
  .chip span { padding: 10px 16px 10px 12px; font-size: 15px; }
  .chip span::before { width: 18px; height: 18px; }

  .third-row { gap: 10px; }
  .third-row #third-box { width: 100%; }

  /* 主按钮：更大点击面积 */
  .go {
    padding: 14px; font-size: 17px; letter-spacing: .3em; text-indent: .3em;
    margin-top: 4px; border-radius: 10px;
  }

  /* 结果卡 */
  #results { margin-top: 24px; }
  .result-head { margin-bottom: 14px; }
  .result-head h2 { font-size: 20px; }
  .updated { font-size: 12px; }
  .card { padding: 16px 14px; border-radius: 12px; margin-bottom: 14px; }
  .card::before { width: 4px; }
  .card-top { gap: 8px; margin-bottom: 10px; }
  .region-name { font-size: 12px; letter-spacing: .1em; }
  .badge { font-size: 12px; padding: 4px 10px; }
  .card h3 { font-size: 16.5px; margin: 4px 0 10px; line-height: 1.45; }
  .card ul.details { margin-bottom: 10px; }
  .card ul.details li { font-size: 13.5px; line-height: 1.7; padding-left: 14px; }

  /* 子段卡片：减少缩进 */
  .card.sub-card { margin-left: 14px; padding: 12px 14px; }
  .card.sub-card h3 { font-size: 15px; }
  .card.sub-card ul.details li { font-size: 13px; }

  /* checklist：始终单列 */
  .checklist { padding: 12px 14px; border-radius: 8px; }
  .checklist ul { columns: 1 !important; }
  .checklist li { font-size: 13.5px; padding: 3px 0 3px 20px; }

  /* 警告条 */
  .warnings li { padding: 8px 12px; font-size: 13px; }

  /* 备选方案 / 推荐路线 */
  .alt-title { font-size: 14.5px; margin: 20px 0 10px; }
  .alt-card { padding: 12px 14px; }
  .alt-card h4 { font-size: 14px; }

  /* 停留天数进度条 */
  .stay-nums { flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; }

  /* 流程图卡片 */
  .flow-wrap { padding: 12px 12px; margin: 4px 0 14px; border-radius: 10px; }
  .flowchart { gap: 6px 4px; }
  .flow-node {
    min-width: 82px; max-width: 100%;
    padding: 6px 10px 6px 26px;
    border-radius: 8px;
  }
  .flow-node .fn-label { font-size: 12.5px; }
  .flow-node .fn-sub { font-size: 11px; }
  .flow-arrow { font-size: 14px; padding: 0 2px; }
  .flow-title { font-size: 11px; margin-bottom: 8px; }
  .flow-legend { font-size: 11px; flex-wrap: wrap; gap: 6px 10px; }
  .flow-legend .sw { width: 10px; height: 10px; }

  /* 下拉搜索：拓宽可点击区域 */
  .search-list li { padding: 10px 12px; font-size: 15px; min-height: 44px; }

  /* 日历面板：占满宽度 */
  .cal-panel { left: 0 !important; right: 0 !important; width: auto; }

  /* 提示区 */
  .field-hint { font-size: 12px; padding: 8px 10px; line-height: 1.6; }

  /* footer */
  .site-footer { padding: 20px 14px 30px; font-size: 12.5px; }
}

/* 超窄手机 (≤ 360px) */
@media (max-width: 360px) {
  .hero h1 { font-size: 26px; }
  .panel { padding: 14px 12px 14px; }
  .card { padding: 14px 12px; }
  .flow-node { min-width: 72px; padding: 5px 8px 5px 22px; }
  .flow-node::before { left: 8px !important; }
}

/* 触摸设备优化：hover 效果不预留 */
@media (hover: none) {
  .chip span:hover { background: #fff; border-color: var(--line); color: #64615a; }
  .chip span:hover::before { border-color: #cfc9bf; }
  .go:hover { background: var(--cinnabar); transform: none; }
}
