:root {
  --accent: #6d28d9;
}
@media (prefers-color-scheme: dark) {
  :root {
    --accent: #b794f6;
    --on-accent: #1f0a3d;
  }
}

/* Lists of names and options, not code. */
.mk-textarea {
  font-family: inherit;
  font-size: max(16px, 1rem);
}
.mk-button.big {
  min-height: 54px;
  font-size: 1.05rem;
}
.mk-actions.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.center {
  text-align: center;
}
.toggle-card {
  padding: 2px 16px 8px;
  margin: 12px 0;
}
label.toggle-card {
  padding: 2px 16px;
}
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.pair .mk-field {
  min-width: 0;
}

.result-card {
  margin: 16px 0 4px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.result-card.fresh > :first-child,
.teams.fresh .team {
  animation: pop 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}
@keyframes pop {
  from {
    transform: scale(0.82);
    opacity: 0.2;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.coin {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 700;
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.22);
}
.coin.tails {
  background: var(--surface-2);
  color: var(--accent);
  box-shadow: inset 0 0 0 6px var(--accent);
}
.coin.idle {
  background: var(--surface-2);
  color: var(--muted);
  box-shadow: none;
  font-size: 2rem;
}

.dice {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.die {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--accent);
  color: var(--on-accent);
}
.die.idle {
  background: var(--surface-2);
  color: var(--muted);
}
.total {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

.numbers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.numbers li {
  min-width: 48px;
  height: 48px;
  padding: 0 10px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--accent);
  color: var(--on-accent);
}
.numbers.idle,
.picked {
  font-size: 1.9rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.numbers.idle {
  color: var(--muted);
}
.order {
  margin: 0;
  padding-left: 1.6em;
  text-align: start;
  align-self: stretch;
  font-size: 1.05rem;
  line-height: 1.8;
}

.teams {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin: 16px 0 4px;
}
.team h2 {
  display: flex;
  justify-content: space-between;
  margin: 0 0 6px;
  font-size: 0.95rem;
  color: var(--accent);
}
.team .count {
  color: var(--muted);
  font-weight: 500;
}
.team ul {
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: 1.7;
}

.history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.history-head h2 {
  margin: 0 0 0 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
.mk-icon-button.text {
  font-size: 0.88rem;
  padding: 0 8px;
}
.history-text {
  font-variant-numeric: tabular-nums;
}
