/* Diamond Edit AI V46 — ergonomia de iPhone, painéis corretos, áudio sobre a prévia. */
:root{--v46-gold:#eac58d;--v46-ink:#080d15;--v46-line:#324559}
*{box-sizing:border-box}
/* Timeline limpa: nomes, trilhas e botões sem cortes ou deslocamentos laterais. */
.v34-workspace{width:100%;min-width:0;overflow:hidden}
.v34-topline{gap:12px;min-height:35px;align-items:center}
.v34-readout{min-width:110px;white-space:nowrap}
.v45-direct-hint{flex:1;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.v34-ruler{padding-left:2px}
.v35-layer-stack{display:grid!important;gap:5px!important;padding:5px 4px 6px!important;overflow:hidden!important}
.v35-layer-stack .v35-layer-row{display:grid!important;grid-template-columns:25px minmax(0,1fr);align-items:center;column-gap:8px;width:100%;min-width:0;min-height:35px!important;height:35px!important;margin:0!important;overflow:hidden!important;border-radius:8px;background:#101721}
.v35-layer-stack .v35-lane-mark{width:24px!important;min-width:24px!important;display:block!important;grid-column:1;font-size:16px!important;line-height:28px;color:#9baec4;text-align:center}
.v35-layer-stack .v35-layer-placeholder,.v35-layer-stack .v35-layer-media{grid-column:2;width:100%;max-width:100%;min-height:33px!important;height:33px!important;line-height:24px!important;align-self:center;padding:4px 10px!important;border-radius:7px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px!important;text-align:left}
.v35-layer-stack .v35-layer-placeholder{background:#1b212b;color:#b7c3d0}
.v35-layer-stack .v35-subtitle-clip{background:#302b20!important;color:#f5d9a4!important}
.v35-layer-stack .v35-audio-clip{position:absolute!important;top:1px!important;height:32px!important;max-width:none!important;width:var(--v45-music-width,190px)!important;min-width:85px!important;border:1px solid #507fb8!important;border-radius:7px!important;padding:3px 6px!important;white-space:nowrap;overflow:hidden;grid-column:2}
.v35-layer-stack .v35-wave{pointer-events:none}
.v35-layer-stack .v45-fx-lane-body{grid-column:2;position:relative;min-width:0;max-width:100%;width:100%;height:33px;overflow:hidden;align-self:center}
.v35-layer-stack .v45-fx-take{top:3px!important;min-height:26px!important;height:26px!important;line-height:20px!important;font-size:11px!important}
.v35-layer-stack .v45-fx-plus{right:3px!important;top:2px!important;position:absolute!important;min-height:29px!important;height:29px!important;width:34px!important;min-width:34px!important;padding:3px!important;border-radius:7px!important}
/* Toque e segure: translação pela GPU, sem filtros de sombra custosos nos frames. */
.v34-clip-group{transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}
.v34-clip-group.dragging{filter:none!important;box-shadow:0 5px 16px #0008!important;transition:none!important;opacity:.97!important;z-index:20!important;contain:paint}
.v34-clip-group.dragging .v34-clip{border:2px solid #efc78e!important;background:#1c2d42}
.v34-clip-images{touch-action:none!important;-webkit-user-select:none!important;user-select:none!important}
.v34-clip-group.v45-drop-target{filter:none!important;box-shadow:inset 3px 0 0 #ffdb97!important}
/* Diálogo de áudio que cobre a imagem como seletor de música do CapCut. */
.v46-audio-sheet{position:fixed;inset:0;z-index:9900;display:flex;align-items:stretch;justify-content:center;overscroll-behavior:contain;font-family:inherit}
.v46-audio-backdrop{position:absolute;inset:0;background:rgba(2,5,10,.80);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
.v46-audio-card{position:relative;display:flex;flex-direction:column;margin:auto;width:min(100%,720px);height:100dvh;max-height:100dvh;background:linear-gradient(180deg,#101d2c 0%,#080f18 34%,#07101a 100%);color:#f6f5f1;box-shadow:0 0 50px #0009;overflow:hidden}
.v46-audio-top{flex:0 0 auto;display:grid;grid-template-columns:44px minmax(0,1fr) 112px;gap:8px;align-items:center;min-height:59px;padding:calc(env(safe-area-inset-top,0px) + 8px) 14px 8px;border-bottom:1px solid #344558;background:#0e1a29}
.v46-audio-top strong{font-size:17px;font-weight:750;color:#f3d29b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.v46-audio-top button{height:39px;min-width:39px;border:0;border-radius:9px;background:#1a2c40;color:#fff;font-size:26px;line-height:1;cursor:pointer}
.v46-audio-top .v46-audio-done{width:112px;min-width:0;background:linear-gradient(120deg,#f5d7a4,#c99656);font-size:13px;font-weight:800;color:#17202d}
.v46-audio-tabs{flex:0 0 auto;display:grid;grid-template-columns:1fr 1fr;padding:8px 15px 4px;gap:8px;background:#0b1421}
.v46-audio-tabs button{min-height:44px;background:#142335;color:#adbfd1;border:1px solid #263e53;border-radius:9px;font-size:13px;font-weight:650}
.v46-audio-tabs button.selected{background:#293248;color:#ffdb9c;border-color:#c59d61}
.v46-audio-content{flex:1;min-height:0;min-width:0;overflow-y:auto;overflow-x:hidden;padding:9px 16px calc(env(safe-area-inset-bottom,0px) + 35px);-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
.v46-audio-content .v45-audio-head{padding:9px 0 8px}
.v46-audio-content .v45-audio-head h3{font-size:20px!important;margin:4px 0}
.v46-audio-content .v45-audio-head p{margin:5px 0 2px;max-width:480px}
.v46-audio-content .v45-audio-actions{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.v46-audio-content .v45-audio-actions button{min-height:55px!important;height:auto!important;padding:10px 5px!important;border-radius:12px;font-size:11px!important;white-space:normal!important}
.v46-audio-content .v45-music-results,.v46-audio-content .v45-fx-list{max-height:none!important;overflow:visible!important;display:grid;gap:8px}
.v46-audio-content .v45-music-row{width:100%;min-width:0;gap:7px}
.v46-audio-content .v45-music-item{min-width:0;min-height:64px;border-radius:12px;padding:9px}
.v46-audio-content .v45-music-item strong{font-size:13px}.v46-audio-content .v45-music-item small{font-size:11px}
.v46-audio-content .v45-music-audition{height:50px;min-width:44px;width:44px}
.v46-audio-content .v45-mixer{padding:16px 2px;margin-top:20px;border-top:1px solid #38506a}
.v46-audio-content .ctrl{max-width:100%;min-width:0}
.v46-audio-content input[type=range]{width:100%;min-height:36px;accent-color:#efc58a}
.v46-audio-content .v45-fx-row{min-height:60px}
.v46-audio-content .v45-fx-categories{padding:4px 0 10px}
body.v46-audio-active{overflow:hidden}
@media(max-width:650px){
 .mode-editor .editor-layout{min-width:0!important;max-width:100%!important}
 .mode-editor .content-shell .editor-top{width:100%;min-width:0;grid-template-columns:minmax(0,1fr) 72px 147px!important;gap:5px!important;align-items:center!important;box-sizing:border-box!important}
 .mode-editor .editor-top-left{max-width:100%;min-width:0!important;overflow:hidden!important}
 .mode-editor .editor-top .v20-editor-name{max-width:100%;min-width:0!important;overflow:hidden!important}
 .mode-editor .editor-top .editor-actions{max-width:147px!important;min-width:147px!important;width:147px!important;gap:5px!important}
 .mode-editor .editor-top .editor-actions [data-action="export"]{min-width:103px!important;width:103px!important;flex-basis:103px!important}
 .mode-editor .editor-top .v24-format-host,.mode-editor .editor-top .v24-format-host label,.mode-editor .editor-top #ratio-select{width:72px!important;max-width:72px!important}
 .mode-editor .editor-layout>.tab-row{min-height:66px!important;max-height:70px!important;gap:2px!important;scroll-snap-type:x proximity;scrollbar-width:none}
 .mode-editor .editor-layout>.tab-row>.tab{scroll-snap-align:start;min-width:62px!important;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;white-space:nowrap}
 .mode-editor .tab-row .tab small{font-size:10px!important;max-width:100%;overflow:hidden;text-overflow:ellipsis}
 body .mode-editor.v24-tool-open .editor-layout>.stage-panel{min-height:260px!important;max-height:44dvh!important;flex-basis:clamp(260px,41dvh,400px)!important;height:clamp(260px,41dvh,400px)!important}
 body .mode-editor.v24-tool-open .editor-layout>.timeline-panel{min-height:176px!important;max-height:28dvh!important;overflow-y:auto!important;overflow-x:hidden!important;flex:0 0 auto!important}
 body .mode-editor.v24-tool-open .editor-layout>.properties-panel{min-height:145px!important;flex:1 1 0!important;overflow-y:auto!important;overflow-x:hidden!important;border-radius:14px 14px 0 0!important;border:1px solid #41586c!important;padding:8px 12px calc(env(safe-area-inset-bottom,0px) + 15px)!important}
 body .mode-editor.v24-tool-open .properties-panel .v24-tool-head{display:grid!important;grid-template-columns:36px minmax(0,1fr) 36px;gap:7px;height:47px!important;min-height:47px!important;flex-basis:47px!important;padding:3px 4px!important;margin:0 0 8px!important;align-items:center!important;top:-8px!important}
 body .mode-editor.v24-tool-open .properties-panel .v24-tool-head button{height:36px!important;min-height:36px!important;min-width:36px!important;width:36px!important;margin:0!important;font-size:21px!important}
 body .mode-editor.v24-tool-open .properties-panel .v24-tool-head .v24-tool-label{font-size:15px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}
 body .mode-editor.v24-tool-open .properties-panel .v24-tool-advice{display:none!important}
 body .mode-editor.v24-tool-open .properties-panel #control-panel{padding:6px 2px 24px!important;min-height:0!important}
 .mode-editor .timeline-panel{padding:4px 5px 5px!important}
 .v34-help{display:none!important}
 .v34-topline{padding:5px 6px!important}
 .v34-ruler{height:15px;max-width:100%;overflow:hidden}
 .v34-clip-group.dragging{z-index:30}
 .v46-audio-top{padding-top:max(12px,env(safe-area-inset-top,0px))}
}
@media(max-width:365px){
 .mode-editor .content-shell .editor-top{grid-template-columns:minmax(0,1fr) 62px 131px!important}
 .mode-editor .editor-top .v24-format-host,.mode-editor .editor-top .v24-format-host label,.mode-editor .editor-top #ratio-select{width:62px!important;max-width:62px!important}
 .mode-editor .editor-top .editor-actions{width:131px!important;max-width:131px!important;min-width:131px!important}
 .mode-editor .editor-top .editor-actions [data-action="export"]{width:89px!important;min-width:89px!important;flex-basis:89px!important}
 .v46-audio-top{grid-template-columns:40px minmax(0,1fr) 102px}
 .v46-audio-top .v46-audio-done{width:102px}
}

/* Em aparelhos menores, não cortar a última faixa nem a barra de ferramentas. */
@media(max-width:650px) and (max-height:760px){
 body .mode-editor:not(.v24-tool-open) .editor-layout>.stage-panel{flex:0 0 clamp(254px,43dvh,333px)!important;height:clamp(254px,43dvh,333px)!important;min-height:254px!important;max-height:333px!important}
 body .mode-editor:not(.v24-tool-open) .editor-layout>.timeline-panel{max-height:34dvh!important;overflow-y:auto!important;overflow-x:hidden!important}
 body .mode-editor.v24-tool-open .editor-layout>.stage-panel{flex-basis:clamp(245px,38dvh,315px)!important;height:clamp(245px,38dvh,315px)!important;min-height:245px!important}
 body .mode-editor.v24-tool-open .editor-layout>.timeline-panel{max-height:27dvh!important;min-height:150px!important}
}
