/* =========================================================
   JAISANDAR 308 — mobile reading/home polish only
   ========================================================= */
@keyframes jai308Shimmer{0%{transform:translateX(-110%)}100%{transform:translateX(110%)}}

@media(max-width:900px){
  /* 1. Natural-height news cards: media keeps ratio, copy determines height. */
  body.home[data-jai-rubric="home"] .home-mobile-news-grid,
  body.home[data-jai-rubric="home"] .home-mobile-news-grid.jai-mobile-news-rotator{
    gap:14px!important;
  }
  body.home[data-jai-rubric="home"] .home-mobile-news-card,
  body.home[data-jai-rubric="home"] .jai-mobile-news-rotator .home-mobile-news-card{
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
  }
  body.home[data-jai-rubric="home"] .home-mobile-news-card>a,
  body.home[data-jai-rubric="home"] .jai-mobile-news-rotator .home-mobile-news-card>a{
    display:flex!important;
    flex-direction:column!important;
    height:auto!important;
    min-height:0!important;
    background:#0a1b20!important;
    text-decoration:none!important;
  }
  body.home[data-jai-rubric="home"] .home-mobile-news-media,
  body.home[data-jai-rubric="home"] .jai-mobile-news-rotator .home-mobile-news-media{
    position:relative!important;
    inset:auto!important;
    width:100%!important;
    height:auto!important;
    aspect-ratio:16/9!important;
    flex:0 0 auto!important;
    overflow:hidden!important;
    background:#dfe9ec!important;
  }
  body.home[data-jai-rubric="home"] .home-mobile-news-media:after{display:none!important}
  body.home[data-jai-rubric="home"] .home-mobile-news-copy,
  body.home[data-jai-rubric="home"] .jai-mobile-news-rotator .home-mobile-news-copy{
    position:relative!important;
    inset:auto!important;
    display:grid!important;
    gap:7px!important;
    padding:15px 18px 18px!important;
    background:#0a1b20!important;
  }
  body.home[data-jai-rubric="home"] .home-mobile-news-copy b{
    display:block!important;
    overflow:visible!important;
    -webkit-line-clamp:unset!important;
    font-size:clamp(1.2rem,5.4vw,1.55rem)!important;
    line-height:1.12!important;
  }

  .home-main-news-grid,.home-latest-grid{grid-template-columns:1fr!important;align-items:start!important}
  .home-story-card{height:auto!important;min-height:0!important;align-self:start!important}
  .home-story-card .home-story-visual{height:auto!important;min-height:0!important;aspect-ratio:16/9!important;display:block!important;overflow:hidden!important}
  .home-story-card .home-story-visual img{width:100%!important;height:100%!important;object-fit:cover!important}
  .home-story-card .home-story-copy{height:auto!important;min-height:0!important}
  .home-story-card .home-story-copy h3,.home-story-card .home-story-copy p{height:auto!important;max-height:none!important;-webkit-line-clamp:unset!important;overflow:visible!important}

  /* 2. Breaking / live labels stay restrained. */
  .home-story-label,.home-mobile-news-copy small,
  .breaking-label,.live-label,.live-badge,[data-live-label]{
    font-size:8px!important;line-height:1!important;letter-spacing:.09em!important;font-weight:900!important;
  }
  .breaking-label,.live-label,.live-badge,[data-live-label]{padding:4px 6px!important;border-radius:999px!important}

  /* 3. Skeletons — no empty white holes while images/charts load. */
  .home-mobile-news-media,.home-story-visual,
  .economy-line-chart:empty,.market-chart:empty,.bank-chart:empty,.budget-chart:empty,
  .trade-chart:empty,.migration-flow-chart:empty,.tenge-chart:empty,
  [data-chart]:empty{
    position:relative;
    background:#e3ecef!important;
    overflow:hidden;
  }
  .home-mobile-news-media:not(.jai-loaded):before,
  .home-story-visual:not(.jai-loaded):before,
  .economy-line-chart:empty:before,.market-chart:empty:before,.bank-chart:empty:before,.budget-chart:empty:before,
  .trade-chart:empty:before,.migration-flow-chart:empty:before,.tenge-chart:empty:before,
  [data-chart]:empty:before{
    content:"";position:absolute;z-index:2;inset:0;
    background:linear-gradient(105deg,transparent 20%,rgba(255,255,255,.62) 45%,transparent 70%);
    animation:jai308Shimmer 1.25s ease-in-out infinite;pointer-events:none;
  }
  .home-mobile-news-media.jai-loaded:before,.home-story-visual.jai-loaded:before{display:none!important}

  /* 4. Bigger tap zones: whole news card is interactive. */
  .home-mobile-news-card,.home-story-card{cursor:pointer!important;touch-action:manipulation!important}
  .home-mobile-news-card>a,.home-story-card a{touch-action:manipulation!important}

  /* 5 + 6. Auto-hide/compact bottom nav + Safari safe-area. */
  body{padding-bottom:calc(74px + max(env(safe-area-inset-bottom),8px))!important}
  .mobile-bottom-nav.jai-mobile-rubric-dock-305{
    bottom:0!important;
    padding-bottom:max(env(safe-area-inset-bottom),4px)!important;
    transform:translate3d(0,0,0)!important;
    transition:transform .24s ease,opacity .2s ease!important;
    will-change:transform!important;
  }
  .mobile-bottom-nav.jai-mobile-rubric-dock-305.jai308-compact{
    transform:translate3d(0,calc(30px + max(env(safe-area-inset-bottom),4px)),0)!important;
  }
  .mobile-bottom-nav.jai-mobile-rubric-dock-305.jai308-compact>button{
    min-height:46px!important;
    grid-template-rows:29px 0!important;
    padding:4px 2px!important;
  }
  .mobile-bottom-nav.jai-mobile-rubric-dock-305.jai308-compact>button>span{
    opacity:0!important;height:0!important;overflow:hidden!important;pointer-events:none!important;
  }
  .mobile-bottom-nav.jai-mobile-rubric-dock-305>button>span{transition:opacity .18s ease,height .18s ease!important}
  .jai305-sheet{bottom:calc(66px + max(env(safe-area-inset-bottom),8px))!important}
  body.jai305-sheet-open .mobile-bottom-nav.jai-mobile-rubric-dock-305{transform:none!important}

  /* 7. No duplicated large section headings inside Economy. */
  [data-economy-window]>.economy-hero h2,
  [data-economy-window]>.economy-hero .economy-kicker{
    display:none!important;
  }
  [data-economy-window]>.economy-hero>div>p{margin-top:0!important}

  /* 8. Remove outer white shells; keep useful inner cards. */
  .economy-window,.bank-window,.bank-rates-window,.trade-workspace{
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
    border-radius:0!important;
  }
  .economy-window,.bank-window,.bank-rates-window{padding-left:0!important;padding-right:0!important}
  .trade-workspace{padding-left:0!important;padding-right:0!important}
}

@media(prefers-reduced-motion:reduce){
  .home-mobile-news-media:not(.jai-loaded):before,.home-story-visual:not(.jai-loaded):before,
  .economy-line-chart:empty:before,.market-chart:empty:before,.bank-chart:empty:before,.budget-chart:empty:before,
  .trade-chart:empty:before,.migration-flow-chart:empty:before,.tenge-chart:empty:before,[data-chart]:empty:before{animation:none!important}
  .mobile-bottom-nav.jai-mobile-rubric-dock-305{transition:none!important}
}
