/* Chat phone layout. Keep the active conversation fixed and the welcome screen scrollable. */
@media (max-width: 720px) {
  .site-shell.home-view {
    padding-bottom: calc(84px + env(safe-area-inset-bottom));
  }
  .home-view .chat-header { display: none; }
  .home-view .welcome-panel {
    width: min(560px, 100%);
    padding: 26px 16px 20px;
  }
  .home-view .welcome-intro {
    margin-bottom: 20px;
    text-align: left;
  }
  .home-view .welcome-intro h1 { line-height: 1.15; }
  .home-view .preferences-layout { gap: 12px; }
  .home-view .preferences-grid,
  .home-view .country-preferences {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--muted);
  }
  .home-view .preferences-grid { gap: 15px; }
  .home-view .country-preferences { gap: 15px; }
  .home-view .preference-field [data-slot="select-trigger"],
  .home-view .country-picker-trigger { min-height: 49px; background: var(--surface); }
  .home-view .age-filter-options button,
  .home-view .country-shortcuts button { min-height: 44px; background: var(--surface); }
  .home-view .welcome-actions { margin-top: 14px; }
  .home-view .welcome-actions .primary-button { min-height: 52px; }

  /* Status messages sit below the chat controls instead of covering them. */
  .site-shell:not(.home-view) .toast-stack { top: calc(165px + env(safe-area-inset-top)); }
  .site-shell.home-view .toast-stack { top: calc(68px + env(safe-area-inset-top)); }

  .settings-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .settings-tabs button {
    min-height: 44px;
    flex-direction: row;
    gap: 7px;
    justify-content: center;
    padding-inline: 8px;
    font-size: 12px;
  }
  .settings-tabs button small { position: static; margin: 0; }
}

@media (max-width: 360px) {
  .home-view .welcome-panel { padding-inline: 12px; }
  .home-view .preferences-grid,
  .home-view .country-preferences { padding: 13px; }
  .chat-actions { gap: 5px; }
  .chat-actions .end-button { padding-inline: 9px; font-size: 12px; }
}
