/* =========================================================
   KEYLIZER — Key Visualizer by rinaldisign
   Struktur file:  1 token · 2 layar & background · 3 brand · 4 menu (rail ikon putih)
                   5 panel (dock) · 6 transport · 7 fullscreen · 8 mobile
   (kelas .mv-* untuk stage/loading disalin dari landing; .mv-theme* ada di 3dmidi/core/engine.css)
   ========================================================= */

/* ---------- 1. token ---------- */
:root{
  --ink:#07090a; --forest:#0d1512; --forest-2:#131f19;
  --paper:#f3eee1; --paper-dim:#cfc7b3;
  --gold:#b98d4a; --gold-soft:#e2c084; --mist:#7e8c80;
  --line:rgba(243,238,225,.14);
  --glass:rgba(7,9,10,.58);
  --font-display:'Cormorant', Georgia, serif;
  --font-ui:'Manrope','Helvetica Neue',Arial,sans-serif;
  --font-mono:'JetBrains Mono','Courier New',monospace;
  --ease:cubic-bezier(.22,.68,0,1);
  --pad:22px;
  --rail-w:40px;
  --dock-h:34vh;
}
*{ margin:0; padding:0; box-sizing:border-box; }
html,body{ height:100%; overflow:hidden; background:var(--ink); color:var(--paper);
  font-family:var(--font-ui); -webkit-font-smoothing:antialiased; }
button{ font:inherit; color:inherit; }
a{ color:inherit; }
img{ display:block; max-width:100%; }
.sr-only{ position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@keyframes riseIn{ from{ opacity:0; transform:translateY(14px); } to{ opacity:1; transform:translateY(0); } }
@keyframes bgSettle{ to{ transform:scale(1); } }
@keyframes mvSpin{ to{ transform:rotate(360deg); } }

/* ---------- 2. layar, background, stage ---------- */
.app{ position:fixed; inset:0; overflow:hidden; isolation:isolate; background:var(--ink);
  --mv-accent:#39ff14; --mv-accent-rgb:57,255,20; }
/* Background default = bg.jpg. Ganti lewat menu Background, atau ubah url di bawah. */
.bg{ position:absolute; inset:0; z-index:0;
  background:var(--ink) url("../bg.jpg") center/cover no-repeat;
  transform:scale(1.06); animation:bgSettle 8s var(--ease) forwards; }
.scrim{ transition:opacity .4s var(--ease); }
[data-bg="color"] .scrim{ opacity:0; }                 /* warna polos tampil apa adanya */
.scrim{ position:absolute; inset:0; z-index:0; pointer-events:none;
  background:
    linear-gradient(180deg, rgba(7,9,10,.55) 0%, rgba(7,9,10,.35) 38%, rgba(7,9,10,.72) 100%),
    radial-gradient(ellipse at center, rgba(7,9,10,0) 40%, rgba(7,9,10,.6) 100%); }

.mv-stage{ position:absolute; inset:0; z-index:1; touch-action:none; cursor:grab; }
.mv-stage:active{ cursor:grabbing; }
.mv-stage.panning, .mv-stage.panning:active{ cursor:move; }
.mv-stage canvas{ display:block; width:100%; height:100%; }

/* loading indikator sample (dari landing) */
.mv-loading{
  position:absolute; z-index:5; left:50%; top:50%; transform:translate(-50%,-50%);
  display:flex; flex-direction:column; align-items:center; gap:8px;
  padding:10px 18px; background:rgba(7,9,10,.72); border:1px solid var(--line); border-radius:4px;
  font-size:11px; letter-spacing:.12em; color:var(--paper-dim);
  opacity:0; pointer-events:none; transition:opacity .3s var(--ease); }
.mv-loading.show{ opacity:1; }
.mv-loading.err{ color:#ff7a6b; }
.mv-load-bar{ width:180px; height:2px; background:var(--line); overflow:hidden; }
.mv-load-bar i{ display:block; height:100%; width:0; background:var(--mv-accent); box-shadow:0 0 6px var(--mv-accent); transition:width .2s; }
.mv-loading.err .mv-load-bar{ display:none; }

/* ---------- 3. brand (kecil, pojok kiri atas — tidak menutupi 3D) ---------- */
.brand{ position:absolute; z-index:4; top:20px; left:22px; max-width:46vw;
  opacity:0; animation:riseIn .9s var(--ease) .5s forwards; pointer-events:none; }
.brand h1{ font-size:0; line-height:0; }
.brand h1 img{ width:128px; height:auto; opacity:.95; filter:drop-shadow(0 2px 10px rgba(0,0,0,.55)); }
.brand-sub{ margin-top:7px; font-size:8.5px; letter-spacing:.26em; text-transform:uppercase; color:var(--paper-dim); opacity:.75; text-shadow:0 1px 8px rgba(0,0,0,.7); white-space:nowrap; }
.brand-sub i{ font-style:normal; opacity:.5; margin:0 3px; }

/* ---------- 4. menu: kolom ikon lingkaran putih di kanan ---------- */
.rail{ position:absolute; z-index:6; right:18px; top:50%; transform:translateY(-50%);
  display:flex; flex-direction:column; align-items:center; gap:16px;
  opacity:0; animation:railIn .9s var(--ease) .8s forwards; }
@keyframes railIn{ from{ opacity:0; transform:translateY(calc(-50% + 14px)); } to{ opacity:1; transform:translateY(-50%); } }
.rail-group{ display:flex; flex-direction:column; align-items:center; gap:9px; }
/* KELOMPOK INPUT: kapsul kaca + label, supaya jelas beda dari menu tampilan di bawahnya */
.rail-group.is-input{ position:relative; padding:22px 6px 8px; border-radius:999px; gap:8px;
  background:rgba(7,9,10,.5); border:1px solid rgba(243,238,225,.22);
  -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); box-shadow:0 4px 22px rgba(0,0,0,.35); }
.rail-label{ position:absolute; top:7px; left:0; right:0; text-align:center; font-size:7.5px; letter-spacing:.24em; text-indent:.24em; text-transform:uppercase; color:var(--paper-dim); pointer-events:none; }
#mvThemeSlot{ display:block; }

.rb, #mvThemeSlot .mv-theme-btn, #mvKbSlot .mv-theme-btn { all:unset; box-sizing:border-box; cursor:pointer; position:relative;
  display:flex; align-items:center; justify-content:center; width:var(--rail-w); height:var(--rail-w); padding:0; border-radius:50%;
  background:#fff; color:#0b0f0d; box-shadow:0 2px 14px rgba(0,0,0,.45);
  transition:transform .25s var(--ease), box-shadow .25s, background .25s, opacity .25s; }
.rb svg, #mvThemeSlot .mv-theme-btn svg, #mvKbSlot .mv-theme-btn svg { width:18px; height:18px; flex:0 0 auto; fill:none; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; }
#mvThemeSlot .mv-theme-btn span, #mvKbSlot .mv-theme-btn span { display:none; }
.rb:hover, .rb:focus-visible, #mvThemeSlot .mv-theme-btn:hover, #mvKbSlot .mv-theme-btn:hover { transform:scale(1.09); box-shadow:0 2px 18px rgba(0,0,0,.5), 0 0 16px rgba(var(--mv-accent-rgb),.35); outline:none; }
.rb:focus-visible, #mvThemeSlot .mv-theme-btn:focus-visible, #mvKbSlot .mv-theme-btn:focus-visible { outline:2px solid var(--mv-accent); outline-offset:3px; }
/* aktif (panel terbuka / toggle ON / theme menu terbuka): tetap putih, diberi cincin aksen */
.rb[aria-pressed="true"], #mvThemeSlot .mv-theme.open .mv-theme-btn, #mvKbSlot .mv-theme.open .mv-theme-btn { box-shadow:0 0 0 2px var(--mv-accent), 0 0 18px rgba(var(--mv-accent-rgb),.5); }
#mvThemeSlot .mv-theme, #mvKbSlot .mv-theme { position:relative; top:auto; right:auto; opacity:1; animation:none; font-size:0; letter-spacing:0; }
#mvThemeSlot .mv-theme-btn, #mvKbSlot .mv-theme-btn { background:#fff; color:#0b0f0d; border:0; backdrop-filter:none; -webkit-backdrop-filter:none; }
#mvThemeSlot .mv-theme-menu, #mvKbSlot .mv-theme-menu { right:calc(100% + 14px); top:-6px; font-size:9.5px; letter-spacing:.28em; text-transform:uppercase; }
#rbRotate[aria-pressed="true"] svg{ animation:mvSpin 6s linear infinite; }
#rbFs .ic-exit{ display:none; }
.is-fs #rbFs .ic-enter{ display:none; }
.is-fs #rbFs .ic-exit{ display:block; }
.rb .dot{ fill:currentColor; stroke:none; }
/* perekam: lampu merah berkedip */
.rb.is-rec{ box-shadow:0 0 0 2px #ff4d3d, 0 0 18px rgba(255,77,61,.6); }
.rb.is-rec::after{ background:#ff3b2a !important; box-shadow:0 0 0 2px #fff, 0 0 8px #ff3b2a !important; animation:recBlink 1s ease-in-out infinite; }
@keyframes recBlink{ 50%{ opacity:.25; } }
/* live aktif: titik hijau kecil (merah saat merekam) */
.rb.is-live::after{ content:""; position:absolute; top:1px; right:1px; width:9px; height:9px; border-radius:50%;
  background:var(--mv-accent); box-shadow:0 0 0 2px #fff, 0 0 8px var(--mv-accent); }
/* tooltip di sisi kiri (desktop) */
@media (hover:hover){
  .rb[data-tip]::before, #mvThemeSlot .mv-theme-btn[data-tip]::before, #mvKbSlot .mv-theme-btn[data-tip]::before { content:attr(data-tip); position:absolute; right:calc(100% + 12px); top:50%;
    transform:translate(4px,-50%); padding:6px 10px; border-radius:6px; white-space:nowrap; pointer-events:none;
    font-size:9.5px; letter-spacing:.2em; text-transform:uppercase; font-family:var(--font-ui);
    color:var(--paper); background:rgba(7,9,10,.88); border:1px solid var(--line);
    opacity:0; transition:opacity .2s var(--ease), transform .2s var(--ease); }
  .rb[data-tip]:hover::before, .rb[data-tip]:focus-visible::before, #mvThemeSlot .mv-theme:not(.open) .mv-theme-btn[data-tip]:hover::before, #mvKbSlot .mv-theme:not(.open) .mv-theme-btn[data-tip]:hover::before { opacity:1; transform:translate(0,-50%); }
}

/* ---------- 5. panel (dock) di kiri menu ---------- */
.dock{ position:absolute; z-index:5; right:calc(18px + var(--rail-w) + 16px); top:50%; transform:translateY(-50%);
  width:320px; max-height:min(62vh, calc(100vh - 230px)); display:flex; flex-direction:column;
  background:var(--glass); border:1px solid var(--line); border-radius:12px;
  -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px);
  font-size:11.5px; letter-spacing:.03em;
  animation:dockIn .35s var(--ease); }
.dock[hidden]{ display:none; }
@keyframes dockIn{ from{ opacity:0; transform:translate(10px,-50%); } to{ opacity:1; transform:translate(0,-50%); } }
.dock-head{ display:flex; align-items:center; gap:6px; padding:0 6px 0 16px; min-height:46px; flex:0 0 auto; border-bottom:1px solid var(--line); }
.dock.collapsed .dock-head{ border-bottom-color:transparent; }
.dock-title{ all:unset; box-sizing:border-box; cursor:pointer; flex:0 1 auto; min-width:0; padding:6px 0;
  font-size:9.5px; letter-spacing:.28em; text-transform:uppercase; color:var(--gold-soft); white-space:nowrap; transition:color .25s; }
.dock-title:hover, .dock-title:focus-visible{ color:var(--paper); outline:none; }
.dock-head .meta{ flex:1 1 auto; min-width:0; color:var(--mist); letter-spacing:.08em; font-size:10.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dock-head .meta:empty{ display:none; }
.dock[data-pane]:not([data-pane="library"]) #libMeta, .dock[data-pane]:not([data-pane="live"]) #liveMeta{ display:none; }
.dock-head::after{ content:""; order:2; flex:1 1 0; }          /* dorong tombol ke kanan */
.dock-btn{ all:unset; order:3; box-sizing:border-box; cursor:pointer; flex:0 0 30px; height:30px; display:flex; align-items:center; justify-content:center;
  color:var(--mist); border-radius:50%; transition:color .25s, background .25s; }
.dock-btn:hover, .dock-btn:focus-visible{ color:var(--paper); background:rgba(243,238,225,.08); outline:none; }
.dock-btn svg{ width:12px; height:12px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; transition:transform .3s var(--ease); }
.dock.collapsed #dockFold svg{ transform:rotate(180deg); }
.dock.collapsed .pane{ display:none !important; }

.pane{ display:none; flex-direction:column; min-height:0; padding:12px 16px 16px; overflow-y:auto; overscroll-behavior:contain;
  scrollbar-width:thin; scrollbar-color:var(--line) transparent; }
.pane.is-on{ display:flex; }
.hint{ margin-top:12px; font-size:10.5px; line-height:1.65; color:var(--mist); letter-spacing:.02em; }
.hint b{ color:var(--paper-dim); font-weight:500; }
.hint a{ color:var(--gold-soft); text-decoration:none; border-bottom:1px solid rgba(226,192,132,.3); }
.hint a:hover{ color:var(--paper); }
.btn{ all:unset; box-sizing:border-box; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:8px;
  padding:11px 14px; margin-top:14px; text-align:center;
  font-size:9.5px; letter-spacing:.26em; text-transform:uppercase; color:var(--gold-soft);
  border:1px solid var(--line); border-radius:6px; background:rgba(243,238,225,.03);
  transition:color .25s, border-color .25s, background .25s; }
.btn:hover, .btn:focus-visible{ color:var(--mv-accent); border-color:rgba(var(--mv-accent-rgb),.55); background:rgba(var(--mv-accent-rgb),.06); outline:none; }
.btn[disabled]{ opacity:.45; cursor:default; }
.btn.ghost{ color:var(--mist); }

/* library */
#pane-library{ overflow:hidden; padding-top:6px; }
.lib-list{ display:flex; flex-direction:column; flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain;
  scrollbar-width:thin; scrollbar-color:var(--line) transparent; }
.row{ all:unset; box-sizing:border-box; display:flex; align-items:center; gap:10px; padding:8px 0; min-height:34px;
  color:var(--paper-dim); cursor:pointer; border-bottom:1px solid rgba(243,238,225,.05); transition:color .3s var(--ease); }
.row:hover, .row:focus-visible{ color:var(--paper); }
.row .cat{ flex:0 0 40px; font-family:var(--font-mono); font-size:10px; color:var(--mist); }
.row .ttl{ flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.row.is-off{ opacity:.35; cursor:default; }
.row.is-off:hover{ color:var(--paper-dim); }
.row .lnk{ flex:0 0 auto; font-family:var(--font-display); font-style:italic; font-size:12px; line-height:1; width:16px; height:16px;
  display:none; align-items:center; justify-content:center; border:1px solid currentColor; border-radius:50%; text-decoration:none; opacity:.8; }
.row.is-active .lnk{ display:flex; }
.row.is-active, .row.is-active .cat{ color:var(--mv-accent); }
.row.is-active .ttl{ text-shadow:0 0 8px rgba(var(--mv-accent-rgb),.6); }
.lib-msg{ padding:14px 0; color:var(--mist); line-height:1.7; }
.lib-msg b{ color:var(--paper-dim); font-weight:500; }

/* upload */
.drop{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; text-align:center;
  margin-top:6px; padding:26px 16px; cursor:pointer; color:var(--paper-dim); line-height:1.6;
  border:1px dashed rgba(243,238,225,.28); border-radius:8px; transition:border-color .25s, background .25s, color .25s; }
.drop svg{ width:26px; height:26px; fill:none; stroke:currentColor; stroke-width:1.2; stroke-linecap:round; stroke-linejoin:round; opacity:.8; }
.drop:hover, .drop:focus-within, .drop.is-over{ border-color:var(--mv-accent); color:var(--paper); background:rgba(var(--mv-accent-rgb),.05); }
.drop small{ color:var(--mist); font-size:10.5px; letter-spacing:.02em; }
.drop input{ position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.up-name{ margin-top:12px; font-family:var(--font-mono); font-size:10.5px; color:var(--mv-accent); word-break:break-all; min-height:1em; }

/* live */
.status{ display:flex; align-items:flex-start; gap:9px; margin-top:12px; line-height:1.6; color:var(--paper-dim); }
.status::before{ content:""; flex:0 0 7px; height:7px; border-radius:50%; margin-top:6px; background:var(--mist); }
.status.ok::before{ background:var(--mv-accent); box-shadow:0 0 8px var(--mv-accent); }
.status.err{ color:#ff9a8d; }
.status.err::before{ background:#ff7a6b; }
#pane-live > .btn{ margin-top:2px; }
.devices{ list-style:none; margin-top:8px; font-family:var(--font-mono); font-size:10.5px; color:var(--paper-dim); }
.devices li{ padding:5px 0 5px 16px; border-bottom:1px solid rgba(243,238,225,.05); }
.opt{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:12px; padding-top:12px; border-top:1px solid var(--line);
  color:var(--paper-dim); cursor:pointer; }
.opt + .opt{ margin-top:0; border-top:0; padding-top:10px; }
.opt input{ appearance:none; -webkit-appearance:none; flex:0 0 auto; width:30px; height:17px; border-radius:99px; cursor:pointer;
  background:rgba(243,238,225,.14); position:relative; transition:background .25s; }
.opt input::after{ content:""; position:absolute; top:2px; left:2px; width:13px; height:13px; border-radius:50%; background:var(--paper); transition:transform .25s var(--ease); }
.opt input:checked{ background:rgba(var(--mv-accent-rgb),.55); }
.opt input:checked::after{ transform:translateX(13px); }
.opt input:focus-visible{ outline:1px solid var(--mv-accent); outline-offset:2px; }
.kbd{ display:flex; flex-wrap:wrap; gap:3px; margin-top:6px; }
.kbd kbd{ font-family:var(--font-mono); font-size:10px; padding:2px 6px; border:1px solid var(--line); border-radius:4px; color:var(--paper-dim); }

/* background */
.seg{ display:grid; grid-template-columns:repeat(6,1fr); gap:8px; margin-top:4px; }      /* 3 + 2 tombol, 2 baris */
.seg-b{ grid-column:span 2; } .seg-b.w{ grid-column:span 3; }
.seg-b{ all:unset; box-sizing:border-box; cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:8px; padding:10px 6px 9px;
  border:1px solid var(--line); border-radius:8px; background:rgba(243,238,225,.03); color:var(--paper-dim);
  font-size:9.5px; letter-spacing:.22em; text-transform:uppercase; transition:color .25s, border-color .25s, background .25s; }
.seg-b:hover, .seg-b:focus-visible{ color:var(--paper); outline:none; }
.seg-b[aria-checked="true"]{ color:var(--mv-accent); border-color:rgba(var(--mv-accent-rgb),.6); background:rgba(var(--mv-accent-rgb),.06); }
.sw{ display:flex; align-items:center; justify-content:center; width:100%; height:38px; border-radius:5px; border:1px solid rgba(243,238,225,.18); overflow:hidden; }
.sw-default{ background:#07090a url("../bg.jpg") center/cover no-repeat; }
.sw-color{ background:#0d1512; }
.sw-upload{ background:rgba(243,238,225,.05); }
.sw-upload svg{ width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.4; stroke-linecap:round; stroke-linejoin:round; }
.bg-sub{ margin-top:14px; }
/* background video / kamera */
.bg-video{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:none; background:#000; }
[data-bg="video"] .bg-video, [data-bg="camera"] .bg-video{ display:block; }
.bg-video.mirror{ transform:scaleX(-1); }
.cam-row{ display:flex; gap:8px; align-items:stretch; margin-top:10px; }
.cam-row .btn{ flex:1 1 auto; margin-top:0; }
.cam-sel{ flex:1 1 0; min-width:0; max-width:50%; padding:0 8px; border:1px solid var(--line); border-radius:8px; background:rgba(243,238,225,.05); color:var(--paper-dim);
  font:inherit; font-size:10.5px; letter-spacing:.04em; cursor:pointer; }
.cam-sel[hidden]{ display:none; }
.cam-sel:focus-visible{ outline:1px solid var(--mv-accent); }
.cam-sel option{ background:#0b0f0d; color:#f3eee1; }
#camStatus.live::before{ background:var(--mv-accent); box-shadow:0 0 8px var(--mv-accent); }
.bg-sub[hidden]{ display:none; }
.swatches{ display:grid; grid-template-columns:repeat(5,1fr); gap:8px; }
.swatch{ all:unset; box-sizing:border-box; cursor:pointer; height:30px; border-radius:50%; aspect-ratio:1; justify-self:center; width:30px;
  border:1px solid rgba(243,238,225,.3); transition:transform .2s var(--ease), box-shadow .2s; }
.swatch:hover, .swatch:focus-visible{ transform:scale(1.1); outline:none; }
.swatch[aria-pressed="true"]{ box-shadow:0 0 0 2px var(--ink), 0 0 0 3.5px var(--mv-accent); }
.picker{ display:flex; align-items:center; gap:10px; margin-top:14px; padding-top:12px; border-top:1px solid var(--line); color:var(--paper-dim); cursor:pointer; }
.picker span{ flex:1; }
.picker input{ appearance:none; -webkit-appearance:none; width:34px; height:24px; padding:0; border:1px solid rgba(243,238,225,.3); border-radius:5px; background:none; cursor:pointer; }
.picker input::-webkit-color-swatch-wrapper{ padding:0; } .picker input::-webkit-color-swatch{ border:0; border-radius:4px; } .picker input::-moz-color-swatch{ border:0; border-radius:4px; }
.picker code{ font-family:var(--font-mono); font-size:10.5px; color:var(--mist); min-width:56px; }
#bgChoose{ margin-top:0; }

/* record (di dalam panel Live) */
.rec-box{ margin-top:14px; padding:12px 12px 4px; border:1px solid var(--line); border-radius:10px; background:rgba(243,238,225,.03); }
.rec-top{ display:flex; align-items:center; gap:9px; }
.rec-title{ font-size:9.5px; letter-spacing:.28em; text-transform:uppercase; color:var(--gold-soft); margin-right:auto; }
.rec-top b{ font-family:var(--font-mono); font-weight:300; font-size:20px; letter-spacing:.03em; color:var(--paper); }
.rec-count{ font-family:var(--font-mono); font-size:10px; color:var(--mist); min-width:0; }
.rec-count:empty{ display:none; }
.rec-led{ flex:0 0 8px; height:8px; border-radius:50%; background:var(--mist); transition:background .25s, box-shadow .25s; }
.rec-led.on{ background:#ff3b2a; box-shadow:0 0 10px #ff3b2a; animation:recBlink 1s ease-in-out infinite; }
.rec-row{ display:grid; grid-template-columns:repeat(4,1fr); gap:6px; margin-top:10px; }
.rc{ all:unset; box-sizing:border-box; cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:5px; padding:9px 2px 7px;
  border:1px solid var(--line); border-radius:8px; background:rgba(243,238,225,.03); color:var(--paper-dim);
  font-size:8.5px; letter-spacing:.2em; text-transform:uppercase; transition:color .25s, border-color .25s, background .25s, opacity .25s; }
.rc svg{ width:16px; height:16px; fill:currentColor; stroke:currentColor; stroke-width:1.4; stroke-linecap:round; stroke-linejoin:round; }
.rc svg path[stroke-linecap], .rc:nth-child(4) svg{ fill:none; }
.rc .rec-dot{ fill:#ff3b2a; stroke:none; }
.rc:hover:not([disabled]), .rc:focus-visible{ color:var(--mv-accent); border-color:rgba(var(--mv-accent-rgb),.55); background:rgba(var(--mv-accent-rgb),.06); outline:none; }
.rc[disabled]{ opacity:.35; cursor:default; }
.rc.is-on{ color:#ff9a8d; border-color:rgba(255,77,61,.6); background:rgba(255,77,61,.08); opacity:1; }
#recReplay.is-on{ color:var(--mv-accent); border-color:rgba(var(--mv-accent-rgb),.6); background:rgba(var(--mv-accent-rgb),.08); }
.take{ display:flex; align-items:center; gap:8px; margin-top:10px; padding:8px 8px 8px 10px; border-radius:6px; background:rgba(243,238,225,.04); }
.take[hidden]{ display:none; }
.take-info{ flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.take-info b{ font-family:var(--font-mono); font-weight:400; font-size:10.5px; color:var(--mv-accent); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.take-info span{ font-size:10px; color:var(--mist); }
.take-x{ all:unset; cursor:pointer; flex:0 0 24px; height:24px; display:flex; align-items:center; justify-content:center; border-radius:50%; color:var(--mist); transition:color .25s, background .25s; }
.take-x:hover, .take-x:focus-visible{ color:#ff9a8d; background:rgba(255,77,61,.1); outline:none; }
.take-x svg{ width:11px; height:11px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; }
#recStatus{ margin:10px 0 8px; font-size:10.5px; color:var(--mist); }
.dock[data-pane="live"]{ max-height:min(80vh, calc(100vh - 110px)); }

/* ---------- 6. transport ---------- */
.transport{ position:absolute; z-index:4; left:50%; bottom:28px; transform:translateX(-50%);
  width:min(600px, calc(100vw - 2*var(--pad))); padding:10px 16px 12px;
  background:var(--glass); border:1px solid var(--line); border-radius:10px;
  -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px);
  opacity:0; animation:trIn .9s var(--ease) 1.2s forwards; transition:visibility .3s; }
@keyframes trIn{ from{ opacity:0; transform:translate(-50%,14px); } to{ opacity:1; transform:translate(-50%,0); } }
.tr-file, .tr-live{ display:none; }
[data-mode="file"] .tr-file{ display:block; }
[data-mode="live"] .tr-live{ display:flex; }
.tr-rec{ font-style:normal; font-family:var(--font-mono); font-size:10.5px; letter-spacing:.08em; color:#ff6b5b; white-space:nowrap; animation:recBlink 1.2s ease-in-out infinite; }
.tr-rec[hidden]{ display:none; }
[data-mode="file"] .transport.empty{ visibility:hidden; }

.tr-top{ display:flex; align-items:center; gap:12px; }
.tr-title{ flex:1; min-width:0; line-height:1.25; }
.tr-title b{ display:block; font-family:var(--font-display); font-weight:500; font-size:19px; letter-spacing:.03em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tr-title span{ display:block; font-size:9.5px; letter-spacing:.24em; text-transform:uppercase; color:var(--mist); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ib{ all:unset; box-sizing:border-box; cursor:pointer; flex:0 0 auto; width:34px; height:34px; display:flex; align-items:center; justify-content:center;
  color:var(--paper-dim); border-radius:50%; transition:color .25s, background .25s, border-color .25s; }
.ib:hover, .ib:focus-visible{ color:var(--mv-accent); background:rgba(var(--mv-accent-rgb),.08); outline:none; }
.ib.on{ color:var(--mv-accent); }
.ib[disabled]{ opacity:.4; cursor:default; }
.ib svg{ width:14px; height:14px; fill:currentColor; }
.ib.rep svg{ fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.ib.pp{ width:40px; height:40px; border:1px solid var(--line); color:var(--paper); }
.ib.pp:hover{ border-color:rgba(var(--mv-accent-rgb),.55); }
.ib.pp svg{ width:15px; height:15px; }
.ib .spin{ fill:none; stroke:currentColor; stroke-width:1.6; stroke-dasharray:14 14; animation:mvSpin .8s linear infinite; transform-origin:center; }
.tr-bar{ display:flex; align-items:center; gap:12px; margin-top:6px; font-family:var(--font-mono); font-size:10px; color:var(--mist); }
.prog{ position:relative; flex:1; height:18px; cursor:pointer; }
.prog::before{ content:""; position:absolute; left:0; right:0; top:50%; height:2px; margin-top:-1px; background:var(--line); border-radius:2px; }
.prog i{ position:absolute; left:0; top:50%; height:2px; margin-top:-1px; width:0; background:var(--mv-accent); box-shadow:0 0 6px var(--mv-accent); border-radius:2px; }
.tr-live{ align-items:center; gap:12px; font-size:11px; letter-spacing:.16em; color:var(--paper-dim); }
.tr-live b{ font-weight:500; color:var(--mv-accent); letter-spacing:.3em; font-size:10px; text-transform:uppercase; text-shadow:0 0 10px rgba(var(--mv-accent-rgb),.6); }
.tr-live span{ min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* overlay drag & drop + toast */
.drop-overlay{ position:absolute; inset:0; z-index:20; display:none; align-items:center; justify-content:center;
  background:rgba(7,9,10,.72); border:2px dashed var(--mv-accent); margin:16px; border-radius:14px;
  font-family:var(--font-display); font-size:clamp(22px,3vw,34px); letter-spacing:.06em; color:var(--mv-accent); pointer-events:none; }
.app.dragging .drop-overlay{ display:flex; }
.toast{ position:absolute; z-index:30; left:50%; top:96px; transform:translate(-50%,-8px); padding:10px 18px; max-width:90vw;
  background:rgba(7,9,10,.88); border:1px solid var(--line); border-radius:6px; font-size:11.5px; letter-spacing:.06em; color:var(--paper);
  opacity:0; pointer-events:none; transition:opacity .3s var(--ease), transform .3s var(--ease); }
.toast.show{ opacity:1; transform:translate(-50%,0); }
.fatal{ position:absolute; inset:0; z-index:40; display:none; align-items:center; justify-content:center; text-align:center; padding:30px;
  font-family:var(--font-display); font-size:22px; line-height:1.6; color:var(--paper-dim); background:rgba(7,9,10,.8); }
.fatal.show{ display:flex; }

/* ---------- 7. fullscreen: UI memudar saat tidak ada gerakan ---------- */
.app.is-fs .brand, .app.is-fs .rail, .app.is-fs .dock, .app.is-fs .transport{ transition:opacity .6s var(--ease); }
.app.is-fs.ui-idle{ cursor:none; }
.app.is-fs.ui-idle .brand, .app.is-fs.ui-idle .rail, .app.is-fs.ui-idle .dock, .app.is-fs.ui-idle .transport{ opacity:0 !important; pointer-events:none; }

/* ---------- 8. mobile ---------- */
@media (max-width:860px){
  :root{ --pad:16px; --rail-w:36px; }
  .brand{ top:14px; left:16px; }
  .brand h1 img{ width:104px; }
  .brand-sub{ font-size:7.5px; letter-spacing:.22em; margin-top:5px; }
  .rail{ top:12px; right:12px; transform:none; gap:11px; animation:railInM .9s var(--ease) .8s forwards; }
  @keyframes railInM{ from{ opacity:0; transform:translateY(14px); } to{ opacity:1; transform:none; } }
  .rail-group{ gap:7px; }
  .rail-group.is-input{ padding:20px 4px 6px; gap:6px; }
  .rail-label{ top:6px; font-size:7px; }
  .rb svg, #mvThemeSlot .mv-theme-btn svg, #mvKbSlot .mv-theme-btn svg { width:16px; height:16px; }
  #mvThemeSlot .mv-theme-menu, #mvKbSlot .mv-theme-menu { right:calc(100% + 10px); }
  .dock[data-pane="live"]{ max-height:none; }
  .dock{ top:auto; right:12px; left:12px; bottom:12px; width:auto; height:var(--dock-h); max-height:none; transform:none; animation:dockInM .35s var(--ease); }
  @keyframes dockInM{ from{ opacity:0; transform:translateY(14px); } to{ opacity:1; transform:none; } }
  .dock.collapsed{ height:auto; }
  .transport{ bottom:calc(var(--dock-h) + 24px); width:calc(100vw - 2*var(--pad)); padding:8px 12px 10px; }
  .dock.collapsed ~ .transport{ bottom:68px; }
  .dock[hidden] ~ .transport{ bottom:16px; }
  .tr-title b{ font-size:17px; }
  .toast{ top:70px; }
}
@media (max-width:860px) and (max-height:620px){ :root{ --dock-h:42vh; --rail-w:32px; } .rail{ gap:6px; } .rail-group{ gap:4px; } .rail-group.is-input{ padding-top:16px; } .rail-label{ display:none; } .brand-sub{ display:none; } }
@media (prefers-reduced-motion:reduce){
  *, *::before, *::after{ animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; }
}

/* tombol Keyboard (muncul hanya untuk tema yang mendukung, mis. Flying Note) */
#mvKbSlot{ display:block; }
#mvKbSlot[hidden]{ display:none; }
