/* ============================================================================
   废土终端 WASTELAND TERMINAL — main.css
   末日废土 × CRT 终端 × 故障艺术
   ========================================================================== */

/* ---------------------------------------------------------------- */
/* 1. 设计令牌                                                        */
/* ---------------------------------------------------------------- */
:root {
    --wst-bg:            #0a0f0a;
    --wst-bg-deep:       #050805;
    --wst-panel:         rgba(14, 21, 14, .82);
    --wst-panel-2:       rgba(10, 16, 10, .92);
    --wst-line:          #1d2c1d;
    --wst-line-bright:   #2f4a2f;
    --wst-accent:        #33ff66;   /* 由后台设置覆盖 */
    --wst-accent-dim:    #1d7a38;
    --wst-accent-2:      #66e0ff;
    --wst-danger:        #8b3a2b;
    --wst-danger-2:      #e0654d;
    --wst-warn:          #ffb000;
    --wst-text:          #c8c8b4;
    --wst-dim:           #6f7a6f;
    --wst-dim-2:         #49543f;
    --wst-scan:          .28;       /* 由后台设置覆盖 */
    --wst-noise:         .28;
    --wst-glitch:        .28;
    --wst-topbar-h:      48px;
    --wst-rail-w:        56px;
    --wst-prompt-h:      30px;
    --wst-font-mono:     "Fusion Pixel 12px Monospaced SC", "IBM Plex Mono",
                         ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
    --wst-radius:        3px;
    --wst-glow:          0 0 10px rgba(51, 255, 102, .18);
}

html[data-mode="light"] {
    --wst-bg:            #f2e6c9;
    --wst-bg-deep:       #e8dab4;
    --wst-panel:         rgba(248, 240, 216, .85);
    --wst-panel-2:       rgba(244, 234, 204, .95);
    --wst-line:          #c9b98c;
    --wst-line-bright:   #a89a6e;
    --wst-accent-2:      #3a7c96;
    --wst-danger-2:      #a03a22;
    --wst-text:          #1a1a12;
    --wst-dim:           #6b6650;
    --wst-dim-2:         #948d70;
    --wst-glow:          0 0 10px rgba(47, 107, 58, .14);
}

/* ---------------------------------------------------------------- */
/* 2. 基础与重置                                                      */
/* ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scrollbar-color: var(--wst-accent-dim) var(--wst-bg-deep);
}

body {
    margin: 0;
    background: var(--wst-bg);
    color: var(--wst-text);
    font: 400 12px/2 var(--wst-font-mono);
    letter-spacing: .01em;
    overflow-x: hidden;
    background-image:
        radial-gradient(ellipse 90% 60% at 50% -10%, rgba(51, 255, 102, .05), transparent),
        linear-gradient(180deg, transparent, rgba(0, 0, 0, .35));
    min-height: 100vh;
}

html[data-mode="light"] body {
    background-image:
        radial-gradient(ellipse 90% 60% at 50% -10%, rgba(178, 106, 0, .07), transparent),
        linear-gradient(180deg, transparent, rgba(120, 100, 40, .10));
}

img { max-width: 100%; height: auto; }
a { color: var(--wst-accent); text-decoration: none; }
a:hover { color: var(--wst-accent-2); text-decoration: underline; text-underline-offset: 3px; }

::selection { background: var(--wst-accent); color: var(--wst-bg-deep); }

:focus-visible {
    outline: 2px solid var(--wst-warn);
    outline-offset: 2px;
    border-radius: 1px;
}

:focus:not(:focus-visible) { outline: none; }

.skip-link {
    position: absolute; left: 12px; top: -48px; z-index: 400;
    padding: 8px 14px;
    background: var(--wst-bg-deep); color: var(--wst-accent);
    border: 1px solid var(--wst-accent);
    transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

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

/* ---------------------------------------------------------------- */
/* 3. CRT 显示器质感层（扫描线 / 噪点 / 暗角 / 信号条）               */
/* ---------------------------------------------------------------- */
body::before {
    content: "";
    position: fixed; inset: 0;
    z-index: 220;
    pointer-events: none;
    background: repeating-linear-gradient(to bottom,
        rgba(0, 0, 0, .65) 0px, rgba(0, 0, 0, .65) 1px,
        transparent 1px, transparent 3px);
    opacity: var(--wst-scan);
}

body::after {
    content: "";
    position: fixed; inset: 0;
    z-index: 221;
    pointer-events: none;
    background-image:
        url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='240'%20height='240'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.85'%20numOctaves='2'%20stitchTiles='stitch'/%3E%3CfeColorMatrix%20type='saturate'%20values='0'/%3E%3C/filter%3E%3Crect%20width='240'%20height='240'%20filter='url(%23n)'%20opacity='0.5'/%3E%3C/svg%3E"),
        radial-gradient(ellipse 120% 90% at 50% 42%, transparent 55%, rgba(0, 0, 0, .58) 100%);
    background-size: 240px 240px, 100% 100%;
    opacity: var(--wst-noise);
    animation: wst-noise-flick 3.6s steps(3) infinite;
}

/* 缓慢下滚的信号亮带 */
html::after {
    content: "";
    position: fixed; left: 0; right: 0; top: -140px;
    height: 140px;
    z-index: 222;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, .04), transparent);
    animation: wst-roll 8s linear infinite;
}

html[data-mode="light"] body::before { opacity: calc(var(--wst-scan) * .45); }
html[data-mode="light"] body::after  { opacity: calc(var(--wst-noise) * .38); }
html[data-mode="light"] html::after  { background: linear-gradient(to bottom, transparent, rgba(120, 100, 40, .06), transparent); }

html.no-flicker body::before,
html.no-flicker body::after,
html.no-flicker::after { animation: none !important; }

@keyframes wst-noise-flick {
    0%, 100% { opacity: var(--wst-noise); }
    50%      { opacity: calc(var(--wst-noise) * .72); }
    73%      { opacity: calc(var(--wst-noise) * 1.08); }
}

@keyframes wst-roll {
    0%   { transform: translateY(0); }
    100% { transform: translateY(calc(100vh + 280px)); }
}

/* ---------------------------------------------------------------- */
/* 4. 布局骨架                                                        */
/* ---------------------------------------------------------------- */
.wst-frame {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: calc(var(--wst-topbar-h) + 26px) 24px calc(var(--wst-prompt-h) + 44px) calc(var(--wst-rail-w) + 24px);
}

.wst-main { outline: none; }

.wst-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
    align-items: start;
    margin-top: 22px;
}

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

/* 密度网格模式：日志双列 */
.layout-grid .wst-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}
.layout-grid .content-kicker,
.layout-grid .wst-pagination { grid-column: 1 / -1; }
.layout-grid .log-card { display: flex; flex-direction: column; }
.layout-grid .log-excerpt { flex: 1; }

.wst-sidebar { min-width: 0; }

@media (max-width: 1080px) {
    .wst-layout,
    .layout-grid .wst-content { grid-template-columns: minmax(0, 1fr); }
    .wst-sidebar { order: 2; }
}

/* ---------------------------------------------------------------- */
/* 5. 面板（ASCII 边框终端窗格）                                      */
/* ---------------------------------------------------------------- */
.wst-panel {
    position: relative;
    background: var(--wst-panel);
    border: 1px solid var(--wst-line);
    border-radius: var(--wst-radius);
    box-shadow: inset 0 0 32px rgba(0, 0, 0, .35), var(--wst-glow);
}

html[data-mode="light"] .wst-panel { box-shadow: inset 0 0 24px rgba(120, 100, 40, .10); }

.wst-panel::before,
.wst-panel::after {
    content: "";
    position: absolute;
    width: 9px; height: 9px;
    pointer-events: none;
}
.wst-panel::before {
    top: -1px; left: -1px;
    border-top: 2px solid var(--wst-accent-dim);
    border-left: 2px solid var(--wst-accent-dim);
}
.wst-panel::after {
    bottom: -1px; right: -1px;
    border-bottom: 2px solid var(--wst-accent-dim);
    border-right: 2px solid var(--wst-accent-dim);
}

.panel-heading {
    margin: 0;
    padding: 12px 16px 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    color: var(--wst-accent);
    border-bottom: 1px dashed var(--wst-line);
    text-transform: uppercase;
}

.content-kicker {
    margin: 0 0 14px;
    padding-left: 10px;
    border-left: 3px solid var(--wst-accent-dim);
    font-size: 12px;
    letter-spacing: .18em;
    color: var(--wst-dim);
    text-transform: uppercase;
}

/* ---------------------------------------------------------------- */
/* 6. 顶部状态栏                                                      */
/* ---------------------------------------------------------------- */
.wst-topbar {
    position: fixed;
    top: 0; left: var(--wst-rail-w); right: 0;
    z-index: 300;
    height: var(--wst-topbar-h);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 16px;
    background: linear-gradient(180deg, var(--wst-panel-2), rgba(10, 16, 10, .78));
    border-bottom: 1px solid var(--wst-line);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

html[data-mode="light"] .wst-topbar { background: linear-gradient(180deg, var(--wst-panel-2), rgba(244, 234, 204, .78)); }

.tb-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 34px; height: 34px;
    padding: 7px;
    background: transparent;
    border: 1px solid var(--wst-line);
    cursor: pointer;
}
.tb-burger span {
    display: block; height: 2px;
    background: var(--wst-accent);
    transition: transform .18s ease, opacity .18s ease;
}
.tb-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.tb-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.tb-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.tb-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .12em;
    color: var(--wst-accent);
    white-space: nowrap;
}
.tb-brand:hover { text-decoration: none; color: var(--wst-accent-2); }
.tb-atom { font-size: 18px; line-height: 1; animation: wst-spin-atom 14s linear infinite; }
@keyframes wst-spin-atom { to { transform: rotate(360deg); } }
.tb-logo { display: block; border-radius: 2px; }
.tb-led {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--wst-accent);
    box-shadow: 0 0 8px var(--wst-accent);
    animation: wst-led 2.2s ease-in-out infinite;
}
@keyframes wst-led { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.tb-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.tb-nav::-webkit-scrollbar { display: none; }
.tb-nav a {
    padding: 5px 9px;
    font-size: 12px;
    letter-spacing: .08em;
    color: var(--wst-dim);
    border: 1px solid transparent;
    white-space: nowrap;
}
.tb-nav a:hover { color: var(--wst-accent); text-decoration: none; border-color: var(--wst-line); }
.tb-nav a[aria-current="page"] {
    color: var(--wst-accent);
    border-color: var(--wst-accent-dim);
    background: rgba(51, 255, 102, .07);
}

.tb-tilde {
    display: none;
    color: var(--wst-dim);
    letter-spacing: .08em;
    flex-shrink: 0;
}
.tb-tilde::after {
    content: "▊";
    margin-left: 6px;
    color: var(--wst-accent);
    animation: wst-blink 1.06s steps(1) infinite;
}

.tb-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex-shrink: 0;
}

.tb-clock {
    font-size: 12px;
    color: var(--wst-dim);
    letter-spacing: .1em;
    font-variant-numeric: tabular-nums;
}

.tb-search-btn, .tb-mode {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 30px;
    padding: 0 10px;
    background: transparent;
    border: 1px solid var(--wst-line);
    border-radius: var(--wst-radius);
    color: var(--wst-text);
    font: 500 12px/1 var(--wst-font-mono);
    letter-spacing: .08em;
    cursor: pointer;
}
.tb-search-btn:hover, .tb-mode:hover { border-color: var(--wst-accent-dim); color: var(--wst-accent); }
.tb-mode-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--wst-warn);
    box-shadow: 0 0 6px var(--wst-warn);
}
html[data-mode="light"] .tb-mode-dot { background: var(--wst-accent-2); box-shadow: 0 0 6px var(--wst-accent-2); }

.tb-search-panel {
    position: absolute;
    top: calc(var(--wst-topbar-h) + 6px);
    right: 12px;
    left: auto;
    width: min(480px, calc(100vw - 90px));
    padding: 10px;
    background: var(--wst-panel-2);
    border: 1px solid var(--wst-line-bright);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
    z-index: 301;
}
.tb-search-panel[hidden] { display: none; }

.search-form { display: flex; align-items: center; gap: 8px; }
.search-label { font-size: 12px; color: var(--wst-warn); white-space: nowrap; }
.search-input {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    background: var(--wst-bg-deep);
    border: 1px solid var(--wst-line);
    border-radius: var(--wst-radius);
    color: var(--wst-accent);
    font: 500 14px/1.4 var(--wst-font-mono);
    caret-color: var(--wst-accent);
}
.search-input::placeholder { color: var(--wst-dim-2); }
.search-input:focus { outline: none; border-color: var(--wst-accent-dim); box-shadow: var(--wst-glow); }
.search-submit {
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--wst-accent-dim);
    border-radius: var(--wst-radius);
    color: var(--wst-accent);
    font: 700 12px/1 var(--wst-font-mono);
    letter-spacing: .06em;
    cursor: pointer;
    white-space: nowrap;
}
.search-submit:hover { background: rgba(51, 255, 102, .1); }

/* ---------------------------------------------------------------- */
/* 7. 左侧行号轨道                                                    */
/* ---------------------------------------------------------------- */
.wst-rail {
    position: fixed;
    top: 0; bottom: 0; left: 0;
    width: var(--wst-rail-w);
    z-index: 290;
    padding: calc(var(--wst-topbar-h) + 14px) 8px 14px 0;
    overflow: hidden;
    border-right: 1px solid var(--wst-line);
    background: var(--wst-bg-deep);
    color: var(--wst-dim-2);
    font-size: 10.5px;
    line-height: 24px;
    text-align: right;
    user-select: none;
    letter-spacing: .06em;
}
.wst-rail i { display: block; font-style: normal; }
.wst-rail i:nth-child(10n) { color: var(--wst-accent-dim); }

/* ---------------------------------------------------------------- */
/* 8. 首页 Hero 开机面板                                              */
/* ---------------------------------------------------------------- */
.hero {
    margin-top: 22px;
    padding: 34px 30px 28px;
    overflow: hidden;
}
.hero-line {
    margin: 0 0 10px;
    font-size: 12px;
    letter-spacing: .16em;
    color: var(--wst-warn);
}
.hero-title {
    margin: 0 0 12px;
    font-size: clamp(24px, 4vw, 48px);
    line-height: 1.16;
    letter-spacing: .06em;
    color: var(--wst-accent);
    text-shadow: 0 0 18px rgba(51, 255, 102, .35);
}
html[data-mode="light"] .hero-title { text-shadow: none; }
.hero-sub {
    margin: 0 0 18px;
    min-height: 1.7em;
    font-size: 12px;
    color: var(--wst-text);
}
.hero-sub .tw-caret, .boot-caret {
    display: inline-block;
    width: .6em;
    color: var(--wst-accent);
    animation: wst-blink 1.06s steps(1) infinite;
}
@keyframes wst-blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    padding-top: 14px;
    border-top: 1px dashed var(--wst-line);
    font-size: 12px;
    letter-spacing: .1em;
    color: var(--wst-dim);
}
.hero-stats b { color: var(--wst-text); font-weight: 700; }
.hero-stats .ok b { color: var(--wst-accent); }
.hero-stats .warn b { color: var(--wst-warn); }

/* ---------------------------------------------------------------- */
/* 9. 日志条目卡片                                                    */
/* ---------------------------------------------------------------- */
.log-card {
    margin-bottom: 20px;
    padding: 18px 20px 16px;
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.log-card:hover {
    border-color: var(--wst-accent-dim);
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, .4), var(--wst-glow);
}

.log-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin-bottom: 10px;
    font-size: 12px;
    letter-spacing: .1em;
    color: var(--wst-dim);
}
.log-id { color: var(--wst-accent-dim); font-weight: 700; }
.log-chk { color: var(--wst-dim-2); }
.log-level { font-weight: 700; }
.lv-info     { color: var(--wst-dim); }
.lv-warn     { color: var(--wst-warn); }
.lv-hot      { color: var(--wst-danger-2); }
.lv-critical { color: var(--wst-warn); animation: wst-blink 1.4s steps(1) infinite; }
.log-pin { color: var(--wst-warn); }

.log-title {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.4;
    letter-spacing: .02em;
}
.log-title a { color: var(--wst-text); }
.log-title a:hover { color: var(--wst-accent); text-decoration: none; text-shadow: 0 0 12px rgba(51, 255, 102, .4); }

.log-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin-bottom: 10px;
    font-size: 12px;
    letter-spacing: .06em;
    color: var(--wst-dim-2);
}
.log-stats a { color: var(--wst-dim); }
.log-stats a:hover { color: var(--wst-accent); }

.log-excerpt {
    margin: 0 0 12px;
    font-size: 12px;
    line-height: 1.8;
    color: var(--wst-text);
    opacity: .88;
}

.log-more {
    display: inline-block;
    padding: 4px 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--wst-accent);
}
.log-more:hover { color: var(--wst-accent-2); }

.empty-card { border-style: dashed; }

/* ---------------------------------------------------------------- */
/* 10. 归档页头部                                                      */
/* ---------------------------------------------------------------- */
.archive-head { margin-top: 22px; padding: 26px 28px 22px; }
.archive-crumb, .post-crumb {
    margin: 0 0 8px;
    font-size: 12px;
    color: var(--wst-dim-2);
    letter-spacing: .04em;
}
.archive-title, .post-title {
    margin: 0 0 10px;
    font-size: clamp(24px, 3.4vw, 30px);
    line-height: 1.3;
    letter-spacing: .04em;
    color: var(--wst-accent);
}
.archive-desc { margin: 0 0 14px; font-size: 12px; color: var(--wst-text); opacity: .85; }
.archive-stats, .post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    font-size: 12px;
    letter-spacing: .08em;
    color: var(--wst-dim);
}
.archive-stats b, .post-meta b { color: var(--wst-accent); }
.post-meta a { color: var(--wst-dim); }
.post-meta a:hover { color: var(--wst-accent); }

.search-form-page { margin: 4px 0 16px; max-width: 620px; }

/* ---------------------------------------------------------------- */
/* 11. 文章页                                                         */
/* ---------------------------------------------------------------- */
.post-entry { min-width: 0; }
.post-header { margin-top: 22px; padding: 26px 28px 20px; }
.post-tags {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--wst-line);
    font-size: 12px;
    letter-spacing: .06em;
}
.post-tags a {
    color: var(--wst-warn);
    border-bottom: 1px dotted var(--wst-warn);
}
.post-tags a:hover { color: var(--wst-accent); border-color: var(--wst-accent); }

.wst-post-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 26px;
    align-items: start;
    margin-top: 20px;
}

.post-body { padding: 26px 30px; overflow-wrap: break-word; }

.wst-page-layout { margin-top: 20px; }

/* 正文排版 */
.post-body > *:first-child { margin-top: 0; }
.post-body > *:last-child { margin-bottom: 0; }

.post-body h2, .post-body h3, .post-body h4 {
    color: var(--wst-accent);
    letter-spacing: .03em;
    line-height: 1.4;
    scroll-margin-top: calc(var(--wst-topbar-h) + 18px);
}
.post-body h2 {
    margin: 34px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--wst-line-bright);
    font-size: 18px;
}
.post-body h2::before { content: "▍"; margin-right: 8px; color: var(--wst-accent-dim); }
.post-body h3 { margin: 26px 0 12px; font-size: 12px; }
.post-body h3::before { content: "▸ "; color: var(--wst-accent-dim); }
.post-body h4 { margin: 20px 0 10px; font-size: 12px; }

.post-body p { margin: 0 0 1.2em; }

.post-body a { border-bottom: 1px dotted var(--wst-accent-dim); }
.post-body a:hover { text-decoration: none; border-bottom-style: solid; }

.post-body img {
    display: block;
    margin: 18px auto;
    border: 1px solid var(--wst-line-bright);
    border-radius: var(--wst-radius);
    filter: saturate(.85) contrast(1.04);
    transition: filter .25s ease;
}
.post-body img:hover { filter: none; }

.post-body blockquote {
    margin: 20px 0;
    padding: 12px 18px;
    border-left: 3px solid var(--wst-warn);
    background: rgba(255, 176, 0, .05);
    color: var(--wst-text);
}
.post-body blockquote::before {
    content: "▚ INTERCEPTED TRANSMISSION ▞";
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    letter-spacing: .16em;
    color: var(--wst-warn);
}
.post-body blockquote p:last-child { margin-bottom: 0; }

.post-body code {
    padding: 2px 6px;
    background: var(--wst-bg-deep);
    border: 1px solid var(--wst-line);
    border-radius: 2px;
    color: var(--wst-accent-2);
    font-size: .9em;
}

.post-body pre {
    position: relative;
    margin: 20px 0;
    padding: 14px 16px;
    background: var(--wst-bg-deep);
    border: 1px solid var(--wst-line-bright);
    border-radius: var(--wst-radius);
    overflow-x: auto;
    line-height: 1.62;
    font-size: 12px;
    scrollbar-color: var(--wst-accent-dim) transparent;
}
.post-body pre code { padding: 0; background: none; border: 0; color: var(--wst-text); }

.code-wrap { position: relative; }
.code-wrap .code-lang {
    position: absolute;
    top: 0; right: 0;
    padding: 2px 9px;
    background: var(--wst-line);
    color: var(--wst-bg-deep);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .12em;
    border-radius: 0 0 0 var(--wst-radius);
    user-select: none;
}
.code-wrap .copy-btn {
    position: absolute;
    top: 8px; right: 8px;
    padding: 4px 10px;
    background: rgba(5, 8, 5, .85);
    border: 1px solid var(--wst-accent-dim);
    border-radius: 2px;
    color: var(--wst-accent);
    font: 700 11px/1 var(--wst-font-mono);
    letter-spacing: .08em;
    cursor: pointer;
    opacity: 0;
    transition: opacity .18s ease;
}
.code-wrap:hover .copy-btn, .copy-btn:focus-visible { opacity: 1; }
.copy-btn:hover { background: var(--wst-accent-dim); color: var(--wst-bg-deep); }
.copy-btn.is-done { color: var(--wst-warn); border-color: var(--wst-warn); }

/* 迷你代码高亮 */
.tok-kw  { color: var(--wst-accent); font-weight: 700; }
.tok-str { color: var(--wst-warn); }
.tok-com { color: var(--wst-dim-2); font-style: italic; }
.tok-num { color: var(--wst-danger-2); }
.tok-fn  { color: var(--wst-accent-2); }

.post-body table {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
    font-size: 12px;
}
.post-body th, .post-body td {
    padding: 8px 12px;
    border: 1px solid var(--wst-line);
    text-align: left;
}
.post-body th { background: rgba(51, 255, 102, .06); color: var(--wst-accent); letter-spacing: .06em; }

.post-body ul, .post-body ol { margin: 0 0 1.2em; padding-left: 1.6em; }
.post-body li { margin-bottom: .4em; }
.post-body li::marker { color: var(--wst-accent-dim); }

.post-body hr {
    margin: 30px 0;
    border: 0;
    height: 14px;
    background: repeating-linear-gradient(to right,
        var(--wst-line-bright) 0 14px, transparent 14px 22px);
    opacity: .55;
}
.post-body hr::before { content: none; }

.post-body kbd {
    padding: 2px 7px;
    border: 1px solid var(--wst-line-bright);
    border-bottom-width: 3px;
    border-radius: 3px;
    background: var(--wst-bg-deep);
    font-size: .85em;
    color: var(--wst-warn);
}

.post-body mark { background: rgba(255, 176, 0, .25); color: inherit; }

/* 目录面板 */
.wst-toc { position: sticky; top: calc(var(--wst-topbar-h) + 18px); min-width: 0; }
.toc-panel { padding: 0 0 12px; max-height: calc(100vh - var(--wst-topbar-h) - 70px); display: flex; flex-direction: column; }
.toc-title { margin: 0; padding: 12px 14px 10px; font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--wst-accent); border-bottom: 1px dashed var(--wst-line); }
.toc-nav { overflow-y: auto; padding: 10px 8px; flex: 1; }
.toc-nav ol { margin: 0; padding-left: 14px; list-style: none; }
.toc-nav > ol { padding-left: 0; }
.toc-nav a {
    display: block;
    padding: 3px 8px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--wst-dim);
    border-left: 2px solid transparent;
}
.toc-nav a:hover { color: var(--wst-accent); text-decoration: none; }
.toc-nav a.is-active {
    color: var(--wst-accent);
    border-left-color: var(--wst-accent);
    background: rgba(51, 255, 102, .06);
}
.toc-nav .toc-h2 a { font-weight: 700; }
.toc-hint { margin: 0; padding: 8px 14px 0; font-size: 12px; color: var(--wst-dim-2); border-top: 1px dashed var(--wst-line); }
.toc-hint kbd { font-size: 10px; }
.wst-toc[data-toc-open="0"] .toc-nav, .wst-toc[data-toc-open="0"] .toc-hint { display: none; }
.toc-toggle { display: none; }

/* 上一篇 / 下一篇 */
.post-foot { margin-top: 24px; }
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 24px;
}
.pn {
    padding: 14px 16px;
    border: 1px dashed var(--wst-line-bright);
    font-size: 12px;
    line-height: 1.6;
}
.pn.next { text-align: right; }
.pn a { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.pn.prev a::before  { content: "◀ "; color: var(--wst-accent-dim); }
.pn.next a::after   { content: " ▶"; color: var(--wst-accent-dim); }

/* 相关日志 */
.related { margin-bottom: 24px; }
.related-list { margin: 0; padding: 8px 18px; list-style: none; }
.related-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    padding: 9px 2px;
    border-bottom: 1px dashed var(--wst-line);
}
.related-list li:last-child { border-bottom: 0; }
.related-list li::before { content: "▸"; color: var(--wst-accent-dim); }
.related-list a { font-weight: 700; font-size: 12px; }
.rl-meta { font-size: 12px; color: var(--wst-dim-2); }

/* ---------------------------------------------------------------- */
/* 12. 无线电通讯记录（评论）                                          */
/* ---------------------------------------------------------------- */
.radio-log { padding-bottom: 18px; }

.sig-list { margin: 0; padding: 10px 20px 0; list-style: none; }

.sig {
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid var(--wst-line);
    border-left: 3px solid var(--wst-accent-dim);
    background: var(--wst-panel-2);
    border-radius: var(--wst-radius);
}
.sig-odd  { border-left-color: var(--wst-accent-dim); }
.sig-even { border-left-color: var(--wst-line-bright); }
.sig-by-owner { border-left-color: var(--wst-warn); }

.sig-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin-bottom: 6px;
}
.sig-avatar img.avatar {
    display: block;
    width: 34px; height: 34px;
    border: 1px solid var(--wst-line-bright);
    border-radius: 2px;
    filter: grayscale(1) sepia(.6) hue-rotate(60deg) saturate(2.4) brightness(.92);
}
.sig-author { font-weight: 700; color: var(--wst-accent); overflow-wrap: anywhere; max-width: 100%; }
.sig-author a { color: var(--wst-accent); }
.sig-no { margin-left: auto; font-size: 12px; color: var(--wst-dim-2); letter-spacing: .1em; }
.sig-owner { font-size: 10.5px; font-weight: 700; color: var(--wst-warn); letter-spacing: .1em; }

.sig-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--wst-dim-2);
    letter-spacing: .06em;
}
.sig-waiting { color: var(--wst-warn); font-style: normal; }

.sig-body { font-size: 12px; line-height: 1.75; overflow-wrap: break-word; }
.sig-body p { margin: 0 0 .6em; }
.sig-body p:last-child { margin-bottom: 0; }

.sig-ops {
    display: flex;
    gap: 14px;
    margin-top: 8px;
    font-size: 12px;
    letter-spacing: .08em;
}
.sig-ops a { color: var(--wst-dim); }
.sig-ops a:hover { color: var(--wst-accent); }

.sig-thread { margin: 12px 0 0; padding-left: 16px; border-left: 1px dashed var(--wst-line); }
.sig-thread .sig-list { padding: 0; }
.sig-thread .sig { background: transparent; }

.sig-empty, .sig-closed, .side-empty { padding: 10px 20px 4px; font-size: 12px; color: var(--wst-dim); }

/* 回复表单 */
.respond { margin: 22px 20px 0; padding: 18px; border: 1px dashed var(--wst-line-bright); border-radius: var(--wst-radius); }
.respond-title { margin: 0 0 14px; font-size: 12px; letter-spacing: .1em; color: var(--wst-accent); }
.respond p { margin: 0 0 12px; }
.respond-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 14px; }
.respond-field label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--wst-dim);
}
.respond-field .required::after { content: " *"; color: var(--wst-danger-2); }
.respond input.text, .respond textarea {
    width: 100%;
    padding: 9px 11px;
    background: var(--wst-bg-deep);
    border: 1px solid var(--wst-line);
    border-radius: var(--wst-radius);
    color: var(--wst-text);
    font: 400 13.5px/1.7 var(--wst-font-mono);
    resize: vertical;
}
.respond input.text:focus, .respond textarea:focus {
    outline: none;
    border-color: var(--wst-accent-dim);
    box-shadow: var(--wst-glow);
}
.respond-login { font-size: 12px; color: var(--wst-text); }
.respond-login a { margin-left: 8px; font-size: 12px; }

.respond-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
#cancel-comment-reply-link {
    font-size: 12px;
    color: var(--wst-warn);
    border-bottom: 1px dotted var(--wst-warn);
}
.respond-hint { font-size: 11.5px !important; color: var(--wst-dim-2) !important; margin-bottom: 0 !important; }

/* 评论分页 */
.sig-list + .page-navigator, .radio-log .page-navigator {
    padding: 4px 20px 8px;
}

/* ---------------------------------------------------------------- */
/* 13. 侧栏面板                                                        */
/* ---------------------------------------------------------------- */
.side-panel { margin-bottom: 22px; }
.side-panel .panel-heading:last-child { border-bottom: 0; }
.side-site { margin: 12px 16px 4px; font-weight: 700; color: var(--wst-accent); letter-spacing: .06em; }
.side-desc { margin: 0 16px 12px; font-size: 12px; color: var(--wst-dim); line-height: 1.7; }

.side-stats {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 14px;
    margin: 0;
    padding: 10px 16px 16px;
    border-top: 1px dashed var(--wst-line);
    font-size: 12px;
    letter-spacing: .08em;
}
.side-stats dt { color: var(--wst-dim-2); }
.side-stats dd { margin: 0; color: var(--wst-text); font-weight: 700; }
.side-stats dd.ok { color: var(--wst-accent); }
.side-stats dd.warn { color: var(--wst-warn); }

.side-sectors { margin: 0; padding: 8px 10px 12px; list-style: none; }
.side-sectors li { border-bottom: 1px dashed var(--wst-line); }
.side-sectors li:last-child { border-bottom: 0; }
.side-sectors a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 8px 8px;
    color: var(--wst-text);
    font-size: 12px;
}
.side-sectors a:hover { text-decoration: none; color: var(--wst-accent); background: rgba(51, 255, 102, .05); }
.sc-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-count { color: var(--wst-accent-dim); font-size: 12px; flex-shrink: 0; }

.side-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 14px 16px 16px;
}
.side-tag {
    padding: 2px 8px;
    border: 1px solid var(--wst-line);
    border-radius: 2px;
    color: var(--wst-dim);
    font-size: 12px;
    line-height: 1.6;
}
.side-tag:hover { text-decoration: none; color: var(--wst-accent); border-color: var(--wst-accent-dim); }
.side-tag.w-s1 { font-size: 12px; color: var(--wst-dim-2); }
.side-tag.w-s2 { font-size: 12px; color: var(--wst-dim); }
.side-tag.w-s3 { font-size: 12px; color: var(--wst-text); border-color: var(--wst-line-bright); }
.side-tag.w-s4 { font-size: 18px; font-weight: 700; color: var(--wst-accent); border-color: var(--wst-accent-dim); }

.side-rx { margin: 0; padding: 8px 10px 12px; list-style: none; }
.side-rx li { border-bottom: 1px dashed var(--wst-line); }
.side-rx li:last-child { border-bottom: 0; }
.side-rx a {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    align-items: baseline;
    padding: 8px;
    font-size: 12px;
    color: var(--wst-dim);
}
.side-rx a:hover { text-decoration: none; color: var(--wst-accent); }
.rx-author {
    font-weight: 700;
    color: var(--wst-warn);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 9em;
    min-width: 0;
}
.rx-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--wst-dim); }
.rx-date { color: var(--wst-dim-2); font-size: 12px; }

.side-panel .vault-link {
    display: flex;
    justify-content: space-between;
    padding: 8px 16px;
    font-size: 12px;
    color: var(--wst-dim);
    border-top: 1px dashed var(--wst-line);
}
.side-panel .vault-link:first-of-type { border-top: 0; margin-top: 10px; }
.side-panel .vault-link:hover { text-decoration: none; color: var(--wst-accent); background: rgba(51, 255, 102, .05); }
.v-count { color: var(--wst-accent-dim); }

.side-uplink { margin: 0; padding: 10px 16px 16px; list-style: none; }
.side-uplink li { padding: 3px 0; font-size: 12px; }
.side-uplink a { color: var(--wst-text); }
.side-uplink a:hover { color: var(--wst-accent); }

/* ---------------------------------------------------------------- */
/* 14. 分页                                                            */
/* ---------------------------------------------------------------- */
.wst-pagination { margin: 26px 0 8px; }
.page-navigator {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.page-navigator li a, .page-navigator li.current {
    display: inline-block;
    min-width: 38px;
    padding: 7px 12px;
    border: 1px solid var(--wst-line);
    border-radius: var(--wst-radius);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-align: center;
    color: var(--wst-dim);
}
.page-navigator li a:hover { color: var(--wst-accent); border-color: var(--wst-accent-dim); text-decoration: none; }
.page-navigator li.current {
    color: var(--wst-bg-deep);
    background: var(--wst-accent);
    border-color: var(--wst-accent);
    box-shadow: 0 0 12px rgba(51, 255, 102, .4);
}
.wst-pagination-classic { display: flex; justify-content: space-between; gap: 14px; }

/* ---------------------------------------------------------------- */
/* 15. 终端归档树 & 友链节点                                           */
/* ---------------------------------------------------------------- */
.arch-tree { padding: 8px 22px 20px; }
.arch-year { margin-top: 20px; }
.arch-year:first-child { margin-top: 8px; }
.arch-year-title {
    margin: 0 0 6px;
    font-size: 16px;
    letter-spacing: .12em;
    color: var(--wst-warn);
}
.ay-count { font-size: 12px; color: var(--wst-dim-2); }
.arch-month-list { margin: 0; padding: 0; list-style: none; }
.arch-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 4px 14px;
    align-items: baseline;
    padding: 9px 2px;
    border-bottom: 1px dashed var(--wst-line);
    font-size: 12px;
}
.arch-item:last-child { border-bottom: 0; }
.ai-date { color: var(--wst-accent-dim); font-variant-numeric: tabular-nums; }
.ai-title { font-weight: 700; color: var(--wst-text); min-width: 0; overflow-wrap: anywhere; }
.ai-title:hover { color: var(--wst-accent); text-decoration: none; }
.ai-meta { grid-column: 2; font-size: 12px; color: var(--wst-dim-2); }

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin: 0; padding: 0; list-style: none;
}
.link-node { margin: 0; }
.ln-link { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; }
.ln-link:hover { text-decoration: none; }
.ln-name { font-weight: 700; font-size: 12px; color: var(--wst-accent); }
.ln-desc { font-size: 12px; color: var(--wst-text); opacity: .85; line-height: 1.7; }
.ln-url { font-size: 12px; color: var(--wst-dim-2); overflow-wrap: anywhere; }
.link-node:hover { border-color: var(--wst-accent-dim); }
.page-extra { margin-top: 24px; }

/* ---------------------------------------------------------------- */
/* 16. 底部命令提示符 & 页脚                                           */
/* ---------------------------------------------------------------- */
.wst-promptbar {
    position: fixed;
    left: var(--wst-rail-w); right: 0; bottom: 0;
    z-index: 300;
    height: var(--wst-prompt-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 14px;
    background: var(--wst-panel-2);
    border-top: 1px solid var(--wst-line);
    font-size: 12px;
    letter-spacing: .06em;
    color: var(--wst-dim);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}
.pb-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pb-prompt { color: var(--wst-accent-dim); flex-shrink: 0; }
.pb-cwd { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-caret { color: var(--wst-accent); animation: wst-blink 1.06s steps(1) infinite; flex-shrink: 0; }
.pb-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.pb-sep { color: var(--wst-dim-2); }

.wst-footer { margin-top: 30px; }
.ft-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 18px;
    padding: 14px 2px 0;
    border-top: 1px dashed var(--wst-line);
    font-size: 12px;
    letter-spacing: .08em;
    color: var(--wst-dim-2);
}
.ft-links a { color: var(--wst-dim); }
.ft-links a:hover { color: var(--wst-accent); }
.ft-icp { color: var(--wst-dim-2); }

/* ---------------------------------------------------------------- */
/* 17. 开机自检 / 转场 / 进度 / 故障                                   */
/* ---------------------------------------------------------------- */
.boot-overlay {
    position: fixed; inset: 0;
    z-index: 500;
    background: var(--wst-bg-deep);
    padding: 9vh 8vw;
    cursor: pointer;
}
.boot-overlay[hidden] { display: none; }
.boot-log {
    margin: 0;
    font: 500 clamp(12px, 1.6vw, 14px)/2 var(--wst-font-mono);
    color: var(--wst-accent);
    white-space: pre-wrap;
    text-shadow: 0 0 8px rgba(51, 255, 102, .4);
}
.boot-log .bl-warn { color: var(--wst-warn); }
.boot-skip {
    position: absolute;
    bottom: 5vh; left: 8vw;
    margin: 0;
    font-size: 12px;
    letter-spacing: .14em;
    color: var(--wst-dim-2);
}

.crt-veil {
    position: fixed; inset: 0;
    z-index: 499;
    background: #000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .16s ease;
}
html.crt-out .crt-veil { opacity: .96; }
html.crt-out .wst-frame { filter: brightness(.5) saturate(.6); }
html.crt-out .wst-frame { transition: filter .16s ease; }

.wst-progress {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    z-index: 310;
    pointer-events: none;
    background: rgba(0, 0, 0, .4);
}
.wst-progress i {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--wst-accent-dim), var(--wst-accent));
    box-shadow: 0 0 10px var(--wst-accent);
}

/* 故障标题 */
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: var(--wst-glitch);
    clip-path: inset(0 0 0 0);
}
.glitch::before {
    color: var(--wst-danger-2);
    transform: translate(2px, -1px);
    animation: wst-glitch-a 3.2s infinite steps(1);
}
.glitch::after {
    color: var(--wst-accent-2);
    transform: translate(-2px, 1px);
    animation: wst-glitch-b 2.7s infinite steps(1);
}
.glitch.is-glitching::before { animation: wst-glitch-burst-a .32s steps(2) infinite; }
.glitch.is-glitching::after  { animation: wst-glitch-burst-b .28s steps(2) infinite; }

@keyframes wst-glitch-a {
    0%, 88%, 100% { clip-path: inset(0 0 0 0); transform: translate(2px, -1px); }
    90%  { clip-path: inset(12% 0 62% 0); transform: translate(4px, -2px); }
    94%  { clip-path: inset(58% 0 18% 0); transform: translate(-3px, 1px); }
}
@keyframes wst-glitch-b {
    0%, 84%, 100% { clip-path: inset(0 0 0 0); transform: translate(-2px, 1px); }
    86%  { clip-path: inset(66% 0 8% 0); transform: translate(-4px, 2px); }
    92%  { clip-path: inset(8% 0 74% 0); transform: translate(3px, -1px); }
}
@keyframes wst-glitch-burst-a {
    0%   { clip-path: inset(6% 0 68% 0); transform: translate(5px, -2px); }
    50%  { clip-path: inset(42% 0 30% 0); transform: translate(-5px, 1px); }
    100% { clip-path: inset(72% 0 6% 0); transform: translate(3px, 2px); }
}
@keyframes wst-glitch-burst-b {
    0%   { clip-path: inset(58% 0 14% 0); transform: translate(-5px, 2px); }
    50%  { clip-path: inset(10% 0 76% 0); transform: translate(4px, -2px); }
    100% { clip-path: inset(34% 0 44% 0); transform: translate(-3px, -1px); }
}

/* 信号抖动 */
html.wst-jitter .wst-frame { animation: wst-jitter .3s steps(3); }
@keyframes wst-jitter {
    0%   { transform: translateX(0); }
    33%  { transform: translateX(-4px) skewX(.4deg); }
    66%  { transform: translateX(3px); }
    100% { transform: translateX(0); }
}

/* 滚动浮现 */
.wst-js [data-wst-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .55s ease, transform .55s ease;
}
.wst-js [data-wst-reveal].is-visible { opacity: 1; transform: none; }

/* 打字机 */
.tw-cursor-hidden .hero-sub .tw-caret { visibility: hidden; }

/* ---------------------------------------------------------------- */
/* 18. 按钮                                                           */
/* ---------------------------------------------------------------- */
.btn, .wst-btn-primary, .wst-btn-ghost {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--wst-radius);
    font: 700 13px/1 var(--wst-font-mono);
    letter-spacing: .1em;
    cursor: pointer;
}
.wst-btn-primary {
    background: transparent;
    border: 1px solid var(--wst-accent);
    color: var(--wst-accent);
    text-shadow: 0 0 8px rgba(51, 255, 102, .5);
    box-shadow: var(--wst-glow), inset 0 0 14px rgba(51, 255, 102, .08);
}
.wst-btn-primary:hover {
    background: rgba(51, 255, 102, .12);
    color: var(--wst-accent);
    text-decoration: none;
    box-shadow: 0 0 18px rgba(51, 255, 102, .35);
}
.wst-btn-ghost { background: transparent; border: 1px dashed var(--wst-line-bright); color: var(--wst-dim); }
.wst-btn-ghost:hover { color: var(--wst-text); text-decoration: none; border-color: var(--wst-dim); }

/* ---------------------------------------------------------------- */
/* 19. 404 崩溃屏                                                     */
/* ---------------------------------------------------------------- */
.crash-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    background: var(--wst-bg-deep);
}
.crash-box {
    width: min(760px, 100%);
    padding: 34px 36px;
    border: 2px solid var(--wst-danger);
    border-radius: var(--wst-radius);
    background: rgba(20, 8, 6, .6);
    box-shadow: 0 0 40px rgba(139, 58, 43, .3), inset 0 0 40px rgba(0, 0, 0, .5);
}
html[data-mode="light"] .crash-box { background: rgba(160, 58, 34, .07); }
.crash-head {
    margin: 0 0 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .2em;
    color: var(--wst-danger-2);
    animation: wst-blink 1.8s steps(1) infinite;
}
.crash-ascii {
    margin: 0 0 18px;
    font-size: clamp(7px, 1.5vw, 12px);
    line-height: 1.25;
    color: var(--wst-danger-2);
    overflow-x: auto;
}
.crash-line { margin: 0 0 6px; font-size: 12px; color: var(--wst-accent); }
.crash-err { margin: 0 0 16px; font-size: 12px; color: var(--wst-text); }
.crash-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.crash-hint { margin: 0; font-size: 12px; color: var(--wst-dim-2); letter-spacing: .08em; }
.p-404 .wst-rail, .p-404 .wst-progress { display: none; }

/* ---------------------------------------------------------------- */
/* 20. 404 / 独立页面的进程条隐藏等微调                                */
/* ---------------------------------------------------------------- */
.p-404 body::before, body.p-404::before { opacity: calc(var(--wst-scan) * .6); }

/* ---------------------------------------------------------------- */
/* 21. 响应式                                                          */
/* ---------------------------------------------------------------- */
@media (max-width: 1080px) {
    .wst-rail { display: none; }
    .wst-topbar, .wst-promptbar { left: 0; }
    .wst-frame {
        padding-left: 20px;
        padding-right: 20px;
    }
    .wst-post-layout { grid-template-columns: minmax(0, 1fr); }
    .wst-toc { position: static; order: -1; margin-bottom: 20px; }
    .toc-panel { max-height: none; }
}

@media (max-width: 720px) {
    body { font-size: 12px; }
    .tb-burger { display: inline-flex; width: 30px; }
    .tb-tilde { display: inline-block; margin-left: auto; }
    .tb-brand { min-width: 0; }
    .tb-brand .tb-name { max-width: 38vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: .05em; }
    .tb-led { display: none; }
    .wst-topbar { gap: 8px; padding: 0 8px; }
    .tb-right { gap: 8px; }
    .tb-search-btn, .tb-mode { padding: 0 6px; height: 28px; }
    .tb-clock, .tb-mode span[data-wst-mode-label] { display: none; }
    .tb-mode { padding: 0 8px; }
    .tb-nav {
        position: fixed;
        top: var(--wst-topbar-h);
        left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 10px 12px;
        background: var(--wst-panel-2);
        border-bottom: 1px solid var(--wst-line-bright);
        display: none;
    }
    .tb-nav.nav-open { display: flex; }
    .tb-nav a { padding: 11px 10px; font-size: 12px; border-bottom: 1px dashed var(--wst-line); }
    .tb-search-panel { right: 8px; left: 8px; width: auto; }
    .hero { padding: 24px 18px 20px; }
    .post-header, .archive-head { padding: 20px 16px 16px; }
    .post-body { padding: 20px 16px; }
    .post-nav { grid-template-columns: 1fr; }
    .pb-right span:not([data-wst-clock]) { display: none; }
    .sig { padding: 10px 10px; }
    .sig-list, .respond { margin-left: 10px; margin-right: 10px; padding-left: 0; padding-right: 0; }
    .sig-list { padding: 10px 10px 0; }
    .respond { margin: 22px 10px 0; padding: 14px 12px; }
    .arch-item { grid-template-columns: auto 1fr; }
    .ai-meta { grid-column: 2; }
    html::after { display: none; }
}

@media (max-width: 480px) {
    .tb-tilde { color: var(--wst-accent); }
    .tb-tilde::after { content: none; }
}

/* ---------------------------------------------------------------- */
/* 22. 动效降级                                                        */
/* ---------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    .wst-js [data-wst-reveal] { opacity: 1; transform: none; }
    html::after { display: none; }
}

/* ---------------------------------------------------------------- */
/* 23. 打印                                                           */
/* ---------------------------------------------------------------- */
@media print {
    body { background: #fff; color: #000; }
    body::before, body::after, html::after,
    .wst-topbar, .wst-rail, .wst-promptbar, .wst-progress,
    .wst-sidebar, .wst-toc, .crt-veil, .boot-overlay,
    .log-more, .respond, .post-nav { display: none !important; }
    .wst-frame { padding: 0; max-width: none; }
    .wst-panel { border-color: #999; box-shadow: none; background: #fff; }
    a { color: #000; }
}
