/* MatchLab public v1.0.2 — mobile hardening and reference layout */
@media (max-width:760px){
  :root{--ml102-bg:#02070d;--ml102-panel:#07111b;--ml102-line:#28384b;--ml102-text:#f5f7fb;--ml102-muted:#9aa6b6;--ml102-purple:#8a55ff;--ml102-blue:#4059ff}

  /* Hard containment: no page may create a second horizontal viewport. */
  html,body,#app,.app-shell,.main,.content,.ml133-mobile-home,.ml102-mobile-home{
    width:100%!important;max-width:100vw!important;min-width:0!important;
    margin-left:0!important;margin-right:0!important;overflow-x:clip!important;
  }
  html,body{background:var(--ml102-bg)!important}
  body{padding:0 0 calc(92px + env(safe-area-inset-bottom))!important}
  .app-shell{min-height:100dvh!important}
  .main{padding:0!important;margin:0!important}
  .content{padding:0!important;margin:0!important}
  .content>.ml133-mobile-home{margin:0!important}
  .sidebar,.topbar,.watermark,.ml101-mobile-ui,.ml-global-back-v1440,.ml-global-back-v1444{display:none!important}
  .main:before,.main:after,.app-shell:before,.app-shell:after{max-width:100vw!important;overflow:hidden!important}
  html[data-theme] .watermark{display:none!important}
  .content img,.content svg{max-width:100%!important}

  /* Home canvas */
  .ml102-mobile-home{
    min-height:100dvh!important;padding:calc(12px + env(safe-area-inset-top)) 16px 30px!important;
    background:radial-gradient(circle at 50% 12%,rgba(27,48,91,.14),transparent 30%),#02070d!important;
  }

  /* Header: one clean row, no desktop/back-button leftovers. */
  .ml102-head{
    height:58px!important;display:grid!important;grid-template-columns:minmax(116px,1fr) minmax(124px,158px) 46px!important;
    align-items:center!important;gap:10px!important;position:relative!important;z-index:80!important;
  }
  .ml102-brand{height:42px!important;min-width:0!important;overflow:visible!important;display:flex!important;align-items:center!important}
  .ml102-brand .logo,.ml102-brand .brand-logo-composite,.ml102-brand .brand-logo-img{display:none!important}
  .ml102-brand-img{display:block!important;width:min(142px,100%)!important;height:40px!important;object-fit:contain!important;object-position:left center!important}
  .ml133-comp-trigger{
    width:100%!important;min-width:0!important;max-width:none!important;height:46px!important;padding:0 10px!important;
    border-radius:13px!important;border:1px solid #2b3b50!important;background:linear-gradient(180deg,#0d1620,#070d14)!important;
    box-shadow:none!important;font-size:14px!important;gap:8px!important;
  }
  .ml133-comp-trigger .competition-logo{width:28px!important;height:28px!important;min-width:28px!important;border-radius:7px!important}
  .ml133-comp-trigger>span{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  .ml133-comp-trigger>i{font-size:20px!important;line-height:1!important}
  .ml133-profile{width:46px!important;height:46px!important;border-radius:50%!important;border:1px solid #39485d!important;box-shadow:none!important}
  .ml133-profile svg{width:25px!important;height:25px!important}
  .ml102-mobile-home .ml131-comp-menu{top:62px!important;right:56px!important;left:auto!important;width:min(260px,calc(100vw - 32px))!important;max-height:60dvh!important;overflow:auto!important}

  /* Greeting: never let an email/username break the layout. */
  .ml133-greeting{padding:22px 2px 12px!important;min-width:0!important}
  .ml133-greeting h1{
    display:block!important;margin:0!important;max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;
    color:#f7f8fb!important;font:800 clamp(30px,8.2vw,39px)/1.02 Inter,Geist,sans-serif!important;letter-spacing:-1.5px!important;
  }
  .ml133-greeting p{margin:5px 0 0!important;color:#a2acba!important;font-size:15px!important;line-height:1.2!important}

  /* Featured match */
  .ml133-hero{width:100%!important;max-width:100%!important;border-radius:17px!important;border:1px solid #2e3e53!important;padding:13px 12px 12px!important;box-shadow:none!important}
  .ml133-teams{grid-template-columns:minmax(0,1fr) 92px minmax(0,1fr)!important;gap:5px!important}
  .ml133-club .club-logo{width:78px!important;height:78px!important;min-width:78px!important}
  .ml133-club strong{max-width:120px!important;font-size:13px!important}
  .ml133-kick b{font-size:25px!important}.ml133-kick span{max-width:105px!important}
  .ml133-probs{height:43px!important;border-radius:10px!important}.ml133-probs span{font-size:13px!important;gap:6px!important}
  .ml133-hero-stats{height:58px!important;grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .ml133-hero-stats>div{padding:7px 6px!important;column-gap:4px!important}.ml133-hero-stats i{font-size:18px!important}.ml133-hero-stats small{font-size:8px!important}.ml133-hero-stats b{font-size:14px!important}
  .ml133-ai-cta{height:58px!important;border-radius:11px!important;margin-top:10px!important}

  /* Empty featured state is compact; never a giant blank slab. */
  .ml102-hero-empty{min-height:0!important;padding-bottom:14px!important}
  .ml102-empty-feature{display:grid!important;grid-template-columns:40px minmax(0,1fr)!important;gap:10px!important;align-items:center!important;padding:18px 5px 4px!important;text-align:left!important}
  .ml102-empty-ball{width:38px;height:38px;display:grid;place-items:center;border-radius:12px;background:#101c2a;border:1px solid #2b3c51;font-size:18px}
  .ml102-empty-feature div{min-width:0}.ml102-empty-feature b{display:block;color:#eef2f8;font-size:14px}.ml102-empty-feature small{display:block;margin-top:4px;color:#8f9bab;font-size:11px;line-height:1.35}
  .ml102-empty-feature a{grid-column:1/-1;height:38px;display:grid;place-items:center;margin-top:7px;border:1px solid #34465d;border-radius:10px;color:#a994ff;text-decoration:none;font-size:12px;font-weight:700;background:#08111b}

  /* Sections */
  .ml133-section{margin-top:16px!important;min-width:0!important}.ml133-section-title{height:29px!important;margin:0 1px 7px!important}
  .ml133-section-title h2{font-size:18px!important;font-weight:700!important}.ml133-section-title a{font-size:12px!important}

  /* Three real match cards fit the viewport; if there are none the whole section is omitted in JS. */
  .ml133-day-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important;width:100%!important}
  .ml133-day-card{min-width:0!important;width:100%!important;padding:8px 5px 7px!important;border-radius:11px!important}
  .ml133-day-clubs{grid-template-columns:minmax(0,1fr) 25px minmax(0,1fr)!important;gap:2px!important}
  .ml133-day-club .club-logo{width:35px!important;height:35px!important;min-width:35px!important}.ml133-day-vs{width:25px!important;height:25px!important}
  .ml133-day-club b{font-size:9px!important}.ml133-day-card time{font-size:10px!important}.ml133-mini-probs{font-size:8.5px!important}

  /* Schedina Lab: filled state remains compact; empty state is a proper vertical CTA. */
  .ml133-slip{width:100%!important;max-width:100%!important;grid-template-columns:minmax(0,1fr) 108px!important;border-radius:12px!important;overflow:hidden!important}
  .ml133-slip.empty{display:grid!important;grid-template-columns:1fr!important;padding:0!important}
  .ml133-slip.empty .ml133-slip-empty{min-height:92px!important;padding:18px 16px!important;border-right:0!important;border-bottom:1px solid #263548!important}
  .ml133-slip.empty .ml133-slip-empty b{font-size:15px!important}.ml133-slip.empty .ml133-slip-empty span{font-size:11px!important;margin-top:5px!important}
  .ml133-slip.empty .ml133-slip-side{min-height:82px!important;display:grid!important;grid-template-columns:1fr 132px!important;grid-template-rows:auto auto!important;align-items:center!important;column-gap:12px!important;padding:12px 14px!important}
  .ml133-slip.empty .ml133-slip-side small{grid-column:1;grid-row:1!important;text-align:left!important}.ml133-slip.empty .ml133-slip-side strong{grid-column:1;grid-row:2!important;text-align:left!important;font-size:20px!important}
  .ml133-slip.empty .ml133-slip-side button{grid-column:2;grid-row:1/3!important;width:100%!important;height:46px!important;margin:0!important}
  .ml133-slip-row{min-width:0!important}.ml133-slip-row span{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}

  /* Radar and Insight */
  .ml133-radar{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important}.ml133-radar>div{min-width:0!important;padding:8px!important}.ml133-radar i{font-size:22px!important}.ml133-radar span{font-size:9px!important}.ml133-radar b{font-size:18px!important}.ml133-radar small{font-size:8px!important}
  .ml133-insight{grid-template-columns:50px minmax(0,1fr) 92px!important;gap:9px!important;min-width:0!important;padding:11px!important}.ml133-insight p{min-width:0!important;font-size:11px!important;line-height:1.35!important}.ml133-insight button{min-width:0!important;font-size:9px!important;padding:0 7px!important}

  /* News stays visible and is never clipped by the mobile renderer. */
  .ml102-mobile-home .ml131-news,.ml102-mobile-home .ml101-home-news{display:block!important;visibility:visible!important;opacity:1!important;height:auto!important;min-height:106px!important;overflow:visible!important}
  .ml101-home-news-list{display:grid!important;gap:8px!important}.ml133-news-card{width:100%!important;max-width:100%!important;min-width:0!important;border-radius:11px!important;overflow:hidden!important}

  /* Bottom navigation: iOS-safe, full width, central AI action like the reference. */
  .ml133-bottom-nav{
    position:fixed!important;left:0!important;right:0!important;bottom:0!important;width:100%!important;height:calc(76px + env(safe-area-inset-bottom))!important;
    padding:8px 10px max(8px,env(safe-area-inset-bottom))!important;display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;
    align-items:end!important;gap:0!important;border:0!important;border-top:1px solid #223246!important;border-radius:0!important;
    background:rgba(6,14,24,.97)!important;backdrop-filter:blur(18px)!important;-webkit-backdrop-filter:blur(18px)!important;z-index:2147481000!important;box-shadow:0 -12px 30px rgba(0,0,0,.25)!important;
  }
  .ml133-bottom-nav a{min-width:0!important;height:58px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:flex-end!important;gap:4px!important;padding:0 2px!important;color:#8f9aaa!important;text-decoration:none!important}
  .ml133-bottom-nav a i{width:25px!important;height:25px!important;display:grid!important;place-items:center!important}.ml133-bottom-nav a i svg{width:24px!important;height:24px!important}
  .ml133-bottom-nav a span{max-width:100%!important;font-size:9.5px!important;line-height:1.05!important;text-align:center!important;white-space:normal!important}
  .ml133-bottom-nav a.active{color:#925cff!important}.ml133-bottom-nav a.center{position:relative!important;transform:translateY(-14px)!important}
  .ml133-bottom-nav a.center i{width:64px!important;height:64px!important;border:2px solid #8a59ff!important;border-radius:50%!important;background:radial-gradient(circle,#4b239c,#21104e)!important;box-shadow:0 0 0 8px rgba(99,54,211,.16),0 0 24px rgba(126,75,255,.48)!important;color:white!important}
  .ml133-bottom-nav a.center i svg{width:27px!important;height:27px!important}.ml133-bottom-nav a.center span{margin-top:-1px!important;color:#bfaeff!important}

  .ml102-mobile-version{margin:18px 0 2px!important;padding-bottom:3px!important;text-align:center!important;color:#526174!important;font:600 9px/1 Inter,sans-serif!important;letter-spacing:.08em!important}
}

@media (max-width:390px){
  .ml102-mobile-home{padding-left:12px!important;padding-right:12px!important}
  .ml102-head{grid-template-columns:minmax(104px,1fr) minmax(112px,142px) 42px!important;gap:7px!important}
  .ml102-brand-img{width:min(126px,100%)!important;height:37px!important}
  .ml133-comp-trigger{height:43px!important;font-size:12px!important;padding:0 8px!important}.ml133-profile{width:42px!important;height:42px!important}
  .ml133-greeting h1{font-size:31px!important}.ml133-teams{grid-template-columns:minmax(0,1fr) 80px minmax(0,1fr)!important}.ml133-club .club-logo{width:68px!important;height:68px!important;min-width:68px!important}
  .ml133-hero-stats>div{padding-left:4px!important;padding-right:4px!important}.ml133-hero-stats i{font-size:16px!important}.ml133-hero-stats small{font-size:7.5px!important}
  .ml133-day-grid{gap:5px!important}.ml133-day-club .club-logo{width:31px!important;height:31px!important;min-width:31px!important}.ml133-day-card{padding-left:4px!important;padding-right:4px!important}
  .ml133-radar{gap:5px!important}.ml133-radar>div{padding:7px 5px!important}.ml133-insight{grid-template-columns:44px minmax(0,1fr) 78px!important}.ml133-ai-chip{width:42px!important;height:42px!important}
}

/* Real visible build number. */
.app-shell .sidebar::after{content:"v1.0.2"!important}
