/* Jomhour Daily v29 — viewport-aware cover + compact newsroom.
   Only the newspaper homepage is affected. The issue archive and reader remain intact. */
.jdp-home.jdp-v29{padding:7px 0 14px!important}
.jdp-v29 .jdp-shell{width:min(calc(100% - 26px),1480px)}
.jdp-v29 .jdp-main-layout{grid-template-columns:minmax(0,1fr) minmax(0,.93fr);gap:clamp(12px,1.5vw,22px);align-items:start}
.jdp-v29 .jdp-section-heading,.jdp-v29 .jdp-cover-section__heading{margin:0 0 7px;min-height:42px;gap:6px}
.jdp-v29 .jdp-section-heading h1{font-size:clamp(17px,1.45vw,23px);line-height:1.4}
.jdp-v29 .jdp-cover-section__heading h2{font-size:clamp(12px,.98vw,16px);line-height:1.48;max-width:48ch}
.jdp-v29 .jdp-cover-section__info{line-height:1.5;gap:5px}
.jdp-v29 .jdp-topic__tabs{margin:0 0 7px;padding:0 0 3px;gap:5px}
.jdp-v29 .jdp-topic__tabs button{padding:6px 11px;line-height:1.4}
.jdp-v29 .jdp-topic__panel>.jdp-news__list{gap:7px}
.jdp-v29 .jdp-news-card{min-height:78px;padding:7px 9px;gap:9px;grid-template-columns:78px minmax(0,1fr);border-radius:11px}
.jdp-v29 .jdp-news-card__media{aspect-ratio:1.18;max-height:68px;border-radius:7px}
.jdp-v29 .jdp-news-card__meta{margin:0 0 2px;gap:4px}
.jdp-v29 .jdp-news-card__title{font-size:clamp(12px,.92vw,15px);line-height:1.5;-webkit-line-clamp:2}
.jdp-v29 .jdp-news-card__excerpt{font-size:10px;line-height:1.55;margin-top:2px;-webkit-line-clamp:1}
.jdp-v29 .jdp-reader{padding:6px;border-radius:11px;overflow:hidden}
.jdp-v29 .jdp-reader__toolbar{min-height:27px;padding:0 3px 5px;margin:0 0 6px}
.jdp-v29 .jdp-reader__toolbar strong{font-size:12px}
.jdp-v29 .jdp-reader__controls button{padding:4px 9px}
.jdp-v29 .jdp-cover-frame{padding:3px;min-height:0;background:#f2f4f8;border:1px solid #edf0f4}
.jdp-v29 .jdp-cover-stage{width:min(100%,var(--jdp-cover-max,560px));max-width:100%;height:auto;aspect-ratio:.707;flex:0 1 auto;box-shadow:0 5px 15px #1522381e;box-sizing:border-box}
.jdp-v29 .jdp-cover-stage>img{object-fit:fill}
.jdp-v29 .jdp-reader .jdp-pages{padding-top:5px;margin-top:6px}
.jdp-v29 .jdp-reader .jdp-pages__heading{margin-bottom:4px;min-height:0;gap:5px}
.jdp-v29 .jdp-pages__heading :is(h3,span){font-size:10px;line-height:1.35}
.jdp-v29 .jdp-reader .jdp-page-thumb{padding:3px;gap:2px;flex-basis:min(var(--jdp-thumb-size,108px),70px);width:min(var(--jdp-thumb-size,108px),70px);border-radius:7px}
.jdp-v29 .jdp-pages__rail{gap:6px;padding-bottom:4px}
.jdp-v29 .jdp-page-thumb__label{font-size:10px;line-height:1.3}
.jdp-v29 .jdp-reader__footer{padding:5px 2px 0;margin-top:6px;font-size:10px;gap:6px}
.jdp-v29 .jdp-reader__footer div{gap:8px}
.jdp-v29--comfortable .jdp-news-card{min-height:92px;padding:10px;grid-template-columns:90px minmax(0,1fr)}
.jdp-v29--comfortable .jdp-news-card__media{max-height:80px}
.jdp-v29--comfortable .jdp-news-card__excerpt{-webkit-line-clamp:2}
.jdp-v29--comfortable .jdp-reader{padding:10px}
/* Desktop only: the cover fits the remaining viewport; no cropping and no image stretch.
   We leave a small safety margin for the WP admin bar and browser variations. */
@media(min-width:881px){
  .jdp-v29--fit .jdp-cover-stage{height:min(var(--jdp-cover-height,515px),max(320px,calc(100dvh - 265px)));width:auto;max-width:100%;aspect-ratio:.707;min-width:0}
  .jdp-v29--fit .jdp-cover-frame{align-items:center}
  .jdp-v29--news-scroll .jdp-topic__panel>.jdp-news__list{max-height:calc(100dvh - 160px);min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:1px 5px 3px 1px}
  .jdp-v29--news-scroll .jdp-topic__panel>.jdp-news__list:focus-within{scrollbar-color:#bd1733 #eef2f5}
}
@media(min-width:881px) and (max-height:700px){
  .jdp-v29--fit .jdp-cover-stage{height:min(var(--jdp-cover-height,515px),max(270px,calc(100dvh - 232px)))}
  .jdp-v29 .jdp-reader__footer>span{display:none}
}
@media(max-width:880px){
  .jdp-v29 .jdp-main-layout{grid-template-columns:minmax(0,1fr);gap:12px}
  .jdp-v29 .jdp-cover-section{order:1}
  .jdp-v29 .jdp-news{order:2}
  .jdp-v29 .jdp-cover-stage{width:min(100%,var(--jdp-cover-max,560px));height:auto}
  .jdp-v29 .jdp-section-heading{margin-top:5px}
  .jdp-v29 .jdp-news-card{grid-template-columns:86px minmax(0,1fr);min-height:90px}
  .jdp-v29 .jdp-news-card__media{max-height:77px}
}
@media(max-width:540px){
  .jdp-v29 .jdp-shell{width:calc(100% - 16px)}
  .jdp-v29 .jdp-cover-section__heading{align-items:start;gap:5px}
  .jdp-v29 .jdp-cover-section__view{font-size:9px}
  .jdp-v29 .jdp-reader{padding:4px}
  .jdp-v29 .jdp-news-card{min-height:80px;padding:7px;grid-template-columns:77px minmax(0,1fr)}
  .jdp-v29 .jdp-news-card__media{max-height:67px}
  .jdp-v29 .jdp-news-card__title{font-size:12px}
  .jdp-v29 .jdp-reader__footer{flex-wrap:wrap}
}
/* Slim page rail in viewport-fit mode: all pages remain selectable in place. */
@media(min-width:881px){
 .jdp-v29--fit .jdp-reader .jdp-pages{margin-top:4px;padding-top:4px}
 .jdp-v29--fit .jdp-pages__heading{display:none}
 .jdp-v29--fit .jdp-reader .jdp-page-thumb{flex-basis:54px;width:54px;padding:2px;gap:1px}
 .jdp-v29--fit .jdp-reader .jdp-page-thumb img,.jdp-v29--fit .jdp-reader .jdp-page-thumb__placeholder{aspect-ratio:.95;object-fit:contain;max-height:56px}
 .jdp-v29--fit .jdp-reader .jdp-page-thumb__label{font-size:9px}
 .jdp-v29--fit .jdp-reader__footer>span{display:none}
 .jdp-v29--fit .jdp-reader__footer{padding-top:4px;margin-top:3px}
 .jdp-v29--fit .jdp-cover-stage{height:min(var(--jdp-cover-height,515px),max(275px,calc(100dvh - 355px)))}
}
@media(min-width:881px) and (max-height:660px){
 .jdp-v29--fit .jdp-cover-stage{height:min(var(--jdp-cover-height,515px),max(235px,calc(100dvh - 325px)))}
}
/* Final viewport QA adjustment: include footer and WordPress admin bar within desktop budget. */
@media(min-width:881px){
 .jdp-v29 .jdp-main-layout{grid-template-columns:minmax(0,1.25fr) minmax(0,.75fr)}
 .jdp-v29--fit .jdp-cover-stage{height:min(var(--jdp-cover-height,515px),max(270px,calc(100dvh - 430px)))}
 .jdp-v29 .jdp-cover-frame{background:transparent;border:0;box-shadow:none;padding:0}
 .jdp-v29--fit .jdp-cover-stage{box-shadow:0 4px 14px rgba(12,22,42,.15);border:1px solid #e0e5eb}
}
@media(min-width:881px){
 .jdp-v29--news-scroll .jdp-topic__panel>.jdp-news__list{max-height:max(295px,calc(100dvh - 280px))}
}
