#whisperSmsOpen { width:100%; min-height:46px; font-size:15px; }
.whisper-sms-window {
  --sms-bg:#fff;
  --sms-text:#1c1c1e;
  --sms-muted:#62626b;
  --sms-faint:#e9e9ee;
  --sms-divider:#e4e4ea;
  --sms-blue:#0066cc;
  --sms-green:#167c3b;
  position:fixed;
  inset:0;
  width:min(600px,calc(100vw - 32px));
  height:min(720px,calc(100dvh - 48px));
  max-width:none;
  max-height:none;
  box-sizing:border-box;
  margin:auto;
  padding:0;
  border:1px solid var(--sms-divider);
  border-radius:24px;
  background:var(--sms-bg);
  color:var(--sms-text);
  box-shadow:0 24px 80px #130f1a33;
}
.whisper-sms-window::backdrop { background:#201d28a8; }
html[data-appearance="dark"] .whisper-sms-window {
  --sms-bg:#1c1c1f;
  --sms-text:#f4f4f6;
  --sms-muted:#b5b5bf;
  --sms-faint:#343439;
  --sms-divider:#424248;
  --sms-blue:#6cb6ff;
  color-scheme:dark;
}
.whisper-sms {
  display:flex;
  flex-direction:column;
  height:100%;
  min-height:0;
  color:var(--sms-text);
  background:var(--sms-bg);
  font-size:15px;
  line-height:1.4;
}
.whisper-sms [hidden] { display:none !important; }
.whisper-sms button {
  border:0;
  background:transparent;
  color:inherit;
  font:inherit;
  cursor:pointer;
}
.whisper-sms :focus-visible { outline:2px solid var(--sms-blue); outline-offset:2px; }
.whisper-sms-thread { display:flex; flex:1; flex-direction:column; min-height:0; }
.whisper-sms-head {
  display:flex;
  flex:none;
  align-items:center;
  gap:11px;
  padding:12px 16px;
  border-bottom:1px solid var(--sms-divider);
}
.whisper-sms .whisper-sms-head h2 { margin:0; color:inherit; font:inherit; font-weight:700; }
.whisper-sms-avatar {
  display:grid;
  flex:none;
  place-items:center;
  width:36px;
  height:36px;
  border-radius:50%;
  background:linear-gradient(150deg,#8595ef,#645bbc);
  color:#fff;
  font-weight:700;
}
.whisper-sms button[data-sms-close],.whisper-sms button[data-sms-back] {
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  padding:0;
  border-radius:50%;
  color:var(--sms-blue);
  font:26px/1 system-ui,sans-serif;
}
.whisper-sms button[data-sms-close] { margin-left:auto; background:var(--sms-faint); color:var(--sms-text); }
.whisper-sms-scroll { flex:1; min-height:0; overflow:auto; padding:12px 16px; overscroll-behavior:contain; }
.whisper-sms-list { display:grid; gap:7px; margin:0; padding:0; list-style:none; }
.whisper-sms-date,.whisper-sms-empty,.whisper-sms-status {
  margin:0;
  padding:5px 0;
  color:var(--sms-muted);
  text-align:center;
  font-size:12px;
}
.whisper-sms-status:empty { display:none; }
.whisper-sms-row { display:flex; flex-direction:column; align-items:flex-start; min-width:0; }
.whisper-sms-row.is-mine { align-items:flex-end; }
.whisper-sms-bubble {
  box-sizing:border-box;
  max-width:85%;
  padding:7px 11px;
  border-radius:16px 16px 16px 5px;
  background:var(--sms-faint);
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}
.whisper-sms-row.is-mine .whisper-sms-bubble {
  border-radius:16px 16px 5px 16px;
  background:var(--sms-green);
  color:#fff;
}
.whisper-sms :is([data-sms-more],[data-sms-refresh],[data-sms-inbox-refresh],.whisper-sms-row button) {
  display:block;
  margin:0 auto;
  padding:7px;
  color:var(--sms-blue);
  font-size:12px;
}
.whisper-sms-row button { margin:0; }
.whisper-sms-compose {
  display:flex;
  flex:none;
  align-items:flex-end;
  gap:8px;
  padding:8px 14px max(12px,env(safe-area-inset-bottom));
  border-top:1px solid var(--sms-divider);
}
.whisper-sms-compose textarea {
  flex:1;
  min-width:0;
  padding:9px 13px;
  border:1px solid var(--sms-divider);
  border-radius:18px;
  background:var(--sms-bg);
  color:inherit;
  font:inherit;
  font-size:16px;
  resize:none;
  field-sizing:content;
  max-height:105px;
}
.whisper-sms-compose button {
  display:grid;
  flex:none;
  place-items:center;
  width:42px;
  height:42px;
  border-radius:50%;
  background:var(--sms-green);
  color:white;
}
.whisper-sms-compose button:disabled { opacity:.38; cursor:default; }
.whisper-sms-compose svg { width:22px; fill:none; stroke:currentColor; stroke-width:2.5; stroke-linecap:round; stroke-linejoin:round; }
.ai-phone-sms {
  --sms-bg:#fff;
  --sms-text:#1c1c1e;
  --sms-muted:#62626b;
  --sms-faint:#e9e9ee;
  --sms-divider:#e4e4ea;
  --sms-blue:#0066cc;
  --sms-green:#167c3b;
  position:absolute;
  inset:calc(10.5cqw + 32px) 0 4.6cqw;
  z-index:1;
}
.ai-phone-sms .whisper-sms { font-size:max(11px,4.75cqw); }
.ai-phone-sms :is(.whisper-sms-head,.whisper-sms-scroll) { padding:2.8cqw 4.6cqw; }
.ai-phone-sms .whisper-sms-avatar { width:13cqw; height:13cqw; }
.ai-phone-sms :is(.whisper-sms-date,.whisper-sms-empty,.whisper-sms-status) { font-size:max(10px,3.8cqw); }
.ai-phone-sms .whisper-sms-inbox { padding:0 4.6cqw; overflow:auto; }
.ai-phone-sms .whisper-sms-inbox h2 { margin:0 0 2cqw; font-size:8.7cqw; font-weight:750; }
.whisper-sms-inbox button.whisper-sms-contact {
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:3cqw;
  width:100%;
  padding:2.6cqw 0;
  border-bottom:1px solid var(--sms-divider);
  text-align:left;
}
.whisper-sms-contact small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--sms-muted); }
.whisper-sms-contact > :last-child { color:var(--sms-muted); font-size:20px; }

@media (max-width:600px) {
  .whisper-sms-window {
    width:100%;
    height:100dvh;
    border:0;
    border-radius:0;
  }
  .whisper-sms-window .whisper-sms-head { padding-top:calc(10px + max(env(safe-area-inset-top),var(--app-safe-top,0px))); }
}
