.local-call-dialog {
  --call-blue: #2156b8;
  --call-orange: #c64624;
  width: min(560px, calc(100% - 24px));
  max-width: 560px;
  max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid #ffffff70;
  border-radius: 24px;
  background: #f5f7fb;
  color: #172b4d;
  box-shadow: 0 24px 90px #102b5b55;
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.local-call-dialog::backdrop { background: #10213ec9; backdrop-filter: blur(6px); }
.local-call-dialog * { box-sizing: border-box; }
.local-call-dialog [hidden] { display: none !important; }
.local-call-header { position: relative; padding: 20px 24px 23px; color: #fff; background: linear-gradient(135deg, #163c80, #2156b8 65%, #2e6ad0); }
.local-call-brand { display: flex; align-items: center; gap: 11px; padding-right: 34px; margin-bottom: 18px; }
.local-call-brand img { width: 111px; height: 41px; padding: 3px 6px; border-radius: 9px; background: #fff; object-fit: contain; }
.local-call-brand > span { color: #e1ebff; font-size: 10px; font-weight: 650; line-height: 15px; letter-spacing: .3px; }
.local-call-header h2 { max-width: 360px; margin: 0 0 8px; color: #fff; font-size: 24px; font-weight: 700; line-height: 1.2; letter-spacing: -.5px; }
.local-call-header p { max-width: 420px; margin: 0; color: #dce8ff; font-size: 12px; line-height: 18px; }
.local-call-dialog button { min-height: 44px; margin: 0; font-family: inherit; font-size: 12px; font-weight: 600; line-height: 17px; touch-action: manipulation; }
.local-call-dialog button svg { display: block; flex: 0 0 20px; width: 20px; height: 20px; }
.local-call-dialog button:focus-visible { outline: 3px solid #f2a188; outline-offset: 3px; }
.local-call-dialog button:disabled { cursor: default; opacity: .48; }
.local-call-dialog .local-call-close { position: absolute; top: 17px; right: 14px; display: grid; place-items: center; width: 44px; padding: 11px; border: 0; border-radius: 50%; color: #fff; background: #ffffff15; }
.local-call-body { padding: 17px 22px 22px; }
.local-call-status { display: flex; align-items: center; gap: 7px; min-height: 24px; margin-bottom: 13px; color: #516985; font-size: 12px; }
.local-call-status i { flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: #8a9cb4; }
.local-call-status strong { margin-left: auto; color: #2156b8; font-size: 12px; font-variant-numeric: tabular-nums; }
.local-call-dialog[data-state="connected"] .local-call-status i { background: #2f9468; box-shadow: 0 0 0 3px #2f946818; }
.local-call-dialog[data-state="connecting"] .local-call-status i,
.local-call-dialog[data-state="reconnecting"] .local-call-status i { background: #c98336; animation: local-call-pulse 1.2s ease-in-out infinite; }
.local-call-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 14px; padding: 0; border: 0; }
.local-call-roles legend { margin: 0 0 7px; padding: 0; color: #61738b; font-size: 11px; }
.local-call-roles button { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 9px; border: 1px solid #d8e1ef; border-radius: 11px; background: #fff; color: #5a6c84; }
.local-call-roles button[aria-pressed="true"] { border-color: #2156b8; color: #2156b8; background: #edf3ff; box-shadow: inset 0 0 0 1px #2156b8; }
.local-call-participants { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.local-call-person { min-width: 0; overflow: hidden; border: 1px solid #e0e6ef; border-radius: 15px; background: #fff; }
.local-call-video { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 11px; min-height: 155px; overflow: hidden; background: radial-gradient(ellipse at 50% 30%, #e1eafa, #edf2f9 80%); color: #6880a2; }
.local-call-avatar { display: grid; place-items: center; width: 53px; height: 53px; border: 1px solid #cddcf2; border-radius: 50%; background: #ffffffb3; }
.local-call-avatar svg { width: 27px; height: 27px; }
.local-call-camera-state { color: #657d9d; font-size: 10px; }
.local-call-video-tracks { position: absolute; inset: 0; display: none; background: #16253f; }
.local-call-person.has-camera .local-call-video-tracks { display: block; }
.local-call-video-tracks video { display: block; width: 100%; height: 100%; min-height: 155px; object-fit: cover; }
.local-call-person[data-participant="local"] video { transform: scaleX(-1); }
.local-call-person-info { padding: 9px 10px 10px; }
.local-call-person-info strong { display: block; margin-bottom: 2px; color: #243d60; font-size: 12px; line-height: 17px; overflow-wrap: anywhere; }
.local-call-person-info span { display: block; color: #6b7c93; font-size: 10px; line-height: 14px; }
.local-call-waiting { display: flex; flex-direction: column; justify-content: center; border: 1px dashed #ccdaee; background: #edf2fa; }
.local-call-waiting .local-call-video { min-height: 205px; padding: 15px; background: transparent; color: #617a9d; font-size: 11px; text-align: center; }
.local-call-waiting .local-call-avatar { background: #ffffff60; opacity: .65; }
.local-call-privacy { margin: 12px 0; color: #6a7b92; font-size: 11px; line-height: 17px; }
.local-call-error { margin: 12px 0 0; padding: 9px 11px; border: 1px solid #f1d6cc; border-radius: 9px; background: #fff2ed; color: #9a442b; font-size: 11px; line-height: 17px; }
.local-call-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.local-call-controls button { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 8px; border: 1px solid #d8e1ef; border-radius: 11px; background: #fff; color: #456183; }
.local-call-controls button[aria-pressed="true"] { border-color: #c4d8fb; background: #e9f1ff; color: #2156b8; }
.local-call-primary { display: grid; margin-top: 12px; }
.local-call-dialog .local-call-join,
.local-call-dialog .local-call-leave { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 47px; padding: 12px 16px; border: 0; border-radius: 12px; background: #c64624; color: #fff; box-shadow: 0 4px 13px #c6462420; font-weight: 700; }
.local-call-dialog .local-call-leave { background: #a53c38; box-shadow: none; }
.local-call-dialog .local-call-audio { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; margin-top: 9px; padding: 9px; color: #2156b8; background: #e7efff; }
@keyframes local-call-pulse { 50% { opacity: .35; } }
@media (max-width: 430px) {
 .local-call-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); border-radius: 19px; }
 .local-call-header { padding: 17px 17px 20px; }
 .local-call-header h2 { padding-right: 20px; font-size: 22px; }
 .local-call-body { padding: 14px 14px 17px; }
 .local-call-video,.local-call-video-tracks video { min-height: 145px; }
 .local-call-waiting .local-call-video { min-height: 195px; }
 .local-call-controls button { gap: 5px; padding-inline: 5px; font-size: 11px; }
}
@media (max-width: 350px) { .local-call-brand { gap: 7px; } .local-call-brand img { width: 99px; } .local-call-header h2 { font-size: 20px; } .local-call-controls button svg { width: 17px; flex-basis: 17px; } }
@media (prefers-reduced-motion: reduce) { .local-call-status i { animation: none !important; } }
