/* Compact two-column demos. Keep the optical glass and native text unscaled. */
@media (max-width: 720px) {
  .demo-page:has(.demo-frame) { padding: 24px 12px; }
  .demo-frame { --demo-panel-height: clamp(170px, 40vw, 218px); grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
  .demo-frame .demo-card { padding: 18px 12px 12px; }
  .demo-frame .product-heading { min-height: 18px; gap: 6px; margin-bottom: 10px; }
  .demo-frame .product-icon { width: 18px; height: 18px; flex-basis: 18px; }
  .demo-frame .product-label { font-size: 9px; letter-spacing: .08em; white-space: nowrap; }
  .demo-frame h2 { font-size: clamp(13px, 3.4vw, 21px); line-height: 1.28; margin-bottom: 16px; }
  .demo-frame .demo-panel {
    padding: 9px 8px;
    border-radius: 12px;
  }
  .demo-frame .panel-header { font-size: 9px; line-height: 12px; gap: 4px; padding-bottom: 6px; margin-bottom: 6px; }

  /* The call keeps its direction, topic and timer without squeezing one line. */
  .demo-frame .voice-panel { display: flex; flex-direction: column; }
  .demo-frame .voice-panel .panel-header { display: grid; grid-template-columns: 5px 1fr auto; flex-shrink: 0; }
  .demo-frame .call-dot { grid-area: 1 / 1; }
  .demo-frame #call-type { grid-area: 1 / 2; }
  .demo-frame #call-timer { grid-area: 1 / 3; font-size: 8.5px; }
  .demo-frame #call-number { grid-area: 2 / 2 / 3 / 4; margin: 0; }
  .demo-frame #voice-conversation { flex: 1; min-height: 0; height: auto; margin-bottom: 4px; }
  .demo-frame .voice-message { font-size: 10px; line-height: 1.35; margin-bottom: 5px; overflow-wrap: anywhere; }
  .demo-frame .voice-role { font-size: 8px; line-height: 11px; padding: 0 3px; margin-right: 3px; }
  .demo-frame #voice-wave { flex: 0 0 24px; height: 24px; width: calc(100% + 16px); margin-left: -8px; }

  /* Three readable messages fill this smaller inbox; the fourth stays below it. */
  .demo-frame .inbox-label { font-size: 8px; letter-spacing: .06em; }
  .demo-frame .compact-mail-row { height: calc(100% / 3); flex-direction: column; align-items: stretch; justify-content: center; gap: 1px; padding: 2px 0 3px; }
  .demo-frame .compact-mail-copy { flex: 0 0 auto; gap: 1px; }
  .demo-frame .compact-mail-name { font-size: 10px; line-height: 12px; }
  .demo-frame .compact-mail-subject { font-size: 9px; line-height: 11px; }
  .demo-frame .compact-mail-status { flex: 0 0 12px; height: 12px; gap: 4px; }
  .demo-frame .compact-mail-icon { flex-basis: 12px; width: 12px; height: 12px; }
  .demo-frame .compact-mail-state { font-size: 9px; line-height: 12px; }

  /* The latest chat messages and their speaker labels remain readable. */
  .demo-frame .chat-header { align-items: flex-start; }
  .demo-frame .chat-symbol { width: 11px; height: 12px; }
  .demo-frame #chat-channel { white-space: normal; }
  .demo-frame .chat-online { font-size: 0; gap: 0; padding-top: 4px; }
  .demo-frame #chat-messages { gap: 5px; padding-bottom: 2px; }
  .demo-frame .chat-bubble { max-width: 98%; padding: 5px; font-size: 10px; line-height: 1.35; border-radius: 8px 8px 8px 3px; }
  .demo-frame .chat-bubble.is-customer { border-radius: 8px 8px 3px 8px; }
  .demo-frame .chat-role { font-size: 8px; line-height: 11px; padding: 0 3px; margin-right: 3px; }
  .demo-frame .chat-typing { padding: 6px; min-height: 23px; }
  .demo-frame #chat-context { display: none; }

  /* A checkmark communicates completion; the full task gets the remaining width. */
  .demo-frame .workflow-header { gap: 4px; margin-bottom: 6px; padding-bottom: 6px; }
  .demo-frame #workflow-name { white-space: normal; font-size: 9px; line-height: 12px; }
  .demo-frame #workflow-count { font-size: 9px; }
  .demo-frame #workflow-status { display: none; }
  .demo-frame #workflow-rows { gap: 2px; }
  .demo-frame .workflow-row { padding: 0 3px; gap: 4px; }
  .demo-frame .workflow-icon { width: 11px; height: 11px; flex-basis: 11px; }
  .demo-frame .workflow-check { width: 11px; height: 11px; }
  .demo-frame .workflow-pending, .demo-frame .workflow-spinner { width: 9px; height: 9px; }
  .demo-frame .workflow-label { font-size: 9.5px; line-height: 11px; white-space: normal; overflow-wrap: anywhere; }
  .demo-frame .workflow-value { display: none; }
  .demo-frame .workflow-progress { left: 3px; right: 3px; }
}

@media (max-width: 360px) {
  .demo-page:has(.demo-frame) { padding-inline: 8px; }
  .demo-frame { --demo-panel-height: 148px; gap: 10px 8px; }
  .demo-frame .demo-card { padding: 14px 10px 10px; }
  .demo-frame .product-heading { gap: 4px; margin-bottom: 8px; }
  .demo-frame .product-label { font-size: 8.5px; }
  .demo-frame h2 { font-size: 12.5px; line-height: 1.24; margin-bottom: 12px; }
  .demo-frame .demo-panel { padding-inline: 6px; }
  .demo-frame #voice-wave { width: calc(100% + 12px); margin-left: -6px; }
  .demo-frame .compact-mail-row { height: 50%; }
  .demo-frame .workflow-header { padding-bottom: 4px; margin-bottom: 4px; }
  .demo-frame #workflow-name { font-size: 8.5px; white-space: nowrap; }
  .demo-frame .workflow-label { font-size: 9px; line-height: 10px; }
}
