:root {
  --bg: #080807; --panel: #12110f; --panel-2: #1a1814; --line: #2d291f; --text: #f2eee6; --muted: #aaa093;
  --gold: #c49a5c; --green: #6ed394; --red: #e67463; --blue: #86a9ff; --ink: #050505;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* class display rules must not override the hidden attribute */
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { padding-bottom: 76px; min-height: 100vh; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.brand { font-family: "Trajan Pro 3", Cinzel, Georgia, serif; letter-spacing: .12em; color: var(--gold); font-size: 15px; }
.brand span { color: var(--muted); font-size: 11px; margin-left: 6px; }
.desk { font-size: 13px; color: var(--muted); }
.desk button { background: none; border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 4px 10px; font-size: 13px; }
.view { padding: 16px; max-width: 900px; margin: 0 auto; }
.banner { background: #4d3b12; color: #ffe2a8; padding: 10px 16px; font-size: 14px; border-bottom: 1px solid #7a5d1f; }
.tabs { position: fixed; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(7, 1fr); background: var(--panel); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs a { color: var(--muted); text-decoration: none; text-align: center; padding: 12px 2px; font-size: 12px; }
.tabs a.active { color: var(--gold); border-top: 2px solid var(--gold); }
h1 { font-size: 20px; margin: 0 0 12px; }
h2 { font-size: 16px; margin: 20px 0 8px; color: var(--gold); }
h3 { margin: 0 0 8px; }
.muted { color: var(--muted); font-size: 13px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { text-align: center; padding: 10px 4px; }
.stat .n { font-size: 24px; font-weight: 700; color: var(--gold); }
.stat .l { font-size: 12px; color: var(--muted); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
button, .btn { font: inherit; border-radius: 10px; padding: 12px 16px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); cursor: pointer; min-height: 44px; }
button.primary { background: var(--gold); color: var(--ink); border-color: var(--gold); font-weight: 600; }
button.ghost { background: transparent; }
button.danger { border-color: var(--red); color: var(--red); }
button.big { width: 100%; font-size: 17px; padding: 18px; }
button:disabled { opacity: .5; cursor: default; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border-radius: 999px; padding: 10px 14px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-size: 14px; min-height: 40px; }
.chip.on { background: var(--gold); color: var(--ink); border-color: var(--gold); font-weight: 600; }
.chip.red { border-color: var(--red); color: var(--red); }
.chip.red.on { background: var(--red); color: var(--ink); }
.chip.green.on { background: var(--green); color: var(--ink); border-color: var(--green); }
.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.item.done { border-color: #3d5a3a; }
.item .t { font-weight: 600; }
.item .s { color: var(--muted); font-size: 13px; }
.tag { font-family: ui-monospace, monospace; font-size: 12px; color: var(--blue); }
input, select, textarea { font: inherit; width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); min-height: 44px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
.sheet { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--text); padding: 18px; width: min(520px, 94vw); }
.sheet::backdrop { background: rgba(0,0,0,.7); }
.readout { font-size: 28px; font-weight: 700; color: var(--gold); text-align: center; margin: 12px 0; }
.readout.bad { color: var(--red); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; font-size: 12px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.bar { height: 10px; background: var(--panel-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.bar > div { height: 100%; background: var(--gold); }
.bar.ok > div { background: var(--green); }
.late-grid { display: grid; gap: 4px; overflow-x: auto; }
.late-grid .cell { min-width: 34px; height: 40px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; color: var(--muted); background: var(--panel); }
.late-grid .cell.late { background: var(--red); color: var(--ink); font-weight: 700; }
.late-grid .cell.closed { opacity: .25; }
.late-grid .name { min-width: 120px; justify-content: flex-start; padding-left: 8px; border: none; background: none; color: var(--text); }
.late-grid .count { font-weight: 700; color: var(--gold); border: none; background: none; }
.late-grid .count.flag { color: var(--red); }
.toast { position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--gold); color: var(--text); padding: 10px 16px; border-radius: 999px; font-size: 14px; z-index: 20; }
.login { max-width: 360px; margin: 12vh auto; }
.slip { background: var(--panel); border: 1px dashed var(--line); padding: 16px; border-radius: 12px; }
.slip h3 { font-family: "Trajan Pro 3", Cinzel, Georgia, serif; letter-spacing: .08em; }
.err { color: var(--red); font-size: 13px; margin-top: 6px; }
@media (max-width: 480px) { .grid3 { grid-template-columns: repeat(3, 1fr); } .stat .n { font-size: 20px; } .tabs a { font-size: 11px; } }
