/* ==========================================================
   护照漫游 · Passport Atlas
   温暖精致视觉系统 / Warm & refined design system
   ========================================================== */

/* ---------- tokens ---------- */
:root {
  --bg: #fbf7f0;
  --bg-soft: #f4ece0;
  --surface: #ffffff;
  --surface-2: #fdf9f3;
  --surface-3: #f6efe4;
  --border: #e9ddcb;
  --border-strong: #dccab2;
  --text: #2e2620;
  --text-2: #6d6053;
  --text-3: #9c8d7d;
  --accent: #c2683a;
  --accent-2: #a8552e;
  --accent-soft: #f6e4d6;
  --gold: #bd9331;
  --shadow-sm: 0 1px 2px rgba(80, 55, 35, .06), 0 2px 8px rgba(80, 55, 35, .05);
  --shadow: 0 2px 6px rgba(80, 55, 35, .07), 0 12px 32px rgba(80, 55, 35, .09);
  --shadow-lg: 0 8px 20px rgba(80, 55, 35, .1), 0 32px 64px rgba(80, 55, 35, .16);

  --c-mutual: #2f7d6b;
  --c-unilateral: #c0892c;
  --c-voa: #c4603c;
  --c-evisa: #7b6aa6;
  --c-conditional: #4e7fa6;
  --c-required: #8d8177;
  --c-domestic: #a5705c;

  --c-mutual-bg: #e6f1ed;
  --c-unilateral-bg: #f8ecd4;
  --c-voa-bg: #fae6de;
  --c-evisa-bg: #ece8f5;
  --c-conditional-bg: #e3edf5;
  --c-required-bg: #efeae4;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --maxw: 1240px;
  --font-display: "Noto Serif SC", "Songti SC", "Source Han Serif SC", Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-num: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, monospace;
}

html[data-theme="dark"] {
  --bg: #191410;
  --bg-soft: #201914;
  --surface: #241d17;
  --surface-2: #2b231c;
  --surface-3: #332a22;
  --border: #3a2f26;
  --border-strong: #4a3d31;
  --text: #f4ece2;
  --text-2: #c0af9e;
  --text-3: #8d7c6c;
  --accent: #e28c55;
  --accent-2: #efa370;
  --accent-soft: #3a281c;
  --gold: #d9ae4a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 8px rgba(0, 0, 0, .25);
  --shadow: 0 2px 6px rgba(0, 0, 0, .35), 0 12px 32px rgba(0, 0, 0, .4);
  --shadow-lg: 0 8px 20px rgba(0, 0, 0, .4), 0 32px 64px rgba(0, 0, 0, .5);

  --c-mutual: #55b39c;
  --c-unilateral: #dcab53;
  --c-voa: #e0835c;
  --c-evisa: #a693d4;
  --c-conditional: #74a8cf;
  --c-required: #7d7268;
  --c-domestic: #c2907a;

  --c-mutual-bg: #1e332e;
  --c-unilateral-bg: #33291a;
  --c-voa-bg: #35241d;
  --c-evisa-bg: #2a2438;
  --c-conditional-bg: #1e2b35;
  --c-required-bg: #2b2622;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background .35s ease, color .35s ease;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .5;
  background:
    radial-gradient(900px 600px at 12% -8%, rgba(194, 104, 58, .10), transparent 60%),
    radial-gradient(800px 520px at 92% 4%, rgba(189, 147, 49, .09), transparent 62%);
}
html[data-theme="dark"] body::before { opacity: .35; }
img { max-width: 100%; }
a { color: inherit; }
button { font-family: inherit; }

::selection { background: var(--accent); color: #fff; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ---------- header ---------- */
.hdr {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}
.hdr-in { display: flex; align-items: center; gap: 20px; height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; flex-shrink: 0; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent), #8f4a26);
  color: #fff; font-size: 19px;
  box-shadow: 0 4px 12px rgba(194, 104, 58, .32);
}
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand-txt b { font-family: var(--font-display); font-size: 17px; letter-spacing: .3px; }
.brand-txt span { font-size: 11px; color: var(--text-3); letter-spacing: .6px; }

.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a {
  padding: 8px 13px; border-radius: 9px; font-size: 13.5px; color: var(--text-2);
  text-decoration: none; transition: .18s; white-space: nowrap;
}
.nav a:hover { background: var(--surface-3); color: var(--text); }

.tools { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); cursor: pointer;
  display: grid; place-items: center; transition: .18s; flex-shrink: 0;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; }
.lang-btn { width: auto; padding: 0 13px; font-size: 13px; font-weight: 600; display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.menu-btn { display: none; }

/* ---------- hero ---------- */
.hero { padding: 58px 0 30px; text-align: center; position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 15px; border-radius: 100px;
  background: var(--accent-soft); color: var(--accent-2);
  font-size: 12.5px; letter-spacing: .5px; font-weight: 600;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5.4vw, 56px);
  line-height: 1.16; margin: 20px 0 0; letter-spacing: -0.5px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--text-2); max-width: 640px; margin: 16px auto 0; font-size: 15.5px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 34px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 16px; box-shadow: var(--shadow-sm); transition: .22s;
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat b {
  display: block; font-family: var(--font-display); font-size: 30px; line-height: 1.1;
  color: var(--accent); font-variant-numeric: tabular-nums;
}
.stat span { font-size: 12.5px; color: var(--text-3); }

/* ---------- sections ---------- */
section { padding: 54px 0; }
.sec-head { margin-bottom: 26px; }
.sec-head.center { text-align: center; }
.sec-kicker { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.sec-head h2 { font-family: var(--font-display); font-size: clamp(23px, 3vw, 33px); margin: 8px 0 6px; letter-spacing: -.3px; }
.sec-head p { color: var(--text-2); margin: 0; font-size: 14.5px; }

/* ---------- controls ---------- */
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm);
}
.ctrl-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.search-wrap { position: relative; flex: 1 1 320px; min-width: 240px; }
.search-wrap svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--text-3); }
#search {
  width: 100%; height: 48px; padding: 0 44px 0 43px;
  border: 1px solid var(--border); border-radius: 13px;
  background: var(--surface-2); color: var(--text); font-size: 14.5px; outline: none; transition: .2s;
}
#search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); background: var(--surface); }
#search::placeholder { color: var(--text-3); }
.search-clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 8px; border: 0; background: transparent;
  color: var(--text-3); cursor: pointer; display: none; place-items: center;
}
.search-clear:hover { background: var(--surface-3); color: var(--text); }
.search-clear.show { display: grid; }

.seg { display: flex; gap: 3px; padding: 4px; background: var(--surface-3); border-radius: 12px; border: 1px solid var(--border); }
.seg button {
  border: 0; background: transparent; padding: 8px 14px; border-radius: 9px;
  font-size: 13.5px; color: var(--text-2); cursor: pointer; transition: .18s; white-space: nowrap;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); font-weight: 600; }

.ghost-btn {
  height: 48px; padding: 0 15px; border-radius: 13px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-2); cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; transition: .18s; white-space: nowrap;
}
.ghost-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.ghost-btn svg { width: 16px; height: 16px; }

select.sel {
  height: 48px; padding: 0 34px 0 14px; border-radius: 13px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  font-size: 14px; outline: none; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239c8d7d' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
select.sel:focus { border-color: var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 100px; font-size: 13px;
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-2); cursor: pointer; transition: .18s; user-select: none;
}
.chip:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cc); flex-shrink: 0; }
.chip .n { font-variant-numeric: tabular-nums; font-size: 11.5px; color: var(--text-3); background: var(--surface-3); padding: 1px 7px; border-radius: 100px; }
.chip.on { background: var(--cc-bg); border-color: var(--cc); color: var(--cc); font-weight: 600; }
.chip.on .n { background: color-mix(in srgb, var(--cc) 18%, transparent); color: inherit; }
.chip.reset { background: transparent; border-style: dashed; }

.result-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font-size: 13px; color: var(--text-3); flex-wrap: wrap; gap: 10px; }

/* ---------- map ---------- */
.map-shell {
  position: relative; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.map-scroll { overflow: hidden; touch-action: pan-y pinch-zoom; }
#map { display: block; width: 100%; height: auto; cursor: grab; }
#map.dragging { cursor: grabbing; }
#map path.country {
  stroke: var(--surface-2); stroke-width: .6; stroke-linejoin: round;
  transition: fill .18s, opacity .18s;
  vector-effect: non-scaling-stroke;
}
#map path.country:hover { opacity: .82; stroke: var(--text); stroke-width: 1; }
#map path.country.sel { stroke: var(--text); stroke-width: 1.4; }
#map path.country.nodata { fill: var(--surface-3); }
#map path.country.dim { opacity: .34; }
#map path.country.home { fill: var(--accent); opacity: .9; }
#map path.country.home:hover { opacity: 1; }
#map circle.country.marker {
  stroke: var(--surface-2); stroke-width: 1.4; vector-effect: non-scaling-stroke;
  transition: fill .18s, opacity .18s, r .18s;
}
#map circle.country.marker:hover { opacity: .85; stroke: var(--text); stroke-width: 2; r: 6.4; }
.map-ocean { fill: color-mix(in srgb, var(--bg-soft) 70%, transparent); }

.map-ctl { position: absolute; right: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.map-ctl button {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); cursor: pointer; display: grid; place-items: center;
  box-shadow: var(--shadow-sm); transition: .18s; font-size: 16px; line-height: 1;
}
.map-ctl button:hover { color: var(--text); background: var(--surface-3); }

.map-legend {
  position: absolute; left: 14px; bottom: 14px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--border); border-radius: 13px; padding: 11px 13px;
  backdrop-filter: blur(8px); box-shadow: var(--shadow-sm);
}
.map-legend b { display: block; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-3); margin-bottom: 7px; }
.legend-items { display: flex; flex-direction: column; gap: 5px; }
.legend-items span { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2); cursor: pointer; }
.legend-items span:hover { color: var(--text); }
.legend-items i { width: 11px; height: 11px; border-radius: 3px; background: var(--cc); flex-shrink: 0; }

.tip {
  position: fixed; z-index: 90; pointer-events: none; opacity: 0;
  transform: translate(-50%, -120%); transition: opacity .12s;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 11px; padding: 9px 12px; box-shadow: var(--shadow);
  font-size: 13px; white-space: nowrap; max-width: 260px;
}
.tip.on { opacity: 1; }
.tip b { font-family: var(--font-display); font-size: 14px; display: block; }
.tip .tt { color: var(--cc); font-size: 12px; font-weight: 600; }

/* ---------- cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 15px; margin-top: 20px; }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 17px 17px 15px; cursor: pointer;
  transition: .22s; overflow: hidden; text-align: left;
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--cc);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--cc); }
.card-top { display: flex; align-items: center; gap: 11px; }
.flag {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  font-size: 23px; background: var(--cc-bg); flex-shrink: 0; line-height: 1;
}
.card h3 { margin: 0; font-family: var(--font-display); font-size: 17px; letter-spacing: -.2px; }
.card .en { font-size: 12px; color: var(--text-3); }
.badge {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 12px;
  padding: 4px 10px; border-radius: 100px; font-size: 11.5px; font-weight: 600;
  background: var(--cc-bg); color: var(--cc);
}
.badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--cc); }
.card-meta { display: flex; gap: 14px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.card-meta div { font-size: 11.5px; color: var(--text-3); }
.card-meta b { display: block; font-size: 14px; color: var(--text); font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.card-note {
  margin-top: 11px; font-size: 12.5px; color: var(--text-2); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-alts { display: flex; gap: 5px; margin-top: 10px; flex-wrap: wrap; }
.alt-tag { font-size: 10.5px; padding: 2px 8px; border-radius: 100px; border: 1px solid var(--border); color: var(--text-3); }

/* ---------- grouped results (map view) ---------- */
.grouped { margin-top: 4px; }
.group-head {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  margin: 28px 0 13px; padding-bottom: 9px; border-bottom: 1px solid var(--border);
}
.group-head:first-child { margin-top: 14px; }
.group-head i { width: 10px; height: 10px; border-radius: 50%; background: var(--cc); flex-shrink: 0; }
.group-head b { font-family: var(--font-display); font-size: 17px; letter-spacing: -.2px; }
.group-head span {
  font-size: 12px; color: var(--cc); background: var(--cc-bg);
  padding: 1px 9px; border-radius: 100px; font-variant-numeric: tabular-nums; font-weight: 600;
}
.group-head em { font-style: normal; font-size: 12.5px; color: var(--text-3); flex: 1 1 260px; }

/* ---------- list view ---------- */
.table { margin-top: 20px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.trow {
  display: grid; grid-template-columns: 1.6fr 1.3fr 1fr 1fr .9fr;
  gap: 12px; align-items: center; padding: 13px 18px;
  border-bottom: 1px solid var(--border); cursor: pointer; transition: .15s;
}
.trow:last-child { border-bottom: 0; }
.trow:hover { background: var(--surface-3); }
.trow.head { background: var(--surface-3); font-size: 12px; color: var(--text-3); letter-spacing: .4px; cursor: default; }
.trow.head:hover { background: var(--surface-3); }
.tname { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tname .flag { width: 32px; height: 32px; font-size: 17px; border-radius: 9px; }
.tname b { font-family: var(--font-display); font-size: 15px; }
.tname span { font-size: 11.5px; color: var(--text-3); }
.tcat { font-size: 12.5px; font-weight: 600; color: var(--cc); }
.tinfo { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.tinfo.dim { color: var(--text-3); }

/* ---------- types ---------- */
.types { display: grid; grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); gap: 15px; }
.type-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; transition: .22s; cursor: pointer; position: relative; overflow: hidden;
}
.type-card::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px;
  border-radius: 50%; background: var(--cc-bg); opacity: .55; transition: .3s;
}
.type-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--cc); }
.type-card:hover::after { transform: scale(1.25); }
.type-card .tn { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.type-card h3 { font-family: var(--font-display); font-size: 19px; margin: 0; }
.type-card .cnt { font-family: var(--font-display); font-size: 27px; color: var(--cc); font-variant-numeric: tabular-nums; }
.type-card p { position: relative; color: var(--text-2); font-size: 13.5px; margin: 12px 0 0; line-height: 1.65; }
.type-card .eg { position: relative; margin-top: 14px; font-size: 12px; color: var(--text-3); }
.type-card .eg b { color: var(--text-2); font-weight: 600; }

/* ---------- timeline ---------- */
.tl { position: relative; margin-top: 24px; padding-left: 26px; }
.tl::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--accent), var(--border)); border-radius: 2px; }
.tl-item { position: relative; padding: 0 0 22px; }
.tl-item::before {
  content: ""; position: absolute; left: -25px; top: 7px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--surface); border: 2.5px solid var(--cc, var(--accent));
}
.tl-date { font-family: var(--font-num); font-size: 12px; color: var(--text-3); letter-spacing: .5px; }
.tl-body { margin-top: 3px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 13px 16px; transition: .2s; }
.tl-body:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.tl-title { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.tl-title b { font-family: var(--font-display); font-size: 15.5px; }
.tl-tag { font-size: 10.5px; padding: 2px 9px; border-radius: 100px; font-weight: 700; letter-spacing: .3px; }
.tl-tag.new { background: var(--c-mutual-bg); color: var(--c-mutual); }
.tl-tag.update { background: var(--c-unilateral-bg); color: var(--c-unilateral); }
.tl-tag.change { background: var(--c-voa-bg); color: var(--c-voa); }
.tl-tag.info { background: var(--c-conditional-bg); color: var(--c-conditional); }
.tl-text { margin: 6px 0 0; font-size: 13.5px; color: var(--text-2); }

/* ---------- checklist ---------- */
.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.check {
  display: flex; align-items: flex-start; gap: 12px; padding: 15px 17px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; transition: .2s; font-size: 14px;
}
.check:hover { border-color: var(--accent); transform: translateX(2px); }
.check .box {
  width: 21px; height: 21px; border-radius: 7px; border: 1.8px solid var(--border-strong);
  flex-shrink: 0; margin-top: 1px; display: grid; place-items: center; transition: .2s; color: transparent;
}
.check.done .box { background: var(--c-mutual); border-color: var(--c-mutual); color: #fff; }
.check.done span { color: var(--text-3); text-decoration: line-through; }
.check svg { width: 13px; height: 13px; }

/* ---------- faq ---------- */
.faq { max-width: 860px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 11px; overflow: hidden; transition: .2s; }
.faq-item.open { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.faq-q { padding: 16px 18px; cursor: pointer; display: flex; justify-content: space-between; gap: 14px; align-items: center; font-weight: 600; font-size: 14.5px; }
.faq-q:hover { background: var(--surface-2); }
.faq-q i { width: 21px; height: 21px; flex-shrink: 0; position: relative; }
.faq-q i::before, .faq-q i::after {
  content: ""; position: absolute; background: var(--accent); border-radius: 2px;
  left: 50%; top: 50%; transform: translate(-50%, -50%); transition: .22s;
}
.faq-q i::before { width: 12px; height: 2px; }
.faq-q i::after { width: 2px; height: 12px; }
.faq-item.open .faq-q i::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-item.open .faq-a { max-height: 420px; }
.faq-a p { padding: 0 18px 17px; margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.8; border-top: 1px dashed var(--border); padding-top: 14px; }

/* ---------- modal ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 100; background: rgba(38, 26, 16, .5);
  backdrop-filter: blur(4px); display: none; padding: 20px; overflow-y: auto;
}
.modal-mask.on { display: flex; align-items: flex-start; justify-content: center; }
.modal {
  background: var(--surface); border-radius: var(--radius-lg); width: 100%; max-width: 660px;
  margin: auto; box-shadow: var(--shadow-lg); overflow: hidden;
  animation: pop .26s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
.modal-hd { padding: 24px 26px 20px; border-bottom: 1px solid var(--border); position: relative; background: var(--cc-bg); }
.modal-hd .flag { width: 56px; height: 56px; font-size: 31px; background: var(--surface); border-radius: 15px; }
.modal-hd .row { display: flex; align-items: center; gap: 15px; }
.modal-hd h2 { font-family: var(--font-display); font-size: 25px; margin: 0; letter-spacing: -.3px; }
.modal-hd .en { color: var(--text-3); font-size: 13px; }
.modal-hd .badge { margin-top: 9px; }
.modal-x {
  position: absolute; right: 16px; top: 16px; width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer;
  display: grid; place-items: center; transition: .18s;
}
.modal-x:hover { background: var(--surface-3); color: var(--text); }
.modal-bd { padding: 22px 26px 26px; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.kv div { background: var(--surface-2); padding: 13px 15px; }
.kv dt { font-size: 11.5px; color: var(--text-3); margin: 0 0 3px; }
.kv dd { margin: 0; font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.modal-section { margin-top: 20px; }
.modal-section h4 { font-family: var(--font-display); font-size: 15px; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.modal-section h4::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--accent); }
.modal-section p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.85; }
.cond-box { margin-top: 14px; padding: 13px 15px; border-radius: var(--radius-sm); background: var(--c-unilateral-bg); color: var(--c-unilateral); font-size: 13.5px; display: flex; gap: 9px; }
.cond-box svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; }
.alt-row { display: flex; gap: 8px; flex-wrap: wrap; }
.alt-pill { font-size: 12.5px; padding: 5px 12px; border-radius: 100px; border: 1px solid var(--border); background: var(--surface-2); }
.modal-ft { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--border); font-size: 12px; color: var(--text-3); display: flex; gap: 8px; align-items: flex-start; }
.modal-ft svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; }
.modal-ft a { color: var(--accent); }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 44px 0 34px; margin-top: 30px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px; }
.foot-grid h5 { font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text-3); margin: 0 0 12px; }
.foot-grid p, .foot-grid li { font-size: 13.5px; color: var(--text-2); margin: 0 0 7px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid a { text-decoration: none; }
.foot-grid a:hover { color: var(--accent); }
.foot-btm { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-3); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

.top-btn {
  position: fixed; right: 22px; bottom: 22px; z-index: 70;
  width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); box-shadow: var(--shadow);
  cursor: pointer; display: grid; place-items: center; opacity: 0; pointer-events: none; transition: .25s;
}
.top-btn.on { opacity: 1; pointer-events: auto; }
.top-btn:hover { color: var(--accent); transform: translateY(-2px); }

.empty { text-align: center; padding: 70px 20px; color: var(--text-3); }
.empty .em { font-size: 46px; margin-bottom: 12px; }
.empty b { display: block; font-family: var(--font-display); font-size: 19px; color: var(--text); margin-bottom: 6px; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .nav { display: none; }
  .menu-btn { display: grid; }
  .tools { margin-left: auto; }        /* 平板 / 手机：导航隐藏后，工具按钮始终靠右 */
  .stats { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .container { padding: 0 16px; }
  .hdr-in { height: 60px; gap: 10px; }
  .brand-txt span { display: none; }
  .brand-txt b { font-size: 15px; }
  .tools { gap: 6px; }
  .tools .icon-btn:not(.lang-btn) { width: 36px; height: 36px; }
  .lang-btn { width: auto; padding: 0 11px; white-space: nowrap; font-size: 12.5px; }
  .lang-btn svg { display: none; }        /* 手机上只保留文字更简洁，避免拥挤 */
  .hero { padding: 38px 0 20px; }
  section { padding: 40px 0; }
  .panel { padding: 15px; border-radius: var(--radius); }
  .ctrl-row { gap: 9px; }
  .search-wrap { flex: 1 1 100%; }
  select.sel, .seg { height: 44px; }
  .seg { height: auto; padding: 3px; }
  .seg button { padding: 7px 11px; font-size: 12.5px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 11px; }
  .card { padding: 14px; }
  .flag { width: 38px; height: 38px; font-size: 20px; }
  .card h3 { font-size: 15.5px; }
  .map-legend { left: 8px; bottom: 8px; padding: 8px 10px; }
  .legend-items span { font-size: 11px; }
  .map-ctl { right: 8px; bottom: 8px; }
  .trow { grid-template-columns: 1.5fr 1fr; gap: 8px; padding: 12px 14px; }
  .trow .hide-sm { display: none; }
  .foot-grid { grid-template-columns: 1fr; gap: 22px; }
  .modal-hd { padding: 20px; }
  .modal-bd { padding: 18px 20px 22px; }
  .modal-hd h2 { font-size: 21px; }
  .tip { display: none; }
  .stat b { font-size: 25px; }
}
@media (max-width: 420px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .card-note, .card-alts { display: none; }
}

/* mobile nav drawer */
.drawer {
  position: fixed; inset: 0 0 0 auto; width: min(320px, 84vw); z-index: 120;
  background: var(--surface); border-left: 1px solid var(--border); padding: 22px;
  transform: translateX(100%); transition: transform .3s cubic-bezier(.3, .9, .3, 1);
  box-shadow: var(--shadow-lg);
}
.drawer.on { transform: none; }
.drawer a { display: block; padding: 13px 4px; font-size: 16px; font-family: var(--font-display); border-bottom: 1px solid var(--border); text-decoration: none; }
.drawer .dx { position: absolute; right: 16px; top: 16px; }
.scrim { position: fixed; inset: 0; background: rgba(30, 20, 12, .45); z-index: 110; opacity: 0; pointer-events: none; transition: .3s; }
.scrim.on { opacity: 1; pointer-events: auto; }
