/* v1.7.6 — shared mobile layout */
html{-webkit-text-size-adjust:100%}
body{min-width:0}
body>.header{padding-top:env(safe-area-inset-top);height:calc(var(--site-header-height) + env(safe-area-inset-top))}
body>.header .header-inner{min-width:0}
body>.header .brand>span:last-child{min-width:0}
body>.mobile-nav{padding-top:calc(92px + env(safe-area-inset-top));padding-bottom:calc(28px + env(safe-area-inset-bottom))}

@media(max-width:760px){
  body>.header .container{width:calc(100% - 24px)}
  body>.header .brand{gap:9px;font-size:15px}
  body>.header .brand-mark,body>.header .brand-mark img{width:39px;height:39px;flex-basis:39px;border-radius:12px}
  body>.header .brand small{font-size:.52rem;letter-spacing:.14em}
  body>.header .menu{width:40px;height:40px;border-radius:11px;flex:0 0 40px}
  body>.header .menu::before{top:13px}body>.header .menu span{top:19px}body>.header .menu::after{top:25px}
  body>.header .menu[aria-expanded="true"]::before,body>.header .menu[aria-expanded="true"]::after{top:19px}
  body>.mobile-nav{display:flex;flex-direction:column;overflow:auto}
  body>.mobile-nav a{min-height:58px;align-items:center;font-size:1.08rem}
}

@media(max-width:380px){
  body>.header .brand{font-size:14px}
  body>.header .brand-mark,body>.header .brand-mark img{width:36px;height:36px;flex-basis:36px}
  body>.header .brand small{font-size:.48rem}
}

/* Home */
@media(max-width:760px){
  body.home-page .hero-layout{min-height:100svh;padding:calc(86px + env(safe-area-inset-top)) 0 calc(34px + env(safe-area-inset-bottom));align-items:end}
  body.home-page .hero-content{width:100%;padding-top:34vh}
  body.home-page .hero h1{font-size:clamp(2.7rem,13.5vw,4.2rem);line-height:.91;letter-spacing:-.065em;text-wrap:balance}
  body.home-page .hero p{font-size:.94rem;line-height:1.58}
  body.home-page .hero-actions{grid-template-columns:1fr;gap:9px}
  body.home-page .hero-actions .btn{width:100%;min-height:48px}
  body.home-page .hero-stats{grid-template-columns:repeat(3,minmax(0,1fr));border-radius:15px}
  body.home-page .hero-stats div{min-width:0;padding:12px 7px}
  body.home-page .hero-stats strong{font-size:.88rem;white-space:normal}
  body.home-page .hero-stats span{font-size:.48rem;line-height:1.25;overflow-wrap:anywhere}
  body.home-page .section{padding:68px 0}
  body.home-page .intro-grid,body.home-page .mission-head,body.home-page .discord-grid{gap:28px}
  body.home-page .display{font-size:clamp(2.35rem,12vw,3.6rem);line-height:.98}
  body.home-page .intro-list article{grid-template-columns:40px minmax(0,1fr);gap:13px;padding:18px 16px}
  body.home-page .intro-list b{width:40px;height:40px;border-radius:12px}
  body.home-page .parallax-band{min-height:58svh}
  body.home-page .band-content{padding:64px 0}
  body.home-page .band-content h2{font-size:clamp(2.55rem,13vw,4.1rem);line-height:.95}
  body.home-page .mission-card{min-height:0;padding:20px 18px}
  body.home-page .mission-card h3{margin:28px 0 9px}
  body.home-page .road-pulse{grid-template-columns:minmax(0,1fr) 40px}
  body.home-page .road-pulse-metrics{overflow-x:auto;scrollbar-width:none}
  body.home-page .road-pulse-metrics::-webkit-scrollbar{display:none}
  body.home-page .road-pulse-metrics>div{min-width:92px}
  body.home-page .discord-shell{padding:27px 19px;border-radius:22px}
  body.home-page .discord h2{font-size:clamp(2.4rem,12vw,3.7rem)}
  body.home-page .discord-actions{grid-template-columns:1fr}
  body.home-page .discord-actions .btn{width:100%}
  body.home-page footer .footer-inner{gap:8px;text-align:center}
}

/* Team */
@media(max-width:760px){
  body.team-page .hero{padding:calc(92px + env(safe-area-inset-top)) 0 25px}
  body.team-page .hero-content{padding:0}
  body.team-page .eyebrow{font-size:.63rem}
  body.team-page .hero-title{margin:10px 0 14px;white-space:nowrap;letter-spacing:-.07em}
  body.team-page .hero-title .line-1,body.team-page .hero-title .line-2{font-size:clamp(2.4rem,12.3vw,4rem)}
  body.team-page .hero p{font-size:.95rem;line-height:1.55}
  body.team-page .team{padding:15px 0 70px}
  body.team-page .levels{gap:14px}
  body.team-page .level-group{padding:15px;border-radius:18px}
  body.team-page .level-head{gap:11px;padding-bottom:14px}
  body.team-page .level-head img{width:40px;height:40px}
  body.team-page .level-head h2{font-size:1.08rem}
  body.team-page .members{margin-top:14px;gap:7px}
  body.team-page .member{min-height:46px;padding:11px 12px;border-radius:13px}
  body.team-page .member span{font-size:.9rem}
}
@media(max-width:340px){body.team-page .hero-title .line-1,body.team-page .hero-title .line-2{font-size:clamp(2.15rem,11.8vw,3rem)}}

/* Tolls */
@media(max-width:760px){
  body.tolls-page .hero{padding:calc(96px + env(safe-area-inset-top)) 0 25px}
  body.tolls-page .hero-grid{gap:22px}
  body.tolls-page .hero h1{font-size:clamp(2.75rem,14.5vw,4.45rem);line-height:.92}
  body.tolls-page .hero p{font-size:.92rem;line-height:1.58}
  body.tolls-page .hero-meta{width:100%;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  body.tolls-page .hero-stat{min-width:0;padding:13px 12px;border-radius:14px}
  body.tolls-page .hero-stat strong{font-size:1.35rem}
  body.tolls-page .hero-stat span{font-size:.57rem;line-height:1.3}
  body.tolls-page .map-section{padding:8px 0 calc(48px + env(safe-area-inset-bottom))}
  body.tolls-page .map-section>.container{width:100%}
  body.tolls-page .map-shell{height:calc(100svh - 86px);height:calc(100dvh - 86px);min-height:530px;border-left:0;border-right:0;border-radius:0}
  body.tolls-page .map-toolbar{left:9px;right:9px;top:9px;grid-template-columns:minmax(0,1fr) auto;gap:7px}
  body.tolls-page .search-box{height:44px;padding:0 12px;border-radius:13px}
  body.tolls-page .search-box input{min-width:0;font-size:16px}
  body.tolls-page .vehicle-switch{padding:4px;border-radius:13px}
  body.tolls-page .vehicle-switch button{width:40px;height:36px;padding:0;display:grid;place-items:center}
  body.tolls-page .search-results{top:50px;border-radius:13px}
  body.tolls-page .zoom-hint{bottom:12px;max-width:calc(100% - 24px);font-size:.67rem;padding:8px 11px}
  body.tolls-page .toll-detail{left:8px;right:8px;bottom:calc(8px + env(safe-area-inset-bottom));width:auto;max-height:min(62dvh,520px);overflow:auto;padding:16px;border-radius:18px}
  body.tolls-page .price-grid{gap:7px}
  body.tolls-page .price-card{padding:13px 11px}
  body.tolls-page footer .footer-inner{text-align:center;gap:7px}
}

/* Camera page */
@media(max-width:760px){
  body.cameras-page .camera-app,body.cameras-page .camera-app.sidebar-collapsed{margin-top:calc(var(--header-height) + env(safe-area-inset-top));height:calc(100dvh - var(--header-height) - env(safe-area-inset-top))}
  body.cameras-page .camera-app:not(.sidebar-collapsed) .sidebar-toggle{top:10px;right:9px;height:36px;min-width:0;padding:0 9px;gap:5px;border-radius:10px}
  body.cameras-page .camera-app:not(.sidebar-collapsed) .sidebar-toggle-label{font-size:10.5px}
  body.cameras-page .camera-app:not(.sidebar-collapsed) .sidebar-toggle-icon{font-size:14px}
  body.cameras-page .camera-sidebar-head{padding-right:91px}
  body.cameras-page .camera-app.sidebar-collapsed .sidebar-toggle{top:10px;left:10px;height:40px;padding:0 11px}
  body.cameras-page .maplibregl-ctrl-top-right{top:56px}
  body.cameras-page .camera-detail-actions{grid-template-columns:1fr}
  body.cameras-page .camera-detail-button.primary{grid-column:auto}
}
@media(max-width:380px){
  body.cameras-page .camera-app:not(.sidebar-collapsed) .sidebar-toggle{right:7px;padding-inline:8px}
  body.cameras-page .camera-sidebar-head{padding-right:84px}
}

/* v1.7.6 — mobile alignment fixes */
@media(max-width:760px){
  /* Keep the header hamburger / close glyph geometrically centered. */
  body>.header .menu::before,
  body>.header .menu::after,
  body>.header .menu span{
    left:50%;
    transform:translateX(-50%);
  }
  body>.header .menu::before{top:calc(50% - 7px)}
  body>.header .menu span{top:calc(50% - 1px)}
  body>.header .menu::after{top:calc(50% + 5px)}
  body>.header .menu[aria-expanded="true"]::before,
  body>.header .menu[aria-expanded="true"]::after{
    top:calc(50% - 1px);
  }
  body>.header .menu[aria-expanded="true"]::before{
    transform:translateX(-50%) rotate(45deg);
  }
  body>.header .menu[aria-expanded="true"]::after{
    transform:translateX(-50%) rotate(-45deg);
  }

  /* The camera-list switch must never appear over the opened site menu. */
  body.cameras-page .sidebar-toggle{
    transition:opacity .12s ease,visibility .12s ease,background .14s,border-color .14s,color .14s;
  }
  body.cameras-page.nav-open .sidebar-toggle{
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
  }

  /* Center camera metrics both horizontally and vertically inside each card. */
  body.cameras-page .camera-stat{
    display:flex;
    min-height:61px;
    padding:8px 10px;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center;
  }
  body.cameras-page .camera-stat strong{
    line-height:1.05;
  }
  body.cameras-page .camera-stat span{
    margin-top:5px;
    line-height:1.2;
  }
}
