/* ===== 茶修·六境 主样式 ===== */

/* 字体与基础 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;500;700&family=Noto+Sans+SC:wght@300;400;500&display=swap');

:root {
  --green: #3B6D11;
  --green-light: #EAF3DE;
  --green-mid: #639922;
  --teal: #0F6E56;
  --teal-light: #E1F5EE;
  --teal-mid: #1D9E75;
  --amber: #854F0B;
  --amber-light: #FAEEDA;
  --amber-mid: #BA7517;
  --purple: #3C3489;
  --purple-light: #EEEDFE;
  --purple-mid: #534AB7;
  --coral: #993C1D;
  --coral-light: #FAECE7;
  --gray-900: #1a1a18;
  --gray-700: #3d3d38;
  --gray-500: #888780;
  --gray-200: #e8e6de;
  --gray-100: #f5f3ec;
  --gray-50: #faf9f5;
  --serif: 'Noto Serif SC', 'STSong', Georgia, serif;
  --sans: 'Noto Sans SC', 'PingFang SC', sans-serif;
  --radius: 12px;
  --radius-sm: 6px;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--sans);
  color: var(--gray-900);
  background: #fff;
  line-height: 1.7;
  overflow-x: hidden;
  /* 固定导航栏高度 */
  padding-top: 64px;
}

a { text-decoration: none; color: inherit; }

/* ===== 导航 ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 0.5px solid var(--gray-200);
  transition: all 0.3s;
}
.nav.scrolled {
  background: rgba(255,255,255,0.98);
  box-shadow: var(--shadow);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-logo {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--teal);
  letter-spacing: 0.05em;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-logo-img {
  height: 36px;
  width: auto;
  border-radius: 4px;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}
.nav-link {
  font-size: 13px;
  color: var(--gray-700);
  cursor: pointer;
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active { color: var(--teal); }
.nav-dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 0.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 0.5rem 0;
  min-width: 120px;
  z-index: 200;
}
.nav-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 13px;
  color: var(--gray-700);
  transition: background 0.15s;
}
.dropdown-menu a:hover { background: var(--gray-100); color: var(--teal); }
/* dropdown sub-group (茶艺子菜单) */
.dropdown-sub {
  border-top: 0.5px solid var(--gray-200);
  border-bottom: 0.5px solid var(--gray-200);
  margin: 0.3rem 0;
  padding: 0.3rem 0;
}
.dropdown-sub-title {
  display: block;
  padding: 0.25rem 1rem 0.35rem;
  font-size: 11px;
  color: var(--gray-500);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: none;
}
.dropdown-sub-link {
  display: block;
  padding: 0.35rem 1rem 0.35rem 1.8rem;
  font-size: 12px;
  color: var(--gray-600);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.dropdown-sub-link:hover { background: var(--gray-100); color: var(--teal); }
/* mobile dropdown optimization */
@media(max-width:768px){
  .nav-dropdown .dropdown-menu{
    position:static;display:none;box-shadow:none;border:none;
    padding:0;min-width:auto;transform:none;left:auto;border-radius:0;
  }
  .nav-dropdown > .nav-link{cursor:pointer;padding:0.5rem 0;}
  .dropdown-menu a{padding:0.4rem 0.8rem 0.4rem 1.5rem;font-size:13px;}
  .dropdown-sub-links,.dropdown-sub-link{padding:0.35rem 0.8rem 0.35rem 2.2rem;font-size:12px;}
  .dropdown-sub-title{padding-left:1.5rem;}
  .nav-links{max-width:100%;}
}
.nav-toggle { display: none; background: none; border: none; font-size: 20px; cursor: pointer; }
/* ===== 子导航标签栏 ===== */
.sub-menu {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.6rem 0;
  margin-bottom: 1rem;
}
.sub-menu a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 1.1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--teal);
  background: var(--teal-light);
  border: 1px solid rgba(15,110,86,0.12);
  transition: all 0.2s ease;
  cursor: pointer;
  letter-spacing: 0.03em;
}
.sub-menu a:hover {
  background: var(--teal);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(15,110,86,0.2);
}
.sub-menu a.active {
  background: var(--teal);
  color: #fff;
  font-weight: 500;
}
/* Sub-menu icon hint */
.sub-menu a::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}
.sub-menu a:hover::before,
.sub-menu a.active::before {
  opacity: 1;
}

@media(max-width:768px){
  .sub-menu {
    padding: 0.4rem 0;
    gap: 0.4rem;
  }
  .sub-menu a {
    padding: 0.38rem 0.9rem;
    font-size: 0.82rem;
  }
}



/* ===== 英雄区 ===== */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--gray-50);
  padding-top: 2rem;
  padding-bottom: 1rem;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(29,158,117,0.07) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(186,117,23,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 80%, rgba(83,74,183,0.05) 0%, transparent 50%);
}
.hero-content {
  position: relative;
  text-align: center;
  padding: 2rem 2rem 1rem;
  max-width: 800px;
}
.hero-sub {
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--teal-mid);
  margin-bottom: 1rem;
  font-family: var(--serif);
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(52px, 10vw, 96px);
  font-weight: 300;
  color: var(--gray-900);
  letter-spacing: 0.15em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}
.hero-accent {
  color: var(--teal);
  font-weight: 500;
}
.hero-desc {
  font-size: 16px;
  color: var(--gray-500);
  line-height: 1.9;
  margin-bottom: 2.5rem;
  font-family: var(--serif);
  font-weight: 300;
}
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--teal);
  color: #fff;
  border-radius: 40px;
  font-size: 15px;
  font-family: var(--serif);
  transition: all 0.2s;
}
.btn-primary:hover { background: var(--teal-mid); transform: translateY(-1px); }
.btn-ghost {
  display: inline-block;
  padding: 0.75rem 2rem;
  border: 1px solid var(--gray-200);
  color: var(--gray-700);
  border-radius: 40px;
  font-size: 15px;
  font-family: var(--serif);
  transition: all 0.2s;
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.hero-scroll { display: none; }
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray-500);
  font-size: 12px;
  letter-spacing: 0.1em;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--gray-200), transparent);
  animation: scrollPulse 2s infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ===== 通用区块 ===== */
.section { padding: 4rem 0; }
.section-alt { background: var(--gray-50); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-tag {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--teal-mid);
  border: 0.5px solid var(--teal-mid);
  padding: 0.2rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 1rem;
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 500;
  color: var(--gray-900);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}
.section-desc {
  font-size: 15px;
  color: var(--gray-500);
  max-width: 600px;
  margin: 0 auto;
  font-family: var(--serif);
  font-weight: 300;
}

/* ===== 四维度卡片 ===== */
.dimension-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.dimension-card {
  display: block;
  background: #fff;
  border: 0.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.dimension-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  transition: width 0.3s;
}
.dimension-card[data-color="teal"]::before { background: var(--teal); }
.dimension-card[data-color="green"]::before { background: var(--green); }
.dimension-card[data-color="amber"]::before { background: var(--amber-mid); }
.dimension-card[data-color="purple"]::before { background: var(--purple-mid); }
.dimension-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.dimension-card:hover::before { width: 100%; opacity: 0.04; }
.dim-icon {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 300;
  margin-bottom: 1rem;
  line-height: 1;
}
.dimension-card[data-color="teal"] .dim-icon { color: var(--teal); }
.dimension-card[data-color="green"] .dim-icon { color: var(--green); }
.dimension-card[data-color="amber"] .dim-icon { color: var(--amber-mid); }
.dimension-card[data-color="purple"] .dim-icon { color: var(--purple-mid); }
.dim-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 0.25rem;
}
.dim-sub { font-size: 12px; color: var(--gray-500); margin-bottom: 1rem; }
.dim-desc { font-size: 14px; color: var(--gray-700); line-height: 1.8; margin-bottom: 1rem; }
.dim-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.dim-tags span {
  font-size: 11px;
  background: var(--gray-100);
  color: var(--gray-500);
  padding: 0.2rem 0.5rem;
  border-radius: 20px;
}
.dim-arrow { font-size: 18px; color: var(--gray-200); transition: all 0.2s; }
.dimension-card:hover .dim-arrow { color: var(--teal); transform: translateX(4px); }

/* ===== 知修行传 ===== */
.depth-flow {
  max-width: 700px;
  margin: 0 auto;
}
.depth-step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 2rem;
  padding: 2rem;
  background: #fff;
  border: 0.5px solid var(--gray-200);
  border-radius: var(--radius);
  transition: all 0.25s;
}
.depth-step:hover { box-shadow: var(--shadow-md); border-color: var(--teal-light); }
.step-num {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 300;
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.depth-step[data-step="1"] .step-num { color: var(--teal); }
.depth-step[data-step="2"] .step-num { color: var(--green-mid); }
.depth-step[data-step="3"] .step-num { color: var(--amber-mid); }
.depth-step[data-step="4"] .step-num { color: var(--purple-mid); }
.step-content h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.step-content p { font-size: 14px; color: var(--gray-700); margin-bottom: 0.75rem; line-height: 1.8; }
.step-content ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.step-content ul li {
  font-size: 12px;
  background: var(--gray-100);
  color: var(--gray-500);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}
.depth-connector {
  text-align: center;
  font-size: 24px;
  color: var(--gray-200);
  padding: 0.5rem 0;
}

/* ===== 六大茶类 ===== */
.tea-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 900px) { .tea-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .tea-grid { grid-template-columns: 1fr; } }

.tea-card {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 0.5px solid var(--gray-200);
  transition: all 0.25s;
  cursor: pointer;
  background: #fff;
}
.tea-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.tea-color-bar { height: 5px; }
.tea-card[data-tea="green"] .tea-color-bar { background: #639922; }
.tea-card[data-tea="white"] .tea-color-bar { background: #c8c0aa; }
.tea-card[data-tea="yellow"] .tea-color-bar { background: #d4a017; }
.tea-card[data-tea="oolong"] .tea-color-bar { background: #8B4513; }
.tea-card[data-tea="black"] .tea-color-bar { background: #b03a2e; }
.tea-card[data-tea="dark"] .tea-color-bar { background: #4a3728; }
.tea-card-inner { padding: 1.5rem; }
.tea-num {
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
}
.tea-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 0.15rem;
}
.tea-eng { font-size: 11px; color: var(--gray-500); letter-spacing: 0.1em; margin-bottom: 0.5rem; }
.tea-nature {
  font-size: 12px;
  color: var(--teal-mid);
  font-family: var(--serif);
  margin-bottom: 0.75rem;
}
.tea-desc { font-size: 13px; color: var(--gray-700); line-height: 1.8; margin-bottom: 1rem; }
.tea-depth-tags { display: flex; gap: 0.4rem; margin-bottom: 1rem; }
.tea-depth-tags span {
  font-size: 11px;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  font-family: var(--serif);
}
.tag-zhi { background: var(--teal-light); color: var(--teal); }
.tag-xiu { background: var(--green-light); color: var(--green); }
.tag-xing { background: var(--amber-light); color: var(--amber); }
.tag-chuan { background: var(--purple-light); color: var(--purple); }
.tea-enter { font-size: 13px; color: var(--gray-500); transition: color 0.2s; }
.tea-card:hover .tea-enter { color: var(--teal); }

/* ===== CTA 区块 ===== */
.section-cta { text-align: center; }
.cta-box {
  max-width: 600px;
  margin: 0 auto;
  padding: 4rem 2rem;
}
.cta-box h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 1rem;
}
.cta-box p { font-size: 15px; color: var(--gray-500); margin-bottom: 2rem; }

/* ===== 页脚 ===== */
.footer {
  background: var(--gray-900);
  color: #fff;
  padding: 4rem 0 2rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  margin-bottom: 3rem;
}
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr; gap: 2rem; } }
.footer-logo {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--teal-light);
  display: block;
  margin-bottom: 0.75rem;
}
.footer-brand p { font-size: 13px; color: rgba(255,255,255,0.4); }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
@media (max-width: 500px) { .footer-links { grid-template-columns: repeat(2, 1fr); } }
.footer-col h4 {
  font-size: 12px;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1rem;
}
.footer-col a {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--teal-light); }
.footer-bottom {
  padding-top: 2rem;
  border-top: 0.5px solid rgba(255,255,255,0.1);
  text-align: center;
}
.footer-bottom p { font-size: 12px; color: rgba(255,255,255,0.3); }

/* ===== 茶类详情页 ===== */
.tea-hero {
  padding: 8rem 0 4rem;
  text-align: center;
}
.tea-hero-tag {
  font-size: 12px;
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
}
.tea-hero-num {
  font-family: var(--serif);
  font-size: 80px;
  font-weight: 300;
  line-height: 1;
  opacity: 0.12;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  pointer-events: none;
}
.tea-hero-title {
  font-family: var(--serif);
  font-size: clamp(42px, 8vw, 72px);
  font-weight: 300;
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
}
.tea-hero-nature {
  font-size: 14px;
  letter-spacing: 0.2em;
  font-family: var(--serif);
  margin-bottom: 1.5rem;
}
.tea-hero-desc {
  font-size: 15px;
  color: var(--gray-500);
  max-width: 600px;
  margin: 0 auto 2rem;
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.9;
}

/* 深度标签页 */
.depth-tabs {
  display: flex;
  border-bottom: 0.5px solid var(--gray-200);
  margin-bottom: 3rem;
  overflow-x: auto;
}
.depth-tab {
  padding: 1rem 2rem;
  font-size: 15px;
  font-family: var(--serif);
  color: var(--gray-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.2s;
}
.depth-tab.active { color: var(--teal); border-bottom-color: var(--teal); }
.depth-panel { display: none; }
.depth-panel.active { display: block; }

/* 内容卡片 */
.content-card {
  background: #fff;
  border: 0.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.content-card h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 1rem;
  color: var(--gray-900);
}
.content-card p { font-size: 14px; color: var(--gray-700); line-height: 1.9; margin-bottom: 0.75rem; }
.content-card ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.content-card ul li {
  font-size: 13px;
  color: var(--gray-700);
  padding: 0.5rem 0.75rem;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  border: 0.5px solid var(--gray-200);
}
.content-card ul li::before { content: '·'; margin-right: 0.5rem; color: var(--teal); }

/* 修习地图 */
.map-grid {
  display: grid;
  grid-template-columns: 120px repeat(4, 1fr);
  gap: 0;
  border: 0.5px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}
.map-header {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 500;
  padding: 1rem;
  text-align: center;
  background: var(--gray-900);
  color: #fff;
  border-right: 0.5px solid rgba(255,255,255,0.1);
}
.map-row-label {
  padding: 1.5rem 1rem;
  background: var(--gray-100);
  border-right: 0.5px solid var(--gray-200);
  border-top: 0.5px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}
.map-row-label .row-char {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 300;
}
.map-row-label .row-name { font-size: 11px; color: var(--gray-500); }
.map-cell {
  padding: 1rem;
  border-right: 0.5px solid var(--gray-200);
  border-top: 0.5px solid var(--gray-200);
  font-size: 12px;
  color: var(--gray-700);
  transition: background 0.2s;
  cursor: pointer;
}
.map-cell:hover { background: var(--teal-light); }
.map-cell .cell-title { font-weight: 500; margin-bottom: 0.35rem; font-family: var(--serif); font-size: 13px; }
.map-cell .cell-desc { color: var(--gray-500); line-height: 1.5; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .dimension-grid { grid-template-columns: 1fr; }
  .depth-step { grid-template-columns: 60px 1fr; }
  .step-num { font-size: 36px; }
}

/* ===== 动画 ===== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 茶道/维度页面 ===== */
.dim-hero {
  padding: 8rem 0 4rem;
  text-align: center;
  position: relative;
}
.dim-hero-char {
  font-family: var(--serif);
  font-size: 120px;
  font-weight: 300;
  opacity: 0.06;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-55%);
  pointer-events: none;
  line-height: 1;
}
.dim-hero-title {
  font-family: var(--serif);
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 300;
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
}
.dim-hero-sub { font-size: 14px; color: var(--teal-mid); letter-spacing: 0.2em; margin-bottom: 1.5rem; }
.dim-hero-desc {
  font-size: 15px;
  color: var(--gray-500);
  max-width: 600px;
  margin: 0 auto;
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.9;
}

/* ===== 会员系统 ===== */
.nav-member-btn {
  color: var(--coral) !important;
  font-weight: 500;
}
.dropdown-right {
  right: 0;
  left: auto;
}

/* 升级遮罩 */
#member-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}
.member-overlay-bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}
.member-overlay-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: memberSlideUp 0.4s ease;
}
@keyframes memberSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.member-overlay-icon { font-size: 3rem; margin-bottom: 1rem; }
.member-overlay-card h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}
.member-overlay-desc {
  font-size: 0.9rem;
  color: var(--gray-500);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
.member-overlay-price {
  margin-bottom: 0.5rem;
}
.member-price-symbol { font-size: 1.2rem; color: var(--coral); vertical-align: top; }
.member-price-num { font-size: 2.8rem; font-weight: 700; color: var(--coral); font-family: var(--serif); }
.member-price-unit { font-size: 0.9rem; color: var(--gray-500); }
.member-overlay-benefits {
  font-size: 0.82rem;
  color: var(--teal-mid);
  margin-bottom: 1.5rem;
}
.member-btn {
  display: inline-block;
  padding: 0.7rem 2rem;
  border-radius: 8px;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.25s;
  font-family: var(--sans);
}
.member-btn-primary {
  background: var(--coral);
  color: #fff;
}
.member-btn-primary:hover { background: #b84522; transform: translateY(-1px); }
.member-btn-ghost {
  background: none;
  color: var(--gray-500);
  margin-left: 0.8rem;
}
.member-btn-ghost:hover { color: var(--gray-900); }
.member-btn-full {
  width: 100%;
  padding: 0.85rem;
  font-size: 1rem;
  margin-top: 0.5rem;
}

/* 弹窗 */
#member-modal {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
}
.member-modal-bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}
.member-modal-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  max-width: 420px;
  width: 92%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: memberSlideUp 0.35s ease;
}
.member-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--gray-100);
  font-size: 1rem;
  color: var(--gray-500);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.member-modal-close:hover { background: var(--gray-200); color: var(--gray-900); }

/* Tab */
.member-tabs {
  display: flex;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 1.5rem;
}
.member-tab {
  flex: 1;
  padding: 0.7rem;
  border: none;
  background: none;
  font-size: 0.95rem;
  color: var(--gray-500);
  cursor: pointer;
  font-family: var(--sans);
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.member-tab.active {
  color: var(--coral);
  border-bottom-color: var(--coral);
  font-weight: 500;
}

/* 表单 */
.member-form { display: none; }
.member-form.active { display: block; }
.member-form-tip {
  font-size: 0.82rem;
  color: var(--gray-500);
  margin-bottom: 1rem;
}
.member-field {
  margin-bottom: 1rem;
}
.member-field label {
  display: block;
  font-size: 0.85rem;
  color: var(--gray-700);
  margin-bottom: 0.35rem;
  font-weight: 500;
}
.member-required { color: var(--coral); }
.member-field input[type="text"],
.member-field input[type="tel"] {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: var(--sans);
  transition: border-color 0.2s;
  background: var(--gray-50);
}
.member-field input:focus {
  outline: none;
  border-color: var(--coral);
  background: #fff;
}
.member-code-row {
  display: flex;
  gap: 0.5rem;
}
.member-code-row input {
  flex: 1;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: var(--sans);
  background: var(--gray-50);
}
.member-code-row input:focus { outline: none; border-color: var(--coral); }
.member-code-btn {
  white-space: nowrap;
  padding: 0.7rem 1rem;
  border: 1px solid var(--coral);
  background: #fff;
  color: var(--coral);
  border-radius: 8px;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: var(--sans);
  transition: all 0.2s;
}
.member-code-btn:hover { background: #fdf2ef; }
.member-code-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* 支付页 */
.member-payment-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--gray-700);
}
.member-payment-back {
  border: none;
  background: none;
  color: var(--teal);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
  margin-right: 1rem;
  font-family: var(--sans);
}
.member-payment-info {
  text-align: center;
  padding: 1rem 0;
}
.member-payment-info p { font-size: 0.9rem; color: var(--gray-700); margin-bottom: 0.3rem; }
.member-payment-amount {
  font-size: 2rem !important;
  font-weight: 700;
  color: var(--coral) !important;
  font-family: var(--serif);
}
.member-payment-qr { text-align: center; padding: 1rem 0; }
.member-payment-qr-tip { font-size: 0.85rem; color: var(--gray-500); margin-bottom: 1rem; }
.member-qr-box {
  display: inline-block;
  padding: 0.8rem;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  background: #fff;
}
.member-payment-notice {
  font-size: 0.8rem;
  color: var(--amber);
  text-align: center;
  line-height: 1.6;
  margin: 1rem 0;
}
.member-payment-contact {
  font-size: 0.78rem;
  color: var(--gray-500);
  text-align: center;
  margin-top: 0.8rem;
}

/* Toast */
.member-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-900);
  color: #fff;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  z-index: 300;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  white-space: nowrap;
}
.member-toast.show { opacity: 1; }

/* 会员中心页 */
.member-hero {
  padding: 8rem 2rem 3rem;
  text-align: center;
  background: linear-gradient(to bottom, #fdf2ef, #fff);
}
.member-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}
.member-hero .member-sub { color: var(--gray-500); font-size: 0.95rem; }
.member-card {
  max-width: 680px;
  margin: 2rem auto;
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}
.member-card h2 {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--gray-900);
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--gray-200);
}
.member-info-row {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  font-size: 0.92rem;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
}
.member-info-row .label { color: var(--gray-500); }
.member-info-row .value { font-weight: 500; }
.member-badge {
  display: inline-block;
  padding: 0.15rem 0.7rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
}
.member-badge.active { background: #e6f7ed; color: #1a7d3a; }
.member-badge.expired { background: #fdf2ef; color: var(--coral); }
.member-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: center;
}
@media (max-width: 640px) {
  .member-overlay-card { padding: 2rem 1.5rem; }
  .member-modal-card { padding: 1.5rem; }
  .member-btn { padding: 0.6rem 1.5rem; }
  .member-btn-ghost { margin-left: 0.5rem; }
}

/* ========== 积分系统 ========== */

/* 完成阅读区域 */
.points-read-section {
  max-width: 860px;
  margin: 3rem auto 1.5rem;
  padding: 0 1.5rem;
  text-align: center;
}
.points-read-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 2.2rem;
  background: linear-gradient(135deg, #c9a86e, #a8864f);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-family: var(--serif);
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(168, 134, 79, 0.3);
}
.points-read-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(83, 74, 183, 0.35);
}
.points-read-btn:active { transform: translateY(0); }
.points-read-icon { font-size: 1.2rem; }
.points-read-hint {
  font-size: 0.75rem;
  color: #ccc;
  margin-top: 0.6rem;
}
.points-read-done {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 2rem;
  background: #e6f7ed;
  color: #1a7d3a;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.4s;
}
.points-read-animate { animation: pointsPulse 0.6s ease; }
@keyframes pointsPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}
.points-read-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #1a7d3a;
  color: #fff;
  border-radius: 50%;
  font-size: 0.75rem;
}
.points-read-total {
  font-size: 0.8rem;
  color: #1a7d3a;
  opacity: 0.7;
}

/* 飞入动画 */
.points-popup {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  font-size: 2rem;
  font-weight: 700;
  color: #534AB7;
  right: 40px;
  bottom: 120px;
  opacity: 0;
  transform: translateY(0);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.points-popup.fly {
  opacity: 1;
  transform: translateY(-60px);
}

/* 登录提示 */
.points-login-prompt {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.points-login-prompt::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
}
.points-login-prompt-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  max-width: 380px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.12);
}
.points-login-prompt-icon { font-size: 3rem; margin-bottom: 1rem; }
.points-login-prompt-card h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--gray-900);
  margin-bottom: 0.8rem;
}
.points-login-prompt-card p {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}
.points-login-prompt-actions {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
}

/* Toast */
.points-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-900);
  color: #fff;
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  font-size: 0.85rem;
  z-index: 300;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  white-space: nowrap;
}
.points-toast.show { opacity: 1; }

/* 徽章弹出 */
.points-badge-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #fdf8f0, #fffdf5);
  border: 2px solid #c9a96e;
  border-radius: 16px;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 300;
  opacity: 0;
  transition: all 0.5s;
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}
.points-badge-toast.show { opacity: 1; }
.points-badge-toast-emoji { font-size: 2.5rem; }
.points-badge-toast strong {
  display: block;
  font-family: var(--serif);
  font-size: 1rem;
  color: #5c3a28;
  margin-bottom: 0.2rem;
}
.points-badge-toast p {
  font-size: 0.78rem;
  color: #999;
  margin: 0;
}

/* 导航栏积分 */
.nav-points {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #EF9F27 !important;
  font-weight: 500;
}
.nav-points-icon { font-size: 0.8rem; }

/* ===== Unified Breadcrumb ===== */
.crumb{max-width:860px;margin:0 auto;padding:0.8rem 1.5rem;font-size:0.82rem;
  color:#999;letter-spacing:0.03em;display:flex;align-items:center;flex-wrap:wrap;
  gap:0.1rem;}
.crumb a{color:#8b7d6b;text-decoration:none;transition:color 0.2s;}
.crumb a:hover{color:#3d3d38;}
.crumb-sep{margin:0 0.35rem;color:#ddd;}
.crumb-current{color:#666;font-weight:500;}

/* ================================================================
   微信生态 & 触摸设备优化层
   ================================================================ */

/* --- 全局触摸优化 --- */
html {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

/* --- 字体本地化回退 (WeChat Google Fonts 不可用时的保障) --- */
/* 系统中文字体栈，覆盖思源宋体/黑体 */
@font-face {
  font-family: 'Noto Serif SC';
  src: local('Songti SC'), local('STSongti-SC'), local('SimSun'), local('宋体');
  font-display: swap;
  unicode-range: U+4E00-9FFF, U+3400-4DBF, U+3000-303F, U+FF00-FFEF, U+2E80-2EFF, U+31C0-31EF, U+2F00-2FDF, U+2FF0-2FFF, U+3100-312F, U+31A0-31BF;
}
@font-face {
  font-family: 'Noto Sans SC';
  src: local('PingFang SC'), local('PingFangSC-Regular'), local('Microsoft YaHei'), local('微软雅黑');
  font-display: swap;
  unicode-range: U+4E00-9FFF, U+3400-4DBF, U+3000-303F, U+FF00-FFEF, U+2E80-2EFF, U+31C0-31EF, U+2F00-2FDF, U+2FF0-2FFF, U+3100-312F, U+31A0-31BF;
}

/* --- 纯触摸设备优化 (无 hover 能力) --- */
@media (hover: none) and (pointer: coarse) {
  /* 导航：用 :active 替代 :hover */
  .nav-link:active { color: var(--teal); }
  .nav-dropdown > .nav-link:active { color: var(--teal); }
  .dropdown-menu a:active { background: var(--gray-100); color: var(--teal); }
  .dropdown-sub-link:active { background: var(--gray-100); color: var(--teal); }
  
  /* 按钮 */
  .btn-primary:active { background: var(--teal-mid); transform: scale(0.97); }
  .btn-ghost:active { border-color: var(--teal); color: var(--teal); }
  
  /* 卡片 */
  .dimension-card:active { transform: scale(0.98); box-shadow: var(--shadow); }
  .dimension-card:active .dim-arrow { color: var(--teal); }
  .tea-card:active { transform: scale(0.98); box-shadow: var(--shadow); }
  .tea-card:active .tea-enter { color: var(--teal); }
  .depth-step:active { box-shadow: var(--shadow-md); border-color: var(--teal-light); }
  
  /* 子导航 */
  .sub-menu a:active { background: var(--teal); color: #fff; }
  
  /* 修习地图 */
  .map-cell:active { background: var(--teal-light); }
  
  /* 页脚 */
  .footer-col a:active { color: var(--teal-light); }
  
  /* 面包屑 */
  .crumb a:active { color: #3d3d38; }
  
  /* 会员按钮 */
  .member-btn-primary:active { background: #b84522; transform: scale(0.97); }
  .member-btn-ghost:active { color: var(--gray-900); }
  .member-modal-close:active { background: var(--gray-200); color: var(--gray-900); }
  .member-code-btn:active { background: #fdf2ef; }
  
  /* 积分按钮 */
  .points-read-btn:active { transform: scale(0.97); }
}

/* --- 精确指针设备 (鼠标/触控板) 增强 hover --- */
@media (hover: hover) and (pointer: fine) {
  /* 移动端导航下拉菜单用 JS 驱动，不依赖 hover */
  /* 桌面端保留原有 hover 行为 */
}

/* --- iOS 安全区域适配 --- */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  body {
    padding-bottom: env(safe-area-inset-bottom);
  }
  .nav {
    padding-top: env(safe-area-inset-top);
  }
  .share-bar {
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }
  .wx-share-dismiss {
    bottom: calc(40px + env(safe-area-inset-bottom));
  }
}

/* --- 移动端字体可读性提升 --- */
@media (max-width: 768px) {
  /* 提升小字体下限 */
  .tea-eng, .tea-num, .dim-sub, .dropdow-sub-title,
  .map-row-label .row-name, .map-cell, .section-tag,
  .hero-sub, .scroll-line-label, .footer-col h4,
  .footer-bottom p {
    font-size: max(12px, 0.8rem);
  }
  
  /* 导航链接 */
  .nav-link { font-size: 14px; }
  .dropdown-menu a { font-size: 14px; }
  .dropdown-sub-link { font-size: 13px; }
  .dropdown-sub-title { font-size: 12px; }
  
  /* 增大触摸目标 (至少 44px) */
  .nav-link, .dropdown-menu a, .dropdown-sub-link,
  .btn-primary, .btn-ghost, .sub-menu a,
  .share-bar-btn, .nav-toggle {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  /* 移动端滚动优化 */
  .depth-tabs { -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .depth-tabs::-webkit-scrollbar { display: none; }
}

/* --- 微信环境特定样式 --- */
.is-wechat {
  /* 微信内隐藏某些不适用元素 */
}
.is-wechat .share-bar { display: none !important; }

/* --- 分享引导动画兼容微信 --- */
@supports (-webkit-overflow-scrolling: touch) {
  .wx-share-overlay {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* ================================================================
   全站搜索栏（固定在导航栏下方）
   ================================================================ */
.search-bar-wrap {
  display: none;
  background: var(--gray-50);
  border-bottom: 0.5px solid #e8e6de;
  padding: 0.5rem 0;
}
.search-bar-wrap.search-loaded { display: block; }

.search-bar-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid #e8e6de;
  border-radius: 10px;
  padding: 0.35rem 0.8rem;
  transition: all 0.2s;
  max-width: 520px;
  margin: 0 auto;
}
.search-bar-inner:focus-within {
  border-color: #BA7517;
  box-shadow: 0 0 0 3px rgba(186,117,23,0.08);
}

.search-icon {
  display: flex;
  align-items: center;
  color: #aaa;
  flex-shrink: 0;
}
.search-bar-inner:focus-within .search-icon {
  color: #BA7517;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.88rem;
  font-family: var(--sans, 'Noto Sans SC', sans-serif);
  color: #3d2b1f;
  background: transparent;
  padding: 0.35rem 0;
  min-width: 0;
}
.search-input::placeholder {
  color: #c5c0b8;
  font-size: 0.82rem;
}

.search-shortcut {
  font-size: 0.68rem;
  color: #ccc;
  background: #f5f3ed;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  border: 0.5px solid #e8e6de;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.search-results {
  display: none;
  position: absolute;
  left: 2rem;
  right: 2rem;
  top: 100%;
  background: #fff;
  border: 1px solid #e8e6de;
  border-top: none;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
  max-height: 420px;
  overflow-y: auto;
  z-index: 1002;
}
.search-results.active {
  display: block;
}

.search-result-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem 1rem;
  text-decoration: none;
  border-bottom: 0.5px solid #f5f3ed;
  transition: background 0.15s;
  cursor: pointer;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover,
.search-result-item.selected {
  background: rgba(186,117,23,0.04);
}

.search-result-title {
  font-family: var(--serif, 'Noto Serif SC', serif);
  font-size: 0.92rem;
  color: #3d2b1f;
  font-weight: 500;
  letter-spacing: 0.03em;
}
.search-result-cat {
  font-size: 0.7rem;
  color: #BA7517;
  letter-spacing: 0.04em;
}
.search-result-desc {
  font-size: 0.75rem;
  color: #999;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: #aaa;
  font-size: 0.85rem;
}

mark.search-hl {
  background: rgba(186,117,23,0.15);
  color: #BA7517;
  padding: 0 2px;
  border-radius: 2px;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .search-bar-wrap {
    padding: 0.3rem 1rem;
  }
  .search-shortcut { display: none; }
  .search-results {
    left: 1rem;
    right: 1rem;
    max-height: 320px;
  }
  .search-result-item { padding: 0.6rem 0.8rem; }
  .search-result-title { font-size: 0.85rem; }
}
