/* ---------- the world map v3, full screen (2026-10-18, js/worldmap3.js): the painted continent fills the screen; the UI
   (title, land tabs, place card, tools, legend) floats over it, sized by --k. Kit pictures (Codex) come in as --w3-* vars;
   without them the same parts fall back to plain dark-and-gold panels. ---------- */
#wmap { position: fixed; inset: 0; z-index: 900; overflow: hidden; user-select: none; touch-action: none; font-family: 'Mali', sans-serif; color: #f6ecd2;
  --k: 1; --gold: #e8c46a; --gold2: #b8862c; --ink: #2a1c0e; --panel: rgba(14, 12, 22, 0.9); --panel2: rgba(30, 24, 40, 0.92); }
#wmap[hidden] { display: none; }
#wmap .wm3-sky { position: absolute; inset: 0; background: var(--w3-sky, radial-gradient(ellipse at 50% 45%, #2c4f7a 0%, #1a2f52 55%, #0d1730 100%)); }
#wmap .wm3-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
#wmap.panning, #wmap.panning * { cursor: grabbing !important; }
#wmap:not(.panning) .wm3-world { cursor: grab; }
#wmap .wm3-terrain { position: absolute; inset: 0; width: 100%; height: 100%; display: block; -webkit-user-drag: none; }
#wmap .wm3-arts, #wmap .wm3-fog, #wmap .wm3-clouds, #wmap .wm3-glints, #wmap .wm3-orbs { position: absolute; inset: 0; pointer-events: none; }
#wmap .wm3-art { position: absolute; object-fit: contain; -webkit-user-drag: none; transition: opacity 0.25s, filter 0.25s; }
#wmap .wm3-art.dim { opacity: 0.35; filter: saturate(0.4); }
#wmap .wm3-art.fog { filter: saturate(0.35) brightness(0.8); }
#wmap .wm3-fogc { position: absolute; object-fit: contain; opacity: 0; transition: opacity 0.4s; animation: w3Fog 9s ease-in-out infinite alternate; }
#wmap .wm3-fogc.on { opacity: 0.92; }
@keyframes w3Fog { from { transform: translateX(-2%); } to { transform: translateX(2%); } }
#wmap .wm3-drift { position: absolute; opacity: 0.9; animation: w3Drift 60s linear infinite alternate; }
@keyframes w3Drift { from { transform: translateX(0); } to { transform: translateX(var(--dx, 4vw)); } }
#wmap .wm3-glint { position: absolute; animation: w3Glint 5s ease-in-out infinite; opacity: 0; }
@keyframes w3Glint { 0%, 100% { opacity: 0; } 45%, 55% { opacity: 0.85; } }
#wmap .wm3-orb { position: absolute; left: 0; top: 0; width: 1.6%; opacity: 0.95; will-change: transform; }
@media (prefers-reduced-motion: reduce) { #wmap .wm3-fogc, #wmap .wm3-drift, #wmap .wm3-glint, #wmap .wm3-orbs { animation: none !important; } #wmap .wm3-orbs { display: none; } }

/* ---- the places: a button over each landmark (screen space, js placePins), its plate under it */
#wmap .wm3-pins { position: absolute; inset: 0; pointer-events: none; }
#wmap .wm3-pin { position: absolute; left: 0; top: 0; padding: 0; border: 0; background: none; border-radius: 45%; cursor: pointer; pointer-events: auto; will-change: transform; }
#wmap .wm3-pin:hover, #wmap .wm3-pin.sel, #wmap .wm3-pin.quest { z-index: 5; }
#wmap .wm3-pin.dim { opacity: 0.35; }
#wmap .wm3-glow { position: absolute; inset: 4% 2%; border-radius: 50%; opacity: 0; transition: opacity 0.2s; pointer-events: none;
  background: var(--w3-glow, radial-gradient(closest-side, color-mix(in srgb, var(--lc) 55%, transparent), color-mix(in srgb, var(--lc) 18%, transparent) 65%, transparent)); background-size: 100% 100%; }
#wmap .wm3-pin:hover .wm3-glow, #wmap .wm3-pin.sel .wm3-glow { opacity: 1; }
#wmap .wm3-pin.st-rec:not(.safe) .wm3-glow { opacity: 0.75; animation: w3Rec 2.2s ease-in-out infinite; }
@keyframes w3Rec { 50% { opacity: 0.35; } }
#wmap .wm3-pin.quest .wm3-glow { opacity: 1; background: radial-gradient(closest-side, rgba(255, 70, 50, 0.55), rgba(255, 70, 50, 0.15) 65%, transparent); animation: w3Rec 1.1s ease-in-out infinite; }
/* the plate: the land's number seal + the name and level, the same size at every zoom */
#wmap .wm3-plate { position: absolute; left: 50%; top: calc(50% + var(--py, 40px)); transform: translate(-50%, -50%) scale(var(--k)); display: flex; align-items: center; gap: 6px;
  width: max-content; max-width: 190px; padding: 5px 14px 5px 6px; white-space: normal; text-align: left; pointer-events: auto;
  border: 0 solid transparent; border-image: var(--w3-plate, none) 30 60 30 60 fill / 12px 26px 12px 26px stretch;
  background: var(--w3-plate-bg, linear-gradient(180deg, rgba(34, 28, 44, 0.94), rgba(16, 13, 22, 0.94))); border-radius: var(--w3-plate-r, 10px);
  box-shadow: var(--w3-plate-sh, 0 0 0 1.5px var(--gold2), 0 0 0 3px rgba(0, 0, 0, 0.55), 0 4px 10px rgba(0, 0, 0, 0.55)); transition: transform 0.15s; }
#wmap .wm3-pin:hover .wm3-plate, #wmap .wm3-pin.sel .wm3-plate { transform: translate(-50%, -50%) scale(calc(var(--k) * 1.08)); }
#wmap .wm3-num { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 800 12.5px/1 'Fredoka', sans-serif; color: #fffaf0;
  background: var(--w3-seal, none) center / 118% no-repeat, var(--lc); background-blend-mode: luminosity, normal; box-shadow: 0 0 0 2px var(--gold), 0 0 0 3px rgba(0, 0, 0, 0.6); }
#wmap .wm3-num.star { font-size: 14px; background: linear-gradient(#f6da86, #c99c3e); color: #3a2408; }
#wmap .wm3-nm { min-width: 0; display: flex; flex-direction: column; }
#wmap .wm3-nm b { font: 700 14.5px/1.12 'Mali', sans-serif; color: var(--w3-name, #fff3d4); }
#wmap .wm3-nm small { font: 700 11.5px/1.15 'Fredoka', 'Mali', sans-serif; color: #d8cfb8; margin-top: 1px; }
#wmap .wm3-pin.st-rec .wm3-nm small { color: #8ef07a; }
#wmap .wm3-pin.st-ahead .wm3-nm small { color: #ffd75a; }
#wmap .wm3-pin.st-hard .wm3-nm small { color: #ff8a7a; }
#wmap .wm3-pin.st-easy .wm3-nm small { color: #a59e90; }
#wmap .wm3-pin.fog .wm3-plate { filter: saturate(0.4) brightness(0.85); }
#wmap .wm3-rec { position: absolute; right: -6px; top: -10px; padding: 1px 7px; border-radius: 8px; background: #2f8a24; color: #f4ffe8; font: 700 10.5px/1.4 'Mali', sans-serif; font-style: normal; box-shadow: 0 0 0 1.5px #c7f5b0; }
/* zoomed far out: the plates shrink to the number and the name; the lands' names float over them */
#wmap.far .wm3-nm small, #wmap.far .wm3-rec { display: none; }
#wmap.far .wm3-plate { padding: 3px 10px 3px 4px; }
#wmap.far .wm3-nm b { font-size: 13px; }
#wmap .wm3-landname { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; pointer-events: none; opacity: 0; transition: opacity 0.3s; }
#wmap.far .wm3-landname { opacity: 0.95; }
#wmap .wm3-landname b { font: 800 calc(17px * var(--k))/1.1 'Mali', sans-serif; color: #fff4d6; padding: 2px 14px; border-radius: 14px; background: color-mix(in srgb, var(--lc) 70%, #10101a); box-shadow: 0 0 0 1.5px var(--gold), 0 3px 8px rgba(0, 0, 0, 0.5); }
#wmap .wm3-landname small { margin-top: 2px; font: 700 calc(11px * var(--k)) 'Fredoka', sans-serif; color: #f6ecd2; padding: 0 8px; border-radius: 8px; background: rgba(10, 8, 16, 0.7); }
/* markers on a landmark */
#wmap .wm3-boss { position: absolute; right: 2%; top: -4%; width: calc(34px * var(--k)); height: calc(34px * var(--k)); border-radius: 50%; background: #241f2a;
  box-shadow: 0 0 0 2.5px var(--gold), 0 0 0 4px rgba(0, 0, 0, 0.6), 0 3px 6px rgba(0, 0, 0, 0.5); cursor: help; transition: transform 0.15s; }
#wmap .wm3-boss:hover { transform: scale(1.2); }
#wmap.far .wm3-boss { width: calc(26px * var(--k)); height: calc(26px * var(--k)); }
#wmap .wm3-dg { position: absolute; left: 4%; top: -4%; width: calc(38px * var(--k)); height: calc(38px * var(--k)); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.7)); animation: w3Bob 1.8s ease-in-out infinite; }
@keyframes w3Bob { 50% { transform: translateY(-4px); } }
#wmap .wm3-fb { position: absolute; left: 50%; top: 2%; transform: translateX(-50%) scale(var(--k)); padding: 2px 9px; border-radius: 9px; background: rgba(20, 14, 28, 0.92); color: #ffd36a;
  font: 700 11.5px/1.35 'Mali', sans-serif; font-style: normal; white-space: nowrap; box-shadow: 0 0 0 1.5px #d8463a; }
#wmap .wm3-fb.live { background: #b02a1c; color: #fff4e8; animation: w3Bob 1.2s ease-in-out infinite; }
#wmap .wm3-you { position: absolute; left: 22%; top: 18%; transform: translate(-50%, -100%) scale(var(--k)); display: flex; flex-direction: column; align-items: center; pointer-events: none; z-index: 2; }
#wmap .wm3-you canvas { width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(#fff0f6, #c25a86); box-shadow: 0 0 0 3px var(--gold), 0 0 0 5px #1a1410; animation: w3You 1.6s ease-in-out infinite; }
#wmap .wm3-you i { margin-top: 3px; padding: 1px 8px; border-radius: 8px; background: #c25a86; color: #fff; font: 700 11px/1.35 'Mali', sans-serif; font-style: normal; white-space: nowrap; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6); }
@keyframes w3You { 0%, 100% { box-shadow: 0 0 0 3px var(--gold), 0 0 0 5px #1a1410, 0 0 0 5px rgba(232, 196, 106, 0.7); } 50% { box-shadow: 0 0 0 3px var(--gold), 0 0 0 5px #1a1410, 0 0 0 18px rgba(232, 196, 106, 0); } }
#wmap .wm3-qarrow { position: absolute; left: 50%; top: calc(50% + var(--py, 40px) - 40px * var(--k)); width: calc(40px * var(--k)); transform: translate(-50%, -100%); pointer-events: none; z-index: 3;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); animation: w3Arrow 0.9s ease-in-out infinite; }
@keyframes w3Arrow { 50% { transform: translate(-50%, calc(-100% - 8px)); } }
@media (prefers-reduced-motion: reduce) { #wmap .wm3-qarrow, #wmap .wm3-you canvas, #wmap .wm3-dg, #wmap .wm3-fb.live, #wmap .wm3-glow { animation: none !important; } }

/* ---- the UI over the map */
#wmap .wm3-ui { position: absolute; inset: 0; pointer-events: none; }
#wmap .wm3-ui > * { pointer-events: auto; }
#wmap .wm3-top { position: absolute; left: 50%; top: 0; transform: translateX(-50%) scale(var(--k)); transform-origin: 50% 0; pointer-events: none; }
#wmap .wm3-title { min-width: 460px; padding: 12px 70px 16px; display: flex; flex-direction: column; align-items: center; border: 0 solid transparent;
  border-image: var(--w3-banner, none) 40 160 40 160 fill / 20px 80px 20px 80px stretch;
  background: var(--w3-banner-bg, linear-gradient(180deg, rgba(22, 18, 30, 0.95), rgba(12, 10, 18, 0.9))); border-radius: 0 0 18px 18px; box-shadow: var(--w3-banner-sh, 0 0 0 2px var(--gold2), 0 6px 18px rgba(0, 0, 0, 0.6)); }
#wmap .wm3-title b { font: 800 30px/1.1 'Mali', sans-serif; color: #ffe39a; letter-spacing: 0.5px; }
#wmap .wm3-title small { font: 600 14px 'Mali', sans-serif; color: #e9dcbc; margin-top: 2px; }
#wmap .wm3-x { position: absolute; right: calc(14px * var(--k)); top: calc(12px * var(--k)); width: calc(52px * var(--k)); height: calc(52px * var(--k)); border: 0; border-radius: 50%; cursor: pointer;
  font: 800 calc(24px * var(--k))/1 sans-serif; color: #ffe39a; background: var(--w3-round, radial-gradient(#2c2438, #120e18)); background-size: 100% 100%; box-shadow: 0 0 0 2px var(--gold2), 0 4px 10px rgba(0, 0, 0, 0.6); z-index: 6; }
#wmap .wm3-x:hover { filter: brightness(1.2); }
#wmap .wm3-quest { position: absolute; left: 50%; top: calc(94px * var(--k)); transform: translateX(-50%) scale(var(--k)); transform-origin: 50% 0; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 22px; border-radius: 12px; background: rgba(60, 14, 10, 0.92); box-shadow: 0 0 0 2px #e05a42, 0 4px 12px rgba(0, 0, 0, 0.5); color: #ffe6dc; font: 600 15px/1.35 'Mali', sans-serif; text-align: center; max-width: 620px; }
#wmap .wm3-quest[hidden] { display: none; }
#wmap .wm3-quest .q { font-style: normal; font-size: 12.5px; color: #ffb9a6; }
#wmap .wm3-quest b { color: #fff; margin: 0 3px; }
#wmap .wm3-quest small { font-size: 12.5px; color: #ffcdbf; }
/* the land tabs (left) */
#wmap .wm3-tabs { position: absolute; left: calc(10px * var(--k)); top: 50%; transform: translateY(-50%) scale(var(--k)); transform-origin: 0 50%; display: flex; flex-direction: column; gap: 6px; }
#wmap .wm3-tab { display: flex; align-items: center; gap: 8px; width: 150px; padding: 5px 8px 5px 5px; border: 0; border-radius: 12px; cursor: pointer; text-align: left;
  background: var(--w3-tab, linear-gradient(90deg, color-mix(in srgb, var(--lc, #3a2f4a) 55%, #16121e), rgba(18, 14, 26, 0.92))); background-size: 100% 100%;
  box-shadow: 0 0 0 1.5px rgba(232, 196, 106, 0.55), 0 3px 8px rgba(0, 0, 0, 0.5); color: #f6ecd2; transition: transform 0.15s; }
#wmap .wm3-tab:hover { transform: translateX(4px); }
#wmap .wm3-tab.on { box-shadow: 0 0 0 2.5px var(--gold), 0 0 14px color-mix(in srgb, var(--lc, #e8c46a) 70%, transparent); transform: translateX(6px); }
#wmap .wm3-tab i { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 800 14px/1 'Fredoka', sans-serif; font-style: normal; color: #fffaf0;
  background: var(--w3-seal, none) center / 118% no-repeat, var(--lc, #8a6a3a); background-blend-mode: luminosity, normal; box-shadow: 0 0 0 2px var(--gold); }
#wmap .wm3-tab.all i { background: linear-gradient(#f6da86, #c99c3e); color: #3a2408; }
#wmap .wm3-tab span { display: flex; flex-direction: column; min-width: 0; }
#wmap .wm3-tab b { font: 700 14px/1.15 'Mali', sans-serif; }
#wmap .wm3-tab small { font: 600 11px 'Fredoka', 'Mali', sans-serif; color: #dccfae; }
#wmap .wm3-tab.you::after { content: 'คุณ'; margin-left: auto; padding: 0 6px; border-radius: 7px; background: #c25a86; color: #fff; font: 700 10px/1.5 'Mali', sans-serif; }
/* the place card (right) */
#wmap .wm3-card { position: absolute; right: calc(14px * var(--k)); top: calc(76px * var(--k)); bottom: calc(14px * var(--k)); width: 380px; transform: scale(var(--k)); transform-origin: 100% 0;
  height: calc((100% - 90px * var(--k)) / var(--k)); display: flex; flex-direction: column; overflow: hidden; border-radius: 14px; animation: w3Card 0.22s ease-out;
  border: 0 solid transparent; border-image: var(--w3-card, none) 70 fill / 26px stretch;
  background: var(--w3-card-bg, linear-gradient(180deg, rgba(26, 21, 34, 0.97), rgba(12, 10, 18, 0.97))); box-shadow: var(--w3-card-sh, 0 0 0 2px var(--gold2), 0 0 0 4px rgba(0, 0, 0, 0.6), 0 14px 34px rgba(0, 0, 0, 0.7)); }
#wmap .wm3-card[hidden] { display: none; }
@keyframes w3Card { from { opacity: 0; translate: 24px 0; } }
#wmap .wm3-cbanner { position: relative; flex: none; height: 150px; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 14px 10px; background-color: #1c2a3a;
  box-shadow: inset 0 -60px 40px -24px rgba(10, 8, 16, 0.95); }
#wmap .wm3-cbanner b { font: 800 22px/1.15 'Mali', sans-serif; color: #fff1c8; }
#wmap .wm3-cbanner small { font: 500 12.5px 'Fredoka', sans-serif; color: #e2d7bd; }
#wmap .wm3-cx { position: absolute; right: 8px; top: 8px; width: 32px; height: 32px; border: 0; border-radius: 50%; cursor: pointer; background: rgba(10, 8, 16, 0.75); color: #ffe39a; font: 700 16px/1 sans-serif; box-shadow: 0 0 0 1.5px var(--gold2); }
#wmap .wm3-cbody { flex: 1 1 auto; overflow-y: auto; padding: 10px 14px; display: flex; flex-direction: column; gap: 9px; scrollbar-width: thin; }
#wmap .wm3-chips { display: flex; flex-wrap: wrap; gap: 5px; }
#wmap .wm3-chips i { padding: 3px 9px; border-radius: 9px; font: 700 12px/1.25 'Mali', sans-serif; font-style: normal; background: rgba(255, 255, 255, 0.08); color: #e9e2cf; }
#wmap .wm3-chips i.lv { background: linear-gradient(#f6da86, #c99c3e); color: #2b1d0e; }
#wmap .wm3-chips i.land { background: color-mix(in srgb, var(--lc) 35%, transparent); color: #fff4dc; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lc) 80%, #fff); }
#wmap .wm3-chips i.st-rec { color: #9ef08a; } #wmap .wm3-chips i.st-ahead { color: #ffd75a; } #wmap .wm3-chips i.st-hard { color: #ff9a8a; } #wmap .wm3-chips i.st-easy { color: #b8b0a0; }
#wmap .wm3-chips i.here { background: #c25a86; color: #fff; }
#wmap .wm3-chips i.fog { background: rgba(120, 110, 150, 0.35); }
#wmap .wm3-story { margin: 0; font: 500 13px/1.6 'Mali', sans-serif; color: #e4dac2; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
#wmap .wm3-card h4 { margin: 4px 0 0; font: 700 14px 'Mali', sans-serif; color: #ffe39a; }
#wmap .wm3-card h4 small { font-weight: 500; font-size: 11.5px; color: #cfc4a8; margin-left: 4px; }
#wmap .wm3-bossrow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; cursor: pointer; background: linear-gradient(90deg, rgba(232, 196, 106, 0.2), rgba(232, 196, 106, 0.05));
  box-shadow: inset 0 0 0 1.5px rgba(232, 196, 106, 0.6); }
#wmap .wm3-bossrow:hover { background: linear-gradient(90deg, rgba(232, 196, 106, 0.32), rgba(232, 196, 106, 0.08)); }
#wmap .wm3-bossrow img { flex: none; width: 62px; height: 62px; border-radius: 50%; background: #241f2a; box-shadow: 0 0 0 2.5px var(--gold), 0 0 12px rgba(232, 196, 106, 0.45); }
#wmap .wm3-bossrow span { display: flex; flex-direction: column; min-width: 0; }
#wmap .wm3-bossrow b { font: 800 16px/1.2 'Mali', sans-serif; color: #ffe8a8; }
#wmap .wm3-bossrow small { font: 700 12px 'Fredoka', sans-serif; color: #e2d6b6; }
#wmap .wm3-bossrow em { font: 600 12px/1.4 'Mali', sans-serif; font-style: normal; color: #d6c9a8; }
#wmap .wm3-bossrow em.live { color: #ff9a7a; font-weight: 800; }
#wmap .wm3-bossrow em.rest { color: #ffb38a; font-weight: 800; font-variant-numeric: tabular-nums; }   /* (a map boss in its 2-hour rest) */
#wmap .wm3-drops { display: flex; flex-wrap: wrap; gap: 4px; cursor: pointer; }
#wmap .wm3-drop { width: 42px; height: 42px; display: grid; place-items: center; }
#wmap .wm3-drop > * { transform: scale(0.72); transform-origin: 50% 50%; }
#wmap .wm3-mobs { display: flex; flex-wrap: wrap; gap: 8px; }
#wmap .wm3-mob { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0; border: 0; background: none; cursor: pointer; color: #e8dcc0; }
#wmap .wm3-mob img { width: 52px; height: 52px; border-radius: 50%; background: #2a2433; box-shadow: 0 0 0 2px rgba(232, 196, 106, 0.6); transition: transform 0.12s; }
#wmap .wm3-mob.elite img { box-shadow: 0 0 0 2.5px #c08cff, 0 0 8px rgba(192, 140, 255, 0.5); }
#wmap .wm3-mob:hover img { transform: scale(1.1); }
#wmap .wm3-mob small { font: 700 11px 'Fredoka', sans-serif; }
#wmap .wm3-hub { display: flex; flex-direction: column; gap: 6px; }
#wmap .wm3-hub button { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 0; border-radius: 10px; cursor: pointer; text-align: left; color: #f2ead6;
  background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(232, 196, 106, 0.4); }
#wmap .wm3-hub button:hover { background: rgba(232, 196, 106, 0.16); }
#wmap .wm3-hub img { width: 38px; height: 38px; object-fit: contain; }
#wmap .wm3-hub b { display: block; font: 700 14px 'Mali', sans-serif; color: #ffe8a8; }
#wmap .wm3-hub small { font: 500 12px 'Mali', sans-serif; color: #d8ccae; }
#wmap .wm3-hub p { margin: 2px 0 0; font: 500 12px/1.5 'Mali', sans-serif; color: #cfc4a8; }
#wmap .wm3-cbtns { flex: none; display: flex; gap: 8px; padding: 10px 14px 14px; }
#wmap .wm3-cbtns .btn { flex: 1 1 0; min-height: 46px; font: 700 15px 'Mali', sans-serif; }
#wmap .wm3-cbtns .btn.primary { flex: 1.6 1 0; }
#wmap .qg-ring { position: relative; animation: w3Ring 1s ease-in-out infinite; }
@keyframes w3Ring { 0%, 100% { box-shadow: 0 0 0 3px #ff5a42, 0 0 12px rgba(255, 90, 66, 0.7); } 50% { box-shadow: 0 0 0 6px rgba(255, 90, 66, 0.35), 0 0 22px rgba(255, 90, 66, 0.9); } }
/* tools (bottom right) and the legend (bottom left) */
#wmap .wm3-tools { position: absolute; right: calc(14px * var(--k)); bottom: calc(16px * var(--k)); transform: scale(var(--k)); transform-origin: 100% 100%; display: flex; gap: 8px; }
#wmap.carded .wm3-tools { right: calc(410px * var(--k)); }
#wmap .wm3-tools button { width: 48px; height: 48px; border: 0; border-radius: 50%; cursor: pointer; font: 800 24px/1 'Fredoka', sans-serif; color: #ffe39a;
  background: var(--w3-round, radial-gradient(#2c2438, #120e18)); background-size: 100% 100%; box-shadow: 0 0 0 2px var(--gold2), 0 4px 10px rgba(0, 0, 0, 0.6); display: grid; place-items: center; }
#wmap .wm3-tools button:hover { filter: brightness(1.2); }
#wmap .wm3-tools .t-you { width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(#fff0f6, #c25a86); box-shadow: 0 0 0 2.5px var(--gold); }
#wmap .wm3-legend { position: absolute; left: calc(14px * var(--k)); bottom: calc(14px * var(--k)); transform: scale(var(--k)); transform-origin: 0 100%; display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 6px; }
#wmap .wm3-lgt { padding: 6px 14px; border: 0; border-radius: 10px; cursor: pointer; font: 700 13px 'Mali', sans-serif; color: #ffe39a; background: rgba(16, 13, 22, 0.92); box-shadow: 0 0 0 1.5px var(--gold2); }
#wmap .wm3-legend ul { margin: 0; padding: 10px 14px; list-style: none; border-radius: 12px; background: rgba(16, 13, 22, 0.94); box-shadow: 0 0 0 1.5px var(--gold2), 0 6px 14px rgba(0, 0, 0, 0.5); display: flex; flex-direction: column; gap: 6px; }
#wmap .wm3-legend li { display: flex; align-items: center; gap: 8px; font: 500 13px 'Mali', sans-serif; color: #eadfc4; }
#wmap .wm3-legend li img { width: 20px; height: 20px; object-fit: contain; }
#wmap .wm3-legend .k-road { width: 26px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #ffd36a, #fff3c0, #ffd36a); box-shadow: 0 0 6px #ffd36a; }
#wmap .wm3-legend .k-you { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(#fff0f6, #c25a86); box-shadow: 0 0 0 2px var(--gold); }
#wmap .wm3-legend .k-rec { padding: 0 6px; border-radius: 7px; background: #2f8a24; color: #fff; font: 700 10.5px/1.5 'Mali', sans-serif; font-style: normal; }
#wmap .wm3-legend .k-boss { width: 18px; height: 18px; border-radius: 50%; background: #241f2a; box-shadow: 0 0 0 2px var(--gold); }
#wmap .wm3-legend .k-fb { padding: 0 6px; border-radius: 7px; background: #b02a1c; color: #fff; font: 700 10.5px/1.5 'Mali', sans-serif; font-style: normal; }
#wmap .wm3-legend .k-fog { width: 22px; height: 14px; border-radius: 7px; background: linear-gradient(90deg, #8a84a8, #c8c2dc, #8a84a8); }
/* a phone: no tabs column (the land names float on the map), the card a sheet at the bottom */
#wmap.small .wm3-tabs { top: auto; bottom: calc(70px * var(--k)); transform: scale(calc(var(--k) * 0.85)); transform-origin: 0 100%; flex-direction: row; flex-wrap: wrap; width: 360px; gap: 4px; display: none; }
#wmap.small .wm3-card { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; height: 48%; transform: none; }
#wmap.small.carded .wm3-tools { right: calc(14px * var(--k)); bottom: calc(50% + 14px); }
#wmap.small .wm3-title { min-width: 300px; padding: 8px 40px 10px; }
#wmap.small .wm3-title b { font-size: 22px; }
#wmap.small .wm3-quest { top: calc(64px * var(--k)); }

/* ---------- DIRECTION B (picked 2026-10-18): the ROYAL ANTIQUE ATLAS skin - the Codex kit assets/ui_book/atlas3/k_*.png:
   parchment plates and card with dark ink, red wax seals recoloured to each land (mask), gilded buttons, the walnut-and-gold
   frame round the screen. No halos round text: dark ink on parchment, light text only on dark wood / wax. ---------- */
#wmap { --ink: #3a2410; --ink2: #6b4a2a; --w3-sky: radial-gradient(ellipse at 50% 50%, #5a4128 0%, #3a2918 60%, #22170c 100%); }
#wmap .wm3-frame { position: absolute; inset: 0; pointer-events: none; z-index: 1; border: 0 solid transparent;
  border-image: url(../assets/ui_book/atlas3/k_frame.png) 100 fill / calc(60px * var(--k)) stretch; }
#wmap .wm3-ui { z-index: 2; }
/* the title cartouche */
#wmap .wm3-title { background: none; box-shadow: none; border-radius: 0; padding: 14px 96px 18px;
  border-image: url(../assets/ui_book/atlas3/k_banner.png) 50 220 50 220 fill / 22px 96px 22px 96px stretch; filter: drop-shadow(0 4px 8px rgba(30, 18, 6, 0.55)); }
#wmap .wm3-title b { color: #4a2a0e; }
#wmap .wm3-title small { color: #6b4a2a; }
/* the place plates: a parchment scroll with a wax seal */
#wmap .wm3-plate { background: none; box-shadow: none; border-radius: 0; padding: 7px 18px 7px 8px;
  border-image: url(../assets/ui_book/atlas3/k_plate.png) 34 70 34 70 fill / 13px 27px 13px 27px stretch; filter: drop-shadow(0 2px 3px rgba(30, 18, 6, 0.55)); }
#wmap .wm3-nm b { color: #3a2410; }
#wmap .wm3-nm small { color: #6b4a2a; }
#wmap .wm3-pin.st-rec .wm3-nm small { color: #2a6a1e; }
#wmap .wm3-pin.st-ahead .wm3-nm small { color: #8a560c; }
#wmap .wm3-pin.st-hard .wm3-nm small { color: #a1281c; }
#wmap .wm3-pin.st-easy .wm3-nm small { color: #7d6a55; }
#wmap .wm3-num, #wmap .wm3-tab i { box-shadow: none; background: var(--lc); background-image: linear-gradient(160deg, rgba(255, 255, 255, 0.28), rgba(0, 0, 0, 0.18));
  -webkit-mask: url(../assets/ui_book/atlas3/k_seal.png) center / contain no-repeat; mask: url(../assets/ui_book/atlas3/k_seal.png) center / contain no-repeat; }
#wmap .wm3-num { width: 28px; height: 28px; }
#wmap .wm3-num.star, #wmap .wm3-tab.all i { background: #b8862c; background-image: linear-gradient(160deg, #ffe7a0, #b8862c); color: #3a2408; }
#wmap .wm3-rec { background: #2f6a24; color: #f4ffe8; box-shadow: 0 0 0 1.5px #f3e6c4; }
/* boss face in a gold medallion; the "you" pin */
#wmap .wm3-boss { width: calc(46px * var(--k)); height: calc(46px * var(--k)); padding: calc(6px * var(--k)); object-fit: cover; border-radius: 50%; box-shadow: none;
  background: url(../assets/ui_book/atlas3/k_medal.png) center / contain no-repeat; }
#wmap.far .wm3-boss { width: calc(36px * var(--k)); height: calc(36px * var(--k)); }
#wmap .wm3-you { width: 70px; height: 90px; background: url(../assets/ui_book/atlas3/k_pin.png) center / contain no-repeat; justify-content: flex-start; filter: drop-shadow(0 3px 4px rgba(30, 18, 6, 0.6)); }
#wmap .wm3-you canvas { margin-top: 6px; width: 46px; height: 46px; box-shadow: none; background: radial-gradient(#f6ead0, #c9a878); animation: none; }
#wmap .wm3-you i { position: absolute; bottom: -18px; background: #7a2a1c; color: #fff3df; }
#wmap .wm3-pin.here .wm3-glow { opacity: 1; animation: w3Rec 1.6s ease-in-out infinite; }
#wmap .wm3-glow { background: url(../assets/ui_book/atlas3/k_glow.png) center / 100% 100% no-repeat; }
#wmap .wm3-pin.quest .wm3-glow { background: radial-gradient(closest-side, rgba(220, 60, 40, 0.5), rgba(220, 60, 40, 0.14) 65%, transparent); }
#wmap .wm3-fb { background: #f3e6c4; color: #7a2a1c; box-shadow: 0 0 0 1.5px #a1281c; }
#wmap .wm3-fb.live { background: #a1281c; color: #fff3df; }
/* the names of the lands when zoomed out: a ribbon in the colour of the land */
#wmap .wm3-landname b { background: color-mix(in srgb, var(--lc) 78%, #2a1a0a); color: #fff6e0; box-shadow: 0 0 0 1.5px #e8c46a, 0 3px 6px rgba(30, 18, 6, 0.5); }
#wmap .wm3-landname small { background: rgba(243, 230, 196, 0.92); color: #4a2a0e; }
/* the land tabs: parchment bookmarks */
#wmap .wm3-tab { width: 132px; padding: 7px 10px 7px 8px; border-radius: 0; background: none; box-shadow: none; color: #3a2410;
  border: 0 solid transparent; border-image: url(../assets/ui_book/atlas3/k_tab.png) 30 40 30 110 fill / 12px 16px 12px 44px stretch; filter: drop-shadow(0 2px 3px rgba(30, 18, 6, 0.5)); }
#wmap .wm3-tab.on { box-shadow: none; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--lc, #e8c46a) 90%, transparent)) drop-shadow(0 2px 3px rgba(30, 18, 6, 0.5)); }
#wmap .wm3-tab i { width: 32px; height: 32px; }
#wmap .wm3-tab b { color: #3a2410; }
#wmap .wm3-tab small { color: #6b4a2a; }
#wmap .wm3-tab.you::after { background: #7a2a1c; color: #fff3df; }
/* round buttons, the close button */
#wmap .wm3-x, #wmap .wm3-tools button { background: url(../assets/ui_book/atlas3/k_round.png) center / contain no-repeat; box-shadow: none; color: #ffe39a; filter: drop-shadow(0 3px 4px rgba(30, 18, 6, 0.6)); }
/* the place card: an old parchment sheet in a gold frame */
#wmap .wm3-card { background: none; box-shadow: none; border-radius: 0; border-image: url(../assets/ui_book/atlas3/k_card.png) 120 fill / 40px stretch; padding: 30px 18px 18px;
  filter: drop-shadow(0 10px 18px rgba(30, 18, 6, 0.6)); color: #3a2410; }
#wmap .wm3-cbanner { border-radius: 6px; box-shadow: inset 0 -60px 40px -24px rgba(40, 24, 10, 0.88), 0 0 0 2px #8a6a3a; }
#wmap .wm3-cbody { padding: 10px 4px; }
#wmap .wm3-chips i { background: rgba(107, 74, 36, 0.14); color: #4a3018; box-shadow: inset 0 0 0 1px rgba(107, 74, 36, 0.4); }
#wmap .wm3-chips i.lv { background: #7a2a1c; color: #fff3df; box-shadow: none; }
#wmap .wm3-chips i.land { background: color-mix(in srgb, var(--lc) 22%, #f3e6c4); color: color-mix(in srgb, var(--lc) 75%, #1a0e04); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lc) 60%, transparent); }
#wmap .wm3-chips i.st-rec { color: #2a6a1e; } #wmap .wm3-chips i.st-ahead { color: #8a560c; } #wmap .wm3-chips i.st-hard { color: #a1281c; } #wmap .wm3-chips i.st-easy { color: #6d5d4a; }
#wmap .wm3-chips i.here { background: #3b2410; color: #f6ead0; }
#wmap .wm3-story { color: #4a3018; }
#wmap .wm3-card h4 { color: #7a2a1c; }
#wmap .wm3-card h4 small { color: #6b4a2a; }
#wmap .wm3-bossrow { background: rgba(122, 42, 28, 0.08); box-shadow: inset 0 0 0 1.5px rgba(138, 86, 12, 0.6); }
#wmap .wm3-bossrow:hover { background: rgba(122, 42, 28, 0.16); }
#wmap .wm3-bossrow img { padding: 6px; width: 70px; height: 70px; background: url(../assets/ui_book/atlas3/k_medal.png) center / contain no-repeat; box-shadow: none; }
#wmap .wm3-bossrow b { color: #5a1c10; }
#wmap .wm3-bossrow small, #wmap .wm3-bossrow em { color: #6b4a2a; }
#wmap .wm3-bossrow em.live { color: #a1281c; }
#wmap .wm3-mob { color: #4a3018; }
#wmap .wm3-mob img { background: #e9d8b0; box-shadow: 0 0 0 2px #8a6a3a; }
#wmap .wm3-mob.elite img { box-shadow: 0 0 0 2.5px #7a4ab0; }
#wmap .wm3-hub button { color: #3a2410; background: rgba(107, 74, 36, 0.1); box-shadow: inset 0 0 0 1px rgba(107, 74, 36, 0.45); }
#wmap .wm3-hub button:hover { background: rgba(107, 74, 36, 0.2); }
#wmap .wm3-hub b { color: #5a1c10; }
#wmap .wm3-hub small, #wmap .wm3-hub p { color: #6b4a2a; }
#wmap .wm3-cbtns { padding: 10px 0 0; }
#wmap .wm3-cbtns .btn { border: 0 solid transparent; border-radius: 0; background: none; box-shadow: none; color: #3a2410; border-image: url(../assets/ui_book/atlas3/k_btn2.png) 40 60 40 60 fill / 16px 24px 16px 24px stretch; }
#wmap .wm3-cbtns .btn.primary { color: #fff3d0; border-image-source: url(../assets/ui_book/atlas3/k_btn.png); }
#wmap .wm3-cbtns .btn:disabled { filter: grayscale(0.6) brightness(0.95); }
/* the quest strip and the legend on parchment */
#wmap .wm3-quest { background: #f3e6c4; color: #3a2410; box-shadow: 0 0 0 2px #a1281c, 0 4px 12px rgba(30, 18, 6, 0.5); }
#wmap .wm3-quest .q { color: #a1281c; }
#wmap .wm3-quest b { color: #7a2a1c; }
#wmap .wm3-quest small { color: #6b4a2a; }
#wmap .wm3-lgt { background: #f3e6c4; color: #4a2a0e; box-shadow: 0 0 0 1.5px #8a6a3a; }
#wmap .wm3-legend ul { background: rgba(243, 230, 196, 0.97); box-shadow: 0 0 0 1.5px #8a6a3a, 0 6px 14px rgba(30, 18, 6, 0.5); }
#wmap .wm3-legend li { color: #3a2410; }

/* (2026-10-18 tune after the first look with the real art) the glows sit in the world under the landmarks; the fog is a
   light veil; the tabs a little wider; the quest strip at the bottom over the sea, clear of the northern places */
#wmap .wm3-glows { position: absolute; inset: 0; pointer-events: none; }
#wmap .wm3-wglow { position: absolute; opacity: 0; transition: opacity 0.25s; background: url(../assets/ui_book/atlas3/k_glow.png) center / 100% 100% no-repeat; }
#wmap .wm3-wglow.rec { opacity: 0.32; animation: w3Rec 2.4s ease-in-out infinite; }
#wmap .wm3-wglow.here, #wmap .wm3-wglow.sel { opacity: 0.5; animation: none; }
#wmap .wm3-wglow.quest { opacity: 0.6; filter: hue-rotate(-40deg) saturate(1.8); animation: w3Rec 1.1s ease-in-out infinite; }
#wmap .wm3-art { filter: drop-shadow(0 3px 2px rgba(40, 24, 8, 0.35)); }
#wmap .wm3-art.fog { filter: saturate(0.3) brightness(0.92) opacity(0.75); }
#wmap .wm3-fogc.on { opacity: 0.5; }
#wmap .wm3-tab { width: 156px; }
#wmap .wm3-tab b { white-space: nowrap; }
#wmap .wm3-tab.you::after { content: ''; width: 9px; height: 9px; padding: 0; border-radius: 50%; background: #c25a86; box-shadow: 0 0 0 2px #f3e6c4; }
#wmap .wm3-title { padding: 30px 110px 16px; }   /* (under the banner's gold crest) */
#wmap .wm3-title b { font-size: 25px; }
#wmap .wm3-quest { top: calc(98px * var(--k)); flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 2px 8px; padding: 5px 18px; font-size: 14px; max-width: 760px; }
#wmap.small .wm3-quest { top: calc(52px * var(--k)); max-width: 92vw; }
@media (prefers-reduced-motion: reduce) { #wmap .wm3-wglow { animation: none !important; } }

/* phones: landscape = the card on the right (narrow), portrait = a sheet at the bottom; the title without its subtitle and
   the quest ribbon under it */
#wmap.small .wm3-title small { display: none; }
#wmap.small .wm3-title { padding: 10px 70px 12px; }
#wmap.small .wm3-quest { top: calc(56px * var(--k)); font-size: 13px; }
#wmap.small .wm3-cbanner { height: 84px; }
#wmap.small .wm3-cbanner b { font-size: 18px; }
#wmap.small:not(.portrait) .wm3-card { left: auto; right: 6px; top: 6px; bottom: auto; width: 312px; height: calc((100% - 12px) / var(--k)); transform: scale(var(--k)); transform-origin: 100% 0; }
#wmap.small:not(.portrait).carded .wm3-tools { right: calc(330px * var(--k)); bottom: calc(10px * var(--k)); }
#wmap.small.portrait .wm3-card { left: 6px; right: 6px; top: auto; bottom: 6px; width: auto; height: 52%; transform: none; padding: 22px 12px 12px; }
#wmap.small.portrait.carded .wm3-tools { right: calc(14px * var(--k)); bottom: calc(52% + 16px); }
#wmap .wm3-pins { z-index: 0; }   /* (its own layer: a picked place's plate never rises over the card or the frame) */
