/* Local review: word/sentence phone composition. Presentation only.
   Retains the deployed measured fixed-dock exception; never locks page scroll.
   The approved live-feedback composition and tablet/desktop layout are excluded. */
@media (max-width: 600px), (max-width: 950px) and (max-height: 500px) and (pointer: coarse) {
  :is(.word-studio-shell, .sentence-talk-shell) .guided-record-card[data-phone-dock]::before {
    /* Oversized decoration must not enlarge the scrollable recovery-message tray.
       Keep the existing opacity pulse, but contain its geometric extent. */
    inset: 0;
    transform: none !important;
    border-radius: inherit;
  }

  :is(.word-studio-shell, .sentence-talk-shell) .minimal-word-stage > .guided-record-card[data-phone-dock] {
    background: var(--brand-panel-mint);
    /* Short-screen legacy rules set z-index:1; attempt labels use z-index:2.
       The bottom tray must stay above them while content scrolls underneath. */
    z-index: 90;
  }

  :is(.word-studio-shell, .sentence-talk-shell).phone-dock-enabled:not(:has(.has-live-feedback)) {
    display: flex;
    flex-direction: column;
  }
  :is(.word-studio-shell, .sentence-talk-shell).phone-dock-enabled:not(:has(.has-live-feedback)) :is(.practice-focus-stage, .minimal-word-studio, .minimal-word-stage) {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    min-height: 0;
  }
  :is(.word-studio-shell, .sentence-talk-shell).phone-dock-enabled:not(:has(.has-live-feedback)) .minimal-word-stage {
    gap: 10px;
  }
  :is(.word-studio-shell, .sentence-talk-shell).phone-dock-enabled:not(:has(.has-live-feedback)) .minimal-word-stage > * {
    flex-shrink: 0;
  }
  :is(.word-studio-shell, .sentence-talk-shell).phone-dock-enabled:not(:has(.has-live-feedback)) .minimal-word-card {
    /* The existing prompt surface takes available room, not the artwork/type.
       Intrinsic content height wins on short screens and with enlarged text. */
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .word-studio-shell.phone-dock-enabled:not(:has(.has-live-feedback)) .word-title-row.word-audio-layout,
  .word-studio-shell.phone-dock-enabled:not(:has(.has-live-feedback)) .word-primary-copy,
  .sentence-talk-shell.phone-dock-enabled:not(:has(.has-live-feedback)) .sentence-title-row > div:first-child {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    min-width: 0;
  }
  .word-studio-shell.phone-dock-enabled:not(:has(.has-live-feedback)) .word-title-row.word-audio-layout {
    gap: 16px;
  }
  .word-studio-shell.phone-dock-enabled:not(:has(.has-live-feedback)) .word-with-picture {
    flex: 1 0 auto;
    justify-content: center;
    align-content: center;
    padding-block: 16px;
  }
  .sentence-talk-shell.phone-dock-enabled:not(:has(.has-live-feedback)) .sentence-title-row h2 {
    margin-block: auto;
    padding-block: 20px;
    text-align: center;
  }
  .sentence-talk-shell.phone-dock-enabled:not(:has(.has-live-feedback)) .sentence-card {
    gap: 16px;
  }
  :is(.word-studio-shell, .sentence-talk-shell).phone-dock-enabled:not(:has(.has-live-feedback)) .word-nav-row {
    margin-top: 0;
    padding-top: 0;
  }
}
