.editor { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.etop { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 12px; padding-top: calc(8px + env(safe-area-inset-top)); border-bottom: 2px solid var(--line); }
.etop .brand { font-size: 17px; }
.etop .brand::before { width: 16px; height: 16px; }
.pname { flex: 1; min-width: 0; font: 500 11px/1 var(--mono); color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-inline: 8px; }
.grp { display: flex; gap: 6px; }

.workspace { flex: 1; min-height: 0; position: relative; display: flex; }
.tl { flex: 1; min-width: 0; position: relative; background: var(--hatch-dark); direction: ltr; touch-action: none; }
.tl canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.empty { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; pointer-events: none; font: 500 12px var(--mono); color: var(--soft); }

.panel { position: absolute; inset-inline: 0; bottom: 0; z-index: 10; max-height: 62%; overflow-y: auto; background: var(--ink); border-top: 2px solid var(--paper); padding: 6px 16px 16px; display: none; }
.panel.open { display: block; }
.panel h3 { margin: 14px 0 0; font: 700 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--soft); display: flex; justify-content: space-between; align-items: center; }
.ctl { display: block; }
.ctl .row { display: flex; justify-content: space-between; font: 500 12px/1 var(--mono); margin-top: 6px; }
.ctl output { color: var(--soft); }
.panel .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.transport { flex: none; border-top: 2px solid var(--line); padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; background: var(--ink); }
.readout { display: flex; align-items: center; gap: 14px; direction: ltr; }
.time { font: 800 30px/1 var(--mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.time small { font-size: 13px; font-weight: 500; color: var(--soft); }
.meter { flex: 1; height: 10px; background: var(--well); position: relative; max-width: 220px; margin-inline-start: auto; }
.meter canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.controls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.controls .sep { width: 2px; align-self: stretch; background: var(--line); margin: 6px 4px; }
.controls .spacer { flex: 1; }
.btn.big { width: 56px; height: 56px; }
.btn.big .icon { width: 26px; height: 26px; }
.btn.rec.on { background: var(--rec); border-color: var(--rec); color: #1a0500; }
.btn.rec .icon { color: var(--rec); fill: currentColor; stroke: none; }
.btn.rec.on .icon { color: #1a0500; }
.btn .lbl { display: none; }

dialog { padding: 0; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); width: min(420px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(0,0,0,.6); }
.dlg { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.dlg h2 { margin: 0; font-weight: 900; font-stretch: 62%; font-size: 44px; line-height: .9; text-transform: uppercase; }
.seg { display: flex; flex-wrap: wrap; }
.seg .btn { border-color: var(--ink); margin-inline-end: -2px; }
.seg .btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.dlg .acts { display: flex; gap: 8px; justify-content: flex-end; }
.dlg .btn.solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.bar { height: 6px; background: #c4c4c4; }
.bar i { display: block; height: 100%; width: 0; background: var(--ink); }

@media (min-width: 700px) { .btn .lbl { display: inline; } }
@media (min-width: 900px) {
  .panel { position: static; display: block; flex: none; width: 300px; max-height: none; border-top: 0; border-inline-start: 2px solid var(--line); }
  #fxBtn { display: none; }
}
