#chamferVideoWorkspace,
#chamferRecordDialog,
#chamferRecordingsDialog,
#chamferRecordIndicator {
  --cv-base: #0d1921;
  --cv-panel: #162733;
  --cv-field: #101e28;
  --cv-line: #36505e;
  --cv-text: #e6f0f3;
  --cv-muted: #a0b6bf;
  --cv-accent: #91e4d7;
  color: var(--cv-text);
  color-scheme: dark;
  font: 14px/1.45 system-ui, sans-serif;
}

#chamferVideoWorkspace button,
#chamferVideoWorkspace input,
#chamferVideoWorkspace select,
#chamferRecordDialog button,
#chamferRecordDialog select,
#chamferRecordingsDialog button,
#chamferRecordingsDialog input,
#chamferRecordIndicator button {
  min-height: 34px;
  border: 1px solid var(--cv-line);
  border-radius: 5px;
  background: var(--cv-field);
  color: var(--cv-text);
  font: inherit;
}

#chamferVideoWorkspace button,
#chamferRecordDialog button,
#chamferRecordIndicator button { padding: 5px 12px; cursor: pointer; }

#chamferVideoWorkspace :is(input,select):not([type=range]),
#chamferRecordDialog select { min-width: 0; padding: 4px 7px; }

#chamferVideoWorkspace :is(button,input,select):focus-visible,
#chamferRecordDialog :focus-visible,
#chamferRecordIndicator :focus-visible {
  outline: 2px solid var(--cv-accent);
  outline-offset: 2px;
}

#chamferVideoWorkspace button:hover:not(:disabled),
#chamferRecordDialog button:hover:not(:disabled),
#chamferRecordIndicator button:hover:not(:disabled) { border-color: var(--cv-accent); }

#chamferVideoWorkspace button:disabled,
#chamferRecordDialog button:disabled,
#chamferRecordIndicator button:disabled { opacity: .46; cursor: default; }

#chamferVideoWorkspace .cv-primary,
#chamferRecordDialog .cv-primary { background: var(--cv-accent); color: #0a2726; font-weight: 650; }

#chamferVideoWorkspace[open] {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0,1fr) auto auto;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--cv-base);
  overflow: auto;
}

#chamferVideoWorkspace [hidden],
#chamferRecordDialog [hidden],
#chamferRecordIndicator[hidden] { display: none !important; }

.cv-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--cv-line);
  background: var(--cv-panel);
}

.cv-header strong { color: var(--cv-accent); font-size: 16px; }
.cv-header [data-cv=title] { width: clamp(100px,30vw,300px); }
.cv-project-controls { display: flex; flex-wrap: wrap; gap: 6px; margin-inline-start: auto; }

.cv-workarea {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(215px,270px);
  min-height: 0;
}

.cv-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, #1d3743, #101b24 72%);
  container-type: size;
}

.cv-stage canvas {
  position: static;
  width: auto;
  height: auto;
  max-width: min(94%,1100px);
  max-height: 91%;
  aspect-ratio: var(--frame-aspect, 16 / 9);
  object-fit: contain;
  border: 1px solid #38515d;
  border-radius: 4px;
  background: #0c1013;
}

.cv-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  background: #09151cb0;
  pointer-events: none;
}
.cv-empty button { pointer-events: auto; }
.cv-empty strong { font-size: clamp(18px,3vw,29px); letter-spacing: -.025em; }
.cv-media-element { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }

.cv-inspector {
  width: auto;
  display: flex;
  flex-direction: column;
  gap: 11px;
  overflow: auto;
  padding: 17px;
  border-right: 0;
  border-left: 1px solid var(--cv-line);
  background: var(--cv-panel);
}

.cv-inspector h2,
.cv-library h2 { margin: 0; font-size: 14px; }
.cv-inspector p { margin: 0; color: var(--cv-muted); }
.cv-inspector label { display: grid; gap: 4px; color: var(--cv-muted); font-size: 12px; text-transform: none; }
.cv-inspector [data-cv=clip-fields] { display: grid; gap: 10px; }
.cv-clip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.cv-button-row { display: flex; gap: 5px; flex-wrap: wrap; }
.cv-exporting { display: grid; gap: 7px; }
.cv-exporting progress { width: 100%; accent-color: var(--cv-accent); }

.cv-library {
  position: absolute;
  z-index: 2;
  inset: 10px 10px auto auto;
  width: min(330px,calc(100% - 20px));
  max-height: calc(100% - 20px);
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--cv-line);
  border-radius: 7px;
  background: var(--cv-panel);
  box-shadow: 0 12px 28px #0007;
}
.cv-library > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cv-library [data-cv=projects-list] { display: grid; gap: 6px; margin-top: 8px; }
.cv-library [data-cv=projects-list] button { text-align: left; }

.cv-timeline {
  display: grid;
  gap: 5px;
  background: #13242f;
  border-top: 1px solid var(--cv-line);
  padding: 10px 16px 12px;
  min-width: 0;
}
.cv-transport, .cv-audio { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cv-transport output { margin-inline-start: auto; font-variant-numeric: tabular-nums; }
#chamferVideoWorkspace input[type=range] { width: 100%; min-height: 22px; margin: 0; accent-color: var(--cv-accent); cursor: ew-resize; }
.cv-track { position: relative; min-width: 0; min-height: 52px; border: 1px solid var(--cv-line); border-radius: 5px; background: #0e1a22; }
.cv-track [data-cv=track] { display: flex; height: 100%; min-height: 52px; }
#chamferVideoWorkspace .cv-clip {
  display: grid;
  align-content: center;
  text-align: start;
  flex-basis: 0;
  min-width: 0;
  padding-inline: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: #274652;
}
.cv-clip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-clip small { color: #bdd2d9; font-variant-numeric: tabular-nums; }
#chamferVideoWorkspace .cv-clip[aria-pressed=true] { border-color: var(--cv-accent); background: #315c65; }
.cv-track i { position: absolute; top: -3px; bottom: 0; width: 2px; background: #f1ce92; pointer-events: none; }
.cv-audio { color: var(--cv-muted); }
.cv-audio span { margin-inline-end: auto; }
.cv-audio label { display: flex; align-items: center; gap: 7px; }
#chamferVideoWorkspace .cv-audio input { width: 88px; }
.cv-status { min-height: 20px; padding: 5px 16px; color: var(--cv-muted); }

#chamferRecordDialog {
  width: min(370px,calc(100% - 24px));
  padding: 0;
  border: 1px solid var(--cv-line);
  border-radius: 8px;
  background: var(--cv-panel);
}
#chamferRecordDialog::backdrop { background: #030a10b0; }
#chamferRecordDialog form { display: grid; gap: 12px; padding: 17px; }
#chamferRecordDialog :is(header,footer,.record-results) { display: flex; gap: 7px; align-items: center; }
#chamferRecordDialog header { justify-content: space-between; }
#chamferRecordDialog footer { justify-content: flex-end; }
#chamferRecordDialog h2 { margin: 0; font-size: 17px; }
#chamferRecordDialog label { display: grid; gap: 4px; color: var(--cv-muted); }
#chamferRecordDialog .record-mic { display: flex; align-items: center; }
#chamferRecordDialog p { margin: 0; color: var(--cv-muted); }
#chamferRecordIndicator,
#chamferRecordIndicator:popover-open {
  position: fixed;
  inset: 0 auto auto 50%;
  transform: translateX(-50%);
  z-index: 5000040;
  display: flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  max-width: 95vw;
  margin: 8px 0 0;
  padding: 6px;
  border: 1px solid var(--cv-line);
  border-radius: 7px;
  background: var(--cv-panel);
  box-shadow: 0 6px 16px #0007;
}
.record-dot { width: 10px; height: 10px; margin-inline-start: 3px; border-radius: 50%; background: #f17661; }
#chamferRecordIndicator[data-paused=true] .record-dot { background: #eeb976; }
#chamferRecordIndicator time { font-variant-numeric: tabular-nums; }
#ac3dTop .chamfer-record-button { color: #f19787; }
[data-studio-record-access][hidden] { display: none !important; }

#chamferCutWorkspace {
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #121216;
  color: #f2f3f6;
}
#chamferCutWorkspace[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
#chamferCutWorkspace > header { display: flex; align-items: center; gap: 8px; padding: 6px 10px; }
#chamferCutWorkspace > header button {
  border: 1px solid #3b434d;
  border-radius: 4px;
  color: inherit;
  background: #20262d;
  padding: 5px 10px;
  cursor: pointer;
}
#chamferCutWorkspace > iframe { border: 0; width: 100%; height: 100%; }

@media (max-width: 700px) {
  #chamferVideoWorkspace[open] { grid-template-rows: auto minmax(240px,1fr) auto auto; }
  .cv-header { gap: 6px; padding: 7px; }
  .cv-project-controls { margin-inline-start: 0; }
  .cv-workarea { grid-template-columns: 1fr; grid-template-rows: minmax(112px,1fr) minmax(95px,42%); }
  .cv-inspector { padding: 9px; border-left: 0; border-top: 1px solid var(--cv-line); }
  .cv-timeline { padding: 7px; }
  #chamferVideoWorkspace button { padding-inline: 6px; }
}

#chamferRecordingsDialog {
  width: min(1100px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 18px 20px;
  border: 1px solid var(--cv-line);
  border-radius: 9px;
  background: var(--cv-base);
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
}
#chamferRecordingsDialog::backdrop { background: rgba(4,10,14,.6); }
#chamferRecordingsDialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#chamferRecordingsDialog header h2 { margin: 0; font-size: 20px; }
#chamferRecordingsDialog header div { display: flex; gap: 8px; }
#chamferRecordingsDialog button { padding: 5px 12px; cursor: pointer; }
#chamferRecordingsDialog button:hover:not(:disabled) { border-color: var(--cv-accent); }
#chamferRecordingsDialog .cv-primary { background: var(--cv-accent); color: #0a2726; font-weight: 650; }
#chamferRecordingsDialog :focus-visible { outline: 2px solid var(--cv-accent); outline-offset: 2px; }
#chamferRecordingsDialog .rec-note, #chamferRecordingsDialog .rec-meta, #chamferRecordingsDialog .rec-empty { color: var(--cv-muted); margin: 6px 0; }
#chamferRecordingsDialog [data-rec-status] { min-height: 1.4em; margin: 4px 0 10px; color: var(--cv-accent); }
#chamferRecordingsDialog .rec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
#chamferRecordingsDialog .rec-card { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--cv-line); border-radius: 8px; background: var(--cv-panel); }
#chamferRecordingsDialog .rec-card.rec-new { border-color: var(--cv-accent); box-shadow: 0 0 0 1px var(--cv-accent); }
#chamferRecordingsDialog video { width: 100%; aspect-ratio: 16/9; background: #000; border-radius: 5px; }
#chamferRecordingsDialog input[data-rec-name] { width: 100%; box-sizing: border-box; padding: 4px 7px; font-weight: 600; }
#chamferRecordingsDialog .rec-meta { margin: 0; font-size: 12.5px; }
#chamferRecordingsDialog .rec-actions { display: flex; flex-wrap: wrap; gap: 6px; }
#chamferRecordingsDialog .rec-actions [data-rec-delete] { margin-left: auto; }

/* My Recordings in the account window, under the license status. */
#studioAccountDialog .accountRecordingsButton{width:100%;margin-top:16px;height:42px;border-radius:8px;border:1px solid #4f919b;background:linear-gradient(180deg,#1e515a,#173941);color:#c6fbfd;font-weight:700;cursor:pointer;}
#studioAccountDialog .accountRecordingsButton:hover{border-color:#79c5cd;}
