/* DIE INSTANZ Looper UX — 1.0.64
   Capa d'interficie. No modifica el motor d'audio, master clock, phase lock ni beatgrid. */
body.di-view-loops .tool-route-intro{padding-bottom:clamp(22px,3vw,42px)}
body.di-view-loops .tool-route-grid>div:first-child{max-width:860px}
body.di-view-loops .tool-route-grid p{max-width:790px}

.di-looper-guide{width:min(1180px,calc(100% - 40px));margin:0 auto clamp(28px,4vw,52px);border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.018);padding:18px}
.di-looper-guide-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:14px}
.di-looper-guide-kicker{font:600 .68rem/1.2 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.18em;color:#ea4b4e;text-transform:uppercase}
.di-looper-guide-title{margin:5px 0 0;font-size:clamp(1rem,2vw,1.25rem);letter-spacing:.02em}
.di-looper-guide-note{max-width:520px;margin:0;color:rgba(255,255,255,.66);font-size:.82rem;line-height:1.55}
.di-looper-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-top:1px solid rgba(255,255,255,.12);border-left:1px solid rgba(255,255,255,.12)}
.di-looper-step{min-height:92px;padding:14px;border-right:1px solid rgba(255,255,255,.12);border-bottom:1px solid rgba(255,255,255,.12)}
.di-looper-step b{display:block;margin-bottom:8px;font:700 .72rem/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.15em;color:#ea4b4e}
.di-looper-step strong{display:block;margin-bottom:5px;font-size:.9rem;letter-spacing:.04em;text-transform:uppercase}
.di-looper-step span{display:block;color:rgba(255,255,255,.62);font-size:.78rem;line-height:1.45}

.di-looper-tabs{display:none;width:min(1180px,calc(100% - 40px));margin:0 auto 14px;border:1px solid rgba(255,255,255,.16);background:#090909;padding:4px;gap:4px}
.di-looper-tab{appearance:none;border:0;background:transparent;color:rgba(255,255,255,.58);font:700 .73rem/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.13em;min-height:44px;cursor:pointer}
.di-looper-tab[aria-selected="true"]{background:rgba(234,75,78,.12);color:#fff;box-shadow:inset 0 -2px #ea4b4e}

.di-looper-channel{position:relative;isolation:isolate}
.di-looper-statusbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 12px;padding:9px 11px;border:1px solid rgba(255,255,255,.13);background:rgba(255,255,255,.025)}
.di-looper-status-left{display:flex;align-items:center;gap:9px;min-width:0}
.di-looper-status-channel{font:700 .66rem/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.16em;color:rgba(255,255,255,.72);white-space:nowrap}
.di-looper-status-pill{display:inline-flex;align-items:center;min-height:24px;padding:0 8px;border:1px solid rgba(255,255,255,.16);font:700 .6rem/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.09em;color:rgba(255,255,255,.62);white-space:nowrap}
.di-looper-status-pill[data-state="loading"]{color:#fff;border-color:rgba(255,255,255,.35)}
.di-looper-status-pill[data-state="ready"]{color:#fff;border-color:rgba(234,75,78,.42)}
.di-looper-status-pill[data-state="playing"]{color:#fff;background:rgba(234,75,78,.12);border-color:#ea4b4e}
.di-looper-status-pill[data-state="paused"]{color:rgba(255,255,255,.82);border-color:rgba(255,255,255,.28)}
.di-looper-loop-length{margin-left:auto;font:600 .61rem/1.2 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.08em;color:rgba(255,255,255,.54);white-space:nowrap}
.di-looper-loop-length strong{color:rgba(255,255,255,.88);font-weight:700}

body.di-view-loops button:disabled,body.di-view-loops input:disabled,body.di-view-loops select:disabled{opacity:.38;cursor:not-allowed;filter:grayscale(.35)}
body.di-view-loops .di-looper-toggle{position:relative}
body.di-view-loops .di-looper-toggle-state{display:inline-flex;align-items:center;justify-content:center;margin-left:7px;min-width:27px;height:18px;border:1px solid rgba(255,255,255,.2);font:700 .55rem/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.08em;color:rgba(255,255,255,.52);vertical-align:middle}
body.di-view-loops .di-looper-toggle.di-looper-toggle-on .di-looper-toggle-state{border-color:#ea4b4e;background:rgba(234,75,78,.13);color:#fff}

.di-looper-master-zone{position:relative;border:1px solid rgba(234,75,78,.28)!important;background:linear-gradient(180deg,rgba(234,75,78,.045),rgba(9,9,9,.97))!important}
.di-looper-master-zone:before{content:"MASTER";display:block;margin-bottom:8px;font:700 .61rem/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.18em;color:#ea4b4e}
.di-looper-master-zone.di-master-has-label:before{display:none}
.di-looper-master-bpm{outline:1px solid rgba(234,75,78,.2);outline-offset:4px}
.di-looper-stop-all{border-color:rgba(234,75,78,.52)!important;color:#fff!important}
.di-looper-stop-all:hover,.di-looper-stop-all:focus-visible{background:rgba(234,75,78,.13)!important;border-color:#ea4b4e!important}

body.di-view-loops select:focus-visible,body.di-view-loops button:focus-visible,body.di-view-loops input:focus-visible{outline:2px solid rgba(234,75,78,.85);outline-offset:2px}

@media(max-width:900px){
 .di-looper-steps{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:820px){
 body.di-view-loops{padding-bottom:96px}
 .di-looper-guide{width:calc(100% - 28px);margin-bottom:22px;padding:13px}
 .di-looper-guide-head{display:block}
 .di-looper-guide-note{margin-top:8px}
 .di-looper-steps{grid-template-columns:1fr 1fr}
 .di-looper-step{min-height:82px;padding:12px 10px}
 .di-looper-tabs{display:grid;grid-template-columns:repeat(3,1fr);width:calc(100% - 28px);position:sticky;top:72px;z-index:18;box-shadow:0 8px 24px rgba(0,0,0,.42)}
 .di-looper-channel.di-looper-mobile-hidden{display:none!important}
 .di-looper-channel.di-looper-mobile-active{display:block!important}
 .di-looper-statusbar{position:sticky;top:124px;z-index:12;background:rgba(9,9,9,.96);backdrop-filter:blur(10px)}
 .di-looper-master-zone.di-looper-master-sticky{position:fixed!important;left:0;right:0;bottom:0;z-index:40;max-height:min(34vh,180px);overflow:auto;border-left:0!important;border-right:0!important;border-bottom:0!important;box-shadow:0 -14px 32px rgba(0,0,0,.65);padding:10px 14px!important}
 .di-looper-master-zone.di-looper-master-sticky:before{margin-bottom:5px}
}
@media(max-width:520px){
 .di-looper-steps{grid-template-columns:1fr}
 .di-looper-step{min-height:0}
 .di-looper-statusbar{align-items:flex-start;flex-wrap:wrap}
 .di-looper-loop-length{width:100%;margin-left:0}
 .di-looper-tab{font-size:.66rem;letter-spacing:.08em}
}
