:root {
  --line: rgba(224, 188, 120, 0.28);
  --gold: #e0bc78;
  --gold-deep: #c6a15b;
  --crimson: #9e3344;
  --text: #f7f4ee;
  --muted: rgba(247, 244, 238, 0.72);
  --ink: #1a1412;
  --ok: #c9e7c4;
  --err: #ffd0c8;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

a { color: inherit; }

.wrap { padding: 0; }

.intro { margin-bottom: 22px; }
.ledger .kicker,
.card .kicker { text-shadow: none; }
h1, h2, h3 { font-family: "Palatino Linotype", Palatino, Georgia, serif; font-weight: 600; }
h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 0.95;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
h2 { margin: 0; font-size: clamp(22px, 3vw, 28px); }
h3 { margin: 0; font-size: 22px; line-height: 1.25; color: var(--text); }
.lede { margin: 10px 0 0; color: var(--muted); max-width: 62ch; }

.ledger, .card {
  background: rgba(8, 24, 40, 0.92);
  border: 1px solid rgba(198, 161, 91, 0.7);
  box-shadow: var(--shadow);
}

.ledger { padding: 8px 22px 18px; }
.ledger-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 16px;
}
.ledger-head p { margin: 0; color: var(--muted); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 0 4px; }
.filters button, .ghost, .gold {
  font: inherit;
  cursor: pointer;
}
.filters button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 10px;
}
.filters button[aria-pressed="true"] {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}

.day-label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0 0;
  color: var(--gold);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.day-label::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.entry {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 8px 18px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(228, 200, 138, 0.1);
}
.entry.has-actions { grid-template-columns: 88px minmax(0, 1fr) auto; }
.when {
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  font-weight: 600;
  padding-top: 4px;
}
.badge {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 7px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: white;
}
.badge.game { background: #3f6b38; }
.badge.bug { background: var(--crimson); }
.badge.qol { background: #2d5f86; }
.badge.content { background: #8a6230; }
.badge.bts { background: #5c4578; }
.notes { white-space: pre-wrap; color: var(--text); line-height: 1.5; margin: 8px 0 0; }
.by { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.remove, .text-btn { font: inherit; }
.remove {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
}
.remove:hover { color: var(--err); }

.empty, .filter-empty { color: var(--muted); padding: 24px 0; }
.empty strong { display: block; color: var(--text); font-family: "Palatino Linotype", Palatino, Georgia, serif; font-size: clamp(22px, 3vw, 28px); margin-bottom: 4px; }

.gate { display: block; }
.card,
.card-wide { padding: clamp(18px, 3vw, 28px); width: 100%; }
.card h1 { font-size: clamp(32px, 4vw, 42px); }
.steps { margin: 14px 0 18px; padding-left: 18px; color: var(--muted); }
.steps li { margin: 8px 0; }
code { color: var(--gold); }

label {
  display: block;
  margin: 14px 0 6px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.optional { letter-spacing: 0; text-transform: none; color: var(--muted); }
input, select, textarea {
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--line);
  background: #071018;
  color: var(--text);
  font: inherit;
  padding: 11px 12px;
  border-radius: 2px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }

.gold, .ghost {
  margin-top: 16px;
  border-radius: 2px;
  padding: 11px 16px;
}
.gold {
  width: 100%;
  border: 0;
  background: linear-gradient(#f3d7a0, #c49245);
  color: #1a1208;
  font-weight: 600;
}
.ghost {
  width: auto;
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--line);
}
.gold:hover, .ghost:hover { filter: brightness(1.06); }

.flash { padding: 10px 12px; margin: 12px 0 0; border: 1px solid var(--line); }
.flash.ok { color: var(--ok); background: rgba(70, 120, 70, 0.18); }
.flash.err { color: var(--err); background: rgba(140, 40, 40, 0.22); }

.admin-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.admin-grid .card { width: auto; position: sticky; top: 88px; }
.subform { margin-top: 28px; padding-top: 8px; border-top: 1px solid var(--line); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.add-staff .gold { width: auto; }

.staff-list { margin-top: 18px; }
.person {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(224, 188, 120, 0.12);
}
.person > div { flex: 1 1 180px; min-width: 0; }
.person h2 { font-size: 26px; }
.inline { display: flex; gap: 8px; align-items: center; }
.inline label { margin: 0; }
.inline select, .inline input { width: auto; min-width: 0; }
.reset input { width: 140px; }
.inline .ghost { margin-top: 0; white-space: nowrap; }
.status { margin: 0; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.status.on { color: var(--ok); }
.status.off { color: var(--muted); }
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.hidden { display: none !important; }

@media (max-width: 900px) {
  .admin-grid, .split, .person { grid-template-columns: 1fr; }
  .admin-grid .card { position: static; }
  .entry, .entry.has-actions { grid-template-columns: 1fr; }
  .inline, .reset { flex-wrap: wrap; }
  .reset input, .inline select, .inline input { width: 100%; }
}
