:root {
  color-scheme: light;
  --ink: #173a30;
  --paper: #f6f0e2;
  --surface: #fffcf4;
  --line: #ddd0b5;
  --accent: #74531c;
  --danger: #962c27;
  font-family: system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.55; }
header { background: var(--ink); color: var(--surface); }
a { color: inherit; text-underline-offset: 4px; }
.shell { width: min(1060px, calc(100% - 32px)); margin-inline: auto; }
.bar, .heading, .actions, nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.bar, .heading { justify-content: space-between; }
.bar { min-height: 68px; padding-block: 10px; }
.brand { font-weight: 700; text-decoration: none; font-size: 20px; }
nav a { text-decoration: none; }
nav [aria-current] { text-decoration: underline; }
main { padding-block: 30px 48px; }
h1 { margin: 0 0 16px; font-family: "Songti SC", SimSun, serif; font-size: 34px; }
.heading { margin-bottom: 14px; }
.heading h1 { margin: 0; }
.card { padding: clamp(16px, 4vw, 30px); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.login { max-width: 420px; margin: 48px auto; }
.narrow { max-width: 520px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); column-gap: 20px; }
label { display: grid; gap: 6px; margin-bottom: 15px; font-weight: 600; }
input, select, textarea { width: 100%; min-height: 40px; background: white; color: inherit; border: 1px solid #b7aa91; border-radius: 6px; font: inherit; padding: 8px 10px; }
input[type=checkbox] { width: auto; min-height: 0; margin: 0; }
textarea { resize: vertical; }
.check, .towns label { display: flex; align-items: center; gap: 7px; }
fieldset { border: 1px solid var(--line); margin: 0 0 16px; border-radius: 6px; }
.towns { display: flex; gap: 0 18px; flex-wrap: wrap; }
button, .button { display: inline-block; font: inherit; font-weight: 650; border: 1px solid transparent; border-radius: 6px; padding: 8px 16px; background: var(--ink); color: white; text-decoration: none; cursor: pointer; }
.quiet { background: transparent; border-color: #a9b6ac; font-size: 14px; }
.danger { background: var(--danger); }
.delete { color: var(--danger); margin-left: 8px; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.filters label { margin: 0; }
.filters a { padding-block: 8px; }
.table { overflow-x: auto; }
table { width: 100%; min-width: 460px; border-collapse: collapse; text-align: left; }
th, td { padding: 11px 8px; border-bottom: 1px solid var(--line); }
th, .muted { color: var(--accent); }
.message { padding: 12px 16px; background: #e1ebdf; border-radius: 6px; }
.error { color: var(--danger); background: #fae7e0; }
.pagination { margin-top: 20px; justify-content: flex-end; }
:focus-visible { outline: 3px solid #a37636; outline-offset: 3px; }
.secondary { background: #eee6d6; color: var(--ink); border-color: var(--line); }
.editor-row { padding: 16px; margin-bottom: 15px; border: 1px solid var(--line); border-radius: 6px; }
.media-grid, .summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; margin-block: 20px; }
.media-grid img { width: 100%; height: 190px; object-fit: contain; }
.metric { font-size: 44px; margin: 0; }
.preview { max-width: 860px; }
.preview img { max-width: 100%; max-height: 450px; object-fit: contain; }
.prose { white-space: pre-wrap; }
.card + .card { margin-top: 20px; }
.summary-grid > .card + .card, .media-grid > .card + .card { margin-top: 0; }
