/* The World Map (client/js/ui/worldmap; docs/superpowers/specs/2026-10-04-world-map-design.md
   §5): a pixel-kit window (client/css/social-ui.css) laid out as the world map preview's
   boards: m1 (the window: the head, the layer chips, the map with its zoom control and
   Find me, the Legend and "Live now" beside it), m5 (Kanto, greyed out, and its card) and
   p1 (a phone: full screen under the bar, the card a bottom sheet); the cards, layers and
   search of m2 (a route's card), m3 (a town's), m4 (the Territories' flags) and m7 (search);
   Fly mode, m6 and p2 (a phone).
   The values are the preview's (wm.css). The window picks its layout from the room #windows gives it
   (index.js): .wide, .mid (narrower: the side column too) and .phone. The map's tiles,
   names and You are placed by ./view.js in px of the step shown (.lv0 Close, .lv1 Area,
   .lv2 Region on the plane). Sized from #windows (100%), not the viewport. */

.pxui.wm { --wm-you: #e0503c; --wm-party: #e08a3a; --wm-friend: #2e9a4e; --wm-guild: #3f7fd0; --wm-event: #e8912d;
  width: min(1880px, calc(100% - 24px)); height: min(1080px, calc(100% - 16px)); display: flex; flex-direction: column; padding: 12px 14px 14px; overflow: hidden; }
/* your guild's colour (the window's g-<colour>, from the social store's guild: its people's
   pins and names, the legend's dot, the chip) */
.pxui.wm.g-red { --wm-guild: #e0523f; }
.pxui.wm.g-orange { --wm-guild: #f08a2c; }
.pxui.wm.g-yellow { --wm-guild: #c9a322; }
.pxui.wm.g-green { --wm-guild: #4caf50; }
.pxui.wm.g-teal { --wm-guild: #2ba8a0; }
.pxui.wm.g-blue { --wm-guild: #3f7fd0; }
.pxui.wm.g-purple { --wm-guild: #8a5cc7; }
.pxui.wm.g-pink { --wm-guild: #e0609a; }
/* a guild's tag (guild.css .gd-tag) in its colour: the flags, a card's Territory */
.wm .c-red { --c: #e0523f; --o: #7c2216; --l: #f38775; }
.wm .c-orange { --c: #f08a2c; --o: #7a3a08; --l: #f7b268; }
.wm .c-yellow { --c: #e8c23a; --o: #6e5608; --l: #f5dc78; }
.wm .c-green { --c: #4caf50; --o: #22602a; --l: #80d080; }
.wm .c-teal { --c: #2ba8a0; --o: #0f4e4a; --l: #62cbc3; }
.wm .c-blue { --c: #3f7fd0; --o: #1e467e; --l: #74a8ec; }
.wm .c-purple { --c: #8a5cc7; --o: #452a70; --l: #ad89e2; }
.wm .c-pink { --c: #e0609a; --o: #7a1f4a; --l: #f08fbb; }
.wm h1, .wm h2, .wm h3, .wm h4, .wm p { margin: 0; }
.wm .wm-grow { flex: 1; }
.wm .kick { min-width: 0; overflow: hidden; color: var(--ink-3); font-size: 13px; letter-spacing: .07em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.wm .hub-pix { flex: none; display: inline-flex; }
.wm .hub-pix svg, .wm .wm-pix svg { display: block; }
.wm .wm-pix { flex: none; display: inline-flex; }

/* ------------------------------------------------------------------ the head: the title, the tabs, ✕ */
.wm .wm-head { flex: none; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0 2px 10px; }
.wm .wm-ttl { display: flex; align-items: baseline; gap: 10px; font-size: 24px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.wm .wm-ttl small { color: var(--ink-3); font-size: 13px; font-weight: 600; letter-spacing: .07em; }
.wm .wm-tabs { flex: none; display: flex; gap: 6px; }
.wm .wm-tabs .px-pocket { height: 44px; }
/* Kanto 🔒 not open yet: dashed and grey; chosen, solid grey (m5) */
.wm .px-pocket.locked { gap: 6px; border-style: dashed; border-color: #8a94a4; background: #e2e5ea; color: #7a8494; }
.wm .px-pocket.locked small { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: none; }
.wm .px-pocket.locked[aria-selected=true] { border-style: solid; border-color: #5f6878; background: #c9ced6; color: #3a4252; }
.wm .wm-x { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 3px solid var(--frame); border-radius: 8px; background: #fff; font-size: 18px; font-weight: 700; }
.wm .wm-x[aria-pressed=true] { border-color: var(--sel-line); background: var(--sel); }
@media (hover: hover) { .wm .wm-x:hover, .wm .wm-zb:not(:disabled):hover, .wm .wm-findme:hover, .wm .wm-fc:hover { border-color: var(--sel-line); } }
.wm .wm-help { border-color: var(--blue); background: var(--sky); }

/* search (m7): the box in the head, its answers dropping down under it */
.wm .wm-srch { position: relative; flex: 0 1 330px; display: flex; align-items: center; gap: 6px; min-width: 140px; height: 44px; padding: 0 4px 0 10px; border: 3px solid var(--frame); border-radius: 8px; background: #fff; }
.wm .wm-srch:focus-within { border-color: var(--sel-line); box-shadow: 0 0 0 3px #fcd9a080; }
/* Kanto: no search (every layer off) */
.wm .wm-srch.off { border-style: dashed; opacity: .6; }
.wm .wm-sico { flex: none; color: var(--ink-3); font-size: 18px; line-height: 1; }
.wm .wm-sin { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: none; background: none; color: var(--ink); font: inherit; font-size: 15px; }
.wm .wm-sin::-webkit-search-cancel-button { display: none; }
.wm .wm-sclr { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 6px; background: var(--plain); color: var(--ink-2); font-weight: 700; }
.wm .wm-sres { position: absolute; z-index: 20; left: -3px; right: -3px; top: calc(100% + 6px); max-height: min(60vh, 420px); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; border: 3px solid var(--frame); border-radius: 8px; background: #fff; box-shadow: 0 10px 24px #0006; }
.wm .wm-shd { padding: 5px 10px 3px; background: var(--sky); color: var(--ink-3); font-size: 12px; letter-spacing: .07em; text-transform: uppercase; }
.wm .wm-sr { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 4px 10px; border: 0; border-bottom: 2px solid #e4ecf4; background: #fff; color: var(--ink); font-size: 15px; text-align: left; }
.wm .wm-sr:last-child { border-bottom: 0; }
.wm .wm-sr.on, .wm .wm-sr:focus-visible { outline: none; background: var(--sel); }
@media (hover: hover) { .wm .wm-sr:hover { background: var(--sel); } }
.wm .wm-sr b { min-width: 0; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.wm .wm-sr small { flex: none; margin-left: auto; color: var(--ink-3); font-size: 12px; }
.wm .wm-smi { flex: none; width: 32px; height: 32px; background-size: 32px 64px; image-rendering: pixelated; }
.wm .wm-snote { padding: 10px 12px; color: var(--ink-2); font-size: 14px; line-height: 1.35; }

/* ------------------------------------------------------------------ the layer chips */
.wm .wm-chips { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; padding: 0 2px 10px; }
.wm .wm-chips .kick { margin-right: 2px; }
.wm .wm-chip { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px 0 7px; border: 3px solid var(--blue); border-radius: 19px; background: var(--sky); font-size: 15px; font-weight: 600; white-space: nowrap; }
.wm .wm-chip .wm-ck { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 11px; background: var(--blue); color: #fff; font-size: 13px; }
.wm .wm-chip.off { border-color: var(--plain-line); background: var(--plain); color: var(--ink-3); }
.wm .wm-chip.off .wm-ck { border: 2px solid var(--plain-line); background: #fff; color: transparent; }
/* Kanto: every chip off and disabled */
.wm .wm-chip.na, .wm .wm-chip:disabled { border-style: dashed; opacity: .6; }
@media (hover: hover) { .wm .wm-chip:not(:disabled):hover { border-color: var(--sel-line); } }
.wm .wm-sws { display: inline-flex; align-items: center; gap: 3px; }
.wm .wm-sw { display: inline-block; width: 12px; height: 12px; border: 2px solid #fff; border-radius: 6px; box-shadow: 0 0 0 1px #0004; }
.wm .wm-sw.you { background: var(--wm-you); }
.wm .wm-sw.party { background: var(--wm-party); }
.wm .wm-sw.friend { background: var(--wm-friend); }
.wm .wm-sw.guild { background: var(--wm-guild); }
.wm .wm-sw.event { background: var(--wm-event); }
.wm .wm-cnote { margin-left: auto; min-width: 0; overflow: hidden; color: var(--ink-3); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------------ the body: the map, the side */
.wm .wm-body { flex: 1; min-height: 0; display: flex; gap: 12px; }
.wm .wm-mapbox { position: relative; flex: 1; min-width: 0; min-height: 0; overflow: hidden; border: 3px solid var(--frame); border-radius: 8px; background: #18203a; }
.wm .wm-side { flex: none; display: flex; flex-direction: column; gap: 10px; width: clamp(300px, 26%, 420px); min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--ring) transparent; }
.wm .wm-info { display: flex; flex-direction: column; gap: 10px; }

/* the view: the plane moves under the box; its tiles, the step up under them while they load */
.wm .wm-view { position: absolute; inset: 0; overflow: hidden; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.wm .wm-view.dragging { cursor: grabbing; }
.wm .wm-view:focus-visible { outline: 3px solid var(--sel-line); outline-offset: -3px; }
.wm .wm-plane { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.wm .wm-under, .wm .wm-tiles, .wm .wm-pins { position: absolute; left: 0; top: 0; }
.wm .wm-under img, .wm .wm-tiles img { position: absolute; display: block; max-width: none; pointer-events: none; image-rendering: pixelated; -webkit-user-drag: none; }
/* (Region fitted at no whole multiple of its picture, smaller or larger: smoothed, not
   dropped or doubled pixels; ./view.js) */
.wm .wm-plane.smooth .wm-tiles img { image-rendering: auto; }
.wm .wm-plane.lv0 .wm-under img, .wm .wm-plane.lv1 .wm-under img { image-rendering: auto; }

/* the names: towns boxed in white, routes their number, the rest at Area and Close */
.wm .wm-lb { position: absolute; z-index: 3; transform: translate(-50%, -50%); white-space: nowrap; pointer-events: none; }
.wm .wm-lb.town { padding: 1px 7px 2px; border: 2px solid var(--frame); border-radius: 6px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 700; }
.wm .wm-lb.route, .wm .wm-lb.other { padding: 0 5px 1px; border-radius: 5px; background: #18203ad0; color: #fff; font-size: 12px; }
.wm .wm-plane.lv2 .wm-lb.other { display: none; }
.wm .wm-plane.lv0 .wm-lb.town { font-size: 17px; padding: 2px 9px 3px; }
/* (Region fitted very small, a phone's: the names would pile up) */
.wm .wm-plane.tiny .wm-lb { display: none; }
/* a map picked (a tap) */
.wm .wm-area { position: absolute; z-index: 2; border-radius: 3px; pointer-events: none; }
.wm .wm-area.pick { border: 3px solid #fff; box-shadow: 0 0 0 3px var(--frame), 0 0 16px #fff8; }
/* a searched Pokémon's places (m7) */
.wm .wm-area.hit { border: 3px solid #ffb648; background: #ffb64838; box-shadow: 0 0 0 3px #18203a99, 0 0 18px #ffb648; }

/* the layers' pins (./layers.js; m1, m2, m4), each a button to its map's card */
/* people: a head and a name standing just over their map's middle (its name label is on it);
   party orange, friends green, guild its colour */
.wm .wm-pp { position: absolute; z-index: 5; display: flex; flex-direction: column; align-items: center; padding: 0; transform: translate(-50%, calc(-100% - 12px)); border: 0; background: none; --c: var(--wm-guild); }
.wm .wm-pp.party { --c: var(--wm-party); }
.wm .wm-pp.friend { --c: var(--wm-friend); }
.wm .wm-pp .px-face { width: 34px; height: 34px; border: 3px solid var(--c); border-radius: 50%; background-color: #fff; box-shadow: 0 2px 6px #0007; }
/* (a tag at most 60 px wide: heads are 64 px apart, ./layers.js HEAD_W; longer, cut with "…") */
.wm .wm-pp .wm-nt { box-sizing: border-box; max-width: 60px; margin-top: -4px; padding: 0 6px 1px; border-radius: 5px; background: var(--c); color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 2px 4px #0005; }
.wm .wm-more { position: absolute; z-index: 5; min-width: 30px; height: 30px; padding: 0 7px; transform: translate(-50%, calc(-100% - 12px)); border: 3px solid #fff; border-radius: 15px; background: var(--frame); color: #fff; font-size: 13px; font-weight: 700; box-shadow: 0 2px 6px #0007; }
/* live events: the Pokémon, the place and the time left, just under the map's middle */
.wm .wm-ev { position: absolute; z-index: 6; display: flex; align-items: center; gap: 6px; height: 42px; padding: 0 10px 0 4px; transform: translate(-50%, 14px); border: 3px solid var(--ec); border-radius: 21px; background: var(--cream); text-align: left; white-space: nowrap; box-shadow: 0 0 0 4px #ffffff40, 0 4px 10px #0007; --ec: #2e9a4e; }
.wm .wm-ev.k-alpha { --ec: #e8912d; }
.wm .wm-ev.k-horde { --ec: #8a5cc7; }
/* a roaming Pokémon (Raikou, Entei, Suicune): where it is now */
.wm .wm-ev.k-roamer { --ec: #2ba8a0; }
.wm .wm-mi { flex: none; display: block; width: 32px; height: 32px; background-size: 32px 64px; image-rendering: pixelated; }
.wm .wm-ev .wm-t, .wm .wm-lrow .wm-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.wm .wm-ev .wm-t b { font-size: 13px; }
.wm .wm-ev .wm-t small, .wm .wm-lrow .wm-t small { color: var(--ink-2); font-size: 12px; }
/* Territories (m4): the holder's banner and tag, or "Free" */
.wm .wm-flag { position: absolute; z-index: 5; display: flex; flex-direction: column; align-items: center; padding: 0; transform: translate(-50%, -100%); border: 0; background: none; }
.wm .wm-flag canvas, .wm .wm-flag .hub-pix { filter: drop-shadow(0 2px 3px #0008); }
.wm .wm-flag .gd-tag { height: 18px; margin-top: -2px; padding: 0 4px; font-size: 11px; }
.wm .wm-free { margin-top: -2px; padding: 0 5px; border: 2px solid #8a94a4; border-radius: 5px; background: #e2e5ea; color: #5f6878; font-size: 11px; font-weight: 700; }
/* places: a Center, a Mart, a Gym in its badge's colour (grey: not yours); all of Johto shows
   the Gyms only, a phone's tiny Region none. A 44 px target round each (::before). */
.wm .wm-pins .wm-pl { position: absolute; z-index: 4; display: flex; align-items: center; justify-content: center; width: 26px; min-width: 0; height: 26px; min-height: 0; padding: 0; transform: translate(-50%, -50%); border: 2px solid var(--frame); border-radius: 6px; background: #fff; box-shadow: 0 2px 4px #0006; }
.wm .wm-pins .wm-pl::before { content: ""; position: absolute; inset: -11px; }
.wm .wm-pins .wm-pl.gym { width: 28px; height: 28px; }
.wm .wm-plane.lv2 .wm-pl:not(.gym), .wm .wm-plane.tiny .wm-pl { display: none; }
@media (hover: hover) { .wm .wm-pp:hover .px-face, .wm .wm-ev:hover, .wm .wm-pl:hover, .wm .wm-more:hover { border-color: var(--sel-line); } }
/* the chips: a layer off hides its pins */
.wm .wm-mapbox.off-party .wm-pp.party, .wm .wm-mapbox.off-friends .wm-pp.friend, .wm .wm-mapbox.off-friends .wm-pp.guild,
.wm .wm-mapbox.off-party.off-friends .wm-more, .wm .wm-mapbox.off-events .wm-ev, .wm .wm-mapbox.off-territories .wm-flag, .wm .wm-mapbox.off-places .wm-pl { display: none; }

/* You: your trainer's head with a pulse */
.wm .wm-you { position: absolute; z-index: 6; width: 40px; height: 40px; transform: translate(-50%, -50%); pointer-events: none; }
.wm .wm-you .px-face { position: absolute; left: 0; top: 0; width: 40px; height: 40px; border: 3px solid var(--wm-you); border-radius: 50%; background-color: #fff; box-shadow: 0 3px 8px #0007; }
.wm .wm-you .wm-ring { position: absolute; left: 50%; top: 50%; border: 3px solid var(--wm-you); border-radius: 50%; transform: translate(-50%, -50%); }
.wm .wm-you .wm-ring.r1 { width: 58px; height: 58px; opacity: .75; }
.wm .wm-you .wm-ring.r2 { width: 82px; height: 82px; opacity: .35; }
.wm .wm-you .wm-yt { position: absolute; left: 50%; top: 44px; transform: translateX(-50%); padding: 0 6px; border-radius: 5px; background: var(--wm-you); color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) {
  .wm .wm-you .wm-ring { animation: wm-pulse 1.8s ease-out infinite; }
  .wm .wm-you .wm-ring.r2 { animation-delay: .6s; }
}
@keyframes wm-pulse { from { transform: translate(-50%, -50%) scale(.55); opacity: .9; } to { transform: translate(-50%, -50%) scale(1.1); opacity: 0; } }
.wm .wm-mapbox.off-you .wm-you { display: none; }

/* Kanto's closed edge, east of Route 26 */
.wm .wm-edge { position: absolute; z-index: 6; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px; transform: translate(-100%, -50%); border: 2px dashed #8a94a4; border-radius: 6px; background: #e2e5eaf2; color: #5f6878; font-size: 12px; font-weight: 700; white-space: nowrap; }
@media (hover: hover) { .wm .wm-edge:hover { border-color: var(--sel-line); color: var(--ink); } }

/* ------------------------------------------------------------------ on the map: the zoom, its name, Find me, a notice */
.wm .wm-zoom { position: absolute; z-index: 8; right: 10px; top: 10px; display: flex; flex-direction: column; overflow: hidden; border: 3px solid var(--frame); border-radius: 8px; background: var(--cream); box-shadow: 0 4px 10px #0005; }
.wm .wm-zb { width: 44px; height: 44px; padding: 0; border: 0; background: var(--cream); color: var(--ink); font-size: 22px; font-weight: 700; }
.wm .wm-lv { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; border-top: 2px solid var(--rule); border-bottom: 2px solid var(--rule); }
.wm .wm-lv i { display: block; width: 22px; height: 8px; border-radius: 3px; background: #c4d2e4; }
.wm .wm-lv i.on { background: var(--sel-line); }
.wm .wm-zname { position: absolute; z-index: 8; right: 62px; top: 10px; display: flex; align-items: center; max-width: calc(100% - 80px); height: 30px; padding: 0 10px; overflow: hidden; border: 2px solid var(--frame); border-radius: 6px; background: var(--cream); color: var(--ink-2); font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.wm .wm-findme { position: absolute; z-index: 8; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px 0 6px; border: 3px solid var(--frame); border-radius: 8px; background: var(--cream); font-size: 14px; font-weight: 600; box-shadow: 0 4px 10px #0005; }
.wm .wm-findme .px-face { width: 30px; height: 30px; border-radius: 50%; }
.wm .wm-note { position: absolute; z-index: 9; left: 50%; bottom: 64px; max-width: calc(100% - 24px); padding: 8px 12px; transform: translateX(-50%); border: 3px solid var(--frame); border-radius: 8px; background: var(--cream); color: var(--ink); font-size: 14px; line-height: 1.35; text-align: center; box-shadow: 0 6px 16px #0007; }
.wm .wm-status { position: absolute; z-index: 9; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; color: #e6eef8; font-size: 16px; line-height: 1.4; text-align: center; }

/* Kanto (m5): the grey picture, fitted; the page's own "Not open yet" plate over it */
.wm .wm-kanto { position: absolute; inset: 0; background: #1b1d22; }
.wm .wm-ktap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; width: 100%; padding: 12px; border: 0; background: none; }
.wm .wm-kpic { display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.wm .wm-closed { position: absolute; left: 50%; top: 50%; display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: calc(100% - 24px); padding: 10px 16px 12px; transform: translate(-50%, -50%); border: 4px solid #5f6878; border-radius: 12px; background: #eef0f3f0; text-align: center; box-shadow: 0 10px 30px #0008; }
.wm .wm-closed b { display: flex; align-items: center; gap: 10px; color: #3a4252; font-size: 20px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.wm .wm-closed > span { color: var(--ink-2); font-size: 15px; }

/* ------------------------------------------------------------------ the side: the Legend, "Live now", a card */
.wm .wm-panel { flex: none; border: 3px solid var(--frame); border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 2px var(--ring); }
.wm .wm-panel .wm-ph { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 2px solid var(--rule); border-radius: 7px 7px 0 0; background: var(--sky); }
.wm .wm-panel h3 { font-size: 17px; letter-spacing: .06em; text-transform: uppercase; }
.wm .wm-panel .wm-count { margin-left: auto; color: var(--ink-3); font-size: 13px; }
.wm .wm-panel .wm-pb { padding: 10px 12px; }
.wm .wm-leg { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 7px 8px; font-size: 14px; }
.wm .wm-leg .wm-k { display: flex; align-items: center; justify-content: center; }
.wm .wm-leg small { display: block; color: var(--ink-3); font-size: 12px; line-height: 1.2; }
.wm .wm-leg .px-face { width: 30px; height: 30px; border: 3px solid var(--wm-you); border-radius: 50%; }
.wm .wm-dot { display: block; width: 26px; height: 26px; border: 3px solid; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px #0003; }
.wm .wm-dot.party { border-color: var(--wm-party); }
.wm .wm-dot.friend { border-color: var(--wm-friend); }
.wm .wm-dot.guild { border-color: var(--wm-guild); }
.wm .wm-ek { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 18px; padding: 0 5px; border-radius: 4px; background: var(--ec); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.wm .wm-ek.k-swarm { --ec: #2e9a4e; }
.wm .wm-ek.k-alpha { --ec: #e8912d; }
.wm .wm-ek.k-horde { --ec: #8a5cc7; }
.wm .wm-ek.k-roamer { --ec: #2ba8a0; }
.wm .wm-bdgs { display: inline-flex; gap: 1px; }
.wm .wm-bdg { display: block; width: 20px; height: 20px; background-repeat: no-repeat; background-size: 160px 40px; image-rendering: pixelated; }
.wm .wm-bdg.no { filter: grayscale(1) brightness(1.15); opacity: .55; }
.wm .wm-livelist { display: flex; flex-direction: column; gap: 8px; }
.wm .wm-empty { color: var(--ink-3); font-size: 14px; }

.wm .wm-card { display: flex; flex-direction: column; min-width: 0; border: 3px solid var(--frame); border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 2px var(--ring); }
.wm .wm-ch { display: flex; align-items: flex-start; gap: 10px; padding: 12px 12px 10px; border-bottom: 2px solid var(--rule); }
.wm .wm-ch > div { flex: 1; min-width: 0; }
.wm .wm-ch h2 { font-size: 22px; line-height: 1.15; }
.wm .wm-ch .kick { margin-top: 3px; }
.wm .wm-card .wm-sec { padding: 8px 12px; border-bottom: 2px dashed var(--rule); }
.wm .wm-card .wm-why p { margin: 4px 0 6px; color: var(--ink-2); font-size: 15px; line-height: 1.45; }
.wm .wm-card h4 { margin: 0 0 6px; color: var(--ink-3); font-size: 13px; letter-spacing: .07em; text-transform: uppercase; }
.wm .wm-fac { display: flex; flex-wrap: wrap; gap: 6px; }
.wm .wm-fc { display: inline-flex; align-items: center; height: 32px; padding: 0 9px; border: 2px solid #c4d2e4; border-radius: 6px; background: #f5f9fd; font-size: 14px; white-space: nowrap; }
.wm .wm-acts { display: flex; gap: 8px; padding: 10px 12px; }
.wm .wm-acts .px-btn { flex: 1; min-width: 0; height: 44px; font-size: 16px; }

/* "Live now" and the people you know: each a button to its place */
.wm .wm-plist { display: flex; flex-direction: column; gap: 4px; }
.wm .wm-lrow, .wm .wm-pr { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 4px 8px; border: 2px solid transparent; border-radius: 8px; background: none; color: var(--ink); text-align: left; }
@media (hover: hover) { .wm .wm-lrow:hover, .wm .wm-pr:hover { border-color: var(--sel-line); background: var(--sel); } }
.wm .wm-lrow b, .wm .wm-pr b { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.wm .wm-pr, .wm .wm-hp { --c: var(--wm-guild); }
.wm .wm-pr.party, .wm .wm-hp.party { --c: var(--wm-party); }
.wm .wm-pr.friend, .wm .wm-hp.friend { --c: var(--wm-friend); }
.wm .wm-pr .px-face { flex: none; width: 30px; height: 30px; border: 3px solid var(--c); border-radius: 50%; }
.wm .wm-prt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.wm .wm-prt small { color: var(--ink-3); font-size: 12px; }
.wm .wm-else { margin-top: 6px; color: var(--ink-2); font-size: 13px; line-height: 1.35; }

/* a place's card (m2, m3): the Gym, facilities, the Territory, wild Pokémon, who's here, Fly */
.wm .wm-card .wm-sec h4 { display: flex; align-items: center; gap: 8px; }
.wm .wm-card .wm-sec h4 .wm-r { margin-left: auto; color: var(--ink-3); font-weight: 400; letter-spacing: 0; text-transform: none; }
.wm .wm-gymrow { display: flex; align-items: center; gap: 10px; }
.wm .wm-gymrow + .wm-gymrow { margin-top: 6px; }
.wm .wm-gymrow .wm-t { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; line-height: 1.25; }
.wm .wm-gymrow .wm-t small { color: var(--ink-3); font-size: 13px; }
.wm .wm-gymrow .gd-tag { height: 18px; padding: 0 4px; font-size: 11px; vertical-align: 1px; }
.wm .wm-bdg.big { flex: none; width: 32px; height: 32px; background-size: 256px 64px; }
.wm .wm-have, .wm .wm-nohave { flex: none; display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border: 2px solid; border-radius: 5px; font-size: 12px; font-weight: 700; }
.wm .wm-have { border-color: #2e9a4e; background: #dff3e4; color: #1e7a3c; }
.wm .wm-nohave { border-color: var(--plain-line); background: var(--plain); color: var(--ink-2); }
.wm .wm-card .wm-fc { gap: 6px; }
.wm .wm-dn { display: flex; gap: 6px; margin-bottom: 6px; }
.wm .wm-dnb { height: 30px; padding: 0 12px; border: 2px solid var(--plain-line); border-radius: 15px; background: var(--plain); font-size: 13px; font-weight: 600; }
.wm .wm-dnb[aria-pressed=true] { border-color: var(--blue); background: var(--sky); }
.wm .wm-mrow { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.wm .wm-how { flex: none; display: flex; flex-direction: column; width: 76px; color: var(--ink-2); font-size: 13px; font-weight: 600; line-height: 1.2; }
.wm .wm-how small { color: var(--ink-3); font-size: 12px; font-weight: 400; }
.wm .wm-mons { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.wm .wm-mn { position: relative; flex: none; width: 40px; height: 40px; border: 2px solid #c4d2e4; border-radius: 6px; background: #f2f7fc; }
.wm .wm-mn i { position: absolute; left: 2px; top: 2px; width: 32px; height: 32px; background-size: 32px 64px; image-rendering: pixelated; }
.wm .wm-mn .wm-mk { position: absolute; right: -5px; bottom: -5px; display: flex; align-items: center; justify-content: center; width: 18px; height: 18px; border: 2px solid #fff; border-radius: 9px; background: #2e9a4e; color: #fff; font-size: 11px; font-weight: 700; }
/* not seen yet: a dark silhouette with "?" (no species: none is named) */
.wm .wm-mn.unseen { border-style: dashed; background: #e8edf3; }
.wm .wm-mn .wm-sil { position: absolute; left: 4px; top: 6px; opacity: .3; }
.wm .wm-mn.unseen b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--ink-2); font-size: 18px; }
.wm .wm-in { margin-top: 4px; }
.wm .wm-intog { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 32px; padding: 2px 8px; border: 2px solid #c4d2e4; border-radius: 6px; background: #f5f9fd; font-size: 14px; font-weight: 600; text-align: left; }
.wm .wm-intog[aria-expanded=true] { border-color: var(--blue); background: var(--sky); }
.wm .wm-inbody { padding: 6px 0 2px 6px; }
.wm .wm-here { display: flex; flex-wrap: wrap; gap: 6px; }
.wm .wm-hp { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px 0 3px; border: 2px solid var(--c); border-radius: 18px; background: #fff; font-size: 14px; }
.wm .wm-hp .px-face { width: 28px; height: 28px; border-radius: 50%; }
.wm .wm-flyrow { padding-bottom: 6px; }
.wm .px-btn.wm-fly.off { border-color: var(--plain-line); background: var(--plain); color: #8a94a4; box-shadow: none; }
.wm .wm-reason { margin: 0 12px 12px; padding: 7px 10px; border-radius: 6px; background: var(--plain); color: var(--ink-2); font-size: 13px; line-height: 1.35; }
.wm .wm-reason.ok { background: #e6f4ea; }
.wm .wm-moncard .wm-reason { margin-top: 8px; }
.wm .wm-front { flex: none; width: 64px; height: 64px; background-repeat: no-repeat; background-size: 64px 128px; image-rendering: pixelated; }
@media (hover: hover) { .wm .wm-intog:hover, .wm .wm-dnb:hover { border-color: var(--sel-line); } }

/* ------------------------------------------------------------------ Fly mode (m6, p2) */
/* each place Fly goes to: a pin where its name was (.flyp, hidden), bright once you've been
   there, dim if not, the one asked about picked (orange, m6's); a 44 px target round each */
.wm.fly .wm-lb.flyp { display: none; }
.wm .wm-pins .wm-fp { position: absolute; z-index: 4; display: flex; align-items: center; min-width: 0; height: 26px; min-height: 0; padding: 0 8px 1px; transform: translate(-50%, -50%); border: 2px solid var(--frame); border-radius: 6px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 700; white-space: nowrap; box-shadow: 0 2px 4px #0006; }
.wm .wm-pins .wm-fp::before { content: ""; position: absolute; inset: -9px -2px; }
.wm .wm-fp.on { box-shadow: 0 0 0 3px #ffffffa0, 0 2px 8px #0008; }
.wm .wm-fp.dim { border-color: #8a94a4; background: #c9ced6; color: #5f6878; opacity: .8; box-shadow: none; }
.wm .wm-fp.pick { border-color: var(--sel-line); background: var(--sel); color: var(--ink); opacity: 1; }
.wm .wm-plane.lv0 .wm-fp { font-size: 17px; height: 30px; }
.wm .wm-plane.tiny .wm-fp { display: none; }
@media (hover: hover) { .wm .wm-fp:hover { border-color: var(--sel-line); } }
/* the Fly panel: what bright and dim mean, Fly's rule now, each place a button */
.wm .wm-flyp .wm-pb > p { margin: 0 0 6px; font-size: 14px; line-height: 1.4; }
.wm .wm-flyp .wm-reason { margin: 2px 0 8px; }
.wm .wm-flylist .wm-fc { font-weight: 600; }
.wm .wm-flylist .wm-fc.on { border-color: var(--blue); background: var(--sky); }
.wm .wm-flylist .wm-fc.dim { color: #8a94a4; }
/* "Fly to …?": the Pokémon that flies you, Cancel and Fly; a phone's line on bright and dim */
.wm .wm-flywho { display: flex; align-items: center; gap: 8px; }
.wm .wm-flywho p { font-size: 15px; line-height: 1.35; }
.wm:not(.phone) .wm-flyhint { display: none; }

/* ------------------------------------------------------------------ mid (700 to 1099 px): a narrower side */
.wm.mid .wm-side { width: 260px; }
.wm.mid .wm-cnote { display: none; }
.wm.mid .wm-ttl small { display: none; }
.wm.mid .px-pocket.locked small { display: none; }

/* ------------------------------------------------------------------ a phone (p1) */
/* full screen under the bar (#windows starts under it); the head is the tabs, Layers and ✕;
   the map fills the rest; the card (or the layers) a bottom sheet over it at half height */
.pxui.wm.phone { left: 0; right: 0; top: 4px; bottom: 0; width: auto; height: auto; max-width: none; max-height: none; transform: none; padding: 8px 8px 0; overflow: hidden; border-bottom-width: 0; border-radius: 12px 12px 0 0; }
.wm.phone .wm-head { gap: 6px; padding: 0 0 8px; }
.wm.phone .wm-tabs { min-width: 0; }
.wm.phone .wm-tabs .px-pocket { padding: 0 12px; }
.wm.phone .wm-body { position: relative; display: block; }
.wm.phone .wm-mapbox { position: absolute; inset: 0; border-width: 0; border-radius: 8px 8px 0 0; }
.wm.phone .wm-zoom { top: 8px; right: 8px; }
.wm.phone .wm-zname { display: none; }
.wm.phone .wm-findme { right: 8px; bottom: 8px; }
.wm.phone .wm-plane.lv2 .wm-lb.route { display: none; }
.wm .wm-sheet { position: absolute; z-index: 10; left: -8px; right: -8px; bottom: 0; display: flex; flex-direction: column; max-height: 100%; border: 4px solid var(--frame); border-bottom: 0; border-radius: 16px 16px 0 0; background: var(--cream); box-shadow: inset 0 0 0 3px var(--ring), 0 -10px 30px #0008; }
.wm .wm-grab { flex: none; display: flex; align-items: center; justify-content: center; width: 100%; height: 22px; padding: 0; border: 0; background: none; cursor: ns-resize; touch-action: none; }
.wm .wm-grab i { display: block; width: 56px; height: 6px; border-radius: 3px; background: #a4b0c0; }
.wm .wm-sheetbody { flex: 1; min-height: 0; padding: 0 4px 10px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--ring) transparent; }
.wm .wm-sheet .wm-card { border: 0; background: none; box-shadow: none; }
.wm .wm-sheet .wm-ch { padding: 2px 8px 8px; }
.wm .wm-sheet .wm-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 8px 8px 10px; }
.wm .wm-sheet .wm-chip { min-width: 0; }
.wm .wm-sheet .wm-chip .wm-cl { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.wm .wm-sheet .wm-cnote { grid-column: 1 / -1; margin: 0; white-space: normal; }
.wm .wm-sheet .wm-panel { margin: 0 8px 10px; }
.wm.phone .wm-closed b { font-size: 17px; }
.wm.phone .wm-closed > span { font-size: 14px; }
/* search: the box takes the head's place (⌕), its answers over the map */
.wm.phone .wm-srch { flex: 1 1 auto; height: 50px; }
.wm.phone .wm-sclr { width: 44px; }
.wm.phone .wm-sres { max-height: 70vh; }
/* a notice: at the top of the map (the sheet covers its foot) */
.wm.phone .wm-note { top: 8px; right: 60px; bottom: auto; left: 8px; max-width: none; transform: none; }
/* 44 px targets */
.wm.phone button { min-height: 44px; }
.wm.phone .wm-x, .wm.phone .wm-zb, .wm.phone .wm-chip, .wm.phone .wm-fc { min-width: 44px; }
.wm.phone .wm-pp, .wm.phone .wm-more, .wm.phone .wm-flag, .wm.phone .wm-ev, .wm.phone .wm-dnb { min-width: 44px; }
@media (max-width: 359px) {
  .wm.phone .wm-tabs .px-pocket { padding: 0 8px; font-size: 15px; }
}

/* ------------------------------------------------------------------ touch: 44 px targets */
@media (pointer: coarse) {
  .wm button { min-height: 44px; }
  .wm .wm-x, .wm .wm-zb, .wm .wm-chip, .wm .wm-fc { min-width: 44px; }
  .wm .wm-pp, .wm .wm-more, .wm .wm-flag, .wm .wm-ev, .wm .wm-dnb, .wm .wm-sclr { min-width: 44px; }
  .wm .wm-srch { height: 50px; }
}

/* ------------------------------------------------------------------ party raids (client/js/ui/raid; the raids preview's r1)
   The Raid dens chip's swatch; a den: its stars just right of its route's
   number (the server sends a den's route, never its tile), today's boss from
   Area zoom, its open raids counted (never a name); "Live now"'s open raids
   (RD) and the ★ den's row for new trainers; a place card's den section
   (the den card's body: raid.css). */
.wm .wm-sw.den { background: #c0306e; }
.wm .wm-den { position: absolute; z-index: 5; display: flex; align-items: center; gap: 4px; height: 34px; padding: 0 8px 0 6px; transform: translate(12px, -50%); border: 3px solid #c0306e; border-radius: 17px; background: #fde8f2; color: #6a1240; font-size: 13px; font-weight: 700; white-space: nowrap; box-shadow: 0 0 0 3px #ffffff60, 0 0 10px #ff70b8, 0 4px 10px #0007; }
.wm .wm-den .wm-dst { color: #c88a00; letter-spacing: -1px; }
.wm .wm-den .wm-dmi { margin: -6px -2px -4px; }
.wm .wm-den .wm-dopen { padding: 0 5px; border-radius: 4px; background: #c0306e; color: #fff; font-size: 11px; }
.wm .wm-den.live { border-color: #ff4fa8; }
.wm .wm-plane.lv2 .wm-den { height: 26px; padding: 0 6px; font-size: 11px; }
.wm .wm-plane.lv2 .wm-den .wm-dmi, .wm .wm-plane.lv2 .wm-den .wm-dopen { display: none; }
.wm .wm-mapbox.off-dens .wm-den { display: none; }
@media (hover: hover) { .wm .wm-den:hover { border-color: var(--sel-line); } }
.wm .wm-ek.k-raid { --ec: #c0306e; }
.wm .wm-lrow.beg { border-color: #2e9a4e; background: #dff3e4; }
.wm .wm-lrow.beg .wm-ek { --ec: #2e9a4e; }
.wm .wm-card .wm-densec { padding: 8px 12px 10px; }
.wm .wm-densec h4 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wm .wm-dhelp { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 3px solid var(--blue); border-radius: 8px; background: var(--sky); color: var(--ink); font-size: 15px; font-weight: 700; letter-spacing: 0; }
.wm.phone .wm-den, .wm.phone .wm-dhelp { min-width: 44px; }
.wm.phone .wm-dhelp { height: 44px; }
@media (pointer: coarse) {
  .wm .wm-den, .wm .wm-dhelp { min-width: 44px; }
  .wm .wm-dhelp { height: 44px; }
}
