.marker {
  font: 600 0.75rem/1.2 var(--body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sea { color: var(--sea); }
.paid { color: var(--paid); }
.miss { color: var(--miss); }

/* The demo: the real game screen, looping 3 → 8 players. */
.demo {
  justify-self: center;
  width: 100%;
  max-width: 400px;
}

.game {
  background: var(--shell);
  color: var(--ink);
  border-radius: 20px;
  padding: 22px 22px 10px;
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.45);
  font-variant-numeric: tabular-nums;
}

.game-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tag {
  font-size: 0.75rem;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 9px;
}

.game-when {
  font: 700 1.75rem/1.1 var(--display);
  margin-top: 4px;
}

.game-place {
  font-weight: 600;
}

.price,
.spotline {
  display: grid;
}

.price {
  margin-top: 18px;
}

.price > *,
.spotline > * {
  grid-area: 1 / 1;
  opacity: 0;
  animation: slot 14s infinite;
}

.price p {
  font: 700 3.5rem/1 var(--display);
  white-space: nowrap;
}

.price small {
  font-size: 1.375rem;
  color: var(--ink-soft);
}

.extras {
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin-top: 4px;
}

.segments {
  display: flex;
  gap: 4px;
  height: 10px;
  margin-top: 20px;
}

.segments i {
  flex: 1;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}

.segments i::after {
  content: '';
  display: block;
  height: 100%;
  background: var(--ink);
}

.segments .needed {
  background: var(--miss-wash);
  box-shadow: inset 0 0 0 1px var(--miss);
}

.spotline {
  margin-top: 8px;
  font-size: 0.875rem;
}

.spotline p {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.list-title {
  font: 700 1.25rem/1 var(--display);
  margin-top: 22px;
}

.rows {
  list-style: none;
  padding: 0;
  margin-top: 6px;
  counter-reset: row;
}

.rows li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  border-top: 1px solid var(--line);
  counter-increment: row;
  font-weight: 600;
}

.rows li::before {
  content: counter(row);
  width: 1.2em;
  font: 700 1.125rem/1 var(--display);
  color: var(--ink-soft);
}

.rows .marker {
  margin-left: auto;
}

/* Each later player and their spot fill in on their beat of the loop. */
.segments i:nth-child(n + 4)::after,
.rows li:nth-child(n + 4) > * {
  opacity: 0;
}

.segments i:nth-child(4)::after, .rows li:nth-child(4) > * { animation: join1 14s infinite; }
.segments i:nth-child(5)::after, .rows li:nth-child(5) > * { animation: join2 14s infinite; }
.segments i:nth-child(6)::after, .rows li:nth-child(6) > * { animation: join3 14s infinite; }
.segments i:nth-child(7)::after, .rows li:nth-child(7) > * { animation: join4 14s infinite; }
.segments i:nth-child(8)::after, .rows li:nth-child(8) > * { animation: join5 14s infinite; }

.price > :nth-child(2), .spotline > :nth-child(2) { animation-delay: -12s; }
.price > :nth-child(3), .spotline > :nth-child(3) { animation-delay: -10s; }
.price > :nth-child(4), .spotline > :nth-child(4) { animation-delay: -8s; }
.price > :nth-child(5), .spotline > :nth-child(5) { animation-delay: -6s; }
.price > :nth-child(6), .spotline > :nth-child(6) { animation: full 14s infinite; }

@keyframes slot {
  0% { opacity: 0; transform: translateY(0.15em); }
  2%, 13.3% { opacity: 1; transform: none; }
  14.29%, 100% { opacity: 0; }
}

/* The full list holds for two beats before the loop starts over. */
@keyframes full {
  0%, 71.43% { opacity: 0; transform: translateY(0.15em); }
  73.5%, 98.5% { opacity: 1; transform: none; }
  100% { opacity: 0; }
}

@keyframes join1 { 0%, 14.29% { opacity: 0; transform: translateY(6px); } 16.5%, 98.5% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes join2 { 0%, 28.57% { opacity: 0; transform: translateY(6px); } 30.8%, 98.5% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes join3 { 0%, 42.86% { opacity: 0; transform: translateY(6px); } 45%, 98.5% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes join4 { 0%, 57.14% { opacity: 0; transform: translateY(6px); } 59.3%, 98.5% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes join5 { 0%, 71.43% { opacity: 0; transform: translateY(6px); } 73.5%, 98.5% { opacity: 1; transform: none; } 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .game *,
  .game *::after {
    animation: none !important;
  }

  .price > :last-child,
  .spotline > :last-child,
  .segments i::after,
  .rows li > * {
    opacity: 1 !important;
  }
}
