:root {
  --mlm-bg: #0f172a;
  --mlm-panel: #1e293b;
  --mlm-card: rgba(30, 41, 59, 0.7);
  --mlm-border: rgba(255, 255, 255, 0.1);
  --mlm-text: #f8fafc;
  --mlm-muted: #94a3b8;
  --mlm-accent: #10b981;
  --mlm-accent-rgb: 16, 185, 129;
  --mlm-accent2: #0ea5e9;
  --mlm-accent2-rgb: 14, 165, 233;
  --mlm-radius: 12px;
  --mlm-radius-lg: 20px;
  --mlm-font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mlm-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --mlm-glass: blur(12px) saturate(180%);
  --mlm-popup-radius: 16px;
  --mlm-popup-shadow: 0 20px 48px rgba(15, 23, 42, 0.30);
}

.mlm {
  font-family: var(--mlm-font-sans);
  color: var(--mlm-text);
  background: transparent;
  border-radius: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}

.mlm__toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: var(--mlm-glass);
  border-bottom: 1px solid var(--mlm-border);
  z-index: 10;
}

.mlm__searchWrap {
  display: flex;
  gap: 12px;
  width: 100%;
  position: relative;
}

.mlm__search {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--mlm-radius);
  border: 1px solid var(--mlm-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--mlm-text);
  outline: none;
  font-size: 14px;
  transition: all 0.2s ease;
}

.mlm__search:focus {
  border-color: var(--mlm-accent2);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 2px rgba(var(--mlm-accent2-rgb), 0.2);
}

.mlm__locate {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--mlm-radius);
  border: 1px solid var(--mlm-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--mlm-text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mlm__locate:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--mlm-accent2);
}

.mlm__quickSearch {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 28;
  width: min(470px, calc(100% - 28px));
}

.mlm .mlm__quickSearch,
.mlm .mlm__quickSearch * {
  box-sizing: border-box;
}

.mlm__quickSearchBox {
  display: grid;
  grid-template-columns: 18px 1fr 32px;
  align-items: center;
  gap: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 250, 255, 0.96) 100%);
  border: 1px solid #d3e1ee;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
  border-radius: 14px;
  padding: 10px 11px;
  backdrop-filter: blur(8px);
}

.mlm__quickSearchIcon {
  color: #5c6f84;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mlm__quickSearchInput {
  border: none !important;
  background: transparent;
  outline: none !important;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: 0.01em;
  line-height: 1.32;
  text-transform: none !important;
  width: 100%;
  min-width: 0;
}

.mlm__quickSearchInput::placeholder {
  color: #6e8298;
  font-weight: 500;
}

.mlm__quickSearchClear {
  all: unset;
  box-sizing: border-box;
  min-width: 0;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: #e9f1f9;
  color: #3b4c60;
  width: 30px !important;
  height: 30px !important;
  border-radius: 9px;
  cursor: pointer;
  line-height: 1;
  transition: transform 0.14s ease, background 0.18s ease, color 0.18s ease;
}

.mlm__quickSearchClear:hover {
  background: #dbe8f5;
  color: #1f2f44;
  transform: translateY(-1px);
}

.mlm__quickSearchClear:focus-visible {
  outline: 2px solid #5d8fc5;
  outline-offset: 1px;
}

.mlm__quickSearchClearIcon {
  display: block;
  pointer-events: none;
}

.mlm__quickSuggest {
  margin-top: 10px;
  border: 1px solid #d4e1ec;
  border-radius: 14px;
  background: rgba(252, 254, 255, 0.99);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  max-height: min(380px, 52vh);
  overflow-y: auto;
  padding: 6px;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
}

.mlm__quickOption {
  all: unset;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  border: 1px solid transparent;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  padding: 11px 12px;
  border-radius: 11px;
  margin-bottom: 6px;
  line-height: 1.28;
  text-transform: none !important;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}

.mlm__quickOption:last-child {
  margin-bottom: 0;
}

.mlm__quickOption:hover,
.mlm__quickOption--active {
  background: #f5f9fe;
  border-color: #d2e1ef;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.mlm__quickCode {
  display: block;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.25;
  color: #122034;
  letter-spacing: 0.01em;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.mlm__quickMetaRow {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.mlm__quickBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid #c4d8eb;
  background: #edf5fd;
  color: #234a75;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.mlm__quickMeta {
  display: block;
  color: #5f7185;
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  min-width: 0;
  flex: 1 1 auto;
}

.mlm__filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.mlm__filters::-webkit-scrollbar { display: none; }

.mlm__filter {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--mlm-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--mlm-muted);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.mlm__filter:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--mlm-text);
}

.mlm__filter--active {
  background: var(--mlm-accent2);
  color: white;
  border-color: var(--mlm-accent2);
}

.mlm__status {
  font-size: 11px;
  color: var(--mlm-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mlm__body {
  display: grid;
  grid-template-columns: 1fr 400px;
  flex: 1;
  min-height: 0;
  height: 100%;
}

.mlm--no-panel .mlm__body {
  grid-template-columns: 1fr;
}

.mlm__map {
  width: 100%;
  height: 100%;
  min-height: 300px;
  z-index: 1;
  background: #e8edf1;
  position: relative;
  overflow: visible;
}

.mlm__mapError {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 30;
  background: rgba(15, 23, 42, 0.9);
  color: #f8fafc;
  border: 1px solid rgba(248, 250, 252, 0.15);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.mlm__map::before {
  display: none;
}

.mlm__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--mlm-panel);
  border-left: 1px solid var(--mlm-border);
  overflow: hidden;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2);
}

.mlm__list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mlm__item {
  padding: 16px;
  border-radius: var(--mlm-radius);
  background: var(--mlm-card);
  border: 1px solid var(--mlm-border);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.mlm__item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(var(--mlm-accent2-rgb), 0.3);
}

.mlm__item--active {
  background: rgba(var(--mlm-accent2-rgb), 0.1);
  border-color: var(--mlm-accent2);
}

.mlm__itemTitle {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--mlm-text);
}

.mlm__itemMeta {
  font-size: 13px;
  color: var(--mlm-muted);
  line-height: 1.4;
}

.mlm__itemTags {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.mlm__tag {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  background: rgba(var(--mlm-accent2-rgb), 0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--mlm-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mlm__detail {
  position: absolute;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100%;
  background: var(--mlm-panel);
  z-index: 20;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.3);
}

.mlm__panel--show-detail .mlm__detail {
  right: 0;
}

.mlm__detailHeader {
  padding: 16px;
  border-bottom: 1px solid var(--mlm-border);
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  background: var(--mlm-panel);
  z-index: 21;
}

.mlm__back {
  background: none;
  border: none;
  color: var(--mlm-text);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.mlm__back:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mlm__detailContent {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.mlm__detail h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.mlm__sectionTitle {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mlm-muted);
  margin: 24px 0 12px 0;
}

.mlm__card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--mlm-border);
  border-radius: var(--mlm-radius);
  padding: 16px;
  margin-bottom: 16px;
}

.mlm__thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--mlm-radius);
  margin-bottom: 16px;
}

.mlm__pillbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.mlm__pill {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--mlm-border);
  color: var(--mlm-text);
  transition: all 0.2s ease;
}

.mlm__pill:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.mlm__pill--accent { background: var(--mlm-accent); color: white; border: none; }
.mlm__pill--accent2 { background: var(--mlm-accent2); color: white; border: none; }

.mlm__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.mlm__grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.mlm__grid img:hover {
  transform: scale(1.05);
}

/* Skeleton Loading */
.mlm__skeleton {
  height: 80px;
  border-radius: var(--mlm-radius);
  background: linear-gradient(90deg, rgba(255,255,255,0.03), rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  background-size: 200% 100%;
  animation: mlmShimmer 1.5s infinite;
  margin-bottom: 12px;
}

@keyframes mlmShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* MapLibre Overrides */
.mlm .maplibregl-map {
  background: #e8edf1;
  overflow: visible !important;
}

.mlm .maplibregl-popup-content {
  background: #f8fbff !important;
  color: #0f172a !important;
  border-radius: var(--mlm-popup-radius) !important;
  padding: 0 !important;
  overflow: hidden;
  box-shadow: var(--mlm-popup-shadow) !important;
  border: 1px solid #d3e1ee;
  width: min(336px, calc(100vw - 24px));
}

.mlm .maplibregl-popup {
  z-index: 45;
}

.mlm .maplibregl-popup.mlm__featurePopup {
  z-index: 62;
}

.mlm .maplibregl-popup.mlm__featurePopup,
.mlm .maplibregl-popup.mlm__featurePopup .maplibregl-popup-content,
.mlm .maplibregl-popup.mlm__featurePopup .maplibregl-popup-content * {
  box-sizing: border-box;
}

.mlm .maplibregl-popup.mlm__featurePopup .maplibregl-popup-content {
  width: min(336px, calc(100vw - 24px)) !important;
  max-width: min(336px, calc(100vw - 24px)) !important;
  overflow-x: hidden !important;
  overflow-y: hidden !important;
  margin: 0 !important;
}

.mlm .maplibregl-popup.mlm__featurePopup .maplibregl-popup-content::-webkit-scrollbar {
  display: none;
}

.mlm__popup {
  position: relative;
  background: transparent;
  width: 100%;
  max-width: 100%;
}

.mlm__popupMedia {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  min-height: 164px;
  max-height: 194px;
  background: radial-gradient(circle at 20% 30%, #d2e7f8 0%, #b9d7f0 35%, #9cc0e0 100%);
  width: 100%;
  max-width: 100%;
}

.mlm__popupImage {
  width: 100% !important;
  height: 100%;
  max-width: none !important;
  object-fit: cover;
  display: block;
  transform: scale(1.01);
  transition: transform 0.45s ease;
}

.mlm__popupMedia::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 44%),
    linear-gradient(180deg, rgba(7, 16, 31, 0.02) 44%, rgba(7, 16, 31, 0.22) 100%);
  pointer-events: none;
}

.mlm .maplibregl-popup.mlm__featurePopup:hover .mlm__popupImage {
  transform: scale(1.045);
}

.mlm__popupMedia--placeholder .mlm__popupPlaceholder {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 72% 24%, rgba(255, 255, 255, 0.45), transparent 58%),
    linear-gradient(145deg, #d8e9f8 0%, #bdd8ef 52%, #a3c3e2 100%);
}

.mlm__popupCode {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(11, 23, 40, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #f8fafc;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.mlm__popupClose {
  all: unset;
  box-sizing: border-box;
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 23, 40, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #f8fafc;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
  backdrop-filter: blur(4px);
}

.mlm__popupClose:hover {
  transform: translateY(-1px);
  background: rgba(11, 23, 40, 0.9);
  border-color: rgba(255, 255, 255, 0.48);
}

.mlm__popupClose:focus-visible {
  outline: 2px solid rgba(129, 194, 255, 0.9);
  outline-offset: 1px;
}

.mlm__popupCloseIcon {
  display: block;
  pointer-events: none;
}

.mlm__popupBody {
  padding: 13px 13px 12px;
  width: 100%;
  max-width: 100%;
}

.mlm__popupTitle {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.35;
  color: #0f172a;
}

.mlm__popupMeta {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.45;
  color: #516377;
}

.mlm__popupActions {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  width: 100%;
  max-width: 100%;
}

.mlm__popupLink {
  display: block;
  text-decoration: none;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #0f172a !important;
  background: #edf4fb;
  border: 1px solid #c7d7e7;
  border-radius: 8px;
  padding: 9px 10px;
  min-height: 38px;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.mlm__popupLink:link,
.mlm__popupLink:visited,
.mlm__popupLink:focus {
  color: #0f172a !important;
}

.mlm__popupLink:hover {
  background: #e0ecf8;
  color: #0b1220 !important;
  border-color: #aec5dc;
}

.mlm__popupLink:focus-visible {
  outline: 2px solid #5b8fcb;
  outline-offset: 1px;
}

.mlm__popupLink--ghost {
  background: #2256a5;
  border-color: #1d4b92;
  color: #f8fbff !important;
}

.mlm__popupLink--ghost:link,
.mlm__popupLink--ghost:visited,
.mlm__popupLink--ghost:focus {
  color: #f8fbff !important;
}

.mlm__popupLink--ghost:hover {
  background: #1d4b92;
  color: #ffffff !important;
}

.mlm .maplibregl-popup.mlm__hoverPopup .maplibregl-popup-content {
  width: auto;
  min-width: 0;
  border-radius: 999px !important;
  background: rgba(10, 20, 36, 0.92) !important;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.28) !important;
  padding: 0 !important;
}

.mlm__hoverTag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #f8fafc;
}

.mlm__hoverCode {
  font-weight: 800;
  letter-spacing: 0.05em;
}

.mlm__hoverName {
  opacity: 0.9;
}

.mlm .maplibregl-popup-tip {
  box-shadow: none !important;
}

.mlm .maplibregl-popup-anchor-top .maplibregl-popup-tip {
  border-top-color: transparent !important;
  border-bottom-color: #f8fbff !important;
}

.mlm .maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
  border-bottom-color: transparent !important;
  border-top-color: #f8fbff !important;
}

.mlm .maplibregl-popup-anchor-left .maplibregl-popup-tip {
  border-left-color: transparent !important;
  border-right-color: #f8fbff !important;
}

.mlm .maplibregl-popup-anchor-right .maplibregl-popup-tip {
  border-right-color: transparent !important;
  border-left-color: #f8fbff !important;
}

.mlm .maplibregl-popup.mlm__hoverPopup.maplibregl-popup-anchor-top .maplibregl-popup-tip {
  border-bottom-color: rgba(15, 23, 42, 0.9) !important;
}

.mlm .maplibregl-popup.mlm__hoverPopup.maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
  border-top-color: rgba(15, 23, 42, 0.9) !important;
}

.mlm .maplibregl-popup.mlm__hoverPopup.maplibregl-popup-anchor-left .maplibregl-popup-tip {
  border-right-color: rgba(15, 23, 42, 0.9) !important;
}

.mlm .maplibregl-popup.mlm__hoverPopup.maplibregl-popup-anchor-right .maplibregl-popup-tip {
  border-left-color: rgba(15, 23, 42, 0.9) !important;
}

.mlm .maplibregl-popup-close-button {
  color: #64748b;
  font-size: 18px;
  padding: 4px 8px;
  border-radius: 8px;
  right: 6px;
  top: 6px;
}

.mlm .maplibregl-popup-close-button:hover {
  color: #0f172a;
  background: #ebf2f9;
}

.mlm .maplibregl-ctrl-group {
  border: 1px solid #d9e2ea !important;
  border-radius: 8px !important;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12) !important;
}

.mlm .maplibregl-ctrl-group button {
  background: rgba(255, 255, 255, 0.95) !important;
  color: #334155 !important;
}

.mlm .maplibregl-ctrl-group button:hover {
  background: #f6f9fc !important;
}

.mlm .maplibregl-ctrl-attrib {
  background: rgba(255, 255, 255, 0.92) !important;
  color: #64748b !important;
  border: 1px solid #d9e2ea;
  border-top-left-radius: 8px;
}

.mlm .maplibregl-ctrl-attrib a {
  color: #2563eb !important;
}

.mlm--no-search .maplibregl-ctrl-top-right .maplibregl-ctrl {
  margin-top: 66px;
}

@media (max-width: 1024px) {
  .mlm__body {
    grid-template-columns: 1fr 340px;
  }

  .mlm__toolbar {
    padding: 12px;
    gap: 10px;
  }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .mlm__body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(230px, 1fr) minmax(210px, 1fr);
  }

  .mlm--no-panel .mlm__body {
    grid-template-rows: 1fr;
  }

  .mlm__toolbar {
    padding: 10px;
    gap: 8px;
  }

  .mlm__searchWrap {
    gap: 8px;
  }

  .mlm__search {
    font-size: 14px;
    padding: 11px 12px;
  }

  .mlm__locate {
    width: 42px;
    height: 42px;
  }

  .mlm__quickSearch {
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: min(352px, calc(100% - 18px));
  }

  .mlm__quickSearchBox {
    grid-template-columns: 15px 1fr 28px;
    gap: 7px;
    padding: 8px 8px;
    border-radius: 12px;
  }

  .mlm__quickSearchInput {
    font-size: 12px;
    line-height: 1.2;
  }

  .mlm__quickSuggest {
    margin-top: 8px;
    max-height: min(42vh, 260px);
    padding: 4px;
  }

  .mlm__quickOption {
    padding: 9px 9px;
    gap: 4px;
  }

  .mlm__quickCode {
    font-size: 13px;
  }

  .mlm__quickBadge {
    height: 19px;
    font-size: 10px;
    padding: 0 7px;
  }

  .mlm__quickMeta {
    font-size: 11px;
  }

  .mlm__panel {
    min-height: 220px;
  }
  
  .mlm__panel {
    border-left: none;
    border-top: 1px solid var(--mlm-border);
  }

  .mlm__list {
    padding: 10px;
    gap: 8px;
  }

  .mlm__item {
    padding: 12px;
  }

  .mlm__detailHeader {
    padding: 12px;
  }

  .mlm__detailContent {
    padding: 14px;
  }

  .mlm .maplibregl-popup-content {
    width: min(322px, calc(100vw - 22px));
  }

  .mlm .maplibregl-popup.mlm__featurePopup {
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    width: auto !important;
    max-width: none !important;
  }

  .mlm .maplibregl-popup.mlm__featurePopup .maplibregl-popup-content {
    width: min(334px, calc(100vw - 22px)) !important;
    max-width: min(334px, calc(100vw - 22px)) !important;
  }

  .mlm .maplibregl-popup.mlm__featurePopup .maplibregl-popup-tip {
    display: none !important;
  }

  .mlm__popupMedia {
    min-height: 156px;
    max-height: 182px;
  }

  .mlm__popupClose {
    width: 28px;
    height: 28px;
    top: 8px;
    right: 8px;
  }

  .mlm__popupTitle {
    font-size: 15px;
  }

  .mlm .maplibregl-ctrl-top-right .maplibregl-ctrl {
    margin-top: 8px;
    margin-right: 8px;
  }

  .mlm--no-search .maplibregl-ctrl-top-right .maplibregl-ctrl {
    margin-top: 62px;
  }

  .mlm .maplibregl-ctrl-bottom-right .maplibregl-ctrl {
    margin-right: 8px;
    margin-bottom: 8px;
  }

  .mlm .maplibregl-ctrl-group button {
    width: 34px;
    height: 34px;
  }
}

@media (max-width: 480px) {
  .mlm__quickSearch {
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: min(304px, calc(100% - 14px));
  }

  .mlm__quickSearchBox {
    grid-template-columns: 14px 1fr 26px;
    gap: 6px;
    padding: 7px 7px;
    border-radius: 10px;
  }

  .mlm__quickSearchInput {
    font-size: 11px;
    line-height: 1.2;
  }

  .mlm__quickSearchClear {
    width: 24px !important;
    height: 24px !important;
    border-radius: 7px;
  }

  .mlm__quickSuggest {
    margin-top: 7px;
    max-height: min(38vh, 220px);
  }

  .mlm__quickOption {
    padding: 8px 8px;
  }

  .mlm__quickCode {
    font-size: 11px;
  }

  .mlm__quickBadge {
    height: 17px;
    font-size: 9px;
    padding: 0 6px;
  }

  .mlm__quickMeta {
    font-size: 10px;
  }

  .mlm .maplibregl-popup-content {
    width: calc(100vw - 14px);
  }

  .mlm .maplibregl-popup.mlm__featurePopup {
    width: auto !important;
    max-width: none !important;
  }

  .mlm .maplibregl-popup.mlm__featurePopup .maplibregl-popup-content {
    width: min(318px, calc(100vw - 20px)) !important;
    max-width: min(318px, calc(100vw - 20px)) !important;
  }

  .mlm__popupBody {
    padding: 11px 11px 10px;
  }

  .mlm__popupMedia {
    min-height: 146px;
    max-height: 170px;
  }

  .mlm__popupCode {
    top: 8px;
    left: 8px;
    height: 24px;
    padding: 0 9px;
    font-size: 10px;
  }

  .mlm__popupClose {
    width: 26px;
    height: 26px;
    top: 7px;
    right: 7px;
  }

  .mlm__hoverTag {
    font-size: 10px;
    padding: 4px 8px;
  }

  .mlm__status {
    font-size: 10px;
    letter-spacing: 0.03em;
  }
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.mlm__item {
  animation: fadeInUp 0.4s ease forwards;
}

.mlm__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--mlm-muted);
  text-align: center;
  height: 100%;
}

.mlm--hidden { display: none !important; }
