/* Shared responsive layout. Desktop artwork is retained. */
body .travel-map-page .map-purchase-dialog { box-sizing: border-box; width: 750px; max-width: calc(100vw - 16px); max-height: calc(100dvh - 24px); overflow: auto; border: 0; padding: 75px 90px 50px; background: url('/images/popup.png') center / 100% 100% no-repeat; color: #33271c; text-align: center; font: 20px/1.4 Georgia,serif; }
.map-purchase-dialog::backdrop { background: #000b; }
body .travel-map-page .map-purchase-dialog h2 { color: #33271c; font-size: 27px; margin: 0 0 12px; }
body .travel-map-page .map-purchase-dialog p { margin: 10px 0; }
body .travel-map-page .map-purchase-actions { display: flex; justify-content: center; align-items: center; gap: 24px; margin-top: 18px; }
body .travel-map-page .map-purchase-actions form { display: block; margin: 0; }
body .travel-map-page .map-purchase-actions .popup_tl_ne, body .travel-map-page .map-purchase-actions .popup_tl_ano { display: inline-flex; justify-content: center; align-items: center; box-sizing: border-box; width: 105px; height: 50px; min-height: 50px; margin: 0; padding: 0; border: 0; color: white; font: bold 22px Georgia,serif; cursor: pointer; text-decoration: none; }
body .travel-map-page .map-purchase-actions :focus-visible { outline: 3px solid #254e8a; outline-offset: 3px; }
@media (max-width: 600px) {
  body .travel-map-page .map-purchase-dialog { padding: 70px 46px 64px; font-size: 18px; }
  body .travel-map-page .map-purchase-dialog h2 { font-size: 23px; }
  body .travel-map-page .map-purchase-actions { gap: 12px; }
}
body .diary .cards > *, body .diary .stats > *, body .hunt .tiles > * { min-width: 0; }
body .diary .scroll, body .hunt .scroll, body .travel-map-page .scroll { max-width: 100%; -webkit-overflow-scrolling: touch; }
body .travel-map-page, body .hunt { box-sizing: border-box; }
body .travel-map-page input, body .travel-map-page select { box-sizing: border-box; min-width: 0; }

@media (max-width: 800px) {
  body { margin: 0; background: #10151c; }
  .horni-menu, .horni-menu * { box-sizing: border-box; }
  .horni-menu { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; width: auto; height: auto; margin: 8px; }
  .horni-menu span { position: relative; display: flex; align-items: center; width: auto; height: 40px; margin: 0; padding: 6px 34px 6px 6px; background: #25313e; border: 1px solid #526274; border-radius: 7px; font: 13px/1.2 Arial,sans-serif; }
  .horni-menu span > div { width: 100% !important; margin: 0; background: none; }
  .horni-menu span > div > div { width: auto; height: auto; overflow-wrap: anywhere; }
  .horni-menu span img { position: absolute; right: 4px; top: 5px; width: 28px; height: 28px; float: none; }

  .ijaland, .ijaland2 { box-sizing: border-box; width: calc(100% - 16px); height: auto; min-height: 0; margin: 12px 8px; padding: 16px; background: #e7dfcb; border: 1px solid #a99771; border-radius: 12px; color: #29271f; }
  .ijaland_top_nadpis { display: block; position: static; margin: -16px -16px 20px; padding: 16px; border-radius: 12px 12px 0 0; background: #354b3b; color: #fff; font-size: 26px; overflow-wrap: anywhere; }
  .ijaland_top_obsah, .ijaland_top_obsah2 { position: static; box-sizing: border-box; width: 100%; height: auto; margin: 0; padding: 0; font-size: 18px; line-height: 1.5; overflow-wrap: anywhere; }
  .ijaland_top_obsah::after { content: ''; display: block; clear: both; }
  .ijaland2 input:not([type=hidden]), .ijaland2 select, .ijaland2 textarea { box-sizing: border-box; max-width: 100%; font-size: 16px; }
  .ijaland_top_obsah table { display: block; max-width: 100%; overflow-x: auto; }
  .ijaland_top_obsah canvas, .ijaland_top_obsah svg { max-width: 100%; }
  .ijaland_zpet, .ijaland_predchozi, .ijaland_dalsi,
  .ijaland > a, .ijaland_top_summenu > a { position: static; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: auto; height: auto; min-height: 44px; margin: 8px 4px 8px 0; padding: 10px 16px; background: #354b3b; border-radius: 8px; color: #fff; font: 16px/1.4 Arial,sans-serif; text-decoration: none; text-align: center; }
  .ijaland > a { display: flex; margin: 10px 0; }
  body .menu-grid { grid-template-columns: repeat(3,minmax(0,1fr)); grid-template-rows: none; gap: 8px; }
  body .menu-grid .mmenu { box-sizing: border-box; height: auto; min-width: 0; padding: 10px 4px; background: #f5efdf; border-radius: 8px; }
  body .menu-grid .mmenu a { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; color: #29271f; }
  body .menu-grid .mmenu img { width: 70px; max-width: 100%; height: auto; margin: 0; float: none; }
  body .menu-grid .mmenu b { position: static; display: block; max-width: 100%; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
  .menu-empty { display: none; }
  .ijaland_shop { box-sizing: border-box; width: 100%; height: auto; min-height: 100px; float: none; margin: 0; padding: 14px 0; overflow: auto; }
  .ijaland_shop > a > img, .ijaland_shop > img { width: 64px; height: 64px; margin: 0 10px 6px 0; }
  .ijaland_shop b { font-size: 20px; }
  .ijaland_shop i { position: static; display: block; float: none; font-size: 18px; color: #28652b; }
  .popup { position: fixed; inset: 8% 12px auto; width: auto; height: auto; max-height: 84vh; overflow: auto; margin: 0; padding: 20px; background: #e7dfcb; border-radius: 12px; z-index: 2000; box-shadow: 0 0 0 100vmax #0009; }
  .popup_obsah { width: auto; height: auto; margin: 0; font-size: 20px; }
  .popup_tl_ne, .popup_tl_ano, .popup_tl_zpet { margin: 8px; }

  body .diary, body .hunt, body .travel-map-page { width: calc(100% - 16px); max-width: none; margin: 12px 8px 20px; padding: 16px; border-radius: 12px; overflow-wrap: anywhere; }
  body .diary h1, body .hunt h1, body .travel-map-page h1 { font-size: 26px; line-height: 1.25; }
  body .diary h2, body .hunt h2, body .travel-map-page h2 { font-size: 21px; line-height: 1.35; }
  body .diary .cards { grid-template-columns: minmax(0,1fr); }
  body .diary .stats, body .hunt .tiles { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  body .diary .stat, body .diary .card, body .hunt .tile, body .hunt article { padding: 12px; min-width: 0; }
  body .diary .stat strong, body .hunt strong.metric { font-size: 22px; }
  body .diary nav { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; }
  body .diary nav a { display: flex; align-items: center; min-height: 44px; padding: 10px 12px; line-height: 1.4; }
  body .diary th, body .diary td, body .hunt th, body .hunt td, body .travel-map-page th, body .travel-map-page td { padding: 10px 8px; font-size: 14px; }
  body .travel-map-page form { align-items: stretch; gap: 8px; }
  body .travel-map-page form > label { flex-basis: 100%; }
  body .travel-map-page select { width: 100%; }
  body .travel-map-page button, body .travel-map-page .share-actions .share-button { min-height: 44px; white-space: normal; overflow-wrap: anywhere; }
  body .travel-map-page .share-actions { display: flex; flex-direction: column; align-items: stretch; }
  body .travel-map-page .share-actions button, body .travel-map-page .share-actions .share-button { width: 100%; box-sizing: border-box; }
  body #daily-travel-map { height: 55vh; min-height: 300px; max-height: 500px; }
  body .travel-map-page .leaflet-control-layers { max-width: 190px; max-height: 180px; overflow: auto; }
}
@media (max-width: 380px) {
  body .menu-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body .diary .stats, body .hunt .tiles { grid-template-columns: minmax(0,1fr); }
}
