/* ReportProgressShell — shared loading shell (tarot / naming / birth) */

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.rps-shell .ic {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rps-shell .ic-sm {
  width: 14px;
  height: 14px;
}

.rps-shell {
  margin-top: var(--sp-6, 24px);
  padding: var(--sp-6, 24px);
  border: 1px solid var(--line-gold, rgba(222, 187, 112, .32));
  border-radius: var(--r-xl, 18px);
  background: rgba(10, 12, 24, .72);
  scroll-margin-top: 88px;
  animation: rpsSlideUp .32s var(--ease-out, cubic-bezier(.16, 1, .3, 1)) both;
}

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

.rps-shell[data-sticky="true"] {
  position: sticky;
  bottom: max(12px, env(safe-area-inset-bottom, 0px));
  z-index: 45;
  box-shadow: 0 18px 48px -24px rgba(0, 0, 0, .65);
}

.rps-head {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3, 12px);
  margin-bottom: var(--sp-5, 20px);
}

.rps-spinner {
  width: 26px;
  height: 26px;
  flex: none;
  margin-top: 2px;
  border-radius: 50%;
  border: 2px solid rgba(222, 187, 112, .22);
  border-top-color: var(--gold, #debb70);
  animation: rpsSpin 900ms linear infinite;
}

@keyframes rpsSpin { to { transform: rotate(360deg); } }

.rps-head-copy { flex: 1; min-width: 0; }

.rps-title {
  display: block;
  font-family: var(--display, 'Cormorant Garamond', serif);
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 600;
  color: var(--ink, #f1ebdd);
  line-height: 1.35;
  margin: 0 0 4px;
}

.rps-subtitle {
  display: block;
  font-family: var(--font-ui, 'Inter', sans-serif);
  font-size: 12.5px;
  color: var(--ink-muted, #8d84a3);
  line-height: 1.5;
  margin: 0;
}

.rps-elapsed {
  flex: none;
  margin-left: auto;
  font-family: var(--font-ui, 'Inter', sans-serif);
  font-size: 12px;
  color: var(--ink-muted, #8d84a3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rps-stages {
  display: grid;
  gap: var(--sp-2, 8px);
  margin: 0 0 var(--sp-5, 20px);
  padding: 0;
  list-style: none;
}

.rps-stage {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--sp-3, 12px);
  padding: var(--sp-2, 8px) 0;
  font-size: 13px;
  color: var(--ink-muted, #8d84a3);
}

.rps-stage > i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line-strong, rgba(241, 235, 221, .18));
  font-style: normal;
  font-size: 11px;
}

.rps-stage em {
  font-style: normal;
  font-size: 11px;
  color: var(--ink-faint, #5e5579);
}

.rps-stage em:empty {
  display: none;
}

.rps-stage[data-state="done"] { color: var(--ink-soft, #c7bdd8); }
.rps-stage[data-state="done"] > i {
  border-color: var(--line-gold, rgba(222, 187, 112, .32));
  color: var(--gold, #debb70);
}

.rps-stage[data-state="active"] { color: var(--gold, #debb70); }
.rps-stage[data-state="active"] > i {
  border-color: var(--gold, #debb70);
  background: rgba(222, 187, 112, .12);
}

.rps-stage-track {
  display: none;
  grid-column: 2 / -1;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  overflow: hidden;
}

.rps-stage[data-state="active"] .rps-stage-track {
  display: block;
}

.rps-stage-track > b {
  display: block;
  height: 100%;
  width: var(--p, 0%);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-deep, #a5822f), var(--gold, #debb70));
  transition: width .35s ease;
}

.rps-stage[data-state="active"] .rps-stage-track > b {
  animation: rpsProgressPulse 1.6s ease infinite;
}

@keyframes rpsProgressPulse {
  0%, 100% { opacity: .55; }
  50% { opacity: 1; }
}

.rps-slot { margin-top: var(--sp-2, 8px); }

.rps-stream-preview {
  min-height: 110px;
  max-height: 220px;
  overflow: auto;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong, rgba(241, 235, 221, .18));
  background: rgba(255, 255, 255, .045);
  font-family: var(--font-ui, 'Inter', sans-serif);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-soft, #c7bdd8);
  white-space: pre-wrap;
  word-break: break-word;
}

.rps-preview {
  margin: var(--sp-4, 16px) 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line, rgba(241, 235, 221, .12));
  background: rgba(255, 255, 255, .03);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-muted, #8d84a3);
}

.rps-preview b { color: var(--gold, #debb70); font-weight: 500; }

.rps-shell[data-product="naming"] .rps-stage > i svg,
.rps-shell[data-product="tarot"] .rps-stage > i svg {
  width: 14px;
  height: 14px;
}

.rps-shimmer-row {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.10), rgba(255,255,255,.04));
  background-size: 200% 100%;
  animation: rpsShimmer 1.4s ease infinite;
}

.rps-shimmer-row:nth-child(2) { width: 86%; }
.rps-shimmer-row:nth-child(3) { width: 64%; }

.rps-naming-candidates {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.rps-naming-candidate {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(222, 187, 112, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.rps-naming-candidate-name,
.rps-naming-candidate-meta {
  display: block;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.14), rgba(255,255,255,.06));
  background-size: 200% 100%;
  animation: rps-shimmer 1.4s ease-in-out infinite;
}

.rps-naming-candidate-name { width: 38%; height: 18px; }
.rps-naming-candidate-meta { width: 72%; }
.rps-naming-candidate:nth-child(2) .rps-naming-candidate-name { width: 44%; }
.rps-naming-candidate:nth-child(3) .rps-naming-candidate-name { width: 32%; }

@keyframes rpsShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.rps-tarot-slot {
  display: grid;
  gap: 16px;
}

.rps-tarot-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
  gap: 10px;
  max-width: 100%;
}

.rps-tarot-skeleton-grid[data-count="10"] {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.rps-tarot-skeleton-grid[data-count="7"],
.rps-tarot-skeleton-grid[data-count="8"],
.rps-tarot-skeleton-grid[data-count="9"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rps-tarot-skeleton-card {
  width: 100%;
  max-width: 72px;
  margin: 0 auto;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  border: 1px solid var(--line-strong, rgba(241, 235, 221, .18));
  background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.08), rgba(255,255,255,.04));
  background-size: 200% 100%;
  animation: rpsShimmer 1.4s ease infinite;
}

.rps-tarot-report-rows {
  display: grid;
  gap: 12px;
}

.rps-tarot-slot--text-only .rps-tarot-report-rows {
  margin-top: 2px;
}

.rps-tarot-report-block {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(222, 187, 112, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.rps-tarot-block-title {
  width: 42%;
  height: 16px;
}

.rps-tarot-report-block:nth-child(2) .rps-tarot-block-title { width: 36%; }
.rps-tarot-report-block:nth-child(3) .rps-tarot-block-title { width: 48%; }

.rps-tarot-report-block .rps-shimmer-row:nth-child(2) { width: 92%; }
.rps-tarot-report-block .rps-shimmer-row:nth-child(3) { width: 68%; }

@media (max-width: 640px) {
  .rps-tarot-skeleton-grid[data-count="10"],
  .rps-tarot-skeleton-grid[data-count="7"],
  .rps-tarot-skeleton-grid[data-count="8"],
  .rps-tarot-skeleton-grid[data-count="9"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.rps-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: var(--sp-4, 16px);
}

.rps-actions .btn { min-height: 40px; }

.rps-complete-cta {
  margin-top: var(--sp-4, 16px);
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line-gold, rgba(222, 187, 112, .32));
  background: rgba(222, 187, 112, .08);
}

.rps-shell[data-complete="true"] .rps-complete-cta { display: flex; }
.rps-shell[data-complete="true"] .rps-spinner { animation: none; border-color: var(--gold); }

/* Tarot loading — darker scrim so text stays readable over bright card art */
.tarot-draw-result {
  position: relative;
  isolation: isolate;
}

.tarot-draw-result:has(.rps-shell)::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 14, 0.68);
  pointer-events: none;
  z-index: 1;
}

.tarot-draw-result:has(.rps-shell) .rps-shell {
  position: relative;
  z-index: 2;
}

.tarot-report-progress-host {
  margin-top: var(--sp-4, 16px);
}

.rps-shell[data-product="tarot"] {
  background:
    linear-gradient(165deg, rgba(4, 6, 18, 0.97) 0%, rgba(2, 3, 12, 0.99) 58%, rgba(8, 10, 24, 0.98) 100%);
  border-color: rgba(222, 187, 112, 0.42);
  box-shadow:
    0 28px 72px -24px rgba(0, 0, 0, 0.82),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
}

.rps-shell[data-product="tarot"][data-sticky="true"] {
  box-shadow:
    0 -12px 48px rgba(0, 0, 0, 0.55),
    0 28px 72px -24px rgba(0, 0, 0, 0.82);
}

.rps-shell[data-product="tarot"] .rps-title {
  color: #f8f2e8;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}

.rps-shell[data-product="tarot"] .rps-subtitle,
.rps-shell[data-product="tarot"] .rps-elapsed {
  color: #b8afc8;
}

.rps-shell[data-product="tarot"] .rps-stage {
  color: #a39ab8;
}

.rps-shell[data-product="tarot"] .rps-stage[data-state="done"] {
  color: #d8d0e8;
}

.rps-shell[data-product="tarot"] .rps-stage[data-state="active"] {
  color: #e8c878;
}

.rps-shell[data-product="tarot"] .rps-tarot-report-block,
.rps-shell[data-product="tarot"] .rps-tarot-skeleton-card {
  border-color: rgba(222, 187, 112, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

.rps-shell[data-product="tarot"] .rps-shimmer-row {
  background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.14), rgba(255,255,255,.05));
}

/* Tarot draw page: revealed spread during generation */
.tarot-spread.is-reading {
  margin-top: 8px;
}

.tarot-spread.is-reading .tarot-real-card .card-img-wrap {
  animation: tarotCardReadingPulse 2.5s ease-in-out infinite;
}

@keyframes tarotCardReadingPulse {
  0%, 100% { box-shadow: 0 12px 28px -14px rgba(16, 20, 46, .55); }
  50% { box-shadow: 0 12px 28px -14px rgba(16, 20, 46, .55), 0 0 28px rgba(138, 103, 206, .35); }
}

.tarot-report-ready-banner {
  margin-bottom: 16px;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--line-gold, rgba(222, 187, 112, .32));
  background: linear-gradient(135deg, rgba(222,187,112,.10), rgba(138,103,206,.06));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.tarot-report-banner-slot,
.birth-report-banner-slot,
.naming-report-banner-slot {
  max-width: 840px;
  margin: 0 auto 24px;
  padding: 0 var(--sp-4, 16px);
}

.onboarding-v2 .birth-report-banner-slot,
.birth-simple-page .naming-report-banner-slot {
  margin-top: 12px;
}

.tarot-report-banner-slot .tarot-report-ready-banner {
  margin-bottom: 0;
}

.tarot-report-banner-slot[hidden] {
  display: none !important;
}

.tarot-report-ready-banner__copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.tarot-report-ready-banner__badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gold, #debb70);
  border: 1px solid rgba(222, 187, 112, .35);
  background: rgba(222, 187, 112, .08);
}

.tarot-report-ready-banner__note {
  margin: 0;
  font-size: 12px;
  color: var(--ink-soft, #c7bdd8);
  line-height: 1.45;
}

.astra-confirm-body {
  margin: 0;
  color: var(--ink-soft, #c7bdd8);
  font-size: 14px;
  line-height: 1.55;
}

.astra-confirm-foot {
  justify-content: flex-end;
}

.tarot-report-ready-banner p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-soft, #c7bdd8);
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  .rps-spinner { animation: none; border-top-color: var(--gold, #debb70); }
  .rps-shimmer-row,
  .rps-tarot-skeleton-card,
  .rps-tarot-report-block .rps-shimmer-row,
  .tarot-spread.is-reading .tarot-real-card .card-img-wrap {
    animation: none;
  }
  .rps-stage[data-state="active"] .rps-stage-track > b { animation: none; opacity: 1; }
  .rps-shell { animation: none; }
}
