/* Guest door: ui.css (copied from rooms/site) gives the FaceTimeParty tokens; this adds the door and call stage. */
[hidden] { display: none !important; }
body { min-height: 100vh; min-height: 100dvh; overscroll-behavior: none; }
#bg { opacity: 0; transition: opacity 1s; }
#bg.on { opacity: 1; }
#mute { position: fixed; z-index: 40; top: max(12px, env(safe-area-inset-top)); right: 16px; color: var(--text); }

#door { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 26px; padding: 24px 16px calc(env(safe-area-inset-bottom) + 24px); text-align: center; }
#msg { margin: 0; max-width: 320px; font: 500 17px/1.45 var(--sans); color: var(--text); }
#sub { margin: -16px 0 0; max-width: 320px; font: 400 14px/1.45 var(--sans); color: var(--muted); }
.go { padding: 16px 26px; border: 0; border-radius: 16px; color: #021015; background: linear-gradient(92deg, var(--cyan), var(--green));
  font: 800 17px var(--sans); letter-spacing: .02em; box-shadow: 0 10px 40px rgba(47, 230, 255, .3); }
.go:disabled { opacity: .55; }

/* Face circle (like phone face unlock): own preview, a ring, and a radar sweep while checking */
#face { position: relative; width: min(64vw, 260px); aspect-ratio: 1; }
#face video { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; transform: scaleX(-1); background: var(--bg2); }
#face::before, #face::after { content: ""; position: absolute; inset: -12px; border-radius: 50%; pointer-events: none; }
#face::before { border: 2px solid var(--line); transition: border-color .4s, box-shadow .4s; }
#face.scan::before, #face.wait::before { border-color: var(--cyan); box-shadow: 0 0 28px rgba(47, 230, 255, .35); }
#face.good::before { border-color: var(--green); box-shadow: 0 0 34px rgba(70, 240, 160, .5); }
#face.scan::after { background: conic-gradient(from 0deg, transparent 0 72%, rgba(47, 230, 255, .55) 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 12px), #000 calc(100% - 11px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 12px), #000 calc(100% - 11px)); animation: sweep 1.6s linear infinite; }
#face.wait::before { animation: pulse 2.4s ease-in-out infinite; }
@keyframes sweep { to { transform: rotate(1turn); } }
@keyframes pulse { 50% { box-shadow: 0 0 6px rgba(47, 230, 255, .15); border-color: rgba(47, 230, 255, .45); } }

#hud { min-height: 1.4em; font: 700 15px var(--mono); letter-spacing: .26em; color: var(--cyan); text-shadow: 0 0 16px rgba(47, 230, 255, .55); }
#hud.good { color: var(--green); text-shadow: 0 0 18px rgba(70, 240, 160, .6); }
#hud.in { animation: flick .5s steps(2) 1; }
@keyframes flick { 0% { opacity: .2; } 50% { opacity: 1; } 75% { opacity: .5; } }

/* Call stage (the look of rooms/site/call.html) */
#stage { position: fixed; inset: 0; z-index: 5; background: #000; }
#grid { position: absolute; inset: 0; display: grid; gap: 4px; grid-template-columns: 1fr; }
#grid.many { grid-template-columns: 1fr 1fr; }
.vtile { position: relative; background: var(--bg2); overflow: hidden; min-height: 0; }
.vtile video { width: 100%; height: 100%; object-fit: cover; }
.vtile b { position: absolute; left: 10px; bottom: calc(env(safe-area-inset-bottom) + 96px); font: 600 12px var(--mono); letter-spacing: .14em;
  background: rgba(0, 0, 0, .55); padding: 4px 8px; border-radius: 8px; }
#self { position: absolute; right: 12px; top: calc(env(safe-area-inset-top) + 12px); width: 28vw; max-width: 160px;
  aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--bg2); z-index: 3; }
#self video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
#status { position: absolute; left: 0; right: 0; top: 40%; text-align: center; font: 600 14px var(--mono);
  letter-spacing: .16em; color: var(--muted); z-index: 2; }
#controls { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 18px); display: flex;
  justify-content: center; gap: 18px; z-index: 3; }
#controls button { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(6, 26, 34, .85); color: var(--text); font-size: 24px; }
#controls button.off { background: #3a2a10; }
#controls #hang { background: var(--danger); border-color: var(--danger); }

@media (prefers-reduced-motion: reduce) {
  #bg { transition: none; }
  #face.scan::after, #face.wait::before, #hud.in { animation: none; }
}
