/* The tarot pages' own styles (products/astro/site/tarot.ts: every tarot page links this after /site.css): the card's face (its picture
   from the 1909 deck, its room kept by the picture's width and height), the lists of cards, the yes or no form. Kept out of /site.css,
   which every page loads. */
.tarot-card { width: 150px; margin: 0 0 1.25rem; }
.tarot-card img { display: block; width: 100%; height: auto; border-radius: 10px; box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 14px 30px -12px rgba(0, 0, 0, .45); }
.tarot-card.is-reversed img { transform: rotate(180deg); }
@media (min-width: 720px) { .tarot-card { width: 180px; } }
.tarot-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; list-style: none; padding: 0; margin: .5rem 0 1.5rem; }
.tarot-list a { display: flex; align-items: center; min-height: 44px; }
@media (min-width: 720px) { .tarot-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tarot-ask { display: grid; gap: .5rem; margin: 1rem 0 1.5rem; max-width: 34rem; }
.tarot-ask input, .tarot-ask select { min-height: 48px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); font: inherit; background: transparent; color: inherit; }
.tarot-answer { margin: 0 0 1.5rem; }
.tarot-spread { display: grid; gap: 1.5rem; margin: 1rem 0; }
.tarot-spread-card h3 { margin-top: 0; }
@media (min-width: 720px) { .tarot-spread { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* The card's reveal (a draw is a POST and a full page, so the cards play once as the answer first paints): each card is dealt face down on the
   deck's back, which turns away, and the picture turns in with a soft glow, one card after another. Transform and opacity only (the glow is
   an opacity too), so nothing moves the page: the figure's room is its image's own. No motion under reduced motion: the cards simply show. */
.tarot-answer { scroll-margin-top: 88px; }
.tarot-answer > .tarot-card, .tarot-spread-card > .tarot-card { margin-inline: auto; }
.tarot-answer .tarot-card { position: relative; }
@media (prefers-reduced-motion: no-preference) {
  .tarot-answer .tarot-card { perspective: 900px; --d: 0s; }
  .tarot-answer .tarot-card::before, .tarot-answer .tarot-card::after { content: ""; position: absolute; inset: 0; border-radius: 10px; pointer-events: none; }
  .tarot-answer .tarot-card::before {
    background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 317'><defs><radialGradient id='g' cx='50%25' cy='50%25' r='60%25'><stop offset='0' stop-color='%23473a78'/><stop offset='1' stop-color='%23120d22'/></radialGradient></defs><rect width='180' height='317' rx='12' fill='url(/%23g)'/><g fill='none' stroke='%23e9d3a6'><rect x='7' y='7' width='166' height='303' rx='9' stroke-width='1.4' stroke-opacity='.8'/><rect x='13' y='13' width='154' height='291' rx='6' stroke-width='.7' stroke-opacity='.4'/><circle cx='90' cy='158.5' r='58' stroke-width='.8' stroke-opacity='.45' stroke-dasharray='1.2 3.6'/><circle cx='90' cy='158.5' r='41' stroke-width='.8' stroke-opacity='.55'/></g><path fill='%23e9d3a6' d='M90 134.5L95 153.5L114 158.5L95 163.5L90 182.5L85 163.5L66 158.5L85 153.5Z'/><path fill='%23e9d3a6' d='M80 52a10 10 0 0 1 20 0a8.5 8.5 0 0 0-20 0zM80 265a10 10 0 0 0 20 0a8.5 8.5 0 0 1-20 0z'/></svg>") center / 100% 100% no-repeat; backface-visibility: hidden; -webkit-backface-visibility: hidden;
    animation: tarot-back-turn .9s cubic-bezier(.4, 0, .6, 1) var(--d) both;
  }
  .tarot-answer .tarot-card::after { box-shadow: 0 0 0 1px rgba(233, 211, 166, .55), 0 0 28px 4px rgba(233, 211, 166, .45); opacity: 0; animation: tarot-glow 1.6s ease-out var(--d) both; }
  .tarot-answer .tarot-card img { backface-visibility: hidden; -webkit-backface-visibility: hidden; animation: tarot-face-turn .9s cubic-bezier(.2, .75, .15, 1) var(--d) both; }
  .tarot-answer .tarot-card.is-reversed img { animation-name: tarot-face-turn-rev; }
  .tarot-spread-card:nth-child(2) .tarot-card { --d: .35s; }
  .tarot-spread-card:nth-child(3) .tarot-card { --d: .7s; }
  .tarot-spread-card:nth-child(4) .tarot-card { --d: 1.05s; }
  .tarot-spread-card:nth-child(5) .tarot-card { --d: 1.4s; }
  .tarot-spread-card:nth-child(6) .tarot-card { --d: 1.75s; }
  .tarot-spread-card:nth-child(n+7) .tarot-card { --d: 2.1s; }
}
@keyframes tarot-back-turn { 0%, 30% { opacity: 1; transform: rotateY(0); } 60%, 100% { opacity: 0; transform: rotateY(90deg); } }
@keyframes tarot-face-turn { 0%, 55% { opacity: 0; transform: rotateY(-90deg); } 100% { opacity: 1; transform: rotateY(0); } }
@keyframes tarot-face-turn-rev { 0%, 55% { opacity: 0; transform: rotateY(-90deg) rotate(180deg); } 100% { opacity: 1; transform: rotateY(0) rotate(180deg); } }
@keyframes tarot-glow { 0%, 55% { opacity: 0; } 70% { opacity: 1; } 100% { opacity: 0; } }
/* Tap areas: the lists' and the answers' inline links are 44 px tall. */
.more-links a, .tarot-pairs a, .tarot-past a, .tarot-spread-card p a, .tarot-answer p a, .yesno-table a, .crumb a { display: inline-flex; align-items: center; min-height: 44px; }
p.more a { min-height: 44px; display: inline-flex; align-items: center; }

/* The page's own lists of lines (the layout audit of 2026-11-11): the page's indent and room between lines, where the browser's 40 px stood. */
:is(.tarot-past, .tarot-pairs) { margin: 0 0 1.25rem; padding-left: 1.25rem; display: grid; gap: .45rem; }

/* The reading's focus is a choice drawn as the page's own field, with its arrow. */
.tarot-ask select {
  appearance: none; -webkit-appearance: none; padding-right: 2.25rem; text-overflow: ellipsis; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d586c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center; background-size: 16px;
}
