/* ============================================================
   陈琳 · 幸运星应援 Wiki — 主样式表
   应援色：红色  |  粉丝名：幸运星 ⭐  |  风格：元气
   ============================================================ */

/* ----- CSS Variables ----- */
:root {
    /* 应援色 — Lucky Red */
    --red-primary:    #D9273F;
    --red-dark:       #B81F33;
    --red-bright:     #FF6B7D;
    --red-soft:       #FF9FAE;
    --red-glow:       rgba(217, 39, 63, 0.25);
    --red-glow-strong: rgba(217, 39, 63, 0.45);

    /* 幸运星 — Star Gold */
    --star-gold:       #E8B34B;
    --star-gold-light: #F2C879;
    --star-glow:       rgba(232, 179, 75, 0.35);

    /* 背景 — Warm White / Star Night */
    --bg-primary:      #F8F5F2;
    --bg-warm:         #FBF8F5;
    --bg-pink:         #FDF2F3;
    --star-night:      #260D16;

    /* 卡片 / 面板 — 高不透明玻璃展陈表面 */
    --panel-bg:        rgba(255, 255, 255, 0.88);
    --panel-bg-hover:  rgba(255, 255, 255, 0.96);
    --panel-border:    rgba(122, 84, 88, 0.18);
    --panel-border-hover: rgba(217, 39, 63, 0.32);
    --glass-blur:      10px;

    /* 文字 */
    --text-primary:    #2d1a1c;
    --text-secondary:  #6b4c4e;
    --text-muted:      #a8888a;
    --text-white:      #ffffff;
    --text-dark:       #260D16;

    /* 圆角 */
    --radius-sm:       6px;
    --radius-md:       8px;
    --radius-lg:       12px;
    --radius-xl:       16px;
    --radius-full:     9999px;

    /* 阴影 — 紧凑中性，只表达真实层级 */
    --shadow-sm:       0 1px 2px rgba(38, 13, 22, 0.05);
    --shadow-md:       0 6px 18px -12px rgba(38, 13, 22, 0.28);
    --shadow-lg:       0 12px 28px -18px rgba(38, 13, 22, 0.34);
    --shadow-red:      0 2px 8px rgba(217, 39, 63, 0.16);
    --shadow-star:     0 2px 8px rgba(232, 179, 75, 0.18);

    /* 过渡 */
    --ease-bounce:     cubic-bezier(0.22, 1, 0.36, 1);
    --ease-smooth:     cubic-bezier(0.22, 1, 0.36, 1);
    --dur-fast:        150ms;
    --dur-normal:      300ms;
    --dur-slow:        500ms;

    /* 字体 */
    --font-heading:    'Songti SC', 'STSong', 'SimSun', serif;
    --font-body:       'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', system-ui, sans-serif;
    --font-en:         system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ============================================================
   寻找 Lynn
   ============================================================ */
.links-page {
    width: min(100%, 1160px);
    margin: 0 auto;
    padding: 2px 0 34px;
}

.links-page-header {
    margin-bottom: 18px;
    padding: 6px 4px 14px;
    border-bottom: 1px solid var(--panel-border);
}

.links-page-header h2 {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.2;
}

.links-group + .links-group {
    margin-top: 26px;
}

.links-group-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 10px;
    padding: 0 4px;
}

.links-group-heading h3 {
    font-family: var(--font-heading);
    font-size: 1.12rem;
}

.links-group-heading span {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.links-primary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.links-companion-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.9);
}

.lynn-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--panel-border);
    border-top-color: color-mix(in srgb, var(--platform-accent) 55%, var(--panel-border));
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: none;
    isolation: isolate;
}

.lynn-card-primary {
    display: flex;
    flex-direction: column;
    min-height: 184px;
    padding: 20px 22px;
}

.lynn-card-primary .lynn-card-body {
    align-items: flex-start;
}

.lynn-card-primary .lynn-card-copy h4 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.lynn-card-compact {
    min-height: 128px;
    padding: 15px 14px;
    border: 0;
    border-right: 1px solid var(--panel-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.lynn-card-compact:last-child {
    border-right: 0;
}

.lynn-card-hit {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.lynn-card:has(.lynn-card-hit:focus-visible) {
    outline: 2px solid var(--platform-accent);
    outline-offset: 2px;
}

.lynn-card-platform {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 15px;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
}

.lynn-card-platform > img {
    display: block;
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.lynn-card.avatar-fallback .lynn-card-platform > img {
    display: none;
}

.lynn-card-body {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
}

.lynn-card-avatar {
    position: relative;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    overflow: hidden;
    border: 1px solid var(--panel-border);
    border-radius: 50%;
    background: #f4f0ef;
}

.lynn-card-avatar img {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 30px;
    height: 30px;
    object-fit: contain;
    transform: translate(-50%, -50%);
}

.lynn-card-avatar .lynn-card-avatar-photo {
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lynn-card-avatar.is-fallback .lynn-card-avatar-photo {
    display: none;
}

.lynn-card-avatar-platform {
    border-color: transparent;
    background: transparent;
}

.lynn-card-copy {
    min-width: 0;
}

.lynn-card-copy h4 {
    overflow-wrap: anywhere;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.35;
}

.lynn-card-handle {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lynn-card-handle {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 0.7rem;
}

.lynn-card-note {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.lynn-card-action {
    position: absolute;
    right: 18px;
    top: 20px;
    z-index: 1;
    color: var(--platform-accent);
    font-size: 0.72rem;
    font-weight: 700;
    opacity: 0;
    transform: translateX(-5px);
    transition: opacity var(--dur-fast) ease, transform var(--dur-fast) ease;
}

.lynn-card:hover .lynn-card-action,
.lynn-card:focus-within .lynn-card-action,
.lynn-card.is-copied .lynn-card-action {
    opacity: 1;
    transform: translateX(0);
}

.lynn-card-sub {
    position: absolute;
    right: 18px;
    bottom: 16px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 32px;
    padding: 5px 1px;
    border-bottom: 1px solid var(--panel-border-hover);
    color: var(--red-primary);
    font-size: 0.72rem;
    font-weight: 700;
}

.lynn-card-sub:focus-visible {
    outline: 2px solid var(--platform-accent);
    outline-offset: 3px;
}

.lynn-card-compact .lynn-card-platform {
    margin-bottom: 11px;
}

.lynn-card-compact .lynn-card-body {
    align-items: flex-start;
    gap: 9px;
}

.lynn-card-compact .lynn-card-avatar {
    width: 38px;
    height: 38px;
    font-size: 0.62rem;
}

.lynn-card-compact .lynn-card-copy h4 {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.78rem;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.lynn-card-compact .lynn-card-action {
    top: auto;
    right: 12px;
    bottom: 10px;
}

.links-loading,
.links-error {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    border: 1px solid var(--panel-border);
    color: var(--text-muted);
    font-size: 0.82rem;
}

.links-error span {
    margin-top: 4px;
    font-size: 0.72rem;
}

.links-status {
    position: fixed;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

.profile-links-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    min-height: 84px;
    padding: 18px 16px;
    border: 0;
    border-top: 1px solid var(--panel-border);
    border-bottom: 1px solid var(--panel-border);
    border-radius: 0;
    background: transparent;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
}

.profile-signature {
    margin: 18px 4px 10px;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-align: right;
}

.profile-links-entry strong {
    font-family: var(--font-heading);
    font-size: 1.15rem;
}

.profile-links-entry-arrow {
    color: var(--red-primary);
    font-size: 1.45rem;
    transition: transform var(--dur-fast) ease;
}

.profile-links-entry:hover .profile-links-entry-arrow,
.profile-links-entry:focus-visible .profile-links-entry-arrow {
    transform: translateX(5px);
}

@media (max-width: 1100px) and (min-width: 721px) {
    .links-primary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .links-companion-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .links-page {
        width: 100%;
        padding: 18px 14px 26px;
    }

    .links-page-header {
        margin-bottom: 16px;
        padding: 0 2px 13px;
    }

    .links-page-header h2 {
        font-size: 1.55rem;
    }

    .links-group + .links-group {
        margin-top: 17px;
    }

    .links-group-heading {
        margin-bottom: 8px;
        padding: 0 2px;
    }

    .links-group-heading h3 {
        font-size: 1rem;
    }

    .links-primary-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .lynn-card-primary {
        min-height: 104px;
        padding: 13px 14px;
    }

    .lynn-card-primary .lynn-card-platform {
        position: absolute;
        top: 12px;
        right: 13px;
        margin: 0;
    }

    .lynn-card-primary .lynn-card-body {
        min-height: 76px;
        padding-right: 72px;
    }

    .lynn-card-primary .lynn-card-avatar {
        width: 52px;
        height: 52px;
    }

    .lynn-card-copy h4 {
        font-size: 0.9rem;
    }

    .lynn-card-note {
        margin-top: 4px;
        font-size: 0.7rem;
    }

    .lynn-card-action {
        top: auto;
        right: 13px;
        bottom: 12px;
        opacity: 1;
        transform: none;
    }

    .lynn-card-sub {
        right: 84px;
        bottom: 5px;
        min-height: 38px;
    }

    .links-companion-list {
        display: flex;
        gap: 0;
        margin: 0;
        padding: 0;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }

    .links-companion-list::-webkit-scrollbar {
        display: none;
    }

    .lynn-card-compact {
        flex: 0 0 min(72vw, 258px);
        min-height: 116px;
        scroll-snap-align: start;
    }

    .profile-links-entry {
        min-height: 78px;
        padding: 16px 18px;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lynn-card-action,
    .profile-links-entry-arrow {
        transition: none;
    }
}

/* ============================================================
   REACT BITS MOTION LAYER
   Dependency-free adaptations for the existing async page shell.
   ============================================================ */
.rb-click-spark {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: block;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
}

.rb-reveal {
    --rb-delay: 0ms;
    opacity: 0;
    filter: blur(9px);
    transform: translate3d(0, 34px, 0) scale(0.975);
    transition:
        opacity 680ms cubic-bezier(0.16, 0.84, 0.18, 1) var(--rb-delay),
        filter 760ms cubic-bezier(0.16, 0.84, 0.18, 1) var(--rb-delay),
        transform 760ms cubic-bezier(0.16, 0.84, 0.18, 1) var(--rb-delay);
    will-change: opacity, filter, transform;
}

.rb-reveal.rb-revealed {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0) scale(1);
    will-change: auto;
}

.rb-motion-card {
    --rb-mouse-x: 50%;
    --rb-mouse-y: 50%;
    --rb-tilt-x: 0deg;
    --rb-tilt-y: 0deg;
    --rb-lift: 0px;
    position: relative;
    isolation: isolate;
    transform: perspective(1000px) translate3d(0, var(--rb-lift), 0) rotateX(var(--rb-tilt-x)) rotateY(var(--rb-tilt-y));
    transform-style: preserve-3d;
    transition:
        opacity 680ms cubic-bezier(0.16, 0.84, 0.18, 1) var(--rb-delay, 0ms),
        filter 760ms cubic-bezier(0.16, 0.84, 0.18, 1) var(--rb-delay, 0ms),
        transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
        border-color 220ms ease,
        box-shadow 220ms ease;
}

.rb-motion-card.rb-reveal {
    transform: perspective(1000px) translate3d(0, calc(34px + var(--rb-lift)), 0) rotateX(var(--rb-tilt-x)) rotateY(var(--rb-tilt-y)) scale(0.975);
}

.rb-motion-card.rb-reveal.rb-revealed {
    transform: perspective(1000px) translate3d(0, var(--rb-lift), 0) rotateX(var(--rb-tilt-x)) rotateY(var(--rb-tilt-y)) scale(1);
}

@media (hover: hover) and (pointer: fine) {
    .rb-motion-card:hover {
        --rb-lift: -5px;
    }
}

.rb-card-spotlight {
    position: absolute;
    inset: -1px;
    z-index: 5;
    overflow: hidden;
    border-radius: inherit;
    background: radial-gradient(circle 190px at var(--rb-mouse-x) var(--rb-mouse-y), rgba(255, 255, 255, 0.42), rgba(232, 179, 75, 0.1) 34%, transparent 72%);
    mix-blend-mode: soft-light;
    opacity: 0;
    pointer-events: none;
    transition: opacity 360ms ease;
}

.rb-card-spotlight::after {
    content: '';
    position: absolute;
    inset: -45%;
    background: linear-gradient(112deg, transparent 38%, rgba(255, 255, 255, 0.38) 48%, transparent 58%);
    transform: translate3d(-58%, 28%, 0) rotate(4deg);
    opacity: 0;
    transition: transform 760ms cubic-bezier(0.16, 0.84, 0.18, 1), opacity 260ms ease;
}

.rb-motion-card:hover .rb-card-spotlight,
.rb-motion-card:focus-within .rb-card-spotlight {
    opacity: 0.72;
}

.rb-motion-card:hover .rb-card-spotlight::after,
.rb-motion-card:focus-within .rb-card-spotlight::after {
    transform: translate3d(58%, -28%, 0) rotate(4deg);
    opacity: 0.7;
}

.rb-magnet {
    --rb-magnet-x: 0px;
    --rb-magnet-y: 0px;
    translate: var(--rb-magnet-x) var(--rb-magnet-y);
    transition:
        translate 320ms cubic-bezier(0.22, 1, 0.36, 1),
        color var(--dur-fast) ease,
        background-color var(--dur-fast) ease,
        border-color var(--dur-fast) ease;
    will-change: translate;
}

.rb-revealed:is(.section-head, .archive-header, .profile-section-heading, .calendar-header, .pocket-page-header, .links-page-header) h2 {
    animation: rbTitleResolve 760ms cubic-bezier(0.16, 0.84, 0.18, 1) calc(var(--rb-delay, 0ms) + 80ms) both;
}

@keyframes rbTitleResolve {
    from { opacity: 0; filter: blur(8px); transform: translate3d(0, 65%, 0) rotate(2deg); }
    to { opacity: 1; filter: blur(0); transform: translate3d(0, 0, 0) rotate(0); }
}

@media (max-width: 720px) {
    .rb-reveal {
        filter: blur(5px);
        transform: translate3d(0, 24px, 0) scale(0.985);
    }

    .rb-motion-card,
    .rb-motion-card.rb-reveal,
    .rb-motion-card.rb-reveal.rb-revealed {
        --rb-tilt-x: 0deg !important;
        --rb-tilt-y: 0deg !important;
    }

    .rb-card-spotlight {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rb-reveal,
    .rb-motion-card {
        opacity: 1 !important;
        filter: none !important;
        transform: none !important;
    }

    .rb-click-spark,
    .rb-card-spotlight {
        display: none !important;
    }
}

/* ============================================================
   HOME PHOTO STAGE
   The glass treatment is intentionally limited to media controls.
   ============================================================ */
html.home-intro-pending .wiki-header .brand-mark,
html.home-intro-pending .wiki-header .brand-copy,
html.home-intro-pending #tab-nav,
html.home-intro-pending .hero-photo-count,
html.home-intro-pending .floating-gallery .floating-photo {
    opacity: 0;
}

html.home-intro-pending .wiki-header .brand-mark,
html.home-intro-pending .wiki-header .brand-copy {
    filter: blur(7px);
    translate: 0 -10px;
}

html.home-intro-pending #tab-nav {
    filter: blur(7px);
    translate: 0 12px;
}

html.home-intro-pending .hero-photo-count {
    translate: 0 8px;
}

html.home-intro-pending .home-intro-shade {
    background-color: rgba(19, 8, 13, 0.72);
}

html.home-intro-pending .floating-gallery .floating-photo {
    filter: blur(5px);
    translate: 0 18px;
}

html.home-intro-pending .wiki-header .brand-mark {
    animation-play-state: paused;
}

html.home-intro-pending .hero-cover .carousel-slide.active .carousel-photo {
    opacity: 0.5;
    filter: blur(16px) saturate(0.68) contrast(0.9) brightness(0.8);
    transform: scale(1.055);
}

/* The entrance starts as soon as the document is usable, independent of the
   deferred application bundle. */
.wiki-header .brand-mark,
.wiki-header .brand-copy,
#tab-nav,
.hero-photo-count,
.hero-cover .carousel-slide.active .carousel-photo,
.home-intro-shade {
    transition: opacity 520ms cubic-bezier(0.16, 1, 0.3, 1),
        filter 520ms cubic-bezier(0.16, 1, 0.3, 1),
        translate 520ms cubic-bezier(0.16, 1, 0.3, 1),
        transform 760ms cubic-bezier(0.22, 0.61, 0.36, 1),
        background-color 760ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

body.on-home #tab-nav {
    background: rgba(28, 12, 18, 0.52);
    border-color: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(18px) saturate(1.15);
    -webkit-backdrop-filter: blur(18px) saturate(1.15);
}

body.on-home {
    background: #160a0f;
}

body.on-home .hero-cover .carousel-stage {
    margin: 0;
    height: 100%;
    border: 0;
    border-radius: 0;
    background: #160a0f;
    isolation: isolate;
}

body.on-home .hero-cover .carousel-stage::before,
body.on-home .hero-cover .hero-glow,
body.on-home .hero-cover .hero-overlay,
body.on-home .hero-cover .carousel-dots-wrap,
body.on-home .hero-cover .carousel-btn {
    display: none;
}

body.on-home .hero-cover .carousel-stage::after {
    content: '';
    display: block;
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    background: radial-gradient(circle 360px at var(--pointer-x, 50%) var(--pointer-y, 50%), rgba(255, 238, 225, 0.17), rgba(255, 255, 255, 0.035) 34%, transparent 72%);
    mix-blend-mode: soft-light;
    transition: background-position 180ms ease-out;
}

.home-intro-shade {
    position: absolute;
    inset: 0;
    z-index: 3;
    background-color: rgba(19, 8, 13, 0);
    pointer-events: none;
    will-change: background-color;
}

body.on-home .hero-cover .carousel-track {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: auto;
    height: auto;
    overflow: hidden;
    isolation: isolate;
    transform: none;
    transition: none;
    perspective: 1400px;
    transform-style: preserve-3d;
}

body.on-home .hero-cover .carousel-slide,
body.on-home .hero-cover .carousel-slide:nth-child(2) {
    display: grid;
    place-items: center;
    background: none;
    opacity: 0;
    transform: none;
    animation: none;
    transition: opacity 650ms ease;
}

body.on-home .hero-cover .carousel-slide::before {
    content: '';
    position: absolute;
    inset: -5%;
    z-index: 0;
    background-position: center;
    background-size: cover;
    opacity: 0;
    filter: none;
    transform: scale(1.03);
}

body.on-home .hero-cover .carousel-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(15, 7, 10, 0.42);
    opacity: 0;
    pointer-events: none;
}

body.on-home .hero-cover .carousel-slide.is-portrait::before {
    background-image: var(--desktop-cover);
    opacity: 0.7;
}

body.on-home .hero-cover .carousel-slide.is-portrait::after {
    opacity: 1;
}

body.on-home .hero-cover .carousel-slide.active {
    opacity: 1;
    animation: none;
}

body.on-home .hero-cover .carousel-slide.is-card-entering,
body.on-home .hero-cover .carousel-slide.is-card-leaving {
    animation: none;
    backface-visibility: hidden;
    will-change: transform, opacity, filter;
}

body.on-home .hero-cover .carousel-slide.is-card-entering {
    z-index: 3;
}

body.on-home .hero-cover .carousel-slide.is-card-leaving {
    z-index: 2;
}

.carousel-picture,
.carousel-photo {
    display: block;
    width: 100%;
    height: 100%;
}

.carousel-picture {
    position: relative;
    z-index: 1;
}

.carousel-photo {
    object-fit: cover;
    object-position: center;
    transform-origin: 50% 42%;
}

.carousel-slide.is-portrait .carousel-photo {
    object-fit: contain;
}

/* Portrait source on desktop keeps the complete frame over a cover background,
   matching the mobile stage treatment for the unused side space. */
@media (min-width: 721px) {
    body.on-home .hero-cover .carousel-slide.is-portrait .carousel-picture {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        min-height: 0;
    }

    body.on-home .hero-cover .carousel-slide.is-portrait .carousel-photo {
        width: auto;
        max-width: 100%;
        max-height: 100%;
        height: 100%;
        min-width: 0;
        min-height: 0;
        object-fit: contain;
    }

    body.on-home .hero-cover .carousel-slide.is-portrait::before {
        background-size: cover;
        background-repeat: no-repeat;
        opacity: 0.72;
    }

    body.on-home .hero-cover .carousel-slide.is-portrait::after {
        opacity: 1;
    }
}

.floating-gallery {
    --home-thumb-width: clamp(134px, 13.5vw, 204px);
    position: absolute;
    right: clamp(42px, 6vw, 90px);
    bottom: clamp(104px, 13vh, 134px);
    z-index: 8;
    width: calc(var(--home-thumb-width) * 2.7);
    max-width: none;
    height: calc(var(--home-thumb-width) * 1.34);
    pointer-events: none;
    perspective: 1000px;
    transform: translate3d(var(--gallery-shift-x, 0), var(--gallery-shift-y, 0), 0);
    opacity: 1;
    filter: blur(0);
    transition:
        transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 260ms ease,
        filter 320ms ease;
}

.floating-photo {
    --fan-x: 0px;
    --fan-y: 0px;
    --fan-rotate: 0deg;
    --card-scale: 1;
    --active-lift: 0px;
    --tilt-x: 0deg;
    --tilt-y: 0deg;
    --hover-lift: 0px;
    position: absolute;
    right: 0;
    bottom: 0;
    width: var(--home-thumb-width);
    height: auto;
    margin: 0;
    aspect-ratio: 4 / 3;
    padding: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.13);
    box-shadow:
        inset 0 1px rgba(255, 255, 255, 0.48),
        0 2px 7px rgba(8, 3, 5, 0.22),
        0 14px 24px -20px rgba(8, 3, 5, 0.72);
    backdrop-filter: blur(13px) saturate(1.18);
    -webkit-backdrop-filter: blur(13px) saturate(1.18);
    cursor: pointer;
    pointer-events: auto;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: transform;
    transform: translate3d(var(--fan-x), calc(var(--fan-y) + var(--hover-lift) + var(--active-lift)), 0) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) rotateZ(var(--active-rotate, var(--fan-rotate))) scale(var(--card-scale));
    transition:
        transform 480ms cubic-bezier(0.22, 1, 0.36, 1),
        background-color 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease,
        opacity 280ms ease;
}

.floating-photo:nth-child(5n + 1) { --fan-x: calc(var(--home-thumb-width) * -1.63); --fan-y: 13px; --fan-rotate: -6deg; z-index: 5; opacity: 0.84; }
.floating-photo:nth-child(5n + 2) { --fan-x: calc(var(--home-thumb-width) * -1.2); --fan-y: -7px; --fan-rotate: -2deg; z-index: 6; opacity: 0.9; }
.floating-photo:nth-child(5n + 3) { --fan-x: calc(var(--home-thumb-width) * -0.79); --fan-y: -15px; --fan-rotate: 1.5deg; z-index: 7; opacity: 0.94; }
.floating-photo:nth-child(5n + 4) { --fan-x: calc(var(--home-thumb-width) * -0.39); --fan-y: -8px; --fan-rotate: 4deg; z-index: 8; opacity: 0.9; }
.floating-photo:nth-child(5n + 5) { --fan-x: 0px; --fan-y: 11px; --fan-rotate: 7deg; z-index: 9; opacity: 0.84; }

.floating-photo picture,
.floating-photo img {
    display: block;
    width: 100%;
    height: 100%;
}

.floating-photo picture {
    background: rgba(15, 8, 12, 0.86);
}

.floating-photo img {
    border-radius: 4px;
    object-fit: cover;
    opacity: 0;
    transition: opacity 320ms ease;
}

.floating-photo.is-thumb-ready img {
    opacity: 1;
}

.floating-photo.is-portrait-card img {
    object-fit: contain;
}

.floating-photo:hover,
.floating-photo:focus-visible {
    --hover-lift: -14px;
    border-color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.2);
    box-shadow:
        inset 0 1px rgba(255, 255, 255, 0.62),
        0 3px 9px rgba(8, 3, 5, 0.3);
}

.floating-photo:focus-visible {
    outline-color: #fff;
}

.floating-photo.is-active {
    --active-lift: -13px;
    --active-rotate: 0deg;
    --card-scale: 1.035;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    border-color: rgba(255, 255, 255, 0.9);
}

.home-copy-panel {
    position: absolute;
    bottom: 28px;
    left: 158px;
    z-index: 9;
    width: min(600px, calc(100vw - 190px));
    color: #fff;
    isolation: isolate;
}

.home-copy-panel::before {
    position: absolute;
    inset: -42px -72px -30px -118px;
    z-index: -1;
    background: linear-gradient(90deg, rgba(12, 5, 8, 0.68) 0%, rgba(12, 5, 8, 0.42) 58%, transparent 100%);
    content: '';
    pointer-events: none;
}

.home-feed-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-top: 28px;
}

.hero-photo-count {
    display: flex;
    flex: 0 0 auto;
    align-items: baseline;
    gap: 6px;
    color: rgba(255, 255, 255, 0.62);
    font-family: var(--font-en);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
}

.home-feed-caption {
    width: min(520px, 48vw);
}

.home-feed-caption blockquote {
    display: -webkit-box;
    margin: 0;
    padding-left: 14px;
    overflow: hidden;
    border-left: 2px solid var(--star-gold);
    font-size: clamp(0.88rem, 1.2vw, 1.05rem);
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: 0;
    text-wrap: pretty;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.home-quote-muted {
    color: rgba(255, 255, 255, 0.5);
}

.home-feed-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 8px;
    padding-left: 16px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.75rem;
}

.home-feed-caption time { font-family: var(--font-en); }
.home-feed-caption a { color: rgba(255, 255, 255, 0.72); text-decoration: none; transition: color 150ms ease; }
.home-feed-caption a:hover { color: #fff; text-decoration: underline; }
.home-feed-caption a:focus-visible { outline: 1px solid var(--star-gold); outline-offset: 3px; }

.home-source-switch {
    display: flex;
    align-items: center;
    gap: 4px;
}

.home-source-switch button {
    position: relative;
    min-width: 44px;
    height: 32px;
    padding: 0 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0;
    cursor: pointer;
    transition: color 150ms ease;
}

.home-source-switch button::after {
    position: absolute;
    right: 8px;
    bottom: 1px;
    left: 8px;
    height: 2px;
    background: var(--star-gold);
    content: '';
    opacity: 0;
    transform: scaleX(0.35);
    transition: opacity 150ms ease, transform 150ms ease;
}

.home-source-switch button:hover { color: #fff; }
.home-source-switch button.active { color: #fff; }
.home-source-switch button.active::after { opacity: 1; transform: scaleX(1); }
.home-source-switch button:focus-visible { outline: 1px solid var(--star-gold); outline-offset: 1px; }

.hero-photo-count #photo-index {
    color: #fff;
    font-size: 1rem;
}

.hero-auto-progress {
    position: relative;
    display: block;
    width: 42px;
    height: 2px;
    margin-left: 6px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.25);
}

.hero-auto-progress i {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.92);
    transform: scaleX(0);
    transform-origin: left center;
}

.carousel-stage.is-auto-counting .hero-auto-progress i {
    animation: heroAutoProgress 6500ms linear forwards;
}

@keyframes heroAutoProgress {
    to { transform: scaleX(1); }
}

@media (max-width: 720px) {
    body.on-home #tab-nav {
        background: rgba(255, 255, 255, 0.84);
        border-color: rgba(38, 13, 22, 0.12);
        backdrop-filter: blur(18px) saturate(1.2);
        -webkit-backdrop-filter: blur(18px) saturate(1.2);
    }

    body.on-home .hero-cover .carousel-slide,
    body.on-home .hero-cover .carousel-slide:nth-child(2) {
        background: none;
    }

    body.on-home .hero-cover .carousel-slide::before {
        background-image: var(--mobile-cover);
        opacity: 0.72;
    }

    body.on-home .hero-cover .carousel-slide::after {
        opacity: 1;
    }

    .hero-cover .carousel-picture {
        height: calc(100% - 92px);
        padding-bottom: 0;
        align-self: start;
    }

    .hero-cover .carousel-photo {
        object-fit: contain;
        object-position: center;
    }

    .floating-gallery {
        --home-thumb-width: 84px;
        inset: auto 9px 16px auto;
        display: block;
        width: calc(100% - 18px);
        max-width: none;
        height: 116px;
        padding: 0;
        overflow: visible;
        pointer-events: auto;
    }

    .floating-photo,
    .floating-photo.is-portrait-card {
        position: absolute;
        right: 50%;
        bottom: 4px;
        width: var(--home-thumb-width);
        height: auto;
        margin: 0;
        aspect-ratio: 4 / 3;
        padding: 3px;
        border-radius: 7px;
        transform: translate3d(calc(50% + var(--mobile-x, 0px)), calc(var(--mobile-y, 0px) + var(--active-lift, 0px) + var(--hover-lift, 0px)), 0) rotate(var(--active-rotate, var(--mobile-rotate, 0deg))) scale(var(--mobile-scale, 1));
        animation: none;
    }

    .floating-photo:nth-child(5n + 1) { --mobile-x: -134px; --mobile-y: 13px; --mobile-rotate: -6deg; }
    .floating-photo:nth-child(5n + 2) { --mobile-x: -69px; --mobile-y: 2px; --mobile-rotate: -2deg; }
    .floating-photo:nth-child(5n + 3) { --mobile-x: 0px; --mobile-y: -4px; --mobile-rotate: 0deg; }
    .floating-photo:nth-child(5n + 4) { --mobile-x: 69px; --mobile-y: 2px; --mobile-rotate: 2deg; }
    .floating-photo:nth-child(5n + 5) { --mobile-x: 134px; --mobile-y: 13px; --mobile-rotate: 6deg; }

    .floating-photo.is-active {
        --mobile-rotate: 0deg;
    }

    .floating-photo img {
        border-radius: 3px;
    }

    .floating-photo.is-active {
        --active-lift: -8px;
        --mobile-scale: 1.045;
        visibility: visible;
        opacity: 1;
        border-color: rgba(255, 255, 255, 0.96);
        box-shadow:
            inset 0 1px rgba(255, 255, 255, 0.72),
            0 0 0 2px rgba(217, 39, 63, 0.82);
        pointer-events: auto;
    }

    .hero-photo-count {
        gap: 3px;
        font-size: 0.72rem;
        letter-spacing: 0.04em;
    }

    .home-copy-panel {
        right: 18px;
        bottom: 164px;
        left: 18px;
        width: auto;
    }

    .home-copy-panel::before {
        inset: -36px -18px -24px;
        background: linear-gradient(0deg, rgba(12, 5, 8, 0.74) 0%, rgba(12, 5, 8, 0.48) 70%, transparent 100%);
    }

    .home-feed-caption {
        width: min(100%, 34rem);
    }

    .home-feed-caption blockquote {
        font-size: 0.86rem;
        line-height: 1.55;
    }

    .home-feed-controls {
        gap: 8px;
        margin-top: 22px;
    }

    .home-source-switch {
        flex: 0 0 auto;
        gap: 0;
    }

    .home-source-switch button {
        flex: 0 0 auto;
        min-width: 40px;
        height: 36px;
        padding-inline: 5px;
        font-size: 0.68rem;
        white-space: nowrap;
    }

    .hero-auto-progress {
        width: 28px;
        margin-left: 0;
    }

    body:not(.on-home) .wiki-header,
    body:not(.on-home) .tab-nav,
    body:not(.on-home) .panel,
    body:not(.on-home) .profile-intro,
    body:not(.on-home) .replay-sidebar,
    body:not(.on-home) .pocket48-page-panel .pocket48-feed {
        background-color: rgba(255, 255, 255, 0.94);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

/* ----- Reset & Base ----- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
    background: var(--bg-primary);
}

button, input, textarea, select {
    font: inherit;
    color: inherit;
}

a { color: var(--red-primary); text-decoration: none; }
a:hover { color: var(--red-dark); }

:where(a, button, input, textarea, select, [tabindex]):focus-visible {
    outline: 2px solid var(--red-primary);
    outline-offset: 3px;
}

/* ----- Stars Canvas Background ----- */
.stars-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ----- Sparkle Container ----- */
.sparkle-container {
    position: fixed;
    inset: 0;
    z-index: 999;
    pointer-events: none;
}

/* ----- Page Shell ----- */
.page-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding: 20px 24px 88px 148px; /* 左侧为档案索引轨道留出空间，底部避让备案条 */
    max-width: 1400px;
    margin: 0 auto;
}

/* ============================================================
   HEADER
   ============================================================ */

.wiki-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 22px;
    padding: 20px 28px;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(12px) saturate(1.05);
    -webkit-backdrop-filter: blur(12px) saturate(1.05);
    transition: background-color 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease;
}

.wiki-header.is-layout-animating {
    position: relative;
    z-index: 40;
    transform-origin: left top;
    will-change: transform;
}

/* header 内文字/徽章在首页态切换时的平滑变色 */
.wiki-header .eyebrow,
.wiki-header .brand-copy h1,
.wiki-header .brand-mark {
    transition: background-color 0.45s ease, color 0.45s ease, border-color 0.45s ease;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: var(--radius-md);
    background: #FFF8F1;
    border: 1px solid var(--panel-border);
    color: var(--star-gold);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.brand-star {
    display: block;
    width: 27px;
    height: 27px;
    overflow: visible;
    color: var(--star-gold);
    filter: drop-shadow(0 1px 2px rgba(90, 49, 8, 0.22));
    transition: opacity 100ms linear;
}

.brand-star path {
    fill: currentColor;
}

.eyebrow {
    font-family: var(--font-en);
    color: var(--red-primary);
    text-transform: uppercase;
    letter-spacing: 0.26em;
    font-size: 0.68rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.brand-copy h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.35rem, 2vw, 1.85rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.25;
    margin-bottom: 3px;
    color: var(--text-primary);
}

/* ============================================================
   TAB NAVIGATION
   ============================================================ */

/* Archive Index Rail —— 左侧档案索引轨道 */
.tab-nav {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 128px;
    margin: 0;
    padding: 6px 12px 6px 18px;
    background: rgba(255, 255, 255, 0.66);
    border: 0;
    border-right: 1px solid rgba(107, 76, 78, 0.26);
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: blur(10px) saturate(1.04);
    -webkit-backdrop-filter: blur(10px) saturate(1.04);
    isolation: isolate;
}

.tab-nav::after {
    content: '';
    position: absolute;
    inset: -18px -20px -18px 0;
    z-index: -1;
    background: transparent;
    pointer-events: none;
}

.tab-nav::-webkit-scrollbar { width: 0; height: 0; }

.tab-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 42px;
    padding: 9px 8px 9px 12px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    white-space: nowrap;
    transition: color var(--dur-fast) ease;
    user-select: none;
}

.tab-btn::before {
    content: '';
    position: absolute;
    left: -19px;
    top: 50%;
    width: 2px;
    height: 0;
    background: var(--red-primary);
    transform: translateY(-50%);
    transition: height var(--dur-fast) ease;
}

.tab-btn:hover:not(.active) {
    background: transparent;
    color: var(--red-primary);
}

.tab-btn.active {
    background: transparent;
    color: var(--red-primary);
    font-weight: 700;
    box-shadow: none;
}

.tab-btn.active::before {
    height: 22px;
}

body.on-home .tab-nav {
    border-right-color: rgba(255, 255, 255, 0.28);
}

body.on-home .tab-nav::after {
    background: linear-gradient(90deg, rgba(38, 13, 22, 0.48), rgba(38, 13, 22, 0.14) 72%, transparent);
}

body.on-home .tab-btn {
    color: rgba(255, 255, 255, 0.74);
    text-shadow: 0 1px 10px rgba(38, 13, 22, 0.45);
}

body.on-home .tab-btn:hover:not(.active),
body.on-home .tab-btn.active {
    color: #fff;
}

body.on-home .tab-btn.active::before {
    background: var(--star-gold);
}

.tab-btn:focus-visible {
    outline-width: 1px;
}

body.on-home .tab-btn:focus-visible {
    outline-color: var(--star-gold);
}

.tab-icon {
    font-size: 1.1rem;
}

/* ============================================================
   TAB PANELS
   ============================================================ */

.tab-panel {
    display: none;
    animation: none;
}

.tab-panel.active {
    display: block;
}

.tab-panel.active:not(#panel-home) {
    animation: contentStageIn 680ms cubic-bezier(0.16, 0.84, 0.18, 1) both;
}

@keyframes contentStageIn {
    from {
        opacity: 0;
        filter: blur(10px);
        transform: translate3d(22px, 18px, 0) scale(0.988);
        clip-path: inset(0 0 7% 0 round 12px);
    }
    to {
        opacity: 1;
        filter: blur(0);
        transform: translate3d(0, 0, 0) scale(1);
        clip-path: inset(0 0 0 0 round 0);
    }
}

/* ============================================================
   SECTION HEAD —— 中文标题 + 英文副题
   ============================================================ */
.section-head { line-height: 1.2; }

.section-en {
    font-family: var(--font-en);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--red-primary);
    margin-bottom: 4px;
}

/* ============================================================
   EMPTY STATE —— 有情绪的等待
   ============================================================ */
.empty-state {
    padding: 56px 24px;
    text-align: center;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.8;
}

.empty-state::before {
    display: none;
}

.empty-state span {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 400;
}

/* ============================================================
   HOME LAYOUT
   ============================================================ */

.wiki-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 22px;
}

.wiki-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.wiki-main {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* ============================================================
   PANELS (Glassmorphism Cards)
   ============================================================ */

.panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: background-color var(--dur-fast) ease,
                border-color var(--dur-fast) ease;
}

.panel:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--panel-border-hover);
}

.panel-label {
    color: var(--red-primary);
    letter-spacing: 0;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 10px;
}

/* ============================================================
   PROFILE PANEL (Sidebar)
   ============================================================ */

.profile-panel {
    padding: 20px;
    text-align: center;
}

.star-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, rgba(232, 179, 75, 0.18), rgba(255, 215, 0, 0.1));
    border: 1px solid rgba(232, 179, 75, 0.28);
    color: var(--star-gold);
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 14px;
    animation: starPulse 2.5s ease-in-out infinite;
}

.profile-avatar {
    width: 88px;
    height: 88px;
    margin: 0 auto 12px;
    position: relative;
}

.avatar-ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red-primary), var(--star-gold));
    padding: 3px;
    position: relative;
}

.avatar-ring::after {
    content: '⭐';
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #fff;
    font-size: 2rem;
}

.profile-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 2px;
}

.profile-subtitle {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 16px;
}

.facts-list {
    display: grid;
    gap: 8px;
    text-align: left;
}

.fact-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: rgba(217, 39, 63, 0.03);
    border: 1px solid rgba(217, 39, 63, 0.06);
}

.fact-item dt {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.fact-item dd {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 0.9rem;
}

.color-swatch {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.8);
    box-shadow: 0 0 6px var(--red-glow);
    flex-shrink: 0;
}

/* ============================================================
   POCKET48 PANEL (Sidebar)
   ============================================================ */

.pocket48-panel {
    padding: 16px;
}

.pocket48-feed {
    display: grid;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
}

.pocket48-feed::-webkit-scrollbar {
    width: 4px;
}

.pocket48-feed::-webkit-scrollbar-thumb {
    background: rgba(217, 39, 63,0.12);
    border-radius: 10px;
}

.pocket48-item {
    display: block;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: #fff;
    border: 1px solid var(--panel-border);
    transition: background-color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}

.pocket48-item:hover {
    background: rgba(217, 39, 63,0.04);
    border-color: rgba(217, 39, 63,0.15);
}

.pocket48-sender {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--red-primary);
    margin-bottom: 2px;
}

.pocket48-text {
    font-size: 0.83rem;
    line-height: 1.5;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.pocket48-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.73rem;
    color: var(--text-muted);
}

.pocket48-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    font-weight: 600;
}

.pocket48-badge.badge-pocket {
    background: rgba(217, 39, 63,0.08);
    color: var(--red-primary);
}

.pocket48-badge.badge-img {
    background: rgba(232, 179, 75,0.12);
    color: var(--star-gold);
    margin-left: 4px;
}

.pocket48-badge.badge-voice {
    background: #F3EEEE;
    color: var(--text-secondary);
    margin-left: 4px;
}

.pocket48-loading,
.pocket48-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.pocket48-error {
    padding: 14px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ============================================================
   POCKET48 PAGE
   ============================================================ */

.pocket-page {
    max-width: 1180px;
    margin: 0 auto;
}

.pocket-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
    padding: 8px 0 18px;
    border-bottom: 1px solid var(--panel-border);
}

.pocket-page-header > div:first-child > p {
    margin-bottom: 4px;
    color: var(--red-primary);
    font-family: var(--font-en);
    font-size: 0.7rem;
    font-weight: 700;
}

.pocket-page-header h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    line-height: 1.2;
}

.replay-disabled-state {
    position: relative;
    display: grid;
    min-height: min(520px, calc(100vh - 235px));
    align-content: center;
    justify-items: start;
    gap: 10px;
    padding: 48px clamp(32px, 8vw, 112px);
    overflow: hidden;
    border-top: 1px solid var(--panel-border);
    border-bottom: 1px solid var(--panel-border);
    background: rgba(255, 255, 255, 0.58);
}

.replay-disabled-state[hidden] {
    display: none;
}

.replay-layout[hidden] {
    display: none !important;
}

.replay-disabled-state::before {
    content: '';
    position: absolute;
    top: 18%;
    bottom: 18%;
    left: clamp(18px, 5vw, 72px);
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--red-primary) 30%, var(--red-primary) 70%, transparent);
}

.replay-disabled-state > p {
    color: var(--red-primary);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0;
}

.replay-disabled-state h3 {
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 4.4rem);
    font-weight: 800;
    line-height: 1;
}

.replay-disabled-state > span {
    max-width: 34rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.site-legal {
    position: fixed;
    right: auto;
    bottom: 14px;
    left: 5px;
    z-index: 90;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 138px;
    max-width: 138px;
    padding: 7px 10px;
    color: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 4px;
    background: rgba(28, 12, 18, 0.76);
    box-shadow: 0 6px 24px rgba(20, 4, 10, 0.16);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: 0.55rem;
    line-height: 1.35;
}

.site-legal > span {
    display: none;
}

.site-legal a {
    color: inherit;
    white-space: nowrap;
    text-underline-offset: 3px;
}

.site-legal a:hover,
.site-legal a:focus-visible {
    color: #fff;
    text-decoration: underline;
}

.pocket-view-switch {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(96px, 1fr));
    padding: 3px;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-md);
    background: #F2EDEE;
}

.pocket-view-btn {
    min-height: 38px;
    padding: 7px 16px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
}

.pocket-view-btn.active {
    background: #fff;
    color: var(--red-primary);
    box-shadow: var(--shadow-sm);
}

.pocket-view[hidden] {
    display: none !important;
}

.pocket48-page-panel {
    padding: 0;
    border-top: 2px solid var(--red-primary);
}

.pocket48-page-panel .pocket48-feed {
    gap: 0;
    max-height: calc(100vh - 235px);
    min-height: 360px;
    background: var(--panel-bg);
    backdrop-filter: blur(8px) saturate(1.04);
    -webkit-backdrop-filter: blur(8px) saturate(1.04);
}

.pocket48-page-panel .pocket48-item {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) 132px;
    gap: 18px;
    align-items: start;
    padding: 14px 16px;
    border: 0;
    border-bottom: 1px solid var(--panel-border);
    border-radius: 0;
}

.pocket48-page-panel .pocket48-sender,
.pocket48-page-panel .pocket48-text {
    margin: 0;
}

.pocket48-page-panel .pocket48-text {
    display: block;
    overflow: visible;
    font-size: 0.88rem;
    line-height: 1.65;
}

.pocket48-page-panel .pocket48-meta {
    gap: 8px;
}

/* ============================================================
   LIVE REPLAY TAB
   ============================================================ */

.replay-layout {
    display: flex;
    gap: 16px;
    height: calc(100vh - 200px);
    min-height: 500px;
}

.replay-list-toggle,
.replay-danmaku-toggle,
.replay-drawer-backdrop,
.replay-drawer-close {
    display: none;
}

.replay-danmaku-overlay {
    display: none;
}

/* ---- Sidebar: replay list ---- */
.replay-sidebar {
    width: 340px;
    min-width: 300px;
    flex-shrink: 0;
    background: var(--panel-bg);
    backdrop-filter: blur(8px) saturate(1.04);
    -webkit-backdrop-filter: blur(8px) saturate(1.04);
    border-radius: var(--radius-md);
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.replay-list-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
    padding: 16px 16px 12px;
    border-bottom: 1px solid rgba(217, 39, 63,0.1);
    flex-shrink: 0;
}

.replay-list-header .btn-load-more {
    grid-column: 1 / -1;
}

.replay-list-header h3 {
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.live-now-panel {
    flex: 0 0 auto;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(217, 39, 63, 0.1);
    background: #fff;
}

.live-now-loading,
.live-now-offline {
    min-height: 36px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.live-now-offline .live-status-dot {
    background: #a9a2a4;
}

.live-status-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: var(--red-primary);
}

.live-status-retry {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--red-primary);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.live-now-card {
    width: 100%;
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: #fff;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.live-now-card:hover,
.live-now-card.active {
    border-color: rgba(217, 39, 63, 0.34);
    background: rgba(217, 39, 63, 0.04);
}

.live-now-card:focus-visible {
    outline: 2px solid var(--red-primary);
    outline-offset: 2px;
}

.live-now-cover {
    position: relative;
    width: 84px;
    height: 56px;
    overflow: hidden;
    border-radius: 4px;
    background: #20181a;
}

.live-now-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.live-now-label {
    position: absolute;
    left: 4px;
    bottom: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 5px;
    border-radius: 3px;
    background: rgba(20, 8, 11, 0.86);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
}

.live-now-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.live-now-copy strong {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 0.82rem;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-now-copy > span {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text-muted);
    font-size: 0.68rem;
}

.live-now-action {
    padding-right: 7px;
    color: var(--red-primary);
    font-size: 0.72rem;
    font-weight: 700;
}

.replay-member-name {
    margin: 0;
    font-size: 0.82rem;
    color: var(--red-primary);
    font-weight: 500;
}

.btn-load-more {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 6px 0;
    background: rgba(217, 39, 63,0.08);
    color: var(--red-primary);
    border: 1px solid rgba(217, 39, 63,0.15);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease;
}

.btn-load-more:hover {
    background: var(--red-primary);
    color: #fff;
}

.replay-date-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
}

.replay-date-list::-webkit-scrollbar {
    width: 4px;
}

.replay-date-list::-webkit-scrollbar-thumb {
    background: rgba(217, 39, 63,0.12);
    border-radius: 10px;
}

.replay-loading {
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ---- Date group ---- */
.replay-date-group {
    margin-bottom: 8px;
}

.replay-date-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    background: rgba(217, 39, 63,0.06);
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    color: var(--red-primary);
    font-size: 0.78rem;
    font-weight: 600;
}

.replay-date-count {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* ---- Replay item ---- */
.replay-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: #fff;
    border: 1px solid var(--panel-border);
    margin-bottom: 4px;
    cursor: pointer;
    transition: background-color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}

.replay-item:hover {
    background: rgba(217, 39, 63,0.04);
    border-color: rgba(217, 39, 63,0.15);
}

.replay-item.active {
    background: rgba(217, 39, 63,0.08);
    border-color: rgba(217, 39, 63,0.3);
}

.replay-item-cover {
    width: 60px;
    height: 40px;
    border-radius: 4px;
    background: rgba(217, 39, 63,0.08);
    flex-shrink: 0;
    overflow: hidden;
}

.replay-item-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.replay-item-info {
    flex: 1;
    min-width: 0;
}

.replay-item-title {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.replay-item-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    gap: 8px;
}

.replay-type-tag {
    display: inline-block;
    padding: 0 4px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 600;
}

.replay-type-tag.type-live {
    background: rgba(217, 39, 63,0.1);
    color: var(--red-primary);
}

.replay-type-tag.type-radio {
    background: rgba(232, 179, 75,0.1);
    color: var(--star-gold);
}

.replay-type-tag.type-game {
    background: #F3EEEE;
    color: var(--text-secondary);
}

/* ---- Player area ---- */
.replay-player-area {
    flex: 1;
    position: relative;
    background: #0a0a0a;
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.replay-player-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.35);
    gap: 12px;
}

.placeholder-icon {
    font-size: 3rem;
}

.replay-player-placeholder p {
    font-size: 0.9rem;
    margin: 0;
}

.replay-player-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.replay-player-inner {
    flex: 1;
    display: flex;
    gap: 0;
    overflow: hidden;
    min-height: 0;
}

/* ---- Left: portrait video ---- */
.replay-video-col {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    position: relative;
    min-width: 0;
}

.replay-video-col video {
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 9 / 16;
    object-fit: contain;
}

/* ---- Right: danmaku panel ---- */
.replay-danmaku-panel {
    width: 280px;
    min-width: 220px;
    flex-shrink: 0;
    background: rgba(20,20,20,0.95);
    border-left: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.danmaku-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.danmaku-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.danmaku-list::-webkit-scrollbar {
    width: 3px;
}

.danmaku-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

.danmaku-empty {
    color: rgba(255,255,255,0.3);
    text-align: center;
    padding: 20px;
    font-size: 0.8rem;
}

.danmaku-item {
    font-size: 0.78rem;
    line-height: 1.45;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.04);
    animation: danmaku-fade-in 0.3s ease-out;
}

.danmaku-item .dm-user {
    color: var(--star-gold-light);
    font-weight: 600;
    margin-right: 6px;
    font-size: 0.72rem;
}

.danmaku-item .dm-text {
    color: rgba(255,255,255,0.85);
}

@keyframes danmaku-fade-in {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ---- Info bar ---- */
.replay-info-bar {
    padding: 10px 16px;
    background: rgba(0,0,0,0.85);
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    z-index: 6;
}

.replay-info-bar .info-title {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.replay-info-bar .info-title.is-error {
    color: #ff9f9f;
}

.replay-info-bar .info-meta {
    color: rgba(255,255,255,0.5);
    font-size: 0.73rem;
    white-space: nowrap;
}

.replay-info-bar .info-close {
    margin-left: auto;
    background: none;
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.6);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.75rem;
}

.replay-info-bar .info-close:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .replay-layout {
        flex-direction: column;
        height: auto;
    }
    .replay-sidebar {
        width: 100%;
        min-width: auto;
        max-height: 250px;
    }
    .replay-player-inner {
        flex-direction: column;
    }
    .replay-video-col {
        flex: none;
        height: 60vh;
    }
    .replay-danmaku-panel {
        width: 100%;
        max-height: 30vh;
    }
}

/* ============================================================
   TAG PANEL (Sidebar)
   ============================================================ */

.tag-panel {
    padding: 18px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 7px 14px;
    border-radius: var(--radius-full);
    background: rgba(217, 39, 63, 0.04);
    border: 1px solid rgba(217, 39, 63, 0.1);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    transition: all var(--dur-fast) var(--ease-smooth);
    cursor: default;
}

.tag:hover {
    background: rgba(217, 39, 63, 0.1);
    border-color: rgba(217, 39, 63, 0.25);
    color: var(--red-primary);
    transform: translateY(-1px);
}

/* ============================================================
   FAN MESSAGES PANEL
   ============================================================ */

.fan-zone-panel {
    padding: 18px;
}

.fan-messages {
    display: grid;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.fan-msg {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(217, 39, 63, 0.06);
    font-size: 0.85rem;
    line-height: 1.5;
}

.fan-msg-author {
    font-weight: 700;
    color: var(--red-primary);
    font-size: 0.8rem;
    margin-bottom: 2px;
}

.fan-msg-text {
    color: var(--text-secondary);
}

.fan-msg-form {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.fan-msg-input {
    flex: 1;
    padding: 8px 12px;
    border-radius: var(--radius-full);
    border: 1px solid var(--panel-border);
    background: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    outline: none;
    transition: border-color var(--dur-fast);
}

.fan-msg-input:focus {
    border-color: var(--red-primary);
}

.fan-msg-submit {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--red-primary);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease-smooth);
    white-space: nowrap;
}

.fan-msg-submit:hover {
    background: var(--red-dark);
    box-shadow: var(--shadow-red);
}

/* ============================================================
   UPDATE PANEL (Sidebar)
   ============================================================ */

.update-panel {
    padding: 18px;
}

.panel-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.panel-row .panel-label {
    margin-bottom: 0;
}

#photo-index-side {
    font-weight: 800;
    color: var(--red-primary);
    font-size: 1.1rem;
}

.recent-list {
    list-style: none;
    display: grid;
    gap: 8px;
}

.recent-item {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 10px;
    align-items: center;
    padding: 8px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(217, 39, 63,0.05);
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease-smooth);
}

.recent-item:hover {
    background: rgba(217, 39, 63,0.04);
    border-color: rgba(217, 39, 63,0.15);
    transform: translateX(2px);
}

.recent-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(0,0,0,0.06);
}

.recent-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

.recent-meta {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 1px;
}

/* ============================================================
   HERO / CAROUSEL
   ============================================================ */

/* Hero —— Star Night 杂志封面感 */
.hero-panel {
    position: relative;
    padding: 30px 30px 26px;
    overflow: hidden;
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--star-night);
}

.hero-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 6px;
}

.hero-panel .panel-label {
    color: rgba(255, 255, 255, 0.55);
}

.hero-head h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 2.2vw, 2.2rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.01em;
    max-width: 22ch;
    color: var(--text-white);
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
    transition: opacity 0.3s ease;
}

.hero-counter {
    display: flex;
    align-items: baseline;
    gap: 6px;
    color: rgba(255, 255, 255, 0.55);
    font-family: var(--font-en);
    font-weight: 600;
    letter-spacing: 0.1em;
    flex-shrink: 0;
}

.hero-counter #photo-index {
    color: var(--star-gold);
    font-size: 1.35rem;
}

.counter-separator {
    color: rgba(255, 255, 255, 0.3);
}

.carousel-stage {
    position: relative;
    margin-top: 14px;
    height: clamp(380px, 58vh, 680px);
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--star-night);
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease-out; /* 鼠标视差平滑 */
}

.carousel-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center 22%;
    background-repeat: no-repeat;
    background-image: var(--desktop-cover);
    opacity: 0;
    transition: opacity 0.9s var(--ease-smooth); /* 交叉淡入 */
}

.mobile-more-btn,
.mobile-more-menu {
    display: none;
}

.archive-load-more {
    display: block;
    min-height: 46px;
    margin: 22px auto 0;
    padding: 10px 22px;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--red-primary);
    font-weight: 700;
    cursor: pointer;
}

.archive-load-more[hidden] {
    display: none;
}

.calendar-view-switch {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(72px, 1fr));
    padding: 3px;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-md);
    background: #F2EDEE;
}

.calendar-view-btn {
    min-height: 38px;
    padding: 7px 16px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
}

.calendar-view-btn.active {
    background: #fff;
    color: var(--red-primary);
    box-shadow: var(--shadow-sm);
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: background-color var(--dur-fast) ease, border-color var(--dur-fast) ease;
    z-index: 3;
}

.carousel-btn:hover {
    background: var(--red-primary);
    color: #fff;
    border-color: var(--red-primary);
    transform: translateY(-50%);
}

.carousel-btn.prev { left: 14px; }
.carousel-btn.next { right: 14px; }

.carousel-dots-wrap {
    display: flex;
    justify-content: center;
    padding-top: 14px;
}

.carousel-dots {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.dot {
    width: 9px;
    height: 9px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: width var(--dur-normal) var(--ease-smooth), background-color var(--dur-fast) ease;
}

.dot.active {
    width: 26px;
    background: var(--red-primary);
    border-color: transparent;
}

/* Add photo button */
.add-photo-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding: 10px 22px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: background-color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}

.add-photo-btn:hover {
    background: var(--red-primary);
    color: #fff;
    border-color: var(--red-primary);
}

/* ============================================================
   HERO COVER —— 全宽人物主视觉封面
   ============================================================ */
.hero-cover {
    position: relative;
    /* 全出血：横向铺满视口（抵消 page-shell 左右不对称内边距 左148/右24 → 偏移 62px） */
    width: 100vw;
    left: 50%;
    margin-left: calc(-50vw - 62px);
    /* 满高：header 之下铺满首屏 */
    height: max(460px, calc(100vh - 150px));
    margin-bottom: 40px;
    overflow: hidden;
    animation: coverReveal 1.1s var(--ease-smooth) both;
}

/* 顶部渐变暗场：让浮在图上的 header 文字自然可读（无硬边） */
.hero-cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to bottom, rgba(38, 13, 22, 0.65), rgba(38, 13, 22, 0.15) 55%, transparent);
    z-index: 5;
    pointer-events: none;
}

/* ===== 首页态：封面顶到最上沿，header 透明悬浮 ===== */
body.on-home .page-shell {
    padding-top: 0;
    padding-bottom: 0;
}

body.on-home .hero-cover {
    height: 100vh;
    margin-bottom: 0;
    background: #160a0f;
    animation: none;
}

body.on-home .hero-cover .carousel-btn.prev {
    left: 148px;
}

body.on-home .wiki-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    margin-bottom: 0;
    padding: 22px 28px;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.on-home .wiki-header .eyebrow { color: var(--star-gold); }
body.on-home .wiki-header .brand-copy h1 { color: #fff; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4); }
body.on-home .wiki-header .brand-mark {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.28);
}
.hero-cover .carousel-stage {
    margin-top: 0;
    height: 100%;
    border-radius: 0;
    border: none;
}

/* 缓慢变焦 Ken Burns（每张激活时从头缓推，保留 6% 以上过扫供视差） */
.hero-cover .carousel-slide {
    transform-origin: center 38%;
}

.hero-cover .carousel-slide.active {
    animation: kenBurns 12s ease-in-out infinite alternate;
}

/* 旧轮播装饰层已停用，首页由照片展台承担空间层次。 */
.hero-cover .carousel-stage::before {
    content: none;
    display: none;
}

.hero-cover .carousel-stage::after {
    content: none;
    display: none;
}

.hero-cover .hero-glow {
    display: none;
}

.hero-overlay {
    display: none;
}

.hero-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    padding: 40px 44px;
    pointer-events: none;
}

.hero-overlay #caption-text:empty {
    display: none;
}

.hero-overlay #caption-text {
    font-family: var(--font-heading);
    font-size: clamp(1.9rem, 3.6vw, 3.4rem);
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    max-width: 22ch;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.55);
}

.hero-overlay .hero-counter {
    margin-top: 16px;
}

/* 封面上的悬浮控制 */
.hero-cover .add-photo-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    margin-top: 0;
    z-index: 5;
}

.hero-cover .carousel-dots-wrap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 18px;
    padding-top: 0;
    z-index: 5;
}

/* ============================================================
   QUICK ACCESS CARDS (Home)
   ============================================================ */

.quick-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.quick-card {
    padding: 22px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.quick-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.quick-card-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.quick-card h3 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.quick-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.card-red-line {
    width: 36px;
    height: 3px;
    background: linear-gradient(90deg, var(--red-primary), var(--red-soft));
    border-radius: var(--radius-full);
    margin-top: 12px;
    transition: width var(--dur-fast) var(--ease-smooth);
}

.quick-card:hover .card-red-line {
    width: 56px;
}

/* ============================================================
   ARCHIVE PAGE
   ============================================================ */

.archive-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.archive-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.archive-header h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
}

.archive-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(217, 39, 63, 0.15);
    background: #fff;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease, border-color var(--dur-fast) ease;
    white-space: nowrap;
}

.filter-btn:hover {
    background: rgba(217, 39, 63, 0.06);
    color: var(--red-primary);
}

.filter-btn.active {
    background: var(--red-primary);
    color: #fff;
    border-color: var(--red-primary);
    box-shadow: none;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.archive-card {
    padding: 0;
    overflow: hidden;
    cursor: pointer;
}

.archive-card:hover {
    border-color: var(--panel-border-hover);
    box-shadow: var(--shadow-sm);
}

.archive-card-img {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--panel-border);
    position: relative;
}

/* B站视频播放遮罩 */
.video-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.25);
    display: grid;
    place-items: center;
    opacity: 0;
    transition: opacity var(--dur-normal) var(--ease-smooth);
}

.archive-card:hover .video-play-overlay {
    opacity: 1;
}

.play-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(217, 39, 63,0.9);
    border: none;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    box-shadow: var(--shadow-sm);
}

.archive-card:focus-within .video-play-overlay {
    opacity: 1;
}

/* B站跳转链接 */
.bilibili-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    background: rgba(0,174,236,0.1);
    color: #00aed4;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color var(--dur-fast) ease, border-color var(--dur-fast) ease;
    border: 1px solid rgba(0,174,236,0.2);
}

.bilibili-link:hover {
    background: rgba(0,174,236,0.18);
    border-color: rgba(0,174,236,0.4);
}

.archive-card-body {
    padding: 16px 16px 18px;
}

/* 收藏编号（图片左上角） */
.archive-no {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 9px;
    border-radius: var(--radius-sm);
    background: rgba(38, 13, 22, 0.55);
    color: var(--star-gold-light);
    font-family: var(--font-en);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2;
}

.archive-card-meta-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.archive-card-category {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    background: rgba(217, 39, 63, 0.08);
    color: var(--red-primary);
    font-family: var(--font-en);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
}

.archive-card h3 {
    font-family: var(--font-heading);
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 6px;
}

.archive-card .archive-date {
    color: var(--text-muted);
    font-family: var(--font-en);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.archive-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================================
   PROFILE PAGE
   ============================================================ */

.profile-layout {
    max-width: 1120px;
    margin: 0 auto;
    padding-bottom: 56px;
}

.profile-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(420px, 0.96fr);
    min-height: 610px;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(8px) saturate(1.04);
    -webkit-backdrop-filter: blur(8px) saturate(1.04);
}

.profile-portrait {
    position: relative;
    min-height: 610px;
    overflow: hidden;
    background: #171015;
}

.profile-portrait::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(24, 9, 14, 0.68), transparent 38%);
    pointer-events: none;
}

.profile-portrait-picture {
    position: absolute;
    inset: 0;
}

.profile-portrait img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 610px;
    object-fit: cover;
    object-position: 60% center;
}

.profile-portrait figcaption {
    position: absolute;
    left: 24px;
    bottom: 20px;
    z-index: 1;
    color: rgba(255, 255, 255, 0.78);
    font-family: var(--font-en);
    font-size: 0.7rem;
    font-weight: 600;
}

.profile-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 54px 48px;
}

.profile-kicker,
.profile-section-heading > p,
.profile-section-heading > div > p {
    margin-bottom: 8px;
    color: var(--red-primary);
    font-family: var(--font-en);
    font-size: 0.7rem;
    font-weight: 700;
}

.profile-copy h2 {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 18px;
    font-family: var(--font-heading);
    font-size: 3.1rem;
    font-weight: 900;
    line-height: 1.1;
}

.profile-copy h2 span {
    color: var(--text-muted);
    font-family: var(--font-en);
    font-size: 0.8rem;
    font-weight: 600;
}

.profile-lead {
    margin-bottom: 30px;
    color: var(--text-secondary);
    font-size: 0.94rem;
    line-height: 1.85;
}

.profile-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 22px;
    border-top: 1px solid var(--panel-border);
}

.profile-facts > div {
    padding: 12px 8px 12px 0;
    border-bottom: 1px solid var(--panel-border);
}

.profile-facts dt {
    margin-bottom: 2px;
    color: var(--text-muted);
    font-size: 0.72rem;
}

.profile-facts dd {
    font-size: 0.88rem;
    font-weight: 600;
}

.profile-affiliations,
.profile-timeline {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 44px;
    padding: 58px 0;
    border-bottom: 1px solid var(--panel-border);
}

.profile-section-heading h2 {
    font-family: var(--font-heading);
    font-size: 1.55rem;
}

.affiliation-list article {
    display: grid;
    grid-template-columns: 120px 190px minmax(0, 1fr);
    gap: 22px;
    align-items: baseline;
    padding: 18px 0;
    border-top: 1px solid var(--panel-border);
}

.affiliation-list article:last-child {
    border-bottom: 1px solid var(--panel-border);
}

.affiliation-list span,
.profile-timeline-heading > span {
    color: var(--text-muted);
    font-family: var(--font-en);
    font-size: 0.74rem;
}

.affiliation-list h3 {
    font-size: 0.98rem;
}

.affiliation-list p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.profile-timeline {
    display: block;
    border-bottom: 0;
}

.profile-timeline-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 16px 16px;
}

/* ============================================================
   TIMELINE
   ============================================================ */

.timeline-layout {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 16px;
}

.timeline-layout h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 16px;
    text-align: center;
}

/* ===== 桌面端：横向滚动时间轴 ===== */
.timeline {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    gap: 32px;
    padding: 90px 40px 80px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--red-soft) transparent;
    cursor: grab;
}

.timeline:active {
    cursor: grabbing;
    /* 覆盖拖拽时文本选择 */
    user-select: none;
    -webkit-user-select: none;
}

.timeline::-webkit-scrollbar { height: 6px; }
.timeline::-webkit-scrollbar-track { background: transparent; }
.timeline::-webkit-scrollbar-thumb {
    background: var(--red-soft);
    border-radius: var(--radius-full);
}

/* 星轨连接线 */
.timeline::before {
    content: '';
    position: absolute;
    left: 24px;
    right: 24px;
    top: 50%;
    height: 2px;
    background: linear-gradient(to right,
        transparent,
        var(--star-gold) 14%,
        var(--red-soft) 50%,
        var(--star-gold) 86%,
        transparent);
    border-radius: var(--radius-full);
    transform: translateY(-50%);
    opacity: 0.6;
    box-shadow: 0 0 12px rgba(232, 179, 75, 0.3);
    z-index: 0;
    pointer-events: none;
}

.timeline-node {
    position: relative;
    min-width: 320px;
    width: 320px;
    flex-shrink: 0;
    scroll-snap-align: center;
    z-index: 1;
}

/* ⭐ 节点标记在横线上 */
.timeline-node::before {
    content: '⭐';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    z-index: 3;
    filter: drop-shadow(0 0 10px var(--star-glow));
    background: var(--bg-primary);
    border-radius: 50%;
    padding: 6px;
    line-height: 1;
    animation: glowBreathe 4s ease-in-out infinite;
}

/* 奇数卡片在上方 */
.timeline-node:nth-child(odd) {
    align-self: flex-start;
    padding-bottom: 56px;
}

.timeline-node:nth-child(odd)::before {
    top: auto;
    bottom: -20px;
}

/* 偶数卡片在下方 */
.timeline-node:nth-child(even) {
    align-self: flex-end;
    padding-top: 56px;
}

.timeline-node:nth-child(even)::before {
    top: -20px;
}

.timeline-card {
    padding: 22px 24px;
    position: relative;
    height: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.timeline-card:hover {
    border-color: var(--panel-border-hover);
    box-shadow: var(--shadow-sm);
}

.timeline-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: var(--radius-sm);
    background: rgba(232, 179, 75, 0.14);
    border: 1px solid rgba(232, 179, 75, 0.45);
    color: var(--text-primary);
    font-family: var(--font-en);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 14px;
    letter-spacing: 0.06em;
}

.timeline-date::before {
    content: '★';
    color: var(--star-gold);
    font-size: 0.85em;
}

.timeline-card h3 {
    font-family: var(--font-heading);
    font-size: 1.18rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.timeline-card .timeline-category {
    color: var(--red-primary);
    font-family: var(--font-en);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.timeline-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.65;
}

/* 星轨起点标记 */
.timeline::after {
    content: '★';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: var(--star-gold);
    z-index: 3;
    background: var(--bg-primary);
    border-radius: 50%;
    padding: 4px 6px;
    filter: drop-shadow(0 0 6px var(--star-glow));
}

/* ============================================================
   MUSIC PAGE
   ============================================================ */

.music-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--panel-border);
}

.music-layout h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 14px;
}

.music-collection-nav {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    min-height: 44px;
    overflow-x: auto;
    scrollbar-width: none;
}

.music-collection-nav::-webkit-scrollbar {
    display: none;
}

.music-collection-tab {
    position: relative;
    flex: 0 0 auto;
    min-height: 44px;
    padding: 8px 1px 12px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
}

.music-collection-tab::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: transparent;
}

.music-collection-tab:hover,
.music-collection-tab.active {
    color: var(--red-primary);
}

.music-collection-tab.active::after {
    background: var(--red-primary);
}

.music-collection-loading {
    align-self: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.music-collection-summary {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 18px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.music-collection-summary[hidden] {
    display: none;
}

.music-collection-summary strong {
    color: var(--text-primary);
    font-family: var(--font-en);
    font-size: 0.92rem;
}

.music-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.music-card {
    display: block;
    height: 100%;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    color: var(--text-primary);
    text-align: left;
}

.music-card:hover,
.music-card:focus-visible {
    color: var(--text-primary);
    border-color: var(--panel-border-hover);
    box-shadow: var(--shadow-sm);
}

.music-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background-size: cover;
    background-position: center;
    background-color: rgba(217, 39, 63, 0.05);
    display: grid;
    place-items: center;
    color: var(--text-muted);
    font-family: var(--font-en);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    border-bottom: 1px solid var(--panel-border);
}

.music-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.music-cover-fallback {
    max-width: 80%;
    overflow-wrap: anywhere;
    text-align: center;
}

.music-card-body {
    padding: 16px;
}

.music-type {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    background: rgba(232, 179, 75, 0.12);
    color: var(--star-gold);
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.music-card h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.music-year {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.music-card p {
    display: -webkit-box;
    min-height: calc(1.4em * 2);
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.music-platform-link {
    display: inline-block;
    margin-top: 12px;
    color: #1688a7;
    font-size: 0.76rem;
    font-weight: 700;
}

/* Album detail uses one reversible two-sided card for open and close. */
.music-album-overlay {
    position: fixed;
    inset: 0;
    z-index: 1300;
    overflow: hidden;
    background: rgba(38, 23, 28, 0.34);
    opacity: 0;
    perspective: 1600px;
    backdrop-filter: blur(8px) saturate(1.04);
    -webkit-backdrop-filter: blur(8px) saturate(1.04);
}

.music-album-flip {
    position: fixed;
    margin: 0;
    transform-style: preserve-3d;
}

.music-album-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform: rotateY(0deg);
    transform-style: preserve-3d;
}

.music-album-overlay.is-animating .music-album-flip {
    will-change: top, left, width, height;
}

.music-album-overlay.is-animating .music-album-flip-inner {
    will-change: transform;
}

.music-album-face {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-md);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    box-shadow: 0 24px 70px rgba(31, 18, 22, 0.3);
}

.music-album-front {
    background: var(--panel-bg-solid);
}

.music-album-front .music-card {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    pointer-events: none;
    transform: none !important;
}

.music-album-back {
    position: relative;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.86);
    transform: rotateY(180deg);
}

.music-album-back::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(255, 255, 255, 0.08);
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(16px) saturate(1.08);
    -webkit-backdrop-filter: blur(16px) saturate(1.08);
    transition: opacity 220ms cubic-bezier(0.2, 0.75, 0.24, 1);
}

.music-album-overlay.is-settled .music-album-back::before {
    opacity: 1;
}

.music-card-source-hidden {
    visibility: hidden !important;
}

.music-album-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(107, 76, 78, 0.24);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-primary);
    cursor: pointer;
}

.music-album-close:hover {
    border-color: var(--red-primary);
    color: var(--red-primary);
}

.music-album-hero {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 24px;
    padding: 26px 66px 22px 26px;
    border-bottom: 1px solid var(--panel-border);
    background: rgba(255, 255, 255, 0.34);
}

.music-album-detail-cover {
    flex: 0 0 164px;
    width: 164px;
    height: 164px;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.music-album-detail-copy {
    align-self: center;
    min-width: 0;
}

.music-album-detail-type {
    display: inline-block;
    margin-bottom: 7px;
    color: var(--star-gold);
    font-size: 0.72rem;
    font-weight: 800;
}

.music-album-detail-copy h3 {
    margin: 0 0 7px;
    overflow-wrap: anywhere;
    font-family: var(--font-heading);
    font-size: 1.45rem;
    line-height: 1.25;
}

.music-album-detail-meta {
    margin-bottom: 9px;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.music-album-detail-description {
    display: -webkit-box;
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.music-track-section {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    padding: 18px 26px 24px;
}

.music-track-heading {
    display: flex;
    flex: 0 0 auto;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 8px;
}

.music-track-heading strong {
    font-size: 0.92rem;
}

.music-track-heading span {
    color: var(--text-muted);
    font-size: 0.76rem;
}

.music-track-list {
    min-height: 0;
    overflow-y: auto;
    border-top: 1px solid var(--panel-border);
    scrollbar-width: thin;
}

.music-track-item {
    border-bottom: 1px solid rgba(107, 76, 78, 0.12);
    list-style: none;
}

.music-track-link {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 8px 10px 8px 4px;
    color: var(--text-primary);
}

.music-track-link:hover,
.music-track-link:focus-visible {
    background: rgba(217, 39, 63, 0.045);
    color: var(--red-primary);
}

.music-track-number {
    color: var(--text-muted);
    font-family: var(--font-en);
    font-size: 0.76rem;
    text-align: center;
}

.music-track-copy {
    min-width: 0;
}

.music-track-title,
.music-track-artist {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.music-track-title {
    font-size: 0.86rem;
    font-weight: 700;
}

.music-track-artist {
    margin-top: 1px;
    color: var(--text-muted);
    font-size: 0.7rem;
}

.music-track-duration {
    color: var(--text-muted);
    font-family: var(--font-en);
    font-size: 0.72rem;
}

@media (max-width: 720px) {
    .music-album-close {
        top: 10px;
        right: 10px;
        width: 34px;
        height: 34px;
    }

    .music-album-hero {
        gap: 14px;
        min-height: 132px;
        padding: 16px 50px 15px 16px;
    }

    .music-album-detail-cover {
        flex-basis: 104px;
        width: 104px;
        height: 104px;
    }

    .music-album-detail-copy h3 {
        margin-bottom: 5px;
        font-size: 1.08rem;
    }

    .music-album-detail-description {
        font-size: 0.76rem;
        -webkit-line-clamp: 2;
    }

    .music-track-section {
        padding: 13px 14px calc(16px + env(safe-area-inset-bottom, 0px));
    }

    .music-track-link {
        grid-template-columns: 30px minmax(0, 1fr) auto;
        min-height: 52px;
        padding-right: 4px;
    }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1100px) {
    .wiki-layout {
        grid-template-columns: 1fr;
    }

    .wiki-sidebar {
        order: 1;
    }

    .wiki-main {
        order: 2;
    }

    .quick-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    /* ===== 移动端：恢复垂直时间轴 ===== */
    .timeline {
        display: block;
        overflow-x: visible;
        overflow-y: visible;
        padding: 10px 0;
        scroll-snap-type: none;
    }

    .timeline::before {
        position: absolute;
        left: 22px !important;
        right: auto !important;
        top: 0;
        bottom: 0;
        width: 3px;
        height: auto;
        background: linear-gradient(to bottom,
            var(--red-primary),
            var(--red-soft),
            var(--star-gold));
        transform: none;
    }

    .timeline::after {
        display: none;
    }

    .timeline-node,
    .timeline-node:nth-child(odd),
    .timeline-node:nth-child(even) {
        display: block;
        width: 100%;
        min-width: unset;
        padding-left: 56px;
        padding-right: 0;
        padding-top: 0;
        padding-bottom: 36px;
        margin-left: 0;
        align-self: auto;
        scroll-snap-align: none;
    }

    .timeline-node::before,
    .timeline-node:nth-child(odd)::before,
    .timeline-node:nth-child(even)::before {
        left: 14px;
        right: auto;
        top: 8px;
        bottom: auto;
        transform: none;
        background: none;
        padding: 0;
    }
}

@media (max-width: 900px) {
    .profile-intro {
        grid-template-columns: 1fr;
    }

    .profile-portrait,
    .profile-portrait img {
        min-height: 520px;
        height: 64vh;
    }

    .profile-copy {
        padding: 40px 34px;
    }

    .profile-affiliations {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .affiliation-list article {
        grid-template-columns: 110px 170px minmax(0, 1fr);
    }
}

@media (max-width: 720px) {
    :root {
        --mobile-header-height: 54px;
        --mobile-nav-height: 60px;
    }

    body.mobile-menu-open {
        overflow: hidden;
    }

    .page-shell {
        padding: 10px 12px 96px; /* 底部为悬浮 Dock 留白 */
    }

    .wiki-header {
        flex-direction: row;
        align-items: center;
        padding: 14px 16px;
    }

    /* 移动端：贴底档案导航 */
    .tab-nav {
        position: fixed;
        flex-direction: row;
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: auto;
        transform: none;
        margin: 0;
        gap: 0;
        padding: 0 10px;
        justify-content: flex-start;
        overflow-x: auto;
        z-index: 100;
        background: rgba(255, 255, 255, 0.98);
        border: 0;
        border-top: 1px solid var(--panel-border);
        border-radius: 0;
        box-shadow: none;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        isolation: auto;
    }

    .tab-nav::after {
        display: none;
    }

    .tab-btn {
        width: auto;
        justify-content: center;
        min-height: 56px;
        padding: 9px 16px 8px;
        color: var(--text-secondary);
        font-size: 0.82rem;
        text-shadow: none;
    }

    .tab-btn::before {
        left: 12px;
        right: 12px;
        top: 0;
        width: auto;
        height: 2px;
        opacity: 0;
        transform: none;
        transition: opacity var(--dur-fast) ease;
    }

    .tab-btn.active,
    body.on-home .tab-btn.active {
        color: var(--red-primary);
        background: transparent;
    }

    .tab-btn.active::before,
    body.on-home .tab-btn.active::before {
        height: 2px;
        background: var(--red-primary);
        opacity: 1;
    }

    body.on-home .tab-nav {
        background: rgba(255, 255, 255, 0.98);
        border-left: 0;
        border-top: 1px solid var(--panel-border);
    }

    body.on-home .tab-btn,
    body.on-home .tab-btn:hover:not(.active) {
        color: var(--text-secondary);
        text-shadow: none;
    }

    .tab-icon {
        font-size: 1rem;
    }

    .hero-panel {
        padding: 14px;
    }

    .carousel-stage {
        height: 320px;
        border-radius: var(--radius-md);
    }

    .hero-cover {
        margin-left: -50vw; /* 移动端 page-shell 左右内边距对称，无需 74px 修正 */
        height: 76vh;
        margin-bottom: 20px;
    }

    body.on-home .hero-cover {
        height: calc(100vh - 56px - env(safe-area-inset-bottom, 0px));
    }

    .profile-layout {
        padding-bottom: 20px;
    }

    .profile-intro {
        border-left: 0;
        border-right: 0;
    }

    .profile-portrait,
    .profile-portrait img {
        min-height: 390px;
        height: 55vh;
    }

    .profile-portrait img {
        object-position: 61% center;
    }

    .profile-copy {
        padding: 30px 22px 34px;
    }

    .profile-copy h2 {
        font-size: 2.35rem;
    }

    .profile-facts {
        grid-template-columns: 1fr 1fr;
    }

    .profile-affiliations,
    .profile-timeline {
        padding: 40px 10px;
    }

    .affiliation-list article {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 16px 0;
    }

    .profile-timeline-heading {
        padding-right: 0;
        padding-left: 0;
    }

    .pocket-page-header {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    .pocket-view-switch {
        width: 100%;
    }

    .pocket48-page-panel .pocket48-feed {
        min-height: 55vh;
        max-height: none;
    }

    .pocket48-page-panel .pocket48-item {
        display: block;
        padding: 14px 12px;
    }

    .pocket48-page-panel .pocket48-sender,
    .pocket48-page-panel .pocket48-text {
        margin-bottom: 4px;
    }

    .hero-cover .carousel-stage {
        height: 100%;
        border-radius: 0;
    }

    .hero-cover .carousel-slide:nth-child(2) {
        background-position: 84% center;
    }

    .hero-overlay {
        padding: 24px 22px;
    }

    .hero-cover .add-photo-btn {
        top: 12px;
        right: 12px;
        padding: 7px 12px;
        font-size: 0.76rem;
    }

    .carousel-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .carousel-btn.prev { left: 8px; }
    .carousel-btn.next { right: 8px; }

    body.on-home .hero-cover .carousel-btn.prev {
        left: 8px;
    }

    .hero-head {
        flex-direction: column;
        gap: 8px;
    }

    .archive-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .archive-grid {
        grid-template-columns: 1fr;
    }

    .music-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-cards-grid {
        grid-template-columns: 1fr;
    }

    /* 触控目标 ≥ 44px */
    .filter-btn,
    .fan-msg-submit,
    .cal-today-btn {
        min-height: 44px;
    }
}


/* ============================================================
   公开行程 — 幸运星行程轨
   ============================================================ */
.calendar-layout {
    max-width: 900px;
    margin: 0 auto;
    padding: 26px 16px 48px;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 12px;
}

.calendar-header h2 {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0;
}

.calendar-event-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.schedule-next {
    display: grid;
    grid-template-columns: 176px minmax(0, 1fr) auto;
    align-items: center;
    gap: 30px;
    min-height: 164px;
    padding: 28px 24px;
    border-top: 1px solid var(--panel-border);
    border-bottom: 1px solid var(--panel-border);
    background: rgba(255, 255, 255, 0.58);
}

.schedule-next-date {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.schedule-next-date time {
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 650;
}

.schedule-next-date strong {
    color: var(--red-primary);
    font-family: var(--font-heading);
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1;
}

.schedule-next-copy {
    min-width: 0;
}

.schedule-next-label,
.schedule-row-kind {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 650;
}

.schedule-next-copy h3 {
    margin: 7px 0 8px;
    color: var(--text-dark);
    font-family: var(--font-heading);
    font-size: 1.38rem;
    font-weight: 800;
    line-height: 1.35;
}

.schedule-next-copy p,
.schedule-row-copy p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.6;
}

.schedule-featured-mark {
    margin-right: 7px;
    color: var(--star-gold);
    font-family: var(--font-body);
    font-size: 0.82em;
}

.schedule-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.schedule-action,
.schedule-replay {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 7px 11px;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color var(--dur-fast) ease, color var(--dur-fast) ease, background-color var(--dur-fast) ease;
}

.schedule-action {
    border-color: rgba(217, 39, 63, 0.32);
    color: var(--red-primary);
}

.schedule-action:hover,
.schedule-replay:hover {
    border-color: var(--red-primary);
    background: #fff;
    color: var(--red-dark);
}

.schedule-upcoming-list {
    margin-top: 30px;
}

.schedule-month + .schedule-month {
    margin-top: 18px;
}

.cal-month-divider {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 44px;
    margin: 0;
    padding: 11px 4px 8px;
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    z-index: 10;
    border-bottom: 1px solid var(--panel-border);
}

.cal-month-divider span {
    color: var(--text-dark);
    font-family: var(--font-heading);
    font-size: 0.96rem;
    font-weight: 800;
    white-space: nowrap;
}

.cal-month-divider small {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
}

.schedule-rows {
    border-bottom: 1px solid var(--panel-border);
}

.schedule-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    min-height: 94px;
    padding: 12px 4px 12px 0;
    border-top: 1px solid var(--panel-border);
    transition: background-color var(--dur-fast) ease;
}

.schedule-row:first-child {
    border-top: 0;
}

.schedule-row:hover {
    background: rgba(255, 255, 255, 0.42);
}

.schedule-date {
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-right: 1px solid var(--panel-border);
}

.schedule-date time {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--text-secondary);
}

.schedule-date strong {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    line-height: 1;
}

.schedule-date span {
    font-size: 0.66rem;
    font-weight: 650;
}

.schedule-date em {
    position: absolute;
    right: -1px;
    bottom: 5px;
    padding: 1px 0 1px 6px;
    background: var(--bg-primary);
    color: var(--red-primary);
    font-size: 0.62rem;
    font-style: normal;
    font-weight: 800;
}

.schedule-row-copy {
    min-width: 0;
}

.schedule-row-copy h4 {
    margin: 4px 0 5px;
    color: var(--text-dark);
    font-size: 0.94rem;
    font-weight: 750;
    line-height: 1.4;
}

.schedule-row.is-past .schedule-row-copy h4,
.schedule-row.is-past .schedule-date {
    color: var(--text-secondary);
}

.schedule-row.is-cancelled h4 {
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.schedule-status {
    display: block;
    margin-top: 5px;
    color: var(--red-dark);
    font-size: 0.72rem;
    font-weight: 750;
}

.schedule-recent {
    margin-top: 42px;
}

.schedule-section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--panel-border);
}

.schedule-section-heading h3 {
    margin: 0;
    color: var(--text-dark);
    font-family: var(--font-heading);
    font-size: 1.02rem;
}

.schedule-section-heading span {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.schedule-year {
    border-top: 1px solid var(--panel-border);
}

.schedule-year > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 0 4px;
    color: var(--text-dark);
    cursor: pointer;
    list-style: none;
}

.schedule-year > summary::-webkit-details-marker {
    display: none;
}

.schedule-year > summary span {
    font-family: var(--font-heading);
    font-size: 1.08rem;
    font-weight: 800;
}

.schedule-year > summary small {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.schedule-year-body {
    padding-bottom: 28px;
}

.empty-state-action {
    align-self: center;
    min-height: 40px;
    margin-top: 4px;
    padding: 8px 14px;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--red-primary);
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 768px) {
    .schedule-next {
        grid-template-columns: 138px minmax(0, 1fr);
        gap: 18px;
        padding: 24px 16px;
    }

    .schedule-next .schedule-row-actions {
        grid-column: 2;
        justify-content: flex-start;
    }

    .schedule-next-date strong {
        font-size: 1.75rem;
    }

    .schedule-row {
        grid-template-columns: 58px minmax(0, 1fr) auto;
        gap: 14px;
    }
}

@media (max-width: 420px) {
    .calendar-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .calendar-layout {
        padding-inline: 12px;
    }

    .schedule-next {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 22px 10px;
    }

    .schedule-next-date {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: baseline;
    }

    .schedule-next .schedule-row-actions {
        grid-column: 1;
    }

    .schedule-next-copy h3 {
        font-size: 1.2rem;
    }

    .schedule-row {
        grid-template-columns: 52px minmax(0, 1fr);
        gap: 12px;
        min-height: 92px;
        padding-right: 0;
    }

    .schedule-row .schedule-row-actions {
        grid-column: 2;
        justify-content: flex-start;
        margin-top: -3px;
    }

    .schedule-action,
    .schedule-replay {
        min-height: 34px;
    }
}

@media (max-width: 420px) {
    .brand-mark {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
        border-radius: var(--radius-sm);
    }

    .brand-copy h1 {
        font-size: 1.1rem;
    }

    .brand-copy {
        min-width: 0;
    }

    .eyebrow {
        font-size: 0.58rem;
        letter-spacing: 0.14em;
        white-space: nowrap;
    }

    .music-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   B站视频搜索导入 — 按钮 & 弹窗
   ============================================================ */

/* -- 导入按钮 -- */
.bilibili-import-btn {
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--panel-border);
    background: #fff;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease, border-color var(--dur-fast) ease;
    white-space: nowrap;
}
.bilibili-import-btn:hover {
    background: #FDF2F3;
    border-color: var(--panel-border-hover);
    color: var(--red-primary);
}

/* -- 模态遮罩 -- */
.bilibili-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 20px;
}

/* -- 弹窗主体 -- */
.bilibili-modal {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px) saturate(1.04);
    -webkit-backdrop-filter: blur(12px) saturate(1.04);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 920px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: panelFadeIn 0.3s var(--ease-smooth);
}

/* -- 弹窗头部 -- */
.bilibili-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 12px;
    border-bottom: 1px solid var(--panel-border);
    flex-shrink: 0;
}
.bilibili-modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

.bilibili-modal-close {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid var(--panel-border);
    background: transparent;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    display: grid; place-items: center;
    transition: all var(--dur-fast) var(--ease-smooth);
}
.bilibili-modal-close:hover {
    background: rgba(217, 39, 63, 0.08);
    color: var(--red-primary);
    border-color: var(--red-primary);
}

/* -- 搜索栏 -- */
.bilibili-search-bar {
    display: flex; gap: 10px;
    padding: 16px 24px 8px;
    flex-shrink: 0;
}
.bilibili-search-input {
    flex: 1;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--panel-border);
    background: #fff;
    color: var(--text-primary);
    font-size: 0.92rem;
    outline: none;
    transition: border-color var(--dur-fast) var(--ease-smooth);
}
.bilibili-search-input:focus {
    border-color: var(--red-primary);
    box-shadow: 0 0 0 3px rgba(217, 39, 63,0.08);
}
.bilibili-search-btn {
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--red-primary);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color var(--dur-fast) ease;
    white-space: nowrap;
}
.bilibili-search-btn:hover {
    background: var(--red-dark);
}

.bilibili-search-hint {
    padding: 0 24px 12px;
    color: var(--text-muted);
    font-size: 0.78rem;
    flex-shrink: 0;
}

/* -- 结果容器 -- */
.bilibili-results-container {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px;
    min-height: 180px;
}
.bilibili-results-container::-webkit-scrollbar { width: 6px; }
.bilibili-results-container::-webkit-scrollbar-thumb {
    background: rgba(217, 39, 63,0.2);
    border-radius: 3px;
}

.bilibili-loading,
.bilibili-empty,
.bilibili-error {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
    font-size: 0.92rem;
}
.bilibili-error { color: var(--red-primary); }

/* -- 结果卡片网格 -- */
.bilibili-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    padding-bottom: 16px;
}

.bilibili-result-item {
    background: #fff;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--dur-fast) ease;
}
.bilibili-result-item:hover {
    border-color: var(--red-soft);
}
.bilibili-result-item.already-imported {
    opacity: 0.55;
}
.bilibili-result-item.already-imported:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
}

/* -- 封面 -- */
.bilibili-result-cover {
    width: 100%;
    height: 145px;
    background-size: cover;
    background-position: center;
    background-color: #f0ece8;
    position: relative;
}
.bilibili-duration {
    position: absolute;
    bottom: 6px; right: 6px;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    background: rgba(0,0,0,0.72);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
}

/* -- 信息区 -- */
.bilibili-result-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.bilibili-result-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.bilibili-result-meta {
    display: flex; gap: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.bilibili-imported-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    background: rgba(217, 39, 63, 0.08);
    color: var(--red-primary);
    font-size: 0.72rem;
    font-weight: 700;
}

/* -- 分类下拉 -- */
.bilibili-category-select {
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--panel-border);
    background: rgba(255,255,255,0.8);
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: border-color var(--dur-fast);
}
.bilibili-category-select:focus {
    border-color: var(--red-primary);
}

/* -- 导入按钮（卡片内） -- */
.bilibili-import-item-btn {
    width: 100%;
    padding: 8px 0;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--red-primary);
    background: transparent;
    color: var(--red-primary);
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease;
}
.bilibili-import-item-btn:hover:not(:disabled) {
    background: var(--red-primary);
    color: #fff;
}
.bilibili-import-item-btn:disabled {
    border-color: var(--text-muted);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
}

/* -- 分页 -- */
.bilibili-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    padding: 12px 24px 18px;
    border-top: 1px solid var(--panel-border);
    flex-shrink: 0;
}
.bilibili-page-btn {
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--panel-border);
    background: rgba(255,255,255,0.7);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.bilibili-page-btn:hover:not(:disabled) {
    background: rgba(217, 39, 63,0.06);
    color: var(--red-primary);
    border-color: var(--red-primary);
}
.bilibili-page-btn:disabled {
    opacity: 0.35; cursor: not-allowed;
}
.bilibili-page-info {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    min-width: 60px;
    text-align: center;
}

/* -- 响应式：弹窗 -- */
@media (max-width: 768px) {
    .bilibili-modal {
        max-width: 100%;
        max-height: 92vh;
        border-radius: var(--radius-lg);
    }
    .bilibili-results-grid {
        grid-template-columns: 1fr;
    }
    .bilibili-search-bar {
        flex-direction: column;
    }
}

/* ============================================================
   B站视频内嵌播放器 — 弹窗 + 横竖屏 + 非线性动画
   ============================================================ */

/* -- 遮罩 -- */
.video-player-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(0, 0, 0, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 24px;
}

/* -- 弹窗 -- */
.video-player-modal {
    position: relative;
    background: #0a0a0a;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 12px 28px rgba(0,0,0,0.34);
    display: flex;
    flex-direction: column;
    max-width: 100%;
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    transform-origin: center center;
}

/* -- 横屏 (16:9) -- */
.video-player-modal.landscape {
    width: min(85vw, 1100px, 150vh);
    width: min(85vw, 1100px, 150dvh);
    aspect-ratio: 16 / 9;
}

/* -- 竖屏 (9:16) -- */
.video-player-modal.portrait {
    width: min(40vw, 420px, 50vh);
    width: min(40vw, 420px, 50dvh);
    aspect-ratio: 9 / 16;
}

/* -- iframe 容器 -- */
.video-player-wrapper {
    flex: 1;
    position: relative;
    background: #000;
    overflow: hidden;
}
.video-player-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    transition: opacity 0.5s ease;
}

/* -- 底栏 -- */
.video-player-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    background: rgba(20,20,20,0.95);
    border-top: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.video-player-title {
    color: #eee;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}
.video-player-bilibili-link {
    color: #00aed4;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s;
}
.video-player-bilibili-link:hover {
    color: #33c8e8;
}

/* -- 关闭按钮 -- */
.video-player-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background-color var(--dur-fast) ease;
    backdrop-filter: none;
}
.video-player-close:hover {
    background: rgba(217, 39, 63,0.8);
}

/* ---------- 非线性弹出动画 ---------- */

/* 弹入：spring-like overshoot */
@keyframes videoPlayerIn {
    0% {
        opacity: 0;
        transform: scale(0.82) translateY(30px);
    }
    50% {
        opacity: 1;
        transform: scale(1.02) translateY(-4px);
    }
    70% {
        transform: scale(0.99) translateY(2px);
    }
    85% {
        transform: scale(1.005) translateY(-1px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 弹出：加速缩小的 easing */
@keyframes videoPlayerOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.88) translateY(20px);
    }
}

/* ---------- 卡片入场 staggered 动画 ---------- */

@keyframes cardSlideUp {
    0% {
        opacity: 0;
        transform: translateY(12px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.archive-card {
    animation: cardSlideUp 0.28s ease-out both;
}

/* staggered delay — 每行4张，递增延迟 */
.archive-card:nth-child(1)  { animation-delay: 0.04s; }
.archive-card:nth-child(2)  { animation-delay: 0.08s; }
.archive-card:nth-child(3)  { animation-delay: 0.12s; }
.archive-card:nth-child(4)  { animation-delay: 0.16s; }
.archive-card:nth-child(5)  { animation-delay: 0.20s; }
.archive-card:nth-child(6)  { animation-delay: 0.24s; }
.archive-card:nth-child(7)  { animation-delay: 0.28s; }
.archive-card:nth-child(8)  { animation-delay: 0.32s; }
.archive-card:nth-child(9)  { animation-delay: 0.36s; }
.archive-card:nth-child(10) { animation-delay: 0.40s; }
.archive-card:nth-child(11) { animation-delay: 0.44s; }
.archive-card:nth-child(12) { animation-delay: 0.48s; }

/* -- 重新渲染时重置动画 -- */
.archive-grid.refreshing .archive-card {
    animation: none;
}
.archive-grid.refreshing .archive-card {
    animation: cardSlideUp 0.28s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
    html.home-intro-pending .wiki-header .brand-mark,
    html.home-intro-pending .wiki-header .brand-copy,
    html.home-intro-pending #tab-nav,
    html.home-intro-pending .hero-photo-count,
    html.home-intro-pending .floating-gallery .floating-photo,
    html.home-intro-pending .hero-cover .carousel-slide.active .carousel-photo {
        opacity: 1 !important;
        filter: none !important;
        translate: none !important;
    }

    html.home-intro-pending .hero-cover .carousel-slide.active .carousel-photo {
        transform: none !important;
    }

    html.home-intro-pending .home-intro-shade {
        background-color: rgba(19, 8, 13, 0) !important;
    }

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
        transition-delay: 0ms !important;
    }

    .hero-cover .carousel-slide.active {
        animation: none !important;
    }
}

/* -- 响应式：播放器 -- */
@media (max-width: 768px) {
    .video-player-modal.landscape {
        width: min(95vw, 150vh);
        width: min(95vw, 150dvh);
        aspect-ratio: 16 / 9;
    }
    .video-player-modal.portrait {
        width: min(75vw, 360px, 50vh);
        width: min(75vw, 360px, 50dvh);
        aspect-ratio: 9 / 16;
    }
    .video-player-overlay {
        padding: 12px;
    }
    .video-player-modal {
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
    }
    .video-player-close {
        top: 8px; right: 8px;
        width: 30px; height: 30px;
        font-size: 1rem;
    }
    .video-player-info {
        padding: 8px 12px;
    }
}

/* Final mobile overrides stay last so desktop-era responsive rules cannot win. */
@media (max-width: 720px) {
    .page-shell,
    body.on-home .page-shell {
        width: 100vw;
        max-width: 100vw;
        min-height: 100svh;
        padding: 0 0 calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px));
    }

    body:not(.on-home) .page-shell {
        padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) + 52px);
    }

    .site-legal {
        right: 4px;
        bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) + 2px);
        left: 4px;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        width: auto;
        max-width: none;
        gap: 4px;
        padding: 2px 4px;
        border: 0;
        border-radius: 2px;
        background: rgba(28, 12, 18, 0.52);
        box-shadow: none;
        font-size: 0.55rem;
        line-height: 1.25;
        text-align: center;
        transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear;
    }

    .site-legal > span {
        display: inline;
    }

    body.floor-transitioning .site-legal,
    body.floor-special .site-legal {
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transform: translateY(4px);
        transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
    }

    .replay-disabled-state {
        min-height: calc(100svh - var(--mobile-header-height) - var(--mobile-nav-height) - 116px);
        padding: 38px 28px 38px 42px;
    }

    .replay-disabled-state::before {
        left: 20px;
    }

    .tab-panel.active:not(#panel-home) {
        animation: mobileContentReveal 280ms cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    @keyframes mobileContentReveal {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    .wiki-header {
        position: sticky;
        top: 0;
        z-index: 110;
        min-height: var(--mobile-header-height);
        margin: 0;
        padding: 8px 14px;
        border-width: 0 0 1px;
        border-radius: 0;
    }

    body.on-home .wiki-header {
        position: absolute;
        padding: 8px 14px;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
        border-radius: 6px;
    }

    .brand-star {
        width: 19px;
        height: 19px;
    }

    .brand-copy .eyebrow {
        display: none;
    }

    .brand-copy h1 {
        margin: 0;
        font-size: 1rem;
    }

    .tab-nav,
    body.on-home .tab-nav {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-template-rows: minmax(0, 1fr);
        align-items: stretch;
        right: auto;
        width: 100vw;
        max-width: 100vw;
        height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px));
        padding: 0 4px env(safe-area-inset-bottom, 0px);
        justify-content: stretch;
        overflow: hidden;
        border-top: 0;
        box-shadow: inset 0 1px 0 var(--panel-border);
        z-index: 1200;
        contain: layout paint;
    }

    #tab-nav,
    body.on-home #tab-nav {
        background: rgba(255, 255, 255, 0.98);
        border-color: var(--panel-border);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        transform: none;
        animation: none;
        transition: none;
        will-change: auto;
    }

    .tab-nav .tab-btn {
        translate: none !important;
    }

    .tab-nav .tab-btn:not(.mobile-primary):not(.mobile-more-btn) {
        display: none;
    }

    .tab-nav .mobile-more-btn {
        display: flex;
    }

    .tab-btn {
        width: 100%;
        height: 100%;
        min-width: 0;
        min-height: 0;
        padding: 10px 4px 8px;
        font-size: 0.75rem;
        font-weight: 600;
        line-height: 1;
    }

    .tab-btn.active,
    body.on-home .tab-btn.active {
        font-weight: 600;
    }

    .tab-btn::before {
        left: 20%;
        right: 20%;
    }

    .mobile-more-menu:not([hidden]) {
        position: fixed;
        inset: 0;
        z-index: 1300;
        display: block;
        pointer-events: none;
    }

    .mobile-more-backdrop {
        position: absolute;
        inset: 0 0 calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px));
        width: 100%;
        border: 0;
        background: rgba(38, 23, 28, 0.2);
        opacity: 0;
        pointer-events: auto;
        backdrop-filter: blur(9px) saturate(1.04);
        -webkit-backdrop-filter: blur(9px) saturate(1.04);
    }

    .mobile-more-sheet {
        position: absolute;
        right: 0;
        bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) - 1px);
        width: min(calc(100vw - 14px), 360px);
        max-height: min(70svh, 520px);
        padding: 18px 18px 22px;
        overflow-y: auto;
        border: 1px solid var(--panel-border);
        border-right: 0;
        border-bottom: 0;
        border-radius: var(--radius-md) 0 0 0;
        background: rgba(255, 255, 255, 0.92);
        box-shadow: -12px -14px 34px rgba(38, 13, 22, 0.16);
        opacity: 1;
        pointer-events: auto;
        transform: none;
        transform-origin: center center;
    }

    .mobile-more-sheet::before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: 0;
        background: rgba(255, 255, 255, 0.06);
        opacity: 0;
        pointer-events: none;
        backdrop-filter: blur(16px) saturate(1.08);
        -webkit-backdrop-filter: blur(16px) saturate(1.08);
        transition: opacity 220ms cubic-bezier(0.2, 0.75, 0.24, 1);
    }

    .mobile-more-menu.is-open .mobile-more-backdrop {
        opacity: 1;
    }

    .mobile-more-menu.is-animating .mobile-more-backdrop,
    .mobile-more-menu.is-animating .mobile-more-sheet {
        will-change: transform, opacity;
    }

    .mobile-more-menu.is-settled .mobile-more-sheet {
        background: rgba(255, 255, 255, 0.86);
    }

    .mobile-more-menu.is-settled .mobile-more-sheet::before {
        opacity: 1;
    }

    .mobile-more-menu.is-settled .mobile-more-backdrop {
        will-change: auto;
    }

    .mobile-more-heading {
        position: relative;
        z-index: 1;
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 12px;
    }

    .mobile-more-heading h2 {
        font-family: var(--font-heading);
        font-size: 1.25rem;
    }

    .mobile-more-close {
        width: 44px;
        height: 44px;
        border: 0;
        background: transparent;
        color: var(--text-secondary);
        font-size: 1.7rem;
        cursor: pointer;
    }

    .mobile-more-links {
        position: relative;
        z-index: 1;
        border-top: 1px solid var(--panel-border);
    }

    .mobile-more-links button {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        width: 100%;
        min-height: 58px;
        padding: 10px 2px;
        border: 0;
        border-bottom: 1px solid var(--panel-border);
        background: transparent;
        text-align: left;
        cursor: pointer;
    }

    .mobile-more-links span {
        font-weight: 700;
    }

    .mobile-more-links small {
        color: var(--text-muted);
        font-size: 0.72rem;
    }

    .hero-cover,
    body.on-home .hero-cover {
        left: 0;
        width: 100%;
        height: calc(100svh - var(--mobile-nav-height) - env(safe-area-inset-bottom, 0px));
        min-height: 0;
        margin: 0;
    }

    .hero-cover .carousel-slide,
    .hero-cover .carousel-slide:nth-child(2) {
        background-image: var(--mobile-cover);
        background-position: center;
    }

    .hero-cover .carousel-stage::before,
    .hero-cover .carousel-stage::after,
    .hero-cover .hero-glow,
    .hero-overlay {
        display: none;
    }

    .archive-layout,
    .music-layout,
    .calendar-layout,
    .pocket-page {
        width: 100%;
        padding: 20px 14px 26px;
    }

    .archive-header {
        gap: 14px;
        margin-bottom: 18px;
    }

    .archive-header > div:last-child,
    .archive-filters {
        width: 100%;
    }

    .archive-filters {
        flex-wrap: nowrap;
        padding-bottom: 4px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .archive-filters::-webkit-scrollbar {
        display: none;
    }

    .filter-btn {
        flex: 0 0 auto;
        min-height: 42px;
        padding: 8px 14px;
    }

    .bilibili-import-btn {
        display: none;
    }

    .archive-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        will-change: opacity, transform, filter;
    }

    .archive-card:not(:first-child) {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        min-height: 112px;
        border-radius: 0;
        box-shadow: none;
    }

    .archive-card:not(:first-child) .archive-card-img {
        height: 100%;
        min-height: 112px;
    }

    .archive-card:not(:first-child) .archive-card-body {
        padding: 10px 12px;
    }

    .archive-card:first-child .archive-card-img {
        height: 190px;
    }

    .archive-card:not(:first-child) h3 {
        display: -webkit-box;
        margin: 8px 0 0;
        overflow: hidden;
        font-size: 0.92rem;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .archive-load-more {
        width: 100%;
        min-height: 48px;
        margin-top: 14px;
    }

    .archive-card:not(:first-child) .archive-no,
    .archive-card:not(:first-child) .archive-card-category,
    .archive-card:not(:first-child) p,
    .archive-card:not(:first-child) .bilibili-link {
        display: none;
    }

    .profile-portrait,
    .profile-portrait img {
        min-height: 0;
        height: min(52svh, 480px);
    }

    .profile-copy {
        padding: 24px 18px 28px;
    }

    .profile-affiliations,
    .profile-timeline {
        padding: 28px 16px;
    }

    .timeline-layout {
        width: calc(100% + 32px);
        margin-left: -16px;
    }

    .timeline {
        display: flex;
        gap: 12px;
        min-height: 0;
        padding: 10px 16px 24px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
    }

    .timeline-node,
    .timeline-node:nth-child(odd),
    .timeline-node:nth-child(even) {
        flex: 0 0 min(82vw, 320px);
        width: auto;
        height: auto;
        margin: 0;
        padding: 0;
    }

    .timeline-node::before,
    .timeline::before,
    .timeline::after {
        display: none;
    }

    .timeline-card {
        height: 100%;
        min-height: 210px;
        padding: 22px 20px;
    }

    .music-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .music-header {
        align-items: stretch;
        flex-direction: column;
        gap: 0;
        margin-bottom: 12px;
    }

    .music-layout h2 {
        margin-bottom: 6px;
    }

    .music-collection-nav {
        width: 100%;
        gap: 22px;
    }

    .music-collection-summary {
        margin-bottom: 14px;
    }

    .music-card-body {
        padding: 12px 10px 14px;
    }

    .music-card p {
        display: none;
    }

    .calendar-header {
        flex-direction: row;
        align-items: center;
    }

    .calendar-view-switch {
        width: 152px;
    }

    .calendar-view-btn {
        min-height: 40px;
        padding: 6px 10px;
    }

    .cal-month-divider {
        top: var(--mobile-header-height);
    }

    body[data-active-tab="live-replay"] {
        overflow: hidden;
    }

    #panel-live-replay.active {
        height: calc(100dvh - var(--mobile-header-height) - var(--mobile-nav-height) - env(safe-area-inset-bottom, 0px));
        min-height: 0;
        overflow: hidden;
    }

    #panel-live-replay.active .pocket-page {
        display: flex;
        flex-direction: column;
        height: 100%;
        min-height: 0;
        padding: 10px 12px;
    }

    .pocket-page-header {
        flex: 0 0 auto;
        gap: 8px;
        margin-bottom: 8px;
        padding: 0 0 10px;
    }

    .pocket-page-header > div:first-child > p {
        display: none;
    }

    .pocket-view:not([hidden]) {
        display: block;
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
    }

    .pocket48-page-panel {
        height: 100%;
        min-height: 0;
    }

    .pocket48-page-panel .pocket48-feed {
        height: 100%;
        min-height: 0;
        max-height: none;
        overflow-y: auto;
    }

    .pocket48-page-panel .pocket48-item {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 6px 12px;
        padding: 12px 4px;
    }

    .pocket48-page-panel .pocket48-sender {
        grid-column: 1;
    }

    .pocket48-page-panel .pocket48-text {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .pocket48-page-panel .pocket48-meta {
        grid-column: 2;
        grid-row: 1;
    }

    .replay-layout {
        position: relative;
        display: block;
        height: 100%;
        min-height: 0;
        overflow: hidden;
        border-radius: var(--radius-md);
        background: #0a0a0a;
    }

    .replay-layout .replay-sidebar {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 8;
        width: min(88vw, 340px);
        min-width: 0;
        height: 100%;
        max-height: none;
        border-width: 0 1px 0 0;
        border-radius: 0;
        box-shadow: 16px 0 34px rgba(38, 13, 22, 0.28);
        opacity: 1;
        filter: none;
        transform: translateX(-105%);
        transition: transform 240ms var(--ease-smooth);
    }

    .replay-layout.replay-list-open .replay-sidebar {
        transform: translateX(0);
    }

    .replay-list-toggle,
    .replay-danmaku-toggle {
        position: absolute;
        top: 12px;
        left: 12px;
        z-index: 6;
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        padding: 8px 14px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: var(--radius-sm);
        background: rgba(16, 10, 12, 0.82);
        color: #fff;
        font-size: 0.82rem;
        font-weight: 700;
        cursor: pointer;
    }

    .replay-danmaku-toggle {
        right: 12px;
        left: auto;
        display: none;
    }

    .replay-layout.replay-has-player:not(.replay-live-player) .replay-danmaku-toggle {
        display: inline-flex;
    }

    .replay-drawer-backdrop {
        position: absolute;
        inset: 0;
        z-index: 7;
        width: 100%;
        border: 0;
        background: rgba(8, 3, 5, 0.52);
    }

    .replay-layout.replay-list-open .replay-drawer-backdrop {
        display: block;
    }

    .replay-drawer-close {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        border: 0;
        background: transparent;
        color: var(--text-secondary);
        font-size: 1.55rem;
        cursor: pointer;
    }

    .replay-list-header {
        padding: 12px 12px 10px;
    }

    .live-now-panel {
        padding: 9px 12px;
    }

    .live-now-card {
        grid-template-columns: 76px minmax(0, 1fr) auto;
    }

    .live-now-cover {
        width: 76px;
        height: 50px;
    }

    .replay-player-area {
        width: 100%;
        height: 100%;
        min-height: 0;
        border-radius: 0;
    }

    .replay-player-container,
    .replay-player-inner,
    .replay-video-col {
        height: 100%;
        min-height: 0;
    }

    .replay-player-inner {
        position: relative;
        flex-direction: row;
    }

    .replay-video-col {
        flex: 1 1 auto;
    }

    .replay-video-col video {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        aspect-ratio: auto;
        object-fit: contain;
    }

    .replay-danmaku-panel {
        display: none;
    }

    .replay-danmaku-overlay {
        position: absolute;
        inset: 60px 0 64px;
        z-index: 3;
        display: block;
        overflow: hidden;
        pointer-events: none;
    }

    .replay-layout.replay-danmaku-hidden .replay-danmaku-overlay {
        display: none;
    }

    .replay-layout.replay-danmaku-hidden .replay-danmaku-toggle {
        opacity: 0.62;
    }

    .replay-danmaku-fly {
        position: absolute;
        top: calc(var(--danmaku-lane) * 14%);
        left: 100%;
        max-width: 88vw;
        overflow: hidden;
        color: #fff;
        font-size: 0.82rem;
        font-weight: 600;
        line-height: 1.4;
        text-overflow: ellipsis;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95), 0 0 6px rgba(0, 0, 0, 0.72);
        white-space: nowrap;
        will-change: transform;
        animation: mobileDanmakuFly var(--danmaku-speed) linear forwards;
    }

    @keyframes mobileDanmakuFly {
        from { transform: translateX(0); }
        to { transform: translateX(calc(-100vw - 100%)); }
    }

    .replay-info-bar {
        flex: 0 0 auto;
        gap: 8px;
        padding: 8px 10px;
        flex-wrap: nowrap;
    }

    .replay-info-bar .info-title {
        flex: 1 1 auto;
        max-width: none;
    }

    .replay-info-bar .info-meta {
        display: none;
    }

    .replay-info-bar .info-close {
        min-height: 36px;
        margin-left: 0;
        padding: 4px 10px;
    }
}

/* Keep the motion transform authoritative over legacy card hover rules. */
.rb-motion-card {
    animation: none !important;
    transform: perspective(1000px) translate3d(0, var(--rb-lift), 0) rotateX(var(--rb-tilt-x)) rotateY(var(--rb-tilt-y)) !important;
}

.rb-motion-card.rb-reveal {
    transform: perspective(1000px) translate3d(0, calc(34px + var(--rb-lift)), 0) rotateX(var(--rb-tilt-x)) rotateY(var(--rb-tilt-y)) scale(0.975) !important;
}

.rb-motion-card.rb-reveal.rb-revealed {
    transform: perspective(1000px) translate3d(0, var(--rb-lift), 0) rotateX(var(--rb-tilt-x)) rotateY(var(--rb-tilt-y)) scale(1) !important;
}

@media (prefers-reduced-motion: reduce) {
    .rb-motion-card,
    .rb-motion-card.rb-reveal,
    .rb-motion-card.rb-reveal.rb-revealed {
        transform: none !important;
    }
}

@media (max-width: 360px) {
    .music-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   VERTICAL MUSEUM FLOORS
   ============================================================ */
@property --spot-x {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 56%;
}

@property --spot-y {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 48%;
}

.floor-space {
    position: fixed;
    inset: 0;
    z-index: 2;
    width: 100vw;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    background: #160a0f;
    overscroll-behavior: none;
    touch-action: none;
}

.floor-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    backface-visibility: hidden;
    transform-origin: center center;
    will-change: transform, opacity;
}

.floor-ground {
    z-index: 2;
    background: #160a0f;
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

.floor-space .floor-ground .hero-cover,
body.on-home .floor-space .floor-ground .hero-cover {
    position: absolute;
    inset: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
}

.floor-dome,
.floor-basement {
    z-index: 3;
    opacity: 0;
    pointer-events: none;
}

.floor-dome {
    background: #03040a;
    transform: translate3d(0, -5%, 0) scale(0.72);
}

.floor-basement {
    background: #0f0508;
    transform: translate3d(0, 100%, 0);
}

.floor-space[data-floor="dome"] .floor-ground {
    opacity: 0.35;
    transform: translate3d(0, 30%, 0) scale(0.92);
}

.floor-space[data-floor="dome"] .floor-dome {
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(0, 0, 0) scale(1);
}

.floor-space[data-floor="basement"] .floor-ground {
    opacity: 0.28;
    transform: translate3d(0, -28%, 0) scale(0.96);
}

.floor-space[data-floor="basement"] .floor-basement {
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
}

.floor-entry,
.floor-return {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 6px;
    background: rgba(12, 12, 18, 0.84);
    color: rgba(255, 255, 255, 0.82);
    font-family: var(--font-body);
    font-size: 0.76rem;
    font-weight: 500;
    letter-spacing: 0;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, opacity 200ms ease;
}

.floor-entry:hover,
.floor-return:hover {
    border-color: rgba(232, 179, 75, 0.48);
    background: rgba(18, 16, 21, 0.96);
    color: #fff;
}

.floor-entry:focus-visible,
.floor-return:focus-visible,
.dome-detail-close:focus-visible,
.darkroom-viewer-close:focus-visible {
    outline-color: #e8b34b;
}

.floor-entry {
    position: absolute;
    left: 50%;
    z-index: 12;
    min-width: 92px;
    padding: 9px 16px;
    transform: translateX(-50%);
}

.floor-entry strong {
    font-weight: 600;
}

.floor-entry-dome {
    top: 146px;
}

.floor-entry-basement {
    bottom: 24px;
}

.floor-return {
    position: absolute;
    left: 50%;
    bottom: max(18px, env(safe-area-inset-bottom, 0px));
    z-index: 15;
    padding: 9px 18px;
    transform: translateX(-50%);
}

.floor-transition-shade {
    position: absolute;
    inset: 0;
    z-index: 11;
    background: #03040a;
    opacity: 0;
    will-change: opacity;
    pointer-events: none;
}

.lucky-star-transition-canvas {
    position: fixed;
    inset: 0;
    z-index: 160;
    display: block;
    width: 100vw;
    height: 100vh;
    height: 100svh;
    opacity: 0;
    pointer-events: none;
    will-change: opacity;
}

body.floor-dome-transition .lucky-star-transition-canvas {
    opacity: 1;
}

body.floor-dome-transition .brand-star {
    opacity: 0;
}

body.floor-dome-transition .brand-mark,
body.floor-dome-transition .floor-entry,
body.floor-dome-transition .floor-return {
    pointer-events: none;
}

body.floor-dome-transition .wiki-header,
body.floor-dome-transition .floor-ground,
body.floor-dome-transition .floor-dome,
body.floor-dome-transition .floor-heading-dome,
body.floor-dome-transition .dome-year-nav,
body.floor-dome-transition .floor-return {
    will-change: transform, opacity;
}

body.floor-dome-transition .wiki-header,
body.floor-dome-transition #tab-nav,
body.floor-dome-transition .stars-bg {
    transition: none;
}

.floor-heading {
    position: absolute;
    z-index: 7;
    color: #fff;
    pointer-events: none;
}

.floor-heading h2,
.floor-heading p {
    margin: 0;
}

.floor-heading h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 4.4rem);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: 0;
}

.floor-heading h2:focus {
    outline: none;
}

.floor-heading > p {
    margin-bottom: 8px;
    color: rgba(218, 222, 232, 0.56);
    font-size: 0.75rem;
    font-weight: 400;
}

.floor-heading-dome {
    top: clamp(28px, 6vh, 68px);
    left: clamp(24px, 6vw, 96px);
}

.floor-heading-basement {
    top: clamp(30px, 7vh, 74px);
    left: clamp(24px, 7vw, 108px);
}

.floor-heading-basement > p {
    margin: 8px 0 0;
    color: rgba(255, 235, 238, 0.42);
}

.dome-record-count {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 18px;
    color: rgba(222, 225, 233, 0.58);
    font-size: 0.78rem;
}

.dome-record-count[hidden] {
    display: none;
}

.dome-record-count strong {
    color: rgba(255, 255, 255, 0.9);
    font-family: var(--font-heading);
    font-size: clamp(2.8rem, 5vw, 3.5rem);
    font-variant-numeric: tabular-nums;
    font-weight: 400;
    line-height: 1;
}

.dome-viewport {
    position: absolute;
    inset: 0;
    z-index: 2;
    cursor: grab;
    touch-action: none;
}

.dome-viewport:active {
    cursor: grabbing;
}

.dome-viewport:focus-visible {
    outline: 1px solid rgba(232, 179, 75, 0.64);
    outline-offset: -5px;
}

#dome-background-canvas,
#attendance-dome-canvas {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#dome-background-canvas {
    z-index: 0;
}

#attendance-dome-canvas {
    z-index: 2;
}

.floor-empty {
    position: absolute;
    left: 50%;
    top: 52%;
    z-index: 5;
    margin: 0;
    color: rgba(220, 222, 230, 0.42);
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.dome-year-nav {
    position: absolute;
    top: 50%;
    right: clamp(18px, 3vw, 48px);
    z-index: 8;
    display: grid;
    gap: 3px;
    transform: translateY(-50%);
}

.dome-year-nav[hidden] {
    display: none;
}

.dome-year-nav button {
    min-width: 54px;
    min-height: 34px;
    padding: 5px 8px;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
    color: rgba(222, 225, 233, 0.4);
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: border-color 160ms ease, color 160ms ease;
}

.dome-year-nav button:hover,
.dome-year-nav button:focus-visible,
.dome-year-nav button.is-active {
    border-right-color: #e8b34b;
    color: rgba(255, 255, 255, 0.86);
}

.dome-detail {
    position: absolute;
    left: 50%;
    bottom: 0;
    z-index: 20;
    width: min(640px, calc(100vw - 32px));
    padding: 20px 52px 22px 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: rgba(12, 12, 18, 0.94);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.18);
    color: rgba(255, 255, 255, 0.86);
    transform: translateX(-50%);
}

.dome-detail[hidden] {
    display: none;
}

.dome-detail time {
    color: rgba(220, 222, 230, 0.54);
    font-size: 0.72rem;
}

.dome-detail h3 {
    margin: 6px 0 5px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 400;
}

.dome-detail p {
    margin: 0;
    color: rgba(220, 222, 230, 0.58);
    font-size: 0.78rem;
}

.dome-detail p + p {
    margin-top: 5px;
}

.dome-detail-video {
    display: inline-block;
    margin-top: 10px;
    color: rgba(232, 179, 75, 0.86);
    font-size: 0.76rem;
    text-decoration: none;
}

.dome-detail-video:hover,
.dome-detail-video:focus-visible {
    color: #f2c96e;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.dome-detail-video[hidden] {
    display: none;
}

.dome-detail-close,
.darkroom-viewer-close {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.68);
    font-size: 1.45rem;
    cursor: pointer;
}

.dome-detail-close {
    position: absolute;
    top: 8px;
    right: 8px;
}

.floor-dome.detail-open .floor-return {
    opacity: 0;
    pointer-events: none;
}

.basement-spotlight {
    --spot-x: 56%;
    --spot-y: 48%;
    position: absolute;
    inset: 0;
    z-index: 1;
    background: radial-gradient(circle 170px at var(--spot-x) var(--spot-y), rgba(255, 255, 255, 0.075), transparent 100%);
    opacity: 0.9;
    pointer-events: none;
}

body.is-floor-basement:not(.floor-reduced-motion) .basement-spotlight:not(.is-following) {
    animation: darkroomSpotlight 15s linear infinite alternate;
}

@keyframes darkroomSpotlight {
    0% { --spot-x: 25%; --spot-y: 35%; }
    50% { --spot-x: 70%; --spot-y: 58%; }
    100% { --spot-x: 42%; --spot-y: 72%; }
}

.darkroom-photo-field {
    position: absolute;
    inset: 15% 7% 13%;
    z-index: 3;
}

.floor-basement .floor-empty {
    color: rgba(238, 218, 222, 0.36);
}

.darkroom-photo {
    position: absolute;
    left: var(--photo-x);
    top: var(--photo-y);
    width: var(--photo-width);
    aspect-ratio: var(--photo-ratio, 2 / 3);
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    background: #e8e3e1;
    cursor: pointer;
    transform: rotate(var(--photo-rotation));
    transition: border-color 160ms ease, transform 180ms ease;
}

.darkroom-photo:hover,
.darkroom-photo:focus-visible {
    z-index: 8;
    border-color: rgba(232, 179, 75, 0.58);
    transform: translateY(-4px) rotate(var(--photo-rotation));
}

.darkroom-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.darkroom-photo span {
    position: absolute;
    right: 5px;
    bottom: 5px;
    left: 5px;
    padding: 22px 8px 7px;
    background: linear-gradient(to top, rgba(12, 8, 10, 0.82), transparent);
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.68rem;
    opacity: 0;
    transition: opacity 160ms ease;
}

.darkroom-photo:hover span,
.darkroom-photo:focus-visible span {
    opacity: 1;
}

.basement-constellation {
    position: absolute;
    left: 4%;
    bottom: 5%;
    z-index: 2;
    width: 190px;
    height: 100px;
    opacity: 0.25;
    pointer-events: none;
}

.darkroom-viewer {
    position: fixed;
    inset: 0;
    z-index: 1600;
    display: grid;
    place-items: center;
    padding: 56px 20px 24px;
    background: rgba(6, 4, 5, 0.96);
}

.darkroom-viewer[hidden] {
    display: none;
}

.darkroom-viewer-close {
    position: absolute;
    top: max(10px, env(safe-area-inset-top, 0px));
    right: 12px;
}

.darkroom-viewer figure {
    display: grid;
    gap: 10px;
    max-width: min(92vw, 760px);
    max-height: calc(100svh - 90px);
    margin: 0;
}

.darkroom-viewer img {
    display: block;
    max-width: 100%;
    max-height: calc(100svh - 128px);
    margin: auto;
    object-fit: contain;
}

.darkroom-viewer figcaption {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.78rem;
    text-align: center;
}

body.floor-special {
    overflow: hidden;
}

body.floor-special .wiki-header,
body.floor-special #tab-nav {
    opacity: 0;
    pointer-events: none;
}

body.floor-special .wiki-header,
body.floor-special .stars-bg {
    transition: none;
}

.wiki-header,
#tab-nav,
.stars-bg,
.rb-click-spark {
    transition: opacity 260ms ease;
}

@media (min-width: 721px) {
    #tab-nav {
        transition: opacity 280ms ease, transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1),
            background-color 280ms ease, border-color 280ms ease;
    }

    body.floor-nav-settling #tab-nav {
        opacity: 0 !important;
        transform: translate3d(-8px, -50%, 0);
        transition: none !important;
    }
}

body.floor-special .stars-bg,
body.floor-special .sparkle-container,
body.floor-special .rb-click-spark {
    opacity: 0;
    pointer-events: none;
}

body.floor-transitioning .floor-entry,
body.floor-transitioning .floor-return {
    pointer-events: none;
}

@media (max-width: 720px) {
    .floor-space .floor-ground .hero-cover,
    body.on-home .floor-space .floor-ground .hero-cover {
        height: calc(100svh - var(--mobile-nav-height) - env(safe-area-inset-bottom, 0px));
    }

    .floor-entry-dome {
        top: 62px;
    }

    .floor-entry-basement {
        bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) + 10px);
    }

    .floor-heading-dome,
    .floor-heading-basement {
        top: max(18px, env(safe-area-inset-top, 0px));
        left: 16px;
    }

    .floor-heading h2 {
        font-size: clamp(2rem, 10vw, 2.8rem);
    }

    .dome-record-count {
        margin-top: 10px;
    }

    .dome-record-count strong {
        font-size: 2.5rem;
    }

    .dome-year-nav {
        top: auto;
        right: 72px;
        bottom: max(18px, env(safe-area-inset-bottom, 0px));
        left: 16px;
        display: flex;
        gap: 0;
        overflow-x: auto;
        transform: none;
        scrollbar-width: none;
    }

    .dome-year-nav::-webkit-scrollbar {
        display: none;
    }

    .dome-year-nav button {
        flex: 0 0 auto;
        min-width: 48px;
        min-height: 44px;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }

    .dome-year-nav button:hover,
    .dome-year-nav button:focus-visible,
    .dome-year-nav button.is-active {
        border-bottom-color: #e8b34b;
    }

    .floor-return {
        right: 14px;
        bottom: max(12px, env(safe-area-inset-bottom, 0px));
        left: auto;
        min-width: 48px;
        padding: 9px 12px;
        transform: none;
    }

    .floor-return span:last-child {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .dome-detail {
        width: 100%;
        padding: 18px 54px 18px 18px;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }

    .darkroom-photo-field {
        inset: 94px 14px 72px;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-content: start;
        gap: 10px;
        overflow-y: auto;
    }

    .darkroom-photo {
        position: relative;
        left: auto;
        top: auto;
        width: 100%;
        transform: none;
    }

    .darkroom-photo:hover,
    .darkroom-photo:focus-visible {
        transform: translateY(-2px);
    }

    .basement-constellation {
        left: 12px;
        bottom: 10px;
        width: 128px;
        height: 68px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .floor-layer {
        will-change: auto;
    }

    .basement-spotlight,
    .darkroom-photo,
    .floor-entry,
    .floor-return {
        animation: none !important;
        transition-duration: 1ms !important;
    }

    .lucky-star-transition-canvas {
        display: none;
    }
}

/* 首页楼层导航：桌面并入左侧索引，移动端收束为底部双段控制。 */
.floor-nav-entries {
    display: grid;
    width: 100%;
    margin: 3px 0 5px;
    padding: 5px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

#tab-nav .floor-entry {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    z-index: auto;
    justify-content: flex-start;
    gap: 7px;
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 7px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    transform: none;
}

#tab-nav .floor-entry:hover,
#tab-nav .floor-entry:focus-visible {
    border: 0;
    background: transparent;
    color: #fff;
}

#tab-nav .floor-entry strong {
    font-weight: 500;
}

.floor-nav-direction {
    flex: 0 0 16px;
    color: var(--star-gold);
    font-family: var(--font-en);
    text-align: center;
}

.floor-nav-return {
    position: relative;
    display: none;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    min-height: 46px;
    padding: 8px 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    font-family: var(--font-body);
    font-size: 0.82rem;
    cursor: pointer;
}

.floor-nav-return::before {
    position: absolute;
    top: 50%;
    left: -19px;
    width: 2px;
    height: 28px;
    background: var(--star-gold);
    content: '';
    transform: translateY(-50%);
}

.floor-nav-return:hover,
.floor-nav-return:focus-visible {
    color: #fff;
}

.floor-nav-return:focus-visible {
    outline: 1px solid var(--star-gold);
    outline-offset: 3px;
}

body.on-home:not(.floor-special) #tab-nav .floor-entry {
    animation: floorNavPrompt 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

body.on-home:not(.floor-special) #tab-nav .floor-entry-basement {
    animation-delay: 100ms;
}

@keyframes floorNavPrompt {
    from { opacity: 0.25; transform: translateX(-5px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (min-width: 721px) {
    .floor-layer > .floor-return {
        display: none;
    }

    #tab-nav .floor-nav-entries {
        max-height: 100px;
        overflow: hidden;
        opacity: 1;
        transform: translateX(0);
        visibility: visible;
        transition: max-height 260ms ease, margin 260ms ease, padding 260ms ease,
            border-color 180ms ease, opacity 180ms ease, transform 220ms ease,
            visibility 0s linear;
    }

    body:not(.on-home) #tab-nav .floor-nav-entries {
        max-height: 0;
        margin: -1px 0;
        padding-top: 0;
        padding-bottom: 0;
        border-color: transparent;
        opacity: 0;
        pointer-events: none;
        transform: translateX(-6px);
        visibility: hidden;
        transition: max-height 260ms ease, margin 260ms ease, padding 260ms ease,
            border-color 180ms ease, opacity 140ms ease, transform 180ms ease,
            visibility 0s linear 260ms;
    }

    body.floor-special #tab-nav {
        width: 128px;
        padding: 6px 12px 6px 18px;
        background: rgba(12, 8, 13, 0.78);
        border-right-color: rgba(232, 179, 75, 0.3);
        opacity: 1;
        pointer-events: auto;
    }

    body.floor-special #tab-nav > .tab-btn,
    body.floor-special #tab-nav > .floor-nav-entries {
        display: none;
    }

    body.floor-special #tab-nav > .floor-nav-return {
        display: flex;
        animation: floorReturnReveal 360ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
    }
}

@media (prefers-reduced-motion: reduce) {
    #tab-nav .floor-nav-entries {
        transition-duration: 1ms !important;
    }
}

@keyframes floorReturnReveal {
    from { opacity: 0; transform: translateX(-6px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 720px) {
    #tab-nav {
        overflow: visible;
        contain: none;
    }

    body:not(.on-home) #tab-nav .floor-nav-entries,
    body.floor-special #tab-nav .floor-nav-entries {
        display: none;
    }

    #tab-nav .floor-nav-entries {
        position: absolute;
        top: -68px;
        left: 50%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: min(252px, calc(100vw - 32px));
        height: 44px;
        margin: 0;
        padding: 2px;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 6px;
        background: rgba(24, 12, 17, 0.82);
        box-shadow: 0 8px 24px rgba(20, 6, 12, 0.18);
        backdrop-filter: blur(14px) saturate(1.1);
        -webkit-backdrop-filter: blur(14px) saturate(1.1);
        transform: translateX(-50%);
    }

    .floating-gallery {
        bottom: 86px;
    }

    .hero-photo-count {
        bottom: 184px;
    }

    #tab-nav .floor-entry {
        justify-content: center;
        min-height: 38px;
        padding: 6px 8px;
        color: rgba(255, 255, 255, 0.88);
        font-size: 0.72rem;
    }

    #tab-nav .floor-entry + .floor-entry {
        border-left: 1px solid rgba(255, 255, 255, 0.14);
    }

    #tab-nav .floor-nav-return {
        display: none !important;
    }

    .floor-layer > .floor-return {
        right: 12px;
        display: inline-flex;
        gap: 6px;
        min-width: 76px;
        padding: 9px 12px;
        border-color: rgba(232, 179, 75, 0.52);
        background: rgba(10, 9, 14, 0.92);
        color: #fff;
        box-shadow: inset 0 0 0 1px rgba(232, 179, 75, 0.08);
        animation: floorReturnReveal 320ms ease-out both;
    }

    .floor-layer > .floor-return span:last-child {
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
        clip: auto;
        white-space: nowrap;
    }

    .dome-year-nav {
        right: 100px;
    }
}

/* Shared content-status notice for sections that are still being curated. */
.page-preview-notice {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1280;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px;
    gap: 18px;
    width: min(390px, calc(100vw - 48px));
    padding: 17px 16px 16px 18px;
    border: 1px solid rgba(20, 20, 20, 0.16);
    border-top: 3px solid var(--red-primary);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.96);
    color: #171717;
    box-shadow: 0 12px 32px rgba(15, 15, 15, 0.14);
    animation: pagePreviewNoticeIn 240ms ease-out both;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.page-preview-notice[hidden] {
    display: none;
}

.page-preview-notice-copy strong {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0;
}

.page-preview-notice-copy p {
    margin: 0;
    color: #595959;
    font-size: 0.78rem;
    line-height: 1.65;
}

.page-preview-notice-close {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin: -5px -5px 0 0;
    padding: 0;
    border: 0;
    border-radius: 2px;
    background: transparent;
    color: #676767;
    font: 400 1.15rem/1 sans-serif;
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease;
}

.page-preview-notice-close:hover {
    background: #f0f0f0;
    color: #111;
}

.page-preview-notice-close:focus-visible {
    outline: 2px solid var(--red-primary);
    outline-offset: 2px;
}

@keyframes pagePreviewNoticeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
    .page-preview-notice {
        right: 12px;
        bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) + 12px);
        width: calc(100vw - 24px);
        padding: 14px 12px 13px 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .page-preview-notice {
        animation: none;
    }
}
