.stories-section { padding-top: 37px; padding-bottom: 12px; }
.stories-section:has(.stories-strip:empty) { display: none; }
.stories-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.stories-heading h2 { font-size: clamp(24px, 2.1vw, 31px); letter-spacing: -.03em; }
.stories-heading p { color: var(--muted); font-size: 15px; }
.stories-meta { text-align: right; }
.stories-social { display: flex; gap: 16px; justify-content: flex-end; margin-top: 7px; font-size: 14px; }
.stories-social a { text-decoration: underline; min-height: 28px; }
.stories-strip { display: flex; justify-content: space-between; gap: 24px; overflow-x: auto; padding: 5px 6px 13px; margin: 0 -6px; scroll-snap-type: x proximity; overscroll-behavior-x: contain; scrollbar-width: none; -ms-overflow-style: none; }
/* Keep native touch/trackpad scrolling; hide the scrollbar track and its arrows. */
.stories-strip::-webkit-scrollbar { display: none; width: 0; height: 0; }
.stories-strip::-webkit-scrollbar-button { display: none; }
.story-circle { display: flex; flex: 0 0 106px; flex-direction: column; align-items: center; gap: 10px; scroll-snap-align: start; border-radius: 8px; font-size: 15px; font-weight: 600; text-align: center; }
.story-circle-ring { display: block; padding: 3px; border-radius: 50%; background: linear-gradient(145deg,var(--accent-stop-1),var(--accent-stop-3) 58%,#75957d); box-shadow: 0 5px 13px rgb(35 65 37 / 10%); transition: box-shadow .25s var(--ease); }
.story-circle img { width: 100px; height: 100px; border: 4px solid var(--paper); border-radius: 50%; object-fit: cover; object-position: var(--story-focal,50% 50%); }
.story-circle[data-viewed=true] .story-circle-ring { background: #a5b29a; }
@media (hover:hover) { .story-circle:hover .story-circle-ring { box-shadow: 0 8px 18px rgb(var(--accent-glow) / .26); } }
body.stories-open { overflow: hidden; }
.story-dialog { padding: 0; border: 0; width: min(470px, calc(100vw - 48px)); height: min(790px, calc(100dvh - 48px)); max-height: none; max-width: none; border-radius: 25px; background: #142c23; color: #fff6e4; overflow: hidden; box-shadow: 0 24px 85px rgb(0 18 12 / 42%); }
.story-dialog::backdrop { background: rgb(8 22 16 / 83%); }
.story-dialog[open] { display: grid; grid-template-rows: auto minmax(0,1fr) auto; animation: story-open .24s var(--ease); }
@keyframes story-open { from { opacity: .4; transform: scale(.97); } to { opacity: 1; transform: none; } }
.story-viewer-header { padding: 14px 16px 9px; background: #18362a; }
.story-progress { display: flex; gap: 5px; height: 3px; margin-bottom: 10px; }
.story-progress span { flex: 1; height: 3px; border-radius: 3px; background: #708276; overflow: hidden; }
.story-progress i { display: block; height: 100%; background: #fff6e4; transform: scaleX(0); transform-origin: left center; }
.story-toolbar { display: flex; align-items: center; gap: 9px; }
.story-toolbar h2 { flex: 1; font-size: 18px; line-height: 1.25; letter-spacing: -.015em; }
.story-control { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 44px; height: 44px; padding: 10px; color: #fff6e4; border-radius: 12px; background: #ffffff12; font-size: 13px; }
.story-control:hover { background: #ffffff23; }
.story-control:disabled { opacity: .4; cursor: default; }
.story-control svg { width: 20px; height: 20px; }
.story-stage { position: relative; min-height: 0; background: radial-gradient(ellipse at 30% 10%,#294536,#10291f); display: grid; place-items: center; overflow: hidden; touch-action: pan-y; }
.story-stage img, .story-stage video { display: block; width: 100%; height: 100%; min-height: 0; object-fit: var(--story-fit,cover); object-position: var(--story-focal,50% 50%); }
.story-stage video { background: #10291f; }
.story-stage[aria-busy=true]::before { content: "Загружаем…"; position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; background: #19342a; color: #e8efdf; font-size: 15px; pointer-events: none; }
.story-error { padding: 28px; text-align: center; font-size: 17px; }
.story-footer { background: linear-gradient(145deg,#1c3c2e,#183126); padding: 17px 20px 16px; max-height: 55dvh; overflow-y: auto; }
.story-caption { font-size: 17px; line-height: 1.45; min-height: 2.9em; margin-bottom: 15px; }
.story-footer .button { width: 100%; justify-content: space-between; min-height: 50px; padding: 14px 20px; }
.story-navigation { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.story-counter { font-size: 12px; color: #dfebda; }
.story-navigation .story-control { padding: 10px 13px; }
.story-dialog :focus-visible { outline: 3px solid #ffe0ab; outline-offset: 2px; box-shadow: none !important; }
.story-dialog .button:focus-visible { outline-color: #fff6e4; }
@media(max-width:700px) {
 .stories-section { padding-top: 27px; padding-bottom: 2px; }
 .stories-heading { display: block; margin-bottom: 18px; }
 .stories-heading h2 { font-size: 25px; }
 .stories-heading p { font-size: 14px; margin-top: 8px; }
 .stories-meta { text-align: left; }
 .stories-social { justify-content: flex-start; }
 .stories-strip { gap: 17px; margin-right: -22px; padding-right: 22px; }
 .story-circle { flex-basis: 80px; font-size: 13px; gap: 8px; }
 .story-circle img { width: 76px; height: 76px; border-width: 3px; }
 .story-circle-ring { padding: 2.5px; }
 .story-dialog { width: 100vw; height: 100dvh; margin: 0; border-radius: 0; }
 .story-viewer-header { padding-top: max(12px,env(safe-area-inset-top)); }
 .story-footer { padding: 15px 20px max(13px,env(safe-area-inset-bottom)); }
 .story-caption { font-size: 16px; }
 .story-navigation { margin-top: 10px; }
}
@media(prefers-reduced-motion:reduce) { .story-dialog[open],.story-circle-ring { animation: none; transition: none; } }
html[data-reduced=true] .story-dialog[open],html[data-reduced=true] .story-circle-ring { animation: none; transition: none; }
