:root{
  --ink:#ffffff; --sheet:#ffffff; --sheet-fg:#1d1a26; --muted:#6a6578; --line:#e3e0ea;
  --brand:#4a2a85; --stage:#0c0a10;
  --display:'Manrope','Segoe UI',system-ui,sans-serif;
  --body:'IBM Plex Sans','Segoe UI',system-ui,sans-serif;
}
@media (prefers-color-scheme: dark){:root{--sheet:#1f1c27;--sheet-fg:#ece9f3;--muted:#a39eb3;--line:#332f3e;--brand:#b89bf0}}

*{box-sizing:border-box}
html,body{height:100%;margin:0}
body{background:var(--stage);font-family:var(--body);font-size:15px;color:var(--ink)}
button{font:inherit;color:inherit;cursor:pointer}
:focus-visible{outline:2px solid #b89bf0;outline-offset:2px}

.stage{position:relative;height:100%;max-width:440px;margin:0 auto;overflow:hidden;background:#000}
.feed{height:100%;overflow-y:auto;scroll-snap-type:y mandatory;scrollbar-width:none;overscroll-behavior:contain}
.feed::-webkit-scrollbar{display:none}

.card{position:relative;height:100%;scroll-snap-align:start;scroll-snap-stop:always;overflow:hidden;display:flex;flex-direction:column;justify-content:flex-end}
.card video,.card .art{position:absolute;inset:0;width:100%;height:100%}
.card video{object-fit:cover;background:#000}
.card .art::before{content:"";position:absolute;inset:0;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0 L56 16 L56 48 L28 64 L0 48 L0 16 Z M28 64 L28 97' fill='none' stroke='white' stroke-opacity='0.09' stroke-width='1.2'/%3E%3C/svg%3E");
  background-size:56px 97px}
.card .art img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.55}
.card .shade{position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,rgba(0,0,0,.05) 40%,rgba(0,0,0,.8) 100%)}
.big{position:absolute;top:24%;left:22px;right:72px;font-family:var(--display);font-weight:800;font-size:28px;line-height:1.08;letter-spacing:-.02em;text-wrap:balance}

.playstate{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:64px;height:64px;border-radius:50%;
  background:rgba(0,0,0,.45);display:grid;place-items:center;opacity:0;transition:opacity .2s;pointer-events:none}
.card.paused .playstate{opacity:1}
.mute{position:absolute;top:calc(64px + env(safe-area-inset-top,0px));right:14px;z-index:3;border:0;border-radius:999px;background:rgba(0,0,0,.45);padding:7px 12px;font-size:12px}

.meta{position:relative;z-index:2;padding:0 76px 26px 18px}
.chips{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:8px}
.chip{font-size:11px;font-weight:500;padding:5px 9px;border-radius:999px;background:rgba(255,255,255,.18)}
.chip.prog{background:#f2b33d;color:#2a1d00}
.chip.done{background:#7fcf9c;color:#062611}
.ttl{font-weight:600;font-size:15px;margin:0 0 6px}
.desc{font-size:13px;opacity:.85;margin:0 0 10px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.cta{display:inline-flex;align-items:center;gap:6px;font-weight:600;font-size:13px;background:#fff;color:#1d1a26;border-radius:999px;padding:8px 14px;text-decoration:none}

.bar{position:absolute;left:0;right:0;bottom:0;height:3px;background:rgba(255,255,255,.2);z-index:3}
.bar i{display:block;height:100%;width:0;background:#fff}

.rail{position:absolute;right:10px;bottom:30px;z-index:3;display:flex;flex-direction:column;gap:16px;align-items:center}
.rbtn{background:none;border:0;display:flex;flex-direction:column;align-items:center;gap:3px;font-size:12px;font-variant-numeric:tabular-nums}
.rbtn svg{width:30px;height:30px;filter:drop-shadow(0 1px 4px rgba(0,0,0,.4))}
.rbtn[aria-pressed="true"].like svg{color:#ff5a7a}
.rbtn[aria-pressed="true"].save svg{color:#f2b33d}

.status{position:absolute;inset:0;display:grid;place-items:center;text-align:center;padding:24px;color:#cfc9dc;font-size:14px;pointer-events:none}
.status[hidden]{display:none}

.sheet{position:absolute;left:0;right:0;bottom:0;z-index:8;height:62%;background:var(--sheet);color:var(--sheet-fg);
  border-radius:18px 18px 0 0;transform:translateY(100%);transition:transform .25s ease;display:flex;flex-direction:column}
.sheet.open{transform:none}
.sheet header{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--line)}
.sheet header b{font-family:var(--display)}
.sheet header button{border:0;background:none;font-size:22px;line-height:1}
.clist{flex:1;overflow-y:auto;padding:4px 16px;margin:0;list-style:none}
.clist li{padding:10px 0;border-bottom:1px solid var(--line);font-size:14px}
.clist .who{font-weight:600;font-size:13px}
.clist .when{color:var(--muted);font-size:12px;margin-left:6px}
.clist .del{border:0;background:none;color:var(--muted);font-size:12px;margin-left:8px;padding:0;text-decoration:underline}
.clist .empty{color:var(--muted);border:0}
.cform{display:flex;gap:8px;padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--line)}
.cform input{flex:1;min-width:0;border:1px solid var(--line);border-radius:999px;padding:9px 14px;background:transparent;color:inherit;font:inherit;font-size:14px}
.cform button{border:0;border-radius:999px;background:var(--brand);color:var(--sheet);padding:0 16px;font-weight:600}

.toast{position:absolute;left:12px;right:12px;bottom:calc(16px + env(safe-area-inset-bottom,0px));z-index:9;background:#2a2433;color:#fff;border-radius:10px;padding:10px 14px;font-size:13px}
@media (prefers-reduced-motion:reduce){.sheet{transition:none}}

/* Discovery mode (admin only) */
.discover{min-height:100%;background:#15131b;color:#ece9f3;padding:20px 16px;overflow-y:auto}
.discover h1{font-family:var(--display);font-size:20px;margin:0 0 6px}
.discover p{font-size:13px;color:#a39eb3;margin:0 0 12px}
.discover button{border:0;border-radius:999px;background:#b89bf0;color:#15131b;font-weight:600;padding:8px 16px;margin-bottom:12px}
.discover pre{white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.5 ui-monospace,Menlo,monospace;background:#1f1c27;border-radius:10px;padding:12px;margin:0}

/* YouTube assets: thumbnail at full strength, player in a 16:9 frame above the shade */
.card.yt .art img{opacity:.9}
.card.yt .playstate{pointer-events:none}
.card .ytframe{position:absolute;left:0;right:0;top:42%;transform:translateY(-50%);width:100%;aspect-ratio:16/9;height:auto;border:0;z-index:2;background:#000}
.card.playing .big,.card.playing .playstate{display:none}
.card.yt:not(.playing) .big{display:none}

/* Top bar: filter chips and search */
.topbar{position:absolute;top:0;left:0;right:0;z-index:5;padding:calc(10px + env(safe-area-inset-top,0px)) 0 14px;
  background:linear-gradient(180deg,rgba(0,0,0,.6),rgba(0,0,0,0))}
.topbar[hidden],.searchrow[hidden]{display:none}
.toprow{display:flex;align-items:center;gap:6px;padding-right:10px}
.filters{flex:1;min-width:0;display:flex;gap:6px;overflow-x:auto;padding:2px 4px 2px 12px;scrollbar-width:none;
  mask-image:linear-gradient(90deg,#000 88%,transparent);-webkit-mask-image:linear-gradient(90deg,#000 88%,transparent)}
.filters::-webkit-scrollbar{display:none}
.fchip{flex:none;border:1px solid rgba(255,255,255,.28);background:rgba(0,0,0,.3);color:#fff;border-radius:999px;
  padding:6px 12px;font-size:13px;font-weight:500;white-space:nowrap;backdrop-filter:blur(6px)}
.fchip[aria-pressed="true"]{background:#fff;color:#1d1a26;border-color:#fff}
.fchip.chan{max-width:200px;overflow:hidden;text-overflow:ellipsis}
.fsep{flex:none;width:1px;margin:4px 2px;background:rgba(255,255,255,.3)}
.searchbtn{flex:none;width:36px;height:36px;border-radius:50%;border:0;background:rgba(0,0,0,.35);display:grid;place-items:center;backdrop-filter:blur(6px)}
.searchbtn[aria-expanded="true"]{background:#fff;color:#1d1a26}
.searchrow{display:flex;gap:8px;align-items:center;padding:10px 12px 0}
.searchrow input{flex:1;min-width:0;border:0;border-radius:999px;padding:9px 14px;font:inherit;font-size:14px;background:rgba(255,255,255,.95);color:#1d1a26}
.searchrow button{border:0;background:none;font-size:14px;font-weight:500;padding:6px 2px}
.ytout{position:absolute;left:50%;transform:translateX(-50%);top:calc(42% + 28vw);z-index:3;font-size:12px;color:#fff;
  background:rgba(0,0,0,.55);border-radius:999px;padding:6px 12px;text-decoration:none;white-space:nowrap}
@media (min-width:440px){.ytout{top:calc(42% + 128px)}}

/* Rate and share panels */
.sheet.small{height:auto;padding-bottom:calc(14px + env(safe-area-inset-bottom,0px))}
.sheet header .src{font-size:12px;color:var(--muted);margin-left:8px;font-weight:400}
.sheet .closeX{border:0;background:none;font-size:22px;line-height:1}
.stars{display:flex;justify-content:center;gap:10px;padding:18px 16px 6px}
.stars button{border:0;background:none;color:var(--line);padding:4px}
.stars button svg{width:36px;height:36px}
.stars button.on,.stars button:hover{color:#f2b33d}
.hint{font-size:12px;color:var(--muted);text-align:center;margin:4px 16px 8px}
.sharebody{flex:1;display:flex;flex-direction:column;gap:10px;padding:14px 16px calc(14px + env(safe-area-inset-bottom,0px));min-height:0}
.copylink,.sendinv{border:0;border-radius:999px;background:var(--brand);color:var(--sheet);font-weight:600;padding:10px 16px}
.sendinv:disabled{opacity:.45;cursor:default}
.linkbox,#inviteSearch{border:1px solid var(--line);border-radius:999px;padding:9px 14px;background:transparent;color:inherit;font:inherit;font-size:14px;width:100%}
#inviteBox{display:flex;flex-direction:column;gap:8px;min-height:0;flex:1}
#inviteBox[hidden]{display:none}
#inviteBox .hint{text-align:left;margin:4px 0 0}
.ulist{list-style:none;margin:0;padding:0;overflow-y:auto;flex:1;min-height:80px}
.ulist li{border-bottom:1px solid var(--line);font-size:14px}
.ulist label{display:flex;align-items:center;gap:10px;padding:9px 2px;cursor:pointer}
.ulist .who{font-weight:600;font-size:13px}
.ulist .when{color:var(--muted);font-size:12px}
.ulist .empty{color:var(--muted);border:0;padding:10px 2px}
.rbtn[aria-pressed="true"].rate svg{color:#f2b33d}
.rail{gap:13px}

/* Closed panels are hidden outright, not just moved below the stage: inside some hosts (e.g. the
   Docebo iFrame widget) the area below the stage can be visible, which left closed panels on screen. */
.sheet{visibility:hidden;pointer-events:none;transition:transform .25s ease,visibility 0s linear .25s}
.sheet.open{visibility:visible;pointer-events:auto;transition:transform .25s ease,visibility 0s}
html,body{overflow:hidden}

/* Playlist picker and Share content */
.postbtn{flex:none;width:36px;height:36px;border-radius:50%;border:0;background:#fff;color:#1d1a26;display:grid;place-items:center;margin-left:10px}
.sheet.tall{height:86%}
.newpl{display:flex;gap:8px;align-items:center;border-top:1px solid var(--line);padding-top:10px}
.newpl input[type=text],#newPlName{flex:1;min-width:0;border:1px solid var(--line);border-radius:999px;padding:9px 14px;background:transparent;color:inherit;font:inherit;font-size:14px}
.newpl .priv{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:4px;white-space:nowrap}
.newpl button{border:0;border-radius:999px;background:var(--brand);color:var(--sheet);font-weight:600;padding:9px 14px}
.tabs{display:flex;gap:6px}
.tab{flex:1;border:1px solid var(--line);background:transparent;border-radius:999px;padding:8px;font-weight:600;font-size:13px}
.tab[aria-selected="true"]{background:var(--sheet-fg);color:var(--sheet);border-color:var(--sheet-fg)}
.postform{display:flex;flex-direction:column;gap:8px;overflow-y:auto;min-height:0;flex:1}
.postform [data-pane][hidden]{display:none}
.postform input:not([type=checkbox]):not([type=file]),.postform textarea{border:1px solid var(--line);border-radius:12px;padding:9px 12px;background:transparent;color:inherit;font:inherit;font-size:14px;width:100%;resize:vertical}
.filepick{display:block;border:1.5px dashed var(--line);border-radius:12px;padding:16px;text-align:center;font-size:14px;color:var(--muted);cursor:pointer}
.filepick input{position:absolute;opacity:0;width:1px;height:1px}
.filepick:focus-within{outline:2px solid #b89bf0}
.linkprev img{width:100%;max-height:140px;object-fit:cover;border-radius:12px}
.lbl{font-size:12px;font-weight:600;margin:4px 0 0;color:var(--muted)}
.chanlist{flex:none;max-height:150px;min-height:0}
.progress{height:6px;border-radius:999px;background:var(--line);overflow:hidden}
.progress i{display:block;height:100%;width:0;background:var(--brand);transition:width .2s}
.progress[hidden]{display:none}
.postform .hint{text-align:left;margin:0}
.formerr{margin:0;padding:8px 12px;border-radius:10px;background:#fde8ec;color:#8a1630;font-size:13px}
.formerr[hidden]{display:none}
.stage{overflow:clip}
.hint.left{text-align:left;margin:0}
.hint[hidden]{display:none}

/* My posts */
.chip.st-live{background:#7fcf9c;color:#062611}
.chip.st-wait{background:#f2b33d;color:#2a1d00}
.chip.st-bad{background:#ff8a8a;color:#3b0a0a}
.chip.st-draft{background:rgba(255,255,255,.85);color:#1d1a26}
.delmine{margin-left:8px;border:1px solid rgba(255,255,255,.6);background:rgba(0,0,0,.35);color:#fff;border-radius:999px;padding:7px 12px;font-size:12px;font-weight:600}

/* Course and learning plan detail on cards that open in Docebo */
.facts{font-size:12px;opacity:.85;margin:-2px 0 8px;font-weight:500}
.desc.long{-webkit-line-clamp:4;line-height:1.4}
.lpcourses{margin:0 0 10px;padding:0 0 0 18px;font-size:12.5px;line-height:1.5;opacity:.92}
.lpcourses li{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lpcourses .more{list-style:none;margin-left:-18px;opacity:.75}
.lpbar{height:5px;border-radius:999px;background:rgba(255,255,255,.25);overflow:hidden;margin:2px 0 4px;max-width:260px}
.lpbar i{display:block;height:100%;background:#7fcf9c;border-radius:999px}
/* Detail cards: move the big poster title up and darken the lower half so the text reads well */
.card.rich .big{top:12%}
.card.rich .shade{background:linear-gradient(180deg,rgba(0,0,0,.05) 25%,rgba(0,0,0,.85) 70%)}

/* Landscape video: whole frame visible, centred a little above the text block */
.card .vbg{display:none}
.card.landscape .vbg{display:block;position:absolute;inset:-30px;background:#111 center/cover no-repeat;filter:blur(28px) brightness(.5);transform:scale(1.1)}
.card.landscape video{object-fit:contain;object-position:center 40%;background:transparent}

/* Image assets: whole picture, fitted; blurred fill behind; full-screen viewer on tap */
.card.pic .big{display:none}
.card.pic .art{background:#000 !important}
.card.pic .art::before{display:none}
.picbg{position:absolute;inset:-30px;background:center/cover no-repeat;filter:blur(28px) brightness(.45);transform:scale(1.1)}
.card .art img.picfull{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:center 38%;opacity:1;cursor:zoom-in}
.card.pic .shade{background:linear-gradient(180deg,rgba(0,0,0,0) 55%,rgba(0,0,0,.85) 100%)}
.lightbox{position:absolute;inset:0;z-index:20;background:#000;display:flex;flex-direction:column}
.lbscroll{flex:1;overflow:auto;touch-action:pan-x pan-y pinch-zoom;display:flex;align-items:center;justify-content:center}
.lbscroll img{max-width:100%;max-height:100%;object-fit:contain}
.lbclose{position:absolute;top:calc(12px + env(safe-area-inset-top,0px));right:12px;z-index:2;width:40px;height:40px;border-radius:50%;border:0;background:rgba(255,255,255,.18);color:#fff;font-size:26px;line-height:1}

/* Comments / Q&A */
.sheettabs{display:flex;gap:6px;padding:8px 16px 0}
.sheettabs[hidden]{display:none}
.stab{flex:1;border:1px solid var(--line);background:transparent;border-radius:999px;padding:7px;font-weight:600;font-size:13px}
.stab[aria-selected="true"]{background:var(--sheet-fg);color:var(--sheet);border-color:var(--sheet-fg)}
.clist li.qa{padding:12px 0}
.qtext{font-size:14px;font-weight:500;margin-bottom:4px;white-space:pre-line}
.qmeta{font-size:12px}
.qmeta .on,.ans .on{color:var(--muted);font-size:12px;margin-left:6px}
.best{margin-top:6px;padding:6px 10px;border-left:3px solid #7fcf9c;font-size:13px}
.qtoggle{margin-top:6px;border:0;background:none;padding:0;color:var(--brand);font-size:13px;font-weight:600}
.answers{margin:8px 0 0 12px;border-left:2px solid var(--line);padding-left:10px}
.answers[hidden]{display:none}
.ans{padding:6px 0;font-size:13px}
.ans div{white-space:pre-line}
.ans.isbest{background:rgba(127,207,156,.12);border-radius:8px;padding:6px 8px}
.ans.muted{color:var(--muted)}
.aform{display:flex;gap:6px;margin-top:6px}
.aform input{flex:1;min-width:0;border:1px solid var(--line);border-radius:999px;padding:7px 12px;background:transparent;color:inherit;font:inherit;font-size:13px}
.aform button{border:0;border-radius:999px;background:var(--brand);color:var(--sheet);padding:0 12px;font-weight:600;font-size:13px}
