/* Narrow and low screens. Since V27 the text and result screens share one layout
   at every width; only the recording scene and the keyboard need narrow rules. */
@media (max-width: 700px), (max-width: 1000px) and (max-height: 540px) and (pointer: coarse) {
  #editor-view { --editor-left: max(16px,env(safe-area-inset-left)); --editor-right: max(16px,env(safe-area-inset-right)); }
  .voice-workspace { min-height: 0; }
  .voice-stage { padding: 12px 16px; gap: 12px; min-height: 200px; }
  #timer { font-size: clamp(48px,12vw,58px); }
  #voice-timer-slot { min-height: 74px; }
  #mobile-record-visual { height: clamp(106px,17vh,160px); }
  .voice-actions { width: calc(100% - var(--editor-left) - var(--editor-right) - 16px); max-width: 440px; gap: 6px; grid-template-rows: minmax(64px,auto) 44px minmax(44px,auto); padding-bottom: max(16px,env(safe-area-inset-bottom)); }
  .voice-actions[data-last-text="true"] { grid-template-rows: minmax(64px,auto) 44px 44px minmax(44px,auto); }
  #voice-record-slot #record { min-height: max(64px, calc(2.5em + 16px)); }
  .editor-keyboard .panel-body textarea { flex: none; min-height: 96px; height: var(--editor-text-height, 40vh); }
  @media (max-height: 610px) {
    .voice-workspace { min-height: 0; }
    .voice-stage { min-height: 150px; gap: 6px; padding-block: 4px; }
    #mobile-record-visual { height: 64px; }
    #voice-timer-slot { min-height: 56px; }
    #timer { font-size: 48px; }
    .voice-actions { gap: 2px; padding-bottom: max(16px,env(safe-area-inset-bottom)); grid-template-rows: minmax(60px,auto) 44px minmax(44px,auto); }
    .voice-actions[data-last-text="true"] { grid-template-rows: minmax(60px,auto) 44px 44px minmax(44px,auto); }
    #voice-record-slot #record { min-height: max(60px, calc(2.5em + 16px)); }
  }
}
