/* V7.271 — Cadde Studio focused UI / safety. Scope strictly to Story dialog. */
html.cadde-story-modal-open body, body.cadde-story-modal-open{overflow:hidden!important;overscroll-behavior:none!important;}
.cadde-story-maker[open]{color:#f6f8fc!important;background:#060b13!important;overscroll-behavior:contain!important;touch-action:pan-y;}
.cadde-story-maker[open] .cadde-story-maker-form{background:#060b13!important;}
.cadde-story-maker[open] .cadde-story-editor-stage{background:linear-gradient(145deg,#0c1724,#070c14)!important;}
.cadde-story-maker[open] .cadde-story-maker-top{padding:calc(12px + env(safe-area-inset-top,0px)) 16px 12px!important;min-height:calc(62px + env(safe-area-inset-top,0px))!important;gap:8px!important;z-index:18!important;}
.cadde-story-maker[open] .cadde-story-maker-top>strong{font-size:15px!important;font-weight:780!important;letter-spacing:0!important;white-space:nowrap!important;}
.cadde-story-maker[open] .cadde-story-maker-top>button{min-width:44px!important;min-height:44px!important;color:#fff!important;border-radius:15px!important;display:grid!important;place-items:center!important;}
.cadde-story-maker[open] .cadde-camera-controls{top:calc(71px + env(safe-area-inset-top,0px))!important;z-index:16!important;gap:6px!important;}
.cadde-story-maker[open] .cadde-camera-controls button{min-width:44px!important;min-height:44px!important;}
.cadde-story-maker[open] .cadde-camera-controls span{max-width:min(260px,80vw);text-align:center;overflow-wrap:anywhere;}
.cadde-story-maker[open] .cadde-camera-mode{bottom:calc(164px + env(safe-area-inset-bottom,0px))!important;max-width:calc(100vw - 24px)!important;z-index:16!important;}
.cadde-story-maker[open] .cadde-story-maker-shutter-row{bottom:calc(53px + env(safe-area-inset-bottom,0px))!important;z-index:16!important;}
.cadde-story-maker[open] .cadde-story-gallery-button{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:2px!important;min-width:62px!important;min-height:62px!important;color:#fff!important;}
.cadde-story-maker[open] .cadde-story-gallery-button svg{flex:none;}
.cadde-story-maker[open] .cadde-story-gallery-button small{font-size:10px!important;font-weight:700!important;color:#fff!important;}
.cadde-story-maker[open] .cadde-story-gallery-sheet:not([hidden]){position:absolute!important;inset:auto 0 0!important;z-index:30!important;max-height:min(78dvh,690px)!important;max-height:min(calc(var(--cadde-studio-viewport,100dvh) * .78),690px)!important;padding:12px 16px calc(22px + env(safe-area-inset-bottom,0px))!important;border-radius:24px 24px 0 0!important;background:#101b2b!important;border:1px solid #536a827d!important;box-shadow:0 -12px 65px #000c!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important;overscroll-behavior:contain!important;}
.cadde-story-maker[open] .cadde-story-gallery-sheet-heading strong{font-size:18px!important;letter-spacing:-.025em;}
.cadde-story-maker[open] .cadde-story-gallery-sheet p{font-size:12px!important;line-height:1.5!important;color:#b9cce0!important;}
.cadde-story-maker[open] .cadde-story-gallery-sheet .cadde-story-gallery-help:not([hidden]){color:#f9c6a6!important;border-left:3px solid #ff872d;padding:8px 10px;background:#392a2433;border-radius:7px;}
.cadde-story-maker[open] .cadde-story-open-native{display:flex!important;align-items:center!important;justify-content:center!important;gap:9px!important;min-height:50px!important;padding:12px 16px!important;font-size:14px!important;font-weight:750!important;line-height:1.2!important;}
.cadde-story-maker[open] .cadde-gallery-item{overflow:hidden!important;border-radius:13px!important;}
.cadde-story-maker[open] .cadde-story-gallery-grid{grid-template-columns:repeat(auto-fill,minmax(85px,1fr))!important;gap:9px!important;}
.cadde-story-maker[open].is-gallery-open .cadde-studio-notice:not([hidden]){bottom:auto!important;top:calc(70px + env(safe-area-inset-top,0px))!important;z-index:31!important;max-height:110px;overflow:auto;}
.cadde-story-maker[open] .cadde-studio-notice:not([hidden]){z-index:32!important;pointer-events:auto!important;}
.cadde-story-maker[open] .cadde-story-maker-upload:not([hidden]){z-index:40!important;}
.cadde-story-maker[open] .cadde-story-maker-review:not([hidden]){z-index:21!important;padding-bottom:calc(22px + env(safe-area-inset-bottom,0px))!important;}
.cadde-story-maker[open] :is(button,input):focus-visible{outline:2px solid #ffaf73!important;outline-offset:3px!important;}
.cadde-story-maker[open] :is(button,input){-webkit-tap-highlight-color:transparent;}
.cadde-story-maker[open].is-preparing .cadde-story-open-native{opacity:.68;}
.cadde-story-maker[open] .cadde-story-maker-caption input{font-size:16px!important;}
/* Hide floating external support/chat bars behind native top-layer dialog. */
html.cadde-story-modal-open :is(.cadde-mobile-dock,.cadde-whatsapp-support,#caddeHelpRoot){pointer-events:none!important;}
@media(max-width:390px){.cadde-story-maker[open] .cadde-camera-controls span{display:none!important}.cadde-story-maker[open] .cadde-story-maker-top{padding-left:12px!important;padding-right:12px!important}}
@media(max-height:570px){.cadde-story-maker[open] .cadde-camera-controls span{display:none!important}.cadde-story-maker[open] .cadde-camera-mode{bottom:calc(129px + env(safe-area-inset-bottom,0px))!important}.cadde-story-maker[open] .cadde-story-maker-shutter-row{bottom:calc(20px + env(safe-area-inset-bottom,0px))!important}}
@media(prefers-reduced-motion:reduce){.cadde-story-maker[open] *{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
