:root {
  --move-progress: #76dcff;
  --move-setup: #b8acd6;
  --move-foundation: #ffd166;
}

.toolbar {
  grid-template-columns: auto 1fr repeat(4, auto);
}

#auto-finish:not(:disabled) {
  color: var(--night);
  background: var(--lime);
  border-color: var(--lime);
}

.card--move-progress {
  outline: 3px solid var(--move-progress);
  outline-offset: -3px;
  box-shadow: 0 0 0 1px rgba(118, 220, 255, .5), 0 0 13px rgba(118, 220, 255, .62);
}

.card--move-setup {
  outline: 3px solid var(--move-setup);
  outline-offset: -3px;
  box-shadow: 0 0 0 1px rgba(184, 172, 214, .45), 0 0 12px rgba(184, 172, 214, .55);
}

.card--move-foundation {
  outline: 3px solid var(--move-foundation);
  outline-offset: -3px;
  box-shadow: 0 0 0 1px rgba(255, 209, 102, .5), 0 0 13px rgba(255, 209, 102, .66);
}

.card--selected,
.card--selected.card--move-progress,
.card--selected.card--move-setup,
.card--selected.card--move-foundation {
  outline: 4px solid var(--lime);
  outline-offset: -4px;
  filter: brightness(1.07);
}

.pile-slot--hint {
  outline: 3px solid var(--move-progress);
  outline-offset: 2px;
  box-shadow: 0 0 13px rgba(118, 220, 255, .62);
}

.move-legend {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 7px 14px;
  color: var(--muted);
  background: #0b1511;
  border-top: 1px solid #1f342b;
  font-size: .68rem;
}

.move-legend span {
  display: flex;
  gap: 6px;
  align-items: center;
}

.move-legend b {
  color: var(--ink);
}

.move-legend i {
  display: inline-block;
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border: 3px solid;
  border-radius: 3px;
}

.move-legend__progress {
  border-color: var(--move-progress) !important;
  box-shadow: 0 0 6px rgba(118, 220, 255, .55);
}

.move-legend__setup {
  border-color: var(--move-setup) !important;
  box-shadow: 0 0 6px rgba(184, 172, 214, .5);
}

.move-legend__foundation {
  border-color: var(--move-foundation) !important;
  box-shadow: 0 0 6px rgba(255, 209, 102, .6);
}

.dead-panel {
  width: min(520px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 34px;
  color: var(--ink);
  background: radial-gradient(circle at 50% 0, rgba(255, 209, 102, .18), transparent 55%), #101b17;
  border: 1px solid rgba(255, 209, 102, .62);
  border-radius: 22px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .62);
  text-align: center;
}

.dead-panel::backdrop {
  background: rgba(2, 9, 7, .82);
  backdrop-filter: blur(5px);
}

.dead-symbol {
  display: grid;
  width: 72px;
  aspect-ratio: 1;
  margin: 0 auto 18px;
  place-items: center;
  color: #271c00;
  background: #ffd166;
  border-radius: 50%;
  font: 900 3.8rem/1 var(--display);
}

.dead-kicker {
  margin: 0 0 6px;
  color: #ffd166;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.dead-panel h2 {
  margin: 0;
  font: clamp(2.8rem, 10vw, 5rem)/.9 var(--display);
  letter-spacing: -.06em;
}

.dead-panel > p:not(.dead-kicker) {
  margin: 18px auto;
  color: var(--muted);
}

.dead-guidance {
  font-weight: 750;
}

.dead-actions {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 10px;
}

.dead-actions button {
  min-height: 50px;
  padding: 0 14px;
  color: var(--ink);
  background: transparent;
  border: 1px solid #60776c;
  border-radius: 9px;
  font-weight: 850;
  cursor: pointer;
}

.dead-actions #dead-undo {
  color: var(--night);
  background: var(--lime);
  border-color: var(--lime);
}

.dead-actions #dead-undo:disabled {
  color: var(--muted);
  background: transparent;
  border-color: #60776c;
  cursor: not-allowed;
  opacity: .48;
}

.dead-panel--no-undo #dead-new-deal {
  color: var(--night);
  background: var(--lime);
  border-color: var(--lime);
}

@media (max-width: 700px) {
  .toolbar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .toolbar > button {
    grid-row: 3;
  }

  .toolbar #show-moves {
    grid-column: 1;
  }

  .toolbar #auto-finish {
    grid-column: 2;
  }

  .toolbar #undo {
    grid-column: 3;
  }

  .toolbar #new-deal {
    grid-column: 4;
  }

  .toolbar button {
    padding-inline: 4px;
    font-size: .62rem;
  }

  .move-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px 10px;
    padding: 8px 10px;
    font-size: .58rem;
    line-height: 1.25;
  }

  .move-legend span {
    align-items: flex-start;
  }

  .move-legend span:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .dead-panel {
    padding: 26px 18px;
  }

  .dead-actions {
    grid-template-columns: 1fr;
  }

  .dead-actions button {
    min-height: 48px;
  }
}
