/* Capture first. The viewfinder owns the screen; optional tools open in small trays. */
.studio-page { background: #000; }
body:has(.studio-page) #toast { top: calc(var(--safe-t) + 62px); bottom: auto; max-width: calc(100vw - 140px); font-size: 11px; pointer-events: none; }
body:has(.studio-page) #toast button { pointer-events: auto; }
.studio-head { top: calc(var(--safe-t) + 8px); left: 12px; right: 12px; max-width: none; gap: 12px; }
.studio-head .icon-btn { border: 0; background: #0005; width: 44px; height: 44px; }
.studio-sound { min-height: 44px; max-width: 210px; padding: 0 16px; border: 1px solid #ffffff18; border-radius: 24px; background: #10101078; backdrop-filter: blur(14px); display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 650; }
.studio-sound svg { width: 18px; }.studio-sound span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-shade { background: linear-gradient(#0005,transparent 20%,transparent 55%,#000b 90%,#000e); }
.studio-tools { top: calc(var(--safe-t) + 76px); right: 12px; display: flex; flex-direction: column; gap: 12px; }
.studio-tools .studio-tool { width: 48px; height: 54px; background: transparent; border: 0; border-radius: 12px; backdrop-filter: none; display: grid; justify-items: center; gap: 4px; padding: 4px; text-shadow: 0 1px 7px #000; }
.studio-tool svg { width: 24px; height: 24px; filter: drop-shadow(0 1px 5px #0007); }.studio-tool small { font-size: 9px; font-weight: 650; }
.studio-tools .studio-tool[aria-expanded=true],.studio-tools .studio-tool[aria-pressed=true] { background: #ffffff20; }
.studio-tools-extra,.studio-ar-panel { position: absolute; z-index: 5; left: 14px; top: calc(var(--safe-t) + 72px); width: min(270px,calc(100% - 90px)); max-height: calc(100dvh - var(--safe-t) - var(--safe-b) - 320px); overflow: auto; padding: 16px; border: 1px solid #ffffff25; border-radius: 20px; background: #141414de; backdrop-filter: blur(24px); }
.studio-panel-kicker { display: block; font-size: 8px; font-weight: 750; letter-spacing: .13em; color: #c6bba9; margin-bottom: 14px; }
.lens-choices { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 12px; }.lens-choices button { min-width: 0; display: grid; justify-items: center; align-content: center; gap: 5px; min-height: 65px; border: 1px solid #ffffff12; border-radius: 12px; background: linear-gradient(145deg,#372e40,#19191e); }.lens-choices button[aria-pressed=true] { border-color: #e7c5ff; background: #4b365e; }.lens-choices span { font-size: 24px; color: #f7d5ff; line-height: 1; }.lens-choices small { font-size: 8px; line-height: 1.4; text-align: center; color: #ddd; }
.extra-tool-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px 6px; }
.extra-tool-grid .tool { display: grid; place-items: center; gap: 5px; height: 56px; width: 100%; background: #ffffff08; border-radius: 12px; font-size: 12px; border: 1px solid #ffffff10; }
.extra-tool-grid small { font-size: 9px; }.extra-tool-grid svg { width: 20px; height: 20px; }
.extra-tool-grid .tool[aria-pressed=true] { background: #f3eee2; color: #111; }
.studio-tools-extra > span:last-of-type { display: block; color: #aaa; font-size: 10px; margin-top: 14px; }
.studio-tools-extra > label { display: grid; margin-top: 12px; gap: 8px; font-size: 11px; }.studio-tools-extra input { width: 100%; }
.studio-bottom { bottom: calc(var(--safe-b) + 10px); gap: 10px; max-width: none; }
.studio-effects { padding: 12px 18px; gap: 12px; background: #1118; backdrop-filter: blur(16px); margin-bottom: 4px; }
.studio-effects button { min-width: 54px; }.studio-effects button:before { width: 36px; height: 36px; }
.studio-modes { gap: 22px; align-items: center; }
.studio-modes button { font-size: 13px; min-height: 40px; color: #ccc; }
.studio-modes [aria-pressed=true]:after { width: 20px; height: 2px; left: calc(50% - 10px); bottom: 2px; }
#studio-length { color: #ddd; border: 1px solid #ffffff35; background: #10101090; padding: 6px 8px; font-size: 11px; border-radius: 16px; max-width: 70px; min-height: 36px; }
.studio-capture { padding: 4px 14px; }
.studio-capture > .icon-btn { width: 52px; height: 52px; border-radius: 16px; border: 1px solid #ffffff30; background: #ffffff0c; }.studio-capture > .icon-btn svg { width: 24px; height: 24px; }
.studio-capture .shutter { width: 84px; height: 84px; padding: 5px; border: 3px solid #fff; background: #fff1; box-shadow: 0 0 0 5px #0004; touch-action: none; }
.studio-capture .shutter span { transition: border-radius .18s,width .18s,height .18s; }.studio-capture .shutter.recording { border-color: #ff365c; box-shadow: 0 0 0 5px #ff365c35; background: conic-gradient(#ff365c var(--record-progress,0deg),#ffffff22 0); }
.studio-capture .shutter.recording span { background: #ff365c; }
.studio-labels { font-size: 9px; letter-spacing: 0; }.studio-labels span:nth-child(2) { font-size: 8px; color: #a9a9a9; }
.studio-launcher { display: flex; justify-content: center; gap: 34px; align-items: center; margin-top: 4px; min-height: 44px; color: #a9a9a9; font-size: 13px; font-weight: 700; }.studio-launcher button { min-height: 44px; }.studio-launcher .active { color: #fff; }
.studio-lens { left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-b) + 255px); max-width: 190px; }
.studio-lens label { display: flex; align-items: center; gap: 8px; background: #0008; border: 1px solid #ffffff25; border-radius: 24px; padding: 7px 10px; }.studio-lens label span { font-size: 9px; }.studio-lens input { width: 90px; }
.studio-status { z-index: 6; pointer-events: none; font-size: 12px; font-weight: 500; background: #111b; max-width: 280px; }
.studio-retry { z-index: 7; }
.quick-credit { display: flex; align-items: center; gap: 6px; font-size: 10px; color: #c8bea9; }.quick-credit svg { width: 13px; }
.sound-browser { display: grid; gap: 18px; }.sound-producer { display: flex; gap: 12px; align-items: center; min-height: 72px; border: 1px solid #ffffff20; padding: 12px; border-radius: 16px; background: #242027; }.sound-producer > span { display: grid; gap: 6px; flex: 1; }.sound-producer strong { font-size: 13px; }.sound-producer small { font-size: 10px; color: #aaa; }
.sound-license { font-size: 11px; color: #999; line-height: 1.6; }#sound-tracks { display: grid; gap: 4px; }#sound-tracks article { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid transparent; border-radius: 14px; }#sound-tracks article.selected { border-color: #cfb2d2; background: #2a222c; }.sound-preview { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #222; }.sound-preview svg { width: 18px; }.sound-pick { flex: 1; min-width: 0; text-align: left; display: grid; gap: 5px; min-height: 44px; align-content: center; }.sound-pick strong { font-size: 13px; }.sound-pick small { font-size: 10px; color: #999; }.sound-number { font-size: 10px; color: #777; }.sound-selection { display: grid; gap: 14px; position: sticky; bottom: 0; border: 1px solid #ffffff22; border-radius: 18px; padding: 16px; background: #191719; }.sound-selection label { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11px; }.sound-selection input { width: 100%; }.sound-selection output { margin-left: auto; }#sound-error { color: #ff9ea6; font-size: 12px; }#editor-music { display: flex; gap: 8px; flex-wrap: wrap; }
#studio-duet-source { position: absolute; left: 0; top: 0; width: 50%; height: 100%; object-fit: cover; background: #111; }
.duet-camera #studio-camera,.duet-camera #studio-ar-overlay { position: absolute; left: 50%; width: 50%; height: 100%; object-fit: cover; max-width: none; }
.duet-source-badge { position: absolute; top: calc(var(--safe-t) + 65px); left: 12px; z-index: 7; max-width: calc(100% - 85px); min-height: 44px; padding: 0 12px; border-radius: 24px; background: #000b; border: 1px solid #fff4; font-size: 11px; }
.template-browser { display: grid; gap: 20px; }.template-browser > p,.drafts-library > p { color: #aaa; font-size: 13px; line-height: 1.6; }
.template-categories { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }.template-categories button { padding: 10px 16px; min-height: 44px; border-radius: 22px; background: #202020; white-space: nowrap; font-size: 12px; }.template-categories [aria-pressed=true] { background: #f1ede6; color: #111; }
.template-gallery { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 12px; }.template-card { text-align: left; display: grid; gap: 6px; min-width: 0; }.template-card canvas { width: 100%; height: auto; border-radius: 16px; background: #222; }.template-card strong { font-size: 13px; }.template-card small { color: #888; font-size: 10px; line-height: 1.5; }
.draft-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 20px; }.draft-grid article { position: relative; min-width: 0; }.draft-grid [data-restore] { display: grid; text-align: left; width: 100%; gap: 6px; }.draft-grid img,.draft-grid video { width: 100%; aspect-ratio: 9/12; object-fit: cover; border-radius: 14px; background: #222; }.draft-grid strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; }.draft-grid small { color: #888; font-size: 10px; }.draft-grid [data-delete-draft] { position: absolute; right: 5px; top: 5px; width: 44px; height: 44px; background: #000b; border-radius: 50%; }
.sheet-publish { background: #000; }.sheet-publish .sheet-panel { display: flex; flex-direction: column; height: var(--publish-height,100dvh); max-height: var(--publish-height,100dvh); border-radius: 0; padding: 0; overflow-y: auto; background: #090909; }
.quick-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(var(--safe-t) + 6px) 12px 6px; background: #090909; flex: none; }.quick-head > span { font-size: 13px; font-weight: 650; }.quick-head .icon-btn { width: 44px; height: 44px; }.quick-edit { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 22px; background: #222; font-size: 12px; }.quick-edit svg { width: 16px; }
.quick-view { min-height: 100px; flex: 1 1 40dvh; position: relative; background: #000; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.quick-view img,.quick-view video { width: 100%; height: 100%; max-height: 100%; object-fit: contain; }
.quick-post { flex: none; padding: 14px 16px calc(var(--safe-b) + 12px); display: grid; gap: 12px; border-top: 1px solid #ffffff12; background: #101010; }
.quick-caption textarea { resize: vertical; min-height: 52px; max-height: 150px; width: 100%; border: 0; padding: 0; background: transparent; color: #fff; font-size: 14px; line-height: 1.5; }
.quick-choices { display: flex; gap: 8px; }.quick-choices label { display: flex; align-items: center; gap: 5px; border: 1px solid #ffffff18; border-radius: 20px; padding: 0 9px; background: #1a1a1a; min-width: 0; max-width: 55%; }.quick-choices svg { width: 14px; flex-shrink: 0; }.quick-choices select { border: 0; background: transparent; min-width: 0; color: #ddd; padding: 8px 0; font-size: 11px; min-height: 40px; max-width: 100%; }
.quick-extra { color: #aaa; font-size: 11px; }.quick-extra summary { cursor: pointer; min-height: 32px; padding: 5px 0; }.quick-extra .field { margin-top: 10px; }.quick-extra p { font-size: 11px; line-height: 1.5; margin-bottom: 12px; }
.quick-consent { color: #777; font-size: 9px; line-height: 1.5; }.quick-submit { display: grid; grid-template-columns: 1fr 1.2fr; gap: 12px; }.quick-submit > button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 14px; font-size: 13px; font-weight: 650; }.quick-submit > button:first-child { background: #222; }.quick-submit svg { width: 18px; }.quick-progress { display: grid; gap: 8px; }.quick-progress progress { width: 100%; height: 4px; accent-color: #fe2c55; }.quick-progress span { font-size: 11px; color: #bbb; }.quick-progress button { justify-self: start; }
@media(min-width:768px) { .studio-head { max-width: 600px; }.studio-tools { right: max(16px,calc(50% - 290px)); }.studio-tools-extra,.studio-ar-panel { left: max(16px,calc(50% - 240px)); }.studio-bottom { max-width: 540px; }.studio-lens { left: 50%; }.sheet-publish .sheet-panel { width: min(560px,100vw); max-height: min(94dvh,1000px); height: min(94dvh,1000px); border-radius: 24px; }.quick-head { padding-top: 6px; }.quick-view { min-height: 180px; } }
@media(max-height:650px) { .studio-bottom { gap: 4px; bottom: calc(var(--safe-b) + 4px); }.studio-capture .shutter { width: 64px; height: 64px; }.studio-capture > .icon-btn { width: 44px; height: 44px; }.studio-launcher { min-height: 36px; margin-top: 0; gap: 28px; }.studio-launcher button { min-height: 36px; }.studio-lens { bottom: calc(var(--safe-b) + 210px); }.studio-effects { margin-bottom: 0; padding-block: 6px; }.studio-effects button:before { width: 25px; height: 25px; }.studio-tools { gap: 4px; }.studio-tool small { display: none; }.studio-tools .studio-tool { height: 44px; }.studio-tools-extra,.studio-ar-panel { max-height: calc(100dvh - var(--safe-t) - 220px); }.quick-post { gap: 8px; padding-block: 10px; }.quick-caption textarea { min-height: 36px; }.quick-consent { font-size: 8px; } }
@media(max-height:500px) and (orientation:landscape) { .studio-bottom { left: auto; width: 260px; top: calc(var(--safe-t) + 58px); bottom: calc(var(--safe-b) + 4px); gap: 0; justify-content: center; align-content: center; }.studio-labels span:nth-child(2) { visibility: hidden; }.studio-launcher { gap: 20px; font-size: 11px; }.studio-tools { left: 12px; right: auto; top: calc(var(--safe-t) + 65px); }.studio-tools-extra,.studio-ar-panel { left: 70px; top: calc(var(--safe-t) + 64px); max-height: calc(100dvh - var(--safe-t) - 80px); width: 210px; }.studio-effects { position: absolute; right: 275px; bottom: 0; width: min(250px,calc(100vw - 360px)); }.studio-lens { bottom: 18px; left: 25%; }.sheet-publish .sheet-panel { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 50px minmax(0,1fr); }.quick-head { grid-column: 1 / -1; padding-top: 0; }.quick-view { min-height: 0; }.quick-post { overflow-y: auto; min-height: 0; padding-top: 10px; } }
@media(prefers-reduced-motion:reduce) { .studio-capture .shutter span { transition: none; } }
