:root {
  color-scheme: dark;
  --bg: #141414;
  --ink: #f3f1ea;
  --muted: #b7b3a8;
  --zero: #7d796f;
  --gold: #e4d2ae;
  --line: rgba(243, 241, 234, 0.14);
  --busy: #8d4a42;
  --free: rgba(228, 210, 174, 0.18);
  --serif: Georgia, "Iowan Old Style", Palatino, serif;
  --sans: "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0 auto;
  max-width: 46rem;
  padding: 1.4rem 1.1rem 3rem;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.4;
}

a { color: var(--gold); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }

button, input, select { font: inherit; color: inherit; }

.home {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

h1 {
  margin: 1rem 0 0.2rem;
  font-size: clamp(2.4rem, 8vw, 3.6rem);
  font-weight: 400;
  line-height: 1;
}

.lede { margin: 0.4rem 0 1.3rem; color: var(--muted); }

.controls { display: grid; gap: 0.75rem; }

.days { display: flex; gap: 0.35rem; overflow-x: auto; }

.days button, .text {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.82rem;
}

.days button[aria-pressed="true"] {
  color: var(--bg);
  background: var(--gold);
  border-color: var(--gold);
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  align-items: end;
}

label {
  display: grid;
  gap: 0.2rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

input, select {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 0.25rem 0;
  font-family: var(--serif);
  font-size: 1rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}

.grow { flex: 1 1 8rem; }
.check {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  align-self: center;
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--ink);
}
.check input { accent-color: var(--gold); }

.text { align-self: center; text-transform: none; letter-spacing: 0; }

.count, .foot {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--zero);
}

.count { margin: 1.1rem 0 0.35rem; }
.foot { margin: 1.4rem 0 0; }

.scale {
  display: flex;
  justify-content: space-between;
  margin: 0 0 0.35rem 0;
  font-family: var(--sans);
  font-size: 0.68rem;
  color: var(--zero);
}

.list { list-style: none; margin: 0; padding: 0; }

.room {
  border-top: 1px solid var(--line);
  padding: 0.85rem 0 0.75rem;
}

.list .room:last-child { border-bottom: 1px solid var(--line); }

.hit {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 1rem;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.code { font-size: 1.35rem; }
.meta { color: var(--muted); font-size: 0.95rem; }
.dur { font-variant-numeric: tabular-nums; text-align: right; }
.until { color: var(--muted); font-size: 0.92rem; text-align: right; }
.dur.busy { color: var(--busy); }

.bar {
  position: relative;
  height: 0.45rem;
  margin-top: 0.55rem;
  background: var(--free);
  overflow: hidden;
}

.block {
  position: absolute;
  top: 0;
  bottom: 0;
  background: var(--busy);
}

.mark {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 1px;
  background: var(--gold);
}

.classes {
  margin: 0.6rem 0 0.2rem;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.92rem;
}

.classes li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.15rem 0; }
.classes time { font-variant-numeric: tabular-nums; color: var(--ink); }

.empty { color: var(--muted); padding: 1.5rem 0; }

@media (max-width: 640px) {
  .until { grid-column: 2; }
  .dur { grid-row: 1; grid-column: 2; }
}
