.tarot-page {
  --tarot-gold: #e8c98a;
  --tarot-gold-soft: #f5dfad;
  --tarot-ink: #07091b;
  --tarot-indigo: #151735;
  --tarot-violet: #6b55a8;
  --tarot-card-ratio: 2 / 3;
  position: relative;
  width: 100%;
  min-height: 100%;
  margin: 0;
  gap: 0;
  isolation: isolate;
}

.content.tarot-content {
  min-height: 100%;
  padding: 12px;
}

.tarot-content .game-page {
  width: 100%;
  max-width: none;
  min-height: 100%;
  padding: 0;
}

.tarot-toolbar {
  position: relative;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 52px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(232, 201, 138, .17);
  background: linear-gradient(90deg, rgba(17, 19, 53, .72), rgba(38, 25, 67, .56));
}

.tarot-spread-tabs,
.tarot-toolbar-actions,
.tarot-result-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.tarot-spread-tabs {
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.tarot-spread-tabs::-webkit-scrollbar { display: none; }

.tarot-spread-tabs button,
.tarot-secondary,
.tarot-primary {
  border: 1px solid rgba(232, 201, 138, .2);
  color: #f9f4e8;
  font: inherit;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.tarot-spread-tabs button,
.tarot-secondary {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(27, 29, 68, .72);
  white-space: nowrap;
}

.tarot-spread-tabs button:hover,
.tarot-spread-tabs button.active,
.tarot-secondary:hover {
  border-color: rgba(245, 223, 173, .62);
  background: linear-gradient(135deg, rgba(113, 82, 154, .58), rgba(46, 53, 119, .66));
  box-shadow: inset 0 0 18px rgba(211, 175, 255, .08);
}

.tarot-spread-tabs button.active { color: #fff4ce; }
.tarot-secondary span { color: var(--tarot-gold); margin-left: 4px; }

.tarot-spread-tabs button:focus-visible,
.tarot-secondary:focus-visible,
.tarot-primary:focus-visible,
.tarot-picked-card:focus-visible,
.tarot-deck-card:focus-visible {
  outline: 2px solid #f5dfad;
  outline-offset: 3px;
}

.tarot-table {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: clamp(680px, calc(100dvh - 28px), 1080px);
  overflow: hidden;
  border-radius: 22px;
  border-color: rgba(232, 201, 138, .22);
  background:
    radial-gradient(circle at 50% 8%, rgba(174, 129, 234, .2), transparent 28%),
    radial-gradient(circle at 10% 90%, rgba(57, 90, 170, .18), transparent 30%),
    linear-gradient(145deg, rgba(8, 10, 31, .96), rgba(22, 18, 55, .94) 55%, rgba(10, 13, 39, .97));
}

.tarot-table-body {
  position: relative;
  z-index: 2;
  min-width: 0;
  min-height: 0;
}

.tarot-table::before,
.tarot-table::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.tarot-table::before {
  inset: 18px;
  border: 1px solid rgba(232, 201, 138, .13);
  border-radius: 22px;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.42) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(234,207,150,.3) 0 1px, transparent 1.5px);
  background-size: 79px 79px, 127px 127px;
  background-position: 7px 13px, 41px 29px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), rgba(0,0,0,.25));
}

.tarot-table::after {
  width: 560px;
  aspect-ratio: 1;
  left: 50%;
  top: 39%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(232, 201, 138, .07);
  border-radius: 50%;
  box-shadow: 0 0 0 42px rgba(232, 201, 138, .018), 0 0 0 43px rgba(232, 201, 138, .05), 0 0 120px rgba(118, 76, 181, .1);
}

.tarot-welcome {
  position: relative;
  z-index: 2;
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(270px, .85fr) minmax(320px, 1fr);
  place-items: center;
  gap: clamp(34px, 7vw, 110px);
  width: min(960px, calc(100% - 48px));
  margin: auto;
  padding: 60px 0;
}

.tarot-welcome-deck {
  position: relative;
  width: clamp(190px, 24vw, 272px);
  aspect-ratio: var(--tarot-card-ratio);
  filter: drop-shadow(0 30px 45px rgba(0,0,0,.48));
}

.tarot-welcome-deck > span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(232, 201, 138, .55);
  border-radius: 18px;
  background: #10132e url("tarot-card-back.webp") center / contain no-repeat;
  box-shadow: inset 0 0 0 6px rgba(5,7,25,.7), inset 0 0 0 7px rgba(232,201,138,.32);
}

.tarot-welcome-deck > span:nth-child(1) { transform: rotate(-7deg) translate(-16px, 7px); opacity: .52; }
.tarot-welcome-deck > span:nth-child(2) { transform: rotate(6deg) translate(15px, 5px); opacity: .68; }
.tarot-welcome-deck > span:nth-child(3) { display: grid; place-items: center; }
.tarot-welcome-deck > span:nth-child(3)::after { content: none; }
.tarot-welcome-deck i { display: none; }

.tarot-intention { width: min(480px, 100%); }
.tarot-kicker { display: block; color: var(--tarot-gold); font-size: 11px; letter-spacing: .23em; }
.tarot-intention h2 { margin: 12px 0 8px; color: #fff8e8; font-size: clamp(27px, 4vw, 42px); font-family: Georgia, "Songti SC", serif; font-weight: 500; }
.tarot-intention > p { margin: 0 0 28px; color: #bfc4df; line-height: 1.75; }
.tarot-intention label { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 9px; color: #ebe7ef; font-size: 13px; }
.tarot-intention label small { color: #8f95bb; }
.tarot-intention textarea { width: 100%; min-height: 112px; resize: vertical; border: 1px solid rgba(232,201,138,.22); border-radius: 14px; outline: 0; padding: 14px 15px; background: rgba(7,9,29,.58); color: #fff; font: inherit; line-height: 1.65; transition: border-color .2s ease, box-shadow .2s ease; }
.tarot-intention textarea:focus { border-color: rgba(245,223,173,.65); box-shadow: 0 0 0 3px rgba(232,201,138,.08), inset 0 0 24px rgba(104,73,145,.12); }

.tarot-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 42px;
  margin-top: 14px;
  padding: 10px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #8362c2, #3f60ad 68%, #b58b56);
  box-shadow: 0 12px 30px rgba(55, 46, 130, .28), inset 0 1px rgba(255,255,255,.2);
  font-weight: 700;
}
.tarot-primary:hover { transform: translateY(-2px); box-shadow: 0 15px 34px rgba(65, 52, 151, .36), inset 0 1px rgba(255,255,255,.25); }
.tarot-primary i { color: #ffe8ad; font-style: normal; }
.tarot-entertainment-note { display: block; margin-top: 13px; color: #8e94b2; line-height: 1.55; }

.tarot-reading-stage,
.tarot-result {
  position: relative;
  z-index: 2;
  min-height: 100%;
  padding: 22px clamp(18px, 3vw, 42px) 34px;
}

.tarot-reading-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; margin-bottom: 8px; }
.tarot-reading-head > div { display: grid; gap: 3px; }
.tarot-reading-head span { color: #a99cc4; font-size: 12px; }
.tarot-reading-head strong { color: #fff7e7; font-size: 17px; font-weight: 650; }
.tarot-progress { display: grid; place-items: center; min-width: 50px; height: 30px; border: 1px solid rgba(232,201,138,.22); border-radius: 999px; color: var(--tarot-gold) !important; background: rgba(10,12,35,.7); }

.tarot-spread {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  align-items: start;
  gap: clamp(14px, 2.5vw, 34px);
  width: min(1180px, 100%);
  margin: 12px auto 22px;
}
.tarot-spread-1 { grid-template-columns: minmax(190px, 280px); justify-content: center; }
.tarot-position { display: grid; justify-items: center; gap: 8px; min-width: 0; }
.tarot-position-label { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; width: min(230px, 100%); min-height: 48px; align-content: center; }
.tarot-position-label > span { grid-row: 1 / 3; align-self: center; color: rgba(232,201,138,.55); font-family: Georgia, serif; font-size: 20px; }
.tarot-position-label strong { color: #f2eadb; font-size: 13px; }
.tarot-position-label small { color: #858cab; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tarot-card-slot { display: grid; place-items: center; width: min(230px, 100%); aspect-ratio: var(--tarot-card-ratio); border: 1px solid rgba(232,201,138,.16); border-radius: 15px; background: rgba(7,9,28,.42); box-shadow: inset 0 0 30px rgba(90,61,137,.09); }
.tarot-slot-sigil { display: grid; place-items: center; width: 48px; aspect-ratio: 1; border: 1px solid rgba(232,201,138,.18); border-radius: 50%; color: rgba(232,201,138,.32); font-size: 22px; }

.tarot-picked-card {
  position: relative;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 14px;
  padding: 0;
  background: transparent;
  color: white;
  cursor: pointer;
  perspective: 1100px;
}
.tarot-card-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .68s cubic-bezier(.2,.78,.2,1); }
.tarot-picked-card.is-revealed .tarot-card-inner { transform: rotateY(180deg); }
.tarot-card-face { position: absolute; inset: 0; overflow: hidden; border: 1px solid rgba(232,201,138,.72); border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.tarot-card-back { display: grid; place-items: center; background: #0c102b url("tarot-card-back.webp") center / contain no-repeat; box-shadow: 0 18px 32px rgba(0,0,0,.34); }
.tarot-card-back::after { content: none; }
.tarot-back-orbit, .tarot-back-star { display: none; }
.tarot-card-front { transform: rotateY(180deg); background: linear-gradient(160deg, hsl(var(--tarot-card-hue) 38% 15%), #090a1c 58%, hsl(calc(var(--tarot-card-hue) + 28) 30% 13%)); box-shadow: inset 0 0 0 5px #090a1e, inset 0 0 0 6px rgba(244,216,156,.72), 0 18px 34px rgba(0,0,0,.38); }
.tarot-card-front::before { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(246,220,165,.58); border-radius: 8px; background-image: radial-gradient(circle, rgba(255,238,197,.55) 0 1px, transparent 1.3px); background-size: 31px 31px; }
.tarot-card-front::after { content: ""; position: absolute; top: -20%; left: -80%; width: 42%; height: 140%; transform: rotate(17deg); background: linear-gradient(90deg, transparent, rgba(255,243,211,.42), transparent); opacity: 0; }
.tarot-picked-card.is-revealed .tarot-card-front::after { animation: tarotRevealShine .75s ease-out .25s both; }
.tarot-front-content { position: absolute; inset: 10px; z-index: 2; display: grid; grid-template-rows: auto 1fr auto; padding: 8px; transition: transform .45s ease; }
.tarot-front-content.is-reversed { transform: rotate(180deg); }
.tarot-card-illustration { position: absolute; z-index: -1; inset: 25px 6px 43px; width: calc(100% - 12px); height: calc(100% - 68px); border-radius: 7px; object-fit: contain; object-position: center; opacity: .88; filter: saturate(.88) contrast(1.04); mask-image: linear-gradient(to bottom, transparent, #000 9%, #000 88%, transparent); }
.tarot-front-content.has-illustration .tarot-card-art { opacity: 0; }
.tarot-card-number { justify-self: center; color: #fae6b2; font: 600 12px/1 Georgia, serif; letter-spacing: .08em; }
.tarot-card-art { position: relative; display: grid; place-items: center; width: 78%; aspect-ratio: 1; align-self: center; justify-self: center; border: 1px solid rgba(246,220,165,.48); border-radius: 50%; box-shadow: 0 0 0 8px rgba(235,201,136,.035), 0 0 38px hsla(var(--tarot-card-hue), 75%, 65%, .2); }
.tarot-card-art::before, .tarot-card-art::after { content: ""; position: absolute; inset: 15%; border: 1px solid rgba(246,220,165,.2); transform: rotate(45deg); }
.tarot-card-art::after { transform: rotate(22.5deg); }
.tarot-card-art b { position: relative; z-index: 2; color: #fff0c7; font: 500 clamp(28px, 4vw, 48px)/1 Georgia, serif; text-shadow: 0 0 18px hsla(var(--tarot-card-hue), 70%, 76%, .48); }
.tarot-card-art i { position: absolute; width: 68%; height: 1px; background: linear-gradient(90deg, transparent, rgba(244,218,160,.4), transparent); transform: rotate(30deg); }
.tarot-card-art i:last-child { transform: rotate(-30deg); }
.tarot-card-name { display: grid; justify-items: center; gap: 2px; padding: 6px 3px 4px; border-top: 1px solid rgba(246,220,165,.28); color: #fff3d2; }
.tarot-card-name strong { font: 600 13px/1.2 "Songti SC", Georgia, serif; letter-spacing: .12em; }
.tarot-card-name small { color: rgba(241,221,179,.68); font: 8px/1.2 Georgia, serif; letter-spacing: .08em; text-transform: uppercase; }
.tarot-orientation { position: absolute; z-index: 4; right: 7px; bottom: 7px; padding: 3px 6px; border: 1px solid rgba(232,201,138,.3); border-radius: 999px; background: rgba(7,8,25,.82); color: #f6dfa9; font-size: 9px; }
.tarot-picked-card.is-arriving { animation: tarotCardArrive .58s cubic-bezier(.2,.8,.2,1) both; }

.tarot-deck-fan { position: relative; display: grid; grid-template-columns: repeat(22, minmax(0, 1fr)); align-items: end; width: min(1640px, 100%); min-height: 210px; margin: -8px auto 0; padding: 22px 36px 8px; overflow: visible; }
.tarot-deck-fan::-webkit-scrollbar { display: none; }
.tarot-deck-card { position: relative; z-index: calc(var(--deck-index) + 1); width: clamp(54px, 6vw, 94px); max-width: none; aspect-ratio: var(--tarot-card-ratio); justify-self: center; border: 0; border-radius: 9px; padding: 0; background: transparent; cursor: pointer; transform: translateY(var(--deck-y)) rotate(calc((var(--deck-index) - 10.5) * .72deg)); transform-origin: 50% 150%; transition: transform .22s ease, filter .22s ease, opacity .3s ease; }
.tarot-deck-card > .tarot-card-back { position: absolute; inset: 0; border-radius: 9px; border: 1px solid rgba(232,201,138,.62); }
.tarot-deck-card:not(:disabled):hover, .tarot-deck-card:not(:disabled):focus-visible { z-index: 30; transform: translateY(-22px) scale(1.06) rotate(0); filter: brightness(1.18); }
.tarot-deck-card.is-chosen { opacity: 0; pointer-events: none; transform: translateY(-55px) scale(.9); }

.tarot-reading-stage.is-shuffling { display: grid; align-content: center; justify-items: center; min-height: 100%; padding-bottom: 80px; }
.tarot-shuffle-stack { position: relative; width: 210px; aspect-ratio: var(--tarot-card-ratio); margin-bottom: 32px; }
.tarot-shuffle-stack span { position: absolute; inset: 0; display: grid; place-items: center; border: 1px solid rgba(232,201,138,.6); border-radius: 14px; background: #0d102b url("tarot-card-back.webp") center / contain no-repeat; box-shadow: 0 20px 35px rgba(0,0,0,.35); animation: tarotShuffle 1s cubic-bezier(.3,.75,.2,1) infinite; animation-delay: calc(var(--shuffle-index) * -70ms); }
.tarot-shuffle-stack i { display: none; }
.tarot-reading-stage.is-shuffling > strong { color: #fff5dc; font: 500 23px/1.2 Georgia, "Songti SC", serif; }
.tarot-reading-stage.is-shuffling > p { margin-top: 9px; color: #9299b7; }

.tarot-reading-status { min-height: 56px; display: flex; align-items: center; justify-content: center; gap: 12px; color: #e8dbbd; }
.tarot-celestial-loader { position: relative; display: grid; place-items: center; width: 38px; aspect-ratio: 1; }
.tarot-celestial-loader i { position: absolute; inset: 0; border: 1px solid rgba(232,201,138,.52); border-top-color: transparent; border-radius: 50%; animation: tarotOrbit 1.6s linear infinite; }
.tarot-celestial-loader b { color: #ffeab4; font-weight: 400; }

.tarot-result { display: grid; grid-template-columns: minmax(520px, 1fr) minmax(520px, .9fr); gap: clamp(28px, 4vw, 72px); align-items: start; width: min(1580px, 100%); max-width: none; margin: 0 auto; overflow: auto; }
.tarot-result-cards { position: sticky; top: 20px; padding-top: 20px; }
.tarot-result-cards .tarot-spread { grid-template-columns: repeat(3, minmax(100px, 1fr)); gap: 12px; }
.tarot-result-cards .tarot-spread-1 { grid-template-columns: minmax(160px, 230px); }
.tarot-result-cards .tarot-position-label small { display: none; }
.tarot-result-cards .tarot-card-slot { width: min(180px, 100%); }
.tarot-reading-copy { padding: 25px 4px 45px; }
.tarot-reading-copy h2 { margin: 10px 0 8px; color: #fff3d2; font: 500 clamp(26px, 3vw, 38px)/1.25 Georgia, "Songti SC", serif; }
.tarot-result-question { color: #c6b4dc; font-family: Georgia, "Songti SC", serif; }
.tarot-result-summary { margin: 18px 0; color: #e1e2ed; line-height: 1.8; }
.tarot-card-meanings { display: grid; gap: 10px; }
.tarot-card-meanings section, .tarot-synthesis, .tarot-suggestions { padding: 15px 16px; border: 1px solid rgba(232,201,138,.14); border-radius: 13px; background: rgba(11,13,39,.55); }
.tarot-card-meanings section > span { color: #a399bd; font-size: 11px; letter-spacing: .08em; }
.tarot-card-meanings h3, .tarot-synthesis h3, .tarot-suggestions h3 { margin: 4px 0 8px; color: #f6e8c7; font-size: 15px; }
.tarot-card-meanings h3 small { color: var(--tarot-gold); font-size: 11px; }
.tarot-card-meanings section div { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.tarot-card-meanings i { padding: 3px 7px; border-radius: 999px; background: rgba(126,91,168,.22); color: #d5c7e7; font-size: 10px; font-style: normal; }
.tarot-card-meanings p, .tarot-synthesis p, .tarot-suggestions li { color: #c9ccdc; line-height: 1.7; font-size: 13px; }
.tarot-synthesis, .tarot-suggestions { margin-top: 10px; }
.tarot-suggestions ol { display: grid; gap: 6px; padding-left: 20px; }
.tarot-reading-copy blockquote { margin: 14px 0; padding: 14px 16px; border-left: 2px solid var(--tarot-gold); border-radius: 0 11px 11px 0; background: linear-gradient(90deg, rgba(232,201,138,.1), transparent); color: #f3e8ce; line-height: 1.7; }
.tarot-disclaimer { color: #8188a6; font-size: 11px; line-height: 1.6; }
.tarot-result-actions { margin-top: 16px; }
.tarot-result-actions .tarot-primary { margin: 0; }

.tarot-history { position: absolute; z-index: 40; top: 54px; right: 0; width: min(350px, calc(100vw - 32px)); max-height: min(610px, calc(100vh - 130px)); overflow: hidden; border: 1px solid rgba(232,201,138,.26); border-radius: 17px; background: rgba(9,11,32,.96); box-shadow: 0 25px 70px rgba(0,0,0,.5); backdrop-filter: blur(18px); animation: tarotHistoryIn .24s ease both; }
.tarot-history-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 16px; border-bottom: 1px solid rgba(232,201,138,.13); }
.tarot-history-head > div { display: grid; gap: 2px; }
.tarot-history-head span { color: #9f91b5; font-size: 9px; letter-spacing: .18em; }
.tarot-history-head strong { color: #f7e9c7; }
.tarot-history-head button { width: 30px; aspect-ratio: 1; border: 1px solid rgba(232,201,138,.18); border-radius: 9px; background: rgba(255,255,255,.04); color: white; cursor: pointer; }
.tarot-history-list { display: grid; gap: 7px; max-height: 530px; padding: 10px; overflow-y: auto; }
.tarot-history-list > button { display: grid; gap: 4px; width: 100%; padding: 12px; border: 1px solid rgba(232,201,138,.11); border-radius: 11px; text-align: left; background: rgba(42,36,77,.42); color: white; cursor: pointer; }
.tarot-history-list > button:hover { border-color: rgba(232,201,138,.38); background: rgba(78,60,111,.5); }
.tarot-history-list > button span { color: #8e93af; font-size: 10px; }
.tarot-history-list > button strong { color: #f1e5cd; }
.tarot-history-list > button small { color: #aaa7bb; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tarot-history-empty { display: grid; justify-items: center; gap: 6px; padding: 50px 15px; color: #959ab5; text-align: center; }
.tarot-history-empty > span { font-size: 28px; color: var(--tarot-gold); }
.tarot-history-empty strong { color: #ded7e1; }

body.tarot-modal-open { overflow: hidden; }
.tarot-modal-layer {
  position: fixed;
  z-index: 130;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 4, 17, .74);
  backdrop-filter: blur(12px) saturate(118%);
  -webkit-backdrop-filter: blur(12px) saturate(118%);
  animation: tarotModalMaskIn .2s ease both;
}
.tarot-confirm-modal {
  position: relative;
  width: min(448px, 100%);
  overflow: hidden;
  border: 1px solid rgba(232, 201, 138, .34);
  border-radius: 18px;
  outline: 0;
  color: #f8f3e8;
  background:
    radial-gradient(circle at 8% 0, rgba(120, 82, 194, .22), transparent 38%),
    radial-gradient(circle at 96% 100%, rgba(46, 176, 205, .11), transparent 32%),
    linear-gradient(150deg, rgba(26, 24, 60, .985), rgba(8, 10, 30, .99));
  box-shadow: 0 32px 90px rgba(0,0,0,.62), 0 0 42px rgba(115,78,190,.16), inset 0 1px rgba(255,255,255,.08);
  animation: tarotModalIn .24s cubic-bezier(.2,.76,.28,1) both;
}
.tarot-confirm-modal::before { position:absolute;top:0;left:12%;width:76%;height:1px;background:linear-gradient(90deg,transparent,#f0cf8b,transparent);content:"";box-shadow:0 0 15px rgba(240,207,139,.48); }
.tarot-modal-glow { position:absolute;top:-74px;right:-56px;width:190px;aspect-ratio:1;border:1px solid rgba(232,201,138,.12);border-radius:50%;box-shadow:0 0 0 22px rgba(142,95,211,.035),0 0 0 46px rgba(82,196,222,.025);pointer-events:none; }
.tarot-modal-header { position:relative;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:14px;padding:22px 22px 16px; }
.tarot-modal-header h2 { margin:5px 0 0;color:#fff5dc;font:600 21px/1.2 Georgia,"Songti SC",serif;letter-spacing:.04em; }
.tarot-modal-emblem { position:relative;display:block;width:48px;height:54px; }
.tarot-modal-emblem i { position:absolute;top:5px;left:10px;width:29px;height:43px;border:1px solid rgba(232,201,138,.58);border-radius:6px;background:linear-gradient(145deg,#1d1743,#0a0d26);box-shadow:0 7px 15px rgba(0,0,0,.28);transform-origin:50% 90%; }
.tarot-modal-emblem i:first-child { transform:rotate(-13deg) translateX(-5px); }.tarot-modal-emblem i:nth-child(2) { transform:rotate(13deg) translateX(5px); }.tarot-modal-emblem i:nth-child(3) { transform:none; }
.tarot-modal-emblem b { position:absolute;z-index:2;top:19px;left:21px;color:#f1cf86;font-size:12px;text-shadow:0 0 9px rgba(241,207,134,.7); }
.tarot-modal-close { display:grid;place-items:center;width:40px;height:40px;border:1px solid rgba(232,201,138,.15);border-radius:11px;color:#aca7bc;background:rgba(255,255,255,.035);font-size:20px;cursor:pointer;transition:.18s ease; }
.tarot-modal-close:hover { color:#fff5dc;border-color:rgba(232,201,138,.38);background:rgba(232,201,138,.08); }
.tarot-modal-body { position:relative;padding:3px 22px 20px; }
.tarot-modal-body > p { margin:0;color:#b7b5c8;font-size:13px;line-height:1.75; }
.tarot-spread-change { display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:10px;margin-top:16px;padding:12px;border:1px solid rgba(232,201,138,.12);border-radius:12px;background:rgba(6,8,26,.44);font-size:12px;text-align:center; }
.tarot-spread-change span,.tarot-spread-change strong { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }.tarot-spread-change span { color:#8f91aa; }.tarot-spread-change strong { color:#f3d89d; }.tarot-spread-change i { color:#6dd7ef;font-size:16px;font-style:normal; }
.tarot-modal-footer { display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:16px 22px 22px;border-top:1px solid rgba(232,201,138,.1);background:rgba(5,7,22,.24); }
.tarot-modal-button { min-height:44px;border:1px solid rgba(232,201,138,.17);border-radius:11px;color:#d5d3df;background:rgba(255,255,255,.045);font-weight:700;cursor:pointer;transition:transform .18s ease,border-color .18s ease,background .18s ease,box-shadow .18s ease; }
.tarot-modal-button:hover { transform:translateY(-1px);border-color:rgba(232,201,138,.36);background:rgba(255,255,255,.075); }.tarot-modal-button:active { transform:translateY(0) scale(.985); }
.tarot-modal-button.is-confirm { color:#171128;border-color:rgba(246,218,158,.7);background:linear-gradient(135deg,#f0cf8a,#d6a859);box-shadow:0 9px 22px rgba(195,139,60,.2),inset 0 1px rgba(255,255,255,.48); }
.tarot-modal-button.is-confirm:hover { background:linear-gradient(135deg,#f8dfa7,#e2b867);box-shadow:0 11px 26px rgba(195,139,60,.3),0 0 18px rgba(240,207,138,.12); }
.tarot-modal-close:focus-visible,.tarot-modal-button:focus-visible { outline:2px solid #6fdcf5;outline-offset:2px; }
@keyframes tarotModalMaskIn { from { opacity:0; } }
@keyframes tarotModalIn { from { opacity:0;transform:translateY(12px) scale(.97); } }

@keyframes tarotShuffle {
  0%, 100% { transform: translate(0) rotate(0); }
  35% { transform: translate(calc(var(--shuffle-offset) * 10px), -9px) rotate(calc(var(--shuffle-offset) * 2deg)); }
  68% { transform: translate(calc((3 - var(--shuffle-index)) * 8px), 3px) rotate(calc((3 - var(--shuffle-index)) * 1.5deg)); }
}
@keyframes tarotCardArrive { from { opacity: 0; transform: translateY(45px) scale(.78) rotate(4deg); } to { opacity: 1; transform: none; } }
@keyframes tarotRevealShine { 0% { left: -80%; opacity: 0; } 32% { opacity: .72; } 100% { left: 140%; opacity: 0; } }
@keyframes tarotOrbit { to { transform: rotate(360deg); } }
@keyframes tarotHistoryIn { from { opacity: 0; transform: translateY(-7px) scale(.98); } to { opacity: 1; transform: none; } }

@media (max-width: 1200px) {
  .tarot-welcome { grid-template-columns: minmax(180px, .65fr) minmax(300px, 1fr); gap: 40px; }
  .tarot-result { grid-template-columns: minmax(0, 1fr); }
  .tarot-result-cards { position: static; }
  .tarot-result-cards .tarot-card-slot { width: min(160px, 100%); }
}

@media (max-width: 680px) {
  .tarot-toolbar { align-items: flex-start; }
  .tarot-page,
  .tarot-toolbar,
  .tarot-table,
  .tarot-result,
  .tarot-result-cards,
  .tarot-reading-copy { width: 100%; min-width: 0; max-width: 100%; }
  .tarot-toolbar-actions { flex: 0 0 auto; }
  .tarot-spread-tabs button { padding-inline: 10px; }
  .content.tarot-content { padding: 8px; }
  .tarot-table { min-height: calc(100dvh - 110px); border-radius: 17px; }
  .tarot-table::before { inset: 9px; }
  .tarot-welcome { grid-template-columns: 1fr; width: calc(100% - 34px); gap: 20px; padding: 30px 0 38px; }
  .tarot-welcome-deck { width: 132px; }
  .tarot-intention { text-align: left; }
  .tarot-intention h2 { font-size: 29px; }
  .tarot-intention > p { margin-bottom: 18px; }
  .tarot-reading-stage, .tarot-result { padding: 14px 11px 28px; }
  .tarot-reading-head { padding: 0 4px; }
  .tarot-spread { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .tarot-spread-1 { grid-template-columns: minmax(140px, 190px); }
  .tarot-position-label { grid-template-columns: 1fr; text-align: center; min-height: 43px; }
  .tarot-position-label > span, .tarot-position-label small { display: none; }
  .tarot-position-label strong { font-size: 12px; }
  .tarot-card-slot { width: min(118px, 100%); border-radius: 11px; }
  .tarot-card-face, .tarot-picked-card { border-radius: 10px; }
  .tarot-card-art b { font-size: 25px; }
  .tarot-card-name strong { font-size: 10px; }
  .tarot-card-name small { display: none; }
  .tarot-deck-fan { min-height: 160px; margin-top: 4px; padding: 18px 28px 8px; }
  .tarot-deck-card { width: clamp(48px, 10vw, 62px); transform: none; }
  .tarot-result-cards .tarot-spread { grid-template-columns: repeat(3, minmax(80px, 1fr)); }
  .tarot-result-cards .tarot-spread-1 { grid-template-columns: minmax(140px, 190px); }
  .tarot-result-cards .tarot-card-slot { width: min(118px, 100%); }
  .tarot-reading-copy { padding: 8px 4px 30px; }
  .tarot-reading-copy p,
  .tarot-reading-copy li,
  .tarot-reading-copy blockquote { overflow-wrap: anywhere; }
  .tarot-history { position: fixed; top: auto; right: 10px; bottom: 78px; left: 10px; width: auto; max-height: min(70vh, 600px); }
}

@media (prefers-reduced-motion: reduce) {
  .tarot-shuffle-stack span,
  .tarot-picked-card.is-arriving,
  .tarot-picked-card.is-revealed .tarot-card-front::after,
  .tarot-history,
  .tarot-celestial-loader i { animation: none !important; }
  .tarot-card-inner { transition-duration: .32s !important; transition-timing-function: ease-out !important; }
  .tarot-deck-card { transition-duration: .12s !important; }
}

/* Result composition: keep every interpretation physically attached to its card. */
.tarot-quota {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 4px;
  padding: 10px 12px;
  border: 1px solid rgba(232, 201, 138, .18);
  border-radius: 12px;
  background: rgba(15, 18, 48, .55);
  color: #cfd1df;
}
.tarot-quota > span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(232,201,138,.13); color: var(--tarot-gold); font-weight: 700; }
.tarot-quota p { margin: 0; font-size: 12px; line-height: 1.5; }
.tarot-quota.is-exhausted { border-color: rgba(236, 139, 151, .24); color: #e7bcc3; }
.tarot-primary:disabled { cursor: not-allowed; opacity: .48; filter: saturate(.6); }

.tarot-result {
  display: block;
  width: min(1720px, 100%);
  max-width: none;
  margin: 0 auto;
  overflow: visible;
}
.tarot-result-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(232, 201, 138, .13);
}
.tarot-result-header h2 { margin: 8px 0 0; color: #fff3d2; font: 500 clamp(26px, 2.2vw, 38px)/1.25 Georgia, "Songti SC", serif; }
.tarot-result-header .tarot-result-question { margin: 7px 0 0; }
.tarot-ai-model { flex: 0 0 auto; padding: 6px 10px; border: 1px solid rgba(232,201,138,.15); border-radius: 999px; color: #aaa2bc; font-size: 10px; }
.tarot-result-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(310px, .34fr); gap: clamp(22px, 3vw, 46px); align-items: start; }
.tarot-result-cards-grid { display: grid; grid-template-columns: repeat(3, minmax(190px, 1fr)); gap: clamp(14px, 1.8vw, 28px); align-items: start; }
.tarot-result-cards-grid:has(.tarot-result-card-block:only-child) { grid-template-columns: minmax(240px, 410px); justify-content: center; }
.tarot-result-card-block { min-width: 0; padding: 14px; border: 1px solid rgba(232,201,138,.14); border-radius: 18px; background: linear-gradient(165deg, rgba(28,31,72,.62), rgba(10,12,35,.64)); box-shadow: 0 20px 50px rgba(0,0,0,.13); }
.tarot-result-position { display: flex; align-items: center; gap: 10px; min-height: 48px; margin-bottom: 10px; }
.tarot-result-position > span { color: rgba(232,201,138,.62); font: 600 16px/1 Georgia, serif; }
.tarot-result-position > div { display: grid; gap: 2px; }
.tarot-result-position strong { color: #f4e8cf; font-size: 14px; }
.tarot-result-position small { overflow: hidden; color: #969bb5; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.tarot-result-card-visual { display: grid; place-items: center; min-height: 0; padding: 4px 4px 14px; }
.tarot-result-card-visual .tarot-picked-card { width: min(230px, 86%); height: auto; aspect-ratio: var(--tarot-card-ratio); }
.tarot-result-card-visual .tarot-card-inner { width: 100%; height: 100%; }
.tarot-card-reading { padding: 14px; border: 1px solid rgba(232,201,138,.13); border-radius: 13px; background: rgba(8,10,30,.52); }
.tarot-card-reading-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tarot-card-reading-title h3 { margin: 0; color: #f7ead0; font-size: 16px; }
.tarot-card-reading-title > span { padding: 3px 7px; border-radius: 999px; background: rgba(232,201,138,.12); color: var(--tarot-gold); font-size: 10px; }
.tarot-keywords { display: flex; flex-wrap: wrap; gap: 5px; margin: 9px 0; }
.tarot-keywords i { padding: 3px 7px; border-radius: 999px; background: rgba(126,91,168,.22); color: #d5c7e7; font-size: 10px; font-style: normal; }
.tarot-card-reading p { margin: 0; color: #c9ccdc; font-size: 13px; line-height: 1.75; }
.tarot-reading-copy { position: sticky; top: 18px; min-width: 0; padding: 18px; border: 1px solid rgba(232,201,138,.15); border-radius: 18px; background: rgba(10,12,35,.58); }
.tarot-reading-copy .tarot-result-summary { margin: 0 0 14px; }
.tarot-reading-copy .tarot-synthesis, .tarot-reading-copy .tarot-suggestions { margin-top: 10px; }
.tarot-reading-copy blockquote { display: grid; gap: 6px; }
.tarot-reading-copy blockquote span { color: #a99cc4; font-size: 10px; letter-spacing: .08em; }
.tarot-ai-warning { margin: 12px 0; padding: 10px 12px; border: 1px solid rgba(239,174,96,.23); border-radius: 10px; background: rgba(107,65,20,.15); color: #e6c59c; font-size: 11px; line-height: 1.6; }
.tarot-ai-prompt,
.tarot-ai-reading { margin-top: clamp(24px, 3vw, 42px); border: 1px solid rgba(232,201,138,.16); border-radius: 20px; background: linear-gradient(145deg, rgba(22,24,62,.76), rgba(12,10,38,.78)); box-shadow: 0 26px 70px rgba(0,0,0,.16); }
.tarot-ai-prompt { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: clamp(18px, 2.4vw, 30px); }
.tarot-ai-prompt h2,
.tarot-ai-reading h2 { margin: 7px 0; color: #fff1d2; font: 500 clamp(21px, 2vw, 30px)/1.3 Georgia, "Songti SC", serif; }
.tarot-ai-prompt p { max-width: 760px; margin: 0; color: #c6c8d8; line-height: 1.7; }
.tarot-ai-prompt small { display: block; margin-top: 8px; color: #a8a1bb; }
.tarot-ai-prompt .tarot-primary { flex: 0 0 auto; }
.tarot-ai-reading { padding: clamp(18px, 2.8vw, 36px); }
.tarot-ai-reading-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid rgba(232,201,138,.13); }
.tarot-ai-reading h3 { margin: 0 0 10px; color: #f2dfb8; font-size: 15px; }
.tarot-ai-question-focus,
.tarot-ai-synthesis,
.tarot-ai-actions { margin-top: 18px; padding: 16px 18px; border: 1px solid rgba(232,201,138,.12); border-radius: 14px; background: rgba(7,9,29,.45); }
.tarot-ai-question-focus p,
.tarot-ai-synthesis p { margin: 0; color: #d1d2df; line-height: 1.8; }
.tarot-ai-card-readings { margin-top: 22px; }
.tarot-ai-card-readings > h3 { margin-bottom: 12px; }
.tarot-ai-card-reading { display: grid; grid-template-columns: minmax(210px, .34fr) minmax(0, 1fr); gap: 18px; padding: 16px 0; border-top: 1px solid rgba(232,201,138,.11); }
.tarot-ai-card-reading > div { display: grid; grid-template-columns: auto 1fr; align-content: start; gap: 4px 9px; }
.tarot-ai-card-reading > div > span { grid-row: 1 / 3; color: rgba(232,201,138,.62); font: 600 16px/1.2 Georgia, serif; }
.tarot-ai-card-reading strong { color: #f6ead2; font-size: 14px; }
.tarot-ai-card-reading i { color: #b6a6ce; font-size: 11px; font-style: normal; }
.tarot-ai-card-reading p { margin: 0; color: #c9ccdc; line-height: 1.8; }
.tarot-ai-actions ol { margin: 0; padding-left: 22px; color: #d1d2df; }
.tarot-ai-actions li { padding: 4px 0; line-height: 1.7; }
.tarot-ai-reflection { display: grid; gap: 7px; margin: 18px 0 0; padding: 14px 16px; border-left: 2px solid var(--tarot-gold); background: rgba(232,201,138,.05); color: #f1e4c9; line-height: 1.7; }
.tarot-ai-reflection span { color: #a99cc4; font-size: 10px; letter-spacing: .08em; }

@media (max-width: 1260px) {
  .tarot-result-layout { grid-template-columns: minmax(0, 1fr); }
  .tarot-reading-copy { position: static; }
}

@media (max-width: 820px) {
  .tarot-result-cards-grid { grid-template-columns: 1fr; }
  .tarot-result-cards-grid:has(.tarot-result-card-block:only-child) { grid-template-columns: 1fr; }
  .tarot-result-card-block { display: block; }
  .tarot-result-position { margin-bottom: 10px; }
  .tarot-result-card-visual { padding: 0 0 14px; }
  .tarot-result-card-visual .tarot-picked-card { width: min(190px, 100%); }
  .tarot-ai-prompt, .tarot-ai-reading-head { align-items: stretch; flex-direction: column; }
  .tarot-ai-card-reading { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 520px) {
  .tarot-result-header { display: grid; }
  .tarot-result-card-block { display: block; padding: 11px; }
  .tarot-result-card-visual { padding-bottom: 12px; }
  .tarot-result-card-visual .tarot-picked-card { width: min(210px, 72vw); }
  .tarot-reading-copy { padding: 14px; }
  .tarot-modal-layer { padding:16px;align-items:end; }
  .tarot-confirm-modal { border-radius:18px; }
  .tarot-modal-header { padding:20px 18px 14px; }.tarot-modal-body { padding:3px 18px 18px; }.tarot-modal-footer { padding:14px 18px 18px; }
}

/* Three-second split-and-riffle ritual. Visual only: deck order remains owned by tarot.js. */
.tarot-reading-stage.is-shuffling {
  position: relative;
  display: grid;
  grid-template-columns: minmax(150px, .72fr) minmax(270px, 1fr);
  align-items: center;
  justify-content: center;
  gap: clamp(30px, 6vw, 84px);
  width: min(760px, calc(100% - 40px));
  min-height: clamp(460px, 70vh, 680px);
  margin: 0 auto;
  padding: 36px 0;
  overflow: visible;
}

.tarot-shuffle-ritual {
  position: relative;
  width: clamp(148px, 17vw, 172px);
  height: clamp(222px, 25.5vw, 258px);
  aspect-ratio: var(--tarot-card-ratio);
  justify-self: end;
  perspective: 1100px;
  transform-style: preserve-3d;
}

.tarot-shuffle-ritual::before {
  position: absolute;
  z-index: -2;
  top: 84%;
  left: 50%;
  width: 164%;
  height: 32%;
  border: 1px solid rgba(232, 201, 138, .18);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(157,108,255,.18), rgba(19,13,48,.12) 44%, transparent 72%);
  box-shadow: 0 0 46px rgba(103, 70, 175, .17);
  content: "";
  transform: translate(-50%, -50%) rotateX(68deg);
  animation: tarotShuffleGround 3s ease-in-out both;
}

.tarot-shuffle-orbit {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(232, 201, 138, .22);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%) rotateX(66deg);
}
.tarot-shuffle-orbit::before,
.tarot-shuffle-orbit::after {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffe8ac;
  box-shadow: 0 0 12px rgba(255, 226, 158, .82);
  content: "";
}
.tarot-shuffle-orbit::before { top: 10%; left: 16%; }
.tarot-shuffle-orbit::after { right: 10%; bottom: 17%; }
.tarot-shuffle-orbit.orbit-one { width: 188%; height: 85%; animation: tarotShuffleOrbit 3s cubic-bezier(.4,0,.2,1) both; }
.tarot-shuffle-orbit.orbit-two { width: 145%; height: 66%; border-color: rgba(94, 224, 255, .17); animation: tarotShuffleOrbitReverse 3s cubic-bezier(.4,0,.2,1) both; }

.tarot-shuffle-sigil {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  color: rgba(255, 226, 160, .7);
  font-size: 34px;
  text-shadow: 0 0 18px rgba(232, 201, 138, .74), 0 0 38px rgba(157, 108, 255, .46);
  transform: translate(-50%, -50%);
  animation: tarotShuffleSigil 3s ease-in-out both;
}

.tarot-shuffle-deck,
.tarot-shuffle-half {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.tarot-shuffle-deck { z-index: 2; filter: drop-shadow(0 25px 27px rgba(0,0,0,.38)); }
.tarot-shuffle-half { will-change: transform; }
.tarot-shuffle-half.is-left { animation: tarotRiffleHalfLeft 3s cubic-bezier(.38,.02,.2,1) both; }
.tarot-shuffle-half.is-right { animation: tarotRiffleHalfRight 3s cubic-bezier(.38,.02,.2,1) both; }
.tarot-shuffle-half i {
  position: absolute;
  inset: 0;
  display: block;
  border: 1px solid rgba(239, 210, 148, .7);
  border-radius: 12px;
  background: #0d102b url("tarot-card-back.webp") center / contain no-repeat;
  box-shadow: inset 0 0 0 4px rgba(5,7,25,.62), inset 0 0 0 5px rgba(232,201,138,.22), 0 8px 18px rgba(0,0,0,.22);
  backface-visibility: hidden;
  opacity: .98;
  transform: translate3d(var(--shuffle-x), var(--shuffle-y), var(--shuffle-z));
  transform-origin: 50% 90%;
  will-change: transform, opacity;
}
.tarot-shuffle-half.is-left i { animation: tarotRiffleCardLeft 2.84s cubic-bezier(.38,.02,.2,1) var(--shuffle-delay) both; }
.tarot-shuffle-half.is-right i { animation: tarotRiffleCardRight 2.84s cubic-bezier(.38,.02,.2,1) var(--shuffle-delay) both; }

.tarot-shuffle-flare {
  position: absolute;
  z-index: 20;
  top: 48%;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  opacity: 0;
  background: #fff5ce;
  box-shadow: 0 0 10px 3px rgba(255,225,155,.72), 0 0 32px 13px rgba(157,108,255,.24);
  transform: translate(-50%, -50%);
  animation: tarotShuffleFlare 3s ease-out both;
}

.tarot-shuffle-particle {
  position: absolute;
  z-index: 3;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  opacity: 0;
  background: #f8dea4;
  box-shadow: 0 0 11px rgba(248, 222, 164, .86);
  pointer-events: none;
}
.tarot-shuffle-particle.particle-one { top: 26%; left: -16%; animation: tarotShuffleParticleOne 3s ease-out both; }
.tarot-shuffle-particle.particle-two { top: 48%; right: -24%; animation: tarotShuffleParticleTwo 3s ease-out both; }
.tarot-shuffle-particle.particle-three { bottom: 10%; left: 13%; animation: tarotShuffleParticleThree 3s ease-out both; }

.tarot-shuffle-copy {
  width: min(370px, 100%);
  justify-self: start;
  text-align: left;
}
.tarot-shuffle-copy > strong {
  display: block;
  margin-top: 8px;
  color: #fff5dc;
  font: 500 clamp(25px, 3vw, 34px)/1.2 Georgia, "Songti SC", serif;
  letter-spacing: .03em;
}
.tarot-shuffle-status {
  min-height: 24px;
  margin: 13px 0 0;
  color: #e7d7b4;
  font-size: 14px;
  line-height: 1.7;
  animation: tarotShuffleStatus 3s ease-in-out both;
}
.tarot-shuffle-progress { width: min(280px, 100%); height: 2px; margin: 8px 0 14px; overflow: hidden; border-radius: 4px; background: rgba(232,201,138,.11); }
.tarot-shuffle-progress i { display: block; width: 100%; height: 100%; background: linear-gradient(90deg,#8c62db,#f2cd81 62%,#67ddff); box-shadow: 0 0 12px rgba(232,201,138,.46); transform: scaleX(0); transform-origin: left; animation: tarotShuffleProgress 3s linear both; }
.tarot-shuffle-copy > p { margin: 0; color: #9299b7; font-size: 12px; line-height: 1.7; }

.tarot-deck-fan { animation: tarotDeckFanEnter .46s cubic-bezier(.2,.72,.26,1) both; }

@keyframes tarotRiffleHalfLeft {
  0% { opacity:.72;transform:translate3d(-3px,0,0) rotateZ(-1deg) scale(.97); }
  14% { opacity:1;transform:translate3d(0,0,0) rotateZ(0) scale(1); }
  30% { transform:translate3d(-62px,2px,0) rotateY(-12deg) rotateZ(-7deg); }
  43% { transform:translate3d(-54px,-9px,8px) rotateY(12deg) rotateZ(-4deg); }
  56% { transform:translate3d(16px,7px,14px) rotateY(-9deg) rotateZ(2deg); }
  68% { transform:translate3d(-18px,-4px,8px) rotateY(7deg) rotateZ(-1deg); }
  80% { transform:translate3d(-44px,2px,3px) rotateY(-6deg) rotateZ(-4deg); }
  92%,100% { opacity:1;transform:translate3d(0,0,0) rotateY(0) rotateZ(0) scale(1); }
}
@keyframes tarotRiffleHalfRight {
  0% { opacity:.72;transform:translate3d(3px,0,0) rotateZ(1deg) scale(.97); }
  14% { opacity:1;transform:translate3d(0,0,0) rotateZ(0) scale(1); }
  30% { transform:translate3d(62px,2px,0) rotateY(12deg) rotateZ(7deg); }
  43% { transform:translate3d(54px,9px,8px) rotateY(-12deg) rotateZ(4deg); }
  56% { transform:translate3d(-16px,-7px,14px) rotateY(9deg) rotateZ(-2deg); }
  68% { transform:translate3d(18px,4px,8px) rotateY(-7deg) rotateZ(1deg); }
  80% { transform:translate3d(44px,2px,3px) rotateY(6deg) rotateZ(4deg); }
  92%,100% { opacity:1;transform:translate3d(0,0,0) rotateY(0) rotateZ(0) scale(1); }
}
@keyframes tarotRiffleCardLeft {
  0%,24%,100% { transform:translate3d(var(--shuffle-x),var(--shuffle-y),var(--shuffle-z)) rotateX(0); }
  42% { transform:translate3d(calc(var(--shuffle-x) - 3px),calc(var(--shuffle-y) - 8px),12px) rotateX(13deg); }
  54% { transform:translate3d(calc(var(--shuffle-x) + 8px),calc(var(--shuffle-y) + 5px),20px) rotateX(-17deg) rotateY(-4deg); }
  67% { transform:translate3d(calc(var(--shuffle-x) - 4px),calc(var(--shuffle-y) - 3px),10px) rotateX(8deg); }
  84% { transform:translate3d(var(--shuffle-x),var(--shuffle-y),var(--shuffle-z)) rotateX(0); }
}
@keyframes tarotRiffleCardRight {
  0%,24%,100% { transform:translate3d(var(--shuffle-x),var(--shuffle-y),var(--shuffle-z)) rotateX(0); }
  42% { transform:translate3d(calc(var(--shuffle-x) + 3px),calc(var(--shuffle-y) - 8px),12px) rotateX(13deg); }
  54% { transform:translate3d(calc(var(--shuffle-x) - 8px),calc(var(--shuffle-y) - 5px),20px) rotateX(-17deg) rotateY(4deg); }
  67% { transform:translate3d(calc(var(--shuffle-x) + 4px),calc(var(--shuffle-y) - 3px),10px) rotateX(8deg); }
  84% { transform:translate3d(var(--shuffle-x),var(--shuffle-y),var(--shuffle-z)) rotateX(0); }
}
@keyframes tarotShuffleOrbit { 0% { opacity:0;transform:translate(-50%,-50%) rotateX(66deg) rotateZ(-20deg) scale(.72); } 22% { opacity:.72; } 72% { opacity:.48;transform:translate(-50%,-50%) rotateX(66deg) rotateZ(160deg) scale(1.04); } 100% { opacity:0;transform:translate(-50%,-50%) rotateX(66deg) rotateZ(230deg) scale(.82); } }
@keyframes tarotShuffleOrbitReverse { 0% { opacity:0;transform:translate(-50%,-50%) rotateX(66deg) rotateZ(40deg) scale(.76); } 24% { opacity:.58; } 72% { opacity:.38;transform:translate(-50%,-50%) rotateX(66deg) rotateZ(-145deg) scale(1); } 100% { opacity:0;transform:translate(-50%,-50%) rotateX(66deg) rotateZ(-210deg) scale(.84); } }
@keyframes tarotShuffleGround { 0%,100% { opacity:.18;transform:translate(-50%,-50%) rotateX(68deg) scale(.78); } 35%,76% { opacity:1;transform:translate(-50%,-50%) rotateX(68deg) scale(1); } }
@keyframes tarotShuffleSigil { 0%,100% { opacity:0;transform:translate(-50%,-50%) scale(.55) rotate(-30deg); } 30% { opacity:.45; } 56% { opacity:1;transform:translate(-50%,-50%) scale(1.18) rotate(80deg); } 78% { opacity:.6;transform:translate(-50%,-50%) scale(.92) rotate(145deg); } }
@keyframes tarotShuffleFlare { 0%,39%,100% { opacity:0;transform:translate(-50%,-50%) scale(.3); } 48%,59% { opacity:1;transform:translate(-50%,-50%) scale(1); } 72% { opacity:.22;transform:translate(-50%,-50%) scale(2.2); } }
@keyframes tarotShuffleParticleOne { 0%,20%,100% { opacity:0;transform:translate(0,0) scale(.3); } 38% { opacity:1; } 70% { opacity:.7;transform:translate(74px,-32px) scale(1); } }
@keyframes tarotShuffleParticleTwo { 0%,34%,100% { opacity:0;transform:translate(0,0) scale(.3); } 52% { opacity:1; } 82% { opacity:.6;transform:translate(-82px,-38px) scale(.8); } }
@keyframes tarotShuffleParticleThree { 0%,48%,100% { opacity:0;transform:translate(0,0) scale(.3); } 65% { opacity:1; } 90% { opacity:.55;transform:translate(42px,-72px) scale(.7); } }
@keyframes tarotShuffleStatus { 0% { opacity:0;transform:translateY(7px); } 12%,88% { opacity:1;transform:translateY(0); } 100% { opacity:0;transform:translateY(-5px); } }
@keyframes tarotShuffleProgress { to { transform:scaleX(1); } }
@keyframes tarotDeckFanEnter { from { opacity:0;transform:translateY(18px) scale(.985);filter:blur(3px); } to { opacity:1;transform:none;filter:none; } }
@keyframes tarotShuffleReducedLeft { 0%,100% { transform:translateX(-2px); } 30% { transform:translateX(-34px); } 62% { transform:translateX(-10px); } }
@keyframes tarotShuffleReducedRight { 0%,100% { transform:translateX(2px); } 30% { transform:translateX(34px); } 62% { transform:translateX(10px); } }

@media (max-width: 680px) {
  .tarot-reading-stage.is-shuffling { grid-template-columns:1fr;align-content:center;gap:19px;width:calc(100% - 24px);min-height:520px;padding:24px 0 44px; }
  .tarot-shuffle-ritual { width:clamp(116px,34vw,130px);height:clamp(174px,51vw,195px);justify-self:center; }
  .tarot-shuffle-copy { justify-self:center;text-align:center; }
  .tarot-shuffle-copy > strong { font-size:25px; }
  .tarot-shuffle-status { min-height:22px;margin-top:9px;font-size:13px;text-align:center; }
  .tarot-shuffle-progress { width:min(220px,72vw);margin-inline:auto; }
  .tarot-shuffle-orbit.orbit-one { width:164%; }.tarot-shuffle-orbit.orbit-two { width:128%; }
  .tarot-shuffle-particle.particle-two { right:-12%; }
}

@media (prefers-reduced-motion: reduce) {
  .tarot-shuffle-ritual::before,
  .tarot-shuffle-orbit,
  .tarot-shuffle-sigil,
  .tarot-shuffle-half i,
  .tarot-shuffle-flare,
  .tarot-shuffle-particle,
  .tarot-deck-fan { animation:none!important; }
  .tarot-shuffle-half.is-left { animation:tarotShuffleReducedLeft 3s ease-in-out both!important; }
  .tarot-shuffle-half.is-right { animation:tarotShuffleReducedRight 3s ease-in-out both!important; }
  .tarot-shuffle-half i { opacity:.92;transform:translate3d(var(--shuffle-x),var(--shuffle-y),var(--shuffle-z)); }
  .tarot-modal-layer,.tarot-confirm-modal { animation:none!important; }
}
