.storis {margin-block:16px}
.storis-strip {display:flex;gap:16px;overflow-x:auto;padding:6px 4px}
.storis-strip:empty {display:none}
.storis-strip button {background:none;border:0;color:inherit;font:inherit;font-size:13px;cursor:pointer;display:grid;justify-items:center;gap:5px;min-width:68px}
.storis-strip img,.storis-strip b {width:58px;height:58px;border-radius:50%;object-fit:cover;border:3px solid #dc2975;padding:2px;box-sizing:border-box}
.storis-strip b {display:grid;place-items:center;background:#fff0f6;color:#ba225e;font-size:25px}
.storis-strip [data-seen="true"] img {border-color:#b4abb0}
.storis-avatar {position:relative}
/* The story control must sit above the avatar photo link (z-index:3). */
.storis-avatar button[data-story] {position:absolute;inset:0;z-index:4;width:100%;height:100%;border:3px solid #dc2975;border-radius:50%;background:transparent;cursor:pointer}
.storis-avatar button[data-seen="true"] {border-color:#b4abb0}
.storis dialog {position:fixed;inset:0;margin:auto;border:0;padding:0;border-radius:18px;max-width:100vw;max-height:100dvh}
.storis dialog::backdrop {background:#170e19cc}
.storis dialog button {cursor:pointer}
.storis-view {background:#171318;color:white;width:min(430px,100vw)}
.storis-stage {position:relative;height:min(760px,90dvh);overflow:hidden}
.storis-media,.storis-media>* {width:100%;height:100%;object-fit:contain}
.storis-bars,.storis-view header,.storis-caption,.storis-stage footer {position:absolute;z-index:1;left:14px;right:14px}
.storis-bars {top:10px;display:flex;gap:4px}.storis-bars i {flex:1;background:#ffffff55;height:3px;border-radius:4px}.storis-bars i.on {background:white}
.storis header,.storis-stage footer {display:flex;align-items:center;justify-content:space-between}
.storis-view header {top:22px;text-shadow:0 1px 4px black}
.storis-view button {background:#201821aa;color:white;border:0;border-radius:18px;padding:7px 14px}
.storis-caption {bottom:52px;white-space:pre-wrap;overflow-wrap:anywhere;background:#211927a8;border-radius:10px;padding:8px}
.storis-caption:empty {display:none}.storis-stage footer {bottom:12px}
.storis-editor {width:min(420px,96vw)}.storis-editor form {display:grid;gap:12px;padding:20px}.storis-editor label {display:grid;gap:4px}
.storis-preview>* {display:block;max-width:100%;max-height:32dvh;margin:auto}
@media(max-width:600px){.storis-view {width:100vw;border-radius:0!important}.storis-stage {height:100dvh}}


.storis-avatar-actions { position:relative; flex-shrink:0; width:fit-content; }
#profile-header .storis-profile-add { position:absolute; right:0; bottom:0; z-index:4; display:grid; place-items:center; width:38px; height:38px; padding:0; border:3px solid white; border-radius:50%; background:#d92573; color:white; font:28px/1 system-ui; cursor:pointer; box-shadow:0 2px 8px #51203b30; }
.storis-add-caption { position:absolute; top:100%; left:0; width:100%; display:block; text-align:center; font-size:12px; color:#a92160; margin-top:5px; }/* Story composer: scoped so site navigation and other dialogs stay unchanged. */
.storis .storis-editor {width:min(820px,calc(100vw - 32px));max-height:calc(100dvh - 32px);background:#fff;color:#382338;border-radius:24px;overflow:auto;box-shadow:0 24px 80px #160d2340}
.storis-editor form {display:block;padding:26px}
.storis-editor header {gap:20px;margin-bottom:22px}
.storis-editor h2 {font-size:25px;line-height:1.25;margin:0 0 6px}
.storis-editor header p {font-size:14px;color:#847585;margin:0}
.storis-editor [data-close] {flex:none;display:grid;place-items:center;width:40px;height:40px;border:0;border-radius:50%;background:#f7f2f6;color:#685566;font:26px/1 sans-serif}
.storis-editor-grid {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:26px}
.storis-upload {position:relative;min-height:390px;aspect-ratio:9/14;overflow:hidden;border:1px dashed #e5c7d7;border-radius:18px;background:#fcf5f9;display:grid;place-items:center}
.storis-upload-empty {text-align:center;padding:24px;display:grid;justify-items:center;gap:14px}
.storis-upload-empty>span {display:grid;place-items:center;width:64px;height:64px;border-radius:20px;background:#ffe3ef;color:#e82677;font-size:36px}
.storis-upload-empty strong {font-size:21px}.storis-upload-empty p {font-size:13px;color:#857383;margin:0}
.storis-editor [data-pick] {padding:12px 16px;border:1px solid #ebcddc;border-radius:12px;background:white;color:#b91e62;font-family:inherit;font-size:14px;font-weight:600;line-height:1.4}
.storis-preview {position:absolute;inset:0;display:none;background:#211a25}
.storis-editor .storis-preview>* {width:100%;height:100%;max-height:none;object-fit:contain}
.storis-editor.has-media .storis-preview {display:block}.storis-editor.has-media .storis-upload-empty {display:none}
.storis-preview-caption {position:absolute;bottom:48px;left:16px;right:16px;padding:10px;border-radius:10px;background:#201722a6;color:white;white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;pointer-events:none;max-height:38%;overflow:auto}
.storis-preview-caption:empty,.storis-editor:not(.has-media) .storis-preview-caption {display:none}
.storis-editor-fields {display:flex;flex-direction:column;min-width:0;gap:12px}
.storis-file {position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}
.storis-editor label {display:grid;gap:10px;font-size:14px;font-weight:600}
.storis-editor textarea {box-sizing:border-box;resize:vertical;width:100%;min-height:120px;border:1px solid #e8dce5;border-radius:14px;padding:14px;font-family:inherit;font-size:16px;line-height:1.5;background:#fff;color:#382338}
.storis-editor textarea:focus {outline:2px solid #ef2878;outline-offset:2px}
.storis-counter {align-self:flex-end;color:#877b88;font-size:12px;margin-top:-6px}
.storis-filename {font-size:12px;color:#877b88;overflow-wrap:anywhere}.storis-filename:empty{display:none}
.storis-lifetime {padding:16px;background:#fcf5f9;border-radius:14px;font-size:14px;margin:4px 0}.storis-lifetime span {display:block;color:#877b88;font-size:12px;line-height:1.5;margin-top:8px}
.storis-upload-status {color:#ad245d;font-size:14px;line-height:1.5;margin:0}.storis-upload-status:empty{display:none}
.storis-publish {margin-top:auto;min-height:48px;border:0;border-radius:13px;background:#ef2878;color:#fff;font-size:15px;font-weight:600;padding:12px 16px}
.storis-publish:disabled {background:#eddfe6;color:#95828d;cursor:default}.storis-notice{font-size:14px;padding:12px;background:#fff2dd;border-radius:12px;margin-bottom:16px}
@media(max-width:600px){
 .storis .storis-editor {width:100%;max-width:100%;max-height:100dvh;height:100dvh;border-radius:0}
 .storis-editor form {padding:20px 18px calc(24px + env(safe-area-inset-bottom))}
 .storis-editor-grid {grid-template-columns:1fr;gap:18px}
 .storis-upload {min-height:220px;aspect-ratio:auto;height:32dvh}
 .storis-editor.has-media .storis-upload {height:45dvh}
 .storis-editor h2 {font-size:23px}.storis-editor textarea{min-height:90px}
 .storis-editor-fields{gap:10px}.storis-editor header{margin-bottom:18px}
}
.storis .storis-view header strong,.storis .storis-view .storis-caption {color:#fff}

/* Story interactions stay above media navigation and pause playback while reading. */
.storis-view .storis-author {color:white;text-decoration:none;max-width:80%;overflow-wrap:anywhere}
.storis-view .storis-author:hover {text-decoration:underline}
.storis-view .storis-actions {position:absolute;bottom:54px;left:14px;right:14px;z-index:2;display:flex;gap:8px}
.storis-actions button {display:flex;align-items:center;justify-content:center;gap:7px;min-height:42px;flex:1;font-size:13px}
.storis-actions svg {width:18px;height:18px;flex:none}
.storis-actions svg,.storis-actions svg path {color:inherit;stroke:currentColor;stroke-width:1.8;fill:none}
.storis-actions [aria-pressed=true] {color:#ff70a7;background:#361c2d}
.storis-actions [aria-pressed=true] svg path {fill:currentColor}
.storis-view .storis-caption {bottom:104px;max-height:25%;overflow:auto}
.storis-view .storis-comments {position:absolute;z-index:4;bottom:0;left:0;right:0;max-height:75%;overflow:auto;background:#fff;color:#382338;padding:16px;border-radius:20px 20px 0 0;box-sizing:border-box}
.storis-comments[hidden] {display:none}
.storis-comments-heading {display:flex;align-items:center;justify-content:space-between;gap:12px}
.storis-comments a {color:#ae225c;font-weight:600}
.storis-comments article {padding:12px 0;border-bottom:1px solid #eedfe6;overflow-wrap:anywhere}
.storis-comments time {display:block;font-size:11px;color:#786775;margin-top:4px}
.storis-comments article p {white-space:pre-wrap;margin:8px 0;color:#382338}
.storis-comments button {background:#ffedf4;color:#a51f58}
.storis-comment-form {display:grid;gap:8px;margin-top:12px}
.storis-comment-form label {display:grid;gap:6px;font-size:13px}
.storis-comment-form textarea {box-sizing:border-box;width:100%;resize:vertical;max-height:160px;border:1px solid #dcc5d1;border-radius:12px;padding:10px;background:white;color:#382338;font:inherit}
.storis-comment-form button {background:#ef2878;color:white;min-height:42px}
.storis-view .storis-feedback {position:absolute;z-index:5;top:65px;left:14px;right:14px;background:#311d2be8;color:white;border-radius:10px;padding:8px;font-size:13px;pointer-events:none}
.storis-feedback:empty {display:none}
.storis-view button:disabled {opacity:.5;cursor:wait}

.storis-actions button span {color:inherit}
.storis-comments-heading strong,.storis-comment-form label {color:#382338}

.storis-view .storis-audience-open {position:absolute;z-index:2;top:65px;left:14px;font-size:13px}
.storis-view .storis-audience {position:absolute;z-index:4;bottom:0;left:0;right:0;max-height:75%;overflow:auto;background:white;color:#382338;padding:16px;border-radius:20px 20px 0 0;box-sizing:border-box}
.storis-audience[hidden],.storis-audience-open[hidden] {display:none}
.storis-audience-heading {display:flex;align-items:center;justify-content:space-between}
.storis-audience-heading strong,.storis-audience p,.storis-audience-list span {color:#382338}
.storis-audience>p {font-size:12px;line-height:1.5;margin:12px 0}
.storis-audience-tabs {display:flex;gap:8px;margin-top:12px}
.storis-audience button {background:#fff0f6;color:#a51f58}
.storis-audience-tabs [aria-pressed=true] {background:#ef2878;color:white}
.storis-audience-list a {display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid #eee2eb;text-decoration:none}
.storis-audience-list img {width:40px;height:40px;flex:none;object-fit:cover;border-radius:50%}
.storis-audience-list span {flex:1;min-width:0;overflow-wrap:anywhere}
.storis-audience-list b {color:#ef2878}
