/* =========================================================
   RÜYA V41 FINAL
   GERÇEK 8091 FIT ENGINE
   Canlı header + canlı bottom nav korunur.
   ========================================================= */

html.ruyaV41Home,
html.ruyaV41Home body{
  width:100%!important;
  height:100dvh!important;
  min-height:0!important;
  max-height:100dvh!important;
  overflow:hidden!important;
  overscroll-behavior:none!important;
  background:#fff!important;
}

html.ruyaV41Home body #root,
html.ruyaV41Home body #root .role-parent{
  height:100dvh!important;
  min-height:0!important;
  max-height:100dvh!important;
  overflow:hidden!important;
}

/* Tarihî parentMain alt boşluklarını bu sayfada tamamen iptal et */
html.ruyaV41Home body
#root .role-parent .main.parentMain{
  min-height:0!important;
  margin:0!important;
  padding-bottom:0!important;
  overflow:hidden!important;
  overscroll-behavior:none!important;
}

/* KRİTİK:
   Eski %100 / parent grid zincirini kullanmıyoruz.
   Header doğal yüksekliğinde kalır.
   Altındaki alan JS ile gerçek px olarak ölçülür.
*/
html.ruyaV41Home body .ruyaFitHomeV35{
  width:100%!important;

  height:auto!important;
  min-height:0!important;
  max-height:none!important;

  display:block!important;

  margin:0!important;
  padding:0!important;

  overflow:visible!important;
  background:#fff!important;
}

/* Header'a hiçbir boyut vermiyoruz */
html.ruyaV41Home body
.ruyaFitHomeV35 > .v52ParentHeader{
  position:relative!important;
  width:100%!important;
}

/* =========================================================
   HEADER'DAN SONRAKİ GERÇEK KULLANILABİLİR ALAN
   ========================================================= */

html.ruyaV41Home body .ruyaFitHomeV35Body{
  width:100%!important;

  height:var(--ruya-v41-body-h)!important;
  min-height:0!important;
  max-height:var(--ruya-v41-body-h)!important;

  display:grid!important;

  grid-template-rows:
    clamp(108px,15dvh,128px)
    minmax(0,1fr)!important;

  gap:7px!important;

  padding:
    3px
    12px
    7px!important;

  margin:0!important;

  box-sizing:border-box!important;
  overflow:hidden!important;

  background:#fff!important;
}

/* HERO */
html.ruyaV41Home body .ruyaFitHeroV35{
  min-width:0!important;
  min-height:0!important;
  height:100%!important;
  overflow:hidden!important;
}

html.ruyaV41Home body .ruyaFitHeroV35 img{
  object-fit:contain!important;
}

/* =========================================================
   8091'İN ASIL CONTENT MOTORU

   Rüya'da Bugün   = kontrollü
   2x2 grid         = KALAN ALANIN TAMAMI
   Çocuğumu Hazırla= kontrollü
   ========================================================= */

html.ruyaV41Home body .ruyaFitContentV35{
  width:100%!important;
  height:100%!important;

  min-width:0!important;
  min-height:0!important;

  display:grid!important;

  grid-template-rows:
    clamp(62px,9.5dvh,78px)
    minmax(0,1fr)
    clamp(88px,12dvh,104px)!important;

  gap:7px!important;

  align-content:stretch!important;
  overflow:hidden!important;
}

/* BUGÜN */
html.ruyaV41Home body .ruyaTodayV35{
  width:100%!important;
  height:100%!important;

  min-width:0!important;
  min-height:0!important;
  max-height:none!important;

  aspect-ratio:auto!important;

  align-self:stretch!important;
}

/* =========================================================
   2x2 — cihazın kalan yüksekliğini otomatik paylaşır
   ========================================================= */

html.ruyaV41Home body .ruyaFitGridV35{
  width:100%!important;
  height:100%!important;

  min-width:0!important;
  min-height:0!important;
  max-height:none!important;

  display:grid!important;

  grid-template-columns:
    repeat(2,minmax(0,1fr))!important;

  grid-template-rows:
    repeat(2,minmax(0,1fr))!important;

  gap:7px!important;

  align-items:stretch!important;
  overflow:hidden!important;
}

html.ruyaV41Home body
.ruyaFitGridV35 > .ruyaFitCardV35{
  width:100%!important;
  height:100%!important;

  min-width:0!important;
  min-height:0!important;
  max-width:none!important;
  max-height:none!important;

  aspect-ratio:auto!important;

  align-self:stretch!important;

  display:grid!important;
  grid-template-columns:40% minmax(0,1fr)!important;
}

/* Kart büyür; İKON büyüyüp gerilmez */
html.ruyaV41Home body
.ruyaFitCardV35 > img{
  display:block!important;

  width:100%!important;
  height:88%!important;

  max-width:none!important;
  max-height:96px!important;

  align-self:center!important;
  justify-self:center!important;

  object-fit:contain!important;
  object-position:center!important;
}

/* =========================================================
   ÇOCUĞUMU HAZIRLA
   ========================================================= */

html.ruyaV41Home body .ruyaFitPickupV35{
  width:100%!important;
  height:100%!important;

  min-width:0!important;
  min-height:0!important;
  max-height:none!important;

  aspect-ratio:auto!important;

  align-self:stretch!important;
}

html.ruyaV41Home body
.ruyaFitPickupV35 > img{
  width:100%!important;
  height:92%!important;

  max-height:92%!important;

  object-fit:contain!important;
  object-position:center!important;
}

/* Tıklamalar */
html.ruyaV41Home body .ruyaTodayV35,
html.ruyaV41Home body .ruyaFitCardV35,
html.ruyaV41Home body .ruyaFitPickupV35,
html.ruyaV41Home body .ruyaFitSwitchChildV35{
  position:relative!important;
  z-index:5!important;

  pointer-events:auto!important;
  touch-action:manipulation!important;
  cursor:pointer!important;
}

html.ruyaV41Home body .ruyaTodayV35 > *,
html.ruyaV41Home body .ruyaFitCardV35 > *,
html.ruyaV41Home body .ruyaFitPickupV35 > *{
  pointer-events:none!important;
}

/* =========================================================
   SHORT — 8091 < 740 px
   ========================================================= */

html.ruyaV41Home body
.ruyaFitHomeV35.ruyaV41Short
.ruyaFitHomeV35Body{
  grid-template-rows:
    100px
    minmax(0,1fr)!important;

  gap:5px!important;

  padding-top:1px!important;
  padding-bottom:4px!important;
}

html.ruyaV41Home body
.ruyaFitHomeV35.ruyaV41Short
.ruyaFitContentV35{
  grid-template-rows:
    54px
    minmax(0,1fr)
    78px!important;

  gap:5px!important;
}

html.ruyaV41Home body
.ruyaFitHomeV35.ruyaV41Short
.ruyaFitGridV35{
  gap:5px!important;
}

html.ruyaV41Home body
.ruyaFitHomeV35.ruyaV41Short
.ruyaFitCardV35 > img{
  max-height:74px!important;
}

html.ruyaV41Home body
.ruyaFitHomeV35.ruyaV41Short
.ruyaFitPickupV35 > img{
  max-height:70px!important;
}

html.ruyaV41Home body
.ruyaFitHomeV35.ruyaV41Short
.ruyaFitSmileV35{
  max-width:75px!important;
}

/* =========================================================
   VERY SHORT — 8091 < 670 px
   ========================================================= */

html.ruyaV41Home body
.ruyaFitHomeV35.ruyaV41VeryShort
.ruyaFitHomeV35Body{
  grid-template-rows:
    88px
    minmax(0,1fr)!important;

  gap:4px!important;
}

html.ruyaV41Home body
.ruyaFitHomeV35.ruyaV41VeryShort
.ruyaFitContentV35{
  grid-template-rows:
    50px
    minmax(0,1fr)
    68px!important;

  gap:4px!important;
}

html.ruyaV41Home body
.ruyaFitHomeV35.ruyaV41VeryShort
.ruyaFitGridV35{
  gap:4px!important;
}

html.ruyaV41Home body
.ruyaFitHomeV35.ruyaV41VeryShort
.ruyaFitSmileV35{
  max-width:64px!important;
}

/* Dar Android / küçük iPhone */
@media(max-width:370px){
  html.ruyaV41Home body .ruyaFitHomeV35Body{
    padding-left:8px!important;
    padding-right:8px!important;
  }

  html.ruyaV41Home body .ruyaFitGridV35{
    gap:6px!important;
  }
}

/* =========================================================
   TABLET — telefon arayüzünü devleştirme
   ========================================================= */

@media(min-width:700px){

  html.ruyaV41Home body .ruyaFitHomeV35Body{
    width:min(92vw,720px)!important;
    margin:0 auto!important;

    grid-template-rows:
      clamp(116px,14dvh,142px)
      minmax(0,1fr)!important;

    gap:10px!important;

    padding-left:20px!important;
    padding-right:20px!important;
  }

  html.ruyaV41Home body .ruyaFitContentV35{
    grid-template-rows:
      clamp(70px,9dvh,86px)
      minmax(0,1fr)
      clamp(88px,11dvh,104px)!important;

    gap:10px!important;
  }

  html.ruyaV41Home body .ruyaFitGridV35{
    gap:10px!important;
  }
}

/* =========================================================
   V41 SMILE FIX
   Sadece gülen yüzü %15 küçült ve biraz içeri al.
   Layout'a dokunma.
   ========================================================= */

html.ruyaV41Home body .ruyaFitHomeV35 .ruyaFitSmileV35,
html.ruyaV41Home body .ruyaFitHomeV35 .ruyaFitHeroV35 > img:last-child,
html.ruyaV41Home body .ruyaFitHomeV35 img[src*="hero-smile"]{
  transform: translateX(-12px) scale(0.85) !important;
  transform-origin: center center !important;
}


/* V41 · RÜYA'DA BUGÜN
   Ölçüye ve layout'a dokunmaz.
   Sadece zemin + ok kaldırma.
*/

html.ruyaV41Home body .ruyaFitHomeV35 .ruyaTodayV35{
  background:
    radial-gradient(
      circle at 88% 30%,
      rgba(205,228,250,.72) 0 34px,
      transparent 35px
    ),
    radial-gradient(
      circle at 78% 100%,
      rgba(220,238,253,.70) 0 58px,
      transparent 59px
    ),
    linear-gradient(
      135deg,
      #eef7ff 0%,
      #f5faff 52%,
      #ffffff 100%
    ) !important;

  border-color:#cbdceb !important;

  box-shadow:
    0 6px 18px rgba(11,47,99,.055),
    inset 0 1px 0 rgba(255,255,255,.95) !important;
}

/* Sadece sağdaki ok gizlenir */
html.ruyaV41Home body
.ruyaFitHomeV35
.ruyaTodayV35 > :last-child{
  visibility:hidden !important;
  pointer-events:none !important;
}


/* =========================================================
   V41 · TODAY ICON + TITLE
   KART ÖLÇÜSÜ / FIT / GRID DEĞİŞMEZ
   ========================================================= */

/* Takvim ikonunu büyüt */
html.ruyaV41Home body
.ruyaFitHomeV35
.ruyaTodayIconV35 img{
  width:52px!important;
  height:52px!important;
  max-width:52px!important;
  max-height:52px!important;
  object-fit:contain!important;
}

/* Rüya’da Bugün = Çocuğumu Hazırla ile aynı tipografi */
html.ruyaV41Home body
.ruyaFitHomeV35
.ruyaTodayV35 > :nth-child(2),
html.ruyaV41Home body
.ruyaFitHomeV35
.ruyaTodayV35 h3,
html.ruyaV41Home body
.ruyaFitHomeV35
.ruyaTodayV35 strong,
html.ruyaV41Home body
.ruyaFitHomeV35
.ruyaTodayV35 .ruyaTodayTitleV35,
html.ruyaV41Home body
.ruyaFitHomeV35
.ruyaTodayV35 .ruyaTodayTitle{
  font-size:clamp(14px,3.8vw,18px)!important;
  font-weight:800!important;
  line-height:1.05!important;
}

/* Çok kısa ekranlarda ikon taşmasın ama yine eski halinden büyük kalsın */
html.ruyaV41Home body
.ruyaFitHomeV35.ruyaV41VeryShort
.ruyaTodayIconV35 img{
  width:46px!important;
  height:46px!important;
  max-width:46px!important;
  max-height:46px!important;
}


/* =========================================================
   V41 · TODAY ICON + TITLE
   KART ÖLÇÜSÜ / FIT / GRID DEĞİŞMEZ
   ========================================================= */

/* Takvim ikonunu büyüt */
html.ruyaV41Home body
.ruyaFitHomeV35
.ruyaTodayIconV35 img{
  width:52px!important;
  height:52px!important;
  max-width:52px!important;
  max-height:52px!important;
  object-fit:contain!important;
}

/* Rüya’da Bugün = Çocuğumu Hazırla ile aynı tipografi */
html.ruyaV41Home body
.ruyaFitHomeV35
.ruyaTodayV35 > :nth-child(2),
html.ruyaV41Home body
.ruyaFitHomeV35
.ruyaTodayV35 h3,
html.ruyaV41Home body
.ruyaFitHomeV35
.ruyaTodayV35 strong,
html.ruyaV41Home body
.ruyaFitHomeV35
.ruyaTodayV35 .ruyaTodayTitleV35,
html.ruyaV41Home body
.ruyaFitHomeV35
.ruyaTodayV35 .ruyaTodayTitle{
  font-size:clamp(14px,3.8vw,18px)!important;
  font-weight:800!important;
  line-height:1.05!important;
}

/* Çok kısa ekranlarda ikon taşmasın ama yine eski halinden büyük kalsın */
html.ruyaV41Home body
.ruyaFitHomeV35.ruyaV41VeryShort
.ruyaTodayIconV35 img{
  width:46px!important;
  height:46px!important;
  max-width:46px!important;
  max-height:46px!important;
}

