:root {
  font-family: Verdana, Arial, sans-serif;
  color: #2b2420;
  background: #faf5ec;
  font-size: 18px;
  --blue: #1f7a46;
  --blue-dark: #2b3a2f;
  --blue-soft: #e6f2e8;
  --ink: #2b2420;
  --muted: #6b5d50;
  --orange: #f2a33a;
  --orange-soft: #fff1d9;
  --red: #c0313d;
  --line: #e3d6c2;
  --cream: #faf5ec;
  --green: #1f7a46;
  --green-dark: #155c33;
  --violet: #5b3a91;
  --violet-dark: #432a6d;
  --violet-soft: #efe8f8;
}
* { box-sizing: border-box; }
html, body, #app { min-height: 100%; margin: 0; }
body { min-width: 320px; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible { outline: 4px solid #f8b83f; outline-offset: 3px; }
button:disabled { opacity: .55; cursor: not-allowed; }
[hidden], .hidden { display: none !important; }
p { line-height: 1.5; }
label { display: block; font-weight: 800; margin: 20px 0 9px; }
input, textarea { width: 100%; min-height: 64px; border: 2px solid #9cb8d1; border-radius: 16px; padding: 16px 18px; background: #fff; color: var(--ink); }
textarea { min-height: 140px; resize: vertical; }
a { color: var(--blue-dark); }
.btn { min-height: 68px; border: 0; border-radius: 18px; padding: 15px 22px; font-size: 19px; font-weight: 800; line-height: 1.2; display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-align: center; text-decoration: none; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-light { background: var(--blue-soft); color: var(--blue-dark); }
.btn-orange { background: var(--orange); color: #282612; }
.btn-danger { background: var(--red); color: #fff; }
.btn-outline { background: #fff; color: var(--blue-dark); border: 2px solid var(--line); }
.btn-wide { width: 100%; }
.small { font-size: 15px; color: var(--muted); }
.error { min-height: 1.4em; color: #a01f2b; font-weight: 800; }
.brand { display: flex; align-items: center; gap: 15px; color: var(--blue); font-size: 30px; font-weight: 800; }
.brand-mark { width: 56px; height: 56px; flex: none; display: grid; place-items: center; border-radius: 17px; background: var(--blue); color: #fff; font-size: 29px; }
.login, .connect { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login-card, .connect-card { width: min(620px, 100%); border: 2px solid var(--line); border-radius: 27px; padding: 42px; background: #fff; box-shadow: 0 20px 55px #133a601c; }
.login h1, .connect h1 { margin: 30px 0 14px; color: var(--blue-dark); font-size: clamp(34px, 4vw, 48px); line-height: 1.12; }
.lead { font-size: 22px; color: var(--muted); }
.connect-card { text-align: center; }
.connect-card .brand { justify-content: center; }
.qr-wrap { display: inline-block; margin: 17px auto; padding: 14px; border: 2px solid var(--line); border-radius: 20px; background: #fff; }
.qr-wrap img { display: block; width: min(290px, 70vw); height: auto; }
.steps { padding: 22px 27px; border-radius: 18px; background: var(--blue-soft); text-align: left; font-size: 20px; line-height: 1.6; }
.steps ol { margin: 8px 0; padding-left: 28px; }
.shell { height: 100dvh; min-height: 620px; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 86px minmax(0, 1fr); background: #f2f6fb; }
.topbar { grid-column: 1 / -1; padding: 0 28px; background: var(--blue); color: #fff; display: flex; justify-content: space-between; align-items: center; }
.topbar .brand { color: #fff; }
.topbar .brand-mark { width: 51px; height: 51px; background: #fff; color: var(--blue); }
.topbar-controls { display: flex; align-items: center; gap: 20px; }
.volume-controls { display: flex; align-items: center; gap: 7px; }
.volume-caption { margin-right: 5px; color: #dfefff; font-size: 18px; font-weight: 800; }
.volume-btn { min-width: 88px; min-height: 60px; padding: 5px 7px; border: 2px solid #7aa4ce; border-radius: 14px; background: #ffffff1c; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.volume-btn.selected { border-color: #ffd16e; background: #f8b83f; color: #183653; }
.volume-number { font-size: 21px; line-height: 1; }
.volume-name { margin-top: 3px; }
.status-pill { position: relative; display: flex; align-items: center; gap: 10px; padding: 11px 19px; border: 0; border-radius: 99px; background: #ffffff25; color: #fff; font-size: 16px; font-weight: 800; cursor: pointer; user-select: none; touch-action: manipulation; overflow: hidden; }
.status-pill::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: #f8b83f; transform: scaleX(0); transform-origin: left; }
.status-pill.holding::after { transform: scaleX(1); transition: transform 1.8s linear; }
.status-dot { width: 13px; height: 13px; border-radius: 50%; background: #69dc9c; }
.sidebar { display: flex; flex-direction: column; gap: 13px; padding: 26px 17px 22px; background: #e7f0fa; border-right: 2px solid var(--line); }
.sidebar-title { padding: 0 12px; color: var(--muted); font-size: 14px; font-weight: 800; letter-spacing: .07em; }
.navbtn { width: 100%; min-height: 88px; padding: 14px 18px; border: 0; border-radius: 18px; background: transparent; color: var(--blue-dark); text-align: left; font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 16px; }
.navbtn.active, .navbtn:hover { background: #fff; box-shadow: 0 5px 16px #123f6819; }
.nav-icon { width: 33px; font-size: 29px; text-align: center; }
.sidebar-spacer { flex: 1; }
.helpbtn { width: 100%; min-height: 112px; padding: 17px 14px; background: var(--red); color: #fff; font-size: 22px; box-shadow: 0 6px 0 #81212a; }
.helpbtn span:first-child { font-size: 30px; }
.main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.demo-banner { padding: 9px 20px; background: #fff1d2; color: #654607; text-align: center; font-size: 15px; font-weight: 800; }
.main-head { min-height: 106px; padding: 16px 30px; border-bottom: 2px solid var(--line); background: #fff; display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.main-head h1 { margin: 0; color: var(--blue-dark); font-size: 32px; line-height: 1.12; }
.main-head p { margin: 8px 0 0; color: var(--muted); font-size: 18px; }
.main-head .attention-subtitle { color: #8a5100; font-weight: 800; }
.admin-actions { display: flex; gap: 10px; }
.workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: 390px minmax(0, 1fr); }
.single-workspace { flex: 1; min-height: 0; display: flex; }
.single-workspace .chat-pane { flex: 1; }
.conversation-list { min-height: 0; overflow: auto; padding: 16px 15px 25px; background: #fff; border-right: 2px solid var(--line); }
.list-label { margin: 19px 5px 11px; color: var(--muted); font-size: 14px; font-weight: 800; letter-spacing: .075em; }
.urgent-label { color: #855000; }
.chat-card { position: relative; width: 100%; min-height: 132px; margin: 0 0 11px; padding: 17px 14px; border: 2px solid transparent; border-radius: 18px; background: #fff; color: var(--ink); text-align: left; display: grid; grid-template-columns: 68px minmax(0, 1fr); grid-template-rows: auto auto auto; align-items: center; gap: 0 13px; }
.chat-card:hover { background: #eef6ff; }
.chat-card.active { background: #e5f1ff; border-color: #75adf1; }
.chat-card.has-unheard { background: #fff5df; border-color: #f4c56c; }
.chat-card.has-unheard.active { border-color: #df9307; box-shadow: inset 6px 0 0 #df9307; }
.avatar { position: relative; width: 66px; height: 66px; flex: none; border-radius: 19px; display: grid; place-items: center; overflow: hidden; background: #dbeafb; color: var(--blue-dark); font-size: 27px; font-weight: 800; }
.avatar-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.orange, .new-audio-avatar { background: #ffe3aa; color: #734500; }
.new-audio-avatar { font-size: 23px; }
.chat-card .avatar { grid-row: 1 / 4; }
.chat-info { min-width: 0; grid-column: 2; grid-row: 1 / 3; }
.chat-name { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 23px; font-weight: 800; }
.chat-preview { display: block; margin-top: 7px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); font-size: 18px; }
.has-unheard .chat-preview { color: #754300; font-weight: 800; }
.chat-time { grid-column: 2; grid-row: 3; align-self: end; margin-top: 7px; color: var(--muted); font-size: 14px; }
.unheard-count { position: absolute; right: 14px; bottom: 14px; width: 32px; height: 32px; border-radius: 50%; background: #dd8600; color: #fff; display: grid; place-items: center; font-weight: 800; }
.empty-list { padding: 25px 12px; color: var(--muted); font-size: 19px; line-height: 1.5; }
.chat-pane { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: #f3f7fc; }
.chat-pane-head { min-height: 88px; padding: 12px 25px; border-bottom: 2px solid var(--line); background: #fff; display: flex; align-items: center; gap: 15px; }
.group-head { min-height: 108px; padding: 16px 28px; }
.group-avatar { width: 74px; height: 74px; border-radius: 22px; }
.group-head .chat-head-name strong { font-size: 31px; }
.group-head .chat-head-name small { font-size: 18px; }
.group-unheard { display: inline-block; padding: 6px 12px; border-radius: 10px; background: #fff0c9; color: #794200; font-weight: 800; }
.chat-head-name { min-width: 0; flex: 1; }
.chat-head-name strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 23px; }
.chat-head-name small { display: block; margin-top: 5px; color: var(--muted); font-size: 16px; }
.details-button { min-height: 55px; padding: 9px 16px; font-size: 16px; }
.messages { flex: 1; min-height: 0; overflow: auto; padding: 26px; display: flex; flex-direction: column; gap: 15px; }
.bubble { flex-shrink: 0; max-width: min(76%, 670px); padding: 17px 20px; border: 2px solid var(--line); border-radius: 20px; background: #fff; overflow-wrap: anywhere; font-size: 22px; line-height: 1.45; }
.single-workspace .bubble { width: min(88%, 1100px); max-width: none; }
.bubble.theirs { align-self: flex-start; }
.bubble.mine { align-self: flex-end; background: #dcecff; border-color: #b9d7f6; }
.bubble.unheard-bubble { background: #fff7e7; border-color: #e4a52a; box-shadow: 0 4px 18px #d4901d1f; }
.sender-row { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; color: var(--blue-dark); font-size: 18px; }
.sender-row .avatar { width: 38px; height: 38px; border-radius: 11px; font-size: 16px; }
.sender-row .avatar-photo { max-height: none; margin-top: 0; border-radius: 0; }
.message-text { white-space: pre-wrap; }
.audio-label { margin-bottom: 12px; color: var(--muted); font-size: 15px; font-weight: 800; letter-spacing: .06em; }
.audio-label.new { color: #8a4e00; }
.voice-playback { display: flex; flex-direction: column; }
.voice-playback audio { display: none; }
.audio-play { width: 100%; min-width: 275px; min-height: 88px; background: var(--blue); color: #fff; font-size: 22px; }
.audio-play-new { background: #e0920a; color: #211905; }
.message-text .mention { color: var(--blue); }
.bubble-time { margin-top: 9px; color: var(--muted); text-align: right; font-size: 14px; }
.read-btn { min-height: 56px; margin-top: 10px; font-size: 17px; }
.bubble img { max-width: 100%; max-height: 280px; display: block; margin-top: 9px; border-radius: 12px; }
.bubble video { max-width: 100%; display: block; margin-top: 9px; }
.media-wait { color: var(--muted); font-size: 17px; }
.voice-composer { min-height: 116px; padding: 20px 25px; border-top: 2px solid var(--line); background: #fff; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.group-footer { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: stretch; padding: 14px 26px; border-top: 2px solid var(--line); background: #fff; }
.group-footer .voice-composer { min-height: 92px; padding: 0; border: 0; }
.group-footer .helpbtn { min-height: 104px; font-size: 32px; box-shadow: 0 6px 0 #81212a; }
.group-footer .helpbtn span:first-child { font-size: 40px; }
.group-footer .record-button { min-height: 104px; font-size: 30px; }
.caregiver-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.caregiver-options .btn { min-height: 90px; }
.voice-modal-backdrop { position: fixed; z-index: 60; inset: 0; display: grid; place-items: center; padding: 20px; background: #092746c9; }
.voice-modal { width: min(900px, 100%); padding: 42px; border-radius: 32px; background: #fff; color: var(--ink); text-align: center; box-shadow: 0 28px 85px #061d38a1; }
.voice-modal-icon { width: 88px; height: 88px; margin: 0 auto 14px; border-radius: 27px; background: #e7f2ff; display: grid; place-items: center; font-size: 46px; }
.voice-modal h2 { margin: 0; color: var(--blue-dark); font-size: 38px; }
.voice-modal-clock { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 18px 0 8px; color: var(--blue-dark); font-size: 60px; font-weight: 800; font-variant-numeric: tabular-nums; }
.voice-modal-clock .record-dot { width: 23px; height: 23px; margin: 0; }
.voice-modal p { margin: 8px auto 26px; max-width: 690px; color: var(--muted); font-size: 22px; }
.voice-modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.voice-modal-actions .btn { min-height: 116px; font-size: 28px; }
.voice-modal-actions .btn:only-child { grid-column: 1 / -1; }
.voice-modal-cancel { background: #bf3440; color: #fff; }
.voice-modal-send { background: #18854c; color: #fff; }
.voice-instruction strong, .record-indicator strong { display: block; color: var(--blue-dark); font-size: 22px; }
.voice-instruction small, .record-indicator small { display: block; margin-top: 6px; color: var(--muted); font-size: 17px; }
.record-button { min-width: 300px; min-height: 90px; background: var(--blue); color: #fff; font-size: 25px; box-shadow: 0 6px 0 #0e3968; }
.voice-composer.recording { background: #fff5e4; border-top-color: #e7ac45; }
.record-indicator { display: flex; flex-direction: column; }
.record-dot { width: 18px; height: 18px; margin-bottom: 7px; border-radius: 50%; background: var(--red); }
.voice-actions { display: flex; gap: 12px; }
.voice-error { background: #fff0f0; }
.contacts-page { flex: 1; min-height: 0; overflow: auto; padding: 25px 30px; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 18px; align-content: start; }
.contact-tile { min-height: 226px; padding: 23px; border: 2px solid var(--line); border-radius: 22px; background: #fff; color: var(--ink); text-align: left; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.contact-tile:hover { border-color: #7bb0eb; background: #fafdff; }
.contact-tile.emergency-contact { border-color: #edb251; background: #fffaf0; }
.contact-tile strong { font-size: 23px; }
.contact-tile > span:last-child { color: var(--muted); font-size: 16px; }
.emergency-badge { padding: 8px 10px; border-radius: 10px; background: #ffead0; color: #79430c !important; font-weight: 800; }
.settings { min-height: 0; overflow: auto; padding: 26px 30px; max-width: 860px; }
.settings-card { margin-bottom: 20px; padding: 27px; border: 2px solid var(--line); border-radius: 24px; background: #fff; }
.settings-card h2 { margin: 0 0 10px; color: var(--blue-dark); font-size: 25px; }
.settings-card p { color: var(--muted); font-size: 19px; }
.recipient-list { display: flex; flex-wrap: wrap; gap: 9px; margin: 18px 0 22px; }
.recipient-pill { padding: 11px 14px; border-radius: 13px; background: #fff1d5; color: #784307; font-weight: 800; }
.help-preview { padding: 18px; border: 2px solid var(--line); border-radius: 15px; background: #f6f9fd; color: var(--ink) !important; }
.blank { flex: 1; display: grid; place-items: center; padding: 30px; text-align: center; }
.blank-inner { max-width: 450px; }
.blank h2 { margin: 0 0 10px; color: var(--blue-dark); font-size: 30px; }
.blank p { color: var(--muted); font-size: 20px; }
.modal-backdrop { position: fixed; z-index: 20; inset: 0; padding: 18px; background: #092746b8; display: grid; place-items: center; }
.modal { width: min(690px, 100%); max-height: 95dvh; overflow: auto; padding: 34px; border-radius: 27px; background: #fff; box-shadow: 0 30px 85px #071b3780; }
.modal h2 { margin: 0 0 12px; color: var(--blue-dark); font-size: 31px; }
.modal p { color: var(--muted); font-size: 19px; }
.modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px; margin-top: 25px; }
.contact-modal-head { display: flex; align-items: center; gap: 18px; }
.contact-modal-head .avatar { width: 72px; height: 72px; font-size: 28px; }
.contact-modal-head p { margin: 0; }
.check-card { min-height: 110px; margin-top: 28px; padding: 20px; border: 2px solid #e6b45c; border-radius: 19px; background: #fff7e8; display: flex; align-items: center; gap: 19px; cursor: pointer; }
.check-card input { width: 35px; height: 35px; min-height: 35px; flex: none; accent-color: var(--blue); }
.check-card strong { display: block; color: var(--ink); font-size: 21px; }
.check-card small { display: block; margin-top: 5px; color: var(--muted); font-size: 16px; line-height: 1.35; }
.modal.modal-wide { width: min(940px, 100%); }
.help-modal { text-align: center; }
.help-modal-icon { width: 92px; height: 92px; margin: 0 auto 12px; border-radius: 28px; background: #ffe5e7; color: var(--red); display: grid; place-items: center; font-size: 52px; }
.help-modal h2 { font-size: 40px; }
.help-modal .help-lead { margin: 6px auto 16px; color: var(--ink); font-size: 24px; }
.help-modal .help-preview { margin: 0 auto 14px; padding: 18px 20px; border: 2px solid var(--line); border-radius: 18px; background: #f6f9fd; color: var(--ink); font-size: 24px; }
.help-modal .help-extra { font-size: 20px; }
.help-modal-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 18px; margin-top: 22px; }
.help-modal-actions .btn { min-height: 120px; font-size: 30px; border-radius: 22px; }
.help-modal-actions.single { grid-template-columns: 1fr; }
.help-modal-actions.single .btn { min-height: 140px; font-size: 38px; }
.help-close-hint { margin: 16px 0 0; font-size: 17px; }
.help-modal-cancel { background: #e9eef5; color: var(--blue-dark); border: 3px solid #b8c7da; }
.help-modal-send { background: var(--red); color: #fff; box-shadow: 0 6px 0 #81212a; }
.help-modal-send:disabled { opacity: .7; }
.help-calls { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 18px; }
.help-call { min-height: 72px; font-size: 22px; }
.help-targets { display: grid; gap: 8px; margin: 20px 0; }
.help-targets > div { padding: 13px 16px; border-radius: 13px; background: #fff1d5; font-size: 20px; }
.help-targets a { float: right; font-weight: 800; }
.toast { position: fixed; z-index: 80; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: min(90vw, 650px); padding: 17px 23px; border-radius: 15px; background: var(--ink); color: #fff; text-align: center; font-size: 18px; font-weight: 800; box-shadow: 0 12px 35px #14304f70; }
.only-mobile { display: none; }
@media (max-width: 1050px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .workspace { grid-template-columns: 330px minmax(0, 1fr); }
  .topbar-controls { gap: 10px; }
  .volume-caption, .volume-name { display: none; }
  .volume-btn { min-width: 53px; min-height: 52px; }
  .group-footer { grid-template-columns: minmax(0, 1fr) 300px; padding: 12px; }
  .voice-instruction { display: none; }
  .record-button { width: 100%; }
}
@media (max-width: 850px) {
  .shell { min-height: 100dvh; height: 100dvh; display: flex; flex-direction: column; }
  .topbar { min-height: 70px; padding: 0 16px; }
  .topbar .brand { font-size: 23px; }
  .topbar .brand-mark { width: 43px; height: 43px; font-size: 24px; }
  .status-pill { padding: 8px 12px; font-size: 13px; }
  .sidebar { order: 3; min-height: 78px; padding: 6px; flex-direction: row; gap: 4px; border-right: 0; border-top: 2px solid var(--line); background: #fff; }
  .sidebar-title, .sidebar-spacer { display: none; }
  .navbtn { min-height: 64px; flex: 1; padding: 4px; flex-direction: column; gap: 2px; justify-content: center; text-align: center; font-size: 13px; }
  .nav-icon { width: auto; font-size: 25px; line-height: 1; }
  .helpbtn { width: 100%; min-height: 64px; padding: 4px; flex-direction: column; gap: 0; box-shadow: none; font-size: 16px; }
  .helpbtn span:first-child { font-size: 24px; line-height: 1; }
  .main { flex: 1; }
  .main-head { min-height: 83px; padding: 10px 18px; }
  .main-head h1 { font-size: 25px; }
  .main-head p { margin-top: 4px; font-size: 14px; }
  .main-head .btn { min-height: 52px; padding: 8px 12px; font-size: 15px; }
  .admin-actions { flex-wrap: wrap; justify-content: flex-end; }
  .workspace { flex: 1; display: flex; }
  .single-workspace { flex: 1; }
  .conversation-list { flex: 1; }
  .chat-pane { display: none; flex: 1; }
  .single-workspace .chat-pane { display: flex; }
  .mobile-chat-open .conversation-list { display: none; }
  .mobile-chat-open .chat-pane { display: flex; }
  .only-mobile { display: inline-flex; }
  .chat-pane-head { min-height: 75px; padding: 9px 12px; gap: 9px; }
  .group-head { min-height: 82px; }
  .group-head .chat-head-name strong { font-size: 23px; }
  .group-head .chat-head-name small { font-size: 14px; }
  .chat-pane-head .avatar { width: 48px; height: 48px; font-size: 20px; }
  .chat-head-name strong { font-size: 19px; }
  .chat-head-name small { font-size: 13px; }
  .details-button { min-height: 45px; padding: 7px; font-size: 13px; }
  .messages { padding: 15px; }
  .bubble { max-width: 92%; font-size: 20px; }
  .single-workspace .bubble { width: 92%; }
  .voice-modal { padding: 24px; }
  .help-modal h2 { font-size: 30px; }
  .help-modal .help-lead, .help-modal .help-preview { font-size: 19px; }
  .help-modal-actions .btn { min-height: 84px; font-size: 22px; }
  .voice-modal h2 { font-size: 29px; }
  .voice-modal-clock { font-size: 46px; }
  .voice-modal p { font-size: 18px; }
  .voice-modal-actions .btn { min-height: 88px; padding: 8px; font-size: 20px; }
  .voice-composer { min-height: 92px; padding: 12px; }
  .group-footer { grid-template-columns: 1fr 1fr; padding: 9px; gap: 8px; }
  .group-footer .helpbtn { min-height: 76px; font-size: 18px; }
  .group-footer .record-button { min-height: 76px; font-size: 20px; }
  .caregiver-options { grid-template-columns: 1fr; }
  .record-button { min-height: 68px; min-width: 0; font-size: 21px; }
  .voice-actions .btn { min-height: 60px; padding: 9px; font-size: 16px; }
  .contacts-page, .settings { padding: 15px; }
  .contact-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .modal { padding: 24px; }
  .login-card, .connect-card { padding: 25px; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .chat-card, .contact-tile { transition: background .15s, border-color .15s, transform .15s; }
  .btn:active, .chat-card:active, .contact-tile:active { transform: scale(.98); }
  .record-dot { animation: pulse 1s infinite; }
  @keyframes pulse { 50% { opacity: .3; } }
}

/* Paleta acolhedora: cores quentes e uma cor por ação (verde = falar, roxo = ouvir, laranja = novo, vermelho = ajuda) */
.shell, .chat-pane { background: var(--cream); }
.topbar { background: #fffdf8; color: var(--ink); border-bottom: 3px solid var(--line); box-shadow: 0 3px 12px #5a40200f; }
.topbar .brand { color: var(--ink); }
.topbar .brand-mark { background: var(--green); color: #fff; }
.volume-caption { color: var(--muted); }
.volume-btn { border: 2px solid #d6c7af; background: #fff; color: var(--ink); }
.volume-btn.selected { border-color: #c97a12; background: var(--orange); color: #2b1a05; }
.status-pill { background: #e3f3e7; color: #155c33; border: 2px solid #b5dcc0; }
.status-dot { background: #22a35a; }
.bubble { border-color: var(--line); background: #fff; color: var(--ink); }
.bubble.mine { background: #e2f3e4; border-color: #b6dcbd; }
.bubble.unheard-bubble { background: #fff3dc; border-color: #ef9d2d; border-width: 3px; box-shadow: 0 4px 18px #d4901d26; }
.sender-row { color: var(--ink); }
.avatar { background: #f1e6d4; color: #6b4a1f; }
.audio-label.new { color: #9a4f00; }
.audio-play { background: var(--violet); color: #fff; box-shadow: 0 5px 0 var(--violet-dark); }
.audio-play-new { background: var(--orange); color: #2b1a05; box-shadow: 0 5px 0 #b06a0c; }
.read-btn { background: var(--violet-soft); color: var(--violet-dark); }
.message-text .mention { color: var(--green-dark); }
.group-footer { background: #fffdf8; border-top: 3px solid var(--line); }
.voice-instruction strong { color: var(--ink); }
.record-button { background: var(--green); color: #fff; box-shadow: 0 6px 0 var(--green-dark); }
.voice-modal-backdrop, .modal-backdrop { background: #2b2014c4; }
.voice-modal h2, .voice-modal-clock { color: var(--ink); }
.voice-modal-icon { background: #e3f3e7; }
.voice-modal-send { background: var(--green); }
.help-modal h2 { color: var(--ink); }
.help-modal .help-preview, .help-preview { background: #fff8ec; border-color: var(--line); }
.modal h2, .main-head h1, .settings-card h2 { color: var(--ink); }
.main-head { background: #fffdf8; }
input, textarea { border-color: #cdbb9f; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible { outline-color: #c97a12; }
.group-footer .voice-composer { background: transparent; }
/* Toque tolerante: sem menu de toque longo, sem seleção de texto e com retorno visual ao apertar */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
input, textarea { -webkit-user-select: text; user-select: text; }
button, a, label { -webkit-touch-callout: none; touch-action: manipulation; }
.btn:active:not(:disabled), .volume-btn:active { transform: translateY(3px); filter: brightness(.93); }
.toast { pointer-events: none; }
