/* INBIZ Clips — UI: Stories rail, video hub, player с provider switcher, story viewer.
 * Все классы префиксуются .ic- чтобы не задеть kava-child / inbiz-blog.
 * Цветовые переменные либо берутся из inbiz-blog tokens (если рендеримся внутри .inbiz-blog),
 * либо fallback на хардкод.
 */

/* ─── Archive-templates utility-классы (вынесено из inline-style) ─── */
.inbiz-clips .ic-archive-wrap    { padding: 40px 0; }
.inbiz-clips .ic-archive-h1      { font-weight: 800; font-size: 32px; letter-spacing: -0.02em; margin: 0 0 8px; }
.inbiz-clips .ic-archive-lede    { color: var(--ic-text-3); margin: 0 0 32px; }
.inbiz-clips .ic-empty-text      { color: var(--ic-text-3); }
.inbiz-clips .ic-crumbs-row      { background: #fff; border-bottom: 1px solid var(--ic-border); padding: 12px 0; }
.inbiz-clips .ic-crumbs-nav      { font-size: 13px; color: var(--ic-text-3); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inbiz-clips .ic-crumbs-link     { color: var(--ic-text-2); }
.inbiz-clips .ic-crumbs-current  { color: var(--ic-text); font-weight: 500; }
.inbiz-clips .ic-avatar-round-28 { width: 28px; height: 28px; border-radius: 50%; background-size: cover; background-position: center; }
.inbiz-clips .ic-faded-50        { opacity: .5; }
.inbiz-clips .ic-faded-80        { opacity: .8; }
.inbiz-clips .ic-pulse-dot-6     { width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.inbiz-clips .ic-text-dark-fade  { color: rgba(255,255,255,.7); margin: 6px 0 0; font-size: 14px; }
.inbiz-clips .ic-link-on-dark    { color: #fff; opacity: .8; font-size: 13px; font-weight: 600; }

/* ─── Video-player single-page utility-классы ─── */
.inbiz-clips .ic-vp-action-btn   { background: #fff; border: 1px solid var(--ic-border); padding: 8px 14px; }
.inbiz-clips .ic-vp-side-h       { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.inbiz-clips .ic-vp-side-sub     { font-size: 12px; color: var(--ic-text-2); margin-bottom: 12px; }
.inbiz-clips .ic-vp-side-cta     { display: block; text-align: center; padding: 10px 14px; font-size: 14px; }

.inbiz-clips {
  --ic-blue: #2D5BFF;
  --ic-blue-50: #EEF2FF;
  --ic-violet: #7C3AED;
  --ic-ink: #1A1A2E;
  --ic-ink-2: #0F0F1F;
  --ic-bg: #F4F6FA;
  --ic-text: #1A1A2E;
  --ic-text-2: #5A5A6E;
  --ic-text-3: #8B8B9E;
  --ic-border: #E4E7EE;
  --ic-surface-soft: #F8FAFC;
  --ic-success: #1FAB6F;
  --ic-live: #FF3D5A;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ic-text);
  box-sizing: border-box;
}
.inbiz-clips *, .inbiz-clips *::before, .inbiz-clips *::after { box-sizing: border-box; }
.inbiz-clips a { color: inherit; text-decoration: none; }
.inbiz-clips button { font-family: inherit; cursor: pointer; }

/* ─── Stories rail (горизонтальный скролл) ─────────────────────────── */
.ic-rail { padding: 28px 0; }
.ic-rail-compact { padding: 20px 0; }
.ic-rail-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.ic-rail-title { margin: 0; font-weight: 800; font-size: 22px; letter-spacing: -0.01em; }
.ic-rail-all { color: var(--ic-blue); font-size: 13px; font-weight: 600; }
.ic-rail-track {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.ic-rail-track::-webkit-scrollbar { height: 6px; }
.ic-rail-track::-webkit-scrollbar-thumb { background: var(--ic-border); border-radius: 3px; }
.ic-story-cell {
  flex-shrink: 0; width: 100px; cursor: pointer; user-select: none;
  background: none; border: none; padding: 0; text-align: center;
}
.ic-story-cell-compact { width: 80px; }
.ic-story-cover {
  width: 100%; aspect-ratio: 100/130; border-radius: 14px;
  position: relative; overflow: hidden; margin-bottom: 6px;
  background-size: cover; background-position: center;
}
.ic-story-cover-grad {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.05) 50%, rgba(0,0,0,.85) 100%);
}
.ic-story-cover-unviewed {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ic-blue);
}
.ic-story-cover-viewed { outline: 2px solid var(--ic-border); }
.ic-story-add {
  width: 100%; aspect-ratio: 100/130; border-radius: 14px;
  background: var(--ic-surface-soft); border: 2px dashed #D5D9E2;
  display: grid; place-items: center; color: var(--ic-text-3); font-size: 28px;
  margin-bottom: 6px;
}
.ic-story-label {
  position: absolute; bottom: 6px; left: 6px; right: 6px;
  color: #fff; font-size: 11px; font-weight: 600; line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0,0,0,.5); text-align: left;
}
.ic-story-author {
  position: absolute; top: 6px; left: 6px;
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff;
  background-size: cover; background-position: center;
}
.ic-story-count {
  position: absolute; top: 6px; right: 6px;
  font-size: 9px; color: #fff; background: rgba(0,0,0,.5);
  padding: 1px 5px; border-radius: 4px; backdrop-filter: blur(4px);
}
.ic-story-new {
  position: absolute; top: 6px; right: 6px;
  background: var(--ic-live); color: #fff; font-size: 9px; font-weight: 700;
  padding: 2px 6px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em;
}
.ic-story-text {
  font-size: 11px; color: var(--ic-text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ic-story-text-author { font-weight: 600; color: var(--ic-text-2); }

/* ─── Video card (16:9) ─────────────────────────────── */
.ic-video-card {
  display: block; background: #fff; border-radius: 14px;
  overflow: hidden; box-shadow: 0 1px 0 rgba(20,24,40,.02), 0 8px 28px rgba(20,24,40,.06);
  transition: transform .2s, box-shadow .2s;
}
.ic-video-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(20,24,40,.08), 0 24px 48px rgba(20,24,40,.08); }
.ic-video-cover { position: relative; aspect-ratio: 16/9; background-size: cover; background-position: center; }
.ic-video-cover-grad { position: absolute; inset: 0; opacity: 0; transition: opacity .2s; background: rgba(0,0,0,.25); display: grid; place-items: center; }
.ic-video-card:hover .ic-video-cover-grad { opacity: 1; }
.ic-video-play {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,.95); display: grid; place-items: center;
  color: var(--ic-blue); font-size: 22px; line-height: 1;
}
.ic-video-duration {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(0,0,0,.85); color: #fff; padding: 3px 8px;
  border-radius: 4px; font-size: 12px; font-weight: 600;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.ic-video-live {
  position: absolute; top: 10px; left: 10px;
  background: var(--ic-live); color: #fff; padding: 4px 10px;
  border-radius: 6px; font-size: 11px; font-weight: 800; letter-spacing: .05em;
  display: inline-flex; align-items: center; gap: 6px;
}
.ic-video-live-dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: ic-pulse 1s infinite; }
@keyframes ic-pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }
.ic-video-pro {
  position: absolute; top: 10px; right: 10px;
  background: linear-gradient(135deg, #FFB94D, #FF8A3D);
  color: #fff; font-size: 10px; font-weight: 800;
  padding: 3px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em;
}
.ic-video-body { padding: 16px; display: flex; gap: 12px; }
.ic-video-avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; background-size: cover; background-position: center; }
.ic-video-info { flex: 1; min-width: 0; }
.ic-video-title {
  margin: 0 0 6px; font-size: 15px; font-weight: 700; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ic-video-meta { font-size: 12px; color: var(--ic-text-3); }
.ic-video-author { font-weight: 600; color: var(--ic-text-2); }

/* watch progress bar over card */
.ic-video-progress { position: absolute; bottom: 0; left: 0; height: 4px; background: var(--ic-blue); }

/* ─── Reel card (9:16) ─────────────────────────────── */
.ic-reel-card {
  position: relative; aspect-ratio: 9/16;
  border-radius: 14px; overflow: hidden;
  background-size: cover; background-position: center;
  display: block;
}
.ic-reel-card-grad {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,.85) 100%);
}
.ic-reel-views {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,.6); backdrop-filter: blur(10px);
  color: #fff; font-size: 11px; padding: 3px 8px; border-radius: 999px;
  font-weight: 600;
}
.ic-reel-body { position: absolute; bottom: 0; left: 0; right: 0; padding: 14px; color: #fff; }
.ic-reel-author-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 11px; }
.ic-reel-avatar { width: 18px; height: 18px; border-radius: 50%; background-size: cover; background-position: center; }
.ic-reel-title { font-size: 13px; font-weight: 700; line-height: 1.25; margin-bottom: 6px; }
.ic-reel-meta { font-size: 11px; opacity: .9; }

/* ─── Video hub (sub-nav + sections) ─────────────────────────────── */
.ic-subnav {
  background: #0F0F1F;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.ic-subnav-row {
  display: flex; align-items: center; gap: 24px;
  padding: 14px 32px; max-width: 1280px; margin: 0 auto;
  color: #fff;
}
.ic-subnav-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.ic-subnav-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, #FF3D5A, var(--ic-violet));
  display: grid; place-items: center; font-size: 14px; line-height: 1;
}
.ic-subnav-title {
  font-family: 'Manrope', sans-serif;
  font-weight: 800; font-size: 18px; letter-spacing: -0.01em;
}
.ic-subnav-sub { color: rgba(255,255,255,.5); font-size: 12px; }

/* Search input */
.ic-subnav-search {
  flex: 1; max-width: 480px; margin-left: auto;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 6px 6px 16px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
}
.ic-subnav-search-icon { font-size: 14px; opacity: .7; line-height: 1; }
.ic-subnav-search input {
  flex: 1; border: none; outline: none; background: transparent;
  color: #fff; font-family: inherit; font-size: 14px; padding: 8px 0;
}
.ic-subnav-search input::placeholder { color: rgba(255,255,255,.4); }

/* CTA «Подписаться на канал» */
.ic-subnav-cta {
  background: var(--ic-blue); color: #fff;
  padding: 8px 14px; border: none; border-radius: var(--ic-r-sm, 10px);
  font-family: inherit; font-weight: 600; font-size: 13px;
  cursor: pointer; white-space: nowrap; transition: background .15s;
}
.ic-subnav-cta:hover { background: #1E47E8; }

/* Tabs row */
.ic-subnav-tabs {
  display: flex; gap: 6px; overflow-x: auto;
  padding: 0 32px; max-width: 1280px; margin: 0 auto;
  scrollbar-width: none;
}
.ic-subnav-tabs::-webkit-scrollbar { display: none; }
.ic-subnav-tab {
  padding: 12px 18px; background: transparent;
  border: none; outline: none;
  color: rgba(255,255,255,.6); font-weight: 500; font-size: 14px;
  border-bottom: 2px solid transparent; white-space: nowrap;
  text-decoration: none; transition: color .15s, border-color .15s;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.ic-subnav-tab:hover { color: #fff; }
.ic-subnav-tab:focus { outline: none; }
.ic-subnav-tab:focus-visible { outline: 2px solid rgba(45,91,255,.5); outline-offset: -2px; border-radius: 4px; }
.ic-subnav-tab.is-active { color: #fff; font-weight: 700; border-bottom-color: var(--ic-blue); }

@media (max-width: 720px) {
  .ic-subnav-search { display: none; }
  .ic-subnav-cta { display: none; }
}

.ic-hub-hero {
  background: #0A0A18; padding: 32px 0 48px;
}
.ic-hub-hero-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.ic-hub-hero-feat {
  display: block; overflow: hidden; position: relative; color: #fff;
  background: #1a1a2e; border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
}
.ic-hub-hero-cover { aspect-ratio: 16/8; background-size: cover; background-position: center; position: relative; }
.ic-hub-hero-cover::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.85));
}
.ic-hub-hero-tag {
  position: absolute; top: 16px; left: 16px; z-index: 1;
  background: var(--ic-blue); color: #fff; padding: 5px 11px;
  border-radius: 6px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
}
.ic-hub-hero-body {
  position: absolute; bottom: 24px; left: 24px; right: 24px; z-index: 1;
}
.ic-hub-hero-title {
  font-weight: 800; font-size: 32px; line-height: 1.15;
  margin: 0 0 12px; color: #fff; letter-spacing: -0.015em;
}
.ic-hub-hero-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.ic-hub-play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%); width: 84px; height: 84px;
  border-radius: 50%; background: rgba(255,255,255,.95);
  display: grid; place-items: center;
  color: var(--ic-blue); font-size: 28px; line-height: 1;
  box-shadow: 0 16px 48px rgba(0,0,0,.4); z-index: 1;
}
.ic-hub-live-card {
  display: block; color: #fff; border-radius: 18px; overflow: hidden;
  position: relative; background: #1a1a2e;
}
.ic-hub-live-card-cover {
  aspect-ratio: 4/5; background-size: cover; background-position: center; position: relative;
}
.ic-hub-live-card-cover::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.4) 0%, rgba(0,0,0,.92) 100%);
}
.ic-hub-live-tag {
  position: absolute; top: 16px; left: 16px; z-index: 1;
  display: flex; align-items: center; gap: 8px;
}
.ic-hub-live-pill {
  background: var(--ic-live); padding: 5px 11px; border-radius: 6px;
  font-size: 11px; font-weight: 800; letter-spacing: .06em;
  display: inline-flex; align-items: center; gap: 6px;
}
.ic-hub-live-body {
  position: absolute; bottom: 20px; left: 20px; right: 20px; z-index: 1;
}
.ic-hub-live-eyebrow {
  font-size: 11px; color: rgba(255,255,255,.7);
  text-transform: uppercase; letter-spacing: .05em;
  font-weight: 700; margin-bottom: 6px;
}
.ic-hub-live-title { font-weight: 800; font-size: 19px; line-height: 1.2; margin: 0 0 12px; color: #fff; }

.ic-band-stories { background: #fff; border-bottom: 1px solid var(--ic-border); }
.ic-band-section { padding: 48px 0; }
.ic-band-bg { background: var(--ic-bg); }
.ic-band-dark { background: linear-gradient(180deg, #1a1a2e, #0a0a18); color: #fff; padding: 48px 0; }
.ic-band-section-row { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.ic-band-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.ic-band-title { margin: 0; font-weight: 800; font-size: 28px; letter-spacing: -0.015em; }
.ic-band-title-light { color: #fff; }
.ic-reels-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--ic-live), #FF8A3D);
  padding: 4px 10px; border-radius: 6px; color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: .05em; margin-bottom: 8px;
}

.ic-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.ic-grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }

@media (max-width: 1024px) {
  .ic-hub-hero-grid { grid-template-columns: 1fr; }
  .ic-grid-4 { grid-template-columns: repeat(3, 1fr); }
  .ic-grid-6 { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 720px) {
  .ic-grid-4 { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .ic-grid-6 { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .ic-hub-hero { padding: 20px 0 28px; }
  .ic-hub-hero-grid { padding: 0 16px; }
  .ic-hub-hero-title { font-size: 22px; }
  .ic-band-section-row { padding: 0 16px; }
  .ic-band-section { padding: 32px 0; }
  .ic-subnav-row, .ic-subnav-tabs { padding: 12px 16px; }
}

/* ─── Provider switcher (главная фишка) ─────────────────────────── */
.ic-provider-switch-wrap {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px; flex-wrap: wrap;
}
.ic-provider-switch-label {
  font-size: 12px; color: var(--ic-text-3);
  text-transform: uppercase; letter-spacing: .05em;
  font-weight: 700; margin-right: 4px;
}
.ic-provider-switch {
  display: inline-flex; gap: 0;
  background: var(--ic-surface-soft); padding: 4px;
  border-radius: 10px; border: 1px solid var(--ic-border);
}
.ic-provider-btn {
  padding: 8px 14px; display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: none; border-radius: 8px;
  color: var(--ic-text-3); font-weight: 500; font-size: 13px;
  cursor: pointer; font-family: inherit; transition: all .15s;
  white-space: nowrap;
}
.ic-provider-btn:hover { color: var(--ic-text); }
.ic-provider-btn.is-active {
  background: #fff; font-weight: 700;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
  color: var(--ic-active-color, var(--ic-blue));
}
.ic-provider-btn-icon { display: inline-flex; line-height: 0; }
.ic-provider-status {
  font-size: 12px; color: var(--ic-text-3);
  margin-left: auto; display: flex; align-items: center; gap: 6px;
}
.ic-provider-status-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ic-success);
}

/* ─── Player ─────────────────────────────── */
.ic-player {
  position: relative; aspect-ratio: 16/9;
  border-radius: 16px; overflow: hidden; background: #000;
}
.ic-player-vertical { aspect-ratio: 9/16; max-width: 420px; margin: 0 auto; }
.ic-player iframe, .ic-player video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0;
}
.ic-player-badge {
  position: absolute; top: 14px; left: 14px;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; background: rgba(0,0,0,.6);
  backdrop-filter: blur(10px); border-radius: 8px;
  color: #fff; font-size: 12px; font-weight: 700;
  z-index: 5; pointer-events: none;
}

/* ─── Single video page ─────────────────────────────── */
.ic-vp-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px;
  max-width: 1280px; margin: 0 auto; padding: 24px 32px 80px;
  align-items: flex-start;
}
.ic-vp-title { font-weight: 800; font-size: 28px; line-height: 1.2; letter-spacing: -0.015em; margin: 20px 0 12px; }
.ic-vp-meta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--ic-border); }
.ic-vp-author { display: flex; align-items: center; gap: 12px; }
.ic-vp-author-avatar { width: 44px; height: 44px; border-radius: 50%; background-size: cover; background-position: center; }
.ic-vp-actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.ic-vp-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--ic-border); margin: 24px 0; overflow-x: auto; }
.ic-vp-tab {
  padding: 12px 20px; background: transparent; border: none;
  border-bottom: 2px solid transparent; color: var(--ic-text-3);
  font-weight: 500; font-size: 14px; white-space: nowrap;
}
.ic-vp-tab.is-active { color: var(--ic-text); font-weight: 700; border-bottom-color: var(--ic-blue); }
.ic-vp-pane { display: none; }
.ic-vp-pane.is-active { display: block; }
.ic-vp-descr-card { background: var(--ic-surface-soft); padding: 20px; border-radius: 12px; font-size: 14px; line-height: 1.6; color: var(--ic-text-2); }
.ic-vp-chapters { display: grid; gap: 4px; margin-top: 12px; }
.ic-vp-chapter { display: flex; gap: 12px; color: var(--ic-blue); font-size: 13px; }
.ic-vp-chapter-time { font-family: 'JetBrains Mono', ui-monospace, monospace; min-width: 50px; }
.ic-vp-chapter-label { color: var(--ic-text); }

.ic-vp-rail-cta {
  background: linear-gradient(135deg, var(--ic-blue-50), #fff);
  border-radius: 14px; padding: 18px;
  border: 1px solid #DCE5FF;
}
.ic-vp-rail-eyebrow { font-size: 11px; color: var(--ic-blue); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; margin-bottom: 6px; }
.ic-vp-rail-list-head { display: flex; gap: 8px; padding: 12px 4px; align-items: center; border-bottom: 1px solid var(--ic-border); }
.ic-vp-rail-item { display: grid; grid-template-columns: 160px 1fr; gap: 10px; padding: 8px 0; }
.ic-vp-rail-item-cover { position: relative; aspect-ratio: 16/9; background-size: cover; background-position: center; border-radius: 10px; overflow: hidden; }
.ic-vp-rail-item-title { font-size: 13px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 4px; }
.ic-vp-rail-item-meta { font-size: 11px; color: var(--ic-text-3); }

@media (max-width: 1024px) {
  .ic-vp-grid { grid-template-columns: 1fr; padding: 16px 16px 60px; gap: 24px; }
}

/* ─── Story viewer (fullscreen) ─────────────────────────────── */
.ic-story-viewer {
  position: fixed; inset: 0; background: rgba(0,0,0,.95);
  z-index: 1000; display: flex; align-items: center; justify-content: center;
}

/* Desktop layout: 3-col grid 180/1fr/360 — как в pages/video.jsx */
@media (min-width: 1024px) {
  .ic-story-viewer .ic-story-shell {
    width: 1200px; max-width: 96vw; height: 760px; max-height: 92vh;
    background: #0a0a18; display: grid; grid-template-columns: 180px 1fr 360px;
    border-radius: 18px; overflow: hidden;
  }
  .ic-story-viewer .ic-story-stage {
    width: 405px; height: 720px; aspect-ratio: auto;
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08);
  }
  .ic-story-tap { display: none; } /* На desktop используем боковые превью + ‹/› */
}

.ic-story-shell {
  position: relative; display: flex; align-items: center; justify-content: center;
}
.ic-story-stage {
  position: relative; width: 100%; max-width: 420px; aspect-ratio: 9/16;
  background: #000; overflow: hidden; border-radius: 12px;
  background-size: cover; background-position: center;
}

/* Левый rail — список других историй (desktop) */
.ic-story-rail-side {
  display: none;
  background: #1a1a2e; padding: 20px 12px; overflow-y: auto;
  border-right: 1px solid rgba(255,255,255,.08);
}
@media (min-width: 1024px) { .ic-story-rail-side { display: block; } }
.ic-story-rail-side-eyebrow {
  font-size: 11px; color: rgba(255,255,255,.5); text-transform: uppercase;
  letter-spacing: .05em; font-weight: 700; margin-bottom: 16px; text-align: center;
}
.ic-story-rail-thumb {
  display: block; width: 92px; height: 130px; margin: 0 auto 14px;
  border-radius: 10px; position: relative; overflow: hidden;
  background-size: cover; background-position: center;
  cursor: pointer; outline: 1px solid rgba(255,255,255,.1);
}
.ic-story-rail-thumb.is-active { outline: 2px solid var(--ic-blue); }
.ic-story-rail-thumb-grad {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.85));
}
.ic-story-rail-thumb-label {
  position: absolute; bottom: 6px; left: 6px; right: 6px;
  color: #fff; font-size: 10px; font-weight: 600; line-height: 1.2;
}

/* Центральная сцена — radial-gradient фон */
.ic-story-center {
  position: relative; background: radial-gradient(circle at 50% 30%, #2a2a4e, #0a0a18);
  display: flex; align-items: center; justify-content: center; padding: 20px 0;
  flex: 1;
}

/* Side previews — соседние истории, полупрозрачные */
.ic-story-peek {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 140px; height: 250px; border-radius: 14px; overflow: hidden;
  cursor: pointer; opacity: .55; transition: opacity .2s;
  filter: blur(1px); background-size: cover; background-position: center;
  display: none;
}
@media (min-width: 1024px) { .ic-story-peek { display: block; } }
.ic-story-peek:hover { opacity: .8; }
.ic-story-peek-prev { left: 32px; }
.ic-story-peek-next { right: 32px; }
.ic-story-peek-grad {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.4), rgba(0,0,0,.85));
}
.ic-story-peek-label {
  position: absolute; bottom: 12px; left: 12px; right: 12px;
  color: #fff; font-size: 11px; font-weight: 600;
}
.ic-story-peek-next .ic-story-peek-label { text-align: right; }

/* ‹ / › круглые стеклянные кнопки — desktop */
.ic-story-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.12); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.2); color: #fff;
  font-size: 20px; cursor: pointer; z-index: 20;
  display: none; align-items: center; justify-content: center;
}
@media (min-width: 1024px) { .ic-story-arrow { display: flex; } }
.ic-story-arrow:disabled { opacity: .3; cursor: not-allowed; }
.ic-story-arrow-prev { left: 200px; }
.ic-story-arrow-next { right: 200px; }

/* CTA «Открыть бизнес ↗» — снаружи фрейма, по центру под ним (desktop) */
.ic-story-cta-outside {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 20; display: none;
}
@media (min-width: 1024px) { .ic-story-cta-outside { display: block; } }
.ic-story-cta-outside .ic-story-cta {
  background: #fff; color: var(--ic-blue); padding: 12px 24px;
  border: none; border-radius: 999px; font-size: 13px; font-weight: 700;
  cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.3);
}

/* Правый rail — комментарии (desktop) */
.ic-story-comments {
  display: none; background: #0f0f1f; padding: 20px; color: #fff;
  flex-direction: column; overflow-y: auto;
}
@media (min-width: 1024px) { .ic-story-comments { display: flex; } }
.ic-story-comments-eyebrow {
  font-size: 11px; color: rgba(255,255,255,.5); text-transform: uppercase;
  letter-spacing: .05em; font-weight: 700; margin-bottom: 12px;
}
.ic-story-progress-row {
  position: absolute; top: 12px; left: 12px; right: 12px;
  display: flex; gap: 4px; z-index: 10;
}
.ic-story-progress-bar {
  flex: 1; height: 3px; background: rgba(255,255,255,.3); border-radius: 2px; overflow: hidden;
}
.ic-story-progress-fill { height: 100%; background: #fff; width: 0; transition: width .2s linear; }
.ic-story-progress-bar.is-done .ic-story-progress-fill { width: 100% !important; }
.ic-story-progress-bar.is-active .ic-story-progress-fill { animation: ic-story-fill 5s linear forwards; }
@keyframes ic-story-fill { to { width: 100% } }

.ic-story-header {
  position: absolute; top: 28px; left: 16px; right: 16px;
  display: flex; align-items: center; gap: 10px;
  color: #fff; z-index: 10;
}
.ic-story-header-avatar { width: 36px; height: 36px; border-radius: 50%; border: 2px solid #fff; background-size: cover; }
.ic-story-header-name { font-weight: 700; font-size: 14px; }
.ic-story-header-time { font-size: 11px; opacity: .8; }
.ic-story-close {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.15); backdrop-filter: blur(10px);
  border: none; color: #fff; font-size: 20px; line-height: 1;
}
.ic-story-content {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; padding: 80px 24px 90px; color: #fff; z-index: 5;
}
.ic-story-content > div { text-align: center; max-width: 360px; }
.ic-story-cta-row {
  position: absolute; bottom: 16px; left: 16px; right: 16px;
  display: flex; gap: 10px; z-index: 10;
}
.ic-story-input {
  flex: 1; background: rgba(255,255,255,.15); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.25); color: #fff;
  padding: 12px 16px; border-radius: 999px; font-size: 14px; font-family: inherit;
}
.ic-story-input::placeholder { color: rgba(255,255,255,.7); }
.ic-story-cta {
  background: #fff; color: var(--ic-blue);
  padding: 12px 22px; border: none; border-radius: 999px;
  font-size: 13px; font-weight: 700; text-decoration: none;
}
/* Desktop: внутренний row CTA скрываем — остаётся только input + ♥ */
@media (min-width: 1024px) {
  .ic-story-cta-row .ic-story-cta:not(.ic-story-cta-outside .ic-story-cta) { display: none; }
  .ic-story-cta-row > .ic-story-cta { display: none; }
}
.ic-story-tap {
  position: absolute; top: 0; bottom: 0; width: 33%;
  z-index: 8; cursor: pointer; background: transparent; border: none;
}
.ic-story-tap-prev { left: 0; }
.ic-story-tap-next { right: 0; }
