/* Mapa naživo – celá obrazovka pod hlavičkou, panely plávajú nad mapou. */
.map-page { overflow: hidden; }
.map-wrap { position: relative; height: calc(100dvh - 66px); }
.map-page #map { position: absolute; inset: 0; height: auto; width: auto; background: #0b1020; image-rendering: pixelated; }
#map .leaflet-tile { image-rendering: pixelated; }
.leaflet-container { font-family: var(--f-text, Rubik, sans-serif); }
.leaflet-control-zoom a { background: var(--night-3) !important; color: var(--text) !important; border-color: var(--line) !important; }
.leaflet-control-zoom { border: 1px solid var(--line) !important; box-shadow: 0 8px 20px rgba(0,0,0,.4) !important; }
.leaflet-control-attribution { display: none; }

/* noc */
.night { position: absolute; inset: 0; pointer-events: none; z-index: 400; background: radial-gradient(ellipse at 50% 40%, rgba(20,30,80,.0), rgba(5,8,30,.35)), #0a1238; mix-blend-mode: multiply; opacity: 0; transition: opacity 3s; }

/* plávajúce panely */
.mp-panel { position: absolute; z-index: 600; background: rgba(15,22,40,.9); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 30px rgba(0,0,0,.45); padding: 10px 12px; }
.mp-tl { left: 14px; top: 14px; display: grid; gap: 10px; }
.mp-tr { right: 14px; top: 14px; text-align: right; min-width: 150px; }
.worlds { display: flex; gap: 4px; }
.worlds button { border: 1px solid var(--line); background: var(--field); color: var(--muted); border-radius: 6px; padding: 5px 10px; cursor: pointer; font: inherit; font-size: 13px; }
.worlds button[aria-selected="true"] { background: var(--btn-bg); color: var(--btn-ink); border-color: var(--btn-bg); font-weight: 600; }
.layers { display: grid; gap: 4px; font-size: 13.5px; }
.mp-panel .layers label { display: flex; flex-direction: row; justify-content: flex-start; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap; margin: 0; color: var(--text); font-size: 13.5px; }
.mp-panel .layers input { width: auto; margin: 0; padding: 0; }
.layers input { accent-color: var(--torch); }
.clock { font-family: var(--f-num); font-weight: 600; font-size: 22px; display: flex; justify-content: flex-end; gap: 8px; align-items: center; }
.coords { font-family: var(--f-mono); font-size: 12.5px; margin-top: 2px; }

.mp-side { right: 14px; top: 100px; width: 260px; max-height: calc(100% - 130px); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.side-tog { border: 0; background: none; color: var(--text); font: inherit; padding: 9px 12px; text-align: left; cursor: pointer; border-bottom: 1px solid var(--line); }
.mp-side.closed .side-body { display: none; }
.mp-side.closed { width: auto; }
.mp-side.closed .side-tog { border-bottom: 0; }
.side-body { overflow: auto; padding: 8px 12px 12px; }
.side-body h3 { font-size: 18px; margin: 8px 0 6px; }
.plist { display: grid; gap: 4px; }
.pli { display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; align-items: center; padding: 5px 6px; border-radius: 5px; cursor: pointer; font-size: 13.5px; background: rgb(var(--glass-rgb) / .5); border: 1px solid transparent; }
.pli:hover { border-color: var(--line); background: var(--night-3); }
.pli.on { border-color: var(--torch); }
.pli img, .pli .ic { width: 24px; height: 24px; border-radius: 3px; image-rendering: pixelated; display: grid; place-items: center; font-size: 16px; }
.pli .ic img { width: 30px; height: 30px; border-radius: 0; image-rendering: auto; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.pli .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pli .c { font-family: var(--f-mono); font-size: 11px; color: var(--muted); }
.follow { margin-top: 8px; font-size: 13px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.follow .btn { padding: 3px 8px; font-size: 14px; }
.empty-l { font-size: 13px; color: var(--muted); }

/* značky na mape */
.pl-mark { transition: transform .95s linear; }
.leaflet-zoom-anim .pl-mark, .pl-mark.jump { transition: none; }
.pm { position: relative; width: 30px; height: 30px; }
.pm img { width: 30px; height: 30px; border-radius: 4px; border: 2px solid #fff; box-shadow: 0 3px 8px rgba(0,0,0,.6); image-rendering: pixelated; background: #333; display: block; }
.pm .nm { position: absolute; left: 50%; top: -20px; transform: translateX(-50%); font-size: 11.5px; font-weight: 600; white-space: nowrap; background: rgb(var(--glass-rgb) / .88); color: #fff; border-radius: 3px; padding: 1px 6px; pointer-events: none; }
.pm .dir { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.pm .dir::after { content: ""; position: absolute; left: -5px; top: -27px; border: 5px solid transparent; border-bottom: 8px solid var(--torch); }
.pm.me img { border-color: var(--torch); }
.pm.followed img { border-color: var(--good); box-shadow: 0 0 0 3px rgba(85,255,127,.35), 0 3px 8px rgba(0,0,0,.6); }
.mk { display: grid; justify-items: center; }
.mk .b { width: 40px; height: 40px; display: grid; place-items: center; transition: transform .15s; }
.mk .b img { width: 40px; height: 40px; filter: drop-shadow(0 0 1.5px rgba(0,0,0,.9)) drop-shadow(0 4px 6px rgba(0,0,0,.6)); }
.mk:hover .b { transform: scale(1.18) translateY(-2px); }
.mk .t { margin-top: 3px; font-size: 11px; font-weight: 600; white-space: nowrap; background: rgb(var(--glass-rgb) / .85); border-radius: 3px; padding: 0 5px; color: #ffe6a8; }
.mk.home .t { color: #b6f5c6; } .mk.grave .t { color: #cfd5e2; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--night-3); color: var(--text); border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.leaflet-popup-content { margin: 12px 14px; font-size: 13.5px; }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.pcard2 { display: grid; grid-template-columns: 48px 1fr; gap: 10px; align-items: center; min-width: 200px; }
.pcard2 img { width: 48px; height: 48px; border-radius: 4px; image-rendering: pixelated; background: #333; }
.pcard2 b { font-size: 16px; }
.pcard2 .k { font-size: 12px; font-family: var(--f-mono); }
.pcard2 .acts { grid-column: 1 / -1; display: flex; gap: 6px; }
.pcard2 .acts .btn { padding: 4px 10px; font-size: 15px; text-decoration: none; }

.map-lock { position: absolute; inset: 0; z-index: 900; background: rgba(8,8,16,.75); backdrop-filter: blur(4px); display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; }
.map-msg { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 700; background: rgba(15,22,40,.95); border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; font-size: 14px; }

@media (max-width: 700px) {
  .mp-side { top: auto; bottom: 14px; right: 14px; width: min(260px, calc(100% - 28px)); max-height: 45%; }
  .mp-tr { min-width: 0; padding: 6px 10px; }
  .layers { display: none; }
  .mp-tl.open .layers { display: grid; }
  .clock { font-size: 18px; }
}
.far .mk .t { display: none; }
.far .mk .b, .far .mk .b img { width: 28px; height: 28px; }
