/* ============================================================
   轩然郁离 · 水墨国风主题
   配色：宣纸白 · 浓墨黑 · 淡墨灰 · 朱砂红点缀
   字体：楷体/思源宋体（国内可用）
   动效：墨晕 · 飞墨 · 笔触
   ============================================================ */
/* ── Fonts ── */
/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  /* 水墨色板 */
  --bg: #F5F0E8;
  --bg-alt: #EDE8DD;
  --surface: #FAF6F0;
  --border: #D8D0C0;
  --text: #1A1A1A;
  --text-secondary: #555555;
  --text-muted: #8A8880;
  --accent: #C04040;
  --accent-light: #D06060;
  --accent-bg: rgba(192,64,64,.06);
  --radius: 12px;
  --max-w: min(92%, 1400px);
  --shadow: 0 1px 3px rgba(0,0,0,.06);
  --shadow-lg: 0 4px 20px rgba(0,0,0,.06);
  /* 水墨专用 */
  --ink-deep: #1A1A1A;
  --ink-mid: #555555;
  --ink-light: #8A8880;
  --ink-wash: #C8C0B0;
  --paper: #F5F0E8;
  --paper-dark: #EDE8DD;
  --seal-red: #C04040;
}
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body {
  font-family: "Noto Serif SC", "KaiTi", "楷体", "STKaiti", serif;
  background: var(--paper);
  color: var(--text);
  line-height: 1.8;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  position: relative;
}
/* ── 宣纸纹理 ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(139,119,90,.015) 2px,
      rgba(139,119,90,.015) 3px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 3px,
      rgba(139,119,90,.008) 3px,
      rgba(139,119,90,.008) 4px
    );
}
a {
  color: var(--seal-red);
  text-decoration: none;
  transition: color .3s;
}
a:hover { color: var(--ink-deep); }
::selection {
  background: var(--seal-red);
  color: #fff;
}
/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--ink-wash); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-light); }
/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(245,240,232,.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(200,192,176,.4);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 0 24px;
  height: 64px;
}
/* 印章 Logo */
.logo {
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin-right: 40px;
  color: var(--ink-deep) !important;
  text-decoration: none;
  position: relative;
}
/* 印章边框蚀刻效果 */
.logo:hover {
  opacity: .95;
}
.logo-text {
  font-family: "KaiTi", "楷体", "STKaiti", serif;
  font-size: 1.1rem;
  letter-spacing: 4px;
  color: var(--ink-deep);
  font-weight: 400;
}

/* ── 抽象Logo：雨滴墨晕 ── */
.logo-svg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  transition: transform .4s ease, filter .4s ease;
}
.logo:hover .logo-svg {
  transform: scale(1.08);
  filter: drop-shadow(0 0 3px rgba(192,64,64,.25));
}
.logo-svg ellipse,
.logo-svg path,
.logo-svg circle {
  transition: all .4s ease;
}
.logo:hover .logo-svg ellipse:nth-of-type(1) {
  stroke: var(--seal-red);
  stroke-opacity: 0.9;
}
.logo:hover .logo-svg circle {
  fill: var(--seal-red);
  opacity: 1;
}
/* ── 导航链接 ── */
.nav-links {
  display: flex;
  flex: 1;
  justify-content: space-evenly;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  padding: 6px 16px;
  border-radius: 0;
  font-family: "KaiTi", "楷体", "STKaiti", serif;
  font-size: .88rem;
  color: var(--ink-mid);
  white-space: nowrap;
  transition: all .3s;
  font-weight: 400;
  letter-spacing: 1px;
  position: relative;
  text-decoration: none;
}
/* 悬停 — 墨滴坠入晕散 */
.nav-links a::before {
  content: '';
  position: absolute;
  pointer-events: none;
  width: 6px;
  height: 6px;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, #1A1A1A 0%, rgba(26,26,26,0.85) 50%, transparent 70%);
  border-radius: 50%;
  opacity: 0;
  z-index: 0;
}
.nav-links a:hover::before {
  animation: inkDrop 0.9s ease-out;
}
@keyframes inkDrop {
  0% { top: -10px; left: 50%; width: 6px; height: 6px; opacity: 1; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle,#1A1A1A 0%,rgba(26,26,26,.9) 50%,transparent 70%); }
  18% { top: 42%; left: 50%; width: 8px; height: 5px; transform: translateX(-50%); }
  22% { top: 50%; left: 50%; width: 14px; height: 12px; transform: translate(-50%,-50%); background: radial-gradient(circle,#1A1A1A 0%,rgba(26,26,26,.5) 30%,transparent 70%); }
  38% { top: 50%; left: 50%; width: 34px; height: 30px; transform: translate(-50%,-50%); border-radius: 44% 56% 50% 50%; background: radial-gradient(circle,rgba(26,26,26,.35) 0%,rgba(26,26,26,.1) 45%,transparent 75%); opacity: .7; }
  60% { top: 50%; left: 50%; width: 50px; height: 44px; transform: translate(-50%,-50%); border-radius: 38% 62% 52% 48%/48% 42% 58% 52%; background: radial-gradient(circle,rgba(26,26,26,.12) 0%,rgba(26,26,26,.03) 50%,transparent 75%); opacity: .3; }
  100% { top: 50%; left: 50%; width: 56px; height: 48px; transform: translate(-50%,-50%); opacity: 0; }
}
.nav-links a:hover {
  color: var(--ink-deep);
  background: transparent;
}
/* ── 当前页 — 水墨背景 + 文字加粗提亮 ── */
.nav-links a.active {
  color: var(--seal-red);
  font-weight: 700;
  text-shadow: 0 0 6px rgba(192,64,64,.15);
  background: url('/nav-ink.png') no-repeat;
  background-size: auto 120%;
  background-position: 42% 45%;
  border-radius: 3px;
}
.nav-links a.active::after {
  display: none;
}
.nav-links a.active::before {
  display: none;
}
/* ── 登录按钮 ── */
#navLoginBtn {
  margin-left: auto;
  padding: 6px 18px;
  border-radius: 3px;
  border: 1px solid var(--seal-red);
  color: var(--seal-red) !important;
  font-family: "KaiTi", "楷体", "STKaiti", serif;
  font-size: .82rem;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all .3s;
  background: transparent;
  letter-spacing: 1px;
}
#navLoginBtn:hover {
  background: var(--seal-red);
  color: #fff !important;
}
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--ink-deep);
  font-size: 1.4rem;
  cursor: pointer;
  margin-left: auto;
  padding: 4px 8px;
}
/* ── Hero ── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 25px 24px 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: none;
  background: var(--paper);
}
/* Canvas 墨韵背景 */
#inkCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 0;
}
.hero-content {
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}
.hero-content > div:first-child {
  flex-shrink: 0;
}
.hero-content > div:nth-child(2) {
  flex: 1;
  max-width: 300px;
  min-width: 250px;
}
/* ── 季节图片包装器 ── */
.hero-season-wrap {
  flex: 1 0 300px;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  align-self: center;
}
/* ── 季节动态图 ── */
.hero-season {
  flex: 1 0 300px;
  max-width: 900px;
  margin: 0 40px;
  align-self: center;
  width: auto;
  aspect-ratio: 2 / 1;
  position: relative;
  overflow: hidden;
  pointer-events: none;
}
.hero-season img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}
.hero-deco {
  flex: 0 0 150px;
  margin-left: auto;
  align-self: flex-end;
  position: relative;
  min-width: 0;
  overflow: hidden;
}
.hero-deco img {
  display: block;
  width: 100%;
  height: auto;
}
/* ── 首页毛笔大字 ── */
.hero-title-brush {
  font-family: "KaiTi", "楷体", "STKaiti", serif;
  font-size: clamp(3.5rem, 7vw, 6rem);
  letter-spacing: 12px;
  color: var(--ink-deep);
  line-height: 1.2;
  margin-bottom: 4px;
  font-weight: 400;
  opacity: 0;
  animation: inkReveal 1.2s ease forwards;
}
@keyframes inkReveal {
  0% {
    opacity: 0;
    filter: blur(8px);
    letter-spacing: 30px;
  }
  100% {
    opacity: 1;
    filter: blur(0);
    letter-spacing: 12px;
  }
}
.hero-subtitle-brush {
  font-family: "KaiTi", "楷体", "STKaiti", serif;
  font-size: 1rem;
  letter-spacing: 10px;
  color: var(--ink-light);
  font-weight: 300;
  text-transform: uppercase;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 1s .4s ease forwards;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-subtitle {
  font-family: "KaiTi", "楷体", "STKaiti", serif;
  color: var(--seal-red);
  font-weight: 400;
  font-size: 1.1rem;
  letter-spacing: 4px;
  opacity: 0;
  animation: fadeUp 1s .2s ease forwards;
}
.hero-desc {
  font-size: 1rem;
  color: var(--ink-mid);
  max-width: 480px;
  line-height: 1.8;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 1s .6s ease forwards;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 1s .8s ease forwards;
}

/* ── 季节指示器 ── */
.season-indicator {
  margin-top: 0;
  position: relative;
  top: 4px;
  align-self: center;
  display: inline-block;
  font-family: "KaiTi", "楷体", "STKaiti", serif;
  font-size: .95rem;
  color: var(--seal-red);
  letter-spacing: 2px;
  padding: 4px 16px;
  border: 1.5px solid var(--seal-red);
  border-radius: 2px;
  transform: rotate(-0.8deg);
  opacity: 0;
  animation: fadeUp 1s 1s ease forwards;
  position: relative;
}
.season-indicator::before {
  content: "轩然郁离";
  position: absolute;
  font-size: .55rem;
  color: var(--seal-red);
  opacity: 0.2;
  letter-spacing: 1px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-0.8deg);
  pointer-events: none;
}
/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 28px;
  border-radius: 3px;
  font-family: "KaiTi", "楷体", "STKaiti", serif;
  font-size: .88rem;
  font-weight: 400;
  cursor: pointer;
  transition: all .3s;
  border: none;
  letter-spacing: 2px;
}
.btn-primary {
  background: var(--seal-red);
  color: #fff !important;
  border: 1px solid var(--seal-red);
}
.btn-primary:hover {
  background: #A03030;
  border-color: #A03030;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(192,64,64,.25);
}
.btn-secondary {
  background: transparent;
  color: var(--ink-deep) !important;
  border: 1px solid var(--ink-wash);
  box-shadow: none;
}
.btn-secondary:hover {
  border-color: var(--ink-mid);
  background: rgba(26,26,26,.03);
  box-shadow: none;
}
/* ── 首页印章 SVG ── */
.hero-seal {
  width: 140px;
  height: 140px;
  opacity: 0;
  animation: sealReveal 1.5s .3s ease forwards;
}
@keyframes sealReveal {
  0% { opacity: 0; transform: scale(.6) rotate(-8deg); }
  60% { transform: scale(1.05) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
/* ── 墨韵浮动粒子（飞墨） ── */
.ink-particle {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  background: rgba(26,26,26,.06);
  z-index: -1;
  animation: floatParticle linear infinite;
}
@keyframes floatParticle {
  0% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: .4;
  }
  50% {
    opacity: .2;
  }
  100% {
    transform: translateY(-100vh) translateX(80px) scale(.3);
    opacity: 0;
  }
}
/* ── Sections ── */
.section {
  padding: 80px 24px;
  position: relative;
}
.section-alt {
  background: var(--paper-dark);
}
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.section-title {
  font-family: "KaiTi", "楷体", "STKaiti", serif;
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 36px;
  color: var(--ink-deep);
  letter-spacing: 4px;
  position: relative;
  display: inline-block;
}
/* 标题朱砂点缀 */
.section-title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--seal-red);
  opacity: .6;
  border-radius: 1px;
}
/* ── Cards ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: .82rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.footer a {
  color: var(--text-muted);
}
.footer a:hover {
  color: var(--seal-red);
}

/* ── 返回顶部按钮 ── */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 90px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--seal-red);
  color: #fff;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 999;
  box-shadow: 0 2px 12px rgba(192,64,64,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .3s, transform .3s;
  opacity: 0;
  pointer-events: none;
  line-height: 1;
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}
.back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(192,64,64,.4);
}

/* ── 子页面内容居中 ── */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 90px 28px 60px;
}
.page-full {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 90px 24px 60px;
}

/* ── 修复导航固定定位导致的遮挡 ── */
body {
  padding-top: 64px;
}

/* ── Tools 工具页 ── */
.tabs-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
.tab-btn {
  padding: 8px 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink-mid);
  font-family: "KaiTi","楷体","STKaiti",serif;
  font-size: .88rem;
  letter-spacing: 1px;
  cursor: pointer;
  border-radius: 6px;
  transition: all .25s;
}
.tab-btn:hover {
  border-color: var(--seal-red);
  color: var(--seal-red);
  background: var(--accent-bg);
}
.tab-btn.active {
  background: var(--seal-red);
  color: #fff;
  border-color: var(--seal-red);
}
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow .25s;
}
.tool-card:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.tool-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
  transition: background .2s;
}
.tool-head:hover {
  background: rgba(192,64,64,.04);
}
.tool-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-bg);
  border: 1px solid rgba(192,64,64,.15);
  border-radius: 6px;
  font-family: monospace;
  font-size: .75rem;
  font-weight: 600;
  color: var(--seal-red);
  flex-shrink: 0;
}
.tool-name {
  flex: 1;
  font-family: "KaiTi","楷体","STKaiti",serif;
  font-size: .95rem;
  letter-spacing: 1px;
  color: var(--ink-deep);
}
.tool-arrow {
  font-size: .7rem;
  color: var(--ink-light);
  transition: transform .25s;
}
.tool-body {
  padding: 0 16px 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .35s ease;
}
.tool-body.open {
  max-height: 500px;
  padding: 0 16px 16px;
}
.tool-body textarea,
.tool-body input[type="text"],
.tool-body input[type="number"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .82rem;
  background: var(--paper);
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}
.tool-body textarea:focus,
.tool-body input:focus {
  border-color: var(--seal-red);
  box-shadow: 0 0 0 2px var(--accent-bg);
}

/* ── 子页面副标题区域 ── */
.page-header {
  text-align: center;
  margin-bottom: 36px;
  padding-top: 10px;
}
.page-header h1 {
  font-family: "KaiTi", "楷体", "STKaiti", serif;
  font-size: 2rem;
  font-weight: 400;
  color: var(--ink-deep);
  letter-spacing: 6px;
  margin-bottom: 8px;
}
.page-header p {
  font-size: .88rem;
  color: var(--ink-light);
  letter-spacing: 2px;
}
@media (max-width: 768px) {
  .page {
    padding: 16px 16px 40px;
  }
}

/* ============================================================
   Mobile Responsive — 适配手机端不同比例尺寸
   ============================================================ */

/* ── 汉堡菜单按钮（全局） ── */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--ink-deep);
  font-size: 1.5rem;
  cursor: pointer;
  margin-left: auto;
  padding: 6px 8px;
  z-index: 1001;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }
}

/* ── 手机端导航下拉菜单 ── */
@media (max-width: 768px) {
  .nav-inner {
    padding: 0 16px;
    height: 56px;
  }

  .logo-svg {
    width: 36px;
    height: 36px;
  }

  .nav-links {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: rgba(245,240,232,.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(200,192,176,.3);
    flex-direction: column;
    padding: 8px 0;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease, padding .35s ease;
    justify-content: flex-start;
    z-index: 999;
  }

  .nav-links.open {
    max-height: 480px;
    padding: 8px 0 16px;
  }

  .nav-links a {
    display: block;
    padding: 10px 24px;
    font-size: .92rem;
    border-radius: 0;
    letter-spacing: 2px;
    width: 100%;
    text-align: left;
    border-bottom: 1px solid rgba(200,192,176,.15);
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .nav-links a.active {
    background: var(--accent-bg);
    border-radius: 0;
    background-size: auto 100%;
  }

  .nav-links a::before {
    display: none;
  }

  /* 手机端登录按钮隐藏，移到菜单内 */
  #navLoginBtn {
    display: none !important;
  }

  #navMobileLogin {
    display: block !important;
    color: var(--seal-red) !important;
    font-weight: 500;
  }

  /* 防止body内容被固定导航遮挡 */
  body {
    padding-top: 56px;
  }

  .page, .page-full {
    padding-left: 16px;
    padding-right: 16px;
    padding-top: 72px;
  }
}

/* ── 平板导航微调 ── */
@media (min-width: 769px) and (max-width: 1024px) {
  .nav-inner {
    padding: 0 20px;
  }
  .nav-links a {
    padding: 6px 10px;
    font-size: .82rem;
  }
}

/* ── Hero 移动端 ── */
@media (max-width: 768px) {
  .hero {
    padding: 16px 16px 24px;
  }

  .hero-content {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .hero-content > div:first-child {
    order: -1;
  }

  .hero-seal {
    width: 100px !important;
    height: 125px !important;
  }

  .hero-content > div:nth-child(2) {
    flex: none;
    max-width: 100%;
    min-width: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-title-brush {
    font-size: clamp(2.8rem, 12vw, 4rem);
    letter-spacing: 8px;
  }

  .hero-subtitle-brush {
    font-size: .85rem;
    letter-spacing: 6px;
  }

  .hero-subtitle {
    font-size: .95rem;
  }

  .hero-desc {
    font-size: .88rem;
    max-width: 100%;
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-actions .btn {
    padding: 8px 20px;
    font-size: .82rem;
  }

  /* 季节指示器 — 手机端居中 */
  .season-indicator {
    align-self: center;
    margin-top: 0;
  }

  /* 季节图片包装 — 手机端全宽 */
  .hero-season-wrap {
    width: 100%;
    max-width: 100%;
    align-items: center;
    margin: 4px 0;
  }

  /* 季节图片 — 手机端用比例自适应 */
  .hero-season {
    flex: 0 0 auto;
    max-width: 100%;
    width: 100%;
    margin: 0;
  }

  .hero-season img {
    object-fit: contain;
  }

  /* 远山装饰 — 手机端隐藏或缩小 */
  .hero-deco {
    display: none;
  }
}

@media (max-width: 414px) {
  .hero-season-wrap {
    margin: 2px 0;
  }

  .hero-seal {
    width: 80px !important;
    height: 100px !important;
  }
}

@media (max-width: 374px) {
  .hero-season-wrap {
    margin: 0;
  }

  .hero-title-brush {
    font-size: 2.2rem;
    letter-spacing: 4px;
  }

  .hero-seal {
    width: 64px !important;
    height: 80px !important;
  }
}

/* ── Sections 移动端 ── */
@media (max-width: 768px) {
  .section {
    padding: 48px 16px;
  }

  .section-title {
    font-size: 1.25rem;
    margin-bottom: 24px;
  }
}

@media (max-width: 414px) {
  .section {
    padding: 36px 14px;
  }
}

/* ── Cards 移动端 ── */
@media (max-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .card {
    padding: 20px;
  }
}

/* ── Tool Grid 移动端 ── */
@media (max-width: 768px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .tool-card .tool-head {
    padding: 12px 14px;
  }

  .tool-body {
    padding: 0 14px 0;
  }

  .tool-body.open {
    padding: 0 14px 14px;
  }

  .tabs-bar {
    gap: 4px;
    padding-bottom: 8px;
  }

  .tab-btn {
    padding: 6px 14px;
    font-size: .8rem;
  }
}

/* ── Gallery 移动端 ── */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
    gap: 10px;
  }

  .gallery-item .thumb {
    height: 130px;
  }

  .gallery-item .info {
    padding: 8px 10px;
  }

  .gallery-item .fname {
    font-size: 1rem;
  }

  .gallery-item .actions button {
    padding: 6px 10px;
    font-size: .72rem;
    min-height: 32px;
  }
}

@media (max-width: 414px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
  }

  .gallery-item .thumb {
    height: 110px;
  }
}

/* ── Blog 移动端 ── */
@media (max-width: 768px) {
  .blog-post {
    padding: 16px 18px !important;
  }

  .blog-post .title {
    font-size: 1rem;
  }

  .blog-post .content {
    font-size: .85rem;
  }

  .blog-post .content h1 { font-size: 1.2rem; }
  .blog-post .content h2 { font-size: 1.1rem; }
  .blog-post .content h3 { font-size: 1rem; }
  .blog-post .content pre {
    padding: 10px 12px;
    font-size: .78rem;
  }

  .blog-post-actions {
    flex-wrap: wrap;
  }

  .blog-post-actions button {
    padding: 8px 14px;
    min-height: 36px;
    font-size: .78rem;
  }

  .comment-box {
    padding: 16px;
  }

  .search-bar input {
    min-width: 150px;
    padding: 10px 12px;
    font-size: .85rem;
  }
}

@media (max-width: 414px) {
  #postList {
    grid-template-columns: 1fr !important;
  }

  .blog-post .content img {
    border-radius: 6px;
  }

  .blog-post .content code {
    font-size: .8em;
  }
}

/* ── Documents / Articles 移动端 ── */
@media (max-width: 768px) {
  .doc-grid {
    grid-template-columns: 1fr !important;
  }

  .doc-item {
    padding: 14px 16px;
  }

  .text-item {
    padding: 14px 16px;
  }
}

/* ── 用户管理表格 移动端 ── */
@media (max-width: 768px) {
  /* 表格外层包容器用水平滚动 */
  .user-table {
    font-size: .78rem;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  .user-table th,
  .user-table td {
    padding: 8px 10px;
    white-space: nowrap;
    min-width: 80px;
  }

  .form-card {
    padding: 16px;
    max-width: 100%;
  }

  .modal-box {
    width: 92vw !important;
    padding: 20px !important;
  }
}

/* ── Profile 移动端 ── */
@media (max-width: 768px) {
  .profile-card {
    padding: 20px 16px;
  }
}

/* ── Login 移动端 ── */
@media (max-width: 768px) {
  .login-page {
    padding: 16px !important;
  }

  .login-card {
    padding: 24px 20px !important;
    max-width: 100% !important;
  }

  .login-card .tab-bar .tab {
    padding: 8px 0;
    font-size: .85rem;
  }

  .form-group input {
    padding: 12px 14px;
    font-size: 16px !important; /* 防止iOS自动缩放 */
  }

  .form-group button.btn {
    padding: 12px 20px;
    min-height: 44px;
  }
}

/* ── Footer 移动端 ── */
@media (max-width: 768px) {
  .footer {
    padding: 28px 16px;
    font-size: .75rem;
  }
}

/* ── Back to Top 移动端 ── */
@media (max-width: 768px) {
  .back-to-top {
    right: 16px;
    bottom: 80px;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}

/* ── Chat Widget 移动端 ── */
@media (max-width: 768px) {
  .cw-bubble {
    right: 16px !important;
    bottom: 80px !important;
    width: 48px !important;
    height: 48px !important;
  }

  .cw-window {
    width: calc(100vw - 32px) !important;
    height: 55vh !important;
    right: 16px !important;
    bottom: 80px !important;
  }
}

@media (max-width: 374px) {
  .cw-window {
    width: calc(100vw - 24px) !important;
    right: 12px !important;
  }
}

/* ── 页面标题移动端 ── */
@media (max-width: 768px) {
  .page-header {
    margin-bottom: 24px;
  }

  .page-header h1 {
    font-size: 1.5rem;
    letter-spacing: 4px;
  }
}

/* ── 通用 touch 友好 ── */
@media (hover: none) and (pointer: coarse) {
  /* 触摸设备上增大触摸目标 */
  .nav-links a,
  .tab-btn,
  .btn,
  .tool-head,
  .blog-post,
  .gallery-item,
  .doc-item,
  .text-item {
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(192,64,64,.15);
  }

  .btn {
    min-height: 44px;
  }

  /* 移除悬停效果中不必要的动效 */
  .card:hover,
  .blog-post:hover,
  .gallery-item:hover,
  .doc-item:hover {
    transform: none;
  }
}

/* ── 安全区域适配（iPhone X+ 刘海屏） ── */
@supports (padding: max(0px)) {
  body {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }
}

/* ── 打印样式 ── */
@media print {
  .nav,
  #chat-widget,
  .back-to-top,
  .menu-toggle,
  .cw-bubble,
  .cw-window {
    display: none !important;
  }
  body {
    padding-top: 0 !important;
    background: #fff;
  }
}
