/* Estilos del nuevo comunicador; las pantallas anteriores conservan sus estilos. */
.bottom-nav:has([data-route="comunicador"]) { display:grid; grid-template-columns:.9fr 1.3fr .9fr .9fr; gap:4px; }
.bottom-nav:has([data-route="comunicador"]) .nav-item { flex:1; min-width:0; padding-inline:6px; overflow-wrap:anywhere; }
.bottom-nav:has([data-route="comunicador"]) .nav-item span { text-align:center; overflow-wrap:anywhere; }
.aac-board { --aac-columns:3; max-width:960px; margin:auto; }
.aac-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:12px 0 18px; }
.aac-heading h1 { font-size:clamp(1.55rem,4vw,2.15rem); }
.aac-personalize { font-size:.875rem; padding:10px 12px; min-height:44px; flex-shrink:0; }
.aac-mode { display:flex; gap:5px; padding:4px; background:#e8eef9; border-radius:16px; margin-bottom:12px; }
.aac-mode button { min-height:44px; border-radius:12px; flex:1; font-size:1rem; font-weight:650; padding:9px; }
.aac-mode button[aria-pressed="true"] { background:white; color:var(--blue-deep); box-shadow:0 2px 6px #243c6814; }
.aac-composer { background:white; border:2px solid #d1def5; border-radius:22px; padding:16px; margin-bottom:14px; }
.aac-message { font-size:clamp(1.3rem,4vw,1.9rem); font-weight:700; line-height:1.3; overflow-wrap:anywhere; min-height:1.3em; }
.aac-placeholder { color:var(--muted); font-size:1rem; font-weight:450; }
.aac-phrase-strip { display:flex; gap:8px; overflow-x:auto; padding:12px 2px 7px; overscroll-behavior:contain; }
.aac-token { position:relative; display:flex; flex-direction:column; align-items:center; gap:4px; flex:0 0 88px; max-width:88px; padding:8px 5px 5px; border:1px solid var(--line); border-radius:12px; background:#f8faff; }
.aac-token img { width:60px; height:60px; object-fit:contain; background:white; }
.aac-token span:not(.aac-token-x) { font-size:.875rem; line-height:1.25; overflow-wrap:anywhere; }
.aac-token-x { position:absolute; right:0; top:-1px; width:21px; height:21px; background:#e2eaf6; border-radius:50%; font-size:1rem; line-height:20px; }
.aac-sentence-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:13px; align-items:stretch; }
.aac-edit-tools { grid-column:1/-1; display:flex; gap:6px; justify-content:flex-end; }
.aac-sentence-actions .button { min-width:0; min-height:48px; font-size:1rem; padding:11px 10px; overflow-wrap:normal; flex-wrap:wrap; }
.aac-speak { background:#dce8ff; color:#163f9a; border:1px solid #bdcff3; font-weight:750; }
.aac-tool { background:#f0f4fa; border:1px solid var(--line); border-radius:13px; min-width:44px; min-height:48px; padding:10px; display:flex; align-items:center; justify-content:center; }
.aac-quick { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-bottom:17px; }
.aac-card { display:flex; flex-direction:column; align-items:center; justify-content:flex-start; padding:12px 9px; gap:9px; background:var(--aac-tint,#e7edff); color:var(--aac-ink,#345c84); border:2px solid #ffffff; border-radius:19px; box-shadow:0 2px 10px #243c680b; min-width:0; min-height:142px; touch-action:manipulation; }
.aac-card img { width:100%; max-width:120px; height:100px; object-fit:contain; background:white; border-radius:12px; }
.aac-card span { display:block; font-size:1.05rem; font-weight:700; line-height:1.25; text-align:center; overflow-wrap:anywhere; }
.aac-card-quick { min-height:100px; padding:8px 5px; gap:5px; border-radius:16px; }
.aac-card-quick img { width:64px; height:58px; max-width:100%; }
.aac-card-quick span { font-size:1rem; }
.aac-card:active, .aac-card.aac-selected { border-color:#235bea; background:#e3edff; }
.aac-groups { display:flex; flex-wrap:wrap; gap:7px; margin:0 0 15px; }
.aac-group { min-height:44px; padding:9px 13px; border-radius:13px; border:2px solid transparent; background:var(--aac-tint); color:var(--aac-ink); font-size:.9375rem; font-weight:650; }
.aac-group.active { border-color:var(--aac-ink); }
.aac-group-title { margin-bottom:12px; }
.aac-grid { display:grid; grid-template-columns:repeat(var(--aac-columns),minmax(0,1fr)); gap:10px; }
.aac-hint { color:var(--muted); font-size:.9375rem; margin:18px 0 8px; }
.aac-status { font-size:.9375rem; line-height:1.45; color:#345176; margin:10px 0; overflow-wrap:anywhere; }
.aac-status:empty { display:none; }
.aac-voice-note { background:#fff0de; color:#795321; border-radius:12px; padding:12px; margin:10px 0; font-size:.9375rem; }
.aac-empty { grid-column:1/-1; font-size:1rem; padding:24px 16px; background:white; border-radius:16px; color:var(--muted); }
.aac-announcement { position:fixed; width:1px; height:1px; clip-path:inset(50%); overflow:hidden; white-space:nowrap; }
.aac-dialog { width:min(640px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); padding:0; border:1px solid var(--line); border-radius:24px; background:white; color:var(--ink); overflow:auto; overscroll-behavior:contain; }
.aac-dialog::backdrop { background:#14254499; }
.aac-dialog-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:18px 20px; position:sticky; top:0; background:white; z-index:2; border-bottom:1px solid var(--line); }
.aac-dialog-head h2 { font-size:1.2rem; overflow-wrap:anywhere; }
.aac-dialog-head .icon-button { flex-shrink:0; }
.aac-dialog-body { padding:20px; }
.aac-dialog-body .field { margin-bottom:15px; font-size:.9375rem; }
.aac-dialog-body .input { font-size:1rem; }
.aac-adult-note { color:var(--muted); margin-bottom:16px; font-size:.9375rem; }
.aac-settings-section { display:grid; gap:14px; padding:8px 0 24px; margin-bottom:14px; border-bottom:1px solid var(--line); }
.aac-settings-section h3 { font-size:1.1rem; }
.aac-settings-section .field { margin:0; }
.aac-check { display:flex; gap:10px; align-items:flex-start; font-size:1rem; }
.aac-check input { width:20px; height:20px; margin:2px 0 0; flex:none; accent-color:var(--blue); }
.aac-backup-actions { display:flex; flex-wrap:wrap; gap:10px; }
.aac-backup-actions .button { flex:1; min-width:150px; }
.aac-manage-card { display:flex; gap:12px; align-items:center; border-top:1px solid var(--line); padding:9px 0; }
.aac-manage-card img { width:50px; height:50px; object-fit:contain; }
.aac-manage-card>span { flex:1; overflow-wrap:anywhere; }
.aac-manage-card small { display:block; color:var(--muted); font-size:.875rem; }
.aac-edit-picture { display:flex; gap:15px; align-items:center; flex-wrap:wrap; margin-bottom:20px; }
#aac-current-picture img { width:92px; height:92px; object-fit:contain; border:1px solid var(--line); border-radius:16px; }
.aac-picture-results { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; max-height:300px; overflow:auto; padding:3px; margin-bottom:20px; }
.aac-picture-option { padding:7px 4px; border:2px solid var(--line); border-radius:12px; min-width:0; }
.aac-picture-option.active { border-color:var(--blue); background:#eaf0ff; }
.aac-picture-option img { height:68px; width:100%; object-fit:contain; }
.aac-picture-option span { font-size:.875rem; overflow-wrap:anywhere; display:block; line-height:1.3; margin-top:4px; }
.aac-form-actions { display:flex; gap:10px; flex-wrap:wrap; padding:16px 20px; border-top:1px solid var(--line); background:white; }
.aac-form-actions .button { flex:1; min-width:90px; }
.aac-message-dialog { width:calc(100vw - 16px); max-width:1200px; max-height:calc(100dvh - 16px); min-height:min(540px,calc(100dvh - 16px)); }
.aac-large-pictos { display:flex; justify-content:center; flex-wrap:wrap; gap:12px; padding:24px 20px 12px; }
.aac-large-pictos>div { flex:0 1 170px; min-width:0; padding:12px; border:1px solid var(--line); border-radius:18px; text-align:center; font-size:1rem; overflow-wrap:anywhere; }
.aac-large-pictos img { height:130px; width:100%; object-fit:contain; margin-bottom:8px; }
.aac-large-text { text-align:center; font-size:clamp(1.8rem,5vw,3.2rem); font-weight:750; line-height:1.3; padding:16px 24px; overflow-wrap:anywhere; }
.aac-large-actions { display:flex; flex-wrap:wrap; justify-content:center; gap:10px; padding:16px 20px 24px; }
.aac-message-dialog>.aac-status { padding:0 20px 15px; }
@media(min-width:1000px) { .bottom-nav:has([data-route="comunicador"]) { width:570px; } .aac-card img { height:130px; max-width:150px; } .aac-card-quick img { height:58px; } }
@media(max-width:420px) { .aac-heading { align-items:flex-start; } .aac-personalize { padding:9px; } .aac-personalize span { display:none; } .aac-composer { padding:12px; } .aac-sentence-actions { gap:5px; } .aac-sentence-actions .button { padding:10px; min-width:0; } .aac-tool { min-width:40px; padding:9px; } .aac-card { padding:9px 6px; min-height:128px; } .aac-card img { height:84px; } .aac-card-quick { min-height:93px; } .aac-card-quick img { height:52px; } .aac-grid { gap:8px; } .aac-board[data-cols="4"] .aac-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } .aac-picture-results { grid-template-columns:repeat(3,minmax(0,1fr)); } .aac-dialog-head,.aac-dialog-body { padding:16px; } .aac-large-pictos>div { flex-basis:130px; } .aac-large-pictos img { height:100px; } }
@media(max-width:320px) { .aac-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; } .aac-mode button { font-size:.9375rem; } .aac-quick { gap:4px; } .aac-card-quick span { font-size:.9375rem; } .aac-sentence-actions .button { flex-basis:calc(50% - 4px); } .aac-dialog { width:calc(100vw - 12px); } }
@media(prefers-reduced-motion:reduce) { .aac-board *, .aac-dialog * { scroll-behavior:auto; transition:none; } }
