/* Magyarvizek – reszponzív felület. Asztali stílusok változatlanul maradnak. */
html,body{max-width:100%;overflow-x:clip}
main,.two,.two>div,.panel,.tabbody{min-width:0}

@media (max-width: 1100px) {
  main{padding:16px clamp(12px,2.5vw,24px)}
  .two{grid-template-columns:minmax(0,1fr);gap:12px}
  .weather-items{grid-template-columns:repeat(3,minmax(0,1fr))}
  .stationScroll{height:340px;max-height:45vh}
  .panel{margin-bottom:12px}
  .hero-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .forecast-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width: 740px) {
  main{padding:10px 10px 22px}
  .panel{padding:14px 12px;border-radius:13px;margin-bottom:11px}
  h2{font-size:18px;line-height:1.3}
  h3{font-size:16px;line-height:1.35}
  .two{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
  .toolbar{align-items:flex-start;gap:10px}
  .toolbar .row{width:100%;justify-content:flex-start;flex-wrap:wrap;gap:8px}
  .toolbar .row label{min-width:140px;flex:1 1 170px}
  .toolbar .row button{min-height:42px;align-self:end}
  .stationScroll{height:auto;max-height:270px;overflow-y:auto;overflow-x:auto;overscroll-behavior:contain;margin-top:10px}
  .stationScroll th,.stationScroll td{padding:11px 7px}
  .stationScroll tr.station{height:50px}
  .stationScroll .star{min-width:32px;min-height:36px}
  .stationScroll + .note{margin-top:9px}
  #search{min-height:44px;font-size:16px}

  .weather-strip{margin-bottom:11px;padding:10px;border-radius:13px}
  .weather-topline{align-items:flex-start}
  .weather-updated{max-width:45%;text-align:right}
  .weather-items{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .weather-item{gap:7px;padding:10px 8px;min-height:64px;overflow:hidden}
  .weather-icon{flex:0 0 21px;font-size:18px}
  .weather-item strong{font-size:clamp(14px,4vw,19px);line-height:1.22;white-space:normal;overflow-wrap:anywhere}
  .weather-item small{font-size:10px;white-space:normal;line-height:1.25}
  .weather-item .weather-trend,.weather-item .weather-secondary{white-space:normal;overflow-wrap:anywhere}
  .weather-source{font-size:10px;line-height:1.5}
  .weather-sub{display:none}

  .hero-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .hero-card{padding:12px 11px;min-height:106px;border-radius:12px}
  .hero-label{font-size:10px;line-height:1.25;letter-spacing:.02em}
  .hero-value,.hero-value-small{font-size:clamp(21px,5.2vw,30px);line-height:1.1;overflow-wrap:anywhere}
  .hero-foot{font-size:10px;line-height:1.3;margin-top:8px}

  .tabs{display:flex;flex-wrap:nowrap!important;gap:7px;max-width:100%;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;-webkit-overflow-scrolling:touch;padding:0 0 9px}
  .tabs .tab{flex:0 0 auto;min-height:43px;white-space:nowrap;padding:9px 12px}
  .tabbody{width:100%;max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain}
  .forecast-heading{display:block}
  .forecast-summary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}
  .forecast-summary-card{min-height:95px;padding:12px 10px;border-radius:12px}
  .forecast-summary-card .sum-label{font-size:10px;line-height:1.3}
  .forecast-summary-card .sum-value{font-size:clamp(17px,4.9vw,24px);overflow-wrap:anywhere;line-height:1.15}
  .forecast-summary-card .sum-foot{font-size:10px;line-height:1.3}
  .forecast-table-wrap{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;margin:12px 0}
  .forecast-table-wrap table{min-width:460px}
  .forecast-table-wrap tbody td{padding:11px 8px!important;font-size:15px!important}
  .forecast-table-wrap tbody td:nth-child(2){font-size:17px!important}
  .forecast-chart-shell{max-width:100%;width:100%;overflow-x:auto!important;-webkit-overflow-scrolling:touch;padding:8px 3px 0!important}
  .forecast-chart-shell svg.chart-large{width:850px!important;max-width:none!important;height:auto!important;min-height:0!important}
  #historyPanel>svg,#statsPanel>svg,#comparePanel>svg{width:720px;max-width:none;height:270px}
  #map{height:300px;max-width:100%;overflow:hidden}
  .fields,.grid,.grid2{grid-template-columns:minmax(0,1fr)!important;gap:10px!important}
  label,input,select,textarea,button{max-width:100%}
  input:not([type=checkbox]),select,textarea{font-size:16px;min-height:42px}
  button{min-height:42px}
  .row{flex-wrap:wrap;max-width:100%}
  .scroll{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .scroll table{min-width:560px}
  footer{font-size:11px;line-height:1.55}
}
@media (max-width: 370px) {
  .hero-grid,.forecast-summary-grid{gap:6px!important}
  .hero-card,.forecast-summary-card{padding:11px 8px}
  .weather-item{gap:5px;padding:9px 6px}
  .weather-icon{flex-basis:18px;font-size:16px}
}
