/* Shared story composer: the media canvas stays dark in both interface themes. */
.ov:has(>.story-editor-modal){position:fixed;inset:0!important;padding:18px;box-sizing:border-box;z-index:200;background:rgb(3 8 17 / .72);backdrop-filter:blur(18px);display:grid;place-items:center}
.md.story-editor-modal{width:min(1000px,100%);max-width:100%;height:min(790px,calc(100dvh - 36px));max-height:calc(100dvh - 36px);min-width:0;min-height:0;padding:0;gap:0;overflow:hidden;border:1px solid var(--line);border-radius:26px;background:var(--pan);color:var(--tx);box-shadow:0 30px 110px rgb(0 0 0 / .28);backdrop-filter:none;animation:none!important;transform:none!important}
.story-editor,.story-editor *{box-sizing:border-box}
.story-editor{display:flex;flex-direction:column;width:100%;height:100%;min-width:0;min-height:0;color:var(--tx);font-size:13px;line-height:1.5;--story-accent:#6d63ef;--story-accent-end:#4189ef}
.story-editor :is(button,input,textarea,select){font:inherit}
.story-editor :is(input,textarea,select){min-width:0;max-width:100%;color:var(--tx);background:var(--in);border:1px solid var(--line);border-radius:12px;outline:none;accent-color:var(--story-accent)}
.story-editor :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),textarea,select){width:100%;padding:11px 13px}
.story-editor :is(input,textarea)::placeholder{color:var(--tx2);opacity:1}
.story-editor textarea{display:block;min-height:82px;max-height:180px;resize:vertical;line-height:1.6}
.story-editor :is(input,textarea,select):focus-visible{border-color:var(--acc);box-shadow:0 0 0 3px color-mix(in srgb,var(--acc) 18%,transparent)}
.story-editor button{min-width:0;cursor:pointer;-webkit-tap-highlight-color:transparent}
.story-editor button:disabled{cursor:default;opacity:.48;filter:none}
.story-editor :is(button,input,textarea,select):focus-visible{outline:2px solid var(--acc);outline-offset:3px}
.story-editor :is(h2,h3,p){margin:0}
.story-editor :is(small,.sub){color:var(--tx2);line-height:1.5}
.story-editor :is(.pri,.sec){display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;border-radius:12px;padding:10px 15px;white-space:normal;text-align:center;line-height:1.3}
.story-editor .pri{background:linear-gradient(105deg,var(--story-accent),var(--story-accent-end));color:#fff;border:0;font-weight:650;box-shadow:0 5px 16px rgb(87 101 221 / .18)}
.story-editor .pri:not(:disabled):hover{filter:brightness(1.08)}
.story-editor .sec{background:var(--in);border:1px solid var(--line);color:var(--tx)}
.story-editor .sec:not(:disabled):hover{background:var(--hov)}
.story-editor-header{display:flex;align-items:center;gap:14px;flex:none;padding:21px 25px 18px;border-bottom:1px solid var(--line);background:var(--pan)}
.story-editor-header>.ib{width:38px;height:38px;border-radius:12px;background:var(--in);color:var(--tx2);flex:none}
.story-editor-header>.ib:hover{background:var(--hov);color:var(--tx)}
.story-editor-header>div:not(.story-editor-steps){min-width:0;flex:1}
.story-editor-header h2{color:var(--tx);font-size:22px;line-height:1.3;font-weight:700;letter-spacing:-.04em;overflow-wrap:anywhere}
.story-editor-header small{display:block;margin-top:3px;font-size:12px}
.story-editor-steps{display:flex;align-items:center;gap:8px;flex:none;color:var(--tx2);font-size:11px;font-weight:600}
.story-editor-steps>span{display:flex;align-items:center;gap:7px;padding:7px 10px;border:1px solid var(--line);border-radius:999px;background:var(--in)}
.story-editor-steps>span :is(b,i){display:grid;place-items:center;min-width:20px;height:20px;border-radius:50%;background:var(--line);font-size:11px;font-style:normal;font-weight:700}
.story-editor-steps>span:is(.on,.active,.done),.story-editor-steps>[aria-current=step]{border-color:color-mix(in srgb,var(--acc) 45%,var(--line));color:var(--acc);background:color-mix(in srgb,var(--acc) 9%,var(--pan))}
.story-editor-steps>span:is(.on,.active,.done) :is(b,i){background:var(--story-accent);color:#fff}
.story-editor-layout{display:grid;grid-template-columns:minmax(230px,330px) minmax(0,1fr);gap:28px;padding:24px 26px;flex:1;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;align-items:start;scrollbar-gutter:stable}
.story-editor-preview{display:flex;flex-direction:column;align-items:center;gap:12px;min-width:0;position:sticky;top:0}
.story-editor-preview>small{text-align:center;font-size:11px}
.story-editor-stage{position:relative;isolation:isolate;width:min(100%,330px,calc((100dvh - 213px) * .5625));aspect-ratio:9/16;flex:none;overflow:hidden;border:1px solid rgb(255 255 255 / .12);border-radius:24px;background:linear-gradient(155deg,#182547 0%,#25224b 40%,#122a37 100%);color:#fff;box-shadow:0 14px 38px rgb(5 12 35 / .25);user-select:none;touch-action:pan-y}
.story-editor-stage:before{content:'';position:absolute;z-index:1;inset:0;pointer-events:none;background:linear-gradient(180deg,rgb(0 0 0 / .18),transparent 25%,transparent 55%,rgb(0 0 0 / .32));border-radius:inherit}
.story-editor-media{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;border:0;border-radius:inherit;background:#0c1120;pointer-events:none}
.story-editor-stage>.story-editor-media :is(img,video){width:100%;height:100%;object-fit:cover;display:block}
.story-editor-layer{position:absolute;z-index:3;transform:translate(-50%,-50%);max-width:86%;width:max-content;min-width:20px;padding:7px 10px;border:0;border-radius:10px;color:#fff;background:transparent;line-height:1.15;white-space:pre-wrap;overflow-wrap:anywhere;text-align:center;font-weight:750;cursor:grab;touch-action:none;outline:none;box-shadow:none;text-shadow:0 2px 8px rgb(0 0 0 / .22)}
.story-editor-layer>*{pointer-events:none}
.story-editor-layer:is(.on,.selected,[aria-pressed=true]){outline:2px dashed rgb(255 255 255 / .9);outline-offset:5px}
.story-editor-layer:active{cursor:grabbing}
.story-editor-layer:is(.is-sticker,[data-kind=sticker],[data-type=sticker]){padding:0;text-shadow:0 3px 12px rgb(0 0 0 / .3)}
.story-editor-empty{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:15px;padding:28px;text-align:center;background:radial-gradient(ellipse at 20% 12%,rgb(150 106 255 / .2),transparent 60%),radial-gradient(ellipse at 88% 92%,rgb(52 188 192 / .16),transparent 55%)}
.story-editor-empty>svg,.story-editor-empty>.story-editor-empty-icon{width:58px;height:58px;padding:15px;border:1px solid rgb(255 255 255 / .18);border-radius:19px;color:#dce7ff;background:rgb(255 255 255 / .08);box-shadow:0 10px 25px rgb(0 0 0 / .12)}
.story-editor-empty>b,.story-editor-empty>h3{font-size:20px;font-weight:650;line-height:1.35;letter-spacing:-.025em;color:#fff}
.story-editor-empty>p,.story-editor-empty>small{max-width:230px;color:#ccd6ec;font-size:12px;line-height:1.6}
.story-editor-empty .pri{margin-top:4px;box-shadow:0 7px 24px rgb(35 40 101 / .35)}
.story-editor-caption-preview{position:absolute;z-index:4;left:14px;right:14px;bottom:17px;padding:10px 12px;border:1px solid rgb(255 255 255 / .15);border-radius:14px;background:rgb(12 16 29 / .68);backdrop-filter:blur(12px);color:#fff;font-size:12px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;max-height:32%;overflow:hidden;pointer-events:none}
.story-editor-caption-preview:empty{display:none}
.story-editor-sidebar{display:flex;flex-direction:column;gap:18px;min-width:0;padding:1px 0 4px}
.story-editor-sidebar :is(h3,.story-editor-section-title){font-size:14px;font-weight:650;color:var(--tx);line-height:1.4}
.story-editor-sidebar>p{color:var(--tx2);font-size:12px}
.story-editor-sidebar>label,.story-editor-text-controls>label,.story-editor-target>label{display:flex;flex-direction:column;gap:7px;color:var(--tx2);font-size:12px}
.story-editor-tools{display:flex;flex-direction:column;gap:13px}
.story-editor-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.story-editor-toolbar>button{display:flex;align-items:center;gap:9px;min-height:58px;padding:11px;border:1px solid var(--line);border-radius:14px;background:var(--in);color:var(--tx);font-size:12px;text-align:left;line-height:1.4}.story-editor-toolbar>button>span:first-child{display:grid;place-items:center;flex:none;width:30px;height:30px;border-radius:10px;background:color-mix(in srgb,var(--acc) 13%,var(--pan));color:var(--acc)}.story-editor-toolbar>button:hover{border-color:var(--acc)}.story-editor-file-name{font-size:11px;color:var(--tx2);overflow-wrap:anywhere}.story-editor-backgrounds{display:flex;gap:10px}.story-editor-backgrounds button{width:28px;height:28px;border-radius:50%;border:2px solid var(--line)}.story-editor-remove-media{align-self:flex-start;font-size:11px!important;color:var(--tx2)!important;background:none;border:0;padding:0}.story-editor-caption{display:grid;gap:7px;padding:17px;border:1px solid var(--line);border-radius:18px}.story-editor-caption label{display:grid;gap:9px;color:var(--tx2)}.story-editor-media:empty{background:transparent}.story-editor-layers{position:absolute;inset:0;pointer-events:none;z-index:3}.story-editor-layers>button{pointer-events:auto}.story-editor-audience-row>span:first-of-type{flex:0 0 25px!important}.story-editor-stage.drag-over{outline:3px solid var(--acc);outline-offset:4px}
.story-editor-tools>button{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;min-height:82px;padding:12px 8px;border:1px solid var(--line);border-radius:17px;background:var(--pan2,var(--in));color:var(--tx);font-size:12px;font-weight:600}
.story-editor-tools>button :is(svg,.story-editor-tool-icon){width:25px;height:25px;display:grid;place-items:center;color:var(--acc);font-size:24px}
.story-editor-tools>button small{font-size:10px;font-weight:400}
.story-editor-tools>button:hover{border-color:color-mix(in srgb,var(--acc) 60%,var(--line));background:var(--hov)}
.story-editor-tools>button:is(.on,.active,[aria-pressed=true]){color:var(--acc);border-color:var(--acc);background:color-mix(in srgb,var(--acc) 9%,var(--pan))}
.story-editor-text-controls,.story-editor-publish{display:flex;flex-direction:column;gap:13px;padding:17px;border:1px solid var(--line);border-radius:18px;background:var(--pan2,var(--pan));min-width:0}
.story-editor-text-controls>[hidden],.story-editor [hidden]{display:none!important}
.story-editor-text-controls :is(.story-editor-text-row,.story-editor-control-row){display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.story-editor-text-controls input[type=range]{flex:1;min-width:90px;width:100%;height:5px;padding:0;border:0;cursor:pointer}
.story-editor-text-controls input[type=color]{width:34px;height:34px;flex:none;padding:3px;border-radius:10px;cursor:pointer}
.story-editor-text-controls button:not(.pri):not(.sec):not(.story-editor-swatch){min-height:34px;padding:6px 11px;border:1px solid var(--line);border-radius:10px;background:var(--in);color:var(--tx)}
.story-editor-text-controls button:not(.story-editor-swatch):is(.on,.active,[aria-pressed=true]){border-color:var(--acc);color:var(--acc);background:color-mix(in srgb,var(--acc) 10%,var(--pan))}
.story-editor-colors{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:3px}
.story-editor-colors>button,.story-editor-colors .story-editor-swatch{width:27px;height:27px;min-width:27px;min-height:27px;padding:0;border:2px solid color-mix(in srgb,var(--tx) 20%,transparent);border-radius:50%;background:var(--swatch,var(--acc));box-shadow:none}
.story-editor-colors>button:is(.on,.active,[aria-pressed=true]),.story-editor-colors .story-editor-swatch:is(.on,.active,[aria-pressed=true]){outline:2px solid var(--acc);outline-offset:3px;border-color:var(--pan);box-shadow:none}
.story-editor-stickers{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:6px;padding:10px;border:1px solid var(--line);border-radius:16px;background:var(--pan2,var(--in))}
.story-editor-stickers>button{display:grid;place-items:center;min-width:0;min-height:38px;aspect-ratio:1;padding:4px;border:0;border-radius:10px;background:transparent;color:var(--tx);font-size:26px;line-height:1}
.story-editor-stickers>button:hover{background:var(--hov);transform:translateY(-2px)}
.story-editor-publish{display:none}
.story-editor.is-publish .story-editor-publish{display:flex}
.story-editor.is-publish .story-editor-tools,.story-editor.is-publish .story-editor-text-controls,.story-editor.is-publish .story-editor-stickers{display:none}
.story-editor-publish>p{color:var(--tx2);font-size:12px;line-height:1.6}
.story-editor-audience{display:flex;flex-direction:column;gap:7px;min-width:0}
.story-editor-audience>:is(label,button){display:flex;align-items:center;gap:10px;padding:11px 12px;min-height:48px;border:1px solid var(--line);border-radius:12px;background:var(--pan);color:var(--tx);text-align:left;line-height:1.4}
.story-editor-audience>:is(label,button):hover{background:var(--hov)}
.story-editor-audience>:is(label,button):is(.on,.active,[aria-checked=true]),.story-editor-audience>label:has(input:checked){border-color:color-mix(in srgb,var(--acc) 65%,var(--line));background:color-mix(in srgb,var(--acc) 8%,var(--pan))}
.story-editor-audience input{flex:none;margin:0;width:16px;height:16px}
.story-editor-audience :is(svg,.story-editor-audience-icon){flex:none;width:25px;height:25px;color:var(--acc)}
.story-editor-audience :is(label,button)>span:not(.story-editor-audience-icon){min-width:0;flex:1}
.story-editor-audience small{display:block;font-size:11px}
.story-editor-friends{display:flex;flex-direction:column;gap:6px;max-height:210px;overflow:auto;min-width:0;overscroll-behavior:contain}
.story-editor-friends>label{display:flex;align-items:center;gap:9px;min-height:44px;padding:7px 9px;border-radius:11px;color:var(--tx);background:var(--pan)}
.story-editor-friends>label:hover{background:var(--hov)}
.story-editor-friends input{width:16px;height:16px;margin:0;flex:none}
.story-editor-friends :is(img,.av){width:30px!important;height:30px!important;flex:none;border-radius:50%;object-fit:cover;overflow:hidden}
.story-editor-friends :is(span,b){min-width:0;overflow-wrap:anywhere}
.story-editor-target{display:flex;flex-direction:column;gap:9px;min-width:0;padding-top:13px;border-top:1px solid var(--line)}
.story-editor-target>small{font-size:11px}
.story-editor-footer{display:flex;align-items:center;justify-content:space-between;gap:18px;flex:none;min-width:0;padding:16px 25px;border-top:1px solid var(--line);background:var(--pan);position:relative;z-index:5}
.story-editor-footer>div:not(.story-editor-footer-actions){min-width:0;color:var(--tx2);font-size:11px;line-height:1.5;overflow-wrap:anywhere}
.story-editor-footer>div:not(.story-editor-footer-actions)>b{display:block;color:var(--tx);font-size:12px;font-weight:600}
.story-editor-footer-actions{display:flex;align-items:center;gap:9px;flex:none}
.story-editor-footer-actions>.pri{min-width:155px}
.story-editor-footer-actions :is(svg,span){flex:none}
.story-editor-footer-actions svg{width:18px;height:18px}
body:has(.story-editor-modal) #bottomDock{display:none!important}
@media(max-width:850px){
 .story-editor-header{padding:17px 18px;gap:10px;flex-wrap:wrap}
 .story-editor-steps{margin-left:48px;width:calc(100% - 48px)}
 .story-editor-layout{grid-template-columns:minmax(180px,280px) minmax(0,1fr);gap:18px;padding:20px 18px}
 .story-editor-stickers{grid-template-columns:repeat(6,minmax(0,1fr))}
 .story-editor-text-controls,.story-editor-publish{padding:14px}
 .story-editor-footer{padding:14px 18px;gap:12px}
}
@media(max-width:650px){
 .ov:has(>.story-editor-modal){inset:0!important;inset-inline:0!important;top:0!important;width:100%!important;height:100dvh!important;padding:0!important;display:flex;align-items:stretch;justify-content:stretch;z-index:200;background:var(--pan)}
 .md.story-editor-modal{width:100%!important;max-width:100vw!important;height:100%!important;max-height:100dvh!important;min-width:0!important;margin:0!important;padding:0!important;overflow:hidden!important;border:0;border-radius:0!important}
 .story-editor-header{padding:max(12px,env(safe-area-inset-top)) 14px 12px;gap:10px;flex-wrap:nowrap;align-items:flex-start}
 .story-editor-header>.ib{width:34px;height:34px;border-radius:11px;margin-top:1px}
 .story-editor-header h2{font-size:19px;line-height:1.35}
 .story-editor-header small{font-size:11px;line-height:1.5;max-width:240px}
 .story-editor-steps{width:auto;flex:none;gap:5px;margin-left:0;align-self:center}
 .story-editor-steps>span{padding:0;gap:0;width:25px;height:25px;overflow:hidden;font-size:0;border:0;background:transparent}
 .story-editor-steps>span :is(b,i){min-width:25px;width:25px;height:25px;font-size:11px}
 .story-editor-steps>span:is(.on,.active,.done){background:transparent}
 .story-editor-layout{grid-template-columns:minmax(0,1fr);gap:18px;width:100%;padding:16px 14px 20px;align-content:start;overflow-x:hidden;overflow-y:auto;scrollbar-gutter:auto}
 .story-editor-preview{position:static;gap:9px}
 .story-editor-stage{width:min(100%,275px,calc((100dvh - 245px) * .5625));min-width:min(170px,100%);border-radius:22px}
 .story-editor-empty{padding:22px;gap:12px}
 .story-editor-empty>b,.story-editor-empty>h3{font-size:18px}
 .story-editor-empty>p,.story-editor-empty>small{font-size:11px}
 .story-editor-empty>svg,.story-editor-empty>.story-editor-empty-icon{width:50px;height:50px;padding:12px;border-radius:16px}
 .story-editor-sidebar{gap:14px;padding:0}
 .story-editor-tools{gap:8px}
 .story-editor-tools>button{min-height:73px;padding:10px 6px;border-radius:14px;font-size:11px;gap:6px}
 .story-editor-text-controls,.story-editor-publish{padding:14px;border-radius:17px}
 .story-editor-stickers{grid-template-columns:repeat(8,minmax(0,1fr));gap:4px;padding:9px}
 .story-editor-stickers>button{font-size:24px;min-height:32px}
 .story-editor-footer{position:sticky;bottom:0;align-items:center;gap:10px;padding:12px 14px max(12px,env(safe-area-inset-bottom));box-shadow:0 -7px 20px color-mix(in srgb,var(--pan) 85%,transparent)}
 .story-editor-footer>div:not(.story-editor-footer-actions){flex:1;font-size:10px;line-height:1.4}
 .story-editor-footer>div:not(.story-editor-footer-actions)>b{font-size:11px}
 .story-editor-footer-actions{gap:7px}
 .story-editor-footer-actions>.pri{min-width:0}
 .story-editor-footer-actions>:is(.pri,.sec){min-height:42px;padding:10px 12px;font-size:12px}
}
@media(max-width:380px){
 .story-editor-header{gap:8px;padding-left:12px;padding-right:12px}
 .story-editor-header h2{font-size:18px}
 .story-editor-header small{font-size:10px}
 .story-editor-steps{gap:3px}
 .story-editor-layout{padding-left:12px;padding-right:12px}
 .story-editor-footer{padding-left:12px;padding-right:12px;gap:8px}
 .story-editor-footer-actions>:is(.pri,.sec){padding:10px;font-size:11px}
 .story-editor-stickers{grid-template-columns:repeat(6,minmax(0,1fr))}
}
@media(max-height:540px) and (max-width:650px){
 .story-editor-header small{display:none}
 .story-editor-header{padding-top:max(8px,env(safe-area-inset-top));padding-bottom:8px}
 .story-editor-stage{width:min(100%,210px,calc((100dvh - 150px) * .5625));min-width:min(120px,100%)}
 .story-editor-empty{padding:15px;gap:8px}
 .story-editor-empty>svg,.story-editor-empty>.story-editor-empty-icon{width:38px;height:38px;padding:8px}
 .story-editor-empty>b,.story-editor-empty>h3{font-size:15px}
 .story-editor-empty>p,.story-editor-empty>small{display:none}
 .story-editor-footer>div:not(.story-editor-footer-actions){display:none}
 .story-editor-footer-actions{width:100%;justify-content:flex-end}
}
@media(prefers-reduced-motion:reduce){.story-editor-stickers>button:hover{transform:none}}
.story-editor-tools>.story-editor-remove-media{min-height:0;padding:0;border:0;background:transparent;border-radius:0}.story-editor .frost-select{width:100%;min-width:0}.story-editor .frost-select-button{width:100%;min-height:42px;background:var(--in);color:var(--tx);border-color:var(--line);white-space:normal;text-align:left}
.ov:has(>.story-modal421){inset:0!important;z-index:201;padding:12px;display:grid;place-items:center}.md.story-modal421{padding:0!important;max-height:calc(100dvh - 24px)!important;width:min(390px,calc(100vw - 24px))!important;color:#fff}.story-view-modern{height:min(780px,calc(100dvh - 24px));color:#fff;background:#101828}.story-view-canvas{position:relative;min-height:0;flex:1;overflow:hidden;background:#101828}.story-view-canvas>img,.story-view-canvas>video{display:block;width:100%;height:100%;object-fit:contain}.story-view-modern>p.story-view-caption{padding:12px 18px;max-height:20vh;margin:0;font-size:14px;flex:none}.story-view-modern footer{flex-wrap:wrap;flex:none;gap:6px;padding:10px}.story-view-modern footer button{font-size:11px;padding:8px 11px}.story-view-modern .story-editor-layer:disabled{opacity:1;color:inherit;cursor:default}.story-view-modern .story-editor-layer{pointer-events:none}
