/* ==========================================================================
 * 方块大陆 · 像素风主题
 * --------------------------------------------------------------------------
 * 设计要点：
 *   1. 全部使用 CSS 变量，改 :root 就能整体换色（亮/暗主题靠 [data-theme] 切换）
 *   2. 卡片和按钮用硬边框 + 多层 box-shadow 模拟「方块」的立体像素感
 *   3. 不加载任何外部字体/图片，打开即用，Cloudflare Pages 直接托管
 * ========================================================================== */

/* ------------------------------- 主题变量 ------------------------------- */
:root {
  color-scheme: dark;

  --bg: #10161c;
  --bg-alt: #0b1015;
  --surface: #1b242d;
  --surface-2: #232f3a;
  --surface-3: #2c3a47;

  --border: #0a0e12;
  --border-soft: #38495a;

  --text: #eef3f7;
  --text-dim: #a3b3c2;
  --text-mute: #74889a;

  --red: #ef5350;
  --red-dark: #a93026;
  --red-lite: #ff8a80;
  --dirt: #8c6644;
  --stone: #8f9aa6;
  --gold: #f2c349;
  --diamond: #4fd4dc;
  --redstone: #ff6e62;
  --nether: #b04a6f;

  --shadow: 5px 5px 0 rgba(0, 0, 0, 0.45);
  --shadow-sm: 3px 3px 0 rgba(0, 0, 0, 0.4);
  --inset: inset 0 -4px 0 rgba(0, 0, 0, 0.22);

  --radius: 3px;
  --maxw: 1140px;
  --gap: 22px;

  --font-body: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB",
    system-ui, -apple-system, sans-serif;
  --font-pixel: "Press Start 2P", "Silkscreen", "Segoe UI", "Microsoft YaHei",
    "PingFang SC", system-ui, sans-serif;
}

[data-theme="light"] {
  color-scheme: light;

  --bg: #e8eee6;
  --bg-alt: #dbe4d6;
  --surface: #f7faf6;
  --surface-2: #eaf0e6;
  --surface-3: #dde6d8;

  --border: #4a5a44;
  --border-soft: #b6c4ae;

  --text: #1b241c;
  --text-dim: #47543f;
  --text-mute: #6c7a63;

  --red: #c62828;
  --red-dark: #8e1c1c;
  --red-lite: #ef5350;
  --gold: #c99a1c;

  --shadow: 5px 5px 0 rgba(74, 90, 68, 0.35);
  --shadow-sm: 3px 3px 0 rgba(74, 90, 68, 0.3);
  --inset: inset 0 -4px 0 rgba(0, 0, 0, 0.12);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  /* 像素网格背景：模拟地块纹理 */
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 32px 32px;
  overflow-x: hidden;
}

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

a {
  color: var(--red-lite);
  text-decoration: none;
}

a:hover {
  color: var(--gold);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-pixel);
  line-height: 1.5;
  letter-spacing: 0.02em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.5rem, 4.4vw, 2.6rem);
}

h2 {
  font-size: clamp(1.15rem, 2.9vw, 1.7rem);
}

h3 {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0 0 1em;
  padding-left: 1.35em;
}

li {
  margin-bottom: 0.45em;
}

li::marker {
  color: var(--red);
}

code,
kbd {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92em;
  background: var(--surface-3);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1px 6px;
  color: var(--gold);
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

::selection {
  background: var(--red);
  color: #0b1015;
}

/* 无障碍：仅屏幕阅读器可见 */
.sr-only {
  position: absolute;
  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;
  left: 12px;
  top: -80px;
  z-index: 200;
  background: var(--red);
  color: #0b1015;
  font-weight: 700;
  padding: 10px 16px;
  border: 3px solid var(--border);
  transition: top 0.15s ease;
}

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

/* -------------------------------- 布局 --------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 18px;
}

.section {
  padding: 58px 0;
}

.section--alt {
  background: var(--bg-alt);
  border-top: 3px solid var(--border);
  border-bottom: 3px solid var(--border);
}

.section__head {
  margin-bottom: 30px;
}

.section__head p {
  color: var(--text-dim);
  margin: 0;
  max-width: 70ch;
}

.section__eyebrow {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 10px;
}

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

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

.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: calc(var(--gap) * 1.5);
  align-items: start;
}

/* -------------------------------- 卡片 --------------------------------- */
.card {
  background: var(--surface);
  border: 3px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.card--flat {
  box-shadow: none;
}

.card--hover:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.45);
}

.card__icon {
  font-size: 1.9rem;
  line-height: 1;
  margin-bottom: 12px;
  display: block;
}

.card h3 {
  margin-bottom: 0.4em;
}

.card p:last-child,
.card ul:last-child {
  margin-bottom: 0;
}

.card__text {
  color: var(--text-dim);
  margin: 0;
}

/* 卡片顶部红石装饰条 */
.card--stripe {
  position: relative;
  overflow: hidden;
}

.card--stripe::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: repeating-linear-gradient(
    90deg,
    var(--red) 0 8px,
    var(--red-dark) 8px 16px
  );
}

/* -------------------------------- 按钮 --------------------------------- */
.btn {
  --btn-bg: var(--surface-2);
  --btn-fg: var(--text);
  --btn-edge: rgba(0, 0, 0, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-pixel);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
  padding: 13px 20px;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 3px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 5px 0 var(--btn-edge), var(--shadow-sm);
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s ease;
}

.btn:hover {
  color: var(--btn-fg);
  filter: brightness(1.1);
}

.btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--btn-edge), 1px 1px 0 rgba(0, 0, 0, 0.35);
}

.btn--primary {
  --btn-bg: var(--red);
  --btn-fg: #ffffff;
  --btn-edge: var(--red-dark);
}

.btn--gold {
  --btn-bg: var(--gold);
  --btn-fg: #241c05;
  --btn-edge: #b98d18;
}

.btn--ghost {
  --btn-bg: transparent;
  box-shadow: none;
}

.btn--sm {
  font-size: 0.68rem;
  padding: 9px 14px;
}

.btn--block {
  width: 100%;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 6px;
}

/* ------------------------------ 导航栏 --------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(16, 22, 28, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 4px solid var(--border);
}

[data-theme="light"] .nav {
  background: rgba(232, 238, 230, 0.95);
}

/* 页面滚动后给导航一点下沉感，配合 app.js 里设置的 data-scrolled */
.nav[data-scrolled="true"] {
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.28);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 70px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-family: var(--font-pixel);
  font-size: 0.92rem;
  white-space: nowrap;
}

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

/* 纯 CSS 像素红石方块 logo */
.brand__logo {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 3px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background:
    linear-gradient(var(--red) 0 42%, var(--red-dark) 42% 100%);
  background-image:
    /* 顶部高光 */
    linear-gradient(var(--red-lite) 0 10%, transparent 10%),
    /* 中间一道暗纹，模拟红石块的分块质感 */
    linear-gradient(90deg, transparent 30%, rgba(0, 0, 0, 0.22) 30% 62%, transparent 62%),
    /* 红石块本体：上亮下暗 */
    linear-gradient(var(--red) 0 42%, var(--red-dark) 42% 100%);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  list-style: none;
  padding: 0;
}

.nav__links li {
  margin: 0;
}

.nav__link {
  display: block;
  padding: 9px 12px;
  color: var(--text-dim);
  font-size: 0.94rem;
  font-weight: 600;
  border: 3px solid transparent;
  border-radius: var(--radius);
}

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

.nav__link[aria-current="page"] {
  color: var(--red-lite);
  background: var(--surface-2);
  border-color: var(--border);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 1.25rem;
  background: var(--surface-2);
  color: var(--text);
  border: 3px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

/* ------------------------------- 状态徽章 ------------------------------- */
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 5px 11px;
  background: var(--surface-2);
  border: 3px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
  white-space: nowrap;
}

.status__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-mute);
  flex: 0 0 9px;
}

.status[data-state="online"] {
  color: var(--red-lite);
}

.status[data-state="online"] .status__dot {
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(239, 83, 80, 0.6);
  animation: pulse 2s infinite;
}

.status[data-state="offline"] {
  color: var(--redstone);
}

.status[data-state="offline"] .status__dot {
  background: var(--redstone);
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 9px rgba(239, 83, 80, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 83, 80, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------- Hero -------------------------------- */
.hero {
  position: relative;
  padding: 76px 0 66px;
  overflow: hidden;
  border-bottom: 4px solid var(--border);
  background:
    radial-gradient(1100px 420px at 78% -8%, rgba(239, 83, 80, 0.16), transparent 62%),
    radial-gradient(760px 380px at 8% 108%, rgba(79, 212, 220, 0.12), transparent 66%),
    var(--bg-alt);
}

/* 地平线式的方块装饰带 */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10px;
  opacity: 0.5;
  background: repeating-linear-gradient(
    90deg,
    var(--red) 0 20px,
    var(--red-dark) 20px 40px,
    var(--stone) 40px 60px
  );
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 44px;
  align-items: center;
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.hero h1 {
  margin-bottom: 0.5em;
}

.hero h1 em {
  font-style: normal;
  color: var(--red-lite);
  text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
}

.hero__lead {
  font-size: 1.06rem;
  color: var(--text-dim);
  max-width: 52ch;
  margin-bottom: 26px;
}

/* IP 复制框 */
.ipbox {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 3px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

.ipbox__field {
  flex: 1 1 240px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 9px 12px;
  background: var(--bg);
  border: 3px solid var(--border-soft);
  border-radius: var(--radius);
}

.ipbox__label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-family: var(--font-pixel);
}

.ipbox__value {
  font-family: Consolas, "Courier New", monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--red-lite);
  word-break: break-all;
  user-select: all;
}

.ipbox__hint {
  font-size: 0.85rem;
  color: var(--text-mute);
  margin: 0;
}

/* 右侧统计面板 */
.panel {
  background: var(--surface);
  border: 3px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  background: var(--surface-2);
  border-bottom: 3px solid var(--border);
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

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

.stat {
  padding: 18px 16px;
  border-right: 3px solid var(--border);
  border-bottom: 3px solid var(--border);
}

.stat:nth-child(2n) {
  border-right: 0;
}

.stat:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.stat__value {
  font-family: var(--font-pixel);
  font-size: clamp(1.15rem, 2.6vw, 1.6rem);
  color: var(--red-lite);
  line-height: 1.3;
}

.stat__label {
  font-size: 0.82rem;
  color: var(--text-mute);
}

.panel__foot {
  padding: 13px 16px;
  background: var(--bg-alt);
  border-top: 3px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-mute);
}

/* ------------------------------ 步骤 / 时间线 ------------------------------ */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--gap);
}

.step {
  position: relative;
  padding: 20px 20px 20px 76px;
  background: var(--surface);
  border: 3px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 18px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  color: #ffffff;
  background: var(--red);
  border: 3px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.step h3 {
  margin-bottom: 0.35em;
}

.step p {
  margin: 0;
  color: var(--text-dim);
}

/* -------------------------------- 玩法卡 -------------------------------- */
.mode {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.mode__head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mode__icon {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  background: var(--surface-2);
  border: 3px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.mode__title {
  margin: 0;
}

.tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 9px;
  background: var(--surface-3);
  border: 2px solid var(--border-soft);
  border-radius: 999px;
  color: var(--text-dim);
}

.tag--red {
  background: var(--red);
  border-color: var(--red-dark);
  color: #ffffff;
}

.tag--gold {
  background: var(--gold);
  border-color: #b98d18;
  color: #241c05;
}

.tag--diamond {
  background: var(--diamond);
  border-color: #2c8f96;
  color: #06282b;
}

/* 勾选列表 */
.checks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 9px;
}

.checks li {
  position: relative;
  padding-left: 28px;
  margin: 0;
  color: var(--text-dim);
}

.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 13px;
  height: 13px;
  background: var(--red);
  border: 2px solid var(--border);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

/* ------------------------------- 新闻列表 ------------------------------- */
.news {
  display: grid;
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.news__item {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  background: var(--surface);
  border: 3px solid var(--border);
  border-left-width: 6px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin: 0;
}

.news__item[data-pinned="true"] {
  border-left-color: var(--gold);
  background: linear-gradient(90deg, rgba(242, 195, 73, 0.1), transparent 40%), var(--surface);
}

.news__date {
  font-family: Consolas, monospace;
  font-size: 0.86rem;
  color: var(--text-mute);
  padding-top: 3px;
}

.news__title {
  margin: 0 0 0.35em;
  font-size: 1rem;
}

.news__text {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* --------------------------------- 表格 -------------------------------- */
.table-wrap {
  overflow-x: auto;
  border: 3px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}

th,
td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 3px solid var(--border);
  vertical-align: top;
}

th {
  background: var(--surface-2);
  font-family: var(--font-pixel);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  white-space: nowrap;
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: var(--surface-2);
}

td code {
  white-space: nowrap;
}

/* --------------------------------- FAQ --------------------------------- */
details {
  background: var(--surface);
  border: 3px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 0;
  margin-bottom: 12px;
}

summary {
  cursor: pointer;
  padding: 15px 18px;
  font-family: var(--font-pixel);
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: "+";
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  background: var(--red);
  color: #ffffff;
  border: 3px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.8rem;
}

details[open] summary::before {
  content: "−";
}

details[open] summary {
  color: var(--red-lite);
  border-bottom: 3px solid var(--border);
}

details p {
  padding: 15px 18px;
  margin: 0;
  color: var(--text-dim);
}

/* ------------------------------- 页内导航 ------------------------------- */
.pagehead {
  padding: 46px 0 34px;
  background: var(--bg-alt);
  border-bottom: 4px solid var(--border);
  background-image:
    radial-gradient(760px 320px at 88% -20%, rgba(239, 83, 80, 0.14), transparent 60%);
}

.pagehead h1 {
  margin-bottom: 0.4em;
}

.pagehead p {
  color: var(--text-dim);
  margin: 0;
  max-width: 66ch;
}

.crumb {
  font-size: 0.86rem;
  color: var(--text-mute);
  margin-bottom: 14px;
}

.crumb a {
  color: var(--text-dim);
}

/* 锚点小节标题 */
.subhead {
  margin-top: 46px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--border);
}

.subhead:first-child {
  margin-top: 0;
}

/* ------------------------------- 提示条 ------------------------------- */
.notice {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface-2);
  border: 3px solid var(--border);
  border-left-width: 6px;
  border-left-color: var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  color: var(--text-dim);
}

.notice__icon {
  font-size: 1.3rem;
  line-height: 1.3;
}

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

.notice p:last-child {
  margin: 0;
}

/* ------------------------------ 指令列表 ------------------------------ */
.cmdlist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.cmdlist li {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  padding: 12px 16px;
  background: var(--surface);
  border: 3px solid var(--border);
  border-radius: var(--radius);
  margin: 0;
}

.cmdlist code {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--red-lite);
  font-weight: 700;
}

/* ------------------------------- Toast ------------------------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translate(-50%, 140%);
  z-index: 300;
  padding: 13px 22px;
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  color: #ffffff;
  background: var(--red);
  border: 3px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.toast[data-show="true"] {
  transform: translate(-50%, 0);
  opacity: 1;
}

.toast[data-variant="error"] {
  background: var(--redstone);
  color: #fff;
}

/* -------------------------------- 页脚 -------------------------------- */
.footer {
  margin-top: 0;
  padding: 46px 0 30px;
  background: var(--bg-alt);
  border-top: 4px solid var(--border);
  color: var(--text-dim);
  font-size: 0.92rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.footer h4 {
  font-size: 0.72rem;
  color: var(--text);
  margin-bottom: 0.9em;
  letter-spacing: 0.08em;
}

.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer li {
  margin-bottom: 0.5em;
}

.footer a {
  color: var(--text-dim);
}

.footer a:hover {
  color: var(--red-lite);
}

.footer__about p {
  max-width: 44ch;
  color: var(--text-mute);
}

.footer__bottom {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 3px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-mute);
}

/* ------------------------------- 响应式 ------------------------------- */
@media (max-width: 1000px) {
  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hero__grid,
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav__toggle {
    display: block;
    margin-left: auto;
  }

  .nav__links {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 12px 18px 18px;
    background: var(--bg-alt);
    border-bottom: 4px solid var(--border);
    display: none;
  }

  .nav__links[data-open="true"] {
    display: flex;
  }

  .nav__link {
    padding: 12px 14px;
    font-size: 1rem;
  }

  .nav__actions .status {
    display: none;
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 84px;
  }

  body {
    font-size: 15.5px;
  }

  .section {
    padding: 42px 0;
  }

  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .news__item {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .cmdlist li {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .step {
    padding: 18px 18px 18px 18px;
  }

  .step::before {
    position: static;
    margin-bottom: 12px;
  }

  .footer__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

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

/* ------------------------------- 打印 -------------------------------- */
@media print {
  .nav,
  .toast,
  .footer__grid,
  .btn-row {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .card,
  .panel,
  .step,
  .table-wrap {
    box-shadow: none;
    break-inside: avoid;
  }
}
