/* ============================================================
   V3.3.0 Theme pool presentation + dream bloom summon
   ============================================================ */

:root {
  --dream-night: #0a1024;
  --dream-mist: #6b5b95;
  --dream-pool: #1a3a5c;
  --dream-moon: #e8eef8;
  --dream-petal: #d4c4e8;
  --dream-gold: #e6d5a8;
  --dream-omen-n: var(--rarity-n);
  --dream-omen-r: var(--rarity-r);
  --dream-omen-sr: var(--rarity-sr);
  --dream-omen-ssr: var(--rarity-ssr);
  --dream-omen-ur: var(--rarity-ur);
}

/* --- Themed gacha panel --- */
.gacha-panel[data-pool-theme='eternal_slumber_bloom'] {
  position: relative;
  overflow: hidden;
  border-color: rgba(180, 170, 220, 0.28);
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(90, 70, 140, 0.35), transparent 55%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(20, 50, 80, 0.45), transparent 60%),
    linear-gradient(180deg, #0c1228 0%, #10182f 45%, #0a1422 100%);
}

.gacha-panel[data-pool-theme='eternal_slumber_bloom'] .gacha-pool {
  display: none;
}

.gacha-theme-stage {
  position: relative;
  margin: 0 0 1rem;
  padding: 0.75rem 0 0.25rem;
  z-index: 1;
}

.gacha-theme-stage__atmosphere {
  pointer-events: none;
  position: absolute;
  inset: -1rem -1.25rem auto;
  height: 14rem;
  z-index: 0;
  overflow: hidden;
}

.gacha-theme-stage__mist,
.gacha-theme-stage__pool,
.gacha-theme-stage__petals,
.gacha-theme-stage__dust,
.gacha-theme-stage__arch,
.gacha-theme-stage__moon {
  position: absolute;
  inset: 0;
}

.gacha-theme-stage__mist {
  background: radial-gradient(ellipse at 30% 40%, rgba(107, 91, 149, 0.35), transparent 55%),
    radial-gradient(ellipse at 70% 30%, rgba(80, 100, 160, 0.25), transparent 50%);
}

.gacha-theme-stage__pool {
  top: 55%;
  height: 45%;
  background: linear-gradient(180deg, transparent, rgba(26, 58, 92, 0.45));
  border-radius: 50% 50% 0 0 / 20% 20% 0 0;
}

.gacha-theme-stage__moon {
  width: 3.5rem;
  height: 3.5rem;
  top: 0.5rem;
  right: 1.25rem;
  left: auto;
  bottom: auto;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--dream-moon), rgba(232, 238, 248, 0.2));
  opacity: 0.55;
  box-shadow: 0 0 24px rgba(232, 238, 248, 0.25);
}

.gacha-theme-stage__arch {
  top: 10%;
  left: 50%;
  width: 8rem;
  height: 4.5rem;
  transform: translateX(-50%);
  border: 1px solid rgba(212, 196, 232, 0.18);
  border-bottom: none;
  border-radius: 8rem 8rem 0 0;
  opacity: 0.35;
  filter: blur(0.3px);
}

.gacha-theme-stage__petals::before,
.gacha-theme-stage__petals::after,
.gacha-theme-stage__dust::before {
  content: '';
  position: absolute;
  width: 0.45rem;
  height: 0.7rem;
  border-radius: 60% 40% 60% 40%;
  background: var(--dream-petal);
  opacity: 0.35;
  animation: dreamPetalDrift 9s ease-in-out infinite;
}

.gacha-theme-stage__petals::before { left: 18%; top: 30%; }
.gacha-theme-stage__petals::after { left: 72%; top: 22%; animation-delay: -3s; width: 0.35rem; height: 0.55rem; }
.gacha-theme-stage__dust::before {
  width: 0.2rem;
  height: 0.2rem;
  border-radius: 50%;
  left: 45%;
  top: 18%;
  background: var(--dream-moon);
  animation-duration: 7s;
}

@keyframes dreamPetalDrift {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.25; }
  50% { transform: translateY(18px) rotate(18deg); opacity: 0.45; }
}

.gacha-theme-stage__badge,
.gacha-theme-stage__name,
.gacha-theme-stage__eyebrow,
.gacha-theme-stage__tagline,
.gacha-theme-stage__heroes,
.gacha-theme-stage__meta,
.gacha-theme-details-btn,
.gacha-theme-details {
  position: relative;
  z-index: 1;
}

.gacha-theme-stage__badge {
  display: inline-block;
  margin: 0 0 0.35rem;
  padding: 0.15rem 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--dream-moon);
  border: 1px solid rgba(232, 238, 248, 0.28);
  border-radius: 999px;
  background: rgba(20, 28, 52, 0.55);
}

.gacha-theme-stage__name {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text-main);
  letter-spacing: 0.04em;
}

.gacha-theme-stage__eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  color: var(--dream-petal);
}

.gacha-theme-stage__tagline {
  margin: 0 0 0.9rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--color-text-secondary);
  max-width: 28rem;
  white-space: pre-line;
}

.gacha-theme-stage__heroes {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 0.65rem;
  align-items: end;
  margin-bottom: 0.75rem;
}

@media (max-width: 360px) {
  .gacha-theme-stage__heroes {
    grid-template-columns: 1fr;
  }
}

.gacha-theme-hero {
  margin: 0;
  text-align: center;
}

.gacha-theme-hero__frame {
  position: relative;
  margin: 0 auto 0.45rem;
  width: min(100%, 11rem);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 40%, rgba(232, 238, 248, 0.18), transparent 55%),
    rgba(10, 16, 36, 0.65);
  box-shadow: 0 0 0 1px rgba(230, 213, 168, 0.28), 0 8px 28px rgba(0, 0, 0, 0.35);
}

.gacha-theme-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  opacity: 0.92;
}

.gacha-theme-hero__img.is-loading {
  visibility: hidden;
}

/* 大獎預覽：降彩為近似黑白剪影感，非全塗黑 */
.gacha-theme-hero__img.is-silhouette,
.gacha-theme-featured__img.is-silhouette {
  filter: grayscale(1) contrast(1.08) brightness(0.82);
  opacity: 0.9;
}

.gacha-theme-hero__frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at 50% 35%, rgba(232, 238, 248, 0.12), transparent 62%);
  box-shadow: inset 0 0 24px rgba(10, 16, 36, 0.45);
}

.gacha-theme-hero__cap {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.gacha-theme-hero__rarity {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--dream-omen-ur);
}

.gacha-theme-hero__name {
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--dream-petal);
  line-height: 1.35;
}

.gacha-theme-hero__title {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.gacha-theme-featured {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.gacha-theme-featured__item {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: 0.45rem;
  align-items: center;
  padding: 0.35rem 0.45rem;
  border-radius: 0.75rem;
  background: rgba(14, 20, 40, 0.55);
  border: 1px solid rgba(167, 139, 250, 0.22);
}

.gacha-theme-featured__item img,
.gacha-theme-featured__img {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(8, 12, 24, 0.7);
}

.gacha-theme-featured__rarity {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--dream-omen-ssr);
  letter-spacing: 0.08em;
}

.gacha-theme-featured__name {
  display: block;
  font-size: 0.78rem;
  color: var(--dream-petal);
  line-height: 1.35;
}

.gacha-theme-stage__meta {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.gacha-theme-details-btn {
  display: inline-flex;
  align-items: center;
  margin: 0 0 0.65rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  color: var(--dream-moon);
  background: rgba(20, 28, 52, 0.6);
  border: 1px solid rgba(232, 238, 248, 0.22);
  border-radius: 0.55rem;
  cursor: pointer;
}

.gacha-theme-details-btn:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

.gacha-theme-details {
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.75rem;
  background: rgba(8, 12, 24, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--color-text-secondary);
}

.gacha-theme-details dl {
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

.gacha-theme-details dt {
  color: var(--color-text-muted);
  font-size: 0.72rem;
}

.gacha-theme-details dd {
  margin: 0 0 0.25rem;
  color: var(--color-text-main);
}

.gacha-panel[data-pool-theme='eternal_slumber_bloom'] .btn--gacha {
  background: linear-gradient(135deg, rgba(90, 70, 140, 0.95), rgba(40, 70, 110, 0.95));
  border-color: rgba(212, 196, 232, 0.35);
}

.gacha-panel[data-pool-theme='eternal_slumber_bloom'] .btn--gacha-ten {
  background: linear-gradient(135deg, rgba(120, 90, 60, 0.55), rgba(90, 70, 140, 0.9));
}

/* --- Debut overlay（永眠花海入場） --- */
.dream-debut-overlay {
  position: fixed;
  inset: 0;
  touch-action: none;
  overscroll-behavior: contain;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: max(1rem, env(safe-area-inset-top, 0px)) max(1rem, env(safe-area-inset-right, 0px)) max(1rem, env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
  color: #f2f6ff;
  background: transparent;
  opacity: 0;
  transition: opacity var(--pool-dissolve-duration, 550ms) ease;
  --debut-night: #050914;
  --debut-mist: rgba(107, 91, 149, 0.38);
  --debut-moon: #e8eef8;
  --debut-silver: #b8c8e0;
  --debut-petal: #d4c4e8;
}

.dream-debut-overlay.is-active { opacity: 1; }
.dream-debut-overlay.is-exiting { opacity: 0; pointer-events: none; }

.dream-debut-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.dream-debut-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(90, 78, 140, 0.28), transparent 52%),
    radial-gradient(ellipse at 50% 88%, rgba(30, 55, 90, 0.22), transparent 48%),
    linear-gradient(180deg, #04070f 0%, #0a1224 48%, #070d18 100%);
  opacity: 0;
  transition: opacity 0.7s ease, filter 0.8s ease;
}

.dream-debut-overlay.is-phase-night .dream-debut-bg,
.dream-debut-overlay.is-skipped .dream-debut-bg {
  opacity: 1;
}

.dream-debut-overlay.is-phase-reveal .dream-debut-bg {
  opacity: 0.42;
  filter: blur(1.5px);
}

.dream-debut-mist {
  position: absolute;
  inset: -8%;
  background:
    radial-gradient(ellipse at 30% 40%, var(--debut-mist), transparent 42%),
    radial-gradient(ellipse at 72% 58%, rgba(70, 100, 150, 0.18), transparent 45%);
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1s ease, transform 2.4s ease;
}

.dream-debut-overlay.is-phase-night .dream-debut-mist {
  opacity: 0.85;
  transform: scale(1);
}

.dream-debut-overlay.is-phase-reveal .dream-debut-mist {
  opacity: 0.25;
}

.dream-debut-dust {
  position: absolute;
  inset: 0;
}

.dream-debut-dust__mote {
  position: absolute;
  left: var(--p-x, 50%);
  top: 12%;
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--debut-moon) 80%, transparent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--debut-moon) 45%, transparent);
  opacity: 0;
  animation: dreamDebutDustDrift var(--p-dur, 1.6s) ease-in var(--p-delay, 0ms) infinite;
}

.dream-debut-mirror {
  position: absolute;
  left: 50%;
  top: 56%;
  width: min(68vw, 16rem);
  height: min(28vw, 7rem);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.7s ease;
}

.dream-debut-overlay.is-phase-pool .dream-debut-mirror,
.dream-debut-overlay.is-phase-bloom .dream-debut-mirror,
.dream-debut-overlay.is-phase-line .dream-debut-mirror,
.dream-debut-overlay.is-skipped .dream-debut-mirror {
  opacity: 1;
}

.dream-debut-overlay.is-phase-reveal .dream-debut-mirror {
  opacity: 0.35;
}

.dream-debut-mirror__glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(200, 220, 245, 0.42), rgba(120, 160, 200, 0.12) 42%, transparent 70%);
  filter: blur(0.5px);
  transform: scale(0.55);
  opacity: 0;
}

.dream-debut-overlay.is-phase-pool .dream-debut-mirror__glow,
.dream-debut-overlay.is-phase-bloom .dream-debut-mirror__glow,
.dream-debut-overlay.is-phase-line .dream-debut-mirror__glow,
.dream-debut-overlay.is-skipped .dream-debut-mirror__glow {
  animation: dreamDebutMirrorGlow 1.5s ease forwards;
}

.dream-debut-mirror__ripple {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid rgba(220, 230, 245, 0.38);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.35);
  opacity: 0;
}

.dream-debut-overlay.is-phase-pool .dream-debut-mirror__ripple--1,
.dream-debut-overlay.is-phase-bloom .dream-debut-mirror__ripple--1,
.dream-debut-overlay.is-phase-line .dream-debut-mirror__ripple--1 {
  animation: dreamDebutRipple 2s ease-out 0.15s forwards;
}

.dream-debut-overlay.is-phase-pool .dream-debut-mirror__ripple--2,
.dream-debut-overlay.is-phase-bloom .dream-debut-mirror__ripple--2,
.dream-debut-overlay.is-phase-line .dream-debut-mirror__ripple--2 {
  animation: dreamDebutRipple 2.15s ease-out 0.55s forwards;
}

.dream-debut-overlay.is-skipped .dream-debut-mirror__ripple {
  opacity: 0;
  animation: none;
}

.dream-debut-flower {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 5.5rem;
  height: 5.5rem;
  transform: translate(-50%, -50%) scale(0.72);
  opacity: 0;
  transition: opacity 0.55s ease, transform 1.1s ease;
}

.dream-debut-overlay.is-phase-bloom .dream-debut-flower,
.dream-debut-overlay.is-phase-line .dream-debut-flower,
.dream-debut-overlay.is-skipped .dream-debut-flower {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.dream-debut-overlay.is-phase-reveal .dream-debut-flower {
  opacity: 0.28;
  transform: translate(-50%, -54%) scale(1.04);
}

.dream-debut-flower__aura {
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(220, 230, 250, 0.28), transparent 68%);
  opacity: 0;
  transform: scale(0.5);
}

.dream-debut-overlay.is-phase-bloom .dream-debut-flower__aura,
.dream-debut-overlay.is-phase-line .dream-debut-flower__aura {
  animation: dreamDebutFlowerAura 1.4s ease forwards;
}

.dream-debut-overlay.is-skipped .dream-debut-flower__aura {
  opacity: 0.5;
  transform: scale(1.15);
  animation: none;
}

.dream-debut-flower__core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.4);
  background: radial-gradient(circle at 35% 30%, #fff, var(--debut-moon) 45%, rgba(180, 170, 220, 0.55));
  box-shadow:
    0 0 10px rgba(232, 238, 248, 0.55),
    0 0 22px rgba(170, 150, 210, 0.28);
  opacity: 0;
}

.dream-debut-overlay.is-phase-bloom .dream-debut-flower__core,
.dream-debut-overlay.is-phase-line .dream-debut-flower__core,
.dream-debut-overlay.is-skipped .dream-debut-flower__core {
  animation: dreamDebutFlowerCore 1s ease forwards;
}

.dream-debut-flower__petal {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.05rem;
  height: 1.85rem;
  margin-left: -0.525rem;
  margin-top: -1.85rem;
  border-radius: 60% 60% 45% 45%;
  background:
    linear-gradient(180deg, rgba(240, 244, 255, 0.72), rgba(180, 170, 220, 0.42) 55%, rgba(120, 110, 170, 0.18));
  transform-origin: 50% 100%;
  opacity: 0;
  box-shadow: 0 0 10px rgba(200, 190, 230, 0.18);
  --petal-rot: 0deg;
  transform: rotate(var(--petal-rot)) scale(0.35);
}

.dream-debut-flower__petal--1 { --petal-rot: 0deg; }
.dream-debut-flower__petal--2 { --petal-rot: 72deg; }
.dream-debut-flower__petal--3 { --petal-rot: 144deg; }
.dream-debut-flower__petal--4 { --petal-rot: 216deg; }
.dream-debut-flower__petal--5 { --petal-rot: 288deg; }

.dream-debut-overlay.is-phase-bloom .dream-debut-flower__petal--1,
.dream-debut-overlay.is-phase-line .dream-debut-flower__petal--1 {
  animation: dreamDebutPetalOpen 1.15s ease 0.05s forwards;
}
.dream-debut-overlay.is-phase-bloom .dream-debut-flower__petal--2,
.dream-debut-overlay.is-phase-line .dream-debut-flower__petal--2 {
  animation: dreamDebutPetalOpen 1.15s ease 0.12s forwards;
}
.dream-debut-overlay.is-phase-bloom .dream-debut-flower__petal--3,
.dream-debut-overlay.is-phase-line .dream-debut-flower__petal--3 {
  animation: dreamDebutPetalOpen 1.15s ease 0.2s forwards;
}
.dream-debut-overlay.is-phase-bloom .dream-debut-flower__petal--4,
.dream-debut-overlay.is-phase-line .dream-debut-flower__petal--4 {
  animation: dreamDebutPetalOpen 1.15s ease 0.28s forwards;
}
.dream-debut-overlay.is-phase-bloom .dream-debut-flower__petal--5,
.dream-debut-overlay.is-phase-line .dream-debut-flower__petal--5 {
  animation: dreamDebutPetalOpen 1.15s ease 0.36s forwards;
}

.dream-debut-overlay.is-skipped .dream-debut-flower__petal {
  opacity: 0.92;
  transform: rotate(var(--petal-rot)) scale(1);
  animation: none;
}

.dream-debut-line {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2em 0.35em;
  max-width: min(92vw, 22rem);
  margin: 0;
  padding: 0.55rem 0.85rem;
  text-align: center;
  font-size: clamp(0.95rem, 3.6vw, 1.15rem);
  font-weight: 560;
  letter-spacing: 0.12em;
  line-height: 1.55;
  color: var(--debut-moon);
  text-shadow:
    0 1px 2px rgba(4, 8, 18, 0.75),
    0 0 18px rgba(20, 28, 48, 0.55);
  background: linear-gradient(180deg, rgba(8, 14, 28, 0.18), rgba(8, 14, 28, 0.05));
  border-radius: 0.65rem;
}

.dream-debut-copy {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 0.65rem;
  margin-top: min(42vh, 14rem);
  max-width: min(92vw, 22rem);
}

.dream-debut-copy .dream-debut-line {
  margin-top: 0;
}

.dream-debut-continue {
  margin: 0;
  text-align: center;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: rgba(232, 238, 248, 0.78);
  text-shadow: 0 1px 2px rgba(4, 8, 18, 0.65);
  opacity: 0;
}

.dream-debut-overlay.is-ready .dream-debut-continue {
  opacity: 0.92;
  animation: dreamDebutLineSeg 0.45s ease forwards;
}

.dream-debut-line__seg {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.45rem);
  filter: blur(1.5px);
}

.dream-debut-overlay.is-phase-line .dream-debut-line__seg[data-seg="a"],
.dream-debut-overlay.is-skipped .dream-debut-line__seg {
  animation: dreamDebutLineSeg 0.7s ease forwards;
}

.dream-debut-overlay.is-phase-line .dream-debut-line__seg[data-seg="b"] {
  animation: dreamDebutLineSeg 0.7s ease 0.28s forwards;
}

.dream-debut-overlay.is-phase-line .dream-debut-line__seg[data-seg="c"] {
  animation: dreamDebutLineSeg 0.75s ease 0.55s forwards;
}

/* reveal 期間保持台詞可讀；真正淡出交給 is-exiting */
.dream-debut-overlay.is-phase-reveal:not(.is-exiting) .dream-debut-line {
  opacity: 1;
}

.dream-debut-overlay.is-exiting .dream-debut-line {
  opacity: 0;
  transition: opacity var(--pool-dissolve-duration, 550ms) ease;
}

.dream-debut-overlay.is-skipped .dream-debut-line__seg {
  opacity: 1;
  transform: none;
  filter: none;
  animation: none;
}

.dream-debut-skip {
  position: absolute;
  top: max(0.75rem, env(safe-area-inset-top, 0px));
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  z-index: 3;
  padding: 0.4rem 0.7rem;
  font-size: 0.8rem;
  color: #e8eef8;
  background: rgba(16, 24, 42, 0.72);
  border: 1px solid rgba(232, 238, 248, 0.22);
  border-radius: 0.5rem;
  cursor: pointer;
}

.dream-debut-overlay.is-reduced .dream-debut-dust,
body.reduce-motion .dream-debut-dust {
  display: none;
}

.dream-debut-overlay.is-reduced .dream-debut-bg,
.dream-debut-overlay.is-reduced .dream-debut-mist,
.dream-debut-overlay.is-reduced .dream-debut-mirror,
.dream-debut-overlay.is-reduced .dream-debut-flower,
.dream-debut-overlay.is-reduced .dream-debut-line__seg,
body.reduce-motion .dream-debut-overlay .dream-debut-bg,
body.reduce-motion .dream-debut-overlay .dream-debut-mist,
body.reduce-motion .dream-debut-overlay .dream-debut-mirror,
body.reduce-motion .dream-debut-overlay .dream-debut-flower,
body.reduce-motion .dream-debut-overlay .dream-debut-line__seg {
  animation: none !important;
  transition-duration: 0.25s !important;
  opacity: 1;
  transform: none;
  filter: none;
}

.dream-debut-overlay.is-reduced .dream-debut-flower,
body.reduce-motion .dream-debut-overlay .dream-debut-flower {
  transform: translate(-50%, -50%) scale(1);
}

/* 主畫面銜接 */
.gacha-panel.is-pool-debut-veil {
  opacity: 0.68;
  transform: translateY(3px);
  transition: opacity var(--pool-dissolve-duration, 550ms) ease, transform var(--pool-dissolve-duration, 550ms) ease;
}

.gacha-panel.is-pool-debut-reveal {
  animation: dreamDebutPanelReveal var(--pool-dissolve-duration, 750ms) ease both;
}

@keyframes dreamDebutDustDrift {
  0% { opacity: 0; transform: translate3d(-50%, 0, 0) scale(0.7); }
  18% { opacity: 0.7; }
  100% { opacity: 0; transform: translate3d(calc(-50% + (var(--p-i, 0) * 3px - 12px)), 240%, 0) scale(0.95); }
}

@keyframes dreamDebutMirrorGlow {
  from { opacity: 0; transform: scale(0.5); }
  55% { opacity: 1; transform: scale(1.05); }
  to { opacity: 0.92; transform: scale(1); }
}

@keyframes dreamDebutRipple {
  from { opacity: 0.65; transform: translate(-50%, -50%) scale(0.35); }
  to { opacity: 0; transform: translate(-50%, -50%) scale(3.1); }
}

@keyframes dreamDebutFlowerAura {
  from { opacity: 0; transform: scale(0.45); }
  50% { opacity: 0.9; transform: scale(1.05); }
  to { opacity: 0.55; transform: scale(1.2); }
}

@keyframes dreamDebutFlowerCore {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes dreamDebutPetalOpen {
  from { opacity: 0; transform: rotate(var(--petal-rot, 0deg)) scale(0.3) translateY(0.4rem); }
  to { opacity: 0.92; transform: rotate(var(--petal-rot, 0deg)) scale(1) translateY(0); }
}

@keyframes dreamDebutLineSeg {
  from { opacity: 0; transform: translateY(0.45rem); filter: blur(1.5px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes dreamDebutPanelReveal {
  from { opacity: 0.72; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

body[data-theme="sweet"] .dream-debut-overlay {
  color: #f7f2ff;
}

body[data-theme="sweet"] .dream-debut-line {
  color: #f4f0ff;
  text-shadow:
    0 1px 2px rgba(20, 12, 36, 0.8),
    0 0 16px rgba(40, 24, 56, 0.55);
}

body[data-theme="sweet"] .dream-debut-skip {
  color: #f7f2ff;
  background: rgba(36, 24, 48, 0.78);
  border-color: rgba(232, 220, 248, 0.28);
}

@media (max-width: 360px) {
  .dream-debut-flower {
    width: 4.6rem;
    height: 4.6rem;
  }

  .dream-debut-line {
    letter-spacing: 0.08em;
    font-size: clamp(0.88rem, 4.2vw, 1rem);
    padding: 0.45rem 0.65rem;
  }
}

/* --- Dream bloom summon overlay --- */
.dream-bloom-overlay {
  position: fixed;
  inset: 0;
  z-index: 12100;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(0.75rem, env(safe-area-inset-top, 0px)) max(0.75rem, env(safe-area-inset-right, 0px)) max(0.75rem, env(safe-area-inset-bottom, 0px)) max(0.75rem, env(safe-area-inset-left, 0px));
  /* 固定夜空字色，避免 Sweet 等淺色主題深色文字繼承進來 */
  color: #f4f7ff;
  opacity: 0;
  transition: opacity 0.28s ease;
}

.dream-bloom-overlay.is-active { opacity: 1; }

.dream-bloom-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.dream-bloom-bg__night {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #070b18 0%, #10182e 50%, #0a1524 100%);
}

.dream-bloom-bg__mist {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(107, 91, 149, 0.32), transparent 55%),
    radial-gradient(ellipse at 20% 70%, rgba(40, 60, 100, 0.25), transparent 45%);
}

.dream-bloom-bg__moon {
  position: absolute;
  top: 8%;
  right: 12%;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--dream-moon), rgba(232, 238, 248, 0.15));
  opacity: 0.5;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.dream-bloom-bg__arch {
  position: absolute;
  left: 50%;
  top: 12%;
  width: 10rem;
  height: 5rem;
  transform: translateX(-50%);
  border: 1px solid rgba(212, 196, 232, 0.16);
  border-bottom: 0;
  border-radius: 10rem 10rem 0 0;
  opacity: 0.25;
}

.dream-bloom-bg__pool {
  position: absolute;
  left: 50%;
  bottom: 18%;
  width: min(92vw, 26rem);
  height: 8rem;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 30%, rgba(90, 150, 190, 0.35), rgba(10, 30, 50, 0.1) 70%);
  box-shadow: inset 0 0 30px rgba(120, 180, 220, 0.15);
}

.dream-bloom-particles { position: absolute; inset: 0; }

.dream-bloom-petal {
  position: absolute;
  left: var(--p-x, 50%);
  top: -5%;
  width: 0.45rem;
  height: 0.7rem;
  border-radius: 60% 40%;
  background: var(--dream-petal);
  opacity: 0.35;
  animation: dreamPetalFall var(--p-dur, 1.2s) linear var(--p-delay, 0s) infinite;
}

@keyframes dreamPetalFall {
  from { transform: translateY(0) rotate(0deg); opacity: 0; }
  15% { opacity: 0.4; }
  to { transform: translateY(110vh) rotate(120deg); opacity: 0; }
}

.dream-bloom-stage {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
}

.dream-bloom-dust {
  position: absolute;
  top: 8%;
  left: 50%;
  width: 0.6rem;
  height: 0.6rem;
  margin-left: -0.3rem;
  border-radius: 50%;
  background: var(--dream-moon);
  box-shadow: 0 0 14px var(--dream-moon);
  opacity: 0;
}

.dream-bloom-overlay[data-state='dreamDust'] .dream-bloom-dust {
  animation: dreamDustFall 0.55s ease-in forwards;
}

.dream-bloom-overlay[data-mode='ten'][data-state='dreamDust'] .dream-bloom-dust {
  box-shadow:
    0 0 14px var(--dream-moon),
    -18px -8px 10px rgba(232, 238, 248, 0.55),
    16px -12px 10px rgba(232, 238, 248, 0.45),
    -28px 4px 8px rgba(212, 196, 232, 0.4),
    24px 2px 8px rgba(212, 196, 232, 0.35);
}

.dream-bloom-ripple {
  position: absolute;
  left: 50%;
  top: 58%;
  width: 3rem;
  height: 3rem;
  margin: -1.5rem 0 0 -1.5rem;
  border-radius: 50%;
  border: 1px solid rgba(232, 238, 248, 0.5);
  opacity: 0;
}

.dream-bloom-overlay[data-state='mirrorRipple'] .dream-bloom-ripple,
.dream-bloom-overlay[data-state='rarityOmen'] .dream-bloom-ripple,
.dream-bloom-overlay[data-state='bloom'] .dream-bloom-ripple {
  animation: dreamRipple 1.1s ease-out forwards;
}

.dream-bloom-omen {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 6rem;
  height: 6rem;
  margin: -3rem 0 0 -3rem;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
}

.dream-bloom-overlay[data-state='rarityOmen'] .dream-bloom-omen,
.dream-bloom-overlay[data-state='bloom'] .dream-bloom-omen {
  opacity: 1;
}

.dream-bloom-overlay[data-omen='N'] .dream-bloom-omen {
  box-shadow: 0 0 24px color-mix(in srgb, var(--dream-omen-n) 55%, transparent);
  background: radial-gradient(circle, color-mix(in srgb, var(--dream-omen-n) 25%, transparent), transparent 70%);
}
.dream-bloom-overlay[data-omen='R'] .dream-bloom-omen {
  box-shadow: 0 0 28px color-mix(in srgb, var(--dream-omen-r) 55%, transparent), 0 0 48px color-mix(in srgb, var(--dream-omen-r) 25%, transparent);
  background: radial-gradient(circle, color-mix(in srgb, var(--dream-omen-r) 28%, transparent), transparent 70%);
}
.dream-bloom-overlay[data-omen='SR'] .dream-bloom-omen {
  box-shadow: 0 0 32px color-mix(in srgb, var(--dream-omen-sr) 60%, transparent);
  background: radial-gradient(circle, color-mix(in srgb, var(--dream-omen-sr) 32%, transparent), transparent 70%);
}
.dream-bloom-overlay[data-omen='SSR'] .dream-bloom-omen {
  box-shadow: 0 0 36px color-mix(in srgb, var(--dream-omen-ssr) 55%, transparent), 0 0 60px color-mix(in srgb, var(--dream-gold) 30%, transparent);
  background: radial-gradient(circle, color-mix(in srgb, var(--dream-omen-ssr) 30%, transparent), transparent 70%);
}
.dream-bloom-overlay[data-omen='UR'] .dream-bloom-omen {
  box-shadow: 0 0 40px color-mix(in srgb, var(--dream-omen-ur) 55%, transparent), 0 0 70px color-mix(in srgb, var(--dream-mist) 40%, transparent);
  background: radial-gradient(circle, color-mix(in srgb, var(--dream-omen-ur) 28%, transparent), transparent 70%);
}

.dream-bloom-overlay[data-omen='UR'][data-state='rarityOmen'] .dream-bloom-bg__moon,
.dream-bloom-overlay[data-omen='UR'][data-state='bloom'] .dream-bloom-bg__moon {
  opacity: 0.12;
}

.dream-bloom-overlay[data-omen='UR'][data-state='bloom'] .dream-bloom-bg__arch {
  opacity: 0.55;
  box-shadow: 0 0 20px rgba(230, 213, 168, 0.25);
}

.dream-bloom-buds {
  position: absolute;
  left: 50%;
  top: 56%;
  width: 0;
  height: 0;
}

.dream-bloom-bud {
  position: absolute;
  width: 1.1rem;
  height: 1.5rem;
  margin: -0.75rem 0 0 -0.55rem;
  border-radius: 50% 50% 45% 45%;
  background: linear-gradient(180deg, var(--dream-petal), rgba(90, 70, 140, 0.8));
  transform: rotate(var(--bud-angle, 0deg)) translateY(-4.5rem) scale(0.4);
  opacity: 0;
}

.dream-bloom-overlay[data-state='bloom'] .dream-bloom-bud,
.dream-bloom-overlay[data-state='revealing'] .dream-bloom-bud {
  animation: dreamBudRise 0.55s ease var(--bud-delay, 0ms) forwards;
}

@keyframes dreamBudRise {
  from { opacity: 0; transform: rotate(var(--bud-angle, 0deg)) translateY(-2rem) scale(0.3); }
  to { opacity: 0.9; transform: rotate(var(--bud-angle, 0deg)) translateY(-5.2rem) scale(1); }
}

.dream-bloom-crest {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 5rem;
  height: 5rem;
  margin: -2.5rem 0 0 -2.5rem;
  border: 1px solid rgba(230, 213, 168, 0.35);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.6);
}

.dream-bloom-overlay[data-omen='SSR'][data-state='bloom'] .dream-bloom-crest,
.dream-bloom-overlay[data-omen='SSR'][data-state='revealing'] .dream-bloom-crest,
.dream-bloom-overlay[data-omen='UR'][data-state='bloom'] .dream-bloom-crest {
  opacity: 0.8;
  transform: scale(1);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.dream-bloom-ur {
  position: absolute;
  inset: 10% 5% 20%;
  display: grid;
  place-items: center;
}

.dream-bloom-ur__flower {
  width: min(70vw, 16rem);
  height: min(70vw, 16rem);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(232, 238, 248, 0.2), transparent 40%),
    conic-gradient(from 0deg, rgba(107, 91, 149, 0.0), rgba(230, 213, 168, 0.35), rgba(244, 114, 182, 0.25), rgba(107, 91, 149, 0.0));
  opacity: 0;
}

.dream-bloom-ur.is-active .dream-bloom-ur__flower {
  animation: dreamUrFlower 1.4s ease forwards;
}

.dream-bloom-ur__silhouette {
  position: absolute;
  width: 8rem;
  height: 9rem;
  background: radial-gradient(ellipse at 50% 60%, rgba(20, 8, 30, 0.9), transparent 72%);
  opacity: 0;
}

.dream-bloom-ur.is-active .dream-bloom-ur__silhouette {
  animation: dreamSilhouetteIn 1s ease 0.35s forwards;
}

.dream-bloom-ur__rings {
  position: absolute;
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  border: 1px solid rgba(230, 213, 168, 0.35);
  opacity: 0;
}

.dream-bloom-ur.is-active .dream-bloom-ur__rings {
  animation: dreamRipple 1.5s ease 0.2s forwards;
}

@keyframes dreamUrFlower {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

.dream-bloom-seal {
  position: relative;
  width: min(92vw, 20rem);
  padding: 1.1rem 1rem 1.25rem;
  border-radius: 1.25rem;
  background:
    linear-gradient(180deg, rgba(24, 30, 52, 0.92), rgba(12, 18, 34, 0.95));
  border: 1px solid rgba(212, 196, 232, 0.28);
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.dream-bloom-seal[data-rarity='SSR'] {
  border-color: color-mix(in srgb, var(--dream-omen-ssr) 45%, transparent);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 28px color-mix(in srgb, var(--dream-omen-ssr) 22%, transparent);
}

.dream-bloom-seal[data-rarity='UR'] {
  border-color: color-mix(in srgb, var(--dream-omen-ur) 50%, transparent);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 32px color-mix(in srgb, var(--dream-omen-ur) 25%, transparent);
}

.dream-bloom-seal__media {
  position: relative;
  width: 9.5rem;
  height: 9.5rem;
  margin: 0.35rem auto 0.75rem;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(8, 12, 24, 0.55);
}

.dream-bloom-seal__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.dream-bloom-seal__img.is-loaded { opacity: 1; }
.dream-bloom-seal__media:has(.is-error)::after,
.dream-bloom-mini-seal__media:has(.is-error)::after {
  content: '✦';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(230, 213, 168, 0.8);
  font-size: 2rem;
}

.dream-bloom-seal__petal {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 20%, rgba(212, 196, 232, 0.18), transparent 55%);
}

.dream-bloom-seal__reflect {
  position: absolute;
  left: 15%;
  right: 15%;
  bottom: 0.6rem;
  height: 2rem;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(90, 150, 190, 0.25), transparent 70%);
  pointer-events: none;
}

.dream-bloom-seal__rarity {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.dream-bloom-seal[data-rarity='N'] .dream-bloom-seal__rarity { color: var(--dream-omen-n); }
.dream-bloom-seal[data-rarity='R'] .dream-bloom-seal__rarity { color: var(--dream-omen-r); }
.dream-bloom-seal[data-rarity='SR'] .dream-bloom-seal__rarity { color: var(--dream-omen-sr); }
.dream-bloom-seal[data-rarity='SSR'] .dream-bloom-seal__rarity { color: var(--dream-omen-ssr); }
.dream-bloom-seal[data-rarity='UR'] .dream-bloom-seal__rarity { color: var(--dream-omen-ur); }

.dream-bloom-seal__name {
  margin: 0.2rem 0 0.15rem;
  font-size: 1.2rem;
  color: #f4f7ff;
}

.dream-bloom-seal__title,
.dream-bloom-seal__meet,
.dream-bloom-seal__comp {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: #c7d2ea;
}

.dream-bloom-seal__meet {
  color: #d4c4e8;
}

.dream-bloom-summary {
  width: min(96vw, 26rem);
  max-height: min(78dvh, 36rem);
  overflow: auto;
  padding: 0.85rem 0.75rem 1rem;
  border-radius: 1rem;
  background: rgba(10, 14, 28, 0.92);
  border: 1px solid rgba(212, 196, 232, 0.22);
}

.dream-bloom-summary__eyebrow {
  margin: 0;
  font-size: 0.75rem;
  color: var(--dream-petal, #d4c4e8);
  letter-spacing: 0.08em;
}

.dream-bloom-summary__title {
  margin: 0.25rem 0 0.75rem;
  font-size: 1.05rem;
  color: #f4f7ff;
}

.dream-bloom-summary__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.dream-bloom-mini-seal {
  display: grid;
  gap: 0.2rem;
  padding: 0.45rem;
  border-radius: 0.75rem;
  background: rgba(20, 26, 46, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.18);
  text-align: center;
  min-width: 0;
}

.dream-bloom-mini-seal[data-rarity='SSR'] {
  border-color: color-mix(in srgb, var(--dream-omen-ssr) 40%, transparent);
}
.dream-bloom-mini-seal[data-rarity='UR'] {
  border-color: color-mix(in srgb, var(--dream-omen-ur) 45%, transparent);
}

.dream-bloom-mini-seal__media {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 0.55rem;
  overflow: hidden;
  background: rgba(8, 12, 24, 0.5);
}

.dream-bloom-mini-seal__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dream-bloom-mini-seal__rarity {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.dream-bloom-mini-seal[data-rarity='N'] .dream-bloom-mini-seal__rarity { color: var(--dream-omen-n); }
.dream-bloom-mini-seal[data-rarity='R'] .dream-bloom-mini-seal__rarity { color: var(--dream-omen-r); }
.dream-bloom-mini-seal[data-rarity='SR'] .dream-bloom-mini-seal__rarity { color: var(--dream-omen-sr); }
.dream-bloom-mini-seal[data-rarity='SSR'] .dream-bloom-mini-seal__rarity { color: var(--dream-omen-ssr); }
.dream-bloom-mini-seal[data-rarity='UR'] .dream-bloom-mini-seal__rarity { color: var(--dream-omen-ur); }

.dream-bloom-mini-seal__name {
  font-size: 0.75rem;
  color: #f4f7ff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dream-bloom-mini-seal__meet {
  font-size: 0.68rem;
  color: #b8c4dc;
}

.dream-bloom-live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.dream-bloom-controls {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  padding-top: 0.75rem;
}

.dream-bloom-btn {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #f4f7ff;
  background: rgba(28, 36, 60, 0.92);
  border: 1px solid rgba(232, 238, 248, 0.38);
  border-radius: 0.55rem;
  cursor: pointer;
}

.dream-bloom-btn--primary {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(110, 88, 168, 0.98), rgba(48, 82, 128, 0.98));
  border-color: rgba(232, 238, 248, 0.45);
}

.dream-bloom-btn--ghost {
  color: #e8eef8;
  background: rgba(12, 18, 34, 0.78);
  border-color: rgba(212, 220, 240, 0.42);
}

.dream-bloom-btn:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

.dream-bloom-overlay.is-reduced .dream-bloom-petal,
body.reduce-motion .dream-bloom-petal {
  display: none;
}

.dream-bloom-overlay.is-reduced .dream-bloom-dust,
.dream-bloom-overlay.is-reduced .dream-bloom-ripple,
.dream-bloom-overlay.is-reduced .dream-bloom-bud,
.dream-bloom-overlay.is-reduced .dream-bloom-ur__flower,
body.reduce-motion .dream-bloom-dust,
body.reduce-motion .dream-bloom-ripple,
body.reduce-motion .dream-bloom-bud,
body.reduce-motion .dream-bloom-ur__flower {
  animation: none !important;
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .gacha-theme-stage__petals::before,
  .gacha-theme-stage__petals::after,
  .gacha-theme-stage__dust::before,
  .dream-bloom-petal {
    animation: none !important;
  }

  .dream-debut-overlay *,
  .dream-bloom-overlay * {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}

body.themed-summon-active {
  overflow: hidden;
  overscroll-behavior: none;
}


/* === V3.4.0 晨醒花庭 === */
.gacha-panel[data-pool-theme='eternal_slumber_bloom'][data-pool-phase='awakened'] {
  --dream-moon: #fff4e8;
  --dream-mist: #f6c7c0;
  --dream-gold: #e8c27a;
  background:
    radial-gradient(ellipse at 70% 10%, rgba(244, 180, 160, 0.28), transparent 45%),
    radial-gradient(ellipse at 20% 80%, rgba(232, 194, 122, 0.18), transparent 50%),
    linear-gradient(165deg, #1a1630 0%, #2a1f3a 40%, #3a2a3a 70%, #4a3040 100%);
}

.gacha-theme-stage.is-awakened .gacha-theme-stage__atmosphere {
  filter: saturate(1.15) hue-rotate(-12deg) brightness(1.08);
}

.gacha-theme-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 0.75rem 0;
}
.gacha-theme-dual__item {
  margin: 0;
  text-align: center;
}
.gacha-theme-dual__item img {
  width: 100%;
  max-width: 9rem;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0.75rem;
  filter: saturate(0.85);
}
.gacha-theme-dual__item figcaption {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: rgba(255, 244, 232, 0.85);
}
.gacha-theme-hero.is-dimmed {
  opacity: 0.55;
}

.gacha-awakening-panel {
  margin: 0.85rem 0 0.4rem;
  border: 1px solid rgba(232, 194, 122, 0.28);
  border-radius: 0.75rem;
  background: rgba(12, 14, 28, 0.35);
  color: #f4f0ea;
  padding: 0.35rem 0.65rem 0.55rem;
}
.gacha-awakening-panel__summary {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  list-style: none;
  font-size: 0.88rem;
}
.gacha-awakening-panel__summary::-webkit-details-marker { display: none; }
.gacha-awakening-bar {
  margin: 0.55rem 0 0.45rem;
  height: 0.4rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  overflow: hidden;
}
.gacha-awakening-bar__fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #8b6bb5, #f0b7a8 55%, #e8c27a);
  transition: width 0.35s ease;
}
.gacha-awakening-bar__fill.is-complete {
  background: linear-gradient(90deg, #f0b7a8, #e8c27a);
}
.gacha-awakening-panel__desc,
.gacha-awakening-panel__counts,
.gacha-awakening-panel__note {
  margin: 0.35rem 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(244, 240, 234, 0.82);
}
.gacha-awakening-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 0.5rem 0;
}
.gacha-awakening-preview__item {
  text-align: center;
  font-size: 0.62rem;
  color: rgba(244, 240, 234, 0.9);
}
.gacha-awakening-preview__item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0.45rem;
  display: block;
  margin-bottom: 0.25rem;
}
.gacha-awakening-preview__item.is-locked img {
  filter: grayscale(0.85) saturate(0.35) brightness(0.72);
}
.gacha-awakening-preview__item.is-locked::after {
  content: '鎖';
  display: inline-block;
  margin-top: 0.1rem;
  font-size: 0.58rem;
  opacity: 0.75;
}

.dream-bloom-ur.is-dawn-ur .dream-bloom-ur__flower {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 244, 232, 0.35), transparent 42%),
    conic-gradient(from 20deg, rgba(244, 180, 160, 0.0), rgba(232, 194, 122, 0.55), rgba(246, 199, 192, 0.4), rgba(244, 180, 160, 0.0));
  box-shadow: 0 0 40px rgba(232, 194, 122, 0.35);
}
.dream-bloom-ur.is-dawn-ur .dream-bloom-ur__silhouette {
  background: radial-gradient(ellipse at 50% 60%, rgba(60, 28, 24, 0.85), transparent 72%);
}

.pool-awakening-overlay {
  position: fixed;
  inset: 0;
  z-index: 12100;
  display: grid;
  place-items: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background:
    radial-gradient(ellipse at 50% 20%, rgba(244, 180, 160, 0.25), transparent 50%),
    linear-gradient(180deg, #0a1020, #1c1530 45%, #3a2438 100%);
  color: #fff4e8;
}
.pool-awakening-skip,
.pool-awakening-confirm,
.pool-awakening-fallback button {
  position: absolute;
  top: max(0.75rem, env(safe-area-inset-top));
  right: max(0.75rem, env(safe-area-inset-right));
  border: 1px solid rgba(255,244,232,0.35);
  background: rgba(20,16,32,0.65);
  color: inherit;
  border-radius: 0.5rem;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
}
.pool-awakening-confirm {
  position: static;
  margin-top: 0.75rem;
}
.pool-awakening-stage {
  width: min(28rem, 100%);
  text-align: center;
  display: grid;
  gap: 0.65rem;
  justify-items: center;
}
.pool-awakening-mirror {
  position: relative;
  width: min(16rem, 70vw);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(120,160,200,0.35), 0 0 28px rgba(232,194,122,0.25);
}
.pool-awakening-mirror img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.7s ease, filter 0.7s ease;
}
.pool-awakening-mirror__dawn { opacity: 0; }
.pool-awakening-overlay[data-phase='reflection'] .pool-awakening-mirror__dawn,
.pool-awakening-overlay[data-phase='open-eyes'] .pool-awakening-mirror__dawn,
.pool-awakening-overlay[data-phase='step-out'] .pool-awakening-mirror__dawn,
.pool-awakening-overlay.is-finale .pool-awakening-mirror__dawn { opacity: 1; }
.pool-awakening-overlay[data-phase='palette-shift'] .pool-awakening-mirror,
.pool-awakening-overlay.is-finale .pool-awakening-mirror {
  box-shadow: inset 0 0 24px rgba(244,180,160,0.35), 0 0 36px rgba(232,194,122,0.4);
}
.pool-awakening-cast {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  width: 100%;
}
.pool-awakening-cast__item {
  opacity: 0.25;
  filter: grayscale(1);
  transition: opacity 0.35s ease, filter 0.35s ease;
  font-size: 0.62rem;
}
.pool-awakening-cast__item.is-lit {
  opacity: 1;
  filter: none;
}
.pool-awakening-cast__item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0.4rem;
  display: block;
  margin-bottom: 0.2rem;
}
.pool-awakening-message,
.pool-awakening-title {
  margin: 0;
}
.pool-awakening-title { font-size: 1.2rem; }
.pool-awakening-reward {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
}
.pool-awakening-reward img {
  width: 6.5rem;
  height: 6.5rem;
  object-fit: cover;
  border-radius: 0.75rem;
  box-shadow: 0 0 18px rgba(232,194,122,0.35);
}
.pool-awakening-fallback {
  position: fixed;
  inset: 0;
  z-index: 12150;
  display: grid;
  place-content: center;
  gap: 0.75rem;
  padding: 1.25rem;
  background: rgba(8,10,20,0.92);
  color: #fff4e8;
  text-align: center;
}
.pool-awakening-fallback button {
  position: static;
  justify-self: center;
}
.pool-awakening-overlay.is-reduced .pool-awakening-mirror__dawn {
  opacity: 1;
}
.pool-awakening-overlay.is-reduced .pool-awakening-cast__item {
  opacity: 1;
  filter: none;
}

@media (max-width: 320px) {
  .gacha-awakening-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pool-awakening-cast { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .pool-awakening-overlay *,
  .gacha-awakening-bar__fill {
    animation: none !important;
    transition: none !important;
  }
}


/* === V3.4.1 pool UI tokens + single result + contrast === */
.gacha-panel[data-pool-theme='eternal_slumber_bloom'] {
  --pool-text-primary: #f4f7ff;
  --pool-text-secondary: rgba(232, 238, 248, 0.92);
  --pool-text-muted: rgba(210, 220, 240, 0.78);
  --pool-surface: rgba(12, 18, 36, 0.78);
  --pool-surface-strong: rgba(10, 14, 28, 0.92);
  --pool-surface-soft: rgba(20, 28, 52, 0.62);
  --pool-border: rgba(200, 210, 235, 0.28);
  --pool-accent: #e6d5a8;
  --pool-accent-text: #1a1428;
  --pool-warning: #fbbf24;
}

.gacha-panel[data-pool-theme='eternal_slumber_bloom'][data-pool-phase='awakened'] {
  --pool-text-primary: #fff8f0;
  --pool-text-secondary: rgba(255, 244, 232, 0.94);
  --pool-text-muted: rgba(255, 236, 220, 0.82);
  --pool-surface: rgba(28, 18, 28, 0.82);
  --pool-surface-strong: rgba(22, 14, 22, 0.94);
  --pool-surface-soft: rgba(48, 28, 36, 0.7);
  --pool-border: rgba(232, 194, 122, 0.38);
  --pool-accent: #e8c27a;
  --pool-accent-text: #2a1810;
}

.gacha-panel[data-pool-theme='eternal_slumber_bloom'] .gacha-theme-stage__badge,
.gacha-panel[data-pool-theme='eternal_slumber_bloom'] .gacha-theme-stage__name,
.gacha-panel[data-pool-theme='eternal_slumber_bloom'] .gacha-theme-stage__eyebrow,
.gacha-panel[data-pool-theme='eternal_slumber_bloom'] .gacha-theme-stage__tagline,
.gacha-panel[data-pool-theme='eternal_slumber_bloom'] .gacha-theme-stage__meta,
.gacha-panel[data-pool-theme='eternal_slumber_bloom'] .gacha-theme-details-btn,
.gacha-panel[data-pool-theme='eternal_slumber_bloom'] .gacha-theme-details,
.gacha-panel[data-pool-theme='eternal_slumber_bloom'] .gacha-awakening-panel {
  color: var(--pool-text-primary);
}

.gacha-panel[data-pool-theme='eternal_slumber_bloom'] .gacha-theme-stage__name {
  font-size: clamp(1.35rem, 5.2vw, 1.85rem);
  line-height: 1.25;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.gacha-panel[data-pool-theme='eternal_slumber_bloom'] .gacha-theme-stage__eyebrow,
.gacha-panel[data-pool-theme='eternal_slumber_bloom'] .gacha-theme-stage__tagline,
.gacha-panel[data-pool-theme='eternal_slumber_bloom'] .gacha-theme-stage__meta {
  color: var(--pool-text-secondary);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.gacha-panel[data-pool-theme='eternal_slumber_bloom'] .gacha-theme-stage__tagline,
.gacha-panel[data-pool-theme='eternal_slumber_bloom'] .gacha-theme-stage__meta {
  font-size: 0.9rem;
  line-height: 1.5;
}

.gacha-panel[data-pool-theme='eternal_slumber_bloom'] .gacha-theme-hero__cap,
.gacha-panel[data-pool-theme='eternal_slumber_bloom'] .gacha-theme-featured__item {
  background: var(--pool-surface);
  border: 1px solid var(--pool-border);
  border-radius: 0.75rem;
  padding: 0.45rem 0.55rem;
}

.gacha-panel[data-pool-theme='eternal_slumber_bloom'] .gacha-theme-details {
  background: var(--pool-surface-strong);
  border: 1px solid var(--pool-border);
  border-radius: 0.85rem;
  padding: 0.75rem 0.9rem;
  color: var(--pool-text-secondary);
  font-size: 0.875rem;
}

.gacha-panel[data-pool-theme='eternal_slumber_bloom'] .gacha-theme-details dt {
  color: var(--pool-text-muted);
}
.gacha-panel[data-pool-theme='eternal_slumber_bloom'] .gacha-theme-details dd {
  color: var(--pool-text-primary);
}

.gacha-panel[data-pool-theme='eternal_slumber_bloom'] .gacha-awakening-panel {
  background: var(--pool-surface);
  border-color: var(--pool-border);
}

.gacha-panel[data-pool-theme='eternal_slumber_bloom'] .gacha-awakening-panel__desc,
.gacha-panel[data-pool-theme='eternal_slumber_bloom'] .gacha-awakening-panel__counts,
.gacha-panel[data-pool-theme='eternal_slumber_bloom'] .gacha-awakening-panel__note {
  color: var(--pool-text-secondary);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.gacha-panel[data-pool-theme='eternal_slumber_bloom'] .gacha-theme-details-btn,
.gacha-panel[data-pool-theme='eternal_slumber_bloom'] .btn--gacha,
.gacha-panel[data-pool-theme='eternal_slumber_bloom'] .btn--gacha-ten {
  font-size: 0.95rem;
  min-height: 2.75rem;
}

.gacha-panel[data-pool-theme='eternal_slumber_bloom'] .btn--gacha:disabled,
.gacha-panel[data-pool-theme='eternal_slumber_bloom'] .btn--gacha-ten:disabled {
  opacity: 0.55;
  color: var(--pool-text-secondary);
}

/* 單抽結果置中（與十連 grid 分離） */
.summon-result-single {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-inline: auto;
}

.summon-result-single__header {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
}

.summon-result-single__body {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.summon-result-single__showcase {
  width: 100%;
  max-width: 22rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.summon-result-single__frame {
  width: min(78vw, 17.5rem);
  max-width: 100%;
  aspect-ratio: 1;
  margin: 0.35rem auto 0.65rem;
  display: grid;
  place-items: center;
}

.summon-result-single__frame .pet-img-wrap,
.summon-result-single__frame img,
.summon-result-single__frame .pet-img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  object-fit: cover;
  margin-inline: auto;
}

.summon-result-single__status {
  margin: 0.15rem 0 0.2rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0.9;
}

.summon-result-single__name {
  margin: 0.15rem 0 0.2rem !important;
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  line-height: 1.3;
  text-align: center;
}

.summon-result-single__title {
  margin: 0 0 0.45rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  opacity: 0.88;
  text-align: center;
}

.summon-result-single__badges {
  justify-content: center !important;
  margin-inline: auto;
}

.sweet-summon-result__actions--continue,
.default-summon-result__actions--continue,
.summon-result-actions--continue {
  align-items: stretch;
}

/* 結果 Modal：提高遮罩不透明度，避免背後晨醒畫面透出 */
.modal-overlay.open:has(.summon-result-single),
.modal-overlay.open:has(.sweet-summon-result),
.modal-overlay.open:has(.default-summon-result) {
  background: rgba(4, 8, 18, 0.88);
  backdrop-filter: none;
}

body[data-theme="default"] .modal-overlay.open:has(.summon-result-single),
body[data-theme="default"] .modal-overlay.open:has(.default-summon-result),
body[data-theme="sweet"] .modal-overlay.open:has(.summon-result-single),
body[data-theme="sweet"] .modal-overlay.open:has(.sweet-summon-result) {
  background: rgba(4, 8, 18, 0.9);
  backdrop-filter: none;
}

.dream-bloom-overlay {
  background: #070b18;
  color: #f4f7ff;
}

body[data-theme="sweet"] .dream-bloom-overlay,
body[data-theme="sweet"] .dream-bloom-btn,
body[data-theme="sweet"] .dream-bloom-btn--ghost,
body[data-theme="sweet"] .dream-bloom-btn--primary,
body[data-theme="sweet"] .dream-bloom-seal__name,
body[data-theme="sweet"] .dream-bloom-summary__title,
body[data-theme="sweet"] .dream-bloom-mini-seal__name {
  color: #f4f7ff;
}

body[data-theme="sweet"] .dream-bloom-seal__title,
body[data-theme="sweet"] .dream-bloom-seal__meet,
body[data-theme="sweet"] .dream-bloom-seal__comp,
body[data-theme="sweet"] .dream-bloom-mini-seal__meet {
  color: #c7d2ea;
}

body[data-theme="sweet"] .dream-bloom-btn--ghost {
  color: #e8eef8;
}

.pool-awakening-overlay {
  opacity: 0;
}
.pool-awakening-overlay.is-ready {
  opacity: 1;
  transition: opacity 0.28s ease;
}

@media (max-width: 320px) {
  .summon-result-single__frame {
    width: min(72vw, 14.5rem);
  }
  .summon-result-single__name {
    font-size: 1.1rem !important;
  }
  .gacha-panel[data-pool-theme='eternal_slumber_bloom'] .gacha-theme-stage__tagline {
    font-size: 0.8125rem;
  }
}

/* Pool content has independent visual and unlock sections. Legacy order is retained. */
.gacha-pool-content { margin: 0 0 1rem; padding-bottom: 0.25rem; }
.gacha-pool-content > .gacha-theme-stage { margin-bottom: 0; padding-bottom: 0; }
.gacha-pool-content > .gacha-awakening-panel { position: relative; z-index: 1; }
.gacha-panel:not([data-pool-theme]) .gacha-awakening-panel {
  background: var(--color-bg-card-soft);
  border-color: var(--color-border);
  color: var(--color-text-main);
}
.gacha-panel:not([data-pool-theme]) .gacha-awakening-panel__desc,
.gacha-panel:not([data-pool-theme]) .gacha-awakening-panel__counts,
.gacha-panel:not([data-pool-theme]) .gacha-awakening-panel__note,
.gacha-panel:not([data-pool-theme]) .gacha-awakening-preview__item {
  color: var(--color-text-secondary);
}
.gacha-pool-content .gacha-theme-details-btn[hidden],
.gacha-pool-content .gacha-theme-hero[hidden] { display: none; }

/* glacier_arrival: owned, finite CSS/SVG scenery shared by debut and summon. */
.glacier-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: #09232d;
  contain: layout paint;
}
.glacier-scene__sky {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 36%, #638391 0%, #274e63 36%, #09232d 75%);
}
.glacier-scene__daybreak { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 32%, #f3c48b44, transparent 60%); }
.glacier-scene__landscape { position: absolute; width: 100%; height: 100%; inset: 0; }
.glacier-scene__sunrise { transform-box: view-box; }
.glacier-scene__reflection { opacity: .38; }
.glacier-scene__snow { fill: #ded6b9; }
.glacier-scene__wall { transform-box: fill-box; transform-origin: center; }
.glacier-scene__wall--left { transform: translateX(9%); }
.glacier-scene__wall--right { transform: translateX(-9%); }
.glacier-scene__fog {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #0d2b36aa 12%, #a7c6d8cc 48%, #28556355 78%);
  opacity: 0.95;
}
.glacier-scene__beacons ellipse { fill: #ffe5ad; filter: drop-shadow(0 0 6px #e9843c); }
.glacier-scene__vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #02111977, transparent 30%, transparent 62%, #03131cdd);
}
[data-animation='glacier_arrival'].is-active .glacier-scene__wall--left { animation: glacierLeftArrival var(--pool-scene-duration,3.4s) ease-out forwards; }
[data-animation='glacier_arrival'].is-active .glacier-scene__wall--right { animation: glacierRightArrival var(--pool-scene-duration,3.4s) ease-out forwards; }
[data-animation='glacier_arrival'].is-active .glacier-scene__fog { animation: glacierFogArrival var(--pool-scene-duration,3.4s) ease-out forwards; }
[data-animation='glacier_arrival'].is-active .glacier-scene__ship { animation: glacierShipArrival var(--pool-scene-duration,3.4s) ease-out forwards; transform-origin: 50% 62%; }
[data-animation='glacier_arrival'].is-active .glacier-scene__ripples { animation: glacierWaterArrival var(--pool-scene-duration,3.4s) ease-out forwards; transform-origin: 50% 55%; }
[data-animation='glacier_arrival'].is-active .glacier-scene__beacons ellipse { animation: glacierBeaconArrival 1s ease-out calc(0.4s + var(--i) * 0.16s) both; }
[data-animation='glacier_arrival'].is-active .glacier-scene__sunrise { animation: glacierSunrise var(--pool-scene-duration,3.4s) cubic-bezier(.4,0,.2,1) both; }
[data-animation='glacier_arrival'].is-active .glacier-scene__daybreak { animation: glacierDaybreak var(--pool-scene-duration,3.4s) ease-out both; }
[data-animation='glacier_arrival'].is-active .glacier-scene__reflection { animation: glacierSunReflection var(--pool-scene-duration,3.4s) ease-out both; }
[data-animation='glacier_arrival'].is-active .glacier-scene__snow { animation: glacierSnowLight var(--pool-scene-duration,3.4s) ease-out both; }
[data-animation='glacier_arrival'][data-state='summary'] .glacier-scene { opacity: 0.5; transition: opacity 0.35s; }
[data-animation='glacier_arrival'] .dream-bloom-seal__petal,
[data-animation='glacier_arrival'] .dream-bloom-seal__reflect { display: none; }
[data-animation='glacier_arrival'] .dream-bloom-seal { border-color: #94c4cf; background: #102d38eb; }
[data-animation='glacier_arrival'] .dream-bloom-mini-seal { background: #102d38eb; border-color: #6899a6; }
[data-animation='glacier_arrival'] .dream-bloom-summary__eyebrow { color: #f4ca8b; }
[data-animation='glacier_arrival'] .dream-bloom-btn--primary { background: #d8a469; color: #172a32; border-color: #f4ca8b; }
[data-animation='glacier_arrival'] .dream-debut-copy { align-self: end; margin-bottom: 12vh; }
[data-animation='glacier_arrival'] .dream-debut-line { text-shadow: 0 2px 12px #00131f, 0 1px 3px #00131f; }
@keyframes glacierLeftArrival { from { transform: translateX(9%); } to { transform: translateX(-5%); } }
@keyframes glacierRightArrival { from { transform: translateX(-9%); } to { transform: translateX(5%); } }
@keyframes glacierFogArrival { from { opacity: 0.95; } to { opacity: 0.15; } }
@keyframes glacierShipArrival { from { transform: translateY(-10px) scale(0.85); } to { transform: translateY(0) scale(1); } }
@keyframes glacierWaterArrival { from { transform: scaleY(0.86); opacity: 0.15; } to { transform: scaleY(1.08); opacity: 0.4; } }
@keyframes glacierBeaconArrival { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes glacierSunrise { 0%,12% { opacity: .55; transform: translateY(140px); } 70% { opacity: 1; transform: translateY(24px); } 100% { opacity: 1; transform: none; } }
@keyframes glacierDaybreak { from { opacity: 0; } to { opacity: 1; } }
@keyframes glacierSunReflection { 0%,25% { opacity: 0; } 100% { opacity: .38; } }
@keyframes glacierSnowLight { from { fill: #adcbd0; } to { fill: #ded6b9; } }

.gacha-panel[data-pool-theme='glacier_arrival'] {
  position: relative;
  overflow: hidden;
  --pool-text-primary: #edf7fa;
  --pool-text-secondary: #c5dce2;
  --pool-text-muted: #9bbec8;
  --pool-surface: #102e3c;
  --pool-border: #467183;
  --pool-accent: #f4ca8b;
  --dream-moon: #e2f3f8;
  color: var(--pool-text-primary);
  background: linear-gradient(165deg, #1b4558, #0c2634 60%, #152830);
  border-color: var(--pool-border);
}
.gacha-panel[data-pool-theme='glacier_arrival'] .gacha-pool,
.gacha-panel[data-pool-theme='glacier_arrival'] .gacha-theme-stage__atmosphere { display: none; }
.gacha-panel[data-pool-theme='glacier_arrival'] :is(.gacha-theme-stage__name, .gacha-theme-stage__eyebrow, .gacha-theme-stage__tagline, .gacha-theme-stage__meta, .gacha-theme-details-btn, .gacha-theme-details, .gacha-theme-details dd, .gacha-theme-hero__name) { color: var(--pool-text-primary); }
.gacha-panel[data-pool-theme='glacier_arrival'] :is(.gacha-theme-details dt, .gacha-theme-hero__cap, .gacha-theme-featured__item) { color: var(--pool-text-secondary); }
.gacha-panel[data-pool-theme='glacier_arrival'] :is(.gacha-theme-details, .gacha-theme-hero__cap, .gacha-theme-featured__item) { background: var(--pool-surface); border: 1px solid var(--pool-border); border-radius: 0.75rem; padding: 0.65rem; }
.gacha-panel[data-pool-theme='glacier_arrival'] .gacha-theme-stage__badge { color: var(--pool-accent); border-color: #d8a46988; }
.gacha-panel[data-pool-theme='glacier_arrival'] .btn--gacha { background: #d8a469; color: #122832; }
.gacha-panel[data-pool-theme='glacier_arrival'] .btn--gacha-ten { background: #244f60; color: #f4ca8b; border-color: #d8a469; }

/* Motion is finite. Reduced motion and skip render the arrival composition at rest. */
[data-animation='glacier_arrival']:is(.is-reduced, .is-skipped) .glacier-scene *,
[data-animation='glacier_arrival'][data-state='summary'] .glacier-scene *,
body.reduce-motion [data-animation='glacier_arrival'] .glacier-scene * { animation: none !important; transition: none !important; }
[data-animation='glacier_arrival']:is(.is-reduced, .is-skipped, [data-state='summary']) .glacier-scene__wall,
body.reduce-motion [data-animation='glacier_arrival'] .glacier-scene__wall { transform: none; }
[data-animation='glacier_arrival']:is(.is-reduced, .is-skipped, [data-state='summary']) .glacier-scene__fog,
body.reduce-motion [data-animation='glacier_arrival'] .glacier-scene__fog { opacity: 0.15; }
[data-animation='glacier_arrival']:is(.is-reduced, .is-skipped, [data-state='summary']) .glacier-scene__beacons ellipse,
body.reduce-motion [data-animation='glacier_arrival'] .glacier-scene__beacons ellipse { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  [data-animation='glacier_arrival'] .glacier-scene * { animation: none !important; transition: none !important; }
  [data-animation='glacier_arrival'] .glacier-scene__wall { transform: none; }
  [data-animation='glacier_arrival'] .glacier-scene__fog { opacity: 0.15; }
  [data-animation='glacier_arrival'] .glacier-scene__beacons ellipse { opacity: 1; }
}
@media (max-width: 480px) {
  [data-animation='glacier_arrival'] .dream-debut-copy { margin-bottom: 15vh; }
  [data-animation='glacier_arrival'] .dream-debut-line { font-size: clamp(1.2rem, 5.6vw, 1.7rem); }
}

/* First-use teaching uses the existing palette and leaves product controls interactive. */
body.onboarding-dialog-open { overflow: hidden; }
body.onboarding-active .view.active { padding-bottom: calc(var(--page-padding-bottom) + var(--onboarding-coach-space, 330px)); }
html:has(body.onboarding-active) { scroll-padding-bottom: calc(var(--nav-height) + var(--onboarding-coach-space, 330px)); }

.more-menu-icon--image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}
.more-menu-icon--image img { display: block; width: 28px; height: 28px; border-radius: 7px; }

.guide-overview,
.guide-more { margin: var(--space-4); padding: var(--space-5); }
.guide-overview__eyebrow,
.onboarding-eyebrow {
  color: var(--color-primary-light);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-2);
}
.guide-overview h2,
.guide-more h2 { font-size: 1.15rem; line-height: 1.35; margin: 0 0 var(--space-4); }
.guide-steps { list-style: none; padding: 0; margin: 0 0 var(--space-5); }
.guide-steps li {
  display: grid;
  grid-template-columns: 26px 1fr;
  column-gap: var(--space-3);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--color-border-soft);
}
.guide-step-number {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary-light);
  font-weight: 700;
  grid-row: span 2;
}
.guide-steps strong { font-size: 0.9rem; }
.guide-steps span,
.guide-overview__status { color: var(--color-text-secondary); font-size: 0.82rem; }
.guide-overview__status { margin: 0 0 var(--space-3); }
.guide-more details { border-top: 1px solid var(--color-border-soft); padding: var(--space-3) 0; }
.guide-more summary { cursor: pointer; font-weight: 600; }
.guide-more details p { margin: var(--space-2) 0 0; color: var(--color-text-secondary); font-size: 0.85rem; }

.guide-growth { margin: var(--space-4); }
.guide-growth > h2 { font-size: 1.15rem; margin-bottom: var(--space-2); }
.guide-growth > p { color: var(--color-text-secondary); font-size: .85rem; line-height: 1.6; margin-bottom: var(--space-4); }
.guide-chapters { display: grid; gap: var(--space-3); }
.guide-chapter { padding: var(--space-5); margin: 0; min-width: 0; }
.guide-chapter__top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-2); font-size: .75rem; color: var(--color-primary-light); }
.guide-chapter__status { color: var(--color-text-secondary); }
.guide-chapter__status[data-status='practiced'] { color: var(--color-success); }
.guide-chapter h3 { font-size: 1.05rem; margin: var(--space-3) 0 var(--space-2); }
.guide-chapter p { color: var(--color-text-secondary); line-height: 1.6; font-size: .85rem; }
.guide-chapter__condition { padding: var(--space-3); border-radius: var(--radius-md); background: var(--color-bg-card-soft); }
.guide-chapter__resume { color: var(--color-primary-light) !important; }
.guide-chapter .btn { min-height: 44px; width: 100%; }
.guide-growth :focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; }
.guide-quick-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.guide-more details .btn { margin-top: var(--space-3); min-height: 44px; }
.onboarding-dock__top button { min-height: 32px; }
.onboarding-dock .onboarding-practice-note { color: var(--color-text-muted); font-size: .75rem; }
.onboarding-dock__skip:disabled { opacity: .5; cursor: default; }
.onboarding-target { scroll-margin-top: 90px; }
@media (min-width: 720px) { .guide-chapters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.onboarding-scrim {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: grid;
  place-items: center;
  padding: max(16px, var(--safe-top)) 16px max(16px, var(--safe-bottom));
  background: rgba(5, 8, 20, 0.82);
  backdrop-filter: blur(8px);
}
.onboarding-dialog {
  width: min(100%, 430px);
  max-height: 92dvh;
  overflow-y: auto;
  border: 1px solid var(--color-primary-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, var(--color-bg-card-soft), var(--color-bg-surface));
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
  padding: clamp(20px, 6vw, 30px);
}
.onboarding-dialog__logo { display: block; border-radius: 16px; margin-bottom: var(--space-5); }
.onboarding-dialog h2 { font-size: clamp(1.3rem, 5vw, 1.6rem); line-height: 1.3; margin: 0 0 var(--space-3); }
.onboarding-dialog p { color: var(--color-text-secondary); margin: 0 0 var(--space-4); }
.onboarding-dialog .onboarding-eyebrow { color: var(--color-primary-light); }
.onboarding-dialog__hint { font-size: 0.82rem; }
.onboarding-dialog__actions { display: grid; gap: var(--space-2); }
.onboarding-dialog__actions .btn { width: 100%; min-height: 44px; }

.onboarding-dock {
  position: fixed;
  z-index: 150;
  left: 50%;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 10px);
  transform: translateX(-50%);
  width: min(calc(100% - 24px), 418px);
  max-height: min(45dvh, 300px);
  overflow-y: auto;
  border: 1px solid var(--color-primary-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(140deg, var(--color-bg-elevated), var(--color-bg-card));
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.42);
  padding: var(--space-4);
}
.onboarding-dock__top { display: flex; justify-content: space-between; gap: var(--space-2); color: var(--color-primary-light); font-size: 0.75rem; font-weight: 700; }
.onboarding-dock__top button,
.onboarding-dock__skip { border: 0; background: none; color: var(--color-text-secondary); cursor: pointer; text-decoration: underline; }
.onboarding-dock h2 { font-size: 1rem; line-height: 1.35; margin: var(--space-2) 0 var(--space-1); }
.onboarding-dock p { color: var(--color-text-secondary); font-size: 0.82rem; line-height: 1.5; margin: 0 0 var(--space-3); }
.onboarding-dock__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.onboarding-dock__actions .btn { flex: 1 1 125px; min-height: 40px; }
.onboarding-dock__skip { display: block; margin: var(--space-2) 0 0 auto; font-size: 0.75rem; }
.onboarding-target { outline: 3px solid var(--color-accent); outline-offset: 3px; }
.onboarding-dock :focus-visible,
.onboarding-dialog :focus-visible,
.guide-overview :focus-visible,
.guide-more :focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
body.modal-open .onboarding-dock,
body.global-mailbox-open .onboarding-dock,
body.expedition-dispatch-open .onboarding-dock,
body.is-pet-image-viewer-open .onboarding-dock { visibility: hidden; }

@media (max-width: 360px) {
  .onboarding-dock { padding: var(--space-3); max-height: 46dvh; }
  .onboarding-dock__actions .btn { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .onboarding-dock,
  .onboarding-dialog,
  .onboarding-target { animation: none !important; transition: none !important; }
}

