:root {
    color-scheme: light;
    --primary: oklch(0.64 0.16 var(--hue));
    --primary-soft: oklch(0.94 0.04 var(--hue));
    --page-bg: oklch(0.97 0.01 var(--hue));
    --card-bg: rgba(255, 255, 255, 0.76);
    --card-solid: #fff;
    --text: rgba(22, 26, 34, 0.9);
    --text-soft: rgba(22, 26, 34, 0.62);
    --line: rgba(32, 38, 48, 0.09);
    --shadow: 0 18px 45px rgba(24, 31, 42, 0.08);
    --radius: 18px;
    --page-width: 1540px;
}

:root.dark {
    color-scheme: dark;
    --page-bg: oklch(0.18 0.02 var(--hue));
    --card-bg: rgba(28, 34, 45, 0.68);
    --card-solid: #202735;
    --text: rgba(255, 255, 255, 0.9);
    --text-soft: rgba(255, 255, 255, 0.62);
    --line: rgba(255, 255, 255, 0.11);
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font: 16px/1.75 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 0, color-mix(in oklch, var(--primary) 12%, transparent), transparent 32rem),
        var(--page-bg);
    transition: background 0.2s ease, color 0.2s ease;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 12% 16%, rgba(255, 195, 232, 0.26), transparent 22rem),
        radial-gradient(circle at 84% 8%, rgba(128, 220, 255, 0.18), transparent 24rem);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.site-navbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    pointer-events: none;
    padding: 10px 14px;
}

.navbar-inner {
    width: min(var(--page-width), calc(100vw - 28px));
    height: 64px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(22px);
    box-shadow: 0 12px 36px rgba(18, 25, 36, 0.08);
    pointer-events: auto;
    padding: 0 14px 0 18px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-full .navbar-inner,
.nav-full .mobile-menu.open {
    width: calc(100vw - 28px);
    max-width: none;
}

.nav-solid .navbar-inner {
    background: color-mix(in oklch, var(--card-solid) 86%, transparent);
    border-color: var(--line);
    backdrop-filter: blur(10px);
}

.nav-clear .navbar-inner {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: none;
}

:root.dark .nav-solid .navbar-inner {
    background: color-mix(in oklch, var(--card-solid) 84%, transparent);
}

:root.dark .navbar-inner {
    background: rgba(21, 26, 36, 0.46);
    border-color: rgba(255, 255, 255, 0.12);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 10px;
    border-radius: 12px;
    font-weight: 800;
}

.brand:hover,
.icon-btn:hover,
.nav-links a:hover,
.toolbar-btn:hover {
    background: color-mix(in oklch, var(--primary) 13%, transparent);
    color: var(--primary);
}

.brand img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.brand-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: var(--primary);
}

.nav-links {
    justify-self: center;
    display: flex;
    gap: 4px;
    align-items: center;
}

.nav-links a,
.mobile-menu a,
.mobile-menu-label,
.nav-dropdown-trigger {
    padding: 8px 13px;
    border-radius: 11px;
    color: var(--text);
    font-weight: 650;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-dropdown::after {
    content: "";
    position: absolute;
    left: -8px;
    right: -8px;
    top: 100%;
    height: 14px;
}

.nav-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    font-weight: 650;
    line-height: inherit;
    appearance: none;
}

.nav-dropdown-trigger b {
    font-size: 0.8em;
    line-height: 1;
    color: var(--text-soft);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    z-index: 70;
    min-width: 150px;
    display: grid;
    gap: 4px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: color-mix(in oklch, var(--card-solid) 86%, transparent);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translate(-50%, -6px);
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
}

.nav-dropdown-menu a {
    white-space: nowrap;
}

.nav-links a.current,
.nav-dropdown-trigger.current,
.nav-dropdown:hover .nav-dropdown-trigger {
    color: var(--primary);
    background: color-mix(in oklch, var(--primary) 14%, transparent);
}

.nav-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

.icon-btn,
.floating-btn,
.toolbar-btn,
.search-panel button,
.submit,
.primary-link {
    border: 0;
    border-radius: 12px;
    background: color-mix(in oklch, var(--primary) 10%, transparent);
    color: var(--text);
    cursor: pointer;
    font: inherit;
}

.icon-btn {
    width: 44px;
    height: 44px;
    font-size: 20px;
}

.icon-btn i,
.icon-btn svg {
    width: 19px;
    height: 19px;
    stroke-width: 2.25;
}

a.icon-btn {
    display: inline-grid;
    place-items: center;
}

.nav-search {
    width: 164px;
    height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border-radius: 12px;
    background: color-mix(in oklch, var(--card-solid) 55%, transparent);
    color: var(--text-soft);
}

.nav-search input {
    min-width: 0;
    width: 100%;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--text);
    font: inherit;
}

.search-mini {
    display: none;
}

.mobile-only {
    display: none;
}

.mobile-menu,
.search-panel {
    display: none;
}

.mobile-menu.open {
    width: min(var(--page-width), calc(100vw - 28px));
    margin: 8px auto 0;
    padding: 10px;
    border-radius: 16px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    pointer-events: auto;
}

.mobile-menu.open,
.mobile-menu.open a {
    display: block;
}

.mobile-menu.open .mobile-menu-label {
    display: block;
    margin-top: 4px;
    color: var(--primary);
    background: color-mix(in oklch, var(--primary) 10%, transparent);
}

.mobile-menu.open .mobile-sub-link {
    margin-left: 14px;
    padding-left: 18px;
    color: var(--text-soft);
}

.search-panel.open {
    position: fixed;
    z-index: 60;
    inset: 88px 14px auto;
    display: block;
    pointer-events: none;
}

.search-panel form {
    width: min(620px, calc(100vw - 28px));
    margin: 0 auto;
    display: flex;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--card-bg);
    backdrop-filter: blur(22px);
    box-shadow: var(--shadow);
    pointer-events: auto;
}

.search-panel input,
.comments input,
.comments textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: color-mix(in oklch, var(--card-solid) 72%, transparent);
    color: var(--text);
    padding: 10px 12px;
    font: inherit;
    outline: none;
}

.search-panel button,
.submit,
.primary-link {
    padding: 10px 16px;
    background: var(--primary);
    color: white;
    font-weight: 750;
}

.display-settings-panel {
    position: fixed;
    top: 82px;
    right: max(22px, calc((100vw - var(--page-width)) / 2 + 22px));
    z-index: 65;
    width: min(330px, calc(100vw - 32px));
    max-height: calc(100vh - 104px);
    overflow: auto;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 18px;
    background: color-mix(in oklch, var(--card-solid) 76%, transparent);
    backdrop-filter: blur(24px);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

:root.dark .display-settings-panel {
    border-color: rgba(255, 255, 255, 0.12);
}

.display-settings-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.settings-block + .settings-block {
    margin-top: 6px;
}

.settings-block h3 {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 10px;
    padding-left: 13px;
    font-size: 1rem;
    line-height: 1.2;
    font-weight: 850;
}

.settings-block h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.12em;
    width: 4px;
    height: 1em;
    border-radius: 999px;
    background: var(--primary);
}

.settings-block output {
    min-width: 42px;
    padding: 5px 9px;
    border-radius: 8px;
    background: color-mix(in oklch, var(--primary) 13%, transparent);
    color: var(--primary);
    text-align: center;
    font-size: 0.85rem;
}

.hue-range {
    width: 100%;
    accent-color: var(--primary);
}

.hue-range::-webkit-slider-runnable-track {
    height: 18px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff8da3, #ffd36e, #78d98b, #62d7df, #9b9dff, #ee8bd5);
}

.hue-range::-webkit-slider-thumb {
    margin-top: -4px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.settings-choice {
    min-height: 36px;
    border: 0;
    border-radius: 9px;
    background: color-mix(in oklch, var(--primary) 10%, transparent);
    color: var(--primary);
    cursor: pointer;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 800;
}

.settings-choice.active {
    background: color-mix(in oklch, var(--primary) 22%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--primary) 25%, transparent);
}

.settings-toggle {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 7px;
    padding: 7px 10px;
    border-radius: 9px;
    background: color-mix(in oklch, var(--primary) 10%, transparent);
    color: var(--primary);
    font-weight: 800;
}

.settings-toggle input {
    width: 38px;
    height: 20px;
    accent-color: var(--primary);
}

.hero {
    position: relative;
    min-height: 430px;
    height: var(--home-hero-height, 58vh);
    background-color: #171426;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.is-inner .hero {
    height: var(--inner-hero-height, 36vh);
    min-height: 300px;
}

body.wallpaper-fullscreen .hero {
    height: 100vh;
    min-height: 620px;
}

body.wallpaper-overlay {
    background-attachment: fixed;
}

body.wallpaper-overlay .hero {
    position: fixed;
    inset: 0;
    height: 100vh;
    min-height: 100vh;
    z-index: -1;
}

body.wallpaper-overlay .page-shell {
    margin-top: 96px;
}

body.wallpaper-overlay .card-base,
body.wallpaper-overlay .navbar-inner {
    background: color-mix(in oklch, var(--card-solid) 58%, transparent);
}

body.wallpaper-overlay .content-area.bangumi-page {
    padding: 0;
}

body.wallpaper-overlay .bangumi-panel {
    background: color-mix(in oklch, var(--card-solid) 56%, transparent);
    backdrop-filter: blur(18px);
}

body.wallpaper-overlay .bangumi-section.active {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
}

body.wallpaper-solid .hero {
    background-image: none !important;
    background-color: var(--page-bg);
}

body.hide-hero-title .hero-copy {
    display: none;
}

body.hide-waves .waves {
    display: none;
}

body.hide-fade .hero-dim {
    background: rgba(0, 0, 0, var(--hero-overlay-opacity, 0.2));
}

.hero-dim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(0, 0, 0, var(--hero-overlay-opacity, 0.2)), rgba(0, 0, 0, calc(var(--hero-overlay-opacity, 0.2) + 0.12))),
        radial-gradient(circle at 50% 72%, rgba(255, 255, 255, 0.08), transparent 30rem);
}

.hero-copy {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-content: center;
    text-align: center;
    padding: 90px 20px 120px;
    color: white;
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(2.4rem, 7vw, 5.8rem);
    line-height: 1.05;
    text-shadow: 0 8px 34px rgba(0, 0, 0, 0.32);
}

.hero-copy p {
    margin: 18px 0 0;
    font-size: clamp(1rem, 2.4vw, 1.45rem);
    opacity: 0.9;
}

.hero-typing {
    min-height: 1.6em;
}

.hero-typing::after {
    content: "";
    display: inline-block;
    width: 2px;
    height: 1.1em;
    margin-left: 6px;
    vertical-align: -0.14em;
    background: currentColor;
    animation: typing-caret 0.86s steps(1) infinite;
}

@keyframes typing-caret {
    50% {
        opacity: 0;
    }
}

.hero-copy-small h1 {
    font-size: clamp(2rem, 5vw, 3.6rem);
}

.waves {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 90px;
    z-index: 3;
    isolation: isolate;
    overflow: visible;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

.waves svg {
    width: 100%;
    height: 100%;
    display: block;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.waves .parallax {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.waves use {
    fill: var(--page-bg);
    animation: wave 25s cubic-bezier(0.5, 0.5, 0.45, 0.5) infinite;
    will-change: transform;
}

.waves use:nth-child(1) {
    opacity: 0.25;
    animation-delay: -2s;
    animation-duration: 7s;
}

.waves use:nth-child(2) {
    opacity: 0.5;
    animation-delay: -3s;
    animation-duration: 10s;
}

.waves use:nth-child(3) {
    opacity: 0.65;
    animation-delay: -4s;
    animation-duration: 13s;
}

.waves use:nth-child(4) {
    opacity: 0.9;
    animation-delay: -5s;
    animation-duration: 20s;
}

.page-shell {
    width: min(var(--page-width), calc(100vw - 80px));
    margin: -80px auto 48px;
    position: relative;
    z-index: 4;
    display: grid;
    gap: 24px;
}

.page-shell.with-sidebar {
    grid-template-columns: 300px minmax(0, 1fr);
}

.page-shell.layout-both {
    grid-template-columns: 300px minmax(0, 1fr) 300px;
}

.page-shell.layout-right {
    grid-template-columns: minmax(0, 1fr) 300px;
}

.page-shell.layout-none {
    grid-template-columns: 1fr;
}

.sidebar-right .page-shell.with-sidebar {
    grid-template-columns: minmax(0, 1fr) 300px;
}

.sidebar-right .sidebar {
    order: 2;
}

.content-area {
    min-width: 0;
}

.content-area.solo {
    grid-column: 1 / -1;
}

.card-base {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card-bg);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
    padding: 10px 12px 10px 16px;
}

.list-toolbar-title {
    display: flex;
    align-items: baseline;
    gap: 9px;
    min-width: 0;
}

.list-toolbar-title strong {
    color: var(--text);
    font-size: 1.02rem;
}

.list-toolbar-title span {
    color: var(--text-soft);
    font-size: 0.88rem;
}

.layout-switcher {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    background: color-mix(in oklch, var(--primary) 8%, transparent);
}

.toolbar-btn {
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 9px;
    color: var(--text-soft);
    background: transparent;
    font-weight: 800;
}

.toolbar-btn.active {
    color: white;
    background: var(--primary);
}

.post-list {
    display: grid;
    gap: 18px;
}

.post-list.grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.post-card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32%;
    align-items: stretch;
    animation: rise 0.5s ease both;
    animation-delay: var(--delay);
}

.post-list.grid .post-card {
    grid-template-columns: 1fr;
    height: auto;
}

.post-card-cover {
    position: relative;
    order: 2;
    align-self: stretch;
    margin: 16px 16px 16px 0;
    overflow: hidden;
    border-radius: 15px;
    min-height: 0;
    contain: size paint;
}

.post-list.grid .post-card-cover {
    order: 0;
    margin: 0;
    border-radius: var(--radius) var(--radius) 0 0;
    aspect-ratio: 2 / 1;
    height: auto;
    contain: none;
}

.post-card-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.post-card:hover .post-card-cover img {
    transform: scale(1.06);
}

.cover-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.2s ease;
}

.post-card:hover .cover-mask {
    background: rgba(0, 0, 0, 0.22);
}

.post-card-body {
    position: relative;
    padding: 26px 26px 24px 32px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.post-card-body::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 32px;
    width: 4px;
    height: 1.3em;
    border-radius: 999px;
    background: var(--primary);
}

.post-card-body.no-cover {
    grid-column: 1 / -1;
}

.post-card-title {
    position: relative;
    font-size: clamp(1.08rem, 1.65vw, 1.34rem);
    line-height: 1.3;
    font-weight: 850;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-title:hover,
.post-meta a:hover,
.widget a:hover,
.article-content a {
    color: var(--primary);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    color: var(--text-soft);
    font-size: 0.78rem;
}

.post-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 6px;
    background: color-mix(in oklch, var(--primary) 9%, transparent);
    color: var(--text-soft);
    font-weight: 600;
}

.post-meta-item i,
.post-meta-item svg {
    width: 14px;
    height: 14px;
    color: var(--primary);
    stroke-width: 2.2;
    flex: 0 0 auto;
}

.post-excerpt {
    margin: 14px 0 12px;
    color: var(--text-soft);
    line-height: 1.75;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 0;
    color: var(--primary);
    font-size: 0.74rem;
    font-weight: 650;
}

.post-tags:empty {
    display: none;
}

.post-tags span {
    display: inline-flex;
    align-items: center;
}

.post-tags a {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 7px;
    border-radius: 6px;
    background: color-mix(in oklch, var(--primary) 9%, transparent);
    color: var(--primary);
}

.post-tags a::before {
    content: "#";
    margin-right: 1px;
}

.enter-link {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: color-mix(in oklch, var(--primary) 13%, transparent);
    color: var(--primary);
    font-size: 32px;
    line-height: 1;
}

.sidebar {
    display: grid;
    align-content: start;
    gap: 18px;
}

.widget {
    padding: 20px;
}

.widget h3 {
    position: relative;
    margin: 0 0 14px;
    padding-left: 14px;
    font-size: 1.1rem;
    line-height: 1.3;
    font-weight: 850;
}

.widget h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.28em;
    width: 4px;
    height: 0.9em;
    border-radius: 999px;
    background: var(--primary);
}

.widget ul,
.widget-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 9px;
}

.widget li {
    color: var(--text-soft);
}

.profile-widget {
    text-align: center;
    padding: 18px 18px 22px;
}

.profile-entry-link {
    display: block;
}

.profile-entry-link .profile-avatar,
.profile-entry-link h3,
.profile-entry-link .profile-mark {
    transition: transform 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.profile-entry-link:hover .profile-avatar {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px color-mix(in oklch, var(--primary) 18%, transparent);
}

.profile-entry-link:hover h3 {
    color: var(--primary);
}

.profile-avatar {
    width: 100%;
    max-width: 220px;
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    margin: 0 auto 12px;
    border-radius: 18px;
    overflow: hidden;
    background: color-mix(in oklch, var(--primary) 10%, white);
    color: white;
    font-size: 4rem;
    font-weight: 850;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-widget h3 {
    padding-left: 0;
    margin-bottom: 4px;
    font-size: 1.35rem;
}

.profile-widget h3::before {
    display: none;
}

.profile-mark {
    display: block;
    width: 34px;
    height: 5px;
    margin: 4px auto 8px;
    border-radius: 999px;
    background: var(--primary);
}

.profile-widget p {
    margin: 0;
    color: var(--text-soft);
    font-weight: 700;
}

.profile-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.profile-links a,
.small-pill,
.tag-cloud a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 11px;
    border-radius: 9px;
    background: color-mix(in oklch, var(--primary) 13%, transparent);
    color: var(--primary);
    font-weight: 800;
    line-height: 1.2;
}

.profile-links a {
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.profile-links a:hover {
    transform: translateY(-2px);
    background: color-mix(in oklch, var(--primary) 22%, transparent);
    box-shadow: 0 10px 24px color-mix(in oklch, var(--primary) 16%, transparent);
}

.profile-links .profile-link-icon {
    width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
}

.profile-link-icon svg {
    width: 21px;
    height: 21px;
    fill: currentColor;
}

.announcement-text {
    margin: 0 0 14px;
    color: var(--text-soft);
}

.music-row {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.music-cover {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: color-mix(in oklch, var(--primary) 16%, transparent);
    color: var(--primary);
    font-size: 1.4rem;
    position: relative;
}

.music-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.2s ease;
    position: relative;
    z-index: 2;
}

.music-cover.has-cover img {
    opacity: 1;
}

.music-note {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}

.music-info {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.music-info strong,
.music-info span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.music-info span {
    color: var(--text-soft);
    font-size: 0.85rem;
}

.music-progress {
    width: 100%;
    height: 4px;
    margin-top: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: color-mix(in oklch, var(--text-soft) 20%, transparent);
}

.music-progress-bar {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
}

.music-controls {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.music-controls button {
    display: grid;
    place-items: center;
    min-height: 32px;
    border: 0;
    border-radius: 10px;
    background: color-mix(in oklch, var(--primary) 12%, transparent);
    color: var(--primary);
    cursor: pointer;
    font: inherit;
    font-weight: 850;
}

.music-controls button i,
.music-controls button svg,
.nav-list-toggle i,
.nav-list-toggle svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.35;
}

.music-play {
    background: var(--primary) !important;
    color: white !important;
}

.music-mode[data-mode="random"],
.music-mode[data-mode="single"] {
    position: relative;
    background: color-mix(in oklch, var(--primary) 22%, transparent);
    color: var(--primary);
    font-weight: 850;
}

.music-mode[data-mode="single"]::after {
    content: "1";
    position: absolute;
    right: calc(50% - 11px);
    bottom: 6px;
    display: grid;
    place-items: center;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 7px;
    line-height: 1;
}

.music-playlist,
.music-lyrics {
    display: none;
    max-height: 220px;
    overflow: auto;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.music-playlist.open,
.music-lyrics.open {
    display: grid;
    gap: 6px;
}

.music-playlist button {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    width: 100%;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text-soft);
    cursor: pointer;
    padding: 7px 8px;
    text-align: left;
    font: inherit;
}

.music-playlist button:hover,
.music-playlist button.active {
    background: color-mix(in oklch, var(--primary) 11%, transparent);
    color: var(--primary);
}

.music-playlist strong,
.music-playlist span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.music-lyrics {
    text-align: center;
    color: var(--text-soft);
    mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
}

.music-lyrics p {
    margin: 0;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 750;
    line-height: 1.55;
    transition: color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.music-lyrics p.active {
    color: var(--primary);
    background: color-mix(in oklch, var(--primary) 10%, transparent);
    transform: scale(1.03);
}

.nav-music-panel {
    position: fixed;
    top: 82px;
    right: max(180px, calc((100vw - var(--page-width)) / 2 + 120px));
    z-index: 64;
    width: min(360px, calc(100vw - 32px));
    padding: 18px;
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.nav-music-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.nav-music-panel .music-row {
    grid-template-columns: 58px minmax(0, 1fr) 34px;
}

.nav-music-panel .music-cover {
    width: 58px;
    height: 58px;
}

.nav-music-panel .music-info strong {
    font-size: 1rem;
}

.nav-list-toggle {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text-soft);
    cursor: pointer;
    font: inherit;
    font-weight: 850;
}

.nav-music-controls {
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
}

.nav-music-controls .music-play {
    width: 48px;
    height: 48px;
    justify-self: center;
    border-radius: 50%;
}

.count-list {
    list-style: none;
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.count-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.count-list span {
    min-width: 34px;
    padding: 3px 8px;
    border-radius: 9px;
    background: color-mix(in oklch, var(--primary) 13%, transparent);
    color: var(--primary);
    text-align: center;
    font-weight: 850;
}

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

.stats-widget ul {
    display: grid;
    gap: 14px;
}

.stats-widget li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.stats-widget span {
    color: var(--text-soft);
}

.stats-widget strong {
    color: var(--text);
    font-size: 1.03rem;
}

.calendar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    font-size: 1.08rem;
}

.calendar-head button {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    transition: background 0.2s ease, color 0.2s ease;
}

.calendar-head button:hover {
    background: color-mix(in oklch, var(--primary) 12%, transparent);
    color: var(--primary);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    text-align: center;
    font-weight: 750;
}

.calendar-grid span {
    min-height: 28px;
    display: grid;
    place-items: center;
    border-radius: 8px;
}

.calendar-grid .muted {
    color: var(--text-soft);
    font-weight: 500;
}

.calendar-grid .today {
    color: var(--primary);
    outline: 2px solid var(--primary);
}

.sponsor-page {
    display: grid;
    gap: 18px;
}

.sponsor-hero-card,
.sponsor-list-card {
    padding: clamp(22px, 4vw, 42px);
}

.sponsor-title {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.sponsor-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border-radius: 11px;
    background: var(--primary);
    color: #fff;
    font-size: 1.35rem;
    margin-top: 0;
    box-shadow: 0 12px 26px color-mix(in oklch, var(--primary) 26%, transparent);
}

.sponsor-title h1 {
    margin: 0;
    font-size: clamp(1.7rem, 4vw, 2.35rem);
    line-height: 1.2;
}

.sponsor-title p {
    margin: 10px 0 0;
    color: var(--text-soft);
}

.sponsor-note {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 26px;
    padding: 14px 16px;
    border: 1px solid color-mix(in oklch, var(--primary) 35%, transparent);
    border-radius: 12px;
    background: color-mix(in oklch, var(--primary) 8%, transparent);
    color: var(--text-soft);
}

.sponsor-note span {
    color: var(--primary);
    font-weight: 850;
}

.sponsor-note p {
    margin: 0;
}

.sponsor-methods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 26px;
}

.sponsor-method {
    min-height: 260px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: color-mix(in oklch, var(--card-solid) 52%, transparent);
    text-align: center;
}

.sponsor-method h2 {
    margin: 0;
    font-size: 1.28rem;
}

.sponsor-method p {
    margin: 0;
    color: var(--text-soft);
}

.qr-box {
    width: 170px;
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 12px;
    background: var(--card-solid);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.qr-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.qr-box span,
.sponsor-muted,
.sponsor-empty {
    color: var(--text-soft);
}

.sponsor-link-card {
    min-height: 150px;
}

.sponsor-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 18px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font-weight: 850;
}

.sponsor-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.sponsor-list-head h2 {
    margin: 0;
    font-size: 1.25rem;
}

.sponsor-list-head span {
    color: var(--primary);
}

.sponsor-list-head strong {
    color: var(--text-soft);
}

.sponsor-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.sponsor-person {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: color-mix(in oklch, var(--card-solid) 42%, transparent);
}

.sponsor-avatar {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: color-mix(in oklch, var(--primary) 12%, transparent);
    color: var(--primary);
    font-weight: 850;
}

.sponsor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sponsor-person strong {
    display: block;
}

.sponsor-person em {
    margin-left: 6px;
    color: var(--primary);
    font-style: normal;
}

.sponsor-person span {
    color: var(--text-soft);
    font-size: 0.86rem;
}

.bangumi-page {
    min-width: 0;
}

.bangumi-panel {
    padding: clamp(22px, 4vw, 42px);
    overflow: visible;
}

.bangumi-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 28px;
}

.bangumi-title-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border-radius: 11px;
    background: var(--primary);
    color: white;
    box-shadow: 0 12px 26px color-mix(in oklch, var(--primary) 26%, transparent);
    margin-top: 14px;
}

.bangumi-title-mark svg,
.bangumi-title-mark i {
    width: 22px;
    height: 22px;
    display: block;
}

.bangumi-head h1 {
    margin: 0 0 8px;
    font-size: clamp(1.8rem, 3.4vw, 2.5rem);
}

.bangumi-head p {
    margin: 0 0 8px;
}

.bangumi-head span {
    color: var(--muted);
    font-size: 0.9rem;
}

.bangumi-empty {
    display: grid;
    place-items: center;
    gap: 10px;
    min-height: 260px;
    text-align: center;
    color: var(--muted);
}

.bangumi-empty strong {
    color: var(--text);
    font-size: 1.25rem;
}

.bangumi-tabs {
    display: flex;
    gap: 34px;
    overflow-x: auto;
    overflow-y: hidden;
    border-bottom: 1px solid var(--line);
    margin-bottom: 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.bangumi-tabs::-webkit-scrollbar {
    display: none;
}

.bangumi-tabs button,
.bangumi-filters button {
    border: 0;
    cursor: pointer;
    font: inherit;
}

.bangumi-tabs button {
    position: relative;
    padding: 14px 4px 16px;
    background: transparent;
    color: var(--muted);
    font-weight: 750;
    white-space: nowrap;
}

.bangumi-tabs button::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    border-radius: 999px 999px 0 0;
    background: var(--primary);
    opacity: 0;
}

.bangumi-tabs button.active {
    color: var(--primary);
}

.bangumi-tabs button.active::after {
    opacity: 1;
}

.bangumi-tabs span,
.bangumi-filters span {
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: color-mix(in oklch, var(--primary) 14%, transparent);
    color: var(--primary);
    font-size: 0.78em;
}

.bangumi-section {
    display: none;
}

.bangumi-section.active {
    display: block;
}

.bangumi-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.bangumi-filters button {
    padding: 7px 12px;
    border-radius: 999px;
    background: color-mix(in oklch, var(--primary) 12%, transparent);
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 750;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.bangumi-filters button:hover {
    transform: translateY(-1px);
}

.bangumi-filters button.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 22px color-mix(in oklch, var(--primary) 28%, transparent);
}

.bangumi-filters button.active span {
    background: rgba(255, 255, 255, 0.22);
    color: white;
}

.bangumi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
    gap: 14px;
}

.bangumi-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 14px;
    color: white;
    background: color-mix(in oklch, var(--primary) 10%, #222);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.bangumi-card:hover {
    transform: translateY(-4px) scale(1.015);
    box-shadow: 0 20px 38px rgba(15, 23, 42, 0.18);
}

.bangumi-card.is-hidden,
.bangumi-card.paged-hidden {
    display: none;
}

.bangumi-cover {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
}

.bangumi-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.bangumi-card:hover img {
    transform: scale(1.06);
}

.gallery-page {
    display: grid;
    gap: 18px;
}

.gallery-shell,
.gallery-album-detail {
    padding: 22px;
}

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

.gallery-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gallery-head-main {
    min-width: 0;
}

.gallery-title-icon {
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--primary);
    color: white;
}

.gallery-title-icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gallery-head h1,
.gallery-detail-copy h1 {
    margin: 0;
    font-size: 1.9rem;
    line-height: 1.15;
}

.gallery-head p,
.gallery-detail-copy p {
    margin: 8px 0 0 46px;
    color: var(--text-soft);
}

.gallery-detail-copy p {
    margin-left: 0;
    color: rgba(255, 255, 255, 0.82);
}

.gallery-count {
    flex: 0 0 auto;
    padding: 7px 12px;
    border-radius: 999px;
    background: color-mix(in oklch, var(--primary) 12%, transparent);
    color: var(--primary);
    font-weight: 800;
}

.gallery-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 13px;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: color-mix(in oklch, var(--card-solid) 42%, transparent);
}

.gallery-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
}

.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.gallery-filters button,
.gallery-password-row button {
    border: 0;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.gallery-filters button {
    padding: 7px 12px;
    border-radius: 9px;
    background: color-mix(in oklch, var(--primary) 12%, transparent);
    color: var(--primary);
}

.gallery-filters button.active {
    background: var(--primary);
    color: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.gallery-album-card {
    display: block;
    overflow: hidden;
    border-radius: 14px;
    color: white;
    background: color-mix(in oklch, var(--primary) 10%, #222);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-album-card:hover {
    transform: translateY(-4px) scale(1.012);
    box-shadow: 0 20px 38px rgba(15, 23, 42, 0.18);
}

.gallery-album-cover {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.gallery-album-cover img,
.gallery-detail-hero img,
.gallery-photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-album-cover img {
    transition: transform 0.35s ease;
}

.gallery-album-card:hover img {
    transform: scale(1.06);
}

.gallery-photo-count,
.gallery-lock-badge {
    position: absolute;
    top: 10px;
    z-index: 2;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.52);
    color: white;
    font-size: 0.78rem;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.gallery-photo-count {
    right: 10px;
}

.gallery-lock-badge {
    left: 10px;
}

.gallery-card-copy {
    position: absolute;
    inset: auto 0 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 56%;
    padding: 12px 14px 13px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.42) 52%, transparent);
}

.gallery-card-copy h2 {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-card-copy p {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.86rem;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.82rem;
    line-height: 1.2;
}

.gallery-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 7px;
}

.gallery-tags span {
    padding: 3px 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.72rem;
    font-weight: 750;
}

.gallery-detail-hero {
    position: relative;
    min-height: 310px;
    overflow: hidden;
    border-radius: 16px;
    margin-bottom: 18px;
    background: color-mix(in oklch, var(--primary) 10%, #222);
}

.gallery-detail-hero img {
    position: absolute;
    inset: 0;
}

.gallery-detail-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.2) 58%, rgba(0, 0, 0, 0.08));
}

.gallery-detail-copy {
    position: absolute;
    inset: auto 0 0;
    padding: 24px;
    color: white;
}

.gallery-back-link {
    display: inline-flex;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.86);
    font-weight: 800;
}

.gallery-lock {
    display: grid;
    gap: 10px;
    padding: 16px;
    margin-bottom: 18px;
    border: 1px dashed color-mix(in oklch, var(--primary) 38%, transparent);
    border-radius: 14px;
    background: color-mix(in oklch, var(--primary) 9%, transparent);
}

.gallery-lock p {
    margin: 0;
    color: var(--text-soft);
}

.gallery-password-row {
    display: flex;
    gap: 8px;
}

.gallery-password-row input {
    min-width: 0;
    flex: 1;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--text);
}

.gallery-password-row button {
    padding: 9px 14px;
    border-radius: 10px;
    background: var(--primary);
    color: white;
}

.gallery-masonry {
    columns: var(--gallery-column-width) auto;
    column-gap: 12px;
}

.gallery-masonry.is-locked {
    display: none;
}

.gallery-photo-card {
    display: block;
    break-inside: avoid;
    overflow: hidden;
    margin-bottom: 12px;
    border-radius: 12px;
    background: color-mix(in oklch, var(--primary) 10%, transparent);
}

.gallery-photo-card img {
    display: block;
    height: auto;
    transition: transform 0.25s ease;
}

.gallery-photo-card:hover img {
    transform: scale(1.025);
}

.gallery-empty {
    padding: 28px;
    border-radius: 14px;
    background: color-mix(in oklch, var(--primary) 8%, transparent);
    color: var(--text-soft);
    text-align: center;
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: none;
    place-items: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.82);
}

.gallery-lightbox.open {
    display: grid;
}

.gallery-lightbox img {
    max-width: min(100%, 1180px);
    max-height: 86vh;
    border-radius: 12px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.gallery-lightbox button {
    position: fixed;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: white;
    cursor: pointer;
    font: inherit;
    font-size: 1.8rem;
}

.gallery-lightbox-close {
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
}

.gallery-lightbox-prev,
.gallery-lightbox-next {
    top: 50%;
    width: 46px;
    height: 46px;
    transform: translateY(-50%);
}

.gallery-lightbox-prev {
    left: 18px;
}

.gallery-lightbox-next {
    right: 18px;
}

.bangumi-no-cover {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 900;
}

.bangumi-status,
.bangumi-score {
    position: absolute;
    top: 10px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    color: white;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
}

.bangumi-status {
    left: 10px;
    background: #3b82f6;
}

.status-collect {
    background: #18c77b;
}

.status-doing {
    background: #f5ad00;
}

.status-on_hold {
    background: #f97316;
}

.status-dropped {
    background: #ef4444;
}

.bangumi-score {
    right: 10px;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(10px);
}

.bangumi-card-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.16) 56%, transparent);
}

.bangumi-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: grid;
    gap: 5px;
    padding: 14px;
}

.bangumi-info strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.98rem;
    line-height: 1.28;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.bangumi-info em,
.bangumi-info small {
    color: rgba(255, 255, 255, 0.76);
    font-style: normal;
    font-size: 0.78rem;
}

.bangumi-info small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bangumi-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.bangumi-tag-row b {
    padding: 3px 6px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    font-size: 0.68rem;
    font-weight: 700;
}

.bangumi-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
}

.bangumi-pagination[hidden] {
    display: none;
}

.bangumi-pagination button {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    background: color-mix(in oklch, var(--primary) 12%, transparent);
    color: var(--primary);
    cursor: pointer;
    font-size: 1.35rem;
    font-weight: 800;
}

.bangumi-pagination button:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.bangumi-pagination span {
    color: var(--muted);
    font-weight: 750;
}

.timeline-page {
    display: grid;
    gap: 16px;
}

.timeline-cover {
    position: relative;
    min-height: 126px;
    height: auto;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    color: white;
}

.timeline-cover-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(100deg, rgba(17, 20, 30, 0.76) 0 42%, rgba(17, 20, 30, 0.48) 72%, rgba(17, 20, 30, 0.68)),
        radial-gradient(circle at 90% 0, color-mix(in oklch, var(--primary) 28%, transparent), transparent 18rem);
    backdrop-filter: blur(4px);
}

.timeline-cover-main {
    position: relative;
    z-index: 1;
    height: auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px 8px;
}

.timeline-cover h1 {
    margin: 0;
    font-size: clamp(1.45rem, 2.2vw, 2.15rem);
    line-height: 1.1;
    color: white;
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
}

.timeline-cover p {
    max-width: 620px;
    margin: 6px 0 0;
    color: rgba(255, 255, 255, 0.78);
    opacity: 1;
    font-size: 0.92rem;
}

.timeline-socials {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.timeline-socials a,
.timeline-tags span {
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.timeline-socials a {
    padding: 7px 13px;
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.12);
    color: white;
    font-weight: 800;
}

.timeline-stats {
    position: relative;
    width: fit-content;
    max-width: calc(100% - 48px);
    margin: 0 24px 18px;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 0;
    background: transparent;
    backdrop-filter: none;
}

.timeline-stats span {
    display: grid;
    place-items: center;
    grid-template-columns: auto auto;
    gap: 6px;
    min-width: 78px;
    min-height: 32px;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.timeline-stats strong {
    font-size: 0.98rem;
    line-height: 1;
    color: white;
}

.timeline-stats em {
    font-style: normal;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.68);
    opacity: 1;
}

.timeline-stream {
    position: relative;
    display: grid;
    gap: 18px;
    padding: 2px 0 2px 74px;
}

.timeline-compose {
    padding: 18px;
}

.timeline-compose-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.timeline-compose-head strong {
    position: relative;
    padding-left: 14px;
    font-size: 1.05rem;
}

.timeline-compose-head strong::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.28em;
    width: 4px;
    height: 0.9em;
    border-radius: 999px;
    background: var(--primary);
}

.timeline-compose-head span,
.timeline-compose-actions span,
.timeline-compose-login span {
    color: var(--text-soft);
}

.timeline-compose-form {
    display: grid;
    gap: 12px;
}

.timeline-compose textarea {
    width: 100%;
    resize: vertical;
    min-height: 112px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: color-mix(in oklch, var(--card-solid) 70%, transparent);
    color: var(--text);
    padding: 12px 14px;
    outline: none;
    font: inherit;
}

.timeline-compose textarea:focus {
    border-color: color-mix(in oklch, var(--primary) 55%, var(--line));
    box-shadow: 0 0 0 4px color-mix(in oklch, var(--primary) 12%, transparent);
}

.timeline-compose-image {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
}

.timeline-compose-image textarea {
    width: 100%;
    min-height: 58px;
    resize: vertical;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: 0;
    background: color-mix(in oklch, var(--card-solid) 70%, transparent);
    color: var(--text);
    font: inherit;
}

.timeline-compose-image textarea:focus {
    border-color: color-mix(in oklch, var(--primary) 55%, var(--line));
    box-shadow: 0 0 0 4px color-mix(in oklch, var(--primary) 12%, transparent);
}

.timeline-compose-image label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 13px;
    border-radius: 12px;
    background: color-mix(in oklch, var(--primary) 12%, transparent);
    color: var(--primary);
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.timeline-compose-image input[type="file"] {
    display: none;
}

.timeline-image-clear {
    min-height: 40px;
    padding: 9px 13px;
    border: 0;
    border-radius: 12px;
    background: color-mix(in oklch, var(--text-soft) 12%, transparent);
    color: var(--text-soft);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.timeline-image-status {
    grid-column: 1 / -1;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.timeline-image-status.has-file {
    color: var(--primary);
    font-weight: 800;
}

.timeline-compose-actions,
.timeline-compose-login {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.timeline-compose .submit,
.timeline-compose .primary-link {
    border-radius: 12px;
}

.timeline-stream::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 30px;
    width: 2px;
    border-radius: 999px;
    background: linear-gradient(to bottom, transparent, color-mix(in oklch, var(--primary) 46%, transparent), transparent);
}

.timeline-entry {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.timeline-node {
    position: absolute;
    left: -66px;
    top: 16px;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 4px solid var(--page-bg);
    border-radius: 50%;
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 28px color-mix(in oklch, var(--primary) 22%, transparent);
    overflow: hidden;
    font-weight: 900;
}

.timeline-node img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.timeline-card {
    position: relative;
    padding: 18px;
}

.timeline-card::before {
    content: "";
    position: absolute;
    left: -8px;
    top: 28px;
    width: 16px;
    height: 16px;
    transform: rotate(45deg);
    border-left: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--card-bg);
    backdrop-filter: blur(18px);
}

.timeline-card header,
.timeline-card footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.timeline-card header strong {
    font-size: 1.02rem;
}

.timeline-card time,
.timeline-card footer {
    color: var(--text-soft);
    font-size: 0.9rem;
}

.timeline-text {
    margin-top: 12px;
    color: var(--text);
    line-height: 1.9;
}

.timeline-image-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 14px;
    max-width: 520px;
}

.timeline-image-grid.image-count-1 {
    grid-template-columns: minmax(0, 1fr);
    max-width: 560px;
}

.timeline-image-grid.image-count-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.timeline-image {
    display: block;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    border: 1px solid var(--line);
}

.timeline-image-grid.image-count-1 .timeline-image {
    aspect-ratio: 16 / 10;
    border-radius: 14px;
}

.timeline-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.timeline-tags span {
    padding: 5px 10px;
    border-color: color-mix(in oklch, var(--primary) 18%, transparent);
    background: color-mix(in oklch, var(--primary) 10%, transparent);
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 800;
}

.timeline-card footer {
    justify-content: flex-start;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--line);
}

.timeline-empty {
    padding: 24px;
    text-align: center;
}

.timeline-empty p {
    margin: 6px 0 0;
    color: var(--text-soft);
}

.article-page,
.comments,
.post-near,
.empty-card,
.archive-title {
    padding: clamp(20px, 4vw, 42px);
}

.article-cover {
    overflow: hidden;
    aspect-ratio: 2.2 / 1;
    margin: calc(clamp(20px, 4vw, 42px) * -1) calc(clamp(20px, 4vw, 42px) * -1) 28px;
    border-radius: var(--radius) var(--radius) 0 0;
}

.article-header h1,
.empty-card h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.2;
}

.article-content {
    margin-top: 30px;
}

.article-content h2,
.article-content h3 {
    line-height: 1.35;
    margin-top: 2em;
}

.article-content p {
    margin: 1em 0;
}

.article-content blockquote {
    margin: 1.5em 0;
    padding: 1px 18px;
    border-left: 4px solid var(--primary);
    background: color-mix(in oklch, var(--primary) 9%, transparent);
    border-radius: 0 12px 12px 0;
}

.article-content pre,
.article-content code {
    border-radius: 10px;
    background: color-mix(in oklch, var(--text) 8%, transparent);
}

.article-content pre {
    padding: 16px;
    overflow: auto;
}

.article-content code {
    padding: 2px 6px;
}

.article-content pre code {
    padding: 0;
    background: transparent;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
}

.article-content th,
.article-content td {
    border: 1px solid var(--line);
    padding: 9px 11px;
}

.article-footer {
    margin-top: 26px;
    color: var(--text-soft);
}

.post-near {
    margin-top: 18px;
    display: grid;
    gap: 8px;
}

.comments {
    margin-top: 18px;
}

.comments h2 {
    margin-top: 0;
}

.comment-list {
    padding-left: 1.2rem;
}

.comment-list li {
    margin-bottom: 14px;
}

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

.comments label {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
    color: var(--text-soft);
}

.page-nav,
.comment-page-nav {
    margin-top: 20px;
    text-align: center;
}

.page-navigator {
    display: inline-flex;
    gap: 8px;
    list-style: none;
    padding: 0;
}

.page-navigator li,
.page-navigator a,
.page-navigator .current {
    display: grid;
    place-items: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1px solid var(--line);
}

.page-navigator .current {
    background: var(--primary);
    color: white;
}

.page-navigator li {
    padding: 0;
}

.page-navigator li.current a,
.page-navigator .current a {
    min-width: 100%;
    height: 100%;
    padding: 0 12px;
    border: 0;
    background: transparent;
    color: inherit;
    box-shadow: none;
}

.site-footer {
    text-align: center;
    color: var(--text-soft);
    padding: 12px 20px 34px;
}

.site-footer span {
    margin-left: 8px;
}

.floating-btn {
    position: fixed;
    right: 22px;
    bottom: 24px;
    z-index: 45;
    width: 46px;
    height: 46px;
    background: var(--card-bg);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.floating-btn.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.sakura-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 20;
    overflow: hidden;
}

.sakura {
    position: absolute;
    top: -30px;
    width: 12px;
    height: 12px;
    border-radius: 80% 0 80% 0;
    background: rgba(255, 170, 205, 0.85);
    animation: sakura-fall linear forwards;
}

@keyframes sakura-fall {
    to {
        transform: translate3d(var(--drift), calc(100vh + 60px), 0) rotate(540deg);
    }
}

@keyframes wave {
    0% {
        transform: translate3d(-90px, 0, 0);
    }
    100% {
        transform: translate3d(85px, 0, 0);
    }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 980px) {
    .nav-links {
        display: none;
    }

    .nav-search {
        display: none;
    }

    .search-mini {
        display: inline-grid;
    }

    .mobile-only {
        display: inline-grid;
    }

    .navbar-inner {
        grid-template-columns: auto 1fr auto;
    }

    .display-settings-panel {
        right: 14px;
    }

    .page-shell,
    .page-shell.with-sidebar,
    .page-shell.layout-both,
    .page-shell.layout-right,
    .sidebar-right .page-shell.with-sidebar {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 2;
    }

    .post-list.grid {
        grid-template-columns: 1fr;
    }

    .sponsor-methods,
    .sponsor-list {
        grid-template-columns: 1fr;
    }

    .timeline-cover-main {
        align-items: flex-start;
        flex-direction: column;
    }

    .timeline-socials {
        justify-content: flex-start;
    }

    .timeline-compose-actions,
    .timeline-compose-login,
    .timeline-compose-image {
        align-items: stretch;
        flex-direction: column;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    body {
        font-size: 15px;
    }

    .site-navbar {
        padding: 8px;
    }

    .navbar-inner {
        width: calc(100vw - 16px);
        height: 58px;
        border-radius: 15px;
        padding: 0 8px 0 12px;
    }

    .list-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .layout-switcher {
        width: 100%;
    }

    .toolbar-btn {
        flex: 1;
    }

    .brand {
        padding: 0 4px;
    }

    .brand span:last-child {
        max-width: 44vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .icon-btn {
        width: 40px;
        height: 40px;
    }

    .hero {
        height: 50vh;
        min-height: 330px;
    }

    .is-inner .hero {
        height: 260px;
        min-height: 240px;
    }

    .page-shell {
        width: calc(100vw - 16px);
        margin-top: -52px;
    }

    .post-card {
        grid-template-columns: 1fr;
    }

    .post-card-cover {
        order: 0;
        margin: 0;
        border-radius: var(--radius) var(--radius) 0 0;
        aspect-ratio: 2 / 1;
        contain: none;
    }

    .post-card-body {
        padding: 20px;
    }

    .post-card-body::before {
        left: 10px;
        top: 26px;
    }

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

    .site-footer span {
        display: block;
        margin-left: 0;
    }

    .timeline-cover-main {
        height: auto;
        min-height: 0;
        padding: 18px 18px 12px;
    }

    .timeline-stats {
        max-width: calc(100% - 36px);
        margin: 0 18px 16px;
    }

    .timeline-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .timeline-stream {
        padding-left: 52px;
    }

    .timeline-stream::before {
        left: 20px;
    }

    .timeline-node {
        left: -48px;
        width: 40px;
        height: 40px;
        border-width: 3px;
    }

    .timeline-card {
        padding: 16px;
    }
}
