/* Oráculo Gitano Ruso — deck-pick con cartas CSS (sin imágenes individuales).
   Las cartas tienen un dorso bizantino rojo/oro y la cara revelada se renderiza con texto + número. */

.gr-page { color: #f5ecd2; }
.gr-header { text-align: center; margin-bottom: 1.4rem; }
.gr-header h1 {
  font-family: 'Cinzel', 'Times New Roman', serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: #ffd9a8;
  text-shadow: 0 0 16px rgba(255,217,168,0.55);
  margin: 0 0 .6rem;
}
.gr-intro {
  max-width: 60ch;
  margin: 0 auto;
  color: rgba(245,236,210,0.85);
  line-height: 1.55;
}

.gr-app {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* ---------- Stage ---------- */
.gr-stage { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 1.4rem; }

.gr-instruction {
  text-align: center;
  margin: 0;
  color: rgba(245,236,210,0.85);
  font-size: 1rem;
}

.gr-deck {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  flex-wrap: wrap;
  padding-top: 14px;
}
.gr-card {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  width: 76px;
  height: 120px;
  position: relative;
  transition: transform .25s ease, opacity .25s ease;
  transform: rotate(calc(-9deg + 3deg * var(--i, 0)));
}
.gr-card:hover:not([disabled]) { transform: rotate(calc(-9deg + 3deg * var(--i, 0))) translateY(-8px); }
.gr-card[disabled] { cursor: not-allowed; opacity: 0.35; pointer-events: none; }

.gr-card-back {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,235,180,0.32), transparent 55%),
    repeating-linear-gradient(45deg, rgba(255,235,180,0.07) 0 4px, transparent 4px 8px),
    radial-gradient(circle at 50% 50%, rgba(200,40,40,0.4) 0%, transparent 70%),
    linear-gradient(160deg, #5a1018 0%, #7a2018 50%, #2a0608 100%);
  border: 2px solid rgba(255,217,168,0.6);
  box-shadow:
    inset 0 0 0 3px rgba(60,8,12,0.55),
    inset 0 0 0 4px rgba(255,217,168,0.4),
    0 12px 22px rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gr-card-back-glyph {
  font-size: 2.2rem;
  color: #ffd9a8;
  text-shadow: 0 0 12px rgba(255,217,168,0.85), 0 2px 0 rgba(60,8,12,0.55);
}
.gr-card.is-picked {
  animation: gr-fly .35s ease-in forwards;
  pointer-events: none;
}
@keyframes gr-fly {
  to { transform: translateY(-30px) scale(.85); opacity: 0; }
}

/* ---------- Result ---------- */
.gr-result {
  width: 100%;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
  background: linear-gradient(160deg, rgba(60,12,16,0.6), rgba(20,4,8,0.45));
  border: 1px solid rgba(255,217,168,0.4);
  border-radius: 16px;
  padding: 1.4rem 1.2rem;
  box-shadow: 0 14px 28px rgba(0,0,0,0.5);
  animation: gr-reveal .55s ease-out;
}
@keyframes gr-reveal {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Card face rendered with CSS (no image) */
.gr-result-card {
  position: relative;
  aspect-ratio: 5 / 8;
  padding: 1.2rem .9rem;
  border-radius: 12px;
  background:
    radial-gradient(circle at 28% 20%, rgba(255,255,255,0.18), transparent 60%),
    repeating-linear-gradient(45deg, rgba(255,217,168,0.05) 0 6px, transparent 6px 14px),
    linear-gradient(160deg, #ffd88a 0%, #c89432 50%, #6a4818 100%);
  border: 2px solid #5a3a08;
  box-shadow:
    inset 0 0 0 4px rgba(255,255,255,0.4),
    inset 0 0 0 5px rgba(90,58,8,0.45),
    0 14px 24px rgba(0,0,0,0.6);
  color: #2a1408;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  overflow: hidden;
}
.gr-result-arrow {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 1.8rem;
  font-weight: 700;
  color: #5a3a08;
  text-shadow: 0 1px 0 rgba(255,255,255,0.45);
  line-height: 1;
}
.gr-result-num {
  position: absolute;
  top: 10px;
  left: 12px;
  font-family: 'Cinzel', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #5a3a08;
  line-height: 1;
}
.gr-result-name {
  font-family: 'Cinzel', 'Times New Roman', serif;
  font-size: 1.3rem;
  margin: 0;
  color: #2a1408;
  letter-spacing: .03em;
  padding: 0 .2rem;
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
}
.gr-result-period {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(60,30,8,0.7);
  margin: 0;
}
.gr-result-symbol {
  font-size: .9rem;
  font-style: italic;
  color: rgba(60,30,8,0.85);
  margin: .3rem 0 0;
  line-height: 1.3;
}

/* Right side: body text */
.gr-result-body h3 {
  font-family: 'Cinzel', serif;
  font-size: .95rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #ffd9a8;
  margin: 0 0 .4rem;
}
.gr-result-body h3 + p { margin: 0 0 1.1rem; }
.gr-result-meaning {
  color: #ffe8c0;
  font-size: 1.1rem;
  line-height: 1.5;
  font-weight: 500;
}
.gr-result-summary {
  color: rgba(245,236,210,0.85);
  line-height: 1.55;
}
.gr-restart {
  font-family: 'Cinzel', serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.gr-error {
  color: #ff9999;
  text-align: center;
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .gr-card.is-picked,
  .gr-result { animation: none; }
  .gr-card.is-picked { opacity: 0; transform: none; }
}

@media (max-width: 620px) {
  .gr-result {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .gr-result-card { max-width: 200px; margin: 0 auto; }
  .gr-card { width: 56px; height: 90px; }
}
