/* Mobile readability; retain normal document flow instead of hiding page overflow. */
#page img{max-width:100%}
#page img[width],#page img:not([height]){height:auto}
#page table{max-width:100%}
/* These thumbnails already have a fixed height; shrinking only their width distorts them.
   Keep their aspect ratio inside the table's existing horizontal scroll region. */
#page .trail-stop-table img[src*="data/galactic_trail/"],
#page .trail-stop-table img[src*="data/planetary_trail/"]{max-width:none;width:auto}
@media(max-width:800px),(hover:none) and (pointer:coarse){
 #page #program-vystavy summary img{width:40px;max-width:40px;height:auto}
 #page #program-vystavy summary td:first-child{width:52px}
}
@media(max-width:800px){
 #page{overflow-wrap:break-word}
 #page a{overflow-wrap:anywhere}
 #page p{line-height:1.5}
 #page [align="justify"],#page [style*="text-align: justify"],#page [style*="text-align:justify"],#page .odpoved{text-align:left!important;line-height:1.5}
 #page table.scr{display:table;box-sizing:border-box;width:min(512px,100%);max-width:100%;margin:16px 0;table-layout:fixed}
 #page table.scr img{display:block;max-width:100%;height:auto}
 #page td[height="60"][width]:empty{width:0;padding:0}
 #page td[height="60"] img{max-width:48px;max-height:48px;object-fit:contain}
 #page .school-program-columns{display:none}
 #page .school-program-card,#page .school-program-card tbody{display:block;width:100%}
 #page .school-program-card tr{display:grid;grid-template-columns:2rem minmax(0,1fr);gap:6px 10px;height:auto;padding:12px 4px;box-sizing:border-box}
 #page .school-program-card td{display:block;width:auto;text-align:left;padding:0;min-width:0}
 #page .school-program-card td:nth-child(n+3){grid-column:2}
 #page .school-program-card td:nth-child(n+3)::before{content:attr(data-label) ': ';font-size:14px;font-weight:600}
 #page .school-program-card td:nth-child(n+3) font{font-size:15px}
 #page .school-program-card td:first-child{text-align:center;font-weight:bold}
 body[data-page="publikace"] .faq table,body[data-page="publikace"] .faq tbody{display:block;width:100%}
 body[data-page="publikace"] .faq tr{display:grid;grid-template-columns:80px minmax(0,1fr) auto;gap:10px;align-items:center;height:auto;min-height:100px}
 body[data-page="publikace"] .faq td{display:block;width:auto;min-width:0;overflow-wrap:anywhere}
 body[data-page="publikace"] .faq td:last-child:empty{display:none}
 body[data-page="publikace"] .faq td:nth-child(3){white-space:nowrap}
 body[data-page="mesicnik"] img[src*="Mesicnik-"][style*="width: 25%"]{width:min(100%,440px)!important;margin:12px 0!important}
 #allsky-app{padding:12px}
 #allsky-app .container{width:100%}
 #allsky-app .snapshot,#allsky-app video{box-sizing:border-box;max-width:100%}
 #page #allsky-app .info{text-align:left;line-height:1.5}
}
#allsky-app.night h1,#allsky-app.night h2{color:var(--text-night)}
#allsky-app.night .camera-navigation a{color:#acf}
@media(prefers-reduced-motion:reduce){#page .odpoved{transition:none!important}}
