/* Desktop-only body-map composition. The mobile renderer remains the default
   everywhere else; encdesk places the existing map card in `.dk-body-panel`. */
.deskenc .dk-area-b.dk-body-panel {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 6px;
}
.deskenc .dk-body-panel > .field {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 5px;
  gap: 4px;
  overflow: hidden;
}
.deskenc .dk-body-panel > .field > .field-head { display: none; }
.dk-body-panel .map-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(210px, .72fr);
  gap: 14px;
  width: 100%;
  height: 100%;
  min-height: 0;
  align-items: stretch;
  flex: 1 1 auto;
  overflow: hidden;
}
.map-fixed { display: none; }
.map-control-panel { display: flex; flex-direction: column; gap: 9px; }
.dk-body-panel .map-stage,
.dk-body-panel .map-dial { display: none; }
.dk-body-panel .map-fixed {
  display: flex !important;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--sunk);
  overflow: hidden;
}
.dk-body-panel .map-fixed-label {
  color: var(--dimmer);
  font-size: 9px;
  letter-spacing: .14em;
}
.dk-body-panel .map-fixed-svg {
  flex: 1 1 auto;
  width: 100% !important;
  max-width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  border: 0;
  background: transparent;
}
.dk-body-panel .map-control-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 7px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(5, 10, 11, .38);
  overflow: hidden;
}
/* THE DAY VIEW REPAINTS THE PANEL. The dark literal above stayed dark on a
   pale page, a mid-grey block where "nothing drawn yet" read at 2.5:1 and
   the swipe hint at 2.0:1 (measured, 23 September). The page's own sunk
   ground is what every other panel uses in day view. */
[data-theme="day"] .dk-body-panel .map-control-panel { background: var(--sunk); }
.dk-body-panel .map-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.dk-body-panel .map-tools .opt { min-width: 0; min-height: 34px; padding: 4px 6px; white-space: normal; }
.dk-body-panel .map-control-panel .map-meter { text-align: left; }

@media (max-height: 800px) and (min-width: 901px) {
  .deskenc .dk-area-b.dk-body-panel { padding: 4px; }
  .deskenc .dk-body-panel > .field { padding: 3px; }
  .dk-body-panel .map-wrap { gap: 7px; }
  .dk-body-panel .map-fixed { padding: 4px; gap: 2px; }
  .dk-body-panel .map-fixed-label { font-size: 8px; }
  .dk-body-panel .map-control-panel { gap: 4px; padding: 5px; justify-content: flex-start; }
  .dk-body-panel .map-tools { gap: 4px; }
  .dk-body-panel .map-tools .opt { min-height: 28px; padding: 2px 4px; font-size: 10px; }
  .dk-body-panel .map-control-panel > span:last-child { font-size: 9px !important; line-height: 1.25 !important; }
}

/* Combined capture workbench. */
.dk-enc-capture { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
/* The area scrolls (dk-area-b is overflow:auto); its rows must not be SQUEEZED
   instead. Without this the recordings table shrank to 2px at 1440x900,
   1280x720 and 1100x720 (and was clipped at 1920x1080) and every recording,
   its Transcribe/Withdraw controls and a failed upload's row were invisible. */
.dk-enc-capture > * { flex-shrink: 0; }
.dk-enc-capture .ecc-head,
.dk-enc-capture .ecc-title,
.dk-enc-capture .ecc-pad-head { display: flex; align-items: center; gap: 9px; }
.dk-enc-capture .ecc-head { justify-content: space-between; }
.dk-enc-capture .ecc-title,
.dk-enc-capture .ecc-pad-head { flex-wrap: wrap; }
.dk-enc-capture .ecc-record.is-recording { color: var(--red-ink); border-color: var(--red); }
.dk-enc-capture .ecc-status { min-height: 18px; color: var(--dim); font-size: 11px; }
.dk-enc-capture .ecc-status.is-ok { color: var(--teal); }
.dk-enc-capture .ecc-status.is-bad { color: var(--amber); }
.dk-enc-capture .ecc-table { display: flex; flex-direction: column; border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; }
.dk-enc-capture .ecc-table-head,
.dk-enc-capture .ecc-row {
  display: grid;
  grid-template-columns: 38px minmax(180px, .9fr) minmax(220px, 1.3fr) minmax(160px, .8fr);
  gap: 10px;
  align-items: center;
  padding: 9px 11px;
}
.dk-enc-capture .ecc-table-head { color: var(--dimmer); font: 9px/1.3 var(--mono); letter-spacing: .12em; background: rgba(255,255,255,.025); }
.dk-enc-capture .ecc-row { border-top: 1px solid rgba(255,255,255,.05); }
.dk-enc-capture .ecc-row.is-withdrawn { color: var(--dimmer); }
.dk-enc-capture .ecc-file { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dk-enc-capture .ecc-file-open { padding: 0; border: 0; background: none; color: var(--ink-2); font: inherit; text-align: left; cursor: pointer; }
.dk-enc-capture .ecc-file-open:disabled { color: var(--dimmer); cursor: default; }
.dk-enc-capture .ecc-meta { color: var(--dimmer); font-size: 9px; }
.dk-enc-capture audio { width: min(100%, 300px); height: 30px; }
.dk-enc-capture .ecc-actions,
.dk-enc-capture .ecc-pad-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.dk-enc-capture .ecc-empty { padding: 18px; color: var(--dimmer); font-size: 12px; }
.dk-enc-capture .ecc-pad { display: flex; flex-direction: column; gap: 9px; padding: 12px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--panel-2); }
.dk-enc-capture .ecc-notepad { width: 100%; min-height: 150px; resize: vertical; padding: 11px; color: var(--ink); background: var(--sunk); border: 1px solid var(--rule); border-radius: 9px; font: 400 14px/1.55 "Newsreader", Georgia, serif; }
.dk-enc-capture .ecc-notepad:read-only { color: var(--dim); }
.dk-enc-capture .ecc-destination { min-height: 34px; color: var(--ink); background: var(--sunk); border: 1px solid var(--rule); border-radius: 7px; padding: 0 9px; }
.dk-enc-capture .ecc-transcript-view { min-height: 64px; margin-top: 3px; padding: 11px; border-top: 1px solid var(--line-soft); }
.dk-enc-capture .ecc-transcript-title { margin-bottom: 6px; color: var(--dimmer); font-size: 9px; letter-spacing: .1em; }
.dk-enc-capture .ecc-transcript-text { color: var(--ink-2); font: 400 14px/1.6 "Newsreader", Georgia, serif; white-space: pre-wrap; }

@media (max-width: 900px) {
  .dk-body-panel .map-wrap { display: flex; height: auto; }
  .dk-body-panel .map-stage,
  .dk-body-panel .map-dial { display: flex; }
  .dk-body-panel .map-fixed { display: none !important; }
  .dk-body-panel .map-control-panel { padding: 0; border: 0; background: none; overflow: visible; }
  .dk-enc-capture .ecc-table-head { display: none; }
  .dk-enc-capture .ecc-row { grid-template-columns: 28px 1fr; }
  .dk-enc-capture .ecc-row > .ecc-transcript,
  .dk-enc-capture .ecc-row > .ecc-actions { grid-column: 2; }
}
