/* ===========================================================
   Chinaluna — 视觉体系
   宣纸底 / 水墨山形 / 朱砂印章 / 现代网格
   =========================================================== */

/* ---------- 1. 设计令牌 ---------- */
:root {
  /* 墨与纸 */
  --ink:        #16130f;
  --ink-2:      #3b352c;
  --ink-3:      #6c6459;
  --paper:      #f5efe3;
  --paper-2:    #fffdf8;
  --paper-3:    #ece4d4;

  /* 朱砂 / 中国红 */
  --red:        #b83227;
  --red-2:      #d54832;
  --red-soft:   #f6ded9;

  /* 青瓷 / 竹青 */
  --celadon:    #4a7c68;
  --celadon-2:  #e4efe8;

  /* 鎏金 */
  --gold:       #b8903c;
  --gold-soft:  #f3e6c8;

  --line:       rgba(22, 19, 15, .12);
  --line-2:     rgba(22, 19, 15, .06);
  --card:       #fffdf8;
  --shadow-s:   0 1px 2px rgba(22,19,15,.06), 0 4px 14px rgba(22,19,15,.05);
  --shadow-m:   0 2px 6px rgba(22,19,15,.07), 0 18px 40px rgba(22,19,15,.09);
  --shadow-l:   0 8px 30px rgba(22,19,15,.12), 0 40px 80px rgba(22,19,15,.12);

  --radius:     14px;
  --radius-s:   9px;
  --radius-l:   22px;

  --font-serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", "Source Han Serif SC", Georgia, serif;
  --font-sans:  "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono:  "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --max:        1200px;
  --ease:       cubic-bezier(.22, .61, .36, 1);
}

/* 锚点跳转时避开吸顶导航 */
section[id], [id="top"] { scroll-margin-top: 96px; }

/* ---------- 离开本站提示（第三方链接） ---------- */
.leave-toast {
  position: fixed; left: 50%; bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  background: #1d2833; color: #f5efe3;
  padding: 12px 18px; border-radius: 12px;
  font-size: .92rem; max-width: min(92vw, 480px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .32);
  border: 1px solid rgba(184, 144, 60, .45);
  opacity: 0; pointer-events: none; z-index: 9999;
  transition: opacity .25s ease, transform .25s ease;
  text-align: center; line-height: 1.55;
}
.leave-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.leave-toast b { color: #e8b75a; font-weight: 600; word-break: break-all; }

[data-theme="dark"] {
  --ink:        #f2ece0;
  --ink-2:      #cfc7b8;
  --ink-3:      #948b7b;
  --paper:      #131110;
  --paper-2:    #1c1a17;
  --paper-3:    #26221d;
  --red:        #e2604c;
  --red-2:      #f0785f;
  --red-soft:   #3a201c;
  --celadon:    #6fae95;
  --celadon-2:  #1b2723;
  --gold:       #d8ad5a;
  --gold-soft:  #33291a;
  --line:       rgba(242, 236, 224, .14);
  --line-2:     rgba(242, 236, 224, .07);
  --card:       #1c1a17;
  --shadow-s:   0 1px 2px rgba(0,0,0,.4);
  --shadow-m:   0 4px 18px rgba(0,0,0,.45);
  --shadow-l:   0 12px 40px rgba(0,0,0,.55);
}

/* ---------- 2. 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.78;
  color: var(--ink-2);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .4s var(--ease), color .4s var(--ease);
}
img, svg { display: block; max-width: 100%; }
a { color: var(--red); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--red-2); }
h1, h2, h3, h4 { font-family: var(--font-serif); color: var(--ink); font-weight: 700; line-height: 1.32; margin: 0 0 .6em; letter-spacing: .01em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.35rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
h4 { font-size: 1.02rem; }
p  { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin-bottom: .4em; }
strong { color: var(--ink); font-weight: 600; }
code, .mono { font-family: var(--font-mono); font-size: .88em; background: var(--paper-3); padding: .12em .45em; border-radius: 5px; color: var(--ink); }
hr { border: 0; height: 1px; background: var(--line); margin: 2.2rem 0; }

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

/* 纸纹底 */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0; opacity: .5;
  background-image:
    radial-gradient(rgba(22,19,15,.045) 1px, transparent 1px),
    radial-gradient(rgba(22,19,15,.03) 1px, transparent 1px);
  background-size: 22px 22px, 22px 22px;
  background-position: 0 0, 11px 11px;
}
[data-theme="dark"] body::before { opacity: .25; background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px), radial-gradient(rgba(255,255,255,.03) 1px, transparent 1px); }
body > * { position: relative; z-index: 1; }
#site-header { z-index: 90; }

/* ---------- 3. 布局 ---------- */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: clamp(18px, 4vw, 40px); }
.narrow { max-width: 860px; }
section { padding-block: clamp(38px, 5vw, 68px); }
.section-alt { background: var(--paper-3); }

/* ---------- 4. 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
@supports not (background: color-mix(in srgb, red, blue)) {
  .site-header { background: var(--paper); }
}
.nav { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand-logo { height: 46px; width: auto; display: block; background: none; }
.brand-seal {
  width: 40px; height: 40px; flex: 0 0 40px;
  display: grid; place-items: center;
  background: var(--red); color: #fff;
  font-family: var(--font-serif); font-weight: 900; font-size: 22px;
  border-radius: 7px; line-height: 1;
  box-shadow: 0 3px 10px rgba(184,50,39,.32);
  letter-spacing: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.18; }
.brand-text b { font-family: var(--font-serif); font-size: 1.06rem; color: var(--ink); letter-spacing: .06em; }
.brand-text span { font-size: .68rem; color: var(--ink-3); letter-spacing: .22em; text-transform: uppercase; }

/* 管理员入口（仅 admin cookie 存在时显示） */
.admin-entry {
  display: inline-flex; align-items: center; margin-left: 10px; padding: 5px 13px;
  border-radius: 999px; background: var(--ink); color: #fff; font-size: .76rem;
  text-decoration: none; white-space: nowrap; flex-shrink: 0;
}
.admin-entry:hover { background: var(--red); }
.admin-entry[hidden] { display: none; }

.nav-links { display: flex; align-items: center; gap: 4px; margin-inline: auto; }
.nav-links a {
  font-size: .92rem; color: var(--ink-2); padding: 8px 13px; border-radius: 999px;
  font-weight: 500; position: relative; white-space: nowrap;
}
.nav-links a:hover { background: var(--paper-3); color: var(--ink); }
.nav-links a.active { color: var(--red); font-weight: 600; }
.nav-links a.nav-shop {
  background: #fde8e6; color: var(--red) !important; font-weight: 600;
  box-shadow: 0 2px 8px rgba(204, 42, 42, .12);
}
.nav-links a.nav-shop:hover { background: #fbdcd8; color: var(--red) !important; }
.nav-links a.nav-shop.active { background: #f8cfc9; color: var(--red) !important; }
[data-theme="dark"] .nav-links a.nav-shop { background: rgba(226, 96, 76, .22); color: #ffb4a8 !important; }

/* 英文/其他语言模式：导航词较长，加宽头部并压缩链接，保证搜索框空间 */
.site-header .wrap { max-width: none; }
[data-lang-pref="en"] .nav { gap: 12px; }
[data-lang-pref="en"] .nav-links { gap: 2px; }
[data-lang-pref="en"] .nav-links a { padding: 8px 9px; font-size: .85rem; }
.nav-links a.active::after {
  content: ""; position: absolute; left: 50%; bottom: 1px; transform: translateX(-50%);
  width: 16px; height: 2px; background: var(--red); border-radius: 2px;
}
.nav-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--line); background: transparent; color: var(--ink-2);
  border-radius: 10px; cursor: pointer; transition: all .2s var(--ease);
}
.icon-btn:hover { background: var(--paper-3); color: var(--ink); border-color: var(--line); }
.icon-btn svg { width: 18px; height: 18px; }
.nav-toggle { display: none; }

/* 移动端抽屉 */
@media (max-width: 900px) {
  .nav-toggle { display: grid; }
  .nav-links {
    position: fixed; inset: 68px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--paper-2); border-bottom: 1px solid var(--line);
    padding: 12px 18px 20px; margin: 0;
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: all .25s var(--ease); box-shadow: var(--shadow-m);
    max-height: calc(100vh - 68px); overflow-y: auto;
  }
  .nav-links.open { transform: none; opacity: 1; visibility: visible; }
  .nav-links a { padding: 12px 10px; font-size: 1rem; border-radius: var(--radius-s); }
  .nav-links a.active::after { display: none; }
  .nav-links a.active { background: var(--red-soft); }
}

/* ---------- 5. Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(60px, 9vw, 118px) clamp(48px, 7vw, 92px); }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-bg svg { width: 100%; height: 100%; }
.hero-bg .hero-photo { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; display: block; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(250,247,240,.42), rgba(250,247,240,.7)); }
/* 夜晚模式：照片压暗 + 暗色蒙版 + 圆月 */
[data-theme="dark"] .hero-photo { filter: brightness(.42) saturate(.75); }
[data-theme="dark"] .hero-bg::after { background: linear-gradient(180deg, rgba(19,17,16,.5), rgba(19,17,16,.85)); }
.hero-moon {
  position: absolute; z-index: 1;
  width: 78px; height: 78px; border-radius: 50%;
  background: radial-gradient(circle at 42% 40%, rgba(255,252,228,1), rgba(250,240,180,.92));
  box-shadow: 0 0 22px 5px rgba(255,246,205,.45);
  transform: translate(-50%, -50%);
  opacity: 0; transition: opacity .35s var(--ease);
  pointer-events: none;
}
[data-theme="dark"] .hero-moon { opacity: 1; }
@media (max-width: 860px) { .hero-moon { width: 52px; height: 52px; } }
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; }
@media (max-width: 860px) { .hero-inner { grid-template-columns: 1fr; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .74rem; letter-spacing: .26em; text-transform: uppercase;
  color: var(--red); font-weight: 600; margin-bottom: 18px;
}

.hero h1 { margin-bottom: .5em; }
.hero h1 .accent { color: var(--red); position: relative; }
.hero p.lead { font-size: clamp(1rem, 1.6vw, 1.14rem); color: var(--ink-3); max-width: 54ch; margin-bottom: 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* 数据条 */
.stat-row { display: flex; flex-wrap: wrap; gap: clamp(20px, 5vw, 56px); margin-top: 46px; padding-top: 30px; }
.stat b { display: block; font-family: var(--font-serif); font-size: clamp(1.5rem, 3vw, 2.15rem); color: var(--ink); line-height: 1.1; }
.stat b i { font-style: normal; font-size: .55em; color: var(--red); margin-left: 3px; }
.stat span { font-size: .8rem; color: var(--ink-3); letter-spacing: .06em; }

/* 英/韩/日：压缩英雄区文案高度，使其与中文自然高度一致，背景图与走马灯位置不漂移（中文不动） */
@media (min-width: 861px) {
  [data-lang-pref="en"] .hero h1,
  [data-lang-pref="ko"] .hero h1,
  [data-lang-pref="ja"] .hero h1 { font-size: clamp(2.15rem, 5.1vw, 3rem); line-height: 1.22; letter-spacing: -.01em; }
  [data-lang-pref="en"] .hero p.lead,
  [data-lang-pref="ko"] .hero p.lead,
  [data-lang-pref="ja"] .hero p.lead { font-size: clamp(1rem, 1.55vw, 1.12rem); line-height: 1.64; margin-bottom: 33px; }
  [data-lang-pref="en"] .stat-row,
  [data-lang-pref="ko"] .stat-row,
  [data-lang-pref="ja"] .stat-row { margin-top: 50px; padding-top: 33px; gap: clamp(18px, 4.5vw, 52px); }
  /* 高度对齐中文基准（实测 zh: 1080→730 / 1264→773 / ≥1311→781），内容垂直居中 */
  [data-lang-pref="en"] .hero,
  [data-lang-pref="ko"] .hero,
  [data-lang-pref="ja"] .hero {
    min-height: min(calc(477px + 23.4vw), 781px);
    display: flex; flex-direction: column; justify-content: center;
  }
}

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-align: center;
  padding: 12px 22px; border-radius: 999px; font-size: .92rem; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: all .22s var(--ease);
  font-family: var(--font-sans); line-height: 1.2;
}
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 4px 16px rgba(184,50,39,.28); }
.btn-primary:hover { background: var(--red-2); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(184,50,39,.34); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--paper-3); color: var(--ink); border-color: var(--ink-3); }
.btn svg { width: 16px; height: 16px; }

/* ---------- 通信 / 商店 ---------- */
/* 固定一行 4 个卡片：商品不足 4 个时其余位置留空，卡片宽度保持一致 */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1024px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px)  { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .product-grid { grid-template-columns: 1fr; } }
.product-card { display: flex; flex-direction: column; }
.product-card .pc-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.product-card .pc-ico { width: 42px; height: 42px; border-radius: 11px; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--font-serif); flex: none; }
.product-card h3 { margin: 0; font-size: 1.08rem; }
.product-card .pc-desc { font-size: .9rem; color: var(--ink-3); margin: 4px 0 14px; }
.price { font-weight: 700; font-size: 1.25rem; color: var(--red); }
.price small { font-weight: 400; color: var(--ink-3); font-size: .78rem; margin-left: 4px; }
/* 会员专享价（标准价下方的红色小字） */
.member-price { margin-top: 4px; font-size: .85rem; color: var(--ink-2); }
.member-price b { color: var(--red); font-size: 1.05rem; font-weight: 700; }
.member-price small { margin-left: 6px; color: var(--ink-3); font-size: .72rem; }
.product-card .btn { margin-top: auto; align-self: flex-start; }

.order-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 26px; }
@media (max-width: 820px) { .order-grid { grid-template-columns: 1fr; } }
.field { display: block; margin-bottom: 14px; }
.field > label { display: block; font-size: .85rem; color: var(--ink-3); margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; box-sizing: border-box; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--red); }
.field .req { color: var(--red); }
.pay-opts { display: flex; flex-wrap: wrap; gap: 10px; }
.pay-opts label { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: .9rem; }
.pay-opts input { accent-color: var(--red); }
.pay-row { display: flex; flex-direction: column; gap: 12px; }
.pay-row .btn { width: 100%; justify-content: center; }
.summary { position: sticky; top: 92px; }
.summary .sum-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.summary .sum-row.total { border-bottom: none; font-weight: 700; font-size: 1.05rem; }
.summary .sum-row .muted { color: var(--ink-3); }
.verify-box { text-align: center; padding: 8px 4px; }
.verify-box .ok { color: #1a9d54; font-weight: 700; font-size: 1.1rem; }
.todo-note { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; font-size: .82rem; color: var(--ink-3); background: var(--paper-3); }

/* ---------- 7. 区块标题 ---------- */
.sec-head { margin-bottom: clamp(30px, 4vw, 48px); max-width: 66ch; }
.sec-head.center { margin-inline: auto; text-align: center; }
.sec-head .kicker {
  font-family: var(--font-serif); font-size: .82rem; letter-spacing: .3em;
  color: var(--red); margin-bottom: 10px; display: block;
}
.sec-head p { color: var(--ink-3); font-size: 1rem; margin-bottom: 0; }

/* ---------- 8. 卡片网格 ---------- */
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.g-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1000px) { .g-4 { grid-template-columns: repeat(2, 1fr); } .g-6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px) { .g-3, .g-4 { grid-template-columns: repeat(2, 1fr); } .g-6 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .g-2, .g-3, .g-4, .g-6 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(20px, 2.4vw, 28px);
  box-shadow: var(--shadow-s); transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-m); border-color: color-mix(in srgb, var(--red) 28%, var(--line)); }

/* 入口卡片 */
.entry { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: inherit; }
.entry:hover { color: inherit; }
.entry-ico {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: var(--celadon-2); color: var(--celadon); font-size: 22px;
  font-family: var(--font-serif); font-weight: 700; flex: 0 0 auto;
}
.entry-ico.red { background: var(--red-soft); color: var(--red); }
.entry-ico.gold { background: var(--gold-soft); color: var(--gold); }
.entry h3 { margin: 0; font-size: 1.14rem; }
.entry p { color: var(--ink-3); font-size: .9rem; margin: 0; line-height: 1.7; }
.entry .go { margin-top: auto; font-size: .82rem; color: var(--red); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.entry .go svg { width: 14px; height: 14px; transition: transform .25s var(--ease); }
.entry:hover .go svg { transform: translateX(4px); }

/* 序号卡 */
.num-card { display: flex; gap: 16px; }
.num-card .num {
  font-family: var(--font-serif); font-size: 1.4rem; font-weight: 900; color: var(--red);
  flex: 0 0 auto; line-height: 1.2; min-width: 2.2em;
}
.num-card h3 { margin-bottom: .3em; }
.num-card p { margin: 0; font-size: .92rem; color: var(--ink-3); }

/* ---------- 9. 组件 ---------- */
/* 印章 */
.seal {
  display: inline-grid; place-items: center;
  width: 56px; height: 56px; border: 2px solid var(--red); color: var(--red);
  border-radius: 8px; font-family: var(--font-serif); font-weight: 900; font-size: 26px;
  transform: rotate(-6deg);
}
/* 云纹分隔 */
.cloud-divider { display: flex; align-items: center; gap: 14px; margin: clamp(36px, 5vw, 60px) 0; color: var(--ink-3); }
.cloud-divider::before, .cloud-divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); }
.cloud-divider svg { width: 40px; height: 16px; opacity: .55; }

/* 徽标 */
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 600;
  padding: 3px 10px; border-radius: 999px; letter-spacing: .04em;
  background: var(--paper-3); color: var(--ink-3); white-space: nowrap;
}
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.green { background: var(--celadon-2); color: var(--celadon); }
.badge.gold { background: var(--gold-soft); color: var(--gold); }
.badge-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }

/* 提示框 */
.callout {
  border-radius: var(--radius-s); padding: 16px 20px; margin: 20px 0;
  border-left: 3px solid var(--ink-3); background: var(--paper-3); font-size: .93rem;
}
.callout.warn { border-color: var(--red); background: var(--red-soft); }
.callout.warn strong { color: var(--red); }
.callout.tip { border-color: var(--celadon); background: var(--celadon-2); }
.callout.tip strong { color: var(--celadon); }
.callout p:last-child { margin-bottom: 0; }

/* 步骤时间线 */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: st; }
.steps li { position: relative; padding: 0 0 28px 54px; counter-increment: st; margin: 0; }
.steps li::before {
  content: counter(st); position: absolute; left: 0; top: 0;
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--red); color: #fff; font-family: var(--font-serif); font-weight: 700; font-size: 15px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 12%, transparent);
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 17px; top: 40px; bottom: 4px; width: 1px;
  background: repeating-linear-gradient(180deg, var(--line) 0 4px, transparent 4px 9px);
}
.steps h4 { margin-bottom: .3em; font-size: 1.05rem; }
.steps p, .steps ul { color: var(--ink-3); font-size: .92rem; margin-bottom: .5em; }

/* 表格 */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 560px; }
thead th {
  text-align: left; font-family: var(--font-serif); font-size: .82rem; letter-spacing: .12em;
  color: var(--ink-3); font-weight: 600; text-transform: uppercase;
  padding: 14px 18px; background: var(--paper-3); border-bottom: 1px solid var(--line); white-space: nowrap;
}
tbody td { padding: 14px 18px; border-bottom: 1px solid var(--line-2); color: var(--ink-2); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--paper-3); }
tbody td:first-child { color: var(--ink); font-weight: 600; white-space: nowrap; }

/* 折叠面板 */
.acc { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.acc + .acc { margin-top: 12px; }
.acc-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 17px 52px 17px 20px; font-family: var(--font-serif); font-size: 1.02rem; font-weight: 600;
  color: var(--ink); position: relative; line-height: 1.5;
}
.acc-q::after {
  content: ""; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--red); border-bottom: 2px solid var(--red);
  transform: translateY(-70%) rotate(45deg); transition: transform .3s var(--ease);
}
.acc.open .acc-q::after { transform: translateY(-30%) rotate(225deg); }
.acc-a { max-height: 0; overflow: hidden; transition: max-height .35s var(--ease); }
.acc-a-inner { padding: 0 20px 20px; font-size: .93rem; color: var(--ink-3); }
.acc-a-inner > :last-child { margin-bottom: 0; }

/* 标签页 */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.tab {
  background: none; border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px;
  font-size: .88rem; color: var(--ink-3); cursor: pointer; font-family: var(--font-sans);
  transition: all .2s var(--ease);
}
.tab:hover { color: var(--ink); border-color: var(--ink-3); }
.tab.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
[data-theme="dark"] .tab.on { background: var(--red); border-color: var(--red); color: #fff; }
.panel { display: none; animation: fade .35s var(--ease); }
.panel.on { display: block; }

/* 清单 */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li {
  display: flex; align-items: flex-start; gap: 13px; padding: 13px 16px;
  border: 1px solid var(--line); border-radius: var(--radius-s); margin-bottom: 10px;
  background: var(--card); cursor: pointer; transition: all .2s var(--ease); font-size: .94rem;
}
.checklist li:hover { border-color: var(--red); }
.checklist li .box {
  width: 21px; height: 21px; flex: 0 0 21px; margin-top: 3px; border: 1.5px solid var(--ink-3);
  border-radius: 5px; display: grid; place-items: center; transition: all .2s var(--ease);
}
.checklist li .box svg { width: 12px; height: 12px; stroke: #fff; stroke-width: 3; fill: none; opacity: 0; }
.checklist li.done .box { background: var(--celadon); border-color: var(--celadon); }
.checklist li.done .box svg { opacity: 1; }
.checklist li.done .txt { color: var(--ink-3); text-decoration: line-through; }
.checklist li .txt b { display: block; font-weight: 600; color: var(--ink); font-size: .96rem; }
.checklist li.done .txt b { color: var(--ink-3); }
.checklist li .txt span { font-size: .85rem; color: var(--ink-3); }
.check-reset { background: none; border: 0; color: var(--ink-3); font-size: .82rem; cursor: pointer; text-decoration: underline; margin-top: 8px; }

/* 短语卡 */
.phrase { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--card); }
.phrase + .phrase { margin-top: 9px; }
.phrase .zh { font-family: var(--font-serif); font-size: 1.02rem; color: var(--ink); font-weight: 600; }
.phrase .py { font-size: .78rem; color: var(--ink-3); letter-spacing: .04em; }
.phrase .en { font-size: .84rem; color: var(--ink-3); }
.copy-btn { background: none; border: 1px solid var(--line); border-radius: 7px; padding: 5px 11px; font-size: .76rem; color: var(--ink-3); cursor: pointer; white-space: nowrap; }
.copy-btn:hover { color: var(--red); border-color: var(--red); }

/* App 条目 */
.app-item { display: flex; gap: 16px; align-items: flex-start; padding: 20px 0; border-bottom: 1px solid var(--line-2); }
.app-item:last-child { border-bottom: 0; }
.app-logo {
  width: 54px; height: 54px; flex: 0 0 54px; border-radius: 14px; display: grid; place-items: center;
  font-family: var(--font-serif); font-weight: 900; font-size: 20px; color: #fff; box-shadow: var(--shadow-s);
  background: #fff;  /* 彩色 logo / PNG 的默认衬底；纯白单色图标用内联品牌色衬底 */
}
.app-logo .ai-app { width: 100%; height: 100%; object-fit: contain; border: 1px solid var(--line); border-radius: inherit; }  /* 官網真實圖標 */

/* ============ 菜系配圖（按圖識菜） ============ */
.dish-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 2px; }
.dish { margin: 0; }
.dish img { width: 100%; height: 94px; object-fit: cover; border-radius: 10px; display: block; background: var(--paper-3); }
.dish figcaption { margin-top: 5px; font-size: .76rem; line-height: 1.25; color: var(--ink-3); text-align: center; }
.dish figcaption .en { display: block; opacity: .82; margin-top: 1px; }
@media (max-width: 560px) { .dish img { height: 72px; } .dish figcaption { font-size: .7rem; } }
.app-body { flex: 1; min-width: 0; }
.app-body h3 { margin: 0 0 4px; font-size: 1.1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.app-body h3 small { font-family: var(--font-sans); font-weight: 400; font-size: .8rem; color: var(--ink-3); letter-spacing: .04em; }
.app-body p { margin: 0 0 10px; font-size: .92rem; color: var(--ink-3); }
.kv { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .85rem; color: var(--ink-3); }
.kv div { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.kv b { color: var(--ink); font-weight: 600; }

/* 城市卡 */
.city {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  background: var(--card); display: flex; flex-direction: column; transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.city:hover { transform: translateY(-5px); box-shadow: var(--shadow-m); }
.city-art { height: 132px; position: relative; overflow: hidden; }
.city-art svg { width: 100%; height: 100%; }
.city-art .tag {
  position: absolute; left: 14px; bottom: 12px; font-family: var(--font-serif);
  font-size: 1.7rem; font-weight: 900; color: #fff; letter-spacing: .08em;
  text-shadow: 0 2px 12px rgba(0,0,0,.45);
}
.city-art .en { position: absolute; right: 14px; bottom: 16px; font-size: .72rem; letter-spacing: .18em; color: rgba(255,255,255,.85); text-transform: uppercase; }
.city-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.city-body p { font-size: .89rem; color: var(--ink-3); margin: 0; }
.city-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }

/* 城市卡：地标配图底部暗化，保证白字城市名清晰；标准城市名标题 */
.city-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.42), rgba(0,0,0,0) 50%); pointer-events: none; z-index: 1; }
.city-art svg.landmark { position: relative; z-index: 0; display: block; }
.city-art .tag, .city-art .en { z-index: 2; }
/* 首页城市卡：真实照片（3:2 完整显示，不影响 cities.html 的 SVG 卡） */
.city-art.city-art-photo { height: auto; aspect-ratio: 3 / 2; }
.city-art.city-art-photo img.landmark { position: relative; z-index: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.city-name { margin: 0 0 10px; font-family: var(--font-serif); font-size: 1.28rem; font-weight: 900; color: var(--ink); display: flex; align-items: baseline; gap: 8px; line-height: 1.1; }
.city-name .en, .city-name [data-lang="en"] { font-family: var(--font-sans); font-size: .74rem; font-weight: 600; letter-spacing: .16em; color: var(--ink-3); text-transform: uppercase; }
.city-link { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 12px; font-size: .82rem; font-weight: 600; color: var(--red); text-decoration: none; border: 1px solid color-mix(in srgb, var(--red) 35%, var(--line)); padding: 5px 11px; border-radius: 999px; transition: background .2s ease, color .2s ease; }
.city-link:hover { background: var(--red); color: #fff; }

/* 场景对比 */
.scene { display: grid; grid-template-columns: 90px 1fr; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.scene:last-child { border-bottom: 0; }
.scene .who { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 900; color: var(--red); text-align: center; }
@media (max-width: 520px) { .scene { grid-template-columns: 62px 1fr; gap: 10px; } .scene .who { font-size: 1.05rem; } }

/* 跑马灯 */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 14px 0; background: var(--paper-3); }
.marquee-track { display: flex; gap: 42px; width: max-content; animation: slide 72s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span { font-family: var(--font-serif); font-size: 1.05rem; color: var(--ink-3); letter-spacing: .1em; white-space: nowrap; display: flex; align-items: center; gap: 42px; }
.marquee span::after { content: "◈"; color: var(--red); font-size: .7rem; }

/* ---------- 10. 页脚 ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.62); margin-top: 40px; padding-block: 54px 34px; position: relative; overflow: hidden; }
[data-theme="dark"] .site-footer { background: #0d0c0b; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; letter-spacing: .08em; }
.site-footer a { color: rgba(255,255,255,.62); }
.site-footer a:hover { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 34px; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-list { list-style: none; padding: 0; margin: 0; font-size: .88rem; }
.foot-list li { margin-bottom: 8px; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: .78rem; }
.foot-abn { white-space: nowrap; display: inline-flex; align-items: center; }
.abn-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; margin-right: 7px; }
.foot-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.foot-brand .brand-logo { height: 40px; filter: brightness(0) invert(1); }
.foot-brand .brand-seal { background: var(--red-2); }

/* 回到顶部 */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 50;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--red); color: #fff; border: 0; cursor: pointer;
  box-shadow: var(--shadow-m); opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: all .3s var(--ease);
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top svg { width: 18px; height: 18px; }

/* 阅读进度条 */
.progress { position: fixed; top: 0; left: 0; height: 2px; background: var(--red); z-index: 70; width: 0; transition: width .1s linear; }

/* ---------- 11. 动效 ---------- */
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.reveal { opacity: 0; transform: translateY(22px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- 12. 页面内小标题 ---------- */
.sub-h { display: flex; align-items: center; gap: 12px; margin: 44px 0 18px; }
.sub-h .idx { font-family: var(--font-serif); font-size: .8rem; letter-spacing: .2em; color: var(--red); }
.sub-h h3 { margin: 0; }
.sub-h::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
.side-col { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 36px; align-items: start; }
@media (max-width: 940px) { .side-col { grid-template-columns: minmax(0, 1fr); } } /* minmax(0,1fr)：列宽不随内容 min-content 撑开（修复 train/tips/connect 表格 560px 把列顶宽导致手机横向溢出） */
.toc { position: sticky; top: 92px; }
@media (max-width: 940px) { .toc { position: static; } }
.toc-list { list-style: none; padding: 0; margin: 0; font-size: .88rem; }
.toc-list a { display: block; padding: 7px 12px; border-left: 2px solid var(--line); color: var(--ink-3); }
.toc-list a:hover, .toc-list a.on { color: var(--red); border-color: var(--red); background: var(--paper-3); }

/* 面包屑 */
.crumb { font-size: .8rem; color: var(--ink-3); padding-top: 26px; }
.crumb a { color: var(--ink-3); }
.crumb span { margin: 0 7px; opacity: .5; }

/* 页头横幅 */
.page-head { position: relative; padding-block: clamp(36px, 5vw, 64px) clamp(16px, 2.5vw, 28px); }
.page-head h1 { margin-bottom: .5em; }
.page-head .lead { color: var(--ink-3); max-width: 54ch; margin: 0; font-size: clamp(1rem, 1.6vw, 1.14rem); }
.page-head .badge-row { margin-top: 18px; }

/* ---------- 13. 双语机制 ---------- */
[hidden] { display: none !important; }

/* JS 执行前就按语言隐藏，避免闪烁
   ko / ja 复用英文节点，head 脚本会先把 html lang 置为 en */
html[lang="en"] [data-lang="zh"], html[lang="ko"] [data-lang="zh"], html[lang="ja"] [data-lang="zh"] { display: none !important; }
html[lang="zh"] [data-lang="en"], html[lang="zh-CN"] [data-lang="en"] { display: none !important; }

/* 日文 / 韩文字体栈
   （Noto Sans/Serif SC 已含假名，韩文需 KR 字族兜底） */
html[lang="ja"] {
  --font-serif: "Noto Serif JP", "Noto Serif SC", "Hiragino Mincho ProN", "Yu Mincho", "Songti SC", Georgia, serif;
  --font-sans:  "Noto Sans JP", "Noto Sans SC", "Hiragino Sans", "Yu Gothic", "PingFang SC", -apple-system, sans-serif;
}
html[lang="ko"] {
  --font-serif: "Noto Serif KR", "Noto Serif SC", "Apple SD Gothic Neo", "Malgun Gothic", "Songti SC", Georgia, serif;
  --font-sans:  "Noto Sans KR", "Noto Sans SC", "Apple SD Gothic Neo", "Malgun Gothic", "PingFang SC", -apple-system, sans-serif;
}
/* 韩文按词断行；日文保持默认的「可在任意文字间断行」 */
html[lang="ko"] body { word-break: keep-all; }
html[lang="ja"] body, html[lang="ko"] body { line-height: 1.85; }

.lang-switch {
  display: inline-flex; align-items: center; gap: 1px; padding: 3px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper-3);
}
.lang-btn {
  border: 0; background: none; cursor: pointer; border-radius: 999px;
  padding: 5px 12px; font-size: .78rem; font-weight: 700; letter-spacing: .04em;
  color: var(--ink-3); font-family: var(--font-sans); line-height: 1.2;
  transition: all .2s var(--ease);
}
.lang-btn:hover { color: var(--ink); }
.lang-btn.on { background: var(--red); color: #fff; }
[data-theme="dark"] .lang-btn.on { background: var(--red-2); color: #fff; }

/* 中文简繁切换按钮 */
.zh-variant-btn {
  border: 1px solid var(--line); background: var(--paper-3); cursor: pointer;
  border-radius: 999px; padding: 5px 11px; font-size: .8rem; font-weight: 700;
  letter-spacing: .06em; color: var(--ink-3); font-family: var(--font-sans);
  line-height: 1.2; transition: all .2s var(--ease); white-space: nowrap;
}
.zh-variant-btn:hover { color: var(--ink); border-color: var(--red); }
.zh-variant-btn[hidden] { display: none; }

/* 英文正文里的中文词与拼音 */
.zh-t { font-family: var(--font-serif); font-weight: 700; color: var(--ink); white-space: nowrap; }
.pinyin { font-size: .82em; color: var(--ink-3); font-style: normal; letter-spacing: .01em; }

/* ---------- 14. 落地 72 小时时间线 ---------- */
.h72 { list-style: none; margin: 0; padding: 0; }
.h72 li {
  display: grid; grid-template-columns: 132px 1fr; gap: clamp(14px, 2.5vw, 26px);
  padding: 20px 0; border-top: 1px solid var(--line); align-items: start;
}
.h72 li:last-child { border-bottom: 1px solid var(--line); }
.h72 .when {
  font-family: var(--font-serif); font-weight: 900; font-size: 1.02rem; color: var(--red);
  letter-spacing: .02em; line-height: 1.3;
}
.h72 .when small { display: block; font-family: var(--font-sans); font-weight: 400; font-size: .74rem; color: var(--ink-3); letter-spacing: .06em; margin-top: 3px; }
.h72 h4 { margin: 0 0 .35em; font-size: 1.05rem; }
.h72 p { margin: 0; font-size: .92rem; color: var(--ink-3); }
@media (max-width: 620px) {
  .h72 li { grid-template-columns: 1fr; gap: 6px; }
  .h72 .when small { display: inline; margin-left: 8px; }
}

/* ---------- 15. 误区卡 ---------- */
.gotcha {
  display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start;
  padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-s);
  background: var(--card); height: 100%;
}
.gotcha .mark {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--red-soft); color: var(--red); font-family: var(--font-serif);
  font-weight: 900; font-size: 1rem;
}
.gotcha .wrong { display: block; font-size: .88rem; color: var(--ink-3); text-decoration: line-through; margin-bottom: 4px; }
.gotcha .right { display: block; font-size: .92rem; color: var(--ink-2); }
.gotcha .right b { color: var(--celadon); }

/* ---------- 16. 速查表 / 打印 ---------- */
.sheet { background: var(--card); }
.sheet-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 760px) { .sheet-grid { grid-template-columns: 1fr; } }
.sheet-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; background: var(--card); }
.sheet-box h3 { font-size: 1.05rem; margin-bottom: 12px; display: flex; align-items: center; gap: 9px; }
.sheet-box h3 .n { width: 24px; height: 24px; border-radius: 6px; background: var(--red); color: #fff; display: grid; place-items: center; font-size: .8rem; font-family: var(--font-serif); }
.sheet-list { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.sheet-list li { padding: 7px 0; border-bottom: 1px dotted var(--line); display: flex; justify-content: space-between; gap: 14px; }
.sheet-list li:last-child { border-bottom: 0; }
.sheet-list li span:last-child { color: var(--ink-3); text-align: right; }
/* 速查表：必装 App 的官方上架标识（名称 + 开发者 + 区域），帮海外用户避开仿冒 App */
.sheet-list.apps li { display: block; padding: 9px 0; }
.sheet-list.apps li > span { display: block; text-align: left; }
.sheet-list.apps li > span.app-name { display: flex; align-items: center; gap: 8px; }
.app-ico { width: 26px; height: 26px; object-fit: contain; flex: none; background: transparent; border: 1px solid var(--line); border-radius: 6px; padding: 3px; box-sizing: border-box; }
.app-ico[src*="alipay.svg"]     { background: #1677ff; border-color: rgba(0,0,0,.18); }
.app-ico[src*="wechat.svg"]     { background: #07c160; border-color: rgba(0,0,0,.18); }
.app-ico[src*="tripdotcom.svg"] { background: #287dfa; border-color: rgba(0,0,0,.18); }
.app-ico[src*="amap.png"]       { background: #fff; border-color: rgba(0,0,0,.15); }
.app-ico[src*="didi.png"]       { background: #fff; border-color: rgba(0,0,0,.15); }
.app-ico[src*="dianping.png"]   { background: #fff; border-color: rgba(0,0,0,.15); }
.sub-h .app-ico { width: 30px; height: 30px; border-radius: 7px; padding: 4px; }
.checklist .t-row { display: flex; align-items: center; gap: 9px; }
.checklist .t-row .app-ico { width: 24px; height: 24px; }
.sheet-list.apps .app-desc { font-size: .82rem; color: var(--ink-3); margin-top: 1px; }
.sheet-list.apps .app-id { font-size: .76rem; color: var(--ink-3); margin-top: 4px; }
.sheet-list.apps .app-id b { color: var(--ink); font-weight: 700; }
.app-note { font-size: .8rem; color: var(--ink-3); background: color-mix(in srgb, var(--red) 8%, var(--card)); border: 1px solid color-mix(in srgb, var(--red) 30%, var(--line)); border-radius: 8px; padding: 8px 10px; margin: 0 0 12px; }
.app-note b { color: var(--ink); }
.cn-only { display: inline-block; font-size: .68rem; font-weight: 700; color: #fff; background: var(--red); border-radius: 5px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; letter-spacing: .02em; }
/* 官方商店徽章：点击直达已核实的 App Store / Google Play 页面，防仿冒 */
.store-row { display: flex; gap: 8px; margin-top: 7px; flex-wrap: wrap; }
.app-body .store-row { margin-top: 16px; }
.store-badge { display: inline-flex; align-items: center; gap: 8px; background: #000; color: #fff; border-radius: 8px; padding: 7px 12px; text-decoration: none; min-width: 132px; border: 1px solid rgba(255,255,255,.18); box-shadow: 0 1px 5px rgba(0,0,0,.28); transition: background .15s; }
.store-badge:hover { background: #1c1c1c; }
.store-badge .sb-ico { width: 19px; height: 19px; flex: none; fill: #fff; }
.store-badge .sb-txt { display: flex; flex-direction: column; line-height: 1.08; text-align: left; color: #fff !important; }
.store-badge .sb-txt small { font-size: .6rem; font-weight: 500; letter-spacing: .05em; opacity: 1; text-transform: uppercase; color: #fff !important; }
.store-badge .sb-txt b { font-size: .86rem; font-weight: 700; color: #fff !important; }
.store-badge span { color: #fff !important; } /* 防止被清单 .txt span 等祖先规则染成深色 */
@media (prefers-color-scheme: dark) { .store-badge { border-color: rgba(255,255,255,.32); } }
/* 速查表：手机端「打开 App」按钮 + 按设备只显示对应商店 */
.store-badge.open-app { background: var(--red); border-color: transparent; }
.store-badge.open-app:hover { background: var(--red-2); }
.open-app { display: none; }
html.is-mobile .open-app { display: inline-flex; }
html.is-mobile .badge-hide { display: none; }
@media print {
  .open-app { display: none !important; }
  .store-badge { display: inline-flex !important; }
}
.big-zh { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 700; color: var(--ink); }

/* ---------- 站内搜索 ---------- */
.nav-search { position: relative; flex: 0 1 220px; min-width: 168px; }
.search-box {
  display: flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper-2); color: var(--ink-2);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.nav-search:focus-within .search-box { border-color: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 16%, transparent); }
.search-ico { width: 16px; height: 16px; flex: 0 0 16px; opacity: .55; }
.search-input { border: 0; outline: 0; background: transparent; color: inherit; font: inherit; font-size: .9rem; width: 100%; min-width: 0; }
.search-input::placeholder { color: var(--ink-3); opacity: .85; }
.search-input::-webkit-search-cancel-button { cursor: pointer; }
.search-results {
  position: absolute; top: calc(100% + 8px); right: 0; left: auto;
  min-width: 280px; max-width: min(92vw, 360px);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-m);
  max-height: min(72vh, 440px); overflow-y: auto; padding: 6px; z-index: 70;
}
.search-results[hidden] { display: none; }
.search-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.search-item:hover, .search-item.active { background: var(--paper-3); }
.search-item .si-ico { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 7px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); font-size: .82rem; font-weight: 700; }
.search-item .si-txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.search-item .si-title { font-size: .92rem; font-weight: 500; }
.search-item .si-hint { font-size: .74rem; color: var(--ink-3); }
.search-empty { padding: 16px 10px; font-size: .88rem; color: var(--ink-3); text-align: center; }
.search-foot { padding: 8px 10px 4px; margin-top: 4px; border-top: 1px solid var(--line); font-size: .72rem; color: var(--ink-3); }
@media (max-width: 900px) {
  .nav-search { flex: 1 1 80px; min-width: 100px; }
}

@media print {
  .site-header, .site-footer, .to-top, .progress, .no-print, .marquee, .nav-search { display: none !important; }
  body { background: #fff; color: #000; }
  body::before { display: none; }
  .wrap { max-width: none; padding: 0; }
  section { padding-block: 14px; }
  .card, .city, .acc, .sheet-box, .table-scroll, .h72 li { break-inside: avoid; box-shadow: none !important; border-color: #ccc !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .acc-a { max-height: none !important; }
  .acc-q::after { display: none; }
  h1 { font-size: 24pt; } h2 { font-size: 17pt; } h3 { font-size: 13pt; }
  .hero { padding-block: 0 12px; }
  .hero-bg { display: none; }
  .print-only { display: block !important; }
}
.print-only { display: none; }

/* 速查表填空行 */
.fill {
  border: 0; border-bottom: 1px dashed var(--ink-3); background: transparent;
  font-family: inherit; font-size: .92rem; color: var(--ink); min-height: 26px;
  padding: 2px 0; outline: none; display: block; width: 100%;
}
.fill:focus { border-bottom-color: var(--red); }
@media print { .fill { border-bottom: 1px solid #999; } }

/* ============ 會員 ============ */
.member-slot { display: inline-flex; align-items: center; position: relative; }
.member-join {
  font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line, #e5e0d8);
  background: var(--red, #c0392b); color: #fff; transition: all .18s ease;
}
.member-join:hover { filter: brightness(1.05); }
/* 登錄/加入按鈕的懸浮提示（懸停或鍵盤聚焦時顯示） */
.member-tip {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 60;
  width: max-content; max-width: 280px; padding: 10px 13px;
  font-size: .78rem; font-weight: 500; line-height: 1.6; text-align: left;
  color: var(--ink, #333); background: var(--paper-2, #fffdf8);
  border: 1px solid var(--line, #e5e0d8); border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  pointer-events: none;
}
.member-slot:hover .member-tip,
.member-slot:focus-within .member-tip { opacity: 1; visibility: visible; transform: translateY(0); }
@media (max-width: 720px) { .member-tip { max-width: min(280px, 78vw); right: -8px; } }
.member-chip {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font: inherit; font-size: .82rem; font-weight: 600; color: var(--ink, #333);
  padding: 5px 12px 5px 6px; border-radius: 999px; border: 1px solid var(--line, #e5e0d8);
  background: var(--paper, #fff); transition: all .18s ease;
}
.member-chip:hover { border-color: var(--red, #c0392b); }
.member-avatar {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--red, #c0392b); color: #fff; font-size: .8rem; font-weight: 700;
}
.member-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 150px; z-index: 60;
  background: var(--paper, #fff); border: 1px solid var(--line, #e5e0d8); border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,.12); padding: 6px; overflow: hidden;
}
.member-menu-item {
  display: block; width: 100%; text-align: left; font: inherit; font-size: .88rem;
  padding: 9px 12px; border: 0; background: transparent; color: var(--ink, #333); cursor: pointer;
  border-radius: 8px; text-decoration: none;
}
.member-menu-item:hover { background: var(--paper-3, #f4efe6); }

.modal-mask {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  background: rgba(20,16,12,.45); padding: 20px; font-family: system-ui, sans-serif;
}
.modal-card {
  position: relative; width: 100%; max-width: 420px; background: var(--paper, #fff);
  border-radius: 16px; padding: 28px 24px 24px; box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.modal-close {
  position: absolute; top: 10px; right: 12px; border: 0; background: transparent; cursor: pointer;
  font-size: 1.4rem; line-height: 1; color: var(--ink-3, #888);
}
.modal-title { font-family: var(--font-serif); font-size: 1.3rem; margin: 0 0 6px; }
.modal-sub { font-size: .86rem; color: var(--ink-3, #777); margin: 0 0 18px; line-height: 1.5; }
.mm-social { display: grid; gap: 10px; margin-bottom: 14px; }
.mm-social-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: .9rem; font-weight: 600;
  padding: 10px 14px; border-radius: 10px; cursor: pointer; border: 1px solid var(--line, #e5e0d8); background: #fff; color: var(--ink, #333);
}
.mm-social-btn.google:hover { border-color: #4285F4; }
.mm-social-btn.facebook:hover { border-color: #1877F2; }
.mm-divider { display: flex; align-items: center; gap: 10px; color: var(--ink-3, #999); font-size: .8rem; margin: 6px 0 14px; }
.mm-divider::before, .mm-divider::after { content: ""; flex: 1; height: 1px; background: var(--line, #e5e0d8); }
.mm-form { display: grid; gap: 12px; }
.mm-field { display: grid; gap: 5px; }
.mm-label { font-size: .82rem; font-weight: 600; color: var(--ink, #333); }
.mm-input {
  font: inherit; font-size: .95rem; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line, #e5e0d8); background: #fff; color: var(--ink, #333); width: 100%; box-sizing: border-box;
}
.mm-input:focus { outline: none; border-color: var(--red, #c0392b); }
.mm-input[readonly] { background: var(--paper-3, #f4efe6); color: var(--ink-3, #888); }
.mm-opt { font-size: .76rem; color: var(--ink-3, #999); margin-left: 6px; }
.mm-consent { display: flex; gap: 8px; align-items: flex-start; font-size: .8rem; color: var(--ink-3, #666); line-height: 1.45; }
.mm-consent input { margin-top: 2px; }
.orders-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.order-item { border: 1px solid var(--line, #e5e0d8); border-radius: 12px; padding: 12px 14px; background: var(--paper-2, #faf7f1); }
.order-name { font-weight: 700; font-size: .95rem; color: var(--ink, #333); margin-bottom: 6px; }
.order-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .8rem; color: var(--ink-3, #777); }
.order-meta .mm-tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .72rem; background: var(--paper-3, #f4efe6); color: var(--ink, #333); }
.order-date { margin-left: auto; }
/* 我的積分 */
.points-box { text-align: center; padding: 18px 0 8px; }
.points-num { font-family: var(--font-serif, serif); font-size: 3rem; font-weight: 900; line-height: 1; color: var(--red, #c0392b); }
.points-label { margin-top: 6px; font-size: .82rem; color: var(--ink-3, #777); }
.points-hint { font-size: .78rem; margin: 10px 0 0; }
.mm-status { font-size: .85rem; min-height: 1.2em; }
.mm-status.err { color: #c0392b; }
.mm-status.ok { color: #2e7d32; }
.mm-devlink { color: var(--red, #c0392b); }
.mm-submit { margin-top: 4px; }

.member-page-wrap { padding: clamp(36px, 6vw, 72px) 0; }
.member-page-wrap .sec-head h1 { font-size: clamp(2.6rem, 6.5vw, 4.2rem); }
.member-page-wrap .kicker { font-size: .95rem; }
.member-card { padding: clamp(22px, 4.5vw, 36px); max-width: 560px; margin-inline: auto; font-size: 1.02rem; }
.member-lead { font-size: 1.05rem; color: var(--ink-3, #555); line-height: 1.6; margin: 0 0 18px; }
.member-form .mm-label { font-size: .95rem; }
.member-form .mm-input { font-size: 1.02rem; padding: 12px 14px; }
.member-form .mm-consent { font-size: .88rem; }
.member-form { display: grid; gap: 14px; }
.member-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.mp-status { font-size: .85rem; min-height: 1.2em; }
.mp-status.err { color: #c0392b; }
.mp-status.ok { color: #2e7d32; }
.mp-error { background: #fdecea; color: #c0392b; padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: .9rem; }

/* 會員：登錄 / 註冊 兩按鈕 */
.member-auth-btns { display: inline-flex; align-items: center; gap: 8px; }
.member-login {
  font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line, #e5e0d8);
  background: transparent; color: var(--ink, #333); transition: all .18s ease;
}
.member-login:hover { border-color: var(--red, #c0392b); color: var(--red, #c0392b); }

/* 彈窗：模式切換連結 */
.mm-switch { text-align: center; margin-top: 14px; font-size: .84rem; color: var(--ink-3, #777); }
.mm-switch-btn { font: inherit; font-size: .84rem; background: none; border: 0; cursor: pointer; color: var(--red, #c0392b); padding: 2px 4px; }
.mm-switch-btn:hover { text-decoration: underline; }
#mm-extra[hidden] { display: none; }

/* 會員頁成功 / 失敗橫幅 */
.mp-success { background: #e8f5e9; color: #2e7d32; padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: .92rem; }
.mp-success-link { color: #2e7d32; font-weight: 700; text-decoration: underline; margin-left: 4px; white-space: nowrap; }

/* 查用量表單（usage.html）：三行堆疊 */
.us-row { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 12px 0; text-align: left; }
.us-row label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 6px; color: var(--ink-2, #555); }
.us-row input { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid var(--line, #e5e0d8); border-radius: 12px; font: inherit; font-size: .95rem; background: var(--paper-2, #faf7f1); color: var(--ink, #333); }
.us-row .btn { width: 100%; margin-top: 6px; }
.us-err { margin: 0; color: var(--red, #c0392b); font-size: .85rem; }

/* ===========================================================
   17. 移动端增强（窄屏 / 刘海屏）
   全部包在媒体查询内，桌面端布局不受影响
   =========================================================== */

/* 桌面端隐藏抽屉内的「语言 / 简繁」设置区（它只在移动端出现） */
@media (min-width: 901px) {
  .nav-drawer-foot { display: none; }
}

/* ≤900px：导航已是汉堡抽屉；隐藏顶栏搜索 / 语言切换 / 简繁，避免顶栏拥挤 */
@media (max-width: 900px) {
  .nav-search { display: none; }
  .nav-actions { margin-left: auto; } /* 把 Sign in / 主题 / Menu 整组推到右侧 end */
  .nav-actions .lang-switch,
  .nav-actions .zh-variant-btn { display: none; }
}

/* 抽屉内的「语言 / 简繁」设置区样式 */
.nav-drawer-foot {
  margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line);
}
.nav-drawer-foot .nav-df-title {
  font-size: .8rem; color: var(--ink-3); margin-bottom: 10px; letter-spacing: .04em;
}
.nav-drawer-foot .lang-switch { display: flex; flex-wrap: wrap; gap: 8px; }
.nav-drawer-foot .lang-btn {
  padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper); font-size: .85rem; color: var(--ink-2); cursor: pointer;
}
.nav-drawer-foot .lang-btn[aria-pressed="true"],
.nav-drawer-foot .lang-btn.active {
  background: var(--red); color: #fff; border-color: var(--red);
}
.nav-drawer-foot .zh-variant-btn {
  margin-top: 12px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper); font: inherit; font-size: .85rem; color: var(--ink-2); cursor: pointer;
}

/* ≤640px：手机精细打磨 */
@media (max-width: 640px) {
  html { font-size: 16px; }
  .wrap { padding-inline: 16px; }
  .site-header { padding-top: env(safe-area-inset-top); }
  .nav { gap: 10px; height: 60px; }
  .nav-links { top: calc(60px + env(safe-area-inset-top)); }
  .brand-logo { height: 38px; }
  .brand-text { display: none; } /* 顶栏只留 logo 图标，防止把汉堡按钮挤出屏幕（实测 390px 英文模式溢出 37px） */
  .to-top { bottom: calc(22px + env(safe-area-inset-bottom)); }
  .hero { padding-block: 44px 32px; }
  .hero h1 { font-size: clamp(1.7rem, 8vw, 2.4rem); }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .sec-head { margin-bottom: 26px; }
  .card { padding: 18px; }
  .field input, .field select, .field textarea {
    padding: 13px 14px; font-size: 16px; /* 16px 防止 iOS 聚焦缩放 */
  }
  .btn { min-height: 46px; padding: 13px 22px; }
  .pay-opts { flex-direction: column; }
  .pay-opts label { width: 100%; justify-content: flex-start; }
  .us-row input { font-size: 16px; }
  /* 二维码 / 图片自适应，避免溢出 */
  img.qr, #qr, .qr img, .qr-box img { max-width: 100%; height: auto; }
  .hero-photo, .brand-logo { max-width: 100%; }
  /* 会员弹窗内边距收紧 */
  .modal-card { padding: 22px 18px 20px; }
  /* 超长不可断字符串（LPA 激活串 / 邮箱 / URL）在窄卡片里换行，避免撑破被裁；
     注意：只用 overflow-wrap，不要 word-break:break-word（已废弃，会把普通单词如
     "Verification" 从中间断开成 "Verificati" / "on:"） */
  body { overflow-wrap: break-word; }
  img, svg, video, canvas { max-width: 100%; height: auto; }
  .od-card, .us-card, .co-card, .rc-card, .member-card, .acc-a-inner { overflow-wrap: break-word; }
}
