@charset "UTF-8";

:root {
    --v2-bg: #f5f6ff;
    --v2-panel: rgba(255, 255, 255, .9);
    --v2-panel-solid: #fff;
    --v2-soft: #f0efff;
    --v2-text: #17244b;
    --v2-text-2: #58678f;
    --v2-text-3: #8792b4;
    --v2-line: rgba(94, 108, 158, .13);
    --v2-primary: #8061ff;
    --v2-primary-2: #9d79ff;
    --v2-primary-soft: #eee9ff;
    --v2-blue: #5ca9ff;
    --v2-pink: #ff7796;
    --v2-lilac: #ae8cff;
    --v2-shadow: 0 18px 55px rgba(72, 82, 141, .11);
    --v2-shadow-soft: 0 10px 30px rgba(72, 82, 141, .08);
    --v2-radius: 20px;
    --v2-sidebar: 236px;

    /* 兼容旧组件的统一配色映射，避免任何黑黄主题变量回流。 */
    --bg: var(--v2-bg);
    --bg-elevated: rgba(255, 255, 255, .92);
    --card: var(--v2-panel);
    --card-solid: var(--v2-panel-solid);
    --text: var(--v2-text);
    --text-soft: var(--v2-text-2);
    --text-faint: var(--v2-text-3);
    --line: var(--v2-line);
    --line-strong: rgba(128, 97, 255, .24);
    --primary: var(--v2-primary);
    --primary-dark: #6749e6;
    --primary-soft: var(--v2-primary-soft);
    --yellow: var(--v2-primary);
    --yellow-strong: var(--v2-primary-2);
    --pink: var(--v2-pink);
    --cyan: var(--v2-blue);
    --success: #65cfa8;
    --shadow-sm: var(--v2-shadow-soft);
    --shadow-md: var(--v2-shadow);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 28px;
}

body {
    display: block;
    min-width: 320px;
    margin: 0;
    color: var(--v2-text);
    background:
        radial-gradient(circle at 55% -10%, rgba(139, 111, 255, .11), transparent 28rem),
        linear-gradient(135deg, #fafaff 0%, var(--v2-bg) 48%, #f8f9ff 100%);
    font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    line-height: 1.65;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .35;
    background-image: radial-gradient(rgba(98, 111, 173, .16) .6px, transparent .6px);
    background-size: 22px 22px;
    mask-image: linear-gradient(to bottom, #000, transparent 62%);
}

::selection {
    color: #fff;
    background: var(--v2-primary);
}

* {
    box-sizing: border-box;
}

a {
    color: inherit;
}

button,
input,
textarea {
    font: inherit;
}

button {
    color: inherit;
}

.icon {
    width: 1.25em;
    height: 1.25em;
    flex: 0 0 auto;
}

.glass-card {
    border: 1px solid var(--v2-line);
    background: var(--v2-panel);
    box-shadow: var(--v2-shadow-soft);
    -webkit-backdrop-filter: blur(20px) saturate(130%);
    backdrop-filter: blur(20px) saturate(130%);
}

.desktop-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 80;
    width: var(--v2-sidebar);
    display: flex;
    flex-direction: column;
    padding: 30px 22px 24px;
    border-right: 1px solid var(--v2-line);
    background: rgba(255, 255, 255, .88);
    box-shadow: 12px 0 40px rgba(70, 80, 140, .06);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
}

.desktop-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 6px;
    text-decoration: none;
}

.desktop-profile-avatar {
    position: relative;
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    display: grid;
    place-items: center;
    overflow: visible;
    color: var(--v2-primary);
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--v2-primary-soft);
    box-shadow: 0 7px 18px rgba(82, 66, 164, .16);
}

.desktop-profile-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: inherit;
}

.desktop-profile-avatar i {
    position: absolute;
    right: -1px;
    bottom: 1px;
    width: 12px;
    height: 12px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #57d6a4;
}

.desktop-profile > span:last-child {
    min-width: 0;
    display: grid;
}

.desktop-profile strong {
    overflow: hidden;
    color: var(--v2-text);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.desktop-profile small {
    overflow: hidden;
    color: var(--v2-text-3);
    font-size: 10px;
    letter-spacing: .02em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.desktop-sidebar-nav {
    display: grid;
    gap: 8px;
    margin-top: 42px;
}

.desktop-sidebar-nav a {
    position: relative;
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 0 15px;
    color: var(--v2-text-2);
    border-radius: 14px;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    transition: color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.desktop-sidebar-nav a > i {
    margin-left: auto;
    display: none;
}

.desktop-sidebar-nav a:hover {
    color: var(--v2-primary);
    background: var(--v2-primary-soft);
    transform: translateX(3px);
}

.desktop-sidebar-nav a.is-current {
    color: #fff;
    background: linear-gradient(135deg, var(--v2-primary), #b696ff);
    box-shadow: 0 10px 24px rgba(128, 97, 255, .28);
}

.desktop-sidebar-nav a.is-current > i {
    display: inline-flex;
}

.desktop-sidebar-bottom {
    margin-top: auto;
}

.sidebar-caption {
    display: block;
    margin: 0 0 8px 5px;
    color: var(--v2-text-3);
    font-size: 10px;
}

.sidebar-layout-switch {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 6px;
    border: 1px solid var(--v2-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .7);
}

.sidebar-layout-switch button,
.sidebar-theme {
    border: 0;
    cursor: pointer;
}

.sidebar-layout-switch button {
    height: 34px;
    display: grid;
    place-items: center;
    color: var(--v2-text-3);
    border-radius: 9px;
    background: transparent;
}

.sidebar-layout-switch button[aria-pressed="true"] {
    color: #fff;
    background: var(--v2-primary);
    box-shadow: 0 6px 14px rgba(128, 97, 255, .25);
}

.sidebar-theme {
    width: 100%;
    height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 0 12px;
    color: var(--v2-text-2);
    border-radius: 12px;
    background: var(--v2-soft);
}

.sidebar-theme b {
    font-size: 12px;
}

.desktop-sidebar-bottom > p {
    margin: 24px 5px 0;
    color: var(--v2-text-3);
    font-size: 10px;
    line-height: 1.8;
}

.site-stage {
    min-height: 100vh;
    margin-left: var(--v2-sidebar);
}

.site-main {
    width: 100%;
    max-width: 1530px;
    min-height: calc(100vh - 80px);
    margin: 0 auto;
    padding: 28px 30px 40px;
    outline: none;
}

.mobile-header,
.mobile-menu {
    display: none;
}

.mobile-menu-backdrop,
.pull-refresh {
    display: none;
}

.home-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 22px;
    align-items: start;
}

.home-primary,
.home-sidebar {
    min-width: 0;
}

.profile-hero {
    position: relative;
    min-height: 320px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .68);
    border-radius: 26px;
    background-image: var(--profile-hero-image);
    background-position: center;
    background-size: cover;
    box-shadow: var(--v2-shadow);
    isolation: isolate;
}

.profile-hero-shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(43, 52, 111, .25), rgba(103, 98, 166, .04) 58%, transparent),
        linear-gradient(0deg, rgba(34, 43, 100, .12), transparent 55%);
}

.profile-hero-content {
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 34px 42px;
}

.profile-hero-copy {
    width: min(560px, 67%);
    padding: 22px 26px;
    border: 1px solid rgba(255, 255, 255, .58);
    border-radius: 22px;
    background: rgba(255, 255, 255, .46);
    box-shadow: 0 16px 40px rgba(61, 71, 136, .12);
    -webkit-backdrop-filter: blur(15px) saturate(125%);
    backdrop-filter: blur(15px) saturate(125%);
}

.hero-kicker {
    color: rgba(41, 50, 100, .63);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .18em;
}

.profile-hero h1 {
    margin: 6px 0 5px;
    color: #1a2851;
    font-size: clamp(30px, 3vw, 46px);
    line-height: 1.18;
    letter-spacing: -.035em;
    text-shadow: 0 2px 18px rgba(255, 255, 255, .45);
}

.profile-hero h1 i {
    margin-left: 10px;
    color: var(--v2-primary);
    font-style: normal;
    font-size: .6em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: .06em;
}

.profile-hero h1 i .icon {
    width: 1em;
    height: 1em;
}

.profile-hero-copy p {
    margin: 0;
    color: #45547c;
    font-size: 15px;
}

.profile-hero-avatar {
    display: none;
}

.profile-hero-stats {
    width: min(560px, 67%);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 13px;
}

.profile-hero-stats > span {
    min-width: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 8px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 14px;
    background: rgba(255, 255, 255, .65);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.profile-hero-stats i {
    grid-row: 1 / 3;
    color: var(--v2-primary);
}

.profile-hero-stats > span:nth-child(2) i {
    color: var(--v2-lilac);
}

.profile-hero-stats > span:nth-child(3) i {
    color: var(--v2-blue);
}

.profile-hero-stats > span:nth-child(4) i {
    color: var(--v2-pink);
}

.profile-hero-stats b {
    overflow: hidden;
    color: #1e2d57;
    font-size: 17px;
    line-height: 1.15;
    text-overflow: ellipsis;
}

.profile-hero-stats small {
    color: #69769c;
    font-size: 10px;
}

.profile-hero-petals i {
    position: absolute;
    z-index: 1;
    width: 10px;
    height: 16px;
    opacity: .7;
    border-radius: 80% 10% 80% 10%;
    background: #ffe9fa;
    box-shadow: 0 1px 4px rgba(123, 76, 160, .16);
    animation: petal-fall 9s linear infinite;
}

.profile-hero-petals i:nth-child(1) { left: 12%; top: -9%; animation-delay: -2s; }
.profile-hero-petals i:nth-child(2) { left: 31%; top: -12%; animation-delay: -6s; animation-duration: 11s; }
.profile-hero-petals i:nth-child(3) { left: 53%; top: -7%; animation-delay: -4s; animation-duration: 8s; }
.profile-hero-petals i:nth-child(4) { left: 72%; top: -15%; animation-delay: -8s; animation-duration: 12s; }
.profile-hero-petals i:nth-child(5) { left: 90%; top: -10%; animation-delay: -1s; animation-duration: 10s; }

@keyframes petal-fall {
    0% { transform: translate3d(0, -10px, 0) rotate(0); }
    50% { transform: translate3d(55px, 175px, 0) rotate(190deg); }
    100% { transform: translate3d(-22px, 360px, 0) rotate(380deg); }
}

.notice-card {
    min-height: 82px;
    display: grid;
    grid-template-columns: 54px auto 1fr auto;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: 18px;
}

.notice-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    color: var(--v2-primary);
    border-radius: 50%;
    background: var(--v2-primary-soft);
}

.notice-card > strong {
    padding-right: 14px;
    border-right: 1px solid var(--v2-line);
    font-size: 16px;
}

.notice-card > div b {
    display: block;
    font-size: 13px;
}

.notice-card p {
    margin: 1px 0 0;
    color: var(--v2-text-2);
    font-size: 12px;
}

.notice-card > a {
    display: grid;
    place-items: center;
    color: var(--v2-text-3);
}

.feed-toolbar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 18px 0 14px;
    padding: 0 8px;
    border-radius: 16px;
}

.feed-toolbar > button {
    position: relative;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: var(--v2-text-2);
    border: 0;
    border-right: 1px solid var(--v2-line);
    background: transparent;
    cursor: pointer;
}

.feed-toolbar > button:last-child {
    border-right: 0;
}

.feed-toolbar > button::after {
    content: "";
    position: absolute;
    right: 24%;
    bottom: -1px;
    left: 24%;
    height: 3px;
    border-radius: 99px 99px 0 0;
    background: var(--v2-primary);
    opacity: 0;
    transform: scaleX(.4);
    transition: .25s ease;
}

.feed-toolbar > button[aria-pressed="true"] {
    color: var(--v2-primary);
    font-weight: 750;
}

.feed-toolbar > button[aria-pressed="true"]::after {
    opacity: 1;
    transform: scaleX(1);
}

.post-stream {
    display: block !important;
}

.story-card {
    position: relative;
    overflow: hidden;
    margin-bottom: 14px;
    padding: 18px 20px 14px;
    border-radius: var(--v2-radius);
    transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.story-card:hover {
    z-index: 2;
    border-color: rgba(128, 97, 255, .22);
    box-shadow: var(--v2-shadow);
    transform: translateY(-2px);
}

.story-author {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0 0 10px;
}

.story-author .mini-avatar {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    overflow: hidden;
    display: grid;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--v2-primary-soft);
    box-shadow: 0 5px 14px rgba(82, 66, 164, .13);
}

.story-author .mini-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.story-author > div {
    min-width: 0;
}

.story-author p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    line-height: 1.35;
}

.story-author a {
    color: var(--v2-text);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.story-author em {
    padding: 2px 7px;
    color: var(--v2-primary);
    border-radius: 99px;
    background: var(--v2-primary-soft);
    font-size: 9px;
    font-style: normal;
}

.story-author time {
    display: block;
    margin-top: 2px;
    color: var(--v2-text-3);
    font-size: 10px;
}

.story-more {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    margin-left: auto;
    color: var(--v2-text-2);
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.story-more:hover {
    color: var(--v2-primary);
    background: var(--v2-primary-soft);
}

.story-card.story-actions-open {
    z-index: 24;
    overflow: visible;
}

.story-card.story-actions-open .story-more {
    color: var(--v2-primary);
    background: var(--v2-primary-soft);
}

.story-action-menu {
    position: absolute;
    top: 62px;
    right: 18px;
    z-index: 30;
    width: 224px;
    min-height: 66px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 8px 6px;
    border: 1px solid var(--v2-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 16px 42px rgba(39, 45, 91, .18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-7px) scale(.97);
    transform-origin: top right;
    transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}

.story-action-menu::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 13px;
    width: 11px;
    height: 11px;
    border-top: 1px solid var(--v2-line);
    border-left: 1px solid var(--v2-line);
    background: inherit;
    transform: rotate(45deg);
}

.story-actions-open .story-action-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition-delay: 0s;
}

.story-action-menu > a,
.story-action-menu > button {
    position: relative;
    min-width: 0;
    min-height: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    padding: 0 6px;
    color: var(--v2-text-2);
    border: 0;
    border-right: 1px solid var(--v2-line);
    background: transparent;
    text-decoration: none;
    cursor: pointer;
}

.story-action-menu > :last-child { border-right: 0; }
.story-action-menu span { font-size: 12px; }
.story-action-menu b { color: var(--v2-text); font-size: 13px; font-weight: 780; }
.story-action-menu > a:hover,
.story-action-menu > button:hover,
.story-action-menu > button[aria-pressed="true"] { color: var(--v2-primary); }
.story-action-menu > a:hover b,
.story-action-menu > button:hover b,
.story-action-menu > button[aria-pressed="true"] b { color: var(--v2-primary); }

.story-category {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
    color: var(--v2-primary);
    font-size: 10px;
}

.story-category a {
    color: inherit;
    text-decoration: none;
}

.story-content h2 {
    margin: 0;
    color: var(--v2-text);
    font-size: 18px;
    line-height: 1.4;
    letter-spacing: -.012em;
}

.story-content h2 a {
    color: inherit;
    text-decoration: none;
}

.story-content h2 a:hover {
    color: var(--v2-primary);
}

.story-excerpt {
    margin-top: 6px;
    color: var(--v2-text-2);
    font-size: 13px;
    line-height: 1.8;
}

.story-cover {
    overflow: hidden;
    display: block;
    border-radius: 13px;
    background: var(--v2-soft);
}

.story-cover img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .5s ease;
}

.story-cover:hover img {
    transform: scale(1.035);
}

.moment-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin-top: 12px;
}

.moment-gallery button {
    position: relative;
    overflow: hidden;
    min-height: 0;
    padding: 0;
    aspect-ratio: 1.5;
    border: 0;
    border-radius: 9px;
    background: var(--v2-soft);
    cursor: zoom-in;
}

.moment-gallery-1 {
    grid-template-columns: minmax(0, 520px);
}

.moment-gallery-1 button {
    aspect-ratio: 16 / 10;
}

.moment-gallery-2 {
    grid-template-columns: repeat(2, minmax(0, 260px));
}

.moment-gallery-2 button {
    aspect-ratio: 4 / 3;
}

.moment-gallery img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .35s ease, filter .35s ease;
}

.moment-gallery button:hover img {
    filter: saturate(1.08);
    transform: scale(1.045);
}

.gallery-more {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(21, 27, 55, .55);
    font-size: 25px;
    font-weight: 700;
}

.story-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 10px;
    margin-top: 10px;
    color: var(--v2-text-3);
    font-size: 12px;
}

.story-tags a {
    color: inherit;
    text-decoration: none;
}

.story-tags a::before { content: "#"; }
.story-tags a:hover { color: var(--v2-primary); }

.story-footer {
    display: flex;
    align-items: center;
    gap: 8px 20px;
    margin-top: 13px;
    padding-top: 11px;
    border-top: 1px solid var(--v2-line);
}

.story-footer a,
.story-footer button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    color: var(--v2-text-2);
    border: 0;
    background: transparent;
    font-size: 11px;
    text-decoration: none;
    cursor: pointer;
}

.story-footer a:hover,
.story-footer button:hover,
.story-footer button[aria-pressed="true"] {
    color: var(--v2-primary);
}

.story-footer .like-button:hover,
.story-footer .like-button[aria-pressed="true"] {
    color: var(--v2-pink);
    background: transparent;
}

.story-read {
    margin-left: auto;
    color: var(--v2-primary) !important;
    font-weight: 700;
}

.timeline-dot {
    display: none;
}

body[data-layout="grid"] .story-card {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 0 18px;
}

body[data-layout="grid"] .story-author,
body[data-layout="grid"] .story-footer,
body[data-layout="grid"] .story-tags,
body[data-layout="grid"] .moment-gallery {
    grid-column: 1 / -1;
}

body[data-layout="grid"] .story-content {
    grid-column: 1;
    align-self: center;
}

body[data-layout="grid"] .story-card.no-cover .story-content,
body[data-layout="grid"] .story-card.has-gallery .story-content {
    grid-column: 1 / -1;
}

body[data-layout="grid"] .story-cover {
    grid-column: 2;
    grid-row: 2;
    height: 118px;
}

body[data-layout="moments"] .story-card {
    display: block !important;
    max-width: 790px;
    margin-right: auto;
    margin-left: auto;
}

body[data-layout="moments"] .story-category {
    display: none;
}

body[data-layout="moments"] .story-content h2 {
    margin-bottom: 7px;
}

body[data-layout="moments"] .story-cover {
    width: min(100%, 540px);
    height: 300px;
    margin-top: 12px;
}

body[data-layout="timeline"] .post-stream {
    position: relative;
    padding-left: 27px;
}

body[data-layout="timeline"] .post-stream::before {
    content: "";
    position: absolute;
    top: 12px;
    bottom: 20px;
    left: 8px;
    width: 2px;
    border-radius: 99px;
    background: linear-gradient(var(--v2-primary), rgba(128, 97, 255, .08));
}

body[data-layout="timeline"] .timeline-dot {
    position: absolute;
    top: 25px;
    left: -26px;
    width: 13px;
    height: 13px;
    display: block;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--v2-primary);
    box-shadow: 0 0 0 3px rgba(128, 97, 255, .15);
}

body[data-layout="timeline"] .story-card {
    min-height: 160px;
}

body[data-layout="timeline"] .story-cover {
    width: 190px;
    height: 110px;
    float: right;
    margin: -2px 0 10px 18px;
}

body[data-layout="timeline"] .moment-gallery {
    max-width: 600px;
}

.home-sidebar {
    position: sticky;
    top: 24px;
    display: grid;
    gap: 14px;
}

.sidebar-widget {
    position: relative;
    overflow: hidden;
    padding: 17px;
    border-radius: 18px;
}

.widget-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 13px;
}

.widget-heading h2 {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: var(--v2-text);
    font-size: 13px;
}

.widget-heading a,
.widget-heading > span {
    color: var(--v2-text-3);
    font-size: 10px;
    text-decoration: none;
}

.widget-heading button {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    padding: 0;
    color: var(--v2-text-3);
    border: 0;
    border-radius: 8px;
    background: transparent;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.calendar-weekdays {
    margin-bottom: 6px;
    color: var(--v2-text-3);
    font-size: 9px;
    text-align: center;
}

.calendar-days > span {
    min-width: 0;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: var(--v2-text-2);
    font-size: 10px;
}

.calendar-days > span.is-empty {
    visibility: hidden;
}

.calendar-days > span.is-today {
    color: #fff;
    background: linear-gradient(135deg, var(--v2-primary), var(--v2-primary-2));
    box-shadow: 0 6px 13px rgba(128, 97, 255, .25);
}

.calendar-days b {
    font-weight: 650;
}

.rich-list {
    display: grid;
    gap: 9px;
}

.rich-list > a {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    text-decoration: none;
}

.recent-thumb {
    width: 46px;
    height: 40px;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: var(--v2-primary);
    border-radius: 9px;
    background: linear-gradient(135deg, #e8e5ff, #edf6ff);
}

.recent-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rich-list > a > span:last-child {
    min-width: 0;
    display: grid;
}

.rich-list b {
    overflow: hidden;
    color: var(--v2-text);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rich-list time {
    color: var(--v2-text-3);
    font-size: 8px;
}

.category-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.category-cloud a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 9px;
    color: var(--v2-primary);
    border: 0;
    border-radius: 8px;
    background: var(--v2-primary-soft);
    font-size: 9px;
    text-decoration: none;
}

.category-cloud a:nth-child(3n + 2) {
    color: #368ace;
    background: #e7f5ff;
}

.category-cloud a:nth-child(3n) {
    color: #7656d9;
    background: #f0ebff;
}

.category-cloud a:hover {
    transform: translateY(-1px);
}

.sidebar-notice {
    min-height: 130px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(248, 242, 255, .9)),
        var(--v2-panel);
}

.sidebar-notice p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: var(--v2-text-2);
    font-size: 11px;
    line-height: 1.8;
}

.sidebar-notice > i {
    position: absolute;
    right: -2px;
    bottom: -22px;
    color: rgba(154, 119, 255, .1);
    font-size: 100px;
    font-style: normal;
    display: block;
    width: 100px;
    height: 100px;
}

.sidebar-notice > i .icon {
    width: 100%;
    height: 100%;
}

.archive-hero {
    margin-bottom: 18px;
    padding: 28px 30px;
    border-radius: var(--v2-radius);
}

.archive-hero h1 {
    margin: 4px 0;
    font-size: 30px;
}

.archive-hero p {
    margin: 0;
    color: var(--v2-text-2);
}

.section-eyebrow {
    display: inline-flex;
    width: auto;
    padding: 4px 9px;
    color: var(--v2-primary);
    border: 0;
    border-radius: 99px;
    background: var(--v2-primary-soft);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .12em;
}

.pagination {
    margin: 20px 0;
}

.page-navigator {
    justify-content: center;
}

.page-navigator li a,
.page-navigator li span {
    border-color: var(--v2-line);
    background: var(--v2-panel);
}

.page-navigator .current a,
.page-navigator .current span {
    color: #fff;
    background: var(--v2-primary);
}

.site-footer {
    width: calc(100% - 60px);
    max-width: 1470px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 0 auto;
    padding: 18px 0 28px;
    color: var(--v2-text-3);
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: 10px;
}

.site-footer a {
    margin-left: auto;
    text-decoration: none;
}

.article-layout {
    max-width: 1160px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 22px;
    margin: 0 auto;
}

.article-card,
.comments-card,
.near-card,
.toc-card,
.author-card,
.error-card {
    border-radius: var(--v2-radius);
}

.article-card {
    padding: clamp(24px, 4vw, 50px);
}

.article-header h1 {
    color: var(--v2-text);
}

.article-lead,
.article-meta,
.breadcrumbs,
.article-content,
.respond-tip {
    color: var(--v2-text-2);
}

.article-kicker,
.breadcrumbs a,
.author-card a,
.article-tags,
.toc-card a.is-active {
    color: var(--v2-primary);
}

.article-content a {
    color: var(--v2-primary);
}

.article-content img,
.article-cover img {
    border-radius: 14px;
}

.article-aside {
    position: sticky;
    top: 24px;
}

.author-card::before {
    background: linear-gradient(135deg, rgba(174, 151, 255, .34), rgba(113, 189, 255, .22));
}

.page-card,
.comments-card,
.post-near {
    max-width: 940px;
    margin-right: auto;
    margin-left: auto;
}

.comments-card {
    margin-top: 22px;
}

.comment-submit-row button,
.error-card button,
.hero-cta {
    color: #fff;
    background: linear-gradient(135deg, var(--v2-primary), var(--v2-primary-2));
}

.mobile-dock {
    display: none;
}

.scroll-progress {
    z-index: 2500;
    height: 3px;
    background: transparent;
}

.scroll-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--v2-primary), #c084fc, #62b7ff);
    box-shadow: 0 0 10px rgba(128, 97, 255, .4);
}

.reading-indicator {
    position: fixed;
    right: 22px;
    bottom: 24px;
    z-index: 90;
    min-width: 76px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 4px 11px 4px 5px;
    color: var(--v2-text-2);
    border: 1px solid var(--v2-line);
    border-radius: 99px;
    background: rgba(255, 255, 255, .9);
    box-shadow: var(--v2-shadow-soft);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.reading-ring {
    --scroll-angle: 0deg;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    color: var(--v2-primary);
    border-radius: 50%;
    background:
        linear-gradient(#fff, #fff) padding-box,
        conic-gradient(var(--v2-primary) var(--scroll-angle), rgba(128, 97, 255, .13) 0) border-box;
    border: 3px solid transparent;
}

.reading-indicator strong {
    min-width: 26px;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.back-to-top {
    right: 31px;
    bottom: 76px;
    color: #fff;
    background: var(--v2-primary);
}

.page-loader {
    position: fixed;
    top: 18px;
    left: 50%;
    z-index: 4000;
    min-width: 104px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 15px;
    color: var(--v2-primary);
    border: 1px solid rgba(128, 97, 255, .18);
    border-radius: 99px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 12px 34px rgba(61, 72, 135, .2);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -16px) scale(.96);
    transition: opacity .2s ease, transform .25s ease;
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

.page-loader b {
    font-size: 12px;
}

.page-loader-orbit {
    position: relative;
    width: 19px;
    height: 19px;
    border: 2px solid rgba(128, 97, 255, .18);
    border-top-color: var(--v2-primary);
    border-radius: 50%;
    animation: loader-spin .7s linear infinite;
}

.page-loader-orbit i:first-child {
    position: absolute;
    top: -3px;
    left: 2px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--v2-primary);
}

@keyframes loader-spin {
    to { transform: rotate(360deg); }
}

.page-transition-mask {
    position: fixed;
    inset: 0;
    z-index: 3500;
    pointer-events: none;
    opacity: 0;
    background: rgba(247, 247, 255, .34);
    transition: opacity .2s ease;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

html.is-navigating .page-loader {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}

html.is-navigating .page-transition-mask {
    opacity: 1;
}

html.is-navigating #page-root {
    opacity: .5;
    transform: translateY(6px);
}

#page-root {
    transition: opacity .2s ease, transform .25s ease;
}

::view-transition-old(page-root) {
    animation: page-out .18s ease both;
}

::view-transition-new(page-root) {
    animation: page-in .32s ease both;
}

#page-root {
    view-transition-name: page-root;
}

@keyframes page-out {
    to { opacity: 0; transform: translateY(-5px); }
}

@keyframes page-in {
    from { opacity: 0; transform: translateY(9px); }
}

.toast {
    color: #fff;
    background: rgba(25, 31, 63, .92);
}

.image-viewer {
    --viewer-accent: var(--v2-primary);
    background: rgba(36, 43, 73, .96);
}

.viewer-loader {
    border-top-color: var(--v2-primary);
}

.viewer-topbar {
    background: linear-gradient(rgba(38, 45, 76, .9), transparent);
}

.viewer-stage figcaption {
    background: rgba(45, 53, 88, .72);
}

.viewer-thumbnails button.is-active {
    border-color: var(--v2-primary);
    box-shadow: 0 0 0 2px rgba(128, 97, 255, .2);
}

.article-content img.viewer-enabled:focus-visible {
    outline-color: rgba(128, 97, 255, .32);
}

.article-content a {
    border-bottom-color: rgba(128, 97, 255, .4);
}

.article-content blockquote {
    border-color: rgba(128, 97, 255, .2);
    background: var(--v2-primary-soft);
}

.article-content code {
    background: rgba(128, 97, 255, .12);
}

.comment-fields input:focus,
.comment-textarea textarea:focus,
.error-card input:focus {
    border-color: rgba(128, 97, 255, .5);
    box-shadow: 0 0 0 4px rgba(128, 97, 255, .1);
}

[data-theme="dark"] {
    --v2-bg: #222946;
    --v2-panel: rgba(45, 53, 88, .92);
    --v2-panel-solid: #2d3558;
    --v2-soft: #394267;
    --v2-text: #f0f2ff;
    --v2-text-2: #bbc2dd;
    --v2-text-3: #929bbd;
    --v2-line: rgba(203, 209, 242, .11);
    --v2-primary: #a58bff;
    --v2-primary-2: #7a68ff;
    --v2-primary-soft: rgba(151, 123, 255, .16);
    --v2-shadow: 0 18px 55px rgba(0, 0, 0, .25);
    --v2-shadow-soft: 0 10px 30px rgba(0, 0, 0, .18);
}

html[data-theme="dark"] {
    --bg: var(--v2-bg);
    --bg-elevated: rgba(43, 51, 84, .94);
    --card: var(--v2-panel);
    --card-solid: var(--v2-panel-solid);
    --text: var(--v2-text);
    --text-soft: var(--v2-text-2);
    --text-faint: var(--v2-text-3);
    --line: var(--v2-line);
    --line-strong: rgba(165, 139, 255, .25);
    --primary: var(--v2-primary);
    --primary-dark: #c0afff;
    --primary-soft: var(--v2-primary-soft);
    --yellow: var(--v2-primary);
    --yellow-strong: var(--v2-primary-2);
    --pink: #ff91ba;
    --cyan: #7ec5ff;
    --success: #77dbbb;
    --shadow-sm: var(--v2-shadow-soft);
    --shadow-md: var(--v2-shadow);
}

[data-theme="dark"] body {
    background:
        radial-gradient(circle at 55% -10%, rgba(169, 141, 255, .2), transparent 30rem),
        linear-gradient(135deg, #293153, #202742);
}

[data-theme="dark"] .desktop-sidebar,
[data-theme="dark"] .page-loader,
[data-theme="dark"] .reading-indicator {
    background: rgba(38, 46, 77, .94);
}

[data-theme="dark"] .desktop-profile-avatar,
[data-theme="dark"] .story-author .mini-avatar {
    border-color: #4b5687;
}

[data-theme="dark"] .profile-hero-stats > span,
[data-theme="dark"] .profile-hero-copy {
    border-color: rgba(255, 255, 255, .18);
    background: rgba(20, 27, 60, .52);
}

[data-theme="dark"] .profile-hero h1,
[data-theme="dark"] .profile-hero-stats b {
    color: #fff;
}

[data-theme="dark"] .profile-hero-copy p,
[data-theme="dark"] .hero-kicker,
[data-theme="dark"] .profile-hero-stats small {
    color: #d7ddf2;
}

[data-theme="dark"] .reading-ring {
    background:
        linear-gradient(#2d3558, #2d3558) padding-box,
        conic-gradient(var(--v2-primary) var(--scroll-angle), rgba(165, 139, 255, .14) 0) border-box;
}

[data-theme="dark"] .page-transition-mask {
    background: rgba(8, 10, 22, .38);
}

[data-theme="dark"] .sidebar-notice {
    background: linear-gradient(135deg, rgba(31, 35, 62, .96), rgba(37, 31, 66, .92));
}

[data-theme="dark"] .story-action-menu {
    background: rgba(45, 53, 88, .98);
    box-shadow: 0 18px 46px rgba(13, 17, 38, .3);
}

@media (max-width: 1280px) {
    :root { --v2-sidebar: 210px; }
    .desktop-sidebar { padding-right: 16px; padding-left: 16px; }
    .site-main { padding-right: 22px; padding-left: 22px; }
    .home-shell { grid-template-columns: minmax(0, 1fr) 270px; gap: 16px; }
    .profile-hero-content { padding-right: 28px; padding-left: 28px; }
    .profile-hero-copy,
    .profile-hero-stats { width: min(560px, 72%); }
}

@media (max-width: 1080px) {
    .home-shell { display: block; }
    .home-sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 18px; }
    .home-sidebar .calendar-widget { display: none; }
    .article-layout { grid-template-columns: minmax(0, 1fr); }
    .article-aside { position: static; display: grid; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 880px) {
    :root { --v2-sidebar: 0px; }
    html { scroll-padding-top: 84px; }
    .desktop-sidebar { display: none; }
    .site-stage { margin-left: 0; }
    .mobile-header {
        position: fixed;
        top: 12px;
        right: 14px;
        left: 14px;
        z-index: 120;
        height: 62px;
        display: grid;
        grid-template-columns: 46px 1fr auto;
        align-items: center;
        padding: 0 12px;
        border-radius: 20px;
    }
    .mobile-header button {
        width: 40px;
        height: 40px;
        display: grid;
        place-items: center;
        padding: 0;
        color: var(--v2-text);
        border: 0;
        border-radius: 12px;
        background: transparent;
    }
    .mobile-title {
        justify-self: center;
        color: var(--v2-text);
        font-size: 18px;
        font-weight: 850;
        text-decoration: none;
    }
    .mobile-header-actions {
        display: flex;
        gap: 2px;
    }
    .mobile-header-actions .theme-toggle {
        color: var(--v2-text);
    }
    .mobile-menu-toggle[aria-expanded="false"] .menu-close-icon,
    .mobile-menu-toggle[aria-expanded="true"] .menu-open-icon { display: none; }
    .mobile-menu {
        position: fixed;
        top: 82px;
        right: 14px;
        left: 14px;
        z-index: 115;
        display: block;
        padding: 14px;
        border-radius: 18px;
    }
    .mobile-menu[hidden] { display: none; }
    .mobile-search {
        height: 44px;
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 0 12px;
        border-radius: 12px;
        background: var(--v2-soft);
    }
    .mobile-search input {
        min-width: 0;
        flex: 1;
        color: var(--v2-text);
        border: 0;
        outline: 0;
        background: transparent;
    }
    .mobile-menu nav {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 12px;
    }
    .mobile-menu nav a {
        padding: 8px 13px;
        color: var(--v2-text-2);
        border-radius: 10px;
        background: var(--v2-soft);
        font-size: 12px;
        text-decoration: none;
    }
    .site-main { padding-top: 88px; }
    .site-footer { width: calc(100% - 32px); padding-bottom: 100px; }
    .reading-indicator { bottom: 92px; }
    .back-to-top { bottom: 142px; }
    .mobile-dock {
        position: fixed;
        right: 14px;
        bottom: max(12px, env(safe-area-inset-bottom));
        left: 14px;
        z-index: 110;
        height: 66px;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        width: auto !important;
        max-width: none !important;
        padding: 5px 10px;
        border-radius: 20px;
        transform: none !important;
    }
    .mobile-dock a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        color: var(--v2-text-3);
        border-radius: 14px;
        background: transparent !important;
        font-size: 9px;
        text-decoration: none;
    }
    .mobile-dock a:hover,
    .mobile-dock a.is-current {
        color: var(--v2-primary);
        background: var(--v2-primary-soft) !important;
    }
    .mobile-dock .icon { width: 20px; height: 20px; }
}

@media (max-width: 640px) {
    body { background: #f7f8ff; }
    .site-main { padding: 86px 12px 24px; }
    .profile-hero {
        min-height: 438px;
        border-radius: 22px;
        background-position: 68% center;
    }
    .profile-hero-shade {
        background: linear-gradient(0deg, rgba(244, 245, 255, .9) 0%, rgba(238, 239, 255, .24) 56%, rgba(38, 48, 94, .05));
    }
    .profile-hero-content {
        min-height: 438px;
        justify-content: flex-end;
        align-items: center;
        padding: 24px 16px 20px;
    }
    .profile-hero-avatar {
        position: relative;
        width: 104px;
        height: 104px;
        display: grid;
        place-items: center;
        margin-bottom: 8px;
        color: var(--v2-primary);
        border: 5px solid rgba(255, 255, 255, .92);
        border-radius: 50%;
        background: var(--v2-primary-soft);
        box-shadow: 0 10px 30px rgba(50, 60, 120, .22);
    }
    .profile-hero-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: inherit;
    }
    .profile-hero-avatar > span {
        position: absolute;
        right: -4px;
        bottom: 1px;
        width: 34px;
        height: 34px;
        display: grid;
        place-items: center;
        color: #fff;
        border: 3px solid #fff;
        border-radius: 50%;
        background: var(--v2-primary);
    }
    .profile-hero-copy {
        width: 100%;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
        text-align: center;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
    .hero-kicker,
    .profile-hero h1 > span { display: none; }
    .profile-hero h1 {
        margin: 0;
        color: #17244b;
        font-size: 29px;
        text-shadow: 0 2px 14px rgba(255, 255, 255, .8);
    }
    .profile-hero-copy p { color: #546287; font-size: 13px; }
    .profile-hero-stats {
        width: 100%;
        gap: 7px;
        margin-top: 14px;
    }
    .profile-hero-stats > span {
        display: flex;
        flex-direction: column;
        gap: 1px;
        padding: 9px 3px;
        border-radius: 12px;
        background: rgba(255, 255, 255, .78);
    }
    .profile-hero-stats i { grid-row: auto; }
    .profile-hero-stats b { font-size: 15px; }
    .profile-hero-stats small { font-size: 9px; }
    .notice-card {
        grid-template-columns: 46px auto 1fr auto;
        gap: 9px;
        margin-top: 12px;
        padding: 12px;
    }
    .notice-icon { width: 42px; height: 42px; }
    .notice-card > strong { padding-right: 9px; font-size: 14px; }
    .notice-card > div b { font-size: 11px; }
    .notice-card p { max-width: 38vw; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
    .feed-toolbar { margin: 12px 0; padding: 0; }
    .feed-toolbar > button { height: 48px; font-size: 10px; }
    .feed-toolbar .icon { width: 17px; height: 17px; }
    .story-card {
        margin-bottom: 12px;
        padding: 15px 14px 12px;
        border-radius: 18px;
    }
    .story-author .mini-avatar { width: 42px; height: 42px; flex-basis: 42px; }
    .story-content h2 { font-size: 16px; }
    .story-excerpt { font-size: 12px; }
    body[data-layout="grid"] .story-card { display: block !important; }
    body[data-layout="grid"] .story-cover,
    body[data-layout="moments"] .story-cover,
    body[data-layout="timeline"] .story-cover {
        width: 100%;
        height: 190px;
        float: none;
        margin: 12px 0 0;
    }
    body[data-layout="timeline"] .post-stream { padding-left: 20px; }
    body[data-layout="timeline"] .timeline-dot { left: -20px; }
    .moment-gallery { gap: 4px; }
    .moment-gallery button { aspect-ratio: 1; border-radius: 7px; }
    .moment-gallery-1 button { aspect-ratio: 4 / 3; }
    .story-footer { gap: 8px 16px; overflow-x: auto; }
    .story-footer .story-read { display: none; }
    .story-footer a,
    .story-footer button { flex: 0 0 auto; }
    .home-sidebar { display: grid; grid-template-columns: 1fr; }
    .home-sidebar .calendar-widget,
    .home-sidebar .sidebar-notice { display: none; }
    .archive-hero { padding: 22px 20px; }
    .archive-hero h1 { font-size: 24px; }
    .article-card { padding: 22px 16px; }
    .article-aside { grid-template-columns: 1fr; }
    .site-footer { justify-content: center; flex-wrap: wrap; gap: 8px 14px; text-align: center; }
    .site-footer a { margin-left: 0; }
    .reading-indicator { right: 17px; min-width: 68px; height: 38px; }
    .reading-ring { width: 28px; height: 28px; }
    .page-loader { top: 20px; }
    [data-theme="dark"] body { background: #222946; }
    [data-theme="dark"] .profile-hero-shade {
        background: linear-gradient(0deg, rgba(17, 21, 42, .88) 0%, rgba(28, 32, 63, .22) 58%, transparent);
    }
    [data-theme="dark"] .profile-hero h1 { color: #fff; }
    [data-theme="dark"] .profile-hero-copy p { color: #d6dcf4; }
    [data-theme="dark"] .profile-hero-stats > span { background: rgba(18, 23, 51, .76); }
}

/* 图片在完成解码后由柔焦自然过渡到清晰。 */
img.progressive-image {
    opacity: .68;
    filter: blur(14px);
    transform: scale(1.035);
    transform-origin: center;
    transition: filter .72s cubic-bezier(.2,.7,.2,1), opacity .55s ease, transform .72s cubic-bezier(.2,.7,.2,1) !important;
}

img.progressive-image.is-clear {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
}

html.theme-changing::view-transition-old(root),
html.theme-changing::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}

html.theme-changing::view-transition-old(root) { z-index: 9998; }
html.theme-changing::view-transition-new(root) {
    z-index: 9999;
    animation: theme-circle-reveal .68s cubic-bezier(.2,.72,.22,1) both;
}

@keyframes theme-circle-reveal {
    from { clip-path: circle(0 at var(--theme-origin-x) var(--theme-origin-y)); }
    to { clip-path: circle(var(--theme-radius) at var(--theme-origin-x) var(--theme-origin-y)); }
}

.theme-circle-fallback {
    position: fixed;
    z-index: 9999;
    display: block;
    pointer-events: none;
    border-radius: 50%;
    opacity: 1;
    transform: translate(-50%, -50%) scale(0);
    transition: transform .62s cubic-bezier(.2,.72,.22,1), opacity .18s ease;
}

.theme-circle-fallback.is-expanding {
    transform: translate(-50%, -50%) scale(1);
}

.theme-circle-fallback.is-revealing { opacity: 0; }

.feed-load-more {
    width: calc(100% - 24px);
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 12px;
    padding: 0 16px;
    color: var(--v2-text-3);
    border: 1px solid var(--v2-line);
    border-radius: 14px;
    outline: 0;
    background: rgba(255, 255, 255, .5);
    box-shadow: none;
    font: inherit;
    font-size: 12px;
    line-height: 1;
    text-align: center;
    -webkit-appearance: none;
    appearance: none;
}

.feed-load-more b {
    font-size: inherit;
    font-weight: 600;
    line-height: 1;
}

.feed-load-more.is-complete {
    min-height: 44px;
    color: var(--v2-text-3);
    border-color: transparent;
    background: var(--v2-soft);
    cursor: default;
    pointer-events: none;
}

.feed-load-more.is-complete::before,
.feed-load-more.is-complete::after {
    content: "";
    width: min(13vw, 46px);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--v2-line));
}

.feed-load-more.is-complete::after {
    background: linear-gradient(90deg, var(--v2-line), transparent);
}

[data-theme="dark"] .feed-load-more {
    background: rgba(57, 66, 103, .72);
}

@media (max-width: 880px) {
    body.mobile-menu-open { overflow: hidden; }

    .mobile-header {
        top: 0;
        right: 0;
        left: 0;
        height: 62px;
        grid-template-columns: 44px minmax(0, 1fr) auto;
        padding: env(safe-area-inset-top) 12px 0;
        border: 0;
        border-bottom: 1px solid var(--v2-line);
        border-radius: 0;
        background: rgba(255, 255, 255, .92);
        box-shadow: 0 8px 26px rgba(55, 61, 120, .09);
        backdrop-filter: blur(20px) saturate(145%);
        -webkit-backdrop-filter: blur(20px) saturate(145%);
        transition: color .25s ease, background .25s ease, border-color .25s ease, box-shadow .25s ease;
    }

    .mobile-header .mobile-menu-toggle,
    .mobile-header-actions > button {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        line-height: 0;
    }

    .mobile-header .icon {
        width: 20px;
        height: 20px;
        display: block;
        flex: 0 0 20px;
    }

    .mobile-header .theme-icon-light,
    .mobile-header .theme-icon-dark {
        align-items: center;
        justify-content: center;
        line-height: 0;
    }

    html:not([data-theme="dark"]) .mobile-header .theme-icon-dark,
    html[data-theme="dark"] .mobile-header .theme-icon-light {
        display: flex;
    }

    .mobile-header.is-over-hero {
        color: #fff;
        border-color: transparent;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .mobile-header.is-over-hero button,
    .mobile-header.is-over-hero .mobile-reading-percent {
        color: #fff;
        text-shadow: 0 2px 10px rgba(18, 27, 62, .48);
    }

    .mobile-header.is-over-hero .mobile-title {
        opacity: 0;
        pointer-events: none;
    }

    .mobile-title {
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        transition: opacity .2s ease;
    }

    .mobile-header-actions {
        height: 40px;
        align-items: center;
        gap: 0;
    }

    .mobile-reading-percent {
        min-width: 38px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 3px;
        color: var(--v2-text-2);
        font-size: 12px;
        font-weight: 780;
        line-height: 1;
        text-align: center;
        font-variant-numeric: tabular-nums;
    }

    .mobile-menu-backdrop {
        position: fixed;
        inset: 0;
        z-index: 150;
        display: block;
        background: rgba(24, 31, 67, .35);
        opacity: 1;
        pointer-events: auto;
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
        transition: opacity .28s ease;
    }

    .mobile-menu-backdrop[aria-hidden="true"] {
        opacity: 0;
        pointer-events: none;
    }

    .mobile-menu {
        top: 0;
        right: auto;
        bottom: 0;
        left: 0;
        z-index: 160;
        width: min(82vw, 324px);
        display: block;
        padding: 0 0 max(24px, env(safe-area-inset-bottom));
        overflow-x: hidden;
        overflow-y: auto;
        border: 0;
        border-radius: 0 24px 24px 0;
        background: var(--v2-panel-solid);
        box-shadow: 22px 0 70px rgba(26, 31, 70, .24);
        transform: translateX(-104%);
        visibility: hidden;
        transition: transform .34s cubic-bezier(.22,.76,.22,1), visibility 0s linear .34s;
    }

    .mobile-menu.is-open {
        transform: translateX(0);
        visibility: visible;
        transition-delay: 0s;
    }

    .mobile-menu-hero {
        position: relative;
        min-height: 234px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        padding: 28px 20px 20px;
        overflow: hidden;
        color: #fff;
        background-image: linear-gradient(0deg, rgba(35, 42, 86, .82), rgba(62, 74, 140, .08) 72%), var(--mobile-menu-hero);
        background-size: cover;
        background-position: center;
    }

    .mobile-menu-close {
        position: absolute;
        top: max(12px, env(safe-area-inset-top));
        right: 12px;
        width: 38px;
        height: 38px;
        display: grid;
        place-items: center;
        padding: 0;
        color: #fff;
        border: 1px solid rgba(255, 255, 255, .24);
        border-radius: 50%;
        background: rgba(29, 37, 80, .2);
        backdrop-filter: blur(10px);
    }

    .mobile-menu-avatar {
        width: 78px;
        height: 78px;
        display: grid;
        place-items: center;
        overflow: hidden;
        margin-bottom: 10px;
        border: 4px solid rgba(255, 255, 255, .92);
        border-radius: 50%;
        background: var(--v2-primary-soft);
        box-shadow: 0 10px 28px rgba(25, 31, 70, .25);
    }

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

    .mobile-menu-hero > strong { font-size: 20px; }

    .mobile-menu-hero > p {
        max-width: 240px;
        margin: 3px 0 0;
        overflow: hidden;
        color: rgba(255, 255, 255, .78);
        font-size: 13px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-menu .mobile-search {
        margin: 16px 16px 8px;
    }

    .mobile-menu nav {
        display: grid;
        gap: 4px;
        margin: 4px 10px 0;
    }

    .mobile-menu nav > a,
    .mobile-category-toggle {
        width: 100%;
        min-height: 48px;
        display: flex;
        align-items: center;
        gap: 13px;
        padding: 0 14px;
        color: var(--v2-text-2);
        border: 0;
        border-radius: 13px;
        background: transparent;
        font-size: 15px;
        font-weight: 680;
        text-align: left;
        cursor: pointer;
    }

    .mobile-menu nav > a:hover,
    .mobile-category-toggle:hover,
    .mobile-category-toggle[aria-expanded="true"] {
        color: var(--v2-primary);
        background: var(--v2-primary-soft);
    }

    .mobile-menu nav .icon { width: 19px; height: 19px; color: var(--v2-primary); }

    .mobile-category-toggle > i {
        display: inline-flex;
        margin-left: auto;
        transition: transform .22s ease;
    }

    .mobile-category-toggle > i .icon { width: 16px; height: 16px; }
    .mobile-category-toggle[aria-expanded="true"] > i { transform: rotate(180deg); }

    .mobile-category-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
        padding: 8px 7px 11px 46px;
    }

    .mobile-category-list[hidden] { display: none; }

    .mobile-menu nav .mobile-category-list a {
        min-width: 0;
        min-height: 38px;
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 7px 9px;
        color: var(--v2-text-2);
        border: 1px solid var(--v2-line);
        border-radius: 10px;
        background: var(--v2-soft);
        font-size: 12px;
        font-weight: 650;
    }

    .mobile-menu nav .mobile-category-list a:hover,
    .mobile-menu nav .mobile-category-list a.is-current {
        color: var(--v2-primary);
        border-color: rgba(128, 97, 255, .28);
        background: var(--v2-primary-soft);
    }

    .mobile-menu nav .mobile-category-list a span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-menu nav .mobile-category-list a b {
        margin-left: auto;
        color: var(--v2-text-3);
        font-size: 10px;
        font-variant-numeric: tabular-nums;
    }

    .mobile-category-empty {
        grid-column: 1 / -1;
        padding: 8px 4px;
        color: var(--v2-text-3);
        font-size: 12px;
    }

    .mobile-menu-foot {
        display: grid;
        gap: 3px;
        padding: 22px 24px 0;
        color: var(--v2-text-3);
        font-size: 12px;
    }
}

@media (max-width: 640px) {
    html { scroll-padding-top: 68px; }
    body { font-size: 16px; }
    .scroll-progress,
    .reading-indicator,
    .mobile-dock { display: none !important; }

    .back-to-top {
        right: 14px;
        bottom: max(18px, env(safe-area-inset-bottom));
        width: 42px;
        height: 42px;
        display: grid;
        border: 1px solid rgba(255, 255, 255, .28);
        border-radius: 14px;
        box-shadow: 0 12px 28px rgba(72, 61, 150, .24);
    }

    .back-to-top .icon { width: 19px; height: 19px; }

    body.viewer-open .back-to-top {
        opacity: 0;
        pointer-events: none;
    }

    .site-main { padding: 74px 0 24px; }
    body.has-home-hero .site-main { padding-top: 0; }
    .home-shell { width: 100%; }
    .home-primary { width: 100%; }

    body.has-home-hero .profile-hero {
        min-height: 438px;
        margin: 0;
        border: 0;
        border-radius: 0 0 24px 24px;
    }

    .profile-hero-copy p { font-size: 15px; }
    .profile-hero-stats b { font-size: 17px; }
    .profile-hero-stats small { font-size: 12px; }

    .feed-toolbar { display: none !important; }
    .home-sidebar { display: none !important; }

    .notice-card {
        margin: 12px 12px 14px;
    }

    .notice-card > strong { font-size: 15px; }
    .notice-card > div b { font-size: 13px; }
    .notice-card p { max-width: 42vw; font-size: 12px; }

    body[data-layout="moments"] .post-stream {
        overflow: hidden;
        border-top: 1px solid var(--v2-line);
        background: var(--v2-panel-solid);
    }

    body[data-layout="moments"] .story-card {
        max-width: none;
        margin: 0;
        padding: 22px 14px 14px;
        overflow: visible;
        border: 0;
        border-bottom: 1px solid var(--v2-line);
        border-radius: 0;
        background: var(--v2-panel-solid);
        box-shadow: none;
        transform: none;
    }

    body[data-layout="moments"] .story-card:hover {
        border-color: var(--v2-line);
        box-shadow: none;
        transform: none;
    }

    body[data-layout="moments"] .story-author {
        display: grid;
        grid-template-columns: 36px minmax(0, 1fr) 30px;
        align-items: start;
        gap: 10px;
        margin-bottom: 5px;
    }

    body[data-layout="moments"] .story-author .mini-avatar {
        display: grid;
        width: 36px;
        height: 36px;
        flex-basis: 36px;
        border-width: 1px;
    }

    body[data-layout="moments"] .story-author a { color: #526aaf; font-size: 14px; }
    body[data-layout="moments"] .story-author em { display: none; }
    body[data-layout="moments"] .story-author time { font-size: 12px; }
    body[data-layout="moments"] .story-more { width: 30px; height: 30px; }

    body[data-layout="moments"] .story-action-menu {
        top: 60px;
        right: 14px;
        width: 224px;
    }

    body[data-layout="moments"] .story-content,
    body[data-layout="moments"] .moment-gallery,
    body[data-layout="moments"] .story-cover,
    body[data-layout="moments"] .story-tags,
    body[data-layout="moments"] .story-footer {
        margin-left: 46px;
    }

    body[data-layout="moments"] .story-content h2 {
        margin: 2px 0 8px;
        font-size: 15px;
        line-height: 1.65;
    }

    body[data-layout="moments"] .story-content { padding: 0; }

    body[data-layout="moments"] .story-excerpt {
        margin-top: 0;
        color: var(--v2-text-2);
        font-size: 14px;
        line-height: 2;
    }

    body[data-layout="moments"] .story-tags {
        width: calc(100% - 46px);
        margin-top: 9px;
        font-size: 12px;
        line-height: 1.5;
    }

    body[data-layout="moments"] .moment-gallery {
        width: calc(100% - 46px);
        gap: 5px;
        margin-top: 12px;
    }

    body[data-layout="moments"] .moment-gallery button,
    body[data-layout="moments"] .moment-gallery-1 button,
    body[data-layout="moments"] .moment-gallery-2 button {
        aspect-ratio: 1;
        border-radius: 7px;
        box-shadow: 0 3px 10px rgba(42, 49, 94, .08);
    }

    body[data-layout="moments"] .moment-gallery-1 {
        width: min(calc(100% - 46px), 280px);
        grid-template-columns: 1fr;
    }

    body[data-layout="moments"] .moment-gallery-1 button { aspect-ratio: 4 / 3; }

    body[data-layout="moments"] .moment-gallery-2 {
        width: min(calc(100% - 46px), 280px);
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body[data-layout="moments"] .story-cover {
        display: block;
        width: min(calc(100% - 46px), 310px);
        height: auto;
        margin-top: 12px;
        aspect-ratio: 16 / 10;
        border-radius: 8px;
    }

    body[data-layout="moments"] .story-footer {
        min-height: 28px;
        gap: 14px;
        margin-top: 10px;
        padding: 5px 9px;
        border: 0;
        background: #f7f8fc;
    }

    body[data-layout="moments"] .story-footer .like-button,
    body[data-layout="moments"] .story-footer [data-share-url],
    body[data-layout="moments"] .story-footer .bookmark-button,
    body[data-layout="moments"] .story-footer .story-read {
        display: none;
    }

    body[data-layout="moments"] .story-footer a { color: #7285c4; font-size: 12px; }

    .feed-load-more {
        width: calc(100% - 24px);
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 9px;
        margin: 12px;
        color: var(--v2-text-3);
        border: 1px solid var(--v2-line);
        border-radius: 14px;
        background: var(--v2-soft);
        font-size: 13px;
    }

    .feed-load-more span,
    .pull-refresh-spinner {
        width: 16px;
        height: 16px;
        display: block;
        border: 2px solid rgba(128, 97, 255, .2);
        border-top-color: var(--v2-primary);
        border-radius: 50%;
        animation: loader-spin .7s linear infinite;
    }

    .feed-load-more:not(.is-loading) span,
    .feed-load-more.is-complete span { display: none; }
    .feed-load-more.is-complete { min-height: 44px; border-color: transparent; }
    .feed-load-more.is-error { color: var(--v2-primary); }

    .pull-refresh {
        position: fixed;
        top: 6px;
        left: 50%;
        z-index: 145;
        min-width: 112px;
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 0 13px;
        color: var(--v2-primary);
        border: 1px solid var(--v2-line);
        border-radius: 99px;
        background: var(--v2-panel-solid);
        box-shadow: var(--v2-shadow-soft);
        opacity: 1;
        transform: translate(-50%, calc(var(--pull-distance, 0px) - 52px));
        transition: transform .22s ease, opacity .18s ease;
    }

    .pull-refresh[aria-hidden="true"] { opacity: 0; pointer-events: none; }
    .pull-refresh b { font-size: 13px; }
    body.is-pulling .site-stage,
    body.is-pull-refreshing .site-stage {
        transform: translateY(var(--pull-distance, 0px));
    }
    .site-stage { transition: transform .22s ease; }

    [data-theme="dark"] .mobile-header {
        border-color: rgba(184, 192, 236, .12);
        background: rgba(38, 46, 77, .94);
    }
    [data-theme="dark"] .mobile-header.is-over-hero { background: transparent; }
    [data-theme="dark"] .profile-hero-copy {
        border: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    [data-theme="dark"] body[data-layout="moments"] .post-stream,
    [data-theme="dark"] body[data-layout="moments"] .story-card {
        background: var(--v2-panel-solid);
    }
    [data-theme="dark"] body[data-layout="moments"] .story-footer {
        background: rgba(68, 77, 116, .42);
    }
    [data-theme="dark"] body[data-layout="moments"] .story-author a { color: #b9c8ff; }
}

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