/* ============================================================
   The Starseed Mirror — The Soul Matrix design language
   Gold light on deep cosmic purple. Ceremonial, luminous.
   Dark immersive surfaces for art/browse; soft cream "scroll"
   surfaces for reading-heavy copy. No external fonts → fully
   offline / iframe-safe. (Self-hosted script/serif: Session 3.)
   ============================================================ */

:root {
  /* Brand colour (locked from the design language) */
  --purple: #4c0084;          /* deep royal purple — brand anchor */
  --purple-deep: #2c004e;     /* darker purple surface */
  --magenta: #830998;         /* magenta-violet — active/energetic */
  --gold: #d4af37;            /* metallic gold accent */
  --cosmic: #0a0a1a;          /* deep navy-black cosmic ground */

  /* Cosmic tints / derived */
  --cosmic-2: #130a26;        /* purple-tinted cosmic */
  --gold-soft: #f0d89a;
  --gold-deep: #a9821f;
  --gold-grad: linear-gradient(135deg, #f6e7a8 0%, #d4af37 52%, #a9821f 100%);
  --gold-glow: rgba(212, 175, 55, 0.32);
  --magenta-glow: rgba(131, 9, 152, 0.40);
  --purple-glow: rgba(120, 40, 200, 0.30);

  /* Ink on dark */
  --ink: #efeaf7;
  --ink-soft: #c5b8df;
  --ink-faint: #9385b4;

  /* Reading surface (cream scroll) */
  --cream: #f7f1e6;
  --cream-2: #efe6d4;
  --cream-border: rgba(76, 0, 132, 0.16);
  --ink-dark: #2a2140;        /* body copy on cream */
  --ink-dark-soft: #5a4f74;

  /* Type */
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Geometry */
  --card-aspect: 0.707;       /* √2 tarot proportion */
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --gap: clamp(12px, 2.5vw, 22px);
}

* { box-sizing: border-box; }
html, body { margin: 0; }

/* When embedded in an iframe (WordPress host), let the body collapse to its
   content so the host can size the iframe to fit — no 100vh floor. */
html.embedded body { min-height: 0; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  background-color: var(--cosmic);
  /* Cosmic ground: purple/magenta blooms + faint gold starfield */
  background-image:
    radial-gradient(125% 80% at 50% -15%, rgba(76, 0, 132, 0.55) 0%, rgba(44, 0, 78, 0.30) 38%, rgba(10, 10, 26, 0) 70%),
    radial-gradient(90% 60% at 85% 8%, var(--magenta-glow) 0%, rgba(10, 10, 26, 0) 55%),
    radial-gradient(1px 1px at 20% 30%, rgba(246, 231, 168, 0.7), rgba(10,10,26,0) 60%),
    radial-gradient(1px 1px at 70% 20%, rgba(255, 255, 255, 0.55), rgba(10,10,26,0) 60%),
    radial-gradient(1.4px 1.4px at 40% 70%, rgba(246, 231, 168, 0.55), rgba(10,10,26,0) 60%),
    radial-gradient(1px 1px at 88% 55%, rgba(255, 255, 255, 0.45), rgba(10,10,26,0) 60%),
    radial-gradient(1px 1px at 12% 85%, rgba(246, 231, 168, 0.5), rgba(10,10,26,0) 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Header / footer ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(10, 10, 26, 0.92), rgba(10, 10, 26, 0.45));
  border-bottom: 1px solid var(--gold-glow);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.85rem clamp(14px, 4vw, 28px);
  text-decoration: none;
}
.brand-mark { color: var(--gold); font-size: 1.1rem; text-shadow: 0 0 14px var(--gold-glow); }
.brand-name {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 3.6vw, 1.45rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.app-footer {
  margin-top: auto;
  border-top: 1px solid var(--gold-glow);
  padding: 1.4rem;
  text-align: center;
}
.app-footer p { margin: 0; color: var(--ink-faint); font-size: 0.78rem; letter-spacing: 0.04em; }

/* ---------- View container ---------- */
#view {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 44px) clamp(14px, 4vw, 28px);
  flex: 1;
}

.view-title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.015em;
  line-height: 1.12;
  margin: 0 0 0.2em;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.7rem;
  color: var(--gold);
  margin: 0 0 0.6rem;
}

/* ---------- Controls: deep-purple fill, gold text, soft glow ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--gold-soft);
  background: linear-gradient(180deg, rgba(76, 0, 132, 0.95), rgba(44, 0, 78, 0.95));
  border: 1px solid var(--gold-glow);
  border-radius: 999px;
  padding: 0.7rem 1.4rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 26px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(212, 175, 55, 0.08);
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.btn:hover {
  transform: translateY(-1px);
  border-color: var(--gold);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 22px var(--gold-glow);
}
.btn:active { transform: translateY(0); }

.link-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 1.4rem;
  transition: color 0.2s ease;
}
.link-back:hover { color: var(--gold-soft); }

/* ============================================================
   Library view
   ============================================================ */
.library-intro { text-align: center; margin: 0 auto 2.6rem; max-width: 640px; }
.library-intro h1 {
  font-size: clamp(2.1rem, 7vw, 3.1rem);
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.library-intro p { color: var(--ink-soft); margin: 0.5rem 0 0; }

/* Decks stack as full-width "banners": cover art on a dark cosmic
   surround (left) beside the description on a cream scroll (right) —
   the same art↔scroll pairing as the card detail view. */
.deck-shelf {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(22px, 4vw, 40px);
  max-width: 920px;
  margin: 0 auto;
}

.deck-card {
  display: grid;
  gap: clamp(18px, 3.5vw, 40px);
  grid-template-columns: 1fr;
  align-items: start;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius);
  transition: transform 0.3s ease;
}
@media (min-width: 620px) {
  .deck-card { grid-template-columns: minmax(190px, 280px) 1fr; }
}
.deck-card:hover { transform: translateY(-4px); }

/* Cover art — mirrors .detail-art (gold-glow on cosmic) */
.deck-cover {
  aspect-ratio: var(--card-aspect);
  width: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--gold-glow);
  background: var(--cosmic-2);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.6),
    0 0 0 1px var(--gold-glow),
    0 0 60px var(--purple-glow);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.deck-card:hover .deck-cover {
  border-color: var(--gold);
  box-shadow:
    0 28px 66px rgba(0, 0, 0, 0.62),
    0 0 0 1px var(--gold-glow),
    0 0 72px var(--purple-glow);
}

/* Description on a cream "scroll" — mirrors .detail-text */
.deck-body {
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%);
  color: var(--ink-dark);
  border: 1px solid var(--cream-border);
  border-radius: var(--radius);
  padding: clamp(20px, 3.5vw, 34px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}
.deck-body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4.5vw, 2.2rem);
  margin: 0 0 0.25rem;
  color: var(--purple);
}
.deck-meta { color: var(--gold-deep); font-size: 0.84rem; letter-spacing: 0.02em; margin: 0 0 1.3rem; }
.deck-author { color: var(--magenta); font-weight: 600; }
.deck-desc { margin: 0 0 1.6rem; }
.deck-desc p { color: var(--ink-dark); font-size: 0.95rem; line-height: 1.65; margin: 0 0 0.9rem; }
.deck-desc p:last-child { margin-bottom: 0; }

/* ============================================================
   Gallery view
   ============================================================ */
.gallery-head { margin-bottom: 1.9rem; }
.gallery-head h1 {
  font-size: clamp(1.8rem, 5.5vw, 2.6rem);
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gallery-head .deck-meta { margin-top: 0.35rem; }
.gallery-guide {
  max-width: 620px;
  margin: 0.7rem 0 0;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.55;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--gap);
}
@media (min-width: 700px) {
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
}

.tile {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--cosmic-2);
  border: 1px solid var(--cream-border);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.tile:hover, .tile:focus-visible {
  transform: translateY(-5px);
  border-color: var(--gold);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.55), 0 0 22px var(--gold-glow);
  outline: none;
}
.tile-img-wrap {
  aspect-ratio: var(--card-aspect);
  background: radial-gradient(80% 60% at 50% 0%, var(--purple-deep), var(--cosmic));
  position: relative;
}
.tile-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-caption {
  padding: 0.55rem 0.65rem 0.7rem;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}
.tile-num { color: var(--gold); font-size: 0.72rem; font-variant-numeric: tabular-nums; }
.tile-name { font-family: var(--font-display); font-size: 0.92rem; line-height: 1.2; color: var(--ink); }

/* ============================================================
   Card detail view
   Art on dark cosmic surround (gold glow); reading copy on a
   soft cream scroll for legibility.
   ============================================================ */
.detail {
  display: grid;
  gap: clamp(20px, 4vw, 44px);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 860px) {
  .detail { grid-template-columns: minmax(280px, 380px) 1fr; }
  .detail-art-col { position: sticky; top: 84px; }
}

.detail-art {
  width: 100%;
  aspect-ratio: var(--card-aspect);
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--gold-glow);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.6),
    0 0 0 1px var(--gold-glow),
    0 0 60px var(--purple-glow);
  background: var(--cosmic-2);
}

/* The reading scroll */
.detail-text {
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%);
  color: var(--ink-dark);
  border: 1px solid var(--cream-border);
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 38px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

.detail-header { margin: 0 0 1.6rem; }
.detail-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  color: var(--purple);
  margin: 0.15rem 0 0;
}
.detail-number {
  color: var(--gold-deep);
  letter-spacing: 0.2em;
  font-size: 0.78rem;
  font-weight: 600;
}

/* Meaning sections (on cream) */
.section { margin: 0 0 1.9rem; }
.section-label {
  display: inline-block;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--purple);
  margin: 0 0 0.7rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--gold);
}
.section p { margin: 0 0 0.9rem; color: var(--ink-dark); }
.section p:last-child { margin-bottom: 0; }

.quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--magenta);
  border-left: 3px solid var(--gold);
  padding: 0.2rem 0 0.2rem 1.1rem;
  margin: 0 0 1.4rem;
}

.affirmation {
  background: linear-gradient(135deg, rgba(76, 0, 132, 0.08), rgba(131, 9, 152, 0.06));
  border: 1px solid var(--cream-border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  margin: 0 0 1.9rem;
}
.affirmation .section-label { border: none; padding: 0; margin-bottom: 0.4rem; color: var(--gold-deep); }
.affirmation p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.12rem;
  color: var(--purple);
  margin: 0;
}

/* Prayer — a ceremonial dark inset within the reading scroll */
.prayer {
  background:
    radial-gradient(120% 120% at 0% 0%, var(--magenta-glow), rgba(10,10,26,0) 60%),
    linear-gradient(160deg, var(--purple-deep), var(--cosmic));
  color: var(--ink);
  border: 1px solid var(--gold-glow);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  margin: 2.2rem 0 0;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.35);
}
.prayer .section-label { color: var(--gold-soft); border: none; padding: 0; }
.prayer p { font-family: var(--font-display); font-size: 1.06rem; line-height: 1.75; color: var(--ink); }

/* Detail footer nav (sits on the cream scroll) */
.detail-nav {
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--cream-border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
}
.detail-nav .link-back { color: var(--purple); margin: 0; }
.detail-nav .link-back:hover { color: var(--magenta); }

/* ============================================================
   Intention view — the start of the reading ritual.
   Immersive cosmic dark; the moment should breathe.
   ============================================================ */
.intention-head { text-align: center; max-width: 640px; margin: 0 auto 2.2rem; }
.intention-head .link-back { display: inline-flex; margin-bottom: 1.6rem; }
.intention-title {
  font-size: clamp(2rem, 6.5vw, 3rem);
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.intention-lead { color: var(--ink-soft); margin: 0.9rem auto 0; max-width: 600px; }
.intention-lead em { font-style: italic; color: var(--gold-soft); }

/* Pre-draw centring reminders — gold-numbered steps on cosmic-purple */
.ritual-steps {
  list-style: none;
  margin: 0 auto 2.6rem;
  padding: 0;
  max-width: 760px;
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
  text-align: left;
}
@media (min-width: 640px) { .ritual-steps { grid-template-columns: repeat(3, 1fr); } }
.ritual-step {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  background: linear-gradient(180deg, rgba(58, 32, 95, 0.72), rgba(34, 20, 60, 0.72));
  border: 1px solid var(--cream-border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.ritual-step-no {
  flex: none;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--cosmic);
  background: var(--gold-grad);
  border-radius: 999px;
  box-shadow: 0 0 16px var(--gold-glow);
}
.ritual-step-title {
  font-family: var(--font-display);
  font-size: 1.12rem;
  color: var(--gold-soft);
  margin: 0.1rem 0 0.3rem;
}
.ritual-step-text { color: var(--ink-soft); font-size: 0.86rem; line-height: 1.5; margin: 0; }

.intention-question {
  max-width: 560px;
  margin: 0 auto 2.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.intention-question label {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.intention-question .optional {
  color: var(--ink-faint);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-left: 0.35rem;
}
.intention-question textarea {
  width: 100%;
  resize: vertical;
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--ink);
  background: rgba(10, 10, 26, 0.55);
  border: 1px solid var(--gold-glow);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.intention-question textarea::placeholder { color: var(--ink-faint); font-style: italic; }
.intention-question textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 22px var(--gold-glow);
}

.picker-label {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  color: var(--gold);
  margin: 0 0 1rem;
}
.spread-picker {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
  max-width: 920px;
  margin: 0 auto;
}
@media (min-width: 720px) { .spread-picker { grid-template-columns: repeat(3, 1fr); } }

.spread-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(180deg, rgba(58, 32, 95, 0.72), rgba(34, 20, 60, 0.72));
  border: 1px solid var(--cream-border);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem 1.35rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.spread-tile:hover { transform: translateY(-3px); border-color: var(--gold-glow); }
.spread-tile[aria-checked="true"] {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold-glow), 0 12px 34px rgba(0, 0, 0, 0.45), 0 0 30px var(--gold-glow);
  background: linear-gradient(180deg, rgba(76, 0, 132, 0.55), rgba(44, 0, 78, 0.6));
}
.spread-tile:focus-visible { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-glow); }
.spread-pips { color: var(--gold); letter-spacing: 0.25em; text-shadow: 0 0 12px var(--gold-glow); }
.spread-name { font-family: var(--font-display); font-size: 1.3rem; color: var(--gold-soft); }
.spread-blurb { color: var(--ink-soft); font-size: 0.86rem; line-height: 1.5; }
.spread-positions {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  color: var(--ink-faint);
  font-size: 0.8rem;
  line-height: 1.5;
}
.spread-positions li { margin: 0.1rem 0; }
.spread-positions li::marker { color: var(--gold); }

.intention-actions {
  margin: 2.4rem auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.btn-draw { font-size: 1.05rem; padding: 0.9rem 2.2rem; }
.btn-draw:disabled { opacity: 0.6; cursor: default; }
.link-browse {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.86rem;
  transition: color 0.2s ease;
}
.link-browse:hover { color: var(--gold-soft); }

/* ============================================================
   Reading view — the draw/reveal. Cosmic dark; card art is hero.
   ============================================================ */
.reading-head { text-align: center; max-width: 640px; margin: 0 auto 2.2rem; }
.reading-head .link-back { display: inline-flex; margin-bottom: 1.4rem; }
.reading-title {
  font-size: clamp(1.8rem, 5.5vw, 2.6rem);
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.reading-question {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--gold-soft);
  margin: 0.6rem 0 0;
}
.reading-hint { color: var(--ink-faint); font-size: 0.84rem; margin: 0.5rem 0 0; }

.spread {
  display: grid;
  gap: clamp(16px, 3vw, 30px);
  grid-template-columns: 1fr;
  justify-items: center;
  max-width: 880px;
  margin: 0 auto;
}
@media (min-width: 640px) {
  .spread-2 { grid-template-columns: repeat(2, 1fr); }
  .spread-3 { grid-template-columns: repeat(3, 1fr); }
}
.spread-1 { max-width: 300px; }

.seat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  max-width: 280px;
}
.seat-label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
  text-align: center;
}

/* The flippable card */
.flip {
  width: 100%;
  aspect-ratio: var(--card-aspect);
  perspective: 1200px;
  cursor: pointer;
  border-radius: var(--radius);
}
.flip:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  transform-style: preserve-3d;
}
.seat.revealed .flip-inner { transform: rotateY(180deg); }
.flip-face {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: var(--radius);
  overflow: hidden;
}
.flip-back {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(70% 50% at 50% 30%, var(--magenta-glow), rgba(10, 10, 26, 0) 70%),
    linear-gradient(160deg, var(--purple-deep), var(--cosmic));
  border: 1px solid var(--gold-glow);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.4), 0 14px 40px rgba(0, 0, 0, 0.5);
}
.card-back-mark {
  color: var(--gold);
  font-size: 2.4rem;
  text-shadow: 0 0 20px var(--gold-glow);
  opacity: 0.85;
}
.flip-front {
  transform: rotateY(180deg);
  background: var(--cosmic-2);
  border: 1px solid var(--gold-glow);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55), 0 0 40px var(--purple-glow);
}
.flip-front img { width: 100%; height: 100%; object-fit: cover; display: block; }

.seat-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.5s ease 0.45s, transform 0.5s ease 0.45s;
}
.seat.revealed .seat-foot { opacity: 1; transform: none; pointer-events: auto; }
.seat-name {
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: var(--gold-soft);
  text-align: center;
}
.btn-read { padding: 0.5rem 1.1rem; font-size: 0.84rem; }

.reading-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin: 2.6rem auto 0;
}
.btn-ghost {
  background: rgba(10, 10, 26, 0.45);
  font-weight: 600;
  font-size: 0.86rem;
  padding: 0.6rem 1.2rem;
}

/* Position label on the reading-scoped card detail */
.detail-position {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--magenta);
  margin-bottom: 0.4rem;
}
.detail-position-meaning {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-dark-soft);
  margin: 0.5rem 0 0;
}
.detail-nav-label {
  width: 100%;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gold-deep);
  margin-bottom: 0.3rem;
}

/* ---------- States ---------- */
.state { text-align: center; padding: 4rem 1rem; color: var(--ink-soft); }
.state.error { color: #f0b6c2; }
.spinner {
  width: 34px; height: 34px;
  margin: 0 auto 1rem;
  border: 3px solid rgba(212, 175, 55, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition: none !important; }
}
