.stories {
    --story-border: #e1e4e9;
    --story-ink: #393c43;
    --story-muted: #9399a5;
    --story-card-height: 184px;
    --story-ui-font: 13px;
    --story-ui-small: 11px;
    --story-ui-target: 36px;
    position: relative;
    margin: 0 0 10px;
    min-width: 0;
    color: var(--story-ink);
    font-size: var(--story-ui-font);
    line-height: 1.45;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
.stories *, .stories *::before, .stories *::after { box-sizing: border-box; }
.stories.site-intro-highlight::before { inset: -3px -6px 5px; }
.stories.site-intro-highlight::after { inset: 1px -3px 8px; }
.stories > .site-intro-highlight__marker { top: -5px; right: 10px; }
@media (prefers-reduced-motion: reduce) {
    .stories.site-intro-highlight.is-session-animated::before,
    .stories.site-intro-highlight.is-session-animated::after { animation: none; }
}
.stories button, .stories textarea, .stories input, .stories select { font: inherit; }
.stories button { cursor: pointer; }
.stories button:disabled { cursor: default; opacity: .45; }
.stories button:focus-visible, .stories a:focus-visible, .stories textarea:focus-visible, .stories input:focus-visible + label {
    outline: 2px solid #7d8798;
    outline-offset: 4px;
}
.stories [hidden] { display: none !important; }
.stories-scroll-controls { position: absolute; z-index: 2; top: calc(7px + var(--story-card-height) / 2); left: 8px; right: 8px; display: flex; justify-content: space-between; transform: translateY(-50%); pointer-events: none; }
.stories-scroll-controls .stories-small-button { width: 36px; height: 36px; border: 0; border-radius: 50%; color: #737b87; background: #fff; pointer-events: auto; box-shadow: 0 2px 10px rgba(30,40,60,.18); transition: background-color .18s ease, box-shadow .18s ease; }
.stories-scroll-controls .stories-small-button:hover:not(:disabled) { background: #fafbfc; box-shadow: 0 4px 14px rgba(30,40,60,.24); }
.stories-scroll-controls button:disabled { visibility: hidden; pointer-events: none; }
.stories-small-button { display: inline-grid; place-items: center; flex: 0 0 auto; width: 28px; height: 28px; padding: 0; border: 1px solid var(--story-border); border-radius: 7px; color: #7c8290; background: #fff; font-size: 10px !important; transition: background .15s; }
.stories-small-button:hover:not(:disabled) { background: #f4f5f7; }
.stories-rail { display: flex; align-items: stretch; gap: 10px; overflow-x: auto; padding: 7px 1px 15px; scrollbar-width: none; -ms-overflow-style: none; scroll-snap-type: x proximity; }
.stories-rail::-webkit-scrollbar { display: none; width: 0; height: 0; }
.story-card { position: relative; display: flex; flex: 0 0 115px; width: 115px; height: var(--story-card-height); padding: 12px 8px; overflow: hidden; border: 1px solid var(--story-border); border-radius: 11px; isolation: isolate; color: #fff; background: #3e444d; text-align: center; scroll-snap-align: start; }
.story-card, .story-empty-preview { box-shadow: 0 8px 24px rgba(31,41,55,.045); transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease; }
.story-card:hover, .story-card:focus-visible, .story-empty-preview:hover { border-color: #c5cbd2; box-shadow: 0 10px 28px rgba(31,41,55,.08); }
.story-card::after { position: absolute; z-index: -1; inset: 0; content: ""; background: linear-gradient(180deg,rgba(0,0,0,.02) 22%,rgba(0,0,0,.74) 100%); }
.story-card:hover .story-card-cover, .story-card:focus-visible .story-card-cover { transform: scale(1.01); }
.story-card-cover { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.story-card--text .story-card-text { position: absolute; top: 25px; left: 10px; right: 10px; display: -webkit-box; overflow: hidden; color: #fff; font-size: 12px; font-weight: 500; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; -webkit-line-clamp: 5; -webkit-box-orient: vertical; }
.story-card-video { position: absolute; top: 12px; right: 11px; opacity: .85; font-size: 12px; }
.story-card-avatar { position: absolute; z-index: 1; bottom: 36px; left: 50%; display: grid; grid-template: minmax(0,1fr) / minmax(0,1fr); place-items: center; width: 43px; height: 43px; padding: 3px; overflow: hidden; border: 2px solid #aab0ba; border-radius: 50%; color: #fff; background: #454a53; transform: translateX(-50%); font-size: 14px; font-weight: 600; }
.story-card--unseen .story-card-avatar { border-color: #e9edf3; box-shadow: 0 0 0 2px #6e819c; }
.story-card-avatar img { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; border-radius: 50%; object-fit: cover; }
.story-card-name { position: absolute; right: 6px; bottom: 13px; left: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 600; line-height: 1.4; }
.story-card--create { color: #535b67; border: 1px solid #e1e4e9; background: #f3f4f6; }
.story-card--create::after { background: linear-gradient(0deg,#f5f6f8 0%,rgba(245,246,248,.15) 90%); }
.story-card--create:hover { background: #eceef2; }
.story-create-art { position: absolute; left: 26px; top: 25px; width: 64px; height: 80px; transform: rotate(9deg); }
.story-create-art span { position: absolute; inset: 0; border-radius: 8px; border: 1px solid #d7dce4; background: #e7eaf0; }
.story-create-art span:nth-child(1) { transform: rotate(-19deg) translate(-9px,4px); background: #f8f9fb; }
.story-create-art span:nth-child(2) { transform: rotate(-5deg); }
.story-create-art span:nth-child(3) { top: 9px; left: 8px; right: 8px; bottom: 9px; border: 0; background: linear-gradient(150deg,#d7dce4,#e8ebf1); }
.story-create-plus { position: absolute; bottom: 56px; left: 50%; display: grid; place-items: center; width: 33px; height: 33px; border: 3px solid #f4f5f7; border-radius: 50%; background: #fff; color: #657184; transform: translateX(-50%); font-size: 13px; box-shadow: 0 1px 6px rgba(30,40,60,.09); }
.story-card--create .story-card-name { bottom: 35px; }
.story-card-hint { position: absolute; left: 5px; right: 5px; bottom: 10px; font-size: 10px; color: #7e8796; line-height: 1.25; }
.stories-empty { display: flex; flex: 0 0 auto; gap: 10px; }
.story-empty-preview { position: relative; display: block; flex: 0 0 115px; width: 115px; height: var(--story-card-height); border: 1px solid var(--story-border); border-radius: 11px; background: linear-gradient(155deg,#f8f9fb,#eef0f4); scroll-snap-align: start; }
.story-empty-preview:nth-child(even) { background: linear-gradient(155deg,#f4f5f8,#f9fafb); }
.story-empty-preview-avatar { position: absolute; left: 50%; bottom: 36px; width: 43px; height: 43px; border: 3px solid #f7f8fa; border-radius: 50%; background: #e3e6ec; box-shadow: 0 0 0 1px #e0e4ea; transform: translateX(-50%); }
.story-empty-preview-name { position: absolute; left: 24px; right: 24px; bottom: 18px; height: 6px; border-radius: 4px; background: #e0e4ea; }
.stories-feed-status:empty { display: none; }
.stories-feed-status { margin: 5px 0 0; color: #9a6262; font-size: 12px; line-height: 1.5; }
.stories--profile { margin: 0; }
.stories--profile > .stories-scroll-controls, .stories--profile > .stories-rail, .stories--profile > .stories-feed-status { display: none; }
.stories-sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
body.stories-dialog-open { overflow: hidden; }
.stories-dialog { position: fixed; padding: 0; border: 0; font-family: inherit; font-size: var(--story-ui-font); line-height: 1.45; overscroll-behavior: contain; }
.stories-dialog::backdrop { background: rgba(18,20,25,.7); backdrop-filter: blur(5px); }
.stories-viewer { inset: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; background: #111214; color: #fff; overflow: hidden; }
.stories-viewer::backdrop { background: #111214; }
.stories-viewer-layout { display: grid; grid-template-columns: minmax(0,230px) minmax(0,max-content) minmax(0,230px); align-items: center; justify-content: center; gap: clamp(40px,6vw,110px); height: 100%; padding: 28px 70px; }
.story-side-preview--previous { grid-column: 1; grid-row: 1; }
.story-viewer-center { grid-column: 2; grid-row: 1; }
.story-side-preview--next { grid-column: 3; grid-row: 1; }
.story-viewer-center { position: relative; flex: 0 0 auto; width: min(430px,calc((100dvh - 104px) * .5625)); }
.story-screen { position: relative; isolation: isolate; width: 100%; aspect-ratio: 9/16; overflow: hidden; border-radius: 12px; background: #252a31; }
.story-viewer-media, .story-viewer-media > img, .story-viewer-media > video { position: absolute; inset: 0; width: 100%; height: 100%; }
.story-viewer-media { overflow: hidden; }
.story-viewer-canvas-overlay { position: absolute; z-index: 3; inset: 0; container-type: inline-size; pointer-events: none; }
.story-viewer-canvas-overlay .story-source-view-link { pointer-events: auto; }
.story-viewer-media > img, .story-viewer-media > video { object-fit: contain; }
.story-top-shade { position: absolute; z-index: 1; inset: 0 0 auto; height: 150px; pointer-events: none; background: linear-gradient(rgba(0,0,0,.6),transparent); }
.story-progress { position: absolute; z-index: 4; top: 11px; left: 11px; right: 11px; display: flex; gap: 4px; }
.story-progress-track { flex: 1; overflow: hidden; height: 3px; border-radius: 4px; background: rgba(255,255,255,.3); }
.story-progress-fill { display: block; width: 100%; height: 100%; background: #fff; transform: scaleX(0); transform-origin: left; }
.story-viewer-header { position: absolute; z-index: 4; top: 24px; left: 13px; right: 10px; display: flex; align-items: center; gap: 8px; }
.story-viewer-author { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; color: white !important; text-decoration: none !important; }
.story-viewer-author .story-author-avatar { flex-shrink: 0; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; object-fit: cover; background: rgba(255,255,255,.15); font-size: 12px; }
.story-author-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.story-author-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.story-author-time { color: rgba(255,255,255,.7); font-size: 11px; line-height: 1.35; }
.story-viewer-tools { display: flex; gap: 3px; flex-shrink: 0; }
.story-icon-button { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; padding: 7px; border: 0; border-radius: 50%; color: inherit; background: transparent; width: var(--story-ui-target); height: var(--story-ui-target); font-size: 15px !important; }
.story-icon-button:hover { background: rgba(255,255,255,.12); }
.story-tap-surface { position: absolute; z-index: 2; inset: 75px 0 0; touch-action: none; user-select: none; -webkit-user-select: none; }
.story-caption { position: absolute; z-index: 1; right: 22px; bottom: 34px; left: 22px; max-height: 65%; overflow: hidden; color: white; white-space: pre-wrap; overflow-wrap: anywhere; font-size: clamp(13px,1.25vw,17px); line-height: 1.5; text-align: center; text-shadow: 0 1px 10px rgba(0,0,0,.6); pointer-events: none; }
.story-screen--text .story-caption { top: 50%; bottom: auto; max-height: 74%; transform: translateY(-50%); font-size: clamp(19px,1.75vw,26px); font-weight: 500; }
.story-screen--media:has(.story-caption:not(:empty))::after { position: absolute; z-index: 0; content: ""; inset: 45% 0 0; pointer-events: none; background: linear-gradient(transparent,rgba(0,0,0,.45)); }
.story-media-message { position: absolute; z-index: 2; top: 45%; left: 20px; right: 20px; text-align: center; font-size: 13px; line-height: 1.5; pointer-events: none; }
.story-paused-label { position: absolute; z-index: 4; bottom: 14px; left: 50%; transform: translateX(-50%); padding: 5px 12px; border-radius: 20px; background: rgba(0,0,0,.35); color: rgba(255,255,255,.9); font-size: 12px; pointer-events: none; }
.story-viewer-footer { display: flex; align-items: center; gap: 12px; padding: 11px 3px 0; min-height: 43px; }
.story-viewer-counter { color: #a0a5af; font-size: 12px; }
.story-viewer-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; color: #b6bac3; font-size: 13px; }
.story-viewer-actions [data-story-views] { display: flex; align-items: center; gap: 6px; }
.story-like { display: flex; align-items: center; justify-content: center; gap: 7px; min-width: var(--story-ui-target); min-height: var(--story-ui-target); padding: 5px; border: 0; background: none; color: #dddfe5; font-size: 13px !important; }
.story-like i { font-size: 19px; }
.story-like[aria-pressed="true"] { color: #e399a2; }
.story-delete { font-size: 13px !important; }
.story-viewer-error { position: absolute; margin: 6px 0 0; width: 100%; color: #e9b1b1; font-size: 12px; line-height: 1.5; text-align: center; }
.story-round-button { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; color: #d7d9df; background: rgba(255,255,255,.06); font-size: 13px !important; }
.story-round-button:hover { background: rgba(255,255,255,.13); }
.stories-dialog-close { position: absolute; z-index: 10; right: 24px; top: 22px; }
.story-nav { position: absolute; top: calc(50% - 18px); }
.story-nav--previous { left: 24px; }
.story-nav--next { right: 24px; }
.story-side-preview { position: relative; width: 100%; max-width: 230px; aspect-ratio: 9/16; padding: 0; overflow: hidden; border: 0; border-radius: 11px; color: #fff; background: #252a31; opacity: .4; transition: opacity .2s, transform .2s; }
.story-side-preview:hover { opacity: .72; transform: translateY(-2px); }
.story-side-preview > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story-side-preview::after { position: absolute; inset: 0; content: ""; background: linear-gradient(0deg,rgba(0,0,0,.7),transparent 75%); }
.story-side-copy { position: absolute; z-index: 1; bottom: 20px; left: 12px; right: 12px; display: flex; flex-direction: column; align-items: center; gap: 9px; font-size: 12px; }
.story-side-copy .story-author-avatar { width: 40px; height: 40px; border: 2px solid #fff; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: #5d6572; }
.story-side-copy > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story-side-text { display: block; padding: 30px 18px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; max-height: 75%; overflow: hidden; }
.story-composer { width: min(850px,calc(100vw - 36px)); max-width: none; max-height: calc(100dvh - 36px); margin: auto; border-radius: 14px; background: #fff; color: var(--story-ink); box-shadow: 0 20px 90px rgba(0,0,0,.22); }
.story-composer-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 26px 18px; border-bottom: 1px solid var(--story-border); }
.story-composer-header h2 { margin: 0; font-size: 19px; font-weight: 500; line-height: 1.25; }
.story-composer-header p { margin: 5px 0 0; font-size: 12px; line-height: 1.4; color: var(--story-muted); }
.story-composer-body { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(280px,1fr); height: min(675px,calc(100dvh - 130px)); }
.story-composer-preview-shell { display: flex; align-items: center; justify-content: center; padding: 22px; background: #f3f4f6; border-right: 1px solid var(--story-border); }
.story-composer-preview { position: relative; width: min(330px,calc((100dvh - 177px) * .5625)); max-width: 100%; aspect-ratio: 9/16; max-height: none; min-height: 0; overflow: hidden; border-radius: 10px; background: #2f343b; color: #fff; }
.story-composer-media, .story-composer-media > img, .story-composer-media > video { position: absolute; width: 100%; height: 100%; inset: 0; }
.story-composer-media > img, .story-composer-media > video { object-fit: contain; }
.story-composer-placeholder { position: absolute; inset: 0; padding: 25px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.story-upload-icon { display: grid; place-items: center; width: 48px; height: 55px; margin-bottom: 20px; border: 1px dashed rgba(255,255,255,.5); border-radius: 12px; font-size: 21px; }
.story-upload-icon svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.story-composer-placeholder strong { margin-bottom: 8px; font-size: 14px; font-weight: 500; line-height: 1.4; }
.story-composer-placeholder > span:not(.story-upload-icon) { margin-bottom: 19px; color: rgba(255,255,255,.65); font-size: 12px; line-height: 1.6; }
.stories-button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 40px; padding: 10px 15px; border: 1px solid #dce0e6; border-radius: 7px; background: #fff; color: #626a77; font-size: 13px !important; font-weight: 500; line-height: 1.3; }
.stories-button:hover:not(:disabled) { background: #f4f5f7; }
.stories-button--light { color: #4d555f; border-color: rgba(255,255,255,.4); background: #fff; }
.stories-button--primary { width: 100%; border-color: #525964; background: #525964; color: #fff; }
.stories-button--primary:hover:not(:disabled) { background: #3d444e; }
.story-background-swatch { position: relative; width: 23px; height: 23px; padding: 0; border: 1px solid rgba(30,40,50,.08); border-radius: 50%; }
.story-background-swatch[aria-pressed="true"]::after { position: absolute; content: ""; inset: -4px; border: 1px solid #8f98a6; border-radius: 50%; }
.story-composer-publish { margin-top: auto; padding: 20px 25px 23px; }
.story-composer-error { margin: 0 0 10px; color: #a45e5e; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.story-composer-error:empty { display: none; }
.story-composer-caption { position: absolute; bottom: 28px; left: 20px; right: 20px; margin: 0; max-height: 70%; overflow: hidden; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; text-align: center; text-shadow: 0 1px 8px rgba(0,0,0,.55); pointer-events: none; }
.story-composer-preview.is-text .story-composer-caption { top: 50%; bottom: auto; transform: translateY(-50%); font-size: 20px; font-weight: 500; }
.story-drop-label { display: none; }
.story-source-view-link { position: absolute; z-index: 4; left: 50%; bottom: 18px; transform: translateX(-50%); max-width: calc(100% - 36px); padding: 10px 16px; border-radius: 20px; color: #414853 !important; background: #fff; box-shadow: 0 3px 14px rgba(0,0,0,.18); font-size: 13px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none !important; }
.story-source-view-link:hover { background: #f1f3f7; }
.story-screen--source .story-caption { bottom: 72px; }
.story-publication-card { overflow: hidden; border: 1px solid #e1e5eb; border-radius: 12px; background: #fff; color: #414751; box-shadow: 0 10px 32px rgba(0,0,0,.12); }
.story-publication-kind { display: block; padding: 13px 16px; color: #8b939f; font-size: 12px; }
.story-publication-cover { display: block; width: 100%; max-height: 260px; object-fit: contain; background: #f1f3f6; }
.story-publication-title { display: block; padding: 16px 16px 10px; font-size: 14px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.story-publication-brand { display: block; padding: 0 16px 15px; color: #949ca9; font-size: 11px; }
.story-viewer-media > .story-publication-card { position: absolute; top: 50%; left: 9%; width: 82%; max-height: 70%; transform: translateY(-50%); }
.story-share-offer { width: min(420px,calc(100vw - 32px)); height: fit-content; max-height: calc(100dvh - 32px); margin: auto; overflow-y: auto; border-radius: 14px; color: #454b55; background: #fff; box-shadow: 0 20px 80px rgba(0,0,0,.2); }
.story-share-offer-body { position: relative; padding: 28px; }
.story-share-offer-close { position: absolute; top: 13px; right: 13px; }
.story-share-offer-symbol { display: block; margin-bottom: 18px; color: #8a95a6; font-size: 25px; }
.story-share-offer h2 { margin: 0 25px 10px 0; font-size: 17px; line-height: 1.45; font-weight: 500; }
.story-share-offer-body > p { margin: 0 0 20px; font-size: 13px; line-height: 1.6; color: #9098a5; }
.story-share-offer .story-publication-cover { max-height: 180px; }
.story-share-offer [data-story-offer-card] { margin-bottom: 22px; }
.story-share-offer-actions { display: flex; align-items: center; gap: 10px; }
.story-share-offer-actions .stories-button--primary { width: auto; flex: 1; }
.model-story-offer[hidden] { display: none !important; }
.model-story-offer { margin-bottom: 10px; }
.story-composer-preview.is-dragging .story-drop-label { position: absolute; z-index: 5; display: grid; place-items: center; inset: 8px; border: 2px dashed #e3e7ee; border-radius: 6px; background: rgba(47,52,59,.94); color: #fff; font-size: 13px; }
@media (max-width: 1023px) {
    .stories-viewer-layout { grid-template-columns: minmax(0,1fr); padding-inline: 60px; gap: 0; }
    .story-viewer-center { grid-column: 1; justify-self: center; width: min(430px,calc((100dvh - 112px) * .5625),100%); }
    .story-side-preview { display: none !important; }
}
@media (max-width: 600px) {
    .stories { --story-card-height: 174px; margin-bottom: 10px; }
    .stories--profile { margin: 0; }
    .stories-rail { gap: 8px; }
    .story-card { flex-basis: 108px; width: 108px; height: var(--story-card-height); border-radius: 9px; }
    .story-card-name { font-size: 11px; }
    .story-create-art { top: 19px; left: 22px; width: 55px; height: 68px; }
    .story-card-hint { font-size: 10px; }
    .stories-empty { gap: 8px; }
    .story-empty-preview { flex-basis: 108px; width: 108px; height: var(--story-card-height); border-radius: 9px; }
    .stories-viewer-layout { display: block; padding: 0; }
    .story-viewer-center { display: flex; flex-direction: column; justify-content: center; width: 100%; height: 100%; }
    .story-screen { flex: 1; min-height: 0; width: 100%; aspect-ratio: auto; border-radius: 0; }
    .story-viewer-media, .story-viewer-canvas-overlay { inset: auto; left: 50%; top: 50%; width: min(100%,calc((100dvh - 64px - env(safe-area-inset-bottom)) * .5625)); height: auto; aspect-ratio: 9/16; transform: translate(-50%,-50%); }
    .story-side-preview, .story-nav { display: none !important; }
    .stories-dialog-close { width: 44px; height: 44px; top: max(24px,calc(env(safe-area-inset-top) + 15px)); right: max(5px,env(safe-area-inset-right)); border: 0; background: transparent; font-size: 18px !important; }
    .story-progress { top: max(10px,calc(env(safe-area-inset-top) + 5px)); }
    .story-viewer-header { left: max(12px,env(safe-area-inset-left)); right: max(51px,calc(env(safe-area-inset-right) + 46px)); top: max(24px,calc(env(safe-area-inset-top) + 15px)); }
    .story-viewer-author .story-author-avatar { width: 34px; height: 34px; }
    .story-author-name { font-size: 13px; }
    .story-author-time { font-size: 11px; }
    .story-caption { font-size: 16px; bottom: 32px; }
    .story-screen--text .story-caption { font-size: 25px; }
    .story-viewer-footer { flex: 0 0 auto; padding: 8px max(14px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left)); min-height: 64px; background: #1b1d21; }
    .story-viewer-error { z-index: 5; bottom: 65px; padding: 5px 20px; color: white; }
    .story-composer { width: 100%; max-width: none; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; overflow-y: auto; }
    .story-composer-header { padding: max(17px,env(safe-area-inset-top)) 18px 16px; }
    .story-composer-header h2 { font-size: 17px; }
    .story-composer-header p { font-size: 12px; }
    .story-composer-body { display: flex; flex-direction: column; height: auto; }
    .story-composer-preview-shell { padding: 18px; border: 0; }
    .story-composer-preview { width: 205px; min-height: 0; height: auto; max-height: none; }
    .story-composer-placeholder { padding: 17px; }
    .story-composer-placeholder strong { font-size: 14px; }
    .story-composer-placeholder > span:not(.story-upload-icon) { font-size: 12px; }
    .story-upload-icon { width: 35px; height: 41px; margin-bottom: 13px; font-size: 16px; }
    .story-composer-publish { padding: 20px 22px max(22px,env(safe-area-inset-bottom)); }
    .story-composer-caption { left: 14px; right: 14px; font-size: 11px; }
    .story-composer-preview.is-text .story-composer-caption { font-size: 15px; }
}
.story-composer.story-composer--direct { --story-border: #454a52; --story-ink: #edf0f5; --story-muted: #aeb5c0; --story-canvas-width: clamp(288px,calc((100dvh - 198px) * .5625),380px); --story-video-canvas-width: clamp(288px,calc((100dvh - 310px) * .5625),380px); width: min(460px,calc(100vw - 24px)); height: fit-content; max-height: calc(100dvh - 24px); overflow: auto; color-scheme: dark; color: var(--story-ink); background: #2c2f34; box-shadow: 0 20px 80px rgba(0,0,0,.38); scrollbar-width: thin; }
.story-composer--direct .story-composer-form { min-width: 0; }
.story-composer--direct .story-composer-header { padding: 16px 18px 13px; border-bottom: 1px dashed rgba(220,227,238,.15); background: transparent; }
.story-composer--direct .story-composer-header h2 { font-size: clamp(18px,1.3vw,20px); }
.story-composer--direct .story-composer-header p { margin-top: 4px; font-size: 12px; }
.story-composer--direct .story-composer-body { display: flex; flex-direction: column; height: auto; }
.story-composer--direct .story-composer-preview-shell { flex: 0 0 auto; min-width: 0; min-height: auto; padding: 12px; border: 0; background: transparent; }
.story-composer--direct .story-composer-preview-shell.has-video { flex-direction: column; gap: 10px; }
.story-composer--direct .story-composer-preview-shell.has-video > .story-composer-preview,
.story-composer--direct .story-composer-preview-shell.has-video > [data-composer-video-trim] { width: min(100%,var(--story-video-canvas-width)); max-width: 100%; flex-shrink: 0; }
.story-composer--direct .story-composer-preview { flex: 0 0 auto; width: min(100%,var(--story-canvas-width)); max-width: 100%; min-height: 0; height: auto; max-height: none; aspect-ratio: 9/16; border-radius: 12px; container-type: inline-size; box-shadow: none; }
.story-composer--direct .story-composer-preview::after { position: absolute; z-index: 1; inset: 9px; border: 1px dashed rgba(220,227,238,.21); border-radius: 8px; content: ""; pointer-events: none; }
.story-composer--direct .story-composer-preview.has-editable-media::after { opacity: .35; }
.story-composer--direct .story-composer-preview:is(.is-editing-text,.is-drawing)::after { opacity: 0; }
.story-composer--direct .story-composer-publish { position: relative; padding: 0 18px 16px; margin: 0; background: transparent; }
.story-composer--direct .story-composer-publish::before { position: absolute; top: -6px; left: 18px; right: 18px; border-top: 1px dashed rgba(220,227,238,.12); content: ""; pointer-events: none; }
.story-composer--direct .stories-small-button { border-color: #dce0e5; color: #505761; background: #e2e5e9; }
.story-composer--direct .stories-small-button:hover:not(:disabled) { color: #30363e; background: #f3f4f6; }
/* Match the gallery publication editor's circular close control. */
.story-composer--direct .story-composer-header > [data-composer-close] { width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.24); border-radius: 50%; color: #fff; background: rgba(18,18,18,.66); box-shadow: 0 14px 34px rgba(0,0,0,.3); backdrop-filter: blur(8px); transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.story-composer--direct .story-composer-header > [data-composer-close]:hover:not(:disabled) { border-color: rgba(255,255,255,.38); color: #fff; background: rgba(18,18,18,.82); transform: translateY(-1px); }
.story-composer--direct :is(.stories-button--light,.stories-button--primary) { border-color: #e0e3e8; color: #343a43; background: #e4e7eb; }
.story-composer--direct :is(.stories-button--light,.stories-button--primary):hover:not(:disabled) { border-color: #f1f3f6; background: #f3f5f7; }
.story-composer--direct .stories-button--primary:disabled { border-color: #adb4be; color: #505a68; background: #b8bec7; opacity: .55; }
.story-composer--direct :is(.stories-small-button,.stories-button):focus-visible { outline-color: #c0cde1; }
.story-composer--direct .story-composer-placeholder > span:not(.story-upload-icon) { color: rgba(255,255,255,.7); }
.story-composer--direct .story-upload-icon { border-color: rgba(221,229,242,.45); color: #edf2fa; }
.story-composer--direct .story-composer-error { color: #f0a6af; }
.story-composer--direct .story-upload-limits { display: block; max-width: 95%; margin-top: 5px; color: #aeb5c0; font-size: clamp(10px, 3.1cqw, 12px); font-weight: 400; line-height: 1.6; white-space: pre-line; text-wrap: balance; }
.story-upload-progress { display: grid; gap: 6px; margin-bottom: 12px; color: #cdd3dd; font-size: 12px; line-height: 1.4; }
.story-upload-progress[hidden] { display: none; }
.story-upload-progress progress { display: block; width: 100%; height: 4px; border: 0; border-radius: 999px; overflow: hidden; accent-color: #e4e7eb; background: #454a52; }
.story-upload-progress progress::-webkit-progress-bar { border-radius: inherit; background: #454a52; }
.story-upload-progress progress::-webkit-progress-value { border-radius: inherit; background: #e4e7eb; }
.story-upload-progress progress::-moz-progress-bar { border-radius: inherit; background: #e4e7eb; }
.story-composer--direct .story-type-counter { color: rgba(255,255,255,.65); }
.story-composer--direct .story-text-popover textarea::placeholder { color: rgba(255,255,255,.65); }
.story-composer-bottom-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.story-composer-bottom-row .stories-button--primary { width: auto; min-width: 145px; min-height: 42px; }
.story-direct-visibility { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: #939aa5; font-size: 12px; line-height: 1.5; }
.story-composer--direct .story-direct-visibility { color: #a6b1c2; }
.story-composer-floating-tools { position: absolute; z-index: 12; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 9px; }
.story-canvas-button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; color: #fff; background: rgba(20,24,31,.42); backdrop-filter: blur(8px); font-size: 15px !important; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.story-canvas-button:hover, .story-canvas-button[aria-expanded="true"] { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.5); }
.story-canvas-button--text { font-size: 17px !important; font-weight: 600; }
.story-canvas-button svg, .story-composer--direct .stories-small-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.story-background-symbol { display: block; width: 18px; height: 18px; border: 1px solid rgba(255,255,255,.65); border-radius: 50%; background: conic-gradient(#b7a4b7,#94b4b0,#d5c498,#b7a4b7); }
.story-source-chip { position: absolute; z-index: 10; top: 12px; left: 12px; right: 62px; display: flex; align-items: center; gap: 7px; min-height: 36px; padding: 7px 9px; color: #f7f8fb; background: rgba(20,24,31,.4); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.15); border-radius: 18px; font-size: 12px; line-height: 1.4; }
.story-source-chip span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.story-source-chip button { flex-shrink: 0; width: 28px; height: 28px; margin: -4px -4px -4px auto; padding: 0 2px; border: 0; color: inherit; background: none; line-height: 1; font-size: 20px !important; }
.story-canvas-popover { position: absolute; z-index: 20; padding: 13px; border: 1px solid rgba(255,255,255,.16); border-radius: 12px; color: white; background: rgba(28,32,40,.94); box-shadow: 0 6px 25px rgba(0,0,0,.2); backdrop-filter: blur(12px); }
.story-text-popover { bottom: 66px; left: 12px; right: 12px; }
.story-text-popover textarea { display: block; width: 100%; padding: 4px 2px; border: 0; outline: 0; border-radius: 4px; color: #fff; background: transparent; font-size: 16px; line-height: 1.5; resize: none; }
.story-text-popover textarea::placeholder { color: #abb1bc; }
.story-canvas-done { min-height: 36px; padding: 7px 9px; border: 1px solid rgba(255,255,255,.25); border-radius: 15px; color: #fff; background: transparent; font-size: 13px !important; }
.story-background-popover { top: 12px; right: 62px; width: 162px; }
.story-background-popover [data-composer-backgrounds] { display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; }
.story-background-popover .story-background-swatch { width: 25px; height: 25px; }
.story-composer--direct .story-composer-caption, .story-viewer-canvas-overlay .story-caption { left: 5.556%; right: 5.556%; bottom: 11.875%; max-height: 70%; margin: 0; color: #fff; font-size: 4cqw; line-height: 1.5; text-align: center; text-shadow: 0 1px 8px rgba(0,0,0,.55); }
.story-composer--direct .story-composer-preview.is-text .story-composer-caption, .story-screen--text .story-viewer-canvas-overlay .story-caption { top: 50%; bottom: auto; max-height: 74%; transform: translateY(-50%); font-size: 6.667cqw; font-weight: 500; }
@media (max-width: 600px) {
    .story-composer.story-composer--direct { --story-canvas-width: clamp(288px,calc((100dvh - 198px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) * .5625),380px); --story-video-canvas-width: clamp(288px,calc((100dvh - 310px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) * .5625),380px); width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
    .story-composer--direct .story-composer-form { display: flex; flex-direction: column; min-height: 100%; height: auto; }
    .story-composer--direct .story-composer-header { flex-shrink: 0; padding: max(14px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) 12px max(16px,env(safe-area-inset-left)); }
    .story-composer--direct .story-composer-body { flex: 1 0 auto; min-height: auto; justify-content: space-between; }
    .story-composer--direct .story-composer-preview-shell { flex: 1 0 auto; min-height: auto; padding: 12px max(12px,env(safe-area-inset-right)) 14px max(12px,env(safe-area-inset-left)); }
    .story-composer--direct .story-composer-publish { padding: 10px max(16px,env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left)); }
    .story-composer-bottom-row { gap: 8px; }
    .story-composer-bottom-row .stories-button--primary { min-width: 0; padding-inline: 14px; }
    .story-direct-visibility { font-size: 11px; }
    .story-share-offer-body { padding: 24px 20px; }
    .story-share-offer-actions { align-items: stretch; flex-wrap: wrap; }
    .story-share-offer-actions .stories-button { min-width: 0; }
}
/* Keep the 9:16 media frame intact when the device is turned sideways. */
@media (max-height: 620px) and (min-width: 601px) {
    .stories-viewer-layout { display: block; padding: 0; }
    .story-viewer-center { display: flex; flex-direction: column; justify-content: center; width: 100%; height: 100%; }
    .story-screen { flex: 1; min-height: 0; width: 100%; aspect-ratio: auto; border-radius: 0; }
    .story-viewer-media, .story-viewer-canvas-overlay { inset: auto; left: 50%; top: 50%; width: min(100%,calc((100dvh - 64px - env(safe-area-inset-bottom)) * .5625)); height: auto; aspect-ratio: 9/16; transform: translate(-50%,-50%); }
    .story-side-preview { display: none !important; }
    .story-viewer-header { left: max(16px,env(safe-area-inset-left)); right: max(68px,calc(env(safe-area-inset-right) + 52px)); top: max(24px,calc(env(safe-area-inset-top) + 15px)); }
    .story-progress { top: max(10px,calc(env(safe-area-inset-top) + 5px)); }
    .stories-dialog-close { top: max(24px,calc(env(safe-area-inset-top) + 15px)); right: max(12px,env(safe-area-inset-right)); }
    .story-viewer-footer { flex: 0 0 auto; min-height: 64px; padding: 8px max(18px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left)); background: #1b1d21; }
    .story-viewer-error { z-index: 5; bottom: 68px; padding: 5px 20px; color: white; }
    .story-nav--previous { left: max(18px,env(safe-area-inset-left)); }
    .story-nav--next { right: max(18px,env(safe-area-inset-right)); }
}
@media (pointer: coarse) {
    .stories { --story-ui-target: 44px; }
    .stories-scroll-controls .stories-small-button { width: 44px; height: 44px; }
    .story-round-button { width: 44px; height: 44px; }
    .story-nav { top: calc(50% - 22px); }
    .story-composer--direct .story-composer-header > [data-composer-close] { width: 44px; height: 44px; }
    .stories-button { min-height: 44px; }
    .story-composer-bottom-row .stories-button--primary { min-height: 44px; }
    .story-share-offer-close { width: 44px; height: 44px; }
    .story-background-popover { right: 12px; width: min(236px,calc(100% - 24px)); }
    .story-background-popover .story-background-swatch { width: 44px; height: 44px; }
    .story-source-chip button { width: 36px; height: 36px; }
    .story-source-view-link { min-height: 44px; display: flex; align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
    .stories *, .stories *::before, .stories *::after { transition: none !important; scroll-behavior: auto !important; }
    .story-card:hover .story-card-cover, .story-card:focus-visible .story-card-cover { transform: none; }
}
