﻿/* ==========================================================================
   河豚互通服 · 官网样式
   零外部依赖；颜色 / 字体 / 间距 / 圆角 / 阴影全部由 CSS 变量管理。
   主题：<html data-theme="dark|light">，浅色为完整的第二套变量映射。

   分区索引：
     01. 主题变量（深色）      02. 主题变量（浅色）
     03. 基础与重置            04. 通用工具
     05. 图标与主题切换        06. 按钮与分段控件
     07. 顶部导航与汉堡菜单    08. Hero
     09. 实时状态面板          10. 区块标题
     11. 特色卡片              12. 统计数字带
     13. 连接区与 QQ 卡片      14. 内容中心（标签 + 分页）
     15. CTA 横幅              16. 页面外壳
     17. 关于页                18. 规则页
     19. 加入页                20. 联系页
     21. 建筑图鉴 + CSS 方块画 22. 灯箱
     23. 留言板                24. 运营日志时间线
     25. 页脚                  26. 回到顶部 / Toast
     27. 动画                  28. 响应式
     29. 无障碍 / 减少动态
   ========================================================================== */

/* 像素字体：Press Start 2P（OFL 开源许可，本地托管）
   仅用于英文/数字点缀（版本徽章、品牌副标题、地址），中文保持系统字体 */
@font-face {
  font-family: 'Press Start 2P';
  src: url('fonts/PressStart2P-Regular.ttf') format('truetype');
  font-display: swap;
}

/* ==========================================================================
   01. 主题变量（深色 · 默认）
   ========================================================================== */
:root {
  /* 品牌主色（绿色系） */
  --green-50:  #eefdf4;
  --green-100: #d6f5e2;
  --green-200: #aae9c3;
  --green-300: #6fd79c;
  --green-400: #3bba72;
  --green-500: #17a35a;
  --green-600: #13894d;
  --green-700: #126e41;
  --green-800: #125736;
  --green-900: #10472e;
  --lime: #c2f24d;

  /* 中性色 */
  --bg: #070d09;
  --bg-soft: #0a1410;
  --surface: #0d1a13;
  --surface-2: #12241a;
  --surface-3: #173021;
  --header-bg: rgba(7, 13, 9, .82);
  --header-bg-scrolled: rgba(7, 13, 9, .95);
  --border: rgba(158, 231, 190, .13);
  --border-strong: rgba(158, 231, 190, .26);
  --inset-line: rgba(7, 13, 9, .55);

  /* 文本 */
  --text: #e9f7ee;
  --text-dim: #a9c8b4;
  --text-faint: #72917f;

  /* 语义色 */
  --danger: #ff6b57;
  --danger-soft: rgba(255, 107, 87, .12);
  --warn: #ffb547;
  --ok: #5be49b;
  --accent-soft: rgba(23, 163, 90, .13);

  /* 字体 */
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, Menlo, monospace;
  --font-pixel: 'Press Start 2P', ui-monospace, monospace;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;

  /* 圆角 */
  --radius-xs: 6px;
  --radius-sm: 9px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* 阴影 */
  --shadow-sm: 0 2px 10px rgba(2, 8, 4, .5);
  --shadow-md: 0 14px 40px rgba(2, 8, 4, .6);
  --shadow-lg: 0 28px 70px rgba(2, 8, 4, .65);
  --shadow-glow: 0 0 0 1px rgba(94, 224, 155, .16), 0 16px 48px rgba(23, 163, 90, .2);

  /* 间距刻度 */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 40px;
  --sp-8: 48px;
  --sp-10: 72px;

  /* 布局 */
  --container: 1180px;
  --header-h: 70px;
  --radius-panel: 18px;

  /* 过渡 */
  --ease: cubic-bezier(.22, .68, .36, 1);
  --t-fast: .18s var(--ease);
  --t-med: .3s var(--ease);
  --t-slow: .55s var(--ease);

  /* 滚动进度条 */
  --progress-a: var(--lime);
  --progress-b: var(--green-400);
}

/* ==========================================================================
   02. 主题变量（浅色）
   ========================================================================== */
[data-theme="light"] {
  --bg: #f4f8f4;
  --bg-soft: #eef4ee;
  --surface: #ffffff;
  --surface-2: #f2f7f2;
  --surface-3: #e7f0e8;
  --header-bg: rgba(255, 255, 255, .82);
  --header-bg-scrolled: rgba(255, 255, 255, .95);
  --border: rgba(16, 71, 46, .13);
  --border-strong: rgba(16, 71, 46, .24);
  --inset-line: rgba(16, 71, 46, .06);

  --text: #0d2418;
  --text-dim: #3f5c4b;
  --text-faint: #6d8a79;

  --danger: #d94a35;
  --danger-soft: rgba(217, 74, 53, .09);
  --warn: #b8730a;
  --ok: #128a4e;
  --accent-soft: rgba(23, 163, 90, .09);
  --lime: #7fae12;

  --shadow-sm: 0 2px 10px rgba(16, 71, 46, .07);
  --shadow-md: 0 14px 36px rgba(16, 71, 46, .1);
  --shadow-lg: 0 28px 64px rgba(16, 71, 46, .14);
  --shadow-glow: 0 0 0 1px rgba(23, 163, 90, .12), 0 14px 40px rgba(23, 163, 90, .12);

  --progress-a: var(--green-500);
  --progress-b: var(--green-300);
}

/* ==========================================================================
   03. 基础与重置
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--t-med), color var(--t-med);
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

/* Minecraft 元素：全站泥土纹理暗铺底图（minecraft.net 官方站手法）。
   固定层置于最底，透明度压到 8%，只提供隐约的像素质感不干扰阅读 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url('images/mc/dirt.png') repeat left top;
  background-size: 56px 56px;
  image-rendering: pixelated;
  opacity: .08;
  pointer-events: none;
}

[data-theme="light"] body::before {
  opacity: .1;
  filter: brightness(1.4) saturate(.8);
}

h1, h2, h3, h4 {
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--text);
  text-wrap: balance;
}

h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); }
h3 { font-size: 1.06rem; }

p { color: var(--text-dim); text-wrap: pretty; }

a {
  color: var(--green-300);
  text-decoration: none;
  transition: color var(--t-fast);
}

[data-theme="light"] a { color: var(--green-600); }

a:hover { color: var(--green-500); }

[data-theme="light"] a:hover { color: var(--green-700); }

/* 主按钮内的链接文字必须保持白色（覆盖上面的 a:hover） */
.btn--primary:hover,
.btn--primary:visited,
.btn--primary:link { color: #fff; }

ul, ol { list-style: none; }

img, svg { max-width: 100%; vertical-align: middle; }

code {
  font-family: var(--font-mono);
  font-size: .92em;
  background: rgba(194, 242, 77, .1);
  color: var(--green-600);
  border: 1px solid rgba(194, 242, 77, .22);
  border-radius: var(--radius-xs);
  padding: .1em .45em;
  word-break: break-word;
}

[data-theme="dark"] code { color: var(--lime); }

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  width: 100%;
}

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

:focus-visible {
  outline: 2px solid var(--green-500);
  outline-offset: 3px;
  border-radius: 4px;
}

[data-theme="dark"] :focus-visible { outline-color: var(--lime); }

/* 隐藏属性必须优先于组件自身的 display */
[hidden] { display: none !important; }

/* 仅屏幕阅读器可见 */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 400;
  background: var(--green-500);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  transition: top var(--t-fast);
}

.skip-link:focus { top: 12px; color: #fff; }

/* ==========================================================================
   04. 通用工具
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

.mono { font-family: var(--font-mono); }

.text-gradient {
  background: linear-gradient(96deg, var(--green-400) 0%, var(--lime) 50%, var(--green-300) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

[data-theme="light"] .text-gradient {
  background: linear-gradient(96deg, var(--green-600) 0%, var(--green-400) 55%, var(--green-500) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* 实时状态点：像素方块造型（Minecraft 风格） */
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 1px;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(91, 228, 155, .6);
  animation: pulse-dot 2.2s ease-out infinite;
  flex: none;
}

.live-dot--sm { width: 7px; height: 7px; }

.live-dot--lime { background: var(--lime); box-shadow: 0 0 0 0 rgba(194, 242, 77, .6); }

@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(91, 228, 155, .55); }
  70%  { box-shadow: 0 0 0 9px rgba(91, 228, 155, 0); }
  100% { box-shadow: 0 0 0 0 rgba(91, 228, 155, 0); }
}

/* 徽标 */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .8rem;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text-dim);
  white-space: nowrap;
}

.pill .icon { width: 13px; height: 13px; }

.pill--sm { font-size: .76rem; padding: 4px 11px; }

.pill--green { color: var(--green-600); border-color: rgba(23, 163, 90, .32); background: var(--accent-soft); }
.pill--lime  { color: var(--green-600); border-color: rgba(194, 242, 77, .45); background: rgba(194, 242, 77, .13); }
.pill--danger{ color: var(--danger); border-color: rgba(255, 107, 87, .35); background: var(--danger-soft); }

[data-theme="dark"] .pill--green { color: var(--green-200); }
[data-theme="dark"] .pill--lime { color: var(--lime); }
[data-theme="dark"] .pill--danger { color: #ffb3a8; }

/* 滚动条（直角造型，像素风） */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 0;
  border: 2px solid var(--bg-soft);
}
::-webkit-scrollbar-thumb:hover { background: var(--green-500); }

/* 滚动进度条 */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--progress-a), var(--progress-b));
  transition: width .1s linear;
  pointer-events: none;
}

/* ==========================================================================
   05. 图标与主题切换
   ========================================================================== */
.svg-sprite { display: none; }

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}

/* 主题切换按钮：两枚图标按当前主题互斥显示 */
.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  transition: color var(--t-fast), border-color var(--t-fast), transform var(--t-fast), background var(--t-fast);
}

.icon-btn:hover {
  color: var(--green-500);
  border-color: var(--green-400);
  transform: translateY(-2px);
}

.icon-btn .icon { width: 19px; height: 19px; }

/* 主题切换：两枚图标叠加，旋转 + 淡入淡出过渡 */
#themeToggle { position: relative; }

#themeToggle .icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 19px;
  height: 19px;
  margin: -9.5px 0 0 -9.5px;
  transition: transform .45s var(--ease), opacity .28s var(--ease);
}

#themeToggle .icon--sun  { opacity: 0; transform: rotate(-120deg) scale(.4); }
#themeToggle .icon--moon { opacity: 1; transform: rotate(0deg) scale(1); }

[data-theme="light"] #themeToggle .icon--sun  { opacity: 1; transform: rotate(0deg) scale(1); }
[data-theme="light"] #themeToggle .icon--moon { opacity: 0; transform: rotate(120deg) scale(.4); }

/* 按下时轻微收拢，呼应点击反馈 */
#themeToggle:active .icon--moon,
[data-theme="light"] #themeToggle:active .icon--sun { transform: rotate(0deg) scale(.82); }

/* ==========================================================================
   06. 按钮与分段控件
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast),
              border-color var(--t-fast), color var(--t-fast), filter var(--t-fast);
}

.btn:hover { transform: translateY(-2px); }

.btn:active { transform: translateY(0) scale(.98); }

.btn .icon { width: 1.05em; height: 1.05em; }

.btn--primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--green-500), var(--green-600));
  color: #fff;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, .28),
    inset 0 -3px 0 rgba(0, 0, 0, .22),
    0 6px 22px rgba(23, 163, 90, .28);
}

/* 悬停流光扫过（纯装饰层，不挡点击） */
.btn--primary::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -45%;
  width: 32%;
  transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .30), transparent);
  opacity: 0;
  pointer-events: none;
}

.btn--primary:hover::after {
  left: 115%;
  opacity: 1;
  transition: left .65s var(--ease), opacity .25s var(--ease);
}

.btn--primary:hover {
  background: linear-gradient(135deg, var(--green-400), var(--green-600));
  color: #fff;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, .32),
    inset 0 -3px 0 rgba(0, 0, 0, .22),
    0 10px 30px rgba(23, 163, 90, .4);
}

.btn--ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn--ghost:hover {
  border-color: var(--green-400);
  color: var(--green-600);
}

[data-theme="dark"] .btn--ghost:hover { color: var(--lime); }

.btn--soft {
  background: var(--accent-soft);
  color: var(--green-600);
  border-color: rgba(23, 163, 90, .26);
}

[data-theme="dark"] .btn--soft { color: var(--green-200); }

.btn--soft:hover {
  background: rgba(23, 163, 90, .2);
  color: var(--green-700);
}

[data-theme="dark"] .btn--soft:hover { color: var(--lime); }

.btn--sm { font-size: .86rem; padding: 9px 16px; }

.btn--lg { font-size: 1.02rem; padding: 15px 28px; }

/* 分段控件 */
.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  flex-wrap: wrap;
}

.segmented__btn {
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-size: .92rem;
  font-weight: 700;
  color: var(--text-dim);
  transition: color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}

.segmented__btn:hover { color: var(--text); }

.segmented__btn.is-active {
  background: linear-gradient(135deg, var(--green-500), var(--green-600));
  color: #fff;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, .28),
    inset 0 -3px 0 rgba(0, 0, 0, .22),
    0 4px 16px rgba(23, 163, 90, .28);
}

.segmented--sm { padding: 4px; }

.segmented--sm .segmented__btn { padding: 7px 16px; font-size: .84rem; }

/* ==========================================================================
   07. 顶部导航与汉堡菜单
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background var(--t-med), box-shadow var(--t-med);
}

.site-header.is-scrolled {
  background: var(--header-bg-scrolled);
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  flex: none;
}

.brand:hover { color: var(--text); }

.brand__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  box-shadow: 0 4px 14px rgba(23, 163, 90, .32);
  color: #d9ff9a;
}

.brand__mark .icon { width: 21px; height: 21px; }

/* 站点图标（server-icon.png）：保持像素画锐利，不做平滑拉伸 */
.brand__img {
  width: 21px;
  height: 21px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  border-radius: 4px;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand__text strong { font-size: 1.02rem; letter-spacing: .02em; color: var(--text); }

/* 品牌副标题：像素字体点缀（MC 氛围） */
.brand__text small {
  font-family: var(--font-pixel);
  font-size: .5rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.6;
  color: var(--text-faint);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 9px 13px;
  font-size: .91rem;
  font-weight: 600;
  color: var(--text-dim);
  border-radius: 10px;
  transition: color var(--t-fast), background var(--t-fast);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--green-500), var(--lime));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--t-med) var(--ease);
}

.nav-link:hover { color: var(--text); background: var(--surface-2); }

.nav-link.is-active { color: var(--text); }

.nav-link.is-active::after { transform: scaleX(1); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding-left: var(--sp-4);
  border-left: 1px solid var(--border);
}

.nav-copy { color: var(--text-dim); }

.nav-copy .icon { width: .9em; height: .9em; }

/* 汉堡按钮 */
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color var(--t-fast);
  flex: none;
}

.menu-toggle:hover { border-color: var(--green-400); }

.menu-toggle__bars {
  display: block;
  position: relative;
  width: 20px;
  height: 14px;
  margin: auto;
}

.menu-toggle__bars span {
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform var(--t-med) var(--ease), top var(--t-med) var(--ease), opacity var(--t-med) var(--ease);
}

.menu-toggle__bars span:nth-child(1) { top: 0; }
.menu-toggle__bars span:nth-child(2) { top: 6px; }
.menu-toggle__bars span:nth-child(3) { top: 12px; }

.menu-toggle.is-open .menu-toggle__bars span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.menu-toggle.is-open .menu-toggle__bars span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open .menu-toggle__bars span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

/* ==========================================================================
   08. Hero
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 8vw, 96px) 0 clamp(44px, 6vw, 76px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  /* 渐变层保持半透明：让 body::before 的泥土纹理透出，形成 minecraft.net 式的暗色纹理底 */
  background:
    radial-gradient(900px 480px at 88% -12%, rgba(23, 163, 90, .3), transparent 62%),
    radial-gradient(720px 460px at -8% 108%, rgba(23, 163, 90, .16), transparent 60%),
    linear-gradient(180deg, rgba(13, 35, 24, .88) 0%, rgba(7, 13, 9, .84) 62%, rgba(7, 13, 9, .9) 100%);
}

[data-theme="light"] .hero::before {
  background:
    radial-gradient(900px 480px at 88% -12%, rgba(23, 163, 90, .16), transparent 62%),
    radial-gradient(720px 460px at -8% 108%, rgba(23, 163, 90, .1), transparent 60%),
    linear-gradient(180deg, rgba(226, 238, 224, .9) 0%, rgba(244, 248, 244, .86) 62%, rgba(244, 248, 244, .92) 100%);
}

/* Minecraft 元素：Hero 右侧悬浮的等距方块（渲染图素材，非 CSS 手绘） */
.hero::after {
  content: none;
}

.hero__bg { position: absolute; inset: 0; z-index: -2; pointer-events: none; }

.hero__grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: rgba(158, 231, 190, .12);
}

[data-theme="light"] .hero__grid { color: rgba(16, 71, 46, .08); }

/* Minecraft 元素：kicker 前的品牌方块（自绘纹理渲染的等距方块小图标） */
.hero__glow {
  position: absolute;
  width: 420px;
  height: 420px;
  right: 5%;
  top: -22%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(194, 242, 77, .1), transparent 65%);
  filter: blur(12px);
}

@keyframes float-y {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-16px) rotate(2deg); }
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  gap: clamp(28px, 4.5vw, 60px);
  align-items: center;
}

.hero__content { max-width: 660px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: .07em;
  color: var(--green-600);
  margin-bottom: var(--sp-5);
}

[data-theme="dark"] .eyebrow { color: var(--green-300); }

/* Hero 内容逐级入场：每次回到首页都会重播 */
.hero__content > * {
  animation: hero-in .6s var(--ease) backwards;
}

.hero__content > *:nth-child(1) { animation-delay: .05s; }
.hero__content > *:nth-child(2) { animation-delay: .12s; }
.hero__content > *:nth-child(3) { animation-delay: .19s; }
.hero__content > *:nth-child(4) { animation-delay: .26s; }
.hero__content > *:nth-child(5) { animation-delay: .33s; }
.hero__content > *:nth-child(6) { animation-delay: .40s; }

/* 状态卡稍晚入场，与左侧内容形成节奏差 */
.hero__inner > .status-card {
  animation: hero-in .6s var(--ease) .3s backwards;
}

@keyframes hero-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

.hero__content h1 {
  font-size: clamp(2rem, 4.8vw, 3.3rem);
  letter-spacing: .004em;
  margin-bottom: var(--sp-5);
  text-wrap: balance;
}

.hero__line { display: block; }

.hero__lead {
  min-height: 3.4em;
  max-width: 560px;
  font-size: 1.04rem;
  margin-bottom: var(--sp-6);
  color: var(--text-dim);
}

/* 打字机 */
.typing { color: var(--text-dim); }

.typing__caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 3px;
  background: var(--green-500);
  vertical-align: -.16em;
  animation: caret-blink 1s step-end infinite;
}

@keyframes caret-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}

.quick-addresses {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}

.copy-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: .9rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}

.copy-chip:hover {
  border-color: var(--green-400);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.copy-chip code {
  background: none;
  border: none;
  padding: 0;
  color: var(--green-600);
  font-size: .92em;
}

[data-theme="dark"] .copy-chip code { color: var(--lime); }

.copy-chip__label {
  font-size: .76rem;
  color: var(--text-faint);
  font-weight: 700;
  letter-spacing: .05em;
}

.copy-chip__action {
  font-size: .78rem;
  font-weight: 700;
  color: var(--green-600);
  border-left: 1px solid var(--border);
  padding-left: 10px;
}

[data-theme="dark"] .copy-chip__action { color: var(--green-300); }

.copy-chip.is-copied {
  border-color: var(--green-400);
  animation: chip-pop .32s var(--ease);
}

/* 复制成功瞬间轻微放大，强化「已生效」感知 */
@keyframes chip-pop {
  0%   { transform: scale(1); }
  55%  { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: .85rem;
  color: var(--text-dim);
}

.hero__meta li { display: inline-flex; align-items: center; gap: 7px; }

.hero__meta .icon { width: 14px; height: 14px; color: var(--green-500); }

/* ==========================================================================
   09. 实时状态面板
   ========================================================================== */
.status-card {
  position: relative;
  background: linear-gradient(165deg, var(--surface-2), var(--surface) 70%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--sp-5);
  overflow: hidden;
}

.status-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--green-500), var(--lime), transparent 82%);
}

.status-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}

.status-card__head h2 { font-size: 1.02rem; }

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .76rem;
  font-weight: 800;
  color: var(--ok);
  letter-spacing: .06em;
}

.status-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}

.status-label { font-size: .78rem; color: var(--text-faint); }

.status-player {
  font-weight: 800;
  font-size: 2.6rem;
  line-height: 1.05;
  color: var(--text);
  font-family: var(--font-mono);
  letter-spacing: -.02em;
}

.status-player__unit { font-size: .86rem; color: var(--text-dim); margin-left: 5px; }

.status-hero__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.status-lag { font-size: .78rem; color: var(--text-faint); }

.status-lag.is-spiking { color: var(--warn); }

/* 走势图 */
.status-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 62px;
  margin-bottom: var(--sp-4);
  padding: 10px 7px 7px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.status-chart i {
  flex: 1;
  min-width: 2px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, var(--green-400), rgba(23, 163, 90, .18));
  height: 30%;
  transition: height .5s var(--ease), background var(--t-med);
}

.status-chart i.is-peak { background: linear-gradient(180deg, var(--lime), rgba(194, 242, 77, .16)); }

.status-rows { display: grid; gap: 9px; }

.status-rows > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-top: 9px;
  border-top: 1px dashed var(--border);
}

.status-rows dt { font-size: .83rem; color: var(--text-faint); }

.status-rows dd { font-size: .88rem; color: var(--text); text-align: right; }

/* 像素字体点缀（地址 / 版本号等纯 ASCII 元素） */
.pixel {
  font-family: var(--font-pixel);
  font-size: .58rem !important;
  line-height: 1.8;
  letter-spacing: 0;
}

.status-foot {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
  font-size: .77rem;
  color: var(--text-faint);
  line-height: 1.6;
}

.status-foot .icon { width: 14px; height: 14px; margin-top: 3px; flex: none; }

.status-foot a { font-weight: 600; }

/* ==========================================================================
   10. 区块标题
   ========================================================================== */
.section {
  padding-block: var(--sp-8);
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.section--tight { padding-block: var(--sp-6); }

.section-block { margin-top: var(--sp-10); }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--green-600);
  margin-bottom: 10px;
}

/* 标题前的品牌方块小图标：Bare Bones 材质包（官方宣传片同款简洁风格） */
.kicker::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: none;
  background: url('images/mc/bb-grass-side.png') center / contain no-repeat;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 3px rgba(2, 8, 4, .35));
}

[data-theme="dark"] .kicker { color: var(--green-400); }

.section-head { margin-bottom: var(--sp-7); max-width: 720px; }

.section-head--split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-6);
  max-width: none;
  flex-wrap: wrap;
}

.section-head--split .section-head__lead { max-width: 420px; margin: 0; }

.section-head--compact { margin-bottom: var(--sp-5); }

.section-head__lead {
  margin-top: var(--sp-3);
  font-size: .97rem;
  color: var(--text-dim);
  max-width: 580px;
}

.section-block .section-head { margin-bottom: var(--sp-6); }

/* ==========================================================================
   11. 特色卡片
   ========================================================================== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(255px, 100%), 1fr));
  gap: var(--sp-4);
}

.feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-6) var(--sp-5);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(175deg, var(--surface), var(--bg-soft));
  overflow: hidden;
  transition: transform var(--t-med) var(--ease), border-color var(--t-med), box-shadow var(--t-med);
}

/* hover 光斑 */
.feature-card::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  top: -120px;
  right: -80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(23, 163, 90, .22), transparent 68%);
  opacity: 0;
  transition: opacity var(--t-med);
  pointer-events: none;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.feature-card:hover::before { opacity: 1; }

.feature-card--highlight {
  border-color: rgba(23, 163, 90, .32);
  background: linear-gradient(175deg, var(--surface-2), var(--bg-soft));
}

.feature-card__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: var(--accent-soft);
  border: 1px solid rgba(23, 163, 90, .22);
  color: var(--green-600);
  transition: transform var(--t-med) var(--ease), color var(--t-med);
}

[data-theme="dark"] .feature-card__icon { color: var(--green-300); }

.feature-card__icon .icon { width: 26px; height: 26px; }

.feature-card:hover .feature-card__icon { transform: scale(1.08) rotate(-4deg); color: var(--green-500); }

[data-theme="dark"] .feature-card:hover .feature-card__icon { color: var(--lime); }

.feature-card p { font-size: .92rem; }

.mini-list {
  display: grid;
  gap: 7px;
  margin-top: auto;
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--border);
}

.mini-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .83rem;
  color: var(--text-dim);
}

.mini-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--green-500);
  flex: none;
}



/* ==========================================================================
   14. 内容中心（标签 + 分页）
   ========================================================================== */
.hub {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}

.hub__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.tablist { display: flex; gap: 5px; flex-wrap: wrap; }

.tab {
  padding: 9px 17px;
  font-size: .89rem;
  font-weight: 600;
  color: var(--text-dim);
  border-radius: var(--radius-pill);
  transition: color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}

.tab:hover { color: var(--text); background: var(--surface-3); }

.tab[aria-selected="true"] {
  color: #08170e;
  background: linear-gradient(135deg, var(--lime), var(--green-400));
  box-shadow: 0 4px 16px rgba(23, 163, 90, .22);
}

.hub__count { font-size: .82rem; color: var(--text-faint); }

.hub__panel { padding: var(--sp-4); min-height: 300px; }

.hub__list {
  display: grid;
  gap: var(--sp-2);
}

/* 列表项逐条交错入场（翻页 / 切换标签时可见） */
.hub__list .hub-item {
  animation: item-in .38s var(--ease) backwards;
}

.hub__list .hub-item:nth-child(1) { animation-delay: 0s; }
.hub__list .hub-item:nth-child(2) { animation-delay: .06s; }
.hub__list .hub-item:nth-child(3) { animation-delay: .12s; }

@keyframes item-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* 内容卡片 */
.hub-item {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
  padding: var(--sp-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-soft);
  transition: border-color var(--t-med), transform var(--t-med) var(--ease), background var(--t-med);
}

.hub-item:hover {
  border-color: var(--border-strong);
  transform: translateX(4px);
  background: var(--surface-2);
}

.hub-item__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex: none;
  background: var(--accent-soft);
  border: 1px solid rgba(23, 163, 90, .2);
  color: var(--green-600);
}

[data-theme="dark"] .hub-item__icon { color: var(--green-300); }

.hub-item__icon .icon { width: 22px; height: 22px; }

.hub-item--featured .hub-item__icon {
  background: rgba(194, 242, 77, .14);
  border-color: rgba(194, 242, 77, .34);
  color: var(--green-600);
}

[data-theme="dark"] .hub-item--featured .hub-item__icon { color: var(--lime); }

.hub-item__body { min-width: 0; flex: 1; }

.hub-item__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: .77rem;
  color: var(--text-faint);
  margin-bottom: 5px;
}

.hub-item__tag {
  font-weight: 700;
  color: var(--green-600);
  border: 1px solid rgba(23, 163, 90, .26);
  border-radius: var(--radius-pill);
  padding: 1px 9px;
  font-size: .71rem;
}

[data-theme="dark"] .hub-item__tag { color: var(--green-300); }

.hub-item__tag.is-lime { color: var(--green-600); border-color: rgba(194, 242, 77, .45); }

[data-theme="dark"] .hub-item__tag.is-lime { color: var(--lime); }

.hub-item__body h3 { font-size: .99rem; margin-bottom: 3px; }

.hub-item__body p { font-size: .88rem; }

.hub-empty { font-size: .9rem; color: var(--text-faint); padding: var(--sp-5) 0; text-align: center; }

/* 相册型内容（首页「相册」标签） */
.hub-item__thumb {
  width: 96px;
  height: 68px;
  border-radius: var(--radius-sm);
  flex: none;
  overflow: hidden;
  border: 1px solid var(--border);
}

/* 分页 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: var(--sp-5);
  flex-wrap: wrap;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  display: inline-grid;
  place-items: center;
  font-size: .89rem;
  font-weight: 700;
  color: var(--text-dim);
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}

.page-btn:hover:not(:disabled):not(.is-current) {
  color: var(--text);
  border-color: var(--green-400);
  transform: translateY(-1px);
}

.page-btn .icon { width: 16px; height: 16px; }

.page-btn[data-action="prev"] .icon { transform: rotate(180deg); }

.page-btn:disabled { opacity: .38; cursor: not-allowed; }

.page-btn.is-current {
  background: linear-gradient(135deg, var(--green-500), var(--green-600));
  border-color: transparent;
  color: #fff;
  cursor: default;
  animation: page-pop .32s var(--ease);
}

/* 切页时当前页码的弹性放大反馈 */
@keyframes page-pop {
  0%   { transform: scale(.85); }
  60%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.page-ellipsis { color: var(--text-faint); padding: 0 3px; }

/* ==========================================================================
   15. CTA 横幅
   ========================================================================== */
.cta-band {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  flex-wrap: wrap;
  padding: clamp(26px, 4.5vw, 50px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(120deg, var(--surface-2), var(--surface-3) 55%, var(--surface));
  border: 1px solid rgba(23, 163, 90, .26);
  box-shadow: var(--shadow-md);
}

.cta-band::after {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  right: -80px;
  top: -140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(194, 242, 77, .15), transparent 65%);
  pointer-events: none;
}

.cta-band .kicker { margin-bottom: 6px; }

.cta-band h2 { margin-bottom: 8px; font-size: clamp(1.28rem, 3vw, 1.75rem); }

.cta-band p { font-size: .94rem; max-width: 460px; }

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   16. 页面外壳
   ========================================================================== */
.page-shell { padding-block: clamp(36px, 5.5vw, 68px); }

.page-head { max-width: 800px; margin-bottom: var(--sp-8); }

.page-head .kicker { margin-bottom: 12px; }

.page-head h1 { margin-bottom: var(--sp-4); }

.page-head__lead { font-size: 1.03rem; max-width: 700px; }

/* ==========================================================================
   17. 关于页
   ========================================================================== */
.story-grid {
  display: grid;
  grid-template-columns: 1.4fr .6fr;
  gap: var(--sp-6);
  align-items: start;
  margin-bottom: var(--sp-8);
}

.story { display: grid; gap: var(--sp-4); max-width: 700px; }

.story h2 { margin-bottom: var(--sp-1); }

.story p { font-size: .96rem; }

.story__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-2); }

.stat-panel {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(170deg, var(--surface), var(--bg-soft));
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.stat-panel__item {
  display: grid;
  gap: 2px;
  padding: var(--sp-4) var(--sp-2);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  text-align: center;
}

.stat-panel__item strong {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--green-600);
  letter-spacing: -.02em;
}

[data-theme="dark"] .stat-panel__item strong { color: var(--lime); }

.stat-panel__item strong span { font-size: .9rem; color: var(--green-500); }

.stat-panel__item span:last-child { font-size: .76rem; color: var(--text-faint); }

.stat-panel__note {
  grid-column: 1 / -1;
  font-size: .74rem;
  color: var(--text-faint);
  text-align: center;
  padding-top: var(--sp-1);
}


.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(215px, 100%), 1fr));
  gap: var(--sp-3);
}

.spec-item {
  display: grid;
  gap: 3px;
  padding: var(--sp-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  transition: border-color var(--t-fast), transform var(--t-fast);
}

.spec-item:hover { border-color: var(--border-strong); transform: translateY(-2px); }

.spec-item__label { font-size: .77rem; color: var(--text-faint); letter-spacing: .06em; }

.spec-item strong {
  font-size: 1.06rem;
  color: var(--text);
  font-family: var(--font-mono);
  letter-spacing: .01em;
}

.spec-item > span:last-child { font-size: .78rem; color: var(--text-dim); }

/* 时间线（关于页） */
.timeline {
  position: relative;
  display: grid;
  gap: var(--sp-5);
  max-width: 740px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 11px;
  width: 2px;
  background: linear-gradient(180deg, var(--green-500), rgba(23, 163, 90, .12));
  border-radius: 2px;
}

.timeline li {
  position: relative;
  padding-left: calc(11px + var(--sp-6));
}

.timeline__dot {
  position: absolute;
  left: 0;
  top: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--green-500);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.timeline__card {
  padding: var(--sp-5);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color var(--t-med), transform var(--t-med) var(--ease), box-shadow var(--t-med);
}

.timeline li:hover .timeline__card {
  border-color: var(--border-strong);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.timeline__date {
  display: inline-block;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--green-600);
  background: rgba(194, 242, 77, .14);
  border: 1px solid rgba(194, 242, 77, .3);
  border-radius: var(--radius-pill);
  padding: 2px 11px;
  margin-bottom: var(--sp-2);
}

[data-theme="dark"] .timeline__date { color: var(--lime); }

.timeline__card h3 { margin-bottom: 5px; }

.timeline__card p { font-size: .89rem; }

.culture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(255px, 100%), 1fr));
  gap: var(--sp-4);
}

.culture-card {
  position: relative;
  padding: var(--sp-6) var(--sp-5);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(170deg, var(--surface), var(--bg-soft));
  display: grid;
  gap: var(--sp-2);
  overflow: hidden;
  transition: border-color var(--t-med), transform var(--t-med) var(--ease);
}

.culture-card:hover { border-color: var(--border-strong); transform: translateY(-4px); }

.culture-card__mark {
  position: absolute;
  right: -4px;
  top: -20px;
  font-family: var(--font-mono);
  font-size: 4.4rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent-soft);
  pointer-events: none;
}

.culture-card h3, .culture-card p { position: relative; }

.culture-card p { font-size: .89rem; }

/* ==========================================================================
   18. 规则页
   ========================================================================== */
.rule-summary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-5);
}

.rule-groups { display: grid; gap: var(--sp-6); }

.rule-group {
  padding: clamp(18px, 3.5vw, 32px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}

.rule-group--danger {
  border-color: rgba(255, 107, 87, .3);
  background: linear-gradient(170deg, var(--danger-soft), var(--surface) 42%);
}

.rule-group--safe {
  border-color: rgba(23, 163, 90, .3);
  background: linear-gradient(170deg, var(--accent-soft), var(--surface) 42%);
}

.rule-group__head {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}

.rule-group__icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  flex: none;
}

.rule-group--danger .rule-group__icon {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(255, 107, 87, .32);
}

.rule-group--safe .rule-group__icon {
  background: var(--accent-soft);
  color: var(--green-600);
  border: 1px solid rgba(23, 163, 90, .3);
}

[data-theme="dark"] .rule-group--safe .rule-group__icon { color: var(--green-300); }

.rule-group__icon .icon { width: 27px; height: 27px; }

.rule-group__head h2 { font-size: 1.28rem; }

.rule-group__head p { font-size: .87rem; }

.rule-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr));
  gap: var(--sp-3);
}

.rule-list li {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  padding: var(--sp-4);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  transition: border-color var(--t-fast), transform var(--t-fast) var(--ease);
}

.rule-list li:hover { border-color: var(--border-strong); transform: translateY(-2px); }

.rule-list__mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  flex: none;
  font-size: .8rem;
  font-weight: 900;
  margin-top: 2px;
}

.rule-list__mark--danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(255, 107, 87, .32);
}

.rule-list__mark--safe {
  background: var(--accent-soft);
  color: var(--green-600);
  border: 1px solid rgba(23, 163, 90, .3);
}

[data-theme="dark"] .rule-list__mark--safe { color: var(--green-300); }

.rule-list li strong { display: block; font-size: .94rem; margin-bottom: 3px; color: var(--text); }

.rule-list li p { font-size: .84rem; line-height: 1.65; }

/* 规则编号（01–10）比符号更利于对照协议条目 */
.rule-list__mark {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: -.02em;
}

/* 规则页「同意」区块 */
.rule-agree {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  flex-wrap: wrap;
  margin-top: var(--sp-5);
  padding: clamp(20px, 3.5vw, 30px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(23, 163, 90, .35);
  background: linear-gradient(150deg, var(--accent-soft), var(--surface) 62%);
  box-shadow: var(--shadow-glow);
}

.rule-agree__text h3 { font-size: 1.08rem; margin-bottom: 4px; }

.rule-agree__text p { font-size: .88rem; max-width: 520px; }

.rule-agree__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

.rule-version {
  margin-top: var(--sp-4);
  text-align: center;
  font-size: .79rem;
  color: var(--text-faint);
}

.penalty-ladder { display: grid; gap: var(--sp-3); }

.penalty-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-5);
  align-items: start;
  padding: var(--sp-5);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color var(--t-fast), transform var(--t-fast) var(--ease);
}

.penalty-item:hover { border-color: var(--border-strong); transform: translateX(4px); }

.penalty-item__level {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.penalty-item h3 { font-size: 1.02rem; margin-bottom: 4px; }

.penalty-item p { font-size: .89rem; max-width: 640px; }

.penalty-item__tag {
  display: inline-block;
  margin-top: 9px;
  font-size: .75rem;
  font-weight: 700;
  color: var(--green-600);
  border: 1px solid rgba(23, 163, 90, .26);
  padding: 2px 11px;
  border-radius: var(--radius-pill);
}

[data-theme="dark"] .penalty-item__tag { color: var(--green-300); }

.notice {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
  margin-top: var(--sp-6);
  padding: var(--sp-5);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 181, 71, .32);
  background: rgba(255, 181, 71, .07);
}

.notice--margin { margin-top: var(--sp-6); }

.notice__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  flex: none;
  background: rgba(255, 181, 71, .15);
  color: var(--warn);
}

.notice__icon .icon { width: 22px; height: 22px; }

.notice h3 { margin-bottom: 4px; }

.notice p { font-size: .89rem; }

/* ==========================================================================
   19. 加入页
   ========================================================================== */
.join-switch { margin-bottom: var(--sp-8); }

.join-switch .segmented { margin-bottom: var(--sp-4); }

.join-panels { position: relative; }

.join-panel { animation: page-fade .35s var(--ease) both; }


/* 状态面板上限人数（/ 100）与离线角标 */
.status-player__unit[data-status-total] {
  font-size: 1.1rem;
  color: var(--text-faint);
  font-weight: 700;
}

.live-pill.is-offline { color: var(--warn); }

.live-pill.is-offline .live-dot { background: var(--warn); animation: none; }

.join-guide {
  display: grid;
  gap: var(--sp-5);
  padding: clamp(18px, 3.5vw, 36px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}

.join-guide__intro h2 { margin: var(--sp-2) 0 5px; }

.join-guide__intro p { font-size: .93rem; }

.guide-steps { display: grid; counter-reset: guide; }

.guide-steps li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: var(--sp-4);
  padding: var(--sp-4) 0;
  border-bottom: 1px dashed var(--border);
  align-items: start;
}

.guide-steps li:last-child { border-bottom: none; }

.guide-steps__num {
  counter-increment: guide;
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--accent-soft);
  border: 1px solid rgba(23, 163, 90, .24);
  color: var(--green-600);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: .9rem;
}

[data-theme="dark"] .guide-steps__num { color: var(--lime); }

.guide-steps li h3 { font-size: .99rem; margin-bottom: 3px; }

.guide-steps li p { font-size: .87rem; }

.guide-note {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  padding: var(--sp-4);
  border-radius: var(--radius-md);
  border: 1px solid rgba(23, 163, 90, .24);
  background: var(--accent-soft);
}

.guide-note .icon { width: 19px; height: 19px; color: var(--green-600); margin-top: 3px; flex: none; }

[data-theme="dark"] .guide-note .icon { color: var(--green-300); }

.guide-note p { font-size: .85rem; }

.address-panel {
  padding: clamp(18px, 3.5vw, 34px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(23, 163, 90, .3);
  background: linear-gradient(160deg, var(--accent-soft), var(--surface) 55%);
  box-shadow: var(--shadow-glow);
}

.address-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
}

.address-panel__head h2 { margin-top: 3px; }

.address-panel__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(215px, 100%), 1fr));
  gap: var(--sp-3);
}

.address-box {
  display: grid;
  gap: var(--sp-3);
  justify-items: center;
  text-align: center;
  padding: var(--sp-5);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: border-color var(--t-fast), transform var(--t-fast) var(--ease);
}

.address-box:hover { border-color: var(--border-strong); transform: translateY(-3px); }

.address-box__label { font-size: .78rem; color: var(--text-faint); letter-spacing: .06em; }

.address-box__value {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--green-600);
  background: none;
  border: none;
  padding: 0;
}

[data-theme="dark"] .address-box__value { color: var(--lime); }

.address-box--group {
  border-color: rgba(194, 242, 77, .3);
  background: linear-gradient(160deg, rgba(194, 242, 77, .08), var(--surface-2));
}

.address-panel__note {
  margin-top: var(--sp-4);
  font-size: .81rem;
  color: var(--text-faint);
  text-align: center;
}


/* FAQ 手风琴 */
.accordion { display: grid; gap: var(--sp-2); }

.accordion__item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--t-med), box-shadow var(--t-med);
}

.accordion__item.is-open {
  border-color: rgba(23, 163, 90, .4);
  box-shadow: var(--shadow-sm);
}

.accordion__item h3 { margin: 0; }

.accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  width: 100%;
  text-align: left;
  padding: var(--sp-4) var(--sp-5);
  font-size: .97rem;
  font-weight: 700;
  color: var(--text);
  transition: color var(--t-fast), background var(--t-fast);
}

.accordion__trigger:hover { color: var(--green-600); background: var(--surface-2); }

[data-theme="dark"] .accordion__trigger:hover { color: var(--lime); }

.accordion__chevron {
  width: 18px;
  height: 18px;
  color: var(--green-500);
  flex: none;
  transition: transform var(--t-med) var(--ease);
}

.accordion__item.is-open .accordion__chevron { transform: rotate(180deg); }

.accordion__panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--t-med) var(--ease);
}

.accordion__body { padding: 0 var(--sp-5) var(--sp-5); }

.accordion__body p { font-size: .91rem; }

/* ==========================================================================
   20. 联系页
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(245px, 100%), 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-5);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform var(--t-med) var(--ease), border-color var(--t-med), box-shadow var(--t-med);
}

.contact-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.contact-card__icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 15px;
  background: var(--accent-soft);
  border: 1px solid rgba(23, 163, 90, .22);
  color: var(--green-600);
  margin-bottom: var(--sp-2);
}

[data-theme="dark"] .contact-card__icon { color: var(--green-300); }

.contact-card__icon .icon { width: 25px; height: 25px; }

.contact-card h2 { font-size: 1.12rem; }

.contact-card p { font-size: .89rem; }

.contact-card__value {
  font-family: var(--font-mono);
  font-size: .96rem;
  font-weight: 700;
  margin: var(--sp-1) 0;
  align-self: flex-start;
}

.contact-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: auto;
  padding-top: var(--sp-3);
}


.feedback-layout {
  display: grid;
  grid-template-columns: 1.4fr .6fr;
  gap: var(--sp-5);
  align-items: start;
}

.feedback-main {
  padding: clamp(18px, 3.5vw, 34px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}

/* 表单 */
.form__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4);
}

.field { display: grid; gap: 7px; }

.field--full { grid-column: 1 / -1; }

.field label { font-size: .87rem; font-weight: 600; color: var(--text); }

.field .req { color: var(--danger); }

.field__optional { font-size: .77rem; font-weight: 400; color: var(--text-faint); }

.field input,
.field select,
.field textarea {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  color: var(--text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}

.field input::placeholder,
.field textarea::placeholder { color: var(--text-faint); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field textarea { resize: vertical; min-height: 110px; }

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-soft);
}

.field__error {
  font-size: .79rem;
  color: var(--danger);
  animation: field-error-in .25s var(--ease);
}

@keyframes field-error-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.field__hint {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  font-size: .77rem;
  color: var(--text-faint);
}

.select-wrap { position: relative; }

.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 42px; cursor: pointer; }

.select-wrap__chevron {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--text-dim);
  pointer-events: none;
}

.select-wrap select option { background: var(--surface); color: var(--text); }

.form__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-top: var(--sp-5);
}

.form__note { font-size: .79rem; color: var(--text-faint); max-width: 340px; }

.btn.is-loading .btn__send { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }


.feedback-side {
  display: grid;
  gap: var(--sp-3);
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.side-card {
  padding: var(--sp-5);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
}

.side-card h3 { margin-bottom: var(--sp-3); font-size: .99rem; }

.side-list { display: grid; gap: 9px; }

.side-list li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: .86rem;
  color: var(--text-dim);
}

.side-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--green-500);
  margin-top: 9px;
  flex: none;
}

.side-card--accent {
  border-color: rgba(194, 242, 77, .32);
  background: linear-gradient(160deg, rgba(194, 242, 77, .09), var(--surface) 60%);
}

.side-card--accent p { font-size: .87rem; margin-bottom: 5px; }

.side-card__note { font-size: .79rem !important; color: var(--text-faint) !important; }


/* ==========================================================================
   21. 建筑图鉴 + CSS 方块画
   ========================================================================== */
.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
}

.gallery-filter { flex-wrap: wrap; }

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 320px;
}

.search-wrap__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--text-faint);
  pointer-events: none;
}

.search-wrap input {
  padding: 10px 14px 10px 41px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.search-wrap input::placeholder { color: var(--text-faint); }

.search-wrap input:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: var(--sp-4);
}

/* 作品卡片 */
.art-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: left;
  color: var(--text);
  cursor: pointer;
  transition: transform var(--t-med) var(--ease), border-color var(--t-med), box-shadow var(--t-med);
  animation: page-fade .4s var(--ease) both;
}

.art-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.art-card:hover .art { transform: scale(1.04); }

.art-card__frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.art-card__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 var(--sp-2) var(--sp-2);
}

.art-card__meta strong { font-size: .97rem; color: var(--text); }

.art-card__meta small { font-size: .79rem; color: var(--text-faint); }

.art-card__tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.art-card__zoom {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(6, 14, 9, .55);
  color: #eafff2;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--t-med), transform var(--t-med) var(--ease);
  backdrop-filter: blur(4px);
}

.art-card:hover .art-card__zoom,
.art-card:focus-visible .art-card__zoom { opacity: 1; transform: translateY(0); }

.art-card__zoom .icon { width: 16px; height: 16px; }

.gallery-empty {
  text-align: center;
  padding: var(--sp-8) 0;
  color: var(--text-faint);
  font-size: .92rem;
}

/* ---- CSS 方块画：纯渐变绘制，无图片依赖 ----
   每个 .art 作为画布，layer 用 box-shadow / 渐变堆出「像素风」画面。
   替换真实截图：在 script.js ART_WORKS 中给条目加 image 字段，
   渲染时会自动改为 <img>（样式见 .art--photo）。 */
.art {
  display: block;
  position: absolute;
  inset: 0;
  transition: transform var(--t-slow) var(--ease);
  background-color: #0b1a12;
}

.art::before,
.art::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* 通用地面纹理 */
.art::after {
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(0, 0, 0, .12) 1px, transparent 1px);
  background-size: 16px 16px, 16px 16px;
  opacity: .5;
  mix-blend-mode: overlay;
}

/* 真实图片模式：cover 适配卡片（显示范围最大化）；
   必须重置 ::after 的 16px 平铺网格，否则照片上会出现横向条纹 */
.art--photo {
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.art--photo::after {
  background-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 62%, rgba(0, 0, 0, .32));
  background-size: 100% 100%;
  background-repeat: no-repeat;
  opacity: 1;
  mix-blend-mode: normal;
}

/* 名言截图：头像与开头文字在左上角，缩略图对齐左上 */
.art--photo--left { background-position: left top; }

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

/* 灯箱：完整展示整图（contain），竖长截图也不裁切；加载完成后淡入 */
.lightbox__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--bg-soft);
  image-rendering: auto;
  opacity: 0;
  transition: opacity .35s var(--ease);
}

.lightbox__img.is-loaded { opacity: 1; }

/* ==========================================================================
   22. 灯箱
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 350;
  display: grid;
  place-items: center;
  padding: var(--sp-4);
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 5, .78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade-in .25s var(--ease);
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.lightbox__dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  width: min(1040px, 100%);
  max-height: min(88vh, 720px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: lightbox-in .32s var(--ease) both;
}

@keyframes lightbox-in {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 1.35rem;
  line-height: 1;
  color: #eafff2;
  background: rgba(6, 14, 9, .6);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(4px);
  transition: background var(--t-fast);
}

.lightbox__close:hover { background: rgba(255, 107, 87, .7); }

.lightbox__art {
  position: relative;
  min-height: 300px;
  background: var(--bg-soft);
  overflow: hidden;
}

.lightbox__art .art { position: absolute; inset: 0; }

.lightbox__info {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-6) var(--sp-5) var(--sp-5);
  overflow-y: auto;
}

.lightbox__info-main { flex: 1; }

.lightbox__info .kicker { margin-bottom: 6px; }

.lightbox__info h2 { margin-bottom: var(--sp-2); }

.lightbox__desc { font-size: .92rem; margin-bottom: var(--sp-4); }

.lightbox__meta { display: flex; flex-wrap: wrap; gap: 6px; }

.lightbox__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  flex-wrap: wrap;
  row-gap: 10px;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
}

.lightbox__nav-arrows {
  display: flex;
  gap: var(--sp-2);
}

/* 灯箱点赞按钮（通用 like-btn 样式，尺寸随 nav 自适应） */
.lightbox__nav .like-btn {
  padding: 8px 14px;
  white-space: nowrap;
}

.lightbox__count { font-size: .82rem; color: var(--text-faint); }

/* ==========================================================================
   23. 留言板
   ========================================================================== */
.guestbook {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: var(--sp-4);
  align-items: start;
}

.guest-form {
  display: grid;
  gap: var(--sp-4);
  padding: var(--sp-5);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.guest-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}

.guest-form__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.guest-form__actions .btn { flex: none; }

.guest-list-wrap {
  padding: var(--sp-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}

.guest-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
}

.guest-toolbar__count { font-size: .81rem; color: var(--text-faint); }

.guest-list { display: grid; gap: var(--sp-3); }

.guest-item {
  display: grid;
  gap: var(--sp-2);
  padding: var(--sp-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-soft);
  animation: page-fade .35s var(--ease) both;
  transition: border-color var(--t-med), background var(--t-med);
}

.guest-item:hover { border-color: var(--border-strong); background: var(--surface-2); }

.guest-item__head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.guest-item__avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  flex: none;
  font-weight: 800;
  font-size: .95rem;
  color: #08170e;
  background: linear-gradient(135deg, var(--lime), var(--green-400));
  text-transform: uppercase;
}

.guest-item__id { display: grid; gap: 0; min-width: 0; }

.guest-item__id strong {
  font-size: .91rem;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.guest-item__id strong .icon { width: 13px; height: 13px; color: var(--green-500); }

.guest-item__id small { font-size: .73rem; color: var(--text-faint); }

.guest-item__tag {
  margin-left: auto;
  font-size: .72rem;
  font-weight: 700;
  color: var(--green-600);
  border: 1px solid rgba(23, 163, 90, .26);
  border-radius: var(--radius-pill);
  padding: 1px 9px;
}

[data-theme="dark"] .guest-item__tag { color: var(--green-300); }

.guest-item__text {
  font-size: .9rem;
  color: var(--text-dim);
  white-space: pre-wrap;
  word-break: break-word;
}

.guest-item__foot {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding-top: var(--sp-2);
  border-top: 1px dashed var(--border);
}

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: .79rem;
  font-weight: 700;
  color: var(--text-dim);
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}

.like-btn:hover {
  color: var(--green-600);
  border-color: var(--green-400);
  transform: translateY(-1px);
}

.like-btn.is-liked {
  color: var(--green-600);
  border-color: rgba(23, 163, 90, .4);
  background: var(--accent-soft);
}

[data-theme="dark"] .like-btn:hover,
[data-theme="dark"] .like-btn.is-liked { color: var(--lime); }

.like-btn .icon { width: 14px; height: 14px; }

.like-btn.is-liked .icon { animation: like-pop .35s var(--ease); }

@keyframes like-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.guest-item__foot .delete-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .76rem;
  color: var(--text-faint);
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  transition: color var(--t-fast), background var(--t-fast);
}

.guest-item__foot .delete-btn:hover { color: var(--danger); background: var(--danger-soft); }

/* 两步确认态：文字变为「确认删除？」时高亮提示 */
.guest-item__foot .delete-btn.is-confirming {
  color: var(--danger);
  background: var(--danger-soft);
  font-weight: 700;
}

.guest-item__foot .delete-btn .icon { width: 13px; height: 13px; }

.guest-empty {
  display: grid;
  justify-items: center;
  gap: var(--sp-2);
  padding: var(--sp-8) var(--sp-4);
  text-align: center;
  color: var(--text-faint);
  font-size: .9rem;
}

.guest-empty .icon { width: 34px; height: 34px; color: var(--border-strong); }


/* ==========================================================================
   25. 页脚
   ========================================================================== */
.site-footer {
  margin-top: var(--sp-8);
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding-block: var(--sp-7) var(--sp-5);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--sp-7);
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--border);
}

.footer-brand .brand { margin-bottom: var(--sp-3); }

.footer-brand p { font-size: .87rem; max-width: 340px; margin-bottom: var(--sp-4); }

.footer-social { display: flex; gap: var(--sp-2); }

/* 站点版本徽章（页脚）：像素字体 + 像素方点 */
.site-version {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text-dim);
  font-family: var(--font-pixel);
  font-size: .56rem;
  line-height: 1.5;
  vertical-align: 1px;
  transition: color var(--t-fast), border-color var(--t-fast);
}

.site-version:hover { color: var(--text); border-color: var(--green-400); }

/* Beta 阶段：琥珀色像素方点提示 */
.site-version::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--warn);
  flex: none;
}

.footer-col h2 {
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--sp-3);
}

.footer-col ul { display: grid; gap: 8px; }

.footer-col ul a { font-size: .89rem; color: var(--text-dim); }

.footer-col ul a:hover { color: var(--green-600); }

[data-theme="dark"] .footer-col ul a:hover { color: var(--lime); }

.footer-info { gap: 10px !important; }

.footer-info li {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  font-size: .85rem;
  color: var(--text-dim);
}

.footer-info li span { color: var(--text-faint); }

.footer-info code {
  background: none;
  border: none;
  padding: 0;
  color: var(--green-600);
  font-family: var(--font-pixel);
  font-size: .56rem;
  letter-spacing: 0;
}

[data-theme="dark"] .footer-info code { color: var(--green-300); }

.footer-bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  padding-top: var(--sp-4);
  font-size: .77rem;
  color: var(--text-faint);
}

/* 法务信息区（免责声明） */
.footer-legal {
  display: grid;
  gap: 5px;
  max-width: 720px;
  line-height: 1.65;
}

.footer-legal__link {
  display: inline;
  font-size: inherit;
  color: var(--green-600);
  font-weight: 600;
  padding: 0;
  border-bottom: 1px dashed currentColor;
  transition: color var(--t-fast), border-color var(--t-fast);
}

[data-theme="dark"] .footer-legal__link { color: var(--green-300); }

.footer-legal__link:hover { color: var(--green-500); border-bottom-style: solid; }

.footer-back { font-style: italic; opacity: .85; }

/* ==========================================================================
   25.5 免责声明弹窗
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 360;
  display: grid;
  place-items: center;
  padding: var(--sp-4);
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 5, .72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade-in .22s var(--ease);
}

.modal__dialog {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: min(82vh, 680px);
  overflow-y: auto;
  padding: var(--sp-6) var(--sp-6) var(--sp-5);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: lightbox-in .28s var(--ease) both;
}

/* 弹窗顶部品牌渐变线：普通流内元素，跟随内容滚动（不悬浮遮挡文本） */
.modal__dialog::before {
  content: "";
  display: block;
  height: 2px;
  margin: calc(var(--sp-6) * -1) calc(var(--sp-6) * -1) var(--sp-5);
  background: linear-gradient(90deg, var(--green-500), var(--lime), transparent 82%);
}

.modal__dialog h2 { margin-bottom: var(--sp-4); }

.modal__body {
  display: grid;
  gap: var(--sp-3);
  font-size: .9rem;
  color: var(--text-dim);
}

.modal__body p { font-size: .9rem; line-height: 1.75; }

.modal__body strong { color: var(--text); }

/* ==========================================================================
   26. 回到顶部 / Toast
   ========================================================================== */
.back-top {
  position: fixed;
  right: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 210;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-dim);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--t-med), transform var(--t-med) var(--ease), visibility var(--t-med),
              color var(--t-fast), border-color var(--t-fast);
}

.back-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }

.back-top:hover { color: var(--green-600); border-color: var(--green-400); }

[data-theme="dark"] .back-top:hover { color: var(--lime); }

.back-top .icon { width: 19px; height: 19px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(460px, calc(100vw - 32px));
  padding: 13px 20px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid rgba(23, 163, 90, .35);
  color: var(--text);
  font-size: .89rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 16px) scale(.94);
  transition: opacity .25s var(--ease), transform .38s cubic-bezier(.18, 1.25, .4, 1);
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0) scale(1); }

.toast::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 1px;
  flex: none;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(91, 228, 155, .18);
}

.toast--warn::before { background: var(--warn); box-shadow: 0 0 0 4px rgba(255, 181, 71, .18); }

.toast--error::before { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }

.toast code { background: rgba(194, 242, 77, .12); border: none; padding: .05em .4em; }

/* ==========================================================================
   27. 动画
   ========================================================================== */
#main { position: relative; }

.page { animation: page-fade .45s var(--ease) both; }

.page.is-leaving { animation: page-fade-out .2s var(--ease) both; }

@keyframes page-fade {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes page-fade-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-10px); }
}

[data-reveal] {
  opacity: 0;
}

[data-reveal].in-view {
  opacity: 1;
  animation: reveal-in .7s var(--ease) backwards;
  animation-delay: var(--reveal-delay, 0ms);
}

@keyframes reveal-in {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

/* ==========================================================================
   28. 响应式
   ========================================================================== */
@media (max-width: 1180px) {
  .nav-list { gap: 0; }

  .nav-link { padding-inline: 10px; font-size: .87rem; }
}

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

  .status-card { max-width: 640px; }

  .story-grid,
  .feedback-layout { grid-template-columns: 1fr; }

  .stat-panel { position: static; grid-template-columns: repeat(4, 1fr); }

  .feedback-side { grid-template-columns: repeat(2, 1fr); position: static; }

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

  .footer-brand { grid-column: 1 / -1; }

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

  .guest-form { position: static; }

  .lightbox__dialog { grid-template-columns: 1fr; max-height: 90vh; overflow-y: auto; }

  .lightbox__art { min-height: 220px; aspect-ratio: 16 / 10; }
}

@media (max-width: 960px) {
  /* 导航折叠 */
  .menu-toggle { display: grid; place-items: center; }

  .primary-nav {
    position: fixed;
    inset: var(--header-h) 14px auto 14px;
    z-index: 130;
    transform: translateY(-14px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-3);
    padding: var(--sp-4);
    border-radius: var(--radius-lg);
    background: var(--header-bg-scrolled);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-lg);
    transition: transform var(--t-med) var(--ease), opacity var(--t-med) var(--ease), visibility var(--t-med);
    max-height: calc(100vh - var(--header-h) - 28px);
    overflow-y: auto;
  }

  .primary-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }

  .nav-link { display: block; padding: 12px 14px; font-size: .97rem; }

  .nav-link::after { left: 14px; right: 14px; bottom: 5px; }

  .nav-actions {
    flex-direction: row;
    align-items: stretch;
    padding-left: 0;
    border-left: none;
    border-top: 1px solid var(--border);
    padding-top: var(--sp-3);
    gap: var(--sp-2);
  }

  .nav-actions .btn { flex: 1; }

  .icon-btn#themeToggle { flex: none; width: 42px; }



}

@media (max-width: 760px) {
  .section-head--split { flex-direction: column; align-items: flex-start; gap: var(--sp-3); }


  .form__grid,
  .guest-form__grid { grid-template-columns: 1fr; }


  .feedback-side { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-5); }

  .rule-list { grid-template-columns: 1fr; }

  .stat-panel { grid-template-columns: repeat(2, 1fr); }

  .gallery-toolbar { flex-direction: column; align-items: stretch; }

  .search-wrap { max-width: none; }

  .guest-form__actions { flex-direction: column; align-items: stretch; }

  .guest-form__actions .btn { width: 100%; }

  .guest-form__actions .form__note { max-width: none; }

  .segmented { width: 100%; }

  .segmented__btn { flex: 1; text-align: center; padding-inline: 12px; }

  .gallery-filter .segmented__btn { flex: 0 1 auto; }
}

@media (max-width: 520px) {
  .container { padding-inline: var(--sp-4); }

  .hero__actions { flex-direction: column; align-items: stretch; }

  .hero__actions .btn,
  .cta-band__actions .btn { width: 100%; }

  .quick-addresses { flex-direction: column; align-items: stretch; }

  .copy-chip { justify-content: space-between; }

  .address-row { flex-direction: column; align-items: flex-start; }

  .address-row .btn { width: 100%; }

  .address-panel__head { flex-direction: column; align-items: flex-start; }

  .penalty-item { grid-template-columns: auto 1fr; gap: var(--sp-3); }

  .hub__bar { flex-direction: column; align-items: flex-start; }

  .hub__panel { padding: var(--sp-3); }

  .hub-item { flex-direction: row; gap: var(--sp-3); padding: var(--sp-3); }

  .hub-item__icon { width: 38px; height: 38px; }

  .page-btn { min-width: 38px; height: 38px; }

  .footer-bottom { justify-content: center; text-align: center; }

  .nav-actions { flex-wrap: wrap; }

  .nav-actions .nav-copy { display: none; }




  .lightbox__info { padding: var(--sp-5) var(--sp-4); }

  .lightbox__nav .btn { flex: 1; }

  .back-top { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }

  .toast { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}

/* ==========================================================================
   28.5 触屏设备：无悬浮概念，改用按压反馈；菜单项逐项滑入
   ========================================================================== */
@media (hover: none) {
  /* 悬浮位移在小屏没有意义：关闭，换成按下收缩 */
  .btn:hover,
  .icon-btn:hover,
  .page-btn:hover:not(:disabled):not(.is-current),
  .art-card:hover,
  .feature-card:hover,
  .detail-card:hover,
  .spec-item:hover,
  .culture-card:hover,
  .contact-card:hover,
  .compat-card:hover,
  .address-box:hover,
  .stat-panel__item:hover,
  .side-card:hover,
  .news-item:hover,
  .link-row:hover,
  .social-card:hover,
  .rule-list li:hover,
  .penalty-item:hover,
  .timeline li:hover .timeline__card,
  .hub-item:hover,
  .guest-item:hover,
  .address-row:hover,
  .address-panel:hover,
  .qq-card:hover,
  .cta-band:hover {
    transform: none;
  }

  .btn:active,
  .icon-btn:active,
  .copy-chip:active,
  .page-btn:active:not(:disabled),
  .tab:active,
  .segmented__btn:active {
    transform: scale(.95);
    filter: brightness(.9);
  }

  .art-card:active,
  .guest-item:active,
  .hub-item:active {
    transform: scale(.98);
    filter: brightness(1.06);
  }

  /* 悬停流光在触屏无意义：关闭 */
  .btn--primary::after { display: none; }
}

/* 移动端菜单：打开时导航项逐项滑入 */
@media (max-width: 960px) {
  .primary-nav .nav-link {
    opacity: 0;
    transform: translateX(-14px);
    transition: opacity .28s var(--ease), transform .32s var(--ease);
  }

  .primary-nav.is-open .nav-link {
    opacity: 1;
    transform: none;
  }

  .primary-nav.is-open .nav-list li:nth-child(1) .nav-link { transition-delay: .02s; }
  .primary-nav.is-open .nav-list li:nth-child(2) .nav-link { transition-delay: .07s; }
  .primary-nav.is-open .nav-list li:nth-child(3) .nav-link { transition-delay: .12s; }
  .primary-nav.is-open .nav-list li:nth-child(4) .nav-link { transition-delay: .17s; }
  .primary-nav.is-open .nav-list li:nth-child(5) .nav-link { transition-delay: .22s; }
}

/* 小屏性能优化：减弱高开销装饰 */
@media (max-width: 760px) {
  .hero__glow { display: none; }

  .hero__cube--c { display: none; }

  .site-header,
  .primary-nav {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}

/* ==========================================================================
   29. 无障碍 / 减少动态
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] { opacity: 1; transform: none; }

  .typing__caret { display: none; }
}

/* 高对比度模式下保证边框可见 */
@media (forced-colors: active) {
  .btn, .tab, .page-btn, .art-card, .guest-item, .hub-item { border: 1px solid ButtonText; }
}