/* meet-call.css · the call screen: top bar, the stage (grid and speaker view), video tiles with the speaking ring, and the
   control bar. Phone first: the bar stays one row (it scrolls inside itself, the page never scrolls sideways). */
.mt-call { position: fixed; inset: 0; display: flex; flex-direction: column; overflow: hidden;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); z-index: 30; }
.mt-top { display: flex; align-items: center; gap: 10px; padding: 8px 16px; min-height: 52px; }
.mt-title { font-size: 1rem; margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-timer { font-variant-numeric: tabular-nums; color: var(--mt-muted); font-size: 0.9rem; }
.mt-pill { padding: 2px 10px; border-radius: 99px; border: 1px solid var(--mt-line); font-size: 0.8rem; white-space: nowrap; }
.mt-pill[hidden] { display: none; }
.mt-pill-rec::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--mt-fg); margin-right: 6px; }
.mt-top-invite { margin-left: auto; }
.mt-top-invite .btn { border-color: var(--mt-line); }
.mt-banner { margin: 0 16px 8px; padding: 8px 12px; border-radius: 10px; background: var(--mt-bad); color: #000000; text-align: center; }
.mt-banner[hidden] { display: none; }
.mt-body { position: relative; flex: 1 1 auto; display: flex; min-height: 0; gap: 8px; padding: 0 8px; }
.mt-stage { position: relative; flex: 1; min-width: 0; min-height: 0; display: grid; }
.mt-grid { display: grid; gap: 8px; min-height: 0; height: 100%; align-content: center; justify-content: center; overflow-y: auto;
  grid-template-columns: repeat(var(--cols, 1), var(--tw, 320px)); grid-auto-rows: calc(var(--tw, 320px) * 9 / 16); }
.mt-grid[hidden], .mt-main[hidden], .mt-strip[hidden] { display: none; }
.mt-stage.speaker { grid-template-columns: minmax(0, 1fr) 224px; gap: 8px; }
.mt-main { min-height: 0; display: grid; }
.mt-strip { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 0; }
.mt-strip .mt-tile { flex: 0 0 auto; aspect-ratio: 16 / 9; }
.mt-tile { position: relative; margin: 0; min-width: 0; min-height: 0; border-radius: 16px; overflow: hidden; background: var(--mt-tile);
  display: grid; place-items: center; outline: 3px solid transparent; outline-offset: -3px; transition: outline-color 120ms; }
.mt-tile.speaking { outline-color: var(--mt-ok); }
.mt-tile.spot { box-shadow: 0 0 0 2px var(--mt-fg) inset; }
.mt-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--mt-tile); }
.mt-video[hidden] { display: none; }
.mt-tile-screen .mt-video, .mt-big .mt-video { object-fit: contain; }
.mt-tile.mirror .mt-video { transform: scaleX(-1); }
.mt-tile .mt-avatar { width: clamp(48px, 22%, 112px); height: auto; aspect-ratio: 1; font-size: clamp(1rem, 3vw, 2rem); }
.mt-cap { position: absolute; left: 8px; bottom: 8px; right: 52px; display: flex; align-items: center; gap: 6px; min-width: 0; }
.mt-name { padding: 2px 8px; border-radius: 8px; background: var(--mt-veil); font-size: 0.85rem; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mt-badge { display: grid; place-items: center; min-width: 26px; height: 26px; border-radius: 8px; background: var(--mt-veil); font-size: 0.85rem; }
.mt-badge[hidden] { display: none; }
.mt-micoff::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--mt-fg); background:
  linear-gradient(45deg, transparent 45%, var(--mt-fg) 45%, var(--mt-fg) 55%, transparent 55%); }
.mt-q { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; padding: 0 4px; }
.mt-q i { width: 3px; background: var(--mt-fg); border-radius: 1px; opacity: 0.3; }
.mt-q i:nth-child(1) { height: 5px; } .mt-q i:nth-child(2) { height: 9px; } .mt-q i:nth-child(3) { height: 13px; }
.mt-q[data-bars="1"] i:nth-child(-n+1), .mt-q[data-bars="2"] i:nth-child(-n+2), .mt-q[data-bars="3"] i { opacity: 1; }
.mt-q.bad i { background: var(--mt-bad); }
.mt-pin { position: absolute; top: 8px; right: 8px; min-height: 32px; padding: 2px 10px; border-radius: 99px; border: 1px solid var(--mt-line);
  background: var(--mt-veil); color: var(--mt-fg); font: inherit; font-size: 0.8rem; cursor: pointer; opacity: 0; transition: opacity 120ms; }
.mt-tile:hover .mt-pin, .mt-pin:focus-visible, .mt-pin[aria-pressed="true"] { opacity: 1; }
@media (hover: none) { .mt-pin { opacity: 0.85; } }

.mt-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  overflow-x: auto; scrollbar-width: none; }
.mt-ctl-group { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.mt-ctl { position: relative; display: grid; justify-items: center; gap: 2px; min-width: 64px; min-height: 56px; padding: 6px 8px; border-radius: 14px;
  border: 1px solid transparent; background: var(--mt-s1); color: var(--mt-fg); font: inherit; font-size: 0.72rem; cursor: pointer; }
.mt-ctl[hidden] { display: none; }
.mt-ctl:hover { background: var(--mt-s2); }
.mt-ctl[aria-pressed="true"] { background: var(--mt-s2); border-color: var(--mt-line); }
.mt-ctl.off { background: var(--mt-fg); color: var(--mt-bg); }
.mt-ctl-rec[aria-pressed="true"] { border-color: var(--mt-fg); }
.mt-leave { border-color: var(--mt-fg); }
.mt-end { min-width: 0; padding: 6px 12px; border-color: var(--mt-line); align-content: center; }
.mt-ctl-label { white-space: nowrap; }
.mt-dot-count { position: absolute; top: 4px; right: 8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: var(--mt-ok); color: var(--mt-fg); font-size: 0.7rem; line-height: 18px; text-align: center; }
.mt-dot-count[hidden] { display: none; }
.mt-call.in-lobby .mt-controls, .mt-call.in-lobby .mt-top-invite { visibility: hidden; }
@media (max-width: 720px) {
  .mt-stage.speaker { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 96px; }
  .mt-strip { flex-direction: row; overflow-x: auto; overflow-y: hidden; }
  .mt-strip .mt-tile { height: 100%; width: auto; }
  .mt-controls { justify-content: flex-start; padding-left: 8px; padding-right: 8px; }
  .mt-ctl { min-width: 52px; }
  .mt-ctl-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .mt-top { padding: 6px 12px; }
}
@media (prefers-reduced-motion: reduce) { .mt-tile, .mt-pin { transition: none; } }
/* 2026-10-30: connection quality (word + bars, never colour alone), captions from the AI notes transcript */
.mt-quality { display: inline-flex; align-items: center; gap: 6px; }
.mt-q-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.mt-q-bars i { display: block; width: 3px; background: var(--mt-fg); border-radius: 1px; opacity: 0.25; }
.mt-q-bars i:nth-child(1) { height: 5px; } .mt-q-bars i:nth-child(2) { height: 8px; } .mt-q-bars i:nth-child(3) { height: 12px; }
.mt-quality:is([data-q="excellent"], [data-q="good"]) i { opacity: 1; }
.mt-quality:is([data-q="poor"], [data-q="lost"]) i:first-child { opacity: 1; background: var(--mt-bad); }
.mt-quality:is([data-q="poor"], [data-q="lost"]) { border-color: var(--mt-bad); }
.mt-captions { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 6; width: min(720px, calc(100% - 32px));
  display: grid; justify-items: center; gap: 4px; pointer-events: none; }
.mt-captions[hidden], .mt-cap-lines[hidden] { display: none; }
.mt-cap-lines { display: grid; gap: 2px; background: rgba(0, 0, 0, 0.78); color: #FFFFFF; border-radius: 8px; padding: 8px 12px; }
.mt-cap { margin: 0; font-size: 1rem; line-height: 1.35; overflow-wrap: anywhere; }
.mt-cap.interim { opacity: 0.75; }
.mt-cap-hide { pointer-events: auto; }
@media (max-width: 640px) { .mt-quality .mt-q-word { display: none; } }
