@font-face {
  font-family: "朝华打字机";
  src: url('/fonts/朝华打字机.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "鸿雷板书繁体";
  src: url('/fonts/鸿雷板书繁体.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}



/* 江门五邑情 - 样式表 */
:root {
  --bg: #f4f1ec;
  --text: #1a1a1a;
  --main: #c8690f;
  --gold: #e5a030;
  --red: #CC0000;
  --white: #fff;
  --shadow: 0 8px 32px rgba(0,0,0,0.15);
  --radius: 14px;
  --glass-bg: rgba(255,255,255,0.28);
  --glass-border: 1px solid rgba(255,255,255,0.45);
  --glass-shadow: 0 8px 32px rgba(0,0,0,0.10);
  --blur: blur(14px);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: "朝华打字机", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.wrap {
  width: min(1100px, 92%);
  margin: 0 auto;
}

img {
  max-width: 100%;
  display: block;
}

/* ===== 导航 ===== */
.hidden-nav {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.hidden-nav.nav-visible {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.82);
  border-bottom: 1px solid rgba(226,221,212,0.6);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  transition: box-shadow 0.3s;
}

.topbar.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
}

.nav {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #7a3a06;
}

.logo span {
  color: var(--gold);
}

nav a {
  margin-left: 20px;
  text-decoration: none;
  color: #444;
  font-size: 15px;
  font-weight: 600;
  transition: color 0.2s;
}

nav a:hover {
  color: var(--main);
}

nav a.active {
  color: var(--main);
}

nav {
  display: flex;
  align-items: center;
}
/* 侧边菜单 */
.side-menu {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.side-menu a {
  background: var(--glass-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: var(--glass-border);
  border-radius: 20px;
  padding: 11px 22px;
  text-decoration: none;
  color: #555;
  font-size: 15px;
  transition: all 0.2s;
  white-space: nowrap;
}

.side-menu a:hover,
.side-menu a.active {
  color: var(--main);
  border-color: rgba(200,105,15,0.4);
  background: rgba(255,245,236,0.7);
}

/* ===== Hero ===== */
.hero-wrapper {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-back {
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.bg2 {
  background-image:
    linear-gradient(135deg, rgba(0,15,60,0.55) 0%, rgba(0,0,0,0.3) 100%),
    url("/images/academician-bg.png");
}

.hero-front {
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bg-half {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background-size: cover;
  background-position: center;
  transition: transform 0.85s cubic-bezier(0.77, 0, 0.18, 1);
  will-change: transform;
}

.bg1 {
  background-image:
    linear-gradient(135deg, rgba(80,30,0,0.5) 0%, rgba(0,0,0,0.25) 100%),
    url("/images/jiangmen-river-bg.png");
}

.bg-left {
  left: 0;
}

.bg-right {
  right: 0;
}

.curtain-open .bg-left {
  transform: translateX(-100%);
}

.curtain-open .bg-right {
  transform: translateX(100%);
}

.hero-content {
  position: relative;
  z-index: 12;
  color: var(--white);
  text-shadow: 0 3px 16px rgba(0,0,0,0.55);
  padding: 60px 24px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.content-front,
.content-back {
  position: relative;
  z-index: 13;
}

.content-front {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.curtain-open .content-front {
  opacity: 0;
  transform: translateY(-70px);
}

.content-back {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.55s ease 0.4s, transform 0.55s ease 0.4s;
}

.curtain-open .content-back {
  opacity: 1;
  transform: translateY(0);
}

/* 轮播点 */
.slide-dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  flex-direction: row;
  gap: 12px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.dot.active {
  background: #fff;
  transform: scale(1.5);
}

/* Hero 文字 */
.big-question {
  font-size: clamp(38px, 8vw, 108px);
  margin: 0 0 24px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 3px;
}

.big-question .num34 {
  font-size: 1.1em;
  color: var(--gold);
  text-shadow: 0 0 30px rgba(229,160,48,0.8);
}

.hint-scroll {
  font-size: 18px;
  opacity: 0.75;
  margin: 0 0 28px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ===== 毛玻璃按钮 ===== */
.btn {
  display: inline-block;
  background: rgba(200,105,15,0.18);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid rgba(200,105,15,0.35);
  color: #fff;
  padding: 14px 32px;
  border-radius: 40px;
  text-decoration: none;
  font-size: 19px;
  font-weight: 700;
  box-shadow: var(--glass-shadow);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 36px rgba(200,105,15,0.35);
  background: rgba(200,105,15,0.30);
}

/* ===== 问答区 ===== */
.qa-section {
  padding: 80px 0;
}

.qa-block {
  max-width: 820px;
  position: relative;
  padding-left: 40px;
}

.qa-tag {
  position: absolute;
  left: 0;
  top: -4px;
  background: var(--main);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 15px;
}

.qa-block h2 {
  font-size: 30px;
  margin: 0 0 18px;
  color: #222;
}

.qa-block p {
  font-size: 18px;
  line-height: 1.95;
  color: #444;
  margin: 0 0 16px;
}

/* ===== 通用 Section ===== */
.section {
  padding: 90px 0;
  background: #fff;
}

.section.alt {
  background: #f7f3ee;
}

.sec-title {
  font-size: 38px;
  margin: 0 0 12px;
  color: #1a1a1a;
  position: relative;
  display: inline-block;
}

.sec-title::after {
  content: "";
  display: block;
  width: 50px;
  height: 4px;
  background: var(--main);
  border-radius: 2px;
  margin-top: 8px;
}

.sec-sub {
  font-size: 18px;
  color: #666;
  margin: 0 0 44px;
  line-height: 1.7;
}

/* ===== 步骤流程图 ===== */
.flow-wrap {
  max-width: 1000px;
  margin: 36px auto 0;
}

.flow-page {
  display: none;
}
.flow-page.active {
  display: block;
}

.flow-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.flow-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.flow-card {
  background: var(--glass-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1.5px solid rgba(204,0,0,0.25);
  border-radius: 14px;
  padding: 18px 28px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  box-shadow: var(--glass-shadow);
  transition: box-shadow 0.25s, transform 0.25s, background 0.25s;
  width: 340px;
  max-width: 90%;
  position: relative;
}

.flow-card:hover {
  box-shadow: 0 8px 36px rgba(204,0,0,0.18);
  transform: translateY(-3px);
  background: rgba(255,245,245,0.55);
}

.flow-era {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #CC0000;
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.flow-title {
  font-size: 17px;
  font-weight: bold;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.35;
}

/* 展开箭头指示 */
.flow-card::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid #CC0000;
  margin: 10px auto 0;
  transition: transform 0.3s;
}

.flow-node.active .flow-card::after {
  transform: rotate(180deg);
}

/* 连接箭头 */
.flow-arrow {
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 18px solid #CC0000;
  margin: 10px 0;
  position: relative;
}

.flow-arrow::after {
  content: '';
  position: absolute;
  top: -20px;
  left: -10px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 14px solid #fff;
}

/* 最后一个节点不显示箭头 */
.flow-node:last-child .flow-arrow {
  display: none;
}

/* 详情展开区 */
.flow-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  width: 500px;
  max-width: 95%;
  background: rgba(255,255,255,0.65);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1.5px solid rgba(204,0,0,0.15);
  border-top: none;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.08);
  margin-top: -6px;
  margin-bottom: 4px;
}

.flow-node.active .flow-detail {
  max-height: 600px;
}

/* 标签页 - 毛玻璃 */
.flow-tabs {
  display: flex;
  background: rgba(255,255,255,0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 10px 10px 0 0;
  overflow: hidden;
}

.flow-tab {
  flex: 1;
  padding: 10px 0;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: #aa3333;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
  font-family: inherit;
}

.flow-tab:hover {
  background: rgba(204,0,0,0.08);
  color: #CC0000;
}

.flow-tab.active {
  background: rgba(204,0,0,0.13);
  color: #CC0000;
  box-shadow: inset 0 -2px 0 #CC0000;
}

/* 面板 */
.flow-panel {
  display: none;
  padding: 16px 22px 20px;
}

.flow-panel.active {
  display: block;
}

.flow-panel p {
  font-size: 14px;
  line-height: 1.85;
  color: #555;
  margin: 0;
}

.flow-img-placeholder {
  width: 100%;
  height: 160px;
  background: rgba(245,245,245,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 14px;
}

/* 分页按钮 - 毛玻璃 */
.flow-pagination {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
  padding-top: 20px;
}

.flow-page-btn {
  padding: 9px 30px;
  border: 1.5px solid rgba(204,0,0,0.3);
  background: rgba(255,255,255,0.30);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  color: #CC0000;
  font-size: 14px;
  font-weight: 600;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 4px 16px rgba(204,0,0,0.06);
}

.flow-page-btn:hover {
  background: rgba(204,0,0,0.12);
  box-shadow: 0 6px 24px rgba(204,0,0,0.15);
  transform: translateY(-1px);
}

.flow-page-btn.active {
  background: rgba(204,0,0,0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: #fff;
  border-color: rgba(204,0,0,0.6);
  box-shadow: 0 6px 24px rgba(204,0,0,0.25);
}

/* 移动端 */
@media (max-width: 700px) {
  .flow-card {
    width: 90%;
    padding: 14px 18px;
  }
  .flow-detail {
    width: 92%;
  }
}

/* ===== 卡片网格 ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 10px;
}

.card {
  background: rgba(255,255,255,0.65);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: var(--glass-border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--glass-shadow);
  transition: transform 0.25s, box-shadow 0.25s;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.12);
}

.card-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.card h3 {
  font-size: 22px;
  margin: 0 0 4px;
  color: #1a1a1a;
}

.card-tag {
  font-size: 13px;
  color: var(--main);
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: 1px;
}

.card p {
  font-size: 15px;
  line-height: 1.8;
  color: #555;
  margin: 0;
}

/* ===== 名人列表 ===== */
.person-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 10px;
}

.person-card {
  display: flex;
  gap: 0;
  background: rgba(255,255,255,0.70);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: var(--glass-border);
  border-radius: var(--radius);
  box-shadow: 0 4px 18px rgba(0,0,0,0.07);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}

.person-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.11);
}

.person-text {
  flex: 1;
  padding: 28px 28px 28px 32px;
  min-width: 0;
}

.person-text h3 {
  font-size: 24px;
  margin: 0 0 4px;
  color: #1a1a1a;
}

.person-text h3 small {
  font-size: 14px;
  color: #999;
  font-weight: 400;
  margin-left: 8px;
}

.person-text .card-tag {
  margin-bottom: 14px;
}

.person-text p:last-child {
  font-size: 14.5px;
  line-height: 1.9;
  color: #555;
  margin: 0;
}

.person-img {
  flex: 0 0 240px;
  min-height: 200px;
  overflow: hidden;
}

.person-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 700px) {
  .person-card {
    flex-direction: column;
  }
  .person-img {
    flex: unset;
    min-height: 120px;
  }
}

/* ===== 分栏布局 ===== */
.split-row {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  margin-top: 10px;
}

.split-img {
  flex: 0 0 460px;
}

.split-img img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  object-fit: cover;
  max-height: 320px;
}

.split-text {
  flex: 1;
}

.split-text h3 {
  font-size: 22px;
  margin: 0 0 10px;
  color: var(--main);
}

.split-text p {
  font-size: 17px;
  line-height: 1.9;
  color: #444;
  margin: 0 0 20px;
}

/* ===== 标签网格 ===== */
.tag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.tag-card {
  background: rgba(255,255,255,0.65);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: var(--glass-border);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.08);
  transition: transform 0.2s;
}

.tag-card:hover {
  transform: translateY(-4px);
}

.tag-card span {
  font-size: 30px;
  display: block;
  margin-bottom: 10px;
}

.tag-card h4 {
  font-size: 18px;
  margin: 0 0 8px;
  color: #222;
}

.tag-card p {
  font-size: 14px;
  line-height: 1.8;
  color: #555;
  margin: 0;
}

/* ===== 遗产列表 ===== */
.heritage-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 16px;
}

.heritage-item {
  display: flex;
  gap: 24px;
  background: rgba(255,255,255,0.70);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: var(--glass-border);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.07);
}

.heritage-num {
  font-size: 42px;
  font-weight: 900;
  color: #f0e0cc;
  line-height: 1;
  flex-shrink: 0;
  align-self: flex-start;
}

.heritage-body h3 {
  font-size: 20px;
  margin: 0 0 10px;
  color: #1a1a1a;
}

.heritage-body p {
  font-size: 16px;
  line-height: 1.85;
  color: #555;
  margin: 0;
}

/* ===== 景点网格 ===== */
.scenic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
}

.scenic-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s;
  background: rgba(255,255,255,0.65);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: var(--glass-border);
}

.scenic-card:hover {
  transform: translateY(-6px);
}

.scenic-img {
  height: 200px;
  background-size: cover;
  background-position: center;
}

.scenic-info {
  padding: 18px 16px;
  background: rgba(255,255,255,0.5);
}

.scenic-info h3 {
  font-size: 18px;
  margin: 0 0 8px;
  color: #1a1a1a;
}

.scenic-info p {
  font-size: 14px;
  line-height: 1.75;
  color: #555;
  margin: 0;
}

/* ===== 双栏 ===== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 16px;
}

.two-col h3 {
  font-size: 22px;
  color: var(--main);
  margin: 0 0 12px;
}

.two-col p {
  font-size: 17px;
  line-height: 1.9;
  color: #444;
  margin: 0;
}

/* ===== 数据统计 ===== */
.modern-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: center;
  padding: 32px 0;
}

.stat-item {
  text-align: center;
  min-width: 140px;
}

.stat-num {
  display: block;
  font-size: 58px;
  font-weight: 900;
  color: var(--main);
  line-height: 1;
}

.stat-num small {
  font-size: 0.45em;
}

.stat-label {
  display: block;
  font-size: 16px;
  color: #666;
  margin-top: 6px;
}

/* ===== 页脚 ===== */
.footer {
  text-align: center;
  padding: 32px 12px;
  background: #111;
}

.footer a {
  color: #f4b1cf;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
}

/* ===== Reveal 动画 ===== */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 响应式 ===== */
@media (max-width: 960px) {
  .logo {
    font-size: 28px;
  }

  nav {
    display: none;
  }

  .side-menu {
    display: none;
  }

  .split-row {
    flex-direction: column;
  }

  .split-img {
    flex: unset;
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .sec-title {
    font-size: 30px;
  }

  .big-question {
    font-size: clamp(32px, 9vw, 64px);
  }
}

@media (max-width: 600px) {
  .section {
    padding: 60px 0;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .scenic-grid {
    grid-template-columns: 1fr;
  }

  .tag-grid {
    grid-template-columns: 1fr;
  }

  .heritage-item {
    flex-direction: column;
    gap: 8px;
  }

  .heritage-num {
    font-size: 28px;
  }
}

/* ============ 搜索功能样式 ============ */
.search-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  color: inherit;
  display: flex;
  align-items: center;
  opacity: 0.8;
  transition: opacity 0.2s;
  margin-left: auto;
}
.search-btn:hover { opacity: 1; }

.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1900;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.search-overlay.active { display: block; }

.search-modal {
  display: none;
  position: fixed;
  top: 15vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(680px, 92vw);
  z-index: 2000;
  border-radius: 16px;
  background: var(--glass-bg, rgba(255,255,255,0.92));
  border: var(--glass-border, 1px solid rgba(255,255,255,0.5));
  box-shadow: 0 12px 48px rgba(0,0,0,0.22);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
}
.search-modal.active { display: block; }

.search-inner { padding: 20px 24px 16px; }

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 2px solid var(--main, #c8690f);
  padding-bottom: 10px;
}
.search-icon { flex-shrink: 0; color: var(--main, #c8690f); }
.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 18px;
  color: var(--text, #1a1a1a);
  outline: none;
  font-family: inherit;
}
.search-input::placeholder { color: #aaa; }
.search-clear {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 22px;
  color: #aaa;
  line-height: 1;
  padding: 0 4px;
  display: none;
}
.search-clear.show { display: block; }
.search-clear:hover { color: var(--main, #c8690f); }

.search-hint {
  font-size: 12px;
  color: #999;
  margin: 8px 0 4px;
}

.search-results {
  max-height: 55vh;
  overflow-y: auto;
  margin-top: 8px;
}
.search-results::-webkit-scrollbar { width: 4px; }
.search-results::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

.search-result-item {
  padding: 12px 14px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 4px;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.search-result-item:hover,
.search-result-item.focused {
  background: rgba(200,105,15,0.08);
  border-color: rgba(200,105,15,0.25);
}
.search-result-item .sri-section {
  font-size: 11px;
  font-weight: 700;
  color: var(--main, #c8690f);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 4px;
}
.search-result-item .sri-text {
  font-size: 14px;
  color: var(--text, #1a1a1a);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.search-result-item mark {
  background: rgba(229,160,48,0.45);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}
.search-no-result {
  text-align: center;
  color: #aaa;
  padding: 28px 0 20px;
  font-size: 14px;
}

/* 高亮 mark 全局 */
mark.search-hl {
  background: rgba(229,160,48,0.5);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
  outline: 2px solid rgba(229,160,48,0.8);
}
mark.search-hl.current {
  background: rgba(200,105,15,0.55);
  outline-color: var(--main, #c8690f);
}

/* ============ 字体切换样式 ============ */
.font-switcher {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: 18px;
}

.font-toggle-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--glass-bg, rgba(255,255,255,0.85));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: var(--glass-border, 1px solid rgba(255,255,255,0.45));
  border-radius: 20px;
  padding: 5px 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text, #1a1a1a);
  transition: all 0.3s ease;
  white-space: nowrap;
}
.font-toggle-btn:hover {
  background: rgba(255,255,255,0.95);
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
.font-icon {
  font-weight: 700;
  font-size: 14px;
  color: var(--main, #c8690f);
}
.font-arrow {
  transition: transform 0.3s ease;
}
.font-switcher.open .font-arrow {
  transform: rotate(180deg);
}

.font-dropdown {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 140px;
  background: var(--glass-bg, rgba(255,255,255,0.95));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: var(--glass-border, 1px solid rgba(255,255,255,0.5));
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  padding: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.25s ease;
  z-index: 3000;
}
.font-switcher.open .font-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.font-opt {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  color: #444;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}
.font-opt:hover {
  background: rgba(200,105,15,0.08);
  color: var(--main, #c8690f);
}
.font-opt.active {
  background: rgba(200,105,15,0.12);
  color: var(--main, #c8690f);
  font-weight: 600;
}

/* 字体应用类 - 平滑过渡 */
body {
  transition: font-family 0.4s ease;
}
body.font-yahei {
  font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Hiragino Sans GB", sans-serif;
}
body.font-kaiti {
  font-family: "KaiTi", "楷体", "STKaiti", "PingFang SC", serif;
}
body.font-traditional {
  font-family: "朝华打字机", "PingFang TC", "Microsoft JhengHei", "微軟正黑體", "Noto Sans TC", sans-serif;
}
body.font-honglei {
  font-family: "鸿雷板书繁体", "PingFang TC", "Microsoft JhengHei", "微軟正黑體", "Noto Sans TC", sans-serif;
}
