:root {
  color-scheme: dark;
  --bg: #090909;
  --paper: #f4efe8;
  --muted: #9c948b;
  --line: #2c2c2c;
  --plum: #e4c6ff;
  --plum-ink: #1a1020;
  --sans: ui-sans-serif, system-ui, sans-serif;
  --serif: "Iowan Old Style", Palatino, Georgia, serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; background: var(--bg); color: var(--paper); }

body {
  font-family: var(--sans);
  line-height: 1.4;
  min-height: 100vh;
}

a { color: inherit; }

button, .dock a { cursor: pointer; }
button:disabled { cursor: default; }

.wrap {
  width: min(100%, 32rem);
  margin: 0 auto;
  padding: 0 1.15rem 6.5rem;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0 0.4rem;
}

.topacts { display: flex; gap: 0.9rem; align-items: center; }

.brand {
  font-family: var(--serif);
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  min-width: 0;
}

.socials { display: flex; gap: 0.45rem; }

.socials a {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
}

.socials svg { width: 1.15rem; height: 1.15rem; fill: var(--paper); }

.kicker {
  margin: 1.4rem 0 0.4rem;
  color: var(--plum);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2.7rem;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0 0 0.9rem;
}

.lead { margin: 0; font-size: 1.05rem; color: #ddd6ce; }

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
}

.facts li {
  border-top: 1px solid var(--line);
  padding-top: 0.7rem;
}

.facts strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
}

.facts span { color: var(--muted); font-size: 0.82rem; }

.channels { display: grid; gap: 0.6rem; margin-top: 1.6rem; }

.channel {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  text-decoration: none;
}

.channel b { display: block; font-weight: 650; }
.channel span { color: var(--muted); font-size: 0.86rem; }

.place { margin: 1.3rem 0 0; color: var(--muted); font-size: 0.92rem; }

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.75rem 1.15rem calc(0.75rem + env(safe-area-inset-bottom));
  background: rgba(9, 9, 9, 0.92);
  border-top: 1px solid var(--line);
}

.dock a, button.go, button.yes {
  display: block;
  width: min(100%, 32rem);
  margin: 0 auto;
  text-align: center;
  text-decoration: none;
  background: var(--plum);
  color: var(--plum-ink);
  font: 700 1rem/1 var(--sans);
  border: 0;
  border-radius: 999px;
  padding: 0.95rem 1rem;
}

.dock a:hover, button.go:hover, button.yes:hover {
  background: #f6e9ff;
}

h2 {
  margin: 1.35rem 0 0.55rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
}

.list, .times { display: grid; gap: 0.5rem; }
.times { grid-template-columns: 1fr 1fr; }

button.tick {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border-radius: 0.35rem;
}

button.tick .box {
  width: 1.35rem;
  height: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 0.15rem;
  flex: 0 0 auto;
}

button.tick[aria-pressed="true"] {
  color: var(--paper);
  border-color: var(--plum);
}

button.tick[aria-pressed="true"] .box {
  background: var(--plum);
  box-shadow: inset 0 0 0 3px var(--bg);
}

.month h3 {
  margin: 0.2rem 0 0.7rem;
  text-align: center;
  font-size: 1.05rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--paper);
  font-weight: 650;
}

.weekdays, .grid, .squares {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
}

.squares { grid-template-columns: repeat(3, 1fr); margin-top: 0.35rem; }

.weekdays span {
  text-align: center;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

button.sq {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 0.15rem;
  background: transparent;
  color: var(--paper);
  font: 650 0.95rem/1 var(--sans);
  padding: 0;
}

button.sq[aria-pressed="true"] {
  background: var(--plum);
  border-color: var(--plum);
  color: var(--plum-ink);
}

button.sq:disabled { opacity: 0.28; }
button.sq.off { opacity: 0.32; }
button.sq.busy { background: var(--plum); border-color: var(--plum); color: var(--plum-ink); }
button.sq:hover:not(:disabled) { border-color: var(--plum); background: #1c141f; }
button.sq[aria-pressed="true"]:hover:not(:disabled),
button.sq.busy:hover { background: #f6e9ff; }
button.sq.off:hover { opacity: 1; color: var(--plum); }
button.sq.mark { box-shadow: inset 0 -3px 0 var(--plum); }
.squares button.sq { font-size: 0.82rem; }
.weeklinks { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.2rem 0 0.85rem; }
.weeklinks button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--plum);
  font: inherit;
  font-size: 0.92rem;
  padding: 0.45rem 0.8rem;
  text-align: left;
}
.addhour { display: grid; grid-template-columns: 1fr auto; gap: 0.55rem; align-items: end; margin-top: 0.8rem; }
.addhour label, .addhour .note { grid-column: 1 / -1; }
.addhour button {
  border: 1px solid var(--plum);
  border-radius: 999px;
  background: transparent;
  color: var(--plum);
  font: 700 1rem/1 var(--sans);
  padding: 0.75rem 1rem;
}

.grid .blank { aspect-ratio: 1; }

button.opt {
  font: inherit;
  color: var(--paper);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  padding: 0.8rem 0.85rem;
  text-align: left;
}

.days button.opt { flex: 0 0 auto; white-space: nowrap; }

button.opt[aria-pressed="true"] {
  border-color: var(--plum);
  color: var(--plum);
}

button.opt:hover:not(:disabled) { border-color: var(--plum); }
button.opt:disabled { opacity: 0.35; }

.cards { display: grid; gap: 0.65rem; }

.dayhead {
  margin: 1.15rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.card {
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.85rem 1rem 0.95rem;
}

.card .when {
  font-family: var(--serif);
  font-size: 1.7rem;
  line-height: 1;
}

.card .who { margin: 0.35rem 0 0; font-size: 1.05rem; }

.card a { text-decoration: none; }

.card .meta, .card .comment { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.92rem; }
.cardacts { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cardacts button.linkish { margin-top: 0.75rem; }

.passacts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  align-items: center;
  margin-top: 0.35rem;
}

.passacts button, .savepass {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--plum);
  font: inherit;
  font-size: 0.92rem;
  padding: 0.45rem 0.8rem;
}

.savepass {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.savepass input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--plum);
}

button.linkish, a.linkish {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--plum);
  font: inherit;
  text-decoration: none;
}

.out {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--paper);
  font: inherit;
  padding: 0.45rem 0.8rem;
}

button.opt small { display: block; margin-top: 0.15rem; color: var(--muted); font-size: 0.82rem; }

label { display: block; margin: 0.85rem 0 0.35rem; color: var(--muted); font-size: 0.86rem; }

input, textarea {
  width: 100%;
  font: 1rem/1.3 var(--sans);
  color: var(--paper);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 0.7rem 0;
}

textarea { min-height: 4.2rem; resize: vertical; }

button.no {
  width: min(100%, 32rem);
  margin: 0.55rem auto 0;
  display: block;
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.85rem 1rem;
  font: inherit;
}

button.no:hover { border-color: var(--plum); color: var(--plum); }

button.linkish:hover,
a.linkish:hover,
.addhour button:hover,
.weeklinks button:hover,
.passacts button:hover,
.out:hover {
  background: var(--plum);
  border-color: var(--plum);
  color: var(--plum-ink);
}

.sheet {
  margin-top: 1.2rem;
  padding-top: 0.2rem;
}

.sheet p { font-family: var(--serif); font-size: 1.45rem; line-height: 1.2; margin: 0.3rem 0 0.8rem; }

.note { color: var(--muted); font-size: 0.88rem; }

.hidden { display: none; }

button.tick { border-radius: 0.2rem; }

button.tick[aria-pressed="true"] {
  color: var(--paper);
  border-color: var(--plum);
}
