:root {
    --ink: #182033;
    --muted: #667089;
    --paper: rgba(255, 255, 255, 0.9);
    --paper-solid: #ffffff;
    --line: rgba(24, 32, 51, 0.12);
    --primary: #dc4f70;
    --primary-dark: #b83255;
    --accent: #0ea5a4;
    --gold: #f4b94f;
    --shadow: 0 24px 70px rgba(24, 32, 51, 0.16);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100%;
    margin: 0;
    color: var(--ink);
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background: #f7f2ec;
    line-height: 1.7;
}

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

img {
    display: block;
    max-width: 100%;
}

button,
input,
textarea,
select {
    font: inherit;
}

.site-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    background:
        linear-gradient(rgba(255, 247, 239, 0.8), rgba(244, 248, 255, 0.78)),
        url("../images/anime-bg.png") center / cover no-repeat;
}

.site-bg::before,
.site-bg::after {
    content: "";
    position: absolute;
    inset: -18%;
    background:
        radial-gradient(circle at 12% 24%, rgba(220, 79, 112, 0.18), transparent 24%),
        radial-gradient(circle at 78% 18%, rgba(14, 165, 164, 0.16), transparent 23%),
        radial-gradient(circle at 70% 78%, rgba(244, 185, 79, 0.22), transparent 24%);
    animation: bgFloat 18s ease-in-out infinite alternate;
}

.site-bg::after {
    opacity: 0.55;
    filter: blur(24px);
    animation-duration: 26s;
    animation-direction: alternate-reverse;
}

@keyframes bgFloat {
    from {
        transform: translate3d(-2%, -1%, 0) scale(1);
    }
    to {
        transform: translate3d(2%, 2%, 0) scale(1.05);
    }
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: min(1180px, calc(100% - 32px));
    margin: 18px auto 0;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 18px 50px rgba(24, 32, 51, 0.08);
    backdrop-filter: blur(18px);
}

.brand,
.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    flex: 0 0 auto;
    border-radius: var(--radius);
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 10px 28px rgba(220, 79, 112, 0.32);
}

.brand strong {
    display: block;
    line-height: 1.2;
}

.brand small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.2;
}

.top-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    flex-wrap: wrap;
    color: #37405a;
    font-size: 14px;
}

.top-nav a,
.nav-user {
    padding: 8px 10px;
    border-radius: var(--radius);
}

.top-nav a:hover {
    background: rgba(24, 32, 51, 0.06);
}

.nav-pill {
    color: #fff;
    background: var(--ink);
}

.top-nav .nav-pill:hover {
    background: #29334d;
}

.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
}

.hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
    align-items: end;
    min-height: 340px;
    padding: 48px;
    border-radius: var(--radius);
    color: #fff;
    background:
        linear-gradient(115deg, rgba(24, 32, 51, 0.9), rgba(24, 32, 51, 0.52)),
        url("../images/anime-bg.png") center / cover no-repeat;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero-panel .eyebrow,
.article-hero .eyebrow {
    color: #ffd46a;
}

.hero-copy h1 {
    max-width: 780px;
    margin: 0 0 14px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.08;
}

.hero-copy p {
    max-width: 700px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 17px;
}

.search-box {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

.search-box input,
.auth-card input,
.comment-form textarea,
.admin-form input,
.admin-form textarea,
.admin-form select,
.keyword-form input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input,
.auth-card input,
.admin-form input,
.admin-form select,
.keyword-form input {
    height: 46px;
    padding: 0 14px;
}

.comment-form textarea,
.admin-form textarea {
    resize: vertical;
    padding: 12px 14px;
}

.search-box input:focus,
.auth-card input:focus,
.comment-form textarea:focus,
.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus,
.keyword-form input:focus {
    border-color: rgba(220, 79, 112, 0.68);
    box-shadow: 0 0 0 4px rgba(220, 79, 112, 0.1);
}

.search-box button,
.auth-card button,
.comment-form button,
.button,
.keyword-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: var(--radius);
    color: #fff;
    background: var(--ink);
    cursor: pointer;
    font-weight: 700;
}

.button {
    color: var(--ink);
    background: #eef1f6;
}

.button.primary,
.keyword-form button,
.auth-card button,
.comment-form button {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: 28px;
}

.post-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 18px 44px rgba(24, 32, 51, 0.1);
    backdrop-filter: blur(12px);
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 60px rgba(24, 32, 51, 0.16);
}

.cover-link img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.post-card-body {
    padding: 20px;
}

.post-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 13px;
}

.post-meta.light {
    color: rgba(255, 255, 255, 0.78);
}

.post-card h2 {
    margin: 10px 0 10px;
    font-size: 22px;
    line-height: 1.35;
}

.post-card p {
    min-height: 76px;
    margin: 0 0 16px;
    color: var(--muted);
}

.read-more {
    color: var(--primary-dark);
    font-weight: 800;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 28px 0 8px;
}

.pagination a {
    display: grid;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    place-items: center;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.8);
}

.pagination a.active {
    color: #fff;
    background: var(--primary);
}

.article-view,
.comments-panel,
.auth-card,
.empty-state {
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.article-hero {
    min-height: 470px;
    display: flex;
    align-items: end;
    padding: 54px;
    border-radius: var(--radius) var(--radius) 0 0;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(24, 32, 51, 0.14), rgba(24, 32, 51, 0.82)),
        var(--article-bg) center / cover no-repeat;
}

.article-hero-inner {
    max-width: 820px;
}

.article-hero h1 {
    margin: 14px 0 12px;
    font-size: clamp(34px, 6vw, 68px);
    line-height: 1.08;
}

.article-hero p {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 17px;
}

.article-content {
    padding: 48px;
    color: #2f374e;
    font-size: 18px;
    white-space: normal;
}

.article-content > * {
    max-width: 820px;
    margin-right: auto;
    margin-left: auto;
}

.article-content p {
    margin-top: 0;
    margin-bottom: 1.2em;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    color: var(--ink);
    line-height: 1.3;
}

.article-content h2 {
    margin-top: 1.8em;
    margin-bottom: 0.7em;
    font-size: 32px;
}

.article-content h3 {
    margin-top: 1.6em;
    margin-bottom: 0.65em;
    font-size: 26px;
}

.article-content h4 {
    margin-top: 1.4em;
    margin-bottom: 0.6em;
    font-size: 22px;
}

.article-content a {
    color: var(--primary-dark);
    border-bottom: 1px solid rgba(184, 50, 85, 0.28);
    font-weight: 700;
}

.article-content blockquote {
    margin-top: 1.6em;
    margin-bottom: 1.6em;
    padding: 18px 22px;
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    background: rgba(220, 79, 112, 0.08);
    color: #4d5267;
}

.article-content ul,
.article-content ol {
    padding-left: 1.5em;
}

.article-content li {
    margin-bottom: 0.45em;
}

.article-content figure {
    max-width: 980px;
    margin-top: 28px;
    margin-bottom: 28px;
}

.article-content figure img,
.article-content > img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: 0 20px 55px rgba(24, 32, 51, 0.16);
}

.article-content figcaption {
    margin-top: 10px;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

.article-content pre {
    overflow-x: auto;
    padding: 18px;
    border-radius: var(--radius);
    background: #151b2d;
    color: #f4f6fb;
    font-size: 15px;
}

.article-content code {
    padding: 2px 5px;
    border-radius: 5px;
    background: rgba(24, 32, 51, 0.08);
}

.article-content pre code {
    padding: 0;
    background: transparent;
}

.article-content hr {
    max-width: 820px;
    height: 1px;
    margin: 34px auto;
    border: 0;
    background: var(--line);
}

.comments-panel {
    margin-top: 28px;
    padding: 32px;
}

.section-heading h2,
.auth-card h1,
.empty-state h2,
.empty-state h1 {
    margin: 0 0 12px;
}

.comment-form {
    display: grid;
    gap: 12px;
    margin: 20px 0 28px;
}

.comment-list {
    display: grid;
    gap: 16px;
}

.comment-item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.72);
}

.avatar {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: var(--radius);
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    font-weight: 800;
}

.comment-head {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    color: var(--muted);
    font-size: 13px;
}

.comment-head strong {
    color: var(--ink);
}

.comment-item p {
    margin: 6px 0 0;
}

.login-tip {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin: 20px 0 28px;
    padding: 16px;
    border-radius: var(--radius);
    background: rgba(14, 165, 164, 0.1);
}

.login-tip p {
    margin: 0;
    flex: 1;
}

.login-tip a {
    color: var(--primary-dark);
    font-weight: 800;
}

.auth-card,
.empty-state {
    width: min(520px, 100%);
    margin: 70px auto;
    padding: 34px;
}

.auth-card p,
.empty-state p {
    color: var(--muted);
}

.auth-card form {
    display: grid;
    gap: 16px;
    margin-top: 22px;
}

.auth-card label,
.admin-form label {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

.auth-switch {
    margin-bottom: 0;
}

.auth-switch a {
    color: var(--primary-dark);
    font-weight: 800;
}

.alert {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: var(--radius);
    font-weight: 700;
}

.alert-success {
    color: #14534e;
    background: rgba(14, 165, 164, 0.14);
}

.alert-error {
    color: #8d1f3a;
    background: rgba(220, 79, 112, 0.16);
}

.muted {
    color: var(--muted);
}

.site-footer {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    width: min(1180px, calc(100% - 32px));
    margin: 36px auto 28px;
    color: rgba(24, 32, 51, 0.68);
    font-size: 14px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.result-tip {
    margin: 22px 0 0;
    color: var(--muted);
    font-weight: 700;
}

.post-list {
    display: grid;
    gap: 18px;
    margin-top: 28px;
}

.post-row {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 18px 44px rgba(24, 32, 51, 0.1);
    backdrop-filter: blur(12px);
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-row:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 60px rgba(24, 32, 51, 0.16);
}

.post-row .cover-link img {
    width: 100%;
    height: 100%;
    min-height: 160px;
    aspect-ratio: auto;
    object-fit: cover;
}

.post-row .post-card-body p {
    min-height: 0;
}

.article-hero.text-hero {
    min-height: 280px;
    background:
        linear-gradient(115deg, rgba(24, 32, 51, 0.94), rgba(36, 58, 92, 0.78)),
        url("../images/anime-bg.png") center / cover no-repeat;
}

.article-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 22px;
}

.article-nav a {
    display: grid;
    gap: 6px;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 14px 34px rgba(24, 32, 51, 0.08);
}

.article-nav a.next {
    text-align: right;
}

.article-nav small {
    color: var(--muted);
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.char-count,
.editor-meta {
    color: var(--muted);
    font-size: 13px;
}

.editor-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.about-page {
    display: grid;
    gap: 22px;
}

.about-hero,
.about-card {
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.about-hero {
    padding: 42px;
}

.about-hero h1 {
    margin: 8px 0 12px;
    font-size: clamp(32px, 5vw, 52px);
}

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

.about-card {
    padding: 24px;
}

.about-card h2 {
    margin-top: 0;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.filter-bar input,
.filter-bar select {
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.filter-bar input {
    flex: 1;
    min-width: 200px;
}

.filter-bar select {
    width: 180px;
}

.admin-top .muted {
    max-width: 640px;
    margin: 8px 0 0;
}

.alert {
    transition: opacity 0.28s, transform 0.28s;
}

.alert.is-hiding {
    opacity: 0;
    transform: translateY(-8px);
}

.admin-body {
    min-height: 100vh;
    background: #f4f6f9;
}

.admin-body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(135deg, rgba(14, 165, 164, 0.08), transparent 38%),
        linear-gradient(315deg, rgba(220, 79, 112, 0.1), transparent 42%);
}

.admin-sidebar {
    position: fixed;
    inset: 16px auto 16px 16px;
    width: 230px;
    padding: 18px;
    border-radius: var(--radius);
    background: #151b2d;
    color: #fff;
    box-shadow: 0 24px 60px rgba(24, 32, 51, 0.2);
}

.admin-sidebar nav {
    display: grid;
    gap: 8px;
    margin-top: 28px;
}

.admin-sidebar nav a,
.admin-back {
    display: block;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: rgba(255, 255, 255, 0.72);
}

.admin-sidebar nav a.active,
.admin-sidebar nav a:hover,
.admin-back:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.admin-back {
    position: absolute;
    right: 18px;
    bottom: 18px;
    left: 18px;
}

.admin-main {
    width: calc(100% - 290px);
    margin-left: 270px;
    padding: 28px 24px 44px;
}

.admin-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.admin-top h1 {
    margin: 0;
    font-size: 32px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card,
.admin-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper-solid);
    box-shadow: 0 14px 38px rgba(24, 32, 51, 0.06);
}

.stat-card {
    padding: 18px;
}

.stat-card span {
    display: block;
    color: var(--muted);
}

.stat-card strong {
    display: block;
    margin-top: 8px;
    font-size: 34px;
    line-height: 1;
}

.admin-card {
    padding: 20px;
    margin-bottom: 20px;
}

.admin-card h2 {
    margin-top: 0;
}

.admin-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

.admin-grid.two {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.table-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.table-head h2 {
    margin: 0;
}

.table-head a {
    color: var(--primary-dark);
    font-weight: 800;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 13px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

th {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

td small {
    display: block;
    color: var(--muted);
}

.thumb {
    width: 88px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: var(--radius);
}

.actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.actions a {
    color: var(--accent);
    font-weight: 800;
}

.actions form,
td form,
.keyword-chip form {
    display: inline;
}

.link-danger {
    border: 0;
    padding: 0;
    color: #c32b4d;
    background: transparent;
    cursor: pointer;
    font-weight: 800;
}

.admin-form {
    display: grid;
    gap: 18px;
}

.admin-form.compact {
    gap: 14px;
}

.inline-form {
    grid-template-columns: minmax(180px, 240px) minmax(180px, 1fr) minmax(180px, 1fr) auto;
    align-items: end;
}

.field-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.editor-field {
    display: grid;
    gap: 10px;
}

.rich-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
}

.rich-toolbar button,
.rich-toolbar select,
.color-tool,
.upload-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
}

.rich-toolbar button {
    padding: 0 10px;
    cursor: pointer;
}

.rich-toolbar select {
    padding: 0 8px;
}

.color-tool,
.upload-tool {
    gap: 6px;
    padding: 0 10px;
    cursor: pointer;
}

.color-tool input {
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.upload-tool input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.rich-editor {
    min-height: 460px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: #2f374e;
    outline: none;
    font-size: 18px;
    line-height: 1.8;
}

.rich-editor:focus {
    border-color: rgba(220, 79, 112, 0.68);
    box-shadow: 0 0 0 4px rgba(220, 79, 112, 0.1);
}

.rich-editor:empty::before {
    content: attr(data-placeholder);
    color: var(--muted);
}

.rich-editor h2,
.rich-editor h3,
.rich-editor h4 {
    color: var(--ink);
    line-height: 1.3;
}

.rich-editor blockquote {
    margin: 18px 0;
    padding: 14px 18px;
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    background: rgba(220, 79, 112, 0.08);
}

.rich-editor figure {
    margin: 24px 0;
}

.rich-editor figure img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: 0 14px 36px rgba(24, 32, 51, 0.14);
}

.rich-editor figcaption {
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

.rich-editor pre {
    overflow-x: auto;
    padding: 16px;
    border-radius: var(--radius);
    background: #151b2d;
    color: #f4f6fb;
}

.current-cover {
    width: min(420px, 100%);
    border-radius: var(--radius);
    box-shadow: 0 12px 34px rgba(24, 32, 51, 0.12);
}

.keyword-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

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

.keyword-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.keyword-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f7f9fc;
}

.keyword-chip button {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: var(--primary);
    cursor: pointer;
    line-height: 1;
}

@media (max-width: 960px) {
    .hero-panel,
    .post-grid {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        padding: 32px;
    }

    .post-grid {
        gap: 18px;
    }

    .admin-sidebar {
        position: static;
        width: min(100% - 32px, 720px);
        margin: 16px auto 0;
    }

    .admin-back {
        position: static;
        margin-top: 24px;
    }

    .admin-main {
        width: min(100% - 32px, 920px);
        margin: 0 auto;
        padding: 24px 0 40px;
    }

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

    .admin-grid.two,
    .inline-form,
    .post-row,
    .about-grid,
    .article-nav,
    .filter-bar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .top-nav {
        justify-content: flex-start;
    }

    .brand small {
        display: none;
    }

    .hero-panel {
        min-height: 360px;
        padding: 26px;
    }

    .hero-copy h1,
    .article-hero h1 {
        font-size: 34px;
    }

    .search-box,
    .keyword-form,
    .filter-bar {
        grid-template-columns: 1fr;
    }

    .article-hero.text-hero {
        min-height: 240px;
    }

    .article-hero {
        min-height: 360px;
        padding: 30px 22px;
    }

    .article-content,
    .comments-panel,
    .auth-card,
    .empty-state {
        padding: 24px;
    }

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

    .admin-top {
        align-items: stretch;
        flex-direction: column;
    }
}

/* 打赏二维码：两侧小窗，垂直居中固定 */
.tip-rails {
    position: fixed;
    inset: 0;
    z-index: 18;
    pointer-events: none;
}

.tip-card {
    position: fixed;
    top: 50%;
    z-index: 18;
    width: 148px;
    padding: 14px 12px 12px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 42px rgba(24, 32, 51, 0.14);
    backdrop-filter: blur(14px);
    text-align: center;
    pointer-events: auto;
    transform: translateY(-50%);
    animation: tipFloat 5.5s ease-in-out infinite;
}

.tip-card-left {
    left: max(12px, calc((100vw - min(1180px, 100% - 32px)) / 4 - 74px));
}

.tip-card-right {
    right: max(12px, calc((100vw - min(1180px, 100% - 32px)) / 4 - 74px));
    animation-delay: -2.4s;
}

.tip-card-title {
    margin: 0 0 10px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.tip-card img {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    border-radius: 8px;
    object-fit: contain;
    background: #fff;
}

.tip-card-text {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

@keyframes tipFloat {
    0%,
    100% {
        transform: translateY(-50%) translateX(0);
    }
    50% {
        transform: translateY(calc(-50% - 6px)) translateX(0);
    }
}

@media (max-width: 1320px) {
    .tip-card {
        width: 128px;
        padding: 10px 8px 8px;
    }

    .tip-card img {
        width: 100px;
        height: 100px;
    }

    .tip-card-left {
        left: 8px;
    }

    .tip-card-right {
        right: 8px;
    }
}

@media (max-width: 1100px) {
    .tip-rails {
        inset: auto 0 0;
        height: auto;
        display: flex;
        justify-content: center;
        gap: 10px;
        padding: 0 10px calc(10px + env(safe-area-inset-bottom, 0px));
        pointer-events: none;
    }

    .tip-card {
        position: static;
        top: auto;
        left: auto;
        right: auto;
        width: min(46vw, 160px);
        padding: 10px 8px 8px;
        transform: none;
        animation: none;
        pointer-events: auto;
        box-shadow: 0 10px 28px rgba(24, 32, 51, 0.16);
    }

    .tip-card img {
        width: min(112px, 34vw);
        height: min(112px, 34vw);
    }

    .tip-card-title {
        margin-bottom: 6px;
        font-size: 12px;
    }

    .tip-card-text {
        margin-top: 6px;
        font-size: 11px;
    }

    body {
        padding-bottom: 168px;
    }
}

@media (max-width: 680px) {
    .tip-rails {
        gap: 8px;
        padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    }

    .tip-card {
        width: calc(50% - 6px);
        border-radius: 12px;
    }

    body {
        padding-bottom: 156px;
    }
}
