/* ALAMANAH MOBILE REFERENCE V2 — Kemenag-style mobile composition, no desktop changes */
@media(min-width:781px){.m-portal{display:none!important}}
@media(max-width:780px){
  .top,.masthead,.nav-shell,body>main,body>footer.footer{display:none!important}
  html,body{overflow-x:hidden!important;max-width:100%;background:#fff!important}
  .m-portal{display:block;font-family:Arial,"Segoe UI",sans-serif;font-size:13px;color:#252f29;background:#fff;min-height:100vh}
  .m-portal *{box-sizing:border-box}.m-portal img{display:block;max-width:100%}.m-portal a{text-decoration:none;color:inherit}
  .m-portal button{cursor:pointer;font:inherit}.m-portal :focus-visible{outline:2px solid #0c7d47;outline-offset:3px}
  .m-header{height:62px;display:flex;justify-content:space-between;align-items:center;background:#fff;padding:0 13px;box-shadow:0 2px 6px rgba(0,0,0,.07);position:sticky;top:0;z-index:120;gap:8px}
  .m-brand{min-width:0;display:flex;align-items:center;gap:7px;flex:1;white-space:nowrap}
  .m-brand img{width:31px;height:32px;object-fit:contain}.m-logo-letter{display:grid;place-items:center;width:31px;height:32px;background:#126e3a;color:#fff;border-radius:4px}
  .m-brand strong{color:#11693a;font-size:15px;letter-spacing:-.35px;font-weight:800;overflow:hidden;text-overflow:ellipsis}
  .m-tools{display:flex;align-items:center;gap:1px;flex:0 0 auto}.m-tool{border:0;background:none;display:flex;align-items:center;justify-content:center;height:42px;width:34px;color:#222}
  .m-tool svg{width:20px;height:20px}.m-language-toggle{font-size:15px;gap:1px;width:54px}.m-language-toggle span{font-size:13px;align-self:center}.m-language-toggle i{font-style:normal;font-size:13px;margin-left:2px}
  .m-hamburger{width:32px}.m-hamburger svg{width:22px;height:22px}
  .m-lang-popup{position:fixed;z-index:135;right:50px;top:59px;background:white;box-shadow:0 12px 35px rgba(0,0,0,.15);border:1px solid #e8ebe9;padding:6px;border-radius:4px;min-width:170px}
  .m-lang-popup[hidden],.m-search-panel[hidden],.m-nav-overlay[hidden],.m-menu[hidden],.m-menu-children[hidden]{display:none!important}
  .m-lang-popup button{display:block;text-align:left;width:100%;background:#fff;border:0;border-radius:4px;padding:11px 9px;color:#2b4737}.m-lang-popup button:hover{background:#edf6ef}
  .m-search-panel{position:fixed;z-index:140;left:0;right:0;top:62px;background:white;box-shadow:0 15px 30px rgba(0,0,0,.17);padding:15px}.m-search-panel label{display:block;font-weight:700;color:#0b7040;margin-bottom:9px}
  .m-search-panel input{width:100%;border:1px solid #b7cabd;border-radius:5px;background:#fff;min-height:44px;padding:10px 12px;outline-offset:2px}
  .m-search-links{max-height:240px;overflow:auto}.m-search-links a{display:none;border-bottom:1px solid #e8eee9;padding:11px 2px;line-height:1.4;font-size:12px}.m-search-links a.m-match{display:block}.m-search-links p{color:#6d766e}
  .m-nav-overlay{position:fixed;inset:62px 0 0;background:rgba(13,30,17,.34);z-index:119}.m-menu{position:fixed;top:62px;left:0;right:0;background:#fff;z-index:121;padding:0 17px 19px;max-height:calc(100dvh - 62px);overflow-y:auto;box-shadow:0 16px 32px rgba(0,0,0,.15)}
  .m-menu-label{font-size:11px;color:#0d663f;font-weight:800;letter-spacing:1.8px;display:flex;justify-content:space-between;align-items:center;padding:18px 0 10px;border-bottom:1px solid #e9ecea}
  .m-menu-label button{background:transparent;border:0;font-size:24px;font-weight:400}.m-menu-parent{display:flex;justify-content:space-between;align-items:center;width:100%;border:0;border-bottom:1px solid #edf0ed;background:white;color:#283b2d;min-height:48px;padding:13px 2px;font-size:15px;font-weight:650;text-align:left}
  .m-menu-parent span{font-size:17px;color:#0a7441}.m-menu-children{background:#f7faf8;padding:3px 12px 8px}.m-menu-children a{display:block;padding:12px 5px;border-bottom:1px solid #e5ece7;color:#3b5945;font-size:13px}
  .m-site{background:#fff}
  .m-banner{padding:14px 12px 0}.m-banner-link{width:100%;height:68px;position:relative;display:block;overflow:hidden;border-radius:4px;background:linear-gradient(100deg,#2eae3c,#e8ecd4);box-shadow:0 1px 4px rgba(0,0,0,.06)}
  .m-banner-link img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 50%}.m-banner-veil{position:absolute;inset:0;background:linear-gradient(90deg,rgba(31,145,53,.98) 0%,rgba(35,152,54,.88) 35%,rgba(3,88,47,.03) 100%)}
  .m-banner-caption{position:absolute;top:50%;left:12px;transform:translateY(-50%);display:flex;flex-direction:column;gap:2px;width:59%;color:white;line-height:1.15}.m-banner-caption strong{font-weight:850;font-size:14px;letter-spacing:-.2px}.m-banner-caption small{font-weight:600;font-size:9px;line-height:1.25;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .m-banner-arrow{position:absolute;right:9px;bottom:6px;color:#fff;font-size:24px;text-shadow:0 1px 3px #024}
  .m-ticker{margin:16px 12px 0;display:flex;align-items:stretch;min-height:30px;overflow:hidden}
  .m-ticker>strong{flex:0 0 auto;display:flex;align-items:center;background:#076e39;color:white;font-size:10px;line-height:1;padding:0 10px;white-space:nowrap;font-weight:780;letter-spacing:.1px}
  .m-ticker-window{overflow:hidden;min-width:0;flex:1;background:#fafcf9;border-block:1px solid #e6efe7}
  .m-ticker-track{display:flex;align-items:center;width:max-content;white-space:nowrap;animation:m-ticker 36s linear infinite;min-height:29px;gap:17px;padding-left:12px}
  .m-ticker-track a{font-size:11px;font-weight:650;color:#26723e}.m-ticker-track .m-dot{font-size:7px;color:#b8cab5}
  @keyframes m-ticker{0%{transform:translateX(0)}100%{transform:translateX(-55%)}}
  .m-stories{padding:17px 0 0}.m-story-rail{display:flex;gap:10px;padding:0 12px 6px;scroll-snap-type:x mandatory;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}.m-story-rail::-webkit-scrollbar{display:none}
  .m-story-card{flex:0 0 115px;height:170px;position:relative;overflow:hidden;background:#193f2b;scroll-snap-align:start}.m-story-card:after{content:"";position:absolute;inset:40% 0 0;background:linear-gradient(transparent,rgba(0,0,0,.85));pointer-events:none}
  .m-story-card img{height:100%;width:100%;object-fit:cover}.m-story-no-image{height:100%;display:grid;place-items:center;background:linear-gradient(145deg,#b0d8bd,#1a7950);color:white;font-size:11px;font-weight:700}
  .m-story-title{position:absolute;z-index:2;bottom:8px;left:7px;right:7px;color:white;font-size:11px;font-weight:670;line-height:1.35;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;text-shadow:0 1px 3px #333}
  .m-pojok{margin:17px 12px 0;padding:15px 12px 13px;border:1px solid #e9dfac;border-left:3px solid #92bf99;border-radius:8px;background:linear-gradient(105deg,#eaf8f0,#fff9e6);box-shadow:0 2px 7px rgba(22,67,21,.07);overflow:hidden;min-height:138px}
  .m-panel-top{display:flex;align-items:center;justify-content:space-between;gap:8px;position:relative}.m-panel-top h2{position:relative;margin:0;color:#357449;font-size:17px;font-weight:490;letter-spacing:-.25px;padding-bottom:8px}.m-panel-top h2:after,.m-block-title h2:after{content:"";position:absolute;left:0;bottom:0;width:39px;height:3px;background:#0b7a40}
  .m-panel-top a{color:#43844e;font-size:11px;white-space:nowrap}
  .m-pojok-body{display:flex;align-items:end;gap:9px;min-height:90px}.m-pojok-list{flex:1;min-width:0}.m-pojok-list a{display:block;padding-top:8px}.m-pojok-list strong{font-size:12px;font-weight:700;line-height:1.3;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
  .m-pojok-list small{font-size:10px;display:block;color:#999;margin-top:4px}.m-pojok-logo{width:49px;height:49px;object-fit:contain;opacity:.9;filter:drop-shadow(0 2px 1px #dfecd8)}
  .m-headline{padding:18px 12px 0}.m-lead-card{display:block;background:#fff;border-bottom:1px solid #edf0ed}.m-lead-card>img{width:100%;max-height:none;aspect-ratio:1.21;object-fit:cover;background:#e2ebe4}
  .m-lead-info{padding:15px 13px 17px}.m-news-category{font-weight:750;color:#43885f;font-size:10px;letter-spacing:.5px;text-transform:uppercase}.m-lead-info h1{font-size:19px;font-weight:790;line-height:1.32;color:#181d18;margin:7px 0 10px;letter-spacing:-.45px}
  .m-lead-info time,.m-mini-news small,.m-latest-card time,.m-rank-item time{font-size:10px;color:#979b96}
  .m-mini-news{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:14px 1px;border-bottom:1px solid #ecefed}.m-mini-news>div{flex:1;min-width:0}.m-mini-news h3{font-size:13px;line-height:1.4;margin:5px 0 7px;font-weight:740;color:#212922}.m-mini-news img{width:85px;height:65px;object-fit:cover;background:#edf2ee}
  .m-info-banner{margin:26px 12px 0;min-height:65px;display:flex;align-items:center;gap:10px;overflow:hidden;padding:10px 13px;border-radius:3px;background:linear-gradient(100deg,#e0ebdf,#70c75d 50%,#13834a);position:relative}
  .m-info-banner span:not(.m-info-decor){position:relative;display:flex;flex-direction:column;z-index:2;color:#064f2e;gap:3px}
  .m-info-banner small{font-size:9px;letter-spacing:.7px;font-weight:760}.m-info-banner strong{font-size:13px;line-height:1.2;font-weight:830}.m-info-banner em{font-size:10px;font-style:normal;font-weight:760;color:#145b3f}
  .m-info-decor{position:absolute;right:19px;top:-15px;font-size:85px;opacity:.18;color:#fff}
  .m-block{padding:29px 12px 0}.m-block-title{display:flex;justify-content:space-between;align-items:flex-start;gap:8px;margin-bottom:24px}.m-block-title h2{position:relative;margin:0;color:#2d7448;font-size:19px;font-weight:530;padding-bottom:9px}.m-block-title a{color:#568860;font-size:11px;margin-top:4px}
  .m-latest-card{display:flex;align-items:flex-start;gap:13px;padding:14px 0;border-bottom:1px solid #ebefeb}.m-latest-card img{order:2;width:95px;height:76px;object-fit:cover;flex:0 0 95px;background:#e2ebdf}.m-latest-card div{flex:1;min-width:0}
  .m-latest-card h3{font-size:13px;font-weight:720;line-height:1.38;margin:6px 0 9px;color:#292e2a}.m-latest-card.m-latest-lead{display:block;padding:0 0 15px}.m-latest-lead img{width:100%;height:auto;aspect-ratio:1.75;object-fit:cover;margin-bottom:12px}
  .m-latest-lead h3{font-size:16px;line-height:1.42;margin:8px 0 8px}.m-rank-block{padding-top:30px}.m-rank-item{display:flex;align-items:flex-start;gap:15px;border-bottom:1px solid #e5eae5;padding:15px 0}.m-rank-number{flex:0 0 28px;color:#248a46;font-size:37px;line-height:1;font-weight:800}
  .m-rank-detail{flex:1;min-width:0}.m-rank-detail small{font-size:10px;color:#4a8b61}.m-rank-detail strong{display:block;margin:5px 0 9px;font-size:12px;line-height:1.3;color:#222}.m-rank-detail time{display:block}
  .m-green-panel{background:linear-gradient(140deg,#e6f6ee,#fff9e5);border:1px solid #e5edcf;border-left:3px solid #91c098;border-radius:7px;margin:29px 12px 5px;padding:15px 12px}.m-information-list{margin-top:10px}.m-information-list a{display:flex;justify-content:space-between;border-bottom:1px solid #dbeade;padding:12px 0;font-size:12px;color:#26362b;font-weight:700}.m-information-list a:last-child{border:0}.m-information-list span{font-size:18px;color:#43865d}
  .m-activity{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #e7ede9}.m-activity img{height:70px;width:100px;object-fit:cover;flex:0 0 100px}.m-activity strong{font-size:13px;line-height:1.35}
  .m-footer{margin-top:45px;background:#fafafa;padding:35px 15px 50px;color:#505851;border-top:12px solid #eef5ee}.m-footer-brand{display:flex;align-items:center;gap:9px;margin-bottom:22px;color:#166640!important}.m-footer-brand img{height:28px;width:28px;object-fit:contain}.m-footer-brand strong{font-size:15px}.m-footer-address{font-size:12px;line-height:1.65;margin-bottom:27px}.m-footer-address p{margin:9px 0}.m-footer-columns{display:grid;grid-template-columns:1fr 1fr;gap:20px}.m-footer-columns h3{font-size:11px;color:#343b36;margin:0 0 18px;font-weight:780}.m-footer-columns a{display:block;font-size:12px;line-height:1.6;color:#6f746f;margin-bottom:10px}
  .m-copyright{color:#898e89;text-align:center;border-top:1px solid #e7e7e7;padding:23px 0 0;margin:25px 0 0;font-size:11px;line-height:1.6}
  .m-parent-float{position:fixed;z-index:115;bottom:21px;right:14px;width:46px;height:46px;border-radius:50%;background:#176afb;color:#fff!important;display:grid;place-items:center;box-shadow:0 3px 7px #1e54c551}
  .m-parent-float svg{height:25px;width:25px}
}
@media(max-width:360px){
 .m-brand strong{font-size:13px}.m-banner-caption strong{font-size:12px}.m-ticker>strong{font-size:9px;padding:0 7px}.m-story-card{flex-basis:108px}.m-story-rail{gap:8px}
}
@media(prefers-reduced-motion:reduce){
 .m-ticker-track{animation:none!important}
}

/* ALAMANAH_PORTAL_VISUAL_V3A_20261023 — clip swipeable news to content margins. */
@media(max-width:780px){
  .m-portal .m-stories{
    width:calc(100% - 24px)!important;max-width:calc(100% - 24px)!important;
    margin:0 12px!important;padding:17px 0 0!important;
    overflow:hidden!important;min-width:0;box-sizing:border-box;
  }
  .m-portal .m-story-rail{
    display:flex!important;width:100%!important;max-width:100%!important;
    min-width:0!important;padding:0 0 6px!important;margin:0!important;
    overflow-x:auto!important;overflow-y:hidden!important;
    overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;
    box-sizing:border-box;scroll-padding-inline:0;
  }
  .m-portal .m-story-card{
    flex:0 0 115px!important;min-width:115px;max-width:115px;
    scroll-snap-align:start;
  }
}
@media(max-width:360px){
  .m-portal .m-story-card{flex-basis:108px!important;min-width:108px;max-width:108px;}
}

/* ALAMANAH_ARTIKEL_V6 — mobile article placeholder until official teacher content is published. */
@media(max-width:780px){
.m-article-empty{background:linear-gradient(140deg,#eff8f0,#fcf9e9);border:1px solid #d6e7da;border-radius:8px;padding:22px 17px;margin:3px 0 8px}
.m-article-empty strong{color:#1b7147;font-size:16px}
.m-article-empty p{font-size:12px;line-height:1.6;color:#617a67;margin:9px 0}
.m-article-empty a{display:inline-block;font-size:12px;color:#0d7644;font-weight:790;margin-top:5px}
.m-rank-block .m-rank-detail time{line-height:1.5}
}

/* ALAMANAH_RUNNING_TEXT_V7 — standalone, manually managed messages. */
@media(max-width:780px){
 .m-ticker-track .m-ticker-message{font-size:11px;font-weight:650;color:#26723e;display:inline-block}
 .m-ticker-track{gap:17px}
 .m-ticker-track:hover{animation-play-state:paused}
}

/* ALAMANAH_V8: article-only Pojok and one card per activity/album. */
@media(max-width:780px){
 .m-pojok-list .m-pojok-empty{margin:10px 0 3px;color:#567967;font-size:12px;line-height:1.65}
 .m-activities .m-activity-text{display:flex;flex:1;min-width:0;flex-direction:column;gap:7px}
 .m-activities .m-activity-text strong{font-size:13px;font-weight:760;line-height:1.4}
 .m-activities .m-activity-text small{font-size:10px;color:#789082;line-height:1.4}
 .m-activities .m-activity img{object-fit:cover;border-radius:3px}
}

/* V8B: keep a readable gap between album cover and activity title on older renderers. */
@media(max-width:780px){
 .m-portal .m-activities .m-activity{gap:0!important}
 .m-portal .m-activities .m-activity>img{margin-right:12px!important}
}

/* ALAMANAH_FLYER_V9 — complete high quality poster thumbnails on mobile. */
@media(max-width:780px){
 .m-portal .m-flyers .m-flyer-card{height:170px;background:#153b2a!important}
 .m-portal .m-flyers .m-flyer-card img{
   object-fit:contain!important;object-position:center!important;background:#153b2a!important;
   image-rendering:auto!important;
 }
 .m-portal .m-flyers .m-flyer-card:after{inset:50% 0 0;background:linear-gradient(transparent,#07190bee)}
 .m-portal .m-flyers .m-flyer-card .m-story-title{bottom:21px!important;font-size:11px!important;-webkit-line-clamp:2}
 .m-portal .m-flyers .m-flyer-date{position:absolute;z-index:3;bottom:6px;left:7px;right:7px;color:#cce2d0;font-size:9px}
}

/* ALAMANAH_MOBILE_FULL_BRAND_V13 — complete identity, no clipped title. */
@media(max-width:780px){
 .m-portal .m-header .m-brand{min-width:0;flex:1 1 auto;gap:8px}
 .m-portal .m-header .m-brand img,
 .m-portal .m-header .m-logo-letter{flex:0 0 31px}
 .m-portal .m-header .m-brand strong{
   min-width:0;white-space:normal;overflow-wrap:normal;word-break:normal;
   overflow:visible;text-overflow:clip;display:block;
   font-size:clamp(12px,3.65vw,15px);font-weight:800;
   line-height:1.18;letter-spacing:-.25px;
 }
 .m-portal .m-header .m-tools{flex-shrink:0}
}
@media(max-width:360px){
 .m-portal .m-header .m-brand strong{font-size:12px;line-height:1.17}
}
