* { box-sizing: border-box; }
body {
  margin: 0; font-family: -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
  background: #f6f7f9; color: #1c2430;
}
#app { max-width: 560px; margin: 0 auto; padding: 16px; }
header { text-align: center; margin: 12px 0; }
h1 { font-size: 28px; margin: 4px 0; }
.tagline { color: #5a6a7a; margin: 4px 0; }
.presence { color: #2e7d52; font-size: 14px; }
.card {
  background: #fff; border-radius: 16px; padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06); margin-bottom: 16px;
}
.hidden { display: none !important; }
.notes { padding-left: 18px; line-height: 1.7; font-size: 14px; }
.check { display: block; margin: 12px 0; font-size: 15px; }
button {
  font: inherit; border: none; border-radius: 999px; padding: 12px 20px;
  background: #e8ecf1; color: #1c2430; cursor: pointer;
}
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary { background: #2f6fed; color: #fff; width: 100%; }
button.big { font-size: 18px; padding: 16px 20px; }
button.danger { background: #d93636; color: #fff; }
button.linklike { background: none; padding: 0; color: #2f6fed; text-decoration: underline; border-radius: 0; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.controls .ctl { flex: 1 1 30%; min-height: 52px; font-size: 15px; }
.controls .small { font-size: 13px; min-height: 40px; background: #f0f2f5; }
.status { text-align: center; font-size: 17px; min-height: 1.4em; }
.timer { text-align: center; font-size: 22px; font-variant-numeric: tabular-nums; margin: 4px 0; }
#videos { position: relative; background: #10151c; border-radius: 12px; overflow: hidden; aspect-ratio: 3/4; max-height: 52vh; }
#remote-video { width: 100%; height: 100%; object-fit: cover; }
#local-video {
  position: absolute; right: 8px; bottom: 8px; width: 28%; aspect-ratio: 3/4;
  object-fit: cover; border-radius: 8px; border: 2px solid rgba(255,255,255,.7); background:#000;
}
#avatar-placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #9fb2c8; font-size: 18px; pointer-events: none;
}
.foot-note { color: #5a6a7a; font-size: 13px; text-align: center; line-height: 1.6; }
.conn-note { color: #5a6a7a; font-size: 13px; text-align: center; margin: 8px 0 0; }
.safety-note { color: #5a6a7a; font-size: 12px; line-height: 1.5; margin: 4px 0 0; flex: 1 1 100%; }
dialog { border: none; border-radius: 16px; max-width: 92vw; width: 520px; }
.terms-body { font-size: 14px; line-height: 1.7; max-height: 55vh; overflow: auto; }
