/* =========================================================
   校园风采 · 图相册样式（简约 · 编辑风）
   ========================================================= */

:root {
    color-scheme: light;
    --bg: #f7f5f0;
    --surface: #fffdf9;
    --surface-soft: #fbf9f4;
    --ink: #1c1b19;
    --ink-2: #3d3a34;
    --muted: #6f6b62;
    --faint: #9a958b;
    --line: #e3ddd2;
    --line-strong: #cdc5b7;
    --accent: #8a4a32;
    --accent-soft: #f2e9e3;
    --danger: #a33a2c;
    --danger-soft: #faece9;
    --success: #3f6a51;
    --success-soft: #edf3ee;
    --shadow: 0 20px 44px -38px rgba(48, 38, 22, .5);
    --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
    --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system, sans-serif;
}

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

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

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

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

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

.btn,
.input,
.textarea,
.select,
.nav-toggle {
    -webkit-appearance: none;
    appearance: none;
}

h1, h2, h3, h4, p, figure {
    margin: 0;
}

::selection {
    background: var(--accent-soft);
    color: var(--ink);
}

.wrap {
    width: min(1120px, 92vw);
    margin-inline: auto;
}

/* ---------- 顶栏 ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(247, 245, 240, .94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 36px;
    min-height: 74px;
}

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

.brand-mark {
    display: inline-flex;
    width: 25px;
    height: 25px;
    color: var(--ink);
}

.brand-mark svg {
    width: 100%;
    height: 100%;
}

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

.brand-text strong {
    font-family: var(--serif);
    font-size: 19px;
    letter-spacing: .12em;
    font-weight: 600;
}

.brand-text small {
    display: none;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-left: auto;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
    border: 0;
    border-bottom: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    font-size: 12.5px;
    letter-spacing: .1em;
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease;
}

.nav-link:hover {
    color: var(--ink);
}

.nav-link.is-active {
    color: var(--ink);
    border-bottom-color: var(--ink);
}

.nav-link.nav-muted {
    color: var(--faint);
}

.mobile-submit {
    display: none;
}

.nav-badge {
    color: var(--accent);
    font-size: 10.5px;
    font-weight: 600;
}

.nav-logout {
    display: inline-flex;
}

.nav-button {
    border: 0;
    background: transparent;
    font-size: 12.5px;
    letter-spacing: .1em;
    color: var(--muted);
    cursor: pointer;
    padding: 4px 0;
}

.nav-button:hover {
    color: var(--ink);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 32px;
    margin-left: auto;
    padding: 0 7px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 1.5px;
    background: var(--ink);
    transition: transform .2s ease, opacity .2s ease;
}

body.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ---------- 提示条 ---------- */

.flash-wrap:empty {
    display: none;
}

.flash-wrap {
    padding-top: 20px;
}

.flash {
    padding: 10px 14px;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--muted);
    background: var(--surface);
    font-size: 13px;
    color: var(--ink-2);
}

.flash-success {
    border-left-color: var(--success);
    background: var(--success-soft);
    color: var(--success);
}

.flash-error {
    border-left-color: var(--danger);
    background: var(--danger-soft);
    color: var(--danger);
}

.flash-info {
    border-left-color: var(--ink-2);
}

/* ---------- 页面导语 ---------- */

.page-intro {
    padding: clamp(46px, 6vw, 70px) 0 clamp(30px, 4vw, 44px);
    border-bottom: 1px solid var(--line);
}

.intro-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 48px;
}

.intro-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    font-size: 11px;
    letter-spacing: .24em;
}

.intro-label::before {
    content: "";
    width: 26px;
    height: 1px;
    background: currentColor;
    opacity: .6;
}

.page-intro h1 {
    margin-top: 14px;
    font-family: var(--serif);
    font-size: clamp(32px, 4vw, 46px);
    line-height: 1.28;
    font-weight: 600;
    letter-spacing: .04em;
}

.page-intro p {
    max-width: 560px;
    margin-top: 16px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.95;
}

.intro-meta {
    display: flex;
    flex-shrink: 0;
    gap: 30px;
}

.intro-stat {
    padding-left: 18px;
    border-left: 1px solid var(--line-strong);
}

.intro-stat strong {
    display: block;
    font-family: var(--serif);
    font-size: 27px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: .02em;
}

.intro-stat span {
    display: block;
    margin-top: 4px;
    color: var(--faint);
    font-size: 11px;
    letter-spacing: .14em;
}

/* ---------- 区块 ---------- */

.section {
    padding: clamp(30px, 4vw, 44px) 0 0;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: .06em;
}

.section-desc {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12.5px;
}

.section-note {
    color: var(--faint);
    font-size: 11.5px;
    letter-spacing: .06em;
}

.section-tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ---------- 筛选 ---------- */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 0;
    margin-bottom: 4px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.filter-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
}

.pill {
    padding: 1px 0;
    border-bottom: 1px solid transparent;
    color: var(--muted);
    font-size: 13px;
    letter-spacing: .04em;
    white-space: nowrap;
    transition: color .15s ease, border-color .15s ease;
}

.pill:hover {
    color: var(--ink);
}

.pill.is-active {
    color: var(--ink);
    border-bottom-color: var(--ink);
}

.filter-search {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 1 290px;
}

.filter-search input {
    flex: 1;
    min-width: 0;
    padding: 5px 2px;
    border: 0;
    border-bottom: 1px solid var(--line-strong);
    border-radius: 0;
    background: transparent;
    font-size: 12.5px;
    outline: none;
    transition: border-color .15s ease;
}

.filter-search input:focus {
    border-bottom-color: var(--ink);
}

.filter-search .btn {
    flex-shrink: 0;
    padding: 4px 0;
    border: 0;
    background: none;
    color: var(--ink);
    font-size: 12px;
    letter-spacing: .1em;
}

.filter-search .btn:hover {
    background: none;
    color: var(--accent);
}

.results-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 18px 0;
    color: var(--faint);
    font-size: 12px;
}

.link-quiet {
    color: var(--accent);
    font-size: 11.5px;
    letter-spacing: .04em;
}

.link-quiet:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- 照片列表 ---------- */

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

.card {
    display: flex;
    flex-direction: column;
}

.card-media {
    display: block;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    transition: border-color .2s ease;
}

.card-media img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: opacity .2s ease;
}

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

.card:hover .card-media img {
    opacity: .93;
}

.card-body {
    padding-top: 14px;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--faint);
    font-size: 11.5px;
}

.card-cat {
    color: var(--accent);
    font-size: 10.5px;
    letter-spacing: .14em;
}

.card-pin {
    padding: 0 5px;
    border: 1px solid #e0cec5;
    color: var(--accent);
    font-size: 10px;
    letter-spacing: .08em;
}

.card-title {
    margin-top: 7px;
    font-family: var(--serif);
    font-size: 19px;
    line-height: 1.55;
    font-weight: 600;
    letter-spacing: .02em;
}

.card-title a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
}

.card-excerpt {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.75;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
    color: var(--faint);
    font-size: 11.5px;
}

.card-more {
    color: var(--faint);
    letter-spacing: .04em;
}

.card-more:hover {
    color: var(--accent);
}

.card-likes {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--faint);
    font-family: var(--serif);
    font-size: 12px;
    line-height: 1;
    letter-spacing: .02em;
    transition: color .15s ease;
}

.card-likes svg {
    width: 13px;
    height: 13px;
}

.card-likes:hover {
    color: var(--accent);
}

/* ---------- 空状态 ---------- */

.empty-state {
    padding: clamp(44px, 6vw, 66px) 20px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.empty-icon {
    display: inline-flex;
    margin-bottom: 14px;
    color: var(--line-strong);
}

.empty-title {
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 600;
    letter-spacing: .04em;
}

.empty-text {
    max-width: 440px;
    margin: 9px auto 0;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.85;
}

.empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

/* ---------- 分页 ---------- */

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 22px;
    margin-top: 46px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.page-link {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border: 0;
    border-bottom: 1px solid transparent;
    background: none;
    color: var(--muted);
    font-size: 12.5px;
    letter-spacing: .06em;
    transition: color .15s ease, border-color .15s ease;
}

.page-link:hover {
    color: var(--ink);
}

.page-link.is-current {
    color: var(--ink);
    border-bottom-color: var(--ink);
    cursor: default;
}

.page-ellipsis {
    color: var(--faint);
    font-size: 11px;
}

/* ---------- 按钮 ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 18px;
    border: 1px solid var(--ink);
    background: transparent;
    color: var(--ink);
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: .08em;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    touch-action: manipulation;
    transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.btn:hover {
    background: var(--ink);
    color: #fff;
}

.btn:focus {
    outline: none;
}

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

.btn-primary,
.btn-gold {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.btn-primary:hover,
.btn-gold:hover {
    background: #33302a;
    border-color: #33302a;
}

.btn-outline {
    background: transparent;
    border-color: var(--line-strong);
    color: var(--muted);
}

.btn-outline:hover {
    border-color: var(--ink);
    background: transparent;
    color: var(--ink);
}

.btn-ghost {
    background: transparent;
    border-color: var(--line-strong);
    color: var(--ink);
}

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #8d3124;
    border-color: #8d3124;
}

.btn-success {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: #325743;
    border-color: #325743;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 11.5px;
}

.btn-block {
    width: 100%;
}

.btn[disabled] {
    opacity: .5;
    cursor: not-allowed;
}

/* ---------- 文章详情 ---------- */

.article-wrap {
    padding-top: 30px;
}

.crumbs {
    display: flex;
    align-items: center;
    gap: 7px;
    max-width: 840px;
    margin: 0 auto 20px;
    color: var(--faint);
    font-size: 11.5px;
    letter-spacing: .04em;
}

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

.article {
    max-width: 840px;
    margin: 0 auto;
}

.article-head {
    padding: 20px 0 0;
    border-top: 1px solid var(--line);
}

.eyebrow {
    color: var(--accent);
    font-size: 10.5px;
    letter-spacing: .18em;
}

.article-title {
    margin-top: 10px;
    font-family: var(--serif);
    font-size: clamp(28px, 3.6vw, 38px);
    line-height: 1.42;
    font-weight: 600;
    letter-spacing: .03em;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-top: 12px;
    padding-bottom: 16px;
    color: var(--faint);
    font-size: 11.5px;
    letter-spacing: .04em;
}

.article-figure {
    margin: 26px 0 0;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.article-figure img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 800px;
    object-fit: contain;
}

.article-body {
    max-width: 720px;
    padding: 28px 0 32px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-2);
    font-size: 15.5px;
    line-height: 2;
    letter-spacing: .01em;
    white-space: pre-line;
}

.article-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.author-box {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.8;
}

.author-avatar {
    display: none;
}

.author-box strong {
    margin-right: 8px;
    font-family: var(--serif);
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
}

.preview-note {
    max-width: 840px;
    margin: 0 auto 18px;
    padding: 10px 14px;
    border-left: 3px solid var(--accent);
    background: var(--accent-soft);
    color: #6f4232;
    font-size: 12px;
    line-height: 1.85;
}

/* 点赞 */

.like-block {
    display: flex;
    justify-content: center;
    padding: 22px 0 4px;
}

.like-form {
    margin: 0;
}

.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--muted);
    font-size: 12.5px;
    letter-spacing: .08em;
    cursor: pointer;
    transition: border-color .16s ease, color .16s ease, background .16s ease;
}

.like-btn svg {
    width: 16px;
    height: 16px;
}

.like-btn:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.like-btn.is-liked {
    border-color: #dcc0b4;
    background: var(--accent-soft);
    color: var(--accent);
}

.like-btn.is-liked svg {
    fill: currentColor;
    animation: like-pop .28s ease;
}

.like-btn[disabled] {
    opacity: .6;
    cursor: default;
}

.like-count {
    padding-left: 9px;
    border-left: 1px solid var(--line-strong);
    font-family: var(--serif);
    font-size: 13px;
    line-height: 1;
}

.like-btn.is-liked .like-count {
    border-left-color: #dcc0b4;
}

@keyframes like-pop {
    0% { transform: scale(1); }
    35% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

/* ---------- 表单 ---------- */

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.panel-head {
    padding: 18px 24px;
    border-bottom: 1px solid var(--line);
}

.panel-head h2 {
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: .06em;
}

.panel-head p {
    margin-top: 4px;
    color: var(--faint);
    font-size: 12px;
}

.panel-body {
    padding: 26px 24px;
}

.field {
    margin-bottom: 20px;
}

.field:last-child {
    margin-bottom: 0;
}

.field-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 7px;
    color: var(--ink-2);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .03em;
}

.field-label .required {
    color: var(--accent);
    font-weight: 400;
}

.field-label .counter {
    color: var(--faint);
    font-size: 11px;
    font-weight: 400;
}

.input,
.textarea,
.select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line-strong);
    background: #fff;
    font-size: 14px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.input:focus,
.textarea:focus,
.select:focus {
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(28, 27, 25, .05);
}

.textarea {
    min-height: 150px;
    resize: vertical;
    line-height: 1.85;
}

.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236f6b62' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    padding-right: 36px;
}

.input.is-invalid,
.textarea.is-invalid,
.select.is-invalid {
    border-color: var(--danger);
}

.field-error {
    margin-top: 5px;
    color: var(--danger);
    font-size: 11.5px;
}

.field-hint {
    margin-top: 5px;
    color: var(--faint);
    font-size: 11.5px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 13px;
    cursor: pointer;
}

.checkbox-row input {
    width: 15px;
    height: 15px;
    margin-top: 3px;
    accent-color: var(--ink);
    cursor: pointer;
}

.checkbox-row span small {
    display: block;
    color: var(--faint);
    font-size: 11.5px;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.form-actions .spacer {
    flex: 1;
}

/* 上传区 */

.upload-box {
    position: relative;
    display: block;
    padding: 18px;
    border: 1px dashed var(--line-strong);
    background: var(--surface-soft);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.upload-box:hover {
    border-color: var(--ink);
    background: #fff;
}

.upload-box input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 134px;
    text-align: center;
    color: var(--faint);
    font-size: 12px;
}

.upload-placeholder strong {
    color: var(--ink-2);
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: .04em;
}

.upload-placeholder .upload-icon {
    color: var(--faint);
}

.upload-preview {
    display: none;
}

.upload-preview img {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
}

.upload-box.has-file .upload-placeholder {
    display: none;
}

.upload-box.has-file .upload-preview {
    display: block;
}

.upload-box.is-invalid {
    border-color: var(--danger);
}

.upload-file-name {
    margin-top: 8px;
    color: var(--faint);
    font-size: 11.5px;
    text-align: center;
    word-break: break-all;
}

.current-thumb {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
}

.current-thumb img {
    width: 110px;
    height: 82px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--line);
}

.current-thumb span {
    color: var(--faint);
    font-size: 11.5px;
    line-height: 1.75;
}

/* ---------- 投稿 / 账号页布局 ---------- */

.submit-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 40px;
    align-items: start;
    padding-top: 4px;
}

.aside-card {
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.aside-card h3 {
    padding-bottom: 10px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--line);
    font-family: var(--serif);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .06em;
}

.aside-list {
    counter-reset: notes;
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.8;
}

.aside-list li {
    position: relative;
    padding-left: 25px;
    counter-increment: notes;
}

.aside-list li::before {
    content: "0" counter(notes);
    position: absolute;
    left: 0;
    top: 1px;
    color: var(--accent);
    font-family: var(--serif);
    font-size: 11px;
    letter-spacing: .04em;
}

.aside-note {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    color: var(--faint);
    font-size: 11.5px;
    line-height: 1.8;
}

.success-card {
    max-width: 560px;
    margin: 44px auto 0;
    padding: 44px 32px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.success-icon {
    display: inline-flex;
    margin-bottom: 16px;
    color: var(--success);
}

.success-card h1 {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: .04em;
}

.success-card p {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.9;
}

.success-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 24px;
}

/* ---------- 页脚 ---------- */

.site-footer {
    margin-top: clamp(52px, 7vw, 84px);
    padding: 30px 0;
    border-top: 1px solid var(--line);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.footer-brand strong {
    font-family: var(--serif);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .14em;
}

.footer-note {
    margin-top: 3px;
    color: var(--faint);
    font-size: 11.5px;
}

.footer-meta {
    color: var(--faint);
    font-size: 11.5px;
    line-height: 1.9;
    letter-spacing: .03em;
    text-align: right;
}

.footer-meta a {
    color: var(--muted);
}

.footer-meta a:hover {
    color: var(--ink);
}

/* ---------- 登录页 ---------- */

.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(rgba(227, 221, 210, .35) 1px, transparent 1px) 0 0 / 100% 88px,
        var(--bg);
}

.auth-card {
    width: min(408px, 100%);
    padding: 36px 32px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 28px;
    color: var(--ink);
    font-family: var(--serif);
    font-size: 14px;
    letter-spacing: .12em;
}

.auth-main h2 {
    font-family: var(--serif);
    font-size: 23px;
    font-weight: 600;
    letter-spacing: .04em;
}

.auth-main .auth-tip {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.auth-form {
    margin-top: 24px;
}

.auth-back {
    display: inline-flex;
    margin-top: 22px;
    color: var(--faint);
    font-size: 11.5px;
    letter-spacing: .04em;
}

.auth-back:hover {
    color: var(--ink);
}

/* ---------- 后台 ---------- */

.admin-page {
    padding-top: 34px;
}

.admin-page > .wrap > form.panel {
    max-width: 920px;
}

.admin-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.admin-title {
    font-family: var(--serif);
    font-size: clamp(22px, 2.6vw, 28px);
    font-weight: 600;
    letter-spacing: .04em;
}

.admin-sub {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.stat-card {
    padding: 16px 22px;
    border-left: 1px solid var(--line);
}

.stat-card:first-child {
    border-left: 0;
}

.stat-label {
    color: var(--faint);
    font-size: 11px;
    letter-spacing: .1em;
}

.stat-value {
    margin-top: 3px;
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: .02em;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.tab {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: -1px;
    padding: 8px 0;
    border-bottom: 1px solid transparent;
    color: var(--muted);
    font-size: 12.5px;
    letter-spacing: .04em;
}

.tab:hover {
    color: var(--ink);
}

.tab.is-active {
    color: var(--ink);
    border-bottom-color: var(--ink);
    font-weight: 600;
}

.tab-count {
    color: var(--faint);
    font-size: 11px;
}

.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 16px 0 14px;
}

.admin-search {
    display: flex;
    gap: 10px;
    flex: 1 1 260px;
    max-width: 340px;
}

.admin-search input {
    flex: 1;
    min-width: 0;
    padding: 6px 2px;
    border: 0;
    border-bottom: 1px solid var(--line-strong);
    background: transparent;
    font-size: 12.5px;
    outline: none;
}

.admin-search input:focus {
    border-bottom-color: var(--ink);
}

.table-wrap {
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.data-table {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 14px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--line);
}

.data-table th {
    background: var(--surface-soft);
    color: var(--faint);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .12em;
    white-space: nowrap;
}

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

.data-table tbody tr:hover {
    background: #fdfbf6;
}

.thumb-cell img {
    width: 64px;
    height: 48px;
    object-fit: cover;
    padding: 2px;
    background: #fff;
    border: 1px solid var(--line);
}

.row-title {
    display: block;
    max-width: 320px;
    color: var(--ink);
    font-family: var(--serif);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: .02em;
}

.row-title:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.row-caption {
    display: block;
    max-width: 320px;
    margin-top: 2px;
    color: var(--faint);
    font-size: 11.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.row-meta {
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.75;
    white-space: nowrap;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-size: 11.5px;
    letter-spacing: .04em;
    white-space: nowrap;
}

.status::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.status-pending { color: #8a6524; }
.status-approved { color: var(--success); }
.status-rejected { color: var(--danger); }

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

.table-actions .btn {
    padding: 2px 0;
    border: 0;
    background: none;
    color: var(--muted);
    font-size: 11.5px;
    letter-spacing: .02em;
}

.table-actions .btn:hover {
    background: none;
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.table-actions .btn-success {
    background: none;
    border: 0;
    color: var(--success);
    font-weight: 600;
}

.table-actions .btn-success:hover {
    background: none;
    color: var(--success);
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

.btn-link {
    padding: 2px 0;
    border: 0;
    background: none;
    color: var(--danger);
    font-size: 11.5px;
    text-decoration: none;
    cursor: pointer;
}

.btn-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* 审核页 */

.review-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
    gap: 30px;
    align-items: start;
}

.review-media {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.review-media img {
    width: 100%;
    max-height: 620px;
    object-fit: contain;
    background: var(--surface-soft);
}

.review-caption {
    padding: 18px 20px;
    border-top: 1px solid var(--line);
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.95;
    white-space: pre-line;
}

.review-side {
    display: grid;
    gap: 20px;
}

.review-meta {
    display: grid;
    gap: 10px;
    margin: 0;
}

.review-meta div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
}

.review-meta div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.review-meta dt {
    flex-shrink: 0;
    color: var(--faint);
}

.review-meta dd {
    margin: 0;
    color: var(--ink-2);
    text-align: right;
    word-break: break-word;
}

.review-side .aside-card {
    margin-top: 0;
}

.preset-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 9px;
}

.chip-preset {
    padding: 3px 8px;
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--muted);
    font-size: 11px;
    cursor: pointer;
}

.chip-preset:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.review-actions {
    display: grid;
    gap: 9px;
}

.review-actions .btn {
    width: 100%;
}

.action-divider {
    height: 1px;
    margin: 18px 0;
    background: var(--line);
}

.panel-inner-form {
    padding: 20px;
}

/* ---------- 安装页 ---------- */

.install-body {
    min-height: 100vh;
    padding: 44px 20px 64px;
    background:
        linear-gradient(rgba(227, 221, 210, .35) 1px, transparent 1px) 0 0 / 100% 88px,
        var(--bg);
}

.install-card {
    width: min(680px, 100%);
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.install-head {
    padding: 28px 30px;
    border-bottom: 1px solid var(--line);
}

.install-head h1 {
    font-family: var(--serif);
    font-size: 23px;
    font-weight: 600;
    letter-spacing: .04em;
}

.install-head p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12.5px;
}

.install-body-inner {
    padding: 26px 30px 30px;
}

.check-list {
    display: grid;
    gap: 0;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--line);
}

.check-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
}

.check-ok { color: var(--success); }
.check-bad { color: var(--danger); }
.check-warn { color: #8a6524; }

.install-note {
    margin-top: 16px;
    color: var(--faint);
    font-size: 11.5px;
    line-height: 1.9;
}

.install-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

/* ---------- 响应式 ---------- */

@media (hover: none) {
    .btn:hover,
    .btn-primary:hover,
    .btn-gold:hover {
        background: var(--ink);
        border-color: var(--ink);
        color: #fff;
    }

    .btn-outline:hover {
        background: transparent;
        border-color: var(--line-strong);
        color: var(--muted);
    }

    .btn-danger:hover {
        background: var(--danger);
        border-color: var(--danger);
    }

    .btn-success:hover {
        background: var(--success);
        border-color: var(--success);
    }

    .table-actions .btn:hover,
    .table-actions .btn-success:hover {
        background: none;
        border: 0;
    }

    .nav-link:hover {
        color: var(--muted);
    }

    .nav-link.is-active:hover {
        color: var(--ink);
    }

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

    .card:hover .card-media img {
        opacity: 1;
    }

    .like-btn:hover {
        border-color: var(--line-strong);
        color: var(--muted);
    }
}

@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .submit-layout,
    .review-layout {
        grid-template-columns: 1fr;
    }

    .aside-card {
        position: static;
    }

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

    .stat-card:nth-child(3) {
        border-left: 0;
    }

    .stat-card:nth-child(n+3) {
        border-top: 1px solid var(--line);
    }
}

@media (max-width: 820px) {
    .header-inner {
        min-height: 62px;
        gap: 16px;
    }

    .mobile-submit {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
        padding: 6px 14px;
        background: var(--ink);
        color: #fff;
        font-size: 12px;
        letter-spacing: .08em;
        line-height: 1.4;
    }

    .mobile-submit:hover {
        background: #33302a;
        color: #fff;
    }

    .nav-toggle {
        display: flex;
        margin-left: 0;
    }

    .site-nav {
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 4px 4vw 12px;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
    }

    body.nav-open .site-nav {
        display: flex;
    }

    .nav-link {
        justify-content: flex-start;
        padding: 11px 0;
        border-bottom: 1px solid var(--line);
    }

    .nav-link.is-active {
        border-bottom-color: var(--line);
        font-weight: 600;
    }

    .nav-logout,
    .nav-logout .nav-button {
        width: 100%;
        justify-content: flex-start;
        padding: 11px 0;
        text-align: left;
    }

    .header-inner {
        min-height: 62px;
    }

    .intro-inner {
        display: block;
    }

    .intro-meta {
        margin-top: 22px;
    }

    .intro-stat:first-child {
        padding-left: 0;
        border-left: 0;
    }
}

@media (max-width: 720px) {
    .filter-bar {
        display: block;
        padding: 12px 0;
    }

    .filter-cats {
        gap: 18px;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 3px;
        -webkit-overflow-scrolling: touch;
    }

    .filter-search {
        max-width: none;
        margin-top: 12px;
    }

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

    .footer-meta {
        text-align: left;
    }

    .article-foot {
        align-items: flex-start;
    }

    .tabs {
        gap: 18px;
        overflow-x: auto;
        flex-wrap: nowrap;
    }
}

@media (max-width: 560px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .filter-search {
        max-width: none;
    }

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

    .stat-card {
        padding: 13px 16px;
    }

    .stat-value {
        font-size: 22px;
    }

    .panel-body {
        padding: 20px 18px;
    }

    .panel-head {
        padding: 16px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}
