* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #16323f;
  color: #fff;
  -webkit-tap-highlight-color: transparent;
}

[hidden] { display: none !important; }

.idle {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  text-align: center;
}
h1 { margin: 0; font-size: 34px; }
.muted { margin: 0; opacity: 0.75; max-width: 340px; line-height: 1.4; }
.tip { margin: 24px 0 0; font-size: 14px; opacity: 0.55; max-width: 320px; }

.call-btn, .hangup-btn {
  border: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.call-btn { width: 150px; height: 150px; margin-top: 18px; background: #2e7d4f; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
.call-btn:active { transform: scale(0.96); }
.call-btn:disabled { opacity: 0.5; }

.status { min-height: 1.4em; margin: 6px 0 0; font-weight: 600; color: #f2c14e; max-width: 340px; }

.call { position: fixed; inset: 0; background: #000; }
.joey { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.joey video { width: 100%; height: 100%; object-fit: contain; }
.call-status { position: absolute; padding: 0 24px; text-align: center; font-size: 18px; opacity: 0.85; }

.self {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  width: 28vw;
  max-width: 180px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
  background: #222;
  transform: scaleX(-1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.hangup-btn {
  position: absolute;
  left: 50%;
  bottom: max(28px, env(safe-area-inset-bottom));
  width: 78px;
  height: 78px;
  margin-left: -39px;
  background: #c62828;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}
