#tarot-reading .tarot-result-board {
  overflow: clip;
  background: #dce4c4 url("backgrounds/results-botanical.webp") 27% center / cover no-repeat;
}

#tarot-reading .tarot-result-board > .tarot-section-head { border-radius: 0; }

#tarot-reading .tarot-section-head > .tarot-spread-note {
  padding: 0;
  white-space: nowrap;
}

#tarot-reading .tarot-result-board:has(> #tarot-board > .tarot-slot:nth-child(-n + 5):last-child) {
  display: flex;
  flex-direction: column;
}

#tarot-board:has(> .tarot-slot:nth-child(-n + 5):last-child) {
  /* Match the card width in the detailed reading when the row has room. */
  grid-template-columns: repeat(var(--board-columns, 1), minmax(0, var(--tarot-result-card-width, 8.5rem)));
  grid-template-rows: repeat(var(--board-rows, 1), auto);
  justify-content: center;
  width: 100%;
  margin-block: auto;
  padding-block: 0.85rem;
}

@supports (grid-template-rows: subgrid) {
  @media (width > 56rem) {
    #tarot-board:has(> .tarot-slot:nth-child(5):last-child) {
      /* Fit three Diamond rows with a 1.7 height-to-width ratio under the shared header. */
      --tarot-result-card-width: min(8.5rem, calc((var(--celtic-cards-width) * 1.7 + var(--tarot-board-gap) - 0.5rem) / 5.1));
    }
  }
}

#tarot-board:has(> .tarot-slot:nth-child(-n + 4):last-child) > .tarot-slot {
  container-type: inline-size;
}

#tarot-board:has(> .tarot-slot:nth-child(-n + 4):last-child) .tarot-card-face {
  font-size: clamp(0.65rem, 12cqi, 1rem);
}

#tarot-fan-table {
  --tarot-table-control: #fff1cb;
  background:
    linear-gradient(180deg, transparent 42%, #102b2440),
    #173f36 url("backgrounds/selection-night-garden.webp") center / cover no-repeat;
}

.rws-window-label {
  color: var(--rws-forest);
  font-size: 0.8rem;
  font-weight: 700;
}

@media (max-width: 40rem) {
  #tarot-fan-table[data-phase="main"] .rws-window-head { margin-block-end: 0.45rem; }
}

#tarot-fan-table .rws-fan-card { --rws-fan-outline: #a2ae8d; }

#tarot-fan-table[data-phase="moving"] .rws-fan-numbers { display: none; }

#tarot-fan-table .rws-fan-slider-art { filter: drop-shadow(0 1px 1px #102b24); }

#tarot-fan-table :is(.rws-fan-slider-curve, .rws-fan-slider-endpoint, .rws-fan-slider-thumb) {
  stroke: var(--tarot-table-control);
}

#tarot-fan-table #tarot-fan:focus-visible,
#tarot-fan-table #tarot-fan-slider:has(#tarot-fan-range:focus-visible) {
  outline-color: var(--tarot-table-control);
}
