:root {
  --ink: #1a1a2e;
  --muted: #64708a;
  --line: #e4e7ef;
  --line-soft: #eef0f5;
  --accent: #2563eb;
  --accent-tint: #eef3ff;
  --accent-ink: #1e40af;
  --ground: #f6f7fb;
  --card: #fff;
  --ok: #15803d;
  --ok-tint: #ecfdf3;
  --err: #b91c1c;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.5;
  background: radial-gradient(
    120% 90% at 50% -10%,
    #eef2fb 0%,
    var(--ground) 55%
  );
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
main {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(20px, 5vw, 48px) 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow:
    0 1px 2px rgba(16, 24, 40, 0.04),
    0 24px 48px -28px rgba(16, 24, 40, 0.28);
  display: grid;
  grid-template-columns: 268px 224px 1fr;
  overflow: hidden;
  min-height: 480px;
}

/* context */
.context {
  padding: 24px 22px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfcfe 0%, #fff 40%);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.host {
  display: flex;
  align-items: center;
  gap: 11px;
}
.brand-wordmark {
  display: none;
}
.brand-wordmark svg {
  display: block;
  height: 26px;
  width: auto;
}
html.brand-salty .brand-ei {
  display: none;
}
html.brand-salty .brand-wordmark {
  display: block;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #4f8cff);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  display: grid;
  place-items: center;
  flex: none;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}
.host-name {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.title {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
.meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #384152;
}
.meta-row svg {
  flex: none;
  color: var(--muted);
}
.note {
  margin-top: auto;
  font-size: 12.5px;
  color: var(--muted);
  border-top: 1px solid var(--line-soft);
  padding-top: 16px;
}

/* day picker */
.daysel-pane {
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.daysel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 8px;
}
.range {
  font-size: 14px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.nav {
  display: flex;
  gap: 4px;
}
.nav button {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: #384152;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition:
    background 0.12s,
    border-color 0.12s;
}
.nav button:hover:not(:disabled) {
  background: var(--accent-tint);
  border-color: #cddafe;
}
.nav button:disabled {
  opacity: 0.4;
  cursor: default;
}
.daysel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.daycell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition:
    border-color 0.12s,
    background 0.12s,
    box-shadow 0.12s;
  color: inherit;
}
.daycell:hover:not([disabled]) {
  border-color: #cddafe;
  background: var(--accent-tint);
}
.daycell .num {
  font-size: 23px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  min-width: 28px;
  text-align: center;
}
.daycell .lbl {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.daycell .dow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
}
.daycell .stat {
  font-size: 12.5px;
  font-weight: 550;
}
.daycell .stat.open {
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  gap: 6px;
}
.daycell .stat.open::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.daycell .stat.full {
  color: #9aa2b1;
}
.daycell.selected {
  border-color: var(--accent);
  background: var(--accent-tint);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.daycell.selected .num {
  color: var(--accent-ink);
}
.daycell[disabled] {
  cursor: default;
  background: #fbfbfd;
}
.daycell[disabled] .num {
  color: #c2c8d4;
}
.daycell:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.hint-mid {
  margin-top: auto;
  padding-top: 16px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line-soft);
}

/* times */
.times {
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.times-day {
  font-size: 15px;
  font-weight: 650;
}
.tz {
  font-size: 12px;
  color: var(--muted);
  margin: 2px 0 14px;
}
.times-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0 -4px;
  padding: 2px 4px;
  max-height: 320px;
}
.grp-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.slot-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
}
.slot {
  padding: 10px 8px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent-ink);
  cursor: pointer;
  text-align: center;
  transition:
    border-color 0.12s,
    background 0.12s,
    transform 0.06s;
}
.slot:hover {
  border-color: var(--accent);
  background: var(--accent-tint);
}
.slot:active {
  transform: translateY(1px);
}
.slot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.slot.chosen {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.skel-label {
  height: 10px;
  width: 64px;
  border-radius: 3px;
  margin-bottom: 12px;
}
.skel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
}
.skel-row {
  height: 38px;
  border-radius: 9px;
}
.shimmer {
  background: linear-gradient(100deg, #eef0f5 30%, #f6f8fc 50%, #eef0f5 70%);
  background-size: 220% 100%;
  animation: sh 1.15s ease-in-out infinite;
}
@keyframes sh {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}
.empty {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 40px 8px;
}

.foot {
  border-top: 1px solid var(--line-soft);
  margin-top: 14px;
  padding-top: 14px;
}
.cta {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 14.5px;
  font-weight: 650;
  cursor: pointer;
  transition: filter 0.12s;
}
.cta:hover {
  filter: brightness(1.06);
}
.cta:disabled {
  opacity: 0.55;
  cursor: default;
}
.hold-meta {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 9px;
}
.hold-meta b {
  color: #b45309;
  font-variant-numeric: tabular-nums;
}

.banner {
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 14px;
}
.banner.ok {
  background: var(--ok-tint);
  color: var(--ok);
}
.banner.err {
  background: #fef2f2;
  color: var(--err);
}
.card.single {
  grid-template-columns: 1fr;
}
.card.single .fullmsg {
  padding: 40px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 44px 20px;
}
.success .tick {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--ok-tint);
  color: var(--ok);
  display: grid;
  place-items: center;
}
.success h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
}
.success p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  max-width: 34ch;
}
.success .when {
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 820px) {
  .card {
    grid-template-columns: 1fr;
  }
  .context {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .daysel-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .daysel {
    flex-direction: row;
  }
  .daycell {
    flex: 1;
    flex-direction: column;
    text-align: center;
    gap: 6px;
  }
  .daycell .lbl {
    align-items: center;
  }
  .hint-mid {
    display: none;
  }
  .times-scroll {
    max-height: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .shimmer {
    animation: none;
  }
  .slot,
  .nav button,
  .daycell {
    transition: none;
  }
}
