:root {
  --bg: #faf7f2;
  --card: #ffffff;
  --text: #2b2a28;
  --muted: #6f6a62;
  --accent: #2f7d7a;
  --accent-soft: #e3f1f0;
  --border: #e6e0d6;
  --done: #a9a39a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1b1a;
    --card: #262523;
    --text: #f1ede6;
    --muted: #b3ada3;
    --accent: #5fb8b3;
    --accent-soft: #23403e;
    --border: #3a3834;
    --done: #7d786f;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 16px;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

h1 { font-size: 20px; margin: 0 0 4px; }
h2 { font-size: 15px; margin: 0; }

.status { margin: 0 0 16px; color: var(--muted); font-size: 13px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}

.row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.pill {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
}
.pill.muted { background: transparent; color: var(--muted); border: 1px solid var(--border); }

.hint, .empty { color: var(--muted); font-size: 13px; margin: 6px 0 10px; }

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

.arrivals li button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  text-align: left;
  background: var(--accent-soft);
  color: var(--text);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}
.arrivals li button .name { font-weight: 600; }
.arrivals li button .meta { color: var(--muted); font-size: 12px; white-space: nowrap; }
.arrivals li.welcomed button { background: transparent; border-color: var(--border); color: var(--done); }
.arrivals li.welcomed .name { font-weight: 400; }

.already li {
  display: inline-block;
  margin: 4px 6px 0 0;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}

/* Sticky arrival banners, above the Arrivals card */
.banners {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  padding: 4px 0 8px;
  margin: -4px 0 6px;
}
.banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  color: var(--text);
  border: 1px solid var(--accent);
  border-left-width: 4px;
  border-radius: 10px;
  padding: 8px 6px 8px 12px;
  margin-bottom: 6px;
}
.banner-text { flex: 1; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.banner-x {
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
  color: var(--accent);
  border: 0;
  border-radius: 6px;
  font-family: inherit;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
}
.banner-x:hover, .banner-x:focus-visible { background: var(--card); }
.banner-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px 8px;
  font-size: 12px;
  color: var(--muted);
}
.link-btn {
  background: none;
  border: 0;
  padding: 2px 0;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.link-btn:hover { opacity: 0.8; }

.actions { margin: 4px 0 16px; }

.btn {
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}

.diag summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.diag pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 11px;
  max-height: 260px;
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
}
