:root {
  --ivory: #fbf7ee;
  --cream: #f3eadc;
  --sand: #d9c8ad;
  --rose: #d8b9b1;
  --lavender: #bdb1c7;
  --forest: #21473d;
  --forest-deep: #12352d;
  --gold: #b89254;
  --charcoal: #262421;
  --muted: #6d675f;
  --white: #fffdf8;
  --shadow: 0 24px 70px rgba(37, 45, 38, 0.14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--charcoal);
  background:
    radial-gradient(circle at 15% 0%, rgba(216,185,177,.34), transparent 32%),
    radial-gradient(circle at 90% 32%, rgba(189,177,199,.32), transparent 28%),
    var(--ivory);
  font-family: Inter, system-ui, sans-serif;
  overflow-x: hidden;
}

button, input { font: inherit; }
button { cursor: pointer; }

.ambient { position: fixed; border-radius: 50%; filter: blur(5px); opacity: .5; pointer-events: none; }
.ambient-one { width: 180px; height: 180px; background: rgba(216,185,177,.28); top: 26%; left: -80px; }
.ambient-two { width: 240px; height: 240px; background: rgba(189,177,199,.23); bottom: 8%; right: -110px; }

.brand-bar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 10px;
}

.brand { display: flex; align-items: center; gap: 11px; color: var(--forest-deep); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 37px; height: 37px; border: 1px solid rgba(184,146,84,.55); border-radius: 50%; color: var(--gold); }
.brand strong { display: block; font-family: "Cormorant Garamond", serif; font-size: 16px; letter-spacing: .13em; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.progress { width: min(190px, 28vw); height: 4px; overflow: hidden; background: rgba(33,71,61,.12); border-radius: 9px; }
.progress span { display: block; width: 10%; height: 100%; background: linear-gradient(90deg, var(--gold), var(--forest)); border-radius: inherit; transition: width .55s ease; }

main {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: min(980px, calc(100% - 32px));
  min-height: calc(100vh - 175px);
  margin: 0 auto;
  padding: 22px 0 46px;
}

.screen { width: 100%; animation: rise .55s ease both; }
.panel {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: clamp(30px, 6vw, 62px);
  text-align: center;
  background: rgba(255,253,248,.82);
  border: 1px solid rgba(184,146,84,.2);
  border-radius: 30px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.eyebrow { margin: 0 0 14px; color: var(--gold); font-size: 11px; font-weight: 600; letter-spacing: .19em; text-transform: uppercase; }
h1, h2, h3 { margin: 0; color: var(--forest-deep); font-family: "Cormorant Garamond", serif; }
h1 { font-size: clamp(45px, 8vw, 72px); line-height: .96; }
h2 { font-size: clamp(36px, 6vw, 52px); line-height: 1.03; }
h3 { font-size: 28px; }
.lead { max-width: 550px; margin: 19px auto 0; color: var(--muted); font-size: clamp(15px, 2.5vw, 17px); line-height: 1.7; }
.tiny { color: #857e73; font-size: 11px; line-height: 1.5; }

.primary, .secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .09em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.primary { color: var(--white); background: var(--forest); border: 1px solid var(--forest); box-shadow: 0 12px 28px rgba(33,71,61,.2); }
.secondary { color: var(--forest); background: transparent; border: 1px solid rgba(33,71,61,.34); }
.primary:hover, .secondary:hover { transform: translateY(-2px); }
.primary:focus-visible, .secondary:focus-visible, .choice:focus-visible, .tarot-card:focus-visible { outline: 3px solid rgba(184,146,84,.45); outline-offset: 4px; }
.primary:disabled { cursor: not-allowed; opacity: .36; transform: none; box-shadow: none; }
.button-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.intro-symbol { position: relative; display: grid; place-items: center; width: 116px; height: 116px; margin: 0 auto 24px; color: var(--gold); font-size: 37px; }
.intro-symbol::before, .intro-symbol::after { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(184,146,84,.38); border-radius: 50%; }
.intro-symbol::after { inset: 19px; border-style: dotted; }

.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; max-width: 580px; margin: 30px auto 0; }
.choices.moods { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice { min-height: 57px; padding: 13px 10px; color: #4f4a44; background: rgba(243,234,220,.58); border: 1px solid rgba(184,146,84,.2); border-radius: 15px; transition: all .2s ease; }
.choice:hover { border-color: rgba(33,71,61,.38); background: rgba(255,253,248,.95); }
.choice.selected { color: var(--white); background: var(--forest); border-color: var(--forest); box-shadow: 0 10px 24px rgba(33,71,61,.17); }

.shuffle-wrap { text-align: center; }
.shuffle-deck { position: relative; width: 120px; height: 205px; margin: 28px auto 32px; }
.shuffle-card { position: absolute; inset: 0; border: 5px solid var(--forest-deep); border-radius: 10px; background: var(--forest); box-shadow: 0 12px 30px rgba(18,53,45,.22); }
.shuffle-card::before { content: "✦"; position: absolute; inset: 9px; display: grid; place-items: center; color: var(--gold); font-size: 26px; border: 1px solid rgba(217,200,173,.65); border-radius: 5px; background: repeating-radial-gradient(circle at 50%, transparent 0 7px, rgba(184,146,84,.13) 8px 9px); }
.shuffle-card:nth-child(1) { animation: shuffleLeft 1s ease-in-out infinite; }
.shuffle-card:nth-child(2) { animation: shuffleRight 1s .12s ease-in-out infinite; }
.shuffle-card:nth-child(3) { animation: shuffleTilt 1s .22s ease-in-out infinite; }

.pick-screen { text-align: center; }
.pick-screen .lead { margin-top: 10px; }
.cards-row { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 3vw, 30px); margin: 34px auto 24px; }
.tarot-card { position: relative; width: min(27vw, 155px); aspect-ratio: 7 / 12; padding: 0; border: 0; border-radius: 11px; background: transparent; perspective: 1000px; transition: transform .25s ease, opacity .35s ease; }
.tarot-card:hover { transform: translateY(-9px) rotate(-1deg); }
.tarot-card:nth-child(2):hover { transform: translateY(-11px); }
.tarot-card:nth-child(3):hover { transform: translateY(-9px) rotate(1deg); }
.card-inner { position: absolute; inset: 0; transition: transform .8s cubic-bezier(.2,.7,.2,1); transform-style: preserve-3d; }
.tarot-card.revealed .card-inner { transform: rotateY(180deg); }
.card-face { position: absolute; inset: 0; overflow: hidden; border-radius: 11px; backface-visibility: hidden; box-shadow: 0 15px 35px rgba(18,53,45,.2); }
.card-back { border: 5px solid var(--forest-deep); background: var(--forest); }
.card-back::before { content: "✦"; position: absolute; inset: 8px; display: grid; place-items: center; color: var(--gold); font-size: clamp(21px, 5vw, 38px); border: 1px solid rgba(217,200,173,.72); border-radius: 5px; background: repeating-radial-gradient(circle at 50%, transparent 0 7px, rgba(184,146,84,.13) 8px 9px); }
.card-front { transform: rotateY(180deg); background: white; }
.card-front img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-front img.reversed { transform: rotate(180deg); }
.tarot-card.faded { pointer-events: none; opacity: 0; transform: scale(.84); }

.result-shell { display: grid; grid-template-columns: minmax(220px, 310px) 1fr; gap: 36px; align-items: start; width: min(900px, 100%); margin: 0 auto; padding: clamp(22px, 5vw, 48px); background: rgba(255,253,248,.88); border: 1px solid rgba(184,146,84,.22); border-radius: 30px; box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.result-card-wrap { position: sticky; top: 20px; text-align: center; }
.result-card { width: min(260px, 100%); margin: 0 auto; overflow: hidden; border: 7px solid var(--white); border-radius: 14px; background: white; box-shadow: 0 20px 45px rgba(18,53,45,.22); }
.result-card img { display: block; width: 100%; height: auto; }
.result-card img.reversed { transform: rotate(180deg); }
.card-title { margin-top: 18px; font-size: 34px; line-height: 1; }
.orientation { display: inline-block; margin-top: 9px; padding: 6px 11px; color: var(--forest); background: rgba(216,185,177,.3); border-radius: 999px; font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.reading { text-align: left; }
.reading-section { padding: 0 0 22px; margin-bottom: 22px; border-bottom: 1px solid rgba(184,146,84,.2); }
.reading-section:last-of-type { border-bottom: 0; }
.reading-label { display: block; margin-bottom: 8px; color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.reading-section p { margin: 0; color: #4f4a44; font-size: 15px; line-height: 1.72; }
.reading-section .answer { color: var(--forest-deep); font-family: "Cormorant Garamond", serif; font-size: 24px; font-weight: 600; line-height: 1.3; }
.action-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.action-list li { padding: 12px 14px; color: #4f4a44; background: rgba(243,234,220,.5); border-left: 3px solid var(--gold); border-radius: 0 12px 12px 0; font-size: 14px; line-height: 1.6; }
.action-list strong { color: var(--forest-deep); }
.crystal-box { position: relative; overflow: hidden; padding: 22px; background: linear-gradient(135deg, rgba(189,177,199,.25), rgba(216,185,177,.24)); border: 1px solid rgba(184,146,84,.24); border-radius: 20px; }
.crystal-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.crystal-symbol { display: grid; place-items: center; flex: 0 0 48px; height: 48px; color: var(--forest); background: rgba(255,253,248,.75); border: 1px solid rgba(184,146,84,.3); border-radius: 50%; font-size: 24px; }
.crystal-head h3 { font-size: 27px; }
.match { margin-left: auto; color: var(--forest); font-size: 11px; font-weight: 600; }
.crystal-box p { margin: 8px 0 0; color: #534e48; font-size: 13px; line-height: 1.65; }
.crystal-box strong { color: var(--forest-deep); }
.method-note { margin-top: 18px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.method-note summary { color: var(--forest); cursor: pointer; font-weight: 600; letter-spacing: .03em; }
.method-note p { margin: 9px 0 0; }
.result-actions { justify-content: flex-start; }

.error-card { width: min(560px, 100%); margin: 0 auto; padding: 42px; text-align: center; background: var(--white); border-radius: 24px; box-shadow: var(--shadow); }

footer { position: relative; z-index: 2; width: min(900px, calc(100% - 32px)); margin: 0 auto; padding: 0 0 28px; color: #8b8479; text-align: center; font-size: 9px; line-height: 1.6; }
footer p { margin: 3px 0; }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shuffleLeft { 0%,100% { transform: translateX(0) rotate(-4deg); } 50% { transform: translateX(-65px) rotate(-11deg); } }
@keyframes shuffleRight { 0%,100% { transform: translateX(0) rotate(3deg); } 50% { transform: translateX(66px) rotate(10deg); } }
@keyframes shuffleTilt { 0%,100% { transform: rotate(0); } 50% { transform: rotate(5deg) translateY(-5px); } }

@media (max-width: 700px) {
  .brand-bar { width: min(100% - 28px, 1120px); padding-top: 16px; }
  .brand small { display: none; }
  .progress { width: 85px; }
  main { width: min(100% - 22px, 980px); min-height: calc(100vh - 125px); padding-top: 8px; }
  .panel { padding: 34px 20px; border-radius: 24px; }
  .choices.moods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards-row { gap: 8px; margin-top: 28px; }
  .tarot-card { width: min(28.5vw, 150px); }
  .result-shell { grid-template-columns: 1fr; gap: 28px; padding: 24px 18px 30px; border-radius: 24px; }
  .result-card-wrap { position: static; }
  .result-card { width: 178px; }
  .card-title { font-size: 30px; }
  .reading { text-align: left; }
  .result-actions { justify-content: center; }
}

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