:root {
    --bg: #f9f8f6;
    --text-primary: #121212;
    --text-secondary: #666666;
    --text-muted: #6e6e6e;
    --hairline: rgba(0, 0, 0, 0.06);
    --focus-ring: rgba(18, 18, 18, 0.34);
    --selection-bg: #121212;
    --selection-color: #f9f8f6;
    --scrollbar: rgba(0, 0, 0, 0.08);
    --spotlight: rgba(0, 0, 0, 0.02);
    --rail: rgba(18, 18, 18, 0.34);
    --rail-active: rgba(18, 18, 18, 0.78);
    --daylight-shadow-opacity: 0.3;
    --ns-fill: rgba(18, 18, 18, 0.06);
    --ns-fill-hover: rgba(18, 18, 18, 0.1);
    --ns-edge: rgba(18, 18, 18, 0.32);
    --ns-edge-hover: rgba(18, 18, 18, 0.54);
    --ns-btn-shadow: 0 4px 14px rgba(18, 18, 18, 0.1);
    --ns-btn-shadow-hover: 0 8px 20px rgba(18, 18, 18, 0.16);
    --ns-paper-mist: rgba(249, 248, 246, 0.68);
    --ns-paper-bg: rgba(249, 248, 246, 0.96);
    --ns-paper-line: rgba(18, 18, 18, 0.065);
    --ns-paper-line-strong: rgba(18, 18, 18, 0.115);
    --ns-track-hover: rgba(18, 18, 18, 0.035);
    --ns-paper-shadow:
        0 0 0 1px rgba(18, 18, 18, 0.05), 0 28px 90px rgba(18, 18, 18, 0.13),
        0 4px 18px rgba(18, 18, 18, 0.07);
    --accordion-header-space-y: 56px;
    --accordion-content-space-bottom: 88px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scrollbar-color: var(--scrollbar) transparent;
    scrollbar-width: thin;
}

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

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-clip: padding-box;
    background-color: var(--scrollbar);
    border: 2px solid transparent;
    border-radius: 10px;
}

body {
    background-color: var(--bg);
    color: var(--text-primary);
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "PingFang SC",
        sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
    transition:
        background-color 1.2s cubic-bezier(0.19, 1, 0.22, 1),
        color 1.2s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a,
button,
[role="button"] {
    touch-action: manipulation;
}

button {
    font: inherit;
}

button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible {
    border-radius: 2px;
    outline: 1px solid var(--focus-ring);
    outline-offset: 8px;
}

.skip-link {
    background: var(--text-primary);
    color: var(--bg);
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    left: 16px;
    letter-spacing: 0.08em;
    padding: 10px 12px;
    position: fixed;
    text-decoration: none;
    top: 16px;
    transform: translateY(-160%);
    transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10000;
}

.skip-link:focus-visible {
    transform: translateY(0);
}

.noise {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    contain: strict;
    height: 100vh;
    left: 0;
    mix-blend-mode: overlay;
    opacity: 0.035;
    pointer-events: none;
    position: fixed;
    top: 0;
    width: 100vw;
    z-index: 9999;
}

.daylight-shadow {
    contain: layout paint style;
    height: 100vh;
    left: 0;
    overflow: hidden;
    pointer-events: none;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 1;
}

.daylight-shadow.is-hidden {
    display: none;
}

.daylight-shadow-video {
    height: 100%;
    left: 0;
    mask-composite: intersect;
    mask-image:
        linear-gradient(
            to right,
            transparent,
            black 15%,
            black 85%,
            transparent
        ),
        linear-gradient(to bottom, black 0%, black 25%, transparent 60%);
    mix-blend-mode: multiply;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    position: absolute;
    top: 0;
    transition: opacity 2s cubic-bezier(0.25, 0.1, 0.25, 1);
    width: 100%;
    will-change: opacity;
    -webkit-mask-composite: source-in;
    -webkit-mask-image:
        linear-gradient(
            to right,
            transparent,
            black 15%,
            black 85%,
            transparent
        ),
        linear-gradient(to bottom, black 0%, black 25%, transparent 60%);
}

.daylight-shadow-video.is-visible {
    opacity: var(--daylight-shadow-opacity);
}

.spotlight {
    background: radial-gradient(
        circle 800px at var(--mouse-x, 50%) var(--mouse-y, 50%),
        var(--spotlight),
        transparent 80%
    );
    contain: strict;
    height: 100vh;
    left: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    top: 0;
    transition: opacity 1.5s ease;
    width: 100vw;
    z-index: 0;
}

body:hover .spotlight {
    opacity: 1;
}

.container {
    margin: 0 auto;
    max-width: 820px;
    padding: 0 6vw;
    position: relative;
    z-index: 10;
}

header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    left: 0;
    padding: 48px 6vw;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 100;
}

.logo,
.nav-btn {
    background: none;
    border: 0;
    color: var(--text-muted);
    cursor: pointer;
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.15em;
    min-height: 44px;
    text-decoration: none;
    transition: color 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.logo {
    align-items: center;
    display: inline-flex;
}

.controls {
    align-items: center;
    display: flex;
    gap: 40px;
}

.hero-viewport {
    align-items: center;
    display: flex;
    flex-direction: column;
    height: 100vh;
    justify-content: center;
    margin-top: -3vh;
    position: relative;
    text-align: center;
    width: 100%;
    z-index: 10;
    will-change: opacity, transform;
}

.hero-meta {
    color: var(--text-muted);
    font-family: "IBM Plex Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.3em;
    margin-bottom: 48px;
}

h1 {
    color: var(--text-primary);
    font-family: "Playfair Display", "Noto Serif SC", serif;
    font-size: clamp(56px, 9.5vw, 128px);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.05;
    min-height: 2.2em;
    text-wrap: balance;
}

:root[lang="zh"] h1 {
    font-weight: 300;
    letter-spacing: 0.05em;
}

.cursor {
    animation: blink 1s step-end infinite;
    background-color: var(--text-primary);
    display: inline-block;
    height: 0.85em;
    margin-left: 8px;
    opacity: 0;
    vertical-align: middle;
    width: 2px;
}

.cursor.active {
    opacity: 1;
}

@keyframes blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

.scroll-indicator {
    animation: scrollBreathe 3.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    background: linear-gradient(
        to bottom,
        var(--text-muted) 0%,
        transparent 100%
    );
    bottom: 7vh;
    height: 72px;
    left: 50%;
    position: absolute;
    transform: translateX(-50%);
    transform-origin: top;
    width: 1px;
}

@keyframes scrollBreathe {
    0% {
        opacity: 0;
        transform: scaleY(0);
    }
    50% {
        opacity: 1;
        transform: scaleY(1);
    }
    100% {
        opacity: 0;
        transform: scaleY(1) translateY(16px);
    }
}

.index-section {
    padding-bottom: 20vh;
}

.accordion-item {
    border-top: 1px solid var(--hairline);
}

.accordion-item:last-child {
    border-bottom: 1px solid var(--hairline);
}

.accordion-header {
    align-items: center;
    background: none;
    border: 0;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    font-family: "IBM Plex Mono", monospace;
    font-size: 13px;
    font-weight: 500;
    justify-content: space-between;
    letter-spacing: 0.08em;
    min-height: 44px;
    padding: var(--accordion-header-space-y) 0;
    transition:
        color 0.6s cubic-bezier(0.19, 1, 0.22, 1),
        padding-left 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    width: 100%;
}

.accordion-icon {
    font-size: 16px;
    font-weight: 300;
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.accordion-item.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 520ms cubic-bezier(0.19, 1, 0.22, 1);
}

.accordion-item.active .accordion-content-wrapper {
    grid-template-rows: 1fr;
}

.accordion-content {
    overflow: hidden;
}

.content-inner {
    opacity: 0;
    padding: 0 0 var(--accordion-content-space-bottom);
    transform: translateY(16px);
    transition:
        opacity 420ms cubic-bezier(0.19, 1, 0.22, 1),
        transform 420ms cubic-bezier(0.19, 1, 0.22, 1);
}

.accordion-item.active .content-inner {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 120ms;
}

.project-list {
    display: flex;
    flex-direction: column;
}

.project-row {
    border-bottom: 1px solid var(--hairline);
    color: inherit;
    cursor: pointer;
    display: block;
    padding: 36px 0;
    text-align: left;
    transition:
        border-bottom-color 0.5s cubic-bezier(0.19, 1, 0.22, 1),
        filter 0.5s cubic-bezier(0.19, 1, 0.22, 1),
        opacity 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    width: 100%;
}

.project-row:last-child {
    border-bottom: 0;
}

.proj-head {
    align-items: baseline;
    display: grid;
    gap: 24px;
    grid-template-columns: 64px 1fr 24px;
}

.proj-year {
    color: var(--text-muted);
    font-family: "IBM Plex Mono", monospace;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.proj-title-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.proj-title {
    color: var(--text-primary);
    font-family: "Playfair Display", "Noto Serif SC", serif;
    font-size: 32px;
    font-style: italic;
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.proj-brief {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 300;
}

.proj-icon {
    color: var(--text-muted);
    font-size: 14px;
    text-align: right;
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.project-row.active .proj-icon {
    transform: rotate(45deg);
}

.proj-detail-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.project-row.active .proj-detail-wrapper {
    grid-template-rows: 1fr;
}

.proj-detail {
    overflow: hidden;
}

.proj-detail-inner {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 300;
    line-height: 1.8;
    opacity: 0;
    padding: 32px 0 16px 88px;
    transform: translateY(8px);
    transition:
        opacity 0.6s cubic-bezier(0.19, 1, 0.22, 1),
        transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.project-row.active .proj-detail-inner {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 40px 0;
}

.tag {
    color: var(--text-muted);
    font-family: "IBM Plex Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.05em;
}

.tag:not(:last-child)::after {
    content: " /";
    margin-right: 14px;
    opacity: 0.5;
}

.proj-link {
    color: var(--text-primary);
    display: inline-block;
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.05em;
    padding-bottom: 4px;
    position: relative;
    text-decoration: none;
}

.proj-link::after,
.cta-link::after {
    background-color: currentColor;
    bottom: 0;
    content: "";
    height: 1px;
    left: 0;
    position: absolute;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    width: 100%;
}

.writing-list {
    display: flex;
    flex-direction: column;
}

.writing-item {
    align-items: baseline;
    border-bottom: 1px solid var(--hairline);
    color: inherit;
    display: grid;
    gap: 24px;
    grid-template-columns: 56px 1fr auto;
    padding: 28px 0;
    text-decoration: none;
    transition:
        border-bottom-color 0.5s cubic-bezier(0.19, 1, 0.22, 1),
        filter 0.5s cubic-bezier(0.19, 1, 0.22, 1),
        margin 0.5s cubic-bezier(0.19, 1, 0.22, 1),
        opacity 0.5s cubic-bezier(0.19, 1, 0.22, 1),
        padding 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.writing-item:last-child {
    border-bottom: 0;
}

.writing-date {
    color: var(--text-muted);
    font-family: "IBM Plex Mono", monospace;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.writing-title {
    font-size: 16px;
    font-weight: 300;
    line-height: 1.6;
    text-wrap: pretty;
}

.writing-platform {
    color: var(--text-muted);
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
}

.about-text,
.now-text {
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.9;
    max-width: 640px;
    text-wrap: pretty;
}

.about-text p {
    margin-bottom: 36px;
}

.about-text p:first-of-type::first-letter {
    color: var(--text-primary);
    float: left;
    font-family: "Playfair Display", "Noto Serif SC", serif;
    font-size: 3.4em;
    font-style: italic;
    line-height: 0.85;
    padding: 6px 12px 0 0;
}

:root[lang="zh"] .about-text p:first-of-type::first-letter {
    font-style: normal;
    font-weight: 500;
}

#acc-about .content-inner {
    max-width: 720px;
}

.now-text {
    max-width: none;
}

.now-intro {
    margin-bottom: 0;
    max-width: 720px;
}

.contact-cta {
    border-top: 1px solid var(--hairline);
    padding: 10vh 0 12vh;
    text-align: center;
}

.cta-text {
    color: var(--text-primary);
    font-family: "Playfair Display", "Noto Serif SC", serif;
    font-size: clamp(24px, 4vw, 36px);
    font-style: italic;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 28px;
    text-wrap: balance;
}

:root[lang="zh"] .cta-text {
    font-style: normal;
    font-weight: 300;
}

.cta-link {
    color: var(--text-secondary);
    font-family: "IBM Plex Mono", monospace;
    font-size: 13px;
    letter-spacing: 0.05em;
    padding-bottom: 4px;
    position: relative;
    text-decoration: none;
    transition: color 0.4s;
}

footer {
    align-items: flex-end;
    color: var(--text-muted);
    display: flex;
    font-size: 12px;
    font-weight: 300;
    justify-content: space-between;
    line-height: 1.8;
    padding: 0 0 14vh;
}

.footer-links {
    display: flex;
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    gap: 32px;
}

.footer-links a {
    color: inherit;
    text-decoration: none;
    transition: color 0.4s;
}

.footer-copy {
    color: var(--text-muted);
    display: inline-block;
    font-family: "IBM Plex Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.05em;
    margin-top: 16px;
}

.reveal-focus {
    filter: blur(12px);
    opacity: 0;
    transform: translateY(16px);
    transition:
        opacity 1.6s cubic-bezier(0.19, 1, 0.22, 1),
        transform 1.6s cubic-bezier(0.19, 1, 0.22, 1),
        filter 1.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.reveal-focus.visible {
    filter: blur(0);
    opacity: 1;
    transform: translateY(0);
}

.reveal-focus:not(.visible) {
    will-change: opacity, transform, filter;
}

#ink-canvas {
    contain: strict;
    height: 100vh;
    left: 0;
    pointer-events: none;
    position: fixed;
    top: 0;
    width: 100vw;
    z-index: 9998;
}

.section-rail {
    align-items: flex-end;
    contain: layout paint style;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: fixed;
    right: max(22px, env(safe-area-inset-right));
    top: 50%;
    transform: translateY(-50%);
    z-index: 120;
}

.rail-link {
    align-items: center;
    color: var(--text-muted);
    display: flex;
    flex-direction: row-reverse;
    gap: 12px;
    min-height: 34px;
    padding: 0 0 0 12px;
    position: relative;
    text-decoration: none;
}

.rail-mark {
    background: var(--rail);
    border-radius: 2px;
    display: block;
    height: 2px;
    opacity: 0.4;
    transition:
        background-color 260ms ease,
        opacity 260ms ease,
        width 220ms cubic-bezier(0.16, 1, 0.3, 1);
    width: var(--rail-width, 14px);
}

.rail-label {
    color: var(--text-secondary);
    font-family: "IBM Plex Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.14em;
    opacity: 0;
    transform: translateX(8px);
    transition:
        opacity 200ms ease,
        transform 240ms cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.rail-link.active .rail-mark {
    background: var(--rail-active);
    opacity: 1;
}

.section-rail.has-hover .rail-link.active:not(.hovered) .rail-mark {
    background: var(--rail);
    opacity: 0.4;
}

.rail-link.hovered .rail-mark,
.rail-link:focus-visible .rail-mark {
    background: var(--rail-active);
    opacity: 1;
}

.rail-link:hover .rail-label,
.rail-link:focus-visible .rail-label {
    opacity: 1;
    transform: translateX(0);
}

@media (hover: hover) {
    .nav-btn:hover,
    a.nav-btn:hover,
    .logo:hover,
    .footer-links a:hover,
    .cta-link:hover {
        color: var(--text-primary);
    }

    .accordion-header:hover {
        color: var(--text-secondary);
        padding-left: 20px;
    }

    .project-list:hover .project-row {
        filter: blur(0.5px);
        opacity: 0.45;
    }

    .project-list .project-row:hover,
    .project-list .project-row.active {
        filter: blur(0);
        opacity: 1;
    }

    .project-row:hover .proj-title,
    .project-row.active .proj-title {
        transform: translateX(12px);
    }

    .proj-link:hover::after,
    .cta-link:hover::after {
        transform: scaleX(1);
        transform-origin: left;
    }

    .writing-list:hover .writing-item {
        filter: blur(0.5px);
        opacity: 0.45;
    }

    .writing-list .writing-item:hover {
        border-bottom-color: transparent;
        filter: blur(0);
        margin: 0 -16px;
        opacity: 1;
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (max-width: 900px) {
    .section-rail {
        display: none;
    }
}

@media (max-width: 768px) {
    :root {
        --accordion-header-space-y: 40px;
        --accordion-content-space-bottom: 64px;
    }

    header {
        padding: 32px 6vw;
    }

    h1 {
        font-size: 52px;
        min-height: 2.5em;
    }

    .controls {
        gap: 24px;
    }

    .index-section {
        padding-bottom: 14vh;
    }

    .project-row {
        padding: 28px 0;
    }

    .proj-title {
        font-size: 26px;
    }

    .proj-head {
        grid-template-columns: 1fr auto;
    }

    .proj-year {
        display: none;
    }

    .proj-detail-inner {
        padding-left: 0;
    }

    .writing-date {
        display: none;
    }

    .writing-item {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin: 0;
        padding: 24px 0;
    }

    .about-text {
        font-size: 15px;
    }

    .reveal-focus {
        filter: none;
        transition:
            opacity 700ms cubic-bezier(0.19, 1, 0.22, 1),
            transform 700ms cubic-bezier(0.19, 1, 0.22, 1);
    }

    .reveal-focus.visible {
        filter: none;
    }

    footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 32px;
        padding-bottom: 10vh;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 1ms !important;
    }

    h1 {
        transform: none !important;
    }

    .spotlight,
    .daylight-shadow,
    #ink-canvas {
        display: none;
    }
}

/* ============================================
   Now Spinning · 贴边书签与极简索引
   ============================================ */

body.ns-paper-open {
    overflow: hidden;
}

.now-spinning {
    bottom: max(32px, env(safe-area-inset-bottom));
    left: 0;
    opacity: 0;
    position: fixed;
    transition: opacity 1.2s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 220;
}

.now-spinning.visible {
    opacity: 1;
}

.now-spinning.is-dimmed:not(.is-open) .ns-footnote {
    opacity: 0.38;
}

.ns-footnote {
    --ns-footnote-tip: 46px;
    --ns-footnote-peek: 46px;
    --ns-footnote-dot-right: calc((var(--ns-footnote-peek) - 8px) / 2);
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    filter: drop-shadow(var(--ns-btn-shadow));
    font-family: "IBM Plex Mono", monospace;
    gap: 8px;
    justify-content: center;
    min-height: 44px;
    padding: 10px 46px 10px 16px;
    position: relative;
    transition:
        filter 360ms cubic-bezier(0.19, 1, 0.22, 1),
        color 160ms ease,
        opacity 420ms cubic-bezier(0.19, 1, 0.22, 1),
        transform 320ms cubic-bezier(0.19, 1, 0.22, 1);
    transform: translateX(calc(-100% + var(--ns-footnote-peek)));
    width: 168px;
}

.ns-footnote,
.ns-footnote::before,
.ns-footnote::after {
    clip-path: polygon(0 0, calc(100% - var(--ns-footnote-tip)) 0, 100% 50%, calc(100% - var(--ns-footnote-tip)) 100%, 0 100%);
}

.ns-footnote::before {
    background: var(--ns-fill);
    content: "";
    inset: 0;
    position: absolute;
    transition:
        background-color 180ms ease,
        opacity 180ms ease;
}

.ns-footnote::after {
    background: var(--ns-edge);
    bottom: 8px;
    content: "";
    position: absolute;
    right: 30px;
    top: 8px;
    transition: opacity 280ms ease;
    width: 1px;
}

.ns-footnote-dot {
    border: 1px solid currentColor;
    border-radius: 999px;
    display: block;
    height: 8px;
    opacity: 0.74;
    position: absolute;
    right: var(--ns-footnote-dot-right);
    top: 50%;
    transition:
        background-color 180ms ease,
        border-color 180ms ease,
        opacity 180ms ease,
        transform 180ms cubic-bezier(0.19, 1, 0.22, 1);
    transform: translateY(-50%);
    width: 8px;
    z-index: 1;
}

.ns-footnote-num {
    color: inherit;
    flex: 0 0 20px;
    font-size: 9px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.08em;
    line-height: 1.2;
    position: relative;
    transition: opacity 180ms ease;
    z-index: 1;
}

.now-spinning.is-playing .ns-footnote-dot {
    background: currentColor;
    opacity: 1;
}

.now-spinning.is-paused .ns-footnote-dot {
    background: transparent;
}

.ns-footnote-title {
    color: var(--text-secondary);
    flex: 1 1 auto;
    font-size: 10px;
    letter-spacing: 0.03em;
    line-height: 1.2;
    max-width: 78px;
    overflow: hidden;
    position: relative;
    text-overflow: ellipsis;
    text-align: center;
    transition:
        color 160ms ease,
        opacity 180ms ease;
    white-space: nowrap;
    z-index: 1;
}

.now-spinning:not(.is-open) .ns-footnote-num,
.now-spinning:not(.is-open) .ns-footnote-title {
    opacity: 0;
}

.now-spinning.is-open .ns-footnote {
    --ns-footnote-tip: 30px;
    --ns-footnote-dot-right: 23px;
    color: var(--text-muted);
    filter: none;
    opacity: 0.72;
    transform: translateX(calc(-100% + 32px));
}

.now-spinning.is-open .ns-footnote::before {
    opacity: 0.62;
}

.now-spinning.is-open .ns-footnote::after,
.now-spinning.is-open .ns-footnote-num,
.now-spinning.is-open .ns-footnote-title {
    opacity: 0;
}

@media (hover: hover) {
    .now-spinning:not(.is-open) .ns-footnote:hover,
    .now-spinning:not(.is-open) .ns-footnote:focus-visible {
        --ns-footnote-tip: 30px;
        --ns-footnote-dot-right: 23px;
        color: var(--text-primary);
        filter: drop-shadow(var(--ns-btn-shadow-hover));
        transform: translateX(0);
    }

    .now-spinning:not(.is-open) .ns-footnote:hover::before,
    .now-spinning:not(.is-open) .ns-footnote:focus-visible::before {
        background: var(--ns-fill-hover);
    }

    .now-spinning:not(.is-open) .ns-footnote:hover::after,
    .now-spinning:not(.is-open) .ns-footnote:focus-visible::after {
        opacity: 1;
    }

    .now-spinning:not(.is-open) .ns-footnote:hover .ns-footnote-title,
    .now-spinning:not(.is-open) .ns-footnote:focus-visible .ns-footnote-title {
        color: var(--text-primary);
        opacity: 1;
    }

    .now-spinning:not(.is-open) .ns-footnote:hover .ns-footnote-num,
    .now-spinning:not(.is-open) .ns-footnote:focus-visible .ns-footnote-num {
        opacity: 1;
    }

    .now-spinning:not(.is-open) .ns-footnote:hover .ns-footnote-dot,
    .now-spinning:not(.is-open) .ns-footnote:focus-visible .ns-footnote-dot {
        transform: translateY(-50%) scale(1.22);
    }
}

.ns-footnote:focus-visible,
.ns-close:focus-visible,
.ns-track:focus-visible {
    outline: 1px solid var(--focus-ring);
    outline-offset: 3px;
}

.ns-layer {
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity 280ms cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 230;
}

.ns-layer[hidden] {
    display: none;
}

.now-spinning.is-open .ns-layer {
    opacity: 1;
    pointer-events: auto;
}

.ns-mist {
    backdrop-filter: blur(4px);
    background:
        radial-gradient(circle at 50% 42%, transparent 0, transparent 28%, var(--ns-paper-mist) 80%),
        var(--ns-paper-mist);
    inset: 0;
    position: fixed;
}

.ns-paper {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 36%),
        repeating-linear-gradient(90deg, transparent 0, transparent 23px, rgba(18, 18, 18, 0.014) 24px),
        repeating-linear-gradient(180deg, transparent 0, transparent 31px, rgba(18, 18, 18, 0.016) 32px),
        var(--ns-paper-bg);
    box-shadow: var(--ns-paper-shadow);
    color: var(--text-primary);
    left: 50%;
    max-height: calc(100dvh - 56px);
    overflow: auto;
    padding: clamp(56px, 6vw, 78px) clamp(42px, 5.6vw, 74px)
        clamp(58px, 6.2vw, 78px);
    position: fixed;
    scrollbar-width: thin;
    top: 50%;
    transform: translate(-50%, -47%) scale(0.982);
    transition:
        opacity 280ms cubic-bezier(0.19, 1, 0.22, 1),
        transform 340ms cubic-bezier(0.19, 1, 0.22, 1),
        filter 280ms cubic-bezier(0.19, 1, 0.22, 1);
    width: min(900px, calc(100vw - 72px));
}

.now-spinning.is-open .ns-paper {
    filter: blur(0);
    transform: translate(-50%, -50%) scale(1);
}

.ns-paper:focus {
    outline: none;
}

.ns-close {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    font-family: "IBM Plex Mono", monospace;
    font-size: 16px;
    height: 32px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    position: absolute;
    right: clamp(18px, 3vw, 34px);
    top: clamp(16px, 2.8vw, 30px);
    transition:
        color 180ms ease,
        opacity 180ms ease,
        transform 180ms cubic-bezier(0.19, 1, 0.22, 1);
    width: 32px;
}

.ns-paper-head {
    border-bottom: 1px solid var(--ns-paper-line);
    margin: 0 42px 34px 0;
    padding-bottom: 28px;
}

.ns-paper-title {
    color: var(--text-primary);
    font-family: "Playfair Display", "Noto Serif SC", serif;
    font-size: clamp(34px, 4.6vw, 56px);
    font-style: italic;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 0.95;
    text-wrap: balance;
}

:root[lang="zh"] .ns-paper-title {
    font-style: normal;
    font-weight: 300;
    letter-spacing: 0.04em;
}

.ns-close:active,
.ns-track:active,
.ns-footnote:active {
    transform: scale(0.96);
}

.ns-playlist {
    column-gap: clamp(38px, 5vw, 64px);
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(6, minmax(0, auto));
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    row-gap: 0;
}

.ns-playlist::before {
    background: linear-gradient(180deg, transparent, var(--ns-paper-line-strong) 12%, var(--ns-paper-line-strong) 88%, transparent);
    bottom: 0;
    content: "";
    left: 50%;
    opacity: 0.58;
    position: absolute;
    top: 0;
    width: 1px;
}

.ns-playlist > li {
    min-width: 0;
}

.ns-playlist > li:nth-child(1) .ns-track,
.ns-playlist > li:nth-child(7) .ns-track {
    border-top-color: transparent;
}

.ns-track {
    align-items: center;
    background: transparent;
    border: 0;
    border-top: 1px solid var(--ns-paper-line);
    color: var(--text-secondary);
    cursor: pointer;
    display: grid;
    gap: 0;
    grid-template-columns: 18px 42px minmax(0, 1fr);
    min-height: 58px;
    padding: 11px 14px 11px 0;
    position: relative;
    text-align: left;
    transition:
        background-color 180ms ease,
        color 180ms ease,
        opacity 180ms ease,
        padding-left 220ms cubic-bezier(0.19, 1, 0.22, 1);
    width: 100%;
}

.ns-track:hover,
.ns-track:focus-visible {
    background: var(--ns-track-hover);
    color: var(--text-primary);
    padding-left: 10px;
}

.ns-track::before {
    align-self: center;
    border: 1px solid currentColor;
    border-radius: 999px;
    content: "";
    grid-column: 1;
    height: 5px;
    justify-self: start;
    opacity: 0.66;
    width: 5px;
}

.ns-track[aria-current="true"] {
    color: var(--text-primary);
}

.ns-track[aria-current="true"] .ns-track-title {
    font-weight: 450;
}

.now-spinning.is-playing .ns-track[aria-current="true"]::before {
    background: currentColor;
    opacity: 1;
}

.now-spinning.is-paused .ns-track[aria-current="true"]::before {
    background: transparent;
    opacity: 0.86;
}

.ns-track-num {
    color: var(--text-muted);
    font-family: "IBM Plex Mono", monospace;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
    grid-column: 2;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-align: left;
}

.ns-track-copy {
    grid-column: 3;
    min-width: 0;
}

.ns-track-title {
    color: inherit;
    display: block;
    font-size: clamp(15px, 1.45vw, 17px);
    font-weight: 300;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.now-spinning.is-open .ns-track {
    animation: ns-track-in 280ms cubic-bezier(0.19, 1, 0.22, 1) both;
    animation-delay: calc(var(--track-index, 0) * 10ms);
}

@keyframes ns-track-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (hover: hover) {
    .ns-close:hover {
        color: var(--text-primary);
    }
}

@media (max-width: 768px) {
    .now-spinning {
        bottom: max(18px, env(safe-area-inset-bottom));
    }

    .ns-footnote {
        --ns-footnote-peek: 42px;
        min-height: 44px;
        padding: 10px 44px 10px 16px;
        transform: translateX(calc(-100% + var(--ns-footnote-peek)));
        width: 158px;
    }

    .ns-footnote-title {
        max-width: 70px;
    }

    .now-spinning.is-open .ns-footnote {
        transform: translateX(calc(-100% + 28px));
    }

    .ns-paper {
        border-radius: 2px;
        max-height: calc(100dvh - 20px);
        padding: 40px 24px 38px;
        width: calc(100vw - 20px);
    }

    .ns-close {
        right: 14px;
        top: 14px;
    }

    .ns-paper-head {
        margin: 4px 34px 24px 0;
        padding-bottom: 22px;
    }

    .ns-paper-title {
        font-size: clamp(34px, 11vw, 48px);
        line-height: 0.98;
    }

    .ns-playlist {
        display: block;
    }

    .ns-playlist::before {
        display: none;
    }

    .ns-playlist > li:nth-child(7) .ns-track {
        border-top-color: var(--ns-paper-line);
    }

    .ns-track {
        grid-template-columns: 20px 42px minmax(0, 1fr);
        min-height: 58px;
        padding: 10px 10px 10px 0;
    }

    .ns-track-title {
        font-size: 17px;
        line-height: 1.28;
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ns-layer,
    .ns-paper,
    .ns-footnote,
    .ns-footnote-dot,
    .ns-close,
    .ns-track {
        animation: none;
        transition-duration: 1ms;
    }

    .now-spinning.is-open .ns-track {
        animation: none;
    }
}
