/* Pohotovost webu: zobrazení v telefonu (jen do šířky 800 px, na počítači se nic nemění) */
@media (max-width: 800px) {
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body { margin: 0 !important; padding: 0 !important; font-size: 16px; }

  /* bloky, které byly na počítači pevně umístěné, jdou pod sebe */
  #vlajky, #logo, #menu, #obsah { position: static !important; top: auto !important; left: auto !important; width: auto !important; }
  #vlajky { padding: 10px 0 8px; }
  #vlajky2 { position: static !important; width: auto !important; text-align: center !important; }
  #vlajky img { width: 32px !important; height: 21px !important; margin: 0 6px; }
  #logo { padding: 0 6px 6px; }
  #logo a { display: block; }
  #logo img { display: block; width: 100% !important; height: auto !important; box-sizing: border-box; }
  #vlajky #logo, #vlajky #menu, #vlajky #obsah { text-align: center; }

  /* menu: tlačítka do mřížky */
  #menu table, #menu tbody { display: block !important; width: 100% !important; }
  #menu tr { display: flex !important; flex-wrap: wrap; gap: 4px; padding: 0 6px 4px; height: auto !important; background: #000; }
  #menu tr:first-child { padding-top: 4px; }
  #menu td { display: flex !important; align-items: center; justify-content: center; flex: 1 1 calc(33.33% - 4px); min-height: 46px;
    height: auto !important; white-space: normal !important; text-align: center; box-sizing: border-box; padding: 4px 3px !important; cursor: pointer; }
  #menu td, td[bgcolor="#777777"], marquee[bgcolor="#777777"] { background-color: #6b6b6b !important; }
  #menu td font { font-size: 15px !important; line-height: 1.2; }
  #menu tr + tr td { flex: 1 1 calc(50% - 4px); }
  #menu tr + tr td[colspan] { flex-basis: 100%; order: -1; min-height: 36px; }

  /* okno s výběrem penzionu */
  #selectLocat { position: fixed !important; top: 8px !important; left: 0 !important; right: 0 !important; width: auto !important; max-height: 92vh; overflow: auto; }
  #selectLocat table { width: 100% !important; height: auto !important; }

  /* obsah stránky na šířku displeje */
  #obsah > table, #obsah table { width: 100% !important; height: auto !important; }
  #obsah > table { table-layout: fixed; }
  #obsah > table > tbody > tr > td { padding: 10px 12px 16px !important; }
  #obsah td, #obsah th { width: auto !important; height: auto !important; }
  #obsah * { max-width: 100% !important; box-sizing: border-box; overflow-wrap: break-word; }
  #obsah img { max-width: 100% !important; height: auto !important; }
  #obsah iframe, #obsah embed, #obsah object { width: 100% !important; }
  #obsah [align="justify"], #obsah [style*="justify"] { text-align: left !important; }
  #obsah font[size="1"], #obsah font[size="2"] { font-size: 15px !important; }
  #obsah font[size="3"] { font-size: 16px !important; }
  #obsah div.img-dec { float: none !important; display: inline-block; margin: 0 4px 10px !important; }
  #obsah div:has(> table), #obsah td:has(> table) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #obsah table table { font-size: 14px; }
  #obsah table table td, #obsah table table th { padding: 3px 2px !important; }
  #obsah input, #obsah select, #obsah textarea { font-size: 16px !important; max-width: 100% !important; }
  #obsah input[type="text"], #obsah input:not([type]), #obsah textarea { width: 100% !important; }
  #obsah form table { table-layout: fixed; }
  #obsah form td:first-child { width: 30% !important; }
  #obsah marquee { display: block; width: 100% !important; overflow: hidden; }
  #obsah > table:has(marquee) { table-layout: fixed; }
  #obsah > table:has(marquee) td:last-child { width: 80px !important; }
  #edit { position: absolute !important; left: 0 !important; width: 1px !important; overflow: hidden !important; }
}
