/* ═══════════════════════════════════════════════════════════════════════════
   v2.8 · ADVENTURE MAP — Path-of-Champions-style node map, Ember Reliquary skin
   painted region bands (our scene art) · procedural medallions/paths (SVG+CSS)
   start at the bottom, boss at the top · info panel = one confirm tap
   perf: no backdrop-filter / blend modes; animations are transform/opacity
   (+ one dash-offset on the next segment); all loops off under reduce-motion
   ═══════════════════════════════════════════════════════════════════════════ */
.adv-map {
  --hud-bg: #0b0806;
  --tc: #e8783a;
  padding: 0 !important; overflow: hidden !important;
  justify-content: flex-start; align-items: stretch;
  background: #0b0907;
}
.adv-map .mi { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.adv-map .mi .f { fill: currentColor; stroke: none; }
.adv-map .mi .h { fill: var(--hole, #120c08); stroke: var(--hole, #120c08); }

/* ——— HUD ——— */
.map-hud {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "crest titles tools" "res res res" "mode mode mode";
  align-items: center; gap: 6px 10px;
  padding: calc(10px + env(safe-area-inset-top)) 12px 22px;
  background: linear-gradient(180deg, #0b0806f5 0%, #0b0806e6 62%, #0b080600 100%);
  pointer-events: none;
}
.map-hud > * { pointer-events: auto; }
.map-hud::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 14px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--brass) 55%, transparent) 20%, color-mix(in srgb, var(--brass) 55%, transparent) 80%, transparent);
  opacity: .55;
}
.map-crest {
  grid-area: crest; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.25rem; font-weight: 800;
  color: var(--mc, var(--gold2));
  background: radial-gradient(circle at 50% 35%, #3a2a1a, #120c08 72%);
  box-shadow: 0 0 0 2px #0a0705, 0 0 0 4px color-mix(in srgb, var(--brass) 70%, #3a2a14), 0 0 0 5px #0a0705, 0 6px 14px #000c, inset 0 2px 6px #000c;
  text-shadow: 0 0 10px currentColor;
}
.map-titles { grid-area: titles; min-width: 0; }
.adv-map .map-titles h2 {
  margin: 0; font-size: 1.12rem; line-height: 1.2; color: var(--gold2); letter-spacing: .04em; font-weight: 800;
  text-shadow: 0 2px 4px #000;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.map-sub { display: flex; align-items: center; gap: 8px; margin-top: 2px; font-size: .74rem; color: var(--mist); white-space: nowrap; }
.ms-region { color: color-mix(in srgb, var(--rc) 75%, #f3e6cc); font-weight: 700; letter-spacing: .03em; }
.ms-stars { display: inline-flex; gap: 1px; font-size: 11px; }
.ms-stars .on { color: #f2c76a; filter: drop-shadow(0 0 3px #e8a54a88); }
.ms-stars .off { color: #4a3c2c; }
.ms-prog { color: #cdbfa8; font-variant-numeric: tabular-nums; }
.adv-map .path-tools { grid-area: tools; display: flex; gap: 6px; margin: 0; }
.adv-map .path-tools .pill-btn {
  width: 36px; height: 36px; padding: 0; border-radius: 50%; justify-content: center; font-size: .95rem;
  display: inline-flex; align-items: center;
  background: radial-gradient(circle at 50% 35%, #2a1f16, #0f0b08 75%);
  border: 1px solid color-mix(in srgb, var(--brass) 45%, #2a2016);
  box-shadow: 0 3px 8px #000a, inset 0 1px 0 rgba(255, 230, 190, .08);
}
.adv-map .map-res { grid-area: res; display: flex; gap: 6px; flex-wrap: wrap; margin: 0; font-size: .82rem; color: var(--ink); }
.adv-map .mr {
  position: relative; display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px 3px 6px; border-radius: 999px;
  background: linear-gradient(180deg, #1a130e, #0e0a07) !important;
  border: 1px solid color-mix(in srgb, var(--brass) 38%, #2a2016) !important;
  box-shadow: inset 0 1px 0 rgba(255, 230, 190, .07), 0 2px 6px #0009;
  font-size: .82rem !important; font-variant-numeric: tabular-nums;
}
.adv-map .mr .mi { font-size: 15px; }
.adv-map .mr b { color: #f6ead2; font-weight: 800; }
.adv-map .mr small { color: var(--mist); font-size: .72rem; }
.mr-hp .mi { color: #e2505a; filter: drop-shadow(0 0 3px #e2505a88); }
.mr-hp { padding-bottom: 6px !important; }
.mr-bar { position: absolute; left: 24px; right: 10px; bottom: 3px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, #e2505a 0 var(--p), #3a1a1c var(--p) 100%); }
.mr-ash .mi { color: #e8b862; --hole: #1a130e; }
.mr-deck .mi { color: #c9b8a0; }
.mr-en .mi { color: #6fd3ff; filter: drop-shadow(0 0 3px #6fd3ff66); }
.adv-map .path-mode {
  grid-area: mode; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin: 0; max-width: none;
  scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
}
.adv-map .path-mode::-webkit-scrollbar { display: none; }
.adv-map .path-mode .mode-chip { white-space: nowrap; font-size: .7rem; padding: 2px 9px; }
.adv-map .path-mode .mode-chip.main { display: none; }
.adv-map .path-mode.solo { display: none; }

/* ——— scroll world ——— */
.map-scroll {
  position: absolute; inset: 0; z-index: 1;
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.map-scroll::-webkit-scrollbar { display: none; }
.map-world { position: relative; margin: 0; overflow: hidden; contain: layout paint; }
.map-bg {
  position: absolute; inset: 0;
  background: var(--stone-noise) 0 0 / 180px, linear-gradient(180deg, #120d0a, #0b0806);
}
.mb-band {
  position: absolute; left: 0; right: 0; filter: saturate(1.12) brightness(1.12) contrast(1.04);
  background: var(--art) var(--bx, 50%) 50% / cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 170px, #000 calc(100% - 170px), transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0, #000 170px, #000 calc(100% - 170px), transparent 100%);
}
.mb-band.first { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 170px); mask-image: linear-gradient(180deg, transparent 0, #000 170px); }
.mb-band.last { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 170px), transparent 100%); mask-image: linear-gradient(180deg, #000 calc(100% - 170px), transparent 100%); }
.mb-band.first.last { -webkit-mask-image: none; mask-image: none; }
.mb-band::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 50% 50%, color-mix(in srgb, var(--rc) 12%, transparent), transparent 75%),
    linear-gradient(180deg, rgba(11, 8, 6, .28) 0%, rgba(11, 8, 6, .04) 35%, rgba(11, 8, 6, .06) 65%, rgba(11, 8, 6, .32) 100%),
    linear-gradient(90deg, rgba(8, 6, 4, .4), transparent 20%, transparent 80%, rgba(8, 6, 4, .4));
}
.mb-name {
  position: absolute; z-index: 1; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center;
  padding: 4px 26px 5px; white-space: nowrap;
  font-size: .82rem; font-weight: 800; letter-spacing: .22em;
  color: color-mix(in srgb, var(--rc) 70%, #f3e6cc);
  text-shadow: 0 2px 4px #000, 0 0 12px #000;
  background: radial-gradient(ellipse 60% 70% at 50% 50%, rgba(8, 6, 4, .78), transparent 100%);
}
.mb-name small { font-size: .56rem; letter-spacing: .38em; color: #cdbfa8; opacity: .7; text-transform: uppercase; }
.mb-name::before, .mb-name::after {
  content: ""; position: absolute; top: 50%; width: 44px; height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--rc) 70%, #e8b862));
}
.mb-name::before { right: 100%; }
.mb-name::after { left: 100%; transform: scaleX(-1); }

/* ——— trail ——— */
.map-trail { position: absolute; top: 0; left: 0; overflow: visible; pointer-events: none; }
.map-trail .s-halo { fill: none; stroke: #070504; stroke-opacity: .6; stroke-width: 8; stroke-linecap: round; }
.map-trail .s-core { fill: none; stroke: #f3e6cc; stroke-width: 4; stroke-dasharray: .1 10; stroke-linecap: round; opacity: .72; }
.map-trail .seg.future .s-core { opacity: .6; }
.map-trail .seg.done .s-halo { stroke: #e8783a; stroke-opacity: .26; stroke-width: 12; }
.map-trail .seg.done .s-core { stroke: #ffd08a; stroke-dasharray: none; stroke-width: 3; opacity: .95; }
.map-trail .seg.next .s-halo { stroke: #e8783a; stroke-opacity: .14; stroke-width: 10; }
.map-trail .seg.next .s-core { stroke: #ffcf7a; opacity: 1; stroke-width: 3.6; animation: trailFlow 1.1s linear infinite; }
@keyframes trailFlow { to { stroke-dashoffset: -10.1; } }
.map-trail .spur { fill: none; stroke: #eadcc0; stroke-opacity: .2; stroke-width: 2.4; stroke-dasharray: .1 9; stroke-linecap: round; }

/* fog of war above the vision line */
.map-shroud {
  position: absolute; top: 0; left: 0; right: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(14, 10, 8, .72) 0%, rgba(14, 10, 8, .55) calc(100% - 220px), rgba(14, 10, 8, 0) 100%);
}
.map-shroud::after {
  content: ""; position: absolute; left: -10%; right: -10%; bottom: 40px; height: 240px;
  background: var(--fog-noise) 0 0 / 600px 240px repeat-x;
  opacity: .5;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%, #000 60%, transparent);
          mask-image: linear-gradient(180deg, transparent, #000 40%, #000 60%, transparent);
  animation: fogDrift 38s linear infinite;
}
.map-shroud.off { display: none; }
@keyframes fogDrift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-600px, 0, 0); } }

/* ——— medallions ——— */
.node-track.node-track { position: absolute; inset: 0; display: block; width: auto; padding: 0; margin: 0; background: none; border: 0; box-shadow: none; transform: none; }
.mnode {
  --sz: 58px; --tc: #e8783a;
  position: absolute; width: var(--sz); height: var(--sz); padding: 0; margin: 0;
  transform: translate(-50%, -50%); border: 0; background: none; cursor: pointer;
  border-radius: 50%; color: var(--tc); font: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--dur, 200ms) var(--ease-out, ease);
}
.mnode:focus-visible { outline: 2px solid #ffd08a; outline-offset: 6px; }
.mnode:hover { transform: translate(-50%, -50%) scale(1.07); }
.t-fight { --tc: #ef8a4a; }
.t-elite { --tc: #e2506e; }
.t-boss { --tc: #e2404a; }
.t-final { --tc: #5cf2e6; }
.t-shop { --tc: #f0c766; }
.t-shrine { --tc: #4fe3c1; }
.t-draft { --tc: #9cc0ff; }
.mnode.big { --sz: 94px; }
.mnode.t-final { --sz: 106px; }
.mn-ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 210deg, var(--tc), #f6dc9a 16%, #7a5420 33%, color-mix(in srgb, var(--tc) 70%, #3a2410) 50%, #f3d48a 67%, #5a3a14 84%, var(--tc));
  box-shadow: 0 0 0 2px #0a0705, 0 8px 16px #000d, 0 0 18px color-mix(in srgb, var(--tc) 30%, transparent);
}
.mn-face {
  position: absolute; inset: 4px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 32%, color-mix(in srgb, var(--tc) 22%, #3a2a1c), #120c08 72%);
  box-shadow: inset 0 3px 8px #000d, inset 0 0 0 1px #000a;
  font-size: calc(var(--sz) * .5);
}
.mn-face img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; display: block; }
.mn-face .mi { filter: drop-shadow(0 2px 2px #000c); }
.mnode.big .mn-ring { inset: 0; background: conic-gradient(from 200deg, #ff6a4a, #f6dc9a 14%, #6a1e16 30%, #e8b862 46%, #3a0e0a 62%, #f3d48a 78%, #8a2a1a 90%, #ff6a4a); }
.mnode.big .mn-face { inset: 6px; box-shadow: inset 0 0 0 2px #0a0705, inset 0 4px 12px #000d; }
.mnode.t-final .mn-ring { background: conic-gradient(from 200deg, #5cf2e6, #f6dc9a 14%, #1e3a46 30%, #e8b862 46%, #0a1a22 62%, #f3d48a 78%, #2a6a76 90%, #5cf2e6); }
.mn-pin {
  position: absolute; left: 50%; bottom: -9px; width: 14px; height: 11px; transform: translateX(-50%);
  background: linear-gradient(180deg, #f3d48a, #7a5420);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  filter: drop-shadow(0 2px 2px #000);
}
.mnode.big .mn-pin { bottom: -12px; width: 18px; height: 14px; }
/* elite: diamond plate behind the ring (power-node silhouette) */
.t-elite .mn-ring::before {
  content: ""; position: absolute; inset: -7px; z-index: -1; transform: rotate(45deg); border-radius: 6px;
  background: linear-gradient(135deg, #f3d48a, #7a2a34 50%, #e8b862);
  box-shadow: 0 0 0 2px #0a0705, 0 6px 12px #000c;
}
/* boss: horn crest */
.mn-horns {
  position: absolute; left: 50%; top: -34%; width: 170%; height: 70%; transform: translateX(-50%); z-index: -1; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 90'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23f3d48a'/%3E%3Cstop offset='.5' stop-color='%23813a1c'/%3E%3Cstop offset='1' stop-color='%231a0c08'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg fill='url(%23g)' stroke='%230a0705' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M70 84C52 80 34 68 24 46 19 34 19 20 24 6c4 20 15 34 34 44 6 3 10 8 12 14z'/%3E%3Cpath d='M90 84c18-4 36-16 46-38 5-12 5-26 0-40-4 20-15 34-34 44-6 3-10 8-12 14z'/%3E%3Cpath d='M70 52 80 8l10 44z'/%3E%3Cpath d='M56 60 48 26l18 28zM104 60l8-34-18 28z'/%3E%3C/g%3E%3C/svg%3E") center bottom / contain no-repeat;
  filter: drop-shadow(0 4px 6px #000c);
}
.t-final .mn-horns { filter: drop-shadow(0 4px 6px #000c) hue-rotate(150deg) saturate(.7); }
/* states */
.mnode.s-done .mn-face img, .mnode.s-done .mn-face .mi { filter: grayscale(.75) brightness(.55); }
.mnode.s-done .mn-ring { filter: saturate(.35) brightness(.7); }
.mn-check {
  position: absolute; right: -4px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: 15px; color: #1a0f06;
  background: radial-gradient(circle at 40% 35%, #ffe2a0, #e89a3a);
  box-shadow: 0 0 0 2px #0a0705, 0 2px 6px #000c;
}
.mnode.big .mn-check { width: 30px; height: 30px; font-size: 19px; right: 0; }
.mnode.s-far { opacity: .62; }
.mnode.s-far .mn-ring { filter: saturate(.25) brightness(.62); }
.mnode.s-far .mn-face .mi { opacity: .55; }
.mnode.big.s-far { opacity: .88; }
.mnode.big.s-far .mn-ring { filter: saturate(.6) brightness(.75); }
.mnode.s-current { z-index: 2; }
.mnode.s-current .mn-ring { box-shadow: 0 0 0 2px #0a0705, 0 8px 16px #000d, 0 0 26px color-mix(in srgb, var(--tc) 70%, transparent); }
.mnode.s-current::before {
  content: ""; position: absolute; inset: -16px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, transparent 52%, color-mix(in srgb, var(--tc) 55%, transparent) 60%, transparent 72%);
  animation: nodeHalo 2.4s ease-out infinite;
}
@keyframes nodeHalo { 0% { transform: scale(.82); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
.mnode.sel { opacity: 1; z-index: 3; }
.mnode.sel .mn-ring, .mnode.sel.s-far .mn-ring { filter: none; }
.mnode.sel .mn-face .mi { opacity: 1; }
.mnode.sel .mn-ring { box-shadow: 0 0 0 2px #0a0705, 0 0 0 5px #ffe2a0cc, 0 8px 16px #000d; }
.mn-label {
  position: absolute; left: 50%; top: calc(100% + 12px); transform: translateX(-50%);
  white-space: nowrap; pointer-events: none;
  padding: 2px 11px 3px; border-radius: 999px;
  font-size: .72rem; font-weight: 800; letter-spacing: .02em; color: #f6ead2;
  background: linear-gradient(180deg, #22180fe6, #0e0907e6);
  border: 1px solid color-mix(in srgb, var(--tc) 45%, #3a2a16);
  box-shadow: 0 3px 8px #000b;
  text-shadow: 0 1px 2px #000;
}
.mnode.big .mn-label { font-size: .8rem; top: calc(100% + 16px); color: #ffe2b0; }
.mnode.s-done .mn-label { opacity: .7; }
.mn-coin {
  position: absolute; left: calc(100% - 4px); top: -6px;
  display: inline-flex; align-items: center; gap: 2px; padding: 1px 7px 1px 3px; border-radius: 999px;
  font-size: .62rem; font-weight: 800; color: #ffd890; white-space: nowrap; pointer-events: none;
  background: linear-gradient(180deg, #2a1c0ee8, #120c07e8);
  border: 1px solid #e8b86266; box-shadow: 0 2px 5px #000b;
  --hole: #1e140b;
}
.mn-coin .mi { font-size: 13px; color: #f0b85a; }
.mnode.big .mn-coin { left: calc(100% + 2px); top: 4px; }
.mnode-more {
  position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--mist); font-size: .7rem; pointer-events: none; text-shadow: 0 1px 3px #000;
}
.mnode-more .mi { font-size: 22px; opacity: .7; }
.mnode-more.next b { font-size: 1.7rem; color: #ff9a4a; text-shadow: 0 0 12px #ff7a3d99; line-height: 1; }

/* home camp (decorative start, like PoC's Home node) */
.mnode-home { --sz: 44px; --tc: #8fd0c0; position: absolute; width: var(--sz); height: var(--sz); transform: translate(-50%, -50%); color: var(--tc); pointer-events: none; }
.mnode-home .mn-ring { filter: saturate(.6); }
.mnode-home .mn-face { font-size: 22px; }
.mh-label { position: absolute; left: 50%; top: calc(100% + 6px); transform: translateX(-50%); white-space: nowrap; font-size: .64rem; color: #cdbfa8; text-shadow: 0 1px 3px #000; }

/* ——— hero token ——— */
.map-token { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 3; pointer-events: none;
  transition: transform .95s cubic-bezier(.45, .05, .3, 1); will-change: transform; }
.map-token.no-anim { transition: none; }
.mt-ring {
  position: absolute; left: -23px; top: -25px; width: 46px; height: 46px; border-radius: 50%; padding: 3px;
  background: conic-gradient(from 200deg, #fff1c8, #c9932e 25%, #fff1c8 50%, #8a5a1a 75%, #fff1c8);
  box-shadow: 0 0 0 2px #0a0705, 0 0 20px color-mix(in srgb, var(--hc) 70%, transparent), 0 8px 14px #000d;
  animation: tokenBob 2.6s ease-in-out infinite;
}
.mt-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: 50% 22%; display: block; box-shadow: inset 0 0 0 1px #000; }
.mt-pin {
  position: absolute; left: -6px; top: 20px; width: 12px; height: 10px;
  background: linear-gradient(180deg, #fff1c8, #8a5a1a); clip-path: polygon(50% 100%, 0 0, 100% 0);
}
@keyframes tokenBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.map-going .mt-ring { animation: tokenGo .36s ease-in forwards; }
@keyframes tokenGo { 0% { transform: translateY(0) scale(1); } 40% { transform: translateY(-10px) scale(1.08); } 100% { transform: translateY(10px) scale(.7); opacity: .2; } }

/* foreground mist (moves faster than the map on scroll → depth) */
.map-near { position: absolute; inset: 0; pointer-events: none; will-change: transform; }
.map-near i {
  position: absolute; width: 60%; height: 170px; transform: scale(var(--s, 1));
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(214, 196, 172, .16), rgba(214, 196, 172, .06) 55%, transparent 72%);
}

/* ——— screen-level vignette ——— */
.map-vignette {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    radial-gradient(ellipse 115% 80% at 50% 48%, transparent 60%, rgba(5, 3, 2, .6) 100%),
    linear-gradient(0deg, rgba(8, 6, 4, .75) 0%, transparent 22%);
}
.adv-map .path-hint { display: none; }
@media (min-width: 900px) { .adv-map .path-hint {
  display: block; position: absolute; left: 0; right: 0; bottom: calc(var(--panel-h, 0px) + 18px); z-index: 4; margin: 0;
  text-align: center; font-size: .7rem; color: #cdbfa8; opacity: .7; pointer-events: none; text-shadow: 0 1px 3px #000;
} }

/* ——— node info panel (bottom sheet) ——— */
.map-panel {
  --rc: #c9a45c;
  position: absolute; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 6;
  max-height: 46vh; overflow-y: auto; scrollbar-width: none;
  padding: 12px 16px 14px; border-radius: 18px;
  background:
    radial-gradient(ellipse 80% 55% at 50% 0%, color-mix(in srgb, var(--tc) 16%, transparent), transparent 70%),
    var(--stone-noise) 0 0 / 160px,
    linear-gradient(180deg, #1e1611fa, #100b08fc);
  border: 1px solid color-mix(in srgb, var(--brass) 45%, #2a2016);
  box-shadow: var(--e4), inset 0 1px 0 rgba(255, 230, 190, .09), inset 0 -2px 0 #0008;
  transform: translateY(130%); opacity: 0;
  transition: transform .32s var(--ease-out, ease), opacity .2s ease;
}
.map-panel::-webkit-scrollbar { display: none; }
.map-panel.show { transform: none; opacity: 1; }
.map-panel::after {
  content: ""; position: absolute; inset: 4px; pointer-events: none; border: 14px solid transparent;
  border-image: var(--filigree) 34 / 14px / 0 stretch; opacity: .45;
}
.map-panel.t-fight { --tc: #ef8a4a; } .map-panel.t-elite { --tc: #e2506e; } .map-panel.t-boss { --tc: #e2404a; }
.map-panel.t-final { --tc: #5cf2e6; } .map-panel.t-shop { --tc: #f0c766; } .map-panel.t-shrine { --tc: #4fe3c1; } .map-panel.t-draft { --tc: #9cc0ff; }
.mp-grip { width: 38px; height: 4px; border-radius: 4px; background: #4a3c2c; margin: -2px auto 8px; }
.mp-head { display: flex; align-items: center; gap: 12px; }
.mp-portrait {
  flex: none; width: 62px; height: 62px; border-radius: 50%; padding: 3px; position: relative;
  background: conic-gradient(from 210deg, var(--tc), #f6dc9a 16%, #7a5420 33%, var(--tc) 50%, #f3d48a 67%, #5a3a14 84%, var(--tc));
  box-shadow: 0 0 0 2px #0a0705, 0 6px 12px #000c;
  display: grid; place-items: center; color: var(--tc); font-size: 34px;
}
.mp-portrait img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: 50% 30%; display: block; }
.mp-portrait:not(.art)::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: radial-gradient(circle at 50% 32%, color-mix(in srgb, var(--tc) 22%, #3a2a1c), #120c08 72%); }
.mp-portrait .mi { position: relative; }
.t-boss .mp-portrait, .t-final .mp-portrait { width: 74px; height: 74px; }
.mp-titles { min-width: 0; }
.mp-kind { font-size: .7rem; letter-spacing: .06em; color: var(--mist); }
.mp-kind b { color: var(--tc); }
.mp-reg { color: color-mix(in srgb, var(--rc) 70%, #e6d8bf); }
.adv-map .mp-title { margin: 1px 0 1px; font-size: 1.14rem; line-height: 1.25; font-weight: 800; color: var(--gold2); text-shadow: 0 2px 3px #000; }
.mp-state { display: flex; align-items: center; gap: 4px; font-size: .72rem; color: #cdbfa8; }
.mp-state .mi { color: #f0b85a; font-size: 13px; }
.mp-foes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mp-foe {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 2px; border-radius: 999px;
  background: #0d0907; border: 1px solid #3a2e22; font-size: .78rem; color: #eadcc4;
}
.mp-foe img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; object-position: 50% 30%; box-shadow: 0 0 0 1px #7a5420; }
.mp-foe b { display: inline-flex; align-items: center; gap: 2px; color: #ff8f8f; font-size: .74rem; }
.mp-foe b .mi { font-size: 11px; }
.mp-foe.boss { border-color: #7a2a24; }
.mp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 8px; }
.mp-lbl { font-size: .62rem; letter-spacing: .14em; color: #8a7c6a; min-width: 34px; }
.mp-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 8px;
  background: #15100c; border: 1px solid #3a3022; font-size: .74rem; color: #e6d8bf; --hole: #15100c;
}
.mp-chip .mi { font-size: 13px; }
.mp-chip.ash .mi, .mp-chip.gold .mi { color: #f0b85a; }
.mp-chip.heal .mi { color: #e2505a; }
.mp-chip.mod { color: #d4c6ff; border-color: #4a3e6a; background: #14111c; }
.mp-actions { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.mp-actions .btn { flex: 1; min-width: 0; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin: 0; }
.mp-actions .btn .mi { font-size: 18px; --hole: #3a2410; }
.mp-actions .btn.secondary { flex: .8; }
.mp-go.is-going { opacity: .7; }
.mp-wait { flex: 1; text-align: center; font-size: .8rem; color: var(--mist); padding: 12px 0; }

/* ——— desktop / landscape ——— */
@media (min-width: 900px) {
  .map-hud { grid-template-columns: auto auto 1fr auto; grid-template-areas: "crest titles res tools" "crest titles mode tools"; padding: 14px 22px 26px; gap: 4px 16px; }
  .map-crest { width: 52px; height: 52px; font-size: 1.45rem; }
  .adv-map .map-titles h2 { font-size: 1.35rem; }
  .adv-map .map-res { justify-content: flex-end; }
  .adv-map .path-mode { justify-content: flex-end; -webkit-mask-image: none; }
  .map-panel { left: auto; right: 24px; top: 108px; bottom: auto; width: 372px; max-height: calc(100% - 140px); padding: 18px 20px 18px; }
  .mp-grip { display: none; }
  .mp-portrait { width: 76px; height: 76px; }
  .t-boss .mp-portrait, .t-final .mp-portrait { width: 88px; height: 88px; }
  .adv-map .mp-title { font-size: 1.3rem; }
  .mnode { --sz: 64px; }
  .mnode.big { --sz: 104px; }
  .mnode.t-final { --sz: 116px; }
  .adv-map .path-hint { left: 24px; right: auto; bottom: 18px; text-align: left; }
  .map-vignette { background: radial-gradient(ellipse 100% 90% at 40% 50%, transparent 55%, rgba(5, 3, 2, .75) 100%); }
}
@media (max-width: 360px) {
  .adv-map .mr { padding: 2px 8px 2px 5px; font-size: .76rem !important; }
  .mnode { --sz: 52px; }
}

/* ——— reduced motion: stills only ——— */
body.reduce-motion .map-trail .seg.next .s-core,
body.reduce-motion .map-shroud::after,
body.reduce-motion .mnode.s-current::before,
body.reduce-motion .mt-ring { animation: none !important; }
body.reduce-motion .map-token, body.reduce-motion .map-panel { transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  body:not(.force-motion) .map-trail .seg.next .s-core,
  body:not(.force-motion) .map-shroud::after,
  body:not(.force-motion) .mnode.s-current::before,
  body:not(.force-motion) .mt-ring { animation: none !important; }
}
