* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
    color: #222;
    background: #f5f7fb;
}

.container {
    max-width: 980px;
    margin: 24px auto;
    padding: 0 16px;
}

.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
    padding: 16px;
    margin-bottom: 16px;
}

h1,
h2,
h3 {
    margin-top: 0;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.btn {
    border: 0;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
}

.btn-muted {
    background: #e5e7eb;
}

.row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.row>* {
    flex: 1;
    min-width: 220px;
}

input,
textarea,
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
}

textarea {
    min-height: 180px;
    resize: vertical;
}

#editor {
    min-height: 220px;
}

#editor .ql-editor {
    min-height: 180px;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    padding: 10px;
    font-size: 14px;
}

.meta {
    color: #6b7280;
    font-size: 13px;
}

.cover {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: 8px;
}

.rich-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.rich-content p {
    margin: 0.5em 0;
}

.topbar {
    background: #111827;
    color: #fff;
    padding: 12px 16px;
}

.topbar .container {
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 详情页顶栏标题：单行省略，适配窄屏 */
.topbar-detail {
    justify-content: center;
}

.detail-header-title {
    margin: 0;
    max-width: 100%;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.35;
    color: #fff;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.empty {
    color: #6b7280;
}