/* Story composer extras */
.sxc-sources { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.sxc-src { border: 1.5px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06); color: inherit; border-radius: 14px; padding: 11px 6px; font-size: 14px; font-weight: 600; cursor: pointer; transition: transform .12s, background .12s; }
.sxc-src:hover { background: rgba(255,255,255,.12); }
.sxc-src:active { transform: scale(.97); }
.sxc-options { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.sxc-field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.sxc-field select, .sxc-poll input { height: 42px; border-radius: 12px; border: 1.5px solid rgba(128,128,140,.45); background: rgba(128,128,140,.12); color: inherit; padding: 0 10px; font-size: 15px; }
.sxc-check { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; cursor: pointer; }
.sxc-check input { width: 18px; height: 18px; }
.sxc-poll { display: flex; flex-direction: column; gap: 7px; }
.sxc-poll[hidden] { display: none; }
.sxc-poll small { opacity: .7; font-size: 12px; }

.sxc-modal { position: absolute; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 12px; background: rgba(8,10,18,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.sxc-panel { width: min(760px, 100%); max-height: 100%; display: flex; flex-direction: column; background: #fff; color: #17181c; border-radius: 22px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.sxc-panel > header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; font-size: 17px; border-bottom: 1px solid #eceef3; }
.sxc-x { border: 0; background: #eef0f5; width: 34px; height: 34px; border-radius: 50%; font-size: 21px; line-height: 1; cursor: pointer; }
.sxc-body { overflow-y: auto; padding: 14px 18px 18px; }
.sxc-hint { color: #70727e; font-size: 13.5px; margin: 8px 0; text-align: center; }
.sxc-err { color: #d33a4f; }
.sxc-split { display: flex; gap: 18px; align-items: flex-start; }
.sxc-text-preview { width: 200px; aspect-ratio: 9/16; border-radius: 18px; box-shadow: 0 6px 20px rgba(0,0,0,.25); flex: 0 0 auto; }
.sxc-tools { flex: 1; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sxc-tools textarea { width: 100%; border: 1.5px solid #d6d9e2; border-radius: 14px; padding: 10px 12px; font-size: 16px; resize: none; color: #111; background: #f4f5f9; }
.sxc-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sxc-swatch { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; box-shadow: 0 1px 4px rgba(0,0,0,.3); cursor: pointer; }
.sxc-swatch.on { outline: 2.5px solid #17181c; outline-offset: 1px; }
.sxc-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.sxc-chip { border: 1.5px solid #d6d9e2; background: #fff; border-radius: 999px; padding: 6px 13px; font-size: 14px; font-weight: 600; cursor: pointer; color: #17181c; }
.sxc-chip.on { background: #17181c; color: #fff; border-color: #17181c; }
.sxc-primary { height: 46px; border: 0; border-radius: 14px; background: #a84849; color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; }

.sxc-cam { width: 100%; max-height: 62vh; border-radius: 18px; background: #000; object-fit: cover; }
.sxc-rec-time { display: block; text-align: center; color: #e53950; font-weight: 700; min-height: 20px; margin-top: 6px; }
.sxc-cambar { display: flex; align-items: center; justify-content: center; gap: 28px; margin-top: 8px; }
.sxc-round { width: 48px; height: 48px; border-radius: 50%; border: 0; background: #eef0f5; font-size: 22px; cursor: pointer; color: #17181c; }
.sxc-recbtn { color: #e53950; }
.sxc-recbtn.on { background: #e53950; color: #fff; }
.sxc-shutter { width: 70px; height: 70px; border-radius: 50%; border: 5px solid #17181c; background: #fff; box-shadow: inset 0 0 0 4px #fff; cursor: pointer; }
.sxc-shutter:active { transform: scale(.92); }
.sxc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.sxc-arch { position: relative; aspect-ratio: 9/16; border: 0; padding: 0; border-radius: 14px; overflow: hidden; background: #20222b; cursor: pointer; }
.sxc-arch img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sxc-arch small { position: absolute; left: 6px; bottom: 6px; padding: 2px 7px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; }
.sxc-arch i { position: absolute; left: 6px; top: 6px; padding: 2px 7px; border-radius: 999px; background: rgba(255,255,255,.9); color: #17181c; font-size: 11px; font-style: normal; font-weight: 600; }
.sxc-arch:disabled { opacity: .5; }
.sxc-play { color: #fff; font-size: 26px; display: flex; align-items: center; justify-content: center; height: 100%; }
@media (max-width: 650px) { .sxc-split { flex-direction: column; align-items: center; } .sxc-text-preview { width: 150px; } .sxc-tools { width: 100%; } .sxc-modal { padding: 0; } .sxc-panel { border-radius: 0; height: 100%; width: 100%; } }

/* ---------------- Story layers (text, stickere, sunet) ---------------- */
.sxl-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; align-items: center; }
.sxl-tool { flex: 1 1 0; min-width: 92px; border: 1.5px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06); color: inherit; border-radius: 14px; padding: 10px 6px; font-size: 14px; font-weight: 600; cursor: pointer; }
.sxl-tool:disabled { opacity: .4; cursor: default; }
.sxl-chip { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border-radius: 999px; background: rgba(168,72,73,.25); font-size: 13px; width: 100%; }
.sxl-chip[hidden], .sxl-panel[hidden] { display: none; }
.sxl-chip .sxl-x { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: inherit; font-size: 16px; line-height: 1; cursor: pointer; }
.sxl-panel { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 10px; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.07); }
.sxl-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sxl-mini { min-width: 38px; height: 36px; padding: 0 10px; border-radius: 10px; border: 1.5px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: inherit; font-size: 16px; cursor: pointer; }
.sxl-del { color: #ff6b81; }
.sxl-sw { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); cursor: pointer; }
.sxl-sw.on { outline: 2px solid #fff; outline-offset: 2px; }
.sxl-chipbtn { padding: 6px 11px; border-radius: 999px; border: 1.5px solid rgba(128,128,140,.5); background: transparent; color: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.sxl-chipbtn.on { background: #a84849; border-color: #a84849; color: #fff; }

.sxl-host { position: absolute; inset: 0; z-index: 4; pointer-events: none; --u: 4px; overflow: hidden; }
.sxl-layer { position: absolute; pointer-events: auto; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; line-height: 1.25; text-align: center; transform-origin: center; white-space: pre-wrap; max-width: calc(var(--u) * 80); color: #fff; font-family: Poppins, system-ui, sans-serif; }
.sxl-layer.sel { outline: 2px dashed #fff; outline-offset: 5px; filter: drop-shadow(0 0 6px rgba(0,0,0,.5)); }
.sxl-text { font-size: calc(var(--u) * 6); font-weight: 800; }
.sxl-text[data-font=sans] { font-weight: 600; } .sxl-text[data-font=serif] { font-style: italic; font-weight: 600; font-family: Georgia, serif; } .sxl-text[data-font=mono] { font-family: "Courier New", monospace; font-weight: 700; }
.sxl-text[data-style=box] { padding: .4em .7em; background: rgba(0,0,0,.55); border-radius: .35em; }
.sxl-text[data-style=plain] { text-shadow: 0 .05em .25em rgba(0,0,0,.6); }
.sxl-text[data-style=outline] { -webkit-text-stroke: calc(var(--u) * .9) #000; paint-order: stroke fill; }
.sxl-text[data-style=neon] { text-shadow: 0 0 .4em currentColor, 0 0 .9em currentColor; }
.sxl-emoji { font-size: calc(var(--u) * 17); font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.sxl-time, .sxl-place, .sxl-mention { font-size: calc(var(--u) * 5.2); font-weight: 800; padding: .35em .8em; border-radius: 999px; background: rgba(255,255,255,.94); color: #17181c; box-shadow: 0 2px 8px rgba(0,0,0,.3); white-space: nowrap; }
.sxl-mention { color: #a84849; }
.sxl-poll, .sxl-slider, .sxl-question, .sxl-countdown { width: calc(var(--u) * 62); padding: calc(var(--u) * 3.2); border-radius: calc(var(--u) * 4); background: rgba(255,255,255,.95); color: #17181c; box-shadow: 0 4px 14px rgba(0,0,0,.35); display: flex; flex-direction: column; gap: calc(var(--u) * 1.6); font-size: calc(var(--u) * 4.2); }
.sxl-layer strong { font-size: 1em; line-height: 1.25; }
.sxl-opt { padding: .45em; border-radius: .6em; background: #eceef4; font-weight: 700; font-size: .92em; }
.sxl-track { position: relative; height: calc(var(--u) * 2); border-radius: 999px; background: linear-gradient(90deg, #ffd1dc, #a84849); margin: calc(var(--u) * 3) calc(var(--u) * 2) calc(var(--u) * 1); }
.sxl-track i { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-style: normal; font-size: calc(var(--u) * 7); }
.sxl-question small { color: #70727e; font-weight: 700; } .sxl-question strong { background: #eceef4; padding: .5em; border-radius: .6em; }
.sxl-count { font-size: .85em; color: #6b6d78; }
.sxl-field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; margin-bottom: 10px; } .sxl-field input { height: 44px; border: 1.5px solid #d6d9e2; border-radius: 12px; padding: 0 12px; font-size: 16px; color: #111; background: #f4f5f9; }
.sxl-h { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #70727e; margin: 12px 0 8px; }
.sxl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.sxl-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; border: 1.5px solid #e1e3ea; border-radius: 14px; background: #f7f8fb; color: #17181c; cursor: pointer; }
.sxl-tile span { font-size: 26px; } .sxl-tile small { font-size: 12px; font-weight: 600; }
.sxl-emo { font-size: 26px; border: 0; background: transparent; padding: 6px; border-radius: 10px; cursor: pointer; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.sxl-emo:active { transform: scale(1.3); }
.sxl-more { margin-top: 10px; }
.sxl-tabs { display: flex; gap: 6px; margin-bottom: 10px; } .sxl-tab { flex: 1; padding: 9px 4px; border-radius: 10px; border: 1.5px solid #d6d9e2; background: #fff; color: #17181c; font-weight: 600; cursor: pointer; } .sxl-tab.on { background: #17181c; color: #fff; border-color: #17181c; }
.sxl-sfx { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border: 1.5px solid #e1e3ea; border-radius: 14px; background: #f7f8fb; color: #17181c; } .sxl-sfx span { font-size: 26px; } .sxl-sfx .sxl-mini { color: #17181c; background: #fff; border-color: #d6d9e2; }
.sxl-use { background: #a84849 !important; color: #fff !important; border-color: #a84849 !important; font-size: 12px !important; }
.sxl-rec { text-align: center; font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 6px 0; color: #17181c; }
.sxl-center { display: flex; justify-content: center; margin: 8px 0; }
.sxl-recbtn { width: 64px; height: 64px; border-radius: 50%; border: 0; background: #eef0f5; color: #e53950; font-size: 26px; cursor: pointer; } .sxl-recbtn.on { background: #e53950; color: #fff; }
.sxc-panel .sxl-field span, .sxc-panel .sxl-field { color: #17181c; }
