/* Caption chrome stays separate from the full-screen story surface. */
#up-compose.up-story-camera #up-caption,#up-viewer.up-viewer #up-story-touch.up-view-body #up-view-text.st-caption{position:absolute;inset:auto;left:50%;top:50%;right:auto;bottom:auto;z-index:4;width:max-content;max-width:88%;max-height:80%;margin:0;padding:7px 10px;border:0;border-radius:5px;background:transparent;color:var(--caption-color,#fff);font-family:var(--caption-family,system-ui,sans-serif);font-size:var(--caption-size,28px);font-weight:600;line-height:1.2;text-align:var(--caption-align,center);white-space:pre-wrap;overflow-wrap:anywhere;text-shadow:0 2px 10px #0009;transform:translate(-50%,-50%);touch-action:none;user-select:none;-webkit-user-select:none;overflow:hidden;backdrop-filter:none;box-sizing:border-box}
#up-compose.up-story-camera #up-caption{cursor:grab;min-width:32px;min-height:44px;display:grid;place-items:center}
#up-compose.up-story-camera #up-caption:empty{display:none}
#up-compose.up-story-camera #up-caption.st-caption-selected,#up-viewer.up-viewer.caption-editing #up-view-text{outline:1px dashed #ffffffa6;outline-offset:7px;cursor:grab}
#up-compose.up-story-camera #up-caption.st-caption-dragging,#up-viewer.up-viewer #up-view-text.st-caption-dragging{cursor:grabbing;outline-color:#bca1ff}
#up-compose.up-story-camera[data-story-mode=channel] #up-caption,#up-compose.up-story-camera[data-story-mode=channel] #up-caption-tools{display:none!important}
#up-compose.up-story-camera:not([data-story-mode=channel]) .sc-text-label{display:none!important}
#up-compose.up-story-camera #up-caption.st-caption[data-caption-style=cinema],#up-viewer.up-viewer #up-story-touch.up-view-body #up-view-text.st-caption[data-caption-style=cinema]{text-transform:uppercase;letter-spacing:.12em;font-weight:500;line-height:1.08;text-shadow:0 3px 18px #000c}
#up-compose.up-story-camera #up-caption.st-caption[data-caption-style=subtitle],#up-viewer.up-viewer #up-story-touch.up-view-body #up-view-text.st-caption[data-caption-style=subtitle]{background:#111019bd;padding:7px 12px;border-radius:5px;text-shadow:none;box-decoration-break:clone}
#up-compose.up-story-camera #up-caption.st-caption[data-caption-style=poster],#up-viewer.up-viewer #up-story-touch.up-view-body #up-view-text.st-caption[data-caption-style=poster]{font-weight:800;text-transform:uppercase;letter-spacing:-.025em;line-height:1.02;text-shadow:3px 3px 0 #18152f,0 3px 16px #000a}
#up-compose.up-story-camera #up-caption.st-caption[data-caption-style=editorial],#up-viewer.up-viewer #up-story-touch.up-view-body #up-view-text.st-caption[data-caption-style=editorial]{font-weight:500;font-style:italic;line-height:1.2;letter-spacing:-.025em;text-shadow:0 2px 14px #000b}
#up-compose.up-story-camera #up-caption.st-caption[data-caption-style=neon],#up-viewer.up-viewer #up-story-touch.up-view-body #up-view-text.st-caption[data-caption-style=neon]{font-weight:650;text-shadow:0 0 3px currentColor,0 0 12px #794cff,0 0 28px #794cff,0 2px 7px #000}
#up-compose.up-story-camera .st-caption-tools,#up-viewer.up-viewer .st-caption-tools{position:absolute;z-index:12;inset:auto 0 0;padding:8px max(12px,env(safe-area-inset-right,0px)) calc(8px + env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left,0px));margin:0;border:0;border-radius:18px 18px 0 0;background:linear-gradient(#10101ada,#10101af5);backdrop-filter:blur(18px);color:#fff;font:14px/1.3 system-ui,sans-serif;max-height:40%;overflow:auto;overscroll-behavior:contain;box-sizing:border-box}
#up-compose.up-story-camera .st-caption-tools[hidden],#up-viewer.up-viewer .st-caption-tools[hidden]{display:none!important}
#up-compose.up-story-camera .st-caption-tools button,#up-viewer.up-viewer .st-caption-tools button{min-height:44px;border:0;border-radius:22px;background:transparent;color:#eae7f8;padding:8px 12px;font:inherit;white-space:nowrap;cursor:pointer;touch-action:manipulation}
#up-compose.up-story-camera .st-caption-tools button:focus-visible,#up-viewer.up-viewer .st-caption-tools button:focus-visible{outline:2px solid #c5b2ff;outline-offset:1px}
#up-compose.up-story-camera .st-caption-actions,#up-viewer.up-viewer .st-caption-actions{display:flex;align-items:center;gap:4px}
#up-compose.up-story-camera #up-caption-done,#up-viewer.up-viewer #up-caption-done{margin-left:auto;background:linear-gradient(105deg,#397cf3,#874ce9);font-weight:650;padding:8px 16px}
#up-compose.up-story-camera #up-caption-more-fonts,#up-viewer.up-viewer #up-caption-more-fonts{background:#ffffff12}
#up-compose.up-story-camera #up-caption-text-edit,#up-viewer.up-viewer #up-caption-text-edit{display:block;box-sizing:border-box;width:100%;min-height:64px;max-height:100px;margin:4px 0;padding:10px 12px;resize:none;border:1px solid #ffffff25;border-radius:12px;background:#ffffff0b;color:#fff;font:16px/1.35 system-ui,sans-serif}
#up-compose.up-story-camera #up-caption-text-edit[hidden],#up-viewer.up-viewer #up-caption-text-edit[hidden]{display:none}
#up-compose.up-story-camera .st-caption-rail,#up-viewer.up-viewer .st-caption-rail{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;flex:none;white-space:nowrap;padding:2px 0}
#up-compose.up-story-camera .st-caption-rail::-webkit-scrollbar,#up-viewer.up-viewer .st-caption-rail::-webkit-scrollbar{display:none}
#up-compose.up-story-camera .st-caption-rail button,#up-viewer.up-viewer .st-caption-rail button{flex:none;min-height:38px;padding:6px 13px;color:#ccc8dd}
#up-compose.up-story-camera .st-caption-tools button[aria-pressed=true],#up-viewer.up-viewer .st-caption-tools button[aria-pressed=true]{color:#fff;background:#8e6cf142;box-shadow:inset 0 0 0 1px #bba0ff75}
#up-compose.up-story-camera .st-caption-format,#up-viewer.up-viewer .st-caption-format{display:flex;align-items:center;gap:2px;min-width:0}
#up-compose.up-story-camera .st-caption-format>button,#up-viewer.up-viewer .st-caption-format>button{padding:6px 10px;min-width:44px;font-size:16px}
#up-compose.up-story-camera .st-caption-colors,#up-viewer.up-viewer .st-caption-colors{display:flex;align-items:center;min-width:0;overflow-x:auto;scrollbar-width:none}
#up-compose.up-story-camera .st-caption-colors button,#up-viewer.up-viewer .st-caption-colors button{display:block;flex:none;position:relative;width:32px;min-width:32px;min-height:44px;padding:0;background:transparent;box-shadow:none}
#up-compose.up-story-camera .st-caption-colors button::after,#up-viewer.up-viewer .st-caption-colors button::after{content:"";position:absolute;left:7px;top:12px;width:18px;height:18px;background:var(--caption-swatch);border-radius:50%;border:1px solid #ffffff4d}
#up-compose.up-story-camera .st-caption-colors button[aria-pressed=true]::after,#up-viewer.up-viewer .st-caption-colors button[aria-pressed=true]::after{outline:2px solid #ba9aff;outline-offset:2px}
#up-compose.up-story-camera #up-caption-size,#up-viewer.up-viewer #up-caption-size{margin-left:auto;padding-left:4px;color:#c9c1dc;font-size:12px;font-variant-numeric:tabular-nums}
#up-compose.up-story-camera #up-caption-status,#up-viewer.up-viewer #up-caption-status{margin:0;font-size:12px;line-height:1.4;color:#cfcae0}
#up-compose.up-story-camera #up-caption-status:empty,#up-viewer.up-viewer #up-caption-status:empty{display:none}
#up-compose.up-story-camera.caption-tools-open .sc-publish-panel,#up-compose.up-story-camera.caption-tools-open .sc-review,#up-compose.up-story-camera.caption-tools-open .sc-color-label,#up-compose.up-story-camera.caption-tools-open .sc-capture,#up-compose.up-story-camera.caption-tools-open .sc-camera-bottom{visibility:hidden;pointer-events:none}
#up-compose.up-story-camera.caption-tools-open .sc-tools{visibility:hidden;pointer-events:none}
#up-compose.up-story-camera.se-panel-open #up-caption{pointer-events:none}
#up-viewer.up-viewer.caption-editing .up-view-controls,#up-viewer.up-viewer.caption-editing .up-story-tools,#up-viewer.up-viewer.caption-editing #up-view-music,#up-viewer.up-viewer.caption-editing #up-view-state{visibility:hidden;pointer-events:none}
#up-viewer.up-viewer #up-caption-edit-published{font:inherit;font-size:13px;min-height:44px;border:1px solid #ffffff28;background:#282639ba}
#up-compose.up-story-camera #up-caption-font-panel,#up-viewer.up-viewer #up-caption-font-panel{position:absolute;inset:0;z-index:2;padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px));background:#151420;overflow:auto;overscroll-behavior:contain;box-sizing:border-box}
#up-compose.up-story-camera #up-caption-font-panel[hidden],#up-viewer.up-viewer #up-caption-font-panel[hidden]{display:none!important}
#up-compose.up-story-camera .st-caption-font-search,#up-viewer.up-viewer .st-caption-font-search{display:flex;align-items:center;gap:8px}
#up-compose.up-story-camera #up-caption-font-search,#up-viewer.up-viewer #up-caption-font-search,#up-compose.up-story-camera #up-caption-font-category,#up-viewer.up-viewer #up-caption-font-category{width:100%;min-height:44px;box-sizing:border-box;border:1px solid #ffffff24;border-radius:14px;padding:10px 12px;background:#ffffff0a;color:#fff;font:14px system-ui,sans-serif}
#up-compose.up-story-camera #up-caption-font-category,#up-viewer.up-viewer #up-caption-font-category{width:auto;max-width:100%;margin:8px 0 4px}
#up-compose.up-story-camera #up-caption-font-category option,#up-viewer.up-viewer #up-caption-font-category option{background:#201e30}
#up-compose.up-story-camera #up-caption-font-count,#up-viewer.up-viewer #up-caption-font-count{display:inline;font-size:12px;color:#b9b1cc;padding-left:8px}
#up-compose.up-story-camera #up-caption-font-results,#up-viewer.up-viewer #up-caption-font-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:8px 0}
#up-compose.up-story-camera #up-caption-font-results button,#up-viewer.up-viewer #up-caption-font-results button{text-align:left;white-space:normal;background:#ffffff08;border-radius:12px;overflow-wrap:anywhere;min-height:48px}
#up-compose.up-story-camera #up-caption-font-more,#up-viewer.up-viewer #up-caption-font-more{display:block;width:100%;background:#ffffff12}
@media(max-height:650px){#up-compose.up-story-camera .st-caption-tools,#up-viewer.up-viewer .st-caption-tools{max-height:39%;padding-top:4px}#up-compose.up-story-camera .st-caption-rail button,#up-viewer.up-viewer .st-caption-rail button{min-height:34px;padding-top:4px;padding-bottom:4px}#up-compose.up-story-camera #up-caption-text-edit,#up-viewer.up-viewer #up-caption-text-edit{min-height:52px;max-height:65px}}
@media(max-width:360px){#up-compose.up-story-camera .st-caption-actions button,#up-viewer.up-viewer .st-caption-actions button{padding-left:10px;padding-right:10px;font-size:13px}#up-compose.up-story-camera .st-caption-colors button,#up-viewer.up-viewer .st-caption-colors button{width:28px;min-width:28px}}

#up-compose.up-story-camera .st-caption-tools.st-fonts-open,#up-viewer.up-viewer .st-caption-tools.st-fonts-open{height:40dvh;min-height:min(280px,40dvh)}
