body.poi-map-mode #discover-location-btn,
body.poi-map-mode #cluster-panel,
body.poi-map-mode #map-3d,
body.poi-map-mode .map-view-switcher,
body.poi-map-mode #map-view-toggle,
body.poi-map-mode #about-btn,
body.poi-map-mode #submit-open-btn,
body.poi-map-mode #submit-modal,
body.poi-map-mode #about-modal,
body.poi-map-mode #settings-modal,
body.poi-map-mode #welcome-modal {
  display: none !important;
}

body.poi-map-mode #overlay-controls .schema-only {
  display: none !important;
}

body.poi-map-mode #overlay-controls {
  bottom: 78px;
}

body.poi-map-mode #district-info-panel {
  top: 16px;
}

body.poi-map-mode .di-gang {
  color: var(--di-color, #ffffff);
  font: 700 12px/1.25 "Rajdhani", sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.poi-map-mode .di-breakdown {
  display: none !important;
}

body.poi-map-mode .district-label-district {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

body.poi-map-mode .district-label__faction {
  color: #f4fbff;
  font: 800 8px/1.1 ui-monospace, monospace;
  letter-spacing: 0.08em;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

.poi-map-mode #sidebar {
  display: flex;
  flex-direction: column;
}

.poi-sidebar-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.poi-sidebar-intro {
  margin: 0;
  padding: 14px 15px 10px;
  color: var(--text-muted, #8ea1a8);
  border-bottom: 1px solid rgba(0, 229, 255, 0.12);
  font: 500 12px/1.5 "Rajdhani", sans-serif;
}

.poi-group-filters {
  display: grid;
  gap: 8px;
  padding: 12px 14px 15px;
}

.poi-filter {
  min-height: 42px;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  color: #64737a;
  border: 1px solid rgba(126, 148, 156, 0.2);
  background: rgba(3, 8, 11, 0.72);
  font: 700 12px/1 "Orbitron", sans-serif;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0.52;
  transition: opacity 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.poi-filter:hover,
.poi-filter:focus-visible {
  transform: translateX(2px);
}

.poi-filter.active {
  color: #effcff;
  opacity: 1;
}

.poi-filter--cyan.active { border-color: #00e5ff; }
.poi-filter--yellow.active { border-color: #f7ff00; }
.poi-filter--magenta.active { border-color: #ff2ad4; }
.poi-filter__glyph { font-size: 18px; text-align: center; }
.poi-filter--cyan .poi-filter__glyph { color: #00e5ff; }
.poi-filter--yellow .poi-filter__glyph { color: #f7ff00; }
.poi-filter--magenta .poi-filter__glyph { color: #ff2ad4; }
.poi-filter b { color: inherit; font: 700 11px/1 "Rajdhani", sans-serif; }

.poi-type-panel {
  padding: 0 14px 14px;
  border-bottom: 1px solid rgba(0, 229, 255, 0.12);
}

.poi-type-panel__header {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #9cb1b8;
  font: 700 10px/1 "Orbitron", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.poi-type-panel__actions { display: flex; gap: 5px; }
.poi-type-panel__actions button {
  padding: 4px 7px;
  color: #8ca0a7;
  border: 1px solid rgba(126, 148, 156, 0.25);
  background: rgba(3, 8, 11, 0.72);
  font: 800 9px/1 "Rajdhani", sans-serif;
  text-transform: uppercase;
  cursor: pointer;
}
.poi-type-panel__actions button:hover,
.poi-type-panel__actions button:focus-visible { color: #f7ff00; border-color: rgba(247, 255, 0, 0.62); }

.poi-type-filters {
  max-height: min(230px, 28vh);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  overflow: auto;
  scrollbar-width: thin;
}

.poi-type-filter {
  min-width: 0;
  min-height: 32px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 4px 7px;
  color: #5f7076;
  border: 1px solid rgba(126, 148, 156, 0.16);
  background: rgba(3, 8, 11, 0.66);
  font: 700 9px/1.1 "Rajdhani", sans-serif;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0.46;
  transition: opacity 140ms ease, border-color 140ms ease, background 140ms ease;
}

.poi-type-filter:hover,
.poi-type-filter:focus-visible { opacity: 0.82; }
.poi-type-filter.active { color: #e7f4f7; opacity: 1; }
.poi-type-filter.group-inactive { opacity: 0.28; }
.poi-type-filter--cyan.active { border-color: rgba(0, 229, 255, 0.58); background: rgba(0, 229, 255, 0.08); }
.poi-type-filter--yellow.active { border-color: rgba(247, 255, 0, 0.58); background: rgba(247, 255, 0, 0.08); }
.poi-type-filter--magenta.active { border-color: rgba(255, 42, 212, 0.58); background: rgba(255, 42, 212, 0.08); }
.poi-type-filter--cyan .poi-vector-icon { color: #00e5ff; }
.poi-type-filter--yellow .poi-vector-icon { color: #f7ff00; }
.poi-type-filter--magenta .poi-vector-icon { color: #ff2ad4; }
.poi-type-filter .poi-vector-icon { width: 16px; height: 16px; }
.poi-type-filter span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poi-type-filter b { color: inherit; font: 800 9px/1 ui-monospace, monospace; }

.poi-list {
  flex: 1 1 150px;
  min-height: 0;
  margin: 0;
  padding: 0 8px 10px;
  overflow: auto;
  list-style: none;
}

.poi-list-item {
  width: 100%;
  display: grid;
  grid-template-columns: 27px 1fr;
  gap: 9px;
  align-items: center;
  padding: 9px 8px;
  color: #dce8eb;
  border: 0;
  border-bottom: 1px solid rgba(126, 148, 156, 0.12);
  background: transparent;
  font-family: "Rajdhani", sans-serif;
  text-align: left;
  cursor: pointer;
}

.poi-list-item:hover,
.poi-list-item:focus-visible { background: rgba(0, 229, 255, 0.07); }
.poi-list-item__glyph { font-size: 17px; text-align: center; }
.poi-list-item__glyph {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: rgba(3, 8, 11, 0.82);
}
.poi-list-item__glyph .poi-vector-icon {
  width: 18px;
  height: 18px;
}
.poi-list-item--cyan .poi-list-item__glyph { color: #00e5ff; }
.poi-list-item--yellow .poi-list-item__glyph { color: #f7ff00; }
.poi-list-item--magenta .poi-list-item__glyph { color: #ff2ad4; }
.poi-list-item strong { display: block; font-size: 14px; line-height: 1.1; }
.poi-list-item small { display: block; margin-top: 2px; color: #71868d; font-size: 11px; }

.poi-source {
  padding: 11px 14px 13px;
  color: #596c73;
  border-top: 1px solid rgba(0, 229, 255, 0.12);
  font: 600 9px/1.45 ui-monospace, monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.poi-marker-shell,
.poi-cluster-shell {
  background: transparent;
  border: 0;
}

.poi-marker {
  --poi-color: #00e5ff;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--poi-color);
  border: 1px solid color-mix(in srgb, var(--poi-color) 72%, transparent);
  border-radius: 50% 50% 50% 8px;
  box-shadow: 0 1px 0 rgba(2, 5, 7, 0.72), 0 0 6px color-mix(in srgb, var(--poi-color) 42%, transparent);
  transform: rotate(-45deg);
}

.poi-marker .poi-vector-icon {
  width: 15px;
  height: 15px;
  transform: rotate(45deg);
}
.poi-marker--cyan { --poi-color: #00e5ff; background: rgba(0, 229, 255, 0.3); }
.poi-marker--yellow { --poi-color: #f7ff00; background: rgba(247, 255, 0, 0.3); }
.poi-marker--magenta { --poi-color: #ff2ad4; background: rgba(255, 42, 212, 0.3); }

.poi-vector-icon {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  shape-rendering: geometricPrecision;
}

.poi-cluster {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #071014;
  border: 2px solid #f7ff00;
  border-radius: 50%;
  background: #f7ff00;
  box-shadow: 0 0 0 5px rgba(247, 255, 0, 0.16), 0 0 18px rgba(247, 255, 0, 0.46);
  font: 900 12px/1 "Orbitron", sans-serif;
}

.poi-cluster--cyan { border-color: #00e5ff; background: #00e5ff; box-shadow: 0 0 0 5px rgba(0, 229, 255, 0.16), 0 0 18px rgba(0, 229, 255, 0.46); }
.poi-cluster--magenta { border-color: #ff2ad4; background: #ff2ad4; box-shadow: 0 0 0 5px rgba(255, 42, 212, 0.16), 0 0 18px rgba(255, 42, 212, 0.46); }
.poi-cluster--mixed { border-color: #ffffff; background: conic-gradient(#00e5ff 0 33%, #f7ff00 33% 66%, #ff2ad4 66%); }

.poi-popup { min-width: 250px; }
.poi-popup__header {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
}
.poi-popup__glyph {
  width: 30px;
  height: 30px;
  padding: 5px;
  display: grid;
  place-items: center;
  color: #00e5ff;
  border-radius: 50%;
  background: #101b20;
}
.poi-popup__glyph .poi-vector-icon { width: 20px; height: 20px; }
.poi-popup__header span {
  display: block;
  margin-bottom: 6px;
  color: #00bcd4;
  font: 700 9px/1.2 ui-monospace, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.poi-popup__header strong { display: block; color: var(--white, #f4fbff); font: 800 17px/1.15 "Rajdhani", sans-serif; }
.poi-popup__description {
  margin: 12px 0;
  color: var(--text-muted, #b6c8ce);
  font: 600 13px/1.4 "Rajdhani", sans-serif;
}
.poi-popup__context {
  margin: 0;
  padding-top: 9px;
  border-top: 1px solid rgba(0, 80, 96, 0.18);
}
.poi-popup__context div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px;
  margin-top: 4px;
}
.poi-popup__context dt {
  color: var(--secondary, #00bcd4);
  font: 700 10px/1.25 ui-monospace, monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.poi-popup__context dd {
  margin: 0;
  color: var(--white, #f4fbff);
  font: 800 12px/1.25 "Rajdhani", sans-serif;
}

@media (max-width: 760px) {
  .poi-map-mode #header-status-bar .status-telemetry { display: none; }
  .poi-map-mode #sidebar { width: min(88vw, 330px); }
}

/* Phone map shell. Desktop keeps the original field-map layout. */
@media (max-width:760px), (pointer:coarse) and (max-width:900px), (max-height:520px) and (max-width:900px) {
  html,body.poi-map-mode{width:100%;max-width:100%;height:100dvh;min-height:100%;overflow:hidden;overscroll-behavior:none}
  body.poi-map-mode>header{min-height:58px;padding:8px 12px;overflow:hidden}
  body.poi-map-mode #header-main{min-width:0;justify-content:flex-start}
  body.poi-map-mode .header-logo{min-width:0;gap:8px}
  body.poi-map-mode .header-logo img{width:34px;height:34px;object-fit:contain}
  body.poi-map-mode .header-logo h1{min-width:0;max-width:calc(100vw - 58px);overflow:hidden;font-size:clamp(16px,5.1vw,22px);letter-spacing:1px;text-overflow:ellipsis;white-space:nowrap}
  body.poi-map-mode .header-logo h1 span{margin-left:6px}
  body.poi-map-mode #header-status-bar{position:fixed;z-index:1450;right:max(8px,env(safe-area-inset-right));bottom:max(8px,env(safe-area-inset-bottom));left:68px;height:54px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:5px;border:1px solid rgba(0,229,255,.55);background:rgba(2,8,12,.96);box-shadow:0 -12px 36px rgba(0,0,0,.58);backdrop-filter:blur(12px);opacity:1}
  body.poi-map-mode #header-status-bar .status-label,body.poi-map-mode #header-status-bar .status-dot,body.poi-map-mode #header-status-bar .status-led,body.poi-map-mode #header-status-bar .status-telemetry{display:none!important}
  body.poi-map-mode .header-action-btn{width:100%;min-width:0;min-height:44px;justify-content:center;gap:4px;padding:4px;color:var(--secondary);font-size:8px;touch-action:manipulation}
  body.poi-map-mode .header-action-btn svg{width:18px;height:18px}.poi-map-mode .header-action-btn span{overflow:hidden;text-overflow:ellipsis}
  body.poi-map-mode #map-container{min-width:0;min-height:0;overflow:hidden}
  body.poi-map-mode #sidebar-open{position:fixed;z-index:1460;top:auto;right:auto;bottom:max(8px,env(safe-area-inset-bottom));left:max(8px,env(safe-area-inset-left));width:54px;height:54px;padding:0;border-color:rgba(0,229,255,.68);background:rgba(2,8,12,.96);box-shadow:0 -12px 36px rgba(0,0,0,.45);touch-action:manipulation}
  body.poi-map-mode #sidebar{position:fixed;z-index:1550;top:auto;right:0;bottom:0;left:0;width:100%;max-width:none;height:min(78dvh,680px);padding-top:10px;padding-bottom:env(safe-area-inset-bottom);overflow:hidden;border-top:1px solid var(--secondary);border-right:0;border-radius:18px 18px 0 0;box-shadow:0 -28px 70px rgba(0,0,0,.82);transform:translateY(0);opacity:1;transition:transform .24s ease,opacity .2s ease;overscroll-behavior:contain}
  body.poi-map-mode #sidebar:before{content:"";position:absolute;z-index:3;top:7px;left:50%;width:42px;height:4px;border-radius:4px;background:rgba(255,255,255,.27);translate:-50% 0}
  body.poi-map-mode #sidebar.hidden{display:flex;transform:translateY(105%);opacity:0;pointer-events:none}
  .poi-map-mode .poi-sidebar-title{flex:0 0 auto;min-height:54px;padding-top:10px}.poi-map-mode #poi-sidebar-close{width:44px;height:44px}
  .poi-map-mode .poi-sidebar-intro{display:none}.poi-map-mode .poi-group-filters{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding:8px 10px}.poi-map-mode .poi-filter{min-width:0;min-height:46px;grid-template-columns:22px minmax(0,1fr);gap:4px;padding:0 7px;font-size:9px}.poi-map-mode .poi-filter b{grid-column:2;font-size:9px}.poi-map-mode .poi-filter__glyph{grid-row:1/3;font-size:16px}
  .poi-map-mode .poi-type-panel{padding:0 10px 10px}.poi-map-mode .poi-type-panel__header{min-height:40px}.poi-map-mode .poi-type-panel__actions button{min-height:34px}.poi-map-mode .poi-type-filters{max-height:22dvh;gap:5px}.poi-map-mode .poi-type-filter{min-height:44px;padding:5px 7px;font-size:10px}
  .poi-map-mode .sidebar-search-container{padding:8px 10px}.poi-map-mode #poi-search{min-height:44px;font-size:16px}.poi-map-mode .poi-list{overscroll-behavior:contain}.poi-map-mode .poi-list-item{min-height:50px}
  body.poi-map-mode #overlay-controls{right:8px;bottom:calc(72px + env(safe-area-inset-bottom));padding:6px 8px}.poi-map-mode #district-info-panel{display:none}
  body.poi-map-mode .leaflet-control-zoom{margin-right:8px;margin-bottom:calc(72px + env(safe-area-inset-bottom))}.poi-map-mode .leaflet-control-zoom a{width:44px;height:44px;line-height:44px}.poi-map-mode .leaflet-bottom.leaflet-right .leaflet-control-scale{margin-bottom:calc(72px + env(safe-area-inset-bottom))}.poi-map-mode .leaflet-tooltip{display:none}
  .poi-mobile-detail{position:fixed;z-index:1520;right:0;bottom:0;left:0;max-height:min(62dvh,560px);padding:28px 16px calc(18px + env(safe-area-inset-bottom));overflow:auto;color:#eafaff;border-top:1px solid var(--secondary);border-radius:18px 18px 0 0;background:rgba(3,9,12,.985);box-shadow:0 -28px 70px rgba(0,0,0,.82);overscroll-behavior:contain}
  .poi-mobile-detail[hidden]{display:none}.poi-mobile-detail:before{content:"";position:absolute;top:8px;left:50%;width:42px;height:4px;border-radius:4px;background:rgba(255,255,255,.27);translate:-50% 0}.poi-mobile-detail__close{position:absolute;z-index:2;top:14px;right:14px;width:44px;height:44px;color:#eafaff;border:1px solid rgba(255,255,255,.22);background:#071015;font-size:24px}.poi-mobile-detail .poi-popup{min-width:0;padding-top:8px}.poi-mobile-detail .poi-popup__header{padding-right:50px}.poi-mobile-detail .poi-popup__edit{min-height:44px;color:var(--secondary,#00e5ff);border-color:color-mix(in srgb,var(--secondary,#00e5ff) 55%,transparent)}
  .poi-mobile-cluster{display:grid;place-items:center;width:38px;height:38px;color:#030709;border:2px solid #f7ff00;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fffda0,#f7ff00 45%,#af9d00);box-shadow:0 0 0 3px rgba(3,7,9,.8),0 0 20px rgba(247,255,0,.58);font:900 12px/1 "Orbitron",sans-serif}.poi-mobile-cluster-shell{border:0;background:transparent}.poi-list-more{padding:12px;color:#80939a;border-top:1px solid rgba(0,229,255,.14);font:700 10px/1.4 ui-monospace,monospace}
}

@media (max-height:520px) and (orientation:landscape){
  body.poi-map-mode>header{min-height:50px;padding:5px 10px}.poi-map-mode .header-logo img{width:30px;height:30px}.poi-map-mode .header-logo h1{font-size:16px}
  body.poi-map-mode #header-status-bar{top:56px;right:8px;bottom:auto;left:auto;width:58px;height:auto;grid-template-columns:1fr}.poi-map-mode .header-action-btn{min-height:50px}.poi-map-mode .header-action-btn span{display:none}
  body.poi-map-mode #sidebar-open{top:56px;right:72px;bottom:auto;left:auto;width:50px;height:50px}
  body.poi-map-mode #sidebar{right:0;left:auto;width:min(430px,72vw);height:100dvh;border-radius:18px 0 0 18px}.poi-mobile-detail{top:0;right:0;bottom:0;left:auto;width:min(430px,72vw);max-height:100dvh;border-radius:18px 0 0 18px}
  body.poi-map-mode #overlay-controls{right:78px;bottom:8px}.poi-map-mode .leaflet-control-zoom{margin-right:72px;margin-bottom:8px}
}
