/* ==========================================================================
   移动端：直角线条风格
   纯直角、1px 细线、等宽标签、纸面底色。
   桌面端不受影响：所有规则都收在 max-width: 640px 里。
   ========================================================================== */

@media (max-width: 640px) {
    /* 三个选择器并列，才能压过 theme.css 里按 data-theme 写死的变量 */
    :root,
    :root[data-theme="light"],
    :root[data-theme="dark"] {
        /* 纸面 / 墨色 / 线 */
        --m-paper: #f2f1ee;
        --m-raised: #faf9f7;
        --m-ink: #101014;
        --m-muted: rgba(16, 16, 20, 0.62);
        --m-faint: rgba(16, 16, 20, 0.42);
        --m-line: rgba(16, 16, 20, 0.16);
        --m-line-strong: rgba(16, 16, 20, 0.4);
        --m-invert: #101014;
        --m-invert-fg: #f2f1ee;

        --m-sans: system-ui, -apple-system, "Segoe UI", "PingFang SC",
            "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
        --m-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
            "Liberation Mono", monospace;

        --m-edge: 18px;
        --m-rail: 9px;
        --m-nav-height: 48px;

        /* 把桌面变量映射到纸面配色，兜住共享组件 */
        --bg: var(--m-paper);
        --surface: var(--m-raised);
        --text: var(--m-ink);
        --text-soft: var(--m-ink);
        --muted: var(--m-muted);
        --border: var(--m-line);
        --accent: var(--m-ink);
        --accent-strong: var(--m-ink);
        --accent-soft: transparent;
        --accent-border: var(--m-line-strong);
        --on-accent: var(--m-paper);
        --nav-ink: var(--m-muted);
        --nav-active: var(--m-ink);
        --window-border: var(--m-line);
        --glass-tint: transparent;
        --title-on-photo: var(--m-ink);
        --text-on-photo: var(--m-ink);
        --muted-on-photo: var(--m-muted);
        --accent-on-photo: var(--m-ink);
    }

    :root[data-theme="dark"] {
        --m-paper: #121316;
        --m-raised: #101014;
        --m-ink: #f2f1ee;
        --m-muted: rgba(242, 241, 238, 0.6);
        --m-faint: rgba(242, 241, 238, 0.38);
        --m-line: rgba(242, 241, 238, 0.15);
        --m-line-strong: rgba(242, 241, 238, 0.4);
        --m-invert: #f2f1ee;
        --m-invert-fg: #0b0b0c;
    }

    /* ---------- 页面骨架 ---------- */

    html,
    body {
        height: auto;
        min-height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: auto;
        -webkit-text-size-adjust: 100%;
    }

    html {
        background: var(--m-paper);
        scroll-behavior: smooth;
        scrollbar-width: none;
    }

    html::-webkit-scrollbar {
        display: none;
    }

    body {
        padding-top: var(--m-nav-height);
        background: var(--m-paper);
        color: var(--m-ink);
        font-family: var(--m-sans);
        font-size: 15px;
        line-height: 1.65;
    }

    /* 贯穿页面的两条竖线，是整套线条感的骨架 */
    body::before,
    body::after {
        content: "";
        position: fixed;
        top: 0;
        bottom: 0;
        z-index: 55;
        width: 1px;
        background: var(--m-line);
        pointer-events: none;
    }

    body::before {
        left: calc(var(--m-rail) - 1px);
    }

    body::after {
        right: calc(var(--m-rail) - 1px);
    }

    .wallpaper,
    .nav-glass,
    .hero-catcher {
        display: none !important;
    }

    .page-fade {
        background: var(--m-paper);
    }

    /* ---------- 导航：一格一线的状态条 ---------- */

    .site-nav {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        z-index: 60;
        width: 100%;
        padding: 0;
        background: var(--m-paper);
        border-bottom: 1px solid var(--m-line-strong);
        pointer-events: auto;
    }

    /* 导航下沿与两条竖线交汇处的小十字 */
    .site-nav::before,
    .site-nav::after {
        content: "";
        position: absolute;
        bottom: -5px;
        z-index: 1;
        width: 11px;
        height: 11px;
        background:
            linear-gradient(var(--m-line-strong), var(--m-line-strong)) center / 1px 11px no-repeat,
            linear-gradient(var(--m-line-strong), var(--m-line-strong)) center / 11px 1px no-repeat;
        pointer-events: none;
    }

    .site-nav::before {
        left: calc(var(--m-rail) - 5px);
    }

    .site-nav::after {
        right: calc(var(--m-rail) - 5px);
    }

    .nav-bar {
        justify-content: flex-start;
        height: var(--m-nav-height);
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .nav-brand {
        display: inline-flex;
        flex: 0 0 auto;
        align-items: center;
        height: 100%;
        padding: 0 12px;
        border-right: 1px solid var(--m-line);
        color: var(--m-ink);
        font-family: var(--m-mono);
        font-size: 10px;
        font-weight: 600;
        letter-spacing: 0.16em;
    }

    .nav-links {
        flex: 1 1 auto;
        height: 100%;
    }

    .nav-links li {
        flex: 1 1 0;
        min-width: 0;
        border-right: 1px solid var(--m-line);
    }

    .nav-links a {
        flex: 1 1 auto;
        width: 100%;
        height: 100%;
        padding: 0 7px;
        color: var(--m-muted);
        font-family: var(--m-mono);
        font-size: 9px;
        font-weight: 500;
        letter-spacing: 0.1em;
        text-shadow: none;
        transition: background-color 120ms linear, color 120ms linear;
    }

    .nav-links a:hover {
        color: var(--m-ink);
    }

    .nav-links li.nav-theme {
        flex: 0 0 44px;
        border-right: 0;
        border-left: 1px solid var(--m-line);
    }

    .theme-toggle {
        width: 100%;
        height: 100%;
        padding: 0;
        border: 0;
        border-radius: 0;
        color: var(--m-muted);
        transition: background-color 120ms linear, color 120ms linear;
    }

    .theme-toggle:hover {
        background: var(--m-invert);
        color: var(--m-invert-fg);
    }

    .theme-icon {
        width: 16px;
        height: 16px;
    }

    :root[data-section="start"] .nav-links a[href="#start"],
    :root[data-section="projects"] .nav-links a[href="#projects"],
    :root[data-section="end"] .nav-links a[href="#end"],
    :root[data-section="posts"] .nav-links a[href="posts.html"] {
        color: var(--m-invert-fg);
        text-decoration: none;
        background: var(--m-invert);
        box-shadow: none;
    }

    /* ---------- 首屏 ---------- */

    .hero-layer {
        position: static;
        top: auto;
        transform: none;
        pointer-events: auto;
    }

    .hero-quote {
        position: relative;
        bottom: auto;
        left: auto;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        width: 100%;
        height: auto;
        min-height: calc(100vh - var(--m-nav-height));
        min-height: calc(100svh - var(--m-nav-height));
        margin: 0;
        padding: 18px var(--m-edge) 0;
        border: 0;
        border-bottom: 1px solid var(--m-line-strong);
        color: var(--m-ink);
        container-type: normal;
        transform: none;
        text-align: left;
    }

    .hero-meta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding-bottom: 13px;
        border-bottom: 1px solid var(--m-line);
        color: var(--m-muted);
        font-family: var(--m-mono);
        font-size: 9.5px;
        font-weight: 500;
        letter-spacing: 0.16em;
        text-transform: uppercase;
    }

    .hero-meta span:last-child {
        color: var(--m-faint);
    }

    .hero-quote p {
        max-width: 15ch;
        margin: auto 0;
        padding: 44px 0;
        color: var(--m-ink);
        font-family: var(--m-sans);
        font-size: clamp(2.35rem, 11.2vw, 3.6rem);
        font-weight: 600;
        letter-spacing: -0.045em;
        line-height: 1.02;
        text-shadow: none;
        text-wrap: balance;
    }

    .hero-foot {
        display: flex;
        border-top: 1px solid var(--m-line);
    }

    .hero-foot span {
        flex: 1 1 0;
        min-width: 0;
        padding: 11px 0 13px 10px;
        border-left: 1px solid var(--m-line);
        color: var(--m-faint);
        font-family: var(--m-mono);
        font-size: 8.5px;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .hero-foot span:first-child {
        padding-left: 0;
        border-left: 0;
    }

    /* ---------- 滚动提示条 ---------- */

    .content-section.content-home {
        display: block;
        min-height: 0;
        padding: 0;
        border: 0;
        border-bottom: 1px solid var(--m-line-strong);
        text-align: left;
    }

    .home-intro {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 11px var(--m-edge);
    }

    .home-intro .section-kicker {
        margin: 0;
        padding: 0;
        border: 0;
        font-size: 9px;
    }

    .home-intro .section-kicker::before {
        flex: 0 0 5px;
        width: 5px;
        height: 5px;
    }

    .home-intro .section-kicker::after {
        display: none;
    }

    .home-lead {
        margin: 0 0 0 auto;
        color: var(--m-faint);
        font-family: var(--m-mono);
        font-size: 9px;
        font-weight: 400;
        letter-spacing: 0.1em;
        line-height: 1.4;
        text-transform: uppercase;
    }

    .home-arrow {
        display: grid;
        flex: 0 0 auto;
        place-items: center;
        width: 26px;
        height: 26px;
        margin: 0;
        border: 1px solid var(--m-line-strong);
        transform: none;
    }

    .home-arrow::before {
        content: "";
        width: 6px;
        height: 6px;
        border-right: 1px solid var(--m-ink);
        border-bottom: 1px solid var(--m-ink);
        transform: translateY(-1px) rotate(45deg);
    }

    /* ---------- 内容容器 ---------- */

    .body-viewport {
        position: static;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        z-index: auto;
        overflow: visible;
        border-radius: 0;
        touch-action: auto;
    }

    .body-scroll {
        transform: none !important;
    }

    .content-panel {
        border: 0;
        border-radius: 0;
        background: transparent;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .content-section {
        padding: 34px var(--m-edge);
        border: 0;
        border-top: 1px solid var(--m-line-strong);
        border-radius: 0;
        scroll-margin-top: var(--m-nav-height);
    }

    .content-start,
    .content-projects {
        padding-top: 34px;
        padding-bottom: 44px;
    }

    .content-start {
        border-top: 0;
    }

    /* ---------- 章节标签：方点 + 标题 + 贯穿横线 ---------- */

    .section-kicker {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0 0 18px;
        padding: 7px 0;
        border-top: 1px solid var(--m-line);
        border-bottom: 1px solid var(--m-line);
        color: var(--m-muted);
        font-family: var(--m-mono);
        font-size: 9.5px;
        font-weight: 500;
        letter-spacing: 0.16em;
        line-height: 1.4;
        text-transform: uppercase;
    }

    .section-kicker::before {
        content: "";
        flex: 0 0 5px;
        width: 5px;
        height: 5px;
        background: var(--m-ink);
    }

    .section-kicker::after {
        content: "";
        flex: 1 1 auto;
        height: 1px;
        background: var(--m-line);
    }

    .section-head {
        margin-bottom: 26px;
        padding: 0;
        border: 0;
    }

    .section-head h2 {
        margin: 0 0 10px;
        font-family: var(--m-sans);
        font-size: clamp(2.1rem, 10vw, 2.9rem);
        font-weight: 600;
        letter-spacing: -0.045em;
        line-height: 1.02;
    }

    .section-sub {
        margin: 0;
        color: var(--m-muted);
        font-size: 13px;
        line-height: 1.75;
    }

    /* ---------- 欢迎段 ---------- */

    .content-start {
        display: block;
        min-height: 0;
        text-align: left;
    }

    .start-intro {
        width: 100%;
        text-align: left;
    }

    .start-title {
        margin: 0 0 10px;
        color: var(--m-ink);
        font-family: var(--m-sans);
        font-size: clamp(1.9rem, 8.4vw, 2.5rem);
        font-weight: 600;
        letter-spacing: -0.035em;
        line-height: 1.12;
    }

    .start-lead {
        margin: 0;
        color: var(--m-ink);
        font-size: 14.5px;
        line-height: 1.75;
    }

    .start-text {
        max-width: none;
        margin: 12px 0 0;
        color: var(--m-muted);
        font-size: 13.5px;
        line-height: 1.8;
    }

    .start-facts {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0;
        width: 100%;
        margin-top: 28px;
        border-top: 1px solid var(--m-line-strong);
        text-align: left;
    }

    .fact-item {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        gap: 14px;
        padding: 11px 0;
        border: 0;
        border-bottom: 1px solid var(--m-line);
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .fact-label {
        flex: 0 0 64px;
        color: var(--m-faint);
        font-family: var(--m-mono);
        font-size: 9px;
        font-weight: 500;
        letter-spacing: 0.1em;
        line-height: 1.8;
        text-transform: uppercase;
    }

    .fact-value {
        color: var(--m-ink);
        font-size: 13.5px;
        line-height: 1.65;
        text-align: right;
    }

    .tag-list {
        gap: 5px;
    }

    .tag-list li {
        padding: 3px 7px;
        border: 1px solid var(--m-line);
        border-radius: 0;
        background: transparent;
        color: var(--m-muted);
        font-family: var(--m-mono);
        font-size: 9px;
        line-height: 1.5;
        letter-spacing: 0.04em;
    }

    .start-tags {
        justify-content: flex-start;
        margin-top: 18px;
    }

    .start-hint {
        margin: 22px 0 0;
        color: var(--m-faint);
        font-family: var(--m-mono);
        font-size: 9px;
        letter-spacing: 0.14em;
        line-height: 1.6;
        text-transform: uppercase;
    }

    /* ---------- 项目列表：编号 + 细线分隔 ---------- */

    .content-projects {
        display: block;
        min-height: 0;
    }

    .project-grid {
        display: block;
        border-top: 1px solid var(--m-line-strong);
        counter-reset: project;
    }

    .project-card {
        position: relative;
        display: grid;
        grid-template-columns: 26px minmax(0, 1fr);
        column-gap: 12px;
        row-gap: 8px;
        padding: 18px 0 0;
        border: 0;
        border-bottom: 1px solid var(--m-line);
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        transition: none;
    }

    .project-card::before {
        counter-increment: project;
        content: "0" counter(project);
        grid-row: 1;
        align-self: start;
        padding-top: 2px;
        color: var(--m-faint);
        font-family: var(--m-mono);
        font-size: 9.5px;
        letter-spacing: 0.08em;
        line-height: 1.6;
    }

    .project-card:hover {
        transform: none;
        border-color: var(--m-line);
        box-shadow: none;
    }

    .project-thumb {
        position: relative;
        display: grid;
        grid-column: 2;
        place-items: center;
        height: auto;
        aspect-ratio: 16 / 9;
        border: 1px solid var(--m-line);
        border-radius: 0;
        background-color: var(--m-raised);
        background-image:
            linear-gradient(var(--m-line) 1px, transparent 1px),
            linear-gradient(90deg, var(--m-line) 1px, transparent 1px);
        background-size: 22px 22px, 22px 22px;
        background-position: -1px -1px, -1px -1px;
        overflow: hidden;
    }

    .project-thumb::before {
        content: "";
        width: 11px;
        height: 11px;
        background:
            linear-gradient(var(--m-line-strong), var(--m-line-strong)) center / 1px 11px no-repeat,
            linear-gradient(var(--m-line-strong), var(--m-line-strong)) center / 11px 1px no-repeat;
    }

    .project-thumb:has(img)::before {
        display: none;
    }

    .project-thumb img {
        border-radius: 0;
    }

    .project-title {
        grid-column: 2;
        margin: 0;
        font-family: var(--m-sans);
        font-size: 18px;
        font-weight: 600;
        letter-spacing: -0.02em;
        line-height: 1.25;
    }

    .project-desc {
        grid-column: 2;
        margin: 0;
        color: var(--m-muted);
        font-size: 13px;
        line-height: 1.7;
    }

    .project-card .tag-list,
    .project-link,
    .project-note {
        grid-column: 2;
    }

    .project-card .tag-list {
        margin: 2px 0 0;
    }

    .project-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-top: 8px;
        padding: 12px 0;
        border-top: 1px solid var(--m-line);
        color: var(--m-ink);
        font-family: var(--m-mono);
        font-size: 10.5px;
        font-weight: 500;
        letter-spacing: 0.12em;
        line-height: 1.4;
        text-decoration: none;
        text-transform: uppercase;
    }

    .project-link:hover {
        color: var(--m-ink);
        text-decoration: none;
    }

    .project-note {
        padding-bottom: 14px;
        color: var(--m-muted);
        font-family: var(--m-mono);
        font-size: 9.5px;
        letter-spacing: 0.08em;
        line-height: 1.6;
    }

    /* ---------- 结尾 ---------- */

    .content-end {
        display: block;
        min-height: 0;
        padding: 40px var(--m-edge) 56px;
        border-top: 1px solid var(--m-line-strong);
        text-align: left;
    }

    .end-content {
        width: 100%;
        margin: 0;
        text-align: left;
    }

    .end-title {
        margin: 0;
        color: var(--m-ink);
        font-family: var(--m-sans);
        font-size: clamp(2.4rem, 11vw, 3.3rem);
        font-weight: 600;
        letter-spacing: -0.05em;
        line-height: 1;
    }

    .end-lead {
        max-width: none;
        margin: 18px 0 32px;
        color: var(--m-muted);
        font-size: 13.5px;
        line-height: 1.8;
    }

    .end-heading {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 28px 0 0;
        padding: 7px 0;
        border-top: 1px solid var(--m-line);
        border-bottom: 1px solid var(--m-line);
        color: var(--m-muted);
        font-family: var(--m-mono);
        font-size: 9px;
        font-weight: 500;
        letter-spacing: 0.16em;
        line-height: 1.4;
        text-transform: uppercase;
    }

    .end-heading::before {
        content: "";
        flex: 0 0 5px;
        width: 5px;
        height: 5px;
        background: var(--m-ink);
    }

    .end-heading::after {
        content: "";
        flex: 1 1 auto;
        height: 1px;
        background: var(--m-line);
    }

    .end-list {
        max-width: none;
        margin: 0;
        padding: 0;
        color: var(--m-ink);
        font-size: 13.5px;
        line-height: 1.7;
    }

    .end-list li {
        padding: 10px 0 10px 18px;
        border-bottom: 1px solid var(--m-line);
    }

    .end-list li::before {
        content: "—";
        color: var(--m-faint);
    }

    .end-contact {
        display: block;
        justify-content: flex-start;
        margin: 0 auto;
        padding: 0;
        list-style: none;
    }

    .end-contact li {
        border-bottom: 1px solid var(--m-line);
    }

    .contact-list {
        gap: 0;
        font-size: 13.5px;
    }

    .contact-list a,
    .content-end .contact-list a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 11px 0;
        color: var(--m-ink);
        text-decoration: none;
    }

    .contact-list a::after {
        content: "↗";
        color: var(--m-faint);
        font-family: var(--m-mono);
        font-size: 11px;
    }

    .contact-list a:hover {
        text-decoration: underline;
        text-decoration-color: var(--m-line-strong);
        text-underline-offset: 4px;
    }

    .end-posts {
        margin: 28px 0 0;
    }

    .end-posts-link {
        display: flex;
        width: 100%;
        gap: 10px;
        padding: 12px 0;
        border: 0;
        border-top: 1px solid var(--m-line);
        border-bottom: 1px solid var(--m-line);
        border-radius: 0;
        color: var(--m-muted);
        font-family: var(--m-mono);
        font-size: 10px;
        letter-spacing: 0.12em;
    }

    .end-posts-label {
        flex: 0 0 auto;
        font-size: 10px;
    }

    .end-posts-text {
        color: var(--m-ink);
        font-family: var(--m-sans);
        font-size: 12.5px;
        letter-spacing: 0;
        line-height: 1.5;
    }

    .end-posts-arrow {
        margin-left: auto;
        color: var(--m-faint);
        font-size: 12px;
    }

    .end-posts-link:hover {
        background: transparent;
    }

    .end-copy {
        margin: 40px 0 0;
        color: var(--m-faint);
        font-family: var(--m-mono);
        font-size: 9px;
        letter-spacing: 0.1em;
        line-height: 1.8;
        text-transform: uppercase;
    }

    /* ---------- 帖子页 ---------- */

    html.posts-page,
    body.posts-page {
        height: auto;
        min-height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
        background: var(--m-paper);
    }

    body.posts-page {
        padding-top: var(--m-nav-height);
    }

    .posts-main {
        display: block;
        width: 100%;
        margin: 0;
        padding: 28px var(--m-edge) 96px;
    }

    .posts-card {
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .posts-heading {
        margin: 0 0 10px;
        font-family: var(--m-sans);
        font-size: clamp(2rem, 9vw, 2.6rem);
        font-weight: 600;
        letter-spacing: -0.04em;
        line-height: 1.05;
    }

    .posts-intro {
        margin: 0;
        color: var(--m-muted);
        font-size: 13.5px;
        line-height: 1.75;
    }

    .posts-list {
        display: block;
        margin-top: 22px;
        border-top: 1px solid var(--m-line-strong);
    }

    .post-item {
        padding: 16px 0;
        border: 0;
        border-bottom: 1px solid var(--m-line);
        border-radius: 0;
        background: transparent;
    }

    .post-meta {
        margin-bottom: 8px;
        color: var(--m-faint);
        font-family: var(--m-mono);
        font-size: 9px;
        letter-spacing: 0.06em;
        line-height: 1.6;
        text-transform: uppercase;
    }

    .post-name {
        color: var(--m-ink);
        font-weight: 600;
    }

    .post-content {
        color: var(--m-ink);
        font-size: 13.5px;
        line-height: 1.7;
    }

    .posts-empty {
        margin: 0;
        padding: 18px 0;
        color: var(--m-faint);
        font-family: var(--m-mono);
        font-size: 9.5px;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .cf-turnstile {
        min-height: 65px;
    }

    /* 表单 */
    .post-form {
        gap: 20px;
        margin-top: 24px;
    }

    .post-field {
        gap: 6px;
        color: var(--m-faint);
        font-family: var(--m-mono);
        font-size: 9px;
        letter-spacing: 0.1em;
        text-transform: uppercase;
    }

    .post-field input,
    .post-field textarea {
        padding: 10px 0;
        border: 0;
        border-bottom: 1px solid var(--m-line-strong);
        border-radius: 0;
        background: transparent;
        color: var(--m-ink);
        font-family: var(--m-sans);
        font-size: 15px;
        letter-spacing: 0;
        text-transform: none;
    }

    .post-field textarea {
        min-height: 132px;
    }

    .post-field input::placeholder,
    .post-field textarea::placeholder {
        color: var(--m-faint);
    }

    .post-field input:focus-visible,
    .post-field textarea:focus-visible {
        outline: 0;
        border-bottom-color: var(--m-ink);
        box-shadow: none;
    }

    .post-actions {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .post-submit {
        width: 100%;
        min-height: 48px;
        padding: 13px 18px;
        border: 1px solid var(--m-ink);
        border-radius: 0;
        background: var(--m-ink);
        color: var(--m-paper);
        font-family: var(--m-mono);
        font-size: 10.5px;
        letter-spacing: 0.14em;
        text-transform: uppercase;
    }

    .post-submit:hover {
        opacity: 0.82;
    }

    .post-submit:disabled {
        opacity: 0.5;
    }

    .post-status {
        color: var(--m-muted);
        font-family: var(--m-mono);
        font-size: 9.5px;
        line-height: 1.6;
    }

    /* 悬浮按钮：方形反白块 */
    .post-fab {
        right: var(--m-edge);
        bottom: var(--m-edge);
        min-height: 44px;
        gap: 8px;
        padding: 12px 16px;
        border: 1px solid var(--m-ink);
        border-radius: 0;
        background: var(--m-ink);
        box-shadow: none;
        color: var(--m-paper);
        font-family: var(--m-mono);
        font-size: 10px;
        font-weight: 500;
        letter-spacing: 0.14em;
        text-transform: uppercase;
    }

    .post-fab:hover {
        opacity: 0.82;
    }

    .post-fab svg {
        width: 14px;
        height: 14px;
    }

    /* 弹窗：整屏纸面 + 直角边框 */
    html.post-dialog-open,
    body.post-dialog-open {
        overflow: hidden;
    }

    .post-dialog {
        padding: 0;
        place-items: end stretch;
    }

    .post-dialog-backdrop {
        background: rgba(16, 16, 20, 0.5);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .post-dialog-panel {
        width: 100%;
        max-height: 92vh;
        max-height: 92dvh;
        padding: 0 var(--m-edge) 32px;
        overflow-y: auto;
        border: 0;
        border-top: 1px solid var(--m-line-strong);
        border-radius: 0;
        background: var(--m-paper);
    }

    .post-dialog-head {
        gap: 12px;
        margin: 0;
        padding: 20px 0 0;
    }

    .post-dialog-head .section-kicker {
        margin-bottom: 12px;
    }

    .post-dialog .posts-intro {
        margin: 0;
    }

    .post-dialog-close {
        width: 44px;
        height: 44px;
        border: 1px solid var(--m-line-strong);
        border-radius: 0;
        color: var(--m-ink);
        font-size: 1.25rem;
    }

    .post-dialog-close:hover {
        background: var(--m-invert);
        color: var(--m-invert-fg);
    }

    /* ---------- 通用细节 ---------- */

    a,
    button,
    input,
    textarea {
        -webkit-tap-highlight-color: transparent;
    }

    a:focus-visible,
    button:focus-visible,
    input:focus-visible,
    textarea:focus-visible {
        outline: 1px solid var(--m-ink);
        outline-offset: 2px;
    }

    ::selection {
        background: var(--m-ink);
        color: var(--m-paper);
    }

    @media (prefers-reduced-motion: reduce) {
        html {
            scroll-behavior: auto;
        }

        *,
        *::before,
        *::after {
            transition-duration: 0.01ms !important;
            animation-duration: 0.01ms !important;
        }
    }
}

@media (max-width: 380px) {
    :root {
        --m-edge: 14px;
    }

    .nav-brand {
        padding: 0 9px;
        font-size: 9px;
        letter-spacing: 0.12em;
    }

    .nav-links a {
        padding: 0 5px;
        font-size: 8.5px;
        letter-spacing: 0.06em;
    }

    .theme-toggle {
        width: 38px;
    }

    .nav-links li.nav-theme {
        flex-basis: 38px;
    }

    .hero-foot span {
        font-size: 8px;
        letter-spacing: 0.06em;
    }

    .project-card {
        grid-template-columns: 22px minmax(0, 1fr);
        column-gap: 10px;
    }
}
