/* Mensagens do celular: contador no botão, anel de urgência, faixa da tela inicial, caixa de entrada e mensagem; mesma paleta de phone.css. */
.phone-badge{position:absolute;top:-6px;right:-6px;z-index:2;min-width:18px;height:18px;padding:0 4px;border-radius:9px;background:#d2453a;color:#fff;font:800 11px/18px system-ui,sans-serif;letter-spacing:0;text-align:center;box-shadow:0 0 0 2px #0a131a;pointer-events:none;display:block}
.phone-badge[hidden]{display:none!important}
#btnPhone,#phoneButton{overflow:visible}
@media(max-height:500px) and (min-width:521px){#btnsTop #btnPhone{position:relative}}
/* Anel pulsante com urgência não lida: três ciclos e para. */
@keyframes phone-urgent-ring{0%{box-shadow:0 0 0 0 #d2453acc}70%{box-shadow:0 0 0 10px #d2453a00}100%{box-shadow:0 0 0 0 #d2453a00}}
body.phone-urgent #btnPhone,body.phone-urgent #phoneButton{animation:phone-urgent-ring 1.2s ease-out 3;border-color:#e2766b}
/* Ícone do app e faixa da tela inicial. */
.phone-app i{position:relative}
.phone-app i .phone-badge{top:-5px;right:-7px}
.phone-strip{display:flex;align-items:center;gap:10px;width:100%;min-height:48px;margin:0 0 12px;padding:6px 10px;border:1px solid #8a7347;border-radius:14px;background:#2a2a1fd9;color:var(--ph-ink);font:600 12.5px/1.3 system-ui,sans-serif;text-align:left;cursor:pointer;touch-action:manipulation}
.phone-strip.urgent{border-color:#d2453a;background:#3a1f1dd9}
.phone-strip span{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.phone-strip b{color:var(--ph-gold)}
.phone-strip em{flex:none;font:800 12px system-ui,sans-serif;font-style:normal;color:var(--ph-gold)}
.phone-strip .phone-avatar{width:32px;height:32px;border-radius:10px;font-size:12px}
.phone-strip:active{filter:brightness(1.25)}
/* Avatar com as iniciais do remetente; a cor diz o assunto. */
.phone-avatar,.phone-row i.phone-avatar{display:flex;align-items:center;justify-content:center;flex:none;width:40px;height:40px;border-radius:12px;border:1px solid #ffffff33;color:#fff6df;font:800 14px system-ui,sans-serif;font-style:normal;background:linear-gradient(150deg,#9a7637,#5f4520)}
.phone-avatar.tone-red{background:linear-gradient(150deg,#c0493d,#7a2720)}
.phone-avatar.tone-blue{background:linear-gradient(150deg,#3f6ea3,#233f63)}
.phone-avatar.tone-green{background:linear-gradient(150deg,#4f8a4b,#2d5230)}
/* Caixa de entrada. */
.phone-inbox-tools{display:flex;gap:8px;margin:0 0 8px}
.phone-screen .phone-inbox-tools .btn{flex:1 1 0;margin:0;font-size:11px;padding:6px 8px;line-height:1.15}
.phone-inbox-row{position:relative}
.phone-row.phone-inbox-row > span:not(.phone-inbox-meta) small{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.phone-row .phone-inbox-meta{flex:none;align-items:flex-end;gap:4px;max-width:84px}
.phone-inbox-meta time{font:700 11px system-ui,sans-serif;color:var(--ph-soft)}
.phone-msg-seal{display:inline-block;padding:1px 6px;border-radius:8px;background:#2f4752;color:#dce9e6;font:700 10px/1.5 system-ui,sans-serif;font-style:normal;white-space:nowrap}
.phone-inbox-row.unread{border-color:#8a7347}
.phone-inbox-row.unread b{color:var(--ph-gold)}
.phone-inbox-row.unread::before{content:'';position:absolute;left:3px;top:50%;width:6px;height:6px;margin-top:-3px;border-radius:50%;background:var(--ph-gold)}
.phone-inbox-row.unread.urgent{border-color:#d2453a}
.phone-inbox-row.unread.urgent::before{background:#d2453a}
.phone-inbox-row.expired{opacity:.55}
.phone-inbox-empty{text-align:center;padding:18px 6px}
/* Mensagem aberta. */
.phone-msg-card{gap:6px}
.phone-msg-card.urgent{border-color:#d2453a}
.phone-msg-card.expired{opacity:.7}
.phone-msg-from{display:flex;align-items:center;gap:10px}
.phone-msg-from span{display:flex;flex-direction:column;flex:1;min-width:0}
.phone-msg-from b{font:750 14px system-ui,sans-serif}
.phone-screen .phone-msg-text{margin:4px 0 2px;font-size:14px;line-height:1.45;color:var(--ph-ink)}
.phone-msg-place,.phone-msg-deadline{display:block}
.phone-msg-deadline{color:var(--ph-gold)!important}
.phone-screen .phone-msg-state{margin:2px 2px 10px;color:var(--ph-gold);font-weight:700}
.phone-msg-actions{display:flex;flex-direction:column;gap:8px;margin:0 0 8px}
.phone-screen .phone-msg-actions .btn{margin:0}
.phone-screen .phone-msg-actions .btn.phone-msg-delete{width:auto;min-width:96px;min-height:44px;margin:4px auto 0;align-self:center;padding:6px 16px;font-size:11px;opacity:.85}
@media(prefers-reduced-motion:reduce){body.phone-urgent #btnPhone,body.phone-urgent #phoneButton{animation:none;box-shadow:0 0 0 3px #d2453a99}}
/* Celular deitado: respostas em uma linha. */
@media(max-height:430px){.phone-msg-actions{flex-direction:row;flex-wrap:wrap}.phone-screen .phone-msg-actions .btn{flex:1 1 0;min-width:110px}.phone-screen .phone-msg-actions .btn.phone-msg-delete{flex:0 0 auto;min-width:96px;margin:0;align-self:stretch}.phone-strip{margin-bottom:8px}}
