/* MeccsRadar mobile restore – compact card layout based on the earlier mobile UI */
@media (max-width: 600px) {
  html,body{max-width:100%;overflow-x:hidden}
  body{padding-bottom:env(safe-area-inset-bottom)}

  /* Header logo stays at the top; navigation becomes the compact bottom dock. */
  .topbar{
    position:relative;
    top:auto;
    height:64px;
    min-height:64px;
    grid-template-columns:1fr;
    padding:9px 14px;
    background:rgba(7,17,31,.98);
  }
  .logo{min-width:0;width:max-content}
  .logo-copy small{display:block;font-size:7px;letter-spacing:1px}
  .logo-copy strong{font-size:20px}
  .radar-logo{width:38px;height:38px}
  .clock{display:none}
  .mainnav{
    position:fixed;
    left:14px;
    right:14px;
    bottom:calc(12px + env(safe-area-inset-bottom));
    z-index:1000;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:3px;
    width:auto;
    min-width:0;
    height:82px;
    margin:0;
    padding:7px;
    overflow:visible;
    border-radius:22px;
    border:1px solid #29415d;
    background:rgba(8,20,34,.97);
    box-shadow:0 16px 40px rgba(0,0,0,.38);
    backdrop-filter:blur(18px);
    transition:transform .18s ease;
  }
  .mainnav.nav-top-safe{transform:translateY(calc(12px + env(safe-area-inset-top)))}
  .navbtn{
    min-width:0;
    min-height:66px;
    padding:8px 4px;
    border-radius:16px;
    flex-direction:column;
    justify-content:center;
    gap:4px;
    font-size:17px;
    line-height:1;
  }
  .navbtn span{display:block;font-size:11px;line-height:1.1;white-space:nowrap}
  .navbtn.active{background:rgba(186,255,47,.12);color:var(--lime);box-shadow:none}

  .page{width:100%;max-width:100%;padding:22px 14px calc(126px + env(safe-area-inset-bottom))}
  footer{padding-bottom:calc(118px + env(safe-area-inset-bottom))}

  .hero{gap:12px;margin-bottom:24px}
  .hero h1{font-size:32px;line-height:1.04;letter-spacing:-1.4px}
  .hero p{font-size:12px;line-height:1.4}
  .refresh{padding:10px 12px}
  .stats{gap:10px;margin-bottom:24px}
  .stat{min-height:104px;padding:17px 14px}

  .filters{width:100%;gap:15px;overflow:hidden}
  .sportchips{
    display:flex;
    flex-wrap:nowrap;
    gap:8px;
    width:100%;
    max-width:100%;
    overflow-x:auto;
    overflow-y:hidden;
    padding:0 0 5px;
    overscroll-behavior-inline:contain;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  .sportchips::-webkit-scrollbar{display:none}
  .sportchip{flex:0 0 auto;white-space:nowrap;padding:9px 13px}
  .broadcast-toggle{flex:0 0 auto}

  .section-title{align-items:flex-end}
  .section-title h2{font-size:24px}
  .section-title span{font-size:10px;text-align:right;white-space:nowrap}
  .schedule{width:100%;min-width:0;gap:10px}

  .event{
    width:100%;
    min-width:0;
    min-height:0;
    grid-template-columns:108px minmax(0,1fr);
    border-radius:17px;
    overflow:hidden;
  }
  .event-time{
    min-width:0;
    padding:17px 14px;
    justify-content:center;
  }
  .event-time small{font-size:10px;white-space:nowrap}
  .event-time strong{font-size:22px;line-height:1.1;margin-top:7px}
  .event.tbd .event-time strong{font-size:16px;line-height:1.2}

  .event-main{
    min-width:0;
    width:100%;
    padding:16px 16px 17px;
  }
  .meta{gap:7px;flex-wrap:wrap;font-size:8px}
  .countdown{padding:5px 7px}
  .competition{font-size:10px;line-height:1.35;margin-top:9px}
  .fixture{
    min-width:0;
    width:100%;
    flex-direction:column;
    align-items:flex-start;
    justify-content:flex-start;
    gap:10px;
    margin-top:6px;
  }
  .fixture h3{
    width:100%;
    min-width:0;
    font-size:20px;
    line-height:1.12;
    letter-spacing:-.55px;
    overflow-wrap:anywhere;
  }
  .flags,.flags.paired{
    min-width:0;
    width:auto;
    justify-content:flex-start;
    gap:9px;
    margin:0;
  }
  .flag-box{
    min-width:0;
    width:48px;
    height:32px;
    padding:0;
    overflow:hidden;
    border-radius:7px;
  }
  .flag-box img{width:48px!important;height:32px!important;object-fit:cover!important;border-radius:7px!important}
  .club-mark,.flags.paired .club-mark{width:44px;height:36px}
  .club-logo{width:30px;height:30px}
  .teamline{font-size:9px;line-height:1.4;margin-top:10px;overflow-wrap:anywhere}

  .event-broadcast{
    grid-column:1/-1;
    min-width:0;
    min-height:126px;
    padding:16px 20px 17px;
    border-left:0;
    border-top:1px solid #2a405a;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-rows:auto auto auto;
    column-gap:14px;
    row-gap:4px;
    align-items:center;
  }
  .event-broadcast>small{grid-column:1/-1;grid-row:1;font-size:9px}
  .channelname{grid-column:1;grid-row:2;font-size:17px;margin:3px 0;min-width:0}
  .channel-img{width:46px;height:31px}
  .openlink{grid-column:1;grid-row:3;margin:0;font-size:10px}
  .no-broadcast{grid-column:1;grid-row:2;margin-top:4px}
  .event-broadcast .outlook{
    grid-column:2;
    grid-row:2/4;
    justify-self:end;
    align-self:center;
    white-space:nowrap;
    padding:9px 11px;
  }
  .outlook:after{content:""}

  .favorite-grid,.channel-grid{grid-template-columns:1fr}
  .favcard,.channel-card{min-width:0}

  .marci-page{padding-top:20px}
  .marci-hero{grid-template-columns:1fr;min-height:0;border-radius:17px}
  .marci-photo{min-height:285px;background-size:auto 315px;background-position:center top}
  .marci-profile-copy{padding:22px 20px 25px}
  .marci-profile-copy h2{font-size:31px}
  .marci-profile-copy p{font-size:12px}
}

/* Samsung/Android browsers can report a wider CSS viewport than 600px.
   In that 601–900px layout the nav stays at the top, so give the whole header
   a real safe-area gap instead of trying to move the bottom-dock rules. */
@media (min-width: 601px) and (max-width: 900px) {
  .topbar{
    padding-top:calc(12px + env(safe-area-inset-top));
    padding-bottom:10px;
  }
  .mainnav{
    margin-top:14px;
  }
}

@media (max-width: 380px) {
  .page{padding-left:10px;padding-right:10px}
  .mainnav{left:9px;right:9px}
  .event{grid-template-columns:92px minmax(0,1fr)}
  .event-time{padding-left:11px;padding-right:9px}
  .event-main{padding-left:13px;padding-right:13px}
  .fixture h3{font-size:18px}
  .event-broadcast{padding-left:16px;padding-right:16px}
  .event-broadcast .outlook{padding:8px 9px;font-size:9px}
}
