:root {
  --navy: #163a66;
  --ink: #1b2430;
  --mut: #5b6b7c;
  --line: #d7e0ea;
  --panel: #fff;
  --wash: #f4f7fb;
  --red: #c21e3b;
  --good: #1f7a4d;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--wash); color: var(--ink); font: 16px/1.5 "Avenir Next", "Segoe UI", sans-serif; }
body { min-height: 100vh; }
a { color: var(--navy); }
.wrap { max-width: 920px; margin: 0 auto; padding: 28px 18px 64px; }
.mast {
  display: flex; justify-content: space-between; gap: 16px; align-items: flex-end;
  margin-bottom: 22px; padding-bottom: 16px; border-bottom: 3px solid var(--navy);
}
.mast p { margin: 4px 0 0; color: var(--mut); max-width: 640px; }
.mast h1 { margin: 0; font-size: 28px; }
.note, .error, .empty, .loading {
  padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); margin-bottom: 16px;
}
.error { border-color: #f0b7c0; background: #fff5f6; }
.date-group { margin: 0 0 28px; }
.date-group h2 { margin: 0 0 12px; font-size: 20px; }
.slot {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 12px;
}
.slot header { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.slot h3 { margin: 0; font-size: 18px; }
.meta, .capacity { color: var(--mut); font-size: 14px; }
.names { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.names li {
  padding: 4px 10px; border-radius: 999px; background: var(--wash); border: 1px solid var(--line); font-size: 14px;
}
.names li.identified { border-color: #b9cce0; }
.slot button, .sheet button, .manage button {
  min-height: 40px; padding: 8px 12px; border: 0; border-radius: 8px; background: var(--navy); color: #fff;
  font: inherit; font-weight: 750; cursor: pointer;
}
.slot button[disabled] { background: #9aa8b6; cursor: not-allowed; }
dialog { border: 1px solid var(--line); border-radius: 12px; padding: 18px; width: min(520px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(22, 58, 102, .35); }
form { display: grid; gap: 10px; }
label, fieldset { display: grid; gap: 6px; font-weight: 650; }
input, select, textarea {
  min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit;
}
.choices { display: grid; gap: 8px; }
.choices label { font-weight: 500; }
.people { border: 1px solid var(--line); border-radius: 8px; background: var(--wash); max-height: 180px; overflow: auto; }
.people button {
  display: block; width: 100%; text-align: left; background: transparent; color: var(--ink); border-radius: 0;
  min-height: 38px; font-weight: 600;
}
.people button:hover, .people button[aria-selected="true"] { background: #e7eef6; }
.roster { width: 100%; border-collapse: collapse; font-size: 14px; }
.roster th, .roster td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); }
.need { color: var(--red); font-weight: 750; }
.own { color: var(--good); }
.manage-grid { display: grid; gap: 18px; }
@media (max-width: 680px) {
  .mast { display: block; }
  .slot header { display: block; }
}
