/* ==========================================================================
   方格 · Metro —— 刘秀的Blog Metro UI 主题样式表
   致敬 Windows 8 / Windows Phone / Zune：默认亮色、多彩磁贴、去网页感。
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  src: url(../fonts/archivo-latin.woff2) format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url(../fonts/jetbrains-mono-latin.woff2) format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2122, U+2190-2193, U+2212, U+2215, U+25B6, U+25C0;
}

/* ---------- Design Tokens ---------- */
:root {
  --f-display: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  --f-heavy: "Archivo", "Xiu Sans Heavy", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --f-body: "Segoe UI", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --f-serif: "Xiu Serif", "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", Georgia, serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, "PingFang SC", "Microsoft YaHei", monospace;

  --ease-metro: cubic-bezier(0.1, 0.9, 0.2, 1);
  --ease-cut: cubic-bezier(0.65, 0, 0.35, 1);
  --charm-w: 56px;
  --g: 8px;
  --u: clamp(94px, calc((100svh - 236px) / 4), 138px);

  /* 默认亮色：Zune / Windows Phone Light 纯净画廊白底 */
  --canvas: #FFFFFF;
  --canvas-2: #F2F4F7;
  --canvas-3: #E6EAF0;
  --ink: #0A0A0C;
  --ink-2: #3A4250;
  --muted: #667080;
  --ink-faded: rgba(10, 10, 12, .26);
  --line: rgba(10, 10, 12, .12);
  --line-strong: rgba(10, 10, 12, .26);
  --charm-bg: #111114;
  --charm-fg: #FFFFFF;
  --code-bg: #11141C;
  --code-fg: #E4ECF5;
  --overlay: rgba(10, 12, 18, .62);
  --bsod: #0078D7;

  /* 默认主强调色：Cobalt 钴蓝 */
  --accent: #0078D7;
  --accent-deep: #005A9E;
  --accent-bright: var(--accent);

  /* 正宗 Microsoft Metro 多彩磁贴色板（同分类内保留明度层次） */
  --c-tech-1: #0072C6;
  --c-tech-2: #0050EF;
  --c-tech-3: #1BA1E2;
  --c-writing-1: #008299;
  --c-writing-2: #5133AB;
  --c-writing-3: #006677;
  --c-games-1: #008A00;
  --c-games-2: #107C10;
  --c-games-3: #468800;
  --c-esports-1: #AC193D;
  --c-esports-2: #C50F1F;
  --c-esports-3: #8C0095;
  --c-daily-1: #DC572E;
  --c-daily-2: #CA5010;
  --c-daily-3: #B85A00;

  color-scheme: light;
}

/* Metro Dark（经典 WP8 纯黑模式） */
:root[data-theme="dark"] {
  --canvas: #09090B;
  --canvas-2: #15161C;
  --canvas-3: #20222B;
  --ink: #FFFFFF;
  --ink-2: #C4CBD6;
  --muted: #848E9E;
  --ink-faded: rgba(255, 255, 255, .28);
  --line: rgba(255, 255, 255, .14);
  --line-strong: rgba(255, 255, 255, .30);
  --charm-bg: #000000;
  --accent-bright: color-mix(in srgb, var(--accent) 68%, #ffffff);
  --overlay: rgba(0, 0, 0, .78);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --canvas: #09090B;
    --canvas-2: #15161C;
    --canvas-3: #20222B;
    --ink: #FFFFFF;
    --ink-2: #C4CBD6;
    --muted: #848E9E;
    --ink-faded: rgba(255, 255, 255, .28);
    --line: rgba(255, 255, 255, .14);
    --line-strong: rgba(255, 255, 255, .30);
    --charm-bg: #000000;
    --accent-bright: color-mix(in srgb, var(--accent) 68%, #ffffff);
    --overlay: rgba(0, 0, 0, .78);
    color-scheme: dark;
  }
}

/* 6 组强调色 */
:root[data-accent="cobalt"]  { --accent: #0078D7; --accent-deep: #005A9E; }
:root[data-accent="teal"]    { --accent: #008299; --accent-deep: #005E70; }
:root[data-accent="crimson"] { --accent: #AC193D; --accent-deep: #80102C; }
:root[data-accent="emerald"] { --accent: #008A00; --accent-deep: #006400; }
:root[data-accent="amber"]   { --accent: #DC572E; --accent-deep: #B03F1D; }
:root[data-accent="violet"]  { --accent: #5133AB; --accent-deep: #3A2280; }

/* 单色强调系（Mono Mode） */
:root[data-palette="mono"] {
  --c-tech-1: var(--accent); --c-tech-2: var(--accent-deep); --c-tech-3: #1E293B;
  --c-writing-1: var(--accent-deep); --c-writing-2: #243044; --c-writing-3: var(--accent);
  --c-games-1: #1E293B; --c-games-2: var(--accent); --c-games-3: #334155;
  --c-esports-1: var(--accent); --c-esports-2: #111827; --c-esports-3: var(--accent-deep);
  --c-daily-1: #334155; --c-daily-2: var(--accent-deep); --c-daily-3: #475569;
}

/* ---------- Base Reset ---------- */
*, *::before, *::after { box-sizing: border-box; border-radius: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 28px; }
body {
  margin: 0;
  min-height: 100svh;
  background: var(--canvas);
  color: var(--ink);
  font: 400 15.5px/1.7 var(--f-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
a { color: inherit; }
button { font: inherit; color: inherit; background: transparent; border: 0; cursor: pointer; }
img, svg, video { max-width: 100%; }
img { height: auto; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
main { display: block; outline: none; }

.mt-sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.mt-skip {
  position: fixed; top: 8px; left: 8px; z-index: 200;
  padding: .6em 1em; background: var(--accent); color: #fff;
  font: 600 .84rem/1 var(--f-mono); text-decoration: none;
  transform: translateY(-160%); transition: transform .2s;
}
.mt-skip:focus { transform: none; }

/* 唯一圆形元素：正宗 Windows 8 / WP8 2px 空心圆圈系统按钮 */
.metro-circle-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid currentColor;
  display: inline-grid; place-items: center;
  flex-shrink: 0; text-decoration: none;
  transition: background-color .16s, color .16s, transform .12s;
}
.metro-circle-btn:hover { background: var(--ink); color: var(--canvas); }
.metro-circle-btn:active { transform: scale(.92); }
.metro-circle-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.1; display: block; }

/* 顶部阅读进度条（文章页） */
.mt-progress-top {
  position: fixed; top: 0; left: 0; right: var(--charm-w); height: 3px; z-index: 105;
  display: block; text-decoration: none; background: transparent;
}
.mt-progress-top__fill {
  display: block; height: 100%; width: 100%;
  background: var(--accent);
  transform: scaleX(var(--p, 0)); transform-origin: left;
  transition: transform .08s linear;
}

/* ==========================================================================
   右侧固定 Windows 8 黑色 Charms Bar（超级按钮栏）
   ========================================================================== */
.mt-charms {
  position: fixed; top: 0; right: 0; bottom: 0; width: var(--charm-w); z-index: 110;
  background: var(--charm-bg); color: var(--charm-fg);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 6px;
  border-left: 1px solid rgba(255, 255, 255, .08);
  user-select: none;
}
.mt-charm-btn {
  width: 100%; padding: 12px 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  color: rgba(255, 255, 255, .86); text-decoration: none;
  transition: background-color .16s, color .16s;
}
.mt-charm-btn:hover, .mt-charm-btn.is-active { background: var(--accent); color: #fff; }
.mt-charm-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.75; display: block; }
.mt-charm-btn span { font: 500 10px/1 var(--f-display); letter-spacing: .04em; opacity: .9; }
.mt-charms__clock {
  position: absolute; bottom: 14px; left: 0; right: 0;
  text-align: center; font: 400 10px/1.3 var(--f-mono); color: rgba(255, 255, 255, .45);
  pointer-events: none;
}

/* 主应用壳（右侧留出 Charms Bar 宽度） */
.mt-shell {
  min-height: 100svh;
  padding-right: var(--charm-w);
}

/* ==========================================================================
   Zune / Windows 8 全景无边框顶部标题行（去网页导航条感）
   ========================================================================== */
.mt-pano-head {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 20px 36px 10px 44px;
  flex-shrink: 0;
}
.mt-pano-nav {
  display: flex; align-items: baseline; gap: clamp(18px, 2.5vw, 34px);
  overflow-x: auto; scrollbar-width: none;
}
.mt-pano-nav::-webkit-scrollbar { display: none; }
.mt-pano-link {
  text-decoration: none; white-space: nowrap;
  font: 200 clamp(1.9rem, 3.1vw, 2.85rem)/1.05 var(--f-display);
  letter-spacing: -.02em;
  color: var(--ink-faded);
  transition: color .2s var(--ease-metro);
}
.mt-pano-link:hover { color: var(--ink-2); }
.mt-pano-link[aria-current="page"] { color: var(--ink); font-weight: 300; }
.mt-pano-link--ext { font-size: clamp(1.2rem, 1.8vw, 1.55rem); }

/* Windows 8 右上角用户磁贴 */
.mt-user-tile {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; flex-shrink: 0;
  padding: 4px 4px 4px 12px;
  transition: background-color .18s;
}
.mt-user-tile:hover { background: var(--canvas-2); }
.mt-user-tile__meta { text-align: right; line-height: 1.2; }
.mt-user-tile__name { display: block; font: 300 1.05rem/1.15 var(--f-display); color: var(--ink); }
.mt-user-tile__sub { display: block; font: 500 .66rem/1.3 var(--f-mono); color: var(--muted); letter-spacing: .04em; }
.mt-user-tile__avatar {
  width: 40px; height: 40px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font: 600 1.15rem/1 var(--f-display);
}

/* ==========================================================================
   Start Screen（桌面 100svh 横向全景 Windows 8 开始屏幕）
   ========================================================================== */
.mt-start-viewport {
  height: 100svh;
  display: flex; flex-direction: column;
  overflow: hidden;
  position: relative;
}
:root[data-layout="vertical"] .mt-start-viewport {
  height: auto; min-height: 100svh; overflow: visible;
}

.mt-start-canvas {
  flex: 1; min-height: 0;
  display: flex; align-items: center; gap: 48px;
  overflow-x: auto; overflow-y: hidden;
  padding: 8px 64px 14px 44px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.mt-start-canvas::-webkit-scrollbar { height: 7px; }
.mt-start-canvas::-webkit-scrollbar-thumb { background: var(--line-strong); }
.mt-start-canvas::-webkit-scrollbar-thumb:hover { background: var(--accent); }

:root[data-layout="vertical"] .mt-start-canvas {
  flex-direction: column; align-items: stretch;
  overflow: visible; gap: 36px;
  padding: 12px 44px 48px;
}

/* 单个磁贴群组 */
.mt-group {
  flex-shrink: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.mt-group[hidden] { display: none; }
.mt-group__title {
  margin: 0; font: 400 .98rem/1.2 var(--f-display); color: var(--muted);
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.mt-group__title b { color: var(--ink); font-weight: 600; }
.mt-group__title span { font: 500 .72rem/1 var(--f-mono); opacity: .78; }
.mt-group__reset {
  color: var(--accent-bright); text-decoration: underline; font: inherit; padding: 0;
}

.mt-group__grid {
  display: grid;
  grid-template-rows: repeat(4, var(--u));
  grid-template-columns: repeat(var(--cols, 4), var(--u));
  grid-auto-flow: dense;
  gap: var(--g);
}

:root[data-layout="vertical"] .mt-group__grid {
  grid-template-rows: none;
  grid-auto-rows: 132px;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
}

/* ==========================================================================
   核心原语：纯正 Metro 多彩磁贴（无边框、无网页卡片感、全出血色块/图像）
   ========================================================================== */
.mt-tile {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 12px 14px;
  color: #FFFFFF;
  background: var(--tile-bg, var(--accent));
  text-decoration: none; text-align: left;
  user-select: none;
  transform-style: preserve-3d;
  transition: transform .16s var(--ease-metro), outline-color .12s;
}
.mt-tile:hover {
  outline: 3px solid color-mix(in srgb, var(--ink) 78%, transparent);
  outline-offset: -3px;
  z-index: 3;
}
.mt-tile--4x2 { grid-column: span 4; grid-row: span 2; padding: 0; }
.mt-tile--2x2 { grid-column: span 2; grid-row: span 2; padding: 0; }
.mt-tile--2x1 { grid-column: span 2; grid-row: span 1; }
.mt-tile--1x1 { grid-column: span 1; grid-row: span 1; }
.mt-tile[hidden] { display: none; }

.mt-tile__wm {
  position: absolute; right: -4px; top: -18px;
  font: 700 5.6rem/1 var(--f-heavy); color: rgba(255, 255, 255, .11);
  pointer-events: none; line-height: 1;
}
.mt-tile--2x1 .mt-tile__wm { font-size: 6.2rem; right: 6px; top: -12px; }
.mt-tile__head {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 6px;
}
.mt-tile__tag {
  font: 600 .64rem/1 var(--f-mono); letter-spacing: .09em; text-transform: uppercase;
  color: rgba(255, 255, 255, .84);
}
.mt-tile__no {
  font: 600 .64rem/1 var(--f-mono); color: rgba(255, 255, 255, .76);
  font-variant-numeric: tabular-nums;
}
.mt-tile__title {
  position: relative; z-index: 2; margin: 0;
  font: 600 .95rem/1.32 var(--f-display); color: #fff;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  text-wrap: pretty;
}
.mt-tile--1x1 .mt-tile__title { font-size: .85rem; -webkit-line-clamp: 3; }
.mt-tile--2x1 .mt-tile__title { font-size: .97rem; -webkit-line-clamp: 2; }
.mt-tile__foot {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: baseline; gap: 6px;
  font: 500 .66rem/1 var(--f-mono); color: rgba(255, 255, 255, .80);
  font-variant-numeric: tabular-nums;
}
.mt-tile__big-num {
  position: relative; z-index: 2;
  font: 200 2.3rem/.9 var(--f-display); font-variant-numeric: tabular-nums;
}
.mt-tile__glyph {
  width: 28px; height: 28px; stroke: #fff; fill: none; stroke-width: 1.7; opacity: .94; display: block;
}

/* 全出血封面图磁贴（Hero 与封面文章） */
.mt-art-tile { padding: 0; background: #0E1626; }
.mt-art-tile__bg {
  position: absolute; inset: 0; transition: transform .55s var(--ease-metro);
}
.mt-art-tile__bg img, .mt-art-tile__bg svg {
  display: block; width: 100%; height: 100%; object-fit: cover;
}
.mt-art-tile:hover .mt-art-tile__bg { transform: scale(1.05); }
.mt-art-tile__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6, 10, 18, .18) 0%, rgba(6, 10, 18, .48) 46%, rgba(6, 10, 18, .90) 100%);
}
.mt-art-tile__content {
  position: relative; z-index: 2; height: 100%; width: 100%;
  padding: 13px 15px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.mt-art-tile__hero-title {
  margin: 0 0 5px; font: 600 clamp(1.12rem, 1.55vw, 1.48rem)/1.25 var(--f-display); color: #fff;
  text-wrap: balance;
}
.mt-art-tile__hero-desc {
  margin: 0 0 6px; font-size: .8rem; line-height: 1.48; color: rgba(255, 255, 255, .86);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mt-pill-badge {
  display: inline-block; padding: 3px 7px; background: var(--accent); color: #fff;
  font: 600 .64rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase;
}
.mt-art-tile .mt-tile__no {
  padding: 3px 6px; background: rgba(0, 0, 0, .58); color: rgba(255, 255, 255, .94);
}
.mt-live .mt-tile__head { padding-right: 32px; }
.mt-tile--2x2 .mt-tile__title { font-size: 1.12rem; -webkit-line-clamp: 3; margin-bottom: 5px; }

/* Live Tile 垂直翻转机构 */
.mt-live { position: relative; width: 100%; height: 100%; flex: 1; min-height: 0; overflow: hidden; }
.mt-live__track {
  position: relative; width: 100%; height: 200%;
  transition: transform .68s var(--ease-metro);
}
.mt-live.is-flipped .mt-live__track { transform: translateY(-50%); }
.mt-live__face {
  height: 50%; width: 100%; padding: 14px 16px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.mt-live__face--flush { padding: 0; position: relative; }
.mt-live__dots {
  position: absolute; top: 16px; right: 14px; z-index: 4; display: flex; gap: 3px; pointer-events: none;
}
.mt-live__dots i { width: 10px; height: 2px; background: rgba(255, 255, 255, .36); }
.mt-live:not(.is-flipped) .mt-live__dots i:first-child,
.mt-live.is-flipped .mt-live__dots i:last-child { background: #fff; }

.mt-id__zh { margin: 0; font: 300 clamp(1.65rem, 2.3vw, 2.25rem)/1.05 var(--f-display); letter-spacing: .02em; }
.mt-id__en { margin: 4px 0 0; font: 700 .66rem/1.2 "Archivo", var(--f-mono); letter-spacing: .12em; opacity: .84; text-transform: uppercase; }
.mt-id__eyebrow { margin: 0; font: 600 .88rem/1.42 var(--f-display); }
.mt-id__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mt-id__stat { background: rgba(0, 0, 0, .18); padding: 6px 8px; }
.mt-id__stat strong { display: block; font: 200 1.35rem/1 var(--f-display); font-variant-numeric: tabular-nums; }
.mt-id__stat span { font: 500 .6rem/1.2 var(--f-mono); opacity: .82; }
.mt-id__intro { margin: 0; font-size: .78rem; line-height: 1.45; opacity: .9; }

/* 底部极简 Start 控制条（分类筛选 + 布局切换 + Semantic Zoom） */
.mt-start-foot {
  height: 44px; flex-shrink: 0;
  padding: 0 28px 0 44px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-top: 1px solid var(--line);
  background: var(--canvas);
}
.mt-filter-strip {
  display: flex; align-items: center; gap: 14px; overflow-x: auto; scrollbar-width: none;
}
.mt-filter-strip::-webkit-scrollbar { display: none; }
.mt-filter-btn {
  padding: 6px 0; font: 500 .84rem/1 var(--f-display); color: var(--muted); white-space: nowrap;
  border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
.mt-filter-btn sup { font: 600 .64rem/1 var(--f-mono); margin-left: 2px; opacity: .75; }
.mt-filter-btn:hover { color: var(--ink); }
.mt-filter-btn[aria-pressed="true"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--accent); }

.mt-start-foot__right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.mt-mini-btn {
  height: 28px; padding: 0 10px;
  display: inline-flex; align-items: center; gap: 5px;
  font: 600 .72rem/1 var(--f-display); color: var(--ink-2);
  background: var(--canvas-2);
  transition: background .15s, color .15s;
}
.mt-mini-btn:hover, .mt-mini-btn.is-on { background: var(--accent); color: #fff; }
.mt-zoom-btn {
  width: 28px; height: 28px; display: inline-grid; place-items: center;
  border: 1.5px solid var(--ink-2); color: var(--ink); font: 700 1rem/1 var(--f-mono);
  transition: background .15s, color .15s, border-color .15s;
}
.mt-zoom-btn:hover, .mt-zoom-btn.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Windows 8 Semantic Zoom 缩略总览浮层 */
.mt-semzoom {
  position: fixed; inset: 0 var(--charm-w) 0 0; z-index: 90;
  background: var(--canvas);
  display: none; flex-direction: column; justify-content: center;
  padding: 28px 44px;
  overflow-y: auto;
  animation: metroZoomOut .22s var(--ease-metro);
}
.mt-semzoom.is-open { display: flex; }
@keyframes metroZoomOut { from { opacity: 0; transform: scale(1.05); } to { opacity: 1; transform: none; } }
.mt-semzoom__head {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-bottom: 24px; max-width: 980px;
}
.mt-semzoom__head h2 { margin: 0; font: 200 clamp(1.5rem, 2.8vw, 2.2rem)/1 var(--f-display); }
.mt-semzoom__grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 980px;
}
.mt-semzoom__card {
  height: 132px; padding: 18px 20px; color: #fff; background: var(--tile-bg, var(--accent));
  display: flex; flex-direction: column; justify-content: space-between; text-align: left;
  transition: transform .15s var(--ease-metro);
}
.mt-semzoom__card:hover { transform: scale(1.025); outline: 3px solid var(--ink); outline-offset: -3px; }
.mt-semzoom__card strong { font: 300 1.45rem/1.1 var(--f-display); }
.mt-semzoom__card span { font: 600 .72rem/1 var(--f-mono); opacity: .84; }

/* 分页器（当启用分页时展示） */
.mt-pager {
  padding: 24px 44px; font: 600 .84rem/1 var(--f-mono); display: flex; gap: 6px; flex-wrap: wrap;
}
.mt-pager a, .mt-pager span {
  display: inline-block; padding: 8px 14px; background: var(--canvas-2); text-decoration: none;
}
.mt-pager a:hover, .mt-pager .current { background: var(--accent); color: #fff; }

/* ==========================================================================
   子页面通用 Metro App 头部（标志性空心圆圈 ← 返回键 + 极细巨字）
   ========================================================================== */
.mt-app-page {
  max-width: 1360px; margin: 0 auto;
  padding: 20px 44px 72px;
}
.mt-app-head {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  margin-bottom: 26px;
}
.mt-app-head__left { display: flex; align-items: center; gap: 18px; min-width: 0; }
.mt-app-head__title {
  margin: 0; font: 200 clamp(2rem, 4vw, 3.2rem)/1.06 var(--f-display); letter-spacing: -.02em;
  overflow-wrap: anywhere;
}
.mt-app-head__count {
  padding: 8px 16px; background: var(--accent); color: #fff; text-align: right; flex-shrink: 0;
}
.mt-app-head__count strong { display: block; font: 200 2rem/.95 var(--f-display); font-variant-numeric: tabular-nums; }
.mt-app-head__count span { font: 600 .64rem/1 var(--f-mono); letter-spacing: .12em; opacity: .85; text-transform: uppercase; }
.mt-app-lead { margin: -12px 0 26px 58px; color: var(--muted); font-size: .94rem; }
.mt-app-lead a { color: var(--accent-bright); text-decoration: none; }
.mt-app-lead a:hover { text-decoration: underline; }

/* 子页面彩色文章磁贴瀑布矩阵（归档 / 分类 / 标签共用） */
.mt-sub-years { display: grid; gap: 34px; }
.mt-sub-year__head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 12px;
}
.mt-sub-year__num { font: 200 2.2rem/1 var(--f-display); font-variant-numeric: tabular-nums; }
.mt-sub-year__cnt { font: 600 .72rem/1 var(--f-mono); color: var(--muted); }
.mt-sub-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  grid-auto-rows: 136px;
  grid-auto-flow: dense;
  gap: var(--g);
}
.mt-empty-year-tile {
  padding: 20px 24px; border: 2px dashed var(--line-strong); color: var(--muted);
  font: 500 .88rem/1.5 var(--f-mono); background: var(--canvas-2);
}

/* 年份快跳条 */
.mt-year-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 28px; }
.mt-year-chip {
  padding: 8px 14px; background: var(--canvas-2); color: var(--ink);
  font: 600 .84rem/1 var(--f-mono); text-decoration: none;
  display: inline-flex; align-items: baseline; gap: 6px;
  transition: background .15s, color .15s;
}
.mt-year-chip span { font-size: .68rem; color: var(--muted); }
.mt-year-chip:hover { background: var(--accent); color: #fff; }
.mt-year-chip:hover span { color: rgba(255, 255, 255, .85); }
.mt-year-chip.is-empty { border: 1.5px dashed var(--line-strong); background: transparent; color: var(--muted); }

/* 分类总览大磁贴矩阵 */
.mt-cats-mosaic {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--g);
}
.mt-cat-big {
  min-height: 210px; padding: 20px 22px; color: #fff; background: var(--tile-bg, var(--accent));
  text-decoration: none; display: flex; flex-direction: column; justify-content: space-between;
  transition: transform .16s var(--ease-metro);
}
.mt-cat-big--wide { grid-column: span 2; }
.mt-cat-big:hover { outline: 3px solid var(--ink); outline-offset: -3px; }
.mt-cat-big__top { display: flex; justify-content: space-between; align-items: flex-start; }
.mt-cat-big__no { font: 600 .74rem/1 var(--f-mono); opacity: .78; }
.mt-cat-big__num { font: 200 3.4rem/.85 var(--f-display); font-variant-numeric: tabular-nums; }
.mt-cat-big__name { margin: 0 0 4px; font: 600 1.8rem/1.1 var(--f-display); }
.mt-cat-big__en { font: 600 .7rem/1 var(--f-mono); letter-spacing: .15em; opacity: .82; text-transform: uppercase; }
.mt-cat-big__latest {
  margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .25);
  font-size: .82rem; opacity: .92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 标签页：Windows Phone 经典 A-Z Jump List */
.mt-alpha-strip {
  position: sticky; top: 0; z-index: 20;
  display: flex; flex-wrap: wrap; gap: 4px; padding: 10px 0; margin-bottom: 24px;
  background: var(--canvas);
}
.mt-alpha-key {
  width: 34px; height: 34px; display: inline-grid; place-items: center;
  background: var(--accent); color: #fff; text-decoration: none;
  font: 600 .8rem/1 var(--f-mono); transition: background .14s;
}
.mt-alpha-key:hover { background: var(--accent-deep); }
.mt-alpha-key.is-off { background: var(--canvas-2); color: var(--muted); opacity: .4; pointer-events: none; }
.mt-alpha-key--all {
  width: auto; padding: 0 12px; margin-left: auto;
  font-family: var(--f-display); font-size: .78rem; background: var(--ink); color: var(--canvas);
}
.mt-tag-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 32px; }
.mt-tag-sec { scroll-margin-top: 64px; }
.mt-tag-square {
  width: 48px; height: 48px; margin-bottom: 12px;
  background: var(--accent); color: #fff; display: grid; place-items: center;
  font: 500 1.55rem/1 var(--f-display); transition: transform .14s, background .14s;
}
.mt-tag-square:hover { transform: scale(1.06); background: var(--accent-deep); }
.mt-tag-sec ul { margin: 0; padding: 0; list-style: none; }
.mt-tag-sec li a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 6px; border-bottom: 1px solid var(--line);
  text-decoration: none; font-size: .92rem;
  transition: background .12s, padding-left .12s, color .12s;
}
.mt-tag-sec li a:hover { background: var(--accent); color: #fff; padding-left: 12px; }
.mt-tag-sec li a:hover sup { color: rgba(255, 255, 255, .85); }
.mt-tag-sec li sup { font: 600 .7rem/1 var(--f-mono); color: var(--muted); }

/* 关于页三联身份磁贴 */
.mt-about-tiles {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--g);
  margin-bottom: 36px;
}
.mt-about-card {
  min-height: 160px; padding: 20px 22px; color: #fff; background: var(--tile-bg, var(--accent));
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
}
.mt-about-card h2 { margin: 0 0 6px; font: 600 1.32rem/1.2 var(--f-display); }
.mt-about-card p { margin: 0; font-size: .85rem; line-height: 1.55; opacity: .9; }

/* ==========================================================================
   文章阅读器（Windows 8 Reader / Bing News 风格 + 底部 App Bar）
   ========================================================================== */
.mt-reader { padding-bottom: 92px; }
.mt-reader-top {
  max-width: 1320px; margin: 0 auto; padding: 20px 44px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.mt-reader-top__left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.mt-reader-crumb { font: 600 .74rem/1.4 var(--f-mono); color: var(--muted); letter-spacing: .08em; }
.mt-reader-crumb a { color: var(--accent-bright); text-decoration: none; }
.mt-reader-crumb a:hover { text-decoration: underline; }

.mt-reader-hero {
  max-width: 1320px; margin: 0 auto; padding: 0 44px;
  display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--g);
}
.mt-reader-hero__info {
  padding: 32px 34px; background: var(--canvas-2);
  display: flex; flex-direction: column; justify-content: space-between; gap: 20px;
}
.mt-reader-hero__title {
  margin: 0; font: 600 clamp(1.65rem, 3vw, 2.7rem)/1.2 var(--f-display); letter-spacing: -.015em;
  text-wrap: balance; overflow-wrap: anywhere;
}
.mt-reader-hero__desc { margin: 14px 0 0; font-size: .98rem; line-height: 1.78; color: var(--ink-2); }
.mt-reader-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0; }
.mt-reader-stat { padding: 10px 12px; color: #fff; background: var(--tile-bg, var(--accent)); }
.mt-reader-stat dt { font: 600 .62rem/1 var(--f-mono); letter-spacing: .12em; opacity: .84; margin-bottom: 4px; }
.mt-reader-stat dd { margin: 0; font: 600 .92rem/1.15 var(--f-mono); font-variant-numeric: tabular-nums; }
.mt-reader-hero__art {
  position: relative; margin: 0; min-height: 310px; overflow: hidden; background: var(--accent-deep);
}
.mt-reader-hero__art img, .mt-reader-hero__art svg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
}

.mt-reader-body {
  max-width: 1280px; margin: 0 auto; padding: 44px 44px 36px;
  display: grid; grid-template-columns: 220px minmax(0, 44rem) 1fr; gap: 0 52px;
}
.mt-toc-rail { grid-column: 1; }
.mt-toc-sticky {
  position: sticky; top: 28px;
  max-height: calc(100svh - 104px); overflow-y: auto; scrollbar-width: none;
  border-left: 2px solid var(--line); padding-left: 14px;
}
.mt-toc__h { margin: 0 0 12px; font: 700 .68rem/1 var(--f-mono); letter-spacing: .14em; color: var(--muted); }
.mt-toc, .mt-toc ol { margin: 0; padding: 0; list-style: none; }
.mt-toc ol { padding-left: .85rem; }
.mt-toc-link {
  display: flex; gap: 7px; padding: 5px 8px 5px 14px; margin-left: -16px;
  border-left: 3px solid transparent; text-decoration: none;
  font-size: .84rem; line-height: 1.45; color: var(--muted);
  transition: color .15s, border-color .15s, background .15s;
}
.mt-toc-number { font: 600 .68rem/1.8 var(--f-mono); color: var(--accent-bright); flex: none; }
.mt-toc-link:hover { color: var(--ink); background: var(--canvas-2); }
.mt-toc-link.is-read { color: var(--ink-2); }
.mt-toc-link.is-active { color: var(--ink); font-weight: 700; border-left-color: var(--accent); background: var(--canvas-2); }

/* 移动端可折叠目录 */
.mt-mobile-toc { display: none; margin-bottom: 24px; background: var(--canvas-2); border-left: 4px solid var(--accent); }
.mt-mobile-toc summary {
  padding: 12px 16px; font: 700 .78rem/1 var(--f-mono); letter-spacing: .08em; cursor: pointer;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.mt-mobile-toc__body { padding: 4px 16px 14px; border-top: 1px solid var(--line); }
.mt-mobile-toc__body .mt-toc-link { margin-left: 0; padding-left: 8px; }

/* 正文排版 */
.mt-prose {
  grid-column: 2; min-width: 0;
  font-size: clamp(1.01rem, .96rem + .22vw, 1.11rem);
  line-height: 1.9;
  letter-spacing: .01em;
  color: var(--ink);
  overflow-wrap: break-word;
  line-break: strict;
  text-spacing-trim: normal;
  text-autospace: normal;
  counter-reset: h2;
}
.mt-prose[data-font="serif"] { font-family: var(--f-serif); line-height: 1.98; }
.mt-prose > :first-child { margin-top: 0; }
.mt-prose p { margin: 0 0 1.25em; }
.mt-prose h2, .mt-prose h3, .mt-prose h4 { font-family: var(--f-display); text-wrap: balance; scroll-margin-top: 28px; }
.mt-prose h2 { margin: 2.35em 0 .95em; font-size: 1.5em; font-weight: 700; line-height: 1.32; }
.mt-prose h2::before {
  counter-increment: h2;
  content: counter(h2, decimal-leading-zero);
  display: inline-block; margin-right: .55em; padding: 3px 8px;
  background: var(--accent); color: #fff;
  font: 700 .72rem/1 var(--f-mono); letter-spacing: .1em; vertical-align: .22em;
}
.mt-prose h3 { margin: 1.95em 0 .75em; font-size: 1.22em; font-weight: 700; line-height: 1.4; }
.mt-prose h4 { margin: 1.7em 0 .6em; font-size: 1.05em; font-weight: 700; }
.mt-prose .headerlink { display: none; }
.mt-prose a {
  color: var(--accent-bright);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em;
  transition: background-color .16s, color .16s;
}
.mt-prose a:hover { background: var(--accent); color: #fff; text-decoration-color: transparent; }
.mt-prose strong { font-weight: 700; color: var(--ink); }
.mt-prose[data-font="serif"] strong { font-weight: 800; }
.mt-prose em {
  font-style: normal;
  text-emphasis: filled dot var(--accent-bright); -webkit-text-emphasis: filled dot var(--accent-bright);
  text-emphasis-position: under right; -webkit-text-emphasis-position: under;
}
.mt-prose small em { text-emphasis: none; -webkit-text-emphasis: none; }
.mt-prose ul, .mt-prose ol { margin: 0 0 1.25em; padding-left: 1.5em; }
.mt-prose li { margin: .35em 0; }
.mt-prose li::marker { color: var(--accent-bright); font-family: var(--f-mono); font-size: .85em; }
.mt-prose blockquote {
  margin: 1.8em 0; padding: 1.05em 1.35em;
  background: var(--canvas-2);
  border-left: 4px solid var(--accent);
  color: var(--ink-2);
}
.mt-prose blockquote p:last-child { margin-bottom: 0; }
.mt-prose hr {
  width: 5rem; height: 4px; margin: 3.2em auto; border: 0;
  background: var(--accent);
}
.mt-prose img { display: block; margin: 2em auto; cursor: zoom-in; }
.mt-prose p:has(> img:only-child) { margin: 0; }
.mt-prose .mt-cap, .mt-prose p > small:only-child {
  display: block; margin: -1.2em 0 2em;
  font: 500 .78rem/1.6 var(--f-mono); letter-spacing: .02em;
  color: var(--muted); text-align: center;
}
.mt-prose .mt-cap b { color: var(--accent-bright); font-weight: 600; margin-right: .55em; }
.mt-prose :not(pre) > code {
  padding: .12em .4em; background: var(--canvas-2);
  font: 500 .86em/1.5 var(--f-mono); color: var(--accent-bright);
}
.mt-prose .mt-table {
  margin: 1.8em 0; overflow-x: auto;
  border-top: 3px solid var(--accent); border-bottom: 1px solid var(--line-strong);
}
.mt-prose table { width: 100%; border-collapse: collapse; font-size: .92em; line-height: 1.6; }
.mt-prose th {
  padding: .78em 1em; text-align: left; background: var(--canvas-2);
  font: 700 .74rem/1.4 var(--f-mono); letter-spacing: .08em; color: var(--ink-2);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.mt-prose td { padding: .78em 1em; border-bottom: 1px solid var(--line); vertical-align: top; }
.mt-prose tr:last-child td { border-bottom: 0; }
.mt-prose iframe, .mt-prose video { max-width: 100%; }

/* 代码块：Highlight.js 锐利暗色容器 + Metro 顶条 + 复制 */
.mt-prose figure.highlight {
  position: relative; margin: 1.9em 0;
  background: var(--code-bg); color: var(--code-fg);
  font: 400 .84rem/1.75 var(--f-mono);
  overflow-x: auto; letter-spacing: 0;
}
.mt-prose figure.highlight table { width: 100%; border-collapse: collapse; margin: 0; font: inherit; }
.mt-prose figure.highlight td { padding: 0; border: 0; vertical-align: top; }
.mt-prose figure.highlight pre { margin: 0; padding: 1.15em 1.25em; background: transparent; font: inherit; white-space: pre; }
.mt-prose figure.highlight .gutter pre { padding-right: .4em; color: rgba(143, 168, 196, .45); text-align: right; user-select: none; }
.mt-prose figure.highlight .code pre { padding-left: .9em; }
.mt-code__bar {
  position: sticky; left: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: .55em 1em .55em 1.25em;
  background: rgba(255, 255, 255, .05);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  font: 600 .68rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase;
  color: #8fa8c4;
}
.mt-code__copy {
  padding: .45em .85em; background: var(--accent); color: #fff;
  font: inherit; cursor: pointer; transition: background .15s;
}
.mt-code__copy:hover { background: var(--accent-deep); }
.mt-prose figure.highlight .keyword, .mt-prose figure.highlight .selector-tag { color: #4cc2ff; }
.mt-prose figure.highlight .string, .mt-prose figure.highlight .number, .mt-prose figure.highlight .literal { color: #f5b951; }
.mt-prose figure.highlight .comment, .mt-prose figure.highlight .meta { color: #6f86a6; font-style: italic; }
.mt-prose figure.highlight .title, .mt-prose figure.highlight .function, .mt-prose figure.highlight .section { color: #ffffff; font-weight: 600; }
.mt-prose figure.highlight .built_in, .mt-prose figure.highlight .attr, .mt-prose figure.highlight .type, .mt-prose figure.highlight .params, .mt-prose figure.highlight .variable { color: #9fbaff; }
.mt-prose pre:not(figure pre) {
  margin: 1.9em 0; padding: 1.15em 1.25em; overflow-x: auto;
  background: var(--code-bg); color: var(--code-fg);
  font: 400 .84rem/1.75 var(--f-mono);
}
.mt-prose .mermaid, .mt-prose pre:has(> code.mermaid) {
  margin: 1.9em 0; padding: 1.4em;
  background: var(--canvas-2); border-left: 4px solid var(--accent);
  color: var(--ink); text-align: center; overflow-x: auto;
}

/* 文末功能区 */
.mt-reader-foot {
  max-width: 44rem; margin: 16px auto 44px; padding-inline: 20px;
  display: grid; gap: 22px;
}
.mt-tag-tiles { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.mt-tag-tiles a {
  display: inline-block; padding: 7px 12px; background: var(--canvas-2); color: var(--ink);
  font: 600 .8rem/1 var(--f-display); text-decoration: none;
  transition: background .14s, color .14s;
}
.mt-tag-tiles a:hover { background: var(--accent); color: #fff; }
.mt-cc-tile {
  padding: 16px 18px; background: var(--canvas-2); border-left: 4px solid var(--accent);
  font-size: .86rem; line-height: 1.78; color: var(--ink-2); overflow-wrap: anywhere;
}
.mt-cc-tile .kicker { display: block; font: 700 .66rem/1 var(--f-mono); letter-spacing: .12em; color: var(--muted); margin-bottom: 6px; }
.mt-cc-tile a { color: var(--accent-bright); }
.mt-action-tiles { display: flex; flex-wrap: wrap; gap: 8px; }
.mt-btn-metro {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 20px; font: 600 .84rem/1 var(--f-display); text-decoration: none;
  background: var(--accent); color: #fff; transition: background .15s;
}
.mt-btn-metro:hover { background: var(--accent-deep); }
.mt-btn-metro--dark { background: var(--ink); color: var(--canvas); }
.mt-btn-metro--dark:hover { opacity: .88; }
.mt-reward-box {
  margin: 0; padding: 16px; background: var(--canvas-2); border: 2px solid var(--accent);
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
}
.mt-reward-box[hidden] { display: none; }
.mt-reward-box img { width: 180px; height: 180px; object-fit: cover; background: #fff; display: block; }
.mt-reward-box figcaption { font: 500 .82rem/1.6 var(--f-mono); color: var(--muted); }

/* 上下篇巨型双色磁贴 */
.mt-pnav {
  max-width: 1320px; margin: 0 auto; padding: 0 44px;
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--g);
}
.mt-pnav__item {
  min-height: 150px; padding: 22px 26px; text-decoration: none; color: #fff;
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
  transition: transform .15s var(--ease-metro);
}
.mt-pnav__item--new { background: var(--c-writing-1); }
.mt-pnav__item--old { background: var(--accent); text-align: right; }
a.mt-pnav__item:hover { outline: 3px solid var(--ink); outline-offset: -3px; }
.mt-pnav__item.is-empty { opacity: .48; justify-content: flex-end; }
.mt-pnav__k { font: 600 .7rem/1 var(--f-mono); letter-spacing: .1em; opacity: .84; }
.mt-pnav__t { font: 600 clamp(1.08rem, 1.8vw, 1.38rem)/1.3 var(--f-display); text-wrap: balance; }

/* Utterances 评论区 */
.mt-comments { max-width: 44rem; margin: 48px auto 0; padding-inline: 20px; }
.mt-comments__head { display: flex; align-items: baseline; gap: 12px; }
.mt-comments__head h2 { margin: 0; font: 200 1.85rem/1 var(--f-display); }
.mt-comments__head span { font: 600 .7rem/1 var(--f-mono); letter-spacing: .12em; color: var(--muted); }
.mt-comments__hint { margin: 8px 0 18px; font: 500 .8rem/1.6 var(--f-mono); color: var(--muted); }
.mt-comments__box { min-height: 160px; }
.mt-comments__box .utterances { max-width: none; }

/* 文章页底部 Windows 8 App Bar（正宗空心圆圈命令栏） */
.mt-appbar {
  position: fixed; left: 0; right: var(--charm-w); bottom: 0; z-index: 95;
  height: 62px; background: var(--charm-bg); color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 26px;
  padding-inline: 24px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.mt-appbar__cmd {
  display: inline-flex; flex-direction: column; align-items: center; gap: 4px;
  color: rgba(255, 255, 255, .9); text-decoration: none;
}
.mt-appbar__cmd .metro-circle-btn { width: 34px; height: 34px; }
.mt-appbar__cmd .metro-circle-btn svg { width: 15px; height: 15px; }
.mt-appbar__cmd:hover .metro-circle-btn { background: var(--accent); border-color: var(--accent); color: #fff; }
.mt-appbar__cmd span { font: 500 10px/1 var(--f-display); opacity: .88; }

/* ==========================================================================
   全屏高还原 Windows 8 蓝屏 404
   ========================================================================== */
.mt-bsod {
  position: fixed; inset: 0; z-index: 140;
  background: var(--bsod); color: #FFFFFF;
  overflow-y: auto;
  display: flex; align-items: center;
  padding: clamp(32px, 7vw, 88px) clamp(24px, 9vw, 130px);
}
.mt-bsod__inner { max-width: 780px; }
.mt-bsod__face { margin: 0 0 22px; font: 200 clamp(5.5rem, 13vw, 9.5rem)/.95 var(--f-display); }
.mt-bsod__lead { margin: 0 0 20px; font: 300 clamp(1.25rem, 2.4vw, 1.85rem)/1.45 var(--f-display); }
.mt-bsod__pct { margin: 0 0 32px; font: 300 clamp(1.1rem, 2vw, 1.5rem)/1 var(--f-display); font-variant-numeric: tabular-nums; }
.mt-bsod__meta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-bottom: 34px; }
.mt-bsod__qr { width: 102px; height: 102px; background: #fff; padding: 6px; flex-shrink: 0; }
.mt-bsod__qr svg { width: 100%; height: 100%; display: block; }
.mt-bsod__codes { font: 400 .86rem/1.75 var(--f-display); opacity: .94; }
.mt-bsod__codes code { font-family: var(--f-mono); font-size: .82rem; display: block; margin-top: 4px; opacity: .88; }
.mt-bsod__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.mt-bsod__btn {
  padding: 11px 22px; font: 600 .86rem/1 var(--f-display); text-decoration: none;
  border: 2px solid #fff; transition: background .15s, color .15s;
}
.mt-bsod__btn--solid { background: #fff; color: var(--bsod); }
.mt-bsod__btn--solid:hover { background: rgba(255, 255, 255, .88); }
.mt-bsod__btn--ghost { background: transparent; color: #fff; }
.mt-bsod__btn--ghost:hover { background: #fff; color: var(--bsod); }

/* ==========================================================================
   右侧滑出 Windows 8 Search Charm & Settings Charm & Jump List & 灯箱
   ========================================================================== */
.mt-flyout-bg {
  position: fixed; inset: 0; z-index: 150;
  background: var(--overlay); display: none; justify-content: flex-end;
}
.mt-flyout-bg.is-open { display: flex; }
.mt-flyout {
  width: min(440px, 100vw); height: 100%;
  background: #14151A; color: #FFFFFF;
  border-left: 4px solid var(--accent);
  display: flex; flex-direction: column;
  animation: mtSlide .24s var(--ease-metro);
}
@keyframes mtSlide { from { transform: translateX(100%); } to { transform: none; } }

.mt-flyout__head {
  padding: 24px 24px 16px; display: flex; align-items: center; gap: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.mt-flyout__head .metro-circle-btn { width: 34px; height: 34px; color: #fff; }
.mt-flyout__head .metro-circle-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.mt-flyout__head h2 { margin: 0; font: 200 1.65rem/1 var(--f-display); }
.mt-flyout__body { flex: 1; overflow-y: auto; padding: 20px 24px; display: grid; gap: 20px; align-content: start; }

.mt-search-box {
  margin: 16px 24px 0; display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; background: #FFFFFF; color: #111;
}
.mt-search-box span { font: 700 1rem/1 var(--f-mono); color: var(--accent); }
.mt-search-box input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  color: #111; font: 500 .96rem/1.3 var(--f-body);
}
.mt-search-box input::-webkit-search-cancel-button { display: none; }
.mt-search-list { flex: 1; overflow-y: auto; margin: 12px 0 0; padding: 0; list-style: none; }
.mt-search-item a {
  display: grid; gap: 3px; padding: 12px 24px; text-decoration: none; color: #fff;
  border-left: 3px solid transparent;
}
.mt-search-item[aria-selected="true"] a, .mt-search-item a:hover { background: var(--accent); border-left-color: #fff; }
.mt-search-item__k { font: 600 .66rem/1 var(--f-mono); opacity: .74; letter-spacing: .08em; text-transform: uppercase; }
.mt-search-item__t { font: 600 .95rem/1.35 var(--f-display); }
.mt-search-item__s {
  font-size: .8rem; opacity: .76;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mt-search-item mark { background: rgba(255, 255, 255, .24); color: #fff; padding: 0 2px; }
.mt-search-empty { padding: 18px 24px; color: rgba(255, 255, 255, .64); font: 500 .82rem/1.6 var(--f-mono); }
.mt-search-foot {
  padding: 12px 24px; border-top: 1px solid rgba(255, 255, 255, .12);
  font: 500 .7rem/1.6 var(--f-mono); color: rgba(255, 255, 255, .68);
  display: flex; flex-wrap: wrap; gap: 6px 12px;
}
.mt-search-foot button { color: #4CC2FF; text-decoration: underline; padding: 0; font: inherit; }

/* Settings Charm 控件 */
.mt-set-sec { display: grid; gap: 9px; }
.mt-set-label { font: 600 .72rem/1 var(--f-mono); letter-spacing: .1em; color: rgba(255, 255, 255, .62); text-transform: uppercase; }
.mt-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mt-seg button { padding: 9px 10px; background: rgba(255, 255, 255, .09); color: rgba(255, 255, 255, .86); font: 600 .8rem/1 var(--f-display); }
.mt-seg button.is-on { background: var(--accent); color: #fff; }
.mt-swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.mt-swatch { height: 34px; position: relative; border: 2px solid transparent; }
.mt-swatch.is-on { border-color: #fff; }
.mt-swatch.is-on::after { content: ""; position: absolute; inset: 5px; border: 2px solid #fff; }
.mt-set-links { display: grid; gap: 6px; }
.mt-set-links a, .mt-set-links button {
  padding: 9px 12px; background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none;
  display: flex; justify-content: space-between; align-items: center;
  font: 500 .82rem/1.2 var(--f-display); text-align: left;
}
.mt-set-links a:hover, .mt-set-links button:hover { background: var(--accent); }
.mt-set-links span { font: 500 .68rem/1 var(--f-mono); opacity: .75; }
.mt-set-colophon {
  border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 16px;
  font-size: .8rem; color: rgba(255, 255, 255, .72); line-height: 1.7;
}
.mt-set-colophon a { color: #4CC2FF; }

/* Jump List 全屏矩阵 */
.mt-jumplist {
  position: fixed; inset: 0; z-index: 165; background: var(--overlay);
  display: none; place-items: center; padding: 20px;
}
.mt-jumplist.is-open { display: grid; }
.mt-jumplist__box {
  width: min(460px, 100%); background: #111216; color: #fff;
  border: 3px solid var(--accent); padding: 22px;
}
.mt-jumplist__head { display: flex; justify-content: space-between; align-items: center; }
.mt-jumplist__head h3 { margin: 0; font: 300 1.35rem/1 var(--f-display); }
.mt-jumplist__head .metro-circle-btn { width: 32px; height: 32px; color: #fff; }
.mt-jumplist__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 16px; }
.mt-jl-key {
  aspect-ratio: 1; display: grid; place-items: center;
  background: var(--accent); color: #fff; font: 600 1.05rem/1 var(--f-display);
  text-decoration: none;
}
.mt-jl-key:hover { background: var(--accent-deep); transform: scale(1.06); }
.mt-jl-key.is-off { background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .28); pointer-events: none; }

/* 原生 <dialog> 全屏图片放大灯箱 */
.mt-zoom {
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 24px; border: 0; background: transparent;
}
.mt-zoom[open] { display: grid; place-items: center; }
.mt-zoom::backdrop { background: rgba(5, 7, 12, .94); }
.mt-zoom img {
  max-width: calc(100vw - 48px); max-height: calc(100vh - 48px);
  object-fit: contain; cursor: zoom-out;
}

/* 生成式封面 SVG */
.mt-gen { display: block; width: 100%; height: 100%; }
.mt-gen__glyph { font: 900 420px/1 "Xiu Sans Heavy", "PingFang SC", "Microsoft YaHei", sans-serif; fill: #fff; opacity: .20; }
.mt-gen__label { font: 600 28px/1 "JetBrains Mono", monospace; letter-spacing: .1em; fill: #fff; opacity: .78; }

/* Toast 轻提示 */
.mt-toast {
  position: fixed; left: 50%; top: 16px; transform: translateX(-50%) translateY(-16px);
  z-index: 210; padding: 10px 18px; background: var(--charm-bg); color: #fff;
  border-left: 4px solid var(--accent); font: 600 .8rem/1 var(--f-display);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--ease-metro);
}
.mt-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ==========================================================================
   View Transitions（Metro 轻快转场）
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
::view-transition-old(root) { animation: mt-vt-out .24s var(--ease-metro) both; }
::view-transition-new(root) { animation: mt-vt-in .28s var(--ease-metro) both; }
@keyframes mt-vt-out { from { opacity: 1; } to { opacity: 0; transform: translateX(-16px); } }
@keyframes mt-vt-in  { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   响应式（平板与移动端自动切换为 Windows Phone 8 纵向磁贴体验）
   ========================================================================== */
@media (max-width: 1024px) {
  .mt-start-viewport { height: auto; min-height: 100svh; overflow: visible; }
  .mt-start-canvas {
    flex-direction: column; align-items: stretch; overflow: visible;
    gap: 28px; padding: 8px 28px 36px;
  }
  .mt-group__grid {
    grid-template-rows: none;
    grid-auto-rows: 124px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .mt-reader-body { grid-template-columns: 1fr; padding: 32px 28px; }
  .mt-toc-rail { display: none; }
  .mt-mobile-toc { display: block; }
  .mt-prose { grid-column: 1; justify-self: center; width: min(100%, 44rem); }
  .mt-reader-hero { grid-template-columns: 1fr; padding: 0 28px; }
  .mt-reader-top, .mt-pnav { padding-inline: 28px; }
  .mt-tag-cols { grid-template-columns: repeat(2, 1fr); }
  .mt-about-tiles { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  :root { --charm-w: 0px; --g: 7px; }
  .mt-shell { padding-right: 0; padding-bottom: 60px; }
  .mt-charms {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 56px;
    flex-direction: row; justify-content: space-around; border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .mt-charms__clock { display: none; }
  .mt-charm-btn { padding: 6px 4px; gap: 3px; }
  .mt-pano-head { padding: 16px 16px 8px; gap: 12px; }
  .mt-pano-nav { -webkit-mask-image: linear-gradient(90deg, #000 84%, transparent); mask-image: linear-gradient(90deg, #000 84%, transparent); padding-right: 16px; }
  .mt-user-tile__meta { display: none; }
  .mt-start-canvas { padding: 8px 16px 24px; }
  .mt-start-foot { padding: 0 16px; }
  .mt-group__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 112px; }
  .mt-tile--4x2 { grid-column: span 2; grid-row: span 3; }
  .mt-tile--2x2 { grid-column: span 2; grid-row: span 2; }
  .mt-app-page { padding: 16px 16px 40px; }
  .mt-app-lead { margin-left: 0; }
  .mt-cats-mosaic, .mt-tag-cols, .mt-pnav, .mt-semzoom__grid { grid-template-columns: 1fr; }
  .mt-cat-big--wide { grid-column: span 1; }
  .mt-reader { padding-bottom: 136px; }
  .mt-reader-top, .mt-reader-hero, .mt-reader-body, .mt-pnav { padding-inline: 16px; }
  .mt-reader-hero__info { padding: 22px 20px; }
  .mt-reader-stats { grid-template-columns: 1fr; }
  .mt-appbar { bottom: 56px; right: 0; gap: 14px; }
  .mt-semzoom { inset: 0 0 56px 0; padding: 20px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

@media print {
  .mt-charms, .mt-appbar, .mt-progress-top, .mt-toc-rail, .mt-mobile-toc, .mt-pnav, .mt-comments, .mt-flyout-bg, .mt-semzoom, .mt-jumplist, .mt-toast { display: none !important; }
  .mt-shell { padding: 0 !important; }
  .mt-reader-body { display: block; padding: 16px 0; }
}
