:root {
    --bg: #f7f7f5;
    --panel: #ffffff;
    --text: #222426;
    --muted: #7b7f86;
    --line: #e8e4dc;
    --soft: #f2efe9;
    --primary: #1f2937;
    --danger: #a53a3a;
    --ok: #2f7a50;
    --shadow: 0 18px 60px rgba(22, 22, 20, .06);
    --radius-lg: 22px;
    --radius-md: 12px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
}

* { box-sizing: border-box; }
html {
    width: 100%;
    min-width: 320px;
    font-size: 13px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    touch-action: pan-x pan-y;
}
body {
    width: 100%;
    min-width: 320px;
    touch-action: pan-x pan-y;
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    color: var(--text);
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
}

img, svg, video, canvas { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(52px + var(--safe-top)) calc(20px + var(--safe-right)) calc(52px + var(--safe-bottom)) calc(20px + var(--safe-left));
}

.auth-shell { width: min(440px, 100%); }
.install-shell { width: min(760px, 100%); }

.auth-card, .panel, .blank-panel, .front-card {
    width: 100%;
    background: rgba(255,255,255,.88);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.auth-card { padding: 34px; }
.auth-card.compact { padding: 36px 34px; }
.auth-title-wrap { margin-bottom: 26px; }
.eyebrow {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: 20px;
    line-height: 1.35;
    font-weight: 600;
    letter-spacing: .02em;
    overflow-wrap: anywhere;
}

.muted { margin: 10px 0 0; color: var(--muted); font-size: 12px; }

form { margin: 0; }
label { display: block; margin-bottom: 16px; }
label span {
    display: block;
    margin-bottom: 7px;
    color: #555b62;
    font-size: 12px;
}

input, select {
    width: 100%;
    max-width: 100%;
    height: 38px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    color: var(--text);
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease;
}

input:focus, select:focus {
    border-color: #b9b2a6;
    box-shadow: 0 0 0 4px rgba(120, 110, 95, .08);
}

.form-grid.two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,0,0,.05); }
.btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn.full { width: 100%; }

.alert {
    margin: 0 0 18px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    font-size: 12px;
    border: 1px solid transparent;
    overflow-wrap: anywhere;
}
.alert-error { color: var(--danger); background: #fff5f4; border-color: #f1d2cf; }
.alert-success { color: var(--ok); background: #f2fbf5; border-color: #cce9d6; }

.admin-page { background: #f8f7f4; }
.admin-layout {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
}
.sidebar {
    min-width: 0;
    padding: 30px 22px;
    border-right: 1px solid var(--line);
    background: rgba(255,255,255,.56);
}
.sidebar-head {
    min-width: 0;
}
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 32px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255,255,255,.76);
    color: var(--text);
    font-size: 12px;
    cursor: pointer;
}
.nav-toggle-icon {
    width: 13px;
    height: 10px;
    position: relative;
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
}
.nav-toggle-icon i {
    display: block;
    height: 1px;
    width: 100%;
    border-radius: 99px;
    background: currentColor;
    transition: transform .18s ease, opacity .18s ease;
}
.sidebar.is-open .nav-toggle-icon i:first-child { transform: translateY(4.5px) rotate(45deg); }
.sidebar.is-open .nav-toggle-icon i:last-child { transform: translateY(-4.5px) rotate(-45deg); }
.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 36px;
    margin-bottom: 38px;
    font-weight: 600;
    font-size: 13px;
    min-width: 0;
}
.brand span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.brand-dot {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 99px;
    background: var(--primary);
}
.nav { display: grid; gap: 7px; }
.nav form { min-width: 0; }
.nav a, .nav button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: #5d6268;
    text-align: left;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
}
.nav a:hover, .nav button:hover { background: var(--soft); color: var(--text); }
.nav a.active { background: #ebe7df; color: var(--text); }
.main {
    min-width: 0;
    padding: 38px 46px;
}
.main.narrow { max-width: 680px; }
.admin-user {
    flex: 0 0 auto;
    max-width: 45vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: #fff;
    font-size: 12px;
}
.panel { padding: 28px; }
.panel-title {
    margin: 0 0 22px;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 600;
}
.blank-panel {
    min-height: 360px;
    padding: 32px;
    display: flex;
    align-items: flex-start;
    color: var(--muted);
    font-size: 12px;
}
.blank-panel p { margin: 0; }

.front-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(40px + var(--safe-top)) calc(20px + var(--safe-right)) calc(40px + var(--safe-bottom)) calc(20px + var(--safe-left));
}
.front-shell { width: min(720px, 100%); }
.front-card { padding: 48px; }
.front-card h1 { font-size: 28px; }
.front-card p:not(.eyebrow) {  color: var(--muted); }
.front-actions { margin-top: 26px; }

@media (max-width: 980px) {
    .admin-layout { grid-template-columns: 188px minmax(0, 1fr); }
    .main { padding: 34px 34px; }
}

@media (max-width: 760px) {
    html { font-size: 13px; }
    .auth-page {
        align-items: flex-start;
        padding: calc(24px + var(--safe-top)) calc(14px + var(--safe-right)) calc(28px + var(--safe-bottom)) calc(14px + var(--safe-left));
    }
    .form-grid.two { grid-template-columns: 1fr; gap: 0; }
    .admin-layout {
        display: block;
        min-height: 100vh;
        min-height: 100dvh;
    }
    .sidebar {
        position: sticky;
        top: 0;
        z-index: 10;
        width: 100%;
        min-height: 0;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: calc(8px + var(--safe-top)) calc(14px + var(--safe-right)) 8px calc(14px + var(--safe-left));
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        background: rgba(255,255,255,.92);
    }
    .sidebar-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        height: 38px;
        min-height: 38px;
    }
    .brand {
        height: 30px;
        min-height: 30px;
        margin-bottom: 0;
        font-size: 13px;
        letter-spacing: .01em;
    }
    .brand-dot { display: none; }
    .nav-toggle { display: inline-flex; }
    .nav {
        display: grid;
        grid-template-columns: 1fr;
        gap: 6px;
        max-height: 0;
        margin-top: 0;
        padding-top: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        border-top: 0 solid transparent;
        transition: max-height .22s ease, margin-top .22s ease, padding-top .22s ease, opacity .16s ease, border-color .22s ease;
    }
    .sidebar.is-open .nav {
        max-height: 240px;
        margin-top: 8px;
        padding-top: 8px;
        opacity: 1;
        pointer-events: auto;
        border-top: 1px solid var(--line);
    }
    .nav a, .nav button {
        min-height: 36px;
        padding: 0 13px;
        justify-content: flex-start;
        background: transparent;
        border: 0;
        font-size: 12px;
    }
    .nav a.active { background: var(--soft); border-color: transparent; }
    .main {
        width: 100%;
        padding: 20px calc(16px + var(--safe-right)) calc(36px + var(--safe-bottom)) calc(16px + var(--safe-left));
    }
    .main.narrow { max-width: none; }
    .auth-card, .panel, .front-card {
        padding: 24px;
        border-radius: 18px;
    }
    .blank-panel {
        min-height: 260px;
        padding: 24px;
        border-radius: 18px;
    }
}

@media (max-width: 520px) {
    .auth-page, .front-page {
        padding-left: calc(12px + var(--safe-left));
        padding-right: calc(12px + var(--safe-right));
    }
    .auth-card, .auth-card.compact, .front-card, .panel {
        padding: 20px;
    }
    .auth-title-wrap { margin-bottom: 22px; }
    h1 { font-size: 18px; }
    .front-card h1 { font-size: 22px; }
    .front-card p:not(.eyebrow) { font-size: 12px; }
    label { margin-bottom: 14px; }
    .btn {
        min-height: 40px;
        padding: 0 14px;
    }
    input, select {
        height: 40px;
        min-height: 40px;
        font-size: 16px;
    }
    label span, .muted, .alert, .admin-user, .blank-panel { font-size: 12px; }
    .admin-user { max-width: 38vw; }
}

@media (max-width: 380px) {
    .auth-card, .auth-card.compact, .front-card, .panel, .blank-panel {
        padding: 18px;
        border-radius: 16px;
    }
    .sidebar { padding-left: calc(10px + var(--safe-left)); padding-right: calc(10px + var(--safe-right)); }
    .main { padding-left: calc(12px + var(--safe-left)); padding-right: calc(12px + var(--safe-right)); }
    .nav a, .nav button { min-height: 34px; padding: 0 11px; }
    .nav-toggle { min-height: 30px; padding: 0 10px; }
    .eyebrow { font-size: 10px; }
    h1 { font-size: 17px; }
}

select {
    appearance: none;
    -webkit-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #8b8f95 50%), linear-gradient(135deg, #8b8f95 50%, transparent 50%);
    background-position: calc(100% - 17px) 16px, calc(100% - 12px) 16px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.form-grid.three {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, .9fr) 120px;
    gap: 0 18px;
    align-items: end;
}

.check-line {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
    color: #555b62;
    font-size: 12px;
}
.check-line input {
    width: 15px;
    height: 15px;
    min-height: 15px;
    padding: 0;
    margin: 0;
}
.check-line span { margin: 0; }
.hidden { display: none !important; }
.panel-stack { display: grid; gap: 18px; }
.section-title {
    margin: 0 0 18px;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 600;
}
.empty-text { margin: 0; color: var(--muted); font-size: 12px; }
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 660px; }
.admin-table th, .admin-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
    font-size: 12px;
}
.admin-table th { color: var(--muted); font-weight: 500; }
.admin-table td strong { font-weight: 600; }
.badge, .status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 12px;
    border: 1px solid var(--line);
    background: #fff;
    color: #5d6268;
}
.status.on { color: var(--ok); background: #f2fbf5; border-color: #cce9d6; }
.status.off { color: #7b7f86; background: #f6f5f1; }
.text-link { color: #2f5f92; }
.text-link:hover { text-decoration: underline; }
.inline-form { display: inline; }
.btn.small { min-height: 30px; padding: 0 12px; font-size: 12px; }
.front-category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}
.front-category-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255,255,255,.72);
    color: #444a50;
    font-size: 12px;
}
.front-category-nav a:hover { background: var(--soft); color: var(--text); }

@media (max-width: 760px) {
    .form-grid.three { grid-template-columns: 1fr; gap: 0; }
    .admin-table { min-width: 560px; }
    .sidebar.is-open .nav { max-height: 300px; }
}

@media (max-width: 520px) {
    select { height: 40px; min-height: 40px; font-size: 16px; }
    .front-category-nav { gap: 8px; }
    .front-category-nav a { width: 100%; justify-content: center; }
}

.panel-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}
.panel-title.compact { margin-bottom: 0; }
.modal {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: none;
    align-items: center;
    justify-content: center;
    padding: calc(18px + var(--safe-top)) calc(18px + var(--safe-right)) calc(18px + var(--safe-bottom)) calc(18px + var(--safe-left));
}
.modal.is-open { display: flex; }
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(32, 34, 36, .28);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.modal-card {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    max-height: calc(100vh - 42px);
    overflow-y: auto;
    background: rgba(255,255,255,.96);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(20, 20, 18, .16);
    padding: 22px;
}
.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}
.modal-head h2 {
    margin: 0;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 600;
}
.modal-close {
    width: 30px;
    height: 30px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    cursor: pointer;
    line-height: 1;
}
.modal-close:hover { color: var(--text); background: var(--soft); }
body.modal-lock { overflow: hidden; }

@media (max-width: 520px) {
    .panel-head-row { margin-bottom: 18px; }
    .modal { align-items: flex-end; padding: 10px; }
    .modal-card {
        width: 100%;
        max-height: calc(100dvh - 20px);
        border-radius: 18px;
        padding: 20px;
    }
}

.row-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.btn.danger {
    color: var(--danger);
    border-color: #ead0cc;
    background: #fff8f7;
}
.btn.danger:hover {
    background: #fff1ef;
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 20px;
}
.category-filter a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: #555b62;
    font-size: 12px;
}
.category-filter a.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.category-filter em { font-style: normal; font-size: 10px; opacity: .72; }
.article-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, 220px);
    gap: 18px;
    align-items: start;
}
.article-row {
    width: 220px;
    height: 300px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255,255,255,.78);
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    cursor: pointer;
}
.article-row:hover {
    transform: translateY(-2px);
    border-color: rgba(24, 92, 182, .28);
    box-shadow: 0 16px 34px rgba(15, 23, 42, .08);
}
.article-card-main {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 28px;
    color: inherit;
    text-decoration: none;
}
.article-thumb {
    width: 198px;
    height: 198px;
    flex: 0 0 198px;
    border-radius: 14px;
    background: var(--soft);
    overflow: hidden;
}
.article-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-meta { min-width: 0; display: grid; gap: 4px; }
.article-meta h2 {
    margin: 0;
    min-height: 36px;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.article-card-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
}
.article-meta p { margin: 0; color: var(--muted); font-size: 11px; }
.article-row .row-actions {
    position: absolute;
    right: 10px;
    bottom: 10px;
    margin-top: 0;
    justify-content: flex-end;
    gap: 6px;
    z-index: 2;
}
.article-row .row-actions form { display: inline-flex; }
.article-row .row-actions .btn {
    height: 24px;
    padding: 0 8px;
    font-size: 11px;
}
.article-row.is-recommended {
    border-color: rgba(47, 122, 80, .28);
    box-shadow: 0 14px 32px rgba(47, 122, 80, .08);
}
.recommend-toggle-form {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    margin: 0;
}
.recommend-toggle-button,
.recommend-status-disabled {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 7px;
    border: 1px solid rgba(232, 228, 220, .88);
    border-radius: 999px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
    font-size: 12px;
    line-height: 1;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.recommend-toggle-button.is-off,
.recommend-status-disabled {
    color: #8a9097;
}
.recommend-toggle-button.is-on {
    color: var(--ok);
    border-color: rgba(47, 122, 80, .24);
    background: rgba(247, 252, 248, .94);
}
.recommend-toggle-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
}
.recommend-status-disabled {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    cursor: not-allowed;
    opacity: .72;
}
.article-status-pill {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(255,255,255,.9);
    border: 1px solid rgba(232, 228, 220, .88);
    color: #7b828a;
    font-size: 11px;
    line-height: 1;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .05);
}
.article-status-pill.status-published { color: var(--ok); }
.article-status-pill.status-offline { color: #a05a32; }
.article-status-pill.status-draft { color: #8a9097; }
.lazy-load-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 22px;
}
.lazy-load-status {
    color: var(--muted);
    font-size: 12px;
}
.article-main { max-width: 980px; }
.main.article-main { margin: 0 auto; }
.article-form { display: grid; gap: 18px; }
.article-save-actions {
    align-items: flex-end;
    gap: 10px;
}
.article-status-select {
    display: inline-block;
    margin-bottom: 0;
    min-width: 128px;
}
.article-status-select select {
    height: 36px;
    min-height: 36px;
    padding: 0 30px 0 12px;
}
.upload-block {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    background: rgba(255,255,255,.64);
}
.upload-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.upload-head strong { font-size: 13px; font-weight: 600; }
.upload-head span { color: var(--muted); font-size: 12px; }
.file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.upload-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    margin: 0 0 12px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    font-size: 12px;
    cursor: pointer;
}
.thumb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
    gap: 10px;
}
.thumb-grid.single { grid-template-columns: minmax(86px, 150px); }
.thumb-item {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    overflow: hidden;
    background: var(--soft);
    border: 1px solid var(--line);
}
.thumb-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-item button {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 999px;
    background: rgba(26, 27, 28, .66);
    color: #fff;
    cursor: pointer;
    line-height: 1;
}
.editor-field > span {
    display: block;
    margin-bottom: 7px;
    color: #555b62;
    font-size: 12px;
}
.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
    background: #fff;
}
.editor-toolbar button {
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--soft);
    color: #4c5258;
    font-size: 12px;
    cursor: pointer;
}
.editor-box {
    min-height: 260px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 0 0 14px 14px;
    background: #fff;
    outline: none;
    overflow-wrap: anywhere;
}
.editor-box:focus { box-shadow: 0 0 0 4px rgba(120, 110, 95, .08); }
.editor-textarea { display: none; }
.editor-textarea.is-fallback {
    display: block;
    width: 100%;
    min-height: 220px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
}
.form-actions { display: flex; justify-content: flex-end; }
.front-article-list { display: grid; gap: 12px; margin-top: 24px; }
.front-article-card {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.7);
}
.front-article-cover {
    display: block;
    width: 78px;
    height: 56px;
    border-radius: 10px;
    background: var(--soft);
    overflow: hidden;
}
.front-article-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.front-article-card strong {
    display: block;
    font-size: 13px;
    line-height: 1.45;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.front-article-card em { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; font-style: normal; }
.article-front-page { align-items: flex-start; }
.article-front-shell { width: min(880px, 100%); }
.article-detail h1 { margin-bottom: 22px; }
.article-cover {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 18px;
    margin: 18px 0;
}
.article-main-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin: 18px 0;
}
.article-main-images img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--line);
}
.article-content {
    margin-top: 22px;
    line-height: 1.85;
    overflow-wrap: anywhere;
}
.article-content p { margin: 0 0 1em; }
.article-content h2, .article-content h3, .article-content h4 { margin: 1.4em 0 .7em; }
.article-content blockquote {
    margin: 1em 0;
    padding: 10px 14px;
    border-left: 3px solid var(--line);
    background: var(--soft);
    border-radius: 10px;
}

@media (max-width: 760px) {
    .category-filter { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
    .category-filter a { flex: 0 0 auto; }
    .article-list { grid-template-columns: 1fr; gap: 16px; justify-items: stretch; }
    .article-row { width: 100%; height: auto; min-height: 0; aspect-ratio: 220 / 300; padding: clamp(10px, 3vw, 16px); border-radius: 20px; }
    .article-card-main { flex: 1 1 auto; padding-bottom: 34px; }
    .article-thumb { width: 100%; height: auto; aspect-ratio: 1 / 1; flex: 0 0 auto; }
    .article-meta h2 { font-size: 14px; }
    .article-card-stats { font-size: 12px; gap: 10px; }
    .article-meta p { font-size: 12px; }
    .upload-head { display: block; }
    .upload-head span { display: block; margin-top: 4px; }
    .thumb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .form-actions { justify-content: stretch; }
    .form-actions .btn { width: 100%; }
    .article-save-actions { display: grid; grid-template-columns: 1fr; }
    .article-status-select { width: 100%; }
}
    margin-bottom: 0;

@media (max-width: 520px) {
    .front-article-card { grid-template-columns: 64px minmax(0, 1fr); }
    .front-article-cover { width: 64px; height: 48px; }
    .editor-box { min-height: 220px; }
    .thumb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}
.row-actions form { margin: 0; }
.btn.danger {
    color: #b42318;
    border-color: #f3b6af;
    background: #fff7f6;
}
.btn.danger:hover { background: #fff1ef; }
.panel-note {
    font-size: 12px;
    color: var(--muted);
}
.cleanup-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}
.cleanup-card > div {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255,255,255,.7);
}
.cleanup-card strong {
    display: block;
    font-size: 24px;
    line-height: 1;
    margin-bottom: 8px;
}
.cleanup-card span {
    color: var(--muted);
    font-size: 12px;
}
.mini-list {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}
.mini-list div {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255,255,255,.55);
    font-size: 12px;
}
.mini-list span { color: var(--muted); }
.mini-list em {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-style: normal;
}

@media (max-width: 760px) {
    .article-row .row-actions { justify-content: flex-end; }
    .cleanup-card { grid-template-columns: 1fr; }
}

.article-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 18px 0;
}
.switch-line {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.65);
}
.switch-line input { margin-top: 2px; width: 16px; height: 16px; }
.switch-line span { display: grid; gap: 4px; }
.switch-line strong { font-size: 13px; }
.switch-line em { font-style: normal; color: var(--muted); font-size: 12px; line-height: 1.5; }
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    border: 1px solid var(--line);
    margin: 10px 0;
}
.interaction-card {
    margin-top: 24px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255,255,255,.72);
}
.interaction-card h2 {
    margin: 0 0 14px;
    font-size: 15px;
}
.reaction-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.reaction-bar form { margin: 0; }
.comment-form {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}
.comment-form input,
.comment-form textarea {
    width: 100%;
}
.comment-form textarea {
    min-height: 96px;
    resize: vertical;
}
.comment-list {
    display: grid;
    gap: 10px;
}
.comment-item {
    padding: 12px 0;
    border-top: 1px solid var(--line);
}
.comment-item strong {
    display: inline-block;
    font-size: 13px;
    margin-right: 8px;
}
.comment-item time {
    color: var(--muted);
    font-size: 12px;
}
.comment-item p {
    margin: 8px 0 0;
    line-height: 1.7;
    color: var(--text);
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    .article-options { grid-template-columns: 1fr; }
}

.address-picker {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    background: rgba(255,255,255,.65);
}
.address-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.address-head strong {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
}
.address-head span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}
.inline-switch {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 12px;
}
.inline-switch input {
    width: auto;
    min-height: 0;
    height: auto;
}
.inline-switch em {
    font-style: normal;
}
.address-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 0 0 auto;
}
.map-modal .modal-card {
    width: min(780px, 100%);
}
.map-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-bottom: 12px;
}
.map-canvas {
    width: 100%;
    height: 380px;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    background: var(--soft);
}
.map-canvas * {
    box-sizing: content-box;
}
.map-canvas img {
    max-width: none !important;
    height: auto !important;
}
.map-selected {
    margin: 12px 0 16px;
    color: var(--muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    .address-head {
        display: grid;
        gap: 12px;
    }
    .address-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }
    .address-actions .btn {
        width: 100%;
    }
    .map-search {
        grid-template-columns: 1fr;
    }
    .map-canvas {
        height: 52vh;
        min-height: 300px;
    }
}


.article-type-options {
    display: grid;
    gap: 12px;
}
.article-type-card {
    display: block;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    color: var(--text);
    text-decoration: none;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.article-type-card:hover {
    border-color: #d8cfc4;
    background: #fffdf9;
    transform: translateY(-1px);
}
.article-type-card strong {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 650;
}
.article-type-card span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.7;
}

.thumb-grid.single .thumb-item {
    aspect-ratio: 1 / 1;
}
.crop-modal .modal-card {
    width: min(520px, 100%);
}
.crop-card {
    user-select: none;
}
.crop-viewport {
    position: relative;
    width: 320px;
    height: 320px;
    max-width: calc(100vw - 58px);
    max-height: calc(100vw - 58px);
    margin: 0 auto 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--soft);
    cursor: grab;
    touch-action: none;
}
.crop-viewport:active {
    cursor: grabbing;
}
.crop-viewport::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255,255,255,.72);
    box-shadow: inset 0 0 0 999px rgba(0,0,0,.04);
    pointer-events: none;
}
.crop-viewport img {
    position: absolute;
    left: 0;
    top: 0;
    max-width: none !important;
    transform-origin: 0 0;
    will-change: transform;
    -webkit-user-drag: none;
    user-select: none;
}
.crop-control {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 12px;
}
.crop-control input {
    width: 100%;
}
.crop-note {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}
@media (max-width: 760px) {
    .crop-modal .modal-card {
        border-radius: 20px 20px 0 0;
    }
    .crop-viewport {
        width: min(320px, calc(100vw - 42px));
        height: min(320px, calc(100vw - 42px));
    }
}

.form-hint {
    display: block;
    margin-top: 7px;
    font-size: 12px;
    line-height: 1.6;
    color: #8a94a6;
}

.favicon-preview {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: -2px 0 18px;
    padding: 8px 10px;
    border: 1px solid #edf0f5;
    border-radius: 14px;
    background: #fafbfc;
    color: #667085;
    font-size: 12px;
}

.favicon-preview img {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(17, 24, 39, .06);
}

.copy-protect-enabled .copy-protect-content {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
.copy-protect-enabled .copy-protect-content input,
.copy-protect-enabled .copy-protect-content textarea,
.copy-protect-enabled .copy-protect-content select,
.copy-protect-enabled .copy-protect-content button,
.copy-protect-enabled .copy-protect-content a,
.copy-protect-enabled .copy-protect-content .allow-interaction,
.copy-protect-enabled .copy-protect-content .allow-interaction *,
.copy-protect-enabled .copy-protect-content .carousel,
.copy-protect-enabled .copy-protect-content .carousel *,
.copy-protect-enabled .copy-protect-content .swiper,
.copy-protect-enabled .copy-protect-content .swiper *,
.copy-protect-enabled .copy-protect-content .map,
.copy-protect-enabled .copy-protect-content .map *,
.copy-protect-enabled .copy-protect-content .map-canvas,
.copy-protect-enabled .copy-protect-content .map-canvas * {
    -webkit-user-select: auto;
    user-select: auto;
    -webkit-touch-callout: default;
}
.copy-protect-enabled .copy-protect-content img {
    -webkit-user-drag: none;
    user-drag: none;
}

.category-header-preview {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 7;
    margin: 0 0 10px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--soft);
}
.category-header-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.field-tip {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 11px;
    font-style: normal;
}
.category-header-image {
    display: block;
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    margin: 20px 0 14px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: var(--soft);
}
.category-intro {
    max-width: 640px;
    margin: 0 auto 18px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
    white-space: pre-line;
}

.modal textarea {
    width: 100%;
    max-width: 100%;
    min-height: 92px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    color: var(--text);
    outline: none;
    resize: vertical;
}
.modal textarea:focus {
    border-color: #b9b2a6;
    box-shadow: 0 0 0 4px rgba(120, 110, 95, .08);
}

/* Front home */
.site-home-page {
    min-height: 100vh;
    min-height: 100dvh;
    background: #f8f7f4;
    color: var(--text);
}
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 68px;
    padding: calc(14px + var(--safe-top)) calc(42px + var(--safe-right)) 14px calc(42px + var(--safe-left));
    border-bottom: 1px solid rgba(232, 228, 220, .85);
    background: rgba(248, 247, 244, .9);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}
.site-logo {
    min-width: 0;
    color: var(--text);
    font-size: 18px;
    line-height: 1.2;
    font-weight: 650;
    letter-spacing: .02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.site-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #5d6268;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
    transition: background .16s ease, color .16s ease;
}
.site-nav a:hover { background: #ebe7df; color: var(--text); }
.site-home-main {
    width: min(1280px, 100%);
    margin: 0 auto;
    padding: 54px 42px 72px;
}
.home-section-head {
    margin-bottom: 24px;
}
.home-section-head h1 {
    font-size: 24px;
    letter-spacing: .01em;
}
.home-empty {
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255,255,255,.62);
    color: var(--muted);
    font-size: 12px;
}
.home-recommend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 300px);
    gap: 24px;
    align-items: start;
}
.home-article-card {
    width: 300px;
    height: 380px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255,255,255,.78);
    box-shadow: 0 14px 36px rgba(15, 23, 42, .055);
    overflow: hidden;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.home-article-card:hover {
    transform: translateY(-3px);
    border-color: rgba(24, 92, 182, .22);
    box-shadow: 0 20px 44px rgba(15, 23, 42, .09);
}
.home-article-cover {
    display: block;
    width: 276px;
    height: 276px;
    flex: 0 0 276px;
    border-radius: 17px;
    background: var(--soft);
    overflow: hidden;
}
.home-article-cover img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.home-article-info {
    min-width: 0;
    display: grid;
    gap: 6px;
}
.home-article-info strong {
    display: -webkit-box;
    min-height: 38px;
    margin: 0;
    color: var(--text);
    font-size: 14px;
    line-height: 1.35;
    font-weight: 650;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.home-article-reactions {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #606771;
    font-size: 12px;
    line-height: 1.2;
}
.home-article-info time {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.2;
}

@media (max-width: 760px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        min-height: 0;
        padding: calc(12px + var(--safe-top)) calc(16px + var(--safe-right)) 12px calc(16px + var(--safe-left));
    }
    .site-logo { width: 100%; font-size: 16px; }
    .site-nav {
        width: 100%;
        justify-content: flex-start;
        padding-bottom: 2px;
    }
    .site-home-main {
        padding: 28px 16px 48px;
    }
    .home-section-head { margin-bottom: 18px; }
    .home-section-head h1 { font-size: 21px; }
    .home-recommend-grid {
        grid-template-columns: 1fr;
        gap: 18px;
        justify-items: stretch;
    }
    .home-article-card {
        width: 100%;
        height: auto;
        min-height: 0;
        aspect-ratio: 300 / 380;
        padding: clamp(10px, 3.2vw, 14px);
    }
    .home-article-cover {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        flex: 0 0 auto;
    }
}

/* Front home xhs refresh */
.site-home-page { background: #fff; color: var(--text); }
.site-home-page a { text-decoration: none; }
.site-header { position: sticky; top: 0; z-index: 30; display: block; min-height: 0; padding: 0; border-bottom: 1px solid rgba(238,238,238,.92); background: rgba(255,255,255,.94); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.site-header-inner { width: min(1480px, 100%); min-height: 66px; margin: 0 auto; padding: calc(12px + var(--safe-top)) calc(34px + var(--safe-right)) 12px calc(34px + var(--safe-left)); display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.site-logo { min-width: 0; max-width: 280px; color: #1f2329; font-size: 18px; line-height: 1.2; font-weight: 700; letter-spacing: .01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-nav { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { flex: 0 0 auto; min-height: 36px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; color: #666b73; font-size: 14px; line-height: 1; font-weight: 520; white-space: nowrap; transition: background .16s ease, color .16s ease, transform .16s ease; }
.site-nav a.is-active, .site-nav a:hover { background: #f5f5f5; color: #17191c; }
.site-nav a:hover { transform: translateY(-1px); }
.site-menu-toggle { display: none; flex: 0 0 auto; min-height: 34px; padding: 0 12px; align-items: center; gap: 7px; border: 1px solid #e6e2dc; border-radius: 999px; background: #fff; color: #222; font-size: 12px; line-height: 1; box-shadow: 0 8px 20px rgba(15, 23, 42, .06); }
.site-menu-toggle i { position: relative; width: 13px; height: 9px; display: inline-block; border-top: 1px solid currentColor; border-bottom: 1px solid currentColor; }
.site-menu-toggle i::after { content: ""; position: absolute; left: 0; top: 3px; width: 13px; border-top: 1px solid currentColor; }
.site-home-main { width: min(1480px, 100%); margin: 0 auto; padding: 26px 34px 72px; }
.home-section-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 18px; }
.home-section-head .eyebrow { display: none; }
.home-section-pill { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 18px; border-radius: 999px; background: #f6f6f6; color: #181b20; font-size: 16px; font-weight: 700; line-height: 1; }
.home-section-head h1 { margin: 0; color: #24272d; font-size: 18px; line-height: 1.2; font-weight: 650; letter-spacing: .01em; }
.home-empty { min-height: 180px; display: flex; align-items: center; justify-content: center; border: 1px solid #f0f0f0; border-radius: 22px; background: #fafafa; color: #858b94; font-size: 13px; }
.home-recommend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px 28px; align-items: start; }
.home-article-card { width: 100%; max-width: 300px; height: auto; min-height: 380px; justify-self: center; display: flex; flex-direction: column; gap: 10px; padding: 0; border: 0; border-radius: 18px; background: #fff; box-shadow: none; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.home-article-card:hover { transform: translateY(-3px); border-color: transparent; box-shadow: 0 18px 42px rgba(15, 23, 42, .08); }
.home-article-cover { position: relative; display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; flex: 0 0 auto; border-radius: 18px; background: #f3f3f3; overflow: hidden; }
.home-article-cover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,0) 60%, rgba(0,0,0,.08)); opacity: 0; transition: opacity .18s ease; z-index: 1; pointer-events: none; }
.home-article-card:hover .home-article-cover::before { opacity: 1; }
.home-article-cover img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .22s ease; }
.home-article-card:hover .home-article-cover img { transform: scale(1.025); }
.home-article-info { min-width: 0; display: grid; gap: 7px; padding: 0 6px 8px; }
.home-article-info strong { display: -webkit-box; min-height: 40px; margin: 0; color: #25282e; font-size: 15px; line-height: 1.38; font-weight: 650; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.home-article-reactions { display: flex; align-items: center; gap: 12px; color: #717780; font-size: 12px; line-height: 1.2; }
.home-article-info time { color: #9aa0a8; font-size: 12px; line-height: 1.2; }
@media (min-width: 1480px) { .home-recommend-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 760px) {
    .site-header { align-items: stretch; flex-direction: initial; gap: 0; }
    .site-header-inner { min-height: 58px; padding: calc(10px + var(--safe-top)) calc(14px + var(--safe-right)) 10px calc(14px + var(--safe-left)); gap: 12px; flex-wrap: wrap; }
    .site-logo { flex: 1 1 auto; max-width: calc(100% - 78px); width: auto; font-size: 16px; }
    .site-menu-toggle { display: inline-flex; }
    .site-nav { flex: 0 0 100%; width: 100%; display: none; justify-content: flex-start; gap: 8px; padding: 6px 0 2px; }
    .site-header.is-open .site-nav { display: flex; }
    .site-nav a { min-height: 32px; padding: 0 12px; font-size: 13px; background: #f7f7f7; }
    .site-home-main { padding: 18px 14px 50px; }
    .home-section-head { margin-bottom: 16px; }
    .home-section-pill { min-height: 34px; padding: 0 15px; font-size: 15px; }
    .home-section-head h1 { font-size: 16px; }
    .home-recommend-grid { grid-template-columns: 1fr; gap: 22px; justify-items: stretch; }
    .home-article-card { max-width: none; min-height: auto; border-radius: 20px; aspect-ratio: auto; }
    .home-article-cover { border-radius: 20px; }
    .home-article-info { padding: 0 2px 4px; }
    .home-article-info strong { font-size: 15px; }
}

/* Front home nav/search refinement */
.site-home-page { background: #fafafa; }
.site-header-inner { gap: 18px; }
.site-nav { flex: 1 1 auto; justify-content: flex-end; }
.site-nav a.is-active { background: #f5f5f5; color: #17191c; font-weight: 700; }
.site-search { flex: 0 0 280px; max-width: 32vw; height: 38px; display: flex; align-items: center; border: 1px solid #eeeeee; border-radius: 999px; background: #f7f7f7; overflow: hidden; }
.site-search input { min-width: 0; flex: 1 1 auto; height: 100%; padding: 0 0 0 15px; border: 0; outline: 0; background: transparent; color: #222; font-size: 13px; }
.site-search input::placeholder { color: #a5a8ad; }
.site-search button { flex: 0 0 auto; height: 100%; padding: 0 15px; border: 0; background: transparent; color: #555b64; font-size: 13px; cursor: pointer; }
.site-search button:hover { color: #17191c; }
.home-section-pill { display: none !important; }
.home-article-cover { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.home-article-info { padding: 0 10px 8px; }

@media (max-width: 760px) {
    .site-nav { order: 3; }
    .site-search { order: 4; flex: 0 0 100%; max-width: none; width: 100%; height: 36px; display: none; }
    .site-header.is-open .site-search { display: flex; }
    .home-article-cover { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
    .home-article-info { padding: 0 10px 8px; }
}
/* Home header hero */
.home-hero {
    position: relative;
    width: 100%;
    height: 500px;
    min-height: 500px;
    overflow: hidden;
    background: #ececec;
}
.home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.18));
    pointer-events: none;
}
.home-hero img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}
.home-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px calc(24px + var(--safe-right)) 40px calc(24px + var(--safe-left));
    text-align: center;
    pointer-events: none;
}
.home-hero-overlay p {
    max-width: min(900px, 92vw);
    margin: 0;
    color: #fff;
    font-size: clamp(20px, 3vw, 36px);
    line-height: 1.55;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: pre-line;
    text-shadow: 0 8px 28px rgba(0,0,0,.34);
}
.settings-header-preview {
    margin: 10px 0 14px;
    border: 1px solid #edf0f5;
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
}
.settings-header-preview img {
    display: block;
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    object-position: center center;
}
@media (max-width: 760px) {
    .home-hero {
        height: 320px;
        min-height: 320px;
    }
    .home-hero-overlay {
        padding: 28px calc(18px + var(--safe-right)) 28px calc(18px + var(--safe-left));
    }
    .home-hero-overlay p {
        max-width: 92vw;
        font-size: clamp(18px, 6vw, 28px);
        line-height: 1.5;
    }
}




/* Category listing page */
.category-page {
    background: #fafafa;
}
.category-hero {
    position: relative;
    width: 100%;
    height: 500px;
    min-height: 500px;
    overflow: hidden;
    background: #ececec;
}
.category-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: transparent;
    z-index: 1;
    pointer-events: none;
}
.category-hero img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}
.category-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px calc(24px + var(--safe-right)) 40px calc(24px + var(--safe-left));
    text-align: center;
    pointer-events: none;
}
.category-hero-overlay p {
    max-width: min(860px, 92vw);
    margin: 0;
    color: #fff;
    font-size: clamp(20px, 3vw, 36px);
    line-height: 1.55;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: pre-line;
    text-shadow: 0 8px 28px rgba(0,0,0,.34);
}
.category-main {
    padding-top: 34px;
}

@media (max-width: 760px) {
    .category-hero {
        height: 320px;
        min-height: 320px;
    }
    .category-hero-overlay {
        padding: 28px calc(18px + var(--safe-right)) 28px calc(18px + var(--safe-left));
    }
    .category-hero-overlay p {
        max-width: 92vw;
        font-size: clamp(18px, 6vw, 28px);
        line-height: 1.5;
    }
    .category-main {
        padding-top: 22px;
    }
}
/* Traditional article detail page */
.article-front-page {
    align-items: initial;
    justify-content: initial;
    background: #fafafa;
}
.article-page-main {
    width: min(980px, 100%);
    margin: 0 auto;
    padding: 34px calc(24px + var(--safe-right)) calc(72px + var(--safe-bottom)) calc(24px + var(--safe-left));
}
.article-detail {
    padding: clamp(26px, 5vw, 56px);
    border: 0;
    border-radius: 24px;
    background: #fff;
    box-shadow: none;
}
.article-hero {
    display: grid;
    gap: 12px;
    margin: 0 0 28px;
}
.article-detail .article-title {
    margin: 0;
    color: #000;
    font-size: clamp(28px, 5vw, 42px);
    line-height: 1.22;
    font-weight: 800;
    letter-spacing: -.02em;
}
.article-meta-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin: 0;
    color: #8b9199;
    font-size: 13px;
    line-height: 1.5;
}
.article-meta-line a {
    color: #737982;
    font-weight: 600;
}
.article-meta-line > span,
.article-meta-line > a {
    display: inline-flex;
    align-items: center;
}
.article-meta-line > span::before {
    content: "";
    width: 4px;
    height: 4px;
    margin-right: 14px;
    border-radius: 999px;
    background: #d8dce1;
}
.article-detail-traditional .article-content {
    margin-top: 0;
}
.article-content {
    color: #25282e;
    font-size: 16px;
    line-height: 1.9;
}
.article-content a {
    color: #1f5fbf;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.interaction-card {
    margin-top: 28px;
    padding: 20px;
    border: 1px solid #eeeeee;
    border-radius: 20px;
    background: #fbfbfb;
}
.interaction-card h2,
.article-location-card h2 {
    margin: 0 0 14px;
    color: #1f2329;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 700;
}
.reaction-bar .btn.small {
    min-height: 34px;
    padding: 0 16px;
    border-radius: 999px;
}
.article-location-card {
    margin-top: 28px;
}
.article-real-map-wrap {
    position: relative;
    display: grid;
    gap: 0;
    border: 1px solid #e5e8ec;
    border-radius: 22px;
    overflow: hidden;
    background: #f5f7f9;
}
.article-real-map {
    position: relative;
    z-index: 1;
    width: 100%;
    height: clamp(260px, 42vw, 420px);
    min-height: 260px;
    background:
        radial-gradient(circle at 20% 20%, rgba(123, 180, 151, .25), transparent 24%),
        radial-gradient(circle at 80% 18%, rgba(145, 172, 211, .22), transparent 26%),
        linear-gradient(135deg, #eef2f4, #e8edf0);
}
.article-map-status {
    position: absolute;
    left: 16px;
    top: 16px;
    z-index: 4;
    max-width: calc(100% - 32px);
    padding: 8px 12px;
    border: 1px solid rgba(229, 232, 236, .9);
    border-radius: 999px;
    background: rgba(255,255,255,.92);
    color: #6b7280;
    font-size: 12px;
    line-height: 1.4;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    pointer-events: none;
}
.article-map-status.is-error {
    color: #b42318;
    background: rgba(255, 247, 246, .94);
}
.article-map-fallback {
    position: relative;
    min-height: 240px;
    display: grid;
    place-items: center;
    gap: 12px;
    color: #1f2937;
    font-weight: 700;
    text-align: center;
    background:
        linear-gradient(90deg, rgba(255,255,255,.9) 1px, transparent 1px) 0 0 / 44px 44px,
        linear-gradient(0deg, rgba(255,255,255,.9) 1px, transparent 1px) 0 0 / 44px 44px,
        radial-gradient(circle at 18% 26%, rgba(123, 180, 151, .28), transparent 24%),
        radial-gradient(circle at 82% 20%, rgba(145, 172, 211, .25), transparent 26%),
        linear-gradient(135deg, #eef2f4, #e8edf0);
}
.article-map-fallback:hover {
    color: #111827;
}
.article-map-pin {
    display: inline-block;
    width: 28px;
    height: 28px;
    transform: rotate(45deg);
    border: 3px solid #fff;
    border-radius: 50% 50% 50% 0;
    background: #e5483e;
    box-shadow: 0 10px 24px rgba(229, 72, 62, .32);
}
.article-map-pin::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background: #fff;
}
.article-location-info {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border-top: 1px solid #e5e8ec;
    background: rgba(255,255,255,.96);
}
.article-location-info > div {
    display: grid;
    gap: 4px;
    min-width: 0;
}
.article-location-info strong {
    color: #22252b;
    font-size: 14px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}
.article-location-info span {
    color: #8b9199;
    font-size: 12px;
    line-height: 1.45;
}
.article-location-info a,
.article-map-inline-link {
    flex: 0 0 auto;
    color: #1f5fbf;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}
.article-location-info a:hover,
.article-map-inline-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}
@media (max-width: 760px) {
    .article-page-main {
        padding: 18px calc(14px + var(--safe-right)) calc(54px + var(--safe-bottom)) calc(14px + var(--safe-left));
    }
    .article-detail {
        padding: 24px 18px;
        border-radius: 20px;
    }
    .article-detail .article-title {
        font-size: 26px;
    }
    .article-meta-line {
        font-size: 12px;
    }
    .article-content {
        font-size: 15px;
        line-height: 1.85;
    }
    .interaction-card {
        padding: 16px;
        border-radius: 18px;
    }
    .article-real-map-wrap {
        border-radius: 18px;
    }
    .article-real-map,
    .article-map-fallback {
        min-height: 220px;
        height: 220px;
    }
    .article-location-info {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px;
    }
    .article-map-status {
        left: 12px;
        top: 12px;
        max-width: calc(100% - 24px);
        border-radius: 14px;
    }
}

/* Multi article detail page */
.article-template-multi.article-front-page {
    background: #fafafa;
}
.article-page-main-multi {
    width: min(1400px, 100%);
    margin: 0 auto;
    padding: 10px calc(20px + var(--safe-right)) calc(28px + var(--safe-bottom)) calc(20px + var(--safe-left));
}
.article-detail-multi {
    position: relative;
    width: 100%;
    height: calc(100vh - var(--front-nav-height, 66px) - 20px);
    height: calc(100dvh - var(--front-nav-height, 66px) - 20px);
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
    gap: 20px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: hidden;
}
.article-detail-multi .article-cover {
    display: none;
}
.article-detail-multi .article-main-images {
    position: relative;
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    gap: 0;
    margin: 0;
    border-radius: 28px;
    background: #eceff2;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .08);
}
.article-detail-multi .article-main-images::-webkit-scrollbar {
    display: none;
}
.article-detail-multi .article-main-images.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
}
.article-detail-multi .article-main-images img {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    max-width: none;
    display: block;
    object-fit: cover;
    scroll-snap-align: start;
    pointer-events: none;
}
.article-detail-multi .multi-article-content-panel {
    grid-column: 2;
    grid-row: 1;
    min-height: 0;
    height: 100%;
    padding: 30px 30px 26px;
    border: 1px solid #eeeeee;
    border-radius: 28px;
    background: #fff;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .05);
}
.article-detail-multi .article-hero {
    margin-bottom: 18px;
}
.article-detail-multi .article-title {
    font-size: clamp(28px, 3.2vw, 42px);
    line-height: 1.18;
}
.article-detail-multi .article-content {
    font-size: 15px;
    line-height: 1.86;
}
.article-detail-multi .article-content img {
    border-radius: 16px;
}
.article-detail-multi .interaction-card,
.article-detail-multi .article-location-card {
    margin-top: 24px;
}
.article-detail-multi .comments-card {
    padding: 18px;
    border-radius: 20px;
}
.article-detail-multi .comment-form {
    gap: 10px;
}
.article-detail-multi .comment-form textarea {
    min-height: 92px;
}
.article-detail-multi .article-real-map {
    height: 240px;
    min-height: 220px;
}
.article-detail-multi .article-map-fallback {
    min-height: 220px;
}
.article-detail-multi .article-location-info {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
}
.article-detail-multi .multi-floating-reactions,
.article-detail-multi .article-main-images .reactions-card {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 5;
    margin: 0;
    padding: 10px;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 999px;
    background: rgba(255,255,255,.88);
    box-shadow: 0 14px 30px rgba(15, 23, 42, .18);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.article-detail-multi .multi-floating-reactions h2,
.article-detail-multi .article-main-images .reactions-card h2 {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.article-detail-multi .multi-floating-reactions .reaction-bar,
.article-detail-multi .article-main-images .reactions-card .reaction-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}
.article-detail-multi .multi-floating-reactions .btn.small,
.article-detail-multi .article-main-images .reactions-card .btn.small {
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    box-shadow: none;
}
.multi-carousel-dots {
    position: absolute;
    left: 50%;
    bottom: 22px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateX(-50%);
    pointer-events: auto;
}
.multi-carousel-dots button {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.62);
    box-shadow: 0 0 0 1px rgba(0,0,0,.08);
    cursor: pointer;
    transition: width .16s ease, background .16s ease;
}
.multi-carousel-dots button.is-active {
    width: 20px;
    background: #fff;
}
@media (max-width: 900px) {
    .article-page-main-multi {
        width: 100%;
        padding: 0 0 calc(54px + var(--safe-bottom));
    }
    .article-detail-multi {
        height: auto;
        min-height: 0;
        display: block;
        overflow: visible;
    }
    .article-detail-multi .article-main-images {
        width: 100vw;
        height: min(100vw, 80vh);
        min-height: 320px;
        margin-left: 50%;
        transform: translateX(-50%);
        border-radius: 0;
        box-shadow: none;
    }
    .article-detail-multi .multi-article-content-panel {
        height: auto;
        margin: 0;
        padding: 24px calc(18px + var(--safe-right)) 0 calc(18px + var(--safe-left));
        border: 0;
        border-radius: 0;
        box-shadow: none;
        overflow: visible;
        background: #fff;
    }
    .article-detail-multi .article-title {
        font-size: 28px;
    }
    .article-detail-multi .multi-floating-reactions,
    .article-detail-multi .article-main-images .reactions-card {
        right: calc(14px + var(--safe-right));
        bottom: 14px;
        padding: 8px;
    }
    .multi-carousel-dots {
        bottom: 20px;
    }
    .article-detail-multi .article-main-images .reactions-card + .multi-carousel-dots {
        left: 18px;
        right: auto;
        transform: none;
    }
    .article-detail-multi .article-real-map,
    .article-detail-multi .article-map-fallback {
        height: 220px;
        min-height: 220px;
    }
}

.article-detail-multi > .article-hero,
.article-detail-multi > .article-content,
.article-detail-multi > .alert,
.article-detail-multi > .comments-card,
.article-detail-multi > .article-location-card,
.article-detail-multi > .front-actions {
    grid-column: 2;
}
.article-detail-multi > .article-main-images {
    grid-row: 1 / span 20;
}
.article-detail-multi > .reactions-card {
    position: absolute;
    right: calc(460px + 38px);
    bottom: 18px;
    z-index: 5;
    margin: 0;
    padding: 10px;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 999px;
    background: rgba(255,255,255,.88);
    box-shadow: 0 14px 30px rgba(15, 23, 42, .18);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.article-detail-multi > .reactions-card h2 {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
@media (max-width: 900px) {
    .article-detail-multi > .article-hero,
    .article-detail-multi > .article-content,
    .article-detail-multi > .alert,
    .article-detail-multi > .comments-card,
    .article-detail-multi > .article-location-card,
    .article-detail-multi > .front-actions {
        grid-column: auto;
        padding-left: calc(18px + var(--safe-left));
        padding-right: calc(18px + var(--safe-right));
    }
    .article-detail-multi > .article-main-images {
        grid-row: auto;
    }
    .article-detail-multi > .reactions-card {
        right: calc(14px + var(--safe-right));
        bottom: auto;
        top: calc(100vw - 58px);
        padding: 8px;
    }
}

/* 多元文章弹窗详情：只作用于弹窗，不影响传统文章详情页 */
.has-multi-article-modal {
    overflow: hidden;
}

.multi-article-modal-overlay[hidden] {
    display: none !important;
}

.multi-article-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(5, 8, 13, .72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.multi-article-modal-shell {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: #fff;
    overflow: hidden;
}

.multi-article-modal-close {
    position: fixed;
    top: max(16px, env(safe-area-inset-top));
    right: max(18px, env(safe-area-inset-right));
    z-index: 10010;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: rgba(17, 24, 39, .78);
    color: #fff;
    font-size: 30px;
    line-height: 38px;
    cursor: pointer;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
    transition: transform .18s ease, background .18s ease;
}

.multi-article-modal-close:hover {
    transform: scale(1.04);
    background: rgba(17, 24, 39, .92);
}

.multi-article-modal-body {
    width: 100%;
    height: 100%;
}

.multi-modal-loading,
.multi-modal-error {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 24px;
    color: #111827;
    font-size: 16px;
    background: #fff;
}

.multi-modal-error {
    color: #b91c1c;
}

.multi-modal-article {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    display: flex;
    align-items: stretch;
    background: #fff;
    color: #111827;
}

.multi-modal-gallery {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    height: 100vh;
    height: 100dvh;
    background: #05070c;
    overflow: hidden;
}

.multi-modal-track {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    cursor: grab;
}

.multi-modal-track::-webkit-scrollbar {
    display: none;
}

.multi-modal-track.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
    user-select: none;
}

.multi-modal-slide {
    flex: 0 0 auto;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #05070c;
}

.multi-modal-slide img {
    display: block;
    width: auto;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

.multi-modal-empty-image {
    height: 100%;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, .72);
    font-size: 16px;
}

.multi-modal-content {
    flex: 0 0 min(520px, 38vw);
    width: min(520px, 38vw);
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    padding: 54px 34px 36px;
    background: #fff;
    border-left: 1px solid #eceff3;
}

.multi-modal-hero {
    margin-bottom: 22px;
}

.multi-modal-hero h1 {
    margin: 0 0 14px;
    color: #000;
    font-size: clamp(26px, 2.6vw, 42px);
    line-height: 1.18;
    font-weight: 800;
    letter-spacing: -.03em;
}

.multi-modal-content .article-meta-line {
    margin: 0;
    color: #858b95;
}

.multi-modal-content .article-meta-line a {
    color: #6b7280;
}

.multi-modal-content .article-content {
    margin-top: 0;
    padding: 0;
    color: #20242b;
    font-size: 15px;
    line-height: 1.9;
}

.multi-modal-content .interaction-card,
.multi-modal-content .article-location-card {
    margin-top: 22px;
    padding: 18px;
    border: 1px solid #eef0f4;
    border-radius: 18px;
    background: #fafafa;
    box-shadow: none;
}

.multi-modal-content .comments-card h2,
.multi-modal-content .article-location-card h2 {
    margin-top: 0;
    font-size: 17px;
}

.multi-modal-content .comment-form {
    gap: 10px;
}

.multi-modal-content .comment-form textarea {
    min-height: 92px;
}

.multi-modal-content .article-real-map {
    height: 260px;
}

.multi-modal-content .article-map-fallback {
    min-height: 220px;
}

.multi-modal-content .article-location-info {
    align-items: flex-start;
    gap: 12px;
}

.multi-modal-reactions {
    position: absolute;
    right: 22px;
    bottom: 22px;
    z-index: 3;
    width: auto;
    max-width: min(360px, calc(100% - 44px));
    margin: 0;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 18px;
    background: rgba(17, 24, 39, .72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 16px 42px rgba(0, 0, 0, .24);
}

.multi-modal-reactions h2 {
    display: none;
}

.multi-modal-reactions .reaction-bar {
    margin: 0;
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
}

.multi-modal-reactions .btn.small {
    min-height: 34px;
    padding: 7px 14px;
    border-color: rgba(255, 255, 255, .32);
    color: #fff;
    background: rgba(255, 255, 255, .12);
}

.multi-modal-reactions .btn.small.primary {
    border-color: #fff;
    background: #fff;
    color: #111827;
}

.multi-modal-dots {
    position: absolute;
    left: 50%;
    bottom: 24px;
    z-index: 3;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(17, 24, 39, .45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.multi-modal-dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .46);
    cursor: pointer;
}

.multi-modal-dots button.is-active {
    width: 22px;
    background: #fff;
}

@media (max-width: 760px) {
    .multi-article-modal-shell {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .multi-article-modal-close {
        top: max(12px, env(safe-area-inset-top));
        right: max(12px, env(safe-area-inset-right));
        width: 38px;
        height: 38px;
        font-size: 28px;
        line-height: 34px;
    }

    .multi-modal-article {
        min-height: 100vh;
        min-height: 100dvh;
        height: auto;
        display: block;
    }

    .multi-modal-gallery {
        width: 100vw;
        height: 100vh;
        height: 100dvh;
    }

    .multi-modal-track {
        width: 100vw;
        height: 100vh;
        height: 100dvh;
    }

    .multi-modal-slide {
        flex-basis: 100vw;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
    }

    .multi-modal-slide img {
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        object-fit: cover;
    }

    .multi-modal-content {
        width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        height: auto;
        padding: 28px 18px calc(34px + env(safe-area-inset-bottom));
        border-left: 0;
        border-top: 1px solid #eceff3;
    }

    .multi-modal-hero h1 {
        font-size: 28px;
    }

    .multi-modal-reactions {
        right: 14px;
        bottom: 16px;
        max-width: calc(100% - 28px);
        padding: 10px;
        border-radius: 16px;
    }

    .multi-modal-reactions .btn.small {
        padding: 7px 11px;
        font-size: 13px;
    }

    .multi-modal-dots {
        bottom: 18px;
    }

    .multi-modal-content .article-real-map,
    .multi-modal-content .article-map-fallback {
        height: 220px;
        min-height: 220px;
    }
}

/* v36 多元文章弹窗轮播修正：轨道只负责位移，裁剪交给外层，避免第二张被裁掉 */
.multi-modal-gallery {
    flex: 1 1 auto;
    min-width: 0;
}

.multi-modal-track {
    overflow: visible;
    scroll-snap-type: none;
    scroll-behavior: auto;
    transform: translate3d(0, 0, 0);
    transition: transform .48s cubic-bezier(.22, .61, .36, 1);
    will-change: transform;
    touch-action: pan-y;
}

.multi-modal-track.is-dragging {
    transition: none;
    cursor: grabbing;
}

.multi-modal-slide {
    flex: 0 0 100%;
    width: 100%;
    overflow: hidden;
    scroll-snap-align: none;
}

.multi-modal-slide img {
    width: auto;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: 100vh;
    max-height: 100dvh;
    object-fit: contain;
}

@media (max-width: 760px) {
    .multi-modal-gallery {
        width: 100vw;
        min-height: 0;
        height: auto;
        transition: height .36s cubic-bezier(.22, .61, .36, 1);
    }

    .multi-modal-track {
        width: 100vw;
        height: auto;
        align-items: flex-start;
    }

    .multi-modal-slide {
        flex: 0 0 100vw;
        width: 100vw;
        height: auto;
        min-height: 0;
        align-items: flex-start;
    }

    .multi-modal-slide img {
        width: 100vw;
        height: auto;
        max-width: 100vw;
        max-height: none;
        object-fit: contain;
    }
}

/* v40 多元文章移动端轮播触摸修正：横向滑动交给轮播，纵向滑动保留页面滚动 */
.multi-modal-gallery,
.multi-modal-track,
.multi-modal-slide,
.multi-modal-slide img {
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
}

.multi-modal-gallery,
.multi-modal-track {
    touch-action: pan-y pinch-zoom;
    overscroll-behavior-x: contain;
}

.multi-modal-track.is-dragging {
    touch-action: none;
}

@media (max-width: 760px) {
    .multi-modal-gallery {
        overflow: hidden;
    }
    .multi-modal-track {
        cursor: grab;
    }
}

/* v41 多元文章移动端轮播：使用浏览器原生横向滚动 + CSS Scroll Snap，避免弹窗上下滚动抢走横向手势 */
@media (max-width: 760px) {
    .multi-modal-gallery {
        width: 100vw;
        height: auto;
        min-height: 0;
        overflow: hidden;
        transition: height .28s cubic-bezier(.22, .61, .36, 1);
        overscroll-behavior: contain;
    }

    .multi-modal-track {
        width: 100vw;
        height: 100%;
        display: flex;
        align-items: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-snap-stop: always;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        overscroll-behavior-y: none;
        touch-action: pan-x pinch-zoom;
        transform: none !important;
        transition: none !important;
        will-change: scroll-position;
        cursor: auto;
    }

    .multi-modal-track.is-dragging {
        cursor: auto;
        user-select: auto;
    }

    .multi-modal-slide {
        flex: 0 0 100vw;
        width: 100vw;
        height: 100%;
        min-height: 0;
        overflow: hidden;
        scroll-snap-align: start;
        scroll-snap-stop: always;
        display: flex;
        align-items: flex-start;
        justify-content: center;
    }

    .multi-modal-slide img {
        display: block;
        width: 100vw;
        height: auto;
        max-width: 100vw;
        max-height: none;
        object-fit: contain;
    }
}

/* AI 自动发布设置 */
.settings-subsection {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px;
    margin: 18px 0;
    background: #f8fafc;
}

.settings-subsection.compact {
    padding: 14px;
    margin: 14px 0;
}

.settings-subsection h2,
.settings-subsection h3 {
    margin: 0 0 10px;
    color: #111827;
    font-size: 18px;
    line-height: 1.35;
}

.settings-subsection h3 {
    font-size: 16px;
}

.ai-config-hint {
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #1e3a8a;
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.ai-config-hint p {
    margin: 0;
}

.ai-config-hint code {
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .8);
    color: #111827;
}

.ai-log-table td {
    vertical-align: top;
}

.badge.status-success {
    background: #dcfce7;
    color: #166534;
}

.badge.status-failed {
    background: #fee2e2;
    color: #991b1b;
}

.badge.status-running {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge.status-skipped {
    background: #f3f4f6;
    color: #4b5563;
}

/* AI category article list style */
.home-article-card.is-ai-list-card {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
    min-height: 0;
    height: auto;
    display: block;
    padding: 22px 26px;
    border: 1px solid #ececec;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .035);
    overflow: visible;
}
.home-article-card.is-ai-list-card:hover {
    transform: translateY(-2px);
    border-color: #e5e5e5;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .07);
}
.ai-list-info {
    min-width: 0;
    display: grid;
    gap: 10px;
}
.ai-list-meta,
.ai-list-reactions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    color: #8b929d;
    font-size: 13px;
    line-height: 1.35;
}
.ai-list-meta span {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 999px;
    background: #f5f5f5;
    color: #5f6670;
    font-size: 12px;
    line-height: 1;
}
.ai-list-info strong {
    display: block;
    margin: 0;
    color: #1f2329;
    font-size: clamp(20px, 2.2vw, 28px);
    line-height: 1.35;
    font-weight: 750;
    letter-spacing: .01em;
}
.ai-list-excerpt {
    display: -webkit-box;
    color: #606771;
    font-size: 15px;
    line-height: 1.8;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.ai-list-reactions {
    padding-top: 2px;
    color: #717780;
    font-size: 12px;
}

@media (max-width: 760px) {
    .home-article-card.is-ai-list-card {
        padding: 18px 16px;
        border-radius: 16px;
        box-shadow: none;
    }
    .ai-list-info {
        gap: 9px;
    }
    .ai-list-info strong {
        font-size: 18px;
        line-height: 1.45;
    }
    .ai-list-excerpt {
        font-size: 14px;
        line-height: 1.7;
        -webkit-line-clamp: 3;
    }
    .ai-list-meta,
    .ai-list-reactions {
        gap: 8px 10px;
        font-size: 12px;
    }
}

.ai-diagnostic-list {
    margin: 10px 0 12px;
    padding-left: 20px;
    color: #b42318;
    line-height: 1.8;
}
.ai-cron-box {
    margin-top: 12px;
    padding: 14px;
    border: 1px solid rgba(15, 23, 42, .10);
    border-radius: 14px;
    background: rgba(15, 23, 42, .035);
}
.ai-cron-box p {
    margin: 8px 0;
}
.ai-cron-box code {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px 12px;
    border-radius: 10px;
    background: #111827;
    color: #f9fafb;
    font-size: 12px;
    line-height: 1.6;
}

.ai-diagnostic-list {
    margin: 10px 0 12px;
    padding-left: 20px;
    color: #b42318;
    line-height: 1.8;
}
.ai-cron-box {
    margin-top: 12px;
    padding: 14px;
    border: 1px solid rgba(15, 23, 42, .10);
    border-radius: 14px;
    background: rgba(15, 23, 42, .035);
}
.ai-cron-box p {
    margin: 8px 0;
}
.ai-cron-box code {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px 12px;
    border-radius: 10px;
    background: #111827;
    color: #f9fafb;
    font-size: 12px;
    line-height: 1.6;
}

/* Front site footer */
.site-footer {
    margin-top: 20px;
    border-top: 1px solid #eeeeee;
    background: #fff;
    color: #6b7280;
}
.site-footer-inner {
    width: min(1480px, 100%);
    margin: 0 auto;
    padding: 34px calc(34px + var(--safe-right)) calc(34px + var(--safe-bottom)) calc(34px + var(--safe-left));
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(240px, 1.2fr);
    gap: 22px 34px;
    align-items: start;
}
.site-footer-brand {
    min-width: 0;
    display: grid;
    gap: 10px;
}
.site-footer-logo {
    justify-self: start;
    color: #1f2329;
    font-size: 17px;
    line-height: 1.25;
    font-weight: 750;
    letter-spacing: .01em;
}
.site-footer-logo:hover {
    color: #000;
}
.site-footer-brand p {
    max-width: 560px;
    margin: 0;
    color: #7a818c;
    font-size: 13px;
    line-height: 1.8;
}
.site-footer-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px 10px;
}
.site-footer-links a {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 11px;
    border-radius: 999px;
    color: #5f6670;
    font-size: 13px;
    line-height: 1;
    background: #f7f7f7;
    transition: background .16s ease, color .16s ease, transform .16s ease;
}
.site-footer-links a:hover {
    background: #eeeeee;
    color: #17191c;
    transform: translateY(-1px);
}
.site-footer-meta {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 14px;
    padding-top: 18px;
    border-top: 1px solid #f1f1f1;
    color: #9aa0a8;
    font-size: 12px;
    line-height: 1.6;
}

@media (max-width: 760px) {
    .site-footer {
        margin-top: 10px;
    }
    .site-footer-inner {
        padding: 26px calc(16px + var(--safe-right)) calc(28px + var(--safe-bottom)) calc(16px + var(--safe-left));
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .site-footer-links {
        justify-content: flex-start;
    }
    .site-footer-meta {
        display: grid;
        justify-content: stretch;
        gap: 6px;
        padding-top: 16px;
    }
}
