/* Explore 2D (/explore/map): the zoomable canvas map of platforms. Loaded only by explore-map.php. */

.xm-main { gap: 22px; }
.xm-stage [hidden] { display: none !important; }

.xm-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.xm-hero h1 em { font-style: normal; color: #6ff0bc; }
.xm-hero .intro a { color: #fff; }
.xm-switch {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px;
  font-weight: 700; font-size: 13.5px; text-decoration: none; color: #c9d3ea;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16);
  transition: background-color .15s ease, color .15s ease;
}
.xm-switch:hover { background: rgba(255, 255, 255, .14); color: #fff; }

.xm-stage {
  --ink: #0b1533;
  --blue: #1463ff;
  --mint: #6ff0bc;
  --amber: #ffb547;
  --glass: rgba(14, 26, 60, .78);
  --glass-line: rgba(255, 255, 255, .12);
  position: relative;
  width: 100%;
  height: 80vh;
  min-height: 480px;
  max-height: 960px;
  border-radius: 28px;
  overflow: hidden;
  isolation: isolate;
  background: #0b1533;
  color: #fff;
  box-shadow: 0 30px 70px -30px rgba(11, 21, 51, .55);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}
.xm-stage:fullscreen { border-radius: 0; height: 100vh; max-height: none; }
.xm-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; cursor: grab; }
.xm-canvas.is-hot { cursor: pointer; }
.xm-canvas.is-drag { cursor: grabbing; }
.xm-canvas:focus-visible { box-shadow: inset 0 0 0 3px rgba(111, 240, 188, .6); }

.xm-loading {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px;
  color: #c3cde6; font-weight: 600; font-size: 15px; text-align: center; padding: 20px;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 22px 22px;
  transition: opacity .35s ease;
}
.xm-loading.is-done { opacity: 0; pointer-events: none; }
.xm-spin {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(111, 240, 188, .18); border-top-color: #6ff0bc;
  animation: xm-spin .9s linear infinite;
}
@keyframes xm-spin { to { transform: rotate(360deg); } }

/* ---- Glass chrome ---- */
.xm-top, .xm-ctrls, .xm-legend, .xm-mini, .xm-panel, .xm-tip { position: absolute; z-index: 3; }
.xm-top {
  left: 14px; top: 14px; right: 74px;
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px;
  pointer-events: none;
}
.xm-top > * { pointer-events: auto; }
.xm-search {
  position: relative; display: flex; align-items: center;
  width: 270px; height: 40px; border-radius: 12px;
  background: var(--glass); border: 1px solid var(--glass-line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.xm-search-ico { width: 17px; height: 17px; margin: 0 0 0 12px; color: #8d9bbd; flex: none; }
.xm-search input {
  appearance: none; flex: 1; min-width: 0; height: 100%; padding: 0 12px 0 8px; border: 0; background: none;
  color: #fff; font: 500 14.5px/1 Inter, ui-sans-serif, system-ui, sans-serif; outline: none;
}
.xm-search input::placeholder { color: #8d9bbd; }
.xm-search:focus-within { border-color: rgba(111, 240, 188, .55); box-shadow: 0 0 0 3px rgba(111, 240, 188, .14); }
.xm-ac {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 5px; list-style: none;
  border-radius: 14px; background: rgba(14, 26, 60, .96); border: 1px solid var(--glass-line);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .6); max-height: 330px; overflow: auto;
}
.xm-ac li {
  display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 9px; cursor: pointer;
  font-size: 14px; font-weight: 600; color: #e6ecfa;
}
.xm-ac li[aria-selected="true"], .xm-ac li:hover { background: rgba(20, 99, 255, .35); }
.xm-ac img, .xm-ac .xm-ac-dot { width: 20px; height: 20px; border-radius: 6px; background: #fff; flex: none; object-fit: contain; padding: 2px; }
.xm-ac .xm-ac-dot { background: hsl(var(--h) 70% 60%); padding: 0; border-radius: 50%; width: 14px; height: 14px; margin: 3px; }
.xm-ac small { margin-left: auto; color: #8d9bbd; font-weight: 500; font-size: 12px; white-space: nowrap; }
.xm-ac span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xm-ac-none { color: #8d9bbd !important; cursor: default !important; background: none !important; }

.xm-lens, .xm-chips {
  display: flex; gap: 3px; padding: 4px; border-radius: 12px;
  background: var(--glass); border: 1px solid var(--glass-line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.xm-lens button, .xm-chips button {
  appearance: none; border: 0; cursor: pointer; height: 30px; padding: 0 11px; border-radius: 9px;
  display: inline-flex; align-items: center; gap: 6px;
  background: none; color: #a9b5d2; font: 700 13px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  transition: background-color .15s ease, color .15s ease, opacity .15s ease;
}
.xm-lens button:hover, .xm-chips button:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.xm-lens button[aria-checked="true"] { background: #1463ff; color: #fff; }
.xm-chips button[aria-pressed="false"] { opacity: .45; }
.xm-chips button[aria-pressed="false"] .xm-sw { background: transparent; }
.xm-chips button[data-rated][aria-pressed="true"] { background: rgba(111, 240, 188, .16); color: #6ff0bc; opacity: 1; }
.xm-chips button[data-rated][aria-pressed="false"] { opacity: 1; }
.xm-sw { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--c); flex: none; transform: scale(.8); }
.xm-stage button:focus-visible, .xm-stage a:focus-visible { outline: 2px solid #6ff0bc; outline-offset: 2px; }

.xm-ctrls {
  right: 14px; top: 14px; display: grid; gap: 1px; border-radius: 12px; overflow: hidden;
  background: var(--glass-line); border: 1px solid var(--glass-line);
}
.xm-ctrls button {
  appearance: none; border: 0; cursor: pointer; width: 42px; height: 40px; display: grid; place-items: center;
  background: rgba(14, 26, 60, .88); color: #dbe3f5; transition: background-color .15s ease, color .15s ease;
}
.xm-ctrls button:hover { background: #1463ff; color: #fff; }
.xm-ctrls svg { width: 18px; height: 18px; }

.xm-mini {
  left: 14px; bottom: 14px; width: 160px; height: 160px; border-radius: 18px; cursor: crosshair;
  background: rgba(14, 26, 60, .8); border: 1px solid var(--glass-line);
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .6);
}

.xm-legend {
  right: 14px; bottom: 14px; max-width: 250px; padding: 11px 13px; border-radius: 14px;
  background: var(--glass); border: 1px solid var(--glass-line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: 12.5px; line-height: 1.45; color: #c3cde6;
}
.xm-legend b { display: block; margin-bottom: 5px; color: #fff; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.xm-legend .xm-bar { height: 8px; border-radius: 99px; margin: 6px 0 3px; }
.xm-legend .xm-ends { display: flex; justify-content: space-between; font-size: 11.5px; color: #8d9bbd; }
.xm-legend ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 3px 12px; }
.xm-legend li { display: flex; align-items: center; gap: 6px; }
.xm-legend li i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.xm-legend .xm-note { margin-top: 7px; padding-top: 7px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 11.5px; color: #8d9bbd; }

.xm-tip {
  left: 0; top: 0; max-width: 260px; padding: 8px 11px; border-radius: 11px; pointer-events: none;
  background: rgba(8, 16, 40, .94); border: 1px solid var(--glass-line); color: #fff;
  box-shadow: 0 12px 26px -10px rgba(0, 0, 0, .6); font-size: 13px; line-height: 1.35;
  will-change: transform;
}
.xm-tip strong { display: block; font-size: 14px; }
.xm-tip span { color: #a9b5d2; font-size: 12px; }

/* ---- Side panel / bottom sheet ---- */
.xm-panel {
  right: 70px; top: 14px; width: 320px; max-height: calc(100% - 28px); overflow: auto;
  padding: 18px 18px 16px; border-radius: 22px; outline: none;
  background: rgba(11, 21, 51, .94); border: 1px solid var(--glass-line);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .05);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  animation: xm-in .28s cubic-bezier(.2, .8, .2, 1);
  user-select: text; -webkit-user-select: text; touch-action: pan-y;
}
.xm-panel::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: 22px 22px 0 0;
  background: linear-gradient(90deg, var(--pc, #1463ff), #6ff0bc);
}
@keyframes xm-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.xm-grip { display: none; }
.xm-x {
  position: absolute; right: 10px; top: 12px; width: 32px; height: 32px; border: 0; border-radius: 10px; cursor: pointer;
  display: grid; place-items: center; background: rgba(255, 255, 255, .07); color: #c3cde6;
}
.xm-x:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.xm-x svg { width: 16px; height: 16px; }
.xm-p-type {
  display: inline-flex; align-items: center; gap: 7px; max-width: calc(100% - 40px);
  font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; text-decoration: none;
  color: hsl(var(--h, 208) 80% 74%);
}
.xm-p-type::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: hsl(var(--h, 208) 70% 60%); flex: none; }
.xm-p-type:hover { text-decoration: underline; }
.xm-p-head { display: flex; gap: 12px; align-items: center; margin: 12px 0 14px; }
.xm-p-icon { width: 48px; height: 48px; padding: 6px; border-radius: 14px; background: #fff; flex: none; object-fit: contain; box-shadow: 0 0 0 3px var(--tc, rgba(255, 255, 255, .12)); }
.xm-p-name { margin: 0; font-family: var(--display, Inter, sans-serif); font-weight: 800; font-size: 23px; line-height: 1.1; letter-spacing: -0.02em; color: #fff; overflow-wrap: anywhere; }
.xm-p-kind { margin-top: 3px; color: #a9b5d2; font-size: 13.5px; }
.xm-p-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 0 14px; }
.xm-p-facts div { padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .06); min-width: 0; }
.xm-p-facts dt { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #8d9bbd; }
.xm-p-facts dd { margin: 2px 0 0; font-weight: 700; font-size: 15px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xm-p-facts .xm-muted { color: #8d9bbd; font-weight: 600; }
.xm-p-facts .xm-star { color: #ffb547; }
.xm-p-go {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 13px;
  background: #1463ff; color: #fff; font: 800 15.5px/1 var(--display, Inter, sans-serif); text-decoration: none;
  box-shadow: 0 12px 24px -10px rgba(20, 99, 255, .8), inset 0 1px 0 rgba(255, 255, 255, .18);
  transition: background-color .15s ease, transform .15s ease;
}
.xm-p-go:hover { background: #2a73ff; transform: translateY(-1px); }
.xm-p-near-h { margin: 16px 0 7px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #8d9bbd; }
.xm-p-near { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.xm-p-near button {
  appearance: none; width: 100%; border: 0; cursor: pointer; display: flex; align-items: center; gap: 9px;
  padding: 6px 8px; border-radius: 10px; background: none; color: #dbe3f5; text-align: left;
  font: 600 13.5px/1.2 Inter, ui-sans-serif, system-ui, sans-serif;
}
.xm-p-near button:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.xm-p-near img { width: 22px; height: 22px; padding: 2px; border-radius: 7px; background: #fff; object-fit: contain; flex: none; }
.xm-p-near span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xm-p-near small { color: #8d9bbd; font-size: 12px; font-weight: 600; }

.xm-tierchip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-weight: 800; font-size: 12.5px; color: #0b1533; }
.xm-tierchip--platinum { background: linear-gradient(120deg, #e9efff, #b6c7ff); }
.xm-tierchip--gold { background: linear-gradient(120deg, #ffe08a, #ffb547); }
.xm-tierchip--silver { background: linear-gradient(120deg, #eef1f6, #c3cbd9); }
.xm-tierchip--bronze { background: linear-gradient(120deg, #f2c49c, #d08a52); }
.xm-tierchip--none { background: rgba(255, 255, 255, .12); color: #c9d3ea; }

/* ---- Crawlable list ---- */
.xm-list { padding: 26px; border-radius: 28px; background: rgba(255, 255, 255, .86); border: 1px solid #dbe2ee; }
.xm-list h2 { margin: 0 0 6px; font-family: var(--display, Inter, sans-serif); font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.02em; color: #0b1533; }
.xm-list-sub { margin: 0 0 18px; color: #4b5874; line-height: 1.6; }
.xm-lgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); align-items: start; }
.xm-l { position: relative; padding: 14px 16px 14px 20px; border-radius: 18px; background: #fff; border: 1px solid #e3e9f3; overflow: hidden; }
.xm-l::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: hsl(var(--h) 70% 55%); }
.xm-l h3 { margin: 0; font-size: 15.5px; line-height: 1.3; }
.xm-l h3 a { color: #0b1533; text-decoration: none; }
.xm-l h3 a:hover { color: #1463ff; text-decoration: underline; }
.xm-l h3 span { font-size: 12.5px; font-weight: 700; color: hsl(var(--h) 55% 38%); }
.xm-l p { margin: 4px 0 8px; font-size: 13px; color: #657086; line-height: 1.45; }
.xm-l ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 0; font-size: 13px; line-height: 1.5; max-height: 9em; overflow: auto; }
.xm-l li:not(:last-child)::after { content: "\00b7"; margin: 0 6px; color: #b4bdd0; }
.xm-l li a { color: #34405a; }

.xm-filt-btn { display: none !important; }
.xm-stage.has-panel .xm-legend { display: none; }
.xm-stage.show-filters .xm-filt-btn { background: #1463ff; color: #fff; }

@media (max-width: 1020px) {
  .xm-top { right: 70px; }
  .xm-filt-btn { display: grid !important; }
  .xm-chips { display: none; }
  .xm-stage.show-filters .xm-chips { display: flex; flex-wrap: wrap; }
}

@media (max-width: 720px) {
  .xm-stage { height: 76vh; min-height: 470px; border-radius: 22px; }
  .xm-top { left: 10px; top: 10px; right: 62px; gap: 6px; }
  .xm-search { width: 100%; height: 40px; }
  .xm-lens { width: 100%; }
  .xm-lens button { flex: 1; justify-content: center; padding: 0 6px; }
  .xm-ctrls { right: 10px; top: 10px; }
  .xm-ctrls button { width: 40px; height: 38px; }
  .xm-mini { width: 92px; height: 92px; left: 10px; bottom: 10px; border-radius: 14px; }
  .xm-legend { right: 10px; bottom: 10px; max-width: calc(100% - 122px); padding: 8px 10px; font-size: 11.5px; }
  .xm-legend .xm-note { display: none; }
  .xm-legend ul { grid-template-columns: 1fr 1fr; }
  .xm-panel {
    left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 50%;
    padding: 12px 16px 16px; border-radius: 22px 22px 0 0;
    animation-name: xm-up;
  }
  .xm-panel::before { border-radius: 22px 22px 0 0; }
  .xm-grip { display: block; width: 40px; height: 4px; margin: 0 auto 8px; border-radius: 9px; background: rgba(255, 255, 255, .22); }
  .xm-p-head { margin: 8px 0 10px; }
  .xm-p-name { font-size: 20px; }
  .xm-p-facts { grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .xm-p-facts div { padding: 6px 7px; }
  .xm-p-facts dd { font-size: 13.5px; }
  .xm-stage.has-panel .xm-mini, .xm-stage.has-panel .xm-legend { display: none; }
  .xm-list { padding: 18px; border-radius: 22px; }
}
@keyframes xm-up { from { transform: translateY(40%); opacity: .4; } }

@media (prefers-reduced-motion: reduce) {
  .xm-panel { animation: none; }
  .xm-spin { animation-duration: 3s; }
}
