/* Ajustements communs pour les écrans tactiles. */
html { -webkit-text-size-adjust: 100%; }
@media (max-width: 700px) {
    html, body { max-width: 100%; overflow-x: hidden; }
    input, textarea, select, button { font-size: 16px; }
    header { gap: .75rem; }
    header > div, .header-links, .header-actions { min-width: 0; }
    .header-links, .header-actions { justify-content: flex-start; }
    dialog { width: calc(100% - 1rem); max-width: none; max-height: calc(100dvh - 1rem); margin: auto; overflow-y: auto; }
    .theme-toggle { right: .7rem; bottom: .7rem; }
    .chat-shell .channels-panel { max-height: 38dvh; }
    .chat-shell .channel-list { scrollbar-width: thin; }
    .chat-shell .message { width: 100%; }
    .chat-shell .message-content, .chat-shell .markdown, .chat-shell .attachment-preview { overflow-wrap: anywhere; }
    .chat-shell .composer { padding-bottom: max(.55rem, env(safe-area-inset-bottom)); }
    .roles .box { min-width: 0; }
    .roles .scope { padding: .7rem; border: 1px solid rgba(255,255,255,.09); border-radius: 10px; }
    .roles .scope select { min-height: 44px; }
    .roles .channels { max-height: 10rem; overflow-y: auto; }
    .roles .channels label { min-height: 36px; display: inline-flex; align-items: center; }
    .roles .card { align-items: flex-start; gap: .65rem; }
    .roles .card button { min-height: 42px; }
    .news-post, .editor, .wiki-content article { border-radius: 14px; }
    .editor-actions, .news-actions, .dialog-actions { flex-wrap: wrap; }
    .editor-actions button, .dialog-actions button { min-height: 44px; flex: 1 1 9rem; }
}
@media (max-width: 430px) {
    .chat-shell .composer { gap: .4rem; }
    .chat-shell .attachment-button { width: 2.6rem; height: 2.6rem; }
    .chat-shell .composer button { min-width: 2.8rem; padding: .65rem; justify-content: center; }
    .roles .card { flex-direction: column; }
    .roles .card button { width: 100%; }
}
