/* ============================================
   Nav Home — 全新设计系统
   ============================================ */

/* ---------- 变量 ---------- */
:root {
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --bg: #06060e;
    --bg-elevated: rgba(255,255,255,0.03);
    --bg-card: rgba(255,255,255,0.03);
    --bg-card-hover: rgba(255,255,255,0.05);
    --surface: rgba(255,255,255,0.06);
    --text-1: #f0f0f5;
    --text-2: #8b8ba7;
    --text-3: #4e4e6a;
    --border: rgba(255,255,255,0.06);
    --border-hover: rgba(255,255,255,0.12);
    --accent: #7c5cfc;
    --accent-2: #5eead4;
    --radius: 14px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --hero-mask:
        linear-gradient(180deg, rgba(0,0,0,0.04) 0%, rgba(0,0,0,0.06) 48%, rgba(6,7,16,0.52) 100%),
        radial-gradient(ellipse at 50% 42%, rgba(0,0,0,0.02), rgba(0,0,0,0.20) 74%);
    --page-mask: transparent;
    --content-mask: transparent;
    --shell-scrim: rgba(2,6,23,0.38);
    --shell-blur: blur(8px) saturate(1.06);
    --shell-bg: linear-gradient(180deg, rgba(26,22,28,0.52) 0%, rgba(11,13,23,0.46) 100%);
    --shell-bg-strong: linear-gradient(180deg, rgba(36,25,26,0.58) 0%, rgba(14,16,27,0.54) 100%);
    --shell-card: rgba(24,25,37,0.42);
    --shell-card-hover: rgba(38,35,45,0.56);
    --shell-border: rgba(255,255,255,0.09);
    --shell-shadow: 0 10px 28px rgba(0,0,0,0.16), inset 0 1px 0 rgba(255,255,255,0.055);
    --shell-item: rgba(255,255,255,0.045);
    --shell-item-hover: rgba(255,255,255,0.085);
    --shell-muted: rgba(226,232,240,0.62);
}

[data-theme="light"] {
    --bg: #f4f4f8;
    --bg-elevated: rgba(0,0,0,0.02);
    --bg-card: rgba(255,255,255,0.7);
    --bg-card-hover: rgba(255,255,255,0.9);
    --surface: rgba(0,0,0,0.04);
    --text-1: #111118;
    --text-2: #6b6b80;
    --text-3: #a0a0b0;
    --border: rgba(0,0,0,0.07);
    --border-hover: rgba(0,0,0,0.14);
    --hero-mask:
        linear-gradient(180deg, rgba(0,0,0,0.02) 0%, rgba(0,0,0,0.04) 54%, rgba(255,255,255,0.10) 100%),
        radial-gradient(ellipse at 50% 42%, rgba(255,255,255,0.02), rgba(255,255,255,0.08) 74%);
    --page-mask: transparent;
    --content-mask: transparent;
    --shell-scrim: rgba(15,23,42,0.24);
    --shell-bg: linear-gradient(180deg, rgba(255,255,255,0.52) 0%, rgba(246,242,238,0.42) 100%);
    --shell-bg-strong: linear-gradient(180deg, rgba(255,255,255,0.62) 0%, rgba(248,244,240,0.50) 100%);
    --shell-card: rgba(255,255,255,0.42);
    --shell-card-hover: rgba(255,255,255,0.58);
    --shell-border: rgba(15,23,42,0.08);
    --shell-shadow: 0 12px 26px rgba(15,23,42,0.07), inset 0 1px 0 rgba(255,255,255,0.58);
    --shell-item: rgba(15,23,42,0.035);
    --shell-item-hover: rgba(15,23,42,0.06);
    --shell-muted: rgba(51,65,85,0.70);
}

/* View Transitions — 主题切换圆形扩散 */
::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 9999; }

/* 主题切换期间禁用耗性能属性 */
.theme-switching .sidebar,
.theme-switching .sidebar-backdrop,
.theme-switching .hero,
.theme-switching .card-body,
.theme-switching .nav-modal-overlay::before {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
.theme-switching *,
.theme-switching *::before,
.theme-switching *::after {
    transition-duration: 0s !important;
}

/* ---------- 重置 ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (min-width: 769px) {
    html { scrollbar-gutter: stable; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text-1);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}
body.nav-modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* 滚动条 */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(124,92,252,0.3); border-radius: 5px; }

/* 无缝循环滚动 keyframe */
@keyframes tileSlide {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(-50%, 0, 0); }
}
@keyframes tileSlideReverse {
    from { transform: translate3d(-50%, 0, 0); }
    to   { transform: translate3d(0, 0, 0); }
}

/* ======================================
   启动遮罩 (Splash)
   ====================================== */
.splash {
    position: fixed;
    inset: 0;
    z-index: 1000;
    --splash-x: 50%;
    --splash-y: 50%;
    --splash-layer-x: 0px;
    --splash-layer-y: 0px;
    --splash-offset-x: 0px;
    --splash-offset-y: 0px;
    --splash-press-scale: 1;
    --splash-slide-duration: 1.02s;
    --splash-slide-ease: cubic-bezier(0.32, 0, 0.18, 1);
    --splash-grid-size: clamp(42px, 7vw, 88px);
    --splash-ecg-shift: -900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    background:
        radial-gradient(ellipse at 50% 42%, rgba(124,92,252,0.16), transparent 52%),
        radial-gradient(ellipse at 50% 70%, rgba(94,234,212,0.07), transparent 58%),
        var(--bg);
    transition: transform var(--splash-slide-duration) var(--splash-slide-ease);
    overflow: hidden;
    cursor: pointer;
    isolation: isolate;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    will-change: transform;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
}
.splash::before,
.splash::after {
    content: '';
    position: absolute;
    pointer-events: none;
}
.splash::before {
    top: 50%;
    left: -50%;
    width: 200%;
    height: min(66vh, 620px);
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='900' height='620' viewBox='0 0 900 620' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 310H96L122 310L151 154L184 484L219 254L252 310H374L402 310L432 76L470 544L510 184L548 310H660L690 310L720 230L750 390L786 310H900' fill='none' stroke='rgba(124,92,252,0.38)' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M0 310H900' fill='none' stroke='rgba(94,234,212,0.14)' stroke-width='1'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-size: 900px 100%;
    background-position: 0 50%;
    opacity: 0.34;
    -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0.78), rgba(0,0,0,0.26) 36%, rgba(0,0,0,0.18) 50%, rgba(0,0,0,0.26) 64%, rgba(0,0,0,0.78));
    mask-image: linear-gradient(90deg, rgba(0,0,0,0.78), rgba(0,0,0,0.26) 36%, rgba(0,0,0,0.18) 50%, rgba(0,0,0,0.26) 64%, rgba(0,0,0,0.78));
    transform: translate3d(0, -50%, 0);
    animation: splashEcgMove 5.8s linear infinite;
}
.splash::after {
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(90deg, var(--bg), transparent 18%, transparent 82%, var(--bg)),
        linear-gradient(180deg, rgba(255,255,255,0.012), transparent 42%, rgba(0,0,0,0.18)),
        linear-gradient(rgba(255,255,255,0.030) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.030) 1px, transparent 1px);
    background-size: auto, auto, var(--splash-grid-size) var(--splash-grid-size), var(--splash-grid-size) var(--splash-grid-size);
    background-position: center;
    opacity: 0.86;
    transition: opacity 0.28s ease;
}
[data-theme="light"] .splash {
    background:
        radial-gradient(ellipse at 50% 42%, rgba(124,92,252,0.10), transparent 58%),
        radial-gradient(ellipse at 50% 70%, rgba(20,184,166,0.07), transparent 64%),
        var(--bg);
}
[data-theme="light"] .splash::before {
    background-image: url("data:image/svg+xml,%3Csvg width='900' height='620' viewBox='0 0 900 620' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 310H96L122 310L151 154L184 484L219 254L252 310H374L402 310L432 76L470 544L510 184L548 310H660L690 310L720 230L750 390L786 310H900' fill='none' stroke='rgba(124,92,252,0.22)' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M0 310H900' fill='none' stroke='rgba(20,184,166,0.10)' stroke-width='1'/%3E%3C/svg%3E");
    opacity: 0.34;
}
[data-theme="light"] .splash::after {
    background:
        linear-gradient(90deg, var(--bg), transparent 18%, transparent 82%, var(--bg)),
        linear-gradient(180deg, rgba(255,255,255,0.20), transparent 44%, rgba(255,255,255,0.14)),
        linear-gradient(rgba(17,17,24,0.042) 1px, transparent 1px),
        linear-gradient(90deg, rgba(17,17,24,0.042) 1px, transparent 1px);
    background-size: auto, auto, var(--splash-grid-size) var(--splash-grid-size), var(--splash-grid-size) var(--splash-grid-size);
}
.splash.slide-up {
    transform: translate3d(0, -104%, 0) scale(0.985);
    pointer-events: none;
}
.splash.slide-up::before,
.splash.slide-up .splash-arrow,
.splash.slide-up .splash-logo svg {
    animation-play-state: paused;
}

.splash.slide-up .splash-content {
    opacity: 0;
    transform: translate3d(var(--splash-offset-x), calc(var(--splash-offset-y) - 18px), 0) scale(0.988);
    transition-duration: 0.46s;
    transition-timing-function: var(--splash-slide-ease);
}

.splash.slide-up .splash-arrow-wrap,
.splash.slide-up .splash-footer {
    opacity: 0;
    transition-duration: 0.36s;
}

.splash.is-pressing {
    --splash-press-scale: 0.986;
}

.splash.is-pressing::before {
    opacity: 0.9;
}

.splash.is-pressing::after {
    opacity: 1;
}

.splash-snake {
    display: none;
}
.splash-snake span {
    position: absolute;
    left: var(--snake-x, 50%);
    top: var(--snake-y, 50%);
    width: calc(16px - var(--snake-index, 0) * 0.9px);
    height: calc(16px - var(--snake-index, 0) * 0.9px);
    min-width: 6px;
    min-height: 6px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--accent) calc(78% - var(--snake-index, 0) * 5%), var(--accent-2));
    box-shadow: 0 0 16px rgba(124,92,252,0.28), 0 0 28px rgba(94,234,212,0.14);
    opacity: calc(0.88 - var(--snake-index, 0) * 0.065);
    transform: translate3d(-50%, -50%, 0) rotate(-15deg);
    transition: opacity 0.2s ease;
    will-change: left, top;
}
.splash.slide-up .splash-snake {
    opacity: 0;
    transition: opacity 0.22s ease;
}

.splash-scan {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.28s ease, transform 0.5s var(--ease);
    transform: translate3d(0, 0, 0) scale(1);
}
.splash-scan::before,
.splash-scan::after {
    content: '';
    position: absolute;
    left: var(--splash-x);
    top: var(--splash-y);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(0.18);
    will-change: transform, opacity;
}
.splash-scan::before {
    width: clamp(220px, 34vmax, 560px);
    height: clamp(220px, 34vmax, 560px);
    background:
        radial-gradient(circle, rgba(255,255,255,0.20) 0 4%, rgba(255,255,255,0.11) 20%, transparent 62%);
}
.splash-scan::after {
    width: clamp(130px, 20vmax, 340px);
    height: clamp(130px, 20vmax, 340px);
    border: 1px solid rgba(255,255,255,0.32);
    box-shadow: 0 0 24px rgba(255,255,255,0.08), inset 0 0 22px rgba(255,255,255,0.08);
}
.splash:hover .splash-scan {
    opacity: 0.34;
}
.splash.is-pressing .splash-scan {
    opacity: 0.44;
    transform: translate3d(0, 0, 0) scale(1.01);
}
.splash.is-pressing .splash-scan::before {
    animation: splashTapBloom 0.58s var(--ease) both;
}
.splash.is-pressing .splash-scan::after {
    animation: splashTapRing 0.52s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.splash.slide-up .splash-scan {
    opacity: 0;
    transform: translate3d(0, -10px, 0) scale(1.05);
    transition-duration: 0.5s;
}
.splash-wave { display: none; }

@keyframes splashEcgMove {
    from { transform: translate3d(0, -50%, 0); }
    to { transform: translate3d(var(--splash-ecg-shift), -50%, 0); }
}

@keyframes splashBeamIdle {
    0%, 100% { opacity: 0.42; transform: translate3d(0, 0, 0) scale(1); }
    50% { opacity: 0.58; transform: translate3d(0, -4px, 0) scale(1.01); }
}
@keyframes splashTapBloom {
    0% { opacity: 0; transform: translate3d(-50%, -50%, 0) scale(0.18); }
    22% { opacity: 0.9; transform: translate3d(-50%, -50%, 0) scale(0.48); }
    100% { opacity: 0; transform: translate3d(-50%, -50%, 0) scale(1); }
}
@keyframes splashTapRing {
    0% { opacity: 0; transform: translate3d(-50%, -50%, 0) scale(0.3); }
    30% { opacity: 0.72; transform: translate3d(-50%, -50%, 0) scale(0.72); }
    100% { opacity: 0; transform: translate3d(-50%, -50%, 0) scale(1.45); }
}

/* 动画期间禁止滚动（包含触摸） */
body.animating {
    overflow: hidden;
    position: fixed;
    inset: 0;
    touch-action: none;
    -webkit-overflow-scrolling: auto;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    animation: splashFadeIn 0.6s ease-out;
    position: relative;
    z-index: 2;
    transform: translate3d(var(--splash-offset-x), var(--splash-offset-y), 0) scale(var(--splash-press-scale));
    transition: transform 0.34s var(--ease), opacity 0.25s ease, filter 0.28s ease;
}
.splash.is-pressing .splash-content {
    transform: translate3d(var(--splash-offset-x), var(--splash-offset-y), 0) scale(var(--splash-press-scale));
}

.splash.is-pressing .splash-logo {
    animation: splashLogoPulse 0.7s var(--ease) both;
}

@keyframes splashLogoPulse {
    0% { transform: translateY(-2px) scale(1); }
    28% { transform: translateY(-2px) scale(0.965); }
    58% { transform: translateY(-2px) scale(1.035); }
    100% { transform: translateY(-2px) scale(1); }
}
@keyframes splashFadeIn {
    from { opacity: 0; transform: translate3d(var(--splash-offset-x), calc(var(--splash-offset-y) + 14px), 0); }
    to { opacity: 1; transform: translate3d(var(--splash-offset-x), var(--splash-offset-y), 0); }
}

/* Logo 居中上方 */
.splash-logo {
    flex-shrink: 0;
    position: relative;
    display: grid;
    place-items: center;
    color: var(--text-2);
    filter: drop-shadow(0 18px 44px rgba(0,0,0,0.28));
    transition: transform 0.28s var(--ease), filter 0.28s ease;
}
.splash-logo::before {
    content: '';
    position: absolute;
    inset: -14px;
    z-index: -1;
    border-radius: 24px;
    pointer-events: none;
    background: radial-gradient(circle, rgba(124,92,252,0.20), rgba(94,234,212,0.08) 44%, transparent 72%);
    filter: blur(10px);
    opacity: 0.72;
}
.splash:hover .splash-logo {
    transform: translateY(-2px);
    filter: drop-shadow(0 20px 48px rgba(0,0,0,0.30)) drop-shadow(0 0 20px rgba(124,92,252,0.14));
}
.splash-logo img {
    display: block;
    width: clamp(76px, 9vw, 92px);
    height: clamp(76px, 9vw, 92px);
    border-radius: clamp(11px, 1.3vw, 14px);
    object-fit: cover;
    box-shadow: 0 18px 44px rgba(0,0,0,0.22), 0 6px 18px rgba(0,0,0,0.14);
}
[data-theme="light"] .splash-logo img {
    box-shadow: 0 18px 38px rgba(31,41,55,0.12), 0 5px 16px rgba(31,41,55,0.08);
}
.splash-logo svg {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: svgDraw 2s ease forwards;
}
@keyframes svgDraw {
    to { stroke-dashoffset: 0; }
}

.splash-title {
    font-size: clamp(28px, 4.6vw, 40px);
    font-weight: 700;
    letter-spacing: -0.7px;
    color: var(--text-1);
    line-height: 1.15;
    text-shadow: 0 16px 46px rgba(0,0,0,0.34);
}
[data-theme="light"] .splash-title {
    color: #1a1a2e;
}
.splash-desc {
    color: color-mix(in srgb, var(--text-2) 82%, var(--text-1));
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.3px;
    line-height: 1.6;
    max-width: 320px;
}
[data-theme="light"] .splash-desc {
    color: #5f5f76;
}

.splash-audio-notice {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    max-width: min(88vw, 360px);
    margin-top: 2px;
    padding: 7px 12px 7px 10px;
    border-radius: 999px;
    color: color-mix(in srgb, var(--text-2) 88%, var(--text-1));
    background: linear-gradient(135deg, rgba(124,92,252,0.065), rgba(94,234,212,0.035));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: 0.2px;
    opacity: 0;
    transform: translate3d(0, 8px, 0);
    animation: splashAudioNoticeIn 0.55s var(--ease) 0.38s forwards;
}
[data-theme="light"] .splash-audio-notice {
    color: #3f3f58;
    background: linear-gradient(135deg, rgba(124,92,252,0.07), rgba(20,184,166,0.05));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.64);
}
.splash-audio-icon {
    flex: 0 0 auto;
    color: color-mix(in srgb, var(--accent-2) 82%, var(--text-2));
    filter: drop-shadow(0 0 7px rgba(94,234,212,0.16));
}
.splash-audio-wave {
    animation: splashAudioWave 1.8s ease-in-out 0.7s 3 both;
}
.splash-audio-wave-outer {
    animation-delay: 0.98s;
}
@keyframes splashAudioNoticeIn {
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes splashAudioWave {
    0%, 100% { opacity: 0.28; }
    50% { opacity: 1; }
}

/* 进入引导 */
.splash-arrow-wrap {
    appearance: none;
    border: 0;
    min-width: 168px;
    min-height: 48px;
    margin-top: 8px;
    padding: 0 19px;
    border-radius: 999px;
    color: var(--text-1);
    background: linear-gradient(135deg, rgba(124,92,252,0.26), rgba(94,234,212,0.13));
    box-shadow: 0 12px 28px rgba(0,0,0,0.16), inset 0 1px 0 rgba(255,255,255,0.10);
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 11px;
    opacity: 0;
    animation: splashArrowIn 0.6s ease-out 0.8s forwards;
    z-index: 2;
    transition: transform 0.24s var(--ease), opacity 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}
[data-theme="light"] .splash-arrow-wrap {
    color: #24243a;
    background: linear-gradient(135deg, rgba(124,92,252,0.14), rgba(20,184,166,0.09));
    box-shadow: 0 12px 26px rgba(31,41,55,0.10), inset 0 1px 0 rgba(255,255,255,0.72);
}
.splash:hover .splash-arrow-wrap {
    opacity: 0.90;
}
.splash-arrow-wrap:hover {
    opacity: 1;
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(124,92,252,0.34), rgba(94,234,212,0.18));
    box-shadow: 0 16px 34px rgba(0,0,0,0.20), inset 0 1px 0 rgba(255,255,255,0.14);
}
.splash-arrow-wrap:active,
.splash.is-pressing .splash-arrow-wrap {
    transform: translateY(0) scale(0.98);
}
.splash-arrow-wrap:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent-2) 76%, white);
    outline-offset: 4px;
    border-radius: 12px;
}
@keyframes splashArrowIn {
    to { opacity: 0.86; }
}
.splash-hint {
    font-size: 13px;
    font-weight: 600;
    color: inherit;
    letter-spacing: 0.45px;
}
.splash-arrow {
    width: 15px;
    height: 22px;
    color: color-mix(in srgb, var(--text-1) 68%, var(--accent-2));
    animation: bounceDown 2s ease-in-out infinite;
}
@keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

.splash-footer {
    position: absolute;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-3);
    font-size: 11px;
    opacity: 0.25;
    z-index: 2;
}

@media (max-width: 768px) {
    .splash {
        --splash-x: 50%;
        --splash-y: 45%;
        --splash-grid-size: clamp(34px, 13vw, 56px);
        --splash-ecg-shift: -620px;
    }
    .splash::before {
        top: 50%;
        left: -60%;
        width: 220%;
        height: min(52vh, 430px);
        background-size: 620px 100%;
        opacity: 0.40;
        transform: translate3d(0, -50%, 0);
    }
    .splash.is-pressing::before {
        opacity: 0.9;
    }
    .splash-snake {
        display: none;
    }
    .splash-scan {
        display: block;
        opacity: 0.52;
        background:
            radial-gradient(circle at 50% 45%, rgba(255,255,255,0.10), rgba(124,92,252,0.08) 18%, transparent 46%),
            radial-gradient(ellipse at 50% 42%, rgba(94,234,212,0.10), transparent 54%);
    }
    .splash-scan::before {
        width: clamp(180px, 70vw, 360px);
        height: clamp(180px, 70vw, 360px);
    }
    .splash-scan::after {
        width: clamp(112px, 44vw, 240px);
        height: clamp(112px, 44vw, 240px);
    }
    .splash-content {
        width: min(86vw, 360px);
        gap: 12px;
    }
    .splash-audio-notice {
        padding-inline: 10px 12px;
        font-size: 11.5px;
    }
    .splash.slide-up .splash-content {
        transform: translate3d(var(--splash-offset-x), calc(var(--splash-offset-y) - 18px), 0) scale(0.988);
    }
    .splash.slide-up {
        opacity: 0;
        transition-property: transform, opacity;
        transition-duration: 0.82s, 0.46s;
    }
    .splash.slide-up::before,
    .splash.slide-up::after {
        opacity: 0;
        transition: opacity 0.34s ease-out;
    }
    .splash-arrow-wrap {
        min-width: 164px;
        margin-top: 7px;
    }
}

@media (max-height: 480px) and (orientation: landscape) {
    .splash {
        padding-block: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-bottom));
    }
    .splash-content {
        display: grid;
        grid-template-columns: clamp(68px, 10vw, 86px) auto;
        grid-template-rows: repeat(4, auto);
        align-items: center;
        column-gap: clamp(18px, 3vw, 28px);
        row-gap: 7px;
        width: auto;
        max-width: 82vw;
        text-align: left;
    }
    .splash-logo {
        grid-column: 1;
        grid-row: 1 / 5;
    }
    .splash-logo img {
        width: clamp(68px, 10vw, 86px);
        height: clamp(68px, 10vw, 86px);
    }
    .splash-title,
    .splash-desc,
    .splash-audio-notice,
    .splash-arrow-wrap {
        grid-column: 2;
        justify-self: start;
    }
    .splash-title {
        font-size: clamp(24px, 4.8vw, 32px);
    }
    .splash-desc {
        max-width: min(52vw, 360px);
    }
    .splash-audio-notice {
        margin-top: 0;
        max-width: min(58vw, 360px);
        padding-block: 6px;
    }
    .splash-arrow-wrap {
        min-width: 148px;
        min-height: 42px;
        margin-top: 2px;
    }
}

@media (max-height: 600px) and (orientation: portrait) {
    .splash-content {
        gap: 9px;
    }
    .splash-logo img {
        width: 70px;
        height: 70px;
    }
    .splash-title {
        font-size: clamp(25px, 7vw, 30px);
    }
    .splash-audio-notice {
        margin-top: 0;
        padding-block: 6px;
    }
    .splash-arrow-wrap {
        min-height: 44px;
        margin-top: 3px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .splash::before,
    .splash::after,
    .splash-scan,
    .splash-scan::before,
    .splash-scan::after,
    .splash-logo,
    .splash-logo svg,
    .splash-arrow,
    .splash-arrow-wrap,
    .splash-audio-notice,
    .splash-audio-wave {
        animation: none !important;
    }
    .splash-content {
        animation: none !important;
        transform: none !important;
    }
    .splash-arrow-wrap {
        opacity: 0.72;
        transform: none !important;
    }
    .splash-audio-notice {
        opacity: 1;
        transform: none;
    }
}

/* ======================================
   斜切背景动画 (Stage)
   ====================================== */
.stage {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: var(--bg);
    overflow: hidden;
    cursor: pointer;
    transition: background 0.6s ease;
}
.stage.stage-paused .stage-row {
    animation-play-state: paused;
}
.stage::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: radial-gradient(ellipse at center, transparent 30%, var(--bg) 80%);
    pointer-events: none;
    transition: opacity 0.5s ease;
}
/* 背景提前就位：z-index降到底层，瓷砖立即成为页面背景 */
.stage.fading {
    z-index: 0;
    background: transparent;
    pointer-events: none;
    opacity: 0.85;
}
.stage.fading::after {
    opacity: 0;
}
/* 飞散过渡：瓷砖飞出（保持底层z-index） */
.stage.flyaway {
    z-index: 0;
    background: transparent;
    overflow: visible;
    pointer-events: none;
}
.stage.flyaway::after {
    opacity: 0;
}
/* 持久背景模式：飞散结束后降为底层 */
.stage.stage-bg {
    z-index: 0;
    background: transparent;
    pointer-events: none;
    overflow: hidden;
    cursor: default;
    opacity: 0.75;
}
.stage.stage-bg::after {
    opacity: 0;
}
[data-theme="light"] .stage.stage-bg {
    opacity: 0.75;
}

.stage-tiles {
    position: absolute;
    inset: -30%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    transform: rotate(-15deg) scale(1.3);
}

.stage-row {
    display: flex;
    width: max-content;
    will-change: transform;
    backface-visibility: hidden;
    transform-style: flat;
    animation: tileSlide 12s linear infinite;
}
.stage-row-set {
    display: flex;
    gap: 14px;
    flex-shrink: 0;
    padding-right: 14px;
}
/* 偶数行用独立反向 keyframe，避免 animation-direction:reverse 的循环跳变 */
.stage-row:nth-child(even) { animation-name: tileSlideReverse; }
/* 错开起始相位，覆盖自身阀术 */
.stage-row:nth-child(1) { animation-duration: 12s; animation-delay: 0s; }
.stage-row:nth-child(2) { animation-duration: 14s; animation-delay: -5.1s; }
.stage-row:nth-child(3) { animation-duration: 11s; animation-delay: -2.3s; }
.stage-row:nth-child(4) { animation-duration: 13s; animation-delay: -7.4s; }
.stage-row:nth-child(5) { animation-duration: 15s; animation-delay: -4.1s; }
.stage-row:nth-child(6) { animation-duration: 10s; animation-delay: -1.7s; }

.stage-tile {
    flex-shrink: 0;
    width: 200px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    contain: layout style;
}
.stage-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* 噪点纹理 */
.bg-noise {
    position: absolute;
    inset: 0;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}
[data-theme="light"] .bg-noise { opacity: 0.04; }

/* 粒子 Canvas */
#particles {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.4;
}

/* ======================================
   页面容器
   ====================================== */
.page {
    position: relative;
    z-index: 2;
}

/* ======================================
   双栏布局
   ====================================== */
.layout {
    display: flex;
    position: relative;
    min-height: 100vh;
}
.main-area {
    flex: 1;
    min-width: 0;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* ======================================
   侧栏导航
   ====================================== */
.sidebar {
    position: sticky;
    top: 0;
    width: 220px;
    height: 100vh;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 10;
    scrollbar-width: none;
    border-right: 1px solid rgba(255,255,255,0.06);
    background: var(--bg);
    box-shadow: inset -1px 0 0 rgba(255,255,255,0.03);
    display: flex;
    flex-direction: column;
    isolation: isolate;
}
.sidebar::before {
    content: '';
    position: absolute;
    inset: -30%;
    z-index: -2;
    background: inherit;
    pointer-events: none;
}
.sidebar::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.25) 0%,
        rgba(0,0,0,0.12) 40%,
        rgba(0,0,0,0.35) 75%,
        rgba(8,8,20,0.95) 100%
    );
    pointer-events: none;
}
.stage.stage-bg ~ .page .sidebar,
.stage.fading ~ .page .sidebar,
.stage.flyaway ~ .page .sidebar {
    background: transparent;
}
.stage.stage-bg ~ .page .sidebar::before,
.stage.fading ~ .page .sidebar::before,
.stage.flyaway ~ .page .sidebar::before {
    background: rgba(0,0,0,0.20);
}
[data-theme="light"] .sidebar {
    border-right-color: rgba(0,0,0,0.06);
    box-shadow: inset -1px 0 0 rgba(255,255,255,0.62);
}
[data-theme="light"] .sidebar::after {
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.15) 0%,
        rgba(0,0,0,0.08) 40%,
        rgba(0,0,0,0.2) 70%,
        rgba(244,244,248,0.95) 100%
    );
}
[data-theme="light"] .stage.stage-bg ~ .page .sidebar::before,
[data-theme="light"] .stage.fading ~ .page .sidebar::before,
[data-theme="light"] .stage.flyaway ~ .page .sidebar::before {
    background: rgba(255,255,255,0.06);
}
.sidebar::-webkit-scrollbar { display: none; }

/* 侧栏品牌区 */
.sidebar-brand {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 22px 16px 22px;
    border: 0;
    border-radius: 0;
    color: inherit;
    font: inherit;
    text-align: center;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background:
        radial-gradient(circle at 50% 26px, color-mix(in srgb, var(--accent) 20%, transparent), transparent 48%),
        linear-gradient(180deg, rgba(255,255,255,0.065) 0%, rgba(255,255,255,0.018) 58%, transparent 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.045);
    position: relative;
}
.sidebar-brand::after {
    content: '';
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.10), color-mix(in srgb, var(--accent-2) 24%, transparent), transparent);
    opacity: 0.86;
}
.sidebar-brand:focus-visible {
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.07),
        inset 0 0 0 2px color-mix(in srgb, var(--accent) 42%, transparent);
}
[data-theme="light"] .sidebar-brand {
    background:
        radial-gradient(circle at 50% 26px, color-mix(in srgb, var(--accent) 14%, transparent), transparent 48%),
        linear-gradient(180deg, rgba(255,255,255,0.62) 0%, rgba(255,255,255,0.18) 58%, transparent 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.64);
}
.sidebar-logo {
    flex-shrink: 0;
    width: 85px;
    height: 85px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 16px 34px rgba(124,92,252,0.18);
}
.sidebar-logo-fallback {
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 30% 18%, rgba(94,234,212,0.30), transparent 36%),
        linear-gradient(135deg, rgba(124,92,252,0.20), rgba(94,234,212,0.09));
    box-shadow:
        0 16px 34px rgba(124,92,252,0.18),
        inset 0 1px 0 rgba(255,255,255,0.14);
}
[data-theme="light"] .sidebar-logo {
    box-shadow: 0 14px 30px rgba(124,92,252,0.10);
}
[data-theme="light"] .sidebar-logo-fallback {
    background:
        radial-gradient(circle at 30% 18%, rgba(20,184,166,0.18), transparent 38%),
        linear-gradient(135deg, rgba(124,92,252,0.13), rgba(20,184,166,0.06));
}
.sidebar-title {
    max-width: 100%;
    font-weight: 760;
    font-size: 15px;
    color: var(--text-1);
    letter-spacing: -0.2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sidebar-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-3);
    padding: 14px 16px 6px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 10px 0;
    flex: 1;
    overflow-y: auto;
    mask-image: linear-gradient(to bottom, transparent 0, #000 16px, #000 calc(100% - 18px), transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16px, #000 calc(100% - 18px), transparent 100%);
}

/* 侧栏底部版权 */
.sidebar-footer {
    padding: 14px 18px 16px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    background: linear-gradient(180deg, transparent, rgba(255,255,255,0.025));
}
.sidebar-footer p {
    font-size: 11px;
    color: var(--text-3);
    line-height: 1.5;
    margin: 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 14px;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 560;
    transition: color 0.22s ease, background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s var(--ease);
    text-decoration: none;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px solid transparent;
}
.sidebar-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 56%;
    border-radius: 0 999px 999px 0;
    background: var(--cat-color, var(--accent));
    box-shadow: 0 0 16px color-mix(in srgb, var(--cat-color, var(--accent)) 50%, transparent);
    transition: transform 0.25s var(--ease);
}
.sidebar-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, color-mix(in srgb, var(--cat-color, var(--accent)) 16%, transparent), transparent 72%);
    opacity: 0;
    transition: opacity 0.22s ease;
    pointer-events: none;
}
.sidebar-item:hover {
    color: var(--text-1);
    background: rgba(255,255,255,0.045);
    border-color: rgba(255,255,255,0.085);
    transform: translateX(3px);
}
.sidebar-item:hover::after {
    opacity: 1;
}
.sidebar-item:hover .sidebar-icon {
    transform: scale(1.06);
    border-color: color-mix(in srgb, var(--cat-color, var(--accent)) 30%, transparent);
    background: color-mix(in srgb, var(--cat-color, var(--accent)) 16%, rgba(255,255,255,0.06));
    box-shadow: 0 0 18px color-mix(in srgb, var(--cat-color, var(--accent)) 22%, transparent);
}
[data-theme="light"] .sidebar-item:hover {
    background: rgba(0,0,0,0.035);
    border-color: rgba(0,0,0,0.055);
}
.sidebar-item.active {
    color: var(--text-1);
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--cat-color, var(--accent)) 20%, transparent), rgba(255,255,255,0.055));
    border-color: color-mix(in srgb, var(--cat-color, var(--accent)) 28%, rgba(255,255,255,0.10));
    font-weight: 680;
    box-shadow:
        0 14px 34px -24px color-mix(in srgb, var(--cat-color, var(--accent)) 55%, transparent),
        inset 0 1px 0 rgba(255,255,255,0.08);
}
.sidebar-item.active::after {
    opacity: 1;
}
[data-theme="light"] .sidebar-item.active {
    color: var(--text-1);
    background: color-mix(in srgb, var(--cat-color, var(--accent)) 12%, rgba(255,255,255,0.72));
    border-color: color-mix(in srgb, var(--cat-color, var(--accent)) 18%, rgba(0,0,0,0.08));
}
.sidebar-item.active::before {
    transform: translateY(-50%) scaleY(1);
}

.sidebar-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 15px;
    color: var(--cat-color, var(--accent));
    background: rgba(255,255,255,0.045);
    border: 1px solid rgba(255,255,255,0.065);
    border-radius: 12px;
    transition: background 0.22s ease, border-color 0.22s ease, transform 0.22s var(--ease), box-shadow 0.22s ease;
}
.sidebar-item.active .sidebar-icon {
    background: color-mix(in srgb, var(--cat-color, var(--accent)) 18%, rgba(255,255,255,0.08));
    border-color: color-mix(in srgb, var(--cat-color, var(--accent)) 30%, transparent);
    box-shadow:
        0 0 18px color-mix(in srgb, var(--cat-color, var(--accent)) 24%, transparent),
        inset 0 1px 0 rgba(255,255,255,0.10);
}
[data-theme="light"] .sidebar-icon {
    background: rgba(0,0,0,0.035);
    border-color: rgba(0,0,0,0.055);
}
[data-theme="light"] .sidebar-item.active .sidebar-icon {
    background: color-mix(in srgb, var(--cat-color, var(--accent)) 18%, rgba(255,255,255,0.70));
}
.sidebar-icon img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    border-radius: 4px;
}
.sidebar-icon .iconfont {
    font-size: 16px;
    line-height: 1;
}

.sidebar-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    z-index: 1;
}

.sidebar-count {
    min-width: 24px;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 21px;
    text-align: center;
    color: var(--text-3);
    background: rgba(255,255,255,0.045);
    border: 1px solid rgba(255,255,255,0.055);
    flex-shrink: 0;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
    position: relative;
    z-index: 1;
}
.sidebar-item:hover .sidebar-count,
.sidebar-item.active .sidebar-count {
    color: var(--text-1);
    background: color-mix(in srgb, var(--cat-color, var(--accent)) 20%, rgba(255,255,255,0.05));
    border-color: color-mix(in srgb, var(--cat-color, var(--accent)) 30%, transparent);
}

/* 侧栏切换按钮（移动端左上角） */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 150;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.35);
    color: #fff;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
.sidebar-toggle:hover {
    background: rgba(0,0,0,0.55);
    transform: scale(1.08);
}
[data-theme="light"] .sidebar-toggle {
    background: rgba(255,255,255,0.7);
    color: var(--text-2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
[data-theme="light"] .sidebar-toggle:hover {
    background: rgba(255,255,255,0.9);
    color: var(--text-1);
}

/* 移动端侧栏遮罩（JS动态创建，挂在body下覆盖全部） */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 199;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    will-change: opacity;
    cursor: pointer;
}
.sidebar-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

/* ======================================
   顶部导航栏（已移除，保留兼容）
   ====================================== */
.topbar { display: none; }

/* ======================================
   移动端固定顶栏
   ====================================== */
.mobile-topbar {
    display: contents;
}

/* ======================================
   浮动操作按钮
   ====================================== */
.floating-actions {
    position: fixed;
    top: 14px;
    right: 18px;
    z-index: 150;
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    border-radius: 14px;
    padding: 4px;
    border: 1px solid rgba(255,255,255,0.06);
}
[data-theme="light"] .floating-actions {
    background: rgba(255,255,255,0.65);
    border-color: rgba(0,0,0,0.06);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.fab-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
}
.fab-btn:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}
[data-theme="light"] .fab-btn {
    color: var(--text-2);
}
[data-theme="light"] .fab-btn:hover {
    background: rgba(0,0,0,0.06);
    color: var(--text-1);
}

/* 主题切换图标 */
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }
[data-theme="light"] .icon-sun { display: block; }
[data-theme="light"] .icon-moon { display: none; }

/* ======================================
   搜索弹窗
   ====================================== */
.search-modal {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20vh;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}
.search-modal.open {
    opacity: 1;
    visibility: visible;
}

.search-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px) saturate(1.5);
    -webkit-backdrop-filter: blur(8px) saturate(1.5);
}
[data-theme="light"] .search-backdrop {
    background: rgba(0,0,0,0.25);
}

.search-dialog {
    position: relative;
    width: 560px;
    max-width: 92vw;
    background: rgba(18,18,32,0.95);
    border: 1px solid var(--border-hover);
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        0 24px 80px rgba(0,0,0,0.5),
        0 0 0 1px rgba(255,255,255,0.05) inset;
    transform: translateY(-16px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease-out;
    opacity: 0;
}
[data-theme="light"] .search-dialog {
    background: rgba(255,255,255,0.97);
    box-shadow:
        0 24px 80px rgba(0,0,0,0.12),
        0 0 0 1px rgba(0,0,0,0.04) inset;
}
.search-modal.open .search-dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.search-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    color: var(--text-2);
}
.search-input-wrap input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-1);
    font-size: 16px;
    font-family: var(--font);
    outline: none;
}
.search-input-wrap input::placeholder { color: var(--text-3); }
.search-input-wrap kbd {
    font-family: var(--font);
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
    color: var(--text-3);
    cursor: pointer;
    transition: color 0.2s;
}
.search-input-wrap kbd:hover { color: var(--text-1); }

.search-results {
    max-height: 320px;
    overflow-y: auto;
    padding: 8px;
}
.search-results:empty::after {
    content: '输入关键词开始搜索';
    display: block;
    padding: 24px;
    text-align: center;
    color: var(--text-3);
    font-size: 14px;
}
.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    transition: background 0.15s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.search-item:hover { background: var(--surface); }
.search-item .si-icon { font-size: 16px; color: var(--text-3); width: 20px; text-align: center; }
.search-item .si-text { flex: 1; }
.search-item .si-title { font-size: 14px; font-weight: 500; }
.search-item .si-desc { font-size: 12px; color: var(--text-3); }
.search-item .si-arrow { color: var(--text-3); }

.search-no-result {
    padding: 32px;
    text-align: center;
    color: var(--text-3);
    font-size: 14px;
}

/* ======================================
   Hero 区域（全宽填充式）
   ====================================== */
.hero {
    position: relative;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    background: #0a0a14;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: var(--hero-mask);
    pointer-events: none;
}
[data-theme="light"] .hero::before {
    background: var(--hero-mask);
}
/* 视频背景 */
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
    transform: scale(1.02) translateZ(0);
    will-change: transform;
}
/* 缓冲加载指示 */
.hero.video-buffering::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: rgba(255,255,255,0.8);
    border-radius: 50%;
    z-index: 5;
    animation: bufferSpin 0.7s linear infinite;
}
@keyframes bufferSpin {
    to { transform: rotate(360deg); }
}
/* Hero 内容覆盖层 */
.hero-overlay {
    --hero-text-progress: 0;
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: clamp(28px, 5vw, 64px) 20px clamp(24px, 4vw, 44px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(12px, 3vw, 18px);
    text-align: center;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .hero-overlay {
        gap: 14px;
        padding: 24px 16px 20px;
    }
}

@media (max-width: 480px) {
    .hero-overlay {
        gap: 10px;
        padding: 20px 12px 16px;
    }
    
    /* 小屏幕隐藏座右铭以节省空间 */
    .hero-motto {
        display: none !important;
    }
}

.hero-clock {
    min-width: min(360px, calc(100vw - 48px));
    padding: 4px 0 2px;
    opacity: calc(1 - var(--hero-text-progress));
    transform: translateY(calc(-16px * var(--hero-text-progress))) scale(calc(1 - 0.06 * var(--hero-text-progress)));
    filter: blur(calc(3px * var(--hero-text-progress)));
    transition: opacity 0.08s linear, transform 0.08s linear, filter 0.08s linear;
    will-change: opacity, transform, filter;
}

/* 移动端时钟优化 */
@media (max-width: 768px) {
    .hero-clock {
        min-width: min(320px, calc(100vw - 32px));
    }
    .hero-clock-main {
        font-size: clamp(48px, 12vw, 60px);
    }
}

@media (max-width: 480px) {
    .hero-clock {
        padding: 2px 0 0;
    }
    .hero-clock-main {
        font-size: 42px;
    }
    .hero-clock-sub {
        font-size: 11px;
        gap: 6px;
        padding: 4px 8px;
        margin-top: 8px;
    }
    .hero-system-row {
        gap: 6px;
        margin-top: 8px;
    }
    .hero-system-row span {
        font-size: 10px;
        padding: 3px 7px;
    }
}

.hero-clock-main {
    font-size: 60px;
    font-weight: 760;
    line-height: 0.96;
    letter-spacing: 0;
    color: #fff;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 4px 24px rgba(0,0,0,0.46);
}
.hero-clock-sub {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    padding: 5px 10px;
    border-radius: 999px;
    color: rgba(255,255,255,0.82);
    background: rgba(0,0,0,0.20);
    border: 1px solid rgba(255,255,255,0.10);
    backdrop-filter: blur(14px) saturate(1.18);
    -webkit-backdrop-filter: blur(14px) saturate(1.18);
    font-size: 12px;
    line-height: 1.2;
    text-shadow: 0 1px 8px rgba(0,0,0,0.34);
}
.hero-clock-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(94,234,212,0.82);
    box-shadow: 0 0 12px rgba(94,234,212,0.42);
}
.hero-system-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}
.hero-system-row span {
    padding: 4px 9px;
    border-radius: 999px;
    color: rgba(255,255,255,0.70);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.08);
    font-size: 11px;
    line-height: 1.2;
    backdrop-filter: blur(10px) saturate(1.1);
    -webkit-backdrop-filter: blur(10px) saturate(1.1);
}
[data-theme="light"] .hero-clock-main {
    color: #fff;
    text-shadow: 0 4px 22px rgba(15,23,42,0.40);
}
[data-theme="light"] .hero-clock-sub {
    color: rgba(15,23,42,0.72);
    background: rgba(255,255,255,0.64);
    border-color: rgba(15,23,42,0.08);
    text-shadow: 0 1px 0 rgba(255,255,255,0.56);
}
[data-theme="light"] .hero-system-row span {
    color: rgba(15,23,42,0.62);
    background: rgba(255,255,255,0.54);
    border-color: rgba(15,23,42,0.06);
}
/* 静音按钮 */
.hero-mute-btn {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 5;
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: #fff;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.hero-mute-btn:hover { opacity: 1; }
.hero-mute-btn .icon-unmuted,
#heroMuteBtn .icon-unmuted { display: none; }
.hero-mute-btn.unmuted .icon-muted,
#heroMuteBtn.unmuted .icon-muted { display: none; }
.hero-mute-btn.unmuted .icon-unmuted,
#heroMuteBtn.unmuted .icon-unmuted { display: block; }

/* Hero 搜索框 */
.hero-search-anchor {
    width: 100%;
    min-height: 52px;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 768px) {
    .hero-search-anchor {
        min-height: 48px;
    }
}

@media (max-width: 480px) {
    .hero-search-anchor {
        min-height: 44px;
    }
}
.hero-search {
    --dock-progress: 0;
    --search-width: 560px;
    --search-scale: 1;
    --search-pad-y: 12px;
    --search-pad-x: 18px;
    --search-x: 0px;
    --search-y: 0px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: var(--search-width);
    max-width: calc(100vw - 24px);
    padding: var(--search-pad-y) var(--search-pad-x);
    border-radius: 18px;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-shadow: none;
    position: relative;
    z-index: 180;
    align-self: center;
    transform: none;
    transform-origin: left top;
    will-change: transform, width, padding;
}
.hero-search.is-floating {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--search-width);
    transform: translate3d(var(--search-x), var(--search-y), 0) scale(var(--search-scale));
}
.hero-search.is-docked {
    background: rgba(0,0,0,0.42);
    border-color: rgba(255,255,255,0.16);
    box-shadow: 0 8px 28px rgba(0,0,0,0.24);
    border-radius: 16px;
}
.hero-search.mobile-docked {
    height: 38px;
    min-height: 38px;
    border-radius: 16px;
    background: rgba(0,0,0,0.30);
    border-color: rgba(255,255,255,0.06);
    box-shadow: none;
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
}
[data-theme="light"] .hero-search.mobile-docked {
    background: rgba(255,255,255,0.65);
    border-color: rgba(0,0,0,0.06);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.hero-search.engine-open {
    z-index: 720;
}
.search-engine-open .hero {
    overflow: visible;
    z-index: 640;
}
.search-engine-open .home-hot {
    z-index: 30;
}
.hero-search:focus-within {
    border-color: rgba(255,255,255,0.25);
    box-shadow: 0 4px 32px rgba(0,0,0,0.2);
    background: rgba(0,0,0,0.4);
}
[data-theme="light"] .hero-search {
    background: rgba(255,255,255,0.65);
    border-color: rgba(0,0,0,0.06);
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
[data-theme="light"] .hero-search:focus-within {
    background: rgba(255,255,255,0.85);
    border-color: rgba(0,0,0,0.1);
    box-shadow: 0 4px 32px rgba(0,0,0,0.08);
}
[data-theme="light"] .hero-search.is-docked {
    background: rgba(255,255,255,0.88);
    border-color: rgba(0,0,0,0.12);
    box-shadow: 0 8px 28px rgba(0,0,0,0.10);
}
.hero-search-icon {
    color: rgba(255,255,255,0.6);
    flex-shrink: 0;
}
[data-theme="light"] .hero-search-icon {
    color: var(--text-3);
}
.hero-search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-size: 15px;
    color: #fff;
    font-family: var(--font);
    min-width: 0;
}
.hero-search.mobile-docked .hero-search-input {
    font-size: 13px;
}
[data-theme="light"] .hero-search-input {
    color: var(--text-1);
}
.hero-search-input::placeholder {
    color: rgba(255,255,255,0.45);
}
[data-theme="light"] .hero-search-input::placeholder {
    color: var(--text-3);
}
.hero-search-kbd {
    font-family: var(--font);
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.5);
    flex-shrink: 0;
}
[data-theme="light"] .hero-search-kbd {
    border-color: rgba(0,0,0,0.08);
    background: rgba(0,0,0,0.04);
    color: var(--text-3);
}
.hero-search.is-docked .hero-search-kbd {
    opacity: 0;
    width: 0;
    padding-left: 0;
    padding-right: 0;
    border-width: 0;
    overflow: hidden;
}

@media (max-width: 768px) {
    .hero-search-anchor {
        justify-content: flex-start;
        padding-left: 46px;
    }
    .hero-search {
        max-width: none;
        transform-origin: left center;
        background: rgba(0,0,0, calc(0.20 + 0.22 * var(--dock-progress)));
        border-color: rgba(255,255,255, calc(0.08 + 0.08 * var(--dock-progress)));
        box-shadow: 0 calc(4px * var(--dock-progress)) calc(22px * var(--dock-progress)) rgba(0,0,0,0.22);
        transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    }
    [data-theme="light"] .hero-search {
        background: rgba(255,255,255, calc(0.65 + 0.22 * var(--dock-progress)));
        border-color: rgba(0,0,0, calc(0.06 + 0.06 * var(--dock-progress)));
        box-shadow: 0 calc(4px * var(--dock-progress)) calc(18px * var(--dock-progress)) rgba(0,0,0,0.10);
    }
}

@media (max-width: 480px) {
    .hero-search-anchor { padding-left: 40px; }
    .hero-search {
        gap: 8px;
    }
    .hero-search-input { font-size: 14px; }
}

/* Hero 统计信息 */
.hero-stats-inline {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    text-align: center;
}
.hero-stats-inline strong {
    color: rgba(255,255,255,0.75);
    font-weight: 600;
}
[data-theme="light"] .hero-stats-inline {
    color: var(--text-3);
}
[data-theme="light"] .hero-stats-inline strong {
    color: var(--text-2);
}

@media (max-width: 640px) {
    .hero { min-height: 220px; border-radius: 0; }
    .hero-overlay { padding: 46px 16px 26px; max-width: 100%; gap: 12px; }
    .hero-clock {
        min-width: 0;
        width: 100%;
    }
    .hero-clock-main {
        font-size: 52px;
    }
    .hero-clock-sub {
        margin-top: 8px;
        padding: 5px 9px;
        font-size: 11.5px;
    }
    .hero-system-row {
        margin-top: 8px;
        gap: 6px;
    }
    .hero-system-row span {
        padding: 4px 8px;
        font-size: 10.5px;
    }
    .hero-search { padding: 10px 14px; border-radius: 24px; }
    .hero-search-kbd { display: none; }
    .hero-mute-btn { bottom: 8px; left: 8px; }
}

@media (max-width: 420px) {
    .hero-clock-main {
        font-size: 46px;
    }
}

/* ======================================
   内容区
   ====================================== */
.content {
    flex: 1;
    min-width: 0;
    padding: clamp(24px, 3vw, 32px) clamp(16px, 2.5vw, 28px) clamp(24px, 4vw, 48px);
    background: var(--content-mask);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    position: relative;
    z-index: 4;
    border-radius: 18px 18px 0 0;
    margin-top: -18px;
    display: flex;
    flex-direction: column;
}
[data-theme="light"] .content {
    background: var(--content-mask);
}

/* ======================================
   分类区块
   ====================================== */
.section {
    position: relative;
    margin-bottom: clamp(34px, 4.2vw, 54px);
    padding: 2px 0 4px;
    isolation: isolate;
}
.section:last-child {
    margin-bottom: clamp(16px, 2vw, 24px);
}
.section::before {
    content: '';
    position: absolute;
    inset: -14px -12px -18px;
    z-index: -1;
    border-radius: 26px;
    background:
        radial-gradient(ellipse at 0% 0%, color-mix(in srgb, var(--cat-color, var(--accent)) 8%, transparent), transparent 48%),
        linear-gradient(180deg, rgba(255,255,255,0.018), transparent 62%);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.32s ease, transform 0.32s var(--ease);
    pointer-events: none;
}
.section:hover::before {
    opacity: 1;
    transform: translateY(0);
}

.section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 0 2px 13px;
    position: relative;
}
.section-head::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: min(560px, 100%);
    height: 1px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--cat-color, var(--accent)) 48%, transparent), rgba(255,255,255,0.055) 42%, transparent 100%);
    opacity: 0.72;
    transform-origin: left center;
    transition: opacity 0.28s ease, width 0.28s var(--ease);
}
.section:hover .section-head::after {
    width: min(720px, 100%);
    opacity: 0.92;
}
.section-tag {
    font-size: 17px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 8px;
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--cat-color, var(--accent)) 18%, rgba(255,255,255,0.06)), rgba(255,255,255,0.035));
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--cat-color, var(--accent)) 18%, transparent),
        0 10px 24px color-mix(in srgb, var(--cat-color, var(--accent)) 12%, transparent),
        inset 0 1px 0 rgba(255,255,255,0.10);
    transition: transform 0.24s var(--ease), box-shadow 0.24s ease, background 0.24s ease;
}
.section:hover .section-tag {
    transform: translateY(-1px);
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--cat-color, var(--accent)) 26%, transparent),
        0 12px 30px color-mix(in srgb, var(--cat-color, var(--accent)) 16%, transparent),
        inset 0 1px 0 rgba(255,255,255,0.14);
}
.section-tag img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 3px;
}
.section-info {
    flex: 1;
    min-width: 0;
}
.section-head h2 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.2px;
    color: var(--text-1);
    text-shadow: 0 0 20px color-mix(in srgb, var(--cat-color, var(--accent)) 15%, transparent);
}
.section-desc {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 2px;
}
.section-count {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-3);
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.055);
    transition: color 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}
.section:hover .section-count {
    color: var(--text-2);
    background: color-mix(in srgb, var(--cat-color, var(--accent)) 8%, rgba(255,255,255,0.035));
    border-color: color-mix(in srgb, var(--cat-color, var(--accent)) 18%, transparent);
}
[data-theme="light"] .section-count {
    background: rgba(0,0,0,0.035);
    border-color: rgba(0,0,0,0.055);
}
[data-theme="light"] .section:hover .section-count {
    background: color-mix(in srgb, var(--cat-color, var(--accent)) 7%, rgba(255,255,255,0.75));
}

/* ======================================
   卡片网格
   ====================================== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}
.grid > .card {
    min-width: 0;
}

/* ======================================
   卡片
   ====================================== */
.card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    cursor: pointer;
    display: block;
    contain: layout style paint;
}
.card:hover {
    will-change: transform;
}
.card::before { display: none; }

.card-body {
    position: relative;
    z-index: 1;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: inherit;
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
[data-theme="light"] .card-body {
    background: rgba(255,255,255,0.58);
    border-color: rgba(15,23,42,0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.62), 0 10px 24px rgba(15,23,42,0.08);
    backdrop-filter: blur(16px) saturate(1.08);
    -webkit-backdrop-filter: blur(16px) saturate(1.08);
}

.card:hover .card-body {
    background: var(--bg-card-hover);
    border-color: color-mix(in srgb, var(--cat-color, var(--accent)) 35%, var(--border-hover));
    box-shadow:
        0 4px 16px rgba(0,0,0,0.12),
        0 0 24px -4px color-mix(in srgb, var(--cat-color, var(--accent)) 18%, transparent);
}
[data-theme="light"] .card:hover .card-body {
    background: rgba(255,255,255,0.72);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.70),
        0 12px 28px rgba(15,23,42,0.10),
        0 0 20px -4px color-mix(in srgb, var(--cat-color, var(--accent)) 12%, transparent);
}

.card:hover {
    transform: translateY(-2px);
}
[data-theme="light"] .card:hover {
    transform: translateY(-2px);
}

.card-icon {
    font-size: 18px;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border-radius: 50%;
    border: 1px solid var(--border);
    transition: background 0.18s ease, border-color 0.18s ease;
    overflow: hidden;
}
.card:hover .card-icon {
    border-color: color-mix(in srgb, var(--cat-color, var(--accent)) 30%, var(--border-hover));
    background: color-mix(in srgb, var(--cat-color, var(--accent)) 8%, var(--surface));
}
.card-icon .iconfont {
    font-size: 18px;
    line-height: 1;
}
.card-text {
    flex: 1;
    min-width: 0;
}
.section-tag .iconfont {
    font-size: 18px;
    line-height: 1;
}
.card-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.card-name {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.2px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-1);
    transition: color 0.18s;
}
.card:hover .card-name {
    color: var(--cat-color, var(--accent));
}

/* 标签 */
.tag {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 100px;
    letter-spacing: 0.3px;
    flex-shrink: 0;
    display: inline-block;
    line-height: 1.4;
}
.tag-blue { background: rgba(59,130,246,0.12); color: #60a5fa; }
.tag-purple { background: rgba(139,92,246,0.12); color: #a78bfa; }
.tag-green { background: rgba(34,197,94,0.12); color: #4ade80; }
.tag-red { background: rgba(239,68,68,0.12); color: #f87171; }
.tag-orange { background: rgba(249,115,22,0.12); color: #fb923c; }
.tag-pink { background: rgba(236,72,153,0.12); color: #f472b6; }
.tag-cyan { background: rgba(6,182,212,0.12); color: #22d3ee; }
.tag-yellow { background: rgba(234,179,8,0.12); color: #facc15; }

.card-desc {
    font-size: 11px;
    color: var(--text-3);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 2px 0 0;
}

/* 链接类型角标指示 */
.card[data-link-type="copy"] .card-body::after,
.card[data-link-type="detail"] .card-body::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    opacity: 0.5;
    transition: opacity 0.2s;
    background-size: 12px 12px;
    background-repeat: no-repeat;
    background-position: center;
}
.card[data-link-type="copy"] .card-body::after {
    background-color: rgba(249,115,22,0.12);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23fb923c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2' ry='2'/%3E%3Cpath d='M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1'/%3E%3C/svg%3E");
}
.card[data-link-type="detail"] .card-body::after {
    background-color: rgba(139,92,246,0.12);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a78bfa' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3C/svg%3E");
}
.card:hover [data-link-type="copy"] .card-body::after,
.card:hover [data-link-type="detail"] .card-body::after {
    opacity: 0.8;
}

/* ======================================
   页脚（嵌入内容区底部）
   ====================================== */
.content > .footer-inner {
    margin-top: auto;
    padding: 24px 0 8px;
    text-align: center;
    color: var(--text-3);
    font-size: 12px;
    border-top: 1px solid var(--border);
}
.content > .footer-inner p {
    margin: 0;
    line-height: 1.6;
    opacity: 0.65;
}

/* ======================================
   入场动画
   ====================================== */

/* 页面容器：淡入 + 轻微上移 */
.page {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
body.content-in .page {
    opacity: 1;
    transform: none;
}
body.content-direct .page {
    opacity: 1;
    transform: none;
    transition: none;
}

/* 分层入场 — hero 稍延迟 */
.hero {
    opacity: 0;
    transform: translateY(24px);
}
.section {
    opacity: 0;
    transform: translateY(24px);
}
.hero.in-view {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.9s var(--ease) 0.1s, transform 0.9s var(--ease) 0.1s;
}
.section.in-view {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.card {
    opacity: 0;
    transform: translateY(12px);
}
.card.in-view {
    animation: cardFadeIn 0.4s ease forwards;
}
body.content-direct .hero,
body.content-direct .section,
body.content-direct .card {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
}
body.content-direct .card.in-view {
    animation: none;
}
@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.card.in-view:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* 滚动进度条 */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    z-index: 9999;
    transition: width 0.05s linear;
    pointer-events: none;
}

/* 右下角悬浮按钮组 */
.bottom-actions {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.bottom-fab {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(18,18,32,0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.3s, transform 0.3s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.bottom-fab:hover {
    background: rgba(18,18,32,0.95);
    border-color: var(--border-hover);
    color: var(--text-1);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
[data-theme="light"] .bottom-fab {
    background: rgba(255,255,255,0.85);
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
[data-theme="light"] .bottom-fab:hover {
    background: rgba(255,255,255,0.95);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
/* 回到顶部 —— 默认隐藏，滚动后显示 */
.back-to-top {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}
.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ======================================
   搜索过滤隐藏
   ====================================== */
.card.filtered-out { display: none; }
.section.filtered-out { display: none; }

/* ======================================
   响应式
   ====================================== */
@media (max-width: 1024px) {
    .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

@media (max-width: 768px) {
    .stage-tiles {
        inset: -40%;
        gap: 14px;
        transform: rotate(-12deg) scale(1.4);
    }
    .stage-tile {
        width: 140px;
        height: 90px;
        border-radius: 10px;
    }
    .stage-row-set { gap: 12px; padding-right: 12px; }

    .content { padding: 16px 12px clamp(32px, 5vw, 48px); border-radius: 14px 14px 0 0; margin-top: -14px; }

    .section {
        margin-bottom: 30px;
    }
    .section::before {
        inset: -8px -6px -12px;
        border-radius: 20px;
    }
    .section-head {
        margin-bottom: 12px;
        padding-bottom: 10px;
    }

    .grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }

    .card-body { padding: 10px; }
    .card-icon { width: 36px; height: 36px; font-size: 18px; }
    .section-head h2 { font-size: 14px; }
    .section-tag { width: 24px; height: 24px; font-size: 14px; }

    /* 移动端取消 .page 层叠上下文，侧栏/遮罩 z-index 在根上下文生效 */
    .page {
        z-index: auto;
    }

    /* 侧栏：移动端隐藏，通过按钮呼出 */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: min(78vw, 292px);
        height: 100vh;
        margin: 0;
        padding: 0;
        background: var(--bg);
        border: 1px solid var(--border);
        border-left: 0;
        border-radius: 0 14px 14px 0;
        z-index: 200;
        transform: translate3d(-100%, 0, 0);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 4px 0 28px rgba(0,0,0,0.36);
        will-change: transform;
        contain: layout style;
    }
    .sidebar-brand {
        gap: 7px;
        padding: 18px 14px 16px;
    }
    .sidebar-brand::after {
        left: 16px;
        right: 16px;
    }
    .sidebar-logo {
        width: 70px;
        height: 70px;
        border-radius: 10px;
    }
    .sidebar-title {
        font-size: 14px;
    }
    .sidebar-nav {
        gap: 5px;
        padding: 12px 10px 0;
    }
    .sidebar-footer {
        padding: 10px 14px 12px;
    }
    .sidebar-item {
        gap: 9px;
        padding: 8px 9px;
        border-radius: 10px;
        font-size: 12.5px;
        min-height: 42px;
    }
    .sidebar-icon {
        width: 30px;
        height: 30px;
        border-radius: 9px;
        font-size: 14px;
    }
    .sidebar-icon img {
        width: 17px;
        height: 17px;
    }
    .sidebar-icon .iconfont {
        font-size: 15px;
    }
    .sidebar-count {
        min-width: 22px;
        height: 20px;
        padding: 0 7px;
        font-size: 10.5px;
        line-height: 19px;
    }
    [data-theme="light"] .sidebar {
        box-shadow: 4px 0 24px rgba(0,0,0,0.08);
        background:
            radial-gradient(circle at 50% 0%, rgba(124,92,252,0.12), transparent 36%),
            linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,255,255,0.62)),
            rgba(246,246,250,0.92);
    }
    .stage.stage-bg ~ .page .sidebar,
    .stage.fading ~ .page .sidebar,
    .stage.flyaway ~ .page .sidebar {
        color: #f8fafc;
        background:
            radial-gradient(circle at 50% 0%, rgba(124,92,252,0.20), transparent 34%),
            linear-gradient(180deg, rgba(12,12,24,0.72), rgba(6,6,14,0.56));
        border-color: rgba(255,255,255,0.14);
        border-left: 0;
        box-shadow:
            12px 0 34px rgba(0,0,0,0.36),
            inset -1px 0 0 rgba(255,255,255,0.08);
        backdrop-filter: blur(22px) saturate(1.16);
        -webkit-backdrop-filter: blur(22px) saturate(1.16);
    }
    .stage.stage-bg ~ .page .sidebar::before,
    .stage.fading ~ .page .sidebar::before,
    .stage.flyaway ~ .page .sidebar::before {
        background: rgba(6,6,14,0.34);
    }
    .stage.stage-bg ~ .page .sidebar::after,
    .stage.fading ~ .page .sidebar::after,
    .stage.flyaway ~ .page .sidebar::after {
        background: linear-gradient(
            to bottom,
            rgba(255,255,255,0.09) 0%,
            rgba(255,255,255,0.02) 42%,
            rgba(0,0,0,0.24) 100%
        );
    }
    [data-theme="light"] .stage.stage-bg ~ .page .sidebar,
    [data-theme="light"] .stage.fading ~ .page .sidebar,
    [data-theme="light"] .stage.flyaway ~ .page .sidebar {
        color: #1f2937;
        background:
            radial-gradient(circle at 50% 0%, rgba(124,92,252,0.14), transparent 34%),
            linear-gradient(180deg, rgba(255,255,255,0.82), rgba(248,250,252,0.66));
        border-color: rgba(15,23,42,0.10);
        border-left: 0;
        box-shadow:
            12px 0 32px rgba(15,23,42,0.13),
            inset -1px 0 0 rgba(255,255,255,0.74);
        backdrop-filter: blur(22px) saturate(1.12);
        -webkit-backdrop-filter: blur(22px) saturate(1.12);
    }
    [data-theme="light"] .stage.stage-bg ~ .page .sidebar::before,
    [data-theme="light"] .stage.fading ~ .page .sidebar::before,
    [data-theme="light"] .stage.flyaway ~ .page .sidebar::before {
        background: rgba(255,255,255,0.42);
    }
    [data-theme="light"] .stage.stage-bg ~ .page .sidebar::after,
    [data-theme="light"] .stage.fading ~ .page .sidebar::after,
    [data-theme="light"] .stage.flyaway ~ .page .sidebar::after {
        background: linear-gradient(
            to bottom,
            rgba(255,255,255,0.24) 0%,
            rgba(255,255,255,0.06) 42%,
            rgba(241,245,249,0.28) 100%
        );
    }
    [data-theme="light"] .sidebar-title {
        color: #111827;
        text-shadow: 0 1px 0 rgba(255,255,255,0.70);
    }
    [data-theme="light"] .sidebar-item {
        color: #334155;
    }
    [data-theme="light"] .sidebar-label {
        color: inherit;
        text-shadow: 0 1px 0 rgba(255,255,255,0.55);
    }
    [data-theme="light"] .sidebar-icon {
        background: rgba(255,255,255,0.62);
        border-color: rgba(15,23,42,0.08);
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.64);
    }
    [data-theme="light"] .sidebar-count {
        color: #475569;
        background: rgba(255,255,255,0.60);
        border-color: rgba(15,23,42,0.08);
    }
    [data-theme="light"] .sidebar-item:hover {
        color: #111827;
        background: rgba(255,255,255,0.52);
        border-color: rgba(15,23,42,0.09);
    }
    [data-theme="light"] .sidebar-item.active {
        color: #111827;
        background:
            linear-gradient(90deg, color-mix(in srgb, var(--cat-color, var(--accent)) 20%, rgba(255,255,255,0.74)), rgba(255,255,255,0.50));
        border-color: color-mix(in srgb, var(--cat-color, var(--accent)) 26%, rgba(15,23,42,0.10));
    }
    [data-theme="light"] .sidebar-item:hover .sidebar-count,
    [data-theme="light"] .sidebar-item.active .sidebar-count {
        color: #0f172a;
        background: color-mix(in srgb, var(--cat-color, var(--accent)) 18%, rgba(255,255,255,0.70));
        border-color: color-mix(in srgb, var(--cat-color, var(--accent)) 24%, rgba(15,23,42,0.10));
    }
    .sidebar.open {
        transform: translate3d(0, 0, 0);
    }
    /* 侧栏打开时隐藏顶栏和浮动按钮 */
    .mobile-topbar.sidebar-open,
    .mobile-topbar.sidebar-open ~ .floating-actions {
        opacity: 0 !important;
        pointer-events: none !important;
        transition: opacity 0.2s ease;
    }

    /* 移动端固定顶栏（透明容器，不连接子元素） */
    .mobile-topbar {
        display: flex;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        right: auto;
        z-index: 150;
        padding: 10px 14px;
        gap: 10px;
        pointer-events: none;
    }
    .mobile-topbar > * {
        pointer-events: auto;
    }

    /* 侧栏切换按钮：独立圆形，不再 fixed */
    .sidebar-toggle {
        display: flex;
        position: static;
        flex-shrink: 0;
    }

    /* 浮动按钮对齐：与 topbar 内容垂直居中 */
    .floating-actions {
        top: 8px;
    }

    .layout {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .card-name { font-size: 12px; }
    .card-body { padding: 10px 8px; }
    .card-desc { display: none; }
    .tag { font-size: 9px; padding: 1px 5px; }
    .card-icon { width: 32px; height: 32px; font-size: 16px; }
    .card-icon .iconfont { font-size: 14px; }

    .section-head h2 { font-size: 14px; }
    .section-tag { width: 22px; height: 22px; font-size: 14px; }
    .section-count { font-size: 11px; }

    .mobile-topbar { padding: 8px 10px; gap: 8px; }
    .sidebar {
        width: min(72vw, 278px);
        border-radius: 0 12px 12px 0;
    }
    .sidebar-brand {
        padding: 16px 12px 14px;
    }
    .sidebar-logo {
        width: 62px;
        height: 62px;
    }
    .sidebar-nav {
        padding: 10px 8px 0;
        gap: 4px;
    }
    .sidebar-item {
        min-height: 40px;
        padding: 7px 8px;
        border-radius: 9px;
    }
    .sidebar-icon {
        width: 28px;
        height: 28px;
        border-radius: 8px;
    }
    .sidebar-toggle { width: 34px; height: 34px; }
    .floating-actions { gap: 1px; padding: 3px; top: 7px; right: 10px; }
    .fab-btn { width: 30px; height: 30px; }
    .bottom-actions { bottom: 20px; right: 16px; gap: 8px; }
    .bottom-fab { width: 38px; height: 38px; }

    #particles { display: none; }
}

/* 减弱动画偏好 */
@media (prefers-reduced-motion: reduce) {
    .stage-row { animation-duration: 0s !important; }
    .card.in-view { animation: none; opacity: 1; transform: none; }
    .splash { transition-duration: 0.1s; }
    .page { transition-duration: 0.1s; }
}

/* ======================================
   通用弹窗
   ====================================== */
.nav-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: max(clamp(14px, 4vw, 32px), env(safe-area-inset-top)) max(clamp(14px, 4vw, 32px), env(safe-area-inset-right)) max(clamp(14px, 4vw, 32px), env(safe-area-inset-bottom)) max(clamp(14px, 4vw, 32px), env(safe-area-inset-left));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}
.nav-modal-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--shell-scrim);
    backdrop-filter: var(--shell-blur);
    -webkit-backdrop-filter: var(--shell-blur);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.nav-modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
}
.nav-modal-overlay.active::before {
    opacity: 1;
}
.nav-modal-overlay.closing {
    opacity: 0;
    visibility: visible;
    pointer-events: none;
    transition: opacity 0.16s ease-in, visibility 0s linear 0.16s;
}
.nav-modal-overlay.closing::before {
    opacity: 0;
    transition-duration: 0.16s;
}
/* ---- 弹窗卡片 ---- */
.nav-modal {
    background: var(--shell-bg-strong);
    border: 0;
    border-radius: 16px;
    padding: 0;
    min-height: 0;
    width: min(100%, clamp(330px, 36vw, 420px));
    max-width: 100%;
    max-height: calc(100vh - clamp(28px, 8vw, 64px));
    max-height: calc(100dvh - clamp(28px, 8vw, 64px));
    margin: auto;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    text-align: center;
    box-shadow:
        var(--shell-shadow),
        0 24px 64px rgba(0,0,0,0.20);
    transform: translate3d(0, 18px, 0) scale(0.98);
    transition: transform 0.24s var(--ease), opacity 0.2s ease-out;
    opacity: 0;
    position: relative;
    backdrop-filter: var(--shell-blur);
    -webkit-backdrop-filter: var(--shell-blur);
    will-change: transform, opacity;
}
.nav-modal:focus,
.nav-modal:focus-visible,
.home-page .nav-modal:focus-visible { outline: none !important; }
[data-theme="light"] .nav-modal {
    box-shadow:
        var(--shell-shadow),
        0 22px 56px rgba(15,23,42,0.11);
}
.nav-modal::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    border-radius: inherit;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.13), transparent 34%),
        linear-gradient(315deg, rgba(255,255,255,0.035), transparent 46%);
}
[data-theme="light"] .nav-modal::before {
    background:
        linear-gradient(135deg, rgba(255,255,255,0.30), transparent 34%),
        linear-gradient(315deg, rgba(15,23,42,0.025), transparent 46%);
}
.nav-modal-overlay.active .nav-modal {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
}
/* 关闭动画：缩小+下移 */
.nav-modal-overlay.closing .nav-modal {
    transform: translate3d(0, 10px, 0) scale(0.985);
    opacity: 0;
    transition: transform 0.16s ease-in, opacity 0.14s ease-in;
}

/* ---- 极光光晕层（覆盖整个弹窗） ---- */
.nav-modal-header {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 0, color-mix(in srgb, var(--modal-accent, var(--accent)) 18%, transparent), transparent 58%),
        linear-gradient(180deg, rgba(255,255,255,0.045), transparent 44%);
}
.nav-modal-header::before,
.nav-modal-header::after { display: none; }

/* ---- 关闭按钮 ---- */
.nav-modal-close {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.08);
    background-clip: content-box;
    border: 0;
    color: rgba(255,255,255,0.62);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s, transform 0.15s;
    z-index: 4;
}
.nav-modal-close:hover {
    background: color-mix(in srgb, var(--modal-accent, var(--accent)) 24%, rgba(255,255,255,0.12));
    color: #fff;
    transform: scale(1.04);
}
.nav-modal-close:active { transform: scale(0.96); }
.nav-modal-close:focus-visible,
.nav-modal-btn:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--modal-accent, var(--accent)) 68%, white) !important;
    outline-offset: 2px !important;
}
[data-theme="light"] .nav-modal-close {
    background: rgba(0,0,0,0.06);
    color: var(--text-3);
}
[data-theme="light"] .nav-modal-close:hover {
    background: rgba(0,0,0,0.12);
    color: var(--text-1);
}

/* ---- 图标 ---- */
.nav-modal-icon {
    position: relative;
    z-index: 2;
    width: 52px;
    height: 52px;
    margin: 30px auto 14px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    pointer-events: none;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
.nav-modal-icon::after {
    display: none;
}
.nav-modal-icon img {
    width: 52px !important;
    height: 52px !important;
    border-radius: 10px !important;
    object-fit: cover !important;
    object-position: center;
    box-shadow: 0 10px 26px color-mix(in srgb, var(--modal-accent, var(--accent)) 18%, rgba(0,0,0,0.26));
    filter: saturate(1.08) contrast(1.04);
    transform: none;
}
.nav-modal-icon .iconfont {
    font-size: 48px !important;
    opacity: 0.92;
    transform: none;
}

/* ---- 标题 ---- */
.nav-modal-title {
    position: relative;
    z-index: 2;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-1);
    margin: 0 clamp(22px, 7vw, 36px) 6px;
    letter-spacing: -0.45px;
    line-height: 1.25;
}

/* ---- 描述 ---- */
.nav-modal-desc {
    position: relative;
    z-index: 2;
    font-size: 13px;
    color: var(--text-2);
    margin: 0 clamp(22px, 7vw, 36px) 14px;
    line-height: 1.5;
}

/* ---- URL 胶囊 ---- */
.nav-modal-url {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: flex-start;
    gap: 6px;
    background: var(--shell-item);
    border: 0;
    border-radius: 20px;
    padding: 6px 14px 6px 10px;
    font-size: 12px;
    color: var(--text-3);
    margin: 0 auto 18px;
    max-width: calc(100% - clamp(32px, 10vw, 64px));
    min-width: 0;
    overflow: hidden;
    white-space: normal;
    text-align: left;
    overflow-wrap: anywhere;
}
[data-theme="light"] .nav-modal-url {
    background: var(--shell-item);
}
.nav-modal-url svg {
    flex-shrink: 0;
    opacity: 0.5;
}
.nav-modal-url .url-domain {
    color: var(--text-2);
    font-weight: 500;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* ---- 操作按钮 ---- */
.nav-modal-actions {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 0 clamp(18px, 6vw, 28px) clamp(20px, 5vw, 28px);
}
.nav-modal-btn {
    flex: 1;
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
    transition: transform 0.14s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.nav-modal-btn::before {
    display: none;
}
.nav-modal-btn:hover {
    transform: translateY(-1px);
}
.nav-modal-btn:active {
    transform: translateY(0) scale(0.97);
}
.nav-modal-btn.primary {
    background: color-mix(in srgb, var(--modal-accent, var(--accent, #7c5cfc)) 86%, #fff 14%);
    color: #fff;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--modal-accent, var(--accent)) 18%, transparent);
}
.nav-modal-btn.primary:hover {
    background: color-mix(in srgb, var(--modal-accent, var(--accent)) 88%, #fff 12%);
}
.nav-modal-btn.secondary {
    background: var(--shell-item);
    color: var(--text-2);
    border: 0;
}
.nav-modal-btn.secondary:hover {
    background: var(--shell-item-hover);
    color: var(--text-1);
}
[data-theme="light"] .nav-modal-btn.secondary {
    background: var(--shell-item);
}
/* 复制成功反馈 */
.nav-modal-btn.copied {
    background: rgba(74,222,128,0.15) !important;
    color: #4ade80 !important;
    border-color: rgba(74,222,128,0.3) !important;
    transform: none !important;
    pointer-events: none;
    transition: all 0.3s;
}
/* 按钮图标旋入动画 */
.nav-modal-btn svg {
    transition: none;
}
.nav-modal-btn.copied svg {
    animation: btnCheckPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes btnCheckPop {
    0%   { transform: scale(0) rotate(-45deg); }
    100% { transform: scale(1) rotate(0); }
}

@media (max-width: 640px) {
    .nav-modal-overlay {
        align-items: center;
        padding: 18px;
    }
    .nav-modal {
        width: min(88vw, 360px);
        border-radius: 12px;
    }
    .nav-modal-close {
        top: 5px;
        right: 5px;
        width: 44px;
        height: 44px;
    }
    .nav-modal-icon {
        width: 46px;
        height: 46px;
        margin-top: 26px;
        margin-bottom: 12px;
    }
    .nav-modal-icon img {
        width: 46px !important;
        height: 46px !important;
        border-radius: 9px !important;
    }
    .nav-modal-title {
        font-size: 18px;
        margin-left: 20px;
        margin-right: 20px;
    }
    .nav-modal-desc {
        font-size: 13px;
        margin-left: 20px;
        margin-right: 20px;
        margin-bottom: 12px;
    }
    .nav-modal-url {
        max-width: calc(100% - 36px);
        margin-bottom: 16px;
        padding: 5px 11px 5px 9px;
        font-size: 12px;
    }
    .nav-modal-actions {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
        padding: 0 18px 20px;
    }
    .nav-modal-btn {
        width: auto;
        min-width: 0;
        padding: 10px 6px;
        border-radius: 9px;
        font-size: 13px;
        gap: 5px;
    }
    .nav-modal-btn svg {
        width: 13px;
        height: 13px;
    }
}

@media (max-width: 360px) {
    .nav-modal-overlay {
        padding: 14px;
    }
    .nav-modal {
        width: min(88vw, 330px);
    }
    .nav-modal-actions {
        gap: 6px;
        padding-left: 14px;
        padding-right: 14px;
    }
    .nav-modal-btn {
        font-size: 12.5px;
        padding-left: 4px;
        padding-right: 4px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nav-modal-overlay,
    .nav-modal-overlay::before,
    .nav-modal {
        transition-duration: 1ms !important;
        transition-delay: 0s !important;
    }
    .nav-modal,
    .nav-modal-overlay.active .nav-modal,
    .nav-modal-overlay.closing .nav-modal {
        transform: none !important;
    }
}
/* ======================================
   Toast 通知
   ====================================== */
.nav-toast {
    position: fixed;
    bottom: 32px;
    right: 24px;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 260px;
    max-width: 400px;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow:
        0 12px 40px rgba(0,0,0,0.25),
        0 0 0 1px rgba(255,255,255,0.04) inset;
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    opacity: 0;
    transform: translateX(20px) scale(0.95);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    overflow: hidden;
}
[data-theme="light"] .nav-toast {
    box-shadow:
        0 12px 40px rgba(0,0,0,0.1),
        0 0 0 1px rgba(0,0,0,0.04) inset;
}
.nav-toast.show {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}
.nav-toast.hiding {
    opacity: 0;
    transform: translateX(20px) scale(0.95);
    transition: all 0.3s ease-in;
}

/* ---- 图标 ---- */
.nav-toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.nav-toast-success .nav-toast-icon { background: rgba(74,222,128,0.12); color: #4ade80; }
.nav-toast-error .nav-toast-icon   { background: rgba(248,81,73,0.12); color: #f85149; }
.nav-toast-info .nav-toast-icon    { background: rgba(96,165,250,0.12); color: #60a5fa; }
.nav-toast-warning .nav-toast-icon { background: rgba(251,191,36,0.12); color: #fbbf24; }

/* ---- 文本 ---- */
.nav-toast-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-1);
    line-height: 1.4;
}

/* ---- 响应式 ---- */
@media (max-width: 480px) {
    .nav-modal-overlay {
        align-items: center;
        padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    }
    .nav-modal {
        width: min(88vw, 360px);
        max-width: 360px;
        border-radius: 12px;
        transform: translate3d(0, 18px, 0) scale(0.98);
    }
    .nav-modal-icon {
        margin-top: 22px;
        margin-bottom: 10px;
    }
    .nav-modal-icon img {
        width: 40px !important;
        height: 40px !important;
    }
    .nav-modal-title {
        margin-inline: 20px;
        font-size: 17px;
    }
    .nav-modal-desc {
        margin-inline: 20px;
    }
    .nav-modal-url {
        max-width: calc(100% - 40px);
        margin-bottom: 14px;
    }
    .nav-modal-actions {
        padding: 0 16px 16px;
        gap: 8px;
    }
    .nav-modal-btn {
        min-height: 44px;
    }
    .nav-toast {
        right: 12px;
        left: 12px;
        bottom: 16px;
        min-width: 0;
        max-width: none;
    }
}

/* Final homepage restore overrides. Keep after legacy rules. */
@media (min-width: 769px) {
    .layout { display: block; min-height: 100vh; }
    .main-area { margin-left: 74px; min-height: 100vh; overflow: visible; position: relative; isolation: isolate; }
    .main-area::before {
        content: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 430px;
        bottom: 0;
        z-index: 0;
        pointer-events: none;
        background: var(--page-mask);
    }
    .main-area::after {
        content: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 430px;
        bottom: 0;
        z-index: 0;
        pointer-events: none;
        background: transparent;
    }
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 74px;
        height: 100vh;
        z-index: 90;
        padding: 14px 0;
        border-right: 1px solid rgba(255,255,255,0.08);
        background: linear-gradient(180deg, rgba(18,18,32,0.86), rgba(8,8,18,0.62)), rgba(8,8,18,0.66);
        box-shadow: 12px 0 34px rgba(0,0,0,0.34), inset -1px 0 0 rgba(255,255,255,0.04);
        backdrop-filter: blur(22px) saturate(1.14);
        -webkit-backdrop-filter: blur(22px) saturate(1.14);
        transition: width 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
    }
    .stage.stage-bg ~ .page .sidebar,
    .stage.fading ~ .page .sidebar,
    .stage.flyaway ~ .page .sidebar {
        background: linear-gradient(180deg, rgba(18,18,32,0.86), rgba(8,8,18,0.62)), rgba(8,8,18,0.66);
    }
    .sidebar::before,
    .sidebar::after,
    .sidebar-brand::after,
    .sidebar-title,
    .sidebar-label,
    .sidebar-count,
    .sidebar-footer { display: none; }
    .sidebar-brand {
        width: 100%;
        padding: 0 0 18px;
        border: 0;
        background: transparent;
        color: inherit;
        gap: 0;
        font: inherit;
        text-align: center;
        cursor: pointer;
    }
    .sidebar-logo {
        width: 42px;
        height: 42px;
        border-radius: 13px;
        box-shadow: 0 10px 24px rgba(0,0,0,0.32), 0 0 0 1px rgba(255,255,255,0.10);
    }
    .sidebar-logo-fallback svg { width: 28px; height: 28px; }
    .sidebar-nav {
        flex: 0 0 auto;
        align-items: center;
        gap: 14px;
        padding: 8px 0 0;
        overflow: visible;
        mask-image: none;
        -webkit-mask-image: none;
    }
    .sidebar-item {
        width: 42px;
        height: 42px;
        min-height: 42px;
        padding: 0;
        justify-content: center;
        border-radius: 12px;
        background: rgba(255,255,255,0.045);
        border-color: rgba(255,255,255,0.075);
        transform: none;
    }
    .sidebar-item:hover { transform: translateY(-1px); background: rgba(255,255,255,0.08); }
    .sidebar-item::before {
        left: -12px;
        width: 4px;
        height: 22px;
        border-radius: 0 999px 999px 0;
    }
    .sidebar-item::after { background: color-mix(in srgb, var(--cat-color, var(--accent)) 18%, transparent); }
    .sidebar-icon {
        width: 28px;
        height: 28px;
        border: 0;
        background: transparent;
        border-radius: 8px;
        font-size: 17px;
    }
    .sidebar-icon img { width: 24px; height: 24px; border-radius: 8px; }
    .sidebar-icon .iconfont { font-size: 18px; }
    .sidebar.open {
        width: 226px;
        align-items: stretch;
        z-index: 260;
        padding-inline: 10px;
        border-radius: 0 16px 16px 0;
        background:
            radial-gradient(circle at 42px 30px, rgba(59,130,246,0.16), transparent 46%),
            linear-gradient(180deg, rgba(14,18,32,0.80), rgba(9,13,25,0.66)) !important;
        border-color: rgba(255,255,255,0.14);
        box-shadow: 18px 0 50px rgba(0,0,0,0.34), inset -1px 0 0 rgba(255,255,255,0.08);
        backdrop-filter: blur(26px) saturate(1.18);
        -webkit-backdrop-filter: blur(26px) saturate(1.18);
    }
    .sidebar.open .sidebar-brand { justify-content: flex-start; gap: 10px; padding: 0 0 18px; }
    .sidebar.open .sidebar-title,
    .sidebar.open .sidebar-label,
    .sidebar.open .sidebar-count,
    .sidebar.open .sidebar-footer { display: block; }
    .sidebar.open .sidebar-nav { align-items: stretch; gap: 8px; flex: 1 1 auto; min-height: 0; }
    .sidebar.open .sidebar-item {
        width: auto;
        justify-content: flex-start;
        gap: 10px;
        padding: 0 10px;
    }
    .sidebar.open .sidebar-count { margin-left: auto; }

    .hero {
        height: 390px;
        min-height: 390px;
        background: #05050d;
    }
    .hero::before {
        background: var(--hero-mask);
    }
    .hero-overlay { max-width: 660px; padding: 66px 24px 42px; gap: 9px; }
    .hero-clock-main { font-size: 62px; font-weight: 520; text-shadow: 0 4px 24px rgba(0,0,0,0.42); }
    .hero-search-anchor { height: 58px; margin-top: 3px; }
    .hero-search {
        --search-width: 560px;
        min-height: 58px;
        padding: 10px 14px 10px 18px;
        gap: 10px;
        border-radius: 18px;
        background: rgba(55,28,11,0.48);
        border-color: rgba(255,255,255,0.12);
        box-shadow: 0 16px 44px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.07);
    }
    .hero-search:focus-within { background: rgba(55,28,11,0.58); }
    .hero-search-engine,
    .hero-search-submit {
        height: 34px;
        border: 1px solid rgba(255,255,255,0.10);
        background: rgba(255,255,255,0.065);
        color: rgba(255,255,255,0.82);
        border-radius: 9px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background 0.18s ease, border-color 0.18s ease;
    }
    .hero-search-engine { gap: 7px; padding: 0 10px; font-size: 12px; flex-shrink: 0; }
    .engine-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #3b82f6;
        box-shadow: 0 0 12px rgba(59,130,246,0.72);
    }
    .hero-search-submit { width: 36px; flex-shrink: 0; }
    .hero-search-engine:hover,
    .hero-search-submit:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.18); }
    .hero-engine-menu {
        position: absolute;
        left: 18px;
        top: calc(100% + 8px);
        bottom: auto;
        z-index: 721;
        display: none;
        min-width: 100px;
        padding: 6px;
        border-radius: 12px;
        background: rgba(15,16,28,0.96);
        border: 1px solid rgba(255,255,255,0.16);
        box-shadow: 0 18px 42px rgba(0,0,0,0.28);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }
    .hero-search.engine-open .hero-engine-menu { display: grid; gap: 4px; }
    .hero-engine-menu button {
        border: 0;
        border-radius: 8px;
        padding: 7px 8px;
        background: transparent;
        color: rgba(255,255,255,0.78);
        text-align: left;
        cursor: pointer;
    }
    .hero-engine-menu button:hover { background: rgba(255,255,255,0.08); color: #fff; }
    .hero-quick-cats {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        margin-top: 9px;
    }
    .hero-cat-chip {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        min-height: 32px;
        padding: 6px 13px;
        border-radius: 999px;
        color: rgba(255,255,255,0.86);
        background:
            linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.045)),
            color-mix(in srgb, var(--cat-color, var(--accent)) 24%, rgba(14,16,28,0.36));
        border: 1px solid color-mix(in srgb, var(--cat-color, var(--accent)) 56%, rgba(255,255,255,0.16));
        box-shadow: 0 12px 28px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.18);
        backdrop-filter: blur(14px) saturate(1.14);
        -webkit-backdrop-filter: blur(14px) saturate(1.14);
        font-size: 12px;
        font-weight: 650;
    }
    .hero-cat-chip span {
        width: 18px;
        height: 18px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        color: color-mix(in srgb, var(--cat-color, var(--accent)) 82%, #fff);
        background: color-mix(in srgb, var(--cat-color, var(--accent)) 22%, rgba(255,255,255,0.08));
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
    }
    .hero-cat-chip:first-child {
        background:
            linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.055)),
            color-mix(in srgb, var(--cat-color, var(--accent)) 34%, rgba(14,16,28,0.38));
    }
    .hero-motto {
        margin: 2px 0 0;
        color: rgba(255,255,255,0.63);
        font-size: 12px;
        text-shadow: 0 2px 12px rgba(0,0,0,0.36);
    }

    .home-hot,
    .home-body {
        width: calc(100% - clamp(64px, 14.4vw, 276px));
        max-width: 1560px;
        margin-left: auto;
        margin-right: auto;
    }
    .home-hot {
        position: relative;
        z-index: 12;
        height: 120px;
        min-height: 0;
        margin-top: -60px;
        margin-bottom: 112px;
        padding: 17px 14px 9px;
        border-radius: 12px;
        background:
            linear-gradient(90deg, rgba(34,35,52,0.72), rgba(29,30,46,0.66) 48%, rgba(31,33,49,0.72)),
            rgba(18,18,30,0.66);
        border: 1px solid rgba(255,255,255,0.11);
        box-shadow:
            0 22px 58px rgba(0,0,0,0.32),
            0 -14px 34px rgba(0,0,0,0.18),
            inset 0 1px 0 rgba(255,255,255,0.07);
        backdrop-filter: blur(28px) saturate(1.18);
        -webkit-backdrop-filter: blur(28px) saturate(1.18);
    }
    .home-hot-head,
    .home-aside-title {
        display: flex;
        align-items: center;
        gap: 8px;
        height: 24px;
        color: rgba(255,255,255,0.92);
        font-size: 13px;
    }
    .home-hot-dot {
        width: 10px;
        height: 12px;
        border-radius: 10px 10px 10px 2px;
        background: linear-gradient(135deg, #ff2d55 10%, #fb7185 58%, #fbbf24 100%);
        box-shadow: 0 0 14px rgba(255,45,85,0.62);
        transform: rotate(-45deg);
        position: relative;
        flex: 0 0 auto;
    }
    .home-hot-dot::after {
        content: '';
        position: absolute;
        right: 2px;
        bottom: 2px;
        width: 4px;
        height: 5px;
        border-radius: 999px 999px 999px 2px;
        background: rgba(255,255,255,0.72);
    }
    .home-aside-title span {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #fb7185;
        box-shadow: 0 0 14px rgba(251,113,133,0.58);
    }
    .home-hot-count {
        position: absolute;
        top: 18px;
        right: 16px;
        color: rgba(255,255,255,0.28);
        font-size: 12px;
    }
    .home-hot-list {
        display: grid;
        grid-template-columns: repeat(8, minmax(0, 1fr));
        gap: 12px;
        margin-top: 9px;
        cursor: grab;
        user-select: none;
        touch-action: pan-x;
    }
    .home-hot-list.is-dragging {
        cursor: grabbing;
        scroll-snap-type: none;
    }
    .home-hot-list.is-dragging .home-hot-card {
        pointer-events: none;
    }
    .home-hot-card {
        min-width: 0;
        height: 58px;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 11px;
        border-radius: 9px;
        color: rgba(255,255,255,0.78);
        background: rgba(255,255,255,0.06);
        border: 1px solid rgba(255,255,255,0.085);
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.055), 0 10px 24px rgba(0,0,0,0.09);
    }
    .home-hot-card:hover {
        background: color-mix(in srgb, var(--hot-color, #4ade80) 9%, rgba(255,255,255,0.085));
        border-color: color-mix(in srgb, var(--hot-color, #4ade80) 32%, rgba(255,255,255,0.12));
    }
    .home-hot-icon {
        width: 30px;
        height: 30px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        border-radius: 9px;
        overflow: hidden;
        background: color-mix(in srgb, var(--hot-color, #4ade80) 14%, rgba(255,255,255,0.08));
        box-shadow: 0 0 0 1px color-mix(in srgb, var(--hot-color, #4ade80) 18%, transparent);
    }
    .home-hot-icon img,
    .home-latest-item img { width: 100%; height: 100%; object-fit: cover; }
    .home-hot-text {
        min-width: 0;
        flex: 1;
        display: grid;
        gap: 2px;
    }
    .home-hot-text b,
    .home-latest-item b {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 12px;
        line-height: 1.25;
        color: rgba(255,255,255,0.92);
    }
    .home-hot-text small,
    .home-latest-item small {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: rgba(255,255,255,0.28);
        font-size: 12px;
    }
    .home-hot-card em {
        align-self: flex-start;
        color: color-mix(in srgb, var(--hot-color, #4ade80) 72%, rgba(255,255,255,0.34));
        font-size: 11px;
        font-style: normal;
        font-weight: 650;
    }

    .home-body {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 304px;
        gap: 28px;
        align-items: start;
        position: relative;
        z-index: 1;
    }
    .content {
        padding: 0 0 56px;
        margin: 0;
        background: transparent;
        border-radius: 0;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    .section { margin-bottom: 38px; }
    .section-head {
        width: 100%;
        max-width: none;
        min-height: 50px;
        margin-bottom: 14px;
        padding: 7px 10px 7px 7px;
        border-radius: 13px;
        background: transparent;
        border: 0;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    .section-head::before { display: none; }
    .section-head::after { display: none; }
    .section-tag,
    .section-info,
    .section-count { position: relative; z-index: 1; }
    .section-info { flex: 0 1 auto; }
    .section-tag {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        background: color-mix(in srgb, var(--cat-color, var(--accent)) 18%, rgba(255,255,255,0.08));
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 0 0 1px color-mix(in srgb, var(--cat-color, var(--accent)) 20%, transparent);
    }
    .section-head h2 { font-size: 18px; }
    .section-count {
        margin-left: auto;
        background: color-mix(in srgb, var(--cat-color, var(--accent)) 10%, rgba(255,255,255,0.055));
        border-color: color-mix(in srgb, var(--cat-color, var(--accent)) 20%, rgba(255,255,255,0.06));
        color: color-mix(in srgb, var(--cat-color, var(--accent)) 56%, rgba(255,255,255,0.54));
    }
    .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
    .card-body {
        min-height: 74px;
        padding: 12px 14px;
        background: rgba(22,23,36,0.56);
        border-color: rgba(255,255,255,0.092);
        border-radius: 10px;
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.055), 0 12px 28px rgba(0,0,0,0.12);
        backdrop-filter: blur(18px) saturate(1.08);
        -webkit-backdrop-filter: blur(18px) saturate(1.08);
    }
    .card:hover .card-body { background: rgba(35,36,52,0.66); }
    [data-theme="light"] .card-body {
        background: rgba(255,255,255,0.58);
        border-color: rgba(15,23,42,0.08);
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.62), 0 12px 28px rgba(15,23,42,0.08);
    }
    [data-theme="light"] .card:hover .card-body { background: rgba(255,255,255,0.72); }
    .card-icon { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,0.10); }

    .home-aside {
        position: sticky;
        top: 24px;
        display: grid;
        gap: 18px;
    }
    .home-aside-card {
        padding: 14px;
        border-radius: 14px;
        background: rgba(15,16,28,0.70);
        border: 1px solid rgba(255,255,255,0.095);
        box-shadow: 0 20px 46px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.055);
        backdrop-filter: blur(26px) saturate(1.14);
        -webkit-backdrop-filter: blur(26px) saturate(1.14);
    }
    .home-aside-title { justify-content: flex-start; margin-bottom: 12px; }
    .home-aside-title span { background: #5eead4; box-shadow: 0 0 14px rgba(94,234,212,0.58); }
    .home-latest .home-aside-title span { background: #60a5fa; box-shadow: 0 0 14px rgba(96,165,250,0.58); }
    .home-aside-title em {
        margin-left: auto;
        color: rgba(255,255,255,0.22);
        font-size: 10px;
        font-style: normal;
        letter-spacing: 0.6px;
    }
    .home-overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .home-overview-grid div {
        min-height: 72px;
        padding: 10px;
        border-radius: 10px;
        background: rgba(255,255,255,0.055);
        border: 1px solid rgba(255,255,255,0.08);
        display: grid;
        align-content: center;
        gap: 2px;
    }
    .home-overview-grid strong {
        color: rgba(255,255,255,0.92);
        font-size: 26px;
        line-height: 1;
        font-weight: 620;
    }
    .home-overview-grid span { color: rgba(255,255,255,0.30); font-size: 12px; }
    .home-latest { display: grid; gap: 10px; }
    .home-latest-item {
        min-width: 0;
        display: grid;
        grid-template-columns: 30px minmax(0, 1fr);
        column-gap: 10px;
        align-items: center;
        color: rgba(255,255,255,0.76);
    }
    .home-latest-item span {
        grid-row: span 2;
        width: 30px;
        height: 30px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        border-radius: 9px;
        background: rgba(255,255,255,0.08);
    }
    .content > .footer-inner { border-top: 0; padding-top: 0; }
}

@media (min-width: 769px) and (max-width: 1320px) {
    .home-hot,
    .home-body { width: calc(100% - 48px); }
    .home-hot {
        height: 120px;
        margin-top: -60px;
        margin-bottom: 112px;
    }
    .home-hot-list {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(230px, 260px);
        overflow-x: auto;
        scrollbar-width: none;
    }
    .home-hot-list::-webkit-scrollbar { display: none; }
    .home-body { grid-template-columns: minmax(0, 1fr); }
    .home-aside { display: none; }
}

@media (max-width: 768px) {
    .hero-search-engine,
    .hero-search-submit,
    .hero-engine-menu { display: none; }
    .hero-quick-cats {
        width: 100%;
        display: flex;
        gap: 7px;
        overflow-x: auto;
        padding: 0 16px 4px 2px;
        scroll-padding-inline: 16px;
        scrollbar-width: none;
    }
    .hero-quick-cats::-webkit-scrollbar { display: none; }
    .hero-cat-chip {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 5px 10px;
        border-radius: 999px;
        color: rgba(255,255,255,0.84);
        background: color-mix(in srgb, var(--cat-color, var(--accent)) 22%, rgba(255,255,255,0.10));
        border: 1px solid color-mix(in srgb, var(--cat-color, var(--accent)) 38%, rgba(255,255,255,0.12));
        font-size: 11px;
        white-space: nowrap;
    }
    .hero-motto { margin: -2px 0 0; font-size: 11px; color: rgba(255,255,255,0.56); }
    .home-hot {
        min-height: 120px;
        margin: -60px 12px 36px;
        padding: 12px;
        border-radius: 14px;
        background: rgba(18,18,31,0.64);
        border: 1px solid rgba(255,255,255,0.08);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }
    .home-hot-head { display: flex; }
    .home-hot-count {
        display: block;
        top: 14px;
        right: 14px;
        font-size: 11px;
    }
    .home-hot-list {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(260px, 86vw);
        gap: 10px;
        overflow-x: auto;
        padding-right: 12px;
        scroll-padding-inline: 12px;
        scrollbar-width: none;
    }
    .home-hot-list::-webkit-scrollbar { display: none; }
    .home-hot-card {
        min-width: 0;
        height: 64px;
        display: flex;
        align-items: center;
        gap: 9px;
        padding: 10px;
        border-radius: 10px;
        background: rgba(255,255,255,0.055);
        border: 1px solid rgba(255,255,255,0.08);
    }
    .home-hot-icon {
        width: 30px;
        height: 30px;
        border-radius: 9px;
        overflow: hidden;
        flex-shrink: 0;
    }
    .home-hot-text { min-width: 0; display: grid; }
    .home-hot-text b {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 12px;
    }
    .home-hot-text small {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 11px;
        color: rgba(255,255,255,0.34);
    }
    .home-hot-card em {
        display: block;
        align-self: flex-start;
        flex-shrink: 0;
        font-size: 11px;
        font-style: normal;
        font-weight: 650;
        color: color-mix(in srgb, var(--hot-color, #4ade80) 72%, rgba(255,255,255,0.34));
    }
    .home-body { display: block; }
    .home-aside { display: none; }
}

/* Hot strip responsive parity overrides. */
.home-hot {
    --home-hot-height: 120px;
    --home-hot-overlap: 60px;
}

@media (min-width: 769px) {
    .home-hot {
        height: auto !important;
        min-height: var(--home-hot-height) !important;
        margin-top: calc(var(--home-hot-overlap) * -1) !important;
        margin-bottom: clamp(30px, 2.2vw, 42px) !important;
        padding: 12px 14px 10px !important;
        background:
            linear-gradient(90deg, rgba(34,35,52,0.68), rgba(29,30,46,0.58) 48%, rgba(31,33,49,0.68)),
            rgba(18,18,30,0.58) !important;
        border-color: rgba(255,255,255,0.10) !important;
        box-shadow: 0 20px 54px rgba(0,0,0,0.30), inset 0 1px 0 rgba(255,255,255,0.065) !important;
        backdrop-filter: blur(28px) saturate(1.16) !important;
        -webkit-backdrop-filter: blur(28px) saturate(1.16) !important;
    }
    .home-hot-head {
        height: 20px !important;
        font-size: 12px !important;
    }
    .home-hot-count {
        top: 12px !important;
        right: 14px !important;
        font-size: 11px !important;
    }
    .home-hot-list {
        align-items: stretch;
        margin-top: 8px !important;
    }
    .home-hot-card {
        height: auto !important;
        min-height: 58px !important;
        display: grid !important;
        grid-template-columns: 30px minmax(0, 1fr) minmax(34px, auto);
        align-items: center;
        column-gap: 9px;
        padding: 8px 9px !important;
    }
    .home-hot-icon {
        width: 28px !important;
        height: 28px !important;
        border-radius: 8px !important;
    }
}

@media (min-width: 1321px) {
    .home-hot-list {
        grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 769px) and (max-width: 1320px) {
    .home-hot,
    .home-body {
        width: calc(100% - 48px) !important;
    }
    .home-hot {
        --home-hot-height: 120px;
        --home-hot-overlap: 60px;
    }
    .home-hot-list {
        grid-template-columns: none !important;
        grid-auto-flow: column;
        grid-auto-columns: minmax(190px, 216px);
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
    }
    .home-hot-list::-webkit-scrollbar {
        display: none;
    }
}

.home-hot-text {
    gap: 2px;
    align-self: stretch;
    align-content: center;
}
.home-hot-text b {
    letter-spacing: 0;
}
.home-hot-category,
.home-hot-desc {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.home-hot-desc {
    color: rgba(255,255,255,0.42);
    font-size: 10.5px;
    line-height: 1.25;
}
.home-hot-clicks {
    display: flex;
    align-self: start;
    justify-self: end;
    min-width: 34px;
    justify-content: flex-end;
}
.home-hot-clicks em,
.home-hot-card em {
    white-space: nowrap;
}

.hero-search.engine-open .hero-engine-menu {
    top: 50% !important;
    bottom: auto !important;
    left: 10px;
    min-width: min(220px, calc(100% - 20px));
    grid-template-columns: repeat(3, minmax(0, 1fr));
    transform: translateY(-50%);
}
.hero-search.engine-open .hero-engine-menu button {
    text-align: center;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .hero-search-engine,
    .hero-search-submit {
        display: inline-flex !important;
        height: 32px;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(255,255,255,0.12);
        border-radius: 9px;
        background: rgba(255,255,255,0.07);
        color: rgba(255,255,255,0.84);
        font: inherit;
        font-size: 11px;
        line-height: 1;
        cursor: pointer;
        -webkit-appearance: none;
        appearance: none;
    }
    .hero-engine-menu {
        display: none;
        position: absolute;
        left: 10px;
        top: calc(100% + 8px);
        bottom: auto;
        z-index: 721;
        min-width: 92px;
        padding: 6px;
        border-radius: 12px;
        background: rgba(18,18,30,0.94);
        border: 1px solid rgba(255,255,255,0.12);
        box-shadow: 0 18px 42px rgba(0,0,0,0.28);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }
    .hero-search.engine-open .hero-engine-menu {
        display: grid !important;
        gap: 4px;
    }
    .hero-engine-menu button {
        border: 0;
        border-radius: 8px;
        padding: 7px 8px;
        background: transparent;
        color: rgba(255,255,255,0.78);
        text-align: left;
        cursor: pointer;
        font: inherit;
        font-size: 12px;
    }
    .hero-engine-menu button:hover {
        background: rgba(255,255,255,0.08);
        color: #fff;
    }
    .engine-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #3b82f6;
        box-shadow: 0 0 12px rgba(59,130,246,0.72);
        flex: 0 0 auto;
    }
    .hero-search {
        gap: 7px;
        padding-inline: 10px;
    }
    .hero-search-engine {
        gap: 6px;
        max-width: 72px;
        padding: 0 8px;
        flex: 0 0 auto;
    }
    .hero-search-submit {
        width: 34px;
        flex: 0 0 auto;
    }
    .home-hot {
        min-height: 120px !important;
        margin-top: 0 !important;
        margin-bottom: 32px !important;
        padding: 10px !important;
    }
    .home-hot-list {
        grid-auto-columns: clamp(168px, 40vw, 206px) !important;
        margin-top: 8px;
    }
    .home-hot-card {
        height: auto !important;
        min-height: 58px !important;
        display: grid !important;
        grid-template-columns: 30px minmax(0, 1fr) minmax(34px, auto);
        align-items: center;
        column-gap: 10px;
        padding: 8px 9px !important;
    }
}

@media (max-width: 480px) {
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .card-body {
        min-height: 82px;
        padding: 12px 10px;
    }
    .card-desc {
        display: -webkit-box !important;
        white-space: normal;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    .hero-search-anchor {
        padding-left: 40px;
    }
    .hero-search-engine {
        max-width: 64px;
    }
    .hero-search-engine svg,
    .hero-search-kbd {
        display: none;
    }
    .home-hot {
        margin-inline: 10px !important;
    }
    .home-hot-list {
        grid-auto-columns: clamp(156px, 46vw, 196px) !important;
    }
}

@media (max-width: 768px) {
    .main-area { margin-left: 0; overflow-x: hidden; }
    .hero {
        height: clamp(360px, 78vw, 430px);
        min-height: clamp(360px, 78vw, 430px);
    }
    .hero-overlay {
        padding: clamp(54px, 12vw, 68px) 16px clamp(58px, 12vw, 72px);
        gap: 9px;
    }
    .hero-clock-main { font-size: clamp(46px, 12vw, 62px); }
    .hero-search-anchor {
        height: 56px;
        justify-content: center;
        padding-left: 0;
    }
    .hero-search {
        --search-width: min(560px, calc(100vw - 32px));
        width: var(--search-width);
        max-width: calc(100vw - 32px);
        min-height: 54px;
        transform-origin: center center;
    }
    .hero-engine-menu {
        top: calc(100% + 8px);
        bottom: auto;
        z-index: 1001;
    }
    .hero-search.engine-open { z-index: 1000; }
    .search-engine-open .hero { overflow: visible; z-index: 80; }
    .search-engine-open .home-hot { z-index: 12; }
    .home-hot {
        width: calc(100% - 24px);
        max-width: none;
        min-height: 120px !important;
        margin: 0 12px 32px !important;
    }
    .home-hot-list {
        grid-template-columns: none !important;
        grid-auto-flow: column;
        grid-auto-columns: clamp(168px, 40vw, 206px) !important;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-inline: contain;
        scroll-snap-type: x proximity;
    }
    .home-hot-card { scroll-snap-align: start; }
    .home-body { width: 100%; max-width: none; display: block; }
    .content { width: 100%; max-width: 100%; padding-inline: 12px; }
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .section-head {
        align-items: center;
        padding-bottom: 8px;
        margin-bottom: 10px;
    }
    .section-count {
        align-self: center;
        margin-left: 6px;
        padding: 2px 7px;
        font-size: 10px;
        line-height: 1.4;
    }
    .sidebar-brand {
        background: transparent;
        box-shadow: none;
    }
    .sidebar-brand::after { opacity: 0; }
}

@media (max-width: 420px) {
    .home-hot-list { grid-auto-columns: clamp(156px, 46vw, 190px) !important; }
    .card-body { gap: 8px; }
    .card-icon { width: 30px; height: 30px; }
    .card-desc { display: none; }
}

/* Unified shell surfaces: sidebar, hot strip, search popover. */
.sidebar,
.home-hot,
.hero-search,
.hero-engine-menu,
.search-dialog,
.card-body {
    border-color: var(--shell-border) !important;
    background: var(--shell-bg) !important;
    box-shadow: var(--shell-shadow) !important;
    backdrop-filter: var(--shell-blur) !important;
    -webkit-backdrop-filter: var(--shell-blur) !important;
}
.sidebar.open,
.hero-search,
.hero-engine-menu,
.search-dialog {
    background: var(--shell-bg-strong) !important;
}
.sidebar::before,
.sidebar::after,
.sidebar-brand::after,
.sidebar .home-hot-dot::after {
    display: none !important;
}
.sidebar-brand {
    background: transparent !important;
    box-shadow: none !important;
    border-color: transparent !important;
}
.sidebar-title,
.sidebar-section-label,
.home-hot-text b {
    letter-spacing: 0 !important;
}
.sidebar-backdrop,
.search-backdrop {
    background: var(--shell-scrim) !important;
    backdrop-filter: var(--shell-blur) !important;
    -webkit-backdrop-filter: var(--shell-blur) !important;
}
.sidebar-item {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}
.sidebar-item:hover,
.sidebar-item.active {
    background: color-mix(in srgb, var(--cat-color, var(--accent)) 10%, var(--shell-card-hover)) !important;
    border-color: color-mix(in srgb, var(--cat-color, var(--accent)) 24%, var(--shell-border)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05) !important;
}
.sidebar-icon,
.sidebar-count {
    background: var(--shell-item) !important;
    border-color: var(--shell-border) !important;
}
.hero-search {
    min-height: 58px;
    gap: 12px !important;
    border-width: 1px !important;
}
.hero-search-icon,
.hero-search-input,
.hero-search-engine,
.hero-search-submit {
    color: var(--text-1) !important;
}
.hero-search-input::placeholder {
    color: var(--shell-muted) !important;
}
.hero-search:focus-within,
.hero-search.is-docked,
.hero-search.mobile-docked {
    background: var(--shell-bg-strong) !important;
    border-color: color-mix(in srgb, var(--accent) 30%, var(--shell-border)) !important;
    box-shadow: 0 10px 28px rgba(0,0,0,0.16), 0 0 0 2px color-mix(in srgb, var(--accent) 12%, transparent) !important;
}
.hero-search-engine,
.hero-search-submit,
.hero-search-kbd {
    background: var(--shell-item) !important;
    border-color: var(--shell-border) !important;
    color: var(--text-1) !important;
}
.hero-search-engine:hover,
.hero-search-submit:hover {
    background: var(--shell-item-hover) !important;
    border-color: color-mix(in srgb, var(--accent) 26%, var(--shell-border)) !important;
}
.home-hot {
    color: var(--text-1) !important;
    background:
        linear-gradient(90deg, rgba(22,24,38,0.56), rgba(44,37,47,0.38) 48%, rgba(22,24,38,0.52)),
        rgba(14,16,27,0.40) !important;
}
.content {
    position: relative;
    z-index: 4;
    isolation: isolate;
    padding: 0 16px 56px !important;
    border: 1px solid var(--shell-border);
    border-radius: 16px 16px 0 0;
    background:
        linear-gradient(180deg, rgba(21,23,34,0.44) 0%, rgba(12,14,24,0.34) 100%) !important;
    box-shadow: 0 18px 50px rgba(0,0,0,0.13), inset 0 1px 0 rgba(255,255,255,0.045);
    backdrop-filter: blur(14px) saturate(1.06);
    -webkit-backdrop-filter: blur(14px) saturate(1.06);
}
.home-hot-head {
    display: inline-flex !important;
    align-items: center;
    width: auto;
    height: 22px !important;
    gap: 7px;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: var(--text-1) !important;
    background: transparent;
    box-shadow: none;
    line-height: 1;
}
.home-hot-dot {
    width: 16px !important;
    height: 18px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
    position: relative;
}
.home-hot-dot::before {
    content: '';
    width: 13px;
    height: 15px;
    background: linear-gradient(180deg, #fecdd3 0%, #fb7185 42%, #e11d48 100%);
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12.2 22c-4.3 0-7.2-2.9-7.2-6.9 0-2.6 1.4-4.8 3.1-6.6.6-.7 1.3-1.3 1.9-2.1.7-.9 1.1-2 .9-3.4 2.8 1 5 3.4 5.3 6.4.8-.6 1.2-1.4 1.4-2.4 1.5 1.5 2.4 3.6 2.4 5.9 0 5.4-3.7 9.1-7.8 9.1Zm.2-3.2c1.6 0 2.8-1.2 2.8-2.8 0-1.2-.7-2.2-1.7-3-.3 1.2-1 2-2.1 2.6-.8.5-1.4 1.1-1.4 1.9 0 .8.8 1.3 2.4 1.3Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12.2 22c-4.3 0-7.2-2.9-7.2-6.9 0-2.6 1.4-4.8 3.1-6.6.6-.7 1.3-1.3 1.9-2.1.7-.9 1.1-2 .9-3.4 2.8 1 5 3.4 5.3 6.4.8-.6 1.2-1.4 1.4-2.4 1.5 1.5 2.4 3.6 2.4 5.9 0 5.4-3.7 9.1-7.8 9.1Zm.2-3.2c1.6 0 2.8-1.2 2.8-2.8 0-1.2-.7-2.2-1.7-3-.3 1.2-1 2-2.1 2.6-.8.5-1.4 1.1-1.4 1.9 0 .8.8 1.3 2.4 1.3Z'/%3E%3C/svg%3E") center / contain no-repeat;
    filter: drop-shadow(0 0 6px rgba(251,113,133,0.44));
}
.home-hot-dot::after {
    content: none;
}
.home-hot-head strong {
    font-size: 13px;
    font-weight: 780;
    color: var(--text-1) !important;
    text-shadow: none;
}
.home-hot-count,
.home-hot-desc,
.home-hot-text small {
    color: var(--shell-muted) !important;
}
.home-hot-count {
    top: 14px !important;
    right: 14px !important;
    min-height: 24px;
    padding: 4px 9px;
    border: 1px solid var(--shell-border);
    border-radius: 999px;
    background: var(--shell-item);
    line-height: 1.2;
}
.home-hot-card {
    background: var(--shell-card) !important;
    border-color: var(--shell-border) !important;
    color: var(--text-1) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.045), 0 4px 12px rgba(0,0,0,0.07) !important;
    transition: transform 0.2s var(--ease), background 0.2s ease, border-color 0.2s ease !important;
}
.home-hot-card:hover {
    background: color-mix(in srgb, var(--hot-color, var(--accent)) 8%, var(--shell-card-hover)) !important;
    border-color: color-mix(in srgb, var(--hot-color, var(--accent)) 28%, var(--shell-border)) !important;
    transform: translateY(-1px);
}
@media (min-width: 769px) {
    .home-hot-list {
        grid-template-columns: none !important;
        grid-auto-flow: column;
        grid-auto-columns: minmax(188px, 220px) !important;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-inline: contain;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }
    .home-hot-list::-webkit-scrollbar {
        display: none;
    }
    .home-hot-card {
        scroll-snap-align: start;
    }
}
.home-hot-icon {
    background: color-mix(in srgb, var(--hot-color, var(--accent)) 16%, var(--shell-item)) !important;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--hot-color, var(--accent)) 20%, transparent) !important;
}
.home-hot-text b {
    color: var(--text-1) !important;
}
.home-hot-clicks em,
.home-hot-card em {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 7px;
    border-radius: 999px;
    color: color-mix(in srgb, var(--hot-color, var(--accent)) 72%, var(--text-1)) !important;
    background: color-mix(in srgb, var(--hot-color, var(--accent)) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--hot-color, var(--accent)) 22%, transparent);
}
.hero-search.engine-open {
    z-index: 320 !important;
}
.hero-search.engine-open .hero-engine-menu {
    top: 7px !important;
    bottom: auto !important;
    left: 7px !important;
    z-index: 321 !important;
    transform: none !important;
}
.hero-engine-menu button {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 10px !important;
    color: var(--text-1) !important;
    white-space: nowrap;
}
.hero-engine-menu button::before,
.engine-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--engine-color, #2563eb) !important;
    box-shadow: 0 0 12px color-mix(in srgb, var(--engine-color, #2563eb) 70%, transparent) !important;
    flex: 0 0 auto;
}
.hero-engine-menu button::before {
    content: '';
}
.hero-engine-menu button.active {
    background: color-mix(in srgb, var(--engine-color, #2563eb) 14%, var(--shell-item)) !important;
}
.hero-engine-menu button:hover {
    background: color-mix(in srgb, var(--engine-color, #2563eb) 18%, var(--shell-item-hover)) !important;
    color: var(--text-1) !important;
}
.hero-engine-menu {
    display: none !important;
    grid-template-columns: repeat(4, auto) !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: calc(100% - 14px) !important;
    padding: 0 !important;
    border-radius: 11px !important;
    background: var(--shell-bg-strong) !important;
    border-color: var(--shell-border) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.16), inset 0 1px 0 rgba(255,255,255,0.05) !important;
    overflow-x: auto !important;
    scrollbar-width: none;
}
.hero-engine-menu::-webkit-scrollbar {
    display: none;
}
.hero-search.engine-open .hero-engine-menu {
    display: grid !important;
    gap: 0 !important;
}
.hero-search.engine-open .hero-search-icon,
.hero-search.engine-open .hero-search-input,
.hero-search.engine-open .hero-search-submit,
.hero-search.engine-open .hero-search-kbd {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Content plane rewrite: hot strip straddles hero, body glass starts at categories. */
.home-hot {
    --home-hot-height: clamp(104px, 11vw, 124px);
    --home-hot-overlap: calc(var(--home-hot-height) / 2);
    position: relative !important;
    height: var(--home-hot-height) !important;
    min-height: var(--home-hot-height) !important;
    margin-top: calc(var(--home-hot-overlap) * -1) !important;
    margin-bottom: clamp(26px, 2.4vw, 40px) !important;
    padding: 12px 16px 12px !important;
    border: 1px solid var(--shell-border) !important;
    border-radius: 16px !important;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.13), rgba(255,255,255,0.055) 46%, rgba(255,255,255,0.11)),
        rgba(20,22,33,0.36) !important;
    box-shadow: 0 10px 28px rgba(0,0,0,0.11), inset 0 1px 0 rgba(255,255,255,0.055) !important;
    backdrop-filter: blur(12px) saturate(1.08) !important;
    -webkit-backdrop-filter: blur(12px) saturate(1.08) !important;
}
[data-theme="light"] .home-hot {
    background:
        linear-gradient(90deg, rgba(255,255,255,0.54), rgba(255,255,255,0.30) 46%, rgba(255,255,255,0.48)),
        rgba(255,255,255,0.30) !important;
    box-shadow: 0 12px 30px rgba(15,23,42,0.08), inset 0 1px 0 rgba(255,255,255,0.62) !important;
}
.home-hot-count {
    position: absolute !important;
    top: 12px !important;
    right: 16px !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--shell-muted) !important;
    box-shadow: none !important;
}
.home-hot-list {
    padding-right: 0 !important;
}
.home-hot-card {
    min-height: 56px !important;
    border-radius: 10px !important;
    background: rgba(255,255,255,0.06) !important;
    box-shadow: none !important;
}
[data-theme="light"] .home-hot-card {
    background: rgba(255,255,255,0.38) !important;
}
.home-hot-card:hover {
    box-shadow: none !important;
}
.home-hot-clicks {
    margin-left: auto !important;
}
.home-hot-clicks em,
.home-hot-card em {
    min-height: 18px !important;
    padding: 1px 6px !important;
    border: 0 !important;
    background: rgba(255,255,255,0.07) !important;
    color: var(--shell-muted) !important;
    box-shadow: none !important;
    filter: none !important;
}
[data-theme="light"] .home-hot-clicks em,
[data-theme="light"] .home-hot-card em {
    background: rgba(15,23,42,0.055) !important;
}

.home-body {
    position: relative !important;
    z-index: 4 !important;
    align-items: start !important;
    margin-top: 0 !important;
    padding: 0 clamp(12px, 1.8vw, 22px) 64px !important;
    border: 1px solid var(--shell-border) !important;
    border-bottom: 0 !important;
    border-radius: 18px 18px 0 0 !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.055)),
        rgba(18,20,30,0.30) !important;
    box-shadow: 0 18px 42px rgba(0,0,0,0.10), inset 0 1px 0 rgba(255,255,255,0.055) !important;
    backdrop-filter: blur(14px) saturate(1.06) !important;
    -webkit-backdrop-filter: blur(14px) saturate(1.06) !important;
}

/* Softer page-length content glass. */
.home-body {
    padding: 12px 8px 72px !important;
    min-height: calc(100vh - 474px) !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.060), rgba(255,255,255,0.025)),
        rgba(18,20,30,0.18) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.035) !important;
    backdrop-filter: blur(6px) saturate(1.02) !important;
    -webkit-backdrop-filter: blur(6px) saturate(1.02) !important;
}
[data-theme="light"] .home-body {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.32), rgba(255,255,255,0.14)),
        rgba(255,255,255,0.16) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.42) !important;
}

@media (max-width: 768px) {
    .home-body {
        padding: 12px 8px 56px !important;
        min-height: calc(100vh - 443px) !important;
    }
}
[data-theme="light"] .home-body {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.54), rgba(255,255,255,0.26)),
        rgba(255,255,255,0.30) !important;
    box-shadow: 0 18px 42px rgba(15,23,42,0.07), inset 0 1px 0 rgba(255,255,255,0.66) !important;
}
.content {
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
.section {
    margin-bottom: clamp(16px, 1.8vw, 24px) !important;
    padding: clamp(12px, 1.5vw, 18px) !important;
    border: 1px solid var(--shell-border) !important;
    border-radius: 14px !important;
    background: rgba(255,255,255,0.045) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04) !important;
    opacity: 1 !important;
    transform: none !important;
}
[data-theme="light"] .section {
    background: rgba(255,255,255,0.34) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.52) !important;
}
.section::before,
.section-head::before,
.section-head::after {
    display: none !important;
}
.section-head {
    min-height: 44px !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
.section-tag {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08) !important;
}
.section-count {
    background: rgba(255,255,255,0.055) !important;
    box-shadow: none !important;
}
[data-theme="light"] .section-count {
    background: rgba(15,23,42,0.045) !important;
}
.card-body {
    background: rgba(255,255,255,0.055) !important;
    box-shadow: none !important;
}
[data-theme="light"] .card-body {
    background: rgba(255,255,255,0.40) !important;
}
.card:hover .card-body {
    box-shadow: none !important;
}

.home-aside {
    z-index: 1 !important;
}
.home-aside-card {
    padding: 14px !important;
    border: 1px solid var(--shell-border) !important;
    border-radius: 14px !important;
    background: rgba(255,255,255,0.045) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
[data-theme="light"] .home-aside-card {
    background: rgba(255,255,255,0.34) !important;
}
.home-aside-title span,
.home-latest .home-aside-title span {
    box-shadow: none !important;
}
.home-overview-grid div,
.home-latest-item {
    border: 1px solid var(--shell-border) !important;
    background: rgba(255,255,255,0.045) !important;
    box-shadow: none !important;
}
[data-theme="light"] .home-overview-grid div,
[data-theme="light"] .home-latest-item {
    background: rgba(255,255,255,0.32) !important;
}

@media (max-width: 768px) {
    .home-hot {
        --home-hot-height: clamp(100px, 27vw, 116px);
        width: calc(100% - 24px) !important;
        margin-top: calc(var(--home-hot-overlap) * -1) !important;
        margin-bottom: 24px !important;
    }
    .home-body {
        width: calc(100% - 24px) !important;
        padding: 0 12px 48px !important;
    }
    .section {
        padding: 12px !important;
    }
}

body.animating:not(.content-in):not(.content-direct) .home-hot {
    transform: translateY(24px) !important;
}

/* Detail pass: lighter hero controls and tighter content forms. */
.hero-overlay {
    padding-top: clamp(24px, 4.6vw, 46px) !important;
    padding-bottom: clamp(54px, 6vw, 72px) !important;
    gap: 12px !important;
    transform: translateY(-18px);
}
.hero-search {
    min-height: 52px !important;
    padding: 8px 10px 8px 12px !important;
    gap: 8px !important;
    border-radius: 14px !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.045)),
        rgba(16,18,28,0.34) !important;
    border-color: rgba(255,255,255,0.10) !important;
    box-shadow: 0 10px 26px rgba(0,0,0,0.13), inset 0 1px 0 rgba(255,255,255,0.055) !important;
}
[data-theme="light"] .hero-search {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.62), rgba(255,255,255,0.36)),
        rgba(255,255,255,0.34) !important;
    border-color: rgba(15,23,42,0.08) !important;
    box-shadow: 0 10px 24px rgba(15,23,42,0.07), inset 0 1px 0 rgba(255,255,255,0.62) !important;
}
.hero-search:focus-within,
.hero-search.is-docked,
.hero-search.mobile-docked {
    border-radius: 14px !important;
    box-shadow: 0 10px 26px rgba(0,0,0,0.14), inset 0 1px 0 rgba(255,255,255,0.06) !important;
}
.hero-search-engine,
.hero-search-submit,
.hero-search-kbd {
    height: 32px !important;
    min-height: 32px !important;
    border-radius: 8px !important;
    background: rgba(255,255,255,0.055) !important;
    border-color: rgba(255,255,255,0.08) !important;
    box-shadow: none !important;
}
[data-theme="light"] .hero-search-engine,
[data-theme="light"] .hero-search-submit,
[data-theme="light"] .hero-search-kbd {
    background: rgba(15,23,42,0.045) !important;
    border-color: rgba(15,23,42,0.07) !important;
}
.engine-dot,
.hero-engine-menu button::before {
    box-shadow: none !important;
}
.hero-search-icon {
    width: 18px !important;
    height: 18px !important;
}
.hero-search-input {
    font-size: 14px !important;
}
.hero-quick-cats {
    gap: 8px !important;
    margin-top: 4px !important;
}
.hero-cat-chip {
    min-height: 28px !important;
    padding: 5px 10px !important;
    border-radius: 10px !important;
    background: rgba(255,255,255,0.055) !important;
    border-color: rgba(255,255,255,0.08) !important;
    box-shadow: none !important;
    backdrop-filter: blur(8px) saturate(1.04) !important;
    -webkit-backdrop-filter: blur(8px) saturate(1.04) !important;
    font-weight: 560 !important;
}
[data-theme="light"] .hero-cat-chip {
    background: rgba(255,255,255,0.42) !important;
    border-color: rgba(15,23,42,0.07) !important;
}
.hero-cat-chip span {
    width: 16px !important;
    height: 16px !important;
    border-radius: 5px !important;
    background: transparent !important;
    box-shadow: none !important;
}

.home-hot {
    padding-bottom: 14px !important;
}
.home-hot-list {
    margin-top: 12px !important;
    height: calc(100% - 34px) !important;
    align-items: stretch !important;
}
.home-hot-card {
    min-height: 0 !important;
    height: 100% !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}
.home-hot-clicks em,
.home-hot-card em {
    padding: 0 !important;
    min-height: auto !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: color-mix(in srgb, var(--hot-color, var(--accent)) 72%, var(--text-2)) !important;
    font-weight: 650 !important;
}

.home-body {
    padding-inline: 8px !important;
}
.section,
.home-aside-card {
    border-radius: 11px !important;
}
.section {
    padding: 10px !important;
}
.card-body,
.home-overview-grid div,
.home-latest-item {
    border-radius: 8px !important;
}
.content > .footer-inner {
    margin-top: 18px !important;
    padding: 18px 0 24px !important;
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .hero-overlay {
        padding-top: clamp(36px, 10vw, 52px) !important;
        padding-bottom: clamp(64px, 16vw, 82px) !important;
        transform: translateY(-14px);
    }
    .hero-search {
        min-height: 50px !important;
    }
    .home-hot-list {
        height: calc(100% - 34px) !important;
    }
    .home-body {
        padding-inline: 8px !important;
    }
}

/* Keep the first content form breathing inside the page glass. */
.home-body {
    padding-top: 12px !important;
}
@media (max-width: 768px) {
    .home-body {
        padding-top: 12px !important;
    }
}

/* The content-page glass is the page floor, not a centered card. */
.home-body {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-radius: 0 !important;
}

/* Content floor is only a soft mask, not glass. */
.home-body {
    background: rgba(10, 12, 20, 0.24) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
[data-theme="light"] .home-body {
    background: rgba(255, 255, 255, 0.22) !important;
    box-shadow: none !important;
}

/* Align primary surfaces to the content-floor language. */
.sidebar,
.hero-search,
.home-hot-card {
    background: rgba(10, 12, 20, 0.24) !important;
    border-color: rgba(255,255,255,0.075) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
[data-theme="light"] .sidebar,
[data-theme="light"] .hero-search,
[data-theme="light"] .home-hot-card {
    background: rgba(255,255,255,0.22) !important;
    border-color: rgba(15,23,42,0.07) !important;
    box-shadow: none !important;
}
.hero-search:focus-within,
.hero-search.is-docked,
.hero-search.mobile-docked,
.home-hot-card:hover {
    background: rgba(10, 12, 20, 0.30) !important;
    box-shadow: none !important;
}
[data-theme="light"] .hero-search:focus-within,
[data-theme="light"] .hero-search.is-docked,
[data-theme="light"] .hero-search.mobile-docked,
[data-theme="light"] .home-hot-card:hover {
    background: rgba(255,255,255,0.30) !important;
}

/* Category forms get a small glass lift over the flat content mask. */
.section {
    background: rgba(255,255,255,0.045) !important;
    backdrop-filter: blur(8px) saturate(1.03) !important;
    -webkit-backdrop-filter: blur(8px) saturate(1.03) !important;
}
[data-theme="light"] .section {
    background: rgba(255,255,255,0.34) !important;
}

/* Right rail: lighter, responsive, and visually tied to category forms. */
.home-aside {
    gap: 14px !important;
}
.home-aside-card {
    padding: 12px !important;
    background: rgba(255,255,255,0.045) !important;
    border-color: var(--shell-border) !important;
    box-shadow: none !important;
    backdrop-filter: blur(8px) saturate(1.03) !important;
    -webkit-backdrop-filter: blur(8px) saturate(1.03) !important;
}
[data-theme="light"] .home-aside-card {
    background: rgba(255,255,255,0.34) !important;
}
.home-aside-title {
    min-height: 26px;
    margin-bottom: 10px !important;
}
.home-aside-title strong {
    color: var(--text-1) !important;
    font-size: 13px;
}
.home-aside-title em {
    color: var(--shell-muted) !important;
    letter-spacing: 0 !important;
}
.home-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
}
.home-overview-grid div,
.home-latest-item {
    background: rgba(255,255,255,0.045) !important;
    border-color: var(--shell-border) !important;
    box-shadow: none !important;
}
[data-theme="light"] .home-overview-grid div,
[data-theme="light"] .home-latest-item {
    background: rgba(255,255,255,0.30) !important;
}
.home-overview-grid div {
    min-height: 62px !important;
    padding: 10px !important;
}
.home-overview-grid strong {
    color: var(--text-1) !important;
    font-size: clamp(20px, 2vw, 24px) !important;
}
.home-overview-grid span,
.home-latest-item small {
    color: var(--shell-muted) !important;
}
.home-latest {
    gap: 8px !important;
}
.home-latest-item {
    min-height: 46px !important;
    padding: 8px !important;
    border-radius: 8px !important;
}
.home-latest-item b {
    color: var(--text-1) !important;
    font-size: 12px !important;
}
.home-latest-item span {
    background: rgba(255,255,255,0.055) !important;
}
[data-theme="light"] .home-latest-item span {
    background: rgba(15,23,42,0.045) !important;
}

@media (max-width: 1320px) and (min-width: 769px) {
    .home-aside {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        position: static !important;
    }
}

@media (max-width: 768px) {
    .home-aside {
        display: grid !important;
        gap: 12px !important;
        margin-top: 14px !important;
        position: static !important;
    }
    .home-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Category groups are structure only; cards carry the surface. */
.section {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
.section-head {
    padding-inline: 2px !important;
}

/* Right rail accents: overview teal, latest blue. */
.home-aside-card {
    --aside-accent: #5eead4;
}
.home-latest {
    --aside-accent: #60a5fa;
}
.home-aside-title span {
    background: var(--aside-accent) !important;
    box-shadow: none !important;
}
.home-aside-card:hover {
    border-color: color-mix(in srgb, var(--aside-accent) 22%, var(--shell-border)) !important;
}
.home-latest-item:hover {
    border-color: color-mix(in srgb, var(--aside-accent) 22%, var(--shell-border)) !important;
    background: color-mix(in srgb, var(--aside-accent) 7%, rgba(255,255,255,0.045)) !important;
}

/* Keep the floor full-width, but inset the actual content. */
.home-body {
    padding-left: clamp(28px, 8vw, 156px) !important;
    padding-right: clamp(28px, 8vw, 156px) !important;
}

@media (max-width: 768px) {
    .home-body {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

/* Category color is expressed through text/icons, not extra containers. */
.section-head h2,
.section-tag {
    color: color-mix(in srgb, var(--cat-color, var(--accent)) 78%, var(--text-1)) !important;
}
.section-tag {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}
.hero-cat-chip {
    color: color-mix(in srgb, var(--cat-color, var(--accent)) 74%, #fff) !important;
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
[data-theme="light"] .hero-cat-chip {
    color: color-mix(in srgb, var(--cat-color, var(--accent)) 72%, var(--text-1)) !important;
    background: transparent !important;
    border-color: transparent !important;
}
.hero-cat-chip span {
    color: currentColor !important;
    background: transparent !important;
}

/* Responsive sizing pass: keep positions, let surfaces scale by ratio. */
.hero-search:not(.is-floating) {
    --search-width: clamp(300px, 48vw, 500px) !important;
}
.hero-search {
    min-height: clamp(48px, 4.2vw, 56px) !important;
    padding:
        clamp(7px, 0.75vw, 10px)
        clamp(10px, 1.05vw, 14px) !important;
}
.hero-search-engine,
.hero-search-submit,
.hero-search-kbd {
    height: clamp(30px, 2.7vw, 34px) !important;
    min-height: clamp(30px, 2.7vw, 34px) !important;
}
.hero-search-submit {
    width: clamp(32px, 3vw, 38px) !important;
}

.home-hot-list {
    gap: clamp(8px, 1vw, 14px) !important;
    grid-auto-columns: clamp(180px, 18vw, 230px) !important;
    grid-auto-rows: calc(var(--home-hot-height) * 0.55) !important;
}
.home-hot-card {
    aspect-ratio: 3.35 / 1 !important;
    width: 100% !important;
    justify-self: stretch !important;
    align-self: stretch !important;
    min-height: clamp(44px, 4.8vw, 64px) !important;
    height: calc(var(--home-hot-height) * 0.55) !important;
    padding:
        clamp(7px, 0.85vw, 10px)
        clamp(8px, 0.95vw, 12px) !important;
    grid-template-columns:
        clamp(26px, 2.7vw, 34px)
        minmax(0, 1fr)
        max-content !important;
}
.home-hot-icon {
    width: clamp(26px, 2.7vw, 34px) !important;
    height: clamp(26px, 2.7vw, 34px) !important;
}
.home-hot-text b {
    font-size: clamp(11px, 0.9vw, 13px) !important;
}
.home-hot-text small {
    font-size: clamp(10px, 0.82vw, 12px) !important;
}

.grid {
    grid-template-columns: repeat(auto-fill, minmax(clamp(168px, 18vw, 230px), 1fr)) !important;
    gap: clamp(10px, 1.1vw, 14px) !important;
}
.card-body {
    min-height: clamp(66px, 6.4vw, 86px) !important;
    padding:
        clamp(10px, 1.1vw, 14px)
        clamp(10px, 1.25vw, 16px) !important;
}
.card-icon {
    width: clamp(30px, 3vw, 38px) !important;
    height: clamp(30px, 3vw, 38px) !important;
}
.card-name {
    font-size: clamp(12px, 1vw, 14px) !important;
}
.card-desc {
    font-size: clamp(10px, 0.88vw, 12px) !important;
}

.home-aside-card {
    padding: clamp(10px, 1vw, 14px) !important;
}
.home-overview-grid div {
    min-height: clamp(56px, 5.4vw, 72px) !important;
    padding: clamp(8px, 0.9vw, 12px) !important;
}
.home-latest-item {
    min-height: clamp(44px, 4.6vw, 58px) !important;
    padding: clamp(7px, 0.8vw, 10px) !important;
    grid-template-columns: clamp(28px, 2.8vw, 34px) minmax(0, 1fr) !important;
}
.home-latest-item span {
    width: clamp(28px, 2.8vw, 34px) !important;
    height: clamp(28px, 2.8vw, 34px) !important;
}

@media (min-width: 1321px) {
    .home-hot-list {
        grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
        grid-auto-columns: auto !important;
    }
}

@media (min-width: 769px) and (max-width: 1320px) {
    .home-hot-list {
        grid-template-columns: none !important;
        grid-auto-flow: column !important;
        grid-auto-columns: clamp(188px, calc(var(--home-hot-height) * 3.35), 238px) !important;
        overflow-x: auto !important;
    }
}

@media (max-width: 768px) {
    .hero-search:not(.is-floating) {
        --search-width: min(360px, calc(100vw - 96px)) !important;
    }
    .home-hot-list {
        grid-template-columns: none !important;
        grid-auto-columns: clamp(176px, calc(var(--home-hot-height) * 3.35), 226px) !important;
    }
    .home-hot-card {
        min-height: clamp(48px, 14vw, 62px) !important;
    }
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .card-body {
        min-height: clamp(76px, 22vw, 92px) !important;
    }
}

/* Final mask alignment: no hidden section shell, hot strip matches page floor. */
.home-hot {
    background: rgba(10, 12, 20, 0.24) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
[data-theme="light"] .home-hot {
    background: rgba(255,255,255,0.22) !important;
    box-shadow: none !important;
}
.section,
[data-theme="light"] .section {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
.card-body {
    background: rgba(255,255,255,0.062) !important;
    backdrop-filter: blur(7px) saturate(1.03) !important;
    -webkit-backdrop-filter: blur(7px) saturate(1.03) !important;
}
[data-theme="light"] .card-body {
    background: rgba(255,255,255,0.36) !important;
}

/* Content cards: capped density, responsive height. */
.grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, clamp(176px, 18vw, 220px)), 1fr)) !important;
    max-width: calc((220px * 4) + (clamp(10px, 1.1vw, 14px) * 3)) !important;
}
.card-body {
    min-height: clamp(58px, 5.4vw, 74px) !important;
}

@media (min-width: 1024px) {
    .grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        max-width: none !important;
    }
}

@media (min-width: 769px) and (max-width: 1023px) {
    .grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        max-width: none !important;
    }
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        max-width: none !important;
    }
    .card-body {
        min-height: clamp(46px, 13vw, 56px) !important;
        padding: 7px 8px !important;
        gap: 7px !important;
    }
    .card-icon {
        width: 26px !important;
        height: 26px !important;
        border-radius: 8px !important;
    }
    .card-name {
        font-size: 11.5px !important;
    }
    .card-desc {
        font-size: 10px !important;
        line-height: 1.2 !important;
    }
}

/* Hot strip inner geometry: cards scale inside the strip with breathing room. */
.home-hot {
    --hot-pad-x: clamp(12px, 1.35vw, 18px);
    --hot-pad-y: clamp(10px, 1.05vw, 14px);
    --hot-head-h: clamp(20px, 2vw, 24px);
    --hot-inner-gap: clamp(8px, 0.9vw, 12px);
    --hot-card-h: calc(var(--home-hot-height) - (var(--hot-pad-y) * 2) - var(--hot-head-h) - var(--hot-inner-gap));
    display: grid !important;
    grid-template-rows: var(--hot-head-h) minmax(0, var(--hot-card-h)) !important;
    row-gap: var(--hot-inner-gap) !important;
    padding: var(--hot-pad-y) var(--hot-pad-x) !important;
    overflow: hidden !important;
}
.home-hot-head {
    height: var(--hot-head-h) !important;
    min-height: 0 !important;
}
.home-hot-count {
    top: var(--hot-pad-y) !important;
    right: var(--hot-pad-x) !important;
}
.home-hot-list {
    height: var(--hot-card-h) !important;
    min-height: 0 !important;
    margin-top: 0 !important;
    align-self: stretch !important;
    grid-auto-rows: var(--hot-card-h) !important;
    align-items: stretch !important;
}
.home-hot-card {
    height: var(--hot-card-h) !important;
    min-height: 0 !important;
    max-height: var(--hot-card-h) !important;
    aspect-ratio: auto !important;
}
@media (min-width: 769px) and (max-width: 1320px) {
    .home-hot-list {
        grid-auto-columns: clamp(192px, calc(var(--hot-card-h) * 3.7), 248px) !important;
    }
}
@media (max-width: 768px) {
    .home-hot-list {
        grid-auto-columns: clamp(178px, calc(var(--hot-card-h) * 3.7), 232px) !important;
    }
}

/* Visual focus pass: reduce background bleed without changing geometry. */
.home-body,
.home-hot {
    background: rgba(10, 12, 20, 0.34) !important;
}

[data-theme="light"] .home-body,
[data-theme="light"] .home-hot {
    background: rgba(255,255,255,0.36) !important;
}

.sidebar,
.hero-search,
.hero-engine-menu {
    background: rgba(12,14,24,0.46) !important;
}

[data-theme="light"] .sidebar,
[data-theme="light"] .hero-search,
[data-theme="light"] .hero-engine-menu {
    background: rgba(255,255,255,0.50) !important;
}

.hero-search:focus-within,
.hero-search.is-docked,
.hero-search.mobile-docked,
.hero-search.engine-open {
    background: rgba(12,14,24,0.52) !important;
}

[data-theme="light"] .hero-search:focus-within,
[data-theme="light"] .hero-search.is-docked,
[data-theme="light"] .hero-search.mobile-docked,
[data-theme="light"] .hero-search.engine-open {
    background: rgba(255,255,255,0.58) !important;
}

.home-hot-card {
    background: rgba(18,20,30,0.42) !important;
}

[data-theme="light"] .home-hot-card {
    background: rgba(255,255,255,0.44) !important;
}

.home-hot-card:hover {
    background: rgba(22,25,36,0.50) !important;
}

[data-theme="light"] .home-hot-card:hover {
    background: rgba(255,255,255,0.54) !important;
}

.card-body,
.home-aside-card,
.home-overview-grid div,
.home-latest-item {
    background: rgba(16,18,28,0.40) !important;
}

[data-theme="light"] .card-body,
[data-theme="light"] .home-aside-card,
[data-theme="light"] .home-overview-grid div,
[data-theme="light"] .home-latest-item {
    background: rgba(255,255,255,0.52) !important;
}

.card:hover .card-body,
.home-aside-card:hover,
.home-latest-item:hover {
    background: rgba(20,23,34,0.48) !important;
}

[data-theme="light"] .card:hover .card-body,
[data-theme="light"] .home-aside-card:hover,
[data-theme="light"] .home-latest-item:hover {
    background: rgba(255,255,255,0.62) !important;
}

/* Hot card height pass: grow downward into the content plane only. */
.home-hot {
    --home-hot-height: clamp(114px, 12vw, 136px);
    --home-hot-overlap: clamp(52px, 5.5vw, 62px);
}

@media (min-width: 769px) and (max-width: 1320px) {
    .home-hot-list {
        grid-auto-columns: clamp(192px, calc(var(--home-hot-overlap) * 3.95), 248px) !important;
    }
}

@media (max-width: 768px) {
    .home-hot {
        --hot-card-h: clamp(46px, 13vw, 56px);
        --home-hot-height: calc(var(--hot-card-h) + (var(--hot-pad-y) * 2) + var(--hot-head-h) + var(--hot-inner-gap));
        --home-hot-overlap: calc(var(--home-hot-height) / 2);
    }
    .home-hot-list {
        grid-auto-columns: clamp(156px, 40vw, 180px) !important;
        gap: 8px !important;
    }
    .home-hot-card {
        grid-template-columns: 24px minmax(0, 1fr) max-content !important;
        column-gap: 8px !important;
        padding: 7px 8px !important;
    }
    .home-hot-icon {
        width: 24px !important;
        height: 24px !important;
        border-radius: 7px !important;
    }
    .home-hot-text {
        gap: 1px !important;
    }
    .home-hot-text b {
        font-size: 11px !important;
        line-height: 1.2 !important;
    }
    .home-hot-text small {
        font-size: 10px !important;
        line-height: 1.2 !important;
    }
    .home-hot-clicks {
        min-width: 0 !important;
        margin-left: 0 !important;
    }
    .home-hot-clicks em,
    .home-hot-card em {
        font-size: 10px !important;
        line-height: 1 !important;
    }
}

/* Right rail color masks: subtle section identity, no layout change. */
.home-aside-card {
    position: relative !important;
    isolation: isolate;
    overflow: hidden !important;
}

.home-aside-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--aside-accent) 18%, transparent), transparent 58%),
        radial-gradient(circle at 92% 10%, color-mix(in srgb, var(--aside-accent) 16%, transparent), transparent 34%);
}

.home-latest::before {
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--aside-accent) 17%, transparent), rgba(236,72,153,0.055) 62%, transparent),
        radial-gradient(circle at 92% 10%, color-mix(in srgb, var(--aside-accent) 14%, transparent), transparent 34%);
}

[data-theme="light"] .home-aside-card::before {
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--aside-accent) 13%, transparent), transparent 60%),
        radial-gradient(circle at 92% 10%, color-mix(in srgb, var(--aside-accent) 11%, transparent), transparent 34%);
}

[data-theme="light"] .home-latest::before {
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--aside-accent) 12%, transparent), rgba(236,72,153,0.040) 62%, transparent),
        radial-gradient(circle at 92% 10%, color-mix(in srgb, var(--aside-accent) 10%, transparent), transparent 34%);
}

.home-aside-card > * {
    position: relative;
    z-index: 1;
}

/* Stronger glass only for the sidebar and hot strip. */
.sidebar {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0.025)),
        rgba(10,12,22,0.58) !important;
    border-color: rgba(255,255,255,0.12) !important;
    box-shadow: 0 18px 38px rgba(0,0,0,0.18), inset 1px 0 0 rgba(255,255,255,0.055) !important;
    backdrop-filter: blur(16px) saturate(1.12) !important;
    -webkit-backdrop-filter: blur(16px) saturate(1.12) !important;
}

[data-theme="light"] .sidebar {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.66), rgba(255,255,255,0.42)),
        rgba(255,255,255,0.62) !important;
    border-color: rgba(15,23,42,0.10) !important;
    box-shadow: 0 18px 36px rgba(15,23,42,0.10), inset 1px 0 0 rgba(255,255,255,0.70) !important;
    backdrop-filter: blur(16px) saturate(1.08) !important;
    -webkit-backdrop-filter: blur(16px) saturate(1.08) !important;
}

.home-hot {
    background:
        linear-gradient(135deg, rgba(255,255,255,0.11), rgba(255,255,255,0.040) 52%, rgba(255,255,255,0.085)),
        rgba(10,12,20,0.44) !important;
    border-color: rgba(255,255,255,0.12) !important;
    box-shadow: 0 16px 34px rgba(0,0,0,0.14), inset 0 1px 0 rgba(255,255,255,0.070) !important;
    backdrop-filter: blur(13px) saturate(1.10) !important;
    -webkit-backdrop-filter: blur(13px) saturate(1.10) !important;
}

[data-theme="light"] .home-hot {
    background:
        linear-gradient(135deg, rgba(255,255,255,0.66), rgba(255,255,255,0.36) 54%, rgba(255,255,255,0.56)),
        rgba(255,255,255,0.48) !important;
    border-color: rgba(15,23,42,0.10) !important;
    box-shadow: 0 14px 30px rgba(15,23,42,0.09), inset 0 1px 0 rgba(255,255,255,0.72) !important;
    backdrop-filter: blur(13px) saturate(1.06) !important;
    -webkit-backdrop-filter: blur(13px) saturate(1.06) !important;
}

/* Latest rows are list items, not nested cards. */
.home-latest {
    gap: 2px !important;
}

.home-latest-item,
[data-theme="light"] .home-latest-item {
    padding: 7px 2px !important;
    border-color: transparent !important;
    border-radius: 6px !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.home-latest-item:hover {
    border-color: transparent !important;
    background: color-mix(in srgb, var(--aside-accent) 7%, transparent) !important;
}

[data-theme="light"] .home-latest-item:hover {
    border-color: transparent !important;
    background: color-mix(in srgb, var(--aside-accent) 9%, transparent) !important;
}

/* Hero controls: search is primary, category tabs are secondary navigation. */
.hero-search {
    border-radius: 18px !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.13), rgba(255,255,255,0.060)),
        rgba(10,12,22,0.46) !important;
    border-color: rgba(255,255,255,0.16) !important;
    box-shadow: 0 14px 34px rgba(0,0,0,0.20), inset 0 1px 0 rgba(255,255,255,0.12) !important;
    backdrop-filter: blur(18px) saturate(1.16) !important;
    -webkit-backdrop-filter: blur(18px) saturate(1.16) !important;
}

[data-theme="light"] .hero-search {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.78), rgba(255,255,255,0.52)),
        rgba(255,255,255,0.58) !important;
    border-color: rgba(15,23,42,0.10) !important;
    box-shadow: 0 14px 30px rgba(15,23,42,0.10), inset 0 1px 0 rgba(255,255,255,0.80) !important;
}

.hero-search:focus-within,
.hero-search.is-docked,
.hero-search.mobile-docked,
.hero-search.engine-open {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.075)),
        rgba(10,12,22,0.56) !important;
    border-color: color-mix(in srgb, var(--accent) 34%, rgba(255,255,255,0.16)) !important;
    box-shadow: 0 16px 38px rgba(0,0,0,0.22), 0 0 0 2px color-mix(in srgb, var(--accent) 12%, transparent), inset 0 1px 0 rgba(255,255,255,0.14) !important;
}

[data-theme="light"] .hero-search:focus-within,
[data-theme="light"] .hero-search.is-docked,
[data-theme="light"] .hero-search.mobile-docked,
[data-theme="light"] .hero-search.engine-open {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,255,255,0.62)),
        rgba(255,255,255,0.68) !important;
    border-color: color-mix(in srgb, var(--accent) 28%, rgba(15,23,42,0.10)) !important;
}

.hero-search-engine,
.hero-search-submit {
    border-radius: 11px !important;
    background: rgba(255,255,255,0.095) !important;
    border-color: rgba(255,255,255,0.15) !important;
}

[data-theme="light"] .hero-search-engine,
[data-theme="light"] .hero-search-submit {
    background: rgba(15,23,42,0.055) !important;
    border-color: rgba(15,23,42,0.085) !important;
}

.hero-search-engine {
    font-weight: 650 !important;
}

.hero-search-icon {
    color: rgba(255,255,255,0.72) !important;
}

.hero-search-input {
    font-weight: 520 !important;
    letter-spacing: 0 !important;
}

.hero-search-kbd {
    opacity: 0.72 !important;
}

.hero-quick-cats {
    width: fit-content !important;
    max-width: min(100%, calc(100vw - 32px)) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 4px !important;
    margin-top: 10px !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    border-radius: 15px !important;
    background: rgba(8,10,18,0.28) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08) !important;
    backdrop-filter: blur(12px) saturate(1.08) !important;
    -webkit-backdrop-filter: blur(12px) saturate(1.08) !important;
}

[data-theme="light"] .hero-quick-cats {
    background: rgba(255,255,255,0.38) !important;
    border-color: rgba(15,23,42,0.08) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.68) !important;
}

.hero-cat-chip {
    min-height: 31px !important;
    padding: 6px 11px !important;
    border-radius: 11px !important;
    color: rgba(255,255,255,0.74) !important;
    background: rgba(255,255,255,0.060) !important;
    border-color: rgba(255,255,255,0.10) !important;
    box-shadow: none !important;
    font-weight: 620 !important;
}

.hero-cat-chip:hover {
    color: #fff !important;
    background: color-mix(in srgb, var(--cat-color, var(--accent)) 18%, rgba(255,255,255,0.070)) !important;
    border-color: color-mix(in srgb, var(--cat-color, var(--accent)) 26%, rgba(255,255,255,0.12)) !important;
}

.hero-cat-chip:first-child {
    color: #fff !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.070)),
        color-mix(in srgb, var(--cat-color, var(--accent)) 34%, rgba(12,14,24,0.32)) !important;
    border-color: color-mix(in srgb, var(--cat-color, var(--accent)) 42%, rgba(255,255,255,0.18)) !important;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--cat-color, var(--accent)) 18%, transparent), inset 0 1px 0 rgba(255,255,255,0.16) !important;
}

[data-theme="light"] .hero-cat-chip {
    color: color-mix(in srgb, var(--cat-color, var(--accent)) 62%, var(--text-1)) !important;
    background: rgba(255,255,255,0.45) !important;
    border-color: rgba(15,23,42,0.075) !important;
}

[data-theme="light"] .hero-cat-chip:hover,
[data-theme="light"] .hero-cat-chip:first-child {
    color: color-mix(in srgb, var(--cat-color, var(--accent)) 70%, var(--text-1)) !important;
    background: color-mix(in srgb, var(--cat-color, var(--accent)) 18%, rgba(255,255,255,0.72)) !important;
    border-color: color-mix(in srgb, var(--cat-color, var(--accent)) 30%, rgba(15,23,42,0.10)) !important;
}

.hero-cat-chip span {
    width: 17px !important;
    height: 17px !important;
    border-radius: 6px !important;
    color: currentColor !important;
    background: color-mix(in srgb, var(--cat-color, var(--accent)) 16%, rgba(255,255,255,0.080)) !important;
}

@media (max-width: 768px) {
    .hero-search {
        min-height: 50px !important;
        border-radius: 17px !important;
    }
    .hero-search-engine,
    .hero-search-submit {
        height: 32px !important;
        min-height: 32px !important;
    }
    .hero-quick-cats {
        width: calc(100% - 24px) !important;
        max-width: calc(100% - 24px) !important;
        justify-content: flex-start !important;
        gap: 6px !important;
        padding: 4px !important;
        margin-top: 8px !important;
        overflow-x: auto !important;
        scroll-padding-inline: 4px !important;
    }
    .hero-cat-chip {
        flex: 0 0 auto !important;
        min-height: 30px !important;
        padding: 5px 9px !important;
    }
}

/* Hero engine menu and category chips refinement. */
.hero-engine-menu {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: min(226px, calc(100vw - 40px)) !important;
    min-width: 184px !important;
    max-width: calc(100vw - 32px) !important;
    top: calc(100% + 8px) !important;
    bottom: auto !important;
    left: 8px !important;
    gap: 4px !important;
    padding: 6px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translate3d(0, -6px, 0) scale(0.97) !important;
    transform-origin: 22px -6px !important;
    transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.13), rgba(255,255,255,0.055)),
        rgba(11,13,23,0.90) !important;
    border: 1px solid rgba(255,255,255,0.16) !important;
    box-shadow: 0 18px 42px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.12) !important;
    backdrop-filter: blur(18px) saturate(1.16) !important;
    -webkit-backdrop-filter: blur(18px) saturate(1.16) !important;
}

.hero-search.engine-open .hero-engine-menu {
    top: calc(100% + 8px) !important;
    left: 8px !important;
    gap: 4px !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translate3d(0, 0, 0) scale(1) !important;
    transition-delay: 0s !important;
}

[data-theme="light"] .hero-engine-menu {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.72)),
        rgba(255,255,255,0.82) !important;
    border-color: rgba(15,23,42,0.10) !important;
    box-shadow: 0 18px 34px rgba(15,23,42,0.14), inset 0 1px 0 rgba(255,255,255,0.78) !important;
}

.hero-engine-menu button {
    min-height: 34px !important;
    padding: 0 9px !important;
    border-radius: 10px !important;
    color: rgba(255,255,255,0.82) !important;
    background: transparent !important;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease !important;
}

[data-theme="light"] .hero-engine-menu button {
    color: rgba(15,23,42,0.76) !important;
}

.hero-engine-menu button:hover,
.hero-engine-menu button.active {
    color: #fff !important;
    background: color-mix(in srgb, var(--engine-color, #2563eb) 24%, rgba(255,255,255,0.08)) !important;
}

[data-theme="light"] .hero-engine-menu button:hover,
[data-theme="light"] .hero-engine-menu button.active {
    color: color-mix(in srgb, var(--engine-color, #2563eb) 68%, var(--text-1)) !important;
    background: color-mix(in srgb, var(--engine-color, #2563eb) 15%, rgba(255,255,255,0.72)) !important;
}

.hero-search.engine-open .hero-search-icon,
.hero-search.engine-open .hero-search-input,
.hero-search.engine-open .hero-search-submit,
.hero-search.engine-open .hero-search-kbd {
    opacity: 1 !important;
}

.hero-search.engine-open .hero-search-input,
.hero-search.engine-open .hero-search-submit {
    pointer-events: auto !important;
}

.hero-search.engine-open .hero-search-engine {
    color: #fff !important;
    background: color-mix(in srgb, var(--engine-color, var(--accent)) 24%, rgba(255,255,255,0.10)) !important;
    border-color: color-mix(in srgb, var(--engine-color, var(--accent)) 42%, rgba(255,255,255,0.16)) !important;
}

.hero-search-engine svg {
    transition: transform 180ms ease !important;
}

.hero-search.engine-open .hero-search-engine svg {
    transform: rotate(180deg) !important;
}

.hero-quick-cats,
[data-theme="light"] .hero-quick-cats {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.hero-cat-chip,
.hero-cat-chip:first-child {
    color: color-mix(in srgb, var(--cat-color, var(--accent)) 72%, #fff) !important;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--cat-color, var(--accent)) 24%, rgba(255,255,255,0.11)), color-mix(in srgb, var(--cat-color, var(--accent)) 12%, rgba(255,255,255,0.055))),
        rgba(10,12,22,0.30) !important;
    border-color: color-mix(in srgb, var(--cat-color, var(--accent)) 38%, rgba(255,255,255,0.12)) !important;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--cat-color, var(--accent)) 13%, transparent), inset 0 1px 0 rgba(255,255,255,0.13) !important;
}

.hero-cat-chip:hover,
.hero-cat-chip:first-child:hover {
    color: #fff !important;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--cat-color, var(--accent)) 32%, rgba(255,255,255,0.13)), color-mix(in srgb, var(--cat-color, var(--accent)) 16%, rgba(255,255,255,0.07))),
        rgba(10,12,22,0.36) !important;
    border-color: color-mix(in srgb, var(--cat-color, var(--accent)) 52%, rgba(255,255,255,0.16)) !important;
    transform: translateY(-1px);
}

[data-theme="light"] .hero-cat-chip,
[data-theme="light"] .hero-cat-chip:first-child {
    color: color-mix(in srgb, var(--cat-color, var(--accent)) 68%, var(--text-1)) !important;
    background: color-mix(in srgb, var(--cat-color, var(--accent)) 12%, rgba(255,255,255,0.74)) !important;
    border-color: color-mix(in srgb, var(--cat-color, var(--accent)) 28%, rgba(15,23,42,0.08)) !important;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--cat-color, var(--accent)) 10%, transparent), inset 0 1px 0 rgba(255,255,255,0.70) !important;
}

[data-theme="light"] .hero-cat-chip:hover,
[data-theme="light"] .hero-cat-chip:first-child:hover {
    color: color-mix(in srgb, var(--cat-color, var(--accent)) 76%, var(--text-1)) !important;
    background: color-mix(in srgb, var(--cat-color, var(--accent)) 18%, rgba(255,255,255,0.82)) !important;
    border-color: color-mix(in srgb, var(--cat-color, var(--accent)) 38%, rgba(15,23,42,0.10)) !important;
}

.hero-cat-chip span {
    background: color-mix(in srgb, var(--cat-color, var(--accent)) 22%, rgba(255,255,255,0.09)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12) !important;
}

@media (max-width: 768px) {
    .hero-engine-menu {
        left: 0 !important;
        width: min(220px, calc(100vw - 40px)) !important;
        min-width: 174px !important;
    }
    .hero-search.engine-open .hero-engine-menu {
        left: 0 !important;
    }
    .hero-quick-cats {
        gap: 7px !important;
        padding: 0 12px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-engine-menu,
    .hero-engine-menu button,
    .hero-search-engine svg {
        transition: none !important;
    }
}

/* Mobile docked search stays between the side controls. */
@media (max-width: 768px) {
    .hero-search:not(.is-floating) {
        --search-width: min(360px, calc(100vw - 96px));
        max-width: calc(100vw - 96px) !important;
    }
    .hero-search,
    .hero-search:focus-within,
    .hero-search.is-docked,
    .hero-search.mobile-docked,
    .hero-search.engine-open {
        background: rgba(0,0,0,0.30) !important;
        border-color: rgba(255,255,255,0.06) !important;
        box-shadow: none !important;
        backdrop-filter: blur(12px) saturate(1.2) !important;
        -webkit-backdrop-filter: blur(12px) saturate(1.2) !important;
    }
    [data-theme="light"] .hero-search,
    [data-theme="light"] .hero-search:focus-within,
    [data-theme="light"] .hero-search.is-docked,
    [data-theme="light"] .hero-search.mobile-docked,
    [data-theme="light"] .hero-search.engine-open {
        background: rgba(255,255,255,0.65) !important;
        border-color: rgba(0,0,0,0.06) !important;
        box-shadow: 0 2px 12px rgba(0,0,0,0.06) !important;
    }
    .hero-search.mobile-docked {
        --mobile-search-h: clamp(36px, 9vw, 42px);
        --mobile-search-inner: calc(var(--mobile-search-h) - 8px);
        height: var(--mobile-search-h) !important;
        min-height: var(--mobile-search-h) !important;
        padding: 4px 6px !important;
        gap: 5px !important;
        border-radius: 14px !important;
    }
    .hero-search.mobile-docked .hero-search-engine,
    .hero-search.mobile-docked .hero-search-submit {
        height: var(--mobile-search-inner) !important;
        min-height: var(--mobile-search-inner) !important;
        border-radius: 8px !important;
    }
    .hero-search.mobile-docked .hero-search-engine {
        max-width: 48px !important;
        padding: 0 7px !important;
        gap: 5px !important;
        font-size: 11px !important;
    }
    .hero-search.mobile-docked .engine-dot {
        width: 6px !important;
        height: 6px !important;
    }
    .hero-search.mobile-docked .hero-search-icon {
        width: 15px !important;
        height: 15px !important;
        flex: 0 0 auto !important;
    }
    .hero-search.mobile-docked .hero-search-input {
        min-width: 0 !important;
        font-size: 12px !important;
    }
    .hero-search.mobile-docked .hero-search-submit {
        width: var(--mobile-search-inner) !important;
        flex: 0 0 var(--mobile-search-inner) !important;
    }
    .hero-search.mobile-docked .hero-search-kbd {
        display: none !important;
    }
    .card-body {
        background: rgba(0,0,0,0.30) !important;
        border-color: rgba(255,255,255,0.06) !important;
        box-shadow: none !important;
        backdrop-filter: blur(12px) saturate(1.2) !important;
        -webkit-backdrop-filter: blur(12px) saturate(1.2) !important;
    }
    .card:hover .card-body {
        background: rgba(0,0,0,0.36) !important;
    }
    [data-theme="light"] .card-body {
        background: rgba(255,255,255,0.65) !important;
        border-color: rgba(0,0,0,0.06) !important;
        box-shadow: 0 2px 12px rgba(0,0,0,0.06) !important;
    }
    [data-theme="light"] .card:hover .card-body {
        background: rgba(255,255,255,0.76) !important;
    }
    .home-aside {
        display: none !important;
    }
}
