/* =========================================================
   NEBULA  星云  ·  emlog template
   深空暗色 / 玻璃质感 / 零外部依赖
   ========================================================= */

/* ---------- tokens ---------- */
:root {
    --accent: #7c5cff;
    --accent-2: #22d3ee;
    --accent-text: color-mix(in srgb, var(--accent) 68%, var(--tx));
    --accent-2-text: color-mix(in srgb, var(--accent-2) 62%, var(--tx));
    --accent-ink: #fff;
    --radius: 18px;
    --wrap: 1180px;
    --ease: cubic-bezier(.22, .61, .36, 1);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", "PingFang SC",
        "HarmonyOS Sans SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
    --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

:root,
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0a0b10;
    --bg-soft: #0e1018;
    --panel: rgba(255, 255, 255, .042);
    --panel-2: rgba(255, 255, 255, .07);
    --line: rgba(255, 255, 255, .09);
    --line-strong: rgba(255, 255, 255, .16);
    --tx: #e7e9f2;
    --tx-2: #a2a8bd;
    --tx-3: #6d7389;
    --code-bg: #0d1119;
    --shadow: 0 18px 48px rgba(0, 0, 0, .45);
    --head-bg: rgba(10, 11, 16, .72);
}

:root[data-theme="light"] {
    color-scheme: light;
    --bg: #f6f7fb;
    --bg-soft: #ffffff;
    --panel: rgba(255, 255, 255, .86);
    --panel-2: #ffffff;
    --line: rgba(16, 20, 40, .09);
    --line-strong: rgba(16, 20, 40, .16);
    --tx: #15171f;
    --tx-2: #545a6e;
    --tx-3: #878ea3;
    --code-bg: #f2f4f9;
    --shadow: 0 18px 44px rgba(20, 26, 50, .1);
    --head-bg: rgba(255, 255, 255, .78);
}

/* ---------- reset ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--tx);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
}

/* 背景光晕 + 噪点 */
body::before {
    content: "";
    position: fixed;
    inset: -30% -10% auto -10%;
    height: 90vh;
    background:
        radial-gradient(46% 55% at 22% 12%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
        radial-gradient(40% 50% at 82% 6%, color-mix(in srgb, var(--accent-2) 16%, transparent), transparent 70%);
    filter: blur(8px);
    pointer-events: none;
    z-index: 0;
    opacity: .9;
}

:root[data-theme="light"] body::before {
    opacity: .55;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: .028;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img {
    max-width: 100%;
    height: auto;
    border: 0;
}

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

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

ul,
ol {
    padding: 0;
    margin: 0;
    list-style: none;
}

h1,
h2,
h3,
h4,
h5 {
    margin: 0;
    font-weight: 700;
    letter-spacing: -.018em;
    line-height: 1.32;
}

p {
    margin: 0;
}

::selection {
    background: color-mix(in srgb, var(--accent) 42%, transparent);
    color: #fff;
}

:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
    outline-offset: 3px;
    border-radius: 8px;
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: 99px;
    border: 3px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--accent) 55%, var(--line-strong));
    background-clip: padding-box;
}

/* ---------- layout ---------- */
.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 28px;
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2.5px;
    width: 0;
    z-index: 100;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 65%, transparent);
    transition: width .08s linear;
}

/* ---------- header ---------- */
.site-head {
    position: sticky;
    top: 0;
    z-index: 60;
    background: var(--head-bg);
    backdrop-filter: blur(22px) saturate(170%);
    -webkit-backdrop-filter: blur(22px) saturate(170%);
    border-bottom: 1px solid var(--line);
}

.head-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 74px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    flex-shrink: 0;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: var(--accent-ink);
    background: linear-gradient(140deg, var(--accent), var(--accent-2));
    box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 38%, transparent);
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}

.brand-name {
    font-size: 16.5px;
    font-weight: 700;
    letter-spacing: -.02em;
    background: linear-gradient(100deg, var(--tx) 20%, var(--accent) 62%, var(--accent-2) 92%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.brand-desc {
    font-size: 11.5px;
    color: var(--tx-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

/* 导航：默认胶囊 */
.site-nav {
    flex: 0 1 auto;
    min-width: 0;
    margin-left: 2px;
}

.nav-list {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 5px;
    border-radius: 999px;
    background: var(--panel);
    border: 1px solid var(--line);
}

.nav-item {
    position: relative;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 17px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    color: var(--tx-2);
    transition: color .18s, background .18s;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--tx);
    background: color-mix(in srgb, var(--tx) 8%, transparent);
}

.nav-link[aria-current="page"] {
    color: var(--accent-ink);
    font-weight: 600;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 34%, transparent);
}

:root[data-theme="light"] .nav-link[aria-current="page"] {
    box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 26%, transparent);
}

.nav-link[aria-current="page"]::after {
    display: none;
}

/* 导航：极简文字（后台可切换） */
.nav-plain .nav-list {
    padding: 0;
    gap: 4px;
    background: none;
    border: 0;
}

.nav-plain .nav-link {
    padding: 7px 11px;
    border-radius: 9px;
}

.nav-plain .nav-link[aria-current="page"] {
    background: linear-gradient(100deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    box-shadow: none;
    font-weight: 700;
}

.nav-plain .nav-link:hover {
    color: var(--tx);
    background: var(--panel);
}

.nav-plain .nav-link[aria-current="page"]:hover {
    color: transparent;
}

.nav-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}

/* 下拉 */
.nav-drop {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 160px;
    padding: 6px;
    border-radius: 14px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: .2s var(--ease);
    z-index: 20;
}

.has-drop:hover .nav-drop,
.has-drop:focus-within .nav-drop {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-drop a {
    display: block;
    padding: 8px 11px;
    border-radius: 9px;
    font-size: 13.5px;
    color: var(--tx-2);
    white-space: nowrap;
}

.nav-drop a:hover {
    color: var(--tx);
    background: var(--panel);
}

.nav-drop .drop-sep {
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid var(--line);
}

/* 头部按钮区 */
.head-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
}

/* 统一顶栏圆形按钮 */
.hbtn {
    position: relative;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    color: var(--tx-2);
    transition: color .18s, background .18s, transform .12s;
}

.hbtn>svg {
    width: 21px;
    height: 21px;
}

.hbtn:hover {
    color: var(--tx);
    background: var(--panel-2);
}

.hbtn:active {
    transform: scale(.94);
}

.hbtn:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent) 62%, transparent);
    outline-offset: 2px;
}

.hbtn .ico-sun {
    display: none;
}

:root[data-theme="light"] .hbtn .ico-sun {
    display: block;
}

:root[data-theme="light"] .hbtn .ico-moon {
    display: none;
}

/* 访客：登录人头像 */
.hbtn-user:hover {
    color: var(--accent-ink);
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 30%, transparent);
}

/* 顶栏内嵌搜索框（inline 模式） */
.head-search {
    display: none;
    align-items: center;
    gap: 8px;
    width: 200px;
    height: 42px;
    padding: 0 14px;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--tx-3);
    transition: width .26s var(--ease), border-color .18s, box-shadow .18s, background .18s;
}

.head-search:focus-within {
    width: 236px;
    background: var(--bg-soft);
    border-color: color-mix(in srgb, var(--accent) 52%, transparent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}

.head-search input {
    flex: 1;
    min-width: 0;
    padding: 0;
    border: 0;
    background: none;
    outline: none;
    font-family: inherit;
    font-size: 13px;
    color: var(--tx);
    -webkit-appearance: none;
    appearance: none;
}

.head-search input::-webkit-search-cancel-button,
.head-search input::-webkit-search-decoration {
    display: none;
}

.head-search input::placeholder {
    color: var(--tx-3);
}

.search-inline .head-search {
    display: flex;
}

.search-inline #searchToggle {
    display: none;
}

/* 已登录：头像胶囊 */
.user-chip {
    position: relative;
}

.user-chip-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 12px 0 4px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--panel);
    font-size: 13px;
    color: var(--tx-2);
    transition: .18s;
}

.user-chip-btn:hover {
    color: var(--tx);
    border-color: color-mix(in srgb, var(--accent) 42%, transparent);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    max-width: 84px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-chip .caret {
    opacity: .55;
    transition: transform .18s;
}

.user-chip:hover .caret {
    transform: rotate(180deg);
}

.nav-drop-right {
    left: auto;
    right: 0;
}

/* ---------- 浮层：搜索 / 登录 ---------- */
.layer {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    justify-items: center;
    align-content: start;
    padding: 12vh 20px 28px;
    overflow-y: auto;
}

.layer[hidden] {
    display: none;
}

.layer-veil {
    position: absolute;
    inset: 0;
    background: rgba(5, 6, 12, .58);
    backdrop-filter: blur(8px) saturate(120%);
    -webkit-backdrop-filter: blur(8px) saturate(120%);
    opacity: 0;
    transition: opacity .28s var(--ease);
}

:root[data-theme="light"] .layer-veil {
    background: rgba(24, 28, 44, .42);
}

:root[data-theme="light"] .search-sheet,
:root[data-theme="light"] .auth-sheet {
    box-shadow: 0 30px 70px rgba(20, 26, 50, .22), 0 1px 0 rgba(255, 255, 255, .7) inset;
}

.layer.in .layer-veil {
    opacity: 1;
}

.search-sheet,
.auth-sheet {
    position: relative;
    z-index: 1;
    border-radius: 20px;
    background: var(--bg-soft);
    border: 1px solid var(--line-strong);
    box-shadow: 0 34px 90px rgba(0, 0, 0, .52), 0 2px 0 rgba(255, 255, 255, .04) inset;
    opacity: 0;
    transform: translateY(-16px) scale(.984);
    transition: opacity .24s var(--ease), transform .32s var(--ease);
}

.layer.in .search-sheet,
.layer.in .auth-sheet {
    opacity: 1;
    transform: none;
}

.search-sheet {
    width: min(600px, 100%);
    overflow: hidden;
}

.search-sheet-form {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 15px 15px 19px;
}

.search-sheet-form>svg {
    flex: none;
    color: var(--tx-3);
}

.search-sheet-form input {
    flex: 1;
    min-width: 0;
    padding: 7px 0;
    border: 0;
    background: none;
    outline: none;
    font: inherit;
    font-size: 16px;
    color: var(--tx);
    -webkit-appearance: none;
    appearance: none;
}

.search-sheet-form input::-webkit-search-cancel-button,
.search-sheet-form input::-webkit-search-decoration {
    display: none;
}

.search-sheet-form input::placeholder {
    color: var(--tx-3);
}

.search-sheet-go {
    flex: none;
    height: 38px;
    padding: 0 18px;
    border-radius: 11px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--accent-ink);
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 30%, transparent);
    transition: filter .18s, transform .12s;
}

.search-sheet-go:hover {
    filter: brightness(1.06) saturate(1.06);
}

.search-sheet-go:active {
    transform: scale(.97);
}

.search-sheet-foot {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 19px;
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--tx) 3%, transparent);
    font-size: 12px;
    color: var(--tx-3);
}

.search-sheet-foot kbd {
    display: inline-block;
    margin-right: 4px;
    padding: 1px 6px;
    border-radius: 5px;
    border: 1px solid var(--line);
    background: var(--panel);
    font-family: var(--mono);
    font-size: 10.5px;
    line-height: 1.6;
    color: var(--tx-2);
}

.search-sheet-tip {
    margin-left: auto;
}

/* 登录卡片 */
.auth-sheet {
    width: min(392px, 100%);
    padding: 26px 26px 24px;
}

.sheet-close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    color: var(--tx-3);
    transition: .18s;
}

.sheet-close:hover {
    color: var(--tx);
    background: var(--panel-2);
}

.auth-head {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 20px;
}

.auth-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    color: var(--accent-ink);
    flex: none;
    background: linear-gradient(140deg, var(--accent), var(--accent-2));
    box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 34%, transparent);
}

.auth-head-txt h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.01em;
}

.auth-head-txt p {
    margin: 3px 0 0;
    font-size: 12px;
    color: var(--tx-3);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.auth-field {
    display: block;
}

.auth-label {
    display: block;
    margin-bottom: 7px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--tx-2);
}

.auth-input {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 44px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--tx-3);
    transition: border-color .18s, box-shadow .18s, background .18s;
}

.auth-input:focus-within {
    background: var(--bg);
    border-color: color-mix(in srgb, var(--accent) 58%, transparent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 13%, transparent);
}

.auth-input>svg {
    flex: none;
}

.auth-input input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    background: none;
    outline: none;
    font: inherit;
    font-size: 14px;
    color: var(--tx);
}

.auth-input input::placeholder {
    color: var(--tx-3);
}

.auth-eye {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    color: var(--tx-3);
    flex: none;
}

.auth-eye:hover {
    color: var(--tx);
    background: var(--panel-2);
}

.auth-eye.on {
    color: var(--accent-text);
}

.auth-err {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: #ff6b81;
}

.auth-err:empty {
    display: none;
}

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    margin-top: 3px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-ink);
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 32%, transparent);
    transition: filter .18s, transform .12s, opacity .18s;
}

.auth-submit:hover {
    filter: brightness(1.06) saturate(1.05);
}

.auth-submit:active {
    transform: scale(.985);
}

.auth-submit.loading {
    pointer-events: none;
    opacity: .72;
}

.auth-submit svg {
    opacity: .9;
}

/* ---------- main / hero ---------- */
.main-area {
    position: relative;
    z-index: 2;
    padding-top: 34px;
    padding-bottom: 64px;
}

.main-area.has-side {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 306px;
    gap: 34px;
    align-items: start;
}

.column-main {
    min-width: 0;
}

/* ---------- 列表页头部（分类 / 标签 / 搜索 / 作者） ---------- */
.list-head {
    position: relative;
    margin: 0 0 26px;
    padding: 26px 30px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background:
        radial-gradient(120% 160% at 0% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 58%),
        var(--panel);
    overflow: hidden;
}

.list-head::after {
    content: "";
    position: absolute;
    inset: auto -40px -70px auto;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 68%);
    pointer-events: none;
}

.list-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11.5px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--tx-3);
}

.list-kicker::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.list-title {
    margin: 8px 0 0;
    font-size: 27px;
    line-height: 1.35;
    font-weight: 750;
    letter-spacing: -.01em;
    color: var(--tx);
    word-break: break-word;
}

.list-desc {
    margin: 9px 0 0;
    font-size: 13.5px;
    line-height: 1.75;
    color: var(--tx-2);
    max-width: 62ch;
}

.list-count {
    margin-top: 12px;
    font-size: 12px;
    color: var(--tx-3);
    font-variant-numeric: tabular-nums;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: 0;
    min-height: 300px;
    margin-bottom: 26px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent) 13%, transparent), transparent 58%),
        var(--panel);
    overflow: hidden;
    position: relative;
    transition: border-color .25s, transform .25s var(--ease), box-shadow .25s;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(130deg, color-mix(in srgb, var(--accent) 55%, transparent), transparent 42%, color-mix(in srgb, var(--accent-2) 45%, transparent));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: .42;
    transition: opacity .3s;
    pointer-events: none;
}

.hero:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.hero:hover::after {
    opacity: 1;
}

.hero-body {
    padding: 38px 36px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--tx-3);
    margin-bottom: 16px;
}

.dot-live {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-2);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-2) 60%, transparent);
    animation: pulse 2.4s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-2) 55%, transparent);
    }

    70% {
        box-shadow: 0 0 0 8px transparent;
    }

    100% {
        box-shadow: 0 0 0 0 transparent;
    }
}

.hero-title {
    font-size: clamp(24px, 2.6vw, 33px);
    line-height: 1.26;
    letter-spacing: -.028em;
    margin-bottom: 14px;
}

.hero-desc {
    font-size: 14.5px;
    line-height: 1.78;
    color: var(--tx-2);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-meta {
    margin-top: auto;
    padding-top: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    color: var(--tx-3);
    flex-wrap: wrap;
}

.hero-meta .sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
    opacity: .55;
}

.hero-more {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--tx);
}

.hero-more .arr {
    transition: transform .25s var(--ease);
}

.hero:hover .hero-more .arr {
    transform: translateX(5px);
}

.hero-cover {
    background-size: cover;
    background-position: center;
    position: relative;
    transition: transform .6s var(--ease);
}

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

.hero-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--bg) 0%, transparent 42%);
    opacity: .85;
}

:root[data-theme="light"] .hero-cover::before {
    background: linear-gradient(90deg, #fff 0%, transparent 45%);
}

.hero-art {
    display: grid;
    place-items: center;
    color: var(--accent-text);
    opacity: .9;
    padding: 24px;
}

.hero-art svg {
    width: 100%;
    max-width: 230px;
    height: auto;
    animation: spin 42s linear infinite;
}

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

.hero-plain .hero-body {
    padding-right: 24px;
}

/* ---------- 开屏一言：about-hero 名片版式 ---------- */
.quote-card {
    --q-a: #312e81;
    --q-b: #4c1d95;
    position: relative;
    display: flex;
    align-items: center;
    gap: 26px;
    margin-bottom: 26px;
    padding: 30px 34px;
    border-radius: calc(var(--radius) + 8px);
    border: 1px solid var(--line);
    background:
        radial-gradient(120% 160% at 0% 0%, color-mix(in srgb, var(--q-a) 24%, transparent), transparent 62%),
        radial-gradient(100% 140% at 100% 120%, color-mix(in srgb, var(--q-b) 20%, transparent), transparent 60%),
        var(--panel);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .06);
    overflow: hidden;
    isolation: isolate;
}

.quote-card[data-palette="aurora"] {
    --q-a: #0f766e;
    --q-b: #0b4f6c;
}

.quote-card[data-palette="dusk"] {
    --q-a: #9a3412;
    --q-b: #7c1d3f;
}

.quote-card[data-palette="rose"] {
    --q-a: #9d174d;
    --q-b: #5b21b6;
}

.quote-card[data-palette="graphite"] {
    --q-a: #475569;
    --q-b: #334155;
}

.quote-card[data-palette="ocean"] {
    --q-a: #0e7490;
    --q-b: #1e3a8a;
}

/* 跟随主题配色：光晕直接吃 header.php 注入的 --accent / --accent-2 */
.quote-card[data-palette="follow"] {
    --q-a: var(--accent, #7c5cff);
    --q-b: var(--accent-2, #22d3ee);
}

/* 头像环：与关于页同一套，颜色跟着一言配色走 */
.quote-card .about-ring {
    flex: none;
    width: 104px;
    height: 104px;
    background: linear-gradient(135deg, var(--q-a), var(--q-b));
    box-shadow: 0 12px 34px color-mix(in srgb, var(--q-a) 30%, transparent);
}

.quote-card .about-main {
    flex: 1;
}

/* ==================== 一言头像框动效（v1.8.5）====================
   五种预设：swing 钟摆 / orbit 卫星 / bubbles 泡泡 / merge 聚合 / pulse 涟漪。
   全部只用 transform + opacity，绝对定位不参与布局，卡片高度不受影响；
   配色只吃统一色源 --accent / --accent-2 / --card-tint。 */
.quote-card .quote-ring {
    transform-origin: 50% 50%;
}

.quote-card .qr-rotor {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.quote-card .qr-dots,
.quote-card .qr-wave {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
}

.quote-card .qr-dots {
    z-index: 2;
}

.quote-card .qr-wave {
    z-index: 1;
    border: 1px solid color-mix(in srgb, var(--accent) 48%, transparent);
    opacity: 0;
}

.quote-card .qr-dot {
    position: absolute;
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    opacity: 0;
    transform: scale(.3);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .24), 0 0 12px currentColor;
}

.quote-card .qr-dot.d1 { top: -5px; left: 50%; margin-left: -5px; background: var(--accent); color: var(--accent); }
.quote-card .qr-dot.d2 { top: 50%; right: -4px; margin-top: -4px; width: 8px; height: 8px; background: var(--accent-2); color: var(--accent-2); }
.quote-card .qr-dot.d3 { bottom: -6px; left: 50%; margin-left: -6px; width: 12px; height: 12px; background: var(--card-tint, var(--accent)); color: var(--card-tint, var(--accent)); }
.quote-card .qr-dot.d4 { top: 50%; left: -3px; margin-top: -3px; width: 6px; height: 6px; background: color-mix(in srgb, var(--accent) 58%, #fff); color: var(--accent); }
.quote-card .qr-dot.d5 { top: 12%; right: 12%; width: 7px; height: 7px; background: color-mix(in srgb, var(--accent-2) 68%, #fff); color: var(--accent-2); }

/* ---------- 关键帧 ---------- */
/* 转圈·钟摆：先整圈旋转，再围绕终点做衰减摆动，最后自然停住 */
@keyframes qrSwing {
    0%   { transform: rotate(0deg) scale(1); }
    7%   { transform: rotate(11deg) scale(1.03); }
    34%  { transform: rotate(360deg) scale(1.03); }
    46%  { transform: rotate(343deg) scale(1); }
    58%  { transform: rotate(372deg); }
    70%  { transform: rotate(351deg); }
    81%  { transform: rotate(366deg); }
    91%  { transform: rotate(356deg); }
    100% { transform: rotate(360deg); }
}

@keyframes qrBreathe {
    0%, 100% { transform: scale(1); }
    45%      { transform: scale(1.045); }
}

@keyframes qrAbsorb {
    0%, 62%  { transform: scale(1); }
    76%      { transform: scale(1.07); }
    100%     { transform: scale(1); }
}

@keyframes qrOrbitSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* 反向绕环：分裂 / 聚合时球群沿环走一段弧线，始终贴着头像 */
@keyframes qrOrbitRev {
    from { transform: rotate(0deg); }
    to   { transform: rotate(-190deg); }
}

@keyframes qrPop {
    0%   { opacity: 0; transform: scale(.25); }
    16%  { opacity: .92; transform: scale(1); }
    76%  { opacity: .92; transform: scale(1); }
    100% { opacity: 0; transform: scale(.5); }
}

/* 沿环弹出一点再收回：球始终在环缘附近，不飞到卡片边角 */
@keyframes qrSplit {
    0%   { opacity: 0; transform: translate(0, 0) scale(.25); }
    24%  { opacity: .95; transform: translate(var(--dx), var(--dy)) scale(1); }
    62%  { opacity: .9; transform: translate(calc(var(--dx) * .6), calc(var(--dy) * .6)) scale(.92); }
    100% { opacity: 0; transform: translate(0, 0) scale(.3); }
}

@keyframes qrMerge {
    0%   { opacity: 0; transform: translate(var(--ox), var(--oy)) scale(1.15); }
    14%  { opacity: .9; }
    72%  { opacity: .9; transform: translate(calc(var(--ox) * .16), calc(var(--oy) * .16)) scale(.9); }
    100% { opacity: 0; transform: translate(0, 0) scale(.1); }
}

@keyframes qrRipple {
    0%   { opacity: .7; transform: scale(.94); }
    100% { opacity: 0; transform: scale(1.55); }
}

@keyframes qrTrack {
    0%, 100% { opacity: 0; }
    25%, 72% { opacity: .35; }
}

@keyframes qrIdleSwing {
    0%, 100% { transform: rotate(-3.5deg); }
    50%      { transform: rotate(3.5deg); }
}

@keyframes qrIdlePop {
    0%, 100% { opacity: .48; transform: scale(.82); }
    50%      { opacity: .85; transform: scale(1.08); }
}

/* ==================== 第一层：转圈 · 钟摆 ====================
   由独立开关 quoteRingSpin 控制，与小球预设完全无关。
   换一句、点「换一句」按钮、鼠标悬停都会重新触发一次。 */
.quote-ring.is-spinning {
    animation: qrSwing 2.9s ease-in-out both;
}

.quote-ring.is-spinning::after {
    content: "";
    position: absolute;
    inset: -3px;
    z-index: 1;
    border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent);
    border-radius: 50%;
    pointer-events: none;
    animation: qrRipple 1.5s ease-out .1s both;
}

/* ==================== 第二层：小球预设 ====================
   四种效果都让球贴着头像环运动，像球球大作战里绕着主体转的小球。 */

/* orbit：卫星环绕（默认，最贴题） */
.quote-ring.is-balling[data-fx="orbit"] .qr-rotor {
    animation: qrBreathe 2.5s ease-in-out both;
}

.quote-ring.is-balling[data-fx="orbit"] .qr-dots {
    animation: qrOrbitSpin 2.5s cubic-bezier(.22, .7, .25, 1) both;
}

.quote-ring.is-balling[data-fx="orbit"] .qr-wave {
    inset: -9px;
    border-style: dashed;
    animation: qrTrack 2.5s ease-out both;
}

.quote-ring.is-balling[data-fx="orbit"] .qr-dot {
    animation: qrPop 2.3s ease-out both;
}

.quote-ring.is-balling[data-fx="orbit"] .qr-dot.d1 { animation-delay: 0s; }
.quote-ring.is-balling[data-fx="orbit"] .qr-dot.d2 { animation-delay: .12s; }
.quote-ring.is-balling[data-fx="orbit"] .qr-dot.d3 { animation-delay: .24s; }
.quote-ring.is-balling[data-fx="orbit"] .qr-dot.d4 { animation-delay: .36s; }

/* bubbles：球群反向绕半圈，同时每颗球沿环缘弹出一点再收回 */
.quote-ring.is-balling[data-fx="bubbles"] .qr-rotor {
    animation: qrBreathe 2.3s ease-in-out both;
}

.quote-ring.is-balling[data-fx="bubbles"] .qr-dots {
    animation: qrOrbitRev 2.3s cubic-bezier(.3, .7, .3, 1) both;
}

.quote-ring.is-balling[data-fx="bubbles"] .qr-wave {
    inset: -9px;
    border-style: dashed;
    animation: qrTrack 2.3s ease-out both;
}

.quote-ring.is-balling[data-fx="bubbles"] .qr-dot {
    width: 11px;
    height: 11px;
    margin: 0;
    animation: qrSplit 2.2s ease-out both;
}

.quote-ring.is-balling[data-fx="bubbles"] .qr-dot.d1 { top: -6px; left: 14%; right: auto; bottom: auto; --dx: -9px; --dy: -8px; animation-delay: 0s; }
.quote-ring.is-balling[data-fx="bubbles"] .qr-dot.d2 { top: -6px; left: 76%; right: auto; bottom: auto; width: 9px; height: 9px; --dx: 9px; --dy: -8px; animation-delay: .14s; }
.quote-ring.is-balling[data-fx="bubbles"] .qr-dot.d3 { top: auto; left: 18%; right: auto; bottom: -6px; width: 12px; height: 12px; --dx: -8px; --dy: 9px; animation-delay: .28s; }
.quote-ring.is-balling[data-fx="bubbles"] .qr-dot.d4 { top: auto; left: 72%; right: auto; bottom: -6px; width: 8px; height: 8px; --dx: 8px; --dy: 9px; animation-delay: .4s; }
.quote-ring.is-balling[data-fx="bubbles"] .qr-dot.d5 { top: -12px; left: 48%; right: auto; bottom: auto; width: 9px; height: 9px; --dx: 0px; --dy: -10px; animation-delay: .52s; }

/* merge：环外小球沿弧线被吸进环心，距离收紧到环缘附近 */
.quote-ring.is-balling[data-fx="merge"] .qr-rotor {
    animation: qrAbsorb 1.9s ease-in-out both;
}

.quote-ring.is-balling[data-fx="merge"] .qr-dots {
    animation: qrOrbitRev 1.9s ease-in-out both;
}

.quote-ring.is-balling[data-fx="merge"] .qr-dot {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    margin: -5px 0 0 -5px;
    animation: qrMerge 1.7s cubic-bezier(.4, 0, .2, 1) both;
}

.quote-ring.is-balling[data-fx="merge"] .qr-dot.d1 { --ox: -48px; --oy: -34px; animation-delay: 0s; }
.quote-ring.is-balling[data-fx="merge"] .qr-dot.d2 { --ox: 48px; --oy: -30px; animation-delay: .1s; }
.quote-ring.is-balling[data-fx="merge"] .qr-dot.d3 { --ox: -44px; --oy: 38px; animation-delay: .2s; }
.quote-ring.is-balling[data-fx="merge"] .qr-dot.d4 { --ox: 46px; --oy: 40px; animation-delay: .3s; }
.quote-ring.is-balling[data-fx="merge"] .qr-dot.d5 { --ox: 2px; --oy: -52px; animation-delay: .4s; }

/* pulse：三层柔光圈扩散 + 一颗流光绕环 */
.quote-ring.is-balling[data-fx="pulse"] .qr-wave,
.quote-ring.is-balling[data-fx="pulse"] .qr-wave::before,
.quote-ring.is-balling[data-fx="pulse"] .qr-wave::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent);
    animation: qrRipple 2.2s ease-out both;
}

.quote-ring.is-balling[data-fx="pulse"] .qr-wave::before {
    border-color: color-mix(in srgb, var(--accent-2) 55%, transparent);
    animation-delay: .38s;
}

.quote-ring.is-balling[data-fx="pulse"] .qr-wave::after {
    border-color: color-mix(in srgb, var(--card-tint, var(--accent)) 50%, transparent);
    animation-delay: .76s;
}

.quote-ring.is-balling[data-fx="pulse"] .qr-dots {
    animation: qrOrbitSpin 2.2s ease-in-out both;
}

.quote-ring.is-balling[data-fx="pulse"] .qr-dot.d1 {
    animation: qrPop 2.2s ease-out both;
}

/* ==================== 持续循环模式 ====================
   转圈开关开着 → 环缓慢钟摆；关着但有小球 → 环轻微呼吸。
   小球一律慢速绕环公转，两层互不抢 animation 属性。 */
.quote-ring.is-loop[data-spin="1"]:not(.is-spinning) {
    animation: qrIdleSwing 5.2s ease-in-out infinite;
}

.quote-ring.is-loop[data-spin="0"]:not(.is-balling):not([data-fx="none"]):not([data-fx="pulse"]) {
    animation: qrBreathe 5.5s ease-in-out infinite;
}

.quote-ring.is-loop:not(.is-balling):not([data-fx="none"]):not([data-fx="pulse"]) .qr-dots {
    animation: qrOrbitSpin 11s linear infinite;
}

.quote-ring.is-loop:not(.is-balling):not([data-fx="none"]):not([data-fx="pulse"]) .qr-wave {
    inset: -9px;
    border-style: dashed;
    opacity: .18;
}

.quote-ring.is-loop:not(.is-balling):not([data-fx="none"]):not([data-fx="pulse"]) .qr-dot {
    animation: qrIdlePop 5.5s ease-in-out infinite;
}

.quote-ring.is-loop:not(.is-balling):not([data-fx="none"]):not([data-fx="pulse"]) .qr-dot.d2 { animation-delay: .5s; }
.quote-ring.is-loop:not(.is-balling):not([data-fx="none"]):not([data-fx="pulse"]) .qr-dot.d3 { animation-delay: 1s; }
.quote-ring.is-loop:not(.is-balling):not([data-fx="none"]):not([data-fx="pulse"]) .qr-dot.d4 { animation-delay: 1.5s; }

.quote-ring.is-loop:not(.is-balling)[data-fx="pulse"] .qr-wave {
    animation: qrRipple 3.4s ease-out infinite;
    opacity: 0;
}

.quote-ring.is-loop:not(.is-balling)[data-fx="pulse"] .qr-wave::before {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--accent-2) 55%, transparent);
    animation: qrRipple 3.4s ease-out 1.7s infinite;
}

/* ---------- 系统「减少动态效果」：全部静止 ---------- */
@media (prefers-reduced-motion: reduce) {
    .quote-ring.is-spinning,
    .quote-ring.is-spinning::after,
    .quote-ring.is-balling,
    .quote-ring.is-balling .qr-rotor,
    .quote-ring.is-loop,
    .quote-ring .qr-dots,
    .quote-ring .qr-dot,
    .quote-ring .qr-wave,
    .quote-ring .qr-wave::before,
    .quote-ring .qr-wave::after {
        animation: none !important;
    }

    .quote-ring .qr-dot,
    .quote-ring .qr-wave {
        opacity: 0 !important;
    }
}

@media (max-width: 420px) {
    .quote-card .qr-dot { width: 7px; height: 7px; }
    .quote-card .qr-dot.d3 { width: 9px; height: 9px; }
    .quote-card .qr-wave { inset: -3px; }
}

.quote-card .about-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
}

/* 右上角缓慢漂移的光团，卡片看起来是「活的」 */
.quote-card::before {
    content: "";
    position: absolute;
    top: -250px;
    right: -150px;
    width: 580px;
    height: 580px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--q-b) 26%, transparent), transparent 62%);
    animation: quoteDrift 21s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes quoteDrift {
    from {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: .7;
    }

    to {
        transform: translate3d(-72px, 54px, 0) scale(1.16);
        opacity: 1;
    }
}

/* 巨型引号水印已移除：留白更干净，卡片靠头像环 + 双色光晕立层次 */

.quote-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: .14;
    background-size: cover;
    background-position: center;
}

/* 噪点只负责质感；底色与双色光晕在 .quote-card 上 */
.quote-veil {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
    background-blend-mode: overlay;
}

/* 旧版 .quote-body 的内层布局已改为 about-hero 结构，这些规则留作兼容占位 */
.quote-body {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.quote-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .08em;
    color: var(--tx-2);
}

/* 声波条：像正在说话 */
.quote-wave {
    display: inline-flex;
    align-items: center;
    gap: 2.5px;
    height: 13px;
}

.quote-wave i {
    display: block;
    width: 2px;
    height: 5px;
    border-radius: 2px;
    background: var(--tx);
    opacity: .72;
    animation: quoteWave 1.15s ease-in-out infinite;
}

.quote-wave i:nth-child(2) {
    animation-delay: .14s;
}

.quote-wave i:nth-child(3) {
    animation-delay: .28s;
}

.quote-wave i:nth-child(4) {
    animation-delay: .42s;
}

@keyframes quoteWave {

    0%,
    100% {
        height: 5px;
        opacity: .55;
    }

    50% {
        height: 13px;
        opacity: 1;
    }
}

.quote-typed {
    transition: opacity .2s var(--ease);
}

/* ---------- 开屏一言：出场效果的公共零件 ---------- */

/* 拼音打字：已上屏的汉字 + 一个跟着光标走的拼音编辑区 */
.quote-text.is-ime>.quote-caret {
    display: none;   /* 编辑区自带光标，别出现两根 */
}

.quote-typed .qw {
    display: inline-block;
    white-space: pre;
    animation: qwLand .18s var(--ease) both;
}

.quote-typed .qw.is-wrong {
    color: #e5484d;
    animation: qwLand .18s var(--ease) both, qcShake .3s ease .18s;
}

@keyframes qwLand {
    from {
        opacity: .45;
        transform: translateY(-.12em);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.quote-typed .qime {
    display: inline-block;
    min-width: .5em;
    padding: 0 2px 3px;
    border-bottom: 2px solid color-mix(in srgb, var(--tx) 70%, transparent);
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: .64em;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: .035em;
    color: var(--tx);
    white-space: nowrap;
    vertical-align: .08em;
}

.quote-typed .qime.is-idle {
    min-width: 0;
    padding-left: 0;
    padding-right: 0;
    border-bottom-color: transparent;
}

.quote-typed .qpy,
.quote-typed .qcaret {
    user-select: none;
    -webkit-user-select: none;
}

.quote-typed .qcaret {
    display: inline-block;
    width: 2px;
    height: 1.6em;
    margin-left: 1px;
    vertical-align: -.32em;
    border-radius: 1px;
    background: var(--tx);
    box-shadow: 0 0 6px color-mix(in srgb, var(--tx) 35%, transparent);
    animation: quoteCaret 1.06s steps(1, end) infinite;
}

@keyframes qcShake {

    0%,
    100% {
        transform: translateX(0);
    }

    28% {
        transform: translateX(-1.4px);
    }

    62% {
        transform: translateX(1.1px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .quote-typed .qcaret {
        animation: none;
    }
}

/* 逐字浮现 */
.quote-typed .qi {
    display: inline-block;
    opacity: 0;
    transform: translateY(.44em) scale(.96);
    filter: blur(1.5px);
    transition: opacity .32s var(--ease), transform .42s var(--ease), filter .3s var(--ease);
}

.quote-typed .qi.is-in {
    opacity: 1;
    transform: none;
    filter: none;
}

/* 聚光扫读 */
.quote-typed .qs {
    display: inline-block;
    color: color-mix(in srgb, var(--tx) 18%, transparent);
    transition: color .55s var(--ease);
}

.quote-typed .qs.is-lit {
    color: var(--tx);
}

@media (prefers-reduced-motion: reduce) {

    .quote-typed .qi,
    .quote-typed .qs,
    .quote-typed .qw,
    .quote-typed .qcaret {
        transition: none;
        animation: none;
    }

}

/* 句子放在 about-title 的位置，字号收敛一点，长句不撑爆名片 */
.quote-card .quote-text {
    max-width: 44ch;
    margin: 2px 0 0;
    min-height: 3.2em;
    min-height: calc(2lh + 6px);   /* 与 JS 高度锁一致，首屏不跳 */
    font-size: clamp(19px, 2.05vw, 26px);
    font-weight: 650;
    line-height: 1.5;
    letter-spacing: -.02em;
    color: var(--tx);
    text-shadow: none;
}

.quote-caret {
    display: inline-block;
    width: 2px;
    height: 1.02em;
    margin-left: 4px;
    vertical-align: -.14em;
    border-radius: 1px;
    background: var(--tx);
    animation: quoteCaret 1.06s steps(1, end) infinite;
}

@keyframes quoteCaret {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

/* 出处：不预留空行；一行放不下就整行不显示，别为偶发长文本牺牲常态 */
.quote-card .quote-bio {
    min-height: 0;
}

.quote-card .quote-bio.is-empty {
    display: none;
}

.quote-card .quote-from {
    display: block;
    min-width: 0;
    max-width: 100%;
    font-size: 13px;
    line-height: 1.7;
    color: var(--tx-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quote-card .quote-stats {
    align-items: center;
    margin-top: 14px;
}

.quote-card .quote-action {
    padding: 0;
    border: 0;
    background: none;
}

.quote-card .quote-next {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 13px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg-soft) 55%, transparent);
    color: var(--tx);
    font: inherit;
    font-size: 12.5px;
    cursor: pointer;
    transition: background .18s, border-color .18s, transform .16s;
}

.quote-card .quote-next:hover {
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
}

.quote-card .quote-next:active {
    transform: scale(.96);
}

.quote-card .quote-next:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.quote-next svg {
    width: 13px;
    height: 13px;
}

.quote-next[hidden] {
    display: none;
}

.quote-next.is-loading svg {
    animation: spin 1s linear infinite;
}

@media (max-width: 760px) {
    .quote-card {
        gap: 18px;
        padding: 24px 22px 20px;
    }

    .quote-card .about-ring {
        width: 76px;
        height: 76px;
    }

    .quote-card .quote-text {
        font-size: 19px;
    }

    .quote-card .about-eyebrow {
        margin-bottom: 6px;
    }
}

@media (max-width: 420px) {
    .quote-card {
        gap: 13px;
        padding: 20px 15px 18px;
        align-items: flex-start;
    }

    .quote-card .about-ring {
        width: 58px;
        height: 58px;
        margin-top: 2px;
    }

    .quote-card .quote-text {
        font-size: 17px;
        line-height: 1.58;
        min-height: 4.8em;
        min-height: calc(3lh + 6px);   /* 窄屏 31 字常到 3 行，一并预留 */
    }

    .quote-card .about-stats {
        justify-content: flex-start;
        gap: 7px;
        margin-top: 12px;
    }

    .quote-card .about-stats li {
        padding: 5px 9px;
        border: 1px solid var(--line);
        background: color-mix(in srgb, var(--bg-soft) 55%, transparent);
        font-size: 11px;
    }

    .quote-card .about-stats li+li::before {
        display: none;
    }

    .quote-card .about-stats li.quote-action {
        flex-basis: 100%;
        padding: 0;
        border: 0;
        background: none;
    }

    .quote-card .quote-next {
        height: 30px;
        padding: 0 12px;
        font-size: 11.5px;
    }
}

/* ---------- post grid ---------- */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(292px, 1fr));
    gap: 20px;
}

.post-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background:
        radial-gradient(120% 95% at 100% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 62%),
        linear-gradient(155deg, color-mix(in srgb, var(--card-tint, var(--accent)) 8%, transparent), transparent 58%),
        var(--panel);
    overflow: hidden;
    position: relative;
    transition: transform .28s var(--ease), border-color .28s, box-shadow .28s, background .28s;
}

.post-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1.5px;
    background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent);
    opacity: 0;
    transition: opacity .3s;
}

.post-card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
    box-shadow: 0 20px 40px -18px color-mix(in srgb, var(--accent) 55%, transparent);
    background:
        radial-gradient(120% 95% at 100% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 62%),
        linear-gradient(155deg, color-mix(in srgb, var(--card-tint, var(--accent)) 15%, transparent), transparent 58%),
        var(--panel-2);
}

.post-card:hover::before {
    opacity: 1;
}

.card-cover {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--panel-2);
    position: relative;
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .55s var(--ease);
}

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

.card-body {
    position: relative;
    padding: 20px 22px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.card-top {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 11px;
    min-height: 21px;
    flex-wrap: wrap;
}

.chip {
    display: inline-flex;
    align-items: center;
    height: 21px;
    padding: 0 9px;
    font-size: 11.5px;
    font-weight: 500;
    border-radius: 7px;
    border: 1px solid var(--line);
    color: var(--tx-2);
    background: var(--panel-2);
    transition: .18s;
    white-space: nowrap;
}

a.chip:hover {
    color: var(--tx);
    border-color: var(--line-strong);
}

.chip-sort {
    color: color-mix(in srgb, var(--accent) 82%, var(--tx));
    border-color: color-mix(in srgb, var(--accent) 30%, transparent);
    background: color-mix(in srgb, var(--accent) 13%, transparent);
}

.chip-top {
    color: var(--accent-ink);
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-color: transparent;
}

.card-title {
    font-size: 17px;
    line-height: 1.45;
    letter-spacing: -.015em;
    margin-bottom: 10px;
}

.card-title a {
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0 1px;
    background-repeat: no-repeat;
    background-position: 0 100%;
    transition: background-size .3s var(--ease);
}

.post-card:hover .card-title a {
    background-size: 100% 1px;
}

/* 整卡可点：标题链接拉伸出一层透明伪元素铺满卡片，任意空白处点击都进文章页 */
.card-title a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: var(--radius);
}

/* 卡片内的其它链接抬到覆盖层之上，各自保持独立可点 */
.card-top a,
.card-desc a,
.card-foot a,
.card-cover {
    position: relative;
    z-index: 2;
}

.card-title a:focus-visible::after {
    outline: 2px solid var(--accent);
    outline-offset: -4px;
    border-radius: var(--radius);
}

.card-desc {
    font-size: 13.5px;
    line-height: 1.72;
    color: var(--tx-2);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-foot {
    margin-top: auto;
    padding-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--tx-3);
    font-variant-numeric: tabular-nums;
}

.card-stats {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.card-stats .sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
    opacity: .5;
}

/* 右上角安静的直角括号：与微语的「时间线 + 圆点 + 头像」明确区分 */
.card-body::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 30px;
    border-top: 1px solid color-mix(in srgb, var(--accent) 42%, transparent);
    border-right: 1px solid color-mix(in srgb, var(--accent-2) 34%, transparent);
    border-top-right-radius: var(--radius);
    pointer-events: none;
    transition: border-color .28s;
}

.post-card:hover .card-body::before {
    border-top-color: color-mix(in srgb, var(--accent) 62%, transparent);
    border-right-color: color-mix(in srgb, var(--accent-2) 52%, transparent);
}

/* ---------- pager ---------- */
.pager {
    margin-top: 34px;
    display: flex;
    justify-content: center;
}

.pager .pagination,
.pager [class*="page"] {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.pager a,
.pager span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 13px;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: var(--panel);
    font-size: 13.5px;
    color: var(--tx-2);
    transition: .18s;
    font-variant-numeric: tabular-nums;
}

.pager a:hover {
    color: var(--tx);
    border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
    transform: translateY(-1px);
}

.pager .current,
.pager span.current {
    color: var(--accent-ink);
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-color: transparent;
    font-weight: 600;
}

/* ---------- empty ---------- */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    color: var(--tx-2);
}

.empty-mark {
    font-size: 52px;
    font-weight: 800;
    letter-spacing: -.05em;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 12px;
}

.empty-mark span {
    font-size: 24px;
    vertical-align: super;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    padding: 10px 20px;
    border-radius: 11px;
    border: 1px solid var(--line);
    font-size: 13.5px;
    color: var(--tx-2);
    transition: .18s;
}

.btn-ghost:hover {
    color: var(--tx);
    border-color: var(--line-strong);
}

/* ---------- sidebar ---------- */
.column-side {
    position: sticky;
    top: 86px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.widget {
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--panel);
    padding: 18px 20px 20px;
    transition: border-color .25s;
}

.widget:hover {
    border-color: var(--line-strong);
}

.widget-title {
    margin: 0 0 13px;
}

.widget-title h3,
.widget-title .h {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--tx-3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-title h3::before {
    content: "";
    width: 3px;
    height: 12px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.unstyle-li {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-list li,
.widget .unstyle-li>li {
    font-size: 13.5px;
    color: var(--tx-2);
    border-radius: 8px;
    transition: color .16s;
}

.widget .unstyle-li>li+li {
    margin-top: 2px;
}

.widget .unstyle-li>li>a {
    display: block;
    padding: 6px 0;
    color: var(--tx-2);
    transition: color .16s, padding-left .2s var(--ease);
    overflow: hidden;
    text-overflow: ellipsis;
}

.widget .unstyle-li>li>a:hover {
    color: var(--accent-text);
    padding-left: 4px;
}

/* 博客信息 */
.bloggerinfo {
    text-align: center;
    padding: 6px 0 2px;
}

.bloggerinfo-img {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--line-strong);
    padding: 2px;
    box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 25%, transparent);
}

.bloginfo-name {
    margin-top: 11px;
    font-size: 15px;
}

.bloginfo-descript {
    margin-top: 5px;
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--tx-3);
}

/* 标签云 */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    line-height: 1 !important;
}

.tag-container span {
    line-height: 1 !important;
}

.tags-side {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    font-size: 12px !important;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--panel-2);
    color: var(--tx-2) !important;
    transition: .18s;
}

.tags-side:hover {
    color: var(--accent-ink) !important;
    border-color: transparent;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    transform: translateY(-1px);
}

/* 分类 */
.log-classify-f>li>a {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.log-classify-c {
    padding-left: 14px;
    margin-top: 2px;
}

.log-classify-c>li>a {
    font-size: 12.5px;
    color: var(--tx-3);
    padding: 4px 0;
}

/* 评论 / 微语列表（限定在侧栏，避免与评论表单的 #comment-info 撞名） */
.side-comment-list > li.comment-info,
.side-twitter-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    column-gap: 9px;
    row-gap: 5px;
    align-items: center;
}

.side-comment-list > li.comment-info:last-child,
.side-twitter-item:last-child {
    border-bottom: 0;
}

.comment-info_img {
    grid-column: 1;
    grid-row: 1;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0;
}

.comm-lates-name {
    grid-column: 2;
    grid-row: 1;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--tx);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logcom-latest-time {
    grid-column: 3;
    grid-row: 1;
    font-size: 11px;
    color: var(--tx-3);
    float: none;
    margin: 0;
    white-space: nowrap;
}

.side-comment-list > li.comment-info > a {
    grid-column: 2 / -1;
    grid-row: 2;
    font-size: 12.5px;
    line-height: 1.62;
    color: var(--tx-2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    text-align: left;
}

.side-twitter-content {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--tx-2);
    word-break: break-word;
}

.side-comment-list > li.comment-info br,
.side-comment-list > li.comment-info hr,
.side-twitter-item br,
.side-twitter-item hr {
    display: none;
}

/* 侧栏带封面的列表 */
.side-cover-image {
    position: relative;
    height: 76px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    margin: 4px 0;
}

.side-cover-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, .78));
}

.side-title-container {
    position: absolute;
    left: 11px;
    right: 11px;
    bottom: 9px;
    z-index: 1;
}

.side-title-container a {
    color: #fff;
    font-size: 12.5px;
    line-height: 1.4;
    padding: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 搜索 / 归档 */
.widget form {
    display: flex;
    gap: 8px;
}

.widget .search {
    flex: 1;
    min-width: 0;
    padding: 9px 12px;
    font-size: 13px;
    font-family: inherit;
    color: var(--tx);
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    outline: none;
    transition: .18s;
}

.widget .search:focus {
    border-color: color-mix(in srgb, var(--accent) 60%, transparent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}

.widget input[type=submit] {
    padding: 0 14px;
    font-size: 13px;
    color: var(--accent-ink);
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border: 0;
    border-radius: 10px;
    cursor: pointer;
}

.widget .archive,
.widget select {
    width: 100%;
    padding: 9px 12px;
    font-size: 13px;
    font-family: inherit;
    color: var(--tx);
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    outline: none;
}

/* 日历 */
#calendar {
    font-size: 12.5px;
}

#calendar table {
    width: 100%;
    border-collapse: collapse;
    caption-side: top;
}

#calendar caption {
    padding-bottom: 8px;
    font-size: 12.5px;
    color: var(--tx-2);
    text-align: center;
    font-weight: 600;
}

#calendar th {
    padding: 5px 0;
    font-weight: 500;
    color: var(--tx-3);
    font-size: 11.5px;
}

#calendar td {
    padding: 4px 0;
    text-align: center;
}

#calendar td a {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    color: var(--accent-text);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    font-weight: 600;
}

#calendar a {
    cursor: pointer;
}

/* ---------- article ---------- */
.article-wrap {
    position: relative;
    z-index: 2;
    padding-top: 30px;
    padding-bottom: 70px;
}

.article-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 232px;
    gap: 46px;
    align-items: start;
}

.article-grid:not(:has(.article-aside:not([hidden]))) {
    grid-template-columns: minmax(0, 1fr);
    max-width: 780px;
    margin: 0 auto;
}

/* :has() 的降级：不支持 :has 的内核由 JS 加 .no-aside（TOC 渲染后再摘掉） */
.article-grid.no-aside {
    grid-template-columns: minmax(0, 1fr);
    max-width: 780px;
    margin: 0 auto;
}

.article {
    min-width: 0;
}

.crumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--tx-3);
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.crumbs a {
    color: var(--tx-3);
    transition: color .16s;
}

.crumbs a:hover {
    color: var(--accent-text);
}

.crumb-sep {
    opacity: .45;
}

.crumb-here {
    color: var(--tx-2);
}

.article-head {
    margin-bottom: 28px;
}

.article-title {
    font-size: clamp(26px, 3.4vw, 40px);
    line-height: 1.24;
    letter-spacing: -.032em;
    text-wrap: balance;
}

.article-title .chip {
    vertical-align: middle;
    margin-right: 10px;
    font-size: 11px;
    transform: translateY(-3px);
}

.article-meta {
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 11px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: var(--tx-3);
    font-variant-numeric: tabular-nums;
}

.article-meta a {
    color: var(--tx-2);
    font-weight: 500;
}

.article-meta a:hover {
    color: var(--accent-text);
}

.am-sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
    opacity: .5;
}

.am-edit {
    margin-left: auto;
}

.am-edit a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    font-size: 12px;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.article-cover {
    margin: 0 0 34px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--panel);
}

.article-cover img {
    display: block;
    width: 100%;
    max-height: 420px;
    object-fit: cover;
}

/* ---------- 正文排版 ---------- */
.prose {
    font-size: 16.5px;
    line-height: 1.92;
    color: var(--tx);
    letter-spacing: .002em;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.prose>*+* {
    margin-top: 4px;
}

.prose p {
    margin: 0 0 1.35em;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
    margin: 2em 0 .72em;
    line-height: 1.38;
    letter-spacing: -.02em;
    scroll-margin-top: 90px;
}

.prose h1 {
    font-size: 1.72em;
}

.prose h2 {
    font-size: 1.42em;
    padding-left: 15px;
    position: relative;
}

.prose h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: .16em;
    bottom: .16em;
    width: 3.5px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.prose h3 {
    font-size: 1.2em;
}

.prose h4 {
    font-size: 1.06em;
    color: var(--tx-2);
}

.prose a:not(.chip):not(.tags) {
    color: var(--accent-text);
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: text-decoration-color .2s, color .2s;
}

.prose a:not(.chip):not(.tags):hover {
    color: var(--accent-2-text);
    text-decoration-color: currentColor;
}

.prose strong,
.prose b {
    font-weight: 650;
}

.prose em {
    color: var(--tx-2);
}

.prose mark {
    padding: 2px 4px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--accent) 26%, transparent);
    color: inherit;
}

.prose ul,
.prose ol {
    margin: 0 0 1.35em;
    padding-left: 1.35em;
}

.prose ul {
    list-style: none;
}

.prose ul>li {
    position: relative;
    margin: .42em 0;
}

.prose ul>li::before {
    content: "";
    position: absolute;
    left: -1.05em;
    top: .78em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.prose ul ul>li::before {
    border-radius: 1px;
    opacity: .7;
}

.prose ol {
    list-style: decimal;
}

.prose ol>li {
    margin: .42em 0;
    padding-left: .2em;
}

.prose ol>li::marker {
    color: var(--accent-text);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.prose li>ul,
.prose li>ol {
    margin: .4em 0 .2em;
}

.prose blockquote {
    margin: 1.6em 0;
    padding: 16px 22px;
    border-radius: 4px 14px 14px 4px;
    border-left: 3px solid transparent;
    border-image: linear-gradient(180deg, var(--accent), var(--accent-2)) 1;
    background: color-mix(in srgb, var(--accent) 7%, transparent);
    color: var(--tx-2);
    font-size: .97em;
}

.prose blockquote p:last-child {
    margin-bottom: 0;
}

.prose blockquote::before {
    content: "";
}

.prose hr {
    margin: 2.4em 0;
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.prose img {
    border-radius: 12px;
    display: block;
    margin: 1.5em auto;
    border: 1px solid var(--line);
}

.prose img[data-zoomable] {
    cursor: zoom-in;
    transition: transform .3s var(--ease), box-shadow .3s;
}

.prose img[data-zoomable]:hover {
    box-shadow: 0 16px 40px rgba(0, 0, 0, .3);
}

/* 行内代码 */
.prose code {
    font-family: var(--mono);
    font-size: .875em;
    padding: .16em .44em;
    border-radius: 6px;
    background: color-mix(in srgb, var(--accent) 12%, var(--panel-2));
    color: color-mix(in srgb, var(--accent) 68%, var(--tx));
    border: 1px solid var(--line);
    word-break: break-word;
}

/* 代码块 */
.prose pre,
.code-block pre {
    margin: 1.5em 0;
    padding: 18px 20px;
    border-radius: 14px;
    background: var(--code-bg);
    border: 1px solid var(--line);
    overflow-x: auto;
    font-size: 13.5px;
    line-height: 1.75;
    tab-size: 4;
    position: relative;
}

.prose pre code {
    display: block;
    padding: 0;
    background: none;
    border: 0;
    color: var(--tx);
    font-size: inherit;
    white-space: pre;
    word-break: normal;
}

.code-block {
    position: relative;
    margin: 1.5em 0;
}

.code-block pre {
    margin: 0;
}

.code-copy {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    font-size: 11.5px;
    font-family: var(--font);
    color: var(--tx-3);
    border-radius: 7px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 70%, transparent);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: .2s;
}

.code-block:hover .code-copy {
    opacity: 1;
}

.code-copy:hover {
    color: var(--tx);
    border-color: var(--line-strong);
}

.code-copy.done {
    color: #34d399;
    border-color: color-mix(in srgb, #34d399 45%, transparent);
}

/* 代码块：横向滚动进度条（自绘，长行可拖动） */
.code-block pre {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.code-block pre::-webkit-scrollbar {
    height: 0;
    width: 0;
    display: none;
}

.code-block.is-hscroll pre {
    padding-right: 46px;
    padding-bottom: 30px;
}

.code-block.is-hscroll::after {
    content: "";
    position: absolute;
    top: 1px;
    right: 1px;
    bottom: 1px;
    width: 42px;
    border-radius: 0 14px 14px 0;
    background: linear-gradient(90deg, transparent, var(--code-bg) 72%);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}

.code-block.is-hscroll::after {
    opacity: .85;
}

.code-scroller {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 9px;
    height: 7px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--tx) 9%, transparent);
    opacity: 0;
    transition: opacity .22s, background .18s;
    cursor: grab;
    touch-action: none;
}

.code-scroller.on {
    opacity: .9;
}

.code-scroller:hover {
    background: color-mix(in srgb, var(--tx) 16%, transparent);
}

.code-scroller.dragging {
    cursor: grabbing;
    opacity: 1;
}

.code-thumb {
    position: absolute;
    top: -1.5px;
    left: 0;
    width: 20%;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 45%, transparent);
    transition: left .05s linear, width .05s linear;
}

.code-scroller.dragging .code-thumb {
    box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 68%, transparent);
}

/* 表格 */
.prose table {
    width: 100%;
    margin: 1.6em 0;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}

.prose thead th {
    padding: 11px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--tx-2);
    background: var(--panel-2);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.prose tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
    color: var(--tx-2);
}

.prose tbody tr:last-child td {
    border-bottom: 0;
}

.prose tbody tr:hover td {
    background: color-mix(in srgb, var(--accent) 5%, transparent);
}

/* 文章标签 */
.article-tags {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.article-tags .chip,
.article-tags .tags {
    height: 26px;
    padding: 0 12px;
    font-size: 12px;
}

/* 上下篇 */
.neighbor {
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.neighbor .prev-log,
.neighbor .next-log {
    display: block;
}

.neighbor .next-log {
    grid-column: 2;
    text-align: right;
}

.neighbor-link {
    display: block;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--panel);
    transition: .22s var(--ease);
    height: 100%;
}

.neighbor-link:hover {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
    background: var(--panel-2);
    transform: translateY(-2px);
}

.neighbor-dir {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: var(--tx-3);
    letter-spacing: .05em;
    margin-bottom: 6px;
}

.neighbor .next-log .neighbor-dir {
    justify-content: flex-end;
}

.neighbor-title {
    display: block;
    font-size: 13.8px;
    line-height: 1.5;
    color: var(--tx);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- TOC ---------- */
.article-aside {
    position: sticky;
    top: 88px;
    min-width: 0;
}

.toc-card {
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--panel);
    padding: 16px 16px 14px;
}

.toc-title {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--tx-3);
    margin-bottom: 11px;
}

.toc {
    display: flex;
    flex-direction: column;
    gap: 1px;
    max-height: 44vh;
    overflow-y: auto;
    scrollbar-width: thin;
    margin-right: -6px;
    padding-right: 6px;
}

.toc a {
    font-size: 12.8px;
    line-height: 1.5;
    color: var(--tx-3);
    padding: 5px 9px;
    border-radius: 7px;
    border-left: 2px solid transparent;
    transition: .16s;
    display: block;
}

.toc a.lv-3 {
    padding-left: 20px;
    font-size: 12.2px;
}

.toc a:hover {
    color: var(--tx-2);
    background: var(--panel-2);
}

.toc a.active {
    color: var(--accent-text);
    border-left-color: var(--accent-text);
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    font-weight: 500;
}

.toc-progress {
    margin-top: 13px;
    height: 3px;
    border-radius: 3px;
    background: var(--line);
    overflow: hidden;
}

.toc-progress-bar {
    height: 100%;
    width: 0;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: width .1s linear;
}

.toc-hint {
    margin-top: 8px;
    font-size: 11px;
    color: var(--tx-3);
    font-variant-numeric: tabular-nums;
}

/* ---------- comments ---------- */
.comments-area {
    margin-top: 46px;
}

.comment-header {
    margin-bottom: 18px;
    font-size: 13px;
    color: var(--tx-2);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.comment-header b {
    font-weight: 600;
}

.comment {
    display: flex;
    gap: 13px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    position: relative;
}

.comment:last-of-type {
    border-bottom: 0;
}

.comment .avatar img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--line);
}

.comment-infos {
    flex: 1;
    min-width: 0;
}

.comment-infos b,
.comment-infos b a {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--tx);
}

.comment-time {
    margin-left: 9px;
    font-size: 11.5px;
    color: var(--tx-3);
    font-variant-numeric: tabular-nums;
}

.comment-content {
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.78;
    color: var(--tx-2);
    word-break: break-word;
}

.comment-content a {
    color: var(--accent-text);
}

.comment-reply {
    margin-top: 4px;
}

.com-reply {
    font-size: 12px;
    color: var(--tx-3);
    padding: 3px 9px;
    border-radius: 7px;
    border: 1px solid var(--line);
    transition: .16s;
}

.com-reply:hover {
    color: var(--accent-text);
    border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.comment-children {
    margin-top: 10px;
    padding: 12px 0 0;
    border-top: 1px dashed var(--line);
    border-bottom: 0;
}

.comment-children .avatar img {
    width: 30px;
    height: 30px;
}

.comment .arrow {
    display: none;
}

/* 评论表单 */
.comment-post {
    margin-bottom: 30px;
}

.commentform {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.log_comment {
    width: 100%;
    min-height: 108px;
    padding: 14px 16px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.7;
    color: var(--tx);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    resize: vertical;
    transition: .2s;
}

.log_comment:focus {
    border-color: color-mix(in srgb, var(--accent) 62%, transparent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}

/* 评论表单：昵称 / 邮箱 / 主页 自动等分（#comment-info 是表单行，不是侧栏列表） */
#comment-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.com_control {
    width: 100%;
    padding: 10px 13px;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--tx);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 11px;
    outline: none;
    transition: .18s;
}

.com_control:focus {
    border-color: color-mix(in srgb, var(--accent) 62%, transparent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}

.captcha-container {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-container img {
    border-radius: 8px;
}

.com_submit_p {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--tx-3);
}

.com_submit_p a {
    color: var(--accent-text);
}

.commentform .btn {
    padding: 10px 24px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--accent-ink);
    border: 0;
    border-radius: 11px;
    cursor: pointer;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    transition: .2s;
}

.commentform .btn:hover {
    filter: brightness(1.09);
    transform: translateY(-1px);
}

.commentform .cancel-reply {
    display: none;
    color: var(--tx-2);
    background: var(--panel);
    border: 1px solid var(--line);
}

.commentform .cancel-reply.show {
    display: inline-block;
}

#pagenavi {
    margin-top: 20px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 13px;
}

#pagenavi a,
#pagenavi span {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--line);
    color: var(--tx-2);
}

#pagenavi span {
    color: var(--accent-ink);
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-color: transparent;
}

/* ---------- page ---------- */
.page-wrap {
    position: relative;
    z-index: 2;
    max-width: 780px;
    padding-top: 46px;
    padding-bottom: 70px;
}

.page-title {
    font-size: clamp(26px, 3.2vw, 36px);
    letter-spacing: -.03em;
    margin-bottom: 26px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

/* ---------- about page ---------- */
.page-wrap-about {
    max-width: 860px;
}

.about-hero {
    position: relative;
    display: flex;
    align-items: center;
    gap: 26px;
    margin-bottom: 34px;
    padding: 30px 32px;
    border-radius: calc(var(--radius) + 8px);
    border: 1px solid var(--line);
    background:
        radial-gradient(120% 160% at 0% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 62%),
        radial-gradient(100% 140% at 100% 120%, color-mix(in srgb, var(--accent-2) 12%, transparent), transparent 60%),
        var(--panel);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.about-hero::after {
    content: "";
    position: absolute;
    inset: -60% -20% auto auto;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent) 26%, transparent), transparent 68%);
    filter: blur(6px);
    pointer-events: none;
}

.about-ring {
    position: relative;
    z-index: 1;
    flex: none;
    width: 108px;
    height: 108px;
    padding: 3px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 12px 34px color-mix(in srgb, var(--accent) 34%, transparent);
}

.about-ring img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-soft);
}

.about-main {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.about-eyebrow {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .22em;
    color: color-mix(in srgb, var(--accent) 78%, var(--tx-2));
}

.about-title {
    margin: 0;
    font-size: clamp(25px, 3vw, 33px);
    line-height: 1.2;
    letter-spacing: -.03em;
}

.about-bio {
    margin: 9px 0 0;
    font-size: 14px;
    line-height: 1.7;
    color: var(--tx-2);
    max-width: 46em;
}

.about-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.about-stats li {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg-soft) 55%, transparent);
    font-size: 12px;
    color: var(--tx-3);
}

.about-stats b {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--tx);
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.about-prose {
    padding: 4px 2px 0;
}

/* 微语时间线 */
.notes-block {
    margin-top: 48px;
    padding-top: 30px;
    border-top: 1px solid var(--line);
}

.block-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 20px;
}

.block-title {
    position: relative;
    margin: 0;
    padding-left: 14px;
    font-size: 19px;
    letter-spacing: -.02em;
}

.block-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.block-hint {
    font-size: 12.5px;
    color: var(--tx-3);
}

.notes-timeline {
    position: relative;
    margin: 0;
    padding: 0 0 0 30px;
    list-style: none;
}

.notes-timeline::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 8px;
    bottom: 20px;
    width: 1px;
    background: linear-gradient(180deg, var(--line-strong), transparent);
}

.note-item {
    position: relative;
    margin-bottom: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--panel);
    transition: border-color .2s, transform .2s, background .2s;
}

.note-item:hover {
    border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
    background: var(--panel-2);
}

.note-dot {
    position: absolute;
    left: -26px;
    top: 20px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}

.note-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.note-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-soft);
}

.note-author {
    font-size: 13px;
    font-weight: 600;
    color: var(--tx);
}

.note-time {
    margin-left: auto;
    font-size: 12px;
    color: var(--tx-3);
}

.note-text {
    font-size: 14.2px;
    line-height: 1.78;
    color: var(--tx-2);
}

.note-text p {
    margin: 0 0 8px;
}

.note-text :last-child {
    margin-bottom: 0;
}

.note-text a {
    color: var(--accent-text);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.note-text img {
    max-width: 100%;
    border-radius: 10px;
}

.note-shot {
    display: block;
    margin-top: 10px;
}

.note-shot img {
    display: block;
    max-width: 100%;
    max-height: 320px;
    border-radius: 12px;
    border: 1px solid var(--line);
}

/* ---------- footer ---------- */
.site-foot {
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--accent) 4%, transparent));
    padding: 40px 0 46px;
}

.foot-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    flex-wrap: wrap;
}

.foot-brand .brand-name {
    font-size: 15px;
}

.foot-desc {
    margin-top: 7px;
    font-size: 12.5px;
    color: var(--tx-3);
    max-width: 320px;
    line-height: 1.65;
}

.foot-meta {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12.5px;
    color: var(--tx-3);
    flex-wrap: wrap;
}

.foot-meta a {
    color: var(--tx-2);
    transition: color .16s;
}

.foot-meta a:hover {
    color: var(--accent-text);
}

.foot-dot {
    opacity: .4;
}

/* 页脚右侧：社交图标 + 版权 */
.foot-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 13px;
}

.foot-social {
    display: flex;
    align-items: center;
    gap: 8px;
}

.foot-social a {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--tx-2);
    transition: color .18s, border-color .18s, background .18s, transform .18s;
}

.foot-social a:hover {
    color: var(--accent-text);
    border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
    background: var(--panel-2);
    transform: translateY(-2px);
}

/* 文章：分享条 */
.article-share {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 26px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) * .8);
    background: var(--panel);
    flex-wrap: wrap;
}

.share-label {
    margin-right: 2px;
    font-size: 12px;
    letter-spacing: .06em;
    color: var(--tx-3);
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: var(--panel-2);
    color: var(--tx-2);
    font-size: 12.5px;
    cursor: pointer;
    transition: color .18s, border-color .18s, background .18s;
}

.share-btn:hover {
    color: var(--tx);
    border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
}

.share-btn.done {
    color: #34d399;
    border-color: color-mix(in srgb, #34d399 45%, transparent);
}

/* 文章：版权声明 */
.article-copyright {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    padding: 13px 16px;
    border-radius: calc(var(--radius) * .8);
    border: 1px dashed color-mix(in srgb, var(--accent) 26%, var(--line));
    background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.cp-mark {
    flex: none;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    font-size: 12px;
    color: var(--accent-ink);
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.article-copyright p {
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--tx-2);
}

/* 文章：相关文章 */
.related-block {
    margin-top: 34px;
}

.related-title {
    margin-bottom: 13px;
    padding-left: 11px;
    font-size: 15px;
    letter-spacing: -.01em;
    border-left: 3px solid var(--accent);
    line-height: 1.2;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
    gap: 12px;
}

.related-card {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px;
    border-radius: calc(var(--radius) * .7);
    border: 1px solid var(--line);
    background: var(--panel);
    transition: transform .22s var(--ease), border-color .22s, background .22s;
}

.related-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
    background: var(--panel-2);
}

.related-thumb {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 9px;
    background-size: cover;
    background-position: center;
    background-color: var(--panel-2);
}

.related-thumb-plain {
    display: grid;
    place-items: center;
    color: var(--tx-3);
    border: 1px solid var(--line);
}

.related-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.related-name {
    font-size: 13px;
    line-height: 1.5;
    color: var(--tx);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-meta {
    font-size: 11.5px;
    color: var(--tx-3);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
    .foot-right {
        width: 100%;
        align-items: flex-start;
    }

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

    .share-btn span {
        display: none;
    }

    .share-btn {
        padding: 0 10px;
    }
}

/* 返回顶部 */
.to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 50;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 17px;
    color: var(--tx-2);
    background: var(--head-bg);
    border: 1px solid var(--line);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: .26s var(--ease);
}

.to-top>svg {
    width: 23px;
    height: 23px;
}

.to-top::after {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 12px;
    background: radial-gradient(120% 120% at 50% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%);
    opacity: 0;
    transition: opacity .2s;
    pointer-events: none;
}

.to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.to-top:hover {
    color: var(--accent-ink);
    border-color: transparent;
    background: linear-gradient(140deg, var(--accent), var(--accent-2));
    box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 40%, transparent);
}

.to-top:hover::after {
    opacity: 1;
}

/* 灯箱 */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 4vmin;
    background: rgba(4, 5, 9, .9);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: .25s;
}

.lightbox.open {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 94vw;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
    transform: scale(.97);
    transition: transform .3s var(--ease);
}

.lightbox.open img {
    transform: scale(1);
}

.lb-close {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 40px;
    height: 40px;
    font-size: 26px;
    line-height: 1;
    color: #fff;
    border-radius: 12px;
    background: rgba(255, 255, 255, .1);
}

/* 滚动淡入 */
[data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .55s var(--ease), transform .55s var(--ease);
}

[data-reveal].in {
    opacity: 1;
    transform: none;
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
    .article-grid {
        grid-template-columns: minmax(0, 1fr) 210px;
        gap: 32px;
    }

    .main-area.has-side {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 26px;
    }

    .head-search {
        width: 152px;
    }

    .head-search:focus-within {
        width: 196px;
    }

    .nav-link {
        padding: 8px 13px;
    }
}

@media (max-width: 900px) {
    /* 空间不够时：搜索框收成图标 */
    .search-inline .head-search {
        display: none;
    }

    .search-inline #searchToggle {
        display: grid;
    }

    .brand-desc {
        display: none;
    }

    .main-area.has-side {
        grid-template-columns: minmax(0, 1fr);
    }

    .column-side {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 14px;
        margin-top: 34px;
    }

    .article-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .article-aside {
        display: none !important;
    }

    .hero {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
    }

    /* 窄屏空间不够，圆环装饰直接收掉（背景式摆放位置怎么调都别扭，不如不要） */
    .hero-art {
        display: none;
    }

    .hero-cover {
        height: 180px;
        order: -1;
    }

    .hero-cover::before {
        background: linear-gradient(0deg, var(--bg) 2%, transparent 60%);
    }
}

@media (max-width: 760px) {
    .wrap {
        padding: 0 18px;
    }

    .list-head {
        padding: 20px 20px 18px;
        margin-bottom: 20px;
    }

    .list-title {
        font-size: 22px;
    }

    .head-inner {
        height: auto;
        min-height: 64px;
        padding-top: 11px;
        padding-bottom: 11px;
        row-gap: 11px;
        flex-wrap: wrap;
    }

    .brand {
        order: 1;
    }

    .head-actions {
        order: 2;
    }

    .brand-desc {
        display: none;
    }

    /* ---------- 横向滑动导航（替代抽屉，永不遮挡内容） ---------- */
    .site-nav {
        order: 3;
        flex: 1 0 100%;
        width: calc(100% + 36px);
        margin: 0 -18px;
        min-width: 0;
    }

    .nav-list {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        padding: 0 18px 2px;
        border: 0;
        background: none;
        border-radius: 0;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .nav-list::-webkit-scrollbar {
        display: none;
    }

    .nav-item {
        flex: none;
    }

    .nav-link {
        padding: 8px 15px;
        border-radius: 999px;
        border: 1px solid var(--line);
        background: var(--panel);
        font-size: 13.5px;
        color: var(--tx-2);
        white-space: nowrap;
    }

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

    .nav-link:hover {
        color: var(--tx);
        background: var(--panel-2);
    }

    .nav-link[aria-current="page"] {
        color: var(--accent-ink);
        font-weight: 600;
        border-color: transparent;
        background: linear-gradient(135deg, var(--accent), var(--accent-2));
        box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 30%, transparent);
    }

    .nav-plain .nav-list {
        padding: 0 18px 2px;
        gap: 8px;
        background: none;
    }

    .nav-plain .nav-link {
        padding: 8px 15px;
        border-radius: 999px;
        border: 1px solid var(--line);
        background: var(--panel);
    }

    .nav-plain .nav-link[aria-current="page"] {
        color: var(--accent-ink);
        background: linear-gradient(135deg, var(--accent), var(--accent-2));
        -webkit-background-clip: border-box;
        background-clip: border-box;
        border-color: transparent;
    }

    /* 二级菜单在窄屏直接收起，父级链接本身可点 */
    .nav-drop {
        display: none;
    }

    .hero-body {
        padding: 26px 22px;
    }

    .hero-title {
        font-size: 23px;
    }

    .hero-meta {
        padding-top: 18px;
        font-size: 12px;
    }

    .hero-more {
        display: none;
    }

    .post-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .card-cover {
        aspect-ratio: 2 / 1;
    }

    .main-area {
        padding-top: 24px;
        padding-bottom: 46px;
    }

    .article-title {
        font-size: 25px;
    }

    .prose {
        font-size: 16px;
        line-height: 1.88;
    }

    .prose h2 {
        font-size: 1.3em;
    }

    .article-meta {
        font-size: 12px;
        gap: 9px;
    }

    .am-edit {
        margin-left: 0;
    }

    .neighbor {
        grid-template-columns: minmax(0, 1fr);
    }

    .neighbor .next-log {
        grid-column: auto;
        text-align: left;
    }

    .neighbor .next-log .neighbor-dir {
        justify-content: flex-start;
    }

    #comment-info {
        grid-template-columns: minmax(0, 1fr);
    }

    .to-top {
        right: 16px;
        bottom: 18px;
        width: 50px;
        height: 50px;
        border-radius: 15px;
    }

    .column-side {
        grid-template-columns: minmax(0, 1fr);
    }

    .foot-inner {
        flex-direction: column;
        gap: 16px;
    }
}

/* 小屏：登录按钮收成图标胶囊，保证不挤压品牌 */
@media (max-width: 640px) {
    .about-hero {
        align-items: flex-start;
        gap: 16px;
        padding: 22px 20px;
        border-radius: calc(var(--radius) + 4px);
    }

    .about-ring {
        width: 76px;
        height: 76px;
    }

    .about-eyebrow {
        margin-bottom: 4px;
        font-size: 10px;
        letter-spacing: .18em;
    }

    .about-bio {
        margin-top: 7px;
        font-size: 13.5px;
    }

    .about-stats {
        gap: 0;
        margin-top: 12px;
    }

    .about-stats li {
        padding: 0;
        border: 0;
        background: none;
    }

    .about-stats li+li::before {
        content: "·";
        margin: 0 8px;
        color: var(--line-strong);
        font-weight: 700;
    }

    .notes-block {
        margin-top: 36px;
        padding-top: 24px;
    }

    .notes-timeline {
        padding-left: 22px;
    }

    .note-dot {
        left: -18px;
    }

    .note-item {
        padding: 12px 13px;
    }

    .note-text {
        font-size: 13.8px;
    }
}

/* 小屏：名片改成上下结构，数据一条排开，避免「· 5 条评论」被挤到第二行 */
@media (max-width: 400px) {
    .about-hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 24px 18px;
    }

    .about-ring {
        width: 84px;
        height: 84px;
    }

    .about-bio {
        max-width: none;
    }

    .about-stats {
        justify-content: center;
    }
}

@media (max-width: 520px) {
    .head-inner {
        gap: 8px;
        padding-top: 9px;
        padding-bottom: 9px;
        row-gap: 9px;
    }

    .head-actions {
        gap: 2px;
    }

    .hbtn {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .hbtn>svg {
        width: 19px;
        height: 19px;
    }

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

    .brand-name {
        font-size: 15.5px;
    }

    .user-name,
    .user-chip .caret {
        display: none;
    }

    .user-chip-btn {
        padding: 0 4px;
    }

    .layer {
        padding: 8vh 14px 22px;
    }

    .auth-sheet {
        padding: 22px 18px 20px;
    }

    .search-sheet-form {
        padding: 12px 12px 12px 15px;
        gap: 9px;
    }

    .search-sheet-go {
        padding: 0 14px;
    }

    .search-sheet-tip {
        display: none;
    }
}


@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }
}

/* 打印 */
@media print {

    .site-head,
    .site-foot,
    .article-aside,
    .to-top,
    .pop-layer,
    .quote-card,
    .scroll-progress,
    .comments-area,
    .neighbor,
    body::before,
    body::after {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    .article-wrap {
        padding: 0;
    }
}

/* ---------- 弹窗公告（首页 / 文章页共用） ---------- */
.pop-sheet {
    position: relative;
    z-index: 1;
    width: min(432px, 100%);
    max-height: 86vh;
    overflow-y: auto;
    border-radius: 22px;
    background: var(--bg-soft);
    border: 1px solid var(--line-strong);
    box-shadow: 0 34px 90px rgba(0, 0, 0, .52), 0 2px 0 rgba(255, 255, 255, .04) inset;
    opacity: 0;
    transform: translateY(-16px) scale(.984);
    transition: opacity .24s var(--ease), transform .32s var(--ease);
}

.layer.in .pop-sheet {
    opacity: 1;
    transform: none;
}

:root[data-theme="light"] .pop-sheet {
    box-shadow: 0 30px 70px rgba(20, 26, 50, .22), 0 1px 0 rgba(255, 255, 255, .7) inset;
}

.pop-media {
    position: relative;
    line-height: 0;
}

.pop-media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.pop-media::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 48px;
    background: linear-gradient(to top, var(--bg-soft), transparent);
    pointer-events: none;
}

/* 浅色主题下卡片是纯白，渐隐会变成一条白带 —— 直接不要，让图片干净收边 */
:root[data-theme="light"] .pop-media::after {
    display: none;
}

/* 关闭按钮要压住配图：.pop-media 是 position:relative，DOM 里排在按钮后面，
   不给 z-index 会把按钮盖掉 */
.pop-sheet>.sheet-close {
    z-index: 3;
}

/* 有配图时关闭按钮压在图上看不清，加个深色底 */
.pop-sheet.has-media>.sheet-close {
    color: #fff;
    background: rgba(10, 11, 16, .46);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.pop-sheet.has-media>.sheet-close:hover {
    color: #fff;
    background: rgba(10, 11, 16, .66);
}

.pop-body {
    padding: 26px 26px 26px;
}

.pop-media+.pop-body {
    padding-top: 18px;
}

.pop-title {
    margin: 0 0 10px;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.36;
    letter-spacing: -.01em;
    color: var(--tx);
}

.pop-content {
    font-size: 14.5px;
    line-height: 1.78;
    color: var(--tx-2);
    overflow-wrap: anywhere;
}

.pop-content p {
    margin: 0 0 .7em;
}

.pop-content p:last-child,
.pop-content ul:last-child,
.pop-content ol:last-child {
    margin-bottom: 0;
}

.pop-content a {
    color: var(--accent-2-text);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pop-content b,
.pop-content strong {
    color: var(--tx);
}

.pop-content ul,
.pop-content ol {
    margin: .35em 0 .8em;
    padding-left: 1.35em;
}

.pop-content ul {
    list-style: disc;
}

.pop-content ol {
    list-style: decimal;
}

.pop-content ul ul {
    list-style: circle;
    margin: .3em 0;
}

.pop-content li {
    margin: .25em 0;
    padding-left: .12em;
}

.pop-content li::marker {
    color: var(--accent-2-text);
}

.pop-content img {
    max-width: 100%;
    height: auto;
    border-radius: 11px;
}

.pop-content code {
    padding: 1px 5px;
    border-radius: 5px;
    background: var(--panel-2);
    font-family: var(--mono);
    font-size: .92em;
    color: var(--tx);
}

.pop-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 44px;
    margin-top: 18px;
    border: 0;
    border-radius: 12px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-ink);
    cursor: pointer;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 30%, transparent);
    transition: filter .18s, transform .12s;
}

.pop-btn:hover {
    filter: brightness(1.06) saturate(1.05);
}

.pop-btn:active {
    transform: scale(.985);
}

.pop-btn:focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 2px;
}

/* 角落卡片：不压暗、不锁滚动，读者可以边看边关 */
.layer.pop-corner {
    justify-items: end;
    align-content: end;
    padding: 0 22px 22px;
    overflow: visible;
    pointer-events: none;
}

.layer.pop-corner .layer-veil {
    display: none;
}

.layer.pop-corner .pop-sheet {
    pointer-events: auto;
    width: min(344px, 100%);
    max-height: 72vh;
    border-radius: 18px;
    transform: translateY(26px) scale(.97);
}

.layer.pop-corner.in .pop-sheet {
    transform: none;
}

.layer.pop-corner .pop-body {
    padding: 20px 20px 20px;
}

.layer.pop-corner .pop-title {
    font-size: 16.5px;
}

.layer.pop-corner .pop-content {
    font-size: 13.5px;
    line-height: 1.72;
}

.layer.pop-corner .pop-btn {
    height: 40px;
    margin-top: 14px;
    font-size: 13.5px;
}

@media (max-width: 520px) {
    .pop-sheet {
        width: 100%;
        max-height: 84vh;
        border-radius: 18px;
    }

    .pop-body {
        padding: 20px 20px 20px;
    }

    .pop-title {
        font-size: 17.5px;
    }

    .layer.pop-corner {
        padding: 0 12px 12px;
    }

    .layer.pop-corner .pop-sheet {
        width: 100%;
    }
}
