:root {
  --bg: #101114;
  --text: #b4b9c3;
  --muted: #7d838e;
  --faint: #5f656f;
  --line: rgba(255, 255, 255, 0.06);
  --fill: #181a1f;
  --fill-next: #1f232b;
  --accent: #7aa2e3;
  --missed: #a8906c;
  --row: 84px;
  --gap: 14px;
  --gutter-left: 20px;
  --gutter-right: 72px;
  --inset: 20px;
  --avatar: 44px;
  --radius: 14px;
  --font: "Inter", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

.board {
  position: relative;
  width: min(560px, 100%);
  margin: 0 auto;
}

.connectors {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}

.connectors * {
  pointer-events: none;
}

.connectors path {
  fill: none;
  stroke: var(--missed);
  stroke-width: 1.5;
  stroke-opacity: 0.55;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.list {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 16px 0 42vh;
}

.slot {
  height: auto;
  padding: calc(var(--gap) / 2) var(--gutter-right) calc(var(--gap) / 2) var(--gutter-left);
  overflow: visible;
}

.slot-inner {
  height: var(--row);
  display: grid;
  grid-template-columns: var(--avatar) minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 14px;
  padding: 0 var(--inset);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--fill);
  overflow: hidden;
}

.slot.is-next .slot-inner {
  background: #243044;
  border-color: rgba(122, 162, 227, 0.9);
  box-shadow:
    0 0 0 1px rgba(122, 162, 227, 0.45),
    0 10px 28px rgba(122, 162, 227, 0.16);
}

.slot.is-next .name,
.slot.is-next .handle {
  color: #f3f6fb;
}

.slot.is-paired {
  cursor: pointer;
}

.slot[data-status="missed"] {
  opacity: 0.55;
}

.slot[data-status="waived"] {
  opacity: 0.4;
}

.slot[data-status="filled"] .slot-inner,
.slot[data-status="stub"] .slot-inner {
  border-color: rgba(168, 144, 108, 0.22);
  background: transparent;
}

.empty-box {
  width: var(--avatar);
  height: var(--avatar);
  border: 1.5px dashed rgba(168, 144, 108, 0.45);
  border-radius: 12px;
  background: transparent;
  flex-shrink: 0;
}

.slot[data-status="filled"] .empty-box,
.slot[data-status="stub"] .empty-box {
  border-style: solid;
  border-color: rgba(168, 144, 108, 0.35);
  background: rgba(168, 144, 108, 0.06);
}

.slot[data-status="filled"] .when strong,
.slot[data-status="stub"] .when strong {
  color: var(--missed);
}

.badge.filled {
  color: var(--missed);
  background: rgba(168, 144, 108, 0.12);
}

.slot.pair-flash .slot-inner {
  animation: pair-flash 1.2s ease;
}

@keyframes pair-flash {
  0%,
  100% {
    box-shadow: none;
  }
  30%,
  70% {
    box-shadow: 0 0 0 1px rgba(168, 144, 108, 0.7);
  }
}

.avatar-link {
  position: relative;
  width: var(--avatar);
  height: var(--avatar);
  border-radius: 50%;
  overflow: hidden;
  background: #22252c;
  flex-shrink: 0;
}

.avatar-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #22252c;
  color: var(--faint);
}

.avatar-placeholder {
  width: 24px;
  height: 24px;
  display: block;
}

.avatar-link img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.2s ease-in;
}

.avatar-link img.is-loaded {
  opacity: 1;
}

.meta {
  min-width: 0;
}

.name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.handle {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.handle a {
  color: inherit;
  text-decoration: none;
}

.handle a:hover {
  color: var(--text);
}

.when {
  text-align: right;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
}

.when strong {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.slot.is-next .when strong {
  color: #f3f6fb;
}

.slot.is-next .badge {
  color: #101114;
  background: var(--accent);
}

.slot[data-status="missed"] .when strong {
  color: var(--missed);
}

.badge {
  display: inline-flex;
  margin-top: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--accent);
  background: rgba(122, 162, 227, 0.12);
}

.badge.done {
  color: var(--faint);
  background: rgba(255, 255, 255, 0.04);
}

.badge.waived {
  color: var(--faint);
  background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 640px) {
  :root {
    --row: 80px;
    --gap: 12px;
    --avatar: 40px;
    --gutter-left: 12px;
    --gutter-right: 52px;
    --inset: 14px;
  }
}
