.call-page {
  min-height: 100vh;
  background: var(--bg);
}
.call-page [hidden] {
  display: none !important;
}
.call-shell {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 22px 0 48px;
}
.call-header,
.call-heading,
.call-room-top,
.call-controls,
.stage-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.call-header {
  margin-bottom: 20px;
}
.call-header .brand {
  padding: 0;
}
.call-status {
  margin: 0 0 14px;
  color: var(--muted);
}
.call-status.is-error {
  color: var(--red);
}
.call-status:empty {
  display: none;
}
.call-card,
.stage-card,
.participants-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 2px 8px var(--shadow);
}
.call-card {
  max-width: 760px;
  margin: 7vh auto 0;
  padding: clamp(20px, 4vw, 34px);
}
.call-heading {
  align-items: flex-start;
}
.call-eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}
.call-heading h1,
.call-room-top h1 {
  margin: 0;
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.6px;
}
.call-heading .muted,
.call-room-top .muted {
  margin: 8px 0 0;
}
.call-pill {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--green);
  font-size: 11px;
}
.call-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 25px 0;
}
.call-details > div {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.call-details dt {
  color: var(--muted);
  font-size: 11px;
}
.call-details dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-weight: 550;
}
.call-options {
  display: grid;
  gap: 16px;
  max-width: 480px;
}
.call-options .button {
  justify-self: start;
  min-width: 165px;
}
.call-relay {
  font-size: 13px;
}
.call-hint {
  margin: -11px 0 0;
  font-size: 12px;
}
.call-room {
  display: grid;
  gap: 17px;
}
.call-room-top {
  align-items: flex-start;
  padding: 8px 2px;
}
.call-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: start;
  gap: 14px;
}
.stage-card {
  overflow: hidden;
}
.stage {
  position: relative;
  display: grid;
  min-height: 260px;
  aspect-ratio: 16 / 9;
  place-items: center;
  overflow: hidden;
  background: #18241e;
  color: #fff;
}
.stage video {
  display: none;
  width: 100%;
  height: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: #111;
}
.stage.has-video video {
  display: block;
}
.stage.has-video .stage-placeholder {
  display: none;
}
.stage:fullscreen {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}
.stage:fullscreen video,
.call-panel-body .stage:fullscreen video {
  width: 100%;
  height: 100%;
  max-height: none;
}
.stage-placeholder {
  display: grid;
  justify-items: center;
  gap: 10px;
  color: #d5e2d8;
  font-size: 13px;
}
.stage-placeholder p {
  margin: 0;
}
.stage-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid #ffffff40;
  border-radius: 50%;
  color: #a7c7ad;
  font-size: 22px;
}
.stage-fullscreen,
.stage-audio {
  position: absolute;
  z-index: 1;
  right: 12px;
  bottom: 12px;
}
.stage-audio {
  right: auto;
  left: 12px;
}
.stage-caption {
  min-height: 42px;
  padding: 8px 13px;
  font-size: 12px;
}
.participants-card {
  padding: 16px;
}
.participants-card h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.participants-card h2 span {
  color: var(--muted);
  font-size: 12px;
}
.participants-list {
  display: grid;
  gap: 9px;
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
}
.participant {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}
.participant-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.participant-detail {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
}
.quality-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: #98a39a;
}
.quality-dot[data-quality='good'] {
  background: #4c9a68;
}
.quality-dot[data-quality='poor'] {
  background: #c08b34;
}
.quality-dot[data-quality='lost'] {
  background: var(--red);
}
.call-controls {
  justify-content: center;
  flex-wrap: wrap;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}
.leave-button {
  color: var(--red);
}
@media (max-width: 760px) {
  .call-shell {
    width: min(100% - 24px, 620px);
    padding-top: 14px;
  }
  .call-card {
    margin-top: 4vh;
    padding: 20px 16px;
  }
  .call-heading {
    flex-direction: column;
  }
  .call-details {
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 20px 0;
  }
  .call-layout {
    grid-template-columns: 1fr;
  }
  .participants-card {
    padding: 14px;
  }
  .participants-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stage {
    min-height: 210px;
  }
  .stage video {
    max-height: 55vh;
  }
  .call-room-top {
    align-items: flex-start;
  }
  .call-pill {
    max-width: 120px;
    text-align: center;
  }
}
@media (max-width: 430px) {
  .call-header .brand {
    font-size: 23px;
  }
  .call-header > .button {
    min-height: 36px;
    padding: 6px 9px;
  }
  .call-room-top h1 {
    font-size: 22px;
  }
  .participants-list {
    grid-template-columns: 1fr;
  }
  .call-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .call-controls .leave-button {
    grid-column: 1 / -1;
  }
}
