@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=IM+Fell+English:ital@0;1&display=swap');

:root {
  --paper: #f5eddb;
  --paper-deep: #e8dcc2;
  --ink: #28271f;
  --muted: #756b57;
  --red: #8d382f;
  --gold: #a47b3c;
  --line: #cbbd9e;
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--ink); background:
    radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.7), transparent 55%),
    repeating-linear-gradient(0deg, rgba(110,83,42,.025) 0, rgba(110,83,42,.025) 1px, transparent 1px, transparent 4px),
    var(--paper);
  font-family: 'Cormorant Garamond', Georgia, serif;
}
.page-shell { width: min(100% - 32px, 1040px); margin: 0 auto; padding: 30px 0 24px; }
.masthead { text-align: center; padding: 6px 12px 28px; }
.sun-mark { color: var(--red); font-size: 28px; line-height: 1; margin-bottom: 9px; }
.eyebrow { margin: 0 0 8px; color: var(--red); font-size: 12px; letter-spacing: .19em; text-transform: uppercase; font-weight: 700; }
h1 { font-family: 'IM Fell English', Georgia, serif; font-size: clamp(42px, 7vw, 70px); font-weight: 400; letter-spacing: -.035em; margin: 0; line-height: .98; }
h1 em { color: var(--red); font-weight: 400; }
.intro { color: var(--muted); font-size: 20px; margin: 15px 0 20px; }
.ornament { color: var(--gold); display: flex; gap: 12px; align-items: center; justify-content: center; }
.ornament span { display: inline-block; width: 54px; height: 1px; background: var(--line); }
.reading { display: grid; grid-template-columns: minmax(220px, 340px) minmax(260px, 1fr); gap: clamp(28px, 6vw, 76px); align-items: center; max-width: 850px; margin: 0 auto; }
.card-stage { text-align: center; }
.tarot-frame { position: relative; width: min(100%, 300px); aspect-ratio: 2 / 3.45; margin: 0 auto; padding: 8px; background: #fff8e9; border: 1px solid var(--gold); box-shadow: 0 10px 24px rgba(54,39,19,.15), 0 0 0 4px var(--paper), 0 0 0 5px var(--line); }
.card-back, .card-image, .image-fallback { width: 100%; height: 100%; display: block; }
.card-back { padding: 9px; background: #7d302b; border: 2px solid #d4ad65; }
.back-inner { height: 100%; border: 1px solid #e3c67f; outline: 1px solid #e3c67f; outline-offset: -7px; position: relative; display: flex; align-items: center; justify-content: center; flex-direction: column; color: #f2dca5; text-align: center; background: repeating-linear-gradient(45deg, transparent 0 12px, rgba(242,220,165,.07) 12px 13px); }
.back-inner:before, .back-inner:after { content: "◇"; position: absolute; font-size: 42px; color: #d8b96e; }
.back-inner:before { top: 13%; } .back-inner:after { bottom: 13%; }
.back-star { font-size: 27px; }
.back-moon { font-size: 38px; margin: 8px 0; }
.back-copy { font-family: 'IM Fell English', Georgia, serif; font-size: 15px; letter-spacing: .12em; line-height: 1.6; }
.back-copy small { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 13px; letter-spacing: .04em; font-style: italic; }
.back-star.lower { margin-top: 10px; }
.card-image { object-fit: contain; background: #fff9e9; }
.hidden { display: none !important; }
.image-fallback { border: 2px solid #8d382f; background: #f4e6c8; color: #8d382f; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; align-items: center; text-align: center; }
.fallback-sun { font-size: 54px; margin-top: 30px; }
.fallback-name { font-family: 'IM Fell English', Georgia, serif; font-size: 24px; }
.fallback-suit { font-size: 38px; }
.orientation { margin: 15px 0 0; text-transform: uppercase; letter-spacing: .16em; font-size: 12px; color: var(--red); font-weight: 700; }
.reading-copy { max-width: 420px; }
.reading-copy h2 { font-family: 'IM Fell English', Georgia, serif; font-size: clamp(31px, 4vw, 44px); font-weight: 400; line-height: 1.06; margin: 8px 0 10px; }
.card-subtitle { color: var(--muted); font-size: 20px; line-height: 1.35; margin: 0 0 25px; }
.draw-button { cursor: pointer; border: 1px solid var(--red); background: var(--red); color: #fff5df; padding: 14px 22px; font: 700 12px 'Cormorant Garamond', Georgia, serif; letter-spacing: .15em; text-transform: uppercase; box-shadow: 4px 4px 0 var(--paper-deep); transition: transform .15s, box-shadow .15s, background .15s; }
.draw-button:hover { background: #702820; transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--paper-deep); }
.draw-button:focus-visible, .text-button:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.draw-button span { color: #e4c27d; padding: 0 5px; }
.small-note { max-width: 280px; color: var(--muted); font-size: 15px; line-height: 1.4; margin-top: 16px; }
.meaning-panel { max-width: 850px; margin: 44px auto 0; animation: reveal .45s ease both; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.meaning-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.meaning-card, .reflection-card { border: 1px solid var(--line); background: rgba(255,250,237,.55); padding: 22px 24px; }
.meaning-card h3, .reflection-card h3 { font-family: 'IM Fell English', Georgia, serif; font-weight: 400; font-size: 26px; margin: 0 0 8px; }
.meaning-card p:last-child, .reflection-card p:last-child { color: #4d473a; font-size: 18px; line-height: 1.5; margin: 0; }
.reflection-card { display: flex; gap: 18px; align-items: flex-start; margin-top: 16px; background: #e9ddc4; }
.reflection-icon { font-size: 30px; color: var(--red); padding-top: 4px; }
.disclaimer { color: var(--muted); font-size: 14px; font-style: italic; text-align: center; margin: 20px 0 10px; }
.text-button { display: block; margin: 0 auto; border: 0; background: transparent; color: var(--red); font: 700 14px 'Cormorant Garamond', Georgia, serif; cursor: pointer; padding: 10px; text-decoration: underline; text-underline-offset: 4px; }
footer { text-align: center; margin-top: 48px; color: var(--muted); font-size: 11px; letter-spacing: .15em; }
footer span { color: var(--red); padding: 0 6px; }
.footer-rule { width: 100px; height: 1px; background: var(--line); margin: 0 auto 17px; }
.credit { max-width: 600px; margin: 10px auto 0; font-size: 12px; letter-spacing: .02em; line-height: 1.4; }
@media (max-width: 650px) {
  .page-shell { width: min(100% - 28px, 460px); padding-top: 24px; }
  .masthead { padding-bottom: 24px; }
  .reading { grid-template-columns: 1fr; gap: 28px; }
  .tarot-frame { width: min(66vw, 250px); }
  .reading-copy { text-align: center; margin: 0 auto; }
  .card-subtitle { margin-bottom: 18px; }
  .small-note { margin-left: auto; margin-right: auto; }
  .meaning-panel { margin-top: 34px; }
  .meaning-grid { grid-template-columns: 1fr; }
  .meaning-card, .reflection-card { padding: 19px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
