:root {
  color-scheme: light;
  font: 16px/1.56 "Instrument Sans", "Apple SD Gothic Neo", "PingFang SC", system-ui, sans-serif;
  --ink:#352416;
  --muted:#76583c;
  --orange-dark:#823914;
  --accent:#b64614;
  --line:#ebd5b3;
  --paper:#fff5de;
  --surface:#fffdf7;
}
* { box-sizing:border-box }
body { margin:0; color:var(--ink); background:var(--paper); min-height:100vh }
header { background:#ffdf8a; color:var(--ink); border-bottom:1px solid #ecbd61 }
header div,main { max-width:1120px; margin:auto; padding:20px clamp(16px,5vw,46px) }
header div { display:flex; align-items:center; justify-content:space-between; gap:14px }
header strong { font-size:clamp(18px,3vw,24px); font-weight:760 }
main { padding-top:30px; padding-bottom:64px }
button,select,input,textarea { font:inherit }
button,select,.button { border:1px solid var(--line); background:#fff; color:var(--ink); border-radius:10px; padding:8px 13px; cursor:pointer; transition:background .15s,border-color .15s }
button:hover,select:hover,.button:hover { background:#ffe7aa; border-color:#d99d50 }
button:disabled { opacity:.62; cursor:wait }
header button,header select { border-color:var(--line); color:var(--ink); background:#fff0c6 }
header button:hover,header select:hover { background:#ffe7aa; border-color:#d99d50 }
header option { color:var(--ink); background:var(--surface) }
nav,.actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center }
nav button { background:#ffefc5; border-radius:99px; padding:8px 17px }
nav button[aria-pressed=true],form button[type=submit],form button:not([type]) { border-color:var(--accent); background:var(--accent); color:#fff }
h1 { font-size:clamp(2.15rem,5vw,3.5rem); line-height:1.16; letter-spacing:-.052em; margin:30px 0 20px }
h2 { line-height:1.3 }
form { display:flex; gap:8px; margin:16px 0 }
input,textarea { padding:10px 12px; border:1px solid var(--line); border-radius:10px; color:var(--ink); min-width:0 }
form input,textarea { width:100% }
.grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(250px,100%),1fr)); gap:16px }
.card,article,.empty { background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:20px; box-shadow:0 6px 18px #8f4b1410 }
.card { display:grid; border-top:3px solid #f9be55; grid-template-rows:auto auto 1fr; align-content:start; gap:11px }
.card h2 { font-size:19px; margin:0 }
.card button { justify-self:start; align-self:end; background:#ffe9aa; color:var(--orange-dark); font-weight:650 }
.card button:hover { background:#ffdc83 }
small,#status { color:var(--muted) }
.card small { font-weight:650; font-size:.78rem }
.reader { margin-top:18px; overflow-wrap:anywhere }
.body { white-space:pre-wrap }
video,audio,iframe { width:100%; border-radius:10px }
iframe { height:68vh; border:1px solid var(--line) }
video { background:#2a1a0e }
mark { background:#ffd762 }
.button { display:inline-block; text-decoration:none }
dialog { border:1px solid var(--line); border-top:4px solid #ed8a37; border-radius:16px; width:min(480px,90vw); padding:24px; color:var(--ink); box-shadow:0 18px 48px #67340f33 }
dialog form { display:grid }
dialog::backdrop { background:#44200570 }
dialog>button { margin:4px 6px 0 0 }
:focus-visible { outline:3px solid #aa4915; outline-offset:3px }
@media(max-width:520px) {
  header div { gap:8px }
  header button,header select { font-size:.85rem; padding:7px 8px }
  nav button { padding:7px 11px }
  main { padding-top:23px }
}
