#incoming-call {
  position: fixed;
  z-index: 30;
  inset: auto 12px max(94px, calc(env(safe-area-inset-bottom) + 82px)) auto;
  width: min(380px, calc(100% - 24px));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 22px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: 0 6px 24px #0004;
}
[data-phone-app] #incoming-call { inset: max(8px, env(safe-area-inset-top)) 12px auto; margin: 0 auto; }
.call-alert-copy { min-width: 0; }
.call-alert-copy > p { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.call-alert-actions { display: flex; gap: 8px; }
.call-control {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 50%;
  border: 0;
  color: #fff;
  background: #ffffff25;
}
.call-control:active { scale: .94; }
.call-hangup { background: #cd3448; }
.call-answer { background: #167b4f; }
.utility-shell .call-screen { width: 100%; padding: 0; }
.call-stage {
  position: relative;
  isolation: isolate;
  color: #fff;
  min-height: 100dvh;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 72px 16px 150px;
  background: radial-gradient(ellipse at top, #31578e, #172635 58%, #10181f);
  overflow: hidden;
}
[data-phone-app] .utility-shell > .call-screen { padding: 0; }
.call-back {
  position: absolute;
  z-index: 2;
  inset: max(12px, env(safe-area-inset-top)) auto auto 12px;
  background: #172635c7;
}
.call-identity { position: relative; display: grid; justify-items: center; gap: 10px; text-align: center; }
.call-identity .avatar { width: 96px; height: 96px; }
.call-identity h1 { font-size: clamp(22px, 7vw, 32px); }
#call-status { color: #ffffffc8; }
.call-screen video { object-fit: cover; background: #111a23; }
.call-screen #remote-media {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; visibility: hidden;
}
.call-screen #local-media {
  position: absolute;
  inset: max(16px, env(safe-area-inset-top)) 12px auto auto;
  width: clamp(84px, 26vw, 170px);
  aspect-ratio: 3 / 4;
  transform: scaleX(-1);
  border-radius: 14px;
  visibility: hidden;
}
.call-screen :is(#remote-media, #local-media)[data-playable] { visibility: visible; }
.call-stage:has(#remote-media[data-playable]) { align-content: start; }
.call-stage:has(#remote-media[data-playable]) .call-identity { justify-self: start; text-align: start; justify-items: start; }
.call-stage:has(#remote-media[data-playable]) .call-identity .avatar { display: none; }
#call-playback { position: absolute; bottom: 140px; }
.call-screen #media-actions {
  position: absolute;
  inset: auto 12px max(22px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
}
.call-action { min-width: 64px; display: grid; justify-items: center; gap: 6px; font-size: 12px; }
.call-action .call-control { width: 54px; height: 54px; }
#dialog[data-view="contact-profile"] .dialog-header { margin-bottom: 6px; }
[data-phone-app] #dialog[data-view="contact-profile"] .dialog-header { justify-content: start; }
[data-phone-app] #dialog[data-view="contact-profile"] {
  inset: 0; margin: 0; width: 100%; height: 100dvh; max-width: none; max-height: none;
  border: 0; border-radius: 0; padding: max(8px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
}
.contact-profile-hero {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 26px 14px 14px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(155deg, #005e76, #244f8b);
}
.contact-profile-hero > p { font-size: 22px; }
.contact-profile-handle { color: #d1f4ff; }
.contact-profile-actions { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.profile-action {
  min-height: 54px; display: grid; place-items: center; gap: 2px;
  padding: 5px 2px; color: inherit; background: #ffffff24; border: 0; border-radius: 12px;
}
.profile-action:active { background: #ffffff3b; }
