:root {
  color-scheme: dark;
  --bg: #050505;
  --bg-soft: #0d0d0d;
  --panel: #151311;
  --panel-2: #101010;
  --ink: #fbf5e8;
  --muted: #c8bb9d;
  --quiet: #8f856f;
  --line: rgba(224, 181, 89, 0.22);
  --line-soft: rgba(255, 255, 255, 0.08);
  --gold: #d8aa43;
  --gold-bright: #f6d783;
  --teal: #3b9d99;
  --wine: #8e2f45;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  --radius: 8px;
  --card-ratio: 0.6;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  font: 16px/1.6 Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 20% -12rem, rgba(216, 170, 67, 0.16), transparent 26rem),
    radial-gradient(circle at 84% 10rem, rgba(59, 157, 153, 0.12), transparent 22rem),
    linear-gradient(180deg, #090806 0, #020202 34rem, #050505 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.65), transparent 80%);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 60px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 8, 6, 0.9);
  backdrop-filter: blur(14px);
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  width: min(920px, 94%);
  min-height: 60px;
  margin: 0 auto;
}

.brand,
.nav-links a {
  color: var(--ink);
  text-decoration: none;
}

.brand {
  color: var(--gold-bright);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: 0.94rem;
}

.nav-links a:hover,
.brand:hover {
  color: var(--gold);
}

.page {
  width: min(920px, 94%);
  margin: 0 auto;
  padding: 34px 0 54px;
}

.hero {
  padding: 28px 0 24px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.16;
}

h1 {
  margin: 0;
  color: var(--gold-bright);
  font-size: clamp(2.15rem, 7vw, 3.9rem);
}

h2 {
  margin: 0 0 12px;
  color: var(--gold-bright);
  font-size: clamp(1.42rem, 4vw, 1.9rem);
}

h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1.18rem;
}

.lead {
  max-width: 650px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.muted {
  color: var(--muted);
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 9rem),
    var(--panel);
  box-shadow: var(--shadow);
}

.app-panel {
  min-height: 560px;
  padding: clamp(16px, 4vw, 26px);
}

.screen {
  display: none;
}

.screen.is-active {
  display: block;
}

.screen-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.reading-types {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.type-card {
  min-height: 118px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  color: var(--ink);
  background:
    radial-gradient(circle at 86% 18%, rgba(216, 170, 67, 0.14), transparent 4rem),
    #11100f;
  padding: 16px;
  text-align: left;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.type-card:hover {
  transform: translateY(-2px);
  border-color: rgba(216, 170, 67, 0.45);
}

.type-card strong,
.type-card span {
  display: block;
}

.type-card strong {
  color: var(--gold-bright);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
}

.type-card span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.type-card.is-active {
  border-color: var(--gold);
  background:
    radial-gradient(circle at 80% 15%, rgba(59, 157, 153, 0.16), transparent 5rem),
    #181511;
  box-shadow: inset 0 0 0 1px rgba(216, 170, 67, 0.32), 0 0 32px rgba(216, 170, 67, 0.14);
}

.gold-button,
.outline-button {
  min-height: 42px;
  border-radius: var(--radius);
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 700;
}

.gold-button {
  border: 1px solid #f4cf73;
  color: #191006;
  background: linear-gradient(180deg, #ffe19a, #c99027);
  box-shadow: 0 12px 34px rgba(216, 170, 67, 0.18);
}

.outline-button {
  border: 1px solid rgba(216, 170, 67, 0.55);
  color: var(--gold-bright);
  background: rgba(255, 255, 255, 0.04);
}

.gold-button:hover,
.outline-button:hover {
  filter: brightness(1.08);
}

.draw-stage {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.deck {
  position: relative;
  display: grid;
  place-items: center;
  width: 170px;
  height: 258px;
  border: 0;
  background: transparent;
  justify-self: center;
}

.deck::before {
  content: "";
  position: absolute;
  inset: 20px -18px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(216, 170, 67, 0.2), transparent 67%);
  filter: blur(8px);
}

.deck-card {
  position: absolute;
  width: 132px;
  height: 220px;
  overflow: hidden;
  border: 1px solid rgba(246, 215, 131, 0.72);
  border-radius: var(--radius);
  background-image:
    linear-gradient(180deg, rgba(255, 240, 190, 0.16), rgba(0, 0, 0, 0.16)),
    url("assets/tarot-card-back-premium.png");
  background-size: cover;
  background-position: center;
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.6),
    inset 0 0 0 5px rgba(0, 0, 0, 0.38),
    inset 0 0 24px rgba(246, 215, 131, 0.18);
  transition: transform 0.25s ease, filter 0.25s ease;
}

.deck-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 47%, rgba(246, 215, 131, 0.2), transparent 24%),
    linear-gradient(115deg, transparent 0 42%, rgba(255, 255, 255, 0.16) 50%, transparent 58% 100%);
  mix-blend-mode: screen;
  opacity: 0.52;
}

.deck-card-a { transform: rotate(-6deg); }
.deck-card-b { transform: rotate(2deg) translate(8px, -5px); }
.deck-card-c { transform: rotate(8deg) translate(16px, -10px); }

.deck:hover .deck-card-c {
  filter: brightness(1.12) saturate(1.08);
}

.deck.is-shuffling .deck-card-a { animation: shuffleA 0.62s ease; }
.deck.is-shuffling .deck-card-b { animation: shuffleB 0.62s ease; }
.deck.is-shuffling .deck-card-c { animation: shuffleC 0.62s ease; }

@keyframes shuffleA {
  50% { transform: translateX(-26px) rotate(-15deg); }
}

@keyframes shuffleB {
  50% { transform: translateX(24px) rotate(12deg); }
}

@keyframes shuffleC {
  50% { transform: translateY(-22px) rotate(0deg); }
}

.spread-orbit-wrap {
  position: relative;
  width: min(560px, 100%);
  aspect-ratio: 1;
  justify-self: center;
}

.spread-grid {
  position: relative;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(216, 170, 67, 0.16);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(246, 215, 131, 0.08), transparent 7rem),
    radial-gradient(circle at 50% 50%, transparent 0 38%, rgba(216, 170, 67, 0.14) 39%, transparent 40%),
    radial-gradient(circle at 50% 50%, transparent 0 61%, rgba(59, 157, 153, 0.16) 62%, transparent 63%);
  box-shadow: inset 0 0 38px rgba(0, 0, 0, 0.32);
}

.spread-grid::before,
.spread-grid::after {
  content: "";
  position: absolute;
  inset: 10%;
  border: 1px solid rgba(246, 215, 131, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

.spread-grid::after {
  inset: 23%;
  border-color: rgba(59, 157, 153, 0.15);
}

.slot {
  position: absolute;
  z-index: 1;
  width: 98px;
  min-height: 154px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 76%, rgba(59, 157, 153, 0.08), transparent 5rem),
    var(--panel-2);
  padding: 8px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.slot > *:not(.slot-beam) {
  position: relative;
  z-index: 1;
}

.slot-1 { top: 2%; left: 50%; transform: translateX(-50%); }
.slot-2 { top: 13%; right: 7%; }
.slot-3 { bottom: 13%; right: 7%; }
.slot-4 { bottom: 2%; left: 50%; transform: translateX(-50%); }
.slot-5 { bottom: 13%; left: 7%; }
.slot-6 { top: 13%; left: 7%; }

.slot.is-filled {
  border-color: rgba(216, 170, 67, 0.42);
  background:
    radial-gradient(circle at 50% 72%, rgba(216, 170, 67, 0.1), transparent 6rem),
    #100f0d;
}

.slot-position {
  display: block;
  min-height: 25px;
  color: var(--gold-bright);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.slot-keyword {
  display: block;
  margin-top: 2px;
  color: var(--quiet);
  font-size: 0.68rem;
  text-align: center;
}

.slot-empty {
  position: relative;
  display: grid;
  place-items: center;
  height: 88px;
  margin-top: 8px;
  overflow: hidden;
  border: 1px dashed rgba(216, 170, 67, 0.28);
  border-radius: var(--radius);
  color: rgba(246, 215, 131, 0.36);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
}

.slot-empty::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(59, 157, 153, 0.2);
  border-radius: 999px;
}

.slot-beam {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(86px, 17vw, 145px);
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(246, 215, 131, 0.88), rgba(59, 157, 153, 0.46), transparent);
  box-shadow: 0 0 16px rgba(246, 215, 131, 0.48);
  opacity: 0;
  transform: rotate(var(--beam-angle)) scaleX(0);
  transform-origin: 0 50%;
  animation: beamReach 0.58s ease forwards;
  pointer-events: none;
}

.slot-1 .slot-beam { --beam-angle: 90deg; }
.slot-2 .slot-beam { --beam-angle: 138deg; }
.slot-3 .slot-beam { --beam-angle: -138deg; }
.slot-4 .slot-beam { --beam-angle: -90deg; }
.slot-5 .slot-beam { --beam-angle: -42deg; }
.slot-6 .slot-beam { --beam-angle: 42deg; }

@keyframes beamReach {
  from { opacity: 0; transform: rotate(var(--beam-angle)) scaleX(0); }
  45% { opacity: 1; }
  to { opacity: 0.86; transform: rotate(var(--beam-angle)) scaleX(1); }
}

.drawn-card-back {
  position: relative;
  display: block;
  width: 62px;
  height: 104px;
  margin: 8px auto 0;
  overflow: hidden;
  border: 1px solid rgba(246, 215, 131, 0.72);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 240, 190, 0.16), rgba(0, 0, 0, 0.16)),
    url("assets/tarot-card-back-premium.png") center / cover;
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.45),
    inset 0 0 0 5px rgba(0, 0, 0, 0.38),
    inset 0 0 24px rgba(246, 215, 131, 0.18);
  animation: backDeal 0.48s ease both;
}

.drawn-card-back:disabled {
  cursor: default;
  opacity: 1;
}

.drawn-card-back::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 47%, rgba(246, 215, 131, 0.2), transparent 24%),
    linear-gradient(115deg, transparent 0 42%, rgba(255, 255, 255, 0.16) 50%, transparent 58% 100%);
  mix-blend-mode: screen;
  opacity: 0.52;
}

@keyframes backDeal {
  from { opacity: 0; transform: translateY(12px) scale(0.92) rotate(-4deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

.reading-orb {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border: 1px solid rgba(246, 215, 131, 0.84);
  border-radius: 50%;
  color: #1b1005;
  background:
    radial-gradient(circle at 34% 28%, #fff3bd, #f6d783 34%, #c99027 72%, #7b4610);
  box-shadow:
    0 0 0 10px rgba(216, 170, 67, 0.08),
    0 0 42px rgba(216, 170, 67, 0.44),
    0 20px 55px rgba(0, 0, 0, 0.55);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  transform: translate(-50%, -50%) scale(0.7);
  animation: orbEnter 0.62s cubic-bezier(.2, .8, .2, 1) 0.34s both, orbPulse 2.4s ease-in-out infinite 0.96s;
}

.reading-orb::before,
.reading-orb::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.reading-orb::before {
  inset: 12px;
  border: 1px solid rgba(25, 16, 6, 0.28);
}

.reading-orb::after {
  inset: -18px;
  border: 1px dashed rgba(246, 215, 131, 0.5);
  animation: spinSigil 8s linear infinite;
}

@keyframes orbEnter {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.42) rotate(-18deg); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); }
}

@keyframes orbPulse {
  0%, 100% { box-shadow: 0 0 0 10px rgba(216, 170, 67, 0.08), 0 0 42px rgba(216, 170, 67, 0.44), 0 20px 55px rgba(0, 0, 0, 0.55); }
  50% { box-shadow: 0 0 0 18px rgba(216, 170, 67, 0.04), 0 0 64px rgba(246, 215, 131, 0.6), 0 20px 55px rgba(0, 0, 0, 0.55); }
}

@keyframes spinSigil {
  to { transform: rotate(360deg); }
}

.tarot-card {
  display: block;
  width: 120px;
  height: 200px;
  margin: 12px auto 0;
  border: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  perspective: 900px;
}

.tarot-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: flipIn 0.54s ease both;
}

@keyframes flipIn {
  from { opacity: 0; transform: scale(0.86) rotateY(-110deg); }
  to { opacity: 1; transform: scale(1) rotateY(0); }
}

.tarot-face {
  position: relative;
  display: block;
  width: 120px;
  height: 200px;
  overflow: hidden;
  border: 1px solid rgba(246, 215, 131, 0.72);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 28%, rgba(142, 47, 69, 0.28), transparent 34%),
    radial-gradient(circle at 68% 42%, rgba(59, 157, 153, 0.2), transparent 26%),
    radial-gradient(circle at 30% 58%, rgba(216, 170, 67, 0.18), transparent 28%),
    linear-gradient(180deg, #241333 0, #0c0717 42%, #050404 100%);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.45),
    inset 0 0 0 5px rgba(0, 0, 0, 0.28);
  padding: 8px;
  text-align: center;
}

.tarot-face::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(216, 170, 67, 0.48);
  border-radius: 5px;
  box-shadow: inset 0 0 0 1px rgba(246, 215, 131, 0.08);
  pointer-events: none;
}

.tarot-face::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 22% 20%, rgba(246, 215, 131, 0.22) 0 1px, transparent 2px),
    radial-gradient(circle at 76% 26%, rgba(59, 157, 153, 0.24) 0 1px, transparent 2px),
    radial-gradient(circle at 62% 68%, rgba(246, 215, 131, 0.2) 0 1px, transparent 2px);
  pointer-events: none;
}

.tarot-face.is-reversed {
  border-color: rgba(142, 47, 69, 0.85);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.45),
    inset 0 0 0 5px rgba(0, 0, 0, 0.28),
    inset 0 0 22px rgba(142, 47, 69, 0.2);
}

.card-number {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  top: 12px;
  left: 12px;
  min-width: 26px;
  height: 22px;
  border: 1px solid rgba(246, 215, 131, 0.42);
  border-radius: 999px;
  background: rgba(5, 4, 8, 0.58);
  color: var(--gold-bright);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.38);
}

.card-art {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  align-self: center;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.arcana-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 0 12px rgba(216, 170, 67, 0.24));
}

.portrait-svg {
  filter:
    drop-shadow(0 0 12px rgba(216, 170, 67, 0.24))
    drop-shadow(0 0 8px rgba(59, 157, 153, 0.18));
}

.portrait-bg {
  stroke: rgba(246, 215, 131, 0.28);
  stroke-width: 1;
}

.portrait-aura {
  opacity: 0.82;
}

.portrait-orbit,
.portrait-orb-line,
.portrait-magic-line,
.portrait-eye,
.portrait-mouth {
  fill: none;
  stroke: rgba(246, 215, 131, 0.82);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.portrait-orbit {
  stroke: rgba(79, 210, 255, 0.72);
  stroke-width: 1.55;
}

.portrait-magic-line {
  stroke: rgba(255, 223, 117, 0.9);
}

.portrait-magic-line.wide {
  stroke-width: 3;
}

.portrait-star,
.portrait-sigil {
  fill: rgba(255, 214, 105, 0.84);
  stroke: rgba(255, 242, 183, 0.76);
  stroke-width: 1.1;
  stroke-linejoin: round;
}

.portrait-star.small {
  fill: rgba(98, 226, 219, 0.78);
}

.portrait-robe {
  stroke: rgba(255, 230, 150, 0.48);
  stroke-width: 1.2;
}

.portrait-collar {
  fill: rgba(7, 6, 12, 0.58);
  stroke: rgba(246, 215, 131, 0.42);
  stroke-width: 1;
}

.portrait-hair {
  stroke: rgba(255, 241, 190, 0.25);
  stroke-width: 1;
}

.portrait-face,
.portrait-hand {
  stroke: rgba(255, 236, 188, 0.55);
  stroke-width: 0.9;
}

.portrait-shadow {
  fill: rgba(95, 42, 69, 0.18);
}

.portrait-eye,
.portrait-mouth {
  stroke: rgba(32, 17, 38, 0.82);
  stroke-width: 1.5;
}

.portrait-orb {
  stroke: rgba(255, 248, 199, 0.74);
  stroke-width: 1.2;
  filter: drop-shadow(0 0 7px rgba(255, 224, 120, 0.55));
}

.portrait-gem {
  fill: rgba(101, 239, 225, 0.88);
  stroke: rgba(255, 247, 199, 0.76);
  stroke-width: 0.8;
}

.portrait-gem.dark {
  fill: rgba(9, 7, 20, 0.9);
}

.witch-moon {
  fill: rgba(255, 222, 137, 0.8);
}

.witch-moon.cut {
  fill: rgba(15, 9, 28, 0.92);
}

.witch-city,
.witch-arm,
.witch-brow,
.witch-eye,
.witch-nose,
.witch-mouth,
.witch-cheek {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.witch-city {
  stroke: rgba(246, 215, 131, 0.2);
  stroke-width: 1.2;
}

.witch-hair {
  stroke: rgba(255, 245, 210, 0.22);
  stroke-width: 1.2;
}

.witch-hair.front {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.34));
}

.witch-neck,
.witch-face,
.witch-ear {
  stroke: rgba(255, 240, 210, 0.58);
  stroke-width: 0.9;
}

.witch-face {
  filter: drop-shadow(0 2px 3px rgba(50, 18, 42, 0.35));
}

.witch-coat {
  stroke: rgba(255, 231, 160, 0.52);
  stroke-width: 1.15;
}

.witch-lapel {
  fill: rgba(5, 4, 12, 0.46);
  stroke: rgba(246, 215, 131, 0.26);
  stroke-width: 1;
}

.witch-shirt {
  fill: rgba(255, 245, 218, 0.78);
  stroke: rgba(246, 215, 131, 0.36);
  stroke-width: 0.9;
}

.witch-brow {
  stroke: rgba(28, 14, 35, 0.72);
  stroke-width: 1.3;
}

.witch-eye {
  stroke: rgba(15, 9, 24, 0.9);
  stroke-width: 1.45;
}

.witch-nose {
  stroke: rgba(83, 38, 56, 0.42);
  stroke-width: 1.2;
}

.witch-mouth {
  stroke: rgba(125, 35, 70, 0.78);
  stroke-width: 1.35;
}

.witch-cheek {
  stroke: rgba(255, 126, 142, 0.32);
  stroke-width: 2;
}

.witch-earring {
  fill: rgba(255, 222, 111, 0.9);
  filter: drop-shadow(0 0 4px rgba(255, 222, 111, 0.55));
}

.witch-arm {
  stroke: rgba(255, 238, 199, 0.58);
  stroke-width: 5.4;
}

.svg-halo,
.svg-orbit,
.svg-line {
  fill: none;
  stroke: rgba(246, 215, 131, 0.84);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.svg-halo {
  stroke-width: 2.3;
}

.svg-orbit {
  stroke: rgba(59, 157, 153, 0.72);
  stroke-width: 1.65;
}

.svg-line.wide {
  stroke-width: 3.2;
}

.svg-fill {
  fill: rgba(216, 170, 67, 0.78);
  stroke: rgba(255, 235, 174, 0.72);
  stroke-width: 1.5;
}

.svg-dark {
  fill: rgba(6, 5, 5, 0.78);
  stroke: rgba(246, 215, 131, 0.58);
  stroke-width: 1.2;
}

.svg-dot {
  fill: var(--teal);
}

.svg-dot.gold {
  fill: rgba(216, 170, 67, 0.54);
}

.svg-dot.teal {
  fill: rgba(59, 157, 153, 0.72);
}

.svg-accent {
  fill: none;
  stroke: rgba(246, 215, 131, 0.9);
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.svg-spark {
  fill: rgba(246, 215, 131, 0.7);
}

.svg-spark.small {
  fill: rgba(59, 157, 153, 0.65);
}

.card-caption {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 2px;
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.05;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

.card-caption > span,
.card-caption > small {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.card-caption small {
  color: var(--gold);
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
}

.orientation {
  display: inline-flex;
  justify-content: center;
  min-width: 72px;
  margin-top: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
}

.slot > .orientation {
  display: none;
}

.is-hidden {
  display: none !important;
}

#resultScreen {
  position: relative;
}

.reading-reveal {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: none;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 45%, rgba(246, 215, 131, 0.22), transparent 9rem),
    rgba(2, 2, 2, 0.82);
  pointer-events: none;
}

.reveal-ring {
  position: absolute;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(246, 215, 131, 0.68);
  border-radius: 50%;
  box-shadow:
    0 0 0 18px rgba(216, 170, 67, 0.06),
    inset 0 0 34px rgba(216, 170, 67, 0.2),
    0 0 58px rgba(216, 170, 67, 0.24);
}

.reveal-ring::before,
.reveal-ring::after {
  content: "";
  position: absolute;
  inset: 28px;
  border: 1px dashed rgba(59, 157, 153, 0.5);
  border-radius: 50%;
  animation: spinSigil 5s linear infinite;
}

.reveal-ring::after {
  inset: 58px;
  border-style: solid;
  border-color: rgba(246, 215, 131, 0.56);
  animation-direction: reverse;
}

.reveal-text {
  position: relative;
  z-index: 1;
  color: var(--gold-bright);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  font-weight: 700;
  text-transform: uppercase;
}

#resultScreen.is-revealing .reading-reveal {
  display: grid;
  animation: revealCurtain 2s ease both;
}

#resultScreen.is-revealing .result-oracle,
#resultScreen.is-revealing .result-cards,
#resultScreen.is-revealing .reading-section,
#resultScreen.is-revealing .summary-box {
  animation: oracleRise 0.74s ease both;
}

#resultScreen.is-revealing .result-cards { animation-delay: 0.12s; }
#resultScreen.is-revealing .reading-section { animation-delay: 0.22s; }
#resultScreen.is-revealing .summary-box { animation-delay: 0.32s; }

@keyframes revealCurtain {
  0% { opacity: 0; clip-path: circle(0 at 50% 50%); }
  18% { opacity: 1; clip-path: circle(24% at 50% 50%); }
  64% { opacity: 1; clip-path: circle(84% at 50% 50%); }
  100% { opacity: 0; clip-path: circle(125% at 50% 50%); }
}

@keyframes oracleRise {
  from { opacity: 0; transform: translateY(18px) scale(0.98); filter: blur(5px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.result-oracle {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin: 0 0 20px;
  border: 1px solid rgba(216, 170, 67, 0.32);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 14% 50%, rgba(59, 157, 153, 0.14), transparent 8rem),
    linear-gradient(180deg, rgba(246, 215, 131, 0.07), rgba(255, 255, 255, 0.015));
  padding: 16px;
  overflow: hidden;
}

.result-oracle::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0 45%, rgba(246, 215, 131, 0.08) 50%, transparent 55% 100%);
  animation: shimmer 5s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { transform: translateX(-30%); opacity: 0; }
  45%, 55% { opacity: 1; }
  100% { transform: translateX(30%); }
}

.oracle-sigil {
  position: relative;
  width: 66px;
  height: 66px;
  border: 1px solid rgba(216, 170, 67, 0.62);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(216, 170, 67, 0.28), transparent 35%),
    radial-gradient(circle, transparent 48%, rgba(59, 157, 153, 0.18) 50%, transparent 54%);
}

.oracle-sigil::before,
.oracle-sigil::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid var(--gold-bright);
  transform: rotate(45deg);
}

.oracle-sigil::after {
  inset: 26px 12px;
  border-color: var(--teal);
}

.result-oracle > * {
  position: relative;
  z-index: 1;
}

.result-oracle h3 {
  color: var(--gold-bright);
}

.result-cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.result-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 0, rgba(216, 170, 67, 0.1), transparent 5rem),
    #0f0e0d;
  padding: 10px 8px 12px;
  text-align: center;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.result-card:hover,
.result-card:focus-visible,
.result-card.is-active {
  transform: translateY(-2px);
  border-color: rgba(216, 170, 67, 0.5);
}

.result-card.is-active {
  background:
    radial-gradient(circle at 50% 0, rgba(216, 170, 67, 0.2), transparent 5rem),
    #14110d;
  box-shadow: 0 0 0 1px rgba(246, 215, 131, 0.18), 0 16px 34px rgba(0, 0, 0, 0.28);
}

.result-card .tarot-card {
  width: 108px;
  height: 180px;
  margin: 8px auto 8px;
}

.result-card .tarot-face {
  width: 108px;
  height: 180px;
  padding: 9px;
}

.result-card .arcana-svg {
  width: 100%;
  height: 100%;
}

.result-card .card-art {
  height: 100%;
  min-height: 0;
}

.result-card .card-number {
  min-width: 22px;
  height: 19px;
  font-size: 0.52rem;
}

.result-card strong {
  display: block;
  min-height: 22px;
  color: var(--gold);
  font-size: 0.82rem;
  line-height: 1.25;
}

.reading-copy {
  display: block;
  margin-top: 18px;
}

.reading-section,
.summary-box {
  position: relative;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(216, 170, 67, 0.08), transparent 30%),
    rgba(255, 255, 255, 0.025);
  padding: 18px 18px 18px 62px;
}

.reading-number {
  position: absolute;
  top: 18px;
  left: 18px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(216, 170, 67, 0.55);
  border-radius: 50%;
  color: var(--gold-bright);
  font-family: Georgia, "Times New Roman", serif;
}

.reading-section p,
.summary-box p {
  margin: 8px 0 0;
  color: var(--muted);
}

.reading-section .guidance {
  color: #e2d5b7;
}

.reading-section strong,
.summary-box strong {
  color: var(--gold-bright);
}

.summary-box {
  margin-top: 18px;
  padding-left: 18px;
  background:
    radial-gradient(circle at 96% 0, rgba(142, 47, 69, 0.12), transparent 9rem),
    linear-gradient(180deg, rgba(216, 170, 67, 0.08), rgba(255, 255, 255, 0.025));
}

.overall-copy p:first-child {
  margin-top: 0;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.info-card {
  padding: 20px;
}

.info-card p {
  margin: 0;
  color: var(--muted);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 24px;
  width: min(760px, 100%);
  border: 1px solid rgba(246, 215, 131, 0.72);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 0 0, rgba(216, 170, 67, 0.13), transparent 12rem),
    var(--panel);
  box-shadow: var(--shadow);
  padding: 24px;
}

.modal-face-shell {
  display: grid;
  place-items: center;
}

.modal-face-shell .tarot-face,
.large-face {
  width: 180px;
  height: 300px;
}

.modal-face-shell .arcana-svg,
.large-face .arcana-svg {
  width: 100%;
  height: 100%;
}

.modal-face-shell .card-art,
.large-face .card-art {
  height: 100%;
  min-height: 0;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  color: var(--gold);
  background: #171411;
  font-size: 1.1rem;
  font-weight: 700;
}

#modalText {
  display: grid;
  gap: 12px;
  color: var(--muted);
}

.modal-guidance {
  display: block;
  border-left: 2px solid var(--gold);
  padding-left: 12px;
  color: #e2d5b7;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  display: none;
  max-width: 320px;
  border: 1px solid rgba(216, 170, 67, 0.72);
  border-radius: var(--radius);
  background: #11100e;
  color: var(--ink);
  padding: 12px 14px;
  box-shadow: var(--shadow);
}

.toast.is-active {
  display: block;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--quiet);
  padding: 24px 20px;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 767px) {
  .nav-wrap {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 10px 0;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .hero {
    padding-top: 22px;
  }

  .screen-head,
  .draw-stage,
  .modal-card {
    grid-template-columns: 1fr;
  }

  .screen-head {
    display: grid;
  }

  .reading-types,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .spread-orbit-wrap {
    width: min(420px, 100%);
  }

  .slot {
    width: 82px;
    min-height: 126px;
    padding: 6px;
  }

  .slot-1 { top: 1%; }
  .slot-2 { top: 8%; right: 2%; }
  .slot-3 { bottom: 8%; right: 2%; }
  .slot-4 { bottom: 1%; }
  .slot-5 { bottom: 8%; left: 2%; }
  .slot-6 { top: 8%; left: 2%; }

  .slot-position {
    min-height: 22px;
    font-size: 0.68rem;
  }

  .slot-keyword {
    font-size: 0.58rem;
  }

  .tarot-card,
  .tarot-face {
    width: 84px;
    height: 140px;
  }

  .card-art {
    height: 100%;
    min-height: 0;
  }

  .arcana-svg {
    width: 100%;
    height: 100%;
  }

  .card-number {
    top: 9px;
    left: 9px;
    min-width: 21px;
    height: 18px;
    font-size: 0.5rem;
  }

  .slot-empty {
    height: 72px;
  }

  .drawn-card-back {
    width: 52px;
    height: 86px;
  }

  .reading-orb {
    width: 88px;
    height: 88px;
    font-size: 0.76rem;
  }

  .deck {
    width: 132px;
    height: 202px;
  }

  .deck-card {
    width: 98px;
    height: 164px;
  }

  .result-oracle {
    grid-template-columns: 1fr;
  }

  .oracle-sigil {
    width: 54px;
    height: 54px;
  }

  .result-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-card .tarot-card {
    transform: none;
    margin-bottom: 8px;
  }

  .reading-section {
    padding: 54px 14px 16px;
  }

  .reading-number {
    top: 14px;
    left: 14px;
  }

  .modal-face-shell .tarot-face,
  .large-face {
    width: 140px;
    height: 230px;
  }

  .modal-face-shell .arcana-svg,
  .large-face .arcana-svg {
    width: 100%;
    height: 100%;
  }

  .modal-face-shell .card-art,
  .large-face .card-art {
    height: 100%;
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
