:root {
  --bg: #11100f;
  --paper: #f3eee6;
  --ink: #1c1613;
  --gold: #a37b3c;
  --muted: #6d645b;
  --line: #ddd4c6;
  --err: #8b2e2e;
  --ok: #2d5a3d;
  --font: "Outfit", "Segoe UI", system-ui, sans-serif;
  --display: "Source Serif 4", Georgia, serif;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); background: var(--paper); color: var(--ink); }
a { color: var(--gold); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}
h1, h2 { font-family: var(--display); font-style: normal; font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem); margin: 0 0 var(--space-md); }
h2 { font-size: 1.05rem; margin: var(--space-lg) 0 var(--space-sm); }
.box { max-width: 26rem; margin: 12vh auto; background: #fff; padding: 1.75rem; border: 1px solid var(--line); }
.shell { display: grid; grid-template-columns: 15.5rem 1fr; min-height: 100vh; min-height: 100dvh; }
.side {
  background: var(--bg);
  color: #f4efe6;
  padding: 1.15rem 1rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.side strong { font-family: var(--display); font-size: 1.05rem; margin-bottom: 0.4rem; }
.side .grp { margin-top: 1rem; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: #8a8076; }
.side a { display: block; color: #ddd4c6; text-decoration: none; padding: 0.38rem 0.15rem; font-size: 0.92rem; }
.side a:hover, .side a.is-on { color: #fff; }
main.pad { padding: var(--space-lg); min-width: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: space-between; align-items: center; margin-bottom: var(--space-md); }
.muted { color: var(--muted); font-size: 0.9rem; }
label { display: block; margin: 0.75rem 0; font-size: 0.88rem; color: var(--muted); }
label.check { display: flex; align-items: center; gap: 0.45rem; color: var(--ink); }
label.check input { width: auto; margin: 0; }
input, select, textarea { width: 100%; margin-top: 0.25rem; padding: 0.55rem 0.6rem; border: 1px solid #cfc6b8; font: inherit; background: #fff; }
button, .btn {
  background: var(--bg); color: #f4efe6; border: 0; padding: 0.55rem 1rem;
  cursor: pointer; font: inherit; display: inline-flex; align-items: center; text-decoration: none;
}
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.err { color: var(--err); }
.ok { color: var(--ok); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.5rem 0.35rem; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.week { display: grid; grid-template-columns: 5.5rem repeat(7, 1fr); gap: 1px; background: var(--line); overflow-x: auto; }
.week > * { background: #fff; padding: 0.4rem; min-width: 6.2rem; font-size: 0.78rem; }
.week .hd { background: var(--bg); color: #f4efe6; font-size: 0.72rem; }
.slot { display: block; width: 100%; margin: 0.15rem 0; padding: 0.25rem; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 0.72rem; cursor: pointer; text-align: left; }
.slot.busy { background: #efe4d2; }
.slot.block { background: #ead7d4; }
.form-grid .full { grid-column: 1 / -1; }
.week a.slot { text-decoration: none; }
.stat { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: 0.75rem; margin-bottom: var(--space-lg); }
.stat div { border: 1px solid var(--line); padding: 0.85rem 1rem; background: #fff; }
.stat b { display: block; font-family: var(--display); font-size: 1.4rem; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { flex-direction: row; flex-wrap: wrap; gap: 0.3rem 0.9rem; }
  .side .grp { width: 100%; margin-top: 0.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
