/* ON6UHF v4.3.151 — gedeelde telefoon- en tabletcorrecties */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{overflow-x:hidden}
img,svg,video,canvas{max-width:100%}
/* Leaflet plaatst canvaslagen in een paneel zonder eigen breedte. De algemene
   canvasbeperking hierboven mag daarom niet op kaart- en heatmaplagen werken. */
.leaflet-container canvas{max-width:none!important}
button,a,input,select,textarea{touch-action:manipulation}

@media(max-width:820px){
  .shell{width:min(100% - 24px,1180px)}
  .topbar{position:relative;z-index:3000}
  .topin{min-height:72px!important;gap:10px}
  .brand{min-width:0}.brand img{flex:0 0 auto}.brand span{min-width:0}
  .menu{min-width:48px;min-height:48px;padding:10px 13px}
  .nav{z-index:3100;max-height:calc(100dvh - 88px);overflow-y:auto;-webkit-overflow-scrolling:touch}
  .nav a{min-height:46px;display:flex;align-items:center}
  h1{overflow-wrap:anywhere}
  h2,h3{overflow-wrap:break-word}
  .btn,.primary-button,.secondary-button,.print-button{min-height:48px}
  .table-wrap,.adc-table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .leaflet-control-zoom a{width:40px!important;height:40px!important;line-height:40px!important}
  .leaflet-control-attribution{max-width:75vw;font-size:8px!important}
}

/* Homepage: alle vier hoofdacties blijven zichtbaar in portrait. */
@media(max-width:700px){
  .hero{display:block!important;width:100%!important;height:auto!important;min-height:0!important;overflow:visible!important}
  .hero>.shell{position:relative;z-index:3;display:block!important}
  .hero>img{position:absolute!important;inset:0!important;min-height:100%;object-position:62% center!important}
  .hero-copy{padding:48px 0 42px!important}
  .hero-copy h1{font-size:clamp(2.75rem,13vw,4.25rem)!important;line-height:.94}
  .hero-copy>p{font-size:1rem;line-height:1.55}
  .hero .actions{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;width:100%;margin-top:24px}
  .hero .actions>a{position:relative!important;inset:auto!important;transform:none!important;width:100%!important;max-width:none!important;min-height:52px!important;margin:0!important;justify-content:center!important;text-align:center}
  .hero .home-dpc-launch{border-radius:14px!important;padding:7px 14px 7px 8px!important}
  .hero .home-dpc-launch span,.hero .home-svx-live-launch span{text-align:left}
  .hero .home-dpc-launch>b,.hero .home-svx-live-launch>b{margin-left:auto}
  .home-energy72{padding:36px 0}.home-energy72-card{gap:22px;padding:22px 18px;border-radius:20px}
  .home-energy72 h2{font-size:clamp(2rem,11vw,3rem)}
}

/* iPhone safe-area: logo, titel en primaire acties mogen nooit onder de browserrand vallen. */
@media(max-width:700px) and (orientation:portrait){
  .topbar{padding-top:env(safe-area-inset-top)!important}
  .hero-copy{padding-top:36px!important;padding-bottom:36px!important}
  .hero .actions{padding-bottom:max(8px,env(safe-area-inset-bottom))}
  .hero .home-svx-live-launch,.hero .home-dpc-launch{display:flex!important;visibility:visible!important;opacity:1!important}
}

/* Algemene inhoud: geen onbedoelde horizontale uitschuivers. */
@media(max-width:620px){
  input,select,textarea{font-size:16px}
  .section,.alt{padding-block:42px}
  .article-hero,.article-hero.compact{padding:42px 0}
  .article-hero h1{font-size:clamp(2rem,11vw,3.25rem)}
  .reading-layout{width:100%}.reading-article{padding:22px 16px}
  .coast-footer-overlay{padding-inline:0!important}.coast-footer-grid{gap:24px}
  .footer-person{max-width:100%;overflow:hidden}.footer-bottom{align-items:flex-start}
  dialog{max-width:calc(100vw - 24px)!important}
}

/* APRS command center en kaart. */
@media(max-width:820px){
  .aprs-page-hero{min-height:0!important}.aprs-page-hero-copy{padding-block:46px!important}
  .aprs-coverage-console{border-radius:16px!important;overflow:hidden}
  .apc-head{align-items:flex-start!important;flex-direction:column!important;gap:12px!important;padding:18px 15px!important}
  .apc-legend{display:grid!important;grid-template-columns:1fr 1fr;gap:10px!important;padding:12px 14px!important}
  .apc-tools{display:flex!important;gap:8px!important;overflow-x:auto!important;padding:10px 12px!important;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}
  .apc-tools fieldset{display:flex!important;flex:0 0 auto!important;min-width:max-content;scroll-snap-align:start}
  .apc-tools button{min-height:42px;white-space:nowrap}
  .apc-map-lock{position:sticky;right:0;flex:0 0 auto;border-color:#48e4c0!important;background:#0a403d!important;color:#d8fff7!important}
  .apc-body{display:grid!important;grid-template-columns:1fr!important;height:auto!important}
  .apc-map-wrap{height:58dvh!important;min-height:430px!important}
  .apc-side{max-height:none!important;min-height:0!important}
  .apc-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .aprs-wow-controls{padding:12px 14px!important}
  .aprs-time-machine{max-width:100%;overflow-x:auto}
  .aprs-station-sheet{position:fixed!important;inset:0 0 0 auto!important;height:100dvh!important;width:min(100%,420px)!important;z-index:5000!important}
}

@media(max-width:480px){
  .apc-legend{grid-template-columns:1fr!important}
  .apc-map-wrap{height:54dvh!important;min-height:380px!important}
  .apc-kpis{grid-template-columns:1fr 1fr!important}
  .apc-kpis>div{min-width:0}.apc-kpis b{overflow-wrap:anywhere}
  .aprs-station-sheet{padding:18px 15px!important}
}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}

/* v4.3.156 - iOS/iPadOS gebruikt de actuele Visual Viewport, niet de ruimte achter de Safari-balken. */
@media(hover:none) and (pointer:coarse){
  html,body{min-height:var(--dpc-visual-height,100dvh)}
  .dpc{height:var(--dpc-visual-height,100dvh);min-height:var(--dpc-visual-height,100dvh)}
  .dpc-topbar{position:sticky;top:var(--dpc-visual-top,0px);padding-top:calc(8px + env(safe-area-inset-top));padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}
  .dpc-actions{scroll-padding-inline:max(8px,env(safe-area-inset-left));overscroll-behavior-inline:contain}
  .dpc-credit{padding-bottom:max(7px,env(safe-area-inset-bottom))}
}

@media(max-width:760px){
  html,body{min-height:var(--dpc-visual-height,100dvh)}
  .dpc{height:auto;min-height:var(--dpc-visual-height,100dvh)}
  .dpc-topbar{top:var(--dpc-visual-top,0px);padding-top:calc(9px + env(safe-area-inset-top))!important}
  .dpc-actions{max-width:100%;padding-bottom:7px!important;scrollbar-width:thin}
  .dpc-actions>*{min-height:44px!important}
  .dpc-map-zone{height:clamp(430px,62dvh,720px)!important}
}
