:root {
  --plum: #4d0a45;
  --purple: #7b22a8;
  --lavender: #eddcff;
  --ink: #111014;
  --muted: #55505c;
  --line: #d9d4e0;
  --paper: #fff;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0 auto;
  max-width: 30rem;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: calc(env(safe-area-inset-top) + 1rem) 1.25rem 1rem;
  background: var(--plum);
  color: #fff;
}
.brand { font-size: 1.5rem; font-weight: 700; padding-right: 1rem; border-right: 1px solid #ffffff99; }
.product { line-height: 1.2; }
main { flex: 1; padding: 1.25rem; display: flex; flex-direction: column; gap: .75rem; }
h1 { margin: 0; font-size: 1.75rem; line-height: 1.2; }
h1:focus { outline: none; }
h2 { margin: .75rem 0 0; font-size: 1.15rem; }
p { margin: 0; }
.muted { color: var(--muted); }
.center { text-align: center; }
.small { font-size: .875rem; }

button, input, select { font: inherit; color: inherit; }
button {
  min-height: 3rem;
  padding: .6rem 1rem;
  border: 0;
  border-radius: .75rem;
  background: var(--purple);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
button.secondary { background: var(--lavender); color: var(--plum); }
button:disabled { opacity: .45; cursor: default; }
a { color: var(--plum); }
:focus-visible { outline: 3px solid #ff9f1c; outline-offset: 2px; }

form, .stack { display: flex; flex-direction: column; gap: .75rem; }
label { display: flex; flex-direction: column; gap: .25rem; font-weight: 600; }
label.check { flex-direction: row; align-items: center; gap: .6rem; font-weight: 400; min-height: 2.5rem; }
label.check input { flex: none; width: 1.25rem; height: 1.25rem; accent-color: var(--purple); }
input:not([type="checkbox"]), select {
  width: 100%;
  min-height: 3rem;
  padding: .5rem .75rem;
  border: 1px solid #8d8597;
  border-radius: .6rem;
  background: #fff;
}

.person { display: flex; align-items: center; gap: .75rem; font-size: 1.25rem; font-weight: 700; }
.person select { font-weight: 700; }
svg { width: 1.5rem; height: 1.5rem; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.person svg { width: 2rem; height: 2rem; color: var(--purple); }

.weeknav { display: flex; gap: .5rem; align-items: stretch; }
.weeknav button { background: var(--lavender); color: var(--plum); min-width: 3.25rem; }
.weeknav strong {
  flex: 1; display: grid; place-items: center; padding: .25rem .5rem; text-align: center;
  border-radius: .75rem; background: var(--lavender);
}

ul.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.row, .card {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem .9rem; border: 1px solid var(--line); border-radius: .75rem;
}
.day strong { flex: 1; }
.pill { display: flex; align-items: center; gap: .5rem; min-width: 9rem; padding: .25rem .75rem; border-radius: .5rem; font-weight: 700; }
.pill::before { content: ""; width: .75rem; height: .75rem; border-radius: 50%; background: currentColor; }
.work { background: #e2f6de; color: #14611a; }
.off { background: #fde3e3; color: #a30d0d; }
.none { background: #efedf2; color: var(--muted); }
.none::before { background: transparent; border: 2px solid currentColor; }

button.row { width: 100%; background: #fff; color: var(--ink); font-weight: 400; text-align: left; }
button.row strong { flex: 1; }
.badge { min-width: 3rem; padding: .25rem .5rem; border-radius: .5rem; background: var(--lavender); color: var(--plum); font-weight: 700; text-align: center; }
.inactive { opacity: .6; }

.lockbox { display: flex; justify-content: center; align-items: center; gap: .6rem; padding: .75rem; border-radius: .75rem; background: var(--lavender); color: var(--plum); font-weight: 700; }
.card { align-items: flex-start; }
.card .icon { display: grid; place-items: center; padding: .75rem; border-radius: .6rem; background: var(--lavender); color: var(--plum); }
.card .grow { flex: 1; }
.change { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: .5rem; }
.change small { display: block; color: var(--muted); }
.change b { font-size: 1.2rem; }
.warning { padding: .75rem; border: 2px solid #b45309; border-radius: .75rem; background: #fff4e0; color: #6b3403; font-weight: 600; }
.slot { display: grid; grid-template-columns: 5rem 1fr; gap: .5rem; padding: .75rem; border: 1px solid var(--line); border-radius: .75rem; }
.slot .wide { grid-column: 1 / -1; }

.banner { display: block; padding: .6rem 1.25rem; background: #fff4e0; color: #6b3403; font-size: .875rem; font-weight: 600; }
.banner[hidden] { display: none; }
.message { position: sticky; bottom: 5.5rem; margin: 0 1.25rem; }
.message:not(:empty) { margin-bottom: .75rem; padding: .75rem; border-radius: .75rem; background: #e2f6de; color: #14611a; font-weight: 600; }
.message.error:not(:empty) { background: #fde3e3; color: #a30d0d; }

nav {
  position: sticky; bottom: 0; display: flex; margin: 0 .75rem;
  padding-bottom: calc(env(safe-area-inset-bottom) + .75rem); background: var(--paper);
}
nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .6rem .25rem;
  background: var(--lavender); color: var(--plum); font-size: .875rem; font-weight: 700; text-decoration: none;
}
nav a:first-child { border-radius: 1rem 0 0 1rem; }
nav a:last-child { border-radius: 0 1rem 1rem 0; }
nav a[aria-current="page"] { background: var(--plum); color: #fff; border-radius: 1rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; align-items: center; margin-top: auto; padding-top: .5rem; }
