:root {
    color-scheme: light;
    --paper: #f3efe4;
    --paper-deep: #e9e2d3;
    --surface: #fffdf7;
    --surface-muted: #f8f4ea;
    --ink: #20231f;
    --ink-soft: #5d625b;
    --forest: #173b30;
    --forest-soft: #294b40;
    --brick: #a04432;
    --brick-deep: #7f3024;
    --moss: #6b7867;
    --line: #d6cfc1;
    --danger: #9e2f2f;
    --success: #2f6a50;
    --shadow: 0 18px 45px rgba(45, 39, 30, 0.09);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --content: 1180px;
    --reading: 760px;
    --font-ui: "IBM Plex Sans", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    --font-editorial: "Iowan Old Style", "Noto Serif SC", "Songti SC", serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--paper);
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(rgba(66, 56, 42, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(66, 56, 42, 0.025) 1px, transparent 1px),
        var(--paper);
    background-size: 42px 42px;
    font-family: var(--font-ui);
    line-height: 1.6;
    text-rendering: optimizeLegibility;
}

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

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

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

img {
    max-width: 100%;
}

.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;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    gap: 8px;
    padding: 8px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--ink);
    background: var(--surface);
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:hover {
    border-color: var(--moss);
    background: #fff;
}

.button:active {
    transform: translateY(1px);
}

.button:disabled {
    opacity: 0.48;
    cursor: not-allowed;
    transform: none;
}

.button-primary {
    color: #fffaf0;
    border-color: var(--brick);
    background: var(--brick);
}

.button-primary:hover {
    border-color: var(--brick-deep);
    background: var(--brick-deep);
}

.button-danger {
    color: var(--danger);
    border-color: rgba(158, 47, 47, 0.35);
}

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

.button-quiet {
    border-color: transparent;
    background: transparent;
}

.field {
    display: grid;
    gap: 7px;
}

.field label,
.field-label {
    color: var(--ink-soft);
    font-size: 0.84rem;
    font-weight: 650;
}

.input,
.select,
.textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    outline: none;
    color: var(--ink);
    background: rgba(255, 253, 247, 0.88);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.input,
.select {
    min-height: 44px;
    padding: 8px 12px;
}

.select {
    padding-right: 34px;
    text-overflow: ellipsis;
}

.textarea {
    min-height: 100px;
    padding: 11px 12px;
    resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: var(--forest-soft);
    box-shadow: 0 0 0 3px rgba(41, 75, 64, 0.12);
}

.field-error {
    margin: 0;
    color: var(--danger);
    font-size: 0.82rem;
}

.empty-state {
    padding: 48px 24px;
    border: 1px dashed var(--line);
    color: var(--ink-soft);
    text-align: center;
    background: rgba(255, 253, 247, 0.42);
}

.status {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 2px 9px;
    border-radius: 999px;
    color: var(--ink-soft);
    background: var(--paper-deep);
    font-size: 0.75rem;
    font-weight: 700;
}

.status-published {
    color: #25533f;
    background: #dce9e0;
}

.status-archived {
    color: #6e5149;
    background: #ece1dd;
}

:focus-visible {
    outline: 3px solid rgba(160, 68, 50, 0.36);
    outline-offset: 2px;
}

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