:root {
  --zoomlevel: 1px;
}
* {
  -webkit-tap-highlight-color: transparent;
}
.bg {
  background-color: #383838;
}
body {
  overflow: none;
  font-family: 'Roboto Condensed', sans-serif;
}
main {
  flex: 3;
  background-color: #383838;
  height: 100vh;
  height: 100dvh;
}

.wrapper {
  display: flex;
  overflow: none;
}

.noselect {
  -webkit-touch-callout: none;
    -webkit-user-select: none;
     -khtml-user-select: none;
       -moz-user-select: none;
        -ms-user-select: none;
            user-select: none;
}
.flex-center{
  display:flex;
  align-items:center;
  justify-content:center;
}
.parent {
  background-color: #00000080;
  position: absolute;
  max-height: 100vh;
  max-width: 100vw;
  bottom: 0px;
  right: 0px;
  left:0px;
  top: 0px;
  z-index: 100;
}
.panel-parent {
  flex-direction: column;
  border-image-source: url(../images/panel.png);
  border-image-slice: 47 fill;
  border-image-width: 47px;
  margin: 50px 12px;
  min-width: 200px;
  min-height: 200px;
}
.panel-footer {
  margin-bottom: 18px;
}
.panel{
  max-height: calc(100vh - 140px);
  max-width: calc(100vw - 48px);
  scrollbar-gutter: stable;
  white-space: nowrap;
  color: white;
  padding: 8px;
  margin: 16px;
  overflow: auto;
  font-size: 18px;
}
.panel::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.panel::-webkit-scrollbar-track {
  background-color: #11100E;
  border-radius: 100px;
}
.panel::-webkit-scrollbar-thumb {
  background-color: #EEEEEE;
  border-radius: 100px;
  background-clip: content-box;
}
.panel::-webkit-scrollbar-corner {
  background: rgba(0,0,0,0);
}
.title{
  font-size: 22px;
  font-weight: bold;
}
.item {
  display: inline-flex;
  align-items:center;
  justify-content:center;
  border-image-source: url(../images/item-bg.png);
  border-image-slice: 8 fill;
  border-image-width: 8px;
  margin: 4px;
  min-width: 48px;
  min-height: 48px;
  touch-action: manipulation;
}
.item.collected {
  border-image-source: none;
  border-radius: 3px;
  background-color: green;
}
.item img{
  width: 32px;
  height: 32px;
  cursor: pointer;
}
@media (max-width: 768px) {
  .panel-parent {
    margin: 30px 6px;
    min-width: 0;
  }
  .panel {
    max-height: calc(100vh - 100px);
    max-width: calc(100vw - 24px);
    white-space: normal;
    font-size: 16px;
  }
}
/* Touch-primary devices (phones, and tablets in ANY orientation — a landscape
   tablet is often wider than the 768px breakpoint above but is still touch-
   only, not mouse-driven) get the same comfortable sizing as narrow phones,
   keyed off input capability instead of viewport width. */
@media (hover: none), (pointer: coarse) {
  .leaflet-control-mouseposition {
    display: none;
  }
  .panel-parent {
    margin: 30px 6px;
    min-width: 0;
  }
  .panel {
    max-height: calc(100vh - 100px);
    max-width: calc(100vw - 24px);
    white-space: normal;
    font-size: 16px;
  }
  .leaflet-control-layers-expanded {
    max-height: 60vh;
    max-width: 78vw;
    overflow-y: auto;
  }
}
.border-fix{
  border-radius:25px 25px 10px 10px;
  border: 2px solid white;
}

.map {
  z-index: 5;
}

/* Floating action button that opens the bottom sheet */
.fab {
  position: absolute;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 20;
  width: 56px;
  height: 56px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  border: none;
  background-color: #383838;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}
.fab-icon {
  font-size: 24px;
  line-height: 1;
}

/* Backdrop shown behind the open bottom sheet */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.5);
  z-index: 15;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.sheet-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* Bottom sheet: slides up from the bottom, doesn't cover the whole map */
.bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 16;
  background-color: #383838;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.5);
  max-height: 70vh;
  padding-bottom: env(safe-area-inset-bottom);
  transform: translateY(100%);
  transition: transform 0.28s ease;
  touch-action: pan-y;
}
.bottom-sheet.open {
  transform: translateY(0);
}
.bottom-sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background-color: #666;
  margin: 10px auto;
}
.bottom-sheet-content {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: calc(70vh - 30px);
  padding: 4px 12px 16px;
}
.sheet-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 17px;
  font-family: 'Roboto Condensed', sans-serif;
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sheet-item:last-child {
  border-bottom: none;
}
.sheet-item:active {
  background-color: rgba(255,255,255,0.08);
}
.sheet-item-icon {
  font-size: 20px;
  width: 24px;
  text-align: center;
}

/* True desktop (mouse + wide screen) only: anchor the panel near the FAB
   instead of a full-width sheet sliding from the bottom edge. Gated on
   (hover: hover) and (pointer: fine) as well as width, so a landscape
   tablet — wide, but touch-driven — keeps the full-width touch sheet below
   instead of this mouse-oriented compact one. Stays pinned to the true
   viewport bottom (bottom: 0) so the closed-state translateY(100%) still
   clears it completely; the visual gap above the FAB comes from padding,
   not a "bottom" offset. */
@media (min-width: 769px) and (hover: hover) and (pointer: fine) {
  .bottom-sheet {
    left: auto;
    right: 16px;
    max-width: 300px;
    border-radius: 12px;
    padding-bottom: calc(84px + env(safe-area-inset-bottom));
  }
  .bottom-sheet-content {
    max-height: 60vh;
  }
}
.leaflet-container .leaflet-control-mouseposition {
  padding: 10px;
  margin: 15px;
  color: #ffffff;
  font: 18px "consolas";
  border-radius: 15px;
  background-color: #383838;
}

.leaflet-tooltip.city1, .leaflet-tooltip.city2, .leaflet-tooltip.city3 {
  background-color: transparent;
  border: transparent;
  box-shadow: none;
  font-weight: bold;
  color: #fff;
  text-shadow: 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, -1px 0 0 #000;
  font: calc(var(--zoomlevel) + 9px) "consolas";
}
.leaflet-tooltip.city2 {
  font-size: calc(var(--zoomlevel) + 7px);
}
.leaflet-tooltip.city3 {
  font-size: calc(var(--zoomlevel) + 5px);
}

/* Touch-friendly Leaflet layer control (POI type list) */
.leaflet-control-layers label {
  display: flex;
  align-items: center;
  min-height: 32px;
  font-size: 15px;
}
.leaflet-control-layers input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 8px;
}
@media (max-width: 768px) {
  .leaflet-control-layers-expanded {
    max-height: 60vh;
    max-width: 78vw;
    overflow-y: auto;
  }
}