/* Stories + HighLights module */
.profile-story-strip {
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid rgba(15,23,42,.08);
}
.story-circle,
.highlight-circle,
.highlight-empty-launch,
.story-empty-launch,
.story-add-mini {
  appearance:none;
  border:0;
  background:transparent;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  color:#111827;
  font-weight:800;
}
.story-circle img,
.story-video-thumb {
  width:66px;
  height:66px;
  border-radius:999px;
  object-fit:cover;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,#111827,#334155);
  color:#fff;
  border:3px solid #fff;
  outline:3px solid #ec4899;
  box-shadow:0 12px 30px rgba(236,72,153,.25);
}
.story-circle span:last-child,
.highlight-circle span:last-child,
.highlight-empty-launch span:last-child {
  font-size:12px;
  max-width:86px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.story-plus {
  width:66px;
  height:66px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:#111827;
  color:#fff;
  font-size:30px;
  border:3px solid #fff;
  outline:3px dashed rgba(236,72,153,.75);
  box-shadow:0 14px 30px rgba(15,23,42,.18);
}
.story-add-mini .story-plus { width:54px; height:54px; font-size:24px; }
.profile-left-sidebar-stack { display:flex; flex-direction:column; gap:16px; }
.profile-highlights-rail {
  overflow:hidden;
  border:1px solid rgba(15,23,42,.08);
  box-shadow:0 20px 55px rgba(15,23,42,.12);
  background:linear-gradient(180deg,#fff 0%,#fdf2f8 100%);
}
.profile-highlights-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:16px 16px 8px;
}
.profile-highlights-head h3 { margin:0; font-size:18px; }
.profile-highlights-head span { font-size:12px; color:#be185d; font-weight:900; text-transform:uppercase; letter-spacing:.05em; }
.profile-highlights-list {
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:12px 16px 18px;
  max-height:70vh;
  overflow:auto;
}
.highlight-circle img,
.highlight-video-thumb,
.highlight-empty-launch .story-plus {
  width:104px;
  height:104px;
  border-radius:999px;
  object-fit:cover;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,#0f172a,#7c3aed,#ec4899);
  color:#fff;
  border:4px solid #fff;
  outline:4px solid rgba(124,58,237,.55);
  box-shadow:0 18px 40px rgba(124,58,237,.25);
  margin:auto;
}
.highlight-circle { width:100%; padding:10px 0; border-radius:18px; }
.highlight-circle:hover { background:rgba(255,255,255,.7); }
.highlight-add-btn,
.story-primary-btn {
  border:0;
  border-radius:999px;
  background:#111827;
  color:#fff;
  font-weight:900;
  padding:11px 16px;
  cursor:pointer;
  box-shadow:0 12px 30px rgba(17,24,39,.22);
}
.highlight-add-btn { margin:0 16px 16px; width:calc(100% - 32px); }
.highlight-empty-copy { color:#64748b; font-size:14px; }
.story-settings-card,
.story-manage-panel {
  border:1px solid rgba(15,23,42,.08);
  box-shadow:0 18px 48px rgba(15,23,42,.08);
}
.story-settings-head {
  display:flex;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
}
.story-settings-head h2 { margin:0 0 6px; }
.story-settings-head p { margin:0; color:#64748b; }
.story-settings-form {
  display:grid;
  gap:12px;
  padding:16px;
  background:linear-gradient(135deg,#fff7ed 0%,#fdf2f8 50%,#eef2ff 100%);
  border-radius:22px;
  margin-bottom:18px;
}
.story-settings-toggle { display:flex; align-items:center; gap:10px; font-weight:800; }
.story-settings-form input[type="number"] {
  width:120px;
  border:1px solid rgba(15,23,42,.15);
  border-radius:12px;
  padding:10px 12px;
}
.story-settings-actions { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.story-settings-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}
.story-manage-panel {
  border-radius:22px;
  padding:16px;
  background:#fff;
}
.story-manage-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.story-manage-head h3 { margin:0; }
.story-manage-panel p { color:#64748b; margin:8px 0 14px; }
.story-manage-list { display:grid; gap:10px; max-height:360px; overflow:auto; padding-right:4px; }
.story-manage-item {
  display:grid;
  grid-template-columns:58px minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  padding:10px;
  border-radius:16px;
  background:#f8fafc;
}
.story-manage-thumb,
.story-manage-thumb img {
  width:52px;
  height:52px;
  border-radius:999px;
  object-fit:cover;
  display:grid;
  place-items:center;
  background:#111827;
  color:#fff;
  overflow:hidden;
}
.story-manage-item strong,
.story-manage-item small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.story-manage-item small { color:#64748b; }
.story-manage-item button {
  border:0;
  border-radius:999px;
  padding:8px 11px;
  background:#fee2e2;
  color:#991b1b;
  font-weight:900;
  cursor:pointer;
}
.story-manage-empty { padding:18px; border-radius:16px; background:#f8fafc; color:#64748b; }
.story-composer-overlay,
.story-viewer-overlay {
  position:fixed;
  inset:0;
  z-index:5000;
  display:none;
  align-items:center;
  justify-content:center;
  padding:22px;
  background:rgba(2,6,23,.78);
  backdrop-filter:blur(14px);
}
.story-composer-overlay.is-open,
.story-viewer-overlay.is-open { display:flex; }
.story-composer-dialog {
  position:relative;
  width:min(760px,100%);
  max-height:calc(100dvh - 34px);
  overflow:auto;
  border-radius:28px;
  padding:20px;
  background:linear-gradient(135deg,#ffffff 0%,#fff7ed 40%,#fdf2f8 100%);
  box-shadow:0 35px 90px rgba(0,0,0,.35);
}
.story-composer-close,
.story-viewer-close {
  position:absolute;
  top:12px;
  right:12px;
  width:42px;
  height:42px;
  border:0;
  border-radius:999px;
  background:#111827;
  color:#fff;
  font-size:24px;
  cursor:pointer;
  z-index:4;
}
.story-composer-title { margin:0 54px 8px 0; font-size:26px; }
.story-composer-subtitle { margin:0 0 16px; color:#64748b; }
.story-source-tabs { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px; }
.story-source-tab {
  border:0;
  border-radius:999px;
  padding:10px 14px;
  font-weight:900;
  background:#e5e7eb;
  cursor:pointer;
}
.story-source-tab.is-active { background:#111827; color:#fff; }
.story-source-panel { display:none; }
.story-source-panel.is-active { display:block; }
.story-source-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(92px,1fr));
  gap:10px;
  max-height:280px;
  overflow:auto;
  padding:6px;
  background:rgba(255,255,255,.65);
  border-radius:18px;
}
.story-source-choice {
  border:3px solid transparent;
  border-radius:18px;
  padding:4px;
  background:#fff;
  cursor:pointer;
  box-shadow:0 8px 20px rgba(15,23,42,.08);
}
.story-source-choice.is-selected { border-color:#ec4899; }
.story-source-choice img,
.story-source-video {
  width:100%;
  aspect-ratio:1/1;
  border-radius:14px;
  object-fit:cover;
  display:grid;
  place-items:center;
  background:#111827;
  color:#fff;
  font-size:26px;
}
.story-source-choice small { display:block; margin-top:5px; font-size:11px; color:#475569; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.story-upload-drop {
  border:2px dashed rgba(236,72,153,.55);
  border-radius:22px;
  padding:20px;
  background:#fff;
  text-align:center;
}
.story-upload-drop input { display:none; }
.story-upload-preview {
  min-height:170px;
  border-radius:20px;
  background:#f1f5f9;
  display:grid;
  place-items:center;
  overflow:hidden;
  margin-bottom:12px;
}
.story-upload-preview img,
.story-upload-preview video { width:100%; height:240px; object-fit:cover; }
.story-form-grid { display:grid; gap:12px; margin-top:14px; }
.story-form-grid textarea,
.story-form-grid input[type="date"] {
  width:100%;
  border:1px solid rgba(15,23,42,.14);
  border-radius:16px;
  padding:13px 14px;
  background:#fff;
  font:inherit;
}
.story-form-grid textarea { min-height:92px; resize:vertical; }
.story-error { color:#b91c1c; font-weight:900; min-height:20px; }
.story-progress { display:none; gap:8px; align-items:center; }
.story-progress.is-active { display:flex; }
.story-progress-track { flex:1; height:10px; background:#e5e7eb; border-radius:999px; overflow:hidden; }
.story-progress-fill { width:0; height:100%; background:linear-gradient(90deg,#ec4899,#7c3aed); }
.story-submit-row { display:flex; gap:10px; justify-content:flex-end; }
.story-viewer-dialog {
  position:relative;
  width:min(1120px,100%);
  height:min(860px,calc(100dvh - 32px));
  display:grid;
  grid-template-columns:minmax(0,1fr) 340px;
  border-radius:30px;
  overflow:hidden;
  background:#050816;
  color:#fff;
  box-shadow:0 40px 110px rgba(0,0,0,.5);
}
.story-media-stage { position:relative; display:grid; place-items:center; min-width:0; background:radial-gradient(circle at top,#1e293b,#020617); }
.story-media-stage img,
.story-media-stage video { width:100%; height:100%; object-fit:contain; max-height:100%; }
.story-top-message,
.highlight-bottom-message {
  position:absolute;
  left:18px;
  right:18px;
  z-index:2;
  background:rgba(15,23,42,.62);
  backdrop-filter:blur(10px);
  border-radius:18px;
  padding:12px 14px;
  font-weight:900;
  box-shadow:0 14px 30px rgba(0,0,0,.24);
}
.story-top-message { top:18px; }
.highlight-bottom-message { bottom:18px; display:grid; gap:8px; }
.highlight-marquee { overflow:hidden; white-space:nowrap; }
.highlight-marquee span { display:inline-block; min-width:100%; animation:storyMarquee 11s linear infinite; }
@keyframes storyMarquee { 0%{ transform:translateX(100%);} 100%{ transform:translateX(-100%);} }
.story-progress-dots {
  position:absolute;
  top:8px;
  left:18px;
  right:64px;
  display:flex;
  gap:6px;
  z-index:3;
}
.story-progress-dot { height:4px; flex:1; background:rgba(255,255,255,.3); border-radius:999px; overflow:hidden; }
.story-progress-dot.is-active::before { content:""; display:block; height:100%; background:#fff; animation:storyDot 8s linear forwards; }
@keyframes storyDot { from{ width:0; } to{ width:100%; } }
.story-nav-arrow {
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  border:0;
  border-radius:999px;
  width:48px;
  height:48px;
  background:rgba(255,255,255,.18);
  color:#fff;
  font-size:30px;
  cursor:pointer;
  z-index:3;
}
.story-nav-prev { left:14px; }
.story-nav-next { right:14px; }
.story-comments-panel {
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  background:#fff;
  color:#111827;
  min-width:0;
}
.story-comments-head { padding:18px; border-bottom:1px solid #e5e7eb; }
.story-comments-head strong { display:block; font-size:18px; }
.story-comments-head small { color:#64748b; }
.story-comments-list { overflow:auto; padding:14px; display:flex; flex-direction:column; gap:10px; }
.story-comment-item { display:grid; grid-template-columns:38px minmax(0,1fr); gap:10px; align-items:start; }
.story-comment-item img { width:38px; height:38px; border-radius:999px; object-fit:cover; }
.story-comment-bubble { background:#f1f5f9; border-radius:16px; padding:9px 11px; }
.story-comment-bubble strong { display:block; font-size:13px; }
.story-comment-bubble span { font-size:14px; overflow-wrap:anywhere; }
.story-comment-form { display:flex; gap:8px; padding:14px; border-top:1px solid #e5e7eb; }
.story-comment-form input { flex:1; border:1px solid #cbd5e1; border-radius:999px; padding:11px 13px; }
.story-comment-form button { border:0; border-radius:999px; padding:0 16px; background:#111827; color:#fff; font-weight:900; cursor:pointer; }
@media (max-width: 980px) {
  .story-settings-grid { grid-template-columns:1fr; }
  .story-viewer-overlay { padding:0; }
  .story-viewer-dialog { width:100%; height:100dvh; border-radius:0; grid-template-columns:1fr; grid-template-rows:minmax(0,1fr) 42dvh; }
  .story-comments-panel { min-height:0; }
  .story-nav-arrow { width:42px; height:42px; font-size:24px; }
  .profile-highlights-list { flex-direction:row; overflow-x:auto; max-height:none; }
  .highlight-circle { width:120px; flex:0 0 120px; }
  .highlight-circle img,.highlight-video-thumb,.highlight-empty-launch .story-plus { width:88px; height:88px; }
}
@media (max-width: 560px) {
  .story-composer-overlay { padding:0; }
  .story-composer-dialog { width:100%; height:100dvh; max-height:none; border-radius:0; }
  .story-source-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .profile-story-strip { overflow-x:auto; flex-wrap:nowrap; padding-bottom:8px; }
  .story-circle { flex:0 0 auto; }
}

/* Highlight rail sticky repair */
@media (min-width:981px){.profile-left-sidebar-stack{position:sticky!important;top:72px!important;max-height:calc(100dvh - 140px)!important;overflow-y:auto!important;overflow-x:hidden!important;padding-bottom:22px!important}.profile-highlights-rail{overflow:visible}.profile-highlights-list{max-height:none}}

/* Stories/HighLights now use the universal comment lightbox */
.story-universal-comments-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.story-universal-comment-copy {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.78);
  line-height: 1.45;
  font-weight: 700;
}
.story-universal-comment-btn {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #1877f2, #7c3aed);
  color: #fff;
  padding: 12px 16px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(24,119,242,.25);
}
