@media(max-width:1100px){.bl-main .tiles{grid-template-columns:repeat(2,minmax(0,1fr))}.tiles{grid-template-columns:repeat(2,minmax(0,1fr))}.tiles.c3{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:980px){
  .bl-grid{grid-template-columns:1fr}.bl-side{position:static}
  .hero{grid-template-columns:1fr}.hs{display:grid;grid-template-columns:1fr 1fr;column-gap:20px}.mini:nth-last-child(2){border:0}
  .toc{display:none}.toc-in{display:block}
  .ah{grid-template-columns:1fr}.ahimg{order:-1}
}
@media(max-width:760px){
  .aw{grid-template-columns:1fr}.rail{display:none}.bshare{display:flex}
  .row,.sk-row{grid-template-columns:130px 1fr;gap:12px}.sk-rb>:nth-child(n+3){display:none}.rb h3{font-size:15px}.rb p{display:none}
  .hs{grid-template-columns:1fr}.mini:nth-last-child(2){border-bottom:1px solid var(--line)}
}
@media(max-width:560px){
  .bl{padding-top:96px}.bl-title{font-size:23px}.hm{min-height:330px}.hi{padding:18px}.hi h2{font-size:19px}.hi p{display:none}
  .tiles,.tiles.c3{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:14px;scrollbar-width:none}
  .tiles>.tile{flex:0 0 72%;scroll-snap-align:start}
  .byline .meta{margin-right:0;width:100%}
}

@media(max-width:980px){.hs-cards .hm{min-height:220px}}
@media(max-width:560px){.hs-cards,.hs-cards.n3,.hs-cards.n4{grid-template-columns:1fr}}
@media(max-width:980px){.hs-cards .sk{min-height:220px}}
@media(max-width:560px){.hero>.hm-sk{min-height:330px}.sk-tile:nth-child(n+2){display:none}.sk-sec .tiles{display:block}}
.toc-in[hidden],.toc[hidden]{display:none!important}

/* ===== افزوده‌ها ===== */
@media(max-width:700px){
  .promo-end{grid-template-columns:1fr;padding:18px}
  .promo-end .pbtns .btn{flex:1 1 0}
  .tools .fs{margin-right:0}
}
@media(max-width:560px){
  .chip-saved{margin-inline-start:0}
  .tools .tb:not(.ic) span{font-size:12.5px}
  .snb-top{left:12px;width:42px;height:42px}
}

/* ===== بخش دسته‌ها: ۴ کارت در یک ردیف؛ اگر جا نشد، به‌جای افتادن کارت چهارم به ردیف پایین (و ایجاد فضای خالی)، همان ۴ تا حذف می‌شود ===== */
.bl-main{container-type:inline-size}
#sections .tiles{grid-template-columns:repeat(4,minmax(0,1fr))}
@container (max-width:879px){
  #sections .tiles{grid-template-columns:repeat(3,minmax(0,1fr))}
  #sections .tiles>.tile:nth-child(4){display:none}
}
@container (max-width:599px){
  #sections .tiles{grid-template-columns:repeat(2,minmax(0,1fr))}
  #sections .tiles>.tile:nth-child(4){display:grid}
}
@media(max-width:560px){
  #sections .tiles{display:flex}
  #sections .tiles>.tile:nth-child(4){display:grid}
}

/* درگ با موس روی اسلایدر کارت‌ها */
@media(max-width:560px){.tiles{cursor:grab}}
.tiles.dragging{cursor:grabbing;scroll-snap-type:none!important;user-select:none}
.tiles.dragging a{pointer-events:none}

/* ===== نمایش خیلی کوچک (موبایل‌های باریک / پنجره‌ی خیلی تنگ) ===== */
@media(max-width:480px){
  .bl{padding-left:12px;padding-right:12px}
  .bl-grid{gap:24px}
  .bl-head{gap:10px}
  .bl-title{font-size:20px}
  .bl .chip{padding:10px 12px;font-size:13px}
  .chips{margin-bottom:20px}
  .sh{font-size:17px}
  .shh a{font-size:12px}
  .sec{margin-top:32px}
  /* هیرو */
  .hero{gap:14px}
  .hm{min-height:260px;border-radius:14px}
  .hi{padding:14px;gap:6px}
  .hi h2{font-size:17px;line-height:1.7}
  .hs-cards{gap:14px}
  .hs-cards .hm,.hs-cards .sk{min-height:190px}
  .hs-cards .hi{padding:12px}
  .hs-cards .hi h2{font-size:15px}
  .meta{gap:8px 10px;font-size:11px}
  /* لیست‌ها: تصویر بالا، متن زیر (به‌جای ستون باریک کنار تصویر) */
  .hs{padding:4px 12px}
  .mini{grid-template-columns:1fr;gap:8px;padding:12px 0}
  .mini .th{aspect-ratio:16/9}
  .mini h3{font-size:14px;margin-bottom:4px}
  .row,.sk-row{grid-template-columns:1fr;gap:10px;padding:14px 0}
  .row .th,.sk-row .sk-img{aspect-ratio:16/9}
  .rb h3{font-size:15px}
  .tiles>.tile{flex-basis:84%}
  .tile h3{font-size:14px}
  .box{padding:14px}
  .pop:not(.pop-top){grid-template-columns:minmax(0,1fr) 56px;gap:10px}
  .pop:not(.pop-top)>img{width:56px;height:42px}
  .pop:not(.pop-top) a{font-size:13px}
  .bl .tgc{padding:14px}
  .tgc-ico{width:40px;height:40px;font-size:21px}
}
@media(max-width:360px){
  .bl{padding-left:10px;padding-right:10px}
  .hm{min-height:230px}
  .hi h2{font-size:15.5px}
  .tiles>.tile{flex-basis:90%}
  .bl-title{font-size:18px}
}
