/* ==========================================================================
   lawson —— Hexo 主题样式
   设计语言：Apple 的留白、材质与动效；皮肤 ba（蔚蓝档案）/ mc（Minecraft）
   两套皮肤共用同一套组件，靠 html[data-skin] 切换设计语言，
   html[data-mode] 控制深浅模式。
   ========================================================================== */

/* ------------------------------ 0. Fonts -------------------------------- */
/* 只包含 splash 文案用到的那些字形（约 2KB），由 tools/build-splash-font.mjs 生成 */
@font-face {
  font-family: "Unifont";
  src: url("../fonts/unifont-splash.woff2?h=beacd9ec") format("woff2");
  font-display: swap;
  font-weight: 400;
  font-style: normal;
}

/* ------------------------------- 1. Reset ------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: calc(16px * var(--font-scale, 1)); }
html { overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--fg);
  background: var(--bg-base);
  line-height: 1.65;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  /* 内容少时也要撑满一屏，避免底部露出背景图 */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img, svg, video { max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0; }
kbd {
  font-family: var(--font-mono); font-size: 0.72rem; padding: 2px 6px;
  border-radius: 6px; background: var(--kbd-bg); border: 1px solid var(--line);
  box-shadow: 0 1px 0 var(--line); color: var(--fg-2);
}
code { font-family: var(--font-mono); font-size: 0.9em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

/* --------------------------- 2. Design tokens --------------------------- */
html {
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.44, 1);
  --dur: 420ms;
  --radius: 26px;
  --radius-sm: 14px;
  --radius-lg: 34px;
  --glass-blur: 24px;
  --shell: 1140px;
  --bg-dim: 0.34;
  --bg-blur: 0px;
  --font-scale: 1;
  --topbar-h: 64px;

  /* 背景图的压暗层：JS 量顶栏背后那条的亮度时按同样的数值模拟，改这里两边一起变 */
  --scrim-1: 0.62;
  --scrim-2: 0.26;

  /* 顶栏压在背景图上时的字色（默认白字方案；JS 量出背景偏亮会给 <html> 打 data-bar-ink="dark"） */
  --bar-ink: #ffffff;
  --bar-ink-soft: rgba(255, 255, 255, 0.74);
  --bar-ink-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
  --bar-chip: rgba(255, 255, 255, 0.16);
  --bar-chip-line: rgba(255, 255, 255, 0.26);
  --bar-chip-hover: rgba(255, 255, 255, 0.16);
  --bar-glider: #ffffff;
  --bar-glider-ink: #10131a;
}

/* BA 皮肤 · 浅色（默认） */
html[data-skin="ba"] {
  --accent: #2f8dfb;
  --accent-2: #7cc4ff;
  --accent-fg: #ffffff;
  --accent-glow: rgba(47, 141, 251, 0.38);
  --bg-base: #eef2f8;
  --fg: #0b0d12;
  --fg-2: #5a6070;
  --fg-3: #8d93a2;
  --line: rgba(12, 16, 24, 0.09);
  --line-strong: rgba(12, 16, 24, 0.16);
  --surface: rgba(255, 255, 255, 0.84);
  --surface-solid: #ffffff;
  --glass: rgba(255, 255, 255, 0.6);
  --glass-strong: rgba(255, 255, 255, 0.74);
  --sheet-bg: rgba(247, 248, 251, 0.94);
  --topbar-bg: rgba(250, 251, 253, 0.72);
  --seg-bg: rgba(120, 130, 150, 0.14);
  --seg-line: rgba(12, 16, 24, 0.06);
  --glider: #ffffff;
  --kbd-bg: rgba(120, 130, 150, 0.12);
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 20px 50px rgba(15, 23, 42, 0.14);
  --shadow-lg: 0 40px 90px rgba(15, 23, 42, 0.22);
  --code-bg: rgba(15, 23, 42, 0.045);
  --mark: rgba(47, 141, 251, 0.22);
  --texture: none;
}

/* BA 皮肤 · 深色 */
html[data-skin="ba"][data-mode="dark"] {
  --accent: #62b3ff;
  --accent-2: #9fd8ff;
  --accent-fg: #04121f;
  --accent-glow: rgba(98, 179, 255, 0.34);
  --bg-base: #070810;
  --fg: #f4f5f8;
  --fg-2: #a6abb8;
  --fg-3: #767c8b;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --surface: rgba(24, 25, 32, 0.76);
  --surface-solid: #16171d;
  --glass: rgba(22, 23, 30, 0.58);
  --glass-strong: rgba(28, 30, 38, 0.68);
  --sheet-bg: rgba(11, 12, 16, 0.93);
  --topbar-bg: rgba(14, 15, 20, 0.68);
  --seg-bg: rgba(255, 255, 255, 0.1);
  --seg-line: rgba(255, 255, 255, 0.08);
  --glider: rgba(255, 255, 255, 0.16);
  --kbd-bg: rgba(255, 255, 255, 0.08);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 24px 60px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 50px 100px rgba(0, 0, 0, 0.6);
  --code-bg: rgba(255, 255, 255, 0.05);
  --mark: rgba(98, 179, 255, 0.28);
}

/* MC 皮肤 · 浅色 */
html[data-skin="mc"] {
  --accent: #5a9c3d;
  --accent-2: #86c455;
  --accent-fg: #ffffff;
  --accent-glow: rgba(90, 156, 61, 0.4);
  --bg-base: #ded3bf;
  --fg: #2b2119;
  --fg-2: #6b5a49;
  --fg-3: #8d7b67;
  --line: rgba(43, 33, 25, 0.18);
  --line-strong: #3d2f22;
  --surface: #f4ead7;
  --surface-solid: #f4ead7;
  --glass: rgba(244, 234, 215, 0.9);
  --glass-strong: rgba(247, 239, 223, 0.94);
  --sheet-bg: #efe5d2;
  --topbar-bg: rgba(60, 46, 34, 0.86);
  --seg-bg: rgba(0, 0, 0, 0.28);
  --seg-line: rgba(0, 0, 0, 0.4);
  --glider: #6f8f4a;
  --kbd-bg: rgba(43, 33, 25, 0.1);
  --shadow-xs: 0 1px 0 rgba(43, 33, 25, 0.4);
  --shadow-sm: 0 4px 0 rgba(43, 33, 25, 0.28);
  --shadow-md: 0 8px 0 rgba(43, 33, 25, 0.3);
  --shadow-lg: 0 14px 0 rgba(43, 33, 25, 0.28);
  --code-bg: rgba(43, 33, 25, 0.07);
  --mark: rgba(134, 196, 85, 0.4);
  --radius: 6px;
  --radius-sm: 4px;
  --radius-lg: 8px;
  --glass-blur: 8px;
  --font-display: "Pixelify Sans", "SF Pro Display", "PingFang SC", system-ui, sans-serif;
  --texture: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.035) 0 2px, transparent 2px 4px),
             repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.035) 0 2px, transparent 2px 4px);
}

/* MC 皮肤 · 深色 */
html[data-skin="mc"][data-mode="dark"] {
  --accent: #6fbf4a;
  --accent-2: #9ada6b;
  --accent-fg: #0d1a08;
  --accent-glow: rgba(111, 191, 74, 0.34);
  --bg-base: #1a1410;
  --fg: #f3ebdd;
  --fg-2: #b9aa96;
  --fg-3: #8b7c69;
  --line: rgba(0, 0, 0, 0.6);
  --line-strong: #0b0906;
  --surface: #241d17;
  --surface-solid: #241d17;
  --glass: rgba(30, 24, 19, 0.86);
  --glass-strong: rgba(36, 29, 23, 0.92);
  --sheet-bg: #191410;
  --topbar-bg: rgba(20, 16, 13, 0.86);
  --seg-bg: rgba(0, 0, 0, 0.45);
  --seg-line: rgba(0, 0, 0, 0.6);
  --glider: #4d7a34;
  --kbd-bg: rgba(255, 255, 255, 0.08);
  --shadow-xs: 0 1px 0 rgba(0, 0, 0, 0.6);
  --shadow-sm: 0 4px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 0 rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 14px 0 rgba(0, 0, 0, 0.45);
  --code-bg: rgba(255, 255, 255, 0.06);
  --mark: rgba(154, 218, 107, 0.3);
  --radius: 6px;
  --radius-sm: 4px;
  --radius-lg: 8px;
  --glass-blur: 8px;
  --font-display: "Pixelify Sans", "SF Pro Display", "PingFang SC", system-ui, sans-serif;
  --texture: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 2px, transparent 2px 4px),
             repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 2px, transparent 2px 4px);
}

/* 背景偏亮时，顶栏（以及皮肤切换 / 图标）改用深色字。
   data-bar-ink 由 JS 量出背景图亮度后打在最外层 <html> 上，见 source/js/background.js */
html[data-bar-ink="dark"] {
  --bar-ink: #10131a;
  --bar-ink-soft: rgba(16, 19, 26, 0.72);
  --bar-ink-shadow: 0 1px 14px rgba(255, 255, 255, 0.6);
  --bar-chip: rgba(255, 255, 255, 0.5);
  --bar-chip-line: rgba(16, 19, 26, 0.16);
  --bar-chip-hover: rgba(16, 19, 26, 0.1);
  --bar-glider: #10131a;
  --bar-glider-ink: #ffffff;
}

/* --------------------------- 3. Background ----------------------------- */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--bg-base); }
.bg__img {
  position: absolute; inset: -3%;
  background-image: var(--bg-image, none);
  background-size: cover;
  background-position: center;
  filter: blur(var(--bg-blur, 0px));
  transform: scale(1.03);
  transition: opacity 900ms var(--ease);
}
html:not([data-has-bg]) .bg__img {
  background-image: linear-gradient(135deg, var(--accent-2), var(--bg-base) 60%);
  opacity: 0.6;
}
.bg__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 8, 15, var(--scrim-1, 0.62)) 0%, rgba(5, 8, 15, var(--scrim-2, 0.26)) 26%, rgba(5, 8, 15, 0.06) 52%, rgba(5, 8, 15, 0.22) 100%),
    rgba(5, 8, 15, var(--bg-dim, 0.34));
}
.bg__grain { position: absolute; inset: 0; background-image: var(--texture); opacity: 0.9; }
html[data-skin="mc"] .bg__grain { opacity: 0.45; }

/* ------------------------------ 4. Topbar ------------------------------ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid transparent;
  transition: background-color 500ms var(--ease), border-color 500ms var(--ease), box-shadow 500ms var(--ease), backdrop-filter 500ms var(--ease);
}
.topbar__inner {
  max-width: 1240px; margin: 0 auto; height: var(--topbar-h);
  display: flex; align-items: center; gap: 16px; padding: 0 22px;
}
.topbar__brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 1rem; white-space: nowrap; }
.topbar__brand-text { overflow: hidden; text-overflow: ellipsis; }
.topbar__mark {
  width: 22px; height: 22px; border-radius: 7px; flex: none;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 4px 14px var(--accent-glow);
}
[data-skin="mc"] .topbar__mark { border-radius: 2px; border: 2px solid var(--line-strong); box-shadow: none; }

.topbar__nav { display: flex; align-items: center; gap: 4px; margin-left: 14px; }
.topbar__link {
  position: relative; padding: 8px 12px; border-radius: 999px; font-size: 0.9rem; font-weight: 550;
  color: inherit; opacity: 0.72; transition: opacity 250ms var(--ease), background-color 250ms var(--ease);
}
.topbar__link:hover { opacity: 1; }
.topbar__link.is-active { opacity: 1; }
.topbar__link.is-active::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; width: 16px; height: 2px;
  transform: translateX(-50%); border-radius: 2px; background: currentColor; opacity: 0.7;
}
[data-skin="mc"] .topbar__link { border-radius: 2px; }

.topbar__controls { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; color: inherit; opacity: 0.86;
  transition: background-color 220ms var(--ease), opacity 220ms var(--ease), transform 220ms var(--ease-spring);
}
.icon-btn:hover { opacity: 1; background: rgba(125, 135, 155, 0.16); }
.icon-btn:active { transform: scale(0.93); }
.icon-btn--small { width: 30px; height: 30px; }
.icon-btn--mobile { display: none; }
[data-skin="mc"] .icon-btn { border-radius: 3px; }

.icon { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-brand {
  width: 1.15em; height: 1.15em; flex: none; background-color: currentColor;
  -webkit-mask: var(--icon-src) center / contain no-repeat; mask: var(--icon-src) center / contain no-repeat;
}
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* 顶栏在首屏与背景融合：无分割线。
   注意只有首页、且没滚动时顶栏底下才是背景图，别的页面早就换成毛玻璃了；
   :where() 不增加权重，皮肤自己的覆盖规则照旧生效。
   字色用 --bar-ink：背景偏亮时 JS 会把它换成深色。 */
:where(html[data-page="index"]) .topbar:not(.is-scrolled) .topbar__brand,
:where(html[data-page="index"]) .topbar:not(.is-scrolled) .topbar__link,
:where(html[data-page="index"]) .topbar:not(.is-scrolled) .icon-btn {
  color: var(--bar-ink);
  text-shadow: var(--bar-ink-shadow);
}
:where(html[data-page="index"]) .topbar:not(.is-scrolled) .topbar__link.is-active::after { opacity: 0.9; }
:where(html[data-page="index"]) .topbar:not(.is-scrolled) .icon-btn:hover { background: var(--bar-chip-hover); }
:where(html[data-page="index"]) .topbar:not(.is-scrolled) .segmented { background: var(--bar-chip); border-color: var(--bar-chip-line); }
:where(html[data-page="index"]) .topbar:not(.is-scrolled) .segmented__item { color: var(--bar-ink-soft); }
:where(html[data-page="index"]) .topbar:not(.is-scrolled) .segmented__item.is-active { color: var(--bar-glider-ink); }
:where(html[data-page="index"]) .topbar:not(.is-scrolled) .segmented__glider { background: var(--bar-glider); }

/* 滚动后（以及非首页）与背景分离：毛玻璃 + 分隔线 */
.topbar.is-scrolled, html:not([data-page="index"]) .topbar {
  background: var(--topbar-bg);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 40px rgba(8, 10, 18, 0.16);
}
html:not([data-page="index"]) .topbar { color: var(--fg); }
html[data-skin="mc"] .topbar.is-scrolled,
html[data-skin="mc"]:not([data-page="index"]) .topbar {
  border-bottom-color: var(--line-strong);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
}
html[data-skin="mc"] .topbar,
html[data-skin="mc"] .topbar a,
html[data-skin="mc"] .topbar button { color: #fff; }
html[data-skin="mc"] .topbar__link.is-active { color: var(--accent-2); }

/* --------------------------- 5. Segmented ------------------------------ */
.segmented {
  position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  gap: 2px; padding: 3px; border-radius: 999px;
  background: var(--seg-bg); border: 1px solid var(--seg-line);
  transition: background-color 300ms var(--ease);
}
.segmented__glider {
  position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px;
  width: calc((100% - 6px) / 2); border-radius: 999px; background: var(--glider);
  box-shadow: 0 2px 8px rgba(10, 14, 25, 0.14);
  transition: transform 460ms var(--ease);
}
.segmented[data-index="1"] .segmented__glider { transform: translateX(100%); }
.segmented__item {
  position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 30px; padding: 0 14px; border-radius: 999px;
  font-size: 0.8rem; font-weight: 650; color: var(--fg-2);
  transition: color 300ms var(--ease);
}
.segmented__item.is-active { color: var(--fg); }
.segmented__name { display: none; }
@media (min-width: 1100px) {
  .segmented__name { display: inline; }
  .segmented__short { display: none; }
}
[data-skin="mc"] .segmented, [data-skin="mc"] .segmented__glider, [data-skin="mc"] .segmented__item { border-radius: 3px; }

/* ----------------------------- 6. Popover ------------------------------ */
.anchor { position: relative; }
.popover {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 70; min-width: 190px;
  padding: 8px; border-radius: 18px; background: var(--glass-strong);
  border: 1px solid var(--line); box-shadow: var(--shadow-md);
  backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px);
  color: var(--fg);
  animation: pop-in 260ms var(--ease) both;
}
.popover__item {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px;
  font-size: 0.9rem; color: var(--fg); text-align: left;
  transition: background-color 200ms var(--ease);
}
.popover__item:hover { background: rgba(125, 135, 155, 0.16); }
.popover__check { margin-left: auto; opacity: 0; color: var(--accent); }
.popover__item.is-active { background: rgba(125, 135, 155, 0.14); }
.popover__item.is-active .popover__check { opacity: 1; }
[data-skin="mc"] .popover { border-radius: 4px; border-width: 3px; border-color: var(--line-strong); box-shadow: 0 6px 0 rgba(0, 0, 0, 0.4); }
[data-skin="mc"] .popover__item { border-radius: 2px; }

/* ------------------------------ 7. Hero -------------------------------- */
.main { position: relative; z-index: 1; flex: 1 1 auto; display: flex; flex-direction: column; }
.main > .sheet { flex: 1 1 auto; }
.hero {
  position: relative; min-height: 100svh; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: calc(var(--topbar-h) + 40px) 24px 120px; color: #fff;
  overflow: clip;
}
.hero__inner { position: relative; max-width: 900px; display: grid; gap: 22px; justify-items: center; }
.hero__inner::before {
  content: ""; position: absolute; left: 50%; top: 46%; width: min(920px, 120vw); aspect-ratio: 1;
  transform: translate(-50%, -50%); z-index: -1; pointer-events: none;
  background: radial-gradient(circle, var(--accent-glow) 0%, rgba(0, 0, 0, 0) 62%);
  opacity: 0.9; filter: blur(10px);
}
.hero__eyebrow {
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}
/* 只显示当前皮肤的文案：html[data-skin] 决定 */
html[data-skin="ba"] [data-only-skin]:not([data-only-skin="ba"]) { display: none; }
html[data-skin="mc"] [data-only-skin]:not([data-only-skin="mc"]) { display: none; }
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 5.2rem); line-height: 1.03; letter-spacing: -0.035em;
  text-shadow: 0 10px 50px rgba(4, 8, 18, 0.5);
  max-width: 18ch;
}
.hero__sub { display: inline-flex; align-items: center; min-height: 1.8em; font-size: clamp(1rem, 2.1vw, 1.35rem); color: rgba(255, 255, 255, 0.86); }
.hero__caret { width: 2px; height: 1.15em; margin-left: 4px; background: currentColor; animation: blink 1.05s steps(2, start) infinite; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 6px; }
.hero__scroll {
  position: absolute; left: 50%; bottom: calc(112px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 0.78rem; letter-spacing: 0.14em; color: rgba(255, 255, 255, 0.72);
}
.hero__scroll .icon { animation: float-y 2.4s var(--ease) infinite; }
.hero__splash {
  display: none;
  position: absolute; right: max(6vw, 22px); top: 30%;
  font-family: var(--font-display);
  /* Unifont 是 16px 点阵字体，这里按 2 倍左右渲染，笔画刚好够粗、描边才不会吃掉字形 */
  font-size: clamp(1.5rem, 4.6vw, 2.1rem);
  line-height: 1.2;
  white-space: nowrap;
  color: var(--splash-color, #ffe95c);
  --splash-outline-width: 2px;
  --splash-angle: -14deg;
  --splash-pulse-scale: 1.09;
  --splash-pulse-duration: 1.1s;
  transform: rotate(var(--splash-angle)) scale(1);
  transform-origin: 50% 50%;
  /* 原版观感：字影是同色系压暗、按字号等比偏移 1px（0.1em） */
  text-shadow:
    0.1em 0.1em 0 var(--splash-shadow, #3f3f00),
    0 0 14px rgba(0, 0, 0, 0.28);
  animation: var(--splash-animation, mc-splash-pulse var(--splash-pulse-duration) ease-in-out infinite);
}
/* 可选描边：把 lawson.splash.outline_width 调成 > 0 才会启用 */
.hero__splash[data-splash-outline="on"] {
  text-shadow:
    calc(-1 * var(--splash-outline-width)) calc(-1 * var(--splash-outline-width)) 0 var(--splash-outline, #fff),
    calc(-1 * var(--splash-outline-width)) 0 0 var(--splash-outline, #fff),
    calc(-1 * var(--splash-outline-width)) var(--splash-outline-width) 0 var(--splash-outline, #fff),
    0 calc(-1 * var(--splash-outline-width)) 0 var(--splash-outline, #fff),
    0 var(--splash-outline-width) 0 var(--splash-outline, #fff),
    var(--splash-outline-width) calc(-1 * var(--splash-outline-width)) 0 var(--splash-outline, #fff),
    var(--splash-outline-width) 0 0 var(--splash-outline, #fff),
    var(--splash-outline-width) var(--splash-outline-width) 0 var(--splash-outline, #fff),
    0.1em 0.1em 0 var(--splash-shadow, #3f3f00),
    0 0 12px rgba(0, 0, 0, 0.3);
}
/* Minecraft 同款像素字体（Unifont 子集），保证中文也是点阵 */
.hero__splash[data-splash-font="unifont"] { font-family: "Unifont", "Pixelify Sans", "PingFang SC", monospace; }
@keyframes mc-splash-pulse {
  0%, 100% { transform: rotate(var(--splash-angle)) scale(1); }
  50% { transform: rotate(var(--splash-angle)) scale(var(--splash-pulse-scale)); }
}
[data-skin="mc"] .hero__splash { display: block; }
html[data-motion="reduced"] .hero__splash { animation: none; }
[data-skin="mc"] .hero__title { font-size: clamp(2.1rem, 5.4vw, 4.2rem); max-width: 26ch; }
[data-skin="mc"] .hero__inner::before { background: radial-gradient(circle, rgba(120, 200, 90, 0.28) 0%, rgba(0, 0, 0, 0) 62%); }
[data-skin="mc"] .hero__title { letter-spacing: 0.01em; text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5); }
[data-skin="mc"] .hero__eyebrow { font-family: var(--font-display); }

/* ------------------------------ 8. Sheet ------------------------------- */
.sheet {
  position: relative; z-index: 2;
  background: var(--sheet-bg);
  background-image: var(--texture);
  border-top: 1px solid var(--line);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -30px 70px rgba(6, 9, 16, 0.28);
  padding: 56px 0 0;
}
.layout-index .sheet { margin-top: -84px; }
.layout-post .sheet, .layout-page .sheet, .layout-archive .sheet,
.layout-tag .sheet, .layout-category .sheet, .layout-settings .sheet, .layout-404 .sheet { margin-top: 96px; }
html[data-skin="mc"] .sheet {
  border-radius: 0; border-top: 0; box-shadow: 0 -8px 0 #6b4a2f, 0 -18px 0 #5aa64a, 0 -30px 70px rgba(6, 9, 16, 0.3);
}
html[data-skin="mc"] .layout-post .sheet,
html[data-skin="mc"] .layout-page .sheet,
html[data-skin="mc"] .layout-archive .sheet,
html[data-skin="mc"] .layout-tag .sheet,
html[data-skin="mc"] .layout-category .sheet,
html[data-skin="mc"] .layout-settings .sheet,
html[data-skin="mc"] .layout-404 .sheet { margin-top: 132px; }

.section { max-width: var(--shell); margin: 0 auto; padding: 0 24px; }
.section + .section { margin-top: 84px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.section__title { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -0.02em; }
.section__more { display: inline-flex; align-items: center; gap: 6px; font-size: 0.92rem; color: var(--accent); font-weight: 600; }
.section__more .icon { transition: transform 320ms var(--ease); }
.section__more:hover .icon { transform: translateX(3px); }
.section--posts { padding-top: 24px; }
.section--error { padding-top: 40px; padding-bottom: 80px; }
.empty { color: var(--fg-2); }

/* ------------------------------ 9. Cards ------------------------------- */
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card--glass {
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(var(--glass-blur));
  -webkit-backdrop-filter: saturate(180%) blur(var(--glass-blur));
}
html[data-skin="mc"] .card {
  border: 3px solid var(--line-strong);
  box-shadow: inset -4px -4px 0 rgba(0, 0, 0, 0.16), inset 4px 4px 0 rgba(255, 255, 255, 0.22), 0 6px 0 rgba(0, 0, 0, 0.3);
}
html[data-skin="mc"] .card--glass { backdrop-filter: none; -webkit-backdrop-filter: none; }

/* ----------------------------- 10. Profile ----------------------------- */
.section--profile { margin-top: 0; }
.profile { padding: 34px; display: grid; gap: 30px; }
.profile__top { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.profile__avatar-wrap { position: relative; width: 120px; height: 120px; flex: none; }
.profile__halo {
  position: absolute; inset: -12px; border-radius: 50%;
  background: conic-gradient(from 140deg, var(--accent-2), var(--accent), var(--accent-2));
  filter: blur(14px); opacity: 0.55;
  animation: spin 18s linear infinite;
}
.profile__avatar {
  position: relative; width: 120px; height: 120px; border-radius: 34px; object-fit: cover;
  border: 3px solid var(--surface-solid); box-shadow: var(--shadow-md);
}
html[data-skin="mc"] .profile__halo { display: none; }
html[data-skin="mc"] .profile__avatar { border-radius: 3px; border: 4px solid var(--line-strong); box-shadow: 0 6px 0 rgba(0, 0, 0, 0.35); }
.profile__id { display: grid; gap: 6px; min-width: 0; }
.eyebrow { font-size: 0.76rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); font-weight: 650; }
.profile__name { font-family: var(--font-display); font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -0.03em; }
.profile__email { display: inline-flex; align-items: center; gap: 8px; color: var(--fg-2); font-size: 0.95rem; }
.profile__email:hover { color: var(--accent); }
.profile__groups { display: grid; gap: 20px; }
.group { display: grid; gap: 10px; }
.group__label { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 650; color: var(--fg-2); }
.group__label .icon { color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px; font-size: 0.88rem; font-weight: 550;
  background: var(--glass-strong); border: 1px solid var(--line); color: var(--fg);
  transition: transform 260ms var(--ease-spring), box-shadow 260ms var(--ease);
}
.chip:hover { transform: translateY(-1px); box-shadow: var(--shadow-xs); }
.chip--link { color: var(--accent); }
.chip__count { font-size: 0.76rem; color: var(--fg-3); }
.chips--large .chip { padding: 9px 16px; font-size: 0.95rem; }
html[data-skin="mc"] .chip {
  border-radius: 3px; border: 2px solid var(--line-strong); background: var(--surface);
  box-shadow: inset -2px -2px 0 rgba(0, 0, 0, 0.14), inset 2px 2px 0 rgba(255, 255, 255, 0.24);
}
.profile__links { display: grid; gap: 10px; }
.field__label { font-size: 0.85rem; font-weight: 650; color: var(--fg-2); }
.links { display: flex; flex-wrap: wrap; gap: 10px; }
.link-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: var(--glass-strong); border: 1px solid var(--line); font-size: 0.88rem; font-weight: 550;
  transition: transform 260ms var(--ease-spring), color 260ms var(--ease), border-color 260ms var(--ease);
}
.link-pill:hover { transform: translateY(-2px); color: var(--accent); border-color: var(--accent); }
html[data-skin="mc"] .link-pill { border-radius: 3px; border-width: 2px; border-color: var(--line-strong); }

/* ------------------------------- 11. Buttons --------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 0 22px; border-radius: 999px;
  font-size: 0.95rem; font-weight: 620; letter-spacing: -0.01em;
  transition: transform 240ms var(--ease-spring), box-shadow 240ms var(--ease), background-color 240ms var(--ease), color 240ms var(--ease);
}
.btn .icon { width: 1.1em; height: 1.1em; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--accent); color: var(--accent-fg); box-shadow: 0 14px 30px var(--accent-glow); }
.btn--primary:hover { box-shadow: 0 18px 40px var(--accent-glow); }
.btn--glass {
  background: var(--glass-strong); color: #fff; border: 1px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
}
.btn--ghost { background: var(--glass-strong); color: var(--fg); border: 1px solid var(--line); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--small { min-height: 38px; padding: 0 16px; font-size: 0.86rem; }
[data-skin="mc"] .btn {
  border-radius: 3px; font-family: var(--font-display); letter-spacing: 0.04em;
  box-shadow: inset -3px -3px 0 rgba(0, 0, 0, 0.28), inset 3px 3px 0 rgba(255, 255, 255, 0.28), 0 5px 0 rgba(0, 0, 0, 0.35);
}
[data-skin="mc"] .btn:hover { transform: translateY(0); filter: brightness(1.06); }
[data-skin="mc"] .btn:active { transform: translateY(3px); box-shadow: inset 3px 3px 0 rgba(0, 0, 0, 0.28), inset -3px -3px 0 rgba(255, 255, 255, 0.28), 0 1px 0 rgba(0, 0, 0, 0.35); }
[data-skin="mc"] .btn--glass { color: #fff; border: 3px solid rgba(0, 0, 0, 0.45); }

/* --------------------------- 12. Post cards ---------------------------- */
.post-grid { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.post-card { transition: transform 420ms var(--ease), box-shadow 420ms var(--ease), border-color 420ms var(--ease); overflow: hidden; }
.post-card__link { display: grid; gap: 14px; padding: 26px 26px 22px; height: 100%; align-content: start; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--accent) 32%, var(--line)); }
.post-card__meta { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.post-card__title { font-family: var(--font-display); font-size: 1.22rem; line-height: 1.35; letter-spacing: -0.015em; }
.post-card__excerpt { color: var(--fg-2); font-size: 0.94rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px;
  font-size: 0.76rem; font-weight: 550; color: var(--fg-2);
  background: var(--kbd-bg); border: 1px solid var(--line);
}
a.tag:hover { color: var(--accent); border-color: var(--accent); }
.post-card__more { display: inline-flex; align-items: center; gap: 6px; font-size: 0.86rem; font-weight: 600; color: var(--accent); margin-top: 2px; }
.post-card__more .icon { transition: transform 320ms var(--ease); }
.post-card:hover .post-card__more .icon { transform: translateX(4px); }
html[data-skin="mc"] .post-card__title { letter-spacing: 0.01em; }
html[data-skin="mc"] .tag { border-radius: 2px; border-width: 2px; border-color: var(--line-strong); }

/* ------------------------------- 13. Outro ----------------------------- */
.section--outro { margin-bottom: 90px; }
.outro { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 32px 34px; flex-wrap: wrap; }
.outro__text { display: grid; gap: 6px; }
.outro__title { font-family: var(--font-display); font-size: 1.5rem; }
.outro__lead { color: var(--fg-2); font-size: 0.95rem; max-width: 52ch; }

/* ---------------------------- 14. Article/prose ------------------------- */
.sheet--article { padding-bottom: 60px; }
.article { max-width: 760px; margin: 0 auto; padding: 48px 24px 0; }
.article__head { display: grid; gap: 16px; margin-bottom: 30px; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--fg-3); flex-wrap: wrap; }
.crumbs a:hover { color: var(--accent); }
.article__title { font-family: var(--font-display); font-size: clamp(1.9rem, 5vw, 3rem); letter-spacing: -0.03em; line-height: 1.14; }
.article__lead { color: var(--fg-2); font-size: 1.05rem; }
.article__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 0.85rem; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.article__foot { display: grid; gap: 26px; margin-top: 46px; padding-top: 26px; border-top: 1px solid var(--line); }
.article__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.post-nav { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .post-nav { grid-template-columns: 1fr 1fr; } }
.post-nav__item { display: grid; gap: 4px; padding: 18px 20px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); transition: transform 320ms var(--ease), border-color 320ms var(--ease); }
.post-nav__item:hover { transform: translateY(-2px); border-color: var(--accent); }
.post-nav__item--next { text-align: right; }
.post-nav__label { font-size: 0.76rem; color: var(--fg-3); }
.post-nav__title { font-weight: 600; font-size: 0.95rem; }

.prose { font-size: 1.03rem; line-height: 1.82; color: var(--fg); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-family: var(--font-display); font-size: 1.5rem; margin-top: 2em; letter-spacing: -0.02em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.7em; }
.prose h4 { font-size: 1.05rem; margin-top: 1.5em; color: var(--fg-2); }
.prose p { color: var(--fg); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose ul { list-style: none; }
.prose ul > li { position: relative; }
.prose ul > li::before {
  content: ""; position: absolute; left: -1.05em; top: 0.72em; width: 6px; height: 6px;
  border-radius: 50%; background: var(--accent); opacity: 0.8;
}
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.4em; }
.prose blockquote {
  margin-left: 0; margin-right: 0; padding: 4px 0 4px 18px;
  border-left: 3px solid var(--accent); color: var(--fg-2); font-style: normal;
}
.prose img { border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose code { background: var(--code-bg); padding: 2px 6px; border-radius: 6px; }
.prose pre code { background: none; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.94rem; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 14px; border: 1px solid var(--line); text-align: left; }
.prose th { background: var(--code-bg); font-weight: 650; }
.prose .md-figure { display: grid; gap: 8px; margin: 1.8em 0; }
.prose .md-figure figcaption { font-size: 0.84rem; color: var(--fg-3); text-align: center; }
.prose mark { background: var(--mark); color: inherit; padding: 0 3px; border-radius: 3px; }

/* 代码块（hexo highlight.js 结构） */
.highlight {
  background: var(--code-bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  margin: 1.6em 0; overflow: hidden; font-size: 0.88rem;
}
.highlight table { display: table; width: 100%; border-collapse: collapse; margin: 0; }
.highlight td { border: 0; padding: 0; vertical-align: top; }
.highlight .gutter { width: 46px; user-select: none; border-right: 1px solid var(--line); }
.highlight .gutter pre { margin: 0; padding: 16px 10px 16px 0; text-align: right; color: var(--fg-3); background: none; }
.highlight .code pre { margin: 0; padding: 16px 18px; overflow-x: auto; background: none; line-height: 1.65; }
.highlight pre { background: var(--code-bg); }
.hljs-comment, .hljs-quote { color: var(--fg-3); font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-type { color: #c0392b; }
.hljs-string, .hljs-attr, .hljs-addition { color: #2f8f5b; }
.hljs-number, .hljs-meta { color: #b7791f; }
.hljs-title, .hljs-section, .hljs-function .hljs-title { color: #2f6ff5; font-weight: 600; }
.hljs-built_in, .hljs-class .hljs-title { color: #8e44ad; }
.hljs-variable, .hljs-template-variable { color: #d35400; }
html[data-mode="dark"] .hljs-keyword, html[data-mode="dark"] .hljs-selector-tag, html[data-mode="dark"] .hljs-literal { color: #ff8b7b; }
html[data-mode="dark"] .hljs-string, html[data-mode="dark"] .hljs-attr { color: #86e2a8; }
html[data-mode="dark"] .hljs-number, html[data-mode="dark"] .hljs-meta { color: #ffd479; }
html[data-mode="dark"] .hljs-title, html[data-mode="dark"] .hljs-section { color: #7fb6ff; }
html[data-mode="dark"] .hljs-built_in, html[data-mode="dark"] .hljs-class .hljs-title { color: #d0a6ff; }
html[data-mode="dark"] .hljs-variable { color: #ffb27a; }

/* --------------------------- 15. Page furniture ------------------------- */
.section--subscribe { padding-bottom: 70px; }
.subscribe { display: grid; gap: 26px; padding: 30px; }
@media (min-width: 780px) { .subscribe { grid-template-columns: minmax(0, 1fr) auto; align-items: start; } }
.subscribe__main { display: grid; gap: 14px; min-width: 0; }
.copybox {
  display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 4px;
  border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--line);
}
.copybox__input {
  flex: 1; min-width: 0; height: 34px; padding: 0 12px; border: 0; outline: none; background: none;
  font-family: var(--font-mono); font-size: 0.88rem; color: var(--fg-2); text-overflow: ellipsis;
}
.subscribe__hint { font-size: 0.86rem; color: var(--fg-3); }
.subscribe__readers { display: flex; flex-wrap: wrap; gap: 10px; }
.reader {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  background: var(--glass-strong); border: 1px solid var(--line); font-size: 0.9rem; font-weight: 600;
  transition: transform 260ms var(--ease-spring), color 260ms var(--ease), border-color 260ms var(--ease);
}
.reader:hover { transform: translateY(-2px); color: var(--accent); border-color: var(--accent); }
.reader .icon { opacity: 0.55; width: 1em; height: 1em; }
.subscribe__raw { font-size: 0.8rem; color: var(--fg-3); }
.subscribe__raw a { color: var(--accent); }
.subscribe__qr { margin: 0; display: grid; gap: 10px; justify-items: center; }
.subscribe__qr svg {
  width: 148px; height: 148px; padding: 14px; border-radius: 20px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.subscribe__qr figcaption { font-size: 0.78rem; color: var(--fg-3); }
.subscribe__note { max-width: 760px; margin-top: 34px; }
html[data-skin="mc"] .copybox,
html[data-skin="mc"] .reader { border-radius: 4px; border-width: 2px; border-color: var(--line-strong); }
html[data-skin="mc"] .subscribe__qr svg { border-radius: 4px; border-width: 3px; border-color: var(--line-strong); }

.page-head { display: grid; gap: 10px; margin-bottom: 34px; }
.page-title { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.03em; }
.page-lead { color: var(--fg-2); }
.section--archive, .section--taxonomy { padding-bottom: 70px; }
.timeline { display: grid; gap: 34px; }
.timeline__group { display: grid; gap: 12px; }
.timeline__year { font-family: var(--font-display); font-size: 1.35rem; color: var(--accent); }
.timeline__list { display: grid; gap: 2px; }
.timeline__item { display: flex; align-items: center; gap: 16px; padding: 12px 14px; border-radius: var(--radius-sm); transition: background-color 260ms var(--ease); }
.timeline__item:hover { background: var(--code-bg); }
.timeline__date { font-family: var(--font-mono); font-size: 0.82rem; color: var(--fg-3); min-width: 52px; }
.timeline__title { font-weight: 600; }
.timeline__tags { margin-left: auto; font-size: 0.76rem; color: var(--fg-3); }
.post-list { display: grid; gap: 2px; }
.post-list__link { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 18px; border-radius: var(--radius-sm); transition: background-color 260ms var(--ease), transform 320ms var(--ease); }
.post-list__link:hover { background: var(--code-bg); transform: translateX(3px); }
.post-list__title { font-weight: 600; }
.post-list__date { font-size: 0.82rem; color: var(--fg-3); font-variant-numeric: tabular-nums; }

.error { padding: 54px 40px; display: grid; gap: 14px; justify-items: center; text-align: center; }
.error__code { font-family: var(--font-display); font-size: clamp(4rem, 14vw, 8rem); line-height: 1; color: var(--accent); opacity: 0.9; }
.error__title { font-family: var(--font-display); font-size: 1.6rem; }
.error__lead { color: var(--fg-2); max-width: 44ch; }
.error__actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

/* 分页 */
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 44px; flex-wrap: wrap; }
.pagination li { display: inline-flex; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 12px;
  border-radius: 999px; font-size: 0.88rem; color: var(--fg-2); border: 1px solid var(--line); background: var(--glass-strong);
}
.pagination a:hover { color: var(--accent); border-color: var(--accent); }
.pagination .current { background: var(--accent); color: var(--accent-fg); border-color: transparent; }
html[data-skin="mc"] .pagination a, html[data-skin="mc"] .pagination span { border-radius: 3px; border-width: 2px; border-color: var(--line-strong); }

/* ---------------------------- 16. Settings ------------------------------ */
.settings { display: grid; gap: 30px; }
.settings__group { display: grid; gap: 16px; }
.settings__title { font-family: var(--font-display); font-size: 1.05rem; color: var(--fg-2); letter-spacing: 0.01em; }
.field { display: grid; gap: 10px; }
.field--row { grid-template-columns: 1fr auto; align-items: center; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.field--row:last-child { border-bottom: 0; }
.field--sub { padding-left: 16px; opacity: 0.92; }
.field__label { display: grid; gap: 3px; font-size: 0.95rem; font-weight: 600; color: var(--fg); }
.field__hint { font-size: 0.78rem; font-weight: 450; color: var(--fg-3); }
.field__control { display: inline-flex; align-items: center; gap: 12px; min-width: 190px; justify-content: flex-end; }
.range { -webkit-appearance: none; appearance: none; width: 130px; height: 4px; border-radius: 999px; background: var(--seg-bg); outline-offset: 8px; }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--surface-solid); border: 1px solid var(--line-strong);
  box-shadow: 0 3px 10px rgba(10, 14, 25, 0.24); cursor: grab;
  transition: transform 200ms var(--ease-spring);
}
.range::-webkit-slider-thumb:active { transform: scale(1.12); cursor: grabbing; }
.range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--surface-solid); border: 1px solid var(--line-strong); box-shadow: 0 3px 10px rgba(10, 14, 25, 0.24); }
.range__output { font-family: var(--font-mono); font-size: 0.8rem; color: var(--fg-3); min-width: 52px; text-align: right; }
html[data-skin="mc"] .range { border-radius: 2px; height: 6px; border: 2px solid var(--line-strong); }
html[data-skin="mc"] .range::-webkit-slider-thumb { border-radius: 2px; border-width: 2px; }

.switch { position: relative; display: inline-flex; align-items: center; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch__track {
  width: 52px; height: 32px; border-radius: 999px; background: var(--seg-bg); border: 1px solid var(--line);
  display: inline-flex; align-items: center; padding: 3px; transition: background-color 320ms var(--ease), border-color 320ms var(--ease);
}
.switch__thumb {
  width: 24px; height: 24px; border-radius: 50%; background: var(--surface-solid);
  box-shadow: 0 2px 8px rgba(10, 14, 25, 0.28); transition: transform 340ms var(--ease-spring);
}
.switch input:checked + .switch__track { background: var(--accent); border-color: transparent; }
.switch input:checked + .switch__track .switch__thumb { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--accent); outline-offset: 2px; }
html[data-skin="mc"] .switch__track { border-radius: 3px; border-width: 2px; border-color: var(--line-strong); }
html[data-skin="mc"] .switch__thumb { border-radius: 2px; }

.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  background: var(--glass-strong); border: 1px solid var(--line); font-size: 0.9rem; font-weight: 550; color: var(--fg-2);
  transition: transform 260ms var(--ease-spring), color 260ms var(--ease), border-color 260ms var(--ease), background-color 260ms var(--ease);
}
.choice:hover { transform: translateY(-1px); }
.choice.is-active { color: var(--accent); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.choices--skin { display: grid; gap: 10px; }
@media (min-width: 620px) { .choices--skin { grid-template-columns: 1fr 1fr; } }
.choice--skin { justify-content: flex-start; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm); text-align: left; }
.choice__badge {
  width: 38px; height: 38px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; font-weight: 700; font-size: 0.82rem; color: #fff;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
}
.choice__text { display: grid; gap: 2px; min-width: 0; }
.choice__name { font-weight: 650; color: var(--fg); }
.choice__tagline { font-size: 0.76rem; color: var(--fg-3); }
.choice__check { margin-left: auto; opacity: 0; color: var(--accent); }
.choice--skin.is-active .choice__check { opacity: 1; }
html[data-skin="mc"] .choice { border-radius: 3px; border-width: 2px; border-color: var(--line-strong); }
html[data-skin="mc"] .choice__badge { border-radius: 2px; border: 2px solid var(--line-strong); }
.settings__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 8px; }
.settings__note { font-size: 0.82rem; color: var(--fg-3); max-width: 56ch; }
.settings-card { padding: 30px; }
.settings-note { max-width: 760px; margin: 34px auto 0; padding: 0 24px; }
.section--settings { padding-bottom: 70px; }

/* ------------------------------ 17. Panel ------------------------------- */
.panel { position: fixed; inset: 0; z-index: 90; }
.panel__scrim { position: absolute; inset: 0; background: rgba(6, 9, 16, 0.42); backdrop-filter: blur(3px); animation: fade-in 300ms var(--ease) both; }
.panel__dialog {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(430px, 100vw);
  display: flex; flex-direction: column; background: var(--sheet-bg);
  border-left: 1px solid var(--line); box-shadow: var(--shadow-lg);
  animation: slide-in-right 460ms var(--ease) both;
  padding-top: env(safe-area-inset-top);
}
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.panel__title { font-family: var(--font-display); font-size: 1.15rem; }
.panel__content { overflow-y: auto; padding: 20px 24px calc(40px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
html[data-skin="mc"] .panel__dialog { border-left: 4px solid var(--line-strong); }
html[data-skin="mc"] .panel__head { border-bottom: 3px solid var(--line-strong); }

/* ------------------------------ 18. Search ------------------------------ */
.search { position: fixed; inset: 0; z-index: 95; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 20px 40px; }
.search__scrim { position: absolute; inset: 0; background: rgba(6, 9, 16, 0.5); backdrop-filter: blur(6px); animation: fade-in 260ms var(--ease) both; }
.search__dialog {
  position: relative; width: min(660px, 100%); max-height: 70vh; display: flex; flex-direction: column;
  background: var(--glass-strong); border: 1px solid var(--line); border-radius: 24px;
  box-shadow: var(--shadow-lg); overflow: hidden;
  backdrop-filter: saturate(180%) blur(28px); -webkit-backdrop-filter: saturate(180%) blur(28px);
  animation: pop-in 320ms var(--ease) both;
}
.search__field { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.search__field .icon { color: var(--fg-3); width: 1.35em; height: 1.35em; }
.search__input { flex: 1; min-width: 0; height: 34px; background: none; border: 0; outline: none; font-size: 1.05rem; color: var(--fg); }
.search__input::placeholder { color: var(--fg-3); }
.search__input::-webkit-search-cancel-button, .search__input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.search__results { overflow-y: auto; padding: 10px; display: grid; gap: 4px; }
.search__hint { padding: 26px 14px; text-align: center; color: var(--fg-3); font-size: 0.92rem; }
.search-result {
  display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; text-align: left; width: 100%;
  transition: background-color 200ms var(--ease);
}
.search-result:hover, .search-result.is-active { background: var(--kbd-bg); }
.search-result__head { display: flex; align-items: center; gap: 10px; }
.search-result__title { font-weight: 620; font-size: 0.98rem; }
.search-result__date { margin-left: auto; font-size: 0.76rem; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.search-result__excerpt { font-size: 0.85rem; color: var(--fg-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.search-result__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.search-result mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 2px; }
.search__footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 0.78rem; color: var(--fg-3); }
.search__keys { display: inline-flex; align-items: center; gap: 4px; }
html[data-skin="mc"] .search__dialog { border-radius: 4px; border-width: 3px; border-color: var(--line-strong); }
html[data-skin="mc"] .search-result { border-radius: 2px; }

/* --------------------------- 19. Mobile sheet --------------------------- */
.sheet-menu { position: fixed; inset: 0; z-index: 88; }
.sheet-menu::before {
  content: ""; position: absolute; inset: 0; background: rgba(6, 9, 16, 0.42);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  animation: fade-in 300ms var(--ease) both;
}
.sheet-menu__panel {
  position: absolute; left: 0; right: 0; bottom: 0; top: auto; max-height: 88vh; overflow-y: auto;
  background: var(--sheet-bg); border-top-left-radius: 26px; border-top-right-radius: 26px;
  border-top: 1px solid var(--line); box-shadow: var(--shadow-lg);
  padding: 18px 20px calc(28px + env(safe-area-inset-bottom)); display: grid; gap: 20px;
  animation: slide-up 420ms var(--ease) both;
}
.sheet-menu__head { display: flex; align-items: center; justify-content: space-between; }
.sheet-menu__title { font-weight: 650; }
.sheet-menu__nav { display: grid; }
.sheet-menu__link { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px; border-bottom: 1px solid var(--line); font-weight: 600; }
.sheet-menu__link.is-active { color: var(--accent); }
.sheet-menu__block { display: grid; gap: 10px; }
.sheet-menu__settings { justify-content: center; }
html[data-skin="mc"] .sheet-menu__panel { border-radius: 0; border-top: 4px solid var(--line-strong); }

/* --------------------------- 20. Footer / misc -------------------------- */
.footer { position: relative; z-index: 2; background: var(--sheet-bg); background-image: var(--texture); border-top: 1px solid var(--line); }
.footer__inner { max-width: var(--shell); margin: 0 auto; padding: 42px 24px calc(46px + env(safe-area-inset-bottom)); display: grid; gap: 10px; }
.footer__brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; }
.footer__meta, .footer__powered { font-size: 0.84rem; color: var(--fg-3); }
.footer__text { font-size: 0.9rem; color: var(--fg-2); }
.footer__links { display: flex; flex-wrap: wrap; gap: 14px; font-size: 0.86rem; }
.footer__links a { color: var(--fg-2); }
.footer__links a:hover { color: var(--accent); }
.footer a { text-decoration: none; }
html[data-skin="mc"] .footer { border-top: 4px solid var(--line-strong); }

.to-top {
  position: fixed; right: 22px; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 50;
  width: 46px; height: 46px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--glass-strong); border: 1px solid var(--line); color: var(--fg); box-shadow: var(--shadow-md);
  backdrop-filter: saturate(180%) blur(20px);
  transition: transform 320ms var(--ease-spring), opacity 320ms var(--ease);
}
.to-top .icon { transform: rotate(180deg); }
.to-top:hover { transform: translateY(-3px); }
html[data-skin="mc"] .to-top { border-radius: 3px; border: 3px solid var(--line-strong); box-shadow: 0 5px 0 rgba(0, 0, 0, 0.35); }

.skip-link {
  position: absolute; left: 50%; top: -60px; transform: translateX(-50%); z-index: 200;
  padding: 10px 18px; border-radius: 0 0 14px 14px; background: var(--accent); color: var(--accent-fg);
  transition: top 240ms var(--ease);
}
.skip-link:focus { top: 0; }

/* --------------------------- 21. Motion -------------------------------- */
@keyframes blink { 0%, 45% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(-8px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes slide-in-right { from { transform: translateX(102%); } to { transform: none; } }
@keyframes slide-up { from { transform: translateY(102%); } to { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

html[data-reveal="pending"] .reveal { opacity: 0; transform: translateY(20px); }
html[data-reveal="pending"] .reveal,
html[data-reveal="ready"] .reveal { transition: opacity 720ms var(--ease), transform 720ms var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
html[data-reveal="ready"] .reveal.is-visible,
html[data-reveal="off"] .reveal { opacity: 1; transform: none; }

html[data-motion="full"] .hero__inner > * { animation: rise 900ms var(--ease) both; }
html[data-motion="full"] .hero__inner > *:nth-child(2) { animation-delay: 90ms; }
html[data-motion="full"] .hero__inner > *:nth-child(3) { animation-delay: 180ms; }
html[data-motion="full"] .hero__inner > *:nth-child(4) { animation-delay: 260ms; }
html[data-motion="full"] .hero__inner > *:nth-child(5) { animation-delay: 340ms; }
html[data-motion="reduced"] .reveal,
html[data-motion="reduced"] .hero__inner > * { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
html[data-motion="reduced"] .profile__halo { animation: none; }
html[data-motion="reduced"] * { scroll-behavior: auto; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__inner > * { animation: none !important; }
  .hero__splash { animation: none !important; }
  .profile__halo { animation: none; }
}
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 20px); }

/* --------------------------- 22. Responsive ---------------------------- */
@media (max-width: 1099px) {
  .topbar__nav { display: none; }
  .icon-btn--mobile { display: inline-flex; }
}
@media (max-width: 720px) {
  :root { --topbar-h: 58px; }
  .topbar__inner { gap: 10px; padding: 0 14px; }
  .topbar__brand { font-size: 0.9rem; max-width: 34vw; }
  /* 手机上把「深浅」「设置」收进底部菜单，顶栏只留 主题 / 搜索 / 菜单 */
  .topbar__controls > .anchor,
  .topbar__controls > [data-action="settings"] { display: none; }
  .segmented__item { padding: 0 10px; }
  .sheet { padding-top: 40px; border-radius: var(--radius) var(--radius) 0 0; }
  .layout-index .sheet { margin-top: -60px; }
  .layout-post .sheet, .layout-page .sheet, .layout-archive .sheet,
  .layout-tag .sheet, .layout-category .sheet, .layout-settings .sheet, .layout-404 .sheet { margin-top: 78px; }
  .section { padding-left: 18px; padding-right: 18px; }
  .section + .section { margin-top: 60px; }
  .profile { padding: 24px; gap: 24px; }
  .profile__top { gap: 18px; }
  .profile__avatar, .profile__avatar-wrap { width: 92px; height: 92px; }
  .article { padding: 34px 18px 0; }
  .settings-card { padding: 22px; }
  .field__control { min-width: 140px; }
  .range { width: 96px; }
  .search { padding: 8vh 12px 20px; }
  .to-top { right: 14px; }
  .hero { padding-bottom: 130px; }
  .hero__title { font-size: clamp(1.85rem, 8.4vw, 3rem); max-width: 14ch; }
  .hero__scroll { bottom: calc(92px + env(safe-area-inset-bottom)); }
  .hero__splash { top: auto; bottom: 22%; right: 8vw; }
}
@media (max-width: 420px) {
  .segmented__item { padding: 0 8px; font-size: 0.74rem; }
  .icon-btn { width: 34px; height: 34px; }
}

@media print {
  .bg, .topbar, .footer, .panel, .search, .to-top, .sheet-menu { display: none !important; }
  body { background: #fff; color: #000; }
  .sheet { box-shadow: none; margin: 0; }
}
