:root {
  --ink: #1b2430;
  --ink2: #4a5563;
  --ink3: #7c8794;
  --bg: #f4f5f2;
  --card: #ffffff;
  --line: #e3e5e1;
  --brand: #22546b;
  --brand2: #17424f;
  --accent: #b6793a;
  --radius: 12px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font: 16px/1.7 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

a { color: var(--brand); text-decoration: none; }
a:active { opacity: .7; }

.wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

.top {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
}

.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand { display: flex; flex-direction: column; line-height: 1.25; }
.brand b { font-size: 19px; letter-spacing: 2px; color: var(--ink); font-weight: 600; }
.brand span { font-size: 11px; color: var(--ink3); letter-spacing: .5px; }

.top nav { display: flex; gap: 12px; font-size: 13px; color: var(--ink2); flex-shrink: 0; }
.top nav a { color: var(--ink2); }

main { padding-bottom: 28px; }

.crumb {
  font-size: 12px;
  color: var(--ink3);
  padding: 12px 0 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.crumb i { font-style: normal; color: var(--ink2); }

h1 { font-size: 20px; line-height: 1.45; margin: 14px 0 6px; font-weight: 600; }
h2 { font-size: 16px; margin: 22px 0 8px; font-weight: 600; color: var(--ink); }
h2::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 13px;
  background: var(--brand);
  margin-right: 8px;
  vertical-align: -1px;
  border-radius: 2px;
}
p { margin: 8px 0; color: var(--ink2); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 14px;
  margin: 12px 0;
}

.muted { color: var(--ink3); font-size: 13px; }
.small { font-size: 13px; }

.search { display: flex; gap: 8px; margin: 14px 0 4px; }
.search input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  font-size: 16px;
  color: var(--ink);
  outline: none;
}
.search input:focus { border-color: var(--brand); }
.search button {
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 22px;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  letter-spacing: 1px;
}
.search button:active { background: var(--brand2); }

.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 14px 0;
}
.tile {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 14px;
  color: var(--ink);
  min-height: 86px;
}
.tile b { display: block; font-size: 17px; font-weight: 600; letter-spacing: .5px; }
.tile span { display: block; font-size: 12px; color: var(--ink3); margin-top: 4px; line-height: 1.5; }
.tile.soon { opacity: .55; }

.rows { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.row:last-child { border-bottom: 0; }
.row .grow { flex: 1; min-width: 0; }
.row b { display: block; font-size: 16px; font-weight: 600; }
.row em { font-style: normal; font-size: 12px; color: var(--ink3); display: block; margin-top: 2px; }
.row .num { font-size: 12px; color: var(--brand); flex-shrink: 0; padding-top: 2px; }

.review {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 14px;
  margin: 10px 0;
}
.review .meta { font-size: 12px; color: var(--ink3); margin-bottom: 6px; display: flex; justify-content: space-between; }
.review .body p { margin: 4px 0; color: var(--ink); }

.note {
  background: #f7f6f1;
  border: 1px solid #eae6da;
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--ink2);
  line-height: 1.7;
  margin: 14px 0;
}

.cta {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  border-radius: 22px;
  padding: 10px 20px;
  font-size: 15px;
  border: 0;
}
.cta.ghost { background: #fff; color: var(--brand); border: 1px solid var(--brand); }

.bar {
  position: sticky;
  bottom: 0;
  z-index: 40;
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--line);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  display: flex;
  gap: 8px;
}
.bar a, .bar button {
  flex: 1;
  text-align: center;
  border-radius: 22px;
  padding: 11px 0;
  font-size: 15px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
}
.bar a.ghost { background: #fff; color: var(--brand); }

label.field { display: block; margin: 14px 0 6px; font-size: 13px; color: var(--ink2); }
input[type=text], input[type=tel], textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  outline: none;
}
textarea { min-height: 132px; resize: vertical; line-height: 1.7; }
input:focus, textarea:focus { border-color: var(--brand); }

.btn-row { display: flex; gap: 10px; margin: 16px 0 8px; }
.btn-row .cta { flex: 1; text-align: center; }
.ghost-sm { background: #fff; color: var(--ink2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: 14px; }

.tip { font-size: 13px; color: var(--accent); margin: 8px 0; min-height: 20px; }
.ok { color: var(--brand); }

.foot { border-top: 1px solid var(--line); background: var(--card); padding: 18px 0 26px; margin-top: 10px; }
.foot-line { font-size: 13px; color: var(--ink2); margin: 0 0 6px; }
.foot-note { font-size: 12px; color: var(--ink3); line-height: 1.7; margin: 4px 0; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kv { display: flex; justify-content: space-between; font-size: 13px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.kv b { font-weight: 600; color: var(--ink); }

@media (max-width: 360px) {
  .tiles { grid-template-columns: 1fr; }
}

/* ---------------- 微信内置浏览器与窄屏专项 ---------------- */

html, body { max-width: 100%; overflow-x: hidden; }

/* iOS 微信会自行放大正文字号，锁住后排版才稳定 */
body.wx { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* 刘海屏与底部手势区留白 */
body.wx .top { padding-top: env(safe-area-inset-top); }
body.wx .bar { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }

/* 微信里长按会弹出菜单，正文以外的地方关掉，避免误触 */
body.wx .cta,
body.wx .tile,
body.wx .row,
body.wx .bar a,
body.wx button { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

/* 输入框小于 16px 时 iOS 会自动放大页面 */
input[type=text], input[type=tel], textarea, select {
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}

/* 内容一律不撑破屏幕 */
img, video, canvas, table { max-width: 100%; height: auto; }
table { table-layout: fixed; word-break: break-word; }

/* 微信里没有固定返回键，长页面给一个回顶 */
body.wx .to-top {
  position: fixed;
  right: 14px;
  bottom: calc(76px + env(safe-area-inset-bottom));
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.94);
  color: var(--ink2);
  font-size: 18px;
  line-height: 38px;
  text-align: center;
  z-index: 45;
  box-shadow: 0 2px 8px rgba(27,36,48,.12);
}

/* 首次进入的分享引导 */
.wx-guide {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 60;
  max-width: 70%;
  background: rgba(27,36,48,.92);
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  padding: 9px 12px 9px 14px;
  border-radius: 10px;
  transition: opacity .28s ease, transform .28s ease;
}
.wx-guide::after {
  content: "";
  position: absolute;
  top: -6px;
  right: 22px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid rgba(27,36,48,.92);
}
.wx-guide.out { opacity: 0; transform: translateY(-6px); }

@media (max-width: 400px) {
  h1 { font-size: 21px; }
  .top .wrap { padding-left: 12px; padding-right: 12px; }
  .top nav { gap: 9px; font-size: 12px; }
  .tiles .tile b { font-size: 15px; }
  .tiles .tile span { font-size: 12px; }
  .wrap { padding: 0 13px; }
}

@media (max-width: 340px) {
  .tiles { grid-template-columns: 1fr; }
}

/* ---------------- 首页分区与栏目卡片 ---------------- */

/* 导航：栏目多了改单行横滑，高中栏目用暖色区分 */
.top nav { min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.top nav::-webkit-scrollbar { display: none; }
.top nav a { white-space: nowrap; flex: 0 0 auto; }
.top nav a.hs { color: #8a5a20; }
.top nav a.on { color: var(--brand); font-weight: 600; }
.top nav a.hs.on { color: #8a5a20; }

.lead {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink2);
  margin: 6px 0 4px;
}

.group { margin: 22px 0 6px; }
.group-head h2 {
  font-size: 17px;
  margin: 0 0 4px;
}
.group-head h2::before { background: var(--brand); }
.group-head p {
  font-size: 12.5px;
  color: var(--ink3);
  line-height: 1.7;
  margin: 0 0 10px;
}
.group.warm .group-head h2 { color: #8a5a20; }
.group.warm .group-head h2::before { background: var(--accent); }
.group.warm .tile { border-color: #e7ddc9; }
.group.warm .tile-name b { color: #7a4f1c; }
.group.warm .tile-links a { color: #8a5a20; }

.tiles.cols-1 { grid-template-columns: 1fr; }.tile { display: flex; flex-direction: column; }
.tile-name b { display: block; font-size: 17px; font-weight: 600; letter-spacing: .5px; color: var(--ink); }
.tile-sub { display: block; font-size: 12.5px; color: var(--ink3); margin: 6px 0 10px; line-height: 1.6; }
.tile-links { margin-top: auto; display: flex; flex-wrap: wrap; gap: 12px; font-size: 12.5px; }
.tile-links a { color: var(--brand); }
.tile-links a:active { opacity: .7; }

@media (max-width: 400px) {
  .group-head h2 { font-size: 16px; }
  .tile-sub { font-size: 12px; }
}

/* 窄屏页头：品牌一行，栏目导航一行横滑 */
@media (max-width: 560px) {
  .top .wrap {
    flex-wrap: wrap;
    padding-top: 9px;
    padding-bottom: 4px;
    gap: 2px;
  }
  .brand {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
  }
  .brand b { font-size: 17px; letter-spacing: 1.5px; }
  .brand span { font-size: 10.5px; letter-spacing: .3px; }
  .top nav {
    flex: 1 0 100%;
    font-size: 11.5px;
    gap: 8px;
    padding-bottom: 3px;
  }
}
