:root {
  color-scheme: light;
  --ink: #172b25;
  --muted: #4d6258;
  --paper: #fafbf7;
  --line: #dbe4d9;
  --accent: #245640;
  --soft: #e5eddf;
  font: 16px/1.5 "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
.wrap { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.top { border-bottom: 1px solid var(--line); background: #fff; }
.nav, .footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav { min-height: 70px; }
.nav nav { display: flex; gap: 24px; }
.brand { font-size: 2rem; font-weight: 850; letter-spacing: -.1em; text-decoration: none; color: var(--ink); }
.brand span { color: #487b53; }
main { padding: 32px 0 64px; min-height: 65vh; }
.hero { padding: clamp(28px, 6vw, 72px); background: var(--soft); border-radius: 22px; }
h1, h2, h3, p { margin: 0 0 .65em; }
h1 { font-family: Georgia, serif; font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 500; line-height: 1.08; }
h2 { font-size: 1.45rem; }
.hero p, .small, .category, .catalog-title span, dt, .footer p { color: var(--muted); }
.hero p, .footer p { margin: 0; }
.filters { margin: 24px 0 35px; display: grid; grid-template-columns: 2fr 1fr auto; align-items: end; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 650; min-width: 0; }
input, select, button, .button { font: inherit; padding: 10px 14px; border-radius: 9px; min-height: 46px; }
input, select { width: 100%; border: 1px solid #a2b5a8; background: #fff; color: var(--ink); }
button, .button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 650; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; }
button:hover, .button:hover { background: #163e2d; }
:focus-visible { outline: 3px solid #994a18; outline-offset: 3px; }
.secondary { background: #fff; color: var(--accent); }
.secondary:hover { background: var(--soft); }
.catalog-title { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.grid, .settings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card, .panel { border: 1px solid var(--line); background: #fff; border-radius: 16px; }
.card { overflow: hidden; display: flex; flex-direction: column; }
.art { display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--soft); overflow: hidden; text-decoration: none; }
.art img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.placeholder { font: 1.2rem Georgia, serif; text-align: center; padding: 16px; }
.card-body { flex: 1; display: flex; flex-direction: column; align-items: start; padding: 16px; }
.card h3 { overflow-wrap: anywhere; font-size: 1rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.category, .small { font-size: .9rem; }
.card .button { margin-top: auto; }
.panel { padding: clamp(18px, 4vw, 32px); }
.panel form { display: grid; gap: 14px; justify-items: start; }
.panel label { width: 100%; }
.narrow { max-width: 500px; margin: 4vh auto; }
.empty { margin: 12px 0; }
.detail, .settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
.detail .art { border-radius: 16px; }
.detail h1 { font-size: clamp(1.8rem, 4vw, 3rem); overflow-wrap: anywhere; }
.description { white-space: pre-line; }
.detail .small { margin-top: 12px; }
.notice { padding: 12px 16px; background: var(--soft); border-radius: 8px; }
dd { margin: 0 0 10px; }
.logout { margin-top: 24px; }
.pagination { display: flex; justify-content: center; gap: 20px; margin-top: 28px; }
.footer { border-top: 1px solid var(--line); padding: 22px 0; }
@media (max-width: 780px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .wrap { width: calc(100% - 28px); }
  .grid, .settings, .detail, .filters { grid-template-columns: 1fr; }
  .catalog-title, .footer .wrap { align-items: flex-start; flex-direction: column; gap: 5px; }
}
