/* Hold the initial render until the page's visual assets are ready. */
html.site-visual-loading {
    overflow: hidden;
}

html.site-visual-loading::before {
    content: '';
    position: fixed;
    z-index: 100000;
    inset: 0;
    pointer-events: none;
    background: #091322;
}

html.site-visual-loading.site-visual-academic::before {
    background: #f8fafc;
}

html.site-visual-loading.site-visual-mounted::before {
    display: none;
}

#site-visual-overlay {
    position: fixed;
    z-index: 100000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    color: #f4f3f0;
    background: radial-gradient(circle at 50% 38%, rgba(82, 118, 169, .23), transparent 40%), #091322;
    transition: opacity .45s ease;
}

#site-visual-overlay.site-visual-overlay--academic {
    color: #243b55;
    background: radial-gradient(circle at 50% 38%, rgba(157, 183, 214, .17), transparent 40%), #f8fafc;
}

#site-visual-overlay.is-leaving {
    opacity: 0;
    pointer-events: none;
}

.site-visual-content {
    display: grid;
    justify-items: center;
    gap: 22px;
    text-align: center;
}

/* Adapted from UI Ball's MIT-licensed Grid: https://uiball.com/ldrs/ */
.site-visual-grid {
    --grid-size: 76px;
    --grid-speed: 1.5s;
    --grid-dot-size: calc(var(--grid-size) * .1);
    position: relative;
    display: block;
    width: calc(var(--grid-size) * .64);
    height: calc(var(--grid-size) * .64);
    margin: 10px 22px;
}

.site-visual-grid-dot {
    position: absolute;
    bottom: calc(var(--grid-bottom) + var(--grid-dot-size) / 2);
    right: calc(var(--grid-right) + var(--grid-dot-size) / 2);
    width: var(--grid-dot-size);
    height: var(--grid-dot-size);
    opacity: var(--grid-scale);
    animation: site-visual-grid-jump var(--grid-speed) ease-in-out infinite;
    animation-delay: var(--grid-delay);
    will-change: transform;
    backface-visibility: hidden;
}

.site-visual-grid-dot::before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, #fff 0%, var(--grid-color) 64%, var(--grid-color) 100%);
    box-shadow: inset -1px -1px 2px rgba(8, 24, 49, .24), 0 2px 6px rgba(112, 157, 221, .27);
    transform: scale(var(--grid-scale));
}

.site-visual-overlay--academic .site-visual-grid-dot::before {
    box-shadow: inset -1px -1px 2px rgba(8, 24, 49, .26), 0 2px 5px rgba(57, 91, 142, .16);
}

.site-visual-message {
    color: #dce9f8;
    font: 600 13px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: .22em;
    text-indent: .22em;
}

.site-visual-overlay--academic .site-visual-message {
    color: #415f80;
}

.site-visual-ellipsis {
    display: inline-block;
    width: 1.6em;
    letter-spacing: .08em;
    text-align: left;
    animation: site-visual-ellipsis 1.55s ease-in-out infinite;
}

@keyframes site-visual-grid-jump {
    0%, 100% { transform: translateY(120%); }
    50% { transform: translateY(-120%); }
}

@keyframes site-visual-ellipsis {
    0%, 100% { opacity: .35; }
    50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .site-visual-grid-dot,
    .site-visual-ellipsis {
        animation: none;
    }

    .site-visual-grid-dot {
        transform: none;
    }

    #site-visual-overlay {
        transition: none;
    }
}

/* 鱼塘固定宽度：只作用于页脚鱼塘 canvas，避免误伤正文交互画布和全屏背景 */
#footer canvas:not(#ribbon-canvas) {
    margin-bottom: -0.5rem;
    display: block;
    width: 100%;
    height: 160px;
}

#web_bg {
    display: block;
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    background-color: #020617;
}


#ribbon-canvas,
#fluttering_ribbon {
    display: none !important;
}
 
/* 鱼塘渐变色 */
body{
 overflow-x: hidden;
 background: #020617;
}

#footer {
 height:160px;
 background: linear-gradient(
  135deg,
  rgba(8, 15, 40, 0.55),
  rgba(18, 65, 111, 0.4)
 );
}

#footer #footer-wrap,
#footer-wrap a {
 color: #000;
}
[data-theme=dark] #footer #footer-wrap,
[data-theme=dark] #footer-wrap a {
 color: #e2e8f0;
}

#footer #footer-wrap {
 z-index: 1;
}
 
#footer .container {
 line-height: 0;
 position: relative;
 height: 100%;
 width: 100vw;
}

 
/* 侧边栏卡片：统一作者卡 / 公告 / 最新文章等视觉 */
#aside-content .card-widget {
    background: linear-gradient(-45deg, rgba(255, 225, 245, 0.6),
    rgba(255, 225, 225, 0.9),
    rgba(225, 255, 251, 0.9),
    rgba(255, 225, 255, 0.6));
    border: 1px solid rgba(214, 51, 108, 0.12);
    box-shadow: 0 14px 32px rgba(214, 51, 108, 0.08);
    backdrop-filter: blur(10px);
}

[data-theme=dark] #aside-content .card-widget {
    background: linear-gradient(-45deg, rgba(15, 23, 42, 0.9),
    rgba(30, 41, 59, 0.94),
    rgba(17, 24, 39, 0.94),
    rgba(37, 40, 82, 0.82)) !important;
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.28);
    backdrop-filter: blur(12px);
}
/* 个人信息Follow me按钮 */
#aside-content>.card-widget.card-info>#card-info-btn {
    background-color: #3eb8be;
    border-radius: 8px;
}

/* 文章标题前装饰：渐变弧线菱形，取 Gemini 风格的柔和标识感 */
.container h1::before,
.container h2::before,
.container h3::before,
.container h4::before,
.container h5::before,
.container h6::before {
    content: '' !important;
    display: block;
    position: absolute;
    top: 50%;
    left: 0;
    width: 14px;
    height: 14px;
    transform: translateY(-50%) rotate(45deg);
    border-radius: 4px;
    background:
        radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.18) 34%, rgba(255, 255, 255, 0) 54%),
        linear-gradient(135deg, #ffd6ee 0%, #f58b8b 26%, #d6336c 58%, #7b61ff 100%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55) inset, 0 8px 18px rgba(214, 51, 108, 0.18);
    font-family: initial !important;
    font-weight: 400 !important;
    pointer-events: none;
}

.container h1:hover::before,
.container h2:hover::before,
.container h3:hover::before,
.container h4:hover::before,
.container h5:hover::before,
.container h6:hover::before {
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.22) 34%, rgba(255, 255, 255, 0) 56%),
        linear-gradient(135deg, #ffe3f4 0%, #ff9b9b 24%, #df3e77 56%, #6f6bff 100%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.62) inset, 0 10px 22px rgba(214, 51, 108, 0.24);
}

/* 评论区卡片：柔和渐变包裹层，提升 GitHub 评论嵌入的整体观感 */
#post-comment {
    margin-top: 2.6rem;
    padding: 1.1rem 1.15rem 1.2rem;
    background: linear-gradient(135deg, rgba(255, 246, 251, 0.96), rgba(243, 248, 255, 0.96));
    border: 1px solid rgba(214, 51, 108, 0.14);
    border-radius: 22px;
    box-shadow: 0 14px 34px rgba(214, 51, 108, 0.09);
    backdrop-filter: blur(8px);
}

#post-comment .comment-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

#post-comment .comment-head .comment-headline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #7a0e4b;
    letter-spacing: 0.02em;
}

#post-comment .comment-head .comment-headline::before {
    content: '';
    width: 12px;
    height: 12px;
    display: inline-block;
    transform: rotate(45deg);
    border-radius: 4px;
    background:
        radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.15) 36%, rgba(255, 255, 255, 0) 56%),
        linear-gradient(135deg, #ffd6ee 0%, #f58b8b 28%, #d6336c 58%, #7b61ff 100%);
    box-shadow: 0 6px 14px rgba(214, 51, 108, 0.16);
}

#post-comment .utterances {
    max-width: 100% !important;
    margin-top: 0.2rem;
}

#post-comment .utterances-frame {
    border-radius: 16px;
}

[data-theme=dark] #post-comment {
    background: linear-gradient(135deg, rgba(29, 34, 54, 0.92), rgba(41, 35, 63, 0.92));
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

[data-theme=dark] #post-comment .comment-head .comment-headline {
    color: #ffdceb;
}
/*文章页面*/
/* .layout>#post {
    background: linear-gradient(-45deg, rgba(225, 255, 252, 0.8), 
rgba(255, 225, 229, 0.9), 
rgba(225, 255, 225, 0.9), 
rgba(253, 255, 225, 0.8));
}
[data-theme=dark] .layout>#post {
    background: linear-gradient(-45deg, rgba(24,40,72,.2), 
rgba(35,37,58,.9), 
rgba(35,37,58,.9), 
rgba(24,40,72,.2));
} */
/*主页文章预览页面*/
#recent-posts>.recent-post-item{
    background: linear-gradient(-45deg, rgba(225, 255, 252, 0.8), 
    rgba(255, 225, 229, 0.9), 
    rgba(225, 255, 225, 0.9), 
    rgba(253, 255, 225, 0.8));
}
[data-theme=dark] #recent-posts>.recent-post-item{
    background: linear-gradient(-45deg, rgba(24,40,72,.16), 
rgba(35,37,58,.82), 
rgba(35,37,58,.82), 
rgba(24,40,72,.16));
    backdrop-filter: blur(10px);
}
 
/*分类页面*/
.layout>#page {
    background: linear-gradient(-45deg, rgba(225,235,255,.8), 
rgba(225,235,255,.9), 
rgba(225,235,255,.9), 
rgba(225,235,255,.8));
}
[data-theme=dark] .layout>#page {
    background: linear-gradient(-45deg, rgba(24,40,72,.2), 
rgba(35,37,58,.9), 
rgba(35,37,58,.9), 
rgba(24,40,72,.2));
}
 
/*时间轴页面*/
.layout>#archive {
    background: linear-gradient(-45deg, rgba(225,235,255,.8), 
rgba(225,235,255,.9), 
rgba(225,235,255,.9), 
rgba(225,235,255,.8));
}
[data-theme=dark] .layout>#archive {
    background: linear-gradient(-45deg, rgba(24,40,72,.2), 
rgba(35,37,58,.9), 
rgba(35,37,58,.9), 
rgba(24,40,72,.2));
}

/* 轻量版 Transformer Explainer：文章内的可交互 next-token 解释面板 */
.tfx-lite-demo {
    margin: 2.2rem 0 2.8rem;
}

.tfx-lite-shell {
    --tfx-border: rgba(121, 138, 184, 0.18);
    --tfx-text: #3a4967;
    --tfx-muted: #7786a5;
    --tfx-soft: #f6f9ff;
    --tfx-card: rgba(255, 255, 255, 0.88);
    --tfx-accent: #6d7fe8;
    --tfx-accent-2: #9c86ff;
    --tfx-accent-3: #7ecad8;
    position: relative;
    overflow: hidden;
    padding: 1.5rem;
    border: 1px solid var(--tfx-border);
    border-radius: 28px;
    background:
        radial-gradient(circle at top left, rgba(209, 230, 255, 0.9), rgba(209, 230, 255, 0) 34%),
        radial-gradient(circle at right 12% top 18%, rgba(225, 214, 255, 0.75), rgba(225, 214, 255, 0) 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(247, 250, 255, 0.94));
    box-shadow: 0 20px 48px rgba(111, 138, 190, 0.12);
    color: var(--tfx-text);
}

.tfx-lite-top {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.9fr);
    gap: 1rem;
    align-items: stretch;
}

.tfx-lite-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.7rem;
    padding: 0.32rem 0.7rem;
    border-radius: 999px;
    background: rgba(116, 137, 232, 0.1);
    color: #6175c9;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tfx-lite-top h4 {
    margin: 0;
    color: #324159;
    font-size: 1.35rem;
    line-height: 1.45;
}

.tfx-lite-top p,
.tfx-lite-mini-note p,
.tfx-lite-card-sub,
.tfx-lite-view-desc,
.tfx-lite-axis-note,
.tfx-lite-insight-text {
    color: var(--tfx-muted);
    line-height: 1.75;
}

.tfx-lite-top p {
    margin: 0.75rem 0 0;
}

.tfx-lite-meta-card,
.tfx-lite-prompt-card,
.tfx-lite-panel,
.tfx-lite-mini-note,
.tfx-lite-flow-card {
    background: var(--tfx-card);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 12px 24px rgba(135, 150, 191, 0.08);
    backdrop-filter: blur(10px);
}

.tfx-lite-meta-card {
    padding: 1rem 1.1rem;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
        linear-gradient(135deg, rgba(248, 251, 255, 0.98), rgba(241, 245, 255, 0.96)),
        linear-gradient(135deg, rgba(116, 137, 232, 0.08), rgba(158, 134, 255, 0.08));
}

.tfx-lite-meta-label,
.tfx-lite-card-title,
.tfx-lite-mini-title,
.tfx-lite-flow-title,
.tfx-lite-view-title {
    color: #40506f;
    font-weight: 700;
}

.tfx-lite-meta-label {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #7282ac;
}

.tfx-lite-next-token {
    margin-top: 0.6rem;
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #5566d7;
}

.tfx-lite-next-prob {
    margin-top: 0.2rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #7a63dd;
}

.tfx-lite-meta-sub {
    margin-top: 0.75rem;
    color: #7a88a7;
    font-size: 0.9rem;
}

.tfx-lite-example-tabs,
.tfx-lite-snapshot-tabs,
.tfx-lite-prompt-tokens,
.tfx-lite-flow,
.tfx-lite-bottom-notes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tfx-lite-example-tabs {
    margin-top: 1rem;
}

.tfx-lite-tab,
.tfx-lite-snapshot,
.tfx-lite-token-chip,
.tfx-lite-grid-side,
.tfx-lite-grid-cell {
    border: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tfx-lite-tab,
.tfx-lite-snapshot {
    padding: 0.72rem 1rem;
    border-radius: 16px;
    background: rgba(243, 247, 255, 0.94);
    color: #6c7c9a;
    box-shadow: inset 0 0 0 1px rgba(126, 145, 186, 0.14);
}

.tfx-lite-tab.is-active,
.tfx-lite-snapshot.is-active {
    background: linear-gradient(135deg, rgba(103, 126, 234, 0.14), rgba(154, 134, 255, 0.2));
    color: #4b5fca;
    box-shadow: inset 0 0 0 1px rgba(99, 122, 231, 0.25), 0 10px 18px rgba(99, 122, 231, 0.12);
}

.tfx-lite-prompt-card {
    margin-top: 1rem;
    padding: 1rem 1.1rem 1.05rem;
    border-radius: 22px;
}

.tfx-lite-card-title {
    font-size: 0.92rem;
}

.tfx-lite-card-sub {
    margin-top: 0.25rem;
    font-size: 0.92rem;
}

.tfx-lite-prompt-text {
    margin-top: 0.7rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(245, 248, 255, 0.96), rgba(250, 245, 255, 0.94));
    color: #40506f;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.96rem;
    line-height: 1.75;
}

.tfx-lite-prompt-tokens {
    margin-top: 0.85rem;
}

.tfx-lite-token-chip {
    display: inline-flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.62rem 0.7rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(247, 250, 255, 0.97), rgba(238, 244, 255, 0.96));
    color: #596b8d;
    box-shadow: inset 0 0 0 1px rgba(138, 154, 192, 0.12);
}

.tfx-lite-token-chip.is-active {
    background: linear-gradient(135deg, rgba(104, 128, 236, 0.13), rgba(126, 202, 216, 0.18));
    color: #4258c4;
    box-shadow: inset 0 0 0 1px rgba(92, 113, 221, 0.24), 0 8px 16px rgba(92, 113, 221, 0.12);
}

.tfx-lite-token-text {
    font-weight: 600;
    font-size: 0.93rem;
}

.tfx-lite-token-id {
    font-size: 0.72rem;
    color: #8795b3;
}

.tfx-lite-flow {
    margin-top: 1rem;
}

.tfx-lite-flow-card {
    flex: 1 1 180px;
    padding: 0.92rem 1rem;
    border-radius: 20px;
}

.tfx-lite-flow-card.is-focus {
    background: linear-gradient(135deg, rgba(246, 249, 255, 0.98), rgba(240, 244, 255, 0.96));
    box-shadow: inset 0 0 0 1px rgba(106, 129, 235, 0.22), 0 12px 20px rgba(106, 129, 235, 0.08);
}

.tfx-lite-flow-note {
    margin-top: 0.35rem;
    color: var(--tfx-muted);
    line-height: 1.7;
    font-size: 0.92rem;
}

.tfx-lite-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.95fr);
    gap: 1rem;
    margin-top: 1rem;
}

.tfx-lite-panel {
    padding: 1.1rem;
    border-radius: 24px;
}

.tfx-lite-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.tfx-lite-view-note {
    margin-top: 0.85rem;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(243, 247, 255, 0.96), rgba(248, 244, 255, 0.94));
}

.tfx-lite-view-desc,
.tfx-lite-axis-note,
.tfx-lite-insight-text,
.tfx-lite-context-value,
.tfx-lite-prob-value,
.tfx-lite-prob-rank {
    font-size: 0.9rem;
}

.tfx-lite-axis-note {
    margin-top: 0.8rem;
}

.tfx-lite-matrix-wrap {
    margin-top: 1rem;
    overflow-x: auto;
    padding-bottom: 0.2rem;
}

.tfx-lite-matrix-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
    color: #8694b2;
    font-size: 0.82rem;
}

.tfx-lite-legend-bar {
    width: 120px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(230, 238, 255, 0.95), rgba(168, 150, 255, 0.95));
}

.tfx-lite-matrix-grid {
    display: grid;
    min-width: max-content;
    gap: 0.38rem;
    align-items: stretch;
}

.tfx-lite-grid-corner,
.tfx-lite-grid-head,
.tfx-lite-grid-side,
.tfx-lite-grid-cell {
    min-height: 58px;
    border-radius: 16px;
}

.tfx-lite-grid-corner,
.tfx-lite-grid-head {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem;
    background: rgba(243, 247, 255, 0.88);
    color: #7b8aa8;
    font-size: 0.86rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.45;
}

.tfx-lite-grid-side {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.8rem 0.95rem;
    background: linear-gradient(135deg, rgba(246, 249, 255, 0.96), rgba(239, 244, 255, 0.92));
    color: #60718f;
    text-align: left;
    font-weight: 600;
}

.tfx-lite-grid-side.is-active {
    color: #4e63d1;
    box-shadow: inset 0 0 0 1px rgba(92, 112, 226, 0.22);
}

.tfx-lite-grid-cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem;
    color: #314159;
    font-size: 0.78rem;
    font-weight: 700;
}

.tfx-lite-grid-cell.is-selected-row {
    transform: translateY(-1px);
}

.tfx-lite-grid-cell.is-strong {
    color: #3041aa;
}

.tfx-lite-grid-cell.is-masked {
    color: transparent;
}

.tfx-lite-panel-side {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.tfx-lite-side-block {
    padding: 0.15rem 0;
}

.tfx-lite-context-list,
.tfx-lite-prob-list {
    display: flex;
    flex-direction: column;
    gap: 0.62rem;
    margin-top: 0.75rem;
}

.tfx-lite-context-row,
.tfx-lite-prob-row {
    display: grid;
    align-items: center;
    gap: 0.6rem;
}

.tfx-lite-context-row {
    grid-template-columns: minmax(72px, 1fr) minmax(0, 1.8fr) auto;
}

.tfx-lite-prob-row {
    grid-template-columns: 36px minmax(70px, 1fr) minmax(0, 1.8fr) auto;
}

.tfx-lite-context-token,
.tfx-lite-prob-token {
    color: #51627f;
    font-weight: 600;
}

.tfx-lite-context-bar-wrap,
.tfx-lite-prob-bar-wrap {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(220, 228, 244, 0.75);
}

.tfx-lite-context-bar,
.tfx-lite-prob-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(111, 195, 212, 0.92), rgba(114, 126, 235, 0.96), rgba(156, 134, 255, 0.98));
}

.tfx-lite-prob-row.is-top .tfx-lite-prob-token,
.tfx-lite-prob-row.is-top .tfx-lite-prob-value {
    color: #4f61d2;
    font-weight: 700;
}

.tfx-lite-insight-block {
    padding-top: 0.1rem;
    border-top: 1px dashed rgba(131, 149, 191, 0.18);
}

.tfx-lite-insight-text {
    margin-top: 0.7rem;
}

.tfx-lite-insight-text strong {
    color: #4d60cf;
}

.tfx-lite-bottom-notes {
    margin-top: 1rem;
}

.tfx-lite-mini-note {
    flex: 1 1 220px;
    padding: 0.92rem 1rem;
    border-radius: 20px;
}

.tfx-lite-mini-title {
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
}

.tfx-lite-mini-note p {
    margin: 0;
    font-size: 0.9rem;
}

.tfx-lite-tooltip {
    position: fixed;
    z-index: 10000;
    padding: 0.42rem 0.7rem;
    border: 1px solid rgba(121, 138, 184, 0.22);
    border-radius: 12px;
    background: rgba(31, 42, 63, 0.9);
    color: #f5f7fb;
    font-size: 0.82rem;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 12px 28px rgba(19, 29, 46, 0.26);
}

[data-theme=dark] .tfx-lite-shell {
    --tfx-border: rgba(255, 255, 255, 0.08);
    --tfx-text: #d6def8;
    --tfx-muted: #99a7c9;
    --tfx-card: rgba(24, 30, 49, 0.9);
    background:
        radial-gradient(circle at top left, rgba(61, 92, 146, 0.34), rgba(61, 92, 146, 0) 34%),
        radial-gradient(circle at right 12% top 18%, rgba(112, 74, 170, 0.28), rgba(112, 74, 170, 0) 26%),
        linear-gradient(180deg, rgba(17, 22, 37, 0.98), rgba(21, 28, 44, 0.96));
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.24);
}

[data-theme=dark] .tfx-lite-top h4,
[data-theme=dark] .tfx-lite-meta-label,
[data-theme=dark] .tfx-lite-card-title,
[data-theme=dark] .tfx-lite-mini-title,
[data-theme=dark] .tfx-lite-flow-title,
[data-theme=dark] .tfx-lite-view-title,
[data-theme=dark] .tfx-lite-context-token,
[data-theme=dark] .tfx-lite-prob-token {
    color: #dce5ff;
}

[data-theme=dark] .tfx-lite-eyebrow,
[data-theme=dark] .tfx-lite-tab,
[data-theme=dark] .tfx-lite-snapshot,
[data-theme=dark] .tfx-lite-grid-corner,
[data-theme=dark] .tfx-lite-grid-head,
[data-theme=dark] .tfx-lite-grid-side,
[data-theme=dark] .tfx-lite-token-chip,
[data-theme=dark] .tfx-lite-prompt-text,
[data-theme=dark] .tfx-lite-view-note {
    background-color: rgba(31, 38, 60, 0.92);
    color: #c8d3f2;
}

[data-theme=dark] .tfx-lite-token-id,
[data-theme=dark] .tfx-lite-matrix-legend,
[data-theme=dark] .tfx-lite-meta-sub {
    color: #98a6ca;
}

[data-theme=dark] .tfx-lite-tab.is-active,
[data-theme=dark] .tfx-lite-snapshot.is-active,
[data-theme=dark] .tfx-lite-token-chip.is-active,
[data-theme=dark] .tfx-lite-grid-side.is-active {
    color: #dfe7ff;
}

[data-theme=dark] .tfx-lite-context-bar-wrap,
[data-theme=dark] .tfx-lite-prob-bar-wrap {
    background: rgba(62, 74, 104, 0.78);
}

[data-theme=dark] .tfx-lite-tooltip {
    background: rgba(12, 16, 28, 0.94);
    border-color: rgba(255, 255, 255, 0.12);
}

@media screen and (max-width: 900px) {
    .tfx-lite-shell {
        padding: 1rem;
        border-radius: 22px;
    }

    .tfx-lite-top,
    .tfx-lite-main-grid {
        grid-template-columns: 1fr;
    }

    .tfx-lite-panel-head {
        flex-direction: column;
    }

    .tfx-lite-grid-corner,
    .tfx-lite-grid-head,
    .tfx-lite-grid-side,
    .tfx-lite-grid-cell {
        min-height: 52px;
    }
}




/* Transformer 文章说明卡片 */
.tfx-pro-article-note {
    margin: 1.4rem 0 2rem;
    padding: 1rem 1.1rem 1.08rem;
    border-radius: 22px;
    border: 1px solid rgba(116, 137, 232, 0.16);
    background: linear-gradient(135deg, rgba(247, 250, 255, 0.98), rgba(243, 247, 255, 0.95));
    box-shadow: 0 14px 34px rgba(112, 130, 182, 0.08);
}

.tfx-pro-article-note__title {
    margin-bottom: 0.55rem;
    color: #40506f;
    font-size: 0.94rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.tfx-pro-article-note ul {
    margin: 0;
    padding-left: 1.15rem;
    color: #627390;
    line-height: 1.8;
}

[data-theme=dark] .tfx-pro-article-note {
    background: linear-gradient(135deg, rgba(24, 30, 49, 0.92), rgba(28, 36, 57, 0.92));
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.22);
}

[data-theme=dark] .tfx-pro-article-note__title {
    color: #dbe5ff;
}

[data-theme=dark] .tfx-pro-article-note ul {
    color: #9fb0d2;
}

/* 公告卡片 */
.auto-announcement {
    color: #d7deef;
}

.auto-announcement__loading,
.auto-announcement__empty {
    padding: 0.15rem 0.05rem;
    color: #b8c3dc;
    line-height: 1.8;
}

.auto-announcement__inner {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.auto-announcement__panel {
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.auto-announcement__panel-head,
.auto-announcement__section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.auto-announcement__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0.2rem 0.68rem;
    border-radius: 999px;
    background: rgba(85, 204, 216, 0.14);
    color: #88edf6;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.auto-announcement__badge--featured {
    background: rgba(129, 140, 248, 0.16);
    color: #bac5ff;
}

.auto-announcement__panel--weather {
    padding: 1rem;
    border: 0;
    border-radius: 14px;
    color: var(--life-ink, #263445);
    background: linear-gradient(145deg, rgba(252, 251, 248, .86), rgba(241, 247, 250, .72)),
        url("/image/weather/coastal-background.webp") center 60% / cover;
    box-shadow: none;
}

[data-theme=dark] .auto-announcement__panel--weather {
    color: var(--life-ink, #f5f1e9);
    background: linear-gradient(145deg, rgba(28, 44, 60, .86), rgba(31, 47, 63, .74)),
        url("/image/weather/coastal-background.webp") center 60% / cover;
}

.auto-announcement__weather-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.auto-announcement__weather-city {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: inherit;
    font-size: .9rem;
    font-weight: 600;
    white-space: nowrap;
}

.auto-announcement__weather-city svg {
    flex: none;
    color: var(--life-muted, #657486);
}

.auto-announcement__weather-updated {
    color: var(--life-muted, #657486);
    font-size: .65rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.auto-announcement__weather-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
    margin-top: .9rem;
}

.auto-announcement__weather-temp {
    display: flex;
    align-items: flex-start;
    gap: .2rem;
    color: inherit;
    font-size: 2.85rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    letter-spacing: -.065em;
}

.auto-announcement__weather-unit {
    margin-top: .3rem;
    color: var(--life-muted, #657486);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0;
}

.auto-announcement__weather-text {
    margin-top: .45rem;
    color: var(--life-muted, #657486);
    font-size: .78rem;
    line-height: 1.5;
}

.auto-announcement__weather-icon {
    display: block;
    flex: 0 0 76px;
    width: 76px;
    height: 76px;
    overflow: visible;
}

.auto-announcement__weather-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.auto-announcement__weather-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
    margin: 1rem 0 0;
    padding-top: .7rem;
    border-top: 1px solid var(--life-line, rgba(42, 63, 80, .12));
}

.auto-announcement__weather-meta > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .35rem;
    min-width: 0;
}

.auto-announcement__weather-meta > div + div {
    padding-left: .8rem;
    border-left: 1px solid var(--life-line, rgba(42, 63, 80, .12));
}

.auto-announcement__weather-meta dt {
    color: var(--life-muted, #657486);
    font-size: .7rem;
    font-weight: 400;
}

.auto-announcement__weather-meta dd {
    margin: 0;
    color: inherit;
    font-size: .8rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.auto-announcement__weather-meta dd span {
    margin-left: .12rem;
    color: var(--life-muted, #657486);
    font-size: .65rem;
    font-weight: 400;
}

.auto-announcement__featured {
    display: block;
    text-decoration: none !important;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.auto-announcement__featured:hover {
    transform: translateY(-1px);
    border-color: rgba(140, 158, 255, 0.22);
    box-shadow: 0 14px 28px rgba(13, 20, 38, 0.16);
}

.auto-announcement__featured-title,
.auto-announcement__section-title {
    color: var(--life-ink, #eef2ff);
    font-weight: 700;
    line-height: 1.65;
}

.auto-announcement__featured-title {
    margin-top: 0.72rem;
}

.auto-announcement__section-title {
    font-size: 0.94rem;
    letter-spacing: 0.01em;
}

.auto-announcement__list {
    margin: 0.8rem 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.auto-announcement__item {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: 1.7rem minmax(0, 1fr);
    gap: 0.7rem;
    align-items: start;
    padding: 0.45rem 0;
}

.auto-announcement__item + .auto-announcement__item {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.auto-announcement__item[hidden] {
    display: none;
}

.auto-announcement__list--fit {
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: var(--life-muted, #99a6c5) transparent;
}

.auto-announcement__list--fit:focus-visible {
    outline: 2px solid var(--life-muted, #99a6c5);
    outline-offset: 3px;
}

.auto-announcement__item-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #8ce7f5;
    font-size: 0.78rem;
    font-weight: 800;
}

.auto-announcement__item a {
    color: var(--life-ink, #d5dcef) !important;
    text-decoration: none;
    line-height: 1.78;
    transition: color 0.18s ease;
}

.auto-announcement__item a:hover {
    color: var(--life-accent, #ffffff) !important;
}

.auto-announcement__meta {
    padding: 0.2rem 0.1rem 0;
    color: var(--life-muted, #99a6c5);
    font-size: 0.78rem;
}

@media screen and (max-width: 768px) {
    .auto-announcement__panel {
        padding: 0.88rem 0.9rem;
    }

    .auto-announcement__weather-main {
        align-items: center;
    }
}

/* 学术主页：首页学术化改版 */
.layout.hide-aside:has(.academic-home) {
    width: 84%;
    max-width: none;
    padding: clamp(24px, 2.2vw, 48px) 0;
}

.layout.hide-aside>#page:has(.academic-home) {
    padding: 0;
    width: 100%;
    min-width: 0;
    margin: 0 auto;
    background: transparent;
    box-shadow: none;
    border: none;
}

.layout>#page:has(.academic-home) .page-title {
    display: none;
}

.academic-home h1::before,
.academic-home h2::before,
.academic-home h3::before,
.academic-home h4::before,
.academic-home h5::before,
.academic-home h6::before {
    content: none !important;
    display: none !important;
}

.academic-home {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    color: #1f2937;
}

.academic-home a {
    color: #4f46e5;
    text-decoration: none;
}

.academic-home a:hover {
    color: #6d28d9;
}

.academic-home__hero,
.academic-home__section,
.academic-home__panel {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 28px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(10px);
}

.academic-home__hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.82fr);
    gap: 2rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, rgba(255, 251, 254, 0.98), rgba(244, 248, 255, 0.96));
    container-type: inline-size;
}

.academic-home__intro {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.academic-home__eyebrow,
.academic-home__section-heading p,
.academic-home__feature-type {
    margin: 0;
    font-size: 0.84rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #7c3aed;
    font-weight: 700;
}

.academic-home__name {
    display: flex;
    align-items: baseline;
    flex-wrap: nowrap;
    gap: 0.42em;
    margin: 0.55rem 0 1rem;
    font-size: clamp(1.72rem, 5.2cqw, 3.65rem);
    line-height: 1.08;
    color: #0f172a;
    letter-spacing: -0.03em;
}

.academic-home__name-en,
.academic-home__name-zh {
    display: inline-block;
    white-space: nowrap;
}

.academic-home__name-en {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
}

.academic-home__name-zh {
    font-family: "STXingkai", "Xingkai SC", "STKaiti", "KaiTi", "Kaiti SC", "FZKai-Z03", "DFKai-SB", serif;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: #4c1d95;
    text-shadow: 0 8px 18px rgba(124, 58, 237, 0.12);
}

.academic-home__summary,
.academic-home__summary--intro {
    margin: 0;
    font-size: 1.02rem;
}

.academic-home__summary,
.academic-home__summary--intro,
.academic-home__panel-text,
.academic-home__meta span,
.academic-home__list li,
.academic-home__fact strong,
.academic-home__timeline-body p,
.academic-home__publication p,
.academic-home__publication-authors {
    color: #475569;
    line-height: 1.85;
}

.academic-home__summary + .academic-home__summary {
    margin-top: 0.95rem;
}

.academic-home__actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.7rem;
    width: 100%;
    max-width: 100%;
    margin: 1.5rem 0 0;
}

.academic-home__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    padding: 0.78rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(255, 255, 255, 0.88);
    color: #1e293b !important;
    font-weight: 500;
    font-size: 0.96rem;
    white-space: nowrap;
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.academic-home__button:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.28);
    box-shadow: 0 12px 26px rgba(99, 102, 241, 0.12);
}

.academic-home__button--split {
    padding: 0;
    overflow: hidden;
    gap: 0;
}

.academic-home__button--split:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.28);
    box-shadow: 0 12px 26px rgba(99, 102, 241, 0.12);
}

.academic-home__button-link {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 50%;
    min-width: 0;
    padding: 0.78rem 0.9rem;
    color: inherit !important;
    text-decoration: none !important;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.academic-home__button-link + .academic-home__button-link {
    border-left: 1px solid rgba(148, 163, 184, 0.24);
}

.academic-home__button-link:hover {
    background: rgba(99, 102, 241, 0.08);
}

.academic-home__button--primary {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff !important;
    border-color: transparent;
}

.academic-home__meta {
    list-style: none;
    padding: 0;
    margin: 1.6rem 0 0;
    display: grid;
    gap: 0.95rem;
}

.academic-home__meta li {
    display: grid;
    grid-template-columns: minmax(112px, 138px) minmax(0, 1fr);
    gap: 0.8rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.14);
}


.academic-home__meta strong {
    color: #0f172a;
}

#article-container .academic-home__meta {
    margin-top: auto;
    margin-bottom: 0;
    padding-top: 1.6rem;
}

#article-container .academic-home__meta li:last-child {
    margin-bottom: 0;
}

.academic-home__profile {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.academic-home__profile img {
    width: 100%;
    max-width: 100%;
    height: auto;
    flex: none;
    margin: 0;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 28px;
    align-self: center;
    box-shadow: 0 18px 40px rgba(99, 102, 241, 0.14);
}


.academic-home__profile-card {
    flex: 1;
    padding: 1.35rem 1.4rem;
    border-radius: 22px;
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

#article-container .academic-home__profile-card h2 {
    display: flex;
    align-items: center;
    gap: 0.55em;
    padding-left: 0;
}

.academic-home__profile-card h2 svg {
    width: 1em;
    height: 1em;
    flex: none;
}

.academic-home__profile-card h2,
.academic-home__section-heading h2,
.academic-home__timeline-body h3,
.academic-home__publication h3 {
    margin: 0;
    color: #0f172a;
}

.academic-home__facts {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.academic-home__fact {
    display: grid;
    gap: 0.18rem;
    padding: 0.88rem 0.95rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.academic-home__fact span {
    font-size: 0.74rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #7c3aed;
    font-weight: 500;
}

.academic-home__section {
    padding: 2rem;
}

.academic-home__section-heading {
    padding-left: 0;
    margin-left: 0;
}

.academic-home__section-heading h2 {
    margin-top: 0.35rem;
    font-size: 1.8rem;
}

.academic-home__section-heading--compact p {
    display: none;
}

.academic-home__section-heading--compact h2 {
    margin-top: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.52rem;
    transform: translateX(-0.16rem);
}

.academic-home__section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05em;
    line-height: 1;
    transform: translateY(-1px);
}

.academic-home__timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.35rem;
}

.academic-home__timeline-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1rem;
    padding: 1.15rem 1.2rem;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.academic-home__timeline-date {
    display: inline-flex;
    align-self: start;
    justify-content: center;
    padding: 0.38rem 0.8rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.1);
    color: #4338ca;
    font-weight: 500;
    font-size: 0.86rem;
}

.academic-home__timeline-body h3 {
    font-size: 1.18rem;
    margin-bottom: 0.45rem;
}

.academic-home__timeline-item--placeholder {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(243, 244, 255, 0.92));
}

.academic-home__education-list {
    display: grid;
    gap: 0.72rem;
    margin-top: 1rem;
}

.academic-home__education-card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 0.88rem;
    align-items: center;
    padding: 0.58rem 0.88rem;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.96));
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.academic-home__education-logo-shell {
    position: relative;
    align-self: stretch;
    width: 88px;
    height: auto;
    min-height: 78px;
    border-radius: 21px;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.95), rgba(243, 244, 255, 0.88));
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.academic-home__education-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    width: 66px;
    height: 66px;
    object-fit: contain;
    object-position: center center;
    transform: translate(-50%, -50%);
}

.academic-home__education-main {
    min-width: 0;
    display: grid;
    gap: 0.2rem;
    padding: 0;
    margin: 0;
}

.academic-home__education-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 0.8rem;
    align-items: center;
    padding: 0;
    margin: 0;
}

.academic-home__education-title-row {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 0.52rem;
    flex-wrap: nowrap;
    padding: 0;
    margin: 0;
}

.academic-home__education-school {
    display: inline-block;
    margin: 0;
    padding: 0;
    color: #0f172a;
    font-size: 1.06rem;
    font-weight: 800;
    line-height: 1.18;
    white-space: nowrap;
    text-indent: 0;
    flex: 0 0 auto;
}

.academic-home__education-metrics {
    display: inline-block;
    margin: 0;
    padding: 0;
    color: #e2e8f0;
    font-size: 0.93rem;
    font-weight: 700;
    line-height: 1.18;
    white-space: nowrap;
    text-indent: 0;
    flex: 0 0 auto;
}

.academic-home__education-time {
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.32rem 0.74rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.1);
    color: #4338ca;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.academic-home__education-degree {
    display: block;
    margin: 0;
    padding: 0;
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.24;
    text-indent: 0;
}

.academic-home__publication-list {
    display: grid;
    gap: 0.86rem;
    margin-top: 1.1rem;
}

.academic-home__publication {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
    padding: 0.86rem 0.92rem;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.academic-home__publication--dense {
    margin-top: 0;
}

.academic-home__publication-figure {
    position: relative;
    overflow: hidden;
    min-height: 116px;
    border-radius: 17px;
    background: rgba(241, 245, 249, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.academic-home__publication-figure img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.academic-home__publication-venue,
.academic-home__publication-role {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0.24rem 0.72rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.academic-home__publication-venue {
    background: rgba(99, 102, 241, 0.12);
    color: #4338ca;
}

.academic-home__publication-role {
    background: rgba(148, 163, 184, 0.12);
    color: #475569;
}

.academic-home__publication-main {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 0.34rem;
    padding: 0.08rem 0;
}

.academic-home__publication-topline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.8rem;
}

.academic-home__publication-badges,
.academic-home__publication-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.academic-home__publication-title {
    margin: 0;
    padding: 0;
    color: #0f172a;
    font-size: 1.03rem;
    font-weight: 850;
    line-height: 1.28;
    text-indent: 0;
}

.academic-home__publication-authors {
    margin: 0;
    padding: 0;
    color: #475569;
    font-size: 0.96rem;
    line-height: 1.42;
    text-indent: 0;
}

.academic-home__author-me {
    color: #0f172a;
    font-weight: 850;
    text-decoration: underline;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.16em;
}

.academic-home__publication-summary {
    margin: 0;
    padding: 0;
    color: #475569;
    font-size: 0.94rem;
    line-height: 1.48;
    text-indent: 0;
}

.academic-home__publication-links {
    justify-content: flex-end;
}

.academic-home__link-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0.34rem 0.82rem;
    border-radius: 999px;
    border: 1px solid rgba(99, 102, 241, 0.18);
    background: rgba(99, 102, 241, 0.06);
    color: #4338ca !important;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.academic-home__link-pill:hover {
    transform: translateY(-1px);
    background: rgba(99, 102, 241, 0.12);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.12);
}

.academic-home__recognition-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1.25rem;
}

.academic-home__panel {
    padding: 2rem;
}

.academic-home__panel--compact {
    padding: 1.45rem;
}

.academic-home__stack {
    display: grid;
    gap: 1.2rem;
}

.academic-home__group {
    display: grid;
    gap: 0.8rem;
}

.academic-home__group-title {
    margin: 0;
    color: #1e293b;
    font-size: 1rem;
    font-weight: 700;
}

.academic-home__list {
    margin: 0;
    padding-left: 1.15rem;
}

.academic-home__list--cards {
    list-style: none;
    margin: 0;
    padding: 0;
}

.academic-home__list--cards li {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 0.9rem;
    align-items: start;
    padding: 0.9rem 0.95rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.academic-home__honors-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.72rem 0.86rem;
    margin: 1.05rem 0 0;
    padding: 0;
}

.academic-home__honors-list li {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 0.78rem;
    align-items: center;
    min-height: 76px;
    padding: 0.72rem 0.86rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.academic-home__honors-list .academic-home__list-body p {
    margin-top: 0.18rem;
    line-height: 1.38;
}

.academic-home__recognition-list {
    list-style: none;
    display: grid;
    gap: 0.5rem;
    margin: 1.05rem 0 0;
    padding: 0;
}

.academic-home__recognition-list li {
    display: grid;
    grid-template-columns: 82px minmax(220px, auto) minmax(0, 1fr);
    gap: 0.72rem;
    align-items: center;
    min-height: 54px;
    padding: 0.58rem 0.72rem;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.academic-home__recognition-list .academic-home__list-body {
    display: contents;
}

.academic-home__recognition-list .academic-home__list-body strong {
    min-width: 0;
    line-height: 1.25;
    white-space: nowrap;
}

.academic-home__recognition-list .academic-home__list-body p {
    min-width: 0;
    margin: 0;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.academic-home__list--service li {
    padding-block: 1rem;
}

.academic-home__list-year {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0.24rem 0.72rem;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.1);
    color: #6d28d9;
    font-size: 0.82rem;
    font-weight: 700;
}

.academic-home__list-body strong {
    display: block;
    color: #0f172a;
    line-height: 1.55;
}

.academic-home__list-body p {
    margin: 0.28rem 0 0;
    color: #64748b;
    line-height: 1.68;
}

.academic-home__list--tight li + li,
.academic-home__list li + li {
    margin-top: 0.7rem;
}

.academic-home__profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

.academic-home__profile-tags span {
    display: inline-flex;
    padding: 0.35rem 0.72rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.09);
    color: #4338ca;
    font-size: 0.88rem;
    font-weight: 500;
}

[data-theme=dark] .layout>#page:has(.academic-home) {
    background: transparent;
}

[data-theme=dark] .academic-home {
    color: #e2e8f0;
}

[data-theme=dark] .academic-home a {
    color: #c4b5fd;
}

[data-theme=dark] .academic-home a:hover {
    color: #ddd6fe;
}

[data-theme=dark] .academic-home__hero,
[data-theme=dark] .academic-home__section,
[data-theme=dark] .academic-home__panel,
[data-theme=dark] .academic-home__profile-card,
[data-theme=dark] .academic-home__meta li,
[data-theme=dark] .academic-home__fact,
[data-theme=dark] .academic-home__timeline-item,
[data-theme=dark] .academic-home__publication {
    background: rgba(15, 23, 42, 0.86);
    border-color: rgba(148, 163, 184, 0.14);
    box-shadow: 0 20px 44px rgba(2, 6, 23, 0.3);
}

[data-theme=dark] .academic-home__hero {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.88));
}

[data-theme=dark] .academic-home__eyebrow,
[data-theme=dark] .academic-home__section-heading p,
[data-theme=dark] .academic-home__feature-type,
[data-theme=dark] .academic-home__fact span,
[data-theme=dark] .academic-home__timeline-date {
    color: #c4b5fd;
}

[data-theme=dark] .academic-home__name,
[data-theme=dark] .academic-home__profile-card h2,
[data-theme=dark] .academic-home__section-heading h2,
[data-theme=dark] .academic-home__timeline-body h3,
[data-theme=dark] .academic-home__publication-title,
[data-theme=dark] .academic-home__author-me,
[data-theme=dark] .academic-home__meta strong {
    color: #f8fafc;
}

[data-theme=dark] .academic-home__name-zh {
    color: #e9d5ff;
}

[data-theme=dark] .academic-home__lead,
[data-theme=dark] .academic-home__summary,
[data-theme=dark] .academic-home__panel-text,
[data-theme=dark] .academic-home__meta span,
[data-theme=dark] .academic-home__list li,
[data-theme=dark] .academic-home__fact strong,
[data-theme=dark] .academic-home__timeline-body p,
[data-theme=dark] .academic-home__publication-authors,
[data-theme=dark] .academic-home__publication-summary,
[data-theme=dark] .academic-home__list-body p,
[data-theme=dark] .academic-home__education-degree,
[data-theme=dark] .academic-home__education-note {
    color: #cbd5e1;
}

[data-theme=dark] .academic-home__group-title,
[data-theme=dark] .academic-home__list-body strong,
[data-theme=dark] .academic-home__education-school,
[data-theme=dark] .academic-home__education-metrics,
[data-theme=dark] .academic-home__section-icon {
    color: #f8fafc;
}

[data-theme=dark] .academic-home__education-card,
[data-theme=dark] .academic-home__list--cards li,
[data-theme=dark] .academic-home__honors-list li,
[data-theme=dark] .academic-home__recognition-list li,
[data-theme=dark] .academic-home__timeline-item--placeholder {
    background: rgba(15, 23, 42, 0.78);
    border-color: rgba(148, 163, 184, 0.14);
    box-shadow: none;
}

[data-theme=dark] .academic-home__education-logo-shell {
    background: radial-gradient(circle at 50% 42%, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.9));
    border-color: rgba(148, 163, 184, 0.14);
}

[data-theme=dark] .academic-home__education-metrics {
    color: #f8fafc;
}

[data-theme=dark] .academic-home__education-time,
[data-theme=dark] .academic-home__publication-venue,
[data-theme=dark] .academic-home__list-year {
    background: rgba(129, 140, 248, 0.18);
    color: #ddd6fe;
}

[data-theme=dark] .academic-home__publication-role {
    background: rgba(71, 85, 105, 0.45);
    color: #cbd5e1;
}

[data-theme=dark] .academic-home__publication-figure {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(148, 163, 184, 0.16);
}

[data-theme=dark] .academic-home__link-pill {
    background: rgba(129, 140, 248, 0.14);
    border-color: rgba(129, 140, 248, 0.22);
    color: #e0e7ff !important;
}

[data-theme=dark] .academic-home__link-pill:hover {
    background: rgba(129, 140, 248, 0.22);
    box-shadow: 0 10px 20px rgba(2, 6, 23, 0.28);
}

[data-theme=dark] .academic-home__button {
    background: rgba(30, 41, 59, 0.92);
    color: #f8fafc !important;
    border-color: rgba(148, 163, 184, 0.2);
}

[data-theme=dark] .academic-home__button-link + .academic-home__button-link {
    border-left-color: rgba(148, 163, 184, 0.2);
}

[data-theme=dark] .academic-home__button-link:hover {
    background: rgba(129, 140, 248, 0.16);
}

[data-theme=dark] .academic-home__button--primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: transparent;
}

[data-theme=dark] .academic-home__profile-tags span {
    background: rgba(129, 140, 248, 0.18);
    color: #e0e7ff;
}

@container (max-width: 980px) {
    .academic-home__hero {
        grid-template-columns: minmax(0, 1.08fr) minmax(220px, 0.82fr);
        gap: 1.15rem;
    }

    .academic-home__name {
        font-size: clamp(1.48rem, 4.8cqw, 2.5rem);
        gap: 0.18em;
    }

}

@container (max-width: 860px) {
    .academic-home__hero {
        grid-template-columns: minmax(0, 1.02fr) minmax(205px, 0.84fr);
    }

    .academic-home__name {
        font-size: clamp(1.34rem, 4.45cqw, 2.12rem);
        gap: 0.14em;
    }

}

@media screen and (max-width: 1280px) {
    .academic-home__hero {
        grid-template-columns: minmax(0, 1.1fr) minmax(230px, 0.78fr);
        gap: clamp(1rem, 1.6vw, 1.35rem);
        padding: clamp(1.55rem, 2.4vw, 2rem);
    }

    .academic-home__name {
        font-size: clamp(1.52rem, 2.45vw, 2.42rem);
        gap: 0.16em;
    }

}

@media screen and (max-width: 1080px) {
    .layout.hide-aside:has(.academic-home) {
        width: 92%;
    }

    .academic-home__hero,
    .academic-home__publication {
        grid-template-columns: 1fr;
    }

    .academic-home__hero,
    .academic-home__section,
    .academic-home__panel {
        padding: 1.45rem;
    }

    .academic-home__panel--compact {
        padding: 1.2rem;
    }

    .academic-home__profile {
        max-width: 360px;
        margin: 0 auto;
    }

    .academic-home__meta li,
    .academic-home__timeline-item,
    .academic-home__list--cards li,
    .academic-home__publication,
    .academic-home__education-heading {
        grid-template-columns: 1fr;
    }

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

    .academic-home__publication-figure {
        min-height: 170px;
    }

    .academic-home__publication-topline {
        grid-template-columns: 1fr;
    }

    .academic-home__publication-links {
        justify-content: flex-start;
    }

    .academic-home__list-year,
    .academic-home__timeline-date,
    .academic-home__education-time {
        justify-self: start;
    }

    .academic-home__education-card {
        grid-template-columns: 82px minmax(0, 1fr);
    }

    .academic-home__education-logo-shell {
        width: 82px;
        min-height: 74px;
    }

    .academic-home__education-title-row {
        flex-wrap: wrap;
        row-gap: 0.14rem;
    }

    .academic-home__education-time {
        margin-top: 0.18rem;
    }
}

@media screen and (max-width: 768px) {

    .academic-home__name {
        display: block;
        font-size: 2.18rem;
        line-height: 1.12;
    }

    .academic-home__name-zh {
        display: block;
        margin-top: 0.18rem;
    }

    .academic-home__actions {
        grid-template-columns: 1fr;
    }

    .academic-home__button {
        width: 100%;
    }

    .academic-home__section-heading h2 {
        font-size: 1.58rem;
    }

    .academic-home__publication,
    .academic-home__education-card {
        padding: 0.82rem;
    }

    .academic-home__publication-figure {
        min-height: 138px;
    }

    .academic-home__honors-list li,
    .academic-home__recognition-list li {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .academic-home__publication-title {
        font-size: 0.98rem;
    }

    .academic-home__education-card {
        grid-template-columns: 1fr;
        gap: 0.62rem;
    }

    .academic-home__education-logo-shell {
        width: 72px;
        height: 72px;
        min-height: 72px;
    }

    .academic-home__education-logo {
        width: 54px;
        height: 54px;
    }
}

.gallery-page {
    display: grid;
    gap: 1.5rem;
}

.layout.hide-aside:has(.gallery-page) {
    width: min(100%, 1420px);
    max-width: none;
}

.layout.hide-aside:has(.gallery-page) > div:first-child:not(.nc) {
    padding: clamp(26px, 3vw, 42px) clamp(20px, 3vw, 34px);
}

.gallery-page__empty {
    margin: 0;
    padding: 1.25rem 1.4rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.16);
    color: #475569;
}

.gallery-archive__section {
    padding: clamp(1rem, 2vw, 1.35rem);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.07);
}

.gallery-archive__heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.gallery-archive__title {
    margin: 0;
    font-size: clamp(1.4rem, 2.8vw, 2rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
    color: #0f172a;
    font-family: Georgia, "Times New Roman", serif;
}

.gallery-archive__count {
    color: #64748b;
    font-size: 0.95rem;
    white-space: nowrap;
}

.gallery-archive__grid {
    margin-top: 0.1rem;
}

.gallery-archive__grid .gallery-container {
    margin: 0;
}

.gallery-archive__grid .gallery-items {
    min-height: 160px;
}

.gallery-archive__grid .item img {
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

[data-theme=dark] .gallery-page__empty,
[data-theme=dark] .gallery-archive__section {
    background: rgba(15, 23, 42, 0.88);
    border-color: rgba(148, 163, 184, 0.16);
}

[data-theme=dark] .gallery-page__empty,
[data-theme=dark] .gallery-archive__count {
    color: #cbd5e1;
}

[data-theme=dark] .gallery-archive__title {
    color: #f8fafc;
}

[data-theme=dark] .gallery-archive__heading {
    border-bottom-color: rgba(148, 163, 184, 0.16);
}

@media screen and (max-width: 768px) {
    .gallery-archive__section {
        padding: 0.85rem;
        border-radius: 22px;
    }

    .gallery-archive__heading {
        margin-bottom: 0.9rem;
        padding-bottom: 0.75rem;
    }

    .gallery-archive__grid .item img {
        border-radius: 14px;
    }
}

@media screen and (max-width: 480px) {
    .gallery-archive__heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.4rem;
    }
}

/* ========== 文章卡片封面左右交替显示 ========== */
/* Butterfly 主题文章卡片布局 */
.recent-post-item {
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

/* 奇数行：封面在左，内容在右（默认） */
.recent-post-item:nth-child(odd) {
    flex-direction: row;
}

/* 偶数行：封面在右，内容在左 */
.recent-post-item:nth-child(even) {
    flex-direction: row-reverse;
}

/* 封面图片样式优化 */
.recent-post-item .post_cover {
    flex: 0 0 45%;
    overflow: hidden;
}

.recent-post-item .post_cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.recent-post-item:hover .post_cover img {
    transform: scale(1.05);
}

/* 文章信息区域 */
.recent-post-item .recent-post-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.5rem 2rem;
}

/* 移动端：恢复单列布局 */
@media screen and (max-width: 768px) {
    .recent-post-item,
    .recent-post-item:nth-child(odd),
    .recent-post-item:nth-child(even) {
        flex-direction: column;
    }

    .recent-post-item .post_cover {
        flex: 0 0 auto;
        height: 200px;
    }
}


/* 正文插图：每篇文章独立编号，图片与图注共用居中轴线。 */
#article-container figure.blog-figure {
    margin: 24px 0 28px;
    text-align: center;
}

#article-container figure.blog-figure img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

#article-container figure.blog-figure figcaption {
    display: block;
    margin: 10px 0 0;
    padding: 0;
    color: var(--font-color);
    font-size: 0.9em;
    font-style: normal;
    line-height: 1.7;
    text-align: center;
    text-indent: 0;
    opacity: 1;
}

#article-container figure.blog-figure .img-alt {
    display: none;
}

#article-container figure.blog-figure > :is(.attention-inline, .network-inline, .sequence-inline) {
    margin: 0;
    text-align: left;
}

/* Technical vectors keep their original contrast in either color mode. */
#article-container figure.blog-figure img[src$=".svg"] {
    background: #fff;
    border-radius: 8px;
    padding: 12px;
    box-sizing: border-box;
    filter: none !important;
}

#article-container figure.blog-figure img[src$="/d2l/transformer.svg"] {
    width: min(100%, 520px);
    max-height: none;
}

#article-container figure.linux-latex-figure img {
    max-height: 680px;
    border-radius: 6px;
}

/* ========== 音乐悬浮球 ========== */
.bgm-floating {
    position: fixed;
    right: 24px;
    bottom: 132px;
    z-index: 110;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.96), rgba(139, 92, 246, 0.96));
    box-shadow: 0 18px 36px rgba(79, 70, 229, 0.24);
    backdrop-filter: blur(16px);
    user-select: none;
    touch-action: none;
    cursor: grab;
    --edge-translate-x: 0px;
    --edge-translate-y: 0px;
    transform: translate(var(--edge-translate-x), var(--edge-translate-y));
    transition: box-shadow 0.2s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.bgm-floating::after {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.bgm-floating.is-playing {
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.96), rgba(20, 184, 166, 0.96));
    box-shadow: 0 18px 36px rgba(13, 148, 136, 0.24);
}

.bgm-floating.is-dragging {
    cursor: grabbing;
    transition: none;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.24);
}

/* 缩入状态 */
.bgm-floating.is-edge-hidden {
    opacity: 0.65;
    box-shadow: 0 12px 28px rgba(79, 70, 229, 0.16);
}

.bgm-floating.is-edge-hidden:hover {
    opacity: 1;
    transform: translate(0, 0);
    box-shadow: 0 18px 36px rgba(79, 70, 229, 0.28);
}

.bgm-floating.is-edge-hidden .bgm-floating__details {
    transition-delay: 0.35s;
}

.bgm-floating__visualizer {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 64px;
    height: 64px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.6;
    z-index: 0;
}

.bgm-floating.is-playing .bgm-floating__visualizer {
    opacity: 1;
}

.bgm-floating__details {
    position: absolute;
    top: 50%;
    right: calc(100% + 12px);
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 0.82rem;
    max-width: 0;
    padding: 0.62rem 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid transparent;
    box-shadow: none;
    backdrop-filter: blur(14px);
    pointer-events: none;
    transition: max-width 0.28s ease, opacity 0.2s ease, padding 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.bgm-floating.is-left-side .bgm-floating__details {
    right: auto;
    left: calc(100% + 12px);
}

.bgm-floating:hover .bgm-floating__details,
.bgm-floating:focus-within .bgm-floating__details {
    max-width: 348px;
    opacity: 1;
    padding: 0.62rem 0.75rem 0.62rem 0.92rem;
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
    pointer-events: auto;
}

.bgm-floating__meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.1rem;
}

.bgm-floating__label {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5b21b6;
    font-weight: 700;
}

.bgm-floating__track {
    font-size: 0.92rem;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bgm-floating__actions {
    display: flex;
    align-items: center;
    gap: 0.42rem;
}

.bgm-floating__toggle,
.bgm-floating__sub {
    border: none;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.bgm-floating__toggle {
    position: relative;
    z-index: 1;
    width: 50px;
    height: 50px;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 12px 24px rgba(15, 23, 42, 0.24);
}

.bgm-floating__toggle.is-playing {
    background: rgba(15, 118, 110, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 12px 24px rgba(13, 148, 136, 0.24);
}

.bgm-floating__sub {
    width: 36px;
    height: 36px;
    background: rgba(15, 23, 42, 0.88);
    box-shadow: none;
}

.bgm-floating__sub:hover,
.bgm-floating__toggle:hover {
    transform: translateY(-1px) scale(1.02);
    filter: brightness(1.06);
}

[data-theme=dark] .bgm-floating {
    box-shadow: 0 18px 36px rgba(2, 6, 23, 0.34);
}

[data-theme=dark] .bgm-floating__details {
    background: rgba(15, 23, 42, 0.92);
}

[data-theme=dark] .bgm-floating:hover .bgm-floating__details,
[data-theme=dark] .bgm-floating:focus-within .bgm-floating__details {
    border-color: rgba(148, 163, 184, 0.16);
    box-shadow: 0 16px 34px rgba(2, 6, 23, 0.34);
}

[data-theme=dark] .bgm-floating__label {
    color: #ddd6fe;
}

[data-theme=dark] .bgm-floating__track {
    color: #f8fafc;
}

[data-theme=dark] .bgm-floating__toggle,
[data-theme=dark] .bgm-floating__sub {
    background: rgba(2, 6, 23, 0.84);
}

[data-theme=dark] .bgm-floating__toggle.is-playing {
    background: rgba(15, 118, 110, 0.9);
}

@media screen and (max-width: 768px) {
    .bgm-floating {
        right: 16px;
        bottom: 96px;
        width: 60px;
        height: 60px;
    }

    .bgm-floating.is-edge-hidden {
        opacity: 0.5;
    }

    .bgm-floating.is-edge-hidden:hover {
        opacity: 1;
    }

    .bgm-floating__visualizer {
        width: 52px;
        height: 52px;
    }

    .bgm-floating__details {
        max-width: none;
        opacity: 1;
        padding: 0.56rem 0.7rem 0.56rem 0.82rem;
        border-color: rgba(148, 163, 184, 0.2);
        box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
        pointer-events: auto;
        transition-delay: 0s !important;
    }

    .bgm-floating__toggle {
        width: 46px;
        height: 46px;
    }

    .bgm-floating__track {
        max-width: 92px;
    }
}


/* pyecharts 交互图嵌入容器 */
.attn-iframe-shell {
    margin: 1.8rem 0 2.2rem;
    border: 1px solid rgba(214, 51, 108, 0.12);
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 248, 252, 0.96), rgba(245, 248, 255, 0.96));
    box-shadow: 0 16px 36px rgba(214, 51, 108, 0.08);
}

.attn-iframe-shell iframe {
    display: block;
    width: 100%;
    min-height: 680px;
    border: 0;
    background: transparent;
}

.attn-iframe-shell--compact iframe {
    min-height: 620px;
}
