/* Sotto -- pages and the room (#818 design «sotto voce», on the live pages since #828). Built only
   from tokens.css: no colour literal here (DESIGN.md). Motion moves transform and opacity only;
   `infinite` only for a live signal. The room's mechanics -- my own window, a shared screen as the
   stage, immersive chrome, the small window -- are unchanged from #710/#725/#726; only their look is. */

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-md);
  font-weight: var(--w-regular);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--ink); text-underline-offset: 3px; }
h1, h2, h3, h4 { color: var(--ink); font-weight: var(--w-bold); margin: 0; letter-spacing: var(--track-tight); }
p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: var(--icon); height: var(--icon); flex: none; display: block; }

/* ---------------------------------------------------------------- the mark, the top bar */
.wordmark {
  display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px;
  font-weight: var(--w-heavy); font-size: var(--t-lg); letter-spacing: -0.02em; text-decoration: none; color: var(--ink);
}
/* The mark (#852, #851's «Сварка»): a square of the theme's ink holding the figure in its paper, so it
   inverts with the theme. The square is currentColor; the figure is filled here because a sprite's
   inside can only be reached by a class (CSP: no inline style). --mark-paper lets a dark surround
   (the call) give the figure its own background. */
.mark-figure { fill: var(--mark-paper, var(--bg)); }
.wordmark .ic { width: 26px; height: 26px; color: var(--ink); }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  width: 100%; max-width: 1200px; margin: 0 auto;
}

/* round icon button: no caption, the name in aria-label */
.ibtn {
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: var(--btn); height: var(--btn); padding: 0; border: 0; border-radius: var(--r-pill);
  background: var(--fill-1); color: var(--ink); cursor: pointer;
  transition: transform var(--d-2) var(--ease-spring); -webkit-tap-highlight-color: transparent;
}
.ibtn:active { transform: scale(0.92); }
.ibtn .ic { width: 20px; height: 20px; }
.theme-btn .ic-sun, .theme-btn .ic-moon { display: none; }
:root[data-theme="dark"] .theme-btn .ic-sun, :root[data-theme="light"] .theme-btn .ic-moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .theme-btn .ic-sun { display: block; } }
@media (prefers-color-scheme: light) { :root:not([data-theme]) .theme-btn .ic-moon { display: block; } }

/* ---------------------------------------------------------------- page frame */
.page {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  padding: var(--s-4) var(--gutter) var(--s-6);
  padding-top: calc(var(--s-4) + env(safe-area-inset-top));
  animation: fade var(--d-2) var(--ease-out) both;
}
.page > main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: var(--s-7) 0; width: 100%; max-width: 1200px; margin: 0 auto; }
.page > footer { color: var(--ink-2); font-size: var(--t-sm); }

/* ---------------------------------------------------------------- the card: every state but the lobby and the call */
.card {
  background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-1);
  padding: var(--s-7) var(--s-6); max-width: 520px; width: 100%; margin: 0 auto;
}
.card .eyebrow {
  color: var(--ink-3); font-size: var(--t-2xs); font-weight: var(--w-medium); letter-spacing: var(--track-wide);
  text-transform: uppercase; margin-bottom: var(--s-2);
}
.card h1 { font-size: var(--t-2xl); line-height: var(--lh-snug); overflow-wrap: anywhere; text-wrap: balance; }
.card .lead { margin-top: var(--s-3); color: var(--ink-2); font-size: var(--t-sm); text-wrap: pretty; }
.card .actions { margin-top: var(--s-6); display: flex; flex-wrap: wrap; gap: var(--s-2); }
.card .actions:empty { display: none; }
/* The room's states read as the entry pages of the design: no box, an object, a caption under it. */
.entry-card {
  background: none; box-shadow: none; padding: 0 0 var(--s-6); max-width: 440px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.entry-card .actions { width: 100%; max-width: 340px; flex-direction: column; }
.entry-card .actions .btn { width: 100%; }
.countdown {
  margin-top: var(--s-5); color: var(--ink); font-size: var(--t-2xl); font-weight: var(--w-heavy);
  font-variant-numeric: tabular-nums; letter-spacing: 0.02em;
}

/* The object over a state's words: two soft rings and one glyph, chosen by the state room.js puts
   on <body data-state>. It arrives once (a ripple) and rests. */
.obj { position: relative; width: 148px; height: 148px; display: grid; place-items: center; margin-bottom: var(--s-5); flex: none; }
.obj-ring { position: absolute; inset: 0; border-radius: 50%; background: var(--fill-1); }
.obj-ring-2 { inset: 20px; }
.obj-halo { position: absolute; inset: 20px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--accent); opacity: 0; animation: ripple 1.6s var(--ease-out) 1 both; }
.obj-ic { position: relative; width: 40px; height: 40px; color: var(--accent); display: none; }
body[data-state="confirm"] .obj-key, body[data-state="opening"] .obj-key,
body[data-state="invalid"] .obj-link, body[data-state="nocode"] .obj-link, body[data-state="revoked"] .obj-link,
body[data-state="bound"] .obj-link, body[data-state="not-mine"] .obj-link, body[data-state="not-opened"] .obj-link,
body[data-state="throttled"] .obj-clock, body[data-state="early"] .obj-clock, body[data-state="no-occurrence"] .obj-clock,
body[data-state="expired"] .obj-clock,
body[data-state="refused"] .obj-bad, body[data-state="not-on-call"] .obj-bad, body[data-state="closed-by-host"] .obj-bad,
body[data-state="vpn"] .obj-globe,
body[data-state="cannot-encrypt"] .obj-lock, body[data-state="no-keys"] .obj-lock, body[data-state="old-page"] .obj-alert,
body[data-state="unavailable"] .obj-alert, body[data-state="replaced"] .obj-alert,
body[data-state="closed"] .obj-wave, body[data-state="ended"] .obj-wave, body[data-state="ended-by-host"] .obj-wave { display: block; }
.obj-ic.obj-wave { color: var(--ink); }
body[data-state="refused"] .obj-ic, body[data-state="not-on-call"] .obj-ic, body[data-state="closed-by-host"] .obj-ic,
body[data-state="revoked"] .obj-ic, body[data-state="not-mine"] .obj-ic { color: var(--rec); }
body[data-state="refused"] .obj-halo, body[data-state="not-on-call"] .obj-halo, body[data-state="closed-by-host"] .obj-halo { box-shadow: inset 0 0 0 2px var(--rec); }
body[data-state="vpn"] .obj-ic, body[data-state="cannot-encrypt"] .obj-ic, body[data-state="old-page"] .obj-ic,
body[data-state="unavailable"] .obj-ic, body[data-state="replaced"] .obj-ic, body[data-state="throttled"] .obj-ic { color: var(--warn); }
body[data-state="vpn"] .obj-halo, body[data-state="cannot-encrypt"] .obj-halo, body[data-state="old-page"] .obj-halo { box-shadow: inset 0 0 0 2px var(--warn); }
/* the end: the table is set back, the mark rests in the middle */
body[data-state="closed"] .obj-ring-2, body[data-state="ended"] .obj-ring-2, body[data-state="ended-by-host"] .obj-ring-2 { background: var(--surface); box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line); }

/* ---------------------------------------------------------------- buttons */
.btn {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: var(--w-medium); font-size: var(--t-md); line-height: 1.2;
  min-height: var(--btn); padding: 0 var(--s-6); border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  text-decoration: none; background: var(--fill-1); color: var(--ink); text-align: center;
  position: relative; isolation: isolate; transition: transform var(--d-1) var(--ease-out); -webkit-tap-highlight-color: transparent;
}
.btn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; background: var(--fill-2); opacity: 0; transition: opacity var(--d-1) var(--ease-out); pointer-events: none; }
@media (hover: hover) { .btn:hover::after { opacity: 1; } }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary::after { background: var(--accent-ink); }
@media (hover: hover) { .btn-primary:hover::after { opacity: 0.14; } }
.btn-primary:disabled, .btn:disabled { background: var(--fill-2); color: var(--ink-2); cursor: default; transform: none; }
.btn-quiet { background: var(--fill-1); color: var(--ink); }
.btn-danger { background: var(--rec); color: var(--rec-ink); }
.btn-danger::after { background: var(--rec-ink); }
@media (hover: hover) { .btn-danger:hover::after { opacity: 0.14; } }
.btn-sm { min-height: 44px; padding: 0 var(--s-4); font-size: var(--t-sm); }
.btn-wide { width: 100%; justify-content: flex-start; padding: 0 var(--s-5); }
.btn svg { width: 20px; height: 20px; flex: none; }

.icon-btn {
  appearance: none; border: 0; cursor: pointer; flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: inline-grid; place-items: center; background: transparent; color: var(--ink-2);
}
.icon-btn:hover { background: var(--fill-1); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn-solid { background: var(--accent); color: var(--accent-ink); }
.icon-btn-solid:hover { background: var(--accent); color: var(--accent-ink); }
.link-btn {
  appearance: none; border: 0; background: none; cursor: pointer; color: var(--ink-2);
  font: inherit; font-weight: var(--w-medium); font-size: var(--t-sm); line-height: 1; text-decoration: underline; text-underline-offset: 3px;
  min-height: 44px; padding: 0 var(--s-2); justify-self: center;
}
.link-btn:hover { color: var(--ink); }

/* ---------------------------------------------------------------- the lobby: the camera card and the meeting beside it */
.lobby { display: grid; gap: var(--s-6); width: 100%; max-width: 980px; margin: 0 auto; align-items: center; }
@media (min-width: 900px) {
  .lobby { grid-template-columns: 1.25fr 1fr; grid-template-areas: "media head" "media body"; column-gap: var(--s-9); row-gap: 0; }
  .lobby-head { grid-area: head; align-self: end; }
  .lobby-media { grid-area: media; align-self: center; }
  .lobby-body { grid-area: body; align-self: start; padding-top: var(--s-4); }
}
.lobby-media { min-width: 0; }
.preview {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-xl); overflow: hidden;
  background: var(--cam-b); box-shadow: var(--shadow-2);
  display: grid; place-items: center;
}
.preview video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--cam-b); }
.mirror-self .preview video, .mirror-self .tile.self video { transform: scaleX(-1); }
.preview .initials {
  width: clamp(72px, 30%, 132px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in oklab, var(--p2) 30%, var(--cam-a)); color: var(--cam-label);
  font-size: var(--t-2xl); font-weight: var(--w-bold); letter-spacing: -0.02em;
}
.preview .tools {
  position: absolute; left: 50%; bottom: var(--s-3); transform: translateX(-50%);
  display: flex; justify-content: center; gap: var(--s-2); padding: var(--s-2); border-radius: var(--r-pill);
  background: var(--shade); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.preview .tools .ctl-sm { position: static; }
.preview-meter {
  position: absolute; left: var(--s-3); top: var(--s-3); padding: 6px 10px; border-radius: var(--r-pill);
  background: var(--shade); display: flex; align-items: center;
}
.preview-me {
  position: absolute; left: var(--s-3); bottom: var(--s-3); height: 28px; padding: 0 10px; border-radius: var(--r-pill);
  background: var(--shade); color: var(--cam-label); font-size: var(--t-xs); font-weight: var(--w-medium); display: inline-flex; align-items: center;
}
.meter { display: flex; gap: 3px; align-items: center; height: 18px; }
.meter i { width: 3px; height: 100%; border-radius: 2px; background: var(--cam-label); opacity: 0.35; transform: scaleY(0.35); transform-origin: 50% 50%; }
.meter i.on { opacity: 1; transform: none; background: var(--p2); }
.meter-label { margin-top: var(--s-3); color: var(--ink-2); font-size: var(--t-xs); text-align: center; }
.lobby-head .eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  color: var(--ink-2); font-size: var(--t-sm); margin-bottom: var(--s-2);
}
.lobby-head h1 { font-size: var(--t-2xl); line-height: var(--lh-snug); overflow-wrap: anywhere; text-wrap: balance; }
.lobby-head .who { margin-top: var(--s-2); color: var(--ink-3); font-size: var(--t-xs); }
.present { margin-top: 0; color: var(--ink-2); font-size: var(--t-sm); display: flex; align-items: center; gap: var(--s-2); }
.present::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
/* What the call is, said as small facts with a glyph, never as a block. */
.notice {
  margin-top: var(--s-3); display: flex; gap: var(--s-3); align-items: flex-start;
  color: var(--ink-2); font-size: var(--t-xs); line-height: 1.45;
}
.notice svg {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; margin-top: -4px;
}
.notice-plain svg { padding: 5px; background: var(--fill-1); color: var(--ink-2); }
#lobby-e2ee svg { background: var(--ok-soft); color: var(--ok-text); }
.notice + .notice { margin-top: var(--s-2); }
.lobby-body .actions { margin-top: var(--s-5); display: flex; flex-wrap: wrap; gap: var(--s-3); }
.lobby-body .actions .btn { min-height: 56px; min-width: min(100%, 280px); font-size: var(--t-lg); padding: 0 var(--s-7); }
.rename { margin-top: var(--s-4); display: grid; gap: var(--s-2); max-width: 360px; }
@media (max-width: 899px) {
  .lobby-media { order: -1; }                       /* the camera card first, as in the #818 design */
  .lobby-head, .lobby-body { text-align: center; }
  .lobby-head .eyebrow { justify-content: center; }
  .present { justify-content: center; }
  .rename { margin-inline: auto; text-align: left; }
  .notice { text-align: left; max-width: 440px; margin-inline: auto; }
  .lobby-body .actions { justify-content: center; }
}

/* ---------------------------------------------------------------- fields, switches, pickers */
.field-label { color: var(--ink-2); font-size: var(--t-sm); font-weight: var(--w-medium); }
.field {
  appearance: none; width: 100%; min-height: var(--btn); padding: var(--s-2) var(--s-4);
  background: var(--fill-1); color: var(--ink); border: 0; box-shadow: inset 0 0 0 1px var(--line);
  border-radius: var(--r-md); font: inherit; font-size: var(--t-md); line-height: 1.4;
}
.field::placeholder { color: var(--ink-3); }
.field:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
select.field {
  padding-right: var(--s-8);
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(-45deg, transparent 50%, var(--ink-2) 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%;
  background-size: 5px 5px; background-repeat: no-repeat; text-overflow: ellipsis;
}
select.field option { background: var(--surface); color: var(--ink); }
.hint { color: var(--ink-3); font-size: var(--t-xs); }
.pickers { display: grid; gap: var(--s-4); margin-top: var(--s-5); }
.setup { margin-top: var(--s-4); }
.setup summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: var(--s-2);
  min-height: 44px; padding: 0 var(--s-4); border-radius: var(--r-pill); background: var(--fill-1); color: var(--ink);
  font-weight: var(--w-medium); font-size: var(--t-sm);
}
.setup summary::-webkit-details-marker { display: none; }
.setup summary:hover, .setup[open] summary { background: var(--fill-2); }
.setup summary svg { width: 18px; height: 18px; color: var(--ink-2); }
.setup .pickers { margin-top: var(--s-3); padding: var(--s-4); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1); }
.lobby-media .setup { text-align: center; }
.lobby-media .setup .pickers { text-align: left; }
.page-lobby .pickers { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.page-lobby .pickers .toggles, .page-lobby .pickers .hint { grid-column: 1 / -1; }
.pick { display: grid; gap: var(--s-2); min-width: 0; }
.toggles { border: 0; margin: 0; padding: 0; display: grid; gap: var(--s-1); min-width: 0; }
.toggles legend { padding: 0; margin-bottom: var(--s-1); }
.toggle { display: flex; align-items: center; gap: var(--s-3); min-height: 44px; }
.toggle label { color: var(--ink); cursor: pointer; display: grid; gap: 2px; padding-block: var(--s-1); }
.toggle-note { color: var(--ink-3); font-size: var(--t-xs); }
.toggles .hint { margin: 0 0 var(--s-1); }
.switch {
  appearance: none; flex: none; width: 44px; height: 26px; margin: 0; border-radius: var(--r-pill);
  background: var(--fill-3); position: relative; cursor: pointer;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--surface-2); box-shadow: var(--shadow-1); transition: transform var(--d-2) var(--ease-spring);
}
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(18px); }

/* ---------------------------------------------------------------- round controls (the dock's buttons) */
.ctl {
  appearance: none; border: 0; cursor: pointer; width: var(--btn); height: var(--btn); border-radius: 50%; flex: none;
  display: inline-grid; place-items: center; background: var(--fill-2); color: var(--ink);
  position: relative; isolation: isolate; transition: transform var(--d-2) var(--ease-spring);
  -webkit-touch-callout: none; user-select: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) { .ctl:hover { background: var(--fill-3); } }
.ctl:active { transform: scale(0.9); }
.ctl svg { width: 22px; height: 22px; }
.ctl .off { display: none; }
/* Off is a rounded square on a soft red: the shape says it before the colour does. */
.ctl[aria-pressed="false"]:not(.ctl-share) { background: var(--rec-soft); color: var(--ink); border-radius: var(--r-md); }
.ctl[aria-pressed="false"] .on { display: none; }
.ctl[aria-pressed="false"] .off { display: block; }
.ctl-share[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-radius: var(--r-md); }
.ctl.leave { background: var(--rec); color: var(--rec-ink); }
@media (hover: hover) { .ctl.leave:hover { background: var(--rec); } }
.ctl-sm { width: 44px; height: 44px; }
.ctl-sm svg { width: 20px; height: 20px; }
.preview .ctl { background: var(--shade-soft); color: var(--cam-label); }
.preview .ctl[aria-pressed="false"] { background: var(--rec); color: var(--rec-ink); }
.badge {
  position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: var(--r-pill); background: var(--accent); color: var(--accent-ink);
  font-size: 11px; font-weight: var(--w-bold); line-height: 18px; text-align: center;
  animation: pop var(--d-3) var(--ease-spring) both;
}
/* A control with its device chevron (desktop). On a phone the chevron goes: a long press opens it. */
.split { display: inline-flex; align-items: center; border-radius: var(--r-pill); background: transparent; }
.chev {
  appearance: none; border: 0; cursor: pointer; width: 44px; height: 44px; margin-left: -8px; margin-right: -6px;
  background: transparent; color: var(--ink-2); border-radius: var(--r-pill);
  display: inline-grid; place-items: center;
}
.chev:hover { color: var(--ink); }
.split > :focus-visible { z-index: 1; }
.chev svg { width: 16px; height: 16px; }
@media (pointer: coarse) { .chev { display: none; } }

/* ---------------------------------------------------------------- the call */
.call {
  position: relative; display: grid; grid-template-rows: auto auto 1fr auto; grid-template-columns: minmax(0, 1fr);
  height: 100vh; height: 100dvh; overflow: hidden; background: var(--room-bg); color: var(--ink);
}
/* The island: the meeting's name, its lock, the clock -- one glass pill on top. */
.call > header {
  justify-self: center; display: flex; align-items: center; gap: var(--s-2);
  max-width: calc(100% - 2 * (var(--s-3) + 20px + var(--s-2))); min-width: 0; min-height: 48px;
  margin-top: calc(var(--s-3) + env(safe-area-inset-top)); padding: 2px var(--s-2) 2px var(--s-3);
  border-radius: var(--r-pill); background: var(--glass); box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line);
  font-size: var(--t-sm); font-weight: var(--w-medium); position: relative; z-index: 3;
}
/* The corner mark (#853): that this is Sotto Voce, said quietly -- 20 px, the room's ink at low
   opacity, never a target. It sits level with the island in the top-left corner the island leaves
   free (the island's max-width keeps 20 px and a gap on each side), so it meets no control, tile or
   picture. A full-screen picture (immersive) has no free corner: the mark steps aside; so it does on
   a phone while «Вход закрыт» needs the island's whole width. */
.call-corner {
  position: absolute; z-index: 2; pointer-events: none; display: block;
  top: calc(var(--s-3) + env(safe-area-inset-top) + 14px); left: calc(var(--s-3) + env(safe-area-inset-left));
  color: var(--ink); opacity: .4; --mark-paper: var(--room-bg);
}
.call-corner .ic { width: 20px; height: 20px; }
.call.immersive .call-corner { display: none; }
@media (max-width: 640px) {
  .call:has(#call-entry:not([hidden])) .call-corner { display: none; }
  .call:has(#call-entry:not([hidden])) > header { max-width: calc(100% - 2 * var(--s-3)); }
}
.call-title { min-width: 0; flex: 1 1 auto; display: flex; align-items: center; gap: var(--s-2); }
.call-title h1 { font-size: var(--t-sm); font-weight: var(--w-medium); letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 26ch; padding-left: var(--s-1); }
.call > header .timer { flex: none; }
.timer { font-variant-numeric: tabular-nums; color: var(--ink); font-size: var(--t-sm); padding: 0 var(--s-1); }
.timer::before { content: ""; display: inline-block; width: 1px; height: 14px; margin-right: var(--s-2); vertical-align: -2px; background: var(--line-strong); }
/* The lock (e2ee D§4.3): what the encryption says and how many hold the keys. Its colour is the
   state: green when every holder is verified, amber for a new device, red when something is wrong. */
.lock {
  flex: none; display: inline-flex; align-items: center; gap: var(--s-1); min-height: 44px; min-width: 44px;
  padding: 0 var(--s-2); border: 0; border-radius: var(--r-pill); background: transparent;
  color: var(--ink-2); font: inherit; font-size: var(--t-xs); white-space: nowrap; cursor: pointer;
  max-width: 46vw; overflow: hidden;
}
.lock:hover { background: var(--fill-1); }
.lock svg { flex: none; width: 18px; height: 18px; }
.lock-text { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.lock-count { color: var(--ink-3); }
.lock-count::before { content: "· "; }
.lock[data-lock="green"] svg { color: var(--ok); }
.lock[data-lock="amber"] { color: var(--warn); }
.lock[data-lock="red"] { color: var(--rec); box-shadow: inset 0 0 0 1.5px var(--rec); }
@media (max-width: 900px) { .lock-count { display: none; } }
@media (max-width: 640px) {
  .lock { padding: 0 var(--s-1); justify-content: center; }
  .lock-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .call-title h1 { max-width: 14ch; }
}
/* «Вход закрыт» (P1B, #683): a small red-edged pill in the island while a host keeps the entry closed. */
.pill {
  flex: none; display: inline-flex; align-items: center; min-height: 26px; padding: 0 var(--s-3);
  border-radius: var(--r-pill); background: var(--rec-soft); color: var(--ink);
  font-size: var(--t-2xs); font-weight: var(--w-medium); white-space: nowrap;
}
.pill-entry { box-shadow: inset 0 0 0 1px var(--rec); }
@media (max-width: 380px) {
  .pill { padding: 0 var(--s-2); }
  .call > header { gap: 2px; padding-left: var(--s-2); padding-right: var(--s-1); }
  .timer::before { margin-right: var(--s-1); }
}
/* Always a row of the call's grid (an empty one is zero high), so the stage keeps the 1fr row. */
.banners { display: grid; gap: var(--s-2); padding: 0 var(--s-3); min-width: 0; justify-items: center; position: relative; z-index: 3; }
.banners:not(:empty) { padding-top: var(--s-2); }
.banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); max-width: 640px; width: 100%;
  background: var(--surface); color: var(--ink); border-radius: var(--r-lg); box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line);
  padding: var(--s-2) var(--s-2) var(--s-2) var(--s-4); font-size: var(--t-sm);
  animation: drop var(--d-3) var(--ease-spring) both;
}
.banner-text { flex: 1 1 14em; min-width: 0; color: var(--ink); font-weight: var(--w-medium); }
.banner-warn { box-shadow: var(--shadow-2), inset 0 0 0 2px var(--warn); }
.banner-danger { box-shadow: var(--shadow-2), inset 0 0 0 2px var(--rec); }
.banner-close { flex: none; }
.code {
  font-size: var(--t-2xl); font-weight: var(--w-heavy); line-height: 1.2; font-variant-numeric: tabular-nums; letter-spacing: 0.06em;
  color: var(--ink); text-align: center; padding: var(--s-3) 0; overflow-wrap: anywhere;
}
.lock-reasons { margin: 0; padding-left: var(--s-5); color: var(--rec-text); }
.lock-people { margin: 0; }
.person-status.lock-ok { color: var(--ok-text); }
.person-status.lock-bad { color: var(--rec-text); }
.msg-via { margin-top: var(--s-1); color: var(--ink-3); font-size: var(--t-2xs); }
.call-body { position: relative; display: flex; min-height: 0; min-width: 0; }
.stage { position: relative; flex: 1; min-width: 0; padding: var(--s-3); overflow: hidden; display: flex; }
@media (min-width: 900px) { .stage { padding: var(--s-3) var(--s-5); } }
.tiles {
  flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: var(--s-2);
  justify-content: center; align-content: center; align-items: center;
}
@media (min-width: 900px) { .tiles { gap: var(--s-3); } }
.tile {
  --tint: var(--p2);
  position: relative; flex: none; width: 320px; height: 200px; border-radius: var(--r-lg); overflow: hidden;
  background: color-mix(in oklab, var(--tint) 14%, var(--cam-b)); display: grid; place-items: center; max-width: 100%;
}
.tiles > .tile:nth-child(6n+2) { --tint: var(--p1); }
.tiles > .tile:nth-child(6n+3) { --tint: var(--p3); }
.tiles > .tile:nth-child(6n+4) { --tint: var(--p5); }
.tiles > .tile:nth-child(6n+5) { --tint: var(--p4); }
.tiles > .tile:nth-child(6n) { --tint: var(--p6); }
/* Speaking: an edge in the voice's colour. It switches, it does not fade (#625): a transition on
   every word meant a style recalc and a repaint on every display frame while anybody talked. */
.tile.speaking { box-shadow: inset 0 0 0 3px var(--accent); }
/* The whole picture, never cropped: a portrait phone stays portrait (6.5). */
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--cam-b); }
.tile .initials {
  width: clamp(48px, 34%, 132px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in oklab, var(--tint) 30%, var(--cam-a)); color: var(--cam-label);
  font-size: var(--t-xl); font-weight: var(--w-bold); letter-spacing: -0.02em;
}
.tile .name {
  position: absolute; left: var(--s-2); bottom: var(--s-2); max-width: calc(100% - 2 * var(--s-2));
  display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 9px; border-radius: var(--r-pill);
  background: var(--shade); color: var(--cam-label); font-size: var(--t-xs); font-weight: var(--w-medium);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tile .muted { width: 15px; height: 15px; color: var(--cam-label); flex: none; }
.tile-btn {
  position: absolute; top: var(--s-2); right: var(--s-2); width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--shade); color: var(--cam-label); display: grid; place-items: center; cursor: pointer;
}
.tile-btn svg { width: 20px; height: 20px; }

/* Two people (#710): the other one takes the stage, my own picture floats over it in a corner.
   ui.js picks the mode by class and sizes the boxes; nothing moves in the DOM and nothing runs per
   frame (#625). On an upright phone the other one fills it (cover); a lying one stays whole. */
.stage.bleed { padding: 0; }
.stage.bleed .tile.main { border-radius: var(--r-lg); }
.tile.fill video { object-fit: cover; }
/* The other one with the camera off: the initials large in a ring, the name under them. */
.tiles.duo .tile.main.novideo { align-content: center; justify-items: center; gap: var(--s-4); }
.tiles.duo .tile.main.novideo .initials { width: 128px; font-size: var(--t-3xl); }
.tiles.duo .tile.main.novideo .name {
  position: static; background: none; padding: 0 var(--s-4); justify-content: center;
  font-size: var(--t-lg); max-width: 100%; height: auto;
}
/* My own picture: a round-cornered window in a corner (data-corner), dragged by the finger as a
   transform and let go into the nearest corner. It lives inside the stage, so it never sits on the
   dock or the island. */
.tile.pip {
  position: absolute; z-index: 2; border-radius: var(--r-xl); box-shadow: var(--shadow-3), 0 0 0 2px var(--room-bg);
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; cursor: grab;
  --pip-m: var(--s-3);
}
.tile.pip.speaking { box-shadow: var(--shadow-3), 0 0 0 3px var(--accent); }
.tile.pip.dragging { cursor: grabbing; }
.tile.pip.snapping { transition: transform var(--d-3) var(--ease-spring); }
.tile.pip[data-corner="tl"] { top: var(--pip-m); left: calc(var(--pip-m) + env(safe-area-inset-left)); }
.tile.pip[data-corner="tr"] { top: var(--pip-m); right: calc(var(--pip-m) + env(safe-area-inset-right)); }
.tile.pip[data-corner="bl"] { bottom: var(--pip-m); left: calc(var(--pip-m) + env(safe-area-inset-left)); }
.tile.pip[data-corner="br"] { bottom: var(--pip-m); right: calc(var(--pip-m) + env(safe-area-inset-right)); }
.tile.pip video { object-fit: cover; }
.tile.pip .initials { font-size: var(--t-lg); width: 48%; }
.tile.pip .name { display: none; }
.tile.pip.grown .name { display: flex; font-size: var(--t-2xs); height: 24px; }
/* The flip shows on the window only once it has been tapped open. */
.tile.pip:not(.grown) .tile-btn { display: none; }

/* Somebody's screen (#725): Spotlight. The picture is the stage -- no padding, placed and sized by
   ui.js in its own shape -- and the cameras are previews: a strip in the margin it leaves, a floating
   window, or hidden. */
.stage.spot { padding: 0; touch-action: none; }
.tiles.spot { display: block; position: relative; }
.tiles.spot > .tile { position: absolute; max-width: none; }
.tile.spot-main { border-radius: var(--r-md); background: var(--room-bg); touch-action: none; -webkit-user-select: none; user-select: none; }
.tile.spot-main video { background: var(--room-bg); transform-origin: 0 0; }
.tile.spot-main.zoomed { cursor: grab; }
/* Its name sits on the veil: the screen behind it may be white. */
.tile.spot-main .name { right: auto; left: var(--s-2); bottom: var(--s-2); max-width: calc(100% - 2 * var(--s-2));
  padding: var(--s-1) var(--s-3); background: var(--veil); display: block; height: auto; }
.tile.spot-hide { display: none; }
.tile.preview { border-radius: var(--r-md); }
.tile.preview video { object-fit: cover; }
.tile.preview .initials { font-size: var(--t-md); width: 44%; }
.tile.preview .name { font-size: var(--t-2xs); height: 22px; left: var(--s-1); bottom: var(--s-1); padding: 0 8px; }
.tile.preview .tile-btn { display: none; }
.tile.floating { z-index: 2; box-shadow: var(--shadow-3), 0 0 0 2px var(--room-bg); touch-action: none; cursor: grab;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.tile.floating.speaking { box-shadow: var(--shadow-3), 0 0 0 3px var(--accent); }
.tile.floating.dragging { cursor: grabbing; }
/* My own screen in a call of two: a small window in a top corner, opposite the duo's window. */
.tile.chip { position: absolute; z-index: 2; top: var(--s-3); box-shadow: var(--shadow-3), 0 0 0 2px var(--room-bg); }
.tile.chip[data-corner="tl"] { left: calc(var(--s-3) + env(safe-area-inset-left)); }
.tile.chip[data-corner="tr"] { right: calc(var(--s-3) + env(safe-area-inset-right)); }
.tile.chip .name { font-size: var(--t-2xs); height: 22px; }

/* A phone showing a screen, or any device in fullscreen: immersive. The stage is the whole call
   (inside the notch's insets); the island and the dock lie over it on the veil and are hidden until a
   tap, then hide again (ui.js). Hidden is `visibility`, so a hidden «Выйти» cannot take a tap. The
   banners never hide. */
.call.immersive { grid-template-rows: 1fr; }
.call.immersive > header, .call.immersive > .bar { position: absolute; left: 0; right: 0; z-index: 5; background: var(--veil); border: 0; border-radius: 0; box-shadow: none; margin: 0; max-width: none; justify-content: center; }
.call.immersive > header { top: 0; padding: calc(var(--s-2) + env(safe-area-inset-top)) var(--s-3) var(--s-2); }
.call.immersive > .bar { bottom: 0; width: auto; }
.call.immersive:not(.chrome) > header, .call.immersive:not(.chrome) > .bar { visibility: hidden; }
.call.immersive:not(.chrome) .tile.spot-main .name { visibility: hidden; }
.call.immersive .tile.spot-main { border-radius: 0; }
.call.immersive .tile.spot-main .name { bottom: auto; top: var(--name-top, var(--s-2)); }
.call.immersive > .banners { position: absolute; z-index: 6; left: 0; right: 0; top: calc(var(--s-2) + env(safe-area-inset-top)); }
.call.immersive.chrome > .banners { top: var(--head-h, 64px); }
.call.immersive .stage { padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left); }
.call.immersive .timer, .call.immersive .lock-count, .call.immersive .lock { color: var(--cam-label); }
.menu-item .menu-check { display: none; margin-left: auto; color: var(--accent); }
.menu-item[aria-checked="true"] .menu-check { display: block; }

/* ---------------------------------------------------------------- the dock: one glass capsule */
.bar {
  justify-self: center; display: flex; justify-content: center; align-items: center; gap: 6px;
  max-width: calc(100% - 2 * var(--s-2)); padding: var(--s-2); margin-bottom: calc(var(--s-3) + env(safe-area-inset-bottom));
  border-radius: var(--r-pill); background: var(--glass); box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line);
  position: relative; z-index: 3;
}
@media (min-width: 900px) {
  .bar { gap: var(--s-2); padding: 10px; }
  .bar .ctl { width: var(--btn-lg); height: var(--btn-lg); }
  .bar .ctl.leave { margin-left: var(--s-2); }
  .bar .ctl.leave::before { content: ""; position: absolute; left: calc(-1 * var(--s-2) - 5px); top: 14px; bottom: 14px; width: 1px; background: var(--line-strong); }
}
@media (max-width: 380px) { .bar { gap: 4px; padding: 6px; } .bar .ctl { width: 46px; height: 46px; } }
/* The narrowest phones keep «Участники» in ⋯ only, so the dock never leaves the screen. */
@media (max-width: 360px) { .bar { gap: 3px; padding: 4px; } .bar .ctl { width: 44px; height: 44px; } #call-people { display: none; } }

/* ---------------------------------------------------------------- the overflow menu */
.menu {
  position: fixed; z-index: 6; right: var(--s-3); bottom: calc(92px + env(safe-area-inset-bottom));
  min-width: 260px; max-width: calc(100% - 2 * var(--s-3)); padding: var(--s-2);
  background: var(--surface); color: var(--ink); border-radius: var(--r-xl); box-shadow: var(--shadow-3), inset 0 0 0 1px var(--line);
  display: grid; gap: 2px; animation: rise var(--d-3) var(--ease-out) both;
}
@media (min-width: 720px) { .menu { right: auto; left: calc(50% + 40px); } }
.menu-item {
  appearance: none; border: 0; cursor: pointer; background: transparent; color: var(--ink);
  min-height: 52px; padding: 0 var(--s-3); border-radius: var(--r-md); text-align: left;
  display: flex; align-items: center; gap: var(--s-3); font: inherit; font-weight: var(--w-medium); font-size: var(--t-md); line-height: 1.2; position: relative;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--fill-1); }
.menu-item svg { width: 22px; height: 22px; color: var(--ink-2); flex: none; }
.menu-item .badge { position: static; margin-left: auto; }
/* The host's entry stands apart under a rule and says, on a second line, that it acts on everybody. */
.menu-rule, .menu-sep { border: 0; height: 1px; background: var(--line); margin: var(--s-1) var(--s-2); }
.menu-item-host { min-height: 60px; padding-top: var(--s-2); padding-bottom: var(--s-2); }
.menu-item-host svg { color: var(--warm); }
.menu-text { display: grid; gap: 2px; }
.menu-sub { color: var(--ink-2); font-size: var(--t-xs); font-weight: var(--w-regular); line-height: 1.3; }

/* ---------------------------------------------------------------- the side panel (6.2): a sheet in the page's colours */
.panel {
  display: flex; flex-direction: column; min-height: 0; background: var(--surface); color: var(--ink);
  border-radius: var(--r-xl); box-shadow: var(--shadow-3);
}
/* A phone keeps the whole stage: the panel rises over it as a bottom sheet. */
@media (max-width: 959px) {
  .panel {
    position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; top: 18%;
    border-radius: var(--r-xl) var(--r-xl) 0 0; animation: sheet-up var(--d-3) var(--ease-out) both;
  }
}
@media (min-width: 960px) { .panel { width: 380px; flex: none; margin: var(--s-3) var(--s-4) var(--s-3) 0; animation: sheet-in var(--d-3) var(--ease-out) both; } }
.panel-head {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: var(--s-2);
  padding: var(--s-3) var(--s-3) var(--s-2) var(--s-5);
}
.panel-head h2 { font-size: var(--t-xl); }
.tabs { grid-column: 1 / -1; display: flex; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--fill-1); justify-self: start; max-width: 100%; overflow-x: auto; }
.tab {
  appearance: none; border: 0; background: none; cursor: pointer; color: var(--ink-2);
  font: inherit; font-weight: var(--w-medium); font-size: var(--t-sm); line-height: 1; min-height: 44px; padding: 0 var(--s-4);
  border-radius: var(--r-pill); white-space: nowrap;
}
.tab[aria-selected="true"] { color: var(--ink); background: var(--surface-2); box-shadow: var(--shadow-1); }
.panel-head .icon-btn { grid-row: 1; grid-column: 2; }
.pane { flex: 1; min-height: 0; overflow-y: auto; padding: var(--s-3) var(--s-5) var(--s-5); overscroll-behavior: contain; }
.pane-chat { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.chat-log { flex: 1; min-height: 0; overflow-y: auto; padding: var(--s-3) var(--s-4); display: flex; flex-direction: column; gap: var(--s-3); overscroll-behavior: contain; }
.empty { color: var(--ink-3); font-size: var(--t-sm); }
.chat-items { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.chat-items > li { padding: var(--s-2) var(--s-3); border-radius: var(--r-lg) var(--r-lg) var(--r-lg) var(--r-xs); background: var(--fill-1); justify-self: start; max-width: 88%; min-width: 0; }
.msg-head { display: flex; gap: var(--s-2); align-items: baseline; font-size: var(--t-xs); }
.msg-name { color: var(--ink-2); font-weight: var(--w-medium); }
.msg-time { color: var(--ink-3); font-size: var(--t-2xs); font-variant-numeric: tabular-nums; }
.msg-text { color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.file {
  display: grid; grid-template-columns: auto 1fr; column-gap: var(--s-3); align-items: center; margin-top: var(--s-1);
  padding: var(--s-2) var(--s-3); border-radius: var(--r-md); background: var(--surface-2); text-decoration: none; box-shadow: var(--shadow-1);
}
.file:hover { background: var(--surface); }
.file-icon { width: 24px; height: 24px; grid-row: 1 / span 2; color: var(--accent); }
.file-name { color: var(--ink); font-weight: var(--w-medium); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.file-meta { color: var(--ink-2); font-size: var(--t-2xs); }
.composer {
  display: flex; align-items: flex-end; gap: var(--s-2); padding: var(--s-3);
  padding-bottom: calc(var(--s-3) + env(safe-area-inset-bottom)); border-top: 1px solid var(--line);
}
.composer .field { resize: none; min-height: 44px; max-height: 140px; border-radius: var(--r-lg); padding: 10px var(--s-4); }
.composer label.icon-btn { cursor: pointer; }
.composer label.icon-btn:focus-within { outline: 2px solid var(--focus); }

.agenda { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-1); }
.agenda-item { min-height: 52px; display: flex; gap: var(--s-3); align-items: center; padding: var(--s-2); border-radius: var(--r-md); }
.agenda-item:hover { background: var(--fill-1); }
.agenda-item label, .agenda-body { display: grid; gap: 2px; cursor: pointer; min-width: 0; flex: 1; min-height: 28px; align-content: center; }
.agenda-body { cursor: default; }
.agenda-text { color: var(--ink); font-weight: var(--w-medium); overflow-wrap: anywhere; }
.agenda-item.done .agenda-text { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--ink-3); }
.agenda-when { color: var(--ink-3); font-size: var(--t-2xs); }
.check {
  appearance: none; flex: none; width: 28px; height: 28px; margin: 0; border-radius: 50%;
  border: 2px solid var(--line-strong); background: transparent; cursor: pointer; display: grid; place-items: center;
}
.check:checked { background: var(--accent); border-color: var(--accent); }
.check:checked::after {
  content: ""; width: 6px; height: 11px; border: solid var(--accent-ink); border-width: 0 2.5px 2.5px 0;
  transform: translateY(-1px) rotate(45deg);
}
.agenda-mark {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--line-strong); color: var(--accent-ink);
}
.agenda-item.done .agenda-mark { background: var(--accent); border-color: var(--accent); }
.agenda-mark svg { width: 16px; height: 16px; }
#agenda-hint { margin-top: var(--s-4); }

.people { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-1); }
.person { display: flex; gap: var(--s-3); align-items: center; padding: var(--s-2); min-height: 56px; border-radius: var(--r-md); }
.person-ini {
  --tint: var(--p2);
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: color-mix(in oklab, var(--tint) 26%, var(--surface)); color: color-mix(in oklab, var(--tint) 55%, var(--ink));
  display: grid; place-items: center; font-weight: var(--w-bold); font-size: var(--t-sm); letter-spacing: -0.02em;
}
.people > li:nth-child(6n+2) .person-ini { --tint: var(--p1); }
.people > li:nth-child(6n+3) .person-ini { --tint: var(--p3); }
.people > li:nth-child(6n+4) .person-ini { --tint: var(--p5); }
.people > li:nth-child(6n+5) .person-ini { --tint: var(--p4); }
.people > li:nth-child(6n) .person-ini { --tint: var(--p6); }
.person-body { display: grid; min-width: 0; flex: 1; }
.person-name { color: var(--ink); font-weight: var(--w-medium); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-status { color: var(--ink-3); font-size: var(--t-xs); }
.person.away .person-ini { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--ink-2); }
/* #720: the host's view of where each person connects from -- quiet facts, red only for the mark */
.person-net { color: var(--ink-3); font-size: var(--t-2xs); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.person-vpn { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-2); align-items: baseline; font-size: var(--t-2xs); }
.vpn-mark {
  color: var(--rec-text); background: var(--rec-soft); padding: 0 var(--s-2); border-radius: var(--r-pill); line-height: 22px;
  white-space: nowrap; font-weight: var(--w-medium);
}
.vpn-why { color: var(--ink-2); overflow-wrap: anywhere; }
.net-note { color: var(--ink-3); font-size: var(--t-xs); padding: 0 0 var(--s-2); }

/* #727: the host's IP card -- folded: flag, country, city; unfolded: what this server knows of the
   address. Quiet facts on a raised card, red only for a «yes» sign and a high risk, green for low. */
.person.has-net { flex-wrap: wrap; }
.person-cards { flex: 1 0 100%; min-width: 0; display: grid; gap: var(--s-2); }
.ipcard { background: var(--surface-2); border-radius: var(--r-lg); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); min-width: 0; }
.ipcard.flagged { box-shadow: var(--shadow-1), inset 0 0 0 1.5px var(--rec); }
.ipcard-sum {
  display: flex; align-items: center; gap: var(--s-2); min-height: 48px; padding: var(--s-2) var(--s-3);
  cursor: pointer; list-style: none; border-radius: var(--r-lg);
}
.ipcard-sum::-webkit-details-marker { display: none; }
.ipcard-flag { flex: none; font-size: var(--t-lg); line-height: 1; min-width: 1.25em; text-align: center; color: var(--ink-2); }
.ipcard-head { display: grid; min-width: 0; flex: 1; }
.ipcard-place { display: flex; flex-wrap: wrap; gap: 0 var(--s-2); color: var(--ink); font-size: var(--t-sm); }
.ipcard-country { font-weight: var(--w-bold); }
.ipcard-city { color: var(--ink-2); overflow-wrap: anywhere; }
.ipcard-sub { color: var(--ink-3); font-size: var(--t-2xs); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.ipcard .vpn-mark { font-size: var(--t-2xs); justify-self: start; margin-top: var(--s-1); }
.ipcard-chev { flex: none; width: 16px; height: 16px; color: var(--ink-3); transition: transform var(--d-2) var(--ease-out); }
.ipcard[open] .ipcard-chev { transform: rotate(180deg); }
.ipcard-body { display: grid; gap: var(--s-4); padding: var(--s-1) var(--s-3) var(--s-4); border-top: 1px solid var(--line); }
.ipcard-map { margin: var(--s-2) 0 0; }
.ipmap { display: block; width: 100%; height: auto; aspect-ratio: 9 / 4; border-radius: var(--r-md); background: var(--bg-sunken); }
.ipcard-map figcaption { color: var(--ink-3); font-size: var(--t-2xs); margin-top: var(--s-1); }
.ipcard-group h4 { margin: 0 0 var(--s-1); color: var(--ink-3); font-size: var(--t-2xs); font-weight: var(--w-medium); letter-spacing: var(--track-wide); text-transform: uppercase; }
.ipcard-group dl { display: grid; grid-template-columns: minmax(7.5em, 38%) 1fr; gap: var(--s-1) var(--s-3); margin: 0; font-size: var(--t-xs); }
.ipcard-group dt { color: var(--ink-3); }
.ipcard-group dd { margin: 0; color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.ipcard-none { color: var(--ink-3); font-style: italic; }
.ipcard-est { display: block; color: var(--ink-3); font-size: var(--t-2xs); }
.ipcard-mono { font-family: var(--mono); font-size: var(--t-2xs); }
.ipcard-signs { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-1); font-size: var(--t-xs); }
.ipcard-sign { display: grid; grid-template-columns: 1fr auto; gap: 0 var(--s-3); color: var(--ink-3); }
.ipcard-sign-val { color: var(--ok-text); text-align: right; }
.ipcard-sign-val.ipcard-none { color: var(--ink-3); }
.ipcard-sign.yes .ipcard-sign-label { color: var(--ink); }
.ipcard-sign.yes .ipcard-sign-val { color: var(--rec-text); font-weight: var(--w-bold); }
.ipcard-sign-why { grid-column: 1 / -1; color: var(--ink-2); font-size: var(--t-2xs); overflow-wrap: anywhere; }
.ipcard-risk { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-3); margin: 0; color: var(--ink-2); font-size: var(--t-xs); }
.ipcard-risk .ipcard-est { flex-basis: 100%; }
.ipcard-level { padding: 0 var(--s-3); border-radius: var(--r-pill); line-height: 24px; color: var(--ink); background: var(--fill-1); font-weight: var(--w-medium); }
.ipcard-level.low { background: var(--ok-soft); color: var(--ok-text); }
.ipcard-level.high { background: var(--rec-soft); color: var(--rec-text); }
.ipcard-level.medium { background: var(--warn-soft); color: var(--warn-text); }
.ipcard-out { margin: 0; font-size: var(--t-xs); }
.ipcard-out a { color: var(--ink); display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: 3px; }

/* ---------------------------------------------------------------- the sheet: bottom on a phone, a drawer on the right from 900 px */
.scrim { position: fixed; inset: 0; z-index: 7; background: var(--scrim-cam); animation: fade var(--d-3) var(--ease-out) both; }
body:not([data-state="call"]) .scrim { background: var(--scrim); }
.sheet {
  position: fixed; z-index: 8; left: 0; right: 0; bottom: 0; max-height: 86dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); color: var(--ink); border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: var(--shadow-3);
  padding: var(--s-2) var(--s-5) calc(var(--s-5) + env(safe-area-inset-bottom));
  animation: sheet-up var(--d-3) var(--ease-out) both;
}
.sheet-grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 0 auto var(--s-2); }
@media (min-width: 900px) {
  .sheet {
    left: auto; top: var(--s-4); right: var(--s-4); bottom: var(--s-4); width: 400px; max-height: none;
    border-radius: var(--r-xl); padding: var(--s-4) var(--s-5) var(--s-5); animation-name: sheet-in;
  }
  .sheet-grab { display: none; }
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); }
/* #1059: a long title breaks into even lines, not a word left alone under it. */
.sheet-head h2 { font-size: var(--t-xl); line-height: 1.2; overflow-wrap: anywhere; text-wrap: balance; }
.sheet-body { display: grid; gap: var(--s-4); }
.sheet-body .pickers { margin-top: 0; }
.sheet-text { color: var(--ink-2); font-size: var(--t-sm); }
.sheet-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s-2); }
.sheet-list { display: grid; gap: var(--s-2); }
/* A choice: the action in a word, then to whom it happens, in one 64 px target. */
.btn-choice {
  min-height: 64px; padding: var(--s-3) var(--s-5); border-radius: var(--r-lg);
  flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; text-align: left;
}
.choice-label { font-weight: var(--w-bold); }
.choice-sub { font-weight: var(--w-regular); font-size: var(--t-xs); line-height: 1.35; color: var(--ink-2); }
.btn-danger .choice-sub, .btn-primary .choice-sub { color: inherit; opacity: 0.86; }
.sheet-danger { padding-top: var(--s-4); border-top: 1px solid var(--line); }
/* A knock in the host sheet (#681 D1): who asks, then the two answers beside it, on a warm tint. */
.sheet-label { font-weight: var(--w-bold); font-size: var(--t-sm); line-height: 1.35; color: var(--ink-2); }
.knock {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3);
  padding: var(--s-2) var(--s-2) var(--s-2) var(--s-4); border-radius: var(--r-lg); background: var(--warm-soft);
}
.knock + .knock { margin-top: var(--s-2); }
.knock-who { flex: 1 1 10em; min-width: 0; display: grid; margin: 0; }
.knock-name { color: var(--ink); font-weight: var(--w-bold); overflow-wrap: anywhere; }
.knock-sub { color: var(--ink-2); font-size: var(--t-2xs); }
.knock-actions { flex: none; display: flex; gap: var(--s-2); }
.btn-stay { justify-content: center; }

/* ---------------------------------------------------------------- toasts (6.4) */
.toasts {
  position: fixed; z-index: 9; left: 50%; top: calc(var(--s-4) + env(safe-area-inset-top)); transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 2 * var(--s-4)); display: flex; flex-direction: column; gap: var(--s-2); align-items: center;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: var(--s-2);
  background: var(--surface); color: var(--ink); border-radius: var(--r-pill);
  padding: 10px var(--s-4) 10px var(--s-3); font-size: var(--t-sm); font-weight: var(--w-medium); box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line);
  max-width: 100%; white-space: nowrap; animation: drop var(--d-3) var(--ease-spring) both;
}
.toast::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.toast span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.toast-warn { box-shadow: var(--shadow-2), inset 0 0 0 2px var(--rec); }
.toast-warn::before { background: var(--rec); }

/* ---------------------------------------------------------------- the lobby on a phone */
/* The camera card, then the meeting; the way in stays on screen, held at the bottom. */
@media (max-width: 899px) {
  .page-lobby > main { padding: var(--s-4) 0 0; justify-content: flex-start; }
  .page-lobby .lobby { gap: var(--s-4); }
  .page-lobby .preview { aspect-ratio: auto; height: min(86vw, 360px); max-height: 44dvh; }
  .page-lobby .lobby-body .actions {
    position: sticky; bottom: 0; z-index: 2; margin: var(--s-4) calc(-1 * var(--gutter)) 0;
    padding: var(--s-3) var(--gutter) calc(var(--s-3) + env(safe-area-inset-bottom));
    background: var(--bg);
  }
  .page-lobby .lobby-body .actions .btn { flex: 1; }
  .page-lobby { padding-bottom: 0; }
}

/* ---------------------------------------------------------------- browser check (check.html, #670) */
.check-list { list-style: none; margin: var(--s-5) 0 0; padding: 0; display: grid; gap: var(--s-2); }
.check-row { display: flex; gap: var(--s-3); align-items: flex-start; color: var(--ink); padding: var(--s-3); border-radius: var(--r-md); background: var(--fill-1); }
.check-mark { flex: none; width: 20px; height: 20px; margin-top: 0.15em; }
.check-mark.is-ok { color: var(--ok); }
.check-mark.is-no { color: var(--rec); }
.check-row-note { display: block; color: var(--ink-2); font-size: var(--t-xs); }
.check-sum {
  margin-top: var(--s-5); padding: var(--s-3) var(--s-4); border-radius: var(--r-md);
  background: var(--fill-1); color: var(--ink-2); font-size: var(--t-xs); overflow-wrap: anywhere; font-family: var(--mono);
}
.check-note { margin-top: var(--s-5); }

/* ---------------------------------------------------------------- the small window (#726)
   Its own little page (Document Picture-in-Picture), styled by this file: tiles over a row of
   four small controls. One person fills it; two share it; three: whoever spoke last on top. */
body.mini { min-height: 100vh; height: 100vh; display: flex; flex-direction: column; overflow: hidden; background: var(--room-bg); color-scheme: dark; }
.mini-tiles {
  flex: 1; min-height: 0; display: grid; gap: var(--s-1); padding: var(--s-1);
  grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(0, 1fr);
}
.mini-tiles[data-n="1"] { grid-template-columns: 1fr; }
.mini-tiles[data-n="3"] { grid-template-rows: 3fr 2fr; }
.mini-tiles[data-n="3"] .tile:first-child { grid-column: 1 / -1; }
.mini-tiles .tile { width: auto; height: auto; min-height: 0; max-width: none; border-radius: var(--r-md); }
.mini-tiles .tile video { object-fit: cover; }
.mini-tiles .tile .initials { font-size: var(--t-md); width: 40%; }
.mini-tiles .tile .name { font-size: var(--t-2xs); height: 22px; }
.mini-bar { flex: none; display: flex; justify-content: center; align-items: center; gap: var(--s-2); padding: var(--s-2); }
.mini-bar .ctl.leave { width: 56px; height: 44px; border-radius: var(--r-pill); }
.mini-ask {
  position: fixed; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: center;
  gap: var(--s-2); padding: var(--s-4); background: var(--room-bg);
}
.mini-ask-text { color: var(--ink); font-size: var(--t-sm); margin-bottom: var(--s-1); }
.mini-ask .btn { justify-content: center; }
/* The painted picture of the video way: played, never seen in the page itself. */
.mini-feed { position: fixed; left: 0; bottom: 0; width: 2px; height: 2px; opacity: 0; pointer-events: none; }

/* ---------------------------------------------------------------- motion: transform and opacity only */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }
@keyframes drop { from { opacity: 0; transform: translateY(-12px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes ripple { 0% { opacity: 0.5; transform: scale(1); } 100% { opacity: 0; transform: scale(1.6); } }
@keyframes halo { 0% { opacity: 0.55; transform: scale(0.6); } 100% { opacity: 0; transform: scale(2.2); } }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sheet-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes dotwave { 0%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important;
    transition-duration: 0.01ms !important; transition-delay: 0ms !important;
  }
}

/* #828: waiting at the door -- you, the dots, the host; one line, the reasons as chips */
.waitline { display: flex; align-items: center; justify-content: center; gap: var(--s-3); margin-bottom: var(--s-6); }
.waitline[hidden] { display: none; }
body[data-wait] .entry-card .obj { display: none; }
.waitline .av {
  --tint: var(--p1); width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: color-mix(in oklab, var(--tint) 26%, var(--surface)); color: color-mix(in oklab, var(--tint) 55%, var(--ink));
  font-weight: var(--w-bold); font-size: var(--t-md);
}
.waitline .wl-me { --tint: var(--p3); }
.waitline .wl-host .av { --tint: var(--p2); }
.waitline .wl-host .av .ic { width: 28px; height: 28px; }
.wl-host { position: relative; }
.wl-badge { position: absolute; right: -6px; bottom: -6px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 3px var(--surface); animation: pop var(--d-3) var(--ease-spring) 0.5s both; }
.wl-badge .ic { width: 16px; height: 16px; display: none; }
body[data-wait="seen"] .wl-eye, body[data-wait="lock"] .wl-lock { display: block; }
body[data-wait="lock"] .wl-badge { background: var(--warn-soft); color: var(--warn-text); }
.waitline-dots { display: flex; gap: 8px; }
.waitline-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); opacity: 0.25; animation: dotwave 1.6s var(--ease-move) infinite; }
.waitline-dots i:nth-child(2) { animation-delay: 160ms; } .waitline-dots i:nth-child(3) { animation-delay: 320ms; }
.waitline-dots i:nth-child(4) { animation-delay: 480ms; } .waitline-dots i:nth-child(5) { animation-delay: 640ms; }
body[data-wait="lock"][data-state="closed-by-host"] .waitline-dots i { animation: none; background: var(--line-strong); opacity: 1; }
#card-why { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2); margin-top: var(--s-4); }
#card-why[hidden] { display: none; }
#card-why .chip { display: inline-flex; align-items: center; min-height: 28px; padding: 4px var(--s-3); border-radius: var(--r-pill);
  background: var(--fill-1); color: var(--ink-2); font-size: var(--t-xs); font-weight: var(--w-medium); text-align: left; }
#card-why .chip-warn { background: var(--warn-soft); color: var(--warn-text); }
#card-why .chip-live::before { content: ""; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--accent); animation: dotwave 1.6s var(--ease-move) infinite; }
@media (prefers-reduced-motion: reduce) { .waitline-dots i, #card-why .chip-live::before, .wl-badge { animation: none; } .waitline-dots i { opacity: 0.6; } }

/* #840: every control on the call page answers the same way -- colour and shadow ease in on hover
   and focus, a press gives a short scale, nothing moves the layout. The reduced-motion rule above
   turns all of it off. */
.ctl, .chev, .ibtn, .icon-btn, .link-btn, .lock, .tab, .menu-item, .btn {
  transition: transform var(--d-1) var(--ease-out), background-color var(--d-2) var(--ease-out),
    color var(--d-2) var(--ease-out), box-shadow var(--d-2) var(--ease-out), border-radius var(--d-2) var(--ease-out),
    opacity var(--d-2) var(--ease-out);
}
.ctl, .ibtn { transition-timing-function: var(--ease-spring), var(--ease-out), var(--ease-out), var(--ease-out), var(--ease-out), var(--ease-out); }
@media (hover: hover) {
  .ctl:hover { box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
  .ctl.leave:hover { box-shadow: var(--shadow-1); filter: brightness(1.06); }
  .tab:hover:not([aria-selected="true"]) { color: var(--ink); }
  .ibtn:hover { background: var(--fill-1); }
}
.chev:active, .icon-btn:active, .lock:active, .tab:active, .link-btn:active { transform: scale(0.94); }
.menu-item:active { transform: scale(0.98); }
.ctl:focus-visible, .chev:focus-visible, .icon-btn:focus-visible, .tab:focus-visible, .menu-item:focus-visible, .lock:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px;
}
.ctl.leave { transition-property: transform, background-color, color, box-shadow, border-radius, opacity, filter; }
