/* Focused marker layer: one central detail card, one connector, no per-marker popup collisions. */
.er-map-dialog--premium-board .er-map-marker .er-map-tooltip{display:none!important}

.er-map-dialog--premium-board .er-map-marker.er-map-character-v2{
    width:66px!important;height:92px!important;min-width:66px!important;min-height:92px!important;
    padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;color:inherit!important;
    display:flex!important;flex-direction:column;align-items:center;justify-content:flex-start;gap:0;
    transform:translate(calc(-50% + var(--er-map-character-v2-offset,0px)),-72%)!important;
    overflow:visible!important;box-shadow:none!important;z-index:18!important;isolation:isolate
}
.er-map-dialog--premium-board .er-map-marker.er-map-character-v2::before{
    content:""!important;position:absolute!important;left:50%!important;top:25px!important;width:58px!important;height:58px!important;
    border:2px solid rgba(113,171,255,.88)!important;border-radius:50%!important;background:rgba(74,132,224,.08)!important;
    transform:translate(-50%,-50%)!important;box-shadow:0 0 0 0 rgba(102,165,255,.48)!important;
    opacity:1!important;display:block!important;pointer-events:none!important;z-index:-1!important;
    animation:er-map-character-pulse 1.65s ease-out infinite
}
.er-map-dialog--premium-board .er-map-marker.er-map-character-v2::after{display:none!important}
.er-map-dialog--premium-board .er-map-marker.er-map-character-v2.er-map-marker--ai::before{
    border-color:rgba(87,213,224,.9)!important;background:rgba(77,191,202,.08)!important;box-shadow:0 0 0 0 rgba(87,213,224,.46)!important
}
.er-map-dialog--premium-board .er-map-marker.er-map-character-v2.is-current::before{
    width:64px!important;height:64px!important;border-width:3px!important;animation-duration:1.05s;filter:drop-shadow(0 0 7px rgba(255,218,120,.58))
}
.er-map-dialog--premium-board .er-map-marker.er-map-character-v2.is-viewer-character::before{border-color:#f1cb6f!important}
.er-map-dialog--premium-board .er-map-marker.er-map-character-v2:hover,
.er-map-dialog--premium-board .er-map-marker.er-map-character-v2:focus-visible{
    outline:none!important;background:transparent!important;box-shadow:none!important
}
.er-map-dialog--premium-board .er-map-marker.er-map-character-v2:focus-visible .er-map-character-v2__avatar,
.er-map-dialog--premium-board .er-map-marker.er-map-character-v2.is-focus-source .er-map-character-v2__avatar{
    box-shadow:0 0 0 4px rgba(244,218,151,.24),0 10px 24px rgba(0,0,0,.72),0 0 22px rgba(108,169,255,.38)
}
.er-map-character-v2__avatar{
    position:relative;z-index:3;display:grid;place-items:center;width:50px;height:50px;flex:0 0 50px;
    overflow:hidden;border:3px solid #72aaff;border-radius:50%;background:#101923;color:#f8e7bc;
    font-size:.9rem;font-weight:950;line-height:1;box-shadow:0 9px 22px rgba(0,0,0,.7),0 0 0 4px rgba(5,9,14,.9)
}
.er-map-marker--ai .er-map-character-v2__avatar{border-color:#62d0da}
.er-map-marker.is-current .er-map-character-v2__avatar{border-color:#f0d178}
.er-map-character-v2__fallback{grid-area:1/1;z-index:0}
.er-map-character-v2__avatar img{grid-area:1/1;z-index:1;width:100%;height:100%;object-fit:cover;background:#101923}
.er-map-character-v2__flag{
    position:relative;z-index:2;display:grid;place-items:center;width:43px;height:23px;margin-top:-1px;padding-right:5px;
    border:2px solid rgba(232,240,250,.9);border-left-width:3px;border-radius:3px 4px 4px 3px;
    background:linear-gradient(135deg,#335e9b,#1d3d6b);color:#fff;font-size:.67rem;font-weight:950;line-height:1;
    clip-path:polygon(0 0,100% 0,82% 50%,100% 100%,0 100%);filter:drop-shadow(0 5px 6px rgba(0,0,0,.55))
}
.er-map-marker--ai .er-map-character-v2__flag{background:linear-gradient(135deg,#237882,#13525b)}
.er-map-marker.is-current .er-map-character-v2__flag{background:linear-gradient(135deg,#8b6c20,#5b4311)}
.er-map-character-v2__flag::before{
    content:"";position:absolute;left:-5px;top:-4px;width:3px;height:35px;border-radius:2px;background:#d9d1bc;box-shadow:0 2px 5px rgba(0,0,0,.55)
}
.er-map-character-v2__name{
    position:relative;z-index:4;display:block;max-width:160px;margin-top:3px;padding:3px 7px;border:1px solid rgba(127,154,177,.24);
    border-radius:6px;background:rgba(5,10,15,.94);color:#edf3f7;font-size:.63rem;font-weight:850;line-height:1.15;
    text-align:center;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;box-shadow:0 6px 15px rgba(0,0,0,.52);pointer-events:none
}

.er-map-dialog--premium-board .er-map-marker:not(.er-map-character-v2).is-focus-source{
    z-index:20!important;box-shadow:0 0 0 5px rgba(238,207,137,.25),0 0 22px rgba(238,207,137,.42),0 5px 17px rgba(0,0,0,.72)!important
}

.er-map-focus-overlay{
    position:absolute;inset:0;z-index:42;pointer-events:none;overflow:hidden
}
.er-map-focus-overlay[hidden]{display:none!important}
.er-map-focus-connector{
    position:absolute;z-index:1;height:2px;transform-origin:0 50%;background:linear-gradient(90deg,rgba(232,216,178,.1),rgba(232,216,178,.82));
    box-shadow:0 0 8px rgba(232,216,178,.24);pointer-events:none
}
.er-map-focus-connector::after{
    content:"";position:absolute;right:-1px;top:50%;width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;
    border-left:10px solid rgba(239,221,180,.94);transform:translate(68%,-50%);filter:drop-shadow(0 0 5px rgba(239,221,180,.38))
}
.er-map-focus-connector.is-short{opacity:.42}
.er-map-focus-card{
    position:absolute;left:50%;top:50%;z-index:3;display:grid;grid-template-columns:auto minmax(0,1fr);gap:15px;align-items:center;
    width:min(520px,calc(100% - 150px));max-height:min(330px,calc(100% - 100px));overflow:auto;
    padding:20px 48px 20px 20px;border:1px solid rgba(213,190,142,.46);border-radius:16px;
    transform:translate(-50%,-50%);background:linear-gradient(145deg,rgba(9,16,23,.98),rgba(4,9,14,.985));
    color:#d8e0e5;box-shadow:0 26px 70px rgba(0,0,0,.72),0 0 0 1px rgba(255,255,255,.025),inset 0 1px 0 rgba(255,255,255,.04);
    backdrop-filter:blur(18px);pointer-events:auto
}
.er-map-focus-card__close{
    position:absolute;right:12px;top:12px;display:grid;width:32px;height:32px;padding:0;border:1px solid rgba(129,149,165,.22);border-radius:9px;
    place-items:center;background:rgba(255,255,255,.035);color:#aeb9c2;font-size:1rem;cursor:pointer
}
.er-map-focus-card__close:hover,.er-map-focus-card__close:focus-visible{outline:none;border-color:rgba(231,207,158,.6);background:rgba(231,207,158,.08);color:#f5e3bd}
.er-map-focus-card__portrait{
    width:76px;height:76px;overflow:hidden;border:3px solid rgba(116,174,255,.9);border-radius:50%;background:#101923;
    box-shadow:0 10px 26px rgba(0,0,0,.62),0 0 0 4px rgba(78,126,190,.12)
}
.er-map-focus-card__portrait[hidden]{display:none!important}
.er-map-focus-card__portrait img{display:block;width:100%;height:100%;object-fit:cover}
.er-map-focus-card__body{display:grid;min-width:0;gap:5px}
.er-map-focus-card__type{color:#c2a96f;font-size:.66rem;font-weight:950;letter-spacing:.15em;text-transform:uppercase}
.er-map-focus-card__title{color:#f4e4c3;font-family:Georgia,"Times New Roman",serif;font-size:clamp(1.2rem,2vw,1.72rem);font-weight:600;line-height:1.08}
.er-map-focus-card__description{margin:4px 0 0;color:#d0d9df;font-size:clamp(.92rem,1.35vw,1.05rem);font-weight:560;line-height:1.5;white-space:normal;overflow-wrap:anywhere}

@keyframes er-map-character-pulse{
    0%{box-shadow:0 0 0 0 rgba(102,165,255,.48);opacity:1}
    70%{box-shadow:0 0 0 15px rgba(102,165,255,0);opacity:.72}
    100%{box-shadow:0 0 0 0 rgba(102,165,255,0);opacity:1}
}

@media(max-width:760px){
    .er-map-dialog--premium-board .er-map-marker.er-map-character-v2{width:58px!important;height:82px!important;min-width:58px!important;min-height:82px!important}
    .er-map-character-v2__avatar{width:44px;height:44px;flex-basis:44px;border-width:2px}
    .er-map-dialog--premium-board .er-map-marker.er-map-character-v2::before{width:52px!important;height:52px!important;top:22px!important}
    .er-map-character-v2__flag{width:38px;height:20px;font-size:.61rem}
    .er-map-character-v2__name{max-width:120px;font-size:.58rem}
    .er-map-focus-card{grid-template-columns:1fr;width:calc(100% - 30px);max-height:calc(100% - 44px);padding:18px 42px 18px 18px;text-align:left}
    .er-map-focus-card__portrait{width:62px;height:62px}
    .er-map-focus-card__title{font-size:1.2rem}
    .er-map-focus-card__description{font-size:.92rem}
}

@media(prefers-reduced-motion:reduce){
    .er-map-dialog--premium-board .er-map-marker.er-map-character-v2::before{animation:none!important}
}

/* Character badges live outside the plan and point down to their canonical cell. */
.er-map-dialog--premium-board .er-map-stage{overflow:visible;top:56%}
.er-map-dialog--premium-board .er-map-marker.er-map-character-v2{
    top:-82px!important;width:48px!important;height:68px!important;min-width:48px!important;min-height:68px!important;
    transform:translate(calc(-50% + var(--er-map-character-v2-offset,0px)),0)!important
}
.er-map-dialog--premium-board .er-map-marker.er-map-character-v2::before{top:18px!important;width:42px!important;height:42px!important;animation:none!important}
.er-map-dialog--premium-board .er-map-character-v2__avatar{width:38px;height:38px;flex-basis:38px;border-width:2px}
.er-map-dialog--premium-board .er-map-character-v2__flag{display:none}
.er-map-dialog--premium-board .er-map-character-v2__name{max-width:112px;margin-top:2px;padding:2px 5px;font-size:.56rem}
.er-map-character-pointer{
    position:absolute;z-index:12;width:1px;transform:translateX(-50%);
    border-left:1px solid rgba(238,220,177,.62);pointer-events:none
}
.er-map-character-pointer::after{
    content:"";position:absolute;left:50%;bottom:-2px;width:0;height:0;
    border-left:5px solid transparent;border-right:5px solid transparent;border-top:8px solid rgba(240,220,171,.9);
    transform:translateX(-50%);filter:drop-shadow(0 0 4px rgba(240,220,171,.35))
}
.er-map-dialog.is-layer-participants-hidden .er-map-character-pointer{display:none}
