:root {
  --ink: #f7efe9;
  --muted: #cdbdca;
  --plum: #4b174f;
  --plum-deep: #180d1d;
  --wine: #7d3479;
  --violet: #9a5aa1;
  --gold: #c89048;
  --gold-light: #e8c080;
  --paper: #fff9f4;
  --paper-ink: #2e1a30;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--plum-deep); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 50% 8%, rgba(200,144,72,.18), transparent 30rem),
    radial-gradient(circle at 14% 66%, rgba(154,90,161,.28), transparent 34rem),
    radial-gradient(circle at 90% 84%, rgba(125,52,121,.22), transparent 30rem),
    linear-gradient(145deg, #160b1a 0%, #321537 52%, #190c1e 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .28;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
}

button, textarea { font: inherit; }

button { cursor: pointer; }

.shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 72px;
  position: relative;
}

.brand {
  display: grid;
  place-items: center;
  margin-bottom: clamp(22px, 4vw, 46px);
}

.brand img {
  display: block;
  width: clamp(112px, 12vw, 148px);
  height: auto;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(232,192,128,.32), 0 14px 40px rgba(0,0,0,.2);
}

.draw-view {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(340px, 1.08fr);
  align-items: center;
  gap: clamp(42px, 8vw, 110px);
  min-height: 650px;
}

.intro { max-width: 560px; }

.eyebrow {
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .24em;
  margin: 0 0 17px;
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

h1 {
  font-size: clamp(44px, 6.5vw, 78px);
  line-height: .99;
  letter-spacing: -.035em;
  margin: 0;
  text-wrap: balance;
}

.lede {
  max-width: 520px;
  color: var(--muted);
  font: 18px/1.75 Georgia, serif;
  margin: 26px 0 32px;
}

label {
  display: block;
  font-size: 14px;
  color: #eadfe8;
  margin: 0 0 9px;
}

label span, .privacy-note, .quiet-note { color: #a998a6; }

textarea {
  width: 100%;
  resize: vertical;
  color: var(--ink);
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(232,192,128,.24);
  border-radius: 15px;
  padding: 15px 16px;
  line-height: 1.55;
  outline: none;
}

textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,144,72,.12);
}

textarea::placeholder { color: #9d8c9a; }

.deck-stage {
  position: relative;
  display: grid;
  justify-items: center;
}

.glow {
  position: absolute;
  width: min(68vw, 520px);
  aspect-ratio: 1;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,144,72,.22), rgba(108,43,97,.06) 48%, transparent 70%);
  filter: blur(14px);
}

.card-stack {
  width: min(72vw, 320px);
  aspect-ratio: .7;
  position: relative;
  margin-bottom: 35px;
  filter: drop-shadow(0 28px 45px rgba(0,0,0,.42));
}

.stack-card, .oracle-back {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  border: 1px solid rgba(232,192,128,.65);
}

.stack-three { transform: rotate(7deg) translate(12px, 5px); background: #351438; }
.stack-two { transform: rotate(-5deg) translate(-9px, 4px); background: #5a2356; }

.oracle-back {
  padding: 13px;
  background:
    radial-gradient(circle at center, rgba(232,192,128,.16), transparent 44%),
    repeating-radial-gradient(circle at center, transparent 0 22px, rgba(200,144,72,.11) 23px 24px),
    linear-gradient(145deg, #60215f, #220d29 72%);
}

.back-frame {
  height: 100%;
  border: 1px solid rgba(232,192,128,.58);
  border-radius: 11px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.emblem-wrap {
  width: 68%;
  aspect-ratio: 1;
  padding: 8px;
  border-radius: 50%;
  background: #fff9f4;
  box-shadow: 0 0 0 1px rgba(232,192,128,.65), 0 14px 34px rgba(0,0,0,.28);
  overflow: hidden;
}

.emblem-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.back-name {
  font: 500 11px Georgia, serif;
  letter-spacing: .22em;
  color: var(--gold-light);
  padding-left: .22em;
}

.back-star { color: var(--gold); font-size: 18px; }

.primary-button, .secondary-button {
  border-radius: 999px;
  letter-spacing: .03em;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.primary-button {
  min-width: 210px;
  border: 1px solid var(--gold-light);
  color: #241127;
  background: linear-gradient(135deg, #efd39e, #c89048);
  padding: 15px 26px;
  font-weight: 680;
  box-shadow: 0 12px 32px rgba(200,144,72,.2);
}

.primary-button:hover, .secondary-button:hover { transform: translateY(-2px); }
.primary-button:focus-visible, .secondary-button:focus-visible, .text-button:focus-visible { outline: 3px solid #f4d9a7; outline-offset: 4px; }

.quiet-note { font-size: 13px; margin: 13px 0 0; }

.reading-view { animation: enter .75s ease both; }

.reading-top {
  display: flex;
  justify-content: space-between;
  min-height: 30px;
  margin-bottom: 26px;
}

.text-button {
  color: var(--gold-light);
  background: none;
  border: 0;
  padding: 4px 0;
}

.saved-note { color: var(--gold-light); margin: 4px 0; font-size: 13px; }

.reading-grid {
  display: grid;
  grid-template-columns: minmax(280px, 470px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(42px, 7vw, 90px);
}

.revealed-card {
  position: sticky;
  top: 24px;
  animation: reveal .85s cubic-bezier(.2,.8,.2,1) both;
  perspective: 1000px;
}

.revealed-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid rgba(232,192,128,.45);
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}

.reading { padding-top: 18px; }

.reading h2 {
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1;
  letter-spacing: -.025em;
  margin: 0 0 25px;
}

.invitation, .message-copy, #card-imagery {
  color: #d8cad5;
  font: 17px/1.75 Georgia, serif;
}

.invitation {
  padding: 19px 21px;
  border-left: 1px solid var(--gold);
  background: rgba(255,255,255,.035);
  margin-bottom: 26px;
}

.secondary-button {
  border: 1px solid rgba(232,192,128,.7);
  background: transparent;
  color: var(--gold-light);
  padding: 13px 22px;
}

.secondary-button.small { padding: 11px 18px; }

.guidance { animation: enter .55s ease both; }
.gold-rule { width: 54px; height: 1px; background: var(--gold); margin: 38px 0 26px; }
.guidance h3 { font-size: 27px; margin: 0 0 17px; }

.reading-section {
  margin: 0 0 30px;
  padding: 24px 26px;
  border: 1px solid rgba(232,192,128,.16);
  border-radius: 18px;
  background: rgba(255,255,255,.035);
}

.image-meaning {
  border-left: 3px solid var(--gold);
  background: linear-gradient(135deg, rgba(200,144,72,.11), rgba(255,255,255,.025));
}

.section-kicker {
  margin: 0 0 13px;
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
}

.message-copy p, #card-imagery { margin: 0 0 15px; }
.message-copy p:last-child, #card-imagery:last-child { margin-bottom: 0; }
.truth-kicker { margin-top: 36px; }

blockquote {
  margin: 0;
  padding: 0 0 0 22px;
  border-left: 1px solid var(--gold);
  color: var(--gold-light);
  font: italic 20px/1.6 Georgia, serif;
}

.reflection {
  margin-top: 45px;
  padding: clamp(24px, 4vw, 38px);
  color: var(--paper-ink);
  background: linear-gradient(155deg, #fffaf5, #efe2e8);
  border-radius: 22px;
  box-shadow: 0 22px 55px rgba(0,0,0,.2);
}

.reflection .eyebrow { color: #8c5e24; }
.reflection h3 { font-size: clamp(25px, 3vw, 34px); line-height: 1.25; }
.question-list {
  display: grid;
  gap: 13px;
  margin: 18px 0 0;
  padding-left: 22px;
  color: #49364a;
  font: 16px/1.55 Georgia, serif;
}
.question-list li::marker { color: #a36b28; }
.more-prompts { margin: 20px 0 0; }
.more-prompts summary {
  width: fit-content;
  color: #6a2c69;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  border-bottom: 1px solid rgba(106,44,105,.35);
}
.more-question-list { margin-bottom: 8px; }
.reflection label { color: #49364a; margin-top: 25px; }
.reflection textarea { color: #2e1a30; background: rgba(255,255,255,.67); border-color: rgba(74,23,79,.18); margin-bottom: 14px; }
.reflection textarea::placeholder { color: #877586; }
.reflection .secondary-button { color: #4a174f; border-color: rgba(74,23,79,.45); }
.privacy-note { font-size: 12px; margin: 10px 0 0; }
.self-map-bridge { margin-top: 34px; text-align: center; }
.bridge-rule {
  width: 56px;
  height: 1px;
  margin: 0 auto 25px;
  background: linear-gradient(90deg, transparent, #b77b32, transparent);
}
.bridge-label {
  margin: 0 0 8px;
  color: #8c5e24;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
}
.self-map-bridge h3 { margin: 0 0 12px; }
.bridge-copy {
  max-width: 560px;
  margin: 0 auto 22px;
  color: #5d495c;
  font: 16px/1.65 Georgia, serif;
}
.map-button {
  display: inline-block;
  text-decoration: none;
  color: #fff9f4;
  background: linear-gradient(135deg, #6b2869, #3e1746);
  border-color: #b77b32;
  box-shadow: 0 12px 30px rgba(74,23,79,.2);
}
.map-button:hover { transform: translateY(-2px); }
.map-button:focus-visible { outline: 3px solid #6b2869; outline-offset: 4px; }
.map-note { margin: 12px auto 0; color: #796778; font-size: 13px; line-height: 1.5; }
.draw-again-wrap { display: flex; justify-content: center; margin-top: 58px; }

@keyframes reveal {
  0% { opacity: 0; transform: translateY(22px) rotateY(20deg) scale(.96); }
  100% { opacity: 1; transform: none; }
}

@keyframes enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 790px) {
  .shell { width: min(100% - 24px, 620px); padding-top: 18px; }
  .brand { margin-bottom: 32px; }
  .draw-view { grid-template-columns: 1fr; gap: 46px; text-align: center; min-height: auto; }
  .intro { margin: 0 auto; }
  .intro label { text-align: left; }
  h1 { font-size: clamp(43px, 13vw, 62px); }
  .lede { font-size: 17px; }
  .card-stack { width: min(68vw, 280px); }
  .reading-grid { grid-template-columns: 1fr; gap: 38px; }
  .revealed-card { position: static; width: min(78vw, 390px); margin: 0 auto; }
  .reading { padding: 0 6px; }
  .reading h2 { font-size: clamp(40px, 12vw, 58px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
