:root {
  --ink: #18211f;
  --muted: #65716c;
  --line: #d9e0dc;
  --paper: #f7f5f0;
  --panel: #ffffff;
  --accent: #1f8a70;
  --accent-dark: #146554;
  --deep: #203b50;
  --warn: #9a5a1f;
  --error: #a33d3d;
  --error-bg: #fff5f5;
  --line-soft: #edf1ee;
  --surface-subtle: #fbfcfb;
  --shadow: 0 4px 8px rgba(31, 42, 39, 0.08);
  --shadow-panel: 0 2px 6px rgba(31, 42, 39, 0.05);
  --shadow-popover: 0 6px 8px rgba(31, 42, 39, 0.1);
  --workflow-shell-sticky-height: 112px;
  --workspace-screen-sticky-height: 56px;
  --sticky-interface-offset: 220px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: var(--sticky-interface-offset);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(31, 138, 112, 0.08), transparent 260px),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 80;
  border: 1px solid rgba(31, 138, 112, 0.35);
  border-radius: 6px;
  background: #fff;
  color: var(--accent-dark);
  padding: 9px 12px;
  font-weight: 900;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus-visible {
  box-shadow: 0 0 0 3px rgba(31, 138, 112, 0.18);
  outline: none;
  transform: translateY(0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.topbar,
.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, max-content);
  align-items: end;
  gap: 16px;
}

.topbar {
  margin-bottom: 20px;
}

.topbar > :first-child,
.section-heading > :first-child {
  min-width: 0;
}

.topbar > :not(:first-child),
.section-heading > :not(:first-child) {
  min-width: 0;
  max-width: 100%;
}

.topbar h1,
.section-heading h2,
.section-heading h3 {
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.workflow-shell {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(210px, 0.5fr) minmax(0, 1.5fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 0;
  border: 1px solid rgba(31, 138, 112, 0.24);
  border-radius: 8px 8px 0 0;
  background: #fff;
  box-shadow: var(--shadow-panel);
  padding: 12px;
}

.workflow-shell.ready {
  border-color: rgba(31, 138, 112, 0.38);
}

.workflow-shell.attention {
  border-color: rgba(154, 90, 31, 0.34);
}

.workflow-shell.missing {
  border-color: rgba(163, 61, 61, 0.3);
}

.workflow-shell-copy {
  min-width: 0;
}

.workflow-shell-copy h2 {
  margin-bottom: 4px;
  font-size: 1.08rem;
  line-height: 1.25;
}

.workflow-shell-copy p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.35;
}

.workflow-shell-actions {
  display: grid;
  justify-items: end;
  gap: 9px;
  min-width: 0;
}

.workflow-shell-actions button {
  min-width: 150px;
}

.workflow-shell-primary-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.workflow-shell-primary-actions button {
  min-width: min(160px, 100%);
}

.workflow-shell-primary-actions .workflow-shell-toggle {
  order: 1;
}

.workflow-shell-primary-actions .workflow-auto-prep-button {
  order: 2;
}

.workflow-shell-primary-actions #workflowShellNextButton {
  order: 3;
}

.workflow-auto-prep-button {
  white-space: nowrap;
}

.workflow-shell-toggle {
  max-width: 116px;
}

.workflow-shell-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  width: 100%;
  overflow-x: auto;
  padding: 2px 1px 4px;
  scrollbar-width: thin;
}

.workflow-shell.collapsed {
  grid-template-columns: minmax(0, 1fr) minmax(0, max-content);
  align-items: center;
  gap: 10px;
  padding-block: 8px;
}

.workflow-shell.collapsed .workflow-shell-copy {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
}

.workflow-shell.collapsed .workflow-shell-copy .eyebrow,
.workflow-shell.collapsed .workflow-shell-copy h2 {
  margin: 0;
}

.workflow-shell.collapsed .workflow-shell-copy h2 {
  overflow: hidden;
  font-size: 0.96rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-shell.collapsed .workflow-shell-copy p:last-child,
.workflow-shell.collapsed .workflow-shell-steps {
  display: none;
}

.workflow-shell.collapsed .workflow-shell-actions {
  justify-items: end;
}

.workspace-screen-nav {
  position: sticky;
  top: var(--workflow-shell-sticky-height);
  z-index: 19;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: -1px 0 18px;
  border: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  background: #fff;
  box-shadow: var(--shadow-panel);
  padding: 8px;
}

.workspace-screen-tabs {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.workspace-screen-tab {
  flex: 1 1 118px;
  min-width: 0;
  min-height: 38px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
}

.workspace-screen-tab:hover {
  border-color: rgba(31, 138, 112, 0.22);
  background: rgba(31, 138, 112, 0.06);
  color: var(--accent-dark);
}

.workspace-screen-tab:focus-visible {
  border-color: rgba(31, 138, 112, 0.58);
  background: rgba(31, 138, 112, 0.08);
  color: var(--accent-dark);
  box-shadow: 0 0 0 3px rgba(31, 138, 112, 0.14), inset 0 0 0 1px rgba(31, 138, 112, 0.08);
  outline: none;
}

.workspace-screen-tab.active {
  border-color: rgba(31, 138, 112, 0.45);
  background: #fff;
  color: var(--accent-dark);
  box-shadow: inset 0 0 0 1px rgba(31, 138, 112, 0.08);
}

.workspace-screen-tab.active:focus-visible {
  border-color: rgba(31, 138, 112, 0.58);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(31, 138, 112, 0.14), inset 0 0 0 1px rgba(31, 138, 112, 0.12);
  outline: none;
}

.workspace-screen-tab.show-all {
  flex-grow: 0.72;
}

.timing-screen-copy {
  display: none;
}

.global-message {
  flex: 1 1 100%;
  min-width: 0;
  margin: 0;
}

.global-message:empty {
  display: none;
}

.global-message:not(:empty) {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  align-self: center;
  min-height: 28px;
  border: 1px solid rgba(31, 138, 112, 0.2);
  border-radius: 999px;
  background: rgba(31, 138, 112, 0.06);
  padding: 4px 10px;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-message.error:not(:empty) {
  border-color: rgba(163, 61, 61, 0.24);
  background: #fff6f6;
}

.global-message.warning:not(:empty) {
  border-color: rgba(154, 90, 31, 0.24);
  background: #fffaf1;
}

.global-message.long-message:not(:empty) {
  max-width: min(760px, 100%);
  border-radius: 8px;
  padding: 7px 10px;
  line-height: 1.28;
  overflow: visible;
  overflow-wrap: anywhere;
  text-align: left;
  text-overflow: clip;
  white-space: normal;
}

.global-message a {
  color: inherit;
  font-weight: 950;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.global-message a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.global-message-dismiss {
  flex: 0 0 auto;
  min-height: 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 850;
}

.global-message-dismiss:hover {
  border-color: rgba(31, 138, 112, 0.22);
  background: rgba(31, 138, 112, 0.06);
  color: var(--accent-dark);
}

.global-message-dismiss:focus-visible {
  border-color: rgba(31, 138, 112, 0.58);
  background: rgba(31, 138, 112, 0.08);
  color: var(--accent-dark);
  box-shadow: 0 0 0 3px rgba(31, 138, 112, 0.14);
  outline: none;
}

.global-message-dismiss[hidden] {
  display: none;
}

.topbar-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.topbar-help-button {
  min-height: 38px;
  padding: 0 12px;
  font-size: 0.86rem;
}

.topbar-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 7px;
  color: var(--accent-dark);
  font-weight: 900;
  text-decoration: none;
}

.topbar-link-button:hover {
  background: rgba(31, 138, 112, 0.08);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 2.3vw, 2.3rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.18rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.status-pill {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(31, 138, 112, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--accent-dark);
  cursor: pointer;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-align: left;
  white-space: normal;
}

.status-pill:hover {
  background: #fff;
  border-color: rgba(31, 138, 112, 0.52);
}

.status-pill:focus-visible {
  box-shadow: 0 0 0 3px rgba(31, 138, 112, 0.14);
  outline: none;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.72fr);
  gap: 18px;
}

.input-panel,
.editor-panel,
.preview-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-panel);
  padding: 18px;
}

.input-panel:focus-visible,
.editor-panel:focus-visible,
.preview-panel:focus-visible,
.workspace:focus-visible {
  border-color: rgba(31, 138, 112, 0.45);
  box-shadow: 0 0 0 3px rgba(31, 138, 112, 0.12), var(--shadow-panel);
  outline: none;
}

.input-panel,
.editor-panel {
  display: grid;
  gap: 12px;
}

.preview-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.app-shell:not(.workspace-screen-all) .preview-panel {
  margin-top: 0;
}

.app-shell:not(.workspace-screen-all) .workflow-guide {
  display: none;
}

.app-shell.workspace-screen-source .workspace,
.app-shell.workspace-screen-slides .workspace {
  grid-template-columns: minmax(0, 1fr);
}

.app-shell.workspace-screen-timing .workspace {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "timing-workbench"
    "timing-preview";
  align-items: start;
  gap: 10px;
}

.app-shell.workspace-screen-source .editor-panel,
.app-shell.workspace-screen-source .preview-panel,
.app-shell.workspace-screen-slides .input-panel,
.app-shell.workspace-screen-slides .preview-panel,
.app-shell.workspace-screen-media .preview-panel,
.app-shell.workspace-screen-timing .input-panel,
.app-shell.workspace-screen-review .workspace,
.app-shell.workspace-screen-deliver .workspace {
  display: none;
}

.app-shell.workspace-screen-source .media-screen-content,
.app-shell.workspace-screen-media .source-screen-content,
.app-shell.workspace-screen-slides #imagePlanDetails,
.app-shell.workspace-screen-slides #editorPictureSection,
.app-shell.workspace-screen-slides #editorTimingSection,
.app-shell.workspace-screen-media #editorTextSection,
.app-shell.workspace-screen-media #editorTimingSection,
.app-shell.workspace-screen-media #editorSlideActionsSection,
.app-shell.workspace-screen-timing #imagePlanDetails,
.app-shell.workspace-screen-timing #editorTextSection,
.app-shell.workspace-screen-timing #editorPictureSection,
.app-shell.workspace-screen-timing #editorSlideActionsSection {
  display: none;
}

.app-shell.workspace-screen-timing .default-screen-copy,
.app-shell.workspace-screen-timing .media-screen-copy {
  display: none;
}

.app-shell.workspace-screen-timing .timing-screen-copy {
  display: inline;
}

.app-shell.workspace-screen-review .delivery-workbench,
.app-shell.workspace-screen-review #deliveryResult,
.app-shell.workspace-screen-review #previewActionMenu,
.app-shell.workspace-screen-review #recordWebmButton,
.app-shell.workspace-screen-review #restartWebmButton,
.app-shell.workspace-screen-review #previewWebmButton,
.app-shell.workspace-screen-review #downloadWebmLink,
.app-shell.workspace-screen-review #downloadPackageButton,
.app-shell.workspace-screen-review #deliverySaveLibraryButton,
.app-shell.workspace-screen-deliver #previewButton,
.app-shell.workspace-screen-deliver #downloadReadinessButton,
.app-shell.workspace-screen-deliver .record-checklist,
.app-shell.workspace-screen-deliver .readiness-panel,
.app-shell.workspace-screen-deliver .qa-sample-guide {
  display: none;
}

.app-shell.workspace-screen-slides .editor-panel,
.app-shell.workspace-screen-timing .editor-panel {
  max-width: 980px;
  width: 100%;
  margin-inline: auto;
}

.app-shell.workspace-screen-slides .editor-panel {
  max-width: 1180px;
  grid-template-columns: minmax(286px, 0.44fr) minmax(0, 1fr);
  grid-template-areas:
    "slides-head slide-edit"
    "slides-list slide-edit"
    "slides-list slide-actions";
  align-items: start;
  column-gap: 18px;
}

.app-shell.workspace-screen-slides .editor-panel > .section-heading {
  grid-area: slides-head;
  grid-template-columns: 1fr;
  align-items: stretch;
}

.app-shell.workspace-screen-slides .editor-panel > .section-heading select {
  width: 100%;
}

.app-shell.workspace-screen-slides .slide-outline,
.app-shell.workspace-screen-timing .slide-outline {
  max-height: min(56vh, 520px);
}

.app-shell.workspace-screen-slides .slide-outline {
  grid-area: slides-list;
  max-height: min(70vh, 680px);
}

.app-shell.workspace-screen-slides .slide-outline button {
  grid-template-columns: 34px minmax(0, 1fr) 62px;
  min-height: 0;
  gap: 8px;
  align-items: start;
  padding: 8px 9px;
}

.app-shell.workspace-screen-slides .slide-outline-number {
  margin-top: 0;
}

.app-shell.workspace-screen-slides .slide-outline-text {
  gap: 3px;
  overflow: hidden;
}

.app-shell.workspace-screen-slides .slide-outline-text strong {
  min-width: 0;
  white-space: nowrap;
}

.app-shell.workspace-screen-slides .slide-outline-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell.workspace-screen-slides .slide-outline-time {
  grid-column: auto;
  display: grid;
  justify-self: stretch;
  justify-items: end;
  min-width: 0;
  width: 62px;
  margin-left: 0;
  white-space: nowrap;
}

.app-shell.workspace-screen-slides .slide-outline-polish {
  gap: 3px;
  flex-wrap: nowrap;
  max-height: 16px;
  max-width: 100%;
  margin-top: 0;
  overflow: hidden;
}

.app-shell.workspace-screen-slides .slide-outline-polish span {
  flex: 0 1 auto;
  max-width: min(92px, 100%);
  padding: 1px 5px;
  font-size: 0.64rem;
}

.app-shell.workspace-screen-slides #editorTextSection {
  grid-area: slide-edit;
  border-top: 0;
  padding-top: 0;
}

.app-shell.workspace-screen-slides #editorSlideActionsSection {
  grid-area: slide-actions;
}

.app-shell.workspace-screen-slides #slideBodyInput {
  min-height: 260px;
}

.app-shell.workspace-screen-timing .editor-panel {
  grid-area: timing-workbench;
  max-width: none;
  grid-template-columns: minmax(220px, 0.32fr) minmax(0, 1fr);
  grid-template-areas: "timing-head timing-editor";
  align-items: end;
  align-self: start;
  gap: 10px;
  padding: 10px 12px;
}

.app-shell.workspace-screen-timing .editor-panel > .section-heading {
  grid-area: timing-head;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 5px;
}

.app-shell.workspace-screen-timing .editor-panel > .section-heading h2 {
  font-size: 1rem;
  line-height: 1.12;
}

.app-shell.workspace-screen-timing .editor-panel > .section-heading select {
  min-height: 36px;
  width: 100%;
}

.app-shell.workspace-screen-timing .slide-outline {
  display: none;
}

.app-shell.workspace-screen-timing .slide-outline button {
  grid-template-columns: 34px minmax(0, 1fr) 58px;
  min-height: 56px;
  gap: 8px;
  align-items: center;
  padding: 8px;
}

.app-shell.workspace-screen-timing .slide-outline-number {
  margin-top: 0;
}

.app-shell.workspace-screen-timing .slide-outline-text {
  gap: 3px;
}

.app-shell.workspace-screen-timing .slide-outline-text strong,
.app-shell.workspace-screen-timing .slide-outline-text small {
  white-space: nowrap;
}

.app-shell.workspace-screen-timing .slide-outline-time {
  min-width: 54px;
}

.app-shell.workspace-screen-timing #editorTimingSection {
  grid-area: timing-editor;
  border-top: 0;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: end;
  gap: 8px;
  padding: 0;
}

.app-shell.workspace-screen-timing #editorTimingSection h3 {
  margin: 0 4px 9px 0;
  font-size: 0.86rem;
  line-height: 1.1;
}

.app-shell.workspace-screen-timing .cue-tools {
  grid-template-columns: minmax(120px, 160px) minmax(150px, 190px);
  align-items: end;
  gap: 8px;
}

.app-shell.workspace-screen-timing .cue-tools label {
  gap: 4px;
  min-width: 0;
  font-size: 0.78rem;
  line-height: 1.2;
}

.app-shell.workspace-screen-timing .cue-tools input,
.app-shell.workspace-screen-timing .cue-tools select {
  min-height: 36px;
  padding: 8px 10px;
}

.app-shell.workspace-screen-timing .cue-tools .field-note {
  display: none;
}

.app-shell.workspace-screen-timing .timing-primary-actions {
  display: none;
}

.app-shell.workspace-screen-timing .timing-action-group-current,
.app-shell.workspace-screen-timing .timing-action-group-auto {
  display: none;
}

.app-shell.workspace-screen-timing .timing-primary-actions button {
  width: 100%;
}

.app-shell.workspace-screen-timing .preview-panel {
  --timing-player-width: min(100%, 980px, calc((100vh - var(--sticky-interface-offset) - 145px) * 16 / 9));
  grid-area: timing-preview;
  max-width: none;
  margin-inline: 0;
  gap: 9px;
  padding: 12px;
}

.app-shell.workspace-screen-timing .preview-heading {
  order: 1;
}

.app-shell.workspace-screen-timing #playerAudioRow {
  order: 3;
}

.app-shell.workspace-screen-timing #progressTrack {
  order: 4;
}

.app-shell.workspace-screen-timing #progressText {
  order: 5;
}

.app-shell.workspace-screen-timing #timingTimelineTools {
  order: 6;
}

.app-shell.workspace-screen-timing #slideTimeline {
  order: 7;
}

.app-shell.workspace-screen-timing #slideStage {
  order: 2;
  width: var(--timing-player-width);
  justify-self: center;
}

.app-shell.workspace-screen-timing #playerAudioRow,
.app-shell.workspace-screen-timing #progressTrack,
.app-shell.workspace-screen-timing #progressText,
.app-shell.workspace-screen-timing #timingTimelineTools,
.app-shell.workspace-screen-timing #slideTimeline {
  width: var(--timing-player-width);
  margin-inline: auto;
}

.app-shell.workspace-screen-timing #imagePositionTools {
  order: 8;
}

.app-shell.workspace-screen-timing #downloadReadinessButton,
.app-shell.workspace-screen-timing #recordWebmButton,
.app-shell.workspace-screen-timing #restartWebmButton,
.app-shell.workspace-screen-timing #previewWebmButton,
.app-shell.workspace-screen-timing #downloadWebmLink,
.app-shell.workspace-screen-timing #downloadPackageButton,
.app-shell.workspace-screen-timing #deliverySaveLibraryButton,
.app-shell.workspace-screen-timing #previewActionMenu,
.app-shell.workspace-screen-timing .delivery-workbench,
.app-shell.workspace-screen-timing .record-checklist,
.app-shell.workspace-screen-timing .readiness-panel,
.app-shell.workspace-screen-timing .qa-sample-guide,
.app-shell.workspace-screen-timing #deliveryResult,
.app-shell.workspace-screen-timing #recordProgress {
  display: none;
}

.app-shell.workspace-screen-review .preview-panel {
  max-width: 1180px;
  margin-inline: auto;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.58fr);
  grid-template-areas:
    "review-head review-head"
    "review-preview review-preview"
    "review-audio review-audio"
    "review-progress review-progress"
    "review-progress-text review-progress-text"
    "review-timeline review-timeline"
    "review-image-tools review-image-tools"
    "review-cards review-readiness"
    "review-qa review-readiness";
  align-items: start;
  column-gap: 18px;
}

.app-shell.workspace-screen-review .preview-heading {
  grid-area: review-head;
}

.app-shell.workspace-screen-review #slideStage {
  grid-area: review-preview;
}

.app-shell.workspace-screen-review #playerAudioRow {
  grid-area: review-audio;
}

.app-shell.workspace-screen-review #progressTrack {
  grid-area: review-progress;
}

.app-shell.workspace-screen-review #progressText {
  grid-area: review-progress-text;
}

.app-shell.workspace-screen-review #slideTimeline {
  grid-area: review-timeline;
}

.app-shell.workspace-screen-review #imagePositionTools {
  grid-area: review-image-tools;
}

.app-shell.workspace-screen-review .record-checklist {
  grid-area: review-cards;
  grid-template-columns: 1fr;
}

.app-shell.workspace-screen-review .readiness-panel {
  grid-area: review-readiness;
}

.app-shell.workspace-screen-review .qa-sample-guide {
  grid-area: review-qa;
}

.app-shell.workspace-screen-deliver .preview-panel {
  max-width: 1180px;
  margin-inline: auto;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.58fr);
  grid-template-areas:
    "deliver-head deliver-head"
    "deliver-preview deliver-preview"
    "deliver-audio deliver-audio"
    "deliver-progress deliver-progress"
    "deliver-progress-text deliver-progress-text"
    "deliver-timeline deliver-timeline"
    "deliver-record deliver-result"
    "deliver-workbench deliver-workbench";
  align-items: start;
  column-gap: 18px;
}

.app-shell.workspace-screen-deliver .preview-heading {
  grid-area: deliver-head;
}

.app-shell.workspace-screen-deliver .delivery-workbench {
  grid-area: deliver-workbench;
}

.app-shell.workspace-screen-deliver #recordProgress {
  grid-area: deliver-record;
}

.app-shell.workspace-screen-deliver #deliveryResult {
  grid-area: deliver-result;
}

.app-shell.workspace-screen-deliver #slideStage {
  grid-area: deliver-preview;
}

.app-shell.workspace-screen-deliver #playerAudioRow {
  grid-area: deliver-audio;
}

.app-shell.workspace-screen-deliver #progressTrack {
  grid-area: deliver-progress;
}

.app-shell.workspace-screen-deliver #progressText {
  grid-area: deliver-progress-text;
}

.app-shell.workspace-screen-deliver #slideTimeline {
  grid-area: deliver-timeline;
}

.app-shell.workspace-screen-deliver #imagePositionTools {
  display: none;
}

.app-shell.workspace-screen-deliver .delivery-workbench {
  align-self: start;
}

.app-shell.workspace-screen-deliver .delivery-workbench-item {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.app-shell.workspace-screen-deliver .delivery-workbench-actions {
  justify-content: flex-start;
  justify-self: stretch;
  width: 100%;
}

.app-shell.workspace-screen-deliver .preview-primary-actions {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
}

.app-shell.workspace-screen-deliver .preview-actions {
  width: min(240px, 100%);
}

.app-shell.workspace-screen-media .workspace {
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: start;
}

.app-shell.workspace-screen-media .input-panel,
.app-shell.workspace-screen-media .editor-panel {
  align-content: start;
}

.media-screen-copy {
  display: none;
}

.app-shell.workspace-screen-media .default-screen-copy {
  display: none;
}

.app-shell.workspace-screen-media .media-screen-copy {
  display: inline;
}

.app-shell.workspace-screen-media .editor-panel {
  grid-template-areas:
    "media-head"
    "image-plan"
    "picture-editor";
}

.app-shell.workspace-screen-media .editor-panel > .section-heading {
  grid-area: media-head;
}

.app-shell.workspace-screen-media .slide-outline {
  display: none;
}

.app-shell.workspace-screen-media #imagePlanDetails {
  grid-area: image-plan;
}

.app-shell.workspace-screen-media #editorPictureSection {
  grid-area: picture-editor;
}

@media (min-width: 921px) {
  .app-shell:not(.workspace-screen-all) {
    width: min(1580px, calc(100vw - 32px));
    padding-top: 18px;
    padding-bottom: 22px;
  }

  .app-shell:not(.workspace-screen-all) .topbar {
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
  }

  .app-shell:not(.workspace-screen-all) .topbar .eyebrow {
    margin-bottom: 2px;
    font-size: 0.7rem;
  }

  .app-shell:not(.workspace-screen-all) .topbar h1 {
    font-size: 1.42rem;
    line-height: 1.08;
  }

  .app-shell:not(.workspace-screen-all) .topbar-actions {
    gap: 6px;
    justify-content: flex-end;
  }

  .app-shell:not(.workspace-screen-all) .topbar-help-button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.8rem;
  }

  .app-shell:not(.workspace-screen-all) .status-pill {
    min-height: 34px;
    max-width: 360px;
    padding: 6px 10px;
    overflow: hidden;
    font-size: 0.8rem;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-shell:not(.workspace-screen-all) .workspace {
    gap: 14px;
  }

  .app-shell.workspace-screen-timing .workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "timing-workbench"
      "timing-preview";
    gap: 10px;
  }

  .app-shell:not(.workspace-screen-all) .input-panel,
  .app-shell:not(.workspace-screen-all) .editor-panel,
  .app-shell:not(.workspace-screen-all) .preview-panel {
    gap: 10px;
    padding: 14px;
  }

  .app-shell:not(.workspace-screen-all) .tool-panel,
  .app-shell:not(.workspace-screen-all) .editor-section,
  .app-shell:not(.workspace-screen-all) .bullet-timing-panel {
    gap: 10px;
    padding: 10px;
  }

  .app-shell:not(.workspace-screen-all) .image-position-tools {
    gap: 8px;
    padding: 8px 10px;
  }

  .app-shell:not(.workspace-screen-all) .section-heading {
    align-items: center;
    gap: 8px;
  }

  .app-shell:not(.workspace-screen-all) .section-heading .eyebrow {
    margin-bottom: 1px;
    font-size: 0.68rem;
  }

  .app-shell:not(.workspace-screen-all) .section-heading h2,
  .app-shell:not(.workspace-screen-all) .section-heading h3 {
    font-size: 1.04rem;
    line-height: 1.16;
  }

  .app-shell:not(.workspace-screen-all) .section-heading select {
    height: 36px;
    padding-inline: 10px;
  }

  .app-shell:not(.workspace-screen-all) .section-heading .popup-actions summary,
  .app-shell:not(.workspace-screen-all) .section-heading button {
    min-height: 34px;
    padding-inline: 10px;
    font-size: 0.82rem;
  }

  .app-shell:not(.workspace-screen-all) .quick-actions {
    gap: 7px;
  }

  .app-shell:not(.workspace-screen-all) .quick-actions button,
  .app-shell:not(.workspace-screen-all) .popup-actions summary,
  .app-shell:not(.workspace-screen-all) .mini-actions button {
    min-height: 38px;
  }

  .app-shell:not(.workspace-screen-all) .metrics {
    gap: 8px;
  }

  .app-shell:not(.workspace-screen-all) .metrics div {
    display: grid;
    min-height: 58px;
    align-content: center;
    padding: 8px 10px;
  }

  .app-shell:not(.workspace-screen-all) .metrics span {
    font-size: 1.08rem;
  }

  .app-shell.workspace-screen-source .metrics {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }

  .app-shell.workspace-screen-source .metrics div {
    display: flex;
    width: auto;
    min-height: 0;
    align-items: baseline;
    gap: 6px;
    border-radius: 999px;
    background: #fff;
    padding: 6px 9px;
  }

  .app-shell.workspace-screen-source .metrics span {
    font-size: 0.95rem;
    line-height: 1;
  }

  .app-shell.workspace-screen-source .metrics small {
    font-size: 0.76rem;
    line-height: 1;
    white-space: nowrap;
  }

  .app-shell.workspace-screen-source .lesson-text-action-row {
    grid-template-columns: minmax(120px, 0.22fr) minmax(0, 1fr);
    align-items: end;
    column-gap: 12px;
  }

  .app-shell.workspace-screen-source .input-panel {
    grid-template-columns: minmax(104px, 0.16fr) minmax(0, 1fr);
    gap: 9px 10px;
  }

  .app-shell.workspace-screen-source .input-panel > :not(label[for="lessonTitle"]):not(#lessonTitle) {
    grid-column: 1 / -1;
  }

  .app-shell.workspace-screen-source label[for="lessonTitle"] {
    min-height: 38px;
    align-content: center;
  }

  .app-shell.workspace-screen-source #lessonTitle {
    height: 38px;
  }

  .app-shell.workspace-screen-source .lesson-text-action-row .lesson-text-primary-actions {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr));
  }

  .app-shell.workspace-screen-source .lesson-text-action-row .text-tools {
    margin-top: 0;
  }

  .app-shell.workspace-screen-source .source-action-row {
    grid-template-columns: minmax(0, 1fr) minmax(160px, 220px) minmax(140px, max-content);
    align-items: center;
  }

  .app-shell.workspace-screen-source .source-primary-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(min(100%, 160px), max-content));
    justify-content: start;
  }

  .app-shell.workspace-screen-source .source-primary-actions button {
    min-width: min(170px, 100%);
  }

  .app-shell.workspace-screen-source .autosave-status {
    justify-self: end;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-shell.workspace-screen-source .project-library .source-tools {
    grid-template-columns: minmax(180px, 0.9fr) minmax(220px, 1.1fr) minmax(160px, 220px);
    align-items: end;
  }

  .app-shell.workspace-screen-source .project-library-actions {
    grid-column: auto;
    justify-self: stretch;
    width: 100%;
  }

  .app-shell.workspace-screen-source .project-library .input-hint {
    margin: 0;
  }

  .app-shell.workspace-screen-slides #editorTextSection {
    grid-template-columns: minmax(92px, 0.14fr) minmax(0, 1fr);
    align-items: end;
    gap: 8px 10px;
  }

  .app-shell.workspace-screen-slides #editorTextSection h3,
  .app-shell.workspace-screen-slides #editorTextSection .field-action-row,
  .app-shell.workspace-screen-slides #slideBodyInput,
  .app-shell.workspace-screen-slides #slideBodyMeta,
  .app-shell.workspace-screen-slides #slideNarrationDetails {
    grid-column: 1 / -1;
  }

  .app-shell.workspace-screen-slides #editorTextSection > label[for="slideTitleInput"] {
    min-height: 34px;
    align-content: center;
  }

  .app-shell.workspace-screen-slides #slideTitleInput {
    height: 36px;
  }

  .app-shell.workspace-screen-slides #editorTextSection .field-action-row {
    grid-template-columns: minmax(96px, 0.16fr) minmax(0, 1fr);
    align-items: end;
    gap: 8px;
  }

  .app-shell.workspace-screen-slides #editorTextSection .field-action-row label {
    min-height: 36px;
  }

  .app-shell.workspace-screen-slides .slide-text-primary-actions {
    display: grid;
    grid-template-columns: minmax(112px, 160px) minmax(136px, 190px);
    justify-content: end;
    gap: 6px;
  }

  .app-shell.workspace-screen-slides .slide-text-primary-actions button,
  .app-shell.workspace-screen-slides .slide-text-primary-actions .text-tools,
  .app-shell.workspace-screen-slides .slide-text-primary-actions .text-tools summary {
    width: 100%;
    min-height: 34px;
    padding-inline: 9px;
  }

  .app-shell.workspace-screen-slides #slideBodyMeta {
    margin: -2px 0 0;
    font-size: 0.78rem;
    line-height: 1.25;
  }

  .app-shell.workspace-screen-slides #slideNarrationDetails textarea {
    height: clamp(78px, 11vh, 118px);
    min-height: 78px;
  }

  .app-shell.workspace-screen-slides #editorSlideActionsSection {
    grid-template-columns: minmax(108px, max-content) minmax(0, 1fr) minmax(150px, 210px);
    align-items: center;
    column-gap: 10px;
    padding-top: 10px;
  }

  .app-shell.workspace-screen-slides #editorSlideActionsSection h3 {
    align-self: center;
  }

  .app-shell.workspace-screen-slides .slide-primary-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    justify-content: stretch;
  }

  .app-shell.workspace-screen-slides .slide-primary-actions button,
  .app-shell.workspace-screen-slides #slideActionMenu {
    width: 100%;
  }

  .app-shell.workspace-screen-slides .slide-primary-actions button,
  .app-shell.workspace-screen-slides #slideActionMenu summary {
    min-height: 36px;
    padding-inline: 10px;
  }

  .app-shell.workspace-screen-media .image-plan-toolbar {
    justify-content: stretch;
  }

  .app-shell.workspace-screen-media .image-plan-toolbar > div {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(160px, 220px);
    align-items: end;
    gap: 8px;
    justify-items: stretch;
  }

  .app-shell.workspace-screen-media .image-plan-primary-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 0;
  }

  .app-shell.workspace-screen-media .image-plan-primary-actions button,
  .app-shell.workspace-screen-media .image-plan-menu {
    width: 100%;
  }

  .app-shell.workspace-screen-media .image-plan-toolbar small {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .app-shell.workspace-screen-media .image-plan-list {
    max-height: min(42vh, 360px);
    gap: 5px;
    padding: 6px;
  }

  .app-shell.workspace-screen-media .image-plan-row {
    grid-template-columns: minmax(0, 1fr) minmax(150px, max-content) minmax(96px, 116px);
    gap: 6px;
    padding: 5px;
  }

  .app-shell.workspace-screen-media .image-plan-main {
    grid-column: auto;
    grid-template-columns: 34px minmax(0, 1fr) minmax(82px, max-content);
    min-height: 38px;
    gap: 8px;
    padding: 2px;
  }

  .app-shell.workspace-screen-media .image-plan-thumb {
    width: 32px;
    height: 32px;
  }

  .app-shell.workspace-screen-media .image-plan-status {
    padding: 4px 7px;
    font-size: 0.68rem;
    white-space: nowrap;
  }

  .app-shell.workspace-screen-media .image-plan-row-actions {
    flex-wrap: nowrap;
    justify-content: end;
    gap: 5px;
  }

  .app-shell.workspace-screen-media .image-plan-row-actions button,
  .app-shell.workspace-screen-media .image-plan-actions summary {
    min-height: 32px;
    padding-inline: 8px;
    font-size: 0.74rem;
  }

  .app-shell.workspace-screen-media .image-plan-actions {
    width: 100%;
  }

  .app-shell.workspace-screen-media #editorPictureSection {
    grid-template-columns: minmax(0, 1fr) minmax(160px, 220px);
    align-items: end;
    column-gap: 10px;
  }

  .app-shell.workspace-screen-media #editorPictureSection h3,
  .app-shell.workspace-screen-media #editorPictureSection #pictureStatusHint,
  .app-shell.workspace-screen-media #editorPictureSection > .source-tools:last-of-type {
    grid-column: 1 / -1;
  }

  .app-shell.workspace-screen-media #editorPictureSection > .source-tools:first-of-type {
    grid-template-columns: minmax(150px, 0.78fr) minmax(180px, 1.22fr);
    align-items: end;
  }

  .app-shell.workspace-screen-media #editorPictureSection > .mini-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-self: end;
    justify-self: stretch;
    gap: 8px;
  }

  .app-shell.workspace-screen-media #editorPictureSection > .mini-actions button,
  .app-shell.workspace-screen-media #editorPictureSection > .mini-actions .picture-actions {
    width: 100%;
  }

  .app-shell.workspace-screen-media #editorPictureSection #pictureStatusHint {
    margin: -2px 0 0;
  }

  .app-shell.workspace-screen-media #editorPictureSection > .source-tools:last-of-type {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
    gap: 6px;
  }

  .app-shell.workspace-screen-media #editorPictureSection > .source-tools:last-of-type label {
    gap: 4px;
    font-size: 0.74rem;
  }

  .app-shell.workspace-screen-media #editorPictureSection > .source-tools:last-of-type select,
  .app-shell.workspace-screen-media #editorPictureSection > .source-tools:last-of-type button {
    min-height: 34px;
    padding-inline: 8px;
  }

  .app-shell.workspace-screen-media #editorPictureSection > .source-tools:last-of-type .size-note {
    grid-column: 1 / -1;
    min-height: 28px;
    padding: 5px 8px;
    font-size: 0.76rem;
    line-height: 1.2;
  }

  .app-shell.workspace-screen-timing #editorTimingSection {
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: end;
    gap: 8px;
  }

  .app-shell.workspace-screen-timing .cue-tools {
    grid-template-columns: minmax(120px, 160px) minmax(150px, 190px);
    align-items: end;
    gap: 8px;
  }

  .app-shell.workspace-screen-timing .cue-tools .timing-primary-actions {
    display: none;
  }

  .app-shell.workspace-screen-timing .cue-tools .field-note {
    display: none;
  }

  .app-shell.workspace-screen-timing .timing-primary-actions {
    display: none;
  }

  .app-shell.workspace-screen-timing .timing-action-group {
    gap: 7px;
  }

  .app-shell.workspace-screen-timing .timing-action-group-current {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell.workspace-screen-timing .timing-action-group-auto {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell.workspace-screen-timing #applyTransitionAllSlidesButton {
    grid-column: 1 / -1;
  }

  .app-shell.workspace-screen-timing .timing-primary-actions button {
    min-height: 36px;
    padding-inline: 10px;
  }

  .app-shell.workspace-screen-timing .bullet-timing-panel {
    gap: 8px;
    padding: 10px;
  }

  .app-shell.workspace-screen-timing .bullet-timing-row {
    grid-template-columns: minmax(0, 1fr) minmax(78px, 96px) minmax(0, 100px) minmax(0, 68px);
    gap: 6px;
  }

  .app-shell.workspace-screen-timing .bullet-timing-text {
    font-size: 0.8rem;
    line-height: 1.22;
  }

  .app-shell.workspace-screen-timing .bullet-timing-row input,
  .app-shell.workspace-screen-timing .bullet-timing-row button {
    min-height: 32px;
    padding-inline: 8px;
    font-size: 0.74rem;
  }

  .app-shell.workspace-screen-timing .bullet-highlight-actions {
    gap: 6px;
  }

  .app-shell.workspace-screen-timing .bullet-highlight-apply-button {
    min-height: 34px;
    padding-inline: 10px;
  }

  .app-shell:not(.workspace-screen-all) .workflow-shell.collapsed {
    gap: 8px;
    padding: 6px 10px;
  }

  .app-shell:not(.workspace-screen-all) .workflow-shell.collapsed .workflow-shell-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
  }

  .app-shell:not(.workspace-screen-all) .workflow-shell.collapsed .workflow-shell-primary-actions {
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 8px;
  }

  .app-shell:not(.workspace-screen-all) .workflow-shell.collapsed .workflow-shell-copy h2 {
    font-size: 0.92rem;
  }

  .app-shell:not(.workspace-screen-all) .workflow-shell.collapsed .workflow-shell-actions button,
  .app-shell:not(.workspace-screen-all) .workspace-screen-tab {
    min-height: 34px;
    font-size: 0.82rem;
  }

  .app-shell:not(.workspace-screen-all) .workflow-shell.collapsed .workflow-shell-actions button {
    min-width: 112px;
    padding-inline: 10px;
    white-space: nowrap;
  }

  .app-shell:not(.workspace-screen-all) .workflow-shell.collapsed .workflow-shell-toggle {
    min-width: 88px;
    max-width: none;
  }

  .app-shell:not(.workspace-screen-all) .workspace-screen-nav {
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    overflow: visible;
    padding: 4px 6px;
  }

  .app-shell:not(.workspace-screen-all) .workspace-screen-nav.has-long-global-message {
    flex-wrap: wrap;
  }

  .app-shell:not(.workspace-screen-all) .workspace-screen-tabs {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
  }

  .app-shell:not(.workspace-screen-all) .workspace-screen-tab {
    flex: 1 0 80px;
    min-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-shell:not(.workspace-screen-all) .workspace-screen-tab.show-all {
    flex-grow: 0.72;
    flex-basis: 74px;
    min-width: 74px;
  }

  .app-shell:not(.workspace-screen-all) .workspace-screen-nav .global-message {
    flex: 0 1 min(640px, 48vw);
    min-width: 0;
    max-width: min(640px, 48vw);
    margin-left: auto;
    color: var(--accent-dark);
    font-size: 0.74rem;
    font-weight: 850;
    line-height: 1.2;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-shell:not(.workspace-screen-all) .workspace-screen-nav .global-message.long-message {
    order: 2;
    flex: 1 1 calc(100% - 86px);
    max-width: calc(100% - 86px);
    margin-left: 0;
    overflow: visible;
    overflow-wrap: anywhere;
    text-align: left;
    text-overflow: clip;
    white-space: normal;
  }

  .app-shell:not(.workspace-screen-all) .workspace-screen-nav .global-message-dismiss {
    order: 3;
    flex: 0 0 auto;
  }

  .app-shell.workspace-screen-source #lessonText {
    height: clamp(300px, calc(100vh - var(--sticky-interface-offset) - 310px), 560px);
    min-height: 300px;
  }

  .app-shell.workspace-screen-slides #slideBodyInput {
    height: clamp(220px, calc(100vh - var(--sticky-interface-offset) - 360px), 460px);
    min-height: 220px;
  }

  .app-shell.workspace-screen-review .preview-panel,
  .app-shell.workspace-screen-deliver .preview-panel {
    --focused-player-width: min(100%, 960px, calc((100vh - var(--sticky-interface-offset) - 170px) * 16 / 9));
  }

  .app-shell.workspace-screen-review #slideStage,
  .app-shell.workspace-screen-deliver #slideStage {
    width: var(--focused-player-width);
    margin-inline: auto;
  }

  .app-shell.workspace-screen-review .preview-heading,
  .app-shell.workspace-screen-deliver .preview-heading {
    grid-template-columns: minmax(150px, 0.3fr) minmax(0, 1fr) minmax(170px, 210px);
    align-items: center;
    gap: 10px;
  }

  .app-shell.workspace-screen-review .preview-primary-actions,
  .app-shell.workspace-screen-deliver .preview-primary-actions {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 138px), 1fr));
    gap: 8px;
    width: min(520px, 100%);
  }

  .app-shell.workspace-screen-review .preview-primary-actions button,
  .app-shell.workspace-screen-review .preview-primary-actions .record-download-link,
  .app-shell.workspace-screen-deliver .preview-primary-actions button,
  .app-shell.workspace-screen-deliver .preview-primary-actions .record-download-link,
  .app-shell.workspace-screen-review .preview-actions summary,
  .app-shell.workspace-screen-deliver .preview-actions summary {
    min-height: 36px;
    padding-inline: 10px;
    font-size: 0.84rem;
  }

.app-shell.workspace-screen-review #audioPlayer,
.app-shell.workspace-screen-deliver #audioPlayer {
    min-height: 36px;
  }

  .app-shell.workspace-screen-review #playerAudioRow,
  .app-shell.workspace-screen-review #progressTrack,
  .app-shell.workspace-screen-review #progressText,
  .app-shell.workspace-screen-review #slideTimeline,
  .app-shell.workspace-screen-deliver #playerAudioRow,
  .app-shell.workspace-screen-deliver #progressTrack,
  .app-shell.workspace-screen-deliver #progressText,
  .app-shell.workspace-screen-deliver #slideTimeline {
    width: var(--focused-player-width);
    margin-inline: auto;
  }

  .app-shell.workspace-screen-review #progressTrack,
  .app-shell.workspace-screen-deliver #progressTrack {
    height: 8px;
  }

  .app-shell.workspace-screen-review #progressText,
  .app-shell.workspace-screen-deliver #progressText {
    min-height: 18px;
    font-size: 0.78rem;
    line-height: 1.2;
  }

  .app-shell.workspace-screen-review #slideTimeline,
  .app-shell.workspace-screen-deliver #slideTimeline {
    gap: 5px;
    padding-block: 0 4px;
  }

  .app-shell.workspace-screen-review #slideTimeline button,
  .app-shell.workspace-screen-deliver #slideTimeline button {
    width: 32px;
    min-height: 30px;
    font-size: 0.78rem;
  }

  .app-shell.workspace-screen-review .preview-panel {
    gap: 10px 14px;
  }

  .app-shell.workspace-screen-review .record-checklist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .app-shell.workspace-screen-review .record-check-item {
    grid-template-columns: minmax(0, 1fr) minmax(76px, max-content);
    align-items: center;
    gap: 3px 8px;
    min-height: 70px;
    padding: 8px 10px;
  }

  .app-shell.workspace-screen-review .record-check-item strong {
    grid-column: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-shell.workspace-screen-review .record-check-item span {
    grid-column: 1 / -1;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
  }

  .app-shell.workspace-screen-review .record-check-item small {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    white-space: nowrap;
  }

  .app-shell.workspace-screen-review .qa-sample-guide,
  .app-shell.workspace-screen-review .readiness-panel {
    gap: 8px;
    padding: 10px;
  }

  .app-shell.workspace-screen-review .qa-sample-guide-header,
  .app-shell.workspace-screen-review .readiness-panel-header {
    gap: 8px;
  }

  .app-shell.workspace-screen-review .qa-sample-guide-header h2,
  .app-shell.workspace-screen-review .readiness-panel-header h2 {
    font-size: 0.94rem;
  }

  .app-shell.workspace-screen-review .qa-sample-guide p,
  .app-shell.workspace-screen-review .qa-sample-guide li,
  .app-shell.workspace-screen-review .readiness-panel p,
  .app-shell.workspace-screen-review .readiness-panel li {
    font-size: 0.8rem;
    line-height: 1.3;
  }

  .app-shell.workspace-screen-review .qa-sample-guide ul,
  .app-shell.workspace-screen-review .readiness-panel ul {
    gap: 4px;
  }

  .app-shell.workspace-screen-review .qa-sample-guide-actions,
  .app-shell.workspace-screen-review .readiness-actions {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr));
    justify-content: stretch;
    gap: 6px;
  }

  .app-shell.workspace-screen-review .readiness-next-fix {
    gap: 8px;
    padding: 7px 8px;
  }

  .app-shell.workspace-screen-deliver .preview-panel {
    gap: 10px 14px;
  }

  .app-shell.workspace-screen-deliver #recordProgress,
  .app-shell.workspace-screen-deliver #deliveryResult {
    align-self: stretch;
  }

  .app-shell.workspace-screen-deliver .delivery-workbench {
    gap: 8px;
    padding: 10px;
  }

  .app-shell.workspace-screen-deliver .delivery-workbench-header {
    align-items: center;
    gap: 8px;
  }

  .app-shell.workspace-screen-deliver .delivery-workbench-header h2 {
    font-size: 0.94rem;
  }

  .app-shell.workspace-screen-deliver .delivery-workbench-items {
    gap: 6px;
  }

  .app-shell.workspace-screen-deliver .delivery-workbench-item {
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.42fr);
    align-items: center;
    gap: 8px;
    padding: 8px;
  }

  .app-shell.workspace-screen-deliver .delivery-workbench-title-line {
    flex-wrap: nowrap;
  }

  .app-shell.workspace-screen-deliver .delivery-workbench-item-copy strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-shell.workspace-screen-deliver .delivery-workbench-detail {
    -webkit-line-clamp: 1;
  }

  .app-shell.workspace-screen-deliver .delivery-workbench-status {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .app-shell.workspace-screen-deliver .delivery-workbench-actions {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 118px), 1fr));
    gap: 5px;
    justify-content: stretch;
    justify-self: stretch;
    width: 100%;
  }

  .app-shell.workspace-screen-deliver .delivery-workbench-actions button {
    min-height: 32px;
    padding-inline: 9px;
  }

  .app-shell.workspace-screen-deliver .record-progress,
  .app-shell.workspace-screen-deliver .record-result {
    gap: 8px;
    padding: 9px 10px;
  }

  .app-shell.workspace-screen-deliver .record-progress-header {
    gap: 8px;
  }

  .app-shell.workspace-screen-deliver .record-progress-track {
    height: 8px;
  }

  .app-shell.workspace-screen-deliver .record-result-actions {
    gap: 6px;
  }
}

:where(
  .input-panel,
  .editor-panel,
  .preview-panel,
  .editor-section,
  .tool-panel,
  .image-plan,
  .script-preview,
  .workflow-guide,
  .delivery-workbench,
  .readiness-panel,
  .record-result,
  #lessonText,
  #buildSlidesButton,
  #slideOutline,
  #audioPlayer,
  #generateAudioButton,
  #audioFile,
  #imagePlanDetails,
  #loadSourceImagesButton,
  #slideStartInput,
  #saveLibraryProjectButton,
  #downloadPackageButton,
  #recordWebmButton,
  #restartWebmButton
) {
  scroll-margin-top: var(--sticky-interface-offset);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

input,
select {
  height: 42px;
  padding: 0 11px;
}

textarea {
  min-height: 180px;
  resize: vertical;
  padding: 12px;
  line-height: 1.46;
}

.input-hint {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
  font-weight: 750;
}

.field-note {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
}

.field-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, max-content);
  align-items: end;
  gap: 10px;
}

.field-action-row label {
  min-width: 0;
  min-height: 42px;
  align-content: center;
}

#lessonText {
  min-height: 360px;
}

#slideBodyInput {
  min-height: 180px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(31, 138, 112, 0.68);
  box-shadow: 0 0 0 3px rgba(31, 138, 112, 0.12);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  box-shadow: 0 0 0 3px rgba(31, 138, 112, 0.14);
  outline: none;
}

.source-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.app-shell.workspace-screen-source .lesson-file-tools,
.app-shell.workspace-screen-media .lesson-file-tools {
  grid-template-columns: minmax(0, 1fr);
}

.image-position-tools {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
  padding: 8px 10px;
}

.image-position-tools summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  cursor: pointer;
  list-style: none;
}

.image-position-tools summary::-webkit-details-marker {
  display: none;
}

.image-position-tools summary::after {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.image-position-tools[open] summary::after {
  transform: rotate(225deg) translateY(-2px);
}

.image-position-tools summary span,
.image-position-controls,
.image-position-controls label {
  min-width: 0;
}

.image-position-tools strong,
.image-position-tools small {
  display: block;
}

.image-position-tools strong {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 900;
}

.image-position-tools small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
  line-height: 1.25;
}

.image-position-tools[hidden] {
  display: none;
}

.image-position-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr)) minmax(92px, max-content);
  align-items: end;
  gap: 10px;
  padding-top: 8px;
}

.image-position-controls label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.image-position-tools input[type="range"] {
  width: 100%;
  padding: 0;
}

.image-position-controls button {
  align-self: end;
}

.tool-panel {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
  padding: 12px;
}

.compact-heading {
  align-items: center;
}

.compact-heading h2 {
  font-size: 1rem;
}

.narration-actions {
  align-self: center;
  width: min(220px, 100%);
}

.script-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: visible;
}

.script-preview summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, max-content);
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 12px;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 850;
}

.script-preview summary span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.script-preview summary small {
  justify-self: end;
  min-width: 0;
  max-width: 100%;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  text-align: right;
  overflow-wrap: anywhere;
}

.script-preview textarea {
  display: block;
  min-height: 150px;
  border-width: 1px 0;
  border-radius: 0;
  background: var(--surface-subtle);
  color: var(--ink);
  font-size: 0.88rem;
}

.script-preview textarea:focus {
  box-shadow: none;
}

.slide-reference {
  margin-top: 2px;
}

.slide-reference textarea {
  min-height: 128px;
}

.mini-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), max-content));
  gap: 8px;
  justify-content: end;
  padding: 10px;
}

.mini-actions button {
  width: 100%;
  min-height: 36px;
  padding-inline: 12px;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.quick-actions button {
  min-height: 42px;
  white-space: normal;
}

.editor-section {
  display: grid;
  gap: 12px;
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.editor-section h3 {
  margin: 0;
  color: var(--accent-dark);
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.2;
}

.narration-actions,
.source-primary-actions,
.preview-primary-actions {
  width: auto;
}

.source-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 240px);
  align-items: center;
  gap: 10px;
}

.source-primary-actions {
  justify-content: flex-start;
  min-width: 0;
}

.lesson-text-primary-actions {
  justify-content: flex-end;
}

.lesson-text-primary-actions .popup-actions {
  flex: 0 1 180px;
}

.lesson-text-action-row {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.lesson-text-action-row label {
  min-height: 0;
}

.lesson-text-action-row .lesson-text-primary-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  justify-content: stretch;
  width: 100%;
}

.lesson-text-action-row .lesson-text-primary-actions button,
.lesson-text-action-row .lesson-text-primary-actions .popup-actions {
  width: 100%;
}

#lessonText,
#slideBodyInput {
  overflow-wrap: break-word;
}

.image-plan-primary-actions {
  justify-content: flex-start;
  margin-bottom: 8px;
}

.slide-text-primary-actions {
  justify-content: flex-end;
}

.timing-primary-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  justify-content: flex-start;
}

.timing-action-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 136px), 1fr));
  gap: 8px;
  min-width: 0;
}

.timing-action-group button {
  width: 100%;
}

.slide-primary-actions {
  justify-content: flex-start;
}

.preview-heading {
  display: grid;
  grid-template-columns: minmax(150px, 0.45fr) minmax(0, 1fr) minmax(190px, 230px);
  align-items: end;
}

.preview-primary-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(156px, 1fr));
  gap: 10px;
  justify-content: flex-end;
  justify-self: end;
  width: min(820px, 100%);
}

.preview-primary-actions > button,
.preview-primary-actions > .record-download-link {
  width: 100%;
}

.preview-primary-actions .record-download-link,
.preview-primary-actions .record-preview-button {
  min-height: 42px;
}

.script-actions {
  width: min(210px, 100%);
}

.sample-actions {
  width: min(180px, 100%);
}

.background-actions,
.picture-actions {
  width: min(230px, 100%);
}

.popup-actions {
  position: relative;
  width: min(220px, 100%);
}

.popup-actions[open] {
  z-index: 35;
}

.popup-actions summary {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px;
  font-weight: 800;
  list-style: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: none;
}

.popup-actions summary:focus-visible {
  border-color: rgba(31, 138, 112, 0.68);
  box-shadow: 0 0 0 3px rgba(31, 138, 112, 0.12);
  outline: none;
}

.popup-actions summary::-webkit-details-marker {
  display: none;
}

.popup-actions summary::after {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.16s ease;
}

.popup-actions[open] summary {
  border-color: rgba(31, 138, 112, 0.45);
  background: #f0f4f2;
  color: var(--accent-dark);
}

.popup-actions.is-unavailable summary {
  background: #f8faf9;
  color: var(--muted);
}

.popup-actions.is-unavailable summary::after {
  opacity: 0.55;
}

.popup-actions[open] summary::after {
  transform: rotate(225deg) translateY(-1px);
}

.popup-action-list {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  display: grid;
  gap: 8px;
  width: min(285px, calc(100vw - 48px));
  max-width: calc(100vw - 24px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-popover);
  box-sizing: border-box;
  max-height: var(--popup-menu-max-height, min(70vh, 420px));
  overflow: auto;
  overscroll-behavior: contain;
  padding: 10px;
}

.popup-actions.open-up .popup-action-list {
  top: auto;
  bottom: calc(100% + 8px);
}

.popup-actions:not([open]) .popup-action-list {
  display: none;
}

.popup-action-list.wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: var(--popup-menu-max-height, min(70vh, 560px));
  overflow: auto;
  width: min(540px, calc(100vw - 48px));
}

.popup-action-list button {
  width: 100%;
  height: auto;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 9px 12px;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-align: left;
  white-space: normal;
}

.popup-action-list button:focus-visible {
  border-color: rgba(31, 138, 112, 0.68);
  box-shadow: 0 0 0 3px rgba(31, 138, 112, 0.12);
  outline: none;
}

.popup-action-list button:disabled {
  cursor: not-allowed;
}

.popup-action-list.compact {
  width: min(220px, calc(100vw - 48px));
}

.popup-actions.floating-popup-actions .popup-action-list {
  position: fixed;
  top: var(--popup-menu-top, auto);
  left: var(--popup-menu-left, auto);
  right: auto;
  bottom: auto;
  width: var(--popup-menu-width, min(220px, calc(100vw - 48px)));
  z-index: 90;
}

.popup-actions.floating-popup-actions.open-up .popup-action-list {
  top: var(--popup-menu-top, auto);
  bottom: auto;
}

.popup-action-list.compact button {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 0.78rem;
}

.project-library-actions {
  align-self: end;
  grid-column: 1 / -1;
  justify-self: end;
}

.slide-actions {
  justify-self: end;
}

.preview-actions {
  align-self: end;
  justify-self: end;
  width: min(230px, 100%);
}

.preview-actions.readiness-menu-ready summary {
  border-color: rgba(31, 138, 112, 0.3);
  background: #f4fbf8;
  color: var(--accent-dark);
}

.preview-actions.readiness-menu-attention summary {
  border-color: rgba(154, 90, 31, 0.3);
  background: #fff9ef;
  color: var(--warn);
}

.control-grid,
.cue-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cue-tools {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.bullet-timing-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
  padding: 12px;
}

.bullet-timing-panel[hidden] {
  display: none;
}

.bullet-timing-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.bullet-timing-header h3 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.2;
}

.bullet-timing-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
}

.bullet-highlight-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.2;
}

.bullet-highlight-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.bullet-highlight-apply-button {
  min-height: 38px;
  padding-inline: 12px;
}

.bullet-highlight-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.bullet-timing-list {
  display: grid;
  gap: 8px;
}

.bullet-timing-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(92px, 112px) minmax(0, 120px) minmax(0, 76px);
  gap: 8px;
  align-items: center;
}

.bullet-timing-text {
  min-width: 0;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.3;
  overflow-wrap: anywhere;
  white-space: normal;
}

.bullet-timing-row input {
  height: 38px;
}

.bullet-timing-row button {
  width: 100%;
  min-width: 0;
}

.slide-outline {
  display: grid;
  gap: 7px;
  max-height: 240px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
  padding: 8px;
}

.slide-outline[hidden] {
  display: none;
}

.slide-outline-empty {
  display: grid;
  gap: 5px;
  min-height: 70px;
  align-content: center;
  border: 1px dashed rgba(31, 138, 112, 0.28);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  padding: 12px;
}

.slide-outline-empty strong {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.2;
}

.slide-outline-empty span {
  max-width: 46ch;
  font-size: 0.8rem;
  font-weight: 750;
  line-height: 1.3;
}

.slide-outline button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) minmax(0, max-content);
  gap: 12px;
  align-items: start;
  width: 100%;
  min-height: 70px;
  border-color: transparent;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  text-align: left;
}

.slide-outline button:hover,
.slide-outline button.active {
  border-color: rgba(31, 138, 112, 0.38);
  background: #f3f8f5;
}

.slide-outline button:focus-visible,
.slide-timeline button:focus-visible {
  border-color: rgba(31, 138, 112, 0.68);
  box-shadow: 0 0 0 3px rgba(31, 138, 112, 0.12);
  outline: none;
}

.slide-outline-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-top: 2px;
  border-radius: 6px;
  background: rgba(31, 138, 112, 0.1);
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

.slide-outline-text {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.slide-outline-text strong,
.slide-outline-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slide-outline-text strong {
  font-size: 0.88rem;
  line-height: 1.2;
}

.slide-outline-text small,
.slide-outline-time {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.25;
}

.slide-outline-time {
  display: grid;
  gap: 2px;
  justify-self: end;
  justify-items: end;
  min-width: 58px;
  max-width: 100%;
  white-space: nowrap;
}

.slide-outline-time span {
  color: var(--ink);
  font-weight: 850;
}

.slide-outline-time small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.slide-outline-polish {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
  margin-top: 1px;
}

.slide-outline-polish span {
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(31, 138, 112, 0.24);
  border-radius: 999px;
  background: rgba(31, 138, 112, 0.08);
  color: var(--accent-dark);
  padding: 2px 6px;
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-plan {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
  overflow: hidden;
}

.image-plan[hidden] {
  display: none;
}

.image-plan summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, max-content);
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 12px;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 850;
}

.image-plan summary span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.image-plan summary small {
  justify-self: end;
  min-width: 0;
  max-width: 100%;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  text-align: right;
  overflow-wrap: anywhere;
}

.image-plan-toolbar {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding: 8px;
}

.image-plan-toolbar[hidden] {
  display: none;
}

.image-plan-task-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 8px;
}

.image-plan-task-summary strong {
  flex: 1 1 160px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.image-plan-task-summary.ready strong {
  color: var(--accent-dark);
}

.image-plan-task-summary.attention strong {
  color: var(--warn);
}

.image-plan-task-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--muted);
  padding: 5px 8px;
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
}

.image-plan-task-chip.ready {
  border-color: rgba(31, 138, 112, 0.25);
  background: rgba(31, 138, 112, 0.08);
  color: var(--accent-dark);
}

.image-plan-task-chip.attention {
  border-color: rgba(154, 90, 31, 0.25);
  background: rgba(154, 90, 31, 0.09);
  color: var(--warn);
}

.image-plan-toolbar button {
  min-height: 36px;
}

.image-plan-toolbar > div {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.image-plan-menu {
  width: min(230px, 100%);
}

.image-plan-toolbar small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 750;
  text-align: right;
}

.image-plan-list {
  display: grid;
  gap: 7px;
  max-height: 190px;
  overflow: auto;
  border-top: 1px solid var(--line);
  padding: 8px;
}

.image-plan-empty {
  display: grid;
  gap: 4px;
  border: 1px dashed rgba(31, 138, 112, 0.28);
  border-radius: 8px;
  background: rgba(31, 138, 112, 0.035);
  color: var(--muted);
  padding: 12px;
}

.image-plan-empty strong {
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.2;
  font-weight: 900;
}

.image-plan-empty span {
  max-width: 54ch;
  font-size: 0.84rem;
  line-height: 1.35;
  font-weight: 750;
}

.image-plan-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, max-content);
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #fff;
  padding: 6px;
}

.image-plan-row:hover,
.image-plan-row.active {
  border-color: rgba(31, 138, 112, 0.38);
  background: #f3f8f5;
}

.image-plan-main {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) minmax(0, max-content);
  gap: 10px;
  align-items: center;
  min-height: 44px;
  border-color: transparent;
  background: transparent;
  color: var(--ink);
  padding: 2px 4px;
  text-align: left;
}

.image-plan-main:hover {
  background: transparent;
}

.image-plan-thumb {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(32, 59, 80, 0.1);
  color: var(--deep);
  font-size: 0.78rem;
  font-weight: 900;
}

.image-plan-thumb.has-image {
  border: 1px solid rgba(31, 138, 112, 0.32);
  background: #fff;
  cursor: zoom-in;
}

.image-plan-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-plan-text {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.image-plan-text strong,
.image-plan-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-plan-text strong {
  font-size: 0.86rem;
}

.image-plan-text small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.image-plan-status {
  max-width: 100%;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 0.72rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.image-plan-status.done {
  background: rgba(31, 138, 112, 0.12);
  color: var(--accent-dark);
}

.image-plan-status.needed {
  background: rgba(154, 90, 31, 0.12);
  color: var(--warn);
}

.image-plan-status.source {
  background: rgba(32, 59, 80, 0.1);
  color: var(--deep);
}

.image-plan-status.optional {
  background: var(--surface-subtle);
  color: var(--muted);
}

.image-plan-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
}

.image-plan-row-actions button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.image-plan-actions {
  justify-self: end;
  width: min(136px, 100%);
}

.image-plan-actions summary {
  min-height: 36px;
  padding: 0 10px;
  font-size: 0.8rem;
}

.image-plan-preview-popover {
  position: fixed;
  z-index: 65;
  display: grid;
  gap: 8px;
  width: min(320px, calc(100vw - 24px));
  border: 1px solid rgba(31, 138, 112, 0.32);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-popover);
  padding: 10px;
}

.image-plan-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.image-plan-preview-header strong {
  min-width: 0;
  font-size: 0.88rem;
}

.image-plan-preview-header button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 0.74rem;
}

.image-plan-preview-popover img {
  width: 100%;
  max-height: min(260px, 42vh);
  border-radius: 6px;
  object-fit: contain;
  background: var(--surface-subtle);
}

.image-plan-preview-popover small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.size-note {
  align-self: end;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  padding: 10px 11px;
  font-size: 0.82rem;
  font-weight: 800;
}

.download-link {
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: none;
}

.download-link:hover {
  text-decoration: underline;
}

.voice-preview-player {
  width: 100%;
}

.voice-preview-player[hidden] {
  display: none;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.action-row {
  justify-content: flex-end;
  align-items: center;
}

.source-action-row {
  align-items: center;
}

.source-actions {
  justify-self: end;
  width: 100%;
}

.text-tools {
  justify-self: end;
  margin-top: -4px;
  width: min(230px, 100%);
}

.autosave-status {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-align: center;
  white-space: normal;
}

.autosave-status.saving {
  border-color: rgba(154, 90, 31, 0.32);
  color: var(--warn);
}

.autosave-status.saved {
  border-color: rgba(31, 138, 112, 0.32);
  color: var(--accent-dark);
}

.autosave-status.error {
  border-color: rgba(163, 61, 61, 0.28);
  color: var(--error);
}

.workflow-guide {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
  padding: 12px;
}

.workflow-guide.ready {
  border-color: rgba(31, 138, 112, 0.32);
  background: #fbfffd;
}

.workflow-guide.attention {
  border-color: rgba(154, 90, 31, 0.32);
  background: #fffdf8;
}

.workflow-guide.missing {
  border-color: rgba(163, 61, 61, 0.3);
  background: #fffafa;
}

.workflow-guide-copy {
  min-width: 0;
}

.workflow-guide-copy h2 {
  margin-bottom: 4px;
  font-size: 1.05rem;
  line-height: 1.25;
  overflow-wrap: normal;
}

.workflow-guide-copy p:last-child {
  max-width: 72ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.35;
}

.workflow-guide-actions {
  display: grid;
  grid-template-columns: minmax(150px, max-content) minmax(170px, max-content) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.workflow-guide-actions button {
  width: min(210px, 100%);
  min-width: 0;
}

.workflow-guide-actions .workflow-auto-prep-button {
  width: min(230px, 100%);
}

.workflow-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  width: 100%;
  overflow-x: auto;
  padding: 2px 1px 4px;
  scrollbar-width: thin;
}

.workflow-steps[hidden] {
  display: none;
}

.workflow-step {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 0 9px;
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
}

.workflow-step.ready {
  border-color: rgba(31, 138, 112, 0.25);
  color: var(--accent-dark);
}

.workflow-step.attention {
  border-color: rgba(154, 90, 31, 0.25);
  color: var(--warn);
}

.workflow-step.waiting {
  color: var(--muted);
  opacity: 0.72;
}

.workflow-step strong,
.workflow-step small {
  font: inherit;
}

.workflow-step small {
  color: inherit;
  opacity: 0.78;
}

.record-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.delivery-workbench {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
  padding: 12px;
}

.delivery-workbench.ready {
  border-color: rgba(31, 138, 112, 0.32);
}

.delivery-workbench.attention {
  border-color: rgba(154, 90, 31, 0.28);
}

.delivery-workbench-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, max-content);
  align-items: start;
  gap: 12px;
}

.delivery-workbench-header-actions {
  display: flex;
  justify-self: end;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.delivery-workbench-header h2 {
  margin-bottom: 0;
  font-size: 1rem;
}

.delivery-workbench-header-actions span {
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(31, 138, 112, 0.24);
  border-radius: 999px;
  background: #fff;
  color: var(--accent-dark);
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 900;
  overflow-wrap: anywhere;
  text-align: right;
}

.delivery-workbench-header-actions .compact-action-button {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 0.82rem;
}

.delivery-workbench-items {
  display: grid;
  gap: 7px;
}

.delivery-workbench.details-collapsed {
  gap: 0;
  padding-block: 9px;
}

.delivery-workbench.details-collapsed .delivery-workbench-header {
  align-items: center;
}

.delivery-workbench.details-collapsed .delivery-workbench-items,
.delivery-workbench.recording-collapsed .delivery-workbench-items {
  display: none;
}

.delivery-workbench.details-collapsed .eyebrow {
  margin-bottom: 2px;
}

.delivery-workbench-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 310px);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
}

.delivery-workbench-item.ready {
  border-color: rgba(31, 138, 112, 0.22);
}

.delivery-workbench-item.attention {
  border-color: rgba(154, 90, 31, 0.22);
}

.delivery-workbench-item-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.delivery-workbench-title-line {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.delivery-workbench-item-copy strong {
  font-size: 0.88rem;
  line-height: 1.2;
}

.delivery-workbench-detail {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.delivery-workbench-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-width: 0;
  max-width: 100%;
  border-radius: 999px;
  background: #f4f7f5;
  color: var(--muted);
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.1;
  overflow-wrap: anywhere;
  white-space: normal;
}

.delivery-workbench-item.ready .delivery-workbench-status {
  background: rgba(31, 138, 112, 0.1);
  color: var(--accent-dark);
}

.delivery-workbench-item.attention .delivery-workbench-status {
  background: rgba(154, 90, 31, 0.1);
  color: var(--warn);
}

.delivery-workbench-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  justify-content: flex-end;
  justify-self: end;
  gap: 6px;
  width: min(310px, 100%);
}

.delivery-workbench-actions button {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.qa-sample-guide {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(31, 138, 112, 0.26);
  border-radius: 8px;
  background: #f7fbf9;
  padding: 12px;
}

.qa-sample-guide[hidden] {
  display: none;
}

.qa-sample-guide-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, max-content);
  align-items: center;
  gap: 12px;
}

.qa-sample-guide-header h2 {
  min-width: 0;
  color: var(--ink);
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.qa-sample-guide-header span {
  justify-self: end;
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(31, 138, 112, 0.26);
  border-radius: 999px;
  background: #fff;
  color: var(--accent-dark);
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
  overflow-wrap: anywhere;
}

.qa-sample-guide p,
.qa-sample-guide li {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.38;
}

.qa-sample-guide p {
  margin: 0;
}

.qa-sample-guide ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 1.15rem;
}

.qa-sample-guide strong {
  color: var(--ink);
}

.qa-sample-guide-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), max-content));
  justify-content: end;
  gap: 8px;
}

.qa-sample-guide-actions button {
  width: 100%;
  min-height: 36px;
  padding-inline: 12px;
  font-size: 0.82rem;
}

.record-check-item {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
  padding: 10px 11px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.record-check-item.ready {
  border-color: rgba(31, 138, 112, 0.28);
  background: #fbfffd;
}

.record-check-item.attention {
  border-color: rgba(154, 90, 31, 0.28);
  background: #fffdf8;
}

.record-check-item.missing {
  border-color: rgba(163, 61, 61, 0.28);
  background: #fffafa;
}

.record-check-item:hover {
  border-color: rgba(31, 138, 112, 0.34);
  box-shadow: 0 3px 8px rgba(33, 45, 40, 0.08);
  transform: translateY(-1px);
}

.record-check-item:focus-visible {
  border-color: rgba(31, 138, 112, 0.45);
  box-shadow: 0 0 0 3px rgba(31, 138, 112, 0.12);
  outline: none;
}

.record-check-item strong,
.record-check-item span,
.record-check-item small {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.record-check-item strong {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 900;
}

.record-check-item span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.record-check-item small {
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 900;
}

.record-check-item.attention small {
  color: var(--warn);
}

.record-check-item.missing small {
  color: var(--error);
}

.readiness-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
  padding: 12px;
}

.readiness-panel[hidden] {
  display: none;
}

.readiness-panel.ready {
  border-color: rgba(31, 138, 112, 0.32);
  background: #fbfffd;
}

.readiness-panel.attention {
  border-color: rgba(154, 90, 31, 0.32);
  background: #fffdf8;
}

.readiness-panel.missing {
  border-color: rgba(163, 61, 61, 0.3);
  background: #fffafa;
}

.readiness-panel-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, max-content);
  align-items: center;
  gap: 12px;
}

.readiness-panel-header h2 {
  font-size: 1rem;
}

.readiness-panel-header span {
  justify-self: end;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 900;
  overflow-wrap: anywhere;
  text-align: right;
}

.readiness-panel p,
.readiness-panel li {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.35;
}

.readiness-panel p {
  margin: 0;
}

.readiness-next-fix {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, max-content);
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(31, 138, 112, 0.22);
  border-radius: 8px;
  background: #fff;
  padding: 8px 9px 8px 11px;
}

.readiness-next-fix[hidden] {
  display: none;
}

.readiness-next-fix span {
  min-width: 0;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 850;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.readiness-next-fix-button {
  justify-self: end;
  min-height: 32px;
  max-width: 100%;
  padding: 0 10px;
  font-size: 0.76rem;
}

.readiness-panel .readiness-issue-position {
  justify-self: start;
  border: 1px solid rgba(31, 138, 112, 0.24);
  border-radius: 999px;
  background: #fff;
  color: var(--accent-dark);
  padding: 5px 9px;
  font-size: 0.78rem;
  font-weight: 900;
}

.readiness-panel .readiness-issue-position[hidden] {
  display: none;
}

.readiness-panel ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 1.1rem;
}

.readiness-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  align-items: start;
  gap: 8px;
}

.readiness-actions[hidden] {
  display: none;
}

.readiness-action-button {
  width: 100%;
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.8rem;
}

.readiness-action-menu {
  width: 100%;
}

.readiness-action-menu summary {
  width: 100%;
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.8rem;
}

.readiness-finding-button {
  min-height: 0;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  padding: 0;
  font-size: inherit;
  font-weight: 850;
  line-height: inherit;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.readiness-finding-button:hover {
  background: transparent;
  color: var(--accent);
}

.readiness-finding-button:focus-visible {
  border-radius: 4px;
  box-shadow: 0 0 0 3px rgba(31, 138, 112, 0.12);
  outline: none;
}

.readiness-category-item {
  display: flex;
  align-items: center;
  gap: 7px;
  list-style: none;
  margin: 8px 0 0 -1.1rem;
}

.readiness-category-item:first-child {
  margin-top: 0;
}

.readiness-category-heading {
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.readiness-category-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border: 1px solid rgba(31, 138, 112, 0.2);
  border-radius: 999px;
  background: #fff;
  color: var(--accent-dark);
  font-size: 0.74rem;
  font-weight: 950;
}

.readiness-finding-item {
  padding-right: 4px;
}

.readiness-ready-item {
  display: grid;
  gap: 3px;
  list-style: none;
  margin-left: -1.1rem;
  border: 1px solid rgba(31, 138, 112, 0.24);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
}

.readiness-ready-item strong {
  color: var(--accent-dark);
  font-size: 0.86rem;
  line-height: 1.2;
  font-weight: 950;
}

.readiness-ready-item span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
  font-weight: 750;
}

.readiness-current-finding {
  color: var(--accent-dark);
  font-weight: 900;
}

.readiness-current-finding::marker {
  color: var(--accent);
}

.readiness-current-finding .readiness-finding-button {
  color: var(--ink);
  text-decoration-thickness: 2px;
}

.readiness-list-control {
  list-style: none;
  margin-left: -1.1rem;
}

.readiness-toggle-button {
  min-height: 0;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  padding: 2px 0;
  font-size: inherit;
  font-weight: 900;
  line-height: inherit;
  text-align: left;
}

.readiness-toggle-button:hover {
  background: transparent;
  color: var(--accent);
}

.readiness-toggle-button:focus-visible {
  border-radius: 4px;
  box-shadow: 0 0 0 3px rgba(31, 138, 112, 0.12);
  outline: none;
}

.record-progress {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(31, 138, 112, 0.28);
  border-radius: 8px;
  background: var(--surface-subtle);
  padding: 11px 12px;
}

.record-progress.warning {
  border-color: rgba(154, 90, 31, 0.34);
  background: #fffaf1;
}

.record-progress.warning .record-progress-track {
  background: #f7e6cf;
}

.record-progress.warning .record-progress-track div {
  background: var(--warn);
}

.record-progress.warning .record-progress-note,
.record-progress.warning .record-progress-header span {
  color: var(--warn);
}

.record-progress[hidden] {
  display: none;
}

.record-progress-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, max-content);
  align-items: center;
  gap: 12px;
}

.record-progress-header strong {
  min-width: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.record-progress-header span {
  justify-self: end;
  min-width: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.record-progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8f0ec;
}

.record-progress-track div {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.16s ease;
}

.record-progress-note {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.record-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, max-content);
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(31, 138, 112, 0.22);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.record-result[hidden] {
  display: none;
}

.record-result.previous {
  border-color: rgba(154, 90, 31, 0.24);
  background: #fffaf1;
}

.record-result.warning {
  border-color: rgba(154, 90, 31, 0.34);
  background: #fffaf1;
}

.record-result strong,
.record-result span {
  display: block;
}

.record-result > div:first-child {
  min-width: 0;
}

.record-result strong {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 900;
}

.record-result .record-result-health {
  margin-top: 4px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.25;
}

.record-result.warning .record-result-health,
.record-result.previous .record-result-health {
  color: #995a1f;
}

.record-result .record-result-note {
  margin-top: 4px;
  color: #7c4a1c;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.3;
}

.record-result .record-result-note[hidden] {
  display: none;
}

.record-result span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.record-download-link {
  flex: 0 0 auto;
  min-height: 38px;
  max-width: 100%;
  border: 1px solid rgba(31, 138, 112, 0.32);
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
}

.record-result > .record-download-link {
  justify-self: end;
  max-width: 100%;
  white-space: normal;
}

.record-download-link:hover {
  background: var(--accent-dark);
  text-decoration: none;
}

.record-download-link.secondary-download {
  border-color: rgba(154, 90, 31, 0.28);
  background: #fff;
  color: var(--warn);
}

.record-download-link.secondary-download:hover {
  background: #fff4e5;
  color: var(--warn);
}

.record-download-link[hidden] {
  display: none;
}

.record-result-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  justify-self: end;
  max-width: 100%;
  gap: 8px;
}

.record-preview-button {
  min-height: 38px;
  max-width: 100%;
  padding: 0 13px;
  font-size: 0.84rem;
}

.record-preview-button[hidden] {
  display: none;
}

.webm-preview-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(31, 138, 112, 0.24);
  border-radius: 8px;
  background: #0f1715;
}

.webm-preview-player[hidden] {
  display: none;
}

@media (max-width: 760px) {
  .image-plan summary,
  .qa-sample-guide-header {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 4px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .image-plan summary small,
  .qa-sample-guide-header span {
    justify-self: start;
    text-align: left;
    white-space: normal;
  }

  .image-plan-row {
    grid-template-columns: 1fr;
  }

  .image-plan-main {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .image-plan-status {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .image-plan-row-actions,
  .image-plan-actions {
    justify-self: stretch;
    width: 100%;
  }

  .image-plan-row-actions button {
    flex: 1 1 120px;
  }

  .field-action-row {
    grid-template-columns: 1fr;
  }

  .lesson-text-primary-actions,
  .lesson-text-primary-actions .popup-actions,
  .slide-text-primary-actions,
  .slide-text-primary-actions .popup-actions {
    width: 100%;
  }

  .lesson-text-primary-actions button,
  .lesson-text-primary-actions summary,
  .slide-text-primary-actions button,
  .slide-text-primary-actions summary {
    flex: 1 1 140px;
  }
}

button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  cursor: wait;
  opacity: 0.68;
}

button.secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

button.secondary:hover {
  background: #f0f4f2;
}

button.workflow-step {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 0 9px;
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
}

button.workflow-step:hover {
  background: #f4fbf8;
  box-shadow: 0 0 0 3px rgba(31, 138, 112, 0.08);
}

button.workflow-step.ready {
  border-color: rgba(31, 138, 112, 0.25);
  color: var(--accent-dark);
}

button.workflow-step.attention {
  border-color: rgba(154, 90, 31, 0.25);
  color: var(--warn);
}

button.workflow-step.waiting {
  color: var(--muted);
  opacity: 0.72;
}

button.workflow-step.current {
  border-color: rgba(31, 138, 112, 0.55);
  background: #eef8f4;
  color: var(--accent-dark);
  opacity: 1;
  box-shadow: 0 0 0 3px rgba(31, 138, 112, 0.1);
}

button.workflow-step.screen-current:not(.current) {
  border-color: rgba(31, 138, 112, 0.4);
  background: #f6fbf8;
  color: var(--accent-dark);
  opacity: 1;
}

button.workflow-step.current small {
  opacity: 0.9;
}

button.workflow-step:focus-visible {
  border-color: rgba(31, 138, 112, 0.68);
  box-shadow: 0 0 0 3px rgba(31, 138, 112, 0.12);
  outline: none;
}

#downloadReadinessButton.readiness-button-ready {
  border-color: rgba(31, 138, 112, 0.3);
  background: #f4fbf8;
  color: var(--accent-dark);
}

#downloadReadinessButton.readiness-button-attention {
  border-color: rgba(154, 90, 31, 0.3);
  background: #fff9ef;
  color: var(--warn);
}

#recordWebmButton.record-button-attention {
  border-color: rgba(154, 90, 31, 0.38);
  background: #9a5a1f;
}

#recordWebmButton.record-button-attention:hover {
  background: #7f4617;
}

button.danger,
button.secondary.danger {
  border-color: rgba(163, 61, 61, 0.28);
  background: var(--error-bg);
  color: var(--error);
}

.app-dialog {
  width: min(560px, calc(100vw - 32px));
  border: 0;
  background: transparent;
  padding: 0;
}

.app-dialog::backdrop {
  background: rgba(24, 33, 31, 0.48);
}

.app-dialog-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-popover);
  padding: 18px;
}

.app-dialog-card p,
.app-dialog-body {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.42;
}

#actionDialogBody {
  white-space: pre-line;
}

.final-qa-progress {
  display: grid;
  gap: 12px;
  white-space: normal;
}

.final-qa-progress-summary,
.final-qa-progress-pass {
  margin: 0;
}

.final-qa-progress-list {
  display: grid;
  gap: 8px;
}

.final-qa-progress-item {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
  padding: 10px;
}

.final-qa-progress-item input {
  margin: 3px 0 0;
}

.final-qa-progress-item span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.final-qa-progress-item strong {
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.final-qa-progress-item small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.final-qa-progress-time {
  color: var(--accent-dark);
}

.final-qa-progress-time[hidden] {
  display: none;
}

.final-qa-progress-pass {
  border: 1px solid rgba(31, 138, 112, 0.22);
  border-radius: 8px;
  background: #f4fbf8;
  color: var(--accent-dark);
  padding: 10px;
}

.final-qa-progress-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr));
  gap: 8px;
}

.final-qa-progress-actions button {
  width: 100%;
}

.dialog-input {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.dialog-error {
  margin: -4px 0 0;
  color: var(--error);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

.dialog-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, max-content));
  justify-content: flex-end;
  gap: 10px;
}

.dialog-actions button {
  min-width: 120px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.metrics div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-subtle);
}

.metrics span {
  display: block;
  font-size: 1.25rem;
  font-weight: 850;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.metrics small {
  display: block;
  overflow-wrap: anywhere;
}

.metrics small,
.player-progress-text,
.message {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.player-progress-text {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  min-height: 22px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.player-progress-text span {
  min-width: 0;
}

.player-progress-text span:last-child {
  color: var(--accent-dark);
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timing-timeline-tools {
  display: none;
}

.app-shell.workspace-screen-timing .timing-timeline-tools {
  display: grid;
  grid-template-columns: minmax(180px, 0.46fr) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(31, 138, 112, 0.22);
  border-radius: 8px;
  background: #f7fbf9;
}

.timing-timeline-tools strong,
.timing-timeline-tools span {
  display: block;
  min-width: 0;
}

.timing-timeline-status {
  min-width: 0;
  overflow: hidden;
}

.timing-timeline-tools strong {
  color: var(--accent-dark);
  font-size: 0.84rem;
  font-weight: 950;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timing-timeline-tools span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timing-action-feedback {
  min-height: 16px;
  color: var(--accent-dark);
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.timing-action-feedback.active {
  opacity: 1;
  transform: translateY(0);
}

.timing-timeline-actions {
  display: grid;
  grid-template-columns: minmax(120px, 1.2fr) minmax(120px, 1.2fr) minmax(94px, 0.9fr) minmax(112px, 0.95fr);
  gap: 8px;
}

.timing-timeline-actions button {
  min-height: 40px;
  padding: 8px 10px;
}

.timing-timeline-actions button.cue-confirmed,
.timing-primary-actions button.cue-confirmed {
  border-color: rgba(31, 138, 112, 0.58);
  background: #edf8f4;
  color: var(--accent-dark);
  transform: translateY(-1px);
}

.message {
  min-height: 22px;
  line-height: 1.35;
}

.message.error {
  color: var(--error);
}

.message.warning {
  color: var(--warn);
}

.message.success {
  color: var(--accent-dark);
}

.slide-stage {
  display: grid;
  grid-template-columns: minmax(210px, 0.82fr) minmax(0, 1.18fr);
  container-type: inline-size;
  aspect-ratio: 16 / 9;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  background-position: center;
  background-size: cover;
}

.slide-stage.has-background {
  border-color: rgba(31, 138, 112, 0.32);
}

.slide-stage.full-image-slide {
  display: block;
  position: relative;
}

.slide-stage.slide-stage-transitioning {
  animation: slide-stage-soft-fade 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slide-stage-soft-fade {
  from {
    opacity: 0.58;
    filter: blur(0.6px);
  }

  to {
    opacity: 1;
    filter: blur(0);
  }
}

.full-slide-image {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  cursor: grab;
  touch-action: none;
  user-select: none;
  will-change: transform, object-position;
}

.slide-empty {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  place-items: center;
  align-content: center;
  min-height: 420px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.slide-empty strong {
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1.1;
  font-weight: 950;
}

.slide-empty span {
  max-width: 32ch;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 750;
}

.slide-media {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--deep) 0%, var(--accent) 100%);
  color: #fff;
}

.has-background .slide-media {
  background: rgba(32, 59, 80, 0.74);
  backdrop-filter: blur(1px);
}

.slide-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: grab;
  touch-action: none;
  user-select: none;
  will-change: transform, object-position;
}

.slide-media img.dragging-image,
.full-slide-image.dragging-image {
  cursor: grabbing;
}

.slide-generated-mark {
  display: grid;
  place-items: center;
  width: min(62%, 250px);
  width: min(62%, 23cqw, 250px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.58);
  color: #fff;
  font-size: clamp(2rem, 5vw, 4.2rem);
  font-size: clamp(2rem, 5.4cqw, 4.2rem);
  font-weight: 950;
}

.slide-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  gap: clamp(8px, 1.2cqw, 14px);
  padding: clamp(18px, 3vw, 44px);
  padding: clamp(18px, 3.1cqw, 44px);
  background: rgba(255, 255, 255, 0.92);
}

.slide-kicker {
  margin: 0;
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.slide-copy h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.35rem, 3vw, 3.05rem);
  font-size: clamp(1.35rem, 4.35cqw, 3.05rem);
  line-height: 1.05;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.slide-body {
  margin: 0;
  color: #283633;
  font-size: clamp(0.92rem, 1.25vw, 1.18rem);
  font-size: clamp(0.92rem, 1.55cqw, 1.18rem);
  line-height: 1.38;
  font-weight: 700;
}

.slide-copy.slide-copy-fit-tight {
  gap: 8px;
  padding: clamp(14px, 2.4vw, 34px);
  padding: clamp(14px, 2.6cqw, 34px);
}

.slide-copy.slide-copy-fit-tight h3 {
  font-size: clamp(1.25rem, 2.65vw, 2.7rem);
  font-size: clamp(1.25rem, 3.9cqw, 2.7rem);
  line-height: 1.04;
}

.slide-copy.slide-copy-fit-tight .slide-body {
  font-size: clamp(0.86rem, 1.08vw, 1.05rem);
  font-size: clamp(0.86rem, 1.38cqw, 1.05rem);
  line-height: 1.34;
}

.slide-copy.slide-copy-fit-compact {
  gap: 6px;
  padding: clamp(12px, 2vw, 28px);
  padding: clamp(12px, 2.2cqw, 28px);
}

.slide-copy.slide-copy-fit-compact h3 {
  font-size: clamp(1.15rem, 2.35vw, 2.35rem);
  font-size: clamp(1.15rem, 3.45cqw, 2.35rem);
}

.slide-copy.slide-copy-fit-compact .slide-body {
  font-size: clamp(0.82rem, 0.98vw, 0.98rem);
  font-size: clamp(0.82rem, 1.22cqw, 0.98rem);
  line-height: 1.3;
}

.slide-copy.slide-copy-fit-dense {
  justify-content: flex-start;
  gap: 5px;
  padding: clamp(10px, 1.7vw, 24px);
  padding: clamp(10px, 1.9cqw, 24px);
}

.slide-copy.slide-copy-fit-dense h3 {
  font-size: clamp(1.06rem, 2.1vw, 2rem);
  font-size: clamp(1.06rem, 3.05cqw, 2rem);
}

.slide-copy.slide-copy-fit-dense .slide-body {
  font-size: clamp(0.78rem, 0.88vw, 0.92rem);
  font-size: clamp(0.78rem, 1.08cqw, 0.92rem);
  line-height: 1.26;
}

.slide-copy.slide-copy-fit-dense .slide-kicker {
  font-size: 0.72rem;
}

.slide-copy.slide-copy-fit-micro {
  justify-content: flex-start;
  gap: 4px;
  padding: clamp(8px, 1.55cqw, 20px);
}

.slide-copy.slide-copy-fit-micro h3 {
  font-size: clamp(0.96rem, 2.55cqw, 1.7rem);
  line-height: 1.03;
}

.slide-copy.slide-copy-fit-micro .slide-body {
  font-size: clamp(0.72rem, 0.94cqw, 0.84rem);
  line-height: 1.2;
}

.slide-copy.slide-copy-fit-micro .slide-kicker {
  font-size: 0.68rem;
}

.slide-copy.slide-copy-fit-micro .slide-body ul,
.slide-copy.slide-copy-fit-micro .slide-body ol {
  gap: 0.2em;
}

.slide-body p,
.slide-body ul,
.slide-body ol {
  margin: 0;
}

.slide-body ul,
.slide-body ol {
  display: grid;
  gap: 0.35em;
  padding-left: 1.15em;
}

.slide-body li {
  border-radius: 6px;
  padding-left: 0.1em;
  transition: background-color 180ms ease, color 180ms ease;
}

.slide-body.has-highlight li {
  color: #65716c;
}

.slide-body li.active-bullet {
  margin-left: -0.22em;
  padding: 0.08em 0.25em 0.08em 0.32em;
  background: rgba(31, 138, 112, 0.12);
  color: var(--accent-dark);
  font-weight: 950;
}

audio {
  width: 100%;
  min-height: 42px;
}

.player-audio-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.player-jog-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(48px, max-content));
  gap: 6px;
}

.player-jog-controls button {
  min-height: 38px;
  padding-inline: 10px;
  font-size: 0.82rem;
}

.player-jog-controls button.cue-confirmed {
  border-color: rgba(31, 138, 112, 0.44);
  background: #edf8f4;
  color: var(--accent-dark);
  transform: translateY(-1px);
}

.player-progress {
  height: 10px;
  overflow: hidden;
  border: 1px solid rgba(31, 138, 112, 0.28);
  border-radius: 999px;
  background: #eef4f1;
  cursor: pointer;
}

.player-progress div {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.18s ease;
}

.slide-timeline {
  display: grid;
  grid-auto-columns: 34px;
  grid-auto-flow: column;
  grid-template-columns: none;
  align-items: center;
  justify-content: start;
  gap: 6px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  padding: 2px 2px 5px;
  scrollbar-gutter: stable;
}

.slide-timeline button {
  width: 34px;
  min-height: 32px;
  padding: 0;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  scroll-snap-align: center;
}

.slide-timeline button.playing {
  border-color: rgba(31, 138, 112, 0.55);
  background: #f6fbf8;
  color: var(--accent-dark);
}

.slide-timeline button.active.playing {
  box-shadow: 0 0 0 3px rgba(31, 138, 112, 0.1);
}

.slide-timeline button.active:not(.playing) {
  border-color: rgba(166, 96, 31, 0.38);
  background: #fffaf1;
  color: var(--warn);
}

@media (max-width: 920px) {
  .app-shell.workspace-screen-timing .timing-timeline-tools {
    grid-template-columns: minmax(0, 1fr);
  }

  .timing-timeline-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html {
    scroll-padding-top: var(--sticky-interface-offset);
  }

  :where(
    .input-panel,
    .editor-panel,
    .preview-panel,
    .editor-section,
    .tool-panel,
    .image-plan,
    .script-preview,
    .workflow-guide,
    .delivery-workbench,
    .readiness-panel,
    .record-result,
    #lessonText,
    #buildSlidesButton,
    #slideOutline,
    #audioPlayer,
    #generateAudioButton,
    #audioFile,
    #imagePlanDetails,
    #loadSourceImagesButton,
    #slideStartInput,
    #saveLibraryProjectButton,
    #downloadPackageButton,
    #recordWebmButton
  ) {
    scroll-margin-top: var(--sticky-interface-offset);
  }

  .topbar,
  .section-heading {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .topbar-actions {
    justify-content: flex-start;
  }

  .preview-heading {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .preview-primary-actions,
  .preview-actions {
    justify-self: stretch;
    width: 100%;
  }

  .workspace,
  .slide-stage {
    grid-template-columns: 1fr;
    aspect-ratio: auto;
  }

  .app-shell.workspace-screen-slides .editor-panel {
    grid-template-columns: 1fr;
    grid-template-areas:
      "slides-head"
      "slides-list"
      "slide-edit"
      "slide-actions";
  }

  .app-shell.workspace-screen-slides .slide-outline {
    max-height: min(56vh, 520px);
  }

  .app-shell.workspace-screen-media .workspace {
    grid-template-columns: 1fr;
  }

  .app-shell.workspace-screen-timing .workspace {
    grid-template-columns: 1fr;
    grid-template-areas:
      "timing-preview"
      "timing-workbench";
  }

  .app-shell.workspace-screen-timing .editor-panel {
    grid-template-columns: 1fr;
    grid-template-areas:
      "timing-head"
      "timing-editor"
      "timing-list";
  }

  .app-shell.workspace-screen-timing .slide-outline {
    display: none;
  }

  .app-shell.workspace-screen-review .preview-panel {
    grid-template-columns: 1fr;
    grid-template-areas:
      "review-head"
      "review-preview"
      "review-audio"
      "review-progress"
      "review-progress-text"
      "review-timeline"
      "review-image-tools"
      "review-cards"
      "review-readiness"
      "review-qa";
  }

  .app-shell.workspace-screen-deliver .preview-panel {
    grid-template-columns: 1fr;
    grid-template-areas:
      "deliver-head"
      "deliver-preview"
      "deliver-audio"
      "deliver-progress"
      "deliver-progress-text"
      "deliver-timeline"
      "deliver-record"
      "deliver-result"
      "deliver-workbench";
  }

  .record-checklist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .delivery-workbench-item {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .delivery-workbench-actions {
    justify-content: flex-start;
    justify-self: stretch;
    width: 100%;
  }

  .workflow-shell {
    position: static;
    grid-template-columns: 1fr;
  }

  .workflow-shell.collapsed {
    grid-template-columns: 1fr;
  }

  .workflow-shell.collapsed .workflow-shell-copy {
    grid-template-columns: 1fr;
  }

  .workspace-screen-nav {
    top: 0;
  }

  .workflow-shell-primary-actions {
    justify-content: flex-start;
  }

  .workflow-shell-actions,
  .workflow-shell-steps {
    justify-items: stretch;
    justify-content: flex-start;
  }

  .workflow-guide {
    grid-template-columns: 1fr;
  }

  .workflow-guide-actions {
    grid-template-columns: minmax(0, 1fr);
    justify-content: flex-start;
  }

  .workflow-guide-actions,
  .workflow-steps {
    justify-items: stretch;
    justify-content: flex-start;
  }

  .source-action-row {
    grid-template-columns: 1fr;
  }

  .source-actions {
    justify-self: stretch;
  }

  .image-position-controls {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .image-position-controls button {
    justify-self: start;
    width: min(180px, 100%);
  }

  .readiness-next-fix {
    grid-template-columns: 1fr;
  }

  .readiness-next-fix-button {
    justify-self: start;
    width: min(220px, 100%);
  }

  .slide-media,
  .slide-media img {
    min-height: 270px;
  }
}

@media (max-width: 560px) {
  .timing-timeline-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-shell {
    width: min(100vw - 20px, 1180px);
    padding: 18px 0;
  }

  .source-tools,
  .image-position-tools,
  .control-grid,
  .cue-tools,
  .metrics,
  .record-checklist {
    grid-template-columns: 1fr;
  }

  .image-position-tools button {
    width: 100%;
  }

  .script-preview summary {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 4px;
    padding: 8px 12px;
  }

  .script-preview summary small {
    justify-self: start;
    text-align: left;
    white-space: normal;
  }

  .workflow-guide-actions button {
    width: 100%;
  }

  .workflow-guide-actions {
    grid-template-columns: 1fr;
  }

  .workflow-shell-actions button {
    width: 100%;
  }

  .record-progress-header {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .record-progress-header span {
    justify-self: start;
  }

  .record-result {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .record-result > .record-download-link,
  .record-result-actions {
    justify-self: stretch;
  }

  .record-download-link,
  .record-preview-button {
    width: 100%;
  }

  .action-row {
    flex-direction: column;
  }

  .quick-actions,
  .quick-actions button {
    width: 100%;
  }

  .quick-actions {
    justify-content: stretch;
  }

  .dialog-actions {
    grid-template-columns: 1fr;
  }

  .popup-actions {
    justify-self: stretch;
    width: 100%;
  }

  .popup-action-list,
  .popup-action-list.compact,
  .popup-action-list.wide {
    grid-template-columns: 1fr;
    left: 0;
    right: auto;
    width: 100%;
  }

  .image-plan-row {
    grid-template-columns: 1fr;
  }

  .image-plan-actions {
    justify-self: stretch;
    width: 100%;
  }

  button {
    width: 100%;
  }

  .slide-timeline button {
    width: 36px;
  }

  .bullet-timing-row {
    grid-template-columns: 1fr;
  }

  .bullet-timing-text {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .record-check-item:hover {
    transform: none;
  }

  .timing-action-feedback,
  .timing-timeline-actions button.cue-confirmed,
  .timing-primary-actions button.cue-confirmed,
  .player-jog-controls button.cue-confirmed {
    transform: none;
  }
}
