/* DROPX NAPOM / Story rendszer */
.stories-rail{width:100%;display:flex;gap:10px;align-items:stretch;margin:0;padding:0;box-sizing:border-box;min-height:176px}
/*
 * FEED SORREND — FONTOS
 * A Story rail normál dokumentumfolyamban marad.
 * A home.php sorrendje így érvényesül: POSZTOLÓ → STORY → IDŐVONAL.
 * Nem emeljük ki absolute pozícióba a Story sávot, mert az a posztolót
 * vizuálisan a Story alá tolta, miközben a DOM sorrendje helyes maradt.
 */
.stories-rail{position:relative;z-index:2;flex:0 0 auto}
.stories-scroll{display:flex;gap:10px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;padding:1px 2px 7px;flex:1;min-width:0}
.stories-scroll::-webkit-scrollbar{height:4px}.stories-scroll::-webkit-scrollbar-thumb{background:rgba(229,158,0,.35);border-radius:5px}
.story-tile{position:relative;flex:0 0 118px;height:168px;border:1px solid rgba(255,255,255,.09);border-radius:10px;overflow:hidden;background:#111318;color:#fff;padding:0;cursor:pointer;text-align:left;box-shadow:0 8px 20px rgba(0,0,0,.24);transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}
.story-tile:hover{transform:translateY(-2px);border-color:rgba(229,158,0,.65);box-shadow:0 10px 24px rgba(0,0,0,.35)}
.story-tile-media,.story-own-media img{width:100%;height:100%;object-fit:cover;display:block}
.story-thumb-wrap{position:absolute;inset:0;background:#16181d}.story-thumb-wrap:after{content:"";position:absolute;inset:0;background:linear-gradient(to bottom,rgba(0,0,0,.06) 30%,rgba(0,0,0,.86) 100%)}
.story-avatar-ring{position:absolute;top:10px;left:10px;width:42px;height:42px;padding:2px;border-radius:50%;background:linear-gradient(135deg,#e59e00,#fff,#e59e00);box-sizing:border-box;z-index:2}.story-avatar-ring img{width:100%;height:100%;border-radius:50%;object-fit:cover;border:2px solid #101216;display:block}
.story-user-name{position:absolute;left:10px;right:8px;bottom:14px;z-index:2;font-family:'Rajdhani',sans-serif;font-weight:700;font-size:.92rem;line-height:1.08;text-shadow:0 2px 7px #000;white-space:normal;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.story-own-tile{background:linear-gradient(145deg,#1b1915,#0f1115);display:flex;flex-direction:column;align-items:center;justify-content:flex-end;padding:12px 8px 13px}.story-own-media{position:absolute;inset:0;height:112px;overflow:hidden}.story-own-media:after{content:"";position:absolute;inset:0;background:linear-gradient(to bottom,transparent 35%,#121317 100%)}.story-own-plus{position:absolute;z-index:3;top:88px;left:50%;transform:translateX(-50%);width:35px;height:35px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#0b6cff;border:3px solid #101216;font-size:25px;line-height:1;box-shadow:0 3px 10px rgba(0,0,0,.45)}.story-own-label{position:relative;z-index:2;margin-top:auto;font-family:'Rajdhani',sans-serif;font-weight:800;font-size:1rem}.story-own-tile small{position:relative;z-index:2;color:#9f9b95;font-size:.68rem;text-align:center;margin-top:3px;line-height:1.1}

.story-modal,.story-viewer-modal,.story-viewers-modal{position:fixed;inset:0;z-index:2147483600;display:flex;align-items:center;justify-content:center;overflow:hidden}.story-modal[hidden],.story-viewer-modal[hidden],.story-viewers-modal[hidden]{display:none}.story-modal-backdrop,.story-viewer-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.10);backdrop-filter:blur(1.5px)}
.story-modal-backdrop{background:rgba(0,0,0,.10);backdrop-filter:blur(1.5px)}
.story-viewers-modal .story-viewer-backdrop{background:rgba(0,0,0,.08);backdrop-filter:blur(1.25px)}.story-create-panel{position:relative;z-index:1;width:min(980px,calc(100vw - 28px));max-height:calc(100vh - 28px);background:#141310;border:1px solid rgba(229,158,0,.55);border-radius:14px;box-shadow:0 20px 70px rgba(0,0,0,.7);overflow:hidden;display:flex;flex-direction:column}.story-create-panel > form{display:flex;flex:1 1 auto;min-height:0;flex-direction:column;overflow:hidden}.story-create-panel > form > .story-editor-layout{flex:1 1 auto;min-height:0}.story-modal-header{display:flex;justify-content:space-between;align-items:center;padding:17px 20px;border-bottom:1px solid rgba(255,255,255,.08);flex:0 0 auto}.story-modal-header h3{margin:3px 0 0;font-family:'Rajdhani',sans-serif;font-size:1.5rem}.story-kicker{font-size:.68rem;color:#e59e00;letter-spacing:1.5px;font-weight:800}.story-close,.story-viewer-close{background:transparent;border:0;color:#aaa;font-size:28px;cursor:pointer}.story-close:hover,.story-viewer-close:hover{color:#fff}
.story-editor-layout{display:grid;grid-template-columns:minmax(320px,390px) minmax(0,1fr);gap:22px;padding:20px;overflow:auto;min-height:0;align-items:start}.story-editor-stage-wrap{display:flex;flex-direction:column;align-items:center;min-width:0}.story-editor-stage{position:relative;width:min(360px,100%);aspect-ratio:9/16;background:#050506;border:1px solid rgba(229,158,0,.42);border-radius:12px;overflow:hidden;box-shadow:0 16px 45px rgba(0,0,0,.45);touch-action:none}.story-editor-safe{position:absolute;inset:0;z-index:6;pointer-events:none;border:1px solid rgba(255,255,255,.05);background:linear-gradient(to bottom,rgba(0,0,0,.22),transparent 18%,transparent 78%,rgba(0,0,0,.18))}.story-editor-media-layer{position:absolute;inset:0;z-index:1;transform-origin:center;cursor:grab;touch-action:none}.story-editor-media-layer:active{cursor:grabbing}.story-editor-media-layer #story-media-preview{position:absolute;inset:0;background:#000;display:flex;align-items:center;justify-content:center;overflow:hidden};#story-media-preview[hidden]{display:none}.story-editor-media-layer #story-media-preview img,.story-editor-media-layer #story-media-preview video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;display:block;background:#000}.story-editor-media-layer #story-upload-placeholder[hidden]{display:none}.story-editor-media-layer img,.story-editor-media-layer video{width:100%;height:100%;object-fit:contain;display:block;background:#000}.story-preview-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:5;width:58px;height:58px;border-radius:50%;border:1px solid rgba(255,255,255,.75);background:rgba(0,0,0,.42);color:#fff;font-size:22px;display:flex;align-items:center;justify-content:center;cursor:pointer;backdrop-filter:blur(3px);transition:background .15s ease,border-color .15s ease,transform .15s ease}.story-preview-play:hover{background:rgba(229,158,0,.3);border-color:#e59e00;transform:translate(-50%,-50%) scale(1.04)}.story-preview-video-status{position:absolute;left:50%;bottom:12px;transform:translateX(-50%);z-index:5;padding:5px 9px;border-radius:999px;background:rgba(0,0,0,.42);color:rgba(255,255,255,.82);font-size:.65rem;pointer-events:none;white-space:nowrap;backdrop-filter:blur(3px)}.story-preview-controls{position:absolute;left:9px;right:9px;bottom:9px;z-index:7;display:flex;align-items:center;gap:7px;padding:7px 8px;border:1px solid rgba(255,255,255,.16);border-radius:12px;background:rgba(5,6,8,.78);backdrop-filter:blur(10px);box-shadow:0 8px 24px rgba(0,0,0,.35)}.story-preview-control-btn,.story-preview-volume-btn{width:28px;height:28px;flex:0 0 28px;border:1px solid rgba(255,255,255,.18);border-radius:8px;background:rgba(255,255,255,.05);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:.72rem}.story-preview-control-btn:hover,.story-preview-volume-btn:hover{border-color:rgba(229,158,0,.7);background:rgba(229,158,0,.12)}.story-preview-time,.story-preview-duration{font:600 .58rem/1 'JetBrains Mono',monospace;color:rgba(255,255,255,.78);white-space:nowrap}.story-preview-seek{flex:1;min-width:50px;accent-color:#e59e00;cursor:pointer}.story-preview-volume{width:62px;flex:0 0 62px;accent-color:#e59e00;cursor:pointer;height:4px}.story-preview-volume::-webkit-slider-runnable-track,.story-viewer-volume::-webkit-slider-runnable-track{height:4px;border-radius:999px;background:rgba(255,255,255,.22)}.story-preview-volume::-webkit-slider-thumb,.story-viewer-volume::-webkit-slider-thumb{width:12px;height:12px;margin-top:-4px}.story-preview-volume::-moz-range-track,.story-viewer-volume::-moz-range-track{height:4px;border-radius:999px;background:rgba(255,255,255,.22)}.story-editor-media-placeholder{position:absolute;inset:0;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;color:#fff;background:#08090c;text-align:center;cursor:pointer}.story-editor-media-placeholder small{color:#8f8c87}.story-upload-icon{display:block;color:#e59e00;font-size:42px;line-height:1}.story-editor-overlay{position:absolute;z-index:8;max-width:88%;cursor:move;user-select:none;touch-action:none}.story-caption-overlay{padding:7px 12px;border-radius:8px;background:rgba(0,0,0,.28);color:#fff;font-size:1.1rem;font-weight:700;text-align:center;text-shadow:0 2px 8px #000;white-space:pre-wrap;word-break:break-word}.story-emoji-overlay{font-size:2.1rem;filter:drop-shadow(0 2px 5px #000)}.story-link-overlay span{display:inline-flex;align-items:center;gap:5px;padding:8px 15px;border:1px solid #e59e00;border-radius:999px;background:rgba(7,7,8,.78);color:#fff;font-weight:700;white-space:nowrap}.story-editor-help{margin-top:9px;color:#77736d;font-size:.68rem;text-align:center;line-height:1.3;max-width:360px}.story-editor-controls{min-width:0;display:flex;flex-direction:column;gap:12px}.story-control-section{background:#0c0d10;border:1px solid rgba(255,255,255,.07);border-radius:9px;padding:12px}.story-control-section label{display:block;color:#d8d3ca;font-size:.76rem;font-weight:700;margin-bottom:7px}.story-control-primary{width:100%;border:1px solid rgba(229,158,0,.5);background:#19150e;color:#e59e00;border-radius:7px;padding:10px 12px;font-weight:800;cursor:pointer}.story-control-hint,.story-font-select{width:100%;box-sizing:border-box;background:#08090c;border:1px solid rgba(255,255,255,.1);border-radius:6px;color:#fff;padding:10px 11px;font-family:'Rajdhani',sans-serif;outline:none;cursor:pointer}
.story-font-select:focus{border-color:#e59e00}
.story-font-select option{background:#141310;color:#fff}
.story-video-trim[hidden]{display:none}
.story-video-trim-left{width:min(360px,100%);box-sizing:border-box;margin-top:10px}.story-video-trim-head{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;margin-bottom:8px}.story-video-trim-head label{margin:0}.story-video-trim-head .story-control-hint{display:block;margin-top:2px;background:transparent;border:0;padding:0;color:#77736d;font-size:.62rem}.story-video-trim-head span{font-family:'JetBrains Mono',monospace;color:#aaa;font-size:.7rem;white-space:nowrap}.story-trim-track-wrap{position:relative;height:34px;margin:11px 2px 3px}.story-trim-track{position:absolute;left:0;right:0;top:12px;height:8px;border-radius:999px;background:linear-gradient(90deg,#202126,#36373b);box-shadow:inset 0 0 0 1px rgba(255,255,255,.08)}.story-trim-selected{position:absolute;top:0;height:100%;left:0;width:50%;background:linear-gradient(90deg,#b87700,#e5a400);border-radius:999px;box-shadow:0 0 14px rgba(229,158,0,.28)}.story-trim-track-wrap input[type=range]{position:absolute;inset:0;width:100%;height:34px;margin:0;background:transparent;pointer-events:none;appearance:none;-webkit-appearance:none;z-index:2}.story-trim-track-wrap input[type=range]::-webkit-slider-runnable-track{height:8px;background:transparent}.story-trim-track-wrap input[type=range]::-moz-range-track{height:8px;background:transparent}.story-trim-track-wrap input[type=range]::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:18px;height:18px;margin-top:-5px;border-radius:50%;border:2px solid #0b0c0f;background:#e5a400;box-shadow:0 2px 10px rgba(0,0,0,.55),0 0 0 3px rgba(229,158,0,.12);pointer-events:auto;cursor:ew-resize}.story-trim-track-wrap input[type=range]::-moz-range-thumb{width:18px;height:18px;border-radius:50%;border:2px solid #0b0c0f;background:#e5a400;box-shadow:0 2px 10px rgba(0,0,0,.55),0 0 0 3px rgba(229,158,0,.12);pointer-events:auto;cursor:ew-resize}.story-trim-times{display:flex;align-items:center;justify-content:space-between;color:#e5a400;font:600 .64rem 'JetBrains Mono',monospace}.story-trim-times span{color:#77736d;font-family:'Rajdhani',sans-serif;font-weight:600}
.story-editor-note{font-size:.7rem;color:#817d77;margin-top:7px;line-height:1.35}.story-fields textarea,.story-control-section textarea,.story-control-section input{width:100%;box-sizing:border-box;background:#08090c;border:1px solid rgba(255,255,255,.1);border-radius:6px;color:#fff;padding:10px 11px;font-family:'Rajdhani',sans-serif;outline:none}.story-control-section textarea{min-height:82px;resize:vertical}.story-control-section textarea:focus,.story-control-section input:focus{border-color:#e59e00}.story-control-row{display:flex;gap:7px;margin-top:8px}.story-tool-btn{border:1px solid rgba(229,158,0,.4);background:#17140f;color:#e59e00;border-radius:6px;padding:8px 11px;cursor:pointer;white-space:nowrap}.story-control-row input[type="text"]{flex:1}.story-control-row input[type="range"]{flex:1;accent-color:#e59e00}.story-form-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 18px;border-top:1px solid rgba(255,255,255,.08);flex:0 0 auto}.story-form-footer span{font-size:.76rem;color:#8f8c87}

.story-viewer{position:relative;z-index:1;width:min(560px,calc(100vw - 120px));height:min(calc(100vh - 34px),calc((100vw - 120px) * 16 / 9));aspect-ratio:9/16;display:flex;align-items:center;justify-content:center}.story-viewer-shell{position:relative;width:100%;height:100%;background:#050506;border-radius:14px;overflow:hidden;border:1px solid rgba(229,158,0,.42);box-shadow:0 24px 90px rgba(0,0,0,.75)}.story-progress{position:absolute;top:10px;left:10px;right:10px;z-index:10;display:flex;gap:4px}.story-progress-segment{height:3px;flex:1;background:rgba(255,255,255,.28);border-radius:99px;overflow:hidden}.story-progress-segment i{display:block;width:0;height:100%;background:#fff;border-radius:99px}.story-viewer-card{position:absolute;inset:0;overflow:hidden;background:#000}.story-viewer-media-stage{position:absolute;inset:0;background:#000;display:flex;align-items:center;justify-content:center;overflow:hidden}.story-viewer-media{width:100%;height:100%;object-fit:contain;display:block;background:#000;transform-origin:center}.story-viewer-gradient{position:absolute;inset:0;pointer-events:none;background:linear-gradient(to bottom,rgba(0,0,0,.65),transparent 24%,transparent 68%,rgba(0,0,0,.72))}.story-viewer-media-controls{position:absolute;left:12px;right:12px;bottom:42px;z-index:13;display:flex;align-items:center;gap:7px;padding:8px 9px;border:1px solid rgba(255,255,255,.16);border-radius:12px;background:rgba(4,5,7,.66);backdrop-filter:blur(10px);box-shadow:0 8px 28px rgba(0,0,0,.35)}.story-viewer-play,.story-viewer-volume-btn{width:30px;height:30px;flex:0 0 30px;border:1px solid rgba(255,255,255,.2);border-radius:9px;background:rgba(255,255,255,.05);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:.72rem}.story-viewer-play:hover,.story-viewer-volume-btn:hover{border-color:#e59e00;background:rgba(229,158,0,.12)}.story-viewer-time{font:600 .6rem/1 'JetBrains Mono',monospace;color:rgba(255,255,255,.82);white-space:nowrap}.story-viewer-seek{flex:1;min-width:70px;accent-color:#e59e00;cursor:pointer}.story-viewer-volume{width:58px;flex:0 0 58px;accent-color:#e59e00;cursor:pointer}.story-viewer-user{position:absolute;top:22px;left:16px;right:16px;z-index:11;display:flex;align-items:center;justify-content:space-between;gap:10px}.story-viewer-actions{display:flex;align-items:center;gap:6px}.story-pause-toggle{width:36px;height:36px;border-radius:50%;border:1px solid rgba(255,255,255,.3);background:rgba(0,0,0,.42);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:.78rem;backdrop-filter:blur(3px);transition:background .15s ease,border-color .15s ease}.story-pause-toggle:hover{background:rgba(229,158,0,.2);border-color:#e59e00}.story-profile-link{display:flex;align-items:center;gap:9px;color:#fff;text-decoration:none}.story-profile-link img{width:40px;height:40px;border-radius:50%;border:2px solid #e59e00;object-fit:cover}.story-profile-link span{display:flex;flex-direction:column}.story-profile-link strong{font-family:'Rajdhani',sans-serif;font-size:1rem}.story-profile-link small{color:#b6b1a9;font-size:.68rem}.story-profile-link:hover strong{text-decoration:underline}.story-viewers-button{border:1px solid rgba(255,255,255,.3);background:rgba(0,0,0,.42);color:#fff;border-radius:999px;padding:6px 9px;cursor:pointer;backdrop-filter:blur(3px)}.story-viewer-overlay{position:absolute;z-index:9;max-width:84%;text-align:center}.story-viewer-emoji{font-size:2.2rem;filter:drop-shadow(0 2px 5px #000)}.story-viewer-caption{color:#fff;font-size:1.25rem;font-weight:800;line-height:1.3;text-shadow:0 2px 8px #000;white-space:pre-wrap;word-break:break-word}.story-viewer-link{max-width:88%;overflow:hidden}.story-viewer-link a{display:inline-flex;padding:9px 17px;max-width:100%;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;border:1px solid #e59e00;border-radius:999px;color:#fff;background:rgba(10,10,10,.7);text-decoration:none;font-weight:800}.story-nav{position:absolute;top:50%;transform:translateY(-50%);z-index:20;width:48px;height:92px;border:1px solid rgba(255,255,255,.2);background:rgba(0,0,0,.45);color:#fff;font-size:46px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s,border-color .15s}.story-nav:hover:not(:disabled){background:rgba(229,158,0,.2);border-color:#e59e00}.story-nav:disabled{opacity:.18;cursor:default}.story-nav-prev{left:-66px;border-radius:24px 8px 8px 24px}.story-nav-next{right:-66px;border-radius:8px 24px 24px 8px}.story-viewer-close{position:absolute;right:-58px;top:-8px;z-index:21;color:#fff;font-size:32px}.story-viewer-bottom-hint{position:absolute;bottom:10px;left:0;right:0;text-align:center;color:rgba(255,255,255,.55);font-size:.65rem;z-index:8}.story-viewers-modal{z-index:9100}.story-viewers-panel{position:relative;z-index:1;width:min(420px,calc(100vw - 24px));max-height:min(420px,calc(100vh - 24px));background:#141310;border:1px solid rgba(229,158,0,.55);border-radius:12px;overflow:hidden;box-shadow:0 18px 55px rgba(0,0,0,.52)}.story-viewers-summary{padding:12px 18px;color:#aaa;border-bottom:1px solid rgba(255,255,255,.07)}.story-viewers-list{max-height:130px;overflow:auto;padding:8px}.story-viewer-row{display:flex;align-items:center;gap:10px;padding:9px 10px;color:#fff;text-decoration:none;border-radius:8px}.story-viewer-row:hover{background:rgba(229,158,0,.09)}.story-viewer-row img{width:38px;height:38px;border-radius:50%;object-fit:cover;border:1px solid rgba(229,158,0,.55)}.story-viewer-row span{display:flex;flex-direction:column}.story-viewer-row small{color:#8e8982;font-size:.7rem}.story-viewers-empty{padding:28px;text-align:center;color:#8e8982}
.story-emoji-picker{z-index:9500;width:310px;padding:10px;background:#141310;border:1px solid rgba(229,158,0,.55);border-radius:8px;box-shadow:0 14px 40px rgba(0,0,0,.55)}.story-emoji-picker .emojis-grid-view{display:grid;grid-template-columns:repeat(8,1fr);gap:4px;max-height:270px;overflow:auto}.story-emoji-picker .emojis-grid-view button{border:0;background:transparent;border-radius:5px;font-size:1.35rem;padding:5px;cursor:pointer}.story-emoji-picker .emojis-grid-view button:hover{background:rgba(229,158,0,.15)}
body.story-modal-open{overflow:hidden}

@media (max-width:1100px){.story-editor-layout{grid-template-columns:minmax(280px,340px) minmax(0,1fr);gap:14px}.story-editor-stage{width:100%}.story-viewer{width:min(500px,calc(100vw - 80px));height:min(calc(100vh - 24px),calc((100vw - 80px) * 16 / 9))}.story-nav-prev{left:-46px}.story-nav-next{right:-46px}.story-viewer-close{right:-42px}}
@media (max-width:800px){.stories-rail{position:relative;min-height:150px}.story-tile{flex-basis:104px;height:150px}.story-create-panel{width:calc(100vw - 14px);max-height:calc(100vh - 14px)}.story-editor-layout{grid-template-columns:1fr;padding:12px;gap:12px}.story-editor-stage{width:min(320px,100%);margin:0 auto}.story-editor-controls{padding-bottom:2px}.story-form-footer{padding:11px 12px}.story-form-footer .btn{width:100%}.story-viewer{width:min(430px,calc(100vw - 20px));height:calc(100vh - 20px)}.story-nav{width:38px;height:70px;font-size:38px;background:rgba(0,0,0,.25);border-color:rgba(255,255,255,.14)}.story-nav-prev{left:5px}.story-nav-next{right:5px}.story-viewer-close{right:7px;top:7px}.story-viewers-button{font-size:.7rem}}
@media (max-width:520px){.stories-rail{position:relative;min-height:138px}.story-tile{flex-basis:88px;height:138px;border-radius:8px}.story-avatar-ring{width:34px;height:34px;top:7px;left:7px}.story-user-name{left:7px;bottom:10px;font-size:.82rem}.story-own-plus{top:69px;width:31px;height:31px;font-size:21px}.story-own-media{height:95px}.story-own-label{font-size:.9rem}.story-own-tile small{display:none}.story-editor-layout{padding:8px}.story-preview-controls{left:6px;right:6px;bottom:6px;gap:5px;padding:6px}.story-preview-volume{width:44px;flex-basis:44px}.story-viewer-media-controls{left:8px;right:8px;bottom:34px;padding:7px;gap:5px}.story-viewer-volume{width:46px;flex-basis:46px}.story-editor-stage{width:min(300px,100%)}.story-editor-help{font-size:.62rem}.story-viewer{width:calc(100vw - 10px);height:calc(100vh - 10px)}.story-viewer-shell{border-radius:10px}.story-progress{top:8px;left:8px;right:8px}.story-viewer-user{top:18px;left:12px;right:12px}.story-profile-link img{width:36px;height:36px}.story-viewer-caption{font-size:1.05rem}.story-viewer-link a{padding:8px 13px}.story-viewer-bottom-hint{display:none}}

/* V20 – pontos videórész-kijelölés, nagyobb rész-kártyák és fix szövegstílusok */
.story-trim-track-wrap{height:44px;margin:13px 4px 5px;}
.story-trim-track{top:17px;height:10px;}
.story-trim-selected{box-shadow:0 0 18px rgba(229,158,0,.34);}
.story-trim-track-wrap input[type=range]{height:44px;opacity:0;cursor:default;}
.story-trim-track-wrap input[type=range]::-webkit-slider-thumb{opacity:0;}
.story-trim-track-wrap input[type=range]::-moz-range-thumb{opacity:0;}
.story-trim-handle{position:absolute;top:4px;z-index:4;width:30px;height:30px;margin-left:-15px;display:flex;align-items:center;justify-content:center;border:1px solid rgba(229,158,0,.82);border-radius:8px;background:linear-gradient(180deg,#2a2110,#0e0e0e);color:#f2b300;box-shadow:0 4px 14px rgba(0,0,0,.55),0 0 0 2px rgba(229,158,0,.08);cursor:ew-resize;touch-action:none;user-select:none;transition:transform .12s ease,background .12s ease,border-color .12s ease;}
.story-trim-handle span{font:900 12px/1 'JetBrains Mono',monospace;letter-spacing:-2px;}
.story-trim-handle:hover,.story-trim-handle:focus{outline:none;border-color:#ffc21a;background:#3a2a0d;transform:translateY(-1px) scale(1.05);}
.story-trim-handle-start span{transform:translateX(1px);}
.story-trim-handle-end span{transform:translateX(-1px);}
.story-trim-clips{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:14px 0 4px;}
.story-trim-clip{position:relative;min-height:64px;padding:10px 30px 9px 11px;border:1px solid rgba(255,255,255,.1);border-radius:9px;background:linear-gradient(145deg,#111216,#0b0c0f);color:#ddd;cursor:pointer;text-align:left;display:flex;flex-direction:column;justify-content:center;gap:4px;box-sizing:border-box;}
.story-trim-clip:hover{border-color:rgba(229,158,0,.45);background:#15130f;}
.story-trim-clip.active{border-color:#e5a400;box-shadow:0 0 0 1px rgba(229,158,0,.16),0 7px 18px rgba(0,0,0,.22);}
.story-trim-clip strong{font:800 .78rem 'Rajdhani',sans-serif;color:#e5a400;}
.story-trim-clip span{font:600 .66rem 'JetBrains Mono',monospace;color:#c3beb6;}
.story-trim-clip em{position:absolute;right:8px;top:8px;width:20px;height:20px;border-radius:6px;display:flex;align-items:center;justify-content:center;color:#77736d;font:700 14px/1 'Rajdhani',sans-serif;font-style:normal;}
.story-trim-clip em:hover{color:#ff6565;background:rgba(255,80,80,.08);}
.story-trim-actions{margin-top:10px;align-items:stretch;}
.story-trim-actions .story-tool-btn{flex:1;min-height:38px;}
.story-trim-actions .story-tool-btn-primary{background:linear-gradient(180deg,#f0b400,#df9c00);color:#111;border-color:#f0b400;font-weight:900;}
.story-style-fixed-note{margin-top:7px;color:#77736d;font-size:.62rem;line-height:1.35;}
.story-color-grid{display:grid;grid-template-columns:minmax(90px,1fr) repeat(3,minmax(48px,1fr));gap:6px;align-items:center;margin-top:8px;}
.story-color-grid span{font-size:.68rem;color:#9d9991;}
.story-color-grid input{width:100%;padding:7px 7px;box-sizing:border-box;}
.story-caption-overlay,.story-viewer-caption{--story-caption-shadow:#000;}
.story-caption-style-dropx,.story-viewer-caption.story-caption-style-dropx{font-family:'Rajdhani',sans-serif;font-weight:800;background:rgba(0,0,0,.28);border-radius:8px;padding:7px 12px;letter-spacing:.01em;text-shadow:0 2px 8px var(--story-caption-shadow);}
.story-caption-style-clean,.story-viewer-caption.story-caption-style-clean{font-family:'Chakra Petch',sans-serif;font-weight:650;background:rgba(255,255,255,.10);border:1px solid rgba(255,255,255,.20);border-radius:7px;padding:7px 12px;text-shadow:none;backdrop-filter:blur(5px);}
.story-caption-style-neon,.story-viewer-caption.story-caption-style-neon{font-family:'Orbitron',sans-serif;font-weight:700;background:rgba(0,0,0,.18);border-radius:6px;padding:8px 13px;letter-spacing:.025em;text-shadow:0 0 5px var(--story-caption-shadow),0 0 14px var(--story-caption-shadow);}
.story-caption-style-outline,.story-viewer-caption.story-caption-style-outline{font-family:'Rajdhani',sans-serif;font-weight:900;background:rgba(0,0,0,.24);border-radius:6px;padding:7px 12px;text-shadow:none;-webkit-text-stroke:1px var(--story-caption-shadow);}
.story-caption-style-handwritten,.story-viewer-caption.story-caption-style-handwritten{font-family:'Caveat','Segoe Print',cursive;font-weight:600;background:transparent;padding:4px 8px;font-size:1.35rem;text-shadow:0 2px 5px var(--story-caption-shadow);}
.story-caption-style-elegant,.story-viewer-caption.story-caption-style-elegant{font-family:Georgia,serif;font-weight:700;background:rgba(0,0,0,.22);border-radius:7px;padding:7px 12px;font-style:italic;text-shadow:0 2px 7px var(--story-caption-shadow);}
.story-viewer-caption{line-height:1.3;white-space:pre-wrap;word-break:break-word;}
@media (max-width:520px){.story-trim-clips{grid-template-columns:1fr;}.story-trim-handle{width:28px;height:28px;margin-left:-14px;}}


/* V21 – mobilbarát szerkesztés, integrált emoji, média-döntés, link alakok és animált szövegstílusok */
.story-text-editor-wrap{position:relative;display:flex;align-items:flex-end;gap:7px}
.story-text-editor-wrap textarea{flex:1;min-height:94px;resize:vertical;padding-right:50px}
.story-emoji-inline-btn{width:42px;height:42px;flex:0 0 42px;border:1px solid rgba(229,158,0,.5);border-radius:10px;background:#19150e;color:#fff;font-size:1.18rem;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:transform .15s ease,border-color .15s ease,background .15s ease;touch-action:manipulation}
.story-emoji-inline-btn:hover,.story-emoji-inline-btn:focus-visible{border-color:#f3b800;background:rgba(229,158,0,.13);transform:translateY(-1px);outline:none}
.story-format-row{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.story-format-btn{width:36px;height:34px;border:1px solid rgba(255,255,255,.12);border-radius:8px;background:#0a0b0e;color:#ddd;cursor:pointer;font:800 .9rem/1 'Rajdhani',sans-serif;display:inline-flex;align-items:center;justify-content:center;touch-action:manipulation}
.story-format-btn:hover,.story-format-btn.active{border-color:#e5a400;background:rgba(229,158,0,.12);color:#ffc21a;box-shadow:0 0 12px rgba(229,158,0,.12)}
.story-format-hint,.story-format-label{font-size:.64rem;color:#77736d}
.story-format-hint{margin-left:4px}
.story-rotate-control{padding:9px;border:1px solid rgba(255,255,255,.08);border-radius:9px;background:#090a0d}
.story-rotate-head{display:flex;justify-content:space-between;align-items:center;color:#aaa;font-size:.68rem;margin-bottom:6px}
.story-rotate-head output{color:#f0b400;font:800 .75rem/1 'JetBrains Mono',monospace}
.story-rotate-row{display:grid;grid-template-columns:auto minmax(90px,1fr) auto;align-items:center;gap:7px}
.story-rotate-row input[type=range]{width:100%;accent-color:#e59e00;touch-action:pan-x}
.story-rotate-btn{min-height:42px;padding:8px 10px;white-space:nowrap}
.story-reset-btn{width:100%;margin-top:7px;min-height:38px}
.story-link-color-grid{margin-top:7px}
.story-link-format-row{margin-top:7px}
.story-link-overlay{overflow:hidden;border:1px solid var(--story-link-accent,#e59e00);border-radius:999px;background:rgba(7,7,8,.82);box-shadow:0 7px 22px rgba(0,0,0,.28);backdrop-filter:blur(7px);transition:border-radius .18s ease,box-shadow .18s ease,background .18s ease}
.story-link-overlay span{display:inline-flex;align-items:center;gap:6px;padding:8px 15px;border:0;border-radius:inherit;background:transparent;color:inherit;font-weight:inherit;white-space:nowrap}
.story-link-overlay[data-style="rounded"]{border-radius:11px}
.story-link-overlay[data-style="square"]{border-radius:2px}
.story-link-overlay[data-style="pill"]{border-radius:999px}
.story-viewer-link a{display:inline-flex;align-items:center;gap:6px;padding:9px 17px;max-width:100%;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;border:1px solid currentColor;border-radius:999px;color:#fff;background:rgba(10,10,10,.72);text-decoration:none;font-weight:800;box-shadow:0 7px 22px rgba(0,0,0,.28);backdrop-filter:blur(7px);transition:border-radius .18s ease,background .18s ease}
.story-viewer-link.rounded a{border-radius:11px}
.story-viewer-link.square a{border-radius:2px}
.story-viewer-link.pill a{border-radius:999px}
.story-caption-style-dropx,.story-viewer-caption.story-caption-style-dropx{animation:dropxCaptionFloat 3.8s ease-in-out infinite}
.story-caption-style-clean,.story-viewer-caption.story-caption-style-clean{animation:dropxCaptionSoft 4.8s ease-in-out infinite}
.story-caption-style-neon,.story-viewer-caption.story-caption-style-neon{animation:dropxCaptionNeon 2.6s ease-in-out infinite}
.story-caption-style-outline,.story-viewer-caption.story-caption-style-outline{animation:dropxCaptionPulse 3.2s ease-in-out infinite}
.story-caption-style-handwritten,.story-viewer-caption.story-caption-style-handwritten{animation:dropxCaptionWrite 4.4s ease-in-out infinite}
.story-caption-style-elegant,.story-viewer-caption.story-caption-style-elegant{animation:dropxCaptionElegant 4.6s ease-in-out infinite}
@keyframes dropxCaptionFloat{0%,100%{filter:brightness(1) drop-shadow(0 0 0 transparent)}50%{filter:brightness(1.08) drop-shadow(0 3px 8px rgba(0,0,0,.28))}}
@keyframes dropxCaptionSoft{0%,100%{filter:brightness(1)}50%{filter:brightness(1.12)}}
@keyframes dropxCaptionNeon{0%,100%{filter:drop-shadow(0 0 0 transparent)}50%{filter:drop-shadow(0 0 10px var(--story-caption-shadow))}}
@keyframes dropxCaptionPulse{0%,100%{opacity:.94}50%{opacity:1}}
@keyframes dropxCaptionWrite{0%,100%{letter-spacing:.01em}50%{letter-spacing:.025em}}
@keyframes dropxCaptionElegant{0%,100%{filter:brightness(1)}50%{filter:brightness(1.08)}}
@media (prefers-reduced-motion:reduce){.story-caption-style-dropx,.story-viewer-caption.story-caption-style-dropx,.story-caption-style-clean,.story-viewer-caption.story-caption-style-clean,.story-caption-style-neon,.story-viewer-caption.story-caption-style-neon,.story-caption-style-outline,.story-viewer-caption.story-caption-style-outline,.story-caption-style-handwritten,.story-viewer-caption.story-caption-style-handwritten,.story-caption-style-elegant,.story-viewer-caption.story-caption-style-elegant{animation:none}}

@media (max-width:800px){
    .story-create-panel{width:calc(100vw - 10px);max-height:calc(100vh - 10px);border-radius:12px}
    .story-modal-header{padding:13px 14px}
    .story-modal-header h3{font-size:1.25rem}
    .story-editor-layout{padding:10px;gap:10px}
    .story-editor-stage{width:min(330px,92vw);border-radius:12px}
    .story-editor-help{max-width:330px}
    .story-control-section{padding:10px}
    .story-control-section textarea,.story-control-section input,.story-control-section select{font-size:16px}
    .story-rotate-row{grid-template-columns:1fr 1.3fr 1fr}
    .story-rotate-btn{padding:8px 5px;font-size:.72rem}
    .story-format-btn{width:40px;height:40px}
    .story-emoji-inline-btn{width:44px;height:44px;flex-basis:44px}
    .story-form-footer{position:sticky;bottom:0;z-index:200;background:rgba(20,19,16,.97);backdrop-filter:blur(12px)}
}
@media (max-width:520px){
    .story-modal,.story-viewer-modal,.story-viewers-modal{align-items:stretch}
    .story-create-panel{width:100vw;height:100dvh;max-height:100dvh;border-radius:0;border-left:0;border-right:0}
    .story-editor-layout{padding:8px 8px 84px;gap:8px}
    .story-editor-stage{width:min(300px,86vw)}
    .story-editor-controls{gap:8px}
    .story-control-section{border-radius:8px;padding:9px}
    .story-rotate-row{grid-template-columns:1fr 1.15fr 1fr;gap:5px}
    .story-rotate-btn{min-height:44px;font-size:.68rem}
    .story-format-hint{width:100%;margin-left:0;margin-top:2px}
    .story-link-color-grid{grid-template-columns:minmax(88px,1fr) repeat(3,minmax(42px,1fr))}
    .story-form-footer{padding:8px 9px;gap:8px}
    .story-form-footer span{font-size:.63rem}
    .story-form-footer .btn{min-height:44px}
    .story-viewer{width:100vw;height:100dvh}
    .story-viewer-shell{border-radius:0;border-left:0;border-right:0}
    .story-viewer-media-controls{left:8px;right:8px;bottom:32px}
}
.story-color-picker-row{display:grid;grid-template-columns:minmax(110px,1fr) 48px auto;align-items:center;gap:8px;margin-top:7px}
.story-color-picker-row span{font-size:.68rem;color:#9d9991}
.story-color-picker-row input[type=color]{width:48px;height:38px;padding:3px;border:1px solid rgba(255,255,255,.14);border-radius:8px;background:#08090c;cursor:pointer}
.story-color-picker-row output{min-width:74px;color:#bdb7ad;font:700 .66rem/1 'JetBrains Mono',monospace}
@media (max-width:520px){.story-color-picker-row{grid-template-columns:minmax(100px,1fr) 48px auto}.story-color-picker-row input[type=color]{width:48px;height:42px}}

/* V22 – rögzített előnézet + külön görgethető vezérlőpanel + érintésbarát forgatófogantyúk */
.story-editor-layout{overflow:hidden;align-items:stretch;}
.story-editor-stage-wrap{position:sticky;top:0;align-self:start;min-height:0;z-index:4;}
.story-editor-controls{min-height:0;overflow-y:auto;overflow-x:hidden;padding-right:5px;scrollbar-width:thin;overscroll-behavior:contain;}
.story-editor-controls::-webkit-scrollbar{width:6px}.story-editor-controls::-webkit-scrollbar-thumb{background:rgba(229,158,0,.32);border-radius:99px}.story-editor-controls::-webkit-scrollbar-track{background:transparent}
.story-rotate-handle{position:absolute;right:-11px;bottom:-11px;z-index:30;width:30px;height:30px;padding:0;border:1px solid rgba(229,158,0,.95);border-radius:50%;background:linear-gradient(145deg,#2a2110,#090a0c);color:#ffc21a;box-shadow:0 4px 16px rgba(0,0,0,.55),0 0 0 2px rgba(229,158,0,.10);display:flex;align-items:center;justify-content:center;font:900 16px/1 'Arial',sans-serif;cursor:grab;touch-action:none;user-select:none;transition:transform .14s ease,background .14s ease,box-shadow .14s ease;}
.story-rotate-handle:hover,.story-rotate-handle:focus-visible{transform:scale(1.08);background:#35270d;box-shadow:0 5px 18px rgba(0,0,0,.62),0 0 14px rgba(229,158,0,.22);outline:none;}
#story-media-layer>.story-rotate-handle{right:10px;bottom:10px;}
.story-editor-overlay:has(.story-rotate-handle){overflow:visible;}
@media (max-width:800px){
  .story-create-panel{width:calc(100vw - 8px);height:calc(100vh - 8px);max-height:none;border-radius:12px;}
  .story-create-panel > form{overflow:hidden;}
  .story-editor-layout{display:flex;flex-direction:column;gap:8px;padding:8px;overflow:hidden;}
  .story-editor-stage-wrap{position:relative;top:auto;flex:0 0 auto;width:100%;}
  .story-editor-stage{width:min(310px,calc(100vw - 36px));max-height:calc(100vh - 310px);}
  .story-editor-help{margin:5px auto 0;}
  .story-editor-controls{flex:1 1 auto;min-height:0;width:100%;overflow-y:auto;padding:0 3px 10px 0;}
  .story-control-section{padding:10px;}
  .story-rotate-handle{width:34px;height:34px;right:-8px;bottom:-8px;font-size:17px;}
  #story-media-layer>.story-rotate-handle{right:7px;bottom:7px;}
}
@media (max-width:520px){
  .story-create-panel{width:100vw;height:100dvh;max-height:100dvh;border-radius:0;border-left:0;border-right:0;}
  .story-modal-header{padding:11px 13px;}
  .story-modal-header h3{font-size:1.25rem;}
  .story-editor-layout{padding:6px;gap:6px;}
  .story-editor-stage{width:min(285px,calc(100vw - 28px));max-height:calc(100dvh - 285px);border-radius:10px;}
  .story-editor-controls{padding-right:2px;}
  .story-control-section{border-radius:10px;padding:9px;}
  .story-text-editor-wrap textarea{min-height:82px;}
  .story-emoji-inline-btn{width:44px;height:44px;flex-basis:44px;}
  .story-format-btn{width:40px;height:38px;}
  .story-rotate-handle{width:36px;height:36px;right:-7px;bottom:-7px;}
  #story-media-layer>.story-rotate-handle{right:6px;bottom:6px;}
}

/* Story média fallback: a videó előnézete marad látható akkor is, ha a böngésző
   késleltetve tölti a videót vagy az autoplay nem indul el azonnal. */
.story-video-visual{position:absolute;inset:0;background:#000;overflow:hidden;display:flex;align-items:center;justify-content:center}
.story-video-visual .story-viewer-media{position:absolute;inset:0;z-index:2}
.story-viewer-video-poster{position:absolute;inset:0;z-index:1;width:100%;height:100%;object-fit:contain;background:#000;display:block;transition:opacity .18s ease}
.story-viewer-video-poster[hidden]{display:none}
.story-tile-video-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:radial-gradient(circle at 50% 45%,rgba(229,158,0,.16),rgba(0,0,0,.7) 58%,#050506 100%);color:#e59e00}
.story-tile-video-placeholder span{width:38px;height:38px;border:1px solid rgba(229,158,0,.65);border-radius:50%;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.35);font-size:14px;padding-left:2px}
\n\n/* V22 – mobil Story editor: app-szerű ikonmenü + bottom sheet */\n.story-mobile-editor-bar,.story-mobile-sheet{display:none;}\n
.story-modal-header .story-close{
    position:relative;
    z-index:20;
    width:40px;
    height:40px;
    flex:0 0 40px;
    display:grid;
    place-items:center;
    padding:0;
    border:1px solid rgba(255,255,255,.10);
    border-radius:50%;
    background:rgba(255,255,255,.035);
    color:#d8d4cd;
    cursor:pointer;
    line-height:0;
}
.story-modal-header .story-close:hover{
    color:#fff;
    border-color:rgba(229,158,0,.55);
    background:rgba(229,158,0,.08);
}
.story-modal-header .story-close svg{
    width:17px;
    height:17px;
    display:block;
    fill:none;
    stroke:currentColor;
    stroke-width:2;
    stroke-linecap:round;
    stroke-linejoin:round;
    pointer-events:none;
}
.story-modal-header .story-close svg path{
    fill:none;
    stroke:currentColor;
    stroke-width:2;
    stroke-linecap:round;
    stroke-linejoin:round;
}

@media (max-width:700px){\n  .story-create-panel{height:100dvh;max-height:none;width:100vw;border-radius:0;border-left:0;border-right:0;display:flex;flex-direction:column;overflow:hidden;}\n  .story-create-panel .story-modal-header{flex:0 0 auto;padding:12px 14px;}\n  .story-create-panel .story-modal-header h3{font-size:1.05rem;margin-top:3px;}\n  .story-create-panel form{min-height:0;flex:1;display:flex;flex-direction:column;overflow:hidden;}\n  .story-editor-layout{display:flex;flex:1;min-height:0;overflow:hidden;padding:8px 8px 76px;gap:0;position:relative;}\n  .story-editor-stage-wrap{width:100%;min-height:0;display:flex;flex-direction:column;align-items:center;overflow:hidden;}\n  .story-editor-stage{width:min(88vw,390px);height:min(calc(100dvh - 185px),700px);max-height:none;flex:0 1 auto;}\n  .story-editor-help{font-size:.58rem;line-height:1.25;margin:5px 10px 0;opacity:.55;}\n  .story-editor-controls{display:block;width:0;height:0;overflow:visible;padding:0;margin:0;}\n  .story-editor-controls > .story-control-section:not(.story-page-pager),\n  .story-editor-controls > .story-editor-note{display:none;}\n  .story-page-pager{position:absolute;top:8px;left:8px;right:8px;z-index:9;background:rgba(8,8,10,.86);backdrop-filter:blur(12px);border-radius:12px;padding:5px;}\n  .story-mobile-editor-bar{display:grid;position:absolute;z-index:30;left:8px;right:8px;bottom:8px;grid-template-columns:repeat(5,1fr);gap:5px;padding:6px;border:1px solid rgba(229,158,0,.3);border-radius:16px;background:rgba(12,12,14,.88);backdrop-filter:blur(18px);box-shadow:0 12px 35px rgba(0,0,0,.5);padding-bottom:max(6px,env(safe-area-inset-bottom));}\n  .story-mobile-tool{min-width:0;min-height:54px;border:1px solid rgba(255,255,255,.08);border-radius:11px;background:transparent;color:#aaa;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font:700 .62rem/1 'Rajdhani',sans-serif;touch-action:manipulation;}\n  .story-mobile-tool svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}\n  .story-mobile-tool:active,.story-mobile-tool:focus-visible{color:#f0b400;border-color:rgba(229,158,0,.65);background:rgba(229,158,0,.1);outline:none;}\n  .story-mobile-tool[hidden]{display:none;}\n  .story-mobile-sheet{position:fixed;inset:0;z-index:10050;display:block;pointer-events:none;}\n  .story-mobile-sheet[hidden]{display:block;visibility:hidden;}\n  .story-mobile-sheet-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.5);opacity:0;transition:opacity .18s ease;pointer-events:none;}\n  .story-mobile-sheet-panel{position:absolute;left:0;right:0;bottom:0;max-height:min(72dvh,620px);display:flex;flex-direction:column;border:1px solid rgba(229,158,0,.28);border-bottom:0;border-radius:18px 18px 0 0;background:linear-gradient(180deg,#151411,#0d0e10);box-shadow:0 -18px 50px rgba(0,0,0,.55);transform:translateY(102%);transition:transform .2s ease;overflow:hidden;padding-bottom:env(safe-area-inset-bottom);pointer-events:auto;}\n  .story-mobile-sheet.is-open{pointer-events:auto;}\n  .story-mobile-sheet.is-open .story-mobile-sheet-backdrop{opacity:1;pointer-events:auto;}\n  .story-mobile-sheet.is-open .story-mobile-sheet-panel{transform:translateY(0);}\n  .story-mobile-sheet-head{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid rgba(255,255,255,.08);flex:0 0 auto;}\n  .story-mobile-sheet-head h4{margin:2px 0 0;color:#fff;font:800 1rem/1 'Rajdhani',sans-serif;}\n  .story-mobile-sheet-close{width:38px;height:38px;border:1px solid rgba(255,255,255,.1);border-radius:10px;background:#111214;color:#ddd;display:grid;place-items:center;touch-action:manipulation;}\n  .story-mobile-sheet-close svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;}\n  .story-mobile-sheet-body{overflow:auto;-webkit-overflow-scrolling:touch;padding:12px 12px 18px;overscroll-behavior:contain;}\n  .story-mobile-sheet-body .story-control-section{display:block!important;margin:0 0 10px;}\n  .story-mobile-sheet-body .story-control-section:last-child{margin-bottom:0;}\n  .story-mobile-sheet-body .story-editor-note{display:block!important;}\n  .story-mobile-sheet-body .story-control-section[data-mobile-section="media"] + .story-control-section[data-mobile-section="media"]{margin-top:-2px;border-top:0;}\n  .story-mobile-sheet-body input,.story-mobile-sheet-body textarea,.story-mobile-sheet-body select{font-size:16px;min-height:44px;}\n  .story-mobile-sheet-body .story-format-btn{width:44px;height:44px;}\n  .story-mobile-sheet-body .story-emoji-inline-btn{width:46px;height:46px;flex-basis:46px;}\n  .story-mobile-sheet-body .story-color-picker-row{min-height:48px;}\n  .story-mobile-sheet-body .story-color-picker-row input[type=color]{min-width:52px;min-height:42px;}\n  .story-mobile-sheet-body .story-tool-btn,.story-mobile-sheet-body .story-control-primary{min-height:44px;}\n  .story-form-footer{position:absolute;left:8px;right:8px;bottom:78px;z-index:29;background:linear-gradient(180deg,transparent,rgba(8,8,10,.96) 30%);border:0;padding:24px 4px 5px;pointer-events:none;}\n  .story-form-footer > *{pointer-events:auto;}\n  .story-form-footer span{display:none;}\n  .story-form-footer .btn{width:100%;min-height:44px;border-radius:12px;}\n  body.story-mobile-sheet-open{overflow:hidden;}\n}\n@media (max-width:420px){\n  .story-editor-stage{width:min(86vw,350px);height:min(calc(100dvh - 175px),620px);}\n  .story-mobile-tool{min-height:50px;font-size:.58rem;}\n  .story-mobile-tool svg{width:20px;height:20px;}\n}\n
/* V23 – végleges mobil Story editor: app-szerű, kompakt, érintésbarát vezérlés */
@media (max-width:700px){
  .story-modal,
  .story-viewer-modal,
  .story-viewers-modal{z-index:20000;}

  .story-create-panel{
    z-index:1;
    width:100vw;
    height:100dvh;
    max-height:none;
    border:0;
    border-radius:0;
    background:#090a0c;
  }

  .story-create-panel .story-modal-header{
    min-height:62px;
    box-sizing:border-box;
    padding:10px 14px;
    background:rgba(10,10,11,.96);
    border-bottom:1px solid rgba(229,158,0,.18);
  }
  .story-create-panel .story-modal-header h3{font-size:1.05rem;line-height:1.05;}
  .story-create-panel .story-close{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.035);border:1px solid rgba(255,255,255,.08);font-size:24px;}

  .story-editor-layout{
    display:block;
    position:relative;
    flex:1 1 auto;
    min-height:0;
    height:auto;
    padding:0 0 92px;
    overflow:hidden;
    background:radial-gradient(circle at 50% 32%,rgba(229,158,0,.055),transparent 42%),#090a0c;
  }

  .story-editor-stage-wrap{
    position:relative;
    width:100%;
    height:100%;
    min-height:0;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    padding:10px 0 8px;
    box-sizing:border-box;
  }

  .story-editor-stage{
    width:min(78vw,350px);
    height:min(70dvh,620px);
    max-height:none;
    flex:0 0 auto;
    border-radius:14px;
    border-color:rgba(229,158,0,.55);
    box-shadow:0 16px 50px rgba(0,0,0,.55),0 0 0 1px rgba(229,158,0,.04);
  }

  .story-editor-help{
    position:absolute;
    left:18px;
    right:18px;
    bottom:8px;
    max-width:none;
    margin:0;
    text-align:center;
    font-size:.56rem;
    line-height:1.2;
    opacity:.42;
    pointer-events:none;
  }

  /* Desktop vezérlők mobilon fizikailag eltűnnek, nem foglalnak helyet. */
  .story-editor-controls{display:none;}
  .story-page-pager{display:none!important;}

  /* Alsó alkalmazás-eszköztár */
  .story-mobile-editor-bar{
    display:flex;
    position:absolute;
    left:10px;
    right:10px;
    bottom:10px;
    z-index:40;
    min-height:64px;
    padding:6px;
    gap:5px;
    box-sizing:border-box;
    align-items:stretch;
    border:1px solid rgba(255,255,255,.10);
    border-radius:20px;
    background:rgba(18,19,21,.94);
    backdrop-filter:blur(22px) saturate(130%);
    -webkit-backdrop-filter:blur(22px) saturate(130%);
    box-shadow:0 14px 38px rgba(0,0,0,.55),0 0 0 1px rgba(229,158,0,.04);
    padding-bottom:max(6px,env(safe-area-inset-bottom));
  }

  .story-mobile-tool,
  .story-create-panel .story-mobile-tool{
    appearance:none;
    -webkit-appearance:none;
    flex:1 1 0;
    min-width:0;
    min-height:52px;
    margin:0;
    padding:7px 3px 6px;
    box-sizing:border-box;
    border:1px solid transparent;
    border-radius:15px;
    background:transparent;
    color:#8d9095;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:4px;
    font:700 .60rem/1 'Rajdhani',sans-serif;
    letter-spacing:.02em;
    text-transform:uppercase;
    box-shadow:none;
    outline:none;
    touch-action:manipulation;
    -webkit-tap-highlight-color:transparent;
  }

  .story-mobile-tool svg{
    width:22px;
    height:22px;
    flex:0 0 22px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.7;
    stroke-linecap:round;
    stroke-linejoin:round;
    filter:none;
  }

  .story-mobile-tool span{display:block;line-height:1;}
  .story-mobile-tool:hover{color:#d7d9dc;background:rgba(255,255,255,.035);}
  .story-mobile-tool:active{transform:scale(.96);}
  .story-mobile-tool:focus-visible{color:#ffc21a;border-color:rgba(229,158,0,.35);background:rgba(229,158,0,.08);}
  .story-mobile-tool.is-active{color:#ffc21a;background:linear-gradient(180deg,rgba(229,158,0,.16),rgba(229,158,0,.055));border-color:rgba(229,158,0,.38);}
  .story-mobile-tool.is-active svg{filter:drop-shadow(0 0 5px rgba(229,158,0,.25));}
  .story-mobile-tool[hidden]{display:none;}

  /* Közzététel – külön lebegő gomb, nem keverjük az eszközökkel. */
  .story-form-footer{
    position:absolute;
    left:50%;
    bottom:84px;
    z-index:41;
    width:auto;
    transform:translateX(-50%);
    padding:0;
    border:0;
    background:none;
    pointer-events:none;
  }
  .story-form-footer span{display:none;}
  .story-form-footer .btn{
    pointer-events:auto;
    width:auto;
    min-width:150px;
    min-height:42px;
    padding:9px 18px;
    border-radius:999px;
    font-size:.82rem;
    box-shadow:0 8px 24px rgba(0,0,0,.42),0 0 18px rgba(229,158,0,.10);
  }

  /* Bottom sheet */
  .story-mobile-sheet{
    position:fixed;
    inset:0;
    z-index:21000;
    display:block;
    pointer-events:none;
    visibility:hidden;
  }
  .story-mobile-sheet[hidden]{display:block;visibility:hidden;}
  .story-mobile-sheet.is-open{visibility:visible;pointer-events:auto;}

  .story-mobile-sheet-backdrop{
    position:absolute;
    inset:0;
    background:rgba(0,0,0,.68);
    backdrop-filter:blur(3px);
    -webkit-backdrop-filter:blur(3px);
    opacity:0;
    transition:opacity .22s ease;
    pointer-events:none;
  }
  .story-mobile-sheet.is-open .story-mobile-sheet-backdrop{opacity:1;pointer-events:auto;}

  .story-mobile-sheet-panel{
    position:absolute;
    left:0;
    right:0;
    bottom:0;
    max-height:min(68dvh,600px);
    border:1px solid rgba(229,158,0,.28);
    border-bottom:0;
    border-radius:22px 22px 0 0;
    background:linear-gradient(180deg,#181714 0%,#0c0d0f 100%);
    box-shadow:0 -20px 55px rgba(0,0,0,.60);
    transform:translateY(104%);
    transition:transform .24s cubic-bezier(.2,.75,.2,1);
    overflow:hidden;
    padding-bottom:env(safe-area-inset-bottom);
    pointer-events:auto;
  }
  .story-mobile-sheet.is-open .story-mobile-sheet-panel{transform:translateY(0);}

  .story-mobile-sheet-head{
    min-height:58px;
    padding:10px 14px 9px;
    box-sizing:border-box;
    background:rgba(255,255,255,.018);
    border-bottom:1px solid rgba(255,255,255,.08);
  }
  .story-mobile-sheet-head:before{content:'';position:absolute;top:7px;left:50%;width:38px;height:4px;border-radius:99px;background:rgba(255,255,255,.18);transform:translateX(-50%);}
  .story-mobile-sheet-head h4{font-size:1.02rem;margin:7px 0 0;}
  .story-mobile-sheet-close{width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.09);}

  .story-mobile-sheet-body{
    max-height:calc(min(68dvh,600px) - 58px);
    padding:10px 12px 18px;
    overflow:auto;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior:contain;
  }

  .story-mobile-sheet-body .story-control-section{
    display:block!important;
    margin:0 0 8px;
    padding:12px;
    border-radius:14px;
    background:rgba(255,255,255,.028);
    border-color:rgba(255,255,255,.075);
  }
  .story-mobile-sheet-body .story-editor-note{display:block!important;}
  .story-mobile-sheet-body input,
  .story-mobile-sheet-body textarea,
  .story-mobile-sheet-body select{
    min-height:46px;
    font-size:16px;
    border-radius:11px;
  }
  .story-mobile-sheet-body textarea{min-height:105px;}
  .story-mobile-sheet-body .story-control-primary,
  .story-mobile-sheet-body .story-tool-btn{min-height:46px;border-radius:11px;}
  .story-mobile-sheet-body .story-format-btn{width:46px;height:46px;border-radius:11px;}
  .story-mobile-sheet-body .story-emoji-inline-btn{width:48px;height:48px;flex-basis:48px;border-radius:12px;}
  .story-mobile-sheet-body .story-color-picker-row{min-height:50px;}
  .story-mobile-sheet-body .story-color-picker-row input[type=color]{min-width:52px;min-height:44px;border-radius:10px;}

  body.story-mobile-sheet-open{overflow:hidden;touch-action:none;}
}

@media (max-width:420px){
  .story-editor-stage{width:min(76vw,320px);height:min(68dvh,570px);}
  .story-mobile-editor-bar{left:8px;right:8px;bottom:8px;min-height:60px;border-radius:18px;}
  .story-mobile-tool{min-height:48px;padding-top:6px;}
  .story-mobile-tool svg{width:21px;height:21px;flex-basis:21px;}
  .story-mobile-tool span{font-size:.56rem;}
  .story-form-footer{bottom:78px;}
  .story-form-footer .btn{min-width:140px;min-height:40px;}
}

/* V24 – Story UX: valódi mobil app-szerű szerkesztő + teljes képernyős néző */
@media (max-width:700px){
  .story-create-panel{background:#08090b;}
  .story-editor-layout{padding:0 0 76px;}
  .story-editor-stage-wrap{padding:8px 42px 8px 8px;align-items:center;justify-content:center;}
  .story-editor-stage{width:min(82vw,360px);height:min(72dvh,640px);}

  /* Jobb felső, függőleges eszközdock */
  .story-mobile-editor-bar{
    left:auto;
    right:8px;
    top:76px;
    bottom:auto;
    width:52px;
    min-height:0;
    display:flex;
    flex-direction:column;
    gap:7px;
    padding:6px;
    border-radius:18px;
    background:rgba(10,11,13,.78);
    border:1px solid rgba(229,158,0,.28);
    box-shadow:0 12px 34px rgba(0,0,0,.52),0 0 18px rgba(229,158,0,.06);
    backdrop-filter:blur(18px) saturate(130%);
    -webkit-backdrop-filter:blur(18px) saturate(130%);
  }
  .story-mobile-tool,
  .story-create-panel .story-mobile-tool{
    flex:0 0 48px;
    width:40px;
    min-height:48px;
    padding:5px 2px;
    border-radius:13px;
    gap:3px;
  }
  .story-mobile-tool svg{width:21px;height:21px;}
  .story-mobile-tool span{font-size:.48rem;letter-spacing:0;text-transform:none;}
  .story-mobile-tool.is-active{background:rgba(229,158,0,.16);}

  /* Funkciók jobbról kinyíló panelként jelennek meg. */
  .story-mobile-sheet{z-index:21000;}
  .story-mobile-sheet-panel{
    top:0;
    bottom:0;
    left:auto;
    right:0;
    width:min(88vw,370px);
    max-height:none;
    border:1px solid rgba(229,158,0,.28);
    border-right:0;
    border-bottom:0;
    border-radius:20px 0 0 20px;
    transform:translateX(104%);
    transition:transform .25s cubic-bezier(.2,.78,.2,1);
    padding-bottom:env(safe-area-inset-bottom);
  }
  .story-mobile-sheet.is-open .story-mobile-sheet-panel{transform:translateX(0);}
  .story-mobile-sheet-head{min-height:66px;padding:12px 14px 10px;}
  .story-mobile-sheet-head:before{top:50%;left:5px;width:3px;height:34px;transform:translateY(-50%);}
  .story-mobile-sheet-head h4{margin-top:4px;}
  .story-mobile-sheet-body{max-height:none;flex:1;padding:12px 12px 22px;}

  .story-form-footer{left:10px;right:10px;bottom:10px;transform:none;width:auto;display:flex;justify-content:center;padding:0;}
  .story-form-footer .btn{min-width:156px;min-height:42px;}

  /* Néző: valódi full-screen app, nincs fölösleges X */
  .story-viewer-modal{align-items:stretch;justify-content:stretch;background:#000;}
  .story-viewer-modal .story-viewer-backdrop{background:#000;backdrop-filter:none;}
  .story-viewer{width:100vw;height:100dvh;max-width:none;max-height:none;}
  .story-viewer-shell{width:100%;height:100%;border-radius:0;border:0;transition:transform .18s ease,opacity .18s ease;will-change:transform,opacity;}
  .story-viewer-close{display:none;}
  .story-nav{display:none;}
  .story-viewer-bottom-hint{display:none;}
  .story-viewer-user{top:24px;left:14px;right:14px;}
  .story-viewer-actions{gap:7px;}
  .story-pause-toggle,.story-viewers-button{width:38px;height:38px;display:grid;place-items:center;padding:0;}
  .story-progress{top:9px;left:9px;right:9px;}
}
@media (max-width:420px){
  .story-editor-stage-wrap{padding-right:39px;}
  .story-editor-stage{width:min(80vw,320px);height:min(69dvh,570px);}
  .story-mobile-editor-bar{right:5px;top:72px;width:48px;padding:5px;gap:5px;}
  .story-mobile-tool,.story-create-panel .story-mobile-tool{width:38px;flex-basis:45px;min-height:45px;}
  .story-mobile-tool svg{width:20px;height:20px;}
  .story-mobile-tool span{font-size:.44rem;}
  .story-mobile-sheet-panel{width:min(91vw,350px);}
}

/* Mobile Story editor/viewer safety layer */
@media (max-width: 700px) {
    body.story-mobile-sheet-open { overflow: hidden; }
    #story-create-modal,
    #story-viewer-modal { position: fixed; inset: 0; z-index: 2147483000; }
    #story-create-modal .story-create-shell { max-height: 100dvh; height: 100dvh; }
    #story-viewer-modal .story-viewer-shell { width: 100vw; height: 100dvh; max-width: none; max-height: none; }
    #story-mobile-toolbar { position: fixed; right: 10px; top: 82px; z-index: 2147483100; }
    #story-mobile-sheet { z-index: 2147483200; }
    #story-viewer-content { touch-action: pan-y; overscroll-behavior: contain; }
}


/* V26 – Story mobil: valódi full-screen editor + jobb felső eszközdock + biztos swipe */
@media (max-width:700px){
  html:has(#story-create-modal:not([hidden])),
  body:has(#story-create-modal:not([hidden])){overflow:hidden;overscroll-behavior:none;}

  #story-create-modal{
    position:fixed;
    inset:0;
    width:100vw;
    height:100dvh;
    max-width:none;
    max-height:none;
    margin:0;
    padding:0;
    z-index:2147483000;
    display:block;
    overflow:hidden;
    background:#08090b;
  }
  #story-create-modal .story-modal-backdrop{display:none;}
  #story-create-modal .story-create-panel{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    max-width:none;
    max-height:none;
    margin:0;
    border:0;
    border-radius:0;
    box-shadow:none;
    overflow:hidden;
    background:#08090b;
  }
  #story-create-modal .story-create-panel > form{
    position:relative;
    width:100%;
    height:calc(100% - 69px);
    min-height:0;
    overflow:hidden;
  }
  #story-create-modal .story-modal-header{
    position:relative;
    z-index:60;
    min-height:69px;
    box-sizing:border-box;
    padding:12px 14px;
    background:linear-gradient(180deg,#151513 0%,#0b0c0e 100%);
  }
  #story-create-modal .story-modal-header h3{font-size:1.08rem;}

  #story-create-modal .story-editor-layout{
    position:relative;
    display:block;
    width:100%;
    height:100%;
    box-sizing:border-box;
    padding:10px 66px 92px 8px;
    overflow:hidden;
  }
  #story-create-modal .story-editor-stage-wrap{
    position:relative;
    width:100%;
    height:100%;
    min-height:0;
    padding:0;
    margin:0;
    display:flex;
    align-items:center;
    justify-content:flex-start;
    overflow:visible;
  }
  #story-create-modal .story-editor-stage{
    width:min(100%,390px);
    height:auto;
    aspect-ratio:9/16;
    max-height:calc(100dvh - 205px);
    flex:0 1 auto;
    margin:0 auto;
  }
  #story-create-modal .story-editor-help{
    position:absolute;
    left:6px;
    right:6px;
    bottom:4px;
    margin:0;
    max-width:none;
    font-size:.54rem;
    line-height:1.2;
    opacity:.48;
  }

  /* Desktop controls maradjanak a DOM-ban, de mobilon ne foglaljanak helyet. */
  #story-create-modal .story-editor-controls{display:none;}

  /* Jobb felső lebegő dock – mindig a viewport fölött marad. */
  #story-mobile-editor-bar{
    position:fixed;
    top:84px;
    right:10px;
    left:auto;
    bottom:auto;
    z-index:2147483100;
    width:48px;
    min-height:0;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:6px;
    padding:5px;
    box-sizing:border-box;
    border:1px solid rgba(229,158,0,.35);
    border-radius:17px;
    background:rgba(10,11,13,.88);
    backdrop-filter:blur(18px) saturate(135%);
    -webkit-backdrop-filter:blur(18px) saturate(135%);
    box-shadow:0 12px 36px rgba(0,0,0,.58),0 0 18px rgba(229,158,0,.08);
  }
  #story-mobile-editor-bar .story-mobile-tool{
    width:36px;
    height:46px;
    min-height:46px;
    flex:0 0 46px;
    padding:4px 1px;
    border:1px solid transparent;
    border-radius:12px;
    background:transparent;
    color:#a5a7aa;
    gap:3px;
    font-size:.47rem;
    line-height:1;
    box-sizing:border-box;
  }
  #story-mobile-editor-bar .story-mobile-tool svg{width:20px;height:20px;}
  #story-mobile-editor-bar .story-mobile-tool.is-active{color:#ffc21a;background:rgba(229,158,0,.14);border-color:rgba(229,158,0,.45);}
  #story-mobile-editor-bar .story-mobile-tool:active{transform:scale(.94);}

  /* A közzététel külön alsó floating action, nem része a docknak. */
  #story-create-modal .story-form-footer{
    position:fixed;
    left:8px;
    right:8px;
    bottom:max(10px,env(safe-area-inset-bottom));
    z-index:2147483100;
    width:auto;
    height:auto;
    padding:0;
    border:0;
    background:transparent;
    display:flex;
    justify-content:center;
    pointer-events:none;
  }
  #story-create-modal .story-form-footer .btn{
    width:min(100%,270px);
    min-height:46px;
    border-radius:14px;
    pointer-events:auto;
  }

  /* Jobbról beúszó funkciópanel. */
  #story-mobile-sheet{
    position:fixed;
    inset:0;
    z-index:2147483200;
    display:block;
    visibility:hidden;
    pointer-events:none;
  }
  #story-mobile-sheet.is-open{visibility:visible;pointer-events:auto;}
  #story-mobile-sheet .story-mobile-sheet-panel{
    position:absolute;
    top:0;
    right:0;
    bottom:0;
    left:auto;
    width:min(88vw,380px);
    max-height:none;
    border:1px solid rgba(229,158,0,.30);
    border-right:0;
    border-bottom:0;
    border-radius:20px 0 0 20px;
    transform:translate3d(105%,0,0);
    transition:transform .24s cubic-bezier(.2,.78,.2,1);
    display:flex;
    flex-direction:column;
    overflow:hidden;
    background:linear-gradient(180deg,#171613 0%,#0b0c0e 100%);
  }
  #story-mobile-sheet.is-open .story-mobile-sheet-panel{transform:translate3d(0,0,0);}
  #story-mobile-sheet .story-mobile-sheet-body{flex:1 1 auto;min-height:0;max-height:none;overflow:auto;-webkit-overflow-scrolling:touch;padding-bottom:28px;}

  /* Néző: nincs X, a teljes felület valódi gesztusfelület. */
  #story-viewer-modal{
    position:fixed;
    inset:0;
    z-index:2147483000;
    width:100vw;
    height:100dvh;
  }
  #story-viewer-modal .story-viewer-shell{touch-action:none;will-change:transform,opacity;}
  #story-viewer-content{touch-action:none;overscroll-behavior:none;}
  #story-viewer-modal .story-viewer-close{display:none;}
  #story-viewer-modal .story-nav{display:none;}
}
@media (max-width:420px){
  #story-create-modal .story-editor-layout{padding-right:60px;}
  #story-mobile-editor-bar{right:7px;top:80px;width:46px;}
  #story-mobile-editor-bar .story-mobile-tool{width:34px;}
  #story-mobile-sheet .story-mobile-sheet-panel{width:92vw;}
}

/* V28 – Mobile Story Studio: canvas-first, contextual controls, no desktop-style sheets */
@media (max-width:700px){
  html:has(#story-create-modal:not([hidden])),
  body:has(#story-create-modal:not([hidden])){
    overflow:hidden!important;
    overscroll-behavior:none;
  }

  #story-create-modal{
    position:fixed!important;
    inset:0!important;
    width:100vw!important;
    height:100dvh!important;
    max-width:none!important;
    max-height:none!important;
    margin:0!important;
    padding:0!important;
    z-index:2147483000!important;
    background:var(--dx-story-mobile-shell-bg)!important;
    overflow:hidden!important;
  }

  #story-create-modal .story-create-panel{
    position:absolute!important;
    inset:0!important;
    width:100%!important;
    height:100%!important;
    max-width:none!important;
    max-height:none!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:var(--dx-story-mobile-shell-bg)!important;
    box-shadow:none!important;
    overflow:hidden!important;
  }

  #story-create-modal .story-modal-header{
    position:absolute!important;
    top:0;left:0;right:0;
    z-index:90;
    min-height:0!important;
    height:auto!important;
    padding:16px 16px 12px!important;
    background:var(--dx-story-mobile-header-bg)!important;
    border:0!important;
    pointer-events:none;
  }
  #story-create-modal .story-modal-header *{pointer-events:auto;}
  #story-create-modal .story-modal-header h3{font-size:1.08rem!important;}

  #story-create-modal .story-create-panel > form{
    position:absolute!important;
    inset:0!important;
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    overflow:hidden!important;
  }

  #story-create-modal .story-editor-layout{
    position:absolute!important;
    inset:0!important;
    width:100%!important;
    height:100%!important;
    padding:0!important;
    overflow:hidden!important;
    background:transparent!important;
  }

  #story-create-modal .story-editor-stage-wrap{
    position:absolute!important;
    inset:0!important;
    width:100%!important;
    height:100%!important;
    padding:0!important;
    margin:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:hidden!important;
    background:transparent!important;
  }

  #story-create-modal .story-editor-stage{
    position:relative!important;
    width:min(100vw,calc(100dvh * .5625))!important;
    height:min(100dvh,calc(100vw * 1.7777778))!important;
    max-width:none!important;
    max-height:none!important;
    margin:0!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    overflow:hidden!important;
    background:var(--dx-story-mobile-stage-bg)!important;
  }

  #story-create-modal .story-editor-stage:before{
    content:'';
    position:absolute;
    inset:0;
    pointer-events:none;
    z-index:80;
    box-shadow:inset 0 0 90px rgba(0,0,0,.28);
  }

  #story-create-modal .story-editor-help{
    position:absolute!important;
    left:50%!important;
    bottom:calc(72px + env(safe-area-inset-bottom))!important;
    width:min(92vw,420px)!important;
    transform:translateX(-50%)!important;
    z-index:95!important;
    margin:0!important;
    font-size:.54rem!important;
    line-height:1.15!important;
    opacity:.5!important;
    text-shadow:0 1px 8px #000!important;
  }

  #story-create-modal .story-editor-controls{display:none!important;}
  #story-create-modal .story-page-pager{display:none!important;}

  /* A vezérlők a Story CANVASON vannak, nem mellette. */
  #story-mobile-editor-bar{
    position:absolute!important;
    top:50%!important;
    right:max(10px,env(safe-area-inset-right))!important;
    left:auto!important;
    bottom:auto!important;
    transform:translateY(-50%)!important;
    z-index:140!important;
    width:48px!important;
    min-height:0!important;
    padding:6px!important;
    display:flex!important;
    flex-direction:column!important;
    gap:7px!important;
    align-items:center!important;
    border:1px solid var(--dx-story-mobile-dock-border)!important;
    border-radius:999px!important;
    background:var(--dx-story-mobile-dock-bg)!important;
    backdrop-filter:blur(12px)!important;
    -webkit-backdrop-filter:blur(12px)!important;
    box-shadow:0 10px 30px rgba(0,0,0,.28)!important;
  }

  #story-mobile-editor-bar .story-mobile-tool{
    width:36px!important;
    height:36px!important;
    min-height:36px!important;
    flex:0 0 36px!important;
    padding:0!important;
    border:1px solid var(--dx-story-mobile-tool-border)!important;
    border-radius:50%!important;
    display:grid!important;
    place-items:center!important;
    position:relative!important;
    color:var(--dx-story-mobile-tool-text)!important;
    background:var(--dx-story-mobile-tool-bg)!important;
    font-size:0!important;
    text-transform:none!important;
    box-shadow:0 4px 14px rgba(0,0,0,.22)!important;
  }
  #story-mobile-editor-bar .story-mobile-tool svg{
    width:19px!important;height:19px!important;
    stroke:currentColor!important;
    filter:drop-shadow(0 1px 4px rgba(0,0,0,.8));
  }
  #story-mobile-editor-bar .story-mobile-tool span{display:none!important;}
  #story-mobile-editor-bar .story-mobile-tool.is-active{
    color:var(--dx-story-mobile-active-text)!important;
    background:var(--dx-story-mobile-active-bg)!important;
    border-color:var(--dx-story-mobile-active-border)!important;
    box-shadow:0 0 0 2px rgba(255,194,26,.14),0 5px 18px rgba(0,0,0,.3)!important;
  }

  /* A funkciók nem full-screen sheetként jelennek meg, hanem az ikon mellett lebegő contextual popoverként. */
  #story-mobile-sheet[hidden]{display:none!important;visibility:hidden!important;}
  #story-mobile-sheet{
    position:absolute!important;
    inset:0!important;
    z-index:130!important;
    display:block!important;
    visibility:hidden!important;
    pointer-events:none!important;
    background:transparent!important;
  }
  #story-mobile-sheet.is-open{visibility:visible!important;pointer-events:auto!important;}
  #story-mobile-sheet .story-mobile-sheet-backdrop{
    position:absolute!important;
    inset:0!important;
    background:transparent!important;
    opacity:1!important;
    pointer-events:none!important;
  }
  #story-mobile-sheet.is-open .story-mobile-sheet-backdrop{pointer-events:auto!important;}

  #story-mobile-sheet .story-mobile-sheet-panel{
    position:absolute!important;
    top:var(--story-sheet-top,96px)!important;
    right:62px!important;
    bottom:auto!important;
    left:auto!important;
    width:min(76vw,330px)!important;
    max-height:min(58dvh,500px)!important;
    border:1px solid rgba(255,255,255,.14)!important;
    border-radius:20px!important;
    background:var(--dx-story-mobile-sheet-bg)!important;
    backdrop-filter:blur(22px) saturate(125%)!important;
    -webkit-backdrop-filter:blur(22px) saturate(125%)!important;
    box-shadow:0 18px 55px rgba(0,0,0,.55),0 0 0 1px rgba(229,158,0,.08)!important;
    transform:translate3d(14px,0,0) scale(.98)!important;
    transform-origin:right center!important;
    opacity:0!important;
    transition:transform .2s cubic-bezier(.2,.8,.2,1),opacity .16s ease!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
  }
  #story-mobile-sheet.is-open .story-mobile-sheet-panel{
    transform:translate3d(0,0,0) scale(1)!important;
    opacity:1!important;
  }

  #story-mobile-sheet .story-mobile-sheet-head{
    min-height:48px!important;
    padding:9px 12px!important;
    background:linear-gradient(180deg,rgba(255,255,255,.045),transparent)!important;
    border-bottom:1px solid rgba(255,255,255,.08)!important;
  }
  #story-mobile-sheet .story-mobile-sheet-head h4{
    margin:0!important;
    font-size:.9rem!important;
    letter-spacing:.04em!important;
  }
  #story-mobile-sheet .story-mobile-sheet-close{
    width:32px!important;height:32px!important;
    border-radius:50%!important;
    background:rgba(255,255,255,.06)!important;
  }
  #story-mobile-sheet .story-mobile-sheet-body{
    max-height:none!important;
    flex:1 1 auto!important;
    padding:10px!important;
    overflow:auto!important;
    overscroll-behavior:contain!important;
  }
  #story-mobile-sheet .story-mobile-sheet-body .story-control-section{
    margin:0 0 8px!important;
    padding:10px!important;
    border-radius:14px!important;
    background:var(--dx-story-mobile-control-bg)!important;
    border:1px solid rgba(255,255,255,.07)!important;
  }
  #story-mobile-sheet .story-mobile-sheet-body input,
  #story-mobile-sheet .story-mobile-sheet-body textarea,
  #story-mobile-sheet .story-mobile-sheet-body select{
    font-size:16px!important;
  }

  /* Közzététel közvetlenül a Story alján, üveges overlayként. */
  #story-create-modal .story-form-footer{
    position:absolute!important;
    left:50%!important;
    right:auto!important;
    bottom:max(14px,env(safe-area-inset-bottom))!important;
    transform:translateX(-50%)!important;
    z-index:150!important;
    width:auto!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
  }
  #story-create-modal .story-form-footer .btn{
    width:auto!important;
    min-width:180px!important;
    min-height:44px!important;
    padding:10px 20px!important;
    border-radius:999px!important;
    background:var(--dx-story-mobile-dock-bg)!important;
    backdrop-filter:blur(12px)!important;
    -webkit-backdrop-filter:blur(12px)!important;
    border:1px solid rgba(229,158,0,.72)!important;
    box-shadow:0 8px 28px rgba(0,0,0,.35),0 0 20px rgba(229,158,0,.08)!important;
  }

  /* Ha nincs média, a választó továbbra is a teljes Story canvas közepén marad. */
  #story-create-modal #story-upload-placeholder{
    z-index:20!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }
}

@media (max-width:420px){
  #story-mobile-editor-bar{right:8px!important;width:44px!important;padding:5px!important;gap:6px!important;}
  #story-mobile-editor-bar .story-mobile-tool{width:34px!important;height:34px!important;min-height:34px!important;flex-basis:34px!important;}
  #story-mobile-editor-bar .story-mobile-tool svg{width:18px!important;height:18px!important;}
  #story-mobile-sheet .story-mobile-sheet-panel{right:56px!important;width:min(78vw,300px)!important;}
}
@media (max-width:700px){
  #story-mobile-editor-bar{
    --story-canvas-right:max(8px,calc((100vw - min(100vw,calc(100dvh * .5625))) / 2 + 8px));
    right:var(--story-canvas-right)!important;
  }
  #story-mobile-sheet .story-mobile-sheet-panel{
    right:calc(var(--story-canvas-right, 8px) + 54px)!important;
  }
}
@media (max-width:420px){
  #story-mobile-sheet .story-mobile-sheet-panel{
    right:calc(var(--story-canvas-right, 8px) + 50px)!important;
  }
}


/* V29 — Mobile Story Studio polish: strict closed state + modern contextual dock */
@media (max-width:700px){
  /* A sheet fizikailag se legyen látható/klikkelhető hidden állapotban. */
  #story-mobile-sheet[hidden]{
    display:none!important;
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
  }

  #story-mobile-editor-bar{
    top:50%!important;
    right:max(10px,env(safe-area-inset-right))!important;
    left:auto!important;
    bottom:auto!important;
    transform:translateY(-50%)!important;
    width:50px!important;
    padding:6px!important;
    gap:7px!important;
    border:1px solid var(--dx-story-mobile-dock-border)!important;
    border-radius:28px!important;
    background:var(--dx-story-mobile-dock-bg)!important;
    backdrop-filter:blur(20px) saturate(145%)!important;
    -webkit-backdrop-filter:blur(20px) saturate(145%)!important;
    box-shadow:0 12px 35px rgba(0,0,0,.36),inset 0 1px 0 rgba(255,255,255,.12)!important;
  }

  #story-mobile-editor-bar .story-mobile-tool{
    width:38px!important;
    height:38px!important;
    min-height:38px!important;
    flex:0 0 38px!important;
    border:1px solid var(--dx-story-mobile-tool-border)!important;
    border-radius:50%!important;
    background:var(--dx-story-mobile-tool-bg)!important;
    color:var(--dx-story-mobile-tool-text)!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.07)!important;
    transition:transform .16s ease,background .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease!important;
  }

  #story-mobile-editor-bar .story-mobile-tool::after{
    content:attr(aria-label);
    position:absolute;
    right:calc(100% + 10px);
    top:50%;
    transform:translateY(-50%) translateX(5px);
    padding:6px 9px;
    border-radius:9px;
    white-space:nowrap;
    color:var(--dx-story-mobile-tooltip-text);
    background:var(--dx-story-mobile-tooltip-bg);
    border:1px solid rgba(255,255,255,.12);
    box-shadow:0 8px 25px rgba(0,0,0,.35);
    backdrop-filter:blur(12px);
    opacity:0;
    pointer-events:none;
    transition:opacity .15s ease,transform .15s ease;
    font:700 .66rem/1 'Rajdhani',sans-serif;
    letter-spacing:.03em;
  }

  #story-mobile-editor-bar .story-mobile-tool:focus-visible::after,
  #story-mobile-editor-bar .story-mobile-tool.is-active::after{
    opacity:1;
    transform:translateY(-50%) translateX(0);
  }

  #story-mobile-editor-bar .story-mobile-tool.is-active{
    color:var(--dx-story-mobile-active-text)!important;
    border-color:var(--dx-story-mobile-active-border)!important;
    background:var(--dx-story-mobile-active-bg)!important;
    box-shadow:0 0 0 2px rgba(255,194,26,.11),0 0 20px rgba(229,158,0,.12)!important;
  }

  #story-mobile-editor-bar .story-mobile-tool:active{
    transform:scale(.91)!important;
  }

  /* A contextual card a Story mellett, nem egy teljes képernyős admin panel. */
  #story-mobile-sheet .story-mobile-sheet-panel{
    width:min(82vw,340px)!important;
    max-height:min(52dvh,470px)!important;
    border-radius:18px!important;
    border:1px solid rgba(255,255,255,.16)!important;
    background:var(--dx-story-mobile-sheet-bg)!important;
    box-shadow:0 18px 60px rgba(0,0,0,.58),0 0 0 1px rgba(229,158,0,.06)!important;
  }

  #story-mobile-sheet .story-mobile-sheet-head{
    min-height:50px!important;
    padding:9px 10px 9px 14px!important;
    background:linear-gradient(180deg,rgba(255,255,255,.055),transparent)!important;
  }
  #story-mobile-sheet .story-mobile-sheet-head h4{
    font-size:.92rem!important;
    letter-spacing:.07em!important;
    text-transform:uppercase!important;
  }
  #story-mobile-sheet .story-mobile-sheet-close{
    width:32px!important;
    height:32px!important;
    border-radius:50%!important;
    background:var(--dx-story-mobile-close-bg)!important;
  }
  #story-mobile-sheet .story-mobile-sheet-body{
    padding:10px!important;
    max-height:none!important;
  }
  #story-mobile-sheet .story-mobile-sheet-body .story-control-section{
    padding:10px!important;
    margin-bottom:7px!important;
    border-radius:13px!important;
    background:var(--dx-story-mobile-control-bg)!important;
    border:1px solid var(--dx-story-mobile-control-border)!important;
  }

  /* Az elsődleges akció legyen lebegő, ne egy külön footer-sáv. */
  #story-create-modal .story-form-footer{
    bottom:max(14px,env(safe-area-inset-bottom))!important;
    width:auto!important;
    padding:0!important;
  }
  #story-create-modal .story-form-footer .btn{
    min-width:178px!important;
    min-height:46px!important;
    padding:10px 22px!important;
    border-radius:999px!important;
    background:var(--dx-story-mobile-publish-bg)!important;
    border:1px solid rgba(229,158,0,.78)!important;
    box-shadow:0 10px 30px rgba(0,0,0,.40),inset 0 1px 0 rgba(255,255,255,.08)!important;
  }
}

@media (max-width:420px){
  #story-mobile-editor-bar{
    right:7px!important;
    width:46px!important;
    padding:5px!important;
    gap:6px!important;
  }
  #story-mobile-editor-bar .story-mobile-tool{
    width:36px!important;
    height:36px!important;
    min-height:36px!important;
    flex-basis:36px!important;
  }
  #story-mobile-editor-bar .story-mobile-tool svg{width:18px!important;height:18px!important;}
  #story-mobile-sheet .story-mobile-sheet-panel{width:min(84vw,320px)!important;}
}

/* V30 – Mobile Story Studio: final canvas containment + strict initial closed state */
@media (max-width:700px){
  /* Az ID-s mobil modal szabályok felülírták a natív [hidden] működését.
     Ez biztosítja, hogy frissítéskor SOHA ne jelenjen meg magától. */
  #story-create-modal[hidden]{
    display:none!important;
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
  }

  /* A teljes Story-vászon legyen az egyetlen vizuális "tábla". */
  #story-create-modal .story-editor-stage-wrap{
    position:absolute!important;
    inset:0!important;
    width:100%!important;
    height:100%!important;
    padding:0!important;
    margin:0!important;
    overflow:hidden!important;
  }

  /* A súgó ne külön, elcsúszó szövegként jelenjen meg a tábla alatt. */
  #story-create-modal .story-editor-help{
    position:absolute!important;
    left:50%!important;
    bottom:calc(76px + env(safe-area-inset-bottom))!important;
    width:min(72vw,320px)!important;
    max-width:320px!important;
    margin:0!important;
    padding:7px 10px!important;
    box-sizing:border-box!important;
    transform:translateX(-50%)!important;
    z-index:132!important;
    color:var(--dx-story-mobile-help-text)!important;
    font-size:.56rem!important;
    line-height:1.25!important;
    text-align:center!important;
    white-space:normal!important;
    word-break:normal!important;
    overflow-wrap:normal!important;
    border:1px solid var(--dx-story-mobile-help-border)!important;
    border-radius:10px!important;
    background:var(--dx-story-mobile-help-bg)!important;
    backdrop-filter:blur(8px)!important;
    -webkit-backdrop-filter:blur(8px)!important;
    text-shadow:0 1px 7px rgba(0,0,0,.9)!important;
  }

  /* A Közzététel gomb ugyanazon a vásznon maradjon, ne külön footernek hasson. */
  #story-create-modal .story-form-footer{
    position:absolute!important;
    left:50%!important;
    right:auto!important;
    bottom:max(14px,env(safe-area-inset-bottom))!important;
    width:auto!important;
    margin:0!important;
    padding:0!important;
    transform:translateX(-50%)!important;
    z-index:150!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    pointer-events:none!important;
    background:transparent!important;
    border:0!important;
  }

  #story-create-modal .story-form-footer > span{
    display:none!important;
  }

  #story-create-modal .story-form-footer .btn{
    pointer-events:auto!important;
    width:min(178px,52vw)!important;
    min-width:0!important;
    min-height:44px!important;
    margin:0!important;
    padding:9px 16px!important;
    box-sizing:border-box!important;
    border-radius:999px!important;
    white-space:nowrap!important;
    background:var(--dx-story-mobile-publish-bg)!important;
    border:1px solid rgba(229,158,0,.82)!important;
    box-shadow:0 10px 30px rgba(0,0,0,.42),inset 0 1px 0 rgba(255,255,255,.08),0 0 22px rgba(229,158,0,.08)!important;
    backdrop-filter:blur(12px)!important;
    -webkit-backdrop-filter:blur(12px)!important;
  }

  /* A jobb oldali dock kizárólag a Story vásznán belül lebegjen. */
  #story-mobile-editor-bar{
    position:absolute!important;
    z-index:140!important;
    top:50%!important;
    right:max(10px,env(safe-area-inset-right))!important;
    transform:translateY(-50%)!important;
  }
}


/* V31 – mobil Story Studio tisztítás: lapos contextual panelek, kompakt formázás és látható videó-vágó */
@media (max-width:700px){
  #story-mobile-editor-bar{
    width:48px;
    padding:5px;
    gap:6px;
    border-radius:26px;
    background:var(--dx-story-mobile-dock-bg);
    border-color:var(--dx-story-mobile-dock-border);
    box-shadow:0 10px 32px rgba(0,0,0,.35),inset 0 1px 0 rgba(255,255,255,.08);
  }

  #story-mobile-editor-bar .story-mobile-tool{
    width:38px;
    height:38px;
    min-height:38px;
    flex-basis:38px;
    background:var(--dx-story-mobile-tool-bg);
    border-color:var(--dx-story-mobile-dock-border);
    color:var(--dx-story-mobile-tool-text);
  }

  #story-mobile-editor-bar .story-mobile-tool::after{display:none;}
  #story-mobile-editor-bar .story-mobile-tool.is-active{color:#ffc21a;background:rgba(229,158,0,.12);border-color:rgba(255,194,26,.78);box-shadow:0 0 0 2px rgba(255,194,26,.08);}
  #story-mobile-editor-bar [data-mobile-open="style"]{display:none;}

  #story-mobile-sheet .story-mobile-sheet-panel{
    width:min(82vw,340px);
    max-height:min(70dvh,620px);
    right:calc(max(10px,env(safe-area-inset-right)) + 54px);
    left:auto;
    bottom:auto;
    top:50%;
    border:1px solid rgba(255,255,255,.14);
    border-radius:18px;
    background:var(--dx-story-mobile-sheet-bg);
    box-shadow:0 18px 55px rgba(0,0,0,.52),inset 0 1px 0 rgba(255,255,255,.06);
    transform:translate3d(18px,-50%,0);
    transition:transform .18s ease,opacity .18s ease;
    opacity:0;
  }
  #story-mobile-sheet.is-open .story-mobile-sheet-panel{transform:translate3d(0,-50%,0);opacity:1;}
  #story-mobile-sheet .story-mobile-sheet-backdrop{background:rgba(0,0,0,.16);}
  #story-mobile-sheet .story-mobile-sheet-head{min-height:44px;padding:8px 10px 8px 13px;background:transparent;border-bottom:1px solid rgba(255,255,255,.07);}
  #story-mobile-sheet .story-mobile-sheet-head .story-kicker{font-size:.55rem;letter-spacing:.18em;}
  #story-mobile-sheet .story-mobile-sheet-head h4{font-size:.9rem;letter-spacing:.08em;margin:3px 0 0;}
  #story-mobile-sheet .story-mobile-sheet-close{width:30px;height:30px;background:rgba(255,255,255,.045);border-color:rgba(255,255,255,.09);}
  #story-mobile-sheet .story-mobile-sheet-body{padding:9px;overflow:auto;max-height:calc(min(70dvh,620px) - 54px);}
  #story-mobile-sheet .story-mobile-sheet-body .story-control-section{margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;}
  #story-mobile-sheet .story-mobile-sheet-body .story-control-section + .story-control-section{margin-top:9px;padding-top:9px;border-top:1px solid rgba(255,255,255,.06);}
  #story-mobile-sheet .story-mobile-sheet-body label{font-size:.66rem;font-weight:700;color:var(--dx-story-mobile-muted);letter-spacing:.03em;margin-bottom:5px;}
  #story-mobile-sheet .story-mobile-sheet-body input[type="url"],
  #story-mobile-sheet .story-mobile-sheet-body input[type="text"],
  #story-mobile-sheet .story-mobile-sheet-body textarea,
  #story-mobile-sheet .story-mobile-sheet-body select{
    width:100%;min-height:42px;box-sizing:border-box;border-radius:10px;border:1px solid var(--dx-story-mobile-input-border);background:var(--dx-story-mobile-input-bg);color:var(--dx-story-mobile-input-text);padding:9px 11px;font-size:16px;
  }
  #story-mobile-sheet .story-mobile-sheet-body textarea{min-height:94px;resize:none;line-height:1.4;}

  #story-mobile-sheet .story-desktop-emoji-controls{display:none;}
  .story-mobile-text-tools{display:flex;align-items:center;gap:6px;margin-top:7px;padding:5px;border:1px solid rgba(255,255,255,.08);border-radius:11px;background:var(--dx-story-mobile-control-bg);}
  .story-mobile-format-btn{width:38px;height:36px;border:1px solid rgba(255,255,255,.10);border-radius:9px;background:var(--dx-story-mobile-format-bg);color:var(--dx-story-mobile-format-text);display:grid;place-items:center;font:800 .9rem/1 'Rajdhani',sans-serif;}
  .story-mobile-format-btn.is-active{color:var(--dx-story-mobile-active-text);border-color:var(--dx-story-mobile-active-border);background:var(--dx-story-mobile-active-bg);}
  #story-mobile-caption-style{flex:1;min-width:0;min-height:36px!important;font-size:14px!important;padding:6px 9px!important;}
  .story-mobile-format-hint{margin-top:5px;color:var(--dx-story-mobile-muted);font:italic 500 .57rem/1.25 'Rajdhani',sans-serif;}

  .story-mobile-link-options{margin-top:8px;}
  .story-mobile-option-label{margin:0 0 5px;color:var(--dx-story-mobile-muted);font:700 .63rem/1 'Rajdhani',sans-serif;}
  .story-mobile-segmented{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;}
  .story-mobile-segmented button{min-height:38px;border:1px solid rgba(255,255,255,.09);border-radius:9px;background:var(--dx-story-mobile-control-bg);color:var(--dx-story-mobile-muted);font:700 .63rem/1 'Rajdhani',sans-serif;}
  .story-mobile-segmented button.is-active{color:var(--dx-story-mobile-active-text);border-color:var(--dx-story-mobile-active-border);background:var(--dx-story-mobile-active-bg);}
  .story-mobile-color-row{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:7px;}
  .story-mobile-color-row label{display:flex;align-items:center;justify-content:space-between;gap:7px;min-height:38px;margin:0;padding:6px 8px;border:1px solid rgba(255,255,255,.08);border-radius:9px;background:var(--dx-story-mobile-control-bg);font:600 .62rem/1 'Rajdhani',sans-serif;color:var(--dx-story-mobile-muted);}
  .story-mobile-color-row input[type=color]{width:32px;height:26px;min-height:0;padding:0;border:1px solid rgba(255,255,255,.12);border-radius:6px;background:#000;}

  #story-mobile-sheet #story-video-trim{display:block;margin:0;padding:0;}
  #story-mobile-sheet .story-video-trim-head{display:flex;align-items:center;gap:8px;margin:0 0 5px;}
  #story-mobile-sheet .story-video-trim-head label{font-size:.7rem;color:#fff;margin:0;}
  #story-mobile-sheet .story-video-trim-head .story-control-hint{font-size:.53rem;line-height:1.2;margin:2px 0 0;}
  #story-mobile-sheet .story-video-trim-head span{font-size:.6rem;}
  #story-mobile-sheet .story-trim-track-wrap{height:48px;margin:8px 2px 3px;position:relative;overflow:visible;}
  #story-mobile-sheet .story-trim-track{top:20px;height:8px;left:10px;right:10px;}
  #story-mobile-sheet .story-trim-selected{height:8px;}
  #story-mobile-sheet .story-trim-track-wrap input[type="range"]{height:48px;opacity:.001;z-index:6;pointer-events:auto;}
  #story-mobile-sheet .story-trim-track-wrap input[type="range"]::-webkit-slider-thumb{opacity:1;width:22px;height:22px;margin-top:-7px;}
  #story-mobile-sheet .story-trim-track-wrap input[type="range"]::-moz-range-thumb{opacity:1;width:22px;height:22px;}
  #story-mobile-sheet .story-trim-handle{display:none;}
  #story-mobile-sheet .story-trim-times{font-size:.59rem;margin:0 2px;}
  #story-mobile-sheet .story-trim-clips{grid-template-columns:1fr 1fr;gap:5px;margin-top:8px;}
  #story-mobile-sheet .story-trim-clip{min-height:48px;padding:7px 24px 7px 8px;border-radius:8px;gap:2px;}
  #story-mobile-sheet .story-trim-clip strong{font-size:.65rem;}
  #story-mobile-sheet .story-trim-clip span{font-size:.56rem;}
  #story-mobile-sheet .story-trim-actions{gap:5px;margin-top:7px;}
  #story-mobile-sheet .story-trim-actions .story-tool-btn{min-height:38px;font-size:.62rem;}

  #story-mobile-sheet .story-style-fixed-note,
  #story-mobile-sheet .story-editor-note,
  #story-mobile-sheet .story-control-hint{font-size:.55rem;line-height:1.25;color:rgba(255,255,255,.40);font-style:italic;font-weight:500;}

  #story-create-modal .story-editor-help{font-size:.52rem;line-height:1.2;max-width:74vw;padding:5px 8px;bottom:calc(68px + env(safe-area-inset-bottom));}
  #story-create-modal .story-form-footer{bottom:max(12px,env(safe-area-inset-bottom));}
  #story-create-modal .story-form-footer .btn{min-height:42px;width:min(174px,54vw);font-size:.74rem;}
}

@media (max-width:420px){
  #story-mobile-editor-bar{right:6px;width:44px;padding:4px;gap:5px;}
  #story-mobile-editor-bar .story-mobile-tool{width:36px;height:36px;min-height:36px;flex-basis:36px;}
  #story-mobile-editor-bar .story-mobile-tool svg{width:18px;height:18px;}
  #story-mobile-sheet .story-mobile-sheet-panel{width:min(84vw,320px);right:calc(6px + 50px);}
  #story-mobile-sheet .story-mobile-sheet-body{padding:8px;}
  .story-mobile-segmented button{font-size:.58rem;}
}

/* V33 interaction handles */

.story-scale-handle{position:absolute;right:-10px;bottom:-10px;width:24px;height:24px;padding:0;display:grid;place-items:center;border:1px solid rgba(229,158,0,.78);border-radius:50%;background:rgba(8,9,11,.84);color:#e59e00;box-shadow:0 4px 12px rgba(0,0,0,.35);cursor:grab;touch-action:none;z-index:30}
.story-scale-handle svg{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.story-scale-handle:active{cursor:grabbing}
@media (max-width:700px){.story-scale-handle{width:30px;height:30px;right:-12px;bottom:-12px}.story-scale-handle svg{width:14px;height:14px}}


/* V42 — Mobile transform handles: separated, compact and touch-safe.
   The previous rotate/scale handles shared the same corner, so one control
   could visually and functionally cover the other. */
@media (max-width:700px){
  #story-create-modal .story-editor-overlay,
  #story-create-modal .story-link-overlay{
    overflow:visible;
  }

  #story-create-modal .story-editor-overlay .story-rotate-handle,
  #story-create-modal .story-link-overlay .story-rotate-handle{
    width:20px;
    height:20px;
    right:-8px;
    top:-8px;
    bottom:auto;
    padding:0;
    font-size:0;
    border-width:1px;
    background:rgba(8,9,11,.68);
    backdrop-filter:blur(9px);
    -webkit-backdrop-filter:blur(9px);
    touch-action:none;
  }

  #story-create-modal .story-editor-overlay .story-scale-handle,
  #story-create-modal .story-link-overlay .story-scale-handle{
    width:20px;
    height:20px;
    right:-8px;
    bottom:-8px;
    padding:0;
    font-size:0;
    border-width:1px;
    background:rgba(8,9,11,.68);
    backdrop-filter:blur(9px);
    -webkit-backdrop-filter:blur(9px);
    touch-action:none;
  }

  #story-create-modal .story-editor-overlay .story-rotate-handle svg,
  #story-create-modal .story-editor-overlay .story-scale-handle svg,
  #story-create-modal .story-link-overlay .story-rotate-handle svg,
  #story-create-modal .story-link-overlay .story-scale-handle svg{
    width:10px;
    height:10px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
  }

  #story-create-modal .story-mobile-editor-bar .story-mobile-tool{
    width:36px;
    flex-basis:42px;
    min-height:42px;
  }

  #story-create-modal .story-mobile-editor-bar .story-mobile-tool svg{
    width:18px;
    height:18px;
  }
}

@media (max-width:420px){
  #story-create-modal .story-editor-overlay .story-rotate-handle,
  #story-create-modal .story-link-overlay .story-rotate-handle,
  #story-create-modal .story-editor-overlay .story-scale-handle,
  #story-create-modal .story-link-overlay .story-scale-handle{
    width:18px;
    height:18px;
    right:-7px;
  }

  #story-create-modal .story-editor-overlay .story-rotate-handle{top:-7px;}
  #story-create-modal .story-editor-overlay .story-scale-handle{bottom:-7px;}
  #story-create-modal .story-link-overlay .story-rotate-handle{top:-7px;}
  #story-create-modal .story-link-overlay .story-scale-handle{bottom:-7px;}

  #story-create-modal .story-editor-overlay .story-rotate-handle svg,
  #story-create-modal .story-editor-overlay .story-scale-handle svg,
  #story-create-modal .story-link-overlay .story-rotate-handle svg,
  #story-create-modal .story-link-overlay .story-scale-handle svg{
    width:9px;
    height:9px;
  }
}
