:root {
  --game: #fb923c;
}

.rc-stage {
  padding-left: 4px;
  padding-right: 4px;
}

.fc-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: clamp(5px, 1.2vw, 18px);
  box-shadow: 0 0 40px #fb923c12;
}

.fc-shell h1 {
  margin: 0;
  font-size: clamp(1.4rem, 4vw, 2rem);
}

.fc-sub {
  color: var(--text-dim);
  margin: 2px 0 10px;
  font-size: .88rem;
}

.fc-controls, .fc-hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 9px;
}

.fc-controls label, .fc-hud {
  font-size: .88rem;
  color: var(--text-dim);
}

.fc-controls select, .fc-controls button {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--text);
  padding: 7px 9px;
  font-size: .84rem;
}

.fc-controls button:focus-visible, .fc-controls select:focus-visible {
  outline: 2px solid var(--game);
}

.fc-hud {
  justify-content: space-between;
}

.fc-hud strong {
  color: var(--text);
}

#daily-note, #space-note {
  color: var(--game);
  font-size: .86rem;
  min-height: 1.2em;
}

.fc-board {
  --gap: 5px;
  width: 100%;
  max-width: 739px;
  margin: 0 auto;
  min-height: 250px;
}

.fc-top, .fc-tableau {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: var(--gap);
}

.fc-top {
  margin-bottom: 12px;
}

.fc-pile {
  position: relative;
  width: 100%;
  min-width: 0;
  border-radius: 7px;
}

.fc-top .fc-pile, .fc-tableau .fc-pile.empty {
  aspect-ratio: 5/7;
}

.fc-pile.empty {
  border: 1px dashed #62626e;
  display: grid;
  place-items: center;
  color: #8d8d98;
}

.fc-pile.cell.empty {
  border-color: #fb923c88;
  background: #fb923c0b;
}

.fc-pile.cell.disabled {
  opacity: .3;
  pointer-events: none;
}

.fc-pile.foundation.empty::before {
  content: attr(data-suit);
  font-size: clamp(20px, 5vw, 38px);
  opacity: .35;
}

.fc-pile.hint, .fc-pile:focus-visible {
  outline: 2px solid var(--game);
  outline-offset: 2px;
}

.fc-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  aspect-ratio: 5/7;
  border: 1px solid #dad8e2;
  border-radius: 7px;
  padding: 0;
  background: #f2f1f6;
  color: #202532;
  box-shadow: 0 2px 5px #0007;
  text-align: left;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
  cursor: grab;
}

.fc-card.red {
  color: #d6336c;
}

.fc-card .corner {
  position: absolute;
  top: 3px;
  left: 2px;
  font-size: clamp(13px, 3.6vw, 20px);
  line-height: 1;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: -1.5px;
}

.fc-card .centre {
  display: grid;
  place-items: center;
  height: 100%;
  font-size: clamp(21px, 5vw, 44px);
  line-height: 1;
}

.fc-card.rc-drag-source {
  opacity: .3;
}

.fc-card:focus-visible {
  outline: 2px solid var(--game);
  outline-offset: 2px;
}

.fc-card.shake, .fc-pile.shake {
  animation: fc-shake .25s ease-out;
}

.fc-ghost {
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 100;
  opacity: .9;
}

.fc-ghost .fc-card {
  position: absolute;
}

.fc-help {
  color: var(--text-dim);
  font-size: .83rem;
  margin: 10px 0 0;
}

@keyframes fc-shake {
  25% {
    transform: translateX(-3px);
  }
  75% {
    transform: translateX(3px);
  }
}

@media(max-width:500px) {
  .fc-board {
    --gap: 2px;
  }
  .fc-controls {
    gap: 4px;
  }
  .fc-controls select, .fc-controls button {
    padding: 5px 7px;
  }
  .fc-top {
    margin-bottom: 9px;
  }
}

@media(prefers-reduced-motion:reduce) {
  .fc-card.shake, .fc-pile.shake {
    animation: none;
  }
}
