:root { --red: #b3202a; --green: #2d6a3e; --bg: #faf7f2; --card: #fff; --muted: #6b6b6b; --line: #e3ddd3; }
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: #222; }
header.top { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; padding: .7rem 1rem; background: var(--red); color: #fff; }
header.top a, header.top button.link { color: #fff; text-decoration: none; margin-left: .8rem; }
.brand { font-weight: 700; font-size: 1.15rem; margin-left: 0 !important; }
main { max-width: 1100px; margin: 0 auto; padding: 1rem; }
h1 { margin: .5rem 0 1rem; }
h2 { font-size: 1.15rem; margin: 1.2rem 0 .6rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1rem; margin-bottom: 1rem; }
.card h2:first-child { margin-top: 0; }
.narrow { max-width: 420px; }
label { display: block; margin: .5rem 0; }
label.check { display: flex; gap: .4rem; align-items: center; }
input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { display: block; width: 100%; padding: .5rem; margin-top: .2rem; border: 1px solid #ccc; border-radius: 6px; font: inherit; }
input[type=range] { width: 100%; }
fieldset { border: 1px solid var(--line); border-radius: 6px; margin: .5rem 0; }
button { background: var(--green); color: #fff; border: 0; border-radius: 6px; padding: .55rem 1rem; font: inherit; cursor: pointer; margin-top: .4rem; }
button.secondary { background: #666; }
button.danger { background: var(--red); }
button.link { background: none; color: inherit; padding: 0; text-decoration: underline; margin: 0 .4rem 0 0; }
button.link.danger { color: var(--red); }
form.inline { display: inline; }
.flash { padding: .7rem 1rem; border-radius: 8px; margin-bottom: 1rem; background: #e5f3e8; border: 1px solid #b9dcc1; }
.flash.error { background: #fbe7e8; border-color: #f0b9bd; }
.small { font-size: .85rem; }
.muted { color: var(--muted); }
.warn { color: var(--red); font-weight: 600; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.card.cal { display: flex; flex-direction: column; gap: .2rem; color: inherit; text-decoration: none; }
.doors { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.door { background: var(--card); border: 2px dashed var(--line); border-radius: 10px; padding: .6rem; min-width: 0; }
.door.filled { border-style: solid; border-color: #c9b37e; }
.door-head { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin-bottom: .3rem; }
.num { font-size: 1.5rem; font-weight: 700; color: var(--red); margin-right: auto; }
.fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.door audio { width: 100%; height: 32px; margin: .3rem 0; }
.door input[type=file] { font-size: .8rem; padding: .2rem; }
.badge { font-size: .7rem; padding: .1rem .4rem; border-radius: 99px; background: #eee; }
.badge.onbox { background: #d8eedd; }
.badge.played { background: #fde9c8; }
.badge.pending { background: #e3e7f6; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1rem; margin: 0 0 .5rem; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }
meter { width: 100%; }
table { border-collapse: collapse; width: 100%; background: var(--card); margin-bottom: 1rem; }
th, td { text-align: left; padding: .35rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.scroll { overflow-x: auto; }
.subnav a { margin-right: 1rem; }
code { background: #f1ede6; padding: 0 .3rem; border-radius: 4px; }
details.month { margin-bottom: .5rem; }
details.month summary { font-weight: 600; cursor: pointer; padding: .3rem 0; }
.inline-form { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.inline-form input[type=date] { width: auto !important; display: inline-block !important; margin: 0 !important; padding: .2rem !important; }
.door .num { font-size: 1.05rem; }
