:root {
    --color-paper: #f5efe4;
    --color-paper-soft: #f8f3e8;
    --color-paper-warm: #ece4d3;
    --color-ink: #1a1715;
    --color-ink-soft: #3d3733;
    --color-ink-muted: #7a726a;
    --color-accent: #b04a2f;
    --color-accent-soft: #c9765a;
    --color-line: rgba(26, 23, 21, 0.12);
    --shadow-soft: 0 1px 2px rgba(26, 23, 21, 0.04), 0 8px 24px rgba(26, 23, 21, 0.06);
    --shadow-paper: 0 2px 4px rgba(26, 23, 21, 0.06), 0 20px 40px -12px rgba(26, 23, 21, 0.12);
    --font-display: 'Fraunces', 'Noto Serif SC', Georgia, serif;
    --font-body: 'Noto Serif SC', 'Fraunces', Georgia, serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--color-paper);
    color: var(--color-ink);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-image:
        radial-gradient(ellipse at top, rgba(176, 74, 47, 0.04), transparent 60%),
        radial-gradient(ellipse at bottom, rgba(26, 23, 21, 0.03), transparent 70%);
}

/* ===== Custom scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-paper-warm);
}

::-webkit-scrollbar-thumb {
    background: var(--color-accent-soft);
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

/* ===== Reading progress bar ===== */
.progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-soft));
    z-index: 100;
    transition: width 0.1s linear;
    box-shadow: 0 1px 8px rgba(176, 74, 47, 0.4);
}

/* ===== Layout ===== */
.shell {
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* ===== Header / Hero ===== */
header {
    width: 100%;
    height: min(700px, 100vh);
    overflow: hidden;
    position: relative;
}

.img {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: url(../source/main.png) top center / cover no-repeat;
    transform-origin: top center;
}

/* 暖色暗角 + 颗粒覆盖，让 GIF 更像「画面」而不是「素材」 */
.img::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(26, 23, 21, 0.15) 0%, transparent 35%, rgba(26, 23, 21, 0.45) 100%),
        radial-gradient(ellipse at center, transparent 50%, rgba(26, 23, 21, 0.35) 100%);
    z-index: 1;
}

.img::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
    opacity: 0.12;
    mix-blend-mode: overlay;
    z-index: 2;
    pointer-events: none;
}

.hero-caption {
    position: absolute;
    left: 6vw;
    bottom: 8vh;
    z-index: 3;
    color: #f5efe4;
    font-family: var(--font-display);
    letter-spacing: -0.01em;
    opacity: 0;
    animation: fadeUp 1s ease-out 0.3s forwards;
}

.hero-caption .eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-accent-soft);
    margin-bottom: 0.6rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(245, 239, 228, 0.3);
}

.hero-caption .title {
    font-size: clamp(2rem, 5vw, 3.6rem);
    font-weight: 500;
    font-style: italic;
    line-height: 1.05;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
    margin-left: -0.22em;
}

.hero-caption .title em {
    font-style: normal;
    color: var(--color-accent-soft);
}

.hero-caption .subtitle {
    margin-top: 0.6rem;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.15rem;
    font-weight: 400;
    color: rgba(245, 239, 228, 0.78);
    letter-spacing: 0.04em;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
    animation: fadeUp 1s ease-out 0.5s backwards;
}

/* ===== Main content ===== */
.main {
    width: 100%;
    padding: 8rem 0 6rem;
}

main {
    width: 100%;
}

article {
    width: 80%;
    max-width: 1200px;
    margin: 0 auto 4rem;
}

.multicol {
    column-count: 4;
    column-gap: 2.4rem;
    column-rule: 1px solid var(--color-line);
}

.multicol p {
    font-size: 1.05rem;
    line-height: 1.75;
    margin: 0 0 1rem;
    color: var(--color-ink-soft);
    text-align: justify;
    hyphens: auto;
}

.multicol p:not(:first-of-type) {
    text-indent: 1.5rem;
}

/* Drop cap on first paragraph */
.multicol:first-of-type p:first-of-type::first-letter {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 4.2rem;
    float: left;
    line-height: 0.85;
    padding: 0.4rem 0.6rem 0 0;
    color: var(--color-accent);
}

.multicol h1,
.multicol h2 {
    font-family: var(--font-display);
    color: var(--color-ink);
    break-after: column;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.multicol h1 {
    margin-top: 0;
    font-size: 3.4rem;
    font-weight: 700;
    font-style: italic;
}

.multicol h2 {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-accent);
    margin-bottom: 1.2rem;
}

.multicol h1 .accent {
    color: var(--color-accent);
}

/* ===== Video Card ===== */
.video-card {
    margin: 4rem 0;
    padding: 1.8rem;
    background: var(--color-paper-soft);
    border-radius: 8px;
    border: 1px solid rgba(26, 23, 21, 0.08);
    box-shadow: var(--shadow-soft);
}

.video-card__frame {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 6px;
    background: #1a1715;
    box-shadow: var(--shadow-paper);
    position: relative;
}

.video-card__frame iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.video-card__caption {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid var(--color-line);
}

.video-card__tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-accent);
    font-weight: 500;
}

.video-card__title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 500;
    font-style: italic;
    color: var(--color-ink);
    line-height: 1.2;
}

.video-card__desc {
    font-size: 0.9rem;
    color: var(--color-ink-muted);
    font-family: var(--font-body);
}

@media all and (max-width: 600px) {
    .video-card {
        padding: 1.2rem;
    }

    .video-card__title {
        font-size: 1.15rem;
    }
}

/* ===== Article images ===== */
article img {
    width: 100%;
    display: block;
    margin: 3rem 0;
    border-radius: 4px;
    box-shadow: var(--shadow-paper);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

/* ===== 图文块 ===== */
.sticky-card {
    position: relative;
    margin: 4rem 0;
}

.sticky-card__image {
    width: 100%;
    line-height: 0;
}

.sticky-card__image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== 3D 倾斜图片（vanilla-tilt） ===== */
.game-tilt {
    position: relative;
    display: block;
    width: 100%;
    line-height: 0;
    border-radius: 4px;
    box-shadow: var(--shadow-paper);
    perspective: 1200px;
    perspective-origin: center;
    transform-style: preserve-3d;
    will-change: transform;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.game-tilt__bg {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    border-radius: 4px;
    box-shadow: none;
    transition: none;
}

.game-tilt__float {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    border-radius: 4px;
    pointer-events: none;
    transform: translateZ(0);
    transition:
        transform 0.9s cubic-bezier(.23, 1, .32, 1),
        filter 0.9s cubic-bezier(.23, 1, .32, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.game-tilt:hover .game-tilt__float {
    transform: translateZ(40px);
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
}

/* 3D 文字视差效果 —— 默认隐藏，悬停时从模糊浮出 */
.game-tilt__caption {
    position: absolute;
    left: 50%;
    top: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    color: #f5efe4;
    font-family: var(--font-display);
    text-align: center;
    transform: translate(-50%, -50%) translateZ(80px);
    pointer-events: none;
    opacity: 0;
    filter: blur(12px);
    transition:
        opacity 0.9s cubic-bezier(.23, 1, .32, 1),
        filter 0.9s cubic-bezier(.23, 1, .32, 1);
    text-shadow:
        0 2px 20px rgba(0, 0, 0, 0.6),
        0 4px 12px rgba(0, 0, 0, 0.4),
        0 0 24px rgba(0, 0, 0, 0.3);
}

.game-tilt:hover .game-tilt__caption {
    opacity: 1;
    filter: blur(0);
}

.game-tilt__eyebrow {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--color-accent-soft);
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(245, 239, 228, 0.35);
    width: max-content;
    text-shadow:
        0 2px 14px rgba(0, 0, 0, 0.65),
        0 4px 8px rgba(0, 0, 0, 0.45),
        0 0 18px rgba(0, 0, 0, 0.35);
}

.game-tilt__title {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 700;
    font-style: italic;
    line-height: 1;
    letter-spacing: 0.02em;
}

/* 防止 vanilla-tilt 创建的 glare 元素干扰鼠标事件 */
.game-tilt .js-tilt-glare {
    pointer-events: none;
    border-radius: 4px;
}

.game-tilt .js-tilt-glare-inner {
    border-radius: 4px;
}

.sticky-card__content {
    padding: 1.5rem 0;
}

/* ===== Accordion (replaces Snipaste_02 image) ===== */
.accordion {
    width: 100%;
    aspect-ratio: 1320 / 700;
    display: flex;
    flex-direction: row;
    box-shadow: var(--shadow-paper);
    border-radius: 4px;
    overflow: hidden;
    background: linear-gradient(45deg,
            rgba(142, 197, 252, 0.45) 0%,
            rgba(193, 210, 255, 0.45) 50%,
            rgba(224, 195, 255, 0.45) 100%);
}

.accordion__item {
    flex: 1 1 20%;
    min-width: 0;
    display: grid;
    grid-template-areas: "stack";
    overflow: hidden;
    cursor: pointer;
    transition: flex 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion__item:hover,
.accordion__item:focus-within {
    flex: 1 1 60%;
}

.accordion__item > *,
.accordion__item::after {
    grid-area: stack;
}

.accordion__item > * {
    pointer-events: none;
}

.accordion__img {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(142, 197, 252, 0.95) 0%,
            rgba(193, 210, 255, 0.95) 50%,
            rgba(224, 195, 255, 0.95) 100%);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transform: scale(1.15);
    transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1),
        background-image 0.4s ease;
    z-index: 0;
}

.accordion__item:hover .accordion__img,
.accordion__item:focus-within .accordion__img {
    transform: scale(1.3);
}

.accordion__item::after {
    content: '';
    background-image:
        linear-gradient(to bottom, rgba(26, 23, 21, 0.55), transparent 25%, transparent 60%, rgba(26, 23, 21, 0.4) 100%),
        linear-gradient(to right, rgba(26, 23, 21, 0.2), transparent 30%, transparent 70%, rgba(26, 23, 21, 0.2) 100%);
    z-index: 1;
}

.accordion__title {
    align-self: start;
    padding-top: 1.2rem;
    text-align: center;
    font-size: clamp(1rem, 1.6vw, 1.5rem);
    font-family: var(--font-display);
    font-weight: 500;
    letter-spacing: 0.05em;
    color: #f5efe4;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65);
    z-index: 2;
    margin: 0;
}

.accordion__text {
    align-self: end;
    text-align: center;
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 1.4vw, 1.3rem);
    padding: 1.5rem 1rem;
    color: #f5efe4;
    text-shadow: 0 0 12px rgba(60, 138, 255, 0.85), 0 1px 8px rgba(0, 0, 0, 0.6);
    z-index: 2;
    margin: 0;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.15s,
        transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.15s;
    background: linear-gradient(to top, rgba(176, 74, 47, 0.65), transparent);
}

.accordion__item:hover .accordion__text,
.accordion__item:focus-within .accordion__text {
    opacity: 1;
    transform: translateY(0);
}

/* 滚动入场 */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* 段落里的强调 */
.multicol strong,
.multicol b {
    color: var(--color-ink);
    font-weight: 700;
}

/* ===== Changelog ===== */
.changelog {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-ink-soft);
}

.changelog__intro {
    font-size: 0.95rem;
    padding: 1rem 1.25rem;
    margin: 0 0 2.5rem 0;
    background: var(--color-paper-soft);
    border-left: 3px solid var(--color-accent);
    border-radius: 0 6px 6px 0;
}

.changelog__intro code {
    background: rgba(176, 74, 47, 0.1);
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-size: 0.82rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.changelog__item {
    position: relative;
}

.changelog__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.tag--beta {
    background: var(--color-accent);
    color: var(--color-paper);
    box-shadow: 0 2px 4px rgba(176, 74, 47, 0.3);
}

.tag--alpha {
    background: #5e8a6e;
    color: var(--color-paper);
    box-shadow: 0 2px 4px rgba(94, 138, 110, 0.3);
}

.tag--dev {
    background: var(--color-ink-soft);
    color: var(--color-paper);
    box-shadow: 0 2px 4px rgba(26, 23, 21, 0.2);
}

/* ===== Collapsible version log ===== */
.version-log {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px dashed rgba(26, 23, 21, 0.15);
}

.version-log__title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-ink);
    margin: 0 0 1.25rem 0;
    letter-spacing: 0.02em;
}

.version-log__accordion {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.version-log__item {
    background: var(--color-paper-soft);
    border: 1px solid rgba(26, 23, 21, 0.08);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.version-log__item[open] {
    border-color: rgba(176, 74, 47, 0.25);
    box-shadow: 0 2px 8px rgba(176, 74, 47, 0.08);
}

.version-log__summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.1rem;
    cursor: pointer;
    user-select: none;
    list-style: none;
    font-family: var(--font-display);
    font-size: 0.98rem;
    font-weight: 500;
    color: var(--color-ink);
    transition: background 0.2s;
}

.version-log__summary::-webkit-details-marker {
    display: none;
}

.version-log__summary:hover {
    background: rgba(176, 74, 47, 0.05);
}

.version-log__summary .chevron {
    margin-left: auto;
    transition: transform 0.25s ease;
    font-size: 0.85rem;
    color: var(--color-accent);
    font-weight: 700;
}

.version-log__item[open] .version-log__summary .chevron {
    transform: rotate(90deg);
}

.version-log__summary-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-ink);
}

.version-log__body {
    padding: 0.25rem 1.5rem 1.5rem 1.5rem;
    border-top: 1px solid rgba(26, 23, 21, 0.08);
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--color-ink-soft);
}

.version-log__body h5 {
    margin: 1.5rem 0 0.6rem 0;
    padding: 0.3rem 0.75rem;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-ink);
    background: rgba(176, 74, 47, 0.08);
    border-left: 3px solid var(--color-accent);
    border-radius: 0 4px 4px 0;
}

.version-log__body h5:first-child {
    margin-top: 1rem;
}

.version-log__body p {
    margin: 0.4rem 0;
}

.version-log__body ul {
    margin: 0.5rem 0 0.5rem 0;
    padding-left: 1.4rem;
}

.version-log__body ul li {
    margin-bottom: 0.25rem;
    font-size: 0.88rem;
    line-height: 1.7;
}

.version-log__body ul li::marker {
    color: var(--color-accent);
}

.version-log__body code {
    background: rgba(26, 23, 21, 0.06);
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8rem;
    color: var(--color-accent);
}

.version-log__body strong {
    color: var(--color-ink);
    font-weight: 600;
}

.version-log__body .tree {
    margin: 0.75rem 0;
    padding: 1rem 1.2rem;
    background: #1a1715;
    color: #e8dfd0;
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8rem;
    line-height: 1.65;
    white-space: pre;
    overflow-x: auto;
}

.version-log__body .snippet {
    margin: 0.75rem 0;
    padding: 1rem 1.2rem;
    background: #1a1715;
    color: #e8dfd0;
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8rem;
    line-height: 1.7;
    white-space: pre;
    overflow-x: auto;
}

.version-log__body .compare-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: 0.85rem;
    background: var(--color-paper);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.version-log__body .compare-table th,
.version-log__body .compare-table td {
    padding: 0.55rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(26, 23, 21, 0.08);
}

.version-log__body .compare-table th {
    background: var(--color-ink);
    color: var(--color-paper);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.version-log__body .compare-table tr:last-child td {
    border-bottom: none;
}

.version-log__body .compare-table tbody tr:hover {
    background: rgba(176, 74, 47, 0.04);
}

.version-log__body .check-list {
    list-style: none;
    padding-left: 0;
}

.version-log__body .check-list li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.35rem;
}

.version-log__body .check-list li::before {
    content: "✦";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-accent);
    font-size: 0.75rem;
}

.version-log__minor {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
    padding: 1rem 1.1rem;
    background: var(--color-paper-soft);
    border-radius: 8px;
    border: 1px solid rgba(26, 23, 21, 0.08);
    margin-top: 1rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.82rem;
    color: var(--color-ink-soft);
}

.version-log__minor span {
    padding: 0.15rem 0.35rem;
    background: var(--color-paper);
    border-radius: 4px;
    text-align: center;
}

.changelog__date {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.88rem;
    color: var(--color-ink-soft);
    opacity: 0.75;
}

.changelog__version {
    margin: 0;
    font-size: 1.1rem;
}

.changelog__subtitle {
    margin: 0.5rem 0 0.75rem 0;
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-ink);
    line-height: 1.35;
}

.changelog__quote {
    margin: 0.5rem 0 1.5rem 0;
    padding: 0.75rem 1.25rem;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1rem;
    color: var(--color-accent);
    background: rgba(176, 74, 47, 0.05);
    border-left: 2px solid var(--color-accent);
    border-radius: 0 4px 4px 0;
}

.changelog__paragraph {
    margin: 0 0 1.2rem 0;
    font-size: 0.95rem;
}

.changelog__section {
    margin: 2rem 0 0 0;
    padding: 1.5rem 1.75rem;
    background: var(--color-paper-soft);
    border-radius: 8px;
    border: 1px solid rgba(26, 23, 21, 0.08);
}

.changelog__section h4 {
    margin: 0 0 1rem 0;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-ink);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(26, 23, 21, 0.12);
}

.changelog__section p {
    margin: 0.5rem 0;
    font-size: 0.92rem;
    line-height: 1.75;
}

.changelog__section ul {
    margin: 0.75rem 0 0.25rem 0;
    padding-left: 1.5rem;
}

.changelog__section ul li {
    font-size: 0.92rem;
    line-height: 1.75;
    margin-bottom: 0.35rem;
}

.changelog__section ul li.sublist {
    list-style: none;
    padding-left: 1.5rem;
    font-size: 0.88rem;
    opacity: 0.85;
    margin-left: -1.5rem;
}

.sublist-note {
    margin: 1rem 0 0 0;
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
    background: rgba(26, 23, 21, 0.04);
    border-radius: 4px;
    font-style: italic;
}

.changelog__section table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: 0.88rem;
    background: var(--color-paper);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.changelog__section table th {
    background: var(--color-ink);
    color: var(--color-paper);
    padding: 0.6rem 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.03em;
}

.changelog__section table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid rgba(26, 23, 21, 0.08);
    font-size: 0.88rem;
    line-height: 1.55;
}

.changelog__section table tr:last-child td {
    border-bottom: none;
}

.changelog__section table tbody tr:hover {
    background: rgba(176, 74, 47, 0.04);
}

.changelog__section code {
    background: rgba(26, 23, 21, 0.06);
    padding: 0.12rem 0.4rem;
    border-radius: 3px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.82rem;
    color: var(--color-accent);
}

.changelog__section strong {
    color: var(--color-ink);
    font-weight: 600;
}

.codeblock {
    margin: 1rem 0 0 0;
    padding: 1.1rem 1.25rem;
    background: #1a1715;
    color: #e8dfd0;
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.78rem;
    line-height: 1.75;
    white-space: pre;
    overflow-x: auto;
}

.codeblock__title {
    display: inline-block;
    color: var(--color-accent);
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-bottom: 0.25rem;
}

/* ===== Hero row: text on left, buttons on right ===== */
.hero-row {
    --percentage: 0%;
    --pct-num: 0;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 3rem;
    align-items: start;
    margin: 0 0 3rem;
}

.hero-row__text h1 {
    margin-top: 0;
    font-family: var(--font-display);
    font-size: 3.4rem;
    font-weight: 700;
    font-style: italic;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 1.2rem;
    background-image: linear-gradient(90deg,
        var(--color-ink) 0%,
        var(--color-ink) 25%,
        rgba(26, 23, 21, 0) 50%,
        rgba(26, 23, 21, 0) 100%);
    background-size: 300% 100%;
    background-position-x: calc(100% - var(--percentage));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    transition: background-position-x 0.1s linear;
}

.hero-row__text h1 .accent {
    background-image: linear-gradient(90deg,
        var(--color-accent) 0%,
        var(--color-accent) 25%,
        rgba(176, 74, 47, 0) 50%,
        rgba(176, 74, 47, 0) 100%);
    background-size: 300% 100%;
    background-position-x: calc(100% - var(--percentage));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    text-decoration: none;
    transition: background-position-x 0.1s linear, filter 0.3s ease;
}

.hero-row__text h1 .accent:hover {
    filter: brightness(1.2);
}

.hero-row__text p a {
    background-image: linear-gradient(90deg,
        var(--color-accent) 0%,
        var(--color-accent) 25%,
        rgba(176, 74, 47, 0) 50%,
        rgba(176, 74, 47, 0) 100%);
    background-size: 300% 100%;
    background-position-x: calc(100% - var(--percentage));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    text-decoration: none;
    font-weight: 600;
    transition: background-position-x 0.1s linear, filter 0.3s ease;
}

.hero-row__text p a:hover {
    filter: brightness(1.2);
}

.hero-row__text p {
    font-size: 1.05rem;
    line-height: 1.75;
    text-align: justify;
    margin: 0 0 1.4rem 0;
    background-image: linear-gradient(90deg,
        var(--color-ink-soft) 0%,
        var(--color-ink-soft) 25%,
        rgba(26, 23, 21, 0) 50%,
        rgba(26, 23, 21, 0) 100%);
    background-size: 300% 100%;
    background-position-x: calc(100% - var(--percentage));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    transition: background-position-x 0.1s linear;
}

.hero-row__text p:last-child {
    margin-bottom: 0;
}

.hero-row__text p:first-of-type::first-letter {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 4.2rem;
    float: left;
    line-height: 0.85;
    padding: 0.4rem 0.6rem 0 0;
    color: transparent;
    background-image: linear-gradient(90deg,
        var(--color-accent) 0%,
        var(--color-accent) 25%,
        rgba(176, 74, 47, 0) 50%,
        rgba(176, 74, 47, 0) 100%);
    background-size: 300% 100%;
    background-position-x: calc(100% - var(--percentage));
    background-clip: text;
    -webkit-background-clip: text;
    transition: background-position-x 0.1s linear;
}

.hero-row__text kbd {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.82rem;
    font-weight: 600;
    color: transparent;
    background-image: linear-gradient(90deg,
        var(--color-ink) 0%,
        var(--color-ink) 25%,
        rgba(26, 23, 21, 0) 50%,
        rgba(26, 23, 21, 0) 100%);
    background-size: 300% 100%;
    background-position-x: calc(100% - var(--percentage));
    background-clip: text;
    -webkit-background-clip: text;
    border: 1px solid rgba(26, 23, 21, 0.35);
    border-bottom-width: 2px;
    border-radius: 3px;
    margin: 0 0.05rem;
    transition: background-position-x 0.1s linear;
}

.hero-row__actions {
    padding-top: 0;
}

.online-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.45rem 1rem;
    margin: 0 auto 1.1rem auto;
    border: 1px solid rgba(107, 158, 138, 0.25);
    border-radius: 999px;
    background: rgba(107, 158, 138, 0.06);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    color: var(--color-ink-muted);
}

.online-counter__dot {
    position: relative;
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #6b9e8a;
    box-shadow: 0 0 8px rgba(107, 158, 138, 0.9),
        0 0 16px rgba(107, 158, 138, 0.5);
    animation: dotPulse 1.4s ease-in-out infinite;
}

.online-counter__dot::before {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: rgba(107, 158, 138, 0.35);
    animation: dotRipple 1.4s ease-out infinite;
    opacity: 0;
}

@keyframes dotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.75); opacity: 0.75; }
}

@keyframes dotRipple {
    0% { transform: scale(0.6); opacity: 0.8; }
    100% { transform: scale(2.4); opacity: 0; }
}

.online-counter__label {
    color: var(--color-ink-muted);
}

.online-counter__num {
    font-weight: 600;
    color: #5a8a76;
    min-width: 1.2em;
    text-align: center;
    transition: color 0.3s ease;
}

/* ===== Buttons ===== */
.btn-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.9rem;
}

.btn-caption {
    margin: 1.2rem 0 0 0;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.8;
    letter-spacing: 0.02em;
    text-align: center;
}

.btn-caption p {
    margin: 0;
}

.btn-caption__notice {
    margin: 0 0 0.45rem 0;
}

.btn-caption__notice span {
    display: inline-block;
    padding: 0.2rem 0.9rem;
    background: rgba(176, 74, 47, calc(0.03 + 0.07 * var(--pct-num, 0)));
    border: 1px solid rgba(176, 74, 47, calc(0.08 + 0.22 * var(--pct-num, 0)));
    border-radius: 999px;
    color: rgba(176, 74, 47, calc(0.02 + 0.98 * var(--pct-num, 0)));
    transition: background 0.1s ease, border-color 0.1s ease, color 0.1s ease;
}

.btn-caption__line {
    color: transparent;
    background-image: linear-gradient(90deg,
        var(--color-ink-muted) 0%,
        var(--color-ink-muted) 25%,
        rgba(26, 23, 21, 0) 50%,
        rgba(26, 23, 21, 0) 100%);
    background-size: 300% 100%;
    background-position-x: calc(100% - var(--percentage));
    background-clip: text;
    -webkit-background-clip: text;
    transition: background-position-x 0.1s linear;
}

.btn {
    display: inline-block;
    text-align: center;
    text-decoration: none;
    --faint: 0.01;
    --pct: var(--pct-num, 0);
    min-width: 220px;
    width: 100%;
    padding: 0.95rem 2.2rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: rgba(26, 23, 21, calc(var(--faint) + (1 - var(--faint)) * var(--pct)));
    background: rgba(236, 228, 211, calc(var(--faint) + (1 - var(--faint)) * var(--pct)));
    border: 1px solid rgba(26, 23, 21, calc(var(--faint) * 0.5 + (1 - var(--faint) * 0.5) * var(--pct)));
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    box-shadow: var(--shadow-soft);
    opacity: calc(0.02 + 0.98 * var(--pct));
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-paper);
}

.btn:active {
    transform: translateY(0);
}

.btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.btn--primary {
    color: rgba(245, 239, 228, calc(var(--faint) + (1 - var(--faint)) * var(--pct-num, 0)));
    background: rgba(176, 74, 47, calc(var(--faint) + (1 - var(--faint)) * var(--pct-num, 0)));
    border-color: rgba(176, 74, 47, calc(var(--faint) + (1 - var(--faint)) * var(--pct-num, 0)));
}

.btn--primary:hover {
    background: var(--color-accent-soft);
    border-color: var(--color-accent-soft);
}

.btn--secondary {
    color: rgba(176, 74, 47, calc(var(--faint) + (1 - var(--faint)) * var(--pct-num, 0)));
    background: transparent;
    border-color: rgba(176, 74, 47, calc(var(--faint) + (1 - var(--faint)) * var(--pct-num, 0)));
}

.btn--secondary:hover {
    background: var(--color-accent);
    color: #f5efe4;
}

.btn--ghost {
    background: transparent;
    border-color: rgba(26, 23, 21, calc(var(--faint) * 0.5 + (1 - var(--faint) * 0.5) * var(--pct-num, 0)));
}

.btn--ghost:hover {
    background: var(--color-paper-warm);
    border-color: var(--color-accent-soft);
    color: var(--color-accent);
}

/* ===== Footer mark ===== */
.colophon {
    width: 80%;
    max-width: 1200px;
    margin: 4rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--color-line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-ink-muted);
}

.colophon .dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent);
    margin-right: 0.6rem;
    vertical-align: middle;
    box-shadow: 0 0 8px var(--color-accent-soft);
}

/* ===== Beian ===== */
.beian {
    width: 80%;
    max-width: 1200px;
    margin: 1rem auto 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    color: var(--color-ink-muted);
}

.beian a {
    color: var(--color-ink-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s ease;
}

.beian a:hover {
    color: var(--color-accent);
}

.beian__icon {
    height: 16px;
    width: auto;
    vertical-align: middle;
}

.beian__sep {
    color: var(--color-line);
}

/* ===== Animations ===== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Welcome Modal ===== */
.welcome-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 23, 21, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    padding: 1.5rem;
}

.welcome-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.welcome-modal {
    width: 100%;
    max-width: 560px;
    background: var(--color-paper);
    border-radius: 20px;
    padding: 2.6rem 2.4rem 2.2rem;
    text-align: center;
    box-shadow:
        0 20px 60px rgba(26, 23, 21, 0.25),
        0 2px 6px rgba(26, 23, 21, 0.06);
    border: 1px solid var(--color-line);
    background-image:
        radial-gradient(ellipse at top, rgba(176, 74, 47, 0.06), transparent 60%),
        radial-gradient(ellipse at bottom, rgba(26, 23, 21, 0.03), transparent 70%);
    transform: translateY(20px) scale(0.96);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(.23, 1, .32, 1), opacity 0.4s ease;
}

.welcome-overlay.is-open .welcome-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.welcome-modal__title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-ink);
    margin-bottom: 1.3rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.welcome-modal__content {
    color: var(--color-ink-soft);
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.9;
    margin-bottom: 2rem;
}

.welcome-modal__content p {
    margin: 0.4rem 0;
    white-space: nowrap;
}

.welcome-modal__highlight {
    display: inline-block;
    padding: 0 0.35em;
    color: var(--color-paper);
    background: var(--color-accent);
    border-radius: 6px;
    font-weight: 700;
    font-family: var(--font-mono);
    margin: 0 0.15em;
}

.welcome-modal__btn {
    display: inline-block;
    min-width: 180px;
    padding: 0.9rem 2.4rem;
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--color-paper);
    background: var(--color-accent);
    border: 1px solid var(--color-accent);
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 2px 6px rgba(176, 74, 47, 0.25);
}

.welcome-modal__btn:hover {
    background: var(--color-accent-soft);
    border-color: var(--color-accent-soft);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(176, 74, 47, 0.3);
}

.welcome-modal__btn:active {
    transform: translateY(0);
}

.welcome-modal__btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

@media all and (max-width: 720px) {
    .welcome-modal {
        max-width: 92vw;
        padding: 2rem 1.4rem 1.6rem;
    }

    .welcome-modal__title {
        font-size: 1.35rem;
        white-space: normal;
    }

    .welcome-modal__content {
        font-size: 0.92rem;
    }

    .welcome-modal__content p {
        white-space: normal;
    }
}

/* ===== Responsive ===== */
@media all and (max-width: 1600px) {
    .multicol {
        column-count: 3;
    }
}

@media all and (max-width: 900px) {
    .hero-row {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-row__actions {
        padding-top: 0;
    }

    .hero-row__text h1 {
        font-size: 2.6rem;
    }
}

@media all and (max-width: 1000px) {
    .multicol {
        column-count: 2;
    }

    article,
    .colophon {
        width: 88%;
    }
}

@media all and (max-width: 800px) {
    article h2 {
        break-after: avoid;
    }

    .multicol {
        column-count: 1;
    }

    .multicol h1 {
        font-size: 2.6rem;
    }
}

@media all and (max-width: 600px) {
    article,
    .colophon {
        width: 100%;
        padding: 0 1.2rem;
    }

    .hero-caption {
        left: 1.2rem;
        bottom: 2rem;
    }

    .hero-caption .title {
        font-size: 2rem;
    }

    .colophon {
        flex-direction: column;
        gap: 0.6rem;
        align-items: flex-start;
    }
}

#cursor {
    position: fixed;
    width: 16px;
    height: 16px;
    background: #009688;
    border-radius: 8px;
    opacity: 0.25;
    z-index: 10086;
    pointer-events: none;
    transition: 0.2s ease-in-out;
    transition-property: background, opacity, transform;
}

#cursor.hidden {
    opacity: 0;
}

#cursor.hover {
    opacity: 0.1;
    transform: scale(2.5);
}

#cursor.active {
    opacity: 0.5;
    transform: scale(0.5);
}

#clickME {
    cursor: pointer;
    display: inline-block;
    border: 1px solid #009688;
}