/* five-card-tarot.html CSS [E] Stage 1: mode panel (General / Ask). JS: js/five-card-mode.js */

/* ==== E. STAGE 1: MODE PANEL — mode choice (General / Ask) ==== */
.reading-stage {
  position: relative;
  min-height: calc(100svh - var(--site-header-chrome));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 48px;
  text-align: center;
}

.mode-panel-desktop {
  display: none;
  position: relative;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 40px 20px 0;
}

.mode-panel-desktop .mode-hint {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: 0.02em;
  margin-bottom: 48px;
  text-align: center;
}

.mode-cards-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: min(4vw, 48px);
  min-height: 480px;
}

.mode-cards-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: min(6vw, 72px);
}

.mobile-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px 12px;
  font-size: 14px;
  position: relative;
  z-index: 90;
}

.mobile-breadcrumbs a { color: var(--text); }

.mode-side-decor {
  width: min(11vw, 158px);
  opacity: 0.9;
  transform: rotate(90deg);
  transition: opacity 0.5s;
}

.reading-stage.mode-picked .mode-side-decor {
  opacity: 0;
}

.mode-card {
  position: relative;
  width: min(22vw, 304px);
  height: min(34vw, 472px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border-radius: 20px;
  backdrop-filter: blur(8px);
  transform: rotate(-15deg);
  transition: transform 0.6s, opacity 0.5s, box-shadow 0.3s;
}

.mode-card .bg {
  position: absolute;
  inset: 16px;
  background: #19233a;
  border-radius: 4px;
  z-index: 0;
}

.mode-card.b { transform: rotate(15deg); }

.mode-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(-45deg, rgba(255,255,255,0.5), transparent, rgba(255,255,255,0.25), transparent, rgba(255,255,255,0.3));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.mode-card:hover::before,
.mode-card:focus-visible::before {
  background: linear-gradient(90deg, #c79bfe, #99fdfe) border-box;
}

.mode-card:hover,
.mode-card:focus-visible {
  transform: rotate(-15deg) scale(1.05);
}

.mode-card.b:hover,
.mode-card.b:focus-visible {
  transform: rotate(15deg) scale(1.05);
}

.mode-card .mode-shadow {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s;
}

.mode-card:hover .mode-shadow,
.mode-card:focus-visible .mode-shadow { opacity: 1; }

.mode-card .mode-shadow::before,
.mode-card .mode-shadow::after {
  content: "";
  position: absolute;
  left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.6;
}

.mode-card .mode-shadow::before {
  top: 25%;
  width: 130%;
  aspect-ratio: 1;
  background: radial-gradient(circle, #ba80ff, transparent 70%);
}

.mode-card .mode-shadow::after {
  top: 70%;
  width: 150%;
  aspect-ratio: 1;
  background: radial-gradient(circle, #26dbff, transparent 70%);
}

.mode-card .frame-slot {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.mode-card .frame-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.mode-card .type-name {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.6px;
  line-height: 1.25;
  width: calc(100% - 48px);
  z-index: 2;
  text-align: center;
}

@media (max-width: 767px) {
  .mode-card .type-name {
    font-size: clamp(22px, 6vw, 28px);
  }
}

.mode-card::before {
  z-index: 3;
}

.mode-panel-mobile .mode-cards-stack {
  position: relative;
  width: min(74vw, 274px);
  height: min(115vw, 425px);
  margin: 0 auto;
}

.mode-panel-mobile .mode-card {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none;
  display: none;
  transition: transform 0.55s cubic-bezier(0.3, 0, 0.14, 1), opacity 0.55s ease;
}

.mode-panel-mobile .mode-card.is-active {
  display: flex;
}

.mode-panel-mobile .mode-card.b {
  transform: none;
}

.mode-panel-mobile .mode-card:hover,
.mode-panel-mobile .mode-card:focus-visible,
.mode-panel-mobile .mode-card.b:hover,
.mode-panel-mobile .mode-card.b:focus-visible {
  transform: none;
}

.mode-panel-mobile {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 520px;
  gap: 20px;
  min-height: calc(100svh - var(--site-header-chrome));
  justify-content: center;
}

.mode-panel-mobile .mode-hint {
  font-family: var(--font-display);
  font-size: clamp(28px, 8vw, 36px);
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.mode-moon-divider {
  width: 48px;
  height: auto;
  margin: 0 auto 8px;
  opacity: 0.9;
}

.mode-indicators {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

.mode-indicator {
  width: 8px;
  height: 8px;
  border-radius: 8px;
  border: none;
  padding: 0;
  cursor: pointer;
  opacity: 0.6;
  transition: 0.3s;
}

.mode-indicator.active { opacity: 1; width: 24px; }
.mode-indicator:nth-child(1) { background: #ba80ff; }
.mode-indicator:nth-child(2) { background: #26dbff; }
