.pkr {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  align-items: center;
  width: 100%;
}

.pkr-story {
  margin: 0;
  max-width: 40ch;
  text-align: center;
  text-wrap: balance;
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--c-ink);
}

.pkr-summary {
  margin: 0;
  text-align: center;
  text-wrap: balance;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--c-ink-muted);
}

.pkr-summary.is-agreed {
  color: var(--c-confirm);
}

/* A spread is not a failure — it is the reason to have the conversation. */
.pkr-summary.is-spread {
  color: var(--c-ink);
}

/* --- The board ------------------------------------------------------------ */

.pkr-board {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr));
  gap: var(--space-3);
}

.pkr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-4) var(--space-3) var(--space-3);
  border-radius: var(--radius);

  background: var(--hue-tint);
  border: 1px solid var(--c-line);
  border-top: 4px solid var(--hue);
  color: var(--c-ink);
}

.pkr-card.is-empty {
  background: transparent;
  border-style: dashed;
}

.pkr-card.is-empty .pkr-name {
  color: var(--c-ink-muted);
}

/* The two ends of the spread are called out by name, because they are who the
   facilitator asks to speak. */
.pkr-card.is-low {
  outline: 2px solid var(--c-blue);
  outline-offset: 2px;
}

.pkr-card.is-high {
  outline: 2px solid var(--c-abort);
  outline-offset: 2px;
}

.pkr-name {
  margin: 0;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-wrap: balance;
}

.pkr-value {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--hue);
  min-height: 1em;
}

.pkr-flag {
  margin: 0;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--c-ink-muted);
}

.pkr-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  justify-content: center;
  margin-top: var(--space-2);
}

.pkr-chip {
  font: inherit;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0 var(--space-1);
  cursor: pointer;

  font-size: var(--text-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;

  background: var(--c-paper);
  color: var(--c-ink-muted);
  border: 1px solid var(--c-line);
  border-radius: 4px;
  transition: background-color 120ms ease, color 120ms ease;
}

.pkr-chip:hover {
  border-color: var(--hue);
  color: var(--c-ink);
}

.pkr-chip.is-on {
  background: var(--hue);
  border-color: var(--hue);
  color: var(--c-ink-inverse);
}

/* --- Setup ---------------------------------------------------------------- */

.pkr-setup {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-6);
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  border-top: 1px solid var(--c-line);
  padding-top: var(--space-6);
}

.pkr-names {
  flex: 1 1 14rem;
  max-width: 20rem;
}

.pkr-names textarea {
  font: inherit;
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  width: 100%;
  resize: vertical;
  min-height: 7rem;
}

.pkr-controls {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1 1 16rem;
  max-width: 24rem;
}

.pkr-controls input,
.pkr-controls select {
  width: 100%;
}

.pkr-hint {
  margin: 0;
  color: var(--c-ink-muted);
  font-size: var(--text-sm);
  text-align: center;
  text-wrap: balance;
}

.pkr-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
}

/* --- Fullscreen ----------------------------------------------------------- */

.toy.is-fullscreen .pkr {
  justify-content: center;
  height: 100%;
}

.toy.is-fullscreen .pkr-setup,
.toy.is-fullscreen .pkr-hint {
  opacity: 0;
  transition: opacity 200ms ease;
}

.toy.is-fullscreen .pkr-setup:focus-within,
.toy.is-fullscreen:hover .pkr-setup,
.toy.is-fullscreen:hover .pkr-hint {
  opacity: 1;
}
