/* Карта «Где это» (assets/map.js) и плашка «Когда и где» события */
.edm{--edm-h:clamp(300px,44vw,440px);position:relative;}
.edm-fb{margin:0;padding:0 0 0 18px;}
.edm[data-on] .edm-fb{display:none;}

/* сцена */
.edm-stage{position:relative;height:var(--edm-h);border-radius:26px;overflow:hidden;isolation:isolate;background:#e8ebe4;
  box-shadow:0 34px 60px -44px rgba(20,20,20,.55),0 0 0 1px rgba(20,20,20,.07);transform:translateZ(0);}
.edm .edm-map{position:absolute;inset:0;width:100%;height:100%;z-index:1;background:#e8ebe4;font:inherit;opacity:0;transition:opacity .7s ease;}
.edm-stage.is-ready .edm-map{opacity:1;}
.edm-stage::after{content:"";position:absolute;inset:0;z-index:2;pointer-events:none;border-radius:inherit;
  background:radial-gradient(130% 100% at 50% 45%,rgba(232,235,228,0) 62%,rgba(225,229,220,.55) 100%);box-shadow:inset 0 0 0 1px rgba(255,255,255,.5);}
.edm .maplibregl-map{font:inherit;}
.edm .maplibregl-canvas{outline:none;}
.edm .maplibregl-ctrl-bottom-right,.edm .maplibregl-ctrl-bottom-left{z-index:5;}
.edm .maplibregl-cooperative-gesture-screen{z-index:6;font:inherit;font-weight:800;font-size:15px;background:rgba(20,20,20,.55);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);}

/* загрузка */
.edm-skel{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:rgba(20,20,20,.5);
  font-size:13.5px;font-weight:700;transition:opacity .5s ease,visibility .5s;
  background:linear-gradient(110deg,rgba(255,255,255,0) 30%,rgba(255,255,255,.55) 50%,rgba(255,255,255,0) 70%) 0 0/250% 100%,
    radial-gradient(circle at 30% 40%,rgba(200,241,53,.18),transparent 45%),repeating-linear-gradient(0deg,rgba(20,20,20,.035) 0 1px,transparent 1px 28px),
    repeating-linear-gradient(90deg,rgba(20,20,20,.035) 0 1px,transparent 1px 28px),#eceee8;animation:edmShine 1.6s linear infinite;}
.edm-skel i{width:44px;height:44px;border-radius:50%;background:#fff;display:grid;place-items:center;box-shadow:0 10px 24px -14px rgba(0,0,0,.4);}
.edm-skel svg{width:22px;height:22px;fill:none;stroke:#141414;stroke-width:1.8;}
.edm-stage.is-ready .edm-skel{opacity:0;visibility:hidden;}
@keyframes edmShine{to{background-position:-250% 0,0 0,0 0,0 0,0 0;}}

/* подпись выбранного места */
.edm-badge{position:absolute;left:14px;top:14px;z-index:4;max-width:calc(100% - 28px);display:flex;flex-direction:column;gap:2px;
  padding:10px 14px 11px;border-radius:16px;background:rgba(255,255,255,.82);-webkit-backdrop-filter:blur(14px) saturate(1.4);backdrop-filter:blur(14px) saturate(1.4);
  box-shadow:0 14px 30px -18px rgba(0,0,0,.45),0 0 0 1px rgba(255,255,255,.7);opacity:0;transform:translateY(-6px);transition:opacity .4s ease,transform .5s cubic-bezier(.34,1.56,.64,1);}
.edm-badge.on{opacity:1;transform:none;}
.edm-badge b{font-size:14.5px;font-weight:800;color:#141414;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.edm-badge span{font-size:12.5px;font-weight:700;color:rgba(20,20,20,.55);}

/* пины */
.edm-pin-w,.edm-home-w{background:none;border:0;padding:0;font:inherit;cursor:pointer;}
.edm-pin-w{width:36px;height:36px;display:block;}
.edm-home-w{pointer-events:none;}
.edm-pin{position:relative;display:grid;place-items:center;width:36px;height:36px;border-radius:50% 50% 50% 6px;transform:rotate(-45deg) scale(1);transform-origin:50% 50%;
  background:#141414;border:2.5px solid #fff;box-shadow:0 10px 18px -8px rgba(0,0,0,.6);
  transition:transform .5s cubic-bezier(.34,1.56,.64,1),background .25s;animation:edmDrop .7s cubic-bezier(.34,1.56,.64,1) both;animation-delay:var(--d,0ms);}
.edm-pin b{transform:rotate(45deg);font-family:"Unbounded",system-ui,sans-serif;font-weight:900;font-size:12.5px;color:#fff;line-height:1;}
.edm-pin b:empty::before{content:"";display:block;width:9px;height:9px;border-radius:50%;background:var(--lime,#c8f135);}
.edm-pin-w:hover .edm-pin{transform:rotate(-45deg) scale(1.08);}
.edm-pin-w.on .edm-pin{background:var(--lime,#c8f135);transform:rotate(-45deg) scale(1.18);}
.edm-pin-w.on .edm-pin b{color:#141414;}
.edm-pin-w.on .edm-pin b:empty::before{background:#141414;}
.edm-pin-w.on .edm-pin::after{content:"";position:absolute;inset:-9px;border-radius:inherit;border:2px solid var(--lime,#c8f135);opacity:0;animation:edmPulse 2s ease-out infinite;}
@keyframes edmDrop{from{opacity:0;transform:rotate(-45deg) translate(14px,-14px) scale(.6);}to{opacity:1;}}
@keyframes edmPulse{0%{opacity:.9;transform:scale(.8);}100%{opacity:0;transform:scale(1.5);}}
.edm-home{display:grid;place-items:center;width:30px;height:30px;border-radius:10px;background:var(--lime,#c8f135);border:2.5px solid #fff;box-shadow:0 8px 16px -8px rgba(0,0,0,.55);}
.edm-home svg{width:16px;height:16px;fill:#141414;}
.edm-home-w em{position:absolute;left:36px;top:5px;font-style:normal;font-size:11.5px;font-weight:800;color:#fff;background:#141414;padding:3px 8px 4px;border-radius:999px;white-space:nowrap;}

/* кнопки зума и подпись подложки */
.edm .maplibregl-ctrl-group{border-radius:14px;overflow:hidden;box-shadow:0 12px 26px -16px rgba(0,0,0,.5),0 0 0 1px rgba(20,20,20,.06);margin:0 14px 14px 0;background:rgba(255,255,255,.9);}
.edm .maplibregl-ctrl-group button{width:36px;height:36px;}
.edm .maplibregl-ctrl-group button+button{border-top:1px solid rgba(20,20,20,.08);}
.edm .maplibregl-ctrl-attrib{font-size:10px;margin:0 0 10px 10px;}
.edm .maplibregl-ctrl-attrib.maplibregl-compact{background:rgba(255,255,255,.75);}
.edm .maplibregl-ctrl-attrib a{color:rgba(20,20,20,.6);}

/* список мест */
.edm-list{display:flex;gap:8px;overflow-x:auto;scroll-snap-type:x proximity;scrollbar-width:none;padding:14px 2px 4px;margin:0 -2px;}
.edm-list::-webkit-scrollbar{display:none;}
.edm-list button{flex:none;scroll-snap-align:center;display:flex;align-items:center;gap:10px;text-align:left;font:inherit;cursor:pointer;color:#141414;
  background:var(--panel,#f3f4f5);border:1px solid var(--line-soft,rgba(20,20,20,.08));border-radius:16px;padding:9px 14px 9px 9px;
  transition:transform .45s cubic-bezier(.34,1.56,.64,1),background .2s,color .2s,border-color .2s,box-shadow .3s;}
.edm-list button:hover{border-color:var(--line,rgba(20,20,20,.16));box-shadow:0 10px 20px -16px rgba(0,0,0,.4);}
.edm-list button:active{transform:scale(.95);transition-duration:.1s;}
.edm-list i{flex:none;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;font-style:normal;font-family:"Unbounded",system-ui,sans-serif;
  font-weight:900;font-size:12px;background:#141414;color:#fff;transition:background .2s,color .2s;}
.edm-list b{display:block;font-size:14px;font-weight:800;line-height:1.2;white-space:nowrap;}
.edm-list small{display:block;font-size:12px;font-weight:700;color:var(--ink-soft,#6b7076);margin-top:2px;white-space:nowrap;}
.edm-list button.on{background:#141414;border-color:#141414;color:#fff;}
.edm-list button.on i{background:var(--lime,#c8f135);color:#141414;}
.edm-list button.on small{color:rgba(255,255,255,.6);}

/* действия */
.edm-acts{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;}
.edm-b,.jw-b{display:inline-flex;align-items:center;gap:8px;min-height:44px;white-space:nowrap;padding:0 16px;border-radius:999px;font-size:14px;font-weight:800;text-decoration:none;
  color:#141414;background:var(--panel,#f3f4f5);border:1px solid var(--line,rgba(20,20,20,.14));cursor:pointer;
  transition:transform .45s cubic-bezier(.34,1.56,.64,1),background .2s,box-shadow .3s;}
.edm-b svg,.jw-b svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none;}
.edm-b:hover,.jw-b:hover{background:#fff;box-shadow:0 12px 22px -16px rgba(0,0,0,.45);}
.edm-b:active,.jw-b:active{transform:scale(.95);transition-duration:.1s;}
.edm-b-main,.jw-b-main{background:#141414;border-color:#141414;color:#fff;}
.edm-b-main:hover,.jw-b-main:hover{background:#000;}
.edm-b-main svg,.jw-b-main svg{stroke:var(--lime,#c8f135);}
/* внутри текста статьи ссылки подчёркнуты лаймом — у кнопок карты это убираем */
.jr-body .edm a.edm-b,.jr-body .edm a.edm-b:hover,.jr .jw a.jw-b{color:#141414;text-decoration:none;background-image:none;box-shadow:none;border-bottom-width:1px;}
.jr-body .edm a.edm-b-main,.jr-body .edm a.edm-b-main:hover,.jr .jw a.jw-b-main{color:#fff;background-color:#141414;}
.jr-body .edm a.edm-b:not(.edm-b-main){background-color:var(--panel,#f3f4f5);}
.jr-body .edm-list button,.jr-body .edm-badge{text-decoration:none;}

/* ---------- «Когда и где» у события ---------- */
.jw{display:grid;gap:0;margin:0 0 34px;border-radius:30px;overflow:hidden;background:var(--panel,#f3f4f5);border:1px solid var(--line-soft,rgba(20,20,20,.08));
  box-shadow:0 40px 70px -56px rgba(20,20,20,.6);}
.jw.has-map{grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);}
.jw-in{padding:26px 26px 22px;display:flex;flex-direction:column;gap:14px;min-width:0;}
.jw-top{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;}
.jw-eye{font-size:12px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:var(--ink-soft,#6b7076);}
.jw-cd{display:inline-flex;align-items:center;gap:8px;font-size:13px;font-weight:800;padding:7px 12px 7px 11px;border-radius:999px;background:var(--lime,#c8f135);color:#141414;}
.jw-cd i{width:7px;height:7px;border-radius:50%;background:#141414;}
.jw-cd.is-live{background:#141414;color:#fff;}
.jw-cd.is-live i{background:var(--lime,#c8f135);box-shadow:0 0 0 0 rgba(200,241,53,.7);animation:jwLive 1.6s ease-out infinite;}
.jw-cd.is-past{background:rgba(20,20,20,.08);}
.jw-cd.is-past i{display:none;}
@keyframes jwLive{70%{box-shadow:0 0 0 8px rgba(200,241,53,0);}100%{box-shadow:0 0 0 0 rgba(200,241,53,0);}}
.jw-row{display:flex;gap:14px;align-items:flex-start;}
.jw-ic{flex:none;width:44px;height:44px;border-radius:14px;display:grid;place-items:center;background:#fff;box-shadow:0 8px 18px -14px rgba(0,0,0,.45),0 0 0 1px rgba(20,20,20,.05);}
.jw-ic svg{width:21px;height:21px;fill:none;stroke:#141414;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
.jw-row b{display:block;font-family:"Unbounded",system-ui,sans-serif;font-size:clamp(18px,2.2vw,22px);font-weight:800;letter-spacing:-.015em;line-height:1.2;}
.jw-row span{display:block;font-size:14px;font-weight:600;color:var(--ink-soft,#6b7076);margin-top:4px;line-height:1.45;}
.jw-acts{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px;}
.jw-alt,.jw-src{margin:0;font-size:12.5px;font-weight:600;color:var(--ink-soft,#6b7076);}
.jw-alt a,.jw-src a{color:inherit;text-decoration:underline;text-underline-offset:2px;}
.jw .edm-mini{--edm-h:100%;min-height:300px;}
.jw .edm-mini .edm-stage{border-radius:0;box-shadow:none;height:100%;}
.jw .edm-mini .edm-stage::after{background:linear-gradient(90deg,rgba(243,244,245,.55),rgba(243,244,245,0) 18%);}
@media (max-width:860px){
  .jw.has-map{grid-template-columns:1fr;}
  .jw .edm-mini{order:-1;min-height:0;height:230px;}
  .jw .edm-mini .edm-stage::after{background:linear-gradient(0deg,rgba(243,244,245,.6),rgba(243,244,245,0) 22%);}
  .jw-in{padding:20px 18px 18px;}
}
@media (max-width:520px){
  .jw{border-radius:24px;margin-left:-4px;margin-right:-4px;}
  .jw-b{flex:1 1 calc(50% - 4px);justify-content:center;padding:0 12px;}
  .edm-b{flex:1 1 auto;justify-content:center;}
  .edm-stage{border-radius:22px;}
}

/* место в гиде журнала и на странице тура */
.jr-where{margin:40px 0 8px;}
.jr-where .jr-h{margin-bottom:16px;}

@media (prefers-reduced-motion:reduce){
  .edm-pin,.edm-skel,.jw-cd.is-live i,.edm-pin-w.on .edm-pin::after{animation:none;}
  .edm-badge,.edm-list button,.edm-b,.jw-b{transition:none;}
}
