#studio-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  height: calc(100dvh - 6.5rem);
  max-height: calc(100dvh - 6.5rem);
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}
#studio-editor h2 { margin: 0; font-size: 1.05rem; line-height: 1.2; letter-spacing: -0.02em; }
.editor-kop {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.editor-kop .back, #editor-download, #editor-info-knop {
  width: auto;
  min-height: 44px;
  padding: 8px 12px;
  white-space: nowrap;
}
#editor-download { font-size: 15px; }
.editor-letop { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.3; }
#editor-nu:not([hidden]), #editor-fout:not([hidden]) { margin: 0; }
#editor-kader {
  position: relative;
  flex: 0 0 auto;
  align-self: center;
  width: 180px;
  height: 320px;
  max-width: 100%;
  max-height: 52dvh;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #211a2e;
}
#editor-kader.liggend {
  width: 320px;
  height: 180px;
}
#editor-kader.liggend canvas, #editor-kader.liggend video {
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
}
#editor-vorm, #editor-pas {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}
#editor-vorm button, #editor-pas button, #editor-annuleer {
  min-height: 44px;
}
#editor-gereed-ondertitel[hidden], #editor-gereed-tekst[hidden], #editor-gereed-geluid[hidden] { display: none; }
#editor-kader canvas, #editor-kader video {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 9 / 16;
  object-fit: contain;
}
#editor-kader.liggend canvas, #editor-kader.liggend video {
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
}
#editor-leeg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 16px;
  color: #f7f5f0;
  text-align: center;
  font-size: 15px;
}
.editor-transport {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
#editor-bekijk { width: auto; min-height: 44px; padding: 8px 14px; }
#editor-klok { margin: 0; font-variant-numeric: tabular-nums; font-size: 14px; color: var(--aubergine); }
.editor-strip {
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}
#editor-lijst {
  display: flex;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  touch-action: pan-x;
}
.editor-thumb {
  flex: 0 0 auto;
  width: 72px;
  min-height: 44px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #fff;
  color: var(--aubergine);
  font: inherit;
  cursor: pointer;
}
.editor-thumb[aria-pressed="true"] { border-color: var(--violet); background: var(--lilac); }
.editor-thumb-vast { outline: 2px solid var(--violet); }
.editor-thumb img, .editor-thumb .editor-plaat {
  display: block;
  width: 100%;
  height: 72px;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
  background: #211a2e;
}
.editor-thumb span { display: block; padding: 2px 4px 0; font-size: 11px; line-height: 1.2; font-weight: 700; }
.editor-thumb .editor-duur { font-weight: 500; color: var(--muted); padding-bottom: 4px; }
#editor-plus {
  flex: 0 0 52px;
  width: 52px;
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--violet);
  color: #fff;
  font: inherit;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
#editor-kies:not([hidden]) { display: flex; gap: 8px; min-width: 0; }
#editor-kies button, #editor-kies label {
  flex: 1;
  min-width: 0;
  min-height: 44px;
}
.editor-tools, .editor-volgorde {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}
.editor-volgorde { grid-template-columns: 1fr 1fr auto; }
.editor-tools button, .editor-volgorde button, #editor-info-knop, #editor-weg, #editor-trim-speel, .editor-trim-acties button, #editor-ongedaan {
  min-height: 44px;
  padding: 6px 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--aubergine);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
  cursor: pointer;
}
.editor-tools button[aria-pressed="true"] { background: var(--lilac); border-color: var(--violet); color: var(--violet); }
#editor-paneel { flex: 0 0 auto; overflow: auto; max-height: 34%; min-height: 0; min-width: 0; }
#editor-paneel label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
#editor-paneel input, #editor-paneel textarea { width: 100%; max-width: 100%; font-size: 16px; }
.editor-transport { flex-wrap: wrap; }
#editor-bekijk, #editor-ongedaan, #editor-trim-speel, .editor-trim-acties button, #editor-weg, #editor-info-knop {
  width: auto;
  min-height: 44px;
  padding: 8px 12px;
}
#editor-speelt { margin: 0; font-size: 13px; color: var(--muted); }
#editor-ongedaan[hidden] { display: none !important; }
.editor-trim {
  position: relative;
  height: 72px;
  margin: 8px 0 4px;
  touch-action: none;
  border-radius: 12px;
  overflow: hidden;
  background: #211a2e;
}
.editor-film { position: absolute; inset: 0; display: flex; }
.editor-film img { flex: 1 1 0; width: 0; height: 100%; object-fit: cover; }
.editor-shade { position: absolute; top: 0; bottom: 0; background: rgba(33, 26, 46, 0.72); pointer-events: none; }
.editor-keep {
  position: absolute;
  top: 0;
  bottom: 0;
  border-top: 3px solid var(--violet);
  border-bottom: 3px solid var(--violet);
  box-shadow: inset 0 0 0 2px var(--violet);
  background: transparent;
  pointer-events: none;
}
.editor-handvat {
  position: absolute;
  top: 6px;
  width: 28px;
  height: 60px;
  border: 0;
  border-radius: 8px;
  background: var(--aubergine);
  color: transparent;
  touch-action: none;
  cursor: ew-resize;
}
.editor-trim-acties { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
#editor-trim-herstel { grid-column: 1 / -1; }
#editor-trim-klaar { background: var(--violet); color: #fff; border-color: var(--violet); }
#editor-gereed-meer { display: flex; flex-direction: column; gap: 8px; }
#editor-gereed-meer[hidden] { display: none !important; }
#editor-opname:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  overflow: auto;
}
#studio-editor.neemt-op #editor-paneel,
#studio-editor.neemt-op .editor-tools,
#studio-editor.neemt-op .editor-volgorde,
#studio-editor.neemt-op #editor-kies { display: none !important; }
#editor-live, #editor-proef {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 24dvh;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  align-self: center;
  background: #211a2e;
  border-radius: 12px;
}
#studio-editor progress { width: 100%; height: 8px; }
#editor-bestandsnaam { margin: 0; overflow-wrap: anywhere; word-break: break-word; font-size: 13px; color: var(--muted); }
#studio-editor details { font-size: 14px; }
#studio-editor, #editor-scroll, #editor-kader, #editor-paneel { max-width: 100%; }
#editor-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  touch-action: pan-x;
  padding: 30px 0 6px;
}
#editor-track { position: relative; min-height: 96px; }
#editor-lijst {
  display: flex;
  gap: 2px;
  overflow: visible;
  max-width: none;
  width: max-content;
  min-height: 76px;
  padding-left: 22px;
  touch-action: pan-x;
}
.editor-clip {
  position: relative;
  flex: 0 0 auto;
  height: 76px;
  min-width: 8px;
}
.editor-face {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: #211a2e;
  color: #fff;
  touch-action: pan-x;
  cursor: pointer;
}
.editor-clip.selected .editor-face { border-color: var(--violet); }
.editor-clip .editor-film { position: absolute; inset: 0; display: flex; pointer-events: none; }
.editor-clip .editor-film img { flex: 1 1 0; width: 0; height: 100%; object-fit: cover; }
.editor-naam, .editor-clip .editor-duur {
  position: absolute;
  left: 4px;
  right: 4px;
  z-index: 1;
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  text-shadow: 0 1px 2px #211a2e;
  pointer-events: none;
}
.editor-naam { top: 4px; }
.editor-clip .editor-duur { bottom: 4px; font-weight: 600; }
.editor-hand {
  position: absolute;
  top: -8px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 92px;
  touch-action: none;
  cursor: ew-resize;
}
.editor-hand[hidden] { display: none; }
.editor-hand.begin { left: -18px; }
.editor-hand.end { right: -18px; }
.editor-hand span {
  width: 8px;
  height: 52px;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 0 0 2px var(--violet);
}
.editor-clip-vast { outline: 2px solid var(--violet); transform: translateY(-4px); }
#editor-schaal {
  position: relative;
  height: 18px;
  margin-left: 22px;
  color: var(--muted);
  font-size: 11px;
  touch-action: none;
}
#editor-schaal span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
#editor-afspeelkop {
  position: absolute;
  top: 18px;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--violet);
  pointer-events: none;
}
#editor-knop {
  position: absolute;
  top: -24px;
  left: -21px;
  width: 44px;
  height: 24px;
  border-radius: 8px;
  background: var(--violet);
  pointer-events: auto;
  touch-action: none;
  cursor: ew-resize;
}
#editor-marker {
  position: absolute;
  top: 18px;
  bottom: 4px;
  width: 3px;
  background: var(--violet);
  pointer-events: none;
}
#editor-kleiner, #editor-groter, #editor-redo, #editor-splitsen, #editor-ongedaan {
  width: auto;
  min-height: 44px;
  padding: 8px 10px;
}
#editor-paneel label[hidden], #editor-precies[hidden] { display: none; }
#editor-precies .row { display: flex; gap: 8px; }
#editor-precies .row label { flex: 1; min-width: 0; }
body.neemt-op { overflow: hidden; }
body.neemt-op .site-header,
body.neemt-op .site-footer,
body.neemt-op #editor-kader,
body.neemt-op .editor-kop,
body.neemt-op .editor-letop,
body.neemt-op #editor-nu,
body.neemt-op #editor-fout,
body.neemt-op .editor-transport,
body.neemt-op #editor-speelt,
body.neemt-op #editor-scroll,
body.neemt-op .editor-strip,
body.neemt-op .editor-tools,
body.neemt-op #editor-kies,
body.neemt-op #editor-paneel,
body.neemt-op #editor-voortgang,
body.neemt-op #editor-balk { display: none !important; }
body.neemt-op #editor-opname {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
  margin: 0;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  overflow: hidden;
  background: #211a2e;
  color: #f7f5f0;
}
body.neemt-op #editor-opname .quiet,
body.neemt-op #editor-opname-uitleg { color: #f7f5f0; }
body.neemt-op #editor-live,
body.neemt-op #editor-proef {
  flex: 1 1 auto;
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  max-height: none;
  height: auto;
  aspect-ratio: auto;
  border-radius: 12px;
  object-fit: contain;
}
body.neemt-op #editor-startstop,
body.neemt-op #editor-opname-sluit,
body.neemt-op #editor-opname-annuleer,
body.neemt-op #editor-terugval-sluit,
body.neemt-op #editor-toevoegen,
body.neemt-op #editor-opnieuw,
body.neemt-op #editor-met-geluid,
body.neemt-op #editor-zonder-geluid,
body.neemt-op #editor-camera-wissel,
body.neemt-op label[for="editor-capture"] {
  min-height: 56px;
  font-size: 18px;
}
body.neemt-op #editor-live-knoppen,
body.neemt-op #editor-proef-knoppen,
body.neemt-op #editor-kies-geluid,
body.neemt-op #editor-terugval { display: flex; flex-direction: column; gap: 8px; }
body.neemt-op #editor-kies-geluid[hidden],
body.neemt-op #editor-live-knoppen[hidden],
body.neemt-op #editor-proef-knoppen[hidden],
body.neemt-op #editor-terugval[hidden],
body.neemt-op #editor-live[hidden],
body.neemt-op #editor-proef[hidden] { display: none; }
#handeling[hidden] { display: none; }
#handeling { margin: 8px 0 24px; }
#handeling h2 { font-size: 1.25rem; margin: 0 0 8px; }
#handeling p, #handeling li { line-height: 1.45; }
#handeling .kaart { border: 1px solid rgba(70, 40, 110, 0.18); border-radius: 16px; padding: 12px; margin: 12px 0; }
#handeling label, #handeling button, #handeling .btn { display: flex; width: 100%; min-height: 48px; align-items: center; justify-content: center; margin: 8px 0; }
#handeling input[type="text"], #handeling textarea { width: 100%; font: inherit; box-sizing: border-box; }
#handeling .file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
#handeling-kaart { background: #fffdf8; border-radius: 16px; padding: 12px; }
#handeling-kaart img { width: 120px; height: auto; }
#bewaar-balk, #bewaar-kies { margin: 0 0 16px; }
#bewaar-kies[hidden], #bewaar-opnieuw[hidden] { display: none; }
#bewaar-balk .btn, #bewaar-kies .btn, #bewaar-balk label.btn, #bewaar-kies label.btn { display: flex; width: 100%; min-height: 48px; align-items: center; justify-content: center; margin: 8px 0; box-sizing: border-box; }
#bewaar-balk .file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

