/* ─────────────────────────────────────────────────────────────
   MiniMümin — Bölge Açılış Hikâyesi Kartı (Dalga 4 / madde 4.2)
   Yalnız .wstory-* sınıfları. js/world-stories.js bu kartı kurar.
   Telefon (375px): tam genişlik alt kart · ≥768px: ortalanmış 480px.
   z-index ölçümü: main.css en yüksek katman 100 (uyku ekranı), toast
   9998/9999. Oyun içi katmanlar (games.css) en fazla 100. 210, oyun
   katmanlarının üstünde ve toast'ın altında kalır → bildirim görünür.
   ───────────────────────────────────────────────────────────── */

.wstory-overlay {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(20, 26, 40, .45);
  padding: 0;
}

.wstory-card {
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 18px 18px 20px;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(165deg, #FFFDF5 0%, #F1FAF4 100%);
  box-shadow: 0 -8px 28px rgba(20, 26, 40, .22);
  /* D8-D: yatay (812x375) ekranda kart viewport'tan taşıyordu; kapat ve
     "Başla" düğmeleri erişilemez kalıyordu. Kart kendi içinde kayar. */
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  animation: wstory-rise .32s cubic-bezier(.2, .8, .3, 1) both;
}

@keyframes wstory-rise {
  from { transform: translateY(100%); opacity: .4; }
  to   { transform: translateY(0);    opacity: 1; }
}

.wstory-nur {
  width: 96px;
  height: 96px;
  object-fit: contain;
  flex: 0 0 auto;
  pointer-events: none;
}

.wstory-title {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.25;
  color: #2D4A3E;
}

.wstory-text {
  margin: 0;
  max-width: 34ch;
  font-size: 1.02rem;
  line-height: 1.5;
  color: #3B4A55;
}

/* Dokunma hedefi ≥56px (2-8 yaş ergonomisi) */
.wstory-go {
  min-width: 168px;
  min-height: 56px;
  margin-top: 4px;
  padding: 0 26px;
  border: none;
  border-radius: 28px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #FFFFFF;
  background: linear-gradient(160deg, #34B27B 0%, #1E8F62 100%);
  box-shadow: 0 4px 12px rgba(30, 143, 98, .32);
  cursor: pointer;
  touch-action: manipulation;
}

.wstory-go:active {
  transform: scale(.97);
}

.wstory-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
  color: #55606B;
  background: rgba(255, 255, 255, .75);
  cursor: pointer;
  touch-action: manipulation;
}

.wstory-close:active {
  background: rgba(230, 236, 240, .95);
}

/* ≥768px — masaüstü/tablet: ortalanmış 480px kart */
@media (min-width: 768px) {
  .wstory-overlay {
    align-items: center;
    padding: 24px;
  }
  .wstory-card {
    width: 480px;
    max-width: 480px;
    border-radius: 26px;
    box-shadow: 0 18px 44px rgba(20, 26, 40, .28);
  }
  .wstory-nur {
    width: 120px;
    height: 120px;
  }
}

/* Hareket azaltma tercihi: kayma animasyonu YOK */
@media (prefers-reduced-motion: reduce) {
  .wstory-card {
    animation: none;
  }
}
