@media(min-width:1051px) and (max-width:1200px){.site-header{gap:1.4rem}.desktop-nav{gap:1.3rem}.footer-inner{flex-wrap:wrap}}
.tarot-game[data-game-mounted="true"] .tarot-mountains{height:calc(100% - 5rem)}
@media(min-width:901px){.tarot-game[data-game-mounted="true"]{--reading-card-height:calc(var(--reading-card-width) * 1264 / 848)}}
/* Keep authored context visible after mounting the game on compact screens. */
@media (max-width:900px), (max-height:850px) {
  .tarot-game[data-game-mounted="true"] .tarot-kicker { display:block; margin:.2rem 0; font-size:.65rem; }
  .tarot-game[data-game-mounted="true"] .tarot-game-description { display:block; font-size:1rem; line-height:1.4; margin:.3rem auto .7rem; max-width:43rem; }
}

/* Readings set the frame height. The page scrolls, never the text inside a card. */
body[data-tarot-app] .tarot-game[data-game-mounted="true"][data-active-mode] :is(.tarot-daily-stage, [data-spread-stage]) {
 height: auto;
 min-height: var(--reading-card-height);
}
body[data-tarot-app] .tarot-game[data-game-mounted="true"] [data-spread-stage] { flex: 1; }
body[data-tarot-app] .tarot-game[data-game-mounted="true"] .tarot-stage-card {
 height: 100%;
 min-height: var(--reading-card-height);
 aspect-ratio: auto;
}
body[data-tarot-app] .tarot-game[data-game-mounted="true"] .tarot-flipper { display: grid; min-height: inherit; }
body[data-tarot-app] .tarot-game[data-game-mounted="true"] .tarot-card-reading[data-reading-back] {
 position: relative;
 inset: auto;
 grid-area: 1 / 1;
 min-height: max(var(--reading-card-height), calc(100cqw * 1264 / 848));
 grid-template-rows: minmax(4rem, max-content) minmax(min-content, 1fr) 4.75rem;
 overflow: visible;
}
body[data-tarot-app] .tarot-game[data-game-mounted="true"] .tarot-back-text {
 max-height: none;
 overflow: visible;
}
body[data-tarot-app] .tarot-game[data-game-mounted="true"] .tarot-card-front { left: 0; top: 0; width: 100%; height: auto; transform: none; }
body[data-tarot-app] .tarot-game[data-game-mounted="true"] .tarot-stage-card[data-reversed="true"] .tarot-card-front { transform: rotate(180deg); }
@media (max-width: 900px) {
 body[data-tarot-app] .tarot-game[data-game-mounted="true"] .tarot-card-reading[data-reading-back] {
  grid-template-rows: minmax(2.75rem, max-content) minmax(min-content, 1fr) 3.75rem;
 }
 /* All three slots contribute to one height while only the chosen slot is visible. */
 body[data-tarot-app] .tarot-game[data-game-mounted="true"] .tarot-spread-stage { grid-template-columns: minmax(0, 1fr); grid-auto-flow: row; }
 body[data-tarot-app] .tarot-game[data-game-mounted="true"] .tarot-spread-stage li {
  display: flex;
  grid-area: 1 / 1;
  align-self: stretch;
  visibility: hidden;
  pointer-events: none;
 }
 body[data-tarot-app] .tarot-game[data-game-mounted="true"] .tarot-spread-stage li[data-active="true"] { visibility: visible; pointer-events: auto; }
}
