#duetStudio {
  --paper:#fff5e8; --coral:#ff6d61; --ink:#17131b;
  width:min(100vw,560px); max-width:100vw; max-height:100dvh; padding:0;
  border:0; border-radius:14px; overflow:auto; background:var(--ink); color:var(--paper);
  font-family:Rubik,sans-serif; overscroll-behavior:contain;
}
#duetStudio::backdrop { background:#0b090fe8; }
.duet-stage { display:flex; flex-direction:column; }
.duet-header,.duet-track { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.duet-header { padding:12px 18px; }
.duet-header h2,.duet-track h3,#duetClaim span { margin:0; font:700 52px/1.03 Rubik,sans-serif; text-transform:none; letter-spacing:-.025em; }
.duet-header h2 { color:var(--coral); }
#duetClock { margin-left:auto; font-variant-numeric:tabular-nums; font-size:15px; }
.duet-close { color:var(--paper); width:44px; height:44px; padding:10px; background:none; border:0; }
.duet-close svg,#duetClaim svg { fill:none; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:2; width:100%; height:100%; }
.duet-split { width:100%; aspect-ratio:8/9; position:relative; isolation:isolate; display:grid; grid-template-columns:1fr 1fr; background:#15121a; overflow:hidden; }
.duet-split::after { content:""; z-index:4; position:absolute; inset:0 auto 0 50%; width:2px; transform:translateX(-50%); background:var(--coral); pointer-events:none; }
.duet-half { position:relative; min-width:0; overflow:hidden; }
.duet-half video,.duet-grooves { position:absolute; inset:0; height:100%; width:100%; object-fit:cover; }
#duetCam { transform:scaleX(-1); }
.duet-grooves {
  background:
    radial-gradient(ellipse at 90% 6%,#cf4e445e,transparent 61%),
    repeating-radial-gradient(ellipse 102% 48% at 125% 72%,transparent 0 6px,#ffc1a72b 7px 8px,transparent 9px 12px),
    linear-gradient(151deg,#32132d 3%,#542149 47%,#1f153c 77%,#120c1e);
}
.duet-credit { pointer-events:none; position:absolute; inset:auto 0 0; padding:48px 13px 14px; background:linear-gradient(transparent,#140e17cb); text-align:left; }
.duet-credit strong { font:700 clamp(24px,6.5vw,39px)/1.03 Rubik,sans-serif; overflow-wrap:anywhere; }
.duet-credit small { display:block; font-size:11px; margin-bottom:4px; color:var(--paper); }
#duetClaim { position:absolute; inset:0; width:100%; display:flex; flex-direction:column; justify-content:center; align-items:flex-start; gap:14px; padding:18px; border:0; border-radius:0; background:none; color:#fff0db; text-align:start; }
#duetClaim span { font-size:clamp(38px,10vw,62px); }
#duetClaim svg { width:33px; height:33px; color:var(--coral); }
.duet-controls { padding:16px 18px max(17px,env(safe-area-inset-bottom)); }
.duet-track h3 { font-size:clamp(27px,6.8vw,39px); }
#duetListen { flex-shrink:0; min-height:44px; padding:5px 9px; background:transparent; border:0; text-decoration:underline; text-underline-offset:4px; color:var(--paper); font:600 14px/1.2 Rubik,sans-serif; }
#duetStatus { margin:8px 0 0; font-size:14px; color:#d9ccd9; min-height:1.3em; }
#duetRecord { margin:14px auto 0; min-height:56px; min-width:150px; display:flex; align-items:center; justify-content:center; gap:12px; border:0; color:#161119; background:var(--coral); border-radius:100px; font:700 17px/1 Rubik,sans-serif; }
#duetRecord i { display:block; width:19px; height:19px; border-radius:50%; background:#251c24; }
#duetStudio[data-mode="recording"] #duetRecord i { border-radius:4px; }
#duetStudio[data-mode="recording"] #duetClock { color:var(--coral); }
#duetStudio [hidden],#reelDuet[hidden],#duetInvite[hidden] { display:none!important; }
#duetStudio button:disabled { opacity:.55; }
#duetStudio button:focus-visible { outline:3px solid #99ffed; outline-offset:-4px; }
#duetInvite { display:flex; align-items:center; justify-content:center; gap:10px; margin:7px 0; width:100%; min-height:48px; padding:8px; border:1px solid #ff817b99; border-radius:9px; background:#291d2a; color:#ffe8da; font-weight:700; }
#duetInvite span,#duetInvite svg { width:22px; height:22px; }
@media(max-width:600px) {
  #duetStudio { margin:0; width:100%; height:100dvh; max-height:100dvh; border-radius:0; }
  .duet-stage { min-height:100%; justify-content:center; }
  .duet-header { padding-top:max(10px,env(safe-area-inset-top)); }
}
@media(max-height:600px) and (min-aspect-ratio:1/1) {
  #duetStudio { width:min(95vw,860px); }
  .duet-stage { display:grid; grid-template-columns:minmax(220px,1fr) 1fr; }
  .duet-header,.duet-controls { grid-column:2; }
  .duet-split { grid-row:1/3; grid-column:1; height:min(95dvh,460px); }
}
