/* Лента ФАЯНСа: сторис, композер, посты, просмотрщики. Префикс .sf- */
.sf [hidden], .sf-layer [hidden], .sf-mk [hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sf { max-width: 1120px; }
.sf-head { padding: 24px 0 8px; border-bottom: 1px solid var(--rule); margin-bottom: 0; }
.sf-title { font-size: clamp(44px, 7vw, 92px); line-height: .95; }
.sf-lead { color: var(--ink-2); max-width: 560px; margin: 18px 0 28px; font-size: 16px; }
.sf-head--vlog { display: grid; grid-template-columns: auto 1fr; gap: 8px 28px; align-items: center; padding-bottom: 28px; }
.sf-head--vlog .kit-ava { border: 1px solid var(--brass); box-shadow: 0 0 0 6px var(--porcelain), 0 0 0 7px var(--rule); }
.sf-head--vlog .eyebrow { margin-bottom: 12px; }
.sf-head--vlog .sf-title { font-size: clamp(38px, 6vw, 72px); }
.sf-vlog__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font-size: 13px; color: var(--mute); }
.sf-vlog__meta a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--brass); }

/* ---------- сторис ---------- */
.sf-stories { border-bottom: 1px solid var(--rule); }
.sf-stories__track { display: flex; gap: 18px; overflow-x: auto; padding: 22px 0 18px; scrollbar-width: none; scroll-snap-type: x proximity; }
.sf-stories__track::-webkit-scrollbar { display: none; }
.sf-ring { flex: none; display: grid; justify-items: center; gap: 8px; width: 76px; background: none; border: 0; padding: 0; scroll-snap-align: start; position: relative; }
.sf-ring__o { width: 72px; height: 72px; border-radius: 50%; padding: 2px; display: grid; place-items: center; background: var(--rule); transition: transform .4s var(--ease); }
.sf-ring:hover .sf-ring__o { transform: scale(1.05); }
.sf-ring.is-unseen .sf-ring__o { background: conic-gradient(from 210deg, var(--brass), var(--brass-hi), #8A6A2B, var(--brass)); animation: sfSpin 6s linear infinite paused; }
.sf-ring.is-unseen:hover .sf-ring__o { animation-play-state: running; }
.sf-ring__o > * { width: 100% !important; height: 100% !important; border: 3px solid var(--porcelain) !important; box-sizing: border-box; }
.sf-ring__o .kit-ava { border: 0; }
.sf-ring__n { font-size: 11.5px; max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.sf-ring.is-unseen .sf-ring__n { color: var(--ink); font-weight: 600; }
.sf-ring__plus { position: absolute; right: 2px; top: 50px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--porcelain); display: grid; place-items: center; font: 500 16px/1 var(--sans); box-shadow: 0 0 0 2px var(--porcelain); }
.sf-ring--add .sf-ring__o { background: none; border: 1px dashed var(--brass); }
.sf-ring--add .sf-ring__o > span { border: 0 !important; display: grid; place-items: center; }
.sf-ring--add .kit-ava { opacity: .75; }
.sf-stories__empty { align-self: center; font: italic 400 17px var(--serif); color: var(--mute); padding-left: 4px; }
@keyframes sfSpin { to { filter: hue-rotate(0deg); transform: rotate(360deg); } }

/* ---------- сетка ---------- */
.sf-grid { display: grid; grid-template-columns: minmax(0, 640px) 300px; gap: 56px; justify-content: space-between; padding-top: 36px; }
.sf-main { min-width: 0; }
.sf-aside { position: sticky; top: 84px; align-self: start; display: grid; gap: 24px; }
.sf-note { border-top: 1px solid var(--ink); padding-top: 18px; }
.sf-note ol { margin: 0; padding: 0; list-style: none; counter-reset: n; display: grid; gap: 12px; }
.sf-note li { counter-increment: n; display: grid; grid-template-columns: 26px 1fr; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.sf-note li::before { content: counter(n, upper-roman); font: italic 500 16px/1.3 var(--serif); color: var(--brass); }
.sf-mine { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.sf-mine b { display: block; font: 500 22px/1.1 var(--serif); }
.sf-mine small { color: var(--mute); font-size: 12px; }

/* ---------- композер ---------- */
.sf-composer, .sf-guest { background: var(--paper); border: 1px solid var(--rule); padding: 20px; margin-bottom: 28px; display: grid; gap: 14px; }
.sf-guest { grid-template-columns: 1fr auto; align-items: center; }
.sf-guest p { margin: 0; font: italic 400 19px/1.35 var(--serif); }
.sf-composer__top { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; }
.sf-composer textarea { width: 100%; resize: none; min-height: 72px; border: 0; border-bottom: 1px solid var(--rule); background: transparent; color: var(--ink); font: 400 20px/1.4 var(--serif); padding: 6px 0 10px; }
.sf-composer textarea:focus { outline: none; border-color: var(--brass); }
.sf-composer__opts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.sf-pickers { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-select select { height: 36px; max-width: 100%; border: 1px solid var(--rule); border-radius: 999px; background: transparent; color: var(--ink); font: 400 13px var(--sans); padding: 0 32px 0 14px; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--mute) 50%), linear-gradient(135deg, var(--mute) 50%, transparent 50%);
  background-position: calc(100% - 17px) 15px, calc(100% - 12px) 15px; background-size: 5px 5px; background-repeat: no-repeat; }
.sf-select select option { background: var(--paper); color: var(--ink); }
.sf-select { max-width: 100%; min-width: 0; }
.sf-rate { display: grid; grid-template-columns: auto 1fr 44px; gap: 14px; align-items: center; font-size: 13px; }
.sf-rate__toggle { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.sf-rate input[type=checkbox], .sf-guest input { accent-color: var(--brass); }
.sf-rate input[type=range] { accent-color: var(--brass); width: 100%; }
.sf-rate input[type=range]:disabled { opacity: .3; }
.sf-rate output { font: 500 26px/1 var(--serif); text-align: right; color: var(--brass); }
.sf-composer__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sf-count { font-size: 12px; color: var(--mute); font-variant-numeric: tabular-nums; }
.sf-count.is-warn { color: var(--rose); }
.sf-send { height: 44px; padding: 0 24px; }
.sf-send:disabled { opacity: .5; pointer-events: none; }
.sf-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.sf-thumbs:empty { display: none; }
.sf-thumb { position: relative; width: 84px; height: 84px; }
.sf-thumb img { width: 100%; height: 100%; object-fit: cover; border: 1px solid var(--rule); display: block; }
.sf-thumb button { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--ink); color: var(--porcelain); font-size: 15px; line-height: 1; }

/* ---------- вкладки ---------- */
.sf-tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--rule); margin-bottom: 4px; }
.sf-tabs button { background: none; border: 0; padding: 12px 0; font: 500 24px/1 var(--serif); color: var(--mute); border-bottom: 1px solid transparent; margin-bottom: -1px; transition: color .3s, border-color .3s; }
.sf-tabs button.is-on { color: var(--ink); border-color: var(--brass); }
.sf-tabs button:hover { color: var(--ink); }

/* ---------- пост ---------- */
.sf-post { padding: 28px 0; border-bottom: 1px solid var(--rule); animation: fadeUp .6s var(--ease) both; }
.sf-post__h { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.sf-post__who { min-width: 0; }
.sf-post__who a { text-decoration: none; }
.sf-post__name { font: 600 15px/1.2 var(--sans); }
.sf-post__name:hover { color: var(--brass); }
.sf-post__sub { font-size: 12px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-post__del, .sf-c__del { background: none; border: 0; color: var(--mute); font-size: 12px; padding: 4px 0; border-bottom: 1px solid transparent; }
.sf-post__del:hover, .sf-c__del:hover { color: var(--rose); border-color: var(--rose); }
.sf-post__text { margin: 16px 0 0; font: 400 19px/1.5 var(--serif); white-space: pre-wrap; overflow-wrap: anywhere; }
.sf-post__text.is-long { display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.sf-more-text { background: none; border: 0; padding: 4px 0 0; font-size: 13px; color: var(--brass); }
.sf-photos { display: grid; gap: 4px; margin-top: 16px; grid-template-columns: 1fr 1fr; }
.sf-photos button { padding: 0; border: 0; background: var(--porcelain-2); overflow: hidden; aspect-ratio: 1; display: block; }
.sf-photos img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease); }
.sf-photos button:hover img { transform: scale(1.03); }
.sf-photos--1 { grid-template-columns: 1fr; }
.sf-photos--1 button { aspect-ratio: 4 / 3; }
.sf-photos--3 button:first-child { grid-row: span 2; aspect-ratio: auto; }
.sf-chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; max-width: 100%; padding: 6px 14px 6px 10px; border: 1px solid var(--rule); border-radius: 999px; text-decoration: none; font-size: 13px; transition: border-color .3s; }
.sf-chip:hover { border-color: var(--brass); }
.sf-chip svg { width: 14px; height: 14px; flex: none; color: var(--brass); }
.sf-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-chip b { font: 500 15px/1 var(--serif); color: var(--brass); padding-left: 8px; border-left: 1px solid var(--rule); white-space: nowrap; }
.sf-acts { display: flex; gap: 22px; align-items: center; margin-top: 16px; }
.sf-act { display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; padding: 4px 0; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sf-act svg { width: 20px; height: 20px; transition: transform .4s var(--ease); }
.sf-act:hover { color: var(--ink); }
.sf-like.is-on { color: var(--brass); }
.sf-like.is-on svg path { fill: var(--brass); stroke: var(--brass); }
.sf-like.is-pop svg { animation: sfPop .55s var(--ease); }
@keyframes sfPop { 0% { transform: scale(1); } 30% { transform: scale(1.45) rotate(-10deg); } 60% { transform: scale(.9); } 100% { transform: scale(1); } }
.sf-like { position: relative; }
.sf-like i { position: absolute; left: 10px; top: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--brass-hi); pointer-events: none; animation: sfSpark .7s var(--ease) forwards; }
@keyframes sfSpark { from { transform: translate(0, 0) scale(1); opacity: 1; } to { transform: translate(var(--x), var(--y)) scale(.2); opacity: 0; } }

/* ---------- комментарии ---------- */
.sf-cs { margin-top: 14px; border-left: 1px solid var(--brass); padding-left: 16px; display: grid; gap: 14px; }
.sf-c { display: grid; grid-template-columns: auto 1fr; gap: 10px; font-size: 14px; }
.sf-c__body { min-width: 0; }
.sf-c__body p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); }
.sf-c__meta { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.sf-c__meta a { font-weight: 600; text-decoration: none; }
.sf-c__meta small { color: var(--mute); font-size: 11.5px; }
.sf-c-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.sf-c-form textarea { width: 100%; resize: none; border: 0; border-bottom: 1px solid var(--rule); background: transparent; color: var(--ink); font: 400 15px/1.4 var(--sans); padding: 6px 0; min-height: 34px; }
.sf-c-form textarea:focus { outline: none; border-color: var(--brass); }
.sf-c-form button { height: 34px; padding: 0 16px; font-size: 13px; }
.sf-c__empty { margin: 0; font: italic 400 16px var(--serif); color: var(--mute); }

.sf-ghost { background: none; border: 1px solid var(--rule); border-radius: 999px; height: 44px; padding: 0 26px; font-size: 13px; letter-spacing: .04em; color: var(--ink); transition: border-color .3s; }
.sf-ghost:hover { border-color: var(--ink); }
.sf-more { display: grid; place-items: center; padding: 32px 0; }
.sf-empty { padding: 56px 0; text-align: center; }
.sf-empty h3 { font-size: 34px; margin-bottom: 10px; }
.sf-empty p { color: var(--mute); margin: 0 auto 22px; max-width: 420px; }
.sf-empty .btn { height: 44px; }
.sf-skel { height: 180px; border-bottom: 1px solid var(--rule); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--porcelain-2) 70%, transparent), transparent) 0 0 / 200% 100%; animation: sfShim 1.4s linear infinite; }
@keyframes sfShim { to { background-position: -200% 0; } }

/* ---------- полноэкранные слои ---------- */
.sf-layer { position: fixed; inset: 0; z-index: 130; background: #08090A; color: #F4F1EA; display: grid; place-items: center; animation: sfIn .35s var(--ease); touch-action: none; }
@keyframes sfIn { from { opacity: 0; } }
.sf-layer button { color: inherit; }
.sf-x { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; width: 44px; height: 44px; border: 0; background: none; font-size: 30px; line-height: 1; z-index: 3; }

/* лайтбокс */
.sf-lb img { max-width: 100vw; max-height: 100vh; max-height: 100dvh; object-fit: contain; user-select: none; }
.sf-lb__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(244, 241, 234, .25); background: rgba(8, 9, 10, .4); font-size: 22px; }
.sf-lb__nav--p { left: 16px; } .sf-lb__nav--n { right: 16px; }
.sf-lb__n { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); font-size: 12px; letter-spacing: .2em; color: rgba(244, 241, 234, .6); }

/* просмотрщик сторис */
.sf-sv__stage { position: relative; width: min(100vw, calc(100dvh * 9 / 16)); height: 100dvh; max-height: 100vh; background: #000; overflow: hidden; user-select: none; -webkit-user-select: none; transition: transform .2s; }
.sf-sv__stage img.sf-sv__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; pointer-events: none; }
.sf-sv__stage::before, .sf-sv__stage::after { content: ""; position: absolute; left: 0; right: 0; z-index: 1; pointer-events: none; }
.sf-sv__stage::before { top: 0; height: 140px; background: linear-gradient(rgba(0, 0, 0, .55), transparent); }
.sf-sv__stage::after { bottom: 0; height: 220px; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); }
.sf-sv__bars { position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 10px; right: 10px; display: flex; gap: 4px; z-index: 2; }
.sf-sv__bars i { flex: 1; height: 2px; background: rgba(255, 255, 255, .3); overflow: hidden; border-radius: 2px; }
.sf-sv__bars i b { display: block; height: 100%; width: 100%; background: #F4F1EA; transform-origin: left; transform: scaleX(0); }
.sf-sv__head { position: absolute; top: calc(24px + env(safe-area-inset-top)); left: 12px; right: 60px; display: flex; gap: 10px; align-items: center; z-index: 2; font-size: 13px; }
.sf-sv__head a { color: #F4F1EA; text-decoration: none; font-weight: 600; }
.sf-sv__head small { color: rgba(244, 241, 234, .65); }
.sf-sv__x { top: calc(16px + env(safe-area-inset-top)); }
.sf-sv__foot { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 18px calc(22px + env(safe-area-inset-bottom)); z-index: 2; display: grid; gap: 12px; }
.sf-sv__cap { margin: 0; font: italic 400 24px/1.25 var(--serif); text-shadow: 0 1px 12px rgba(0, 0, 0, .4); overflow-wrap: anywhere; }
.sf-sv__chip { justify-self: start; display: inline-flex; gap: 8px; align-items: center; padding: 6px 14px; border-radius: 999px; background: rgba(244, 241, 234, .14); backdrop-filter: blur(8px); font-size: 12px; color: #F4F1EA; text-decoration: none; }
.sf-sv__chip svg { width: 13px; height: 13px; color: #E2C88F; }
.sf-sv__own { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; }
.sf-sv__own button { background: none; border: 0; padding: 4px 0; border-bottom: 1px solid rgba(244, 241, 234, .3); font-size: 13px; }
.sf-sv__paused { position: absolute; inset: 0; z-index: 1; display: none; place-items: center; font: 11px/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: rgba(244, 241, 234, .7); pointer-events: none; }
.sf-sv.is-paused .sf-sv__paused { display: grid; }
.sf-sv__viewers { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; max-height: 60%; overflow: auto; background: rgba(12, 12, 14, .94); backdrop-filter: blur(10px); padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(244, 241, 234, .15); animation: fadeUp .35s var(--ease); }
.sf-sv__viewers h4 { margin: 0 0 14px; font: 500 22px var(--serif); }
.sf-sv__viewers ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sf-sv__viewers li { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.sf-sv__viewers a { color: #F4F1EA; text-decoration: none; }
@media (hover: hover) and (min-width: 700px) {
  .sf-sv__side { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(244, 241, 234, .25); background: none; font-size: 20px; }
  .sf-sv__side--p { left: calc(50% - min(50vw, 100dvh * 9 / 32) - 72px); }
  .sf-sv__side--n { right: calc(50% - min(50vw, 100dvh * 9 / 32) - 72px); }
}
@media not ((hover: hover) and (min-width: 700px)) { .sf-sv__side { display: none; } }

/* создание сторис */
.sf-mk { position: fixed; inset: 0; z-index: 125; display: grid; place-items: center; padding: 16px; }
.sf-mk__veil { position: absolute; inset: 0; background: rgba(10, 10, 12, .6); backdrop-filter: blur(4px); }
.sf-mk__box { position: relative; width: min(420px, 100%); max-height: calc(100dvh - 32px); overflow: auto; background: var(--porcelain); border: 1px solid var(--rule); padding: 28px 24px 24px; display: grid; gap: 16px; animation: fadeUp .45s var(--ease); }
.sf-mk__box h3 { font-size: 32px; }
.sf-mk__shot { aspect-ratio: 9 / 16; max-height: 46vh; width: auto; justify-self: center; height: 46vh; border: 1px dashed var(--brass); display: grid; place-items: center; background: var(--paper); overflow: hidden; position: relative; }
.sf-mk__shot img { width: 100%; height: 100%; object-fit: cover; }
.sf-mk__shot .kit-photo { background: var(--porcelain); }
.sf-mk__shot.has-img .kit-photo { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.sf-mk__box input[type=text] { width: 100%; font: 400 19px var(--serif); color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--rule); padding: 6px 0; }
.sf-mk__box input[type=text]:focus { outline: none; border-color: var(--brass); }
.sf-mk__box .sf-select select { width: 100%; }
.sf-mk__foot { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.sf-mk__foot .btn { height: 44px; }

/* ---------- адаптив ---------- */
@media (max-width: 960px) {
  .sf-grid { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 24px; }
  .sf-aside { position: static; order: 2; margin-top: 24px; }
}
@media (max-width: 560px) {
  .kit-page.sf { padding-top: 76px; padding-bottom: 110px; }
  .sf-head--vlog { grid-template-columns: 1fr; }
  .sf-stories { margin: 0 calc(var(--gutter) * -1); }
  .sf-stories__track { gap: 12px; padding-left: var(--gutter); padding-right: var(--gutter); }
  .sf-ring { width: 68px; } .sf-ring__o { width: 64px; height: 64px; } .sf-ring__plus { top: 44px; }
  .sf-composer, .sf-guest { padding: 16px; margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); border-left: 0; border-right: 0; }
  .sf-guest { grid-template-columns: 1fr; }
  .sf-composer__opts { display: grid; }
  .sf-select select { width: 100%; }
  .sf-rate { grid-template-columns: 1fr 44px; }
  .sf-rate__toggle { grid-column: 1 / -1; }
  .sf-post__text { font-size: 18px; }
  .sf-photos { margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); }
  .sf-lb__nav { display: none; }
}
