/* ==========================================================================
   S.R.C. 超自然管理集团 · 玻璃拟物版
   设计基调：深空底色 + 磨砂玻璃层 + 蓝色冷光点缀
   交互：指针光斑、自定义光标、3D 倾斜卡片、悬停显现、气泡提示、共享元素转场
   ========================================================================== */

/* ---------------------------------------------------------- 1. 令牌与重置 */
:root {
    --bg-0: #05080f;
    --bg-1: #0a1120;
    --ink: #e9f0ff;
    --ink-2: #a7b6d2;
    --ink-3: #74849f;

    --accent: #4da3ff;
    --accent-2: #6fe3ff;
    --accent-deep: #1b5fbf;
    --danger: #ff6375;

    --glass: linear-gradient(155deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .05));
    --glass-hover: linear-gradient(155deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .06));
    --stroke: rgba(255, 255, 255, .14);
    --stroke-hi: rgba(255, 255, 255, .24);

    --radius-xl: 26px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;

    --ease: cubic-bezier(.2, .8, .2, 1);
    --ease-out: cubic-bezier(.16, 1, .3, 1);

    --shadow: 0 24px 60px -34px rgba(0, 0, 0, .95), 0 1px 0 rgba(255, 255, 255, .1) inset;
    --shadow-hi: 0 40px 90px -40px rgba(0, 0, 0, 1), 0 1px 0 rgba(255, 255, 255, .18) inset;

    --sidebar-w: 258px;
    --maxw: 1140px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg-0);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
                 "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB",
                 "Noto Sans SC", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
    color: inherit;
}

::selection {
    background: rgba(77, 163, 255, .32);
    color: #fff;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

.skip-link {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translate(-50%, -200%);
    z-index: 200;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--accent);
    color: #04101f;
    font-weight: 700;
    transition: transform .25s var(--ease);
}

.skip-link:focus {
    transform: translate(-50%, 0);
}

/* ---------------------------------------------------------- 2. 背景层 */
.bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background:
        radial-gradient(1200px 760px at 12% -12%, #11253f 0%, transparent 62%),
        radial-gradient(1000px 720px at 92% -4%, #0f2c43 0%, transparent 58%),
        radial-gradient(780px 540px at 74% 40%, rgba(46, 112, 214, .3), transparent 64%),
        radial-gradient(860px 640px at 20% 86%, rgba(38, 96, 180, .24), transparent 66%),
        radial-gradient(900px 900px at 50% 118%, #0a1a2e 0%, transparent 60%),
        var(--bg-0);
}

/* 指针跟随的冷光 */
.bg-spot {
    position: absolute;
    left: 0;
    top: 0;
    width: 960px;
    height: 960px;
    margin: -480px 0 0 -480px;
    background: radial-gradient(closest-side,
            rgba(77, 163, 255, .22), rgba(77, 163, 255, .06) 44%, transparent 72%);
    transform: translate3d(var(--sx, 50vw), var(--sy, 34vh), 0);
    will-change: transform;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(110px);
    opacity: .62;
    will-change: transform;
    transition: filter .6s var(--ease);
}

.blob-1 {
    width: 46vw;
    height: 46vw;
    left: -8vw;
    top: -12vw;
    background: radial-gradient(circle at 40% 40%, rgba(58, 120, 255, .62), transparent 68%);
    animation: drift-a 26s ease-in-out infinite;
}

.blob-2 {
    width: 40vw;
    height: 40vw;
    right: -6vw;
    top: 8vh;
    background: radial-gradient(circle at 60% 40%, rgba(0, 210, 255, .44), transparent 66%);
    animation: drift-b 32s ease-in-out infinite;
}

.blob-3 {
    width: 52vw;
    height: 52vw;
    left: 28vw;
    bottom: -26vw;
    background: radial-gradient(circle at 50% 50%, rgba(96, 84, 255, .4), transparent 68%);
    animation: drift-c 38s ease-in-out infinite;
}

@keyframes drift-a {
    0%, 100% { transform: translate3d(var(--px, 0px), var(--py, 0px), 0) scale(1); }
    50% { transform: translate3d(calc(var(--px, 0px) + 40px), calc(var(--py, 0px) + 30px), 0) scale(1.08); }
}

@keyframes drift-b {
    0%, 100% { transform: translate3d(calc(var(--px, 0px) * -1), var(--py, 0px), 0) scale(1.05); }
    50% { transform: translate3d(calc(var(--px, 0px) * -1 - 50px), calc(var(--py, 0px) + 40px), 0) scale(.95); }
}

@keyframes drift-c {
    0%, 100% { transform: translate3d(var(--px, 0px), calc(var(--py, 0px) * -.6), 0) scale(1); }
    50% { transform: translate3d(calc(var(--px, 0px) + 60px), calc(var(--py, 0px) * -.6 - 30px), 0) scale(1.1); }
}

/* 细网格，越靠近边缘越淡 */
.bg-grid {
    position: absolute;
    top: -200px;
    right: 0;
    bottom: -200px;
    left: 0;
    background-image:
        linear-gradient(rgba(120, 170, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120, 170, 255, .05) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 20%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 20%, transparent 78%);
    transform: translate3d(0, var(--g1, 0px), 0);
    will-change: transform;
}

/* 滚动视差：两层浮光以不同速率移动，制造纵深 */
.bg-float {
    position: absolute;
    inset: 0;
}

.bg-float i {
    position: absolute;
    border-radius: 50%;
    filter: blur(72px);
    opacity: .38;
    will-change: transform;
}

.bg-float i:nth-child(1) {
    width: 260px;
    height: 260px;
    left: 63%;
    top: 20%;
    background: radial-gradient(circle, rgba(112, 202, 255, .55), transparent 70%);
    transform: translate3d(0, var(--f1, 0px), 0);
}

.bg-float i:nth-child(2) {
    width: 220px;
    height: 220px;
    left: 22%;
    top: 56%;
    background: radial-gradient(circle, rgba(98, 124, 255, .5), transparent 70%);
    transform: translate3d(0, var(--f2, 0px), 0);
}

/* 颗粒，压掉大面积渐变的塑料感 */
.bg-noise {
    position: absolute;
    inset: 0;
    opacity: .035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------- 3. 玻璃基类 */
.glass {
    position: relative;
    background: var(--glass);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

/* 顶部高光，玻璃厚度感 */
.glass::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 34%);
    opacity: .55;
}

@supports not ((backdrop-filter: blur(4px)) or (-webkit-backdrop-filter: blur(4px))) {
    .glass {
        background: linear-gradient(155deg, rgba(22, 34, 54, .92), rgba(14, 22, 36, .92));
    }
}

/* ---------------------------------------------------------- 4. 自定义光标 */
/* 轮廓由 JS 每帧绘制（值噪声 + 速度拉伸），这里只负责定位与描边样式 */
.cursor-dot,
.cursor-ring {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 130;
    pointer-events: none;
    opacity: 0;
    transition: opacity .3s var(--ease);
}

.cursor-dot {
    width: 6px;
    height: 6px;
    margin: -3px 0 0 -3px;
    border-radius: 50%;
    background: #eaf5ff;
    box-shadow: 0 0 10px rgba(120, 190, 255, .95);
}

.cursor-ring {
    width: 320px;
    height: 320px;
    margin: -160px 0 0 -160px;
    will-change: transform;
}

/* 没有 JS 时的降级：一个静态细环 */
.cursor-ring::before {
    content: "";
    position: absolute;
    inset: calc(50% - 17px);
    border-radius: 50%;
    border: 1.5px solid rgba(200, 228, 255, .9);
    box-shadow: 0 0 16px rgba(112, 182, 255, .55);
}

body.blob-on .cursor-ring::before {
    display: none;
}

.cursor-ring svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
    transform-origin: 50% 50%;
    transition: transform .3s var(--ease);
}

.cursor-ring path {
    fill: rgba(150, 205, 255, .05);
    stroke: rgba(206, 232, 255, .95);
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
    filter: drop-shadow(0 0 7px rgba(96, 170, 245, .75));
}

body.cursor-on .cursor-dot,
body.cursor-on .cursor-ring {
    opacity: 1;
}

body.cursor-hover .cursor-ring svg {
    transform: scale(1.14);
}

/* 贴合按钮时不再整体放大，避免与形变叠加 */
body.cursor-adapt .cursor-ring svg {
    transform: none;
}

body.cursor-press .cursor-ring svg {
    transform: scale(.86);
}

body.cursor-text .cursor-ring svg {
    transform: scale(.62);
}

@media (pointer: fine) {
    body.cursor-on,
    body.cursor-on a,
    body.cursor-on button,
    body.cursor-on input,
    body.cursor-on [role="button"] {
        cursor: none;
    }
}

@media (hover: none), (pointer: coarse) {
    .cursor-dot,
    .cursor-ring {
        display: none;
    }
}

/* ---------------------------------------------------------- 5. 顶部导航 */
.topbar {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 60;
    width: min(calc(100% - 32px), var(--maxw));
    max-width: var(--maxw);
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 10px 14px 10px 18px;
    border-radius: 999px;
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    transition: background .4s var(--ease), box-shadow .4s var(--ease),
                border-color .4s var(--ease), max-width .55s var(--ease-out),
                padding .45s var(--ease-out), gap .45s var(--ease-out);
    will-change: max-width, padding;
}

/* 向下滚动：收成小胶囊，导航淡出，只留徽记与展开按钮 */
.topbar.is-folded {
    max-width: 198px;
    gap: 6px;
    padding: 6px 8px;
    background: linear-gradient(155deg, rgba(18, 30, 50, .92), rgba(9, 15, 26, .9));
    border-color: var(--stroke-hi);
    box-shadow: 0 22px 44px -26px rgba(0, 0, 0, 1), 0 1px 0 rgba(255, 255, 255, .16) inset;
}

.topbar.is-folded .topnav,
.topbar.is-folded .topbar-actions {
    max-width: 0;
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

.topbar.is-folded .topbar-actions {
    max-height: 0;
    margin-left: 0;
}

.topbar.is-folded .brand-text i {
    max-height: 0;
    max-width: 0;
    opacity: 0;
}

.topbar.is-folded .brand-mark {
    width: 30px;
    height: 30px;
}

.topbar.is-folded .brand-mark img {
    width: 22px;
    height: 22px;
}

.topbar.is-folded .brand {
    gap: 9px;
}

/* 展开按钮：仅在折叠态出现 */
.topbar-toggle {
    display: none;
    place-items: center;
    flex: 0 0 auto;
    width: 0;
    height: 32px;
    margin-left: 0;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transition: width .35s var(--ease-out), opacity .3s var(--ease),
                border-color .3s var(--ease), background .3s var(--ease);
}

.topbar.is-folded .topbar-toggle {
    display: grid;
    width: 32px;
    margin-left: auto;
    opacity: 1;
    pointer-events: auto;
    border-color: var(--stroke);
}

.topbar-toggle:hover {
    background: rgba(77, 163, 255, .22);
    border-color: rgba(77, 163, 255, .5);
}

.topbar-toggle svg {
    width: 14px;
    height: 14px;
    opacity: .85;
}

.topbar.is-stuck {
    background: linear-gradient(155deg, rgba(16, 26, 44, .82), rgba(10, 16, 28, .78));
    box-shadow: 0 18px 50px -30px rgba(0, 0, 0, 1), 0 1px 0 rgba(255, 255, 255, .12) inset;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, rgba(77, 163, 255, .32), rgba(10, 18, 32, .2));
    border: 1px solid var(--stroke-hi);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(77, 163, 255, .9);
    transition: transform .5s var(--ease), box-shadow .5s var(--ease),
                width .4s var(--ease-out), height .4s var(--ease-out);
}

.brand:hover .brand-mark {
    transform: rotate(-8deg) scale(1.05);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .3), 0 12px 34px -10px rgba(77, 163, 255, 1);
}

.brand-mark img {
    width: 30px;
    height: 30px;
    filter: drop-shadow(0 0 6px rgba(140, 200, 255, .5));
    transition: width .4s var(--ease-out), height .4s var(--ease-out);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text b {
    font-size: 16px;
    letter-spacing: 2px;
    font-weight: 800;
}

.brand-text i {
    max-height: 16px;
    max-width: 240px;
    overflow: hidden;
    white-space: nowrap;
    font-style: normal;
    font-size: 10.5px;
    letter-spacing: 3px;
    color: var(--ink-3);
    text-transform: uppercase;
    transition: max-height .35s var(--ease-out), max-width .4s var(--ease-out),
                opacity .3s var(--ease);
}

.topnav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
    flex: 1 1 auto;
    max-width: 640px;
    max-height: 44px;
    overflow: hidden;
    transition: max-width .5s var(--ease-out), max-height .4s var(--ease-out),
                opacity .3s var(--ease), margin-left .5s var(--ease-out);
}

.topnav a {
    position: relative;
    white-space: nowrap;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    color: var(--ink-2);
    transition: color .25s var(--ease), background .25s var(--ease);
}

.topnav a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 3px;
    width: 4px;
    height: 4px;
    margin-left: -2px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .25s var(--ease), transform .25s var(--ease);
}

.topnav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, .07);
}

.topnav a:hover::after {
    opacity: 1;
    transform: none;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    margin-left: auto;
    max-width: 320px;
    max-height: 48px;
    overflow: hidden;
    transition: max-width .45s var(--ease-out), max-height .4s var(--ease-out),
                opacity .3s var(--ease), margin-left .45s var(--ease-out);
}

/* ---------------------------------------------------------- 6. 按钮 */
.btn {
    position: relative;
    display: inline-flex;
    white-space: nowrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border: 1px solid var(--stroke);
    border-radius: 999px;
    background: rgba(255, 255, 255, .05);
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .2px;
    overflow: hidden;
    isolation: isolate;
    transition: transform .3s var(--ease), border-color .3s var(--ease),
                background .3s var(--ease), box-shadow .3s var(--ease), color .3s var(--ease);
}

/* 掠过式高光 */
.btn::before {
    content: "";
    position: absolute;
    inset: -40% -30%;
    background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, .5) 48%, transparent 62%);
    transform: translateX(-120%) rotate(4deg);
    transition: transform .8s var(--ease);
    z-index: -1;
}

.btn:hover::before {
    transform: translateX(120%) rotate(4deg);
}

.btn:hover {
    transform: translateY(-2px);
    border-color: var(--stroke-hi);
    background: rgba(255, 255, 255, .1);
    box-shadow: 0 14px 34px -18px rgba(77, 163, 255, .9);
}

.btn:active {
    transform: translateY(0) scale(.98);
}

.btn:disabled {
    opacity: .5;
    pointer-events: none;
}

.btn-primary {
    border-color: rgba(120, 195, 255, .5);
    background: linear-gradient(140deg, #63b4ff, #2f7ee0 55%, #1f5fbf);
    color: #04101f;
    box-shadow: 0 16px 38px -16px rgba(77, 163, 255, .85), 0 1px 0 rgba(255, 255, 255, .5) inset;
}

.btn-primary:hover {
    background: linear-gradient(140deg, #7cc2ff, #3d8dee 55%, #2669cc);
    box-shadow: 0 20px 46px -16px rgba(77, 163, 255, 1), 0 1px 0 rgba(255, 255, 255, .6) inset;
}

.btn-ghost {
    color: var(--ink-2);
}

.btn-ghost:hover {
    color: #fff;
}

.btn svg {
    width: 16px;
    height: 16px;
    transition: transform .3s var(--ease);
}

.btn:hover svg {
    transform: translateX(3px);
}

/* ---------------------------------------------------------- 7. 主容器与首屏 */
.wrap {
    width: min(calc(100% - 40px), var(--maxw));
    margin: 0 auto;
}

.hero {
    position: relative;
    padding: 132px 0 44px;
    text-align: center;
}

.hero-seal {
    width: 104px;
    height: 104px;
    margin: 0 auto 22px;
    display: grid;
    place-items: center;
    position: relative;
    transform: translate3d(calc(var(--hx, 0px) * .6), calc(var(--hy, 0px) * .6 + var(--sy, 0px)), 0);
}

.hero-seal::before {
    content: "";
    position: absolute;
    inset: -30%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(77, 163, 255, .35), transparent 68%);
    filter: blur(18px);
    animation: pulse 6s ease-in-out infinite;
}

.hero-seal img {
    width: 104px;
    height: 104px;
    position: relative;
    filter: drop-shadow(0 0 14px rgba(120, 190, 255, .55));
}

@keyframes pulse {
    0%, 100% { opacity: .55; transform: scale(1); }
    50% { opacity: .9; transform: scale(1.08); }
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 16px;
    padding: 6px 15px;
    border: 1px solid var(--stroke);
    border-radius: 999px;
    background: rgba(255, 255, 255, .045);
    font-size: 12px;
    letter-spacing: 1.6px;
    color: var(--ink-2);
}

.eyebrow .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #59f0c0;
    box-shadow: 0 0 10px #59f0c0;
    animation: blink 2.6s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: .35; }
}

.hero-inner {
    will-change: transform, opacity;
}

/* 首屏入场：元素错峰从下升起 */
.hero-inner > *:not(.hero-title) {
    opacity: 0;
    transform: translateY(20px);
    animation: hero-up .9s var(--ease-out) both;
}

.hero-inner > .eyebrow { animation-delay: .04s; }
.hero-inner > .hero-sub { animation-delay: .44s; }
.hero-inner > .hero-desc { animation-delay: .52s; }
.hero-inner > .hero-actions { animation-delay: .60s; }
.hero-inner > .hero-stats { animation-delay: .68s; }

@keyframes hero-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: none; }
}

/* 兜底：动画未推进时由脚本打上该类，直接落到终态 */
.hero-ready .hero-inner > *,
.hero-ready .hero-title .line-inner,
.hero-ready .hero-seal img {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
}

/* 大标题：逐行裁切，从下往上升起 */
.hero-title {
    margin: 0;
    font-size: clamp(40px, 8vw, 88px);
    line-height: 1.08;
    letter-spacing: .04em;
    font-weight: 800;
}

.hero-title .line {
    display: block;
    overflow: hidden;
    padding-bottom: .08em;
    margin-bottom: -.04em;
}

.hero-title .line-inner {
    display: block;
    color: #d9e9ff;
    transform: translateY(112%);
    animation: line-up 1.05s cubic-bezier(.16, 1, .3, 1) both;
    animation-delay: calc(.06s + var(--i, 0) * .13s);
}

@supports ((background-clip: text) or (-webkit-background-clip: text)) {
    .hero-title .line-inner {
        background: linear-gradient(175deg, #ffffff 6%, #d3e7ff 48%, #7fb0e6 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }
}

@keyframes line-up {
    from { transform: translateY(112%); }
    to { transform: translateY(0); }
}

.hero-seal img {
    animation: seal-in 1.2s var(--ease-out) both;
}

@keyframes seal-in {
    from { opacity: 0; transform: scale(.85) translateY(14px); }
    to { opacity: 1; transform: none; }
}

.hero-sub {
    margin: 22px 0 0;
    font-size: 13px;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--ink-3);
}

.hero-desc {
    max-width: 640px;
    margin: 22px auto 0;
    color: var(--ink-2);
    font-size: 15.5px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 28px;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 34px;
}

.stat {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, .04);
    font-size: 13px;
    color: var(--ink-3);
    transition: border-color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease);
}

.stat:hover {
    border-color: var(--stroke-hi);
    background: rgba(255, 255, 255, .08);
    transform: translateY(-2px);
}

.stat b {
    font-size: 18px;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

/* 警示条 */
.alert {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 26px 0 28px;
    padding: 14px 20px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 99, 117, .32);
    background: linear-gradient(120deg, rgba(255, 99, 117, .14), rgba(255, 99, 117, .04));
    color: #ffd9dd;
    font-size: 14.5px;
    overflow: hidden;
}

.alert::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 99, 117, .16), transparent);
    transform: translateX(-100%);
    animation: scan 5.5s linear infinite;
}

@keyframes scan {
    0% { transform: translateX(-100%); }
    60%, 100% { transform: translateX(100%); }
}

.alert-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--danger);
    box-shadow: 0 0 0 0 rgba(255, 99, 117, .7);
    animation: ring 2.2s ease-out infinite;
}

@keyframes ring {
    0% { box-shadow: 0 0 0 0 rgba(255, 99, 117, .55); }
    70% { box-shadow: 0 0 0 12px rgba(255, 99, 117, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 99, 117, 0); }
}

.alert strong {
    color: #fff;
    letter-spacing: .5px;
}

.alert-code {
    margin-left: auto;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 99, 117, .35);
    font-size: 11.5px;
    letter-spacing: 1.4px;
    color: #ffb3bd;
    white-space: nowrap;
}

/* ---------------------------------------------------------- 8. 布局与侧栏 */
.layout {
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    padding-bottom: 80px;
}

.sidebar {
    position: sticky;
    top: 92px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.nav-panel {
    padding: 16px 14px 12px;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    padding: 0 8px;
    font-size: 11.5px;
    letter-spacing: 2.4px;
    color: #8b9ab5;
    text-transform: uppercase;
}

.panel-title::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink-2);
    overflow: hidden;
    transition: color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
}

.nav-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 0;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--accent-2), var(--accent));
    box-shadow: 0 0 12px rgba(77, 163, 255, .8);
    transform: translateY(-50%);
    transition: height .28s var(--ease);
}

.nav-item span {
    flex: 1 1 auto;
}

.nav-item svg {
    width: 14px;
    height: 14px;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity .28s var(--ease), transform .28s var(--ease);
}

.nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, .07);
    transform: translateX(3px);
}

.nav-item:hover::before {
    height: 58%;
}

.nav-item:hover svg {
    opacity: 1;
    transform: none;
}

.nav-item:visited {
    color: var(--ink-2);
}

.edit-menu {
    align-self: center;
    font-size: 12px;
    color: var(--ink-3);
    letter-spacing: .6px;
    border-bottom: 1px dashed rgba(255, 255, 255, .2);
    transition: color .25s var(--ease), border-color .25s var(--ease);
}

.edit-menu:hover {
    color: var(--accent-2);
    border-color: var(--accent-2);
}

.content {
    display: flex;
    flex-direction: column;
    gap: 36px;
    min-width: 0;
}

/* ---------------------------------------------------------- 9. 区块标题与正文 */
.section {
    scroll-margin-top: 104px;
}

.section-head {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 16px;
}

.section-head .idx {
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    opacity: .9;
}

.section-head h2 {
    margin: 0;
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 750;
    letter-spacing: 1px;
}

.section-head .rule {
    flex: 1 1 auto;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, .18), transparent);
}

/* 滚动触发：标题升起、横线从左拉出 */
.js .section-head .idx,
.js .section-head h2 {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}

.js .section-head h2 {
    transition-delay: .06s;
}

.js .section-head .rule {
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 1.1s var(--ease-out) .12s;
}

.js .section-head.is-in .idx,
.js .section-head.is-in h2 {
    opacity: 1;
    transform: none;
}

.js .section-head.is-forced .idx,
.js .section-head.is-forced h2 {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

.js .section-head.is-forced .rule {
    transform: none !important;
    transition: none !important;
}

.js .section-head.is-in .rule {
    transform: none;
}

.prose {
    padding: 24px 28px;
    font-size: 15.5px;
    color: var(--ink-2);
}

.prose p {
    margin: 0 0 1em;
}

.prose p:last-child {
    margin-bottom: 0;
}

.prose strong {
    color: var(--ink);
}

.prose em {
    font-style: normal;
    color: var(--accent-2);
}

.prose a {
    color: var(--accent);
    border-bottom: 1px solid rgba(77, 163, 255, .35);
    transition: color .25s var(--ease), border-color .25s var(--ease);
}

.prose a:hover {
    color: var(--accent-2);
    border-color: var(--accent-2);
}

.credit {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    font-size: 13px;
    color: var(--ink-3);
}

/* ---------------------------------------------------------- 10. 卡片 / 倾斜 / 悬停显现 */
.cards {
    display: grid;
    gap: 18px;
}

.card {
    padding: 26px 28px;
    transform-style: preserve-3d;
    transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0);
    transition: transform .55s var(--ease-out), box-shadow .55s var(--ease), border-color .4s var(--ease);
}

.card.is-tilting {
    transition: transform .1s linear, box-shadow .4s var(--ease), border-color .4s var(--ease);
}

.card:hover {
    border-color: var(--stroke-hi);
    box-shadow: var(--shadow-hi);
}

/* 跟随指针的镜面反光 */
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(360px circle at var(--gx, 50%) var(--gy, 0%),
            rgba(150, 205, 255, .22), transparent 62%);
    opacity: 0;
    transition: opacity .4s var(--ease);
}

.card:hover::before {
    opacity: 1;
}

.card > * {
    position: relative;
    z-index: 1;
    transform: translateZ(14px);
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.chip {
    padding: 4px 11px;
    border-radius: 999px;
    border: 1px solid rgba(77, 163, 255, .35);
    background: rgba(77, 163, 255, .12);
    font-size: 11.5px;
    letter-spacing: 1.2px;
    color: #9dcaff;
}

.chip.is-warn {
    border-color: rgba(255, 99, 117, .4);
    background: rgba(255, 99, 117, .12);
    color: #ffb0ba;
}

.chip.is-mute {
    border-color: rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .06);
    color: var(--ink-3);
}

.card h3 {
    margin: 0 0 10px;
    font-size: 19px;
    letter-spacing: .4px;
    font-weight: 700;
}

.card p {
    margin: 0;
    color: var(--ink-2);
    font-size: 14.8px;
}

.card p + p {
    margin-top: 10px;
}

/* 悬停显现：0fr → 1fr 的高度过渡 */
.reveal {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    margin-top: 0;
    transition: grid-template-rows .5s var(--ease), opacity .35s var(--ease), margin-top .5s var(--ease);
}

.reveal > div {
    overflow: hidden;
}

.card:hover .reveal,
.card:focus-within .reveal {
    grid-template-rows: 1fr;
    opacity: 1;
    margin-top: 16px;
}

.reveal-box {
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    font-size: 14px;
    color: #93a3bf;
}

.reveal-box p {
    margin: 0 0 .5em;
}

.reveal-box p:last-child {
    margin-bottom: 0;
}

/* 展开按钮：触屏与键盘同样可用，不依赖悬停 */
.expand-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, .04);
    font-size: 12px;
    letter-spacing: .4px;
    color: #93a3bf;
    transition: color .25s var(--ease), border-color .25s var(--ease),
                background .25s var(--ease);
}

.expand-btn:hover {
    color: #fff;
    border-color: rgba(77, 163, 255, .5);
    background: rgba(77, 163, 255, .12);
}

.expand-btn svg {
    width: 12px;
    height: 12px;
    transition: transform .4s var(--ease);
}

.card.is-expanded .expand-btn svg {
    transform: rotate(180deg);
}

.card.is-expanded .reveal {
    grid-template-rows: 1fr;
    opacity: 1;
    margin-top: 16px;
}

/* 链接行 */
.link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.pill-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, .04);
    font-size: 13px;
    color: var(--ink-2);
    transition: color .25s var(--ease), border-color .25s var(--ease),
                background .25s var(--ease), transform .25s var(--ease);
}

.pill-link:hover {
    color: #fff;
    border-color: rgba(77, 163, 255, .55);
    background: rgba(77, 163, 255, .12);
    transform: translateY(-2px);
}

.pill-link svg {
    width: 13px;
    height: 13px;
}

/* 复制邮箱按钮 */
.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid rgba(77, 163, 255, .35);
    background: rgba(77, 163, 255, .1);
    font-size: 12.5px;
    color: #a9d3ff;
    transition: background .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}

.copy-btn:hover {
    background: rgba(77, 163, 255, .2);
    border-color: rgba(77, 163, 255, .6);
    transform: translateY(-1px);
}

/* ---------------------------------------------------------- 11. 选项卡 */
.tabs {
    position: relative;
    display: flex;
    gap: 2px;
    padding: 6px;
    margin-bottom: 16px;
    border-radius: 999px;
    overflow-x: auto;
    scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab-indicator {
    position: absolute;
    top: 6px;
    left: 0;
    height: calc(100% - 12px);
    width: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(99, 180, 255, .95), rgba(47, 126, 224, .9));
    box-shadow: 0 8px 24px -10px rgba(77, 163, 255, .95), 0 1px 0 rgba(255, 255, 255, .4) inset;
    transition: transform .45s var(--ease-out), width .45s var(--ease-out);
    pointer-events: none;
}

.tab {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    padding: 8px 15px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    font-size: 13.5px;
    letter-spacing: .8px;
    color: var(--ink-2);
    font-variant-numeric: tabular-nums;
    transition: color .3s var(--ease);
}

.tab:hover {
    color: #fff;
}

.tab[aria-selected="true"] {
    color: #04101f;
    font-weight: 800;
}

.tab-panels {
    display: grid;
    gap: 14px;
}

.tabpanel[hidden] {
    display: none;
}

.tabpanel {
    display: grid;
    gap: 14px;
    animation: panel-in .5s var(--ease-out) both;
}

@keyframes panel-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

/* 新闻条目：可点击、共享元素起点 */
.news-card {
    position: relative;
    display: block;
    width: 100%;
    text-align: left;
    padding: 22px 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--stroke);
    background: var(--glass);
    box-shadow: var(--shadow);
    color: inherit;
    transform-style: preserve-3d;
    transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0);
    transition: transform .55s var(--ease-out), border-color .4s var(--ease), box-shadow .55s var(--ease);
}

.news-card:hover {
    border-color: var(--stroke-hi);
    box-shadow: var(--shadow-hi);
}

/* 与内容面板一致的顶部高光 */
.news-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, 0) 34%);
    opacity: .5;
}

.news-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.news-head time {
    margin-left: auto;
    font-size: 12.5px;
    color: var(--ink-3);
    font-variant-numeric: tabular-nums;
}

.news-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    letter-spacing: .4px;
}

.news-copy {
    margin: 0;
    font-size: 14.5px;
    color: var(--ink-2);
}

.news-more {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    color: var(--accent);
    font-size: 13px;
    transition: grid-template-rows .45s var(--ease), opacity .3s var(--ease), margin-top .45s var(--ease);
}

.news-more > span {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
}

.news-card:hover .news-more,
.news-card:focus-visible .news-more {
    grid-template-rows: 1fr;
    opacity: 1;
    margin-top: 12px;
}

.news-more svg {
    width: 14px;
    height: 14px;
    transition: transform .35s var(--ease);
}

.news-card:hover .news-more svg {
    transform: translateX(4px);
}

/* 空年份 */
.empty {
    display: grid;
    place-items: center;
    gap: 6px;
    padding: 54px 20px;
    text-align: center;
    border-radius: var(--radius-lg);
    border: 1px dashed rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .02);
    color: var(--ink-3);
}

.empty b {
    font-size: 46px;
    letter-spacing: 6px;
    color: rgba(255, 255, 255, .1);
    font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------- 12. 表单 */
.sandbox-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
    padding: 10px;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, .04);
    transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}

.sandbox-form:focus-within {
    border-color: rgba(77, 163, 255, .55);
    box-shadow: 0 0 0 4px rgba(77, 163, 255, .12), 0 20px 40px -30px rgba(77, 163, 255, .9);
}

.sandbox-form input {
    flex: 1 1 220px;
    min-width: 0;
    padding: 10px 18px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    font-size: 14.5px;
    color: var(--ink);
    outline: none;
}

.sandbox-form input::placeholder {
    color: var(--ink-3);
}

.sandbox-form .btn {
    flex: 0 0 auto;
}

.hint {
    margin: 10px 4px 0;
    font-size: 12.5px;
    color: var(--ink-3);
}

/* ---------------------------------------------------------- 13. 标签 / 页脚 */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.tag {
    padding: 5px 13px;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, .04);
    font-size: 12.5px;
    color: var(--ink-2);
    transition: color .25s var(--ease), background .25s var(--ease),
                border-color .25s var(--ease), transform .25s var(--ease);
}

.tag:hover {
    color: #fff;
    border-color: rgba(77, 163, 255, .5);
    background: rgba(77, 163, 255, .14);
    transform: translateY(-2px);
}

.page-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    font-size: 12.5px;
    color: var(--ink-3);
}

.page-meta .sep {
    opacity: .4;
}

.page-meta .spacer {
    flex: 1 1 auto;
}

.mini-btn {
    padding: 6px 13px;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, .04);
    font-size: 12.5px;
    color: var(--ink-2);
    transition: color .25s var(--ease), border-color .25s var(--ease),
                background .25s var(--ease), transform .25s var(--ease);
}

.mini-btn:hover {
    color: #fff;
    border-color: rgba(77, 163, 255, .5);
    background: rgba(77, 163, 255, .12);
    transform: translateY(-1px);
}

.footer {
    padding: 30px 0 46px;
    border-top: 1px solid rgba(255, 255, 255, .07);
    background: linear-gradient(180deg, rgba(6, 10, 18, 0), rgba(6, 10, 18, .8));
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    font-size: 12.5px;
    color: var(--ink-3);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-links a {
    color: var(--ink-3);
    transition: color .25s var(--ease);
}

.footer-links a:hover {
    color: #fff;
}

.footer-inner .spacer {
    flex: 1 1 auto;
}

/* 页脚中的“按钮式链接” */
.footer-links button {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: var(--ink-3);
    transition: color .25s var(--ease);
}

.footer-links button:hover {
    color: #fff;
}

.license {
    margin-top: 14px;
    font-size: 12.5px;
    color: rgba(178, 194, 220, .78);
}

.license a {
    color: rgba(170, 208, 255, .95);
    border-bottom: 1px solid rgba(170, 208, 255, .4);
}

/* ---------------------------------------------------------- 14. 提示气泡 */
.tooltip {
    position: fixed;
    z-index: 140;
    max-width: 260px;
    padding: 8px 13px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--stroke-hi);
    background: rgba(10, 16, 28, .92);
    box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 1);
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--ink);
    letter-spacing: .3px;
    opacity: 0;
    transform: translateY(6px) scale(.96);
    pointer-events: none;
    transition: opacity .18s var(--ease), transform .18s var(--ease);
}

.tooltip.is-visible {
    opacity: 1;
    transform: none;
}

.tooltip::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -5px;
    width: 9px;
    height: 9px;
    margin-left: -4.5px;
    background: rgba(10, 16, 28, .92);
    border-right: 1px solid var(--stroke-hi);
    border-bottom: 1px solid var(--stroke-hi);
    transform: rotate(45deg);
}

.tooltip.is-below::after {
    bottom: auto;
    top: -5px;
    transform: rotate(225deg);
}

/* ---------------------------------------------------------- 15. 共享元素转场 / 详情层 */
.detail {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 24px;
    visibility: hidden;
    pointer-events: none;
}

.detail.is-open {
    visibility: visible;
    pointer-events: auto;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 6, 12, .74);
    opacity: 0;
    transition: opacity .4s var(--ease);
}

.detail.is-open .detail-backdrop {
    opacity: 1;
}

.detail-panel {
    position: relative;
    width: min(620px, 100%);
    max-height: min(76vh, 720px);
    overflow-y: auto;
    padding: 34px 36px;
    border-radius: var(--radius-xl);
    background: linear-gradient(155deg, rgba(24, 36, 58, .9), rgba(10, 16, 28, .94));
    border: 1px solid rgba(255, 255, 255, .16);
    box-shadow: 0 60px 120px -40px rgba(0, 0, 0, 1), 0 1px 0 rgba(255, 255, 255, .2) inset;
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    will-change: transform;
}

.detail-panel::-webkit-scrollbar {
    width: 8px;
}

.detail-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .16);
    border-radius: 8px;
}

.detail-panel > * {
    transition: opacity .35s var(--ease), transform .35s var(--ease);
}

.detail.is-animating .detail-panel > * {
    opacity: 0;
    transform: translateY(10px);
}

.detail-kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 12px;
    letter-spacing: 1.6px;
    color: var(--accent);
    text-transform: uppercase;
}

.detail-panel h2 {
    margin: 0 0 14px;
    font-size: 26px;
    letter-spacing: .6px;
    line-height: 1.3;
}

.detail-body {
    font-size: 15px;
    color: var(--ink-2);
    line-height: 1.85;
}

.detail-body p {
    margin: 0 0 1em;
}

.detail-body p:last-child {
    margin-bottom: 0;
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.detail-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, .06);
    color: var(--ink-2);
    transition: color .25s var(--ease), background .25s var(--ease),
                transform .25s var(--ease), border-color .25s var(--ease);
}

.detail-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, .12);
    border-color: var(--stroke-hi);
    transform: rotate(90deg);
}

.detail-close svg {
    width: 16px;
    height: 16px;
}

body.is-locked {
    overflow: hidden;
}

/* ---------------------------------------------------------- 16. Toast */
.toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    z-index: 150;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px;
    border-radius: 999px;
    border: 1px solid var(--stroke-hi);
    background: rgba(12, 20, 34, .92);
    box-shadow: 0 20px 50px -24px rgba(0, 0, 0, 1);
    font-size: 13.5px;
    color: var(--ink);
    opacity: 0;
    transform: translate(-50%, 20px);
    pointer-events: none;
    transition: opacity .3s var(--ease), transform .4s var(--ease-out);
}

.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.toast::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #59f0c0;
    box-shadow: 0 0 10px #59f0c0;
}

/* ---------------------------------------------------------- 17. 滚动进度与入场 */
.progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 100;
    background: rgba(255, 255, 255, .06);
}

.progress i {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 12px rgba(77, 163, 255, .8);
}

.js .rise {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}

.js .rise.is-in {
    opacity: 1;
    transform: none;
}

.js .rise.is-forced {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

/* ---------------------------------------------------------- 18. 响应式 */
@media (max-width: 1080px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
    }

    .nav-panel {
        flex: 1 1 220px;
    }

    .edit-menu {
        flex: 1 1 100%;
        text-align: center;
        justify-self: center;
    }
}

@media (max-width: 860px) {
    .topnav {
        display: none;
    }

    .hero {
        padding-top: 118px;
    }

    .alert {
        flex-wrap: wrap;
        gap: 10px;
    }

    .alert-code {
        margin-left: 0;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 15px;
    }

    .wrap {
        width: calc(100% - 28px);
    }

    .topbar {
        width: calc(100% - 20px);
        padding: 8px 10px 8px 12px;
        gap: 10px;
    }

    .brand-text i {
        display: none;
    }

    .topbar-actions .btn-ghost {
        display: none;
    }

    .hero {
        padding: 108px 0 32px;
    }

    .hero-title {
        letter-spacing: .02em;
    }

    .hero-sub {
        letter-spacing: 3px;
        font-size: 11.5px;
    }

    /* 四个数据块在窄屏排成 2×2，避免单独掉队一个 */
    .hero-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        max-width: 360px;
        margin: 30px auto 0;
    }

    .stat {
        justify-content: center;
        padding: 8px 12px;
    }

    .prose,
    .card,
    .news-card,
    .detail-panel {
        padding-left: 20px;
        padding-right: 20px;
    }

    .detail-panel {
        padding-top: 30px;
        padding-bottom: 26px;
        max-height: 82vh;
    }

    .detail-panel h2 {
        font-size: 21px;
    }

    .tabs {
        border-radius: var(--radius-md);
    }

    .sandbox-form {
        border-radius: var(--radius-lg);
    }

    .sandbox-form .btn {
        width: 100%;
    }
}

/* ---------------------------------------------------------- 19. 降低动效 / 打印 */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }

    .js .rise {
        opacity: 1;
        transform: none;
    }
}

@media print {
    .bg,
    .topbar,
    .sidebar,
    .progress,
    .cursor-dot,
    .cursor-ring,
    .detail,
    .tooltip,
    .toast {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    .hero {
        padding-top: 0;
    }

    .glass,
    .card,
    .news-card {
        background: #fff;
        border-color: #ccc;
        box-shadow: none;
    }
}
