/* Camera shell: the selected capital colour surrounds every frame. */
.studio-surface{padding:0;background:var(--bg);backdrop-filter:none;-webkit-backdrop-filter:none}
.studio-surface .camera-studio{--studio-height:calc(100dvh - 142px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));position:relative;width:100%;height:100dvh;max-height:none;max-width:none;border:0;border-radius:0;box-shadow:none;background:var(--bg);overflow:hidden}
.camera-studio .modal-header,.photo-capturing.camera-studio .modal-header{display:flex;position:absolute;top:calc(8px + env(safe-area-inset-top,0px));right:max(14px,env(safe-area-inset-right,0px));height:44px;padding:0;z-index:4;border:0}
.camera-studio .modal-header h2{display:none}
.camera-studio .modal-header button{width:44px;height:44px;color:var(--ink);background:transparent}
.camera-studio .modal-header svg{width:27px;height:27px}
.camera-studio .modal-body,.photo-capturing.camera-studio .modal-body{padding:calc(58px + env(safe-area-inset-top,0px)) max(18px,env(safe-area-inset-right,0px)) calc(84px + env(safe-area-inset-bottom,0px)) max(18px,env(safe-area-inset-left,0px));height:100%;display:flex;flex-direction:column;align-items:center}
.camera-studio #camera-composer{display:grid;place-items:center;width:100%;height:100%;min-height:0}
.camera-studio .camera-stage,.photo-capturing.camera-studio .camera-stage{width:min(100%,calc(var(--studio-height) * var(--camera-aspect,.5625)));height:auto;min-height:0;max-height:none;max-width:600px;aspect-ratio:var(--camera-aspect,.5625);border-radius:22px;overflow:hidden;background:color-mix(in srgb,var(--bg),#202820 7%);position:relative}
.camera-studio .camera-stage video,.photo-capturing.camera-studio .camera-stage video{width:100%;height:100%;object-fit:cover;object-position:center;transform-origin:center}
.camera-studio .camera-placeholder{min-height:0;height:100%;padding:20px;color:var(--ink);display:flex;flex-direction:column;align-items:center;justify-content:center}
.camera-studio .camera-placeholder svg{width:36px;height:36px;margin:0 0 16px}
.camera-studio .camera-placeholder h3{font-size:17px;margin:0 0 12px}
.camera-studio .camera-placeholder p{font-size:13px;line-height:1.6;max-width:290px;color:var(--muted)}
.studio-modes{position:absolute;bottom:calc(16px + env(safe-area-inset-bottom,0px));left:12px;right:12px;max-width:550px;margin:auto;display:flex;align-items:center;justify-content:space-evenly;gap:4px;min-height:52px;z-index:4}
.studio-modes button{display:flex;align-items:center;justify-content:center;gap:5px;min-height:48px;padding:4px 8px;font-size:12px;color:var(--muted);border-radius:12px;background:transparent;white-space:nowrap}
.studio-modes button:first-child{flex-direction:column;gap:3px;font-size:10px}
.studio-modes svg{width:23px;height:23px}
.studio-modes button.active{font-weight:750;color:var(--ink);text-decoration:underline;text-underline-offset:8px;text-decoration-thickness:2px}
.studio-modes button:disabled{opacity:.4}
.camera-studio.studio-review{overflow:auto}
.camera-studio.studio-review .modal-body{height:auto;min-height:100%;padding-bottom:30px}
.camera-studio.studio-review #camera-composer{display:block;max-width:480px;height:auto}
.studio-review .studio-modes{display:none}
.camera-studio.studio-review .capture-review-frame{max-width:320px}
.camera-gallery .modal-body{overflow:auto;padding-bottom:100px}
.camera-gallery .gallery-content{width:100%;max-width:540px}
.gallery-heading{font-size:20px;margin:12px 0 5px}
.gallery-note{font-size:12px;line-height:1.6;color:var(--muted);margin:0 0 20px}
.camera-gallery-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin-bottom:20px}
.camera-gallery-grid button{padding:0;aspect-ratio:4/5;overflow:hidden;border-radius:6px}
.camera-gallery-grid img,.camera-gallery-grid video{width:100%;height:100%;object-fit:cover}
.story-ring:not(.seen),.story-ring.own.has-story{border-color:var(--story-color,#dce0d5);box-shadow:0 0 0 1px #7c857829}
.story-ring.own:not(.has-story){box-shadow:none}
.publish-flight{position:fixed;z-index:1000;pointer-events:none;overflow:hidden;border-radius:20px;transform-origin:top left;box-shadow:0 8px 32px #0002}
.publish-flight img,.publish-flight video{display:block;width:100%;height:100%;object-fit:cover}
@media(max-width:350px){.studio-modes{left:7px;right:7px;gap:0}.studio-modes button{padding:4px 6px;font-size:11px}.studio-modes svg{width:21px;height:21px}}

.instant-preview{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;pointer-events:none;z-index:2}.instant-preview.mirrored{scale:-1 1}
