:root {
    color-scheme: light;
    --ink: #24221f;
    --muted: #6d665e;
    --paper: #fbfaf7;
    --panel: #ffffff;
    --line: #ddd7cf;
    --accent: #6f343d;
    --accent-dark: #51242c;
    --warning: #fff1c9;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.5; }
header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem max(1rem, calc((100vw - 1120px) / 2)); background: #231f20; color: white; }
header div { display: flex; align-items: baseline; gap: .8rem; }
header span, small, .hint { color: var(--muted); font-weight: 400; }
main { width: min(1120px, calc(100% - 2rem)); margin: 1.5rem auto 4rem; }
main.narrow { width: min(480px, calc(100% - 2rem)); margin-top: 8vh; }
section, .narrow { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem; margin-bottom: 1rem; box-shadow: 0 6px 20px rgba(40, 30, 25, .05); }
h1, h2 { line-height: 1.2; margin-top: 0; }
h2 { font-size: 1.15rem; }
.section-title { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.synthetic { background: var(--warning); border: 1px solid #dcae42; padding: .75rem 1rem; border-radius: 8px; font-weight: 700; }
.notice { background: #eef7ed; border-left: 4px solid #4b7e47; padding: .85rem 1rem; }
.error { background: #fdeaea; border-left: 4px solid #a83232; padding: .85rem 1rem; }
.badge { border-radius: 999px; padding: .2rem .65rem; background: #ece6df; font-size: .85rem; }
form.editor, .action-form { display: grid; gap: 1rem; }
.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
label { display: grid; gap: .35rem; font-weight: 650; }
label.check, fieldset label { display: inline-flex; align-items: center; margin-right: 1rem; font-weight: 500; }
input, textarea { width: 100%; border: 1px solid #aaa198; border-radius: 7px; padding: .7rem .75rem; font: inherit; background: white; color: var(--ink); }
input:focus, textarea:focus { outline: 3px solid rgba(111, 52, 61, .18); border-color: var(--accent); }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: .8rem 1rem; }
button { width: fit-content; border: 0; border-radius: 7px; padding: .7rem 1rem; background: var(--accent); color: white; font: inherit; font-weight: 700; cursor: pointer; }
button:hover { background: var(--accent-dark); }
button.secondary { background: #5a5552; }
button:disabled { opacity: .45; cursor: not-allowed; }
.actions { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.actions h2, .actions .hint { grid-column: 1 / -1; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { padding: .65rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
code { overflow-wrap: anywhere; }
dl { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; }
dd { margin: 0; }
a { color: var(--accent); }

@media (max-width: 700px) {
    .columns, .actions { grid-template-columns: 1fr; }
    header, header div { align-items: flex-start; }
    header div { flex-direction: column; gap: 0; }
}
