/* The demo's red and white are caption output colors, not site accents. */
.caption-demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 340px); gap: clamp(24px, 5vw, 80px); align-items: center; max-width: 1100px }
.caption-workbench { min-width: 0; }
.caption-demo-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 20px }
.caption-demo-heading > span { font-size: 13px; background: var(--app-field); color: var(--app-field-ink); padding: 4px 8px; border-radius: var(--app-radius-control); white-space: nowrap }
.caption-demo-disclosure { margin: 8px 0 24px; font-size: 14px }
.caption-demo-tools[hidden] { display: none }
.caption-templates { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0 }
.caption-templates legend, .caption-brand > span, .caption-try-label { font-size: 14px; font-weight: 600; margin-bottom: 8px }
.caption-demo .btn { min-height: 44px; white-space: normal; text-align: left; line-height: 1.35 }
.caption-templates [aria-pressed='true'] { background: var(--app-field); color: var(--app-field-ink); border-color: var(--app-field-ink) }
.caption-brand { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 16px 0 24px }
.caption-brand > span { margin: 0 }
.caption-conversation { background: var(--app-surface-2); border-radius: var(--app-radius-card); padding: clamp(16px, 2.5vw, 28px); min-height: 276px }
.caption-speaker { font-size: 13px; font-weight: 600; margin-bottom: 6px }
.caption-request { font-size: clamp(18px, 2vw, 23px); font-weight: 600; line-height: 1.3; min-height: 2.6em; margin-bottom: 24px; max-width: 34ch }
.caption-agent-label { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 14px }
.caption-agent-label img { display: block; aspect-ratio: 1 }
.caption-agent-label span { font-weight: 400 }
.caption-conversation > p:not(.caption-request):not(.caption-speaker) { font-size: 15px; max-width: 52ch; min-height: 3em }
.caption-actions { list-style: none; padding: 0; margin: 16px 0 0; font-size: 13px; line-height: 1.8 }
.caption-try-label { margin-top: 24px }
.caption-prompts { display: flex; flex-wrap: wrap; gap: 8px }
.caption-prompts .btn { font-size: 14px; justify-content: flex-start }
.caption-playback { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 20px }
.caption-playback > span { font-size: 13px }
.caption-demo-status { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap }
.caption-preview { margin: 0; min-width: 0 }
.caption-preview-frame { position: relative; aspect-ratio: 9 / 16; overflow: hidden; border-radius: var(--app-radius-card); isolation: isolate; background: var(--app-ink) }
.caption-preview-frame > img { display: block; width: 100%; height: 100%; object-fit: cover }
/* dobase-allow: DOB-DESIGN-RAW-COLOR Literal caption colors demonstrate editable video output over footage, not UI theming. */
.caption-preview-badge { position: absolute; top: 16px; left: 16px; background: #171719; color: #fff; padding: 6px 10px; border-radius: var(--app-radius-control); font-size: 12px }
/* dobase-allow: DOB-DESIGN-RAW-COLOR White captions and black outlines are media output, matching the editor's caption styles. */
.caption-demo-words { position: absolute; bottom: 20%; left: 5%; right: 5%; text-align: center; color: #fff; font-size: clamp(22px, 2.7vw, 34px); font-weight: 900; text-transform: uppercase; line-height: 1.5; text-shadow: 0 2px 4px #000; }
.caption-demo-words span { box-decoration-break: clone; -webkit-box-decoration-break: clone }
.caption-demo-words .spoken { background: var(--app-field); color: var(--app-field-ink); text-shadow: none; padding: 2px 5px; border-radius: 3px }
/* dobase-allow: DOB-DESIGN-RAW-COLOR Red is the requested custom brand highlight in this simulated video, not a second app accent. */
[data-look='red'] .caption-demo-words .spoken { background: #bd1836; color: #fff }
/* dobase-allow: DOB-DESIGN-RAW-COLOR This dark box represents the Boxed caption template's media background. */
[data-look='boxed'] .caption-demo-words { background: #171719; padding: 8px; font-size: 24px; text-transform: none; font-weight: 600 }
[data-look='quiet'] .caption-demo-words { font-size: 22px; text-transform: none; font-weight: 500 }
/* dobase-allow: DOB-DESIGN-RAW-COLOR Caption white is readable over the dark sample footage. */
[data-look='quiet'] .caption-demo-words .spoken, [data-look='boxed'] .caption-demo-words .spoken { background: transparent; color: #fff; padding: 0; text-shadow: inherit }
/* dobase-allow: DOB-DESIGN-RAW-COLOR The sample red word has a black stroke for contrast over the footage. */
[data-look='word'] .caption-demo-words .spoken { background: transparent; color: #ff617b; padding: 0; -webkit-text-stroke: 1px #171719; paint-order: stroke fill; text-shadow: 0 2px 3px #000 }
.caption-preview figcaption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-top: 12px; font-size: 14px }
.caption-demo-next { margin-top: 32px; font-size: 16px }
.caption-demo-next a { display: inline-flex; min-height: 44px; align-items: center; font-weight: 600; margin-left: 8px }
@media (max-width: 760px) {
  .caption-demo { grid-template-columns: minmax(0, 1fr); gap: 24px }
  /* A compact sticky crop keeps the result visible while a phone user asks. */
  .caption-preview { grid-row: 1; width: 100%; align-self: start; position: sticky; top: 0; z-index: 2; padding: 8px 0 12px; background: var(--app-surface-2) }
  .caption-preview-frame { aspect-ratio: 16 / 9; max-height: 210px }
  .caption-preview-frame > img { object-position: center 38% }
  .caption-demo-words { font-size: 24px; bottom: 8% }
  .caption-preview-badge { top: 8px; left: 8px }
  .caption-demo .btn { scroll-margin-top: 280px }
  .caption-preview figcaption { margin-top: 8px }
  .caption-demo-heading { font-size: 18px }
  .caption-conversation { min-height: 290px }
}
