:root { --ink:#2b2420; --soft:#6a5d52; --paper:#fbf7ee; --linen:#f1e8d4; --rule:#d9caa9; --teal:#1d5a59; --tomato:#c8432b; --sun:#efb23a; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; color: var(--ink); background: var(--linen); }
a { color: var(--teal); }
code { background: var(--paper); padding: 0 .3em; border-radius: 3px; }
.bar { display: flex; align-items: center; gap: 2rem; padding: .7rem 1.4rem; background: var(--teal); color: #fff; position: sticky; top: 0; z-index: 2; }
.brand { color: #fff; font-weight: 800; font-size: 1.15rem; text-decoration: none; letter-spacing: .01em; }
.brand span { color: var(--sun); }
.bar nav { display: flex; gap: .4rem; flex-wrap: wrap; }
.bar nav a { color: #e6efe9; text-decoration: none; padding: .3rem .7rem; border-radius: 5px; }
.bar nav a.on, .bar nav a:hover { background: rgba(255,255,255,.15); color: #fff; }
.bar nav b { display: inline-block; min-width: 1.4em; text-align: center; background: rgba(0,0,0,.25); border-radius: 9px; font-size: .8rem; padding: 0 .35em; }
.wrap { max-width: 78rem; margin: 0 auto; padding: 1.4rem; }
h1 { font-size: 1.5rem; margin: 1rem 0 .8rem; }
h2 { font-size: 1.1rem; margin: 0 0 .6rem; }
.panel { background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; padding: 1.1rem 1.3rem; }
.row { display: flex; gap: 1rem; align-items: end; flex-wrap: wrap; }
.hint, .empty { color: var(--soft); }
.warn { color: var(--tomato); font-weight: 600; }
.ok { color: #2e7d4f; font-weight: 600; }
pre#log { background: #1f1b18; color: #e9e2cf; padding: .8rem 1rem; border-radius: 6px; max-height: 18rem; overflow: auto; font-size: .82rem; white-space: pre-wrap; }
label { display: flex; flex-direction: column; gap: .2rem; font-size: .8rem; font-weight: 600; color: var(--soft); }
label small { font-weight: 400; }
input, select, textarea { font: inherit; font-size: .95rem; color: var(--ink); padding: .45rem .55rem; border: 1px solid var(--rule); border-radius: 5px; background: #fff; width: 100%; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--sun); border-color: var(--sun); }
button { font: inherit; font-weight: 600; padding: .55rem 1rem; border: 1px solid var(--rule); border-radius: 6px; background: #fff; cursor: pointer; color: var(--ink); }
button:hover { border-color: var(--teal); }
button.go { background: var(--teal); border-color: var(--teal); color: #fff; }
kbd { font: inherit; font-size: .75rem; opacity: .75; margin-left: .3rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 1rem; }
.tile { background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; padding: .6rem; text-decoration: none; color: var(--ink); font-size: .85rem; }
.tile:hover { border-color: var(--teal); }
.tile img { width: 100%; aspect-ratio: 3/2; object-fit: contain; background: #e9dfc9; border-radius: 4px; margin-bottom: .4rem; }
.tile .t { color: var(--soft); }
.lo { color: var(--tomato); font-weight: 700; }

.review { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.4rem; padding: 1.2rem 1.4rem; align-items: start; }
.scans { position: sticky; top: 4rem; display: grid; gap: 1rem; }
.scans figure { margin: 0; background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; padding: .6rem; }
.scans img { width: 100%; max-height: 42vh; object-fit: contain; display: block; background: #e9dfc9; border-radius: 4px; cursor: zoom-in; }
.scans figcaption { display: flex; align-items: center; gap: .4rem; margin-top: .5rem; flex-wrap: wrap; }
.scans figcaption span { font-weight: 700; margin-right: .3rem; }
.scans figcaption small { color: var(--soft); margin-left: auto; }
.scans figcaption button { padding: .25rem .6rem; }
.facts { background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; padding: 1rem 1.2rem 1.4rem; }
.facts .head { display: flex; justify-content: space-between; align-items: start; }
.facts .head h1 { margin: 0; }
.facts .head p { margin: .1rem 0 0; color: var(--soft); }
.pager a { display: inline-block; font-size: 1.3rem; text-decoration: none; padding: .1rem .6rem; border: 1px solid var(--rule); border-radius: 6px; margin-left: .3rem; background: #fff; }
.flags { background: #fff4dc; border: 1px solid var(--sun); border-radius: 6px; padding: .6rem .9rem; margin: .8rem 0; font-size: .9rem; }
.flags ul { margin: .3rem 0 0; padding-left: 1.2rem; }
fieldset { border: 0; border-top: 1px solid var(--rule); margin: 1rem 0 0; padding: .8rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem .9rem; }
legend { font-weight: 800; font-size: .95rem; padding-right: .5rem; color: var(--teal); }
.wide { grid-column: 1 / -1; }
.count { font-weight: 400; float: right; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.3rem; position: sticky; bottom: 0; background: var(--paper); padding: .7rem 0 .2rem; border-top: 1px solid var(--rule); }
@media (max-width: 60rem) { .review { grid-template-columns: minmax(0, 1fr); } .scans { position: static; } }

.pricebox { background: #fff; border: 1px solid var(--rule); border-radius: 6px; padding: .6rem .9rem; font-size: .88rem; }
.pricebox p { margin: .25rem 0; }
.pricebox button { padding: .3rem .7rem; margin-right: .6rem; }
.comps a { margin-left: .5rem; font-weight: 600; }
.tile .price { font-weight: 800; color: var(--teal); margin-top: .2rem; }
.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1.2rem; }
.rules table { width: 100%; border-collapse: collapse; }
.rules td { padding: .25rem .3rem; border-bottom: 1px solid var(--rule); }
.rules td input { width: 6rem; }
.warnbox { background: #fde8e4; border-color: var(--tomato); }
legend small { font-weight: 400; color: var(--soft); }
.tile .cat { font-size: .78rem; color: var(--soft); text-transform: capitalize; }
.bar .brand { display: flex; align-items: center; gap: .6rem; }
.bar .brand img { height: 40px; width: auto; }
.bar nav a { font-size: .9rem; }
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin: 1rem 0; }
.tabs a { padding: .35rem .8rem; border: 1px solid var(--rule); border-radius: 6px; background: var(--paper); text-decoration: none; color: var(--ink); }
.tabs a.on { background: var(--teal); color: #fff; border-color: var(--teal); }
.tabs b { font-size: .8rem; opacity: .8; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: .8rem; margin: 1rem 0 1.4rem; }
.stat { background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; padding: .9rem 1rem; text-decoration: none; color: var(--ink); }
.stat b { display: block; font-size: 1.8rem; color: var(--teal); }
.stat span { color: var(--soft); font-size: .85rem; }
.panel { margin-bottom: 1.2rem; }
.panel h3 { margin: 1.2rem 0 .5rem; }
table.list { width: 100%; border-collapse: collapse; background: var(--paper); }
table.list td { padding: .55rem .6rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.muted { color: var(--soft); }
.btn { display: inline-block; padding: .55rem 1rem; border-radius: 6px; text-decoration: none; font-weight: 600; }
.btn.go { background: var(--teal); color: #fff; }
.editor { display: grid; gap: .9rem; background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; padding: 1.2rem; }
.editor .two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: .9rem; }
.editor textarea { font: 15px/1.6 ui-monospace, Menlo, monospace; }
.check { flex-direction: row; align-items: center; gap: .6rem; font-size: .95rem; color: var(--ink); }
.check input { width: auto; }
.file input { padding: .35rem; }
.progress li { margin: .4rem 0; }
.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1.2rem; }

body.auth { display: grid; place-items: center; min-height: 100vh; padding: 1rem; }
.auth-box { width: min(100%, 26rem); text-align: center; }
.auth-box img { width: 220px; height: auto; margin: 0 auto 1rem; display: block; }
.auth-box h1 { margin: 0 0 1rem; }
.auth-box .editor { text-align: left; }
.auth-box p { margin: .8rem 0; }

.nextno { font-size: 1.05rem; margin: 0; align-self: center; }
.bigno { font-size: 1.3rem; font-family: ui-monospace, Menlo, monospace; }
@media print { .bar, form, .actions, button { display: none !important; } }
label.inline { display: inline-flex; flex-direction: row; align-items: center; gap: .4rem; margin-left: .8rem; }
label.inline select { width: auto; }
.progress .thumbnail { vertical-align: middle; margin-right: .3rem; border: 1px solid var(--rule); border-radius: 2px; background: #fff; }
.progress li { padding: .3rem 0; }
