:root{--cd:#FF6A00;--cdl:#fff1e6;--cdg:#6b7280;--cdb:#e5e7eb}
.cds-wrap,.cds-tray-wrap{max-width:680px;margin:0 auto;font-family:-apple-system,"Segoe UI",Roboto,Arial,sans-serif;color:#1f1f1f;box-sizing:border-box}
.cds-wrap *,.cds-tray-wrap *,.cds-view *{box-sizing:border-box}
/* theme-proof buttons */
.cds-wrap button,.cds-tray-wrap button,.cds-view button{-webkit-appearance:none!important;appearance:none!important;background:none;border:0!important;box-shadow:none!important;border-radius:0;color:inherit!important;font:inherit;margin:0;padding:0;min-height:0!important;min-width:0!important;width:auto;height:auto;text-transform:none!important;letter-spacing:normal!important;text-decoration:none!important;cursor:pointer;outline:none}
.cds-tray-wrap a,.cds-wrap a{text-decoration:none!important}

/* ===== create story form ===== */
.cds-form{background:#fff;border:1px solid var(--cdb);border-radius:16px;padding:16px;box-shadow:0 2px 10px rgba(0,0,0,.04)}
.cds-top{display:flex;justify-content:space-between;align-items:center;font-size:14px;font-weight:600;margin-bottom:10px}
.cds-badge{background:var(--cdl);color:var(--cd);font-size:11px;padding:2px 10px;border-radius:99px}
.cds-pick{position:relative;border-radius:14px;overflow:hidden;aspect-ratio:4/3;max-height:380px;width:100%;display:flex;align-items:center;justify-content:center;background:#fffaf6;border:1.5px dashed #ff8a3d;transition:background .2s}
.cds-pick.filled{border-style:solid;border-color:transparent;aspect-ratio:9/12;max-height:460px;background:#000!important}
.cds-pick.textmode{border-style:solid;border-color:transparent}
.cds-pick-in{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center;padding:10px}
.cds-pick-in small{color:var(--cdg);font-size:11px}
.cds-src{display:flex;gap:8px;margin-top:8px}
.cds-src-b{background:var(--cdl)!important;color:var(--cd)!important;font-size:12px;font-weight:600;padding:5px 14px!important;border-radius:99px!important}
.cds-src-b+.cds-src-b{background:#f3f4f6!important;color:#1f1f1f!important}
.cds-prev,.cds-prev-v{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#000}
.cds-prev-text{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;text-align:center;padding:24px;color:#fff;font-size:22px;font-weight:700;line-height:1.3;word-break:break-word}
.cds-rm{position:absolute;top:8px;right:8px;width:30px!important;height:30px!important;border-radius:50%!important;background:rgba(0,0,0,.55)!important;color:#fff!important;font-size:20px;line-height:1;display:flex;align-items:center;justify-content:center;z-index:2}
.cds-l{display:block;font-weight:600;font-size:13px;margin:16px 0 6px}
.cds-in{width:100%;border:1px solid var(--cdb);border-radius:8px;padding:10px 12px;font-size:14px;background:#fff;font-family:inherit;resize:vertical}
.cds-in:focus,.cds-sel:focus{outline:none;border-color:var(--cd);box-shadow:0 0 0 3px rgba(255,106,0,.15)}
.cds-bgs{display:flex;gap:12px}
.cds-bg{width:32px!important;height:32px!important;border-radius:50%!important;border:2px solid #fff!important;box-shadow:0 0 0 1px var(--cdb)!important}
.cds-bg.on{box-shadow:0 0 0 2.5px var(--cd)!important}
.cds-opt{display:flex;justify-content:space-between;align-items:center;gap:10px;border-bottom:1px solid var(--cdb);padding:4px 0 12px;font-size:13px}
.cds-sel{border:0;background:transparent;font-weight:700;font-size:13px;font-family:inherit;color:#111;padding:4px;cursor:pointer}
.cds-share{width:100%!important;margin-top:18px!important;background:var(--cd)!important;color:#fff!important;border-radius:8px!important;padding:13px!important;font-size:15px;font-weight:700}
.cds-share:disabled{opacity:.6}
.cds-msg{margin-top:10px;font-size:13px;text-align:center}.cds-msg.err{color:#dc2626}.cds-msg.ok{color:#16a34a}

/* ===== home tray ===== */
.cds-tray-wrap{background:#fff;border:1px solid var(--cdb);border-radius:22px;padding:14px 16px 12px;margin:0 auto 18px;box-shadow:0 2px 12px rgba(0,0,0,.04)}
.cds-tray-head{display:none;justify-content:space-between;align-items:center;margin-bottom:12px;font-size:16px}
.cds-seeall{color:var(--cd)!important;font-size:13px;font-weight:700}
.cds-tray{display:flex;gap:16px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;padding:2px 2px 0}
.cds-tray::-webkit-scrollbar{display:none}
.cds-item{position:relative;flex:none;display:flex;flex-direction:column;align-items:center;gap:6px;width:72px;cursor:pointer}
.cds-ring{width:68px;height:68px;border-radius:50%;padding:3px;display:block;background:linear-gradient(45deg,#ff6a00,#ffb066);position:relative}
.cds-ring img{width:100%;height:100%;border-radius:50%;object-fit:cover;border:3px solid #fff;display:block;background:#e5e7eb;margin:0;max-width:none}
.cds-ring.none{background:#d1d5db}
.cds-ring.seen{background:#d1d5db}
.cds-plus{position:absolute;right:2px;top:46px;width:22px;height:22px;border-radius:50%;background:var(--cd);border:2px solid #fff;display:flex;align-items:center;justify-content:center}
.cds-plus svg{width:12px;height:12px;stroke:#fff;stroke-width:3;fill:none;stroke-linecap:round}
.cds-nm{font-size:12px;color:#374151;max-width:72px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(min-width:768px){
 .cds-tray-head{display:flex}
 .cds-item{width:84px}.cds-ring{width:78px;height:78px}.cds-plus{top:54px}
 .cds-nm{font-size:13px;max-width:84px}
}

/* ===== story viewer ===== */
html.cds-lock,html.cds-lock body{overflow:hidden!important}
.cds-view{position:fixed;inset:0;z-index:2147483000;background:rgba(0,0,0,.92);display:flex;align-items:center;justify-content:center;font-family:-apple-system,"Segoe UI",Roboto,Arial,sans-serif;opacity:0;transition:opacity .2s}
.cds-view.open{opacity:1}
.cds-stage{position:relative;width:100%;height:100%;background:#111;overflow:hidden;color:#fff;user-select:none;-webkit-user-select:none}
@media(min-width:768px){.cds-stage{height:min(92vh,820px);width:calc(min(92vh,820px)*9/16);border-radius:16px}}
.cds-media{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#000}
.cds-textbg{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;text-align:center;padding:32px;font-size:26px;font-weight:700;line-height:1.35;word-break:break-word}
.cds-shade{position:absolute;left:0;right:0;top:0;height:140px;background:linear-gradient(rgba(0,0,0,.6),transparent);pointer-events:none}
.cds-shade.b{top:auto;bottom:0;height:160px;background:linear-gradient(transparent,rgba(0,0,0,.65))}
.cds-bars{position:absolute;top:10px;left:10px;right:10px;display:flex;gap:4px;z-index:3}
.cds-bar{flex:1;height:3px;background:rgba(255,255,255,.35);border-radius:3px;overflow:hidden}
.cds-bar i{display:block;height:100%;width:0;background:#fff}
.cds-bar.done i{width:100%}
.cds-uh{position:absolute;top:22px;left:12px;right:12px;display:flex;align-items:center;gap:10px;z-index:3}
.cds-uh img{width:38px;height:38px;border-radius:50%;object-fit:cover;border:2px solid var(--cd);margin:0}
.cds-uh b{font-size:14px;display:block;line-height:1.2}.cds-uh small{opacity:.8;font-size:12px}
.cds-uh .sp{flex:1}
.cds-x,.cds-del,.cds-mute{width:36px!important;height:36px!important;display:flex!important;align-items:center;justify-content:center;border-radius:50%!important;color:#fff!important}
.cds-x svg,.cds-del svg,.cds-mute svg{width:22px;height:22px;stroke:#fff;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.cds-cap{position:absolute;left:0;right:0;bottom:0;padding:24px 18px 28px;z-index:3;font-size:15px;line-height:1.45;text-shadow:0 1px 3px rgba(0,0,0,.6)}
.cds-seen{display:flex;align-items:center;gap:6px;margin-top:8px;font-size:12px;opacity:.85}
.cds-seen svg{width:16px;height:16px;stroke:#fff;fill:none;stroke-width:2}
.cds-tap{position:absolute;top:70px;bottom:90px;z-index:2;width:35%}
.cds-tap.l{left:0}.cds-tap.r{right:0;width:65%}
.cds-nav{display:none;position:absolute;top:50%;transform:translateY(-50%);width:44px!important;height:44px!important;border-radius:50%!important;background:rgba(255,255,255,.15)!important;color:#fff!important;font-size:26px;align-items:center;justify-content:center;z-index:4}
@media(min-width:768px){.cds-nav{display:flex!important}.cds-nav.p{left:calc(50% - min(92vh,820px)*9/32 - 64px)}.cds-nav.n{right:calc(50% - min(92vh,820px)*9/32 - 64px)}
 .cds-view .cds-closeout{position:absolute;top:16px;right:20px;width:42px!important;height:42px!important;display:flex!important;align-items:center;justify-content:center;border-radius:50%!important;background:rgba(255,255,255,.15)!important;font-size:26px}}
.cds-view .cds-closeout{display:none}
.cds-toast{position:fixed;left:50%;bottom:90px;transform:translateX(-50%);background:#111;color:#fff;padding:9px 16px;border-radius:99px;font-size:13px;z-index:2147483600}

/* CodeDekho story creator upgrades */
.cds-type-block{margin:8px 0 20px}.cds-type-title{font-size:15px;margin:0 0 10px}.cds-type-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.cds-type{appearance:none!important;border:1px solid #e5e7eb!important;border-radius:16px!important;background:#fff!important;color:#111!important;min-width:0;padding:14px 8px!important;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-height:112px!important;text-align:center;font-family:inherit;cursor:pointer}
.cds-type.on{border:1.5px solid #ff6a00!important;box-shadow:inset 0 0 0 1px #ff6a00;background:#fffaf6!important}.cds-type-ico{font-size:28px;line-height:1;color:#ff6a00;font-weight:700}.cds-type b{font-size:15px}.cds-type small{font-size:12px;color:#6b7280}.cds-section-title{font-size:16px;font-weight:700;margin:20px 0 10px}.cds-kind-fields[hidden]{display:none!important}
.cds-story-extra{font-size:17px}.cds-story-link{display:inline-flex;margin-top:8px;padding:7px 12px;border-radius:20px;background:#fff;color:#ff6a00!important;text-decoration:none!important;text-shadow:none;font-weight:700}.cds-kind-pill{position:absolute;right:14px;top:56px;z-index:4;background:#ff6a00;color:#fff;border-radius:30px;padding:5px 10px;font-size:11px;font-weight:700}
@media(max-width:767px){
 .cds-wrap,.cds-tray-wrap{width:100%;max-width:100%;min-width:0;margin-left:0;margin-right:0}
 .cds-form{width:100%;max-width:100%;padding:14px;border-radius:14px;overflow:hidden}
 .cds-pick{width:100%;min-height:190px;max-height:58dvh;aspect-ratio:4/3}
 .cds-pick.filled{aspect-ratio:9/12;max-height:58dvh}
 .cds-tray-wrap{padding:14px 12px;margin-bottom:14px;border-radius:16px}
 .cds-tray{width:100%;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;gap:14px}
 .cds-view{position:fixed!important;inset:0!important;width:100vw!important;height:100vh!important;height:100dvh!important;max-width:100vw!important;max-height:100dvh!important;overflow:hidden!important;padding:0!important;margin:0!important}
 .cds-stage{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;height:100dvh!important;max-width:100vw!important;max-height:100dvh!important;border-radius:0!important;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
 .cds-media{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important}
 .cds-textbg{padding:28px 22px;font-size:clamp(22px,6vw,30px);overflow-wrap:anywhere}
 .cds-cap{bottom:env(safe-area-inset-bottom,0px);padding:18px 16px 24px;max-height:35%;overflow:auto}
 .cds-uh{top:calc(22px + env(safe-area-inset-top,0px));left:12px;right:12px}
}

/* v2.4.0 — Story social actions and comment composer */
.cds-story-acts{position:absolute;z-index:12;right:12px;bottom:92px;display:flex;flex-direction:column;gap:17px;align-items:center}
.cds-story-acts button{border:0;background:rgba(0,0,0,.18);color:#fff;border-radius:22px;min-width:38px;min-height:42px;padding:4px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:27px;line-height:1;cursor:pointer;text-shadow:0 1px 4px #000}
.cds-story-acts button.on{color:#ff6a00}.cds-story-acts small{font-size:11px;color:#fff;margin-top:2px}
.cds-story-comments{position:absolute;z-index:30;left:0;right:0;bottom:0;height:min(62%,520px);background:#fff;color:#222;border-radius:18px 18px 0 0;display:flex;flex-direction:column;box-shadow:0 -10px 35px rgba(0,0,0,.24);overflow:hidden}
.cds-story-comments-head{height:52px;flex:0 0 52px;display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid #eee}
.cds-story-comments-close{border:0;background:none;font-size:27px;color:#444}.cds-story-comments-list{flex:1;min-height:0;overflow-y:auto;padding:12px 16px}
.cds-story-comment{display:flex;gap:10px;margin:0 0 14px}.cds-story-comment img{width:34px;height:34px;border-radius:50%;object-fit:cover}.cds-story-comment b{font-size:13px}.cds-story-comment small{display:block;color:#888;font-size:11px}.cds-story-comment p{margin:4px 0;font-size:13px;color:#333;white-space:pre-wrap}.cds-story-empty{color:#888;text-align:center;padding:20px}
.cds-story-comment-form{flex:0 0 auto;display:flex;gap:8px;padding:10px 12px calc(10px + env(safe-area-inset-bottom));border-top:1px solid #eee;background:#fff}.cds-story-comment-form textarea{flex:1;min-width:0;max-height:100px;border:1px solid #ddd;border-radius:18px;padding:9px 12px;resize:none;font:inherit}.cds-story-comment-form button{border:0;background:#ff6a00;color:#fff;border-radius:18px;padding:0 16px;font-weight:700}
@media(max-width:767px){.cds-story-comments{height:70%;border-radius:16px 16px 0 0}.cds-story-acts{right:9px;bottom:84px;gap:13px}}

/* v2.4.1 — keep story viewer media clean; no social action rail */
.cds-view .cds-story-acts{display:none!important}
