/* ============================================================================
   TS ALL-FOR-ONE — HD ONE-CLICK TELEPORT WORLD MAP OVERLAY (v5)
   - Sharpened 2048x1536 HD Map (ts-world-map-hd.jpg) keeping exact 4:3 layout
   - 470+ verified flyable mainland & island pins + Tiên Giới (15) & Địa Ngục (12)
   - Smooth 60%-600% zoom (wheel, slider, +/- , pinch, double-click, region jump)
   - Smart zoom-based LOD labels + category filter + global 3,837-map search
   - Strictly scoped under #ts-wmap-root (zero conflict with game canvas)
   ============================================================================ */

#ts-wmap-root {
  --wm-frame-top: #7AD8FF;
  --wm-frame-mid: #2B7DE9;
  --wm-frame-bot: #1954B2;
  --wm-frame-border: #123D85;
  --wm-teal: #3CAEA3;
  --wm-header-grad: linear-gradient(180deg, #2B7DE9 0%, #37A5EC 55%, #48C6EF 100%);
  --wm-parchment: #F6F1DC;
  --wm-parchment-in: #FFFDF5;
  --wm-parchment-border: #C4AE84;
  --wm-ink: #5C4033;
  --wm-ink-strong: #3E271C;
  --wm-btn-sky: linear-gradient(180deg, #38BDF8 0%, #0EA5E9 54%, #0284C7 100%);
  --wm-btn-ok: linear-gradient(180deg, #4ADE80 0%, #22C55E 54%, #15803D 100%);
  --wm-btn-warn: linear-gradient(180deg, #FCD34D 0%, #F59E0B 54%, #D97706 100%);
  --wm-btn-purp: linear-gradient(180deg, #A78BFA 0%, #7C3AED 58%, #5B21B6 100%);
  --wm-font-disp: "Baloo 2", "Nunito", "Segoe UI", system-ui, sans-serif;
  --wm-font: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  --wm-hdr-shadow:
    -1.2px -1.2px 0 #0D3A80, 1.2px -1.2px 0 #0D3A80,
    -1.2px  1.2px 0 #0D3A80, 1.2px  1.2px 0 #0D3A80,
     0px    2px   3px rgba(8, 35, 86, 0.55);

  position: fixed;
  inset: 0;
  z-index: 9500;
  pointer-events: none;
  font-family: var(--wm-font);
  font-size: 13.5px;
  color: var(--wm-ink);
  user-select: none;
}

#ts-wmap-root *, #ts-wmap-root *::before, #ts-wmap-root *::after {
  box-sizing: border-box;
}

/* ==================== COMPACT FLOATING HUD LAUNCHER ==================== */
.tswm-fab {
  position: fixed;
  top: 12px;
  right: 12px;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #7AD8FF 0%, #2B7DE9 36%, #1954B2 100%);
  border: 2px solid #0E3578;
  box-shadow:
    0 0 0 1.5px rgba(173, 232, 255, 0.8),
    0 8px 22px rgba(8, 26, 66, 0.55),
    inset 0 1.5px 2px rgba(255, 255, 255, 0.9);
  cursor: pointer;
  touch-action: none;
  transition: transform .1s ease, filter .12s ease;
}
.tswm-fab:hover { filter: brightness(1.07); }
.tswm-fab:active { transform: scale(0.96); }

.tswm-fab-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #FFFFFF 0%, #FEF08A 48%, #F59E0B 100%);
  border: 2px solid #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  box-shadow: 0 2px 5px rgba(9, 43, 98, 0.45);
  flex-shrink: 0;
}
.tswm-fab-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
  max-width: 175px;
}
.tswm-fab-title {
  font-family: var(--wm-font-disp);
  font-size: 13.5px;
  font-weight: 800;
  color: #FFFFFF;
  text-shadow: var(--wm-hdr-shadow);
  white-space: nowrap;
}
.tswm-fab-sub {
  font-size: 11px;
  font-weight: 700;
  color: #FEF08A;
  text-shadow: 0 1px 2px rgba(7, 25, 62, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tswm-fps {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(10, 22, 52, 0.78);
  border: 1.5px solid rgba(134, 239, 172, 0.85);
  color: #4ADE80;
  font: 800 11px "Cascadia Mono", Consolas, monospace;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  flex-shrink: 0;
}
.tswm-fps.mid { border-color: #FDE047; color: #FDE047; }
.tswm-fps.low { border-color: #FCA5A5; color: #FB7185; }
.tswm-fps.hidden { display: none; }

/* ==================== FULL WORLD MAP MODAL ==================== */
.tswm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 52, 0.72);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 10px;
  pointer-events: auto;
}
.tswm-backdrop.show { display: flex; }

.tswm-window {
  width: min(1320px, 98vw);
  height: min(880px, 95vh);
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  padding: 7px;
  background: linear-gradient(180deg, var(--wm-frame-top) 0%, var(--wm-frame-mid) 36%, var(--wm-frame-bot) 100%);
  border: 2.5px solid var(--wm-frame-border);
  box-shadow:
    0 0 0 2px rgba(173, 232, 255, 0.8),
    0 22px 54px rgba(8, 22, 60, 0.7),
    inset 0 2px 3px rgba(255, 255, 255, 0.9);
  overflow: hidden;
}

/* Header */
.tswm-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 13px;
  border-radius: 15px 15px 6px 6px;
  background: var(--wm-header-grad);
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  border-bottom: 2px solid #1D5FB8;
  margin-bottom: 6px;
  flex-shrink: 0;
  overflow: hidden;
}
.tswm-header::before {
  content: "";
  position: absolute;
  top: 0; left: 6px; right: 6px; height: 48%;
  border-radius: 12px 12px 45% 45%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.08));
  pointer-events: none;
}
.tswm-header > * { position: relative; z-index: 1; }

.tswm-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.tswm-title {
  margin: 0;
  font-family: var(--wm-font-disp);
  font-size: 18px;
  font-weight: 800;
  color: #FFFFFF;
  text-shadow: var(--wm-hdr-shadow);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tswm-count-pill {
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #FEF08A;
  background: rgba(15, 23, 42, 0.45);
  border: 1.5px solid rgba(254, 240, 138, 0.65);
  white-space: nowrap;
}
.tswm-live-pill {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  color: #FFFDF4;
  background: rgba(13, 58, 128, 0.48);
  border: 1.5px solid rgba(255, 255, 255, 0.58);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tswm-live-pill.online {
  background: rgba(21, 128, 61, 0.8);
  border-color: #BBF7D0;
}

.tswm-orb-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  background: radial-gradient(circle at 35% 26%, #FFFFFF 0%, #E7F7FF 46%, #9AD8FA 100%);
  color: #FF7A00;
  font-family: var(--wm-font-disp);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(9, 43, 98, 0.42), inset 0 1px 2px #FFFFFF;
  transition: transform .09s ease, filter .12s ease;
}
.tswm-orb-btn:hover { filter: brightness(1.07); transform: scale(1.06); }
.tswm-orb-btn:active { transform: scale(0.92); }

/* Inner Content Frame */
.tswm-inner {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 15px;
  border: 2.5px solid var(--wm-teal);
  background:
    repeating-linear-gradient(-45deg, rgba(154, 126, 78, 0.055) 0 8px, transparent 8px 16px),
    var(--wm-parchment);
  padding: 7px 9px;
  overflow: hidden;
  gap: 6px;
}

/* Top Toolbar (Search + Zoom Slider + Filters) */
.tswm-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex-shrink: 0;
  position: relative;
  z-index: 45;
}

.tswm-search-wrap {
  position: relative;
  flex: 1 1 230px;
  min-width: 190px;
}
.tswm-search {
  width: 100%;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--wm-parchment-border);
  background: var(--wm-parchment-in);
  color: var(--wm-ink-strong);
  font: 700 12.5px var(--wm-font);
  outline: none;
  box-shadow: inset 0 2px 4px rgba(92, 64, 51, 0.14);
}
.tswm-search:focus {
  border-color: #0EA5E9;
  box-shadow: 0 0 0 2.5px rgba(56, 189, 248, 0.32);
}

.tswm-search-drop {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  max-height: 340px;
  overflow-y: auto;
  touch-action: pan-y;
  background: #FFFDF5;
  border: 2px solid var(--wm-teal);
  border-radius: 12px;
  padding: 5px;
  box-shadow: 0 14px 32px rgba(10, 24, 62, 0.48);
  z-index: 70;
}
.tswm-search-drop.show { display: block; }
.tswm-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--wm-ink-strong);
  font-weight: 700;
  font-size: 12.5px;
  border-bottom: 1px solid rgba(196, 174, 132, 0.35);
}
.tswm-search-item:last-child { border-bottom: none; }
.tswm-search-item:hover { background: #E0F2FE; }
.tswm-search-sub {
  font-size: 11px;
  color: #7C5E4B;
  font-weight: 600;
}
.tswm-search-btns {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.tswm-search-locate {
  padding: 3px 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #38BDF8 0%, #0284C7 100%);
  border: 1px solid #0369A1;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  text-shadow: 0 1px 1px rgba(4, 34, 68, 0.8);
}
.tswm-search-locate:hover { filter: brightness(1.08); }
.tswm-search-tp {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--wm-btn-warn);
  border: 1px solid #B45309;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  text-shadow: 0 1px 1px rgba(80, 34, 0, 0.8);
}
.tswm-search-tp:hover { filter: brightness(1.08); }

/* Zoom Group with Slider */
.tswm-zoom-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 5px;
  border-radius: 11px;
  background: rgba(255, 253, 245, 0.88);
  border: 1.5px solid var(--wm-parchment-border);
}
.tswm-zoom-slider {
  width: 82px;
  height: 6px;
  accent-color: #0284C7;
  cursor: pointer;
  margin: 0 2px;
}
.tswm-zoom-lbl {
  min-width: 42px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--wm-ink-strong);
  font-variant-numeric: tabular-nums;
}

.tswm-select {
  padding: 5px 8px;
  border-radius: 10px;
  border: 1.5px solid var(--wm-parchment-border);
  background: var(--wm-parchment-in);
  color: var(--wm-ink-strong);
  font: 800 11.5px var(--wm-font);
  cursor: pointer;
  outline: none;
}
.tswm-select:focus { border-color: #0EA5E9; }

.tswm-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 10px;
  border: 1.5px solid #0369A1;
  background: var(--wm-btn-sky);
  color: #FFFFFF;
  font: 800 11.5px var(--wm-font);
  cursor: pointer;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(4, 34, 68, 0.9);
  box-shadow: 0 2px 0 #075985, inset 0 1.5px 1px rgba(255, 255, 255, 0.72);
  transition: transform .08s ease, filter .12s ease;
}
.tswm-btn:hover { filter: brightness(1.06); }
.tswm-btn:active { transform: scale(0.95); }
.tswm-btn-xs { padding: 3px 7px; font-size: 12px; border-radius: 8px; }
.tswm-btn-warn { background: var(--wm-btn-warn); border-color: #B45309; box-shadow: 0 2px 0 #92400E, inset 0 1.5px 1px rgba(255, 255, 255, 0.72); }
.tswm-btn-ok { background: var(--wm-btn-ok); border-color: #15803D; box-shadow: 0 2px 0 #166534, inset 0 1.5px 1px rgba(255, 255, 255, 0.72); }
.tswm-btn-purp { background: var(--wm-btn-purp); border-color: #4C1D95; box-shadow: 0 2px 0 #3B0764, inset 0 1.5px 1px rgba(255, 255, 255, 0.6); }

.tswm-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--wm-ink-strong);
  cursor: pointer;
  padding: 3px 8px 3px 6px;
  border-radius: 999px;
  background: var(--wm-parchment-in);
  border: 1.5px solid var(--wm-parchment-border);
  white-space: nowrap;
}
.tswm-toggle input { accent-color: #0284C7; margin: 0; cursor: pointer; }

/* Quick Region Zoom Strip */
.tswm-regions {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1px 1px 3px;
  flex-shrink: 0;
  scrollbar-width: thin;
  touch-action: pan-x;
}
.tswm-regions::-webkit-scrollbar { height: 5px; }
.tswm-regions::-webkit-scrollbar-thumb { background: rgba(139, 108, 66, 0.45); border-radius: 999px; }

.tswm-reg-pill {
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1.5px solid var(--wm-parchment-border);
  background: var(--wm-parchment-in);
  color: var(--wm-ink-strong);
  font: 800 11px var(--wm-font);
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s, transform .08s;
}
.tswm-reg-pill:hover {
  background: #E0F2FE;
  border-color: #0284C7;
  color: #0369A1;
}
.tswm-reg-pill.active {
  background: var(--wm-btn-sky);
  border-color: #0369A1;
  color: #FFFFFF;
  text-shadow: 0 1px 1px rgba(4, 34, 68, 0.85);
}

/* ==================== INTERACTIVE MAP VIEWPORT ==================== */
.tswm-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: 13px;
  border: 2px solid #1E5BB8;
  background: radial-gradient(circle at 50% 48%, #2C67A8 0%, #15396D 70%, #0D2448 100%);
  overflow: hidden;
  box-shadow: inset 0 3px 16px rgba(6, 18, 44, 0.65);
  cursor: grab;
  touch-action: none;
}
.tswm-stage.dragging { cursor: grabbing; }

.tswm-world-layer {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  pointer-events: none;
}

.tswm-world-img {
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: auto;
}

/* ==================== TELEPORT PINS (NATIVE 1:1 CRISP VECTOR LAYER) ==================== */
.tswm-pins-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.tswm-pin {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 3.5px;
  padding: 1.5px 6px 1.5px 4px;
  border-radius: 999px;
  background: rgba(12, 22, 52, 0.76);
  border: 1px solid rgba(125, 211, 252, 0.85);
  color: #FFFFFF;
  font: 800 10.5px/1.18 var(--wm-font);
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  box-shadow: 0 1.5px 5px rgba(0, 0, 0, 0.5);
  transition: background .1s ease, border-color .1s ease, box-shadow .1s ease;
  z-index: 10;
  -webkit-font-smoothing: antialiased;
}
.tswm-pin.hidden-cat,
.tswm-pin.culled { display: none !important; }

/* Color-coded pin kinds (translucent so map terrain shines cleanly underneath) */
.tswm-pin.k-cap {
  background: rgba(154, 68, 10, 0.86);
  border: 1.5px solid #FDE047;
  font-size: 11px;
  z-index: 20;
}
.tswm-pin.k-town {
  background: rgba(10, 62, 96, 0.76);
  border-color: rgba(56, 189, 248, 0.88);
  z-index: 15;
}
.tswm-pin.k-pass {
  background: rgba(58, 46, 168, 0.76);
  border-color: rgba(196, 181, 253, 0.88);
  z-index: 14;
}
.tswm-pin.k-cave {
  background: rgba(110, 38, 16, 0.76);
  border-color: rgba(253, 186, 116, 0.88);
  z-index: 12;
}
.tswm-pin.k-wild {
  background: rgba(18, 72, 40, 0.74);
  border-color: rgba(134, 239, 172, 0.85);
  z-index: 11;
}

.tswm-pin:hover {
  background: linear-gradient(180deg, #F59E0B 0%, #D97706 100%) !important;
  border-color: #FEF08A !important;
  color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(254, 240, 138, 0.72), 0 6px 16px rgba(0, 0, 0, 0.72);
  z-index: 45 !important;
}
.tswm-pin.current {
  border-color: #4ADE80 !important;
  box-shadow: 0 0 0 3.5px rgba(74, 222, 128, 0.8), 0 4px 12px rgba(0, 0, 0, 0.65);
  z-index: 35 !important;
}
.tswm-pin.located {
  background: linear-gradient(180deg, #EC4899 0%, #BE185D 100%) !important;
  border-color: #FEF08A !important;
  box-shadow: 0 0 0 5px rgba(254, 240, 138, 0.88), 0 0 22px #F472B6;
  z-index: 48 !important;
}

.tswm-pin-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38BDF8;
  border: 1.5px solid #FFFFFF;
  flex-shrink: 0;
}
.tswm-pin.k-cap .tswm-pin-dot { background: #FACC15; width: 8px; height: 8px; }
.tswm-pin.k-town .tswm-pin-dot { background: #38BDF8; }
.tswm-pin.k-pass .tswm-pin-dot { background: #C084FC; }
.tswm-pin.k-cave .tswm-pin-dot { background: #FB923C; }
.tswm-pin.k-wild .tswm-pin-dot { background: #4ADE80; }
.tswm-pin.current .tswm-pin-dot { background: #4ADE80; box-shadow: 0 0 8px #4ADE80; }

/* Dot-only state (smart collision-free LOD, expands smoothly on hover!) */
.tswm-pin.dot-only:not(:hover):not(.located):not(.current) {
  padding: 2px;
  background: rgba(10, 20, 48, 0.76);
  border-width: 1px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.72);
}
.tswm-pin.dot-only:not(:hover):not(.located):not(.current) .tswm-pin-name {
  display: none;
}
.tswm-pin.dot-only.t-3:not(:hover):not(.located):not(.current) .tswm-pin-dot {
  width: 6px;
  height: 6px;
  border-width: 1px;
}

/* Floating Stage Mini Zoom Dock (Bottom-Right) */
.tswm-stage-dock {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 25;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(12, 24, 56, 0.82);
  border: 1.5px solid rgba(186, 230, 253, 0.58);
  border-radius: 12px;
  padding: 5px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.48);
}
.tswm-dock-btn {
  width: 30px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(125, 211, 252, 0.65);
  background: linear-gradient(180deg, #38BDF8 0%, #0284C7 100%);
  color: #FFFFFF;
  font: 900 15px/1 var(--wm-font);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 1px 1px rgba(4, 34, 68, 0.9);
}
.tswm-dock-btn:hover { filter: brightness(1.1); }
.tswm-dock-btn:active { transform: scale(0.93); }

/* Floating Tooltip on Pin Hover */
.tswm-tooltip {
  position: absolute;
  display: none;
  pointer-events: none;
  z-index: 55;
  max-width: 290px;
  padding: 7px 11px;
  border-radius: 10px;
  background: rgba(14, 22, 54, 0.96);
  border: 1.5px solid #FACC15;
  color: #FFFFFF;
  font-size: 12px;
  line-height: 1.4;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.65);
}
.tswm-tooltip.show { display: block; }
.tswm-tooltip-title {
  font-weight: 800;
  font-size: 13px;
  color: #FEF08A;
}
.tswm-tooltip-alt {
  font-size: 11px;
  color: #93C5FD;
  font-weight: 700;
}
.tswm-tooltip-cta {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 800;
  color: #4ADE80;
}

/* Subtle bottom-left helper badge + legend inside stage */
.tswm-stage-hint {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: calc(100% - 62px);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(12, 24, 56, 0.84);
  border: 1px solid rgba(186, 230, 253, 0.55);
  color: #FFFDF4;
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
}
.tswm-leg {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.tswm-leg-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid #FFFFFF;
  display: inline-block;
}

/* Bottom Quick-Teleport Bar (Special Realms + Realm Popover) */
.tswm-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  flex-shrink: 0;
  padding-top: 2px;
  position: relative;
  z-index: 42;
}
.tswm-specials {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  position: relative;
}
.tswm-specials .tswm-btn {
  padding: 4px 8px;
  font-size: 11px;
}
.tswm-footer-lbl {
  font-size: 11px;
  font-weight: 800;
  color: var(--wm-ink-strong);
  margin-right: 1px;
}

.tswm-realm-pop {
  display: none;
  position: absolute;
  bottom: calc(100% + 7px);
  left: 0;
  width: min(520px, 90vw);
  max-height: 280px;
  overflow-y: auto;
  background: #FFFDF5;
  border: 2px solid #5B21B6;
  border-radius: 13px;
  padding: 8px 10px;
  box-shadow: 0 14px 34px rgba(10, 20, 56, 0.58);
  z-index: 65;
}
.tswm-realm-pop.show { display: block; }
.tswm-realm-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  font-weight: 800;
  font-size: 12.5px;
  color: #4C1D95;
}
.tswm-realm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 5px;
}
.tswm-realm-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 5px 8px;
  border-radius: 8px;
  border: 1.5px solid #DDD6FE;
  background: #F5F3FF;
  color: #3B0764;
  font: 800 11.5px var(--wm-font);
  cursor: pointer;
  text-align: left;
  transition: background .1s, border-color .1s;
}
.tswm-realm-item:hover {
  background: #EDE9FE;
  border-color: #7C3AED;
}
.tswm-realm-item small {
  font-size: 10px;
  font-weight: 700;
  color: #6D28D9;
}

/* Toast Notification */
.tswm-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9800;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--wm-btn-sky);
  border: 2px solid #FFFFFF;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 13px;
  text-shadow: 0 1px 2px rgba(6, 38, 78, 0.9);
  box-shadow: 0 8px 24px rgba(8, 26, 66, 0.58);
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
  max-width: 92vw;
  text-align: center;
}
.tswm-toast.show { opacity: 1; }
.tswm-toast.warn { background: var(--wm-btn-warn); }

/* Responsive Mobile */
@media (max-width: 600px) {
  .tswm-window { width: 99vw; height: 96vh; border-radius: 15px; padding: 5px; }
  .tswm-header { padding: 5px 9px; }
  .tswm-title { font-size: 14px; }
  .tswm-live-pill { display: none; }
  .tswm-inner { padding: 5px; gap: 5px; }
  .tswm-search-wrap { min-width: 100%; }
  .tswm-zoom-slider { width: 64px; }
  .tswm-stage-hint { display: none; }
  .tswm-fab { top: 8px; right: 8px; padding: 5px 10px 5px 6px; }
  .tswm-fab-text { max-width: 120px; }
}
@media (max-width: 460px) {
  .tswm-count-pill { display: none; }
}
