/* jb470 (24.11.2026): video stories — «Истории» button in the header: story avatar with a spinning gradient ring, label, unseen counter (local/jarden/stories/jd-stories.js) */
.jd-stb-wrap { display: inline-flex; align-items: center; }
#header .jd-stb-wrap, #headerfixed .jd-stb-wrap { margin-right: 10px; }
.jd-stb { position: relative; display: inline-flex; align-items: center; gap: 9px; padding: 3px 14px 3px 3px; border-radius: 999px; cursor: pointer; color: #fff; font: 600 14px/1 var(--jd-text, inherit); letter-spacing: .02em;
  background: linear-gradient(rgba(43,20,30,.6), rgba(43,20,30,.6)) padding-box, linear-gradient(135deg, #ffd978, #f0628f 40%, #8b3dff) border-box; border: 1px solid transparent;
  box-shadow: 0 6px 18px -8px rgba(240,98,143,.8); transition: transform .35s cubic-bezier(.3,1.7,.5,1), box-shadow .3s ease; -webkit-tap-highlight-color: transparent; white-space: nowrap; }
.jd-stb:hover { transform: translateY(-2px); box-shadow: 0 10px 26px -8px rgba(240,98,143,1), 0 0 0 4px rgba(240,98,143,.14); }
.jd-stb:active { transform: scale(.96); transition-duration: .1s; }
.jd-stb:focus-visible { outline: none; box-shadow: 0 0 0 3px #fff, 0 0 0 6px #f0628f; }
.jd-stb__ava { position: relative; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; padding: 3px; box-sizing: border-box; }
.jd-stb__ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, #ffd978, #ff9dba, #f0628f, #c22a55, #8b3dff, #f0628f, #ffd978); animation: jdStSpin 3s linear infinite; }
.jd-stb__ava::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(240,98,143,.8); opacity: 0; animation: jdStPulse 2.2s ease-out infinite; pointer-events: none; }
.jd-stb__ava img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid #1d0f15; box-sizing: border-box; }
.jd-stb__txt { position: relative; }
.jd-stb__n { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: #f0628f; color: #fff; font: 700 11px/19px var(--jd-text, inherit); text-align: center; box-sizing: border-box; box-shadow: 0 0 0 2px #1d0f15; animation: jdStBadge 2.2s ease-in-out infinite; }
html.jd-st-seen .jd-stb__ring { background: rgba(255,255,255,.3); animation: none; }
html.jd-st-seen .jd-stb__ava::after, html.jd-st-seen .jd-stb__n { display: none; }
html.jd-st-seen .jd-stb { background: linear-gradient(rgba(43,20,30,.6), rgba(43,20,30,.6)) padding-box, linear-gradient(135deg, rgba(255,255,255,.3), rgba(255,255,255,.15)) border-box; box-shadow: none; }
/* phone header: just the round avatar */
.jd-stb--m { padding: 0; gap: 0; background: none; border: 0; box-shadow: none; width: 40px; height: 44px; justify-content: center; }
.jd-stb--m:hover { transform: none; box-shadow: none; }
.jd-stb--m .jd-stb__ava { width: 32px; height: 32px; padding: 2.5px; }
.jd-stb--m .jd-stb__n { top: 2px; right: -2px; min-width: 16px; height: 16px; font-size: 10px; line-height: 16px; padding: 0 4px; }
html.jd-st-seen .jd-stb--m { background: none; }
#mobileheader .jd-stb-wrap { height: 62px; margin-right: 2px; align-items: center; }
body:not(.theme-dark) .jd-stb { color: #2b1820; background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, #ffd978, #f0628f 40%, #8b3dff) border-box; }
body:not(.theme-dark) .jd-stb__ava img { border-color: #fff; }
body:not(.theme-dark) .jd-stb--m { background: none; }
@media (max-width: 1199px) { #header .jd-stb__txt, #headerfixed .jd-stb__txt { display: none; } #header .jd-stb, #headerfixed .jd-stb { padding-right: 3px; } }
@keyframes jdStSpin { to { transform: rotate(360deg); } }
@keyframes jdStPulse { 0% { opacity: .9; transform: scale(.9); } 70%, 100% { opacity: 0; transform: scale(1.3); } }
@keyframes jdStBadge { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .jd-stb__ring, .jd-stb__ava::after, .jd-stb__n { animation: none !important; } }

/* ---------- player ---------- */
html.jd-sp-lock, html.jd-sp-lock body { overflow: hidden !important; }
.jd-sp { position: fixed; inset: 0; z-index: 3000; display: none; align-items: center; justify-content: center; gap: 22px; }
.jd-sp.is-open { display: flex; animation: jdSpIn .28s ease both; }
.jd-sp__bg { position: absolute; inset: 0; background: rgba(14,6,10,.9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.jd-sp__frame { position: relative; height: min(92vh, 860px); aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; background: #000; box-shadow: 0 30px 90px -20px rgba(0,0,0,.8), 0 0 70px -25px rgba(240,98,143,.55); touch-action: none; user-select: none; -webkit-user-select: none; animation: jdSpZoom .32s cubic-bezier(.2,.9,.3,1.15) both; }
.jd-sp__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.jd-sp__top { position: absolute; left: 0; right: 0; top: 0; z-index: 3; padding: 10px 12px 34px; background: linear-gradient(rgba(0,0,0,.5), rgba(0,0,0,0)); }
.jd-sp__bars { display: flex; gap: 4px; }
.jd-sp__bar { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.35); overflow: hidden; }
.jd-sp__bar i { display: block; height: 100%; background: #fff; transform: scaleX(0); transform-origin: 0 50%; }
.jd-sp__meta { display: flex; align-items: center; gap: 10px; margin-top: 10px; color: #fff; }
.jd-sp__ava { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; padding: 2px; background: linear-gradient(135deg, #ffb3c8, #c22a55); flex: 0 0 auto; }
.jd-sp__ava img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.jd-sp__who { flex: 1; min-width: 0; font-family: var(--jd-text, inherit); font-size: 14px; font-weight: 600; letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.jd-sp__who em { font-style: normal; font-weight: 400; letter-spacing: 0; opacity: .8; margin-left: 6px; }
.jd-sp__snd, .jd-sp__x { position: relative; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); cursor: pointer; flex: 0 0 auto; transition: background .2s ease; }
.jd-sp__snd:hover, .jd-sp__x:hover { background: rgba(255,255,255,.28); }
.jd-sp__snd::before, .jd-sp__x::before { content: ''; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; background: #fff; }
.jd-sp__x::before { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.4 5 12 10.6 17.6 5 19 6.4 13.4 12 19 17.6 17.6 19 12 13.4 6.4 19 5 17.6 10.6 12 5 6.4z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.4 5 12 10.6 17.6 5 19 6.4 13.4 12 19 17.6 17.6 19 12 13.4 6.4 19 5 17.6 10.6 12 5 6.4z'/%3E%3C/svg%3E") center / contain no-repeat; }
.jd-sp__snd::before { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9h4l5-4v14l-5-4H3zm13.5 3a4.5 4.5 0 0 0-2.5-4v8a4.5 4.5 0 0 0 2.5-4zM14 3.2v2.1a7 7 0 0 1 0 13.4v2.1a9 9 0 0 0 0-17.6z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9h4l5-4v14l-5-4H3zm13.5 3a4.5 4.5 0 0 0-2.5-4v8a4.5 4.5 0 0 0 2.5-4zM14 3.2v2.1a7 7 0 0 1 0 13.4v2.1a9 9 0 0 0 0-17.6z'/%3E%3C/svg%3E") center / contain no-repeat; }
.jd-sp.is-muted .jd-sp__snd::before { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9h4l5-4v14l-5-4H3zm13.6-.4 2.4 2.4 2.4-2.4 1.4 1.4-2.4 2.4 2.4 2.4-1.4 1.4-2.4-2.4-2.4 2.4-1.4-1.4 2.4-2.4-2.4-2.4z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9h4l5-4v14l-5-4H3zm13.6-.4 2.4 2.4 2.4-2.4 1.4 1.4-2.4 2.4 2.4 2.4-1.4 1.4-2.4-2.4-2.4 2.4-1.4-1.4 2.4-2.4-2.4-2.4z'/%3E%3C/svg%3E") center / contain no-repeat; }
.jd-sp__tap { position: absolute; top: 90px; bottom: 120px; z-index: 2; }
.jd-sp__tap--l { left: 0; width: 33%; }
.jd-sp__tap--r { right: 0; width: 67%; }
.jd-sp__bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 40px 14px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.55)); }
.jd-sp__order { display: flex; gap: 8px; }
.jd-sp__btn { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 12px; border-radius: 999px; font-family: var(--jd-text, inherit); font-size: 14px; font-weight: 600; text-align: center; text-decoration: none !important; color: #fff !important; box-sizing: border-box; transition: transform .25s cubic-bezier(.3,1.7,.5,1), filter .2s ease; }
.jd-sp__btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.jd-sp__btn:active { transform: scale(.97); }
.jd-sp__btn--main { background: rgba(250,245,238,.95); color: #2e231b !important; }
.jd-sp__btn--tg { background: linear-gradient(135deg, #5fd0ff, #1c8fd6); }
.jd-sp__btn--max { background: linear-gradient(135deg, #4f7dff, #8b3dff); }
.jd-sp__nav { position: relative; z-index: 2; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); cursor: pointer; transition: background .2s ease, transform .25s ease, opacity .2s; }
.jd-sp__nav:hover { background: rgba(240,98,143,.5); transform: scale(1.08); }
.jd-sp__nav:disabled { opacity: .25; cursor: default; transform: none; background: rgba(255,255,255,.12); }
.jd-sp__nav::before { content: ''; position: absolute; inset: 0; margin: auto; width: 12px; height: 12px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: translateX(-2px) rotate(-45deg); }
.jd-sp__nav--prev::before { transform: translateX(2px) rotate(135deg); }
.jd-sp.is-load .jd-sp__frame::after { content: ''; position: absolute; left: 50%; top: 50%; z-index: 2; width: 42px; height: 42px; margin: -21px 0 0 -21px; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; animation: jdSpSpin .8s linear infinite; }
.jd-sp.is-held .jd-sp__top, .jd-sp.is-held .jd-sp__bottom { opacity: 0; transition: opacity .2s ease; }
@keyframes jdSpIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes jdSpZoom { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
@keyframes jdSpSpin { to { transform: rotate(360deg); } }
@media (max-width: 767px) {
  .jd-sp { gap: 0; }
  .jd-sp__nav { display: none; }
  .jd-sp__frame { height: 100%; width: 100%; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
  .jd-sp__video { object-fit: contain; }
  .jd-sp__top { padding-top: calc(10px + env(safe-area-inset-top)); }
}
@media (prefers-reduced-motion: reduce) {
  .jd-stories__it .jd-stories__ring { animation: none !important; transition: none; }
  .jd-sp.is-open, .jd-sp__frame { animation: none; }
}
