/* ==========================================================================
   Stories (owner 2026-11-16): a row of tall cards on top of the feed (_stories.html), the full-screen
   player and "Create story" (stories.js).
   ========================================================================== */
.cs-stories { display:flex; gap:8px; overflow-x:auto; scrollbar-width:none; padding:2px 0 4px; margin:0 0 14px; }
.cs-stories::-webkit-scrollbar { display:none; }
.cs-st { position:relative; flex:0 0 112px; height:190px; border:0; padding:0; border-radius:12px; overflow:hidden; cursor:pointer;
  background:#1f2937 center / cover no-repeat; box-shadow:0 1px 2px rgba(0,0,0,.15); color:#fff; text-decoration:none; display:block; }
.cs-st::after { content:''; position:absolute; inset:0; background:linear-gradient(180deg, rgba(0,0,0,.28), transparent 35%, transparent 60%, rgba(0,0,0,.55)); pointer-events:none; }
.cs-st > video { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.cs-st > b { position:absolute; left:8px; right:8px; bottom:8px; z-index:1; font-size:12.5px; line-height:1.25; text-align:left;
  overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.cs-st-av { position:absolute; top:8px; left:8px; z-index:1; width:38px; height:38px; border-radius:50%; object-fit:cover;
  border:3px solid #fff; background:#fff; }
.cs-st.new .cs-st-av { border-color:var(--cs-blue); box-shadow:0 0 0 2px #fff; }
.cs-st-tx { position:absolute; inset:52px 8px 34px; display:flex; align-items:center; justify-content:center; text-align:center;
  font-weight:700; font-size:13px; line-height:1.3; overflow:hidden; z-index:1; }
.cs-st-add { background:var(--cs-card); color:var(--cs-text, #050505); }
.cs-st-add::after { display:none; }
.cs-st-pic { position:absolute; left:0; right:0; top:0; height:130px; background:#e4e6eb center / cover no-repeat; }
.cs-st-pic-g { display:flex; align-items:center; justify-content:center; font-size:34px; color:#9ca3af; }
.cs-st-plus { position:absolute; left:50%; top:130px; transform:translate(-50%, -50%); z-index:2; width:36px; height:36px; border-radius:50%;
  background:var(--cs-blue); color:#fff; border:4px solid var(--cs-card); display:flex; align-items:center; justify-content:center; font-size:14px; }
.cs-st-add > b { color:var(--cs-text, #050505); text-align:center; bottom:10px; }
@media (max-width: 900px) {
  .cs-stories { padding:10px 10px 6px; margin:0 0 8px; background:var(--cs-card); }
  .cs-st { flex-basis:96px; height:164px; }
  .cs-st-pic { height:112px; } .cs-st-plus { top:112px; }
}
/* the looks: round circles for Photo gallery, square tiles for Professional */
.cs-tpl-gallery .cs-stories { gap:14px; }
.cs-tpl-gallery .cs-st { flex:0 0 72px; height:94px; background:transparent !important; box-shadow:none; overflow:visible; }
.cs-tpl-gallery .cs-st::after, .cs-tpl-gallery .cs-st > video, .cs-tpl-gallery .cs-st-tx { display:none; }
.cs-tpl-gallery .cs-st-av, .cs-tpl-gallery .cs-st-pic { top:0; left:3px; width:66px; height:66px; border-radius:50%; border:3px solid #fff;
  box-shadow:0 0 0 2px #dbdbdb; }
.cs-tpl-gallery .cs-st.new .cs-st-av { box-shadow:0 0 0 2.5px #db2777; }
.cs-tpl-gallery .cs-st-plus { top:auto; left:auto; right:0; bottom:22px; transform:none; width:24px; height:24px; border-width:2px; font-size:10px; }
.cs-tpl-gallery .cs-st > b { left:-4px; right:-4px; bottom:0; text-align:center; font-weight:500; color:var(--cs-text, #262626); font-size:12px; -webkit-line-clamp:1; }
.cs-tpl-gallery .cs-stories { background:transparent; }
.cs-tpl-pro .cs-st { border-radius:6px; }
.cs-tpl-channel .cs-st { border-radius:16px; }
html.cs-st-lock, html.cs-st-lock body { overflow:hidden; }

.cs-stv { position:fixed; inset:0; z-index:1000; background:rgba(0,0,0,.94); display:flex; align-items:center; justify-content:center;
  touch-action:none; user-select:none; -webkit-user-select:none; }
.cs-stv-card { position:relative; width:min(420px, 100vw); height:min(760px, 100dvh); background:#000; border-radius:12px; overflow:hidden; }
@media (max-width: 600px) { .cs-stv-card { border-radius:0; height:100dvh; } }
.cs-stv-bars { position:absolute; top:8px; left:8px; right:8px; z-index:3; display:flex; gap:4px; }
.cs-stv-bars i { flex:1; height:3px; border-radius:2px; background:rgba(255,255,255,.35); overflow:hidden; }
.cs-stv-bars i b { display:block; height:100%; width:0; background:#fff; }
.cs-stv-bars i.done b { width:100%; }
.cs-stv-head { position:absolute; top:18px; left:10px; right:6px; z-index:3; display:flex; align-items:center; gap:8px; color:#fff;
  text-shadow:0 1px 2px rgba(0,0,0,.5); }
.cs-stv-head img { width:36px; height:36px; border-radius:50%; object-fit:cover; border:2px solid #fff; }
.cs-stv-head small { opacity:.8; }
.cs-stv-x { margin-left:auto; width:40px; height:40px; border:0; background:transparent; color:#fff; font-size:24px; cursor:pointer; }
.cs-stv-media { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; }
.cs-stv-media > img, .cs-stv-media > video { width:100%; height:100%; object-fit:contain; }
.cs-stv-text { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; padding:40px 28px; }
.cs-stv-text span { color:#fff; font-size:26px; font-weight:700; text-align:center; line-height:1.35; white-space:pre-wrap; word-break:break-word; }
.cs-stv-cap { position:absolute; left:0; right:0; bottom:60px; margin:0; padding:10px 18px; text-align:center; color:#fff; font-size:16px;
  background:rgba(0,0,0,.45); white-space:pre-wrap; }
.cs-stv-tap { position:absolute; top:70px; bottom:60px; z-index:2; }
.cs-stv-tap.l { left:0; width:33%; } .cs-stv-tap.r { right:0; width:67%; }
.cs-stv-foot { position:absolute; left:0; right:0; bottom:0; z-index:3; display:flex; align-items:center; justify-content:space-between;
  gap:10px; padding:14px 16px; color:#fff; background:linear-gradient(transparent, rgba(0,0,0,.6)); }
.cs-stv-del { margin-left:auto; border:0; border-radius:20px; padding:7px 14px; background:rgba(255,255,255,.18); color:#fff; font-weight:600; cursor:pointer; }

.cs-stc { position:fixed; inset:0; z-index:1000; background:rgba(0,0,0,.6); display:flex; align-items:center; justify-content:center; padding:16px; }
.cs-stc-box { width:min(420px, 100%); background:var(--cs-card, #fff); color:var(--cs-text, #050505); border-radius:14px; padding:14px 16px 16px;
  max-height:100dvh; overflow:auto; }
.cs-stc-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; font-size:17px; }
.cs-stc-x { border:0; background:var(--cs-btn, #e4e6eb); width:36px; height:36px; border-radius:50%; cursor:pointer; color:inherit; }
.cs-stc-pick { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.cs-stc-opt { height:200px; border:0; border-radius:12px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px;
  color:#fff; font-weight:700; cursor:pointer; margin:0; }
.cs-stc-opt i { width:46px; height:46px; border-radius:50%; background:#fff; display:flex; align-items:center; justify-content:center; font-size:20px; }
.cs-stc-opt.ph { background:linear-gradient(135deg, #2563eb, #7c3aed); } .cs-stc-opt.ph i { color:#2563eb; }
.cs-stc-opt.tx { background:linear-gradient(135deg, #db2777, #f97316); } .cs-stc-opt.tx i { color:#db2777; }
.cs-stc-card { height:340px; border-radius:12px; display:flex; align-items:center; justify-content:center; overflow:hidden; background:#000; }
.cs-stc-card textarea { width:100%; height:100%; border:0; background:transparent; color:#fff; font-size:24px; font-weight:700; text-align:center;
  resize:none; padding:110px 20px 20px; outline:none; }
.cs-stc-card textarea::placeholder { color:rgba(255,255,255,.75); }
.cs-stc-card img, .cs-stc-card video { width:100%; height:100%; object-fit:contain; }
.cs-stc-cap { width:100%; margin-top:10px; border:1px solid var(--cs-line, #ddd); border-radius:20px; padding:9px 14px; background:transparent; color:inherit; }
.cs-stc-colors { display:flex; gap:10px; justify-content:center; margin-top:12px; }
.cs-stc-colors button { width:30px; height:30px; border-radius:50%; border:3px solid #fff; box-shadow:0 0 0 1px #ccc; cursor:pointer; }
.cs-stc-err { color:#e11d48; margin:8px 0 0; min-height:0; }
.cs-stc-go { width:100%; margin-top:12px; justify-content:center; height:42px; }
.cs-stc [hidden] { display:none !important; }
.cs-stc-card textarea, .cs-stc-cap { font-family:inherit; }
/* Manage (back office) has no social.css: the box's own buttons */
.cs-stc .cs-btn { display:inline-flex; align-items:center; border:0; border-radius:6px; font-weight:600; cursor:pointer; }
.cs-stc .cs-btn.blue { background:#1877f2; color:#fff; }
.cs-stc .cs-stc-opt span { font-size:15px; }
/* who can watch (owner 2026-11-17) */
.cs-stc-aud { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:12px; font-weight:600; font-size:14px; }
.cs-stc-aud select { border:1px solid var(--cs-line, #ddd); border-radius:8px; padding:6px 10px; background:transparent; color:inherit; font:inherit; }
