/*! LATIN MEET — design system
 *  خطوط النظام فقط: صفر طلبات خارجية، صفر تتبّع.
 */

/* ============================================================ tokens */
:root {
  --bg:            #070910;
  --bg-2:          #0c101b;
  --surface:       rgba(20, 26, 42, .72);
  --surface-2:     rgba(28, 35, 55, .78);
  --surface-solid: #141a2a;
  --line:          rgba(255, 255, 255, .09);
  --line-2:        rgba(255, 255, 255, .16);

  --text:          #eef1f8;
  --text-2:        #a7b0c6;
  --text-3:        #6e788f;

  --brand:         #6d5efc;
  --brand-2:       #22d3ee;
  --brand-soft:    rgba(109, 94, 252, .16);
  --accent:        #f472b6;

  --ok:            #34d399;
  --warn:          #fbbf24;
  --danger:        #f2555a;
  --danger-soft:   rgba(242, 85, 90, .16);

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  --sh-1: 0 1px 2px rgba(0,0,0,.3);
  --sh-2: 0 8px 28px rgba(0,0,0,.42);
  --sh-3: 0 24px 60px rgba(0,0,0,.55);
  --ring: 0 0 0 2px rgba(109,94,252,.55);

  --ctl: 52px;
  --pad: clamp(16px, 4vw, 40px);
  --dur: .22s;
  --ease: cubic-bezier(.32,.72,.28,1);

  --font: "Segoe UI", system-ui, -apple-system, "Noto Sans Arabic",
          "Noto Kufi Arabic", "Dubai", "Tahoma", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Courier New", monospace;
}

:root[data-theme="light"] {
  --bg:            #f4f6fb;
  --bg-2:          #ffffff;
  --surface:       rgba(255, 255, 255, .84);
  --surface-2:     rgba(255, 255, 255, .95);
  --surface-solid: #ffffff;
  --line:          rgba(11, 18, 38, .10);
  --line-2:        rgba(11, 18, 38, .18);
  --text:          #101728;
  --text-2:        #4d5773;
  --text-3:        #8b94ab;
  --brand-soft:    rgba(109, 94, 252, .12);
  --sh-2: 0 8px 28px rgba(16,23,40,.12);
  --sh-3: 0 24px 60px rgba(16,23,40,.16);
}

/* ============================================================ base */
*, *::before, *::after { box-sizing: border-box; }

/* لا بد أن يتغلّب [hidden] على أي display معرّف في الأنماط */
[hidden] { display: none !important; }

html, body {
  margin: 0; padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
}

body { min-height: 100dvh; }

img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; letter-spacing: -.015em; }
p { margin: 0; }

::selection { background: var(--brand); color: #fff; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-sm); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); background-clip: content-box; }

.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ============================================================ atoms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--dur) var(--ease), background var(--dur), border-color var(--dur), box-shadow var(--dur), opacity var(--dur);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:hover { border-color: var(--line-2); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--brand), #8b7bff 55%, var(--brand-2));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 30px rgba(109, 94, 252, .32);
}
.btn-primary:hover { box-shadow: 0 16px 40px rgba(109, 94, 252, .42); }

.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surface); }

.btn-danger { background: var(--danger); border-color: transparent; color: #fff; }
.btn-danger:hover { background: #ff656a; }

.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: .88rem; }

.field {
  width: 100%;
  padding: 13px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--text);
  transition: border-color var(--dur), background var(--dur);
}
.field::placeholder { color: var(--text-3); }
.field:focus { border-color: var(--brand); background: var(--surface-2); outline: none; box-shadow: 0 0 0 4px var(--brand-soft); }
select.field { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-inline-end: 40px; }
[dir="rtl"] select.field { background-position: 14px 21px, 20px 21px; padding-inline-end: 16px; padding-inline-start: 40px; }

.label { display: block; font-size: .84rem; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.hint { font-size: .8rem; color: var(--text-3); margin-top: 7px; line-height: 1.55; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 13px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: .8rem; font-weight: 600; color: var(--text-2);
  white-space: nowrap;
}
.chip-ok { color: var(--ok); border-color: rgba(52, 211, 153, .3); background: rgba(52, 211, 153, .1); }

.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.dot-pulse { animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }

.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 46px; height: 27px; border-radius: 99px; background: var(--line-2); transition: background var(--dur); flex: none; position: relative; }
.switch .track::after { content: ""; position: absolute; inset-inline-start: 3px; top: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; transition: transform var(--dur) var(--ease); box-shadow: var(--sh-1); }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(19px); }
[dir="rtl"] .switch input:checked + .track::after { transform: translateX(-19px); }
.switch input:focus-visible + .track { box-shadow: var(--ring); }

.icon { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 18px; height: 18px; }

/* ============================================================ landing */
.bgfx { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.bgfx::before, .bgfx::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(110px); opacity: .5;
}
.bgfx::before { width: 58vw; height: 58vw; background: radial-gradient(circle, #6d5efc, transparent 68%); top: -22vw; inset-inline-start: -14vw; }
.bgfx::after  { width: 52vw; height: 52vw; background: radial-gradient(circle, #22d3ee, transparent 68%); bottom: -26vw; inset-inline-end: -12vw; opacity: .32; }
:root[data-theme="light"] .bgfx::before { opacity: .22; }
:root[data-theme="light"] .bgfx::after { opacity: .16; }

.page { position: relative; z-index: 1; }
.wrap { width: min(1160px, 100% - var(--pad) * 2); margin-inline: auto; }

.site-head {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 18px; height: 72px; }

.logo { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -.02em; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 6px 20px rgba(109,94,252,.4);
}
.logo-txt { display: flex; flex-direction: column; line-height: 1.1; }
.logo-txt small { font-size: .68rem; font-weight: 500; color: var(--text-3); letter-spacing: 0; }

.site-nav { display: flex; gap: 6px; margin-inline-start: auto; align-items: center; }
.site-nav a { padding: 9px 15px; border-radius: var(--r-pill); font-size: .9rem; font-weight: 600; color: var(--text-2); transition: color var(--dur), background var(--dur); }
.site-nav a:hover { color: var(--text); background: var(--surface); }
@media (max-width: 800px) { .site-nav a { display: none; } }

.lang-btn, .theme-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 40px; padding: 0 14px;
  border-radius: var(--r-pill); border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; font-weight: 700; font-size: .85rem;
  transition: border-color var(--dur), background var(--dur);
}
.lang-btn:hover, .theme-btn:hover { border-color: var(--line-2); background: var(--surface-2); }
.theme-btn { width: 40px; padding: 0; justify-content: center; }

.hero { padding: clamp(56px, 10vw, 120px) 0 clamp(40px, 7vw, 84px); text-align: center; }
.hero .badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 17px; border-radius: var(--r-pill);
  border: 1px solid rgba(109,94,252,.34); background: var(--brand-soft);
  color: #b9b0ff; font-size: .82rem; font-weight: 600; margin-bottom: 26px;
}
:root[data-theme="light"] .hero .badge { color: #5b4bdb; }
.hero h1 {
  font-size: clamp(2.1rem, 6.2vw, 4.1rem);
  font-weight: 800; letter-spacing: -.035em;
  background: linear-gradient(180deg, var(--text) 40%, color-mix(in srgb, var(--text) 74%, transparent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 22px;
}
.hero .lead { max-width: 660px; margin-inline: auto; color: var(--text-2); font-size: clamp(1rem, 2.4vw, 1.14rem); }

.cta-card {
  margin: 40px auto 0;
  max-width: 560px;
  padding: clamp(20px, 4vw, 30px);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--sh-3);
  text-align: start;
}
.cta-card .btn-primary { height: 58px; font-size: 1.05rem; }
.cta-sep { display: flex; align-items: center; gap: 14px; margin: 22px 0 18px; color: var(--text-3); font-size: .82rem; font-weight: 600; }
.cta-sep::before, .cta-sep::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.join-row { display: flex; gap: 10px; }
.join-row .field { flex: 1; min-width: 0; }
.adv { margin-top: 18px; }
.adv summary { cursor: pointer; font-size: .85rem; color: var(--text-2); font-weight: 600; list-style: none; padding: 6px 0; }
.adv summary::-webkit-details-marker { display: none; }
.adv summary::before { content: "+"; display: inline-block; width: 18px; font-weight: 800; color: var(--brand); }
.adv[open] summary::before { content: "−"; }
.adv-body { padding-top: 12px; display: grid; gap: 14px; }

.grid-3 { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.section { padding: clamp(48px, 8vw, 96px) 0; }
.section-title { text-align: center; font-size: clamp(1.5rem, 3.6vw, 2.3rem); margin-bottom: 14px; }
.section-sub { text-align: center; color: var(--text-2); max-width: 640px; margin: 0 auto clamp(30px, 5vw, 54px); }

.card {
  padding: 26px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: transform var(--dur) var(--ease), border-color var(--dur), background var(--dur);
}
.card:hover { transform: translateY(-3px); border-color: var(--line-2); background: var(--surface-2); }
.card .ico {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: var(--brand-soft); color: #a99cff; margin-bottom: 16px;
}
:root[data-theme="light"] .card .ico { color: var(--brand); }
.card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.card p { color: var(--text-2); font-size: .93rem; }

.sec-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.sec-item { display: flex; gap: 15px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.sec-item .n {
  width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-weight: 800; font-size: .84rem;
}
.sec-item h4 { font-size: .98rem; margin-bottom: 5px; }
.sec-item p { color: var(--text-2); font-size: .88rem; }

.note {
  margin-top: 26px; padding: 18px 20px;
  border-inline-start: 3px solid var(--warn);
  background: rgba(251, 191, 36, .08);
  border-radius: var(--r-md);
  color: var(--text-2); font-size: .89rem;
}

.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); counter-reset: s; }
.step { padding: 24px; border-radius: var(--r-lg); border: 1px dashed var(--line-2); background: var(--surface); counter-increment: s; }
.step::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: #a99cff; font-weight: 800; margin-bottom: 14px; }
.step p { color: var(--text-2); font-size: .93rem; }

.site-foot { border-top: 1px solid var(--line); padding: 32px 0; color: var(--text-3); font-size: .85rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }

/* ============================================================ room shell */
.room {
  position: fixed; inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--bg);
  overflow: hidden;
}

.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px clamp(12px, 2.4vw, 20px);
  padding-top: max(10px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-2) 80%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  min-height: 60px;
}
.topbar .spacer { flex: 1; }
.top-title { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.top-title strong { font-size: .95rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-title span { font-size: .76rem; color: var(--text-3); font-variant-numeric: tabular-nums; }

.stage { position: relative; overflow: hidden; display: flex; min-height: 0; }
.stage-main { flex: 1; min-width: 0; position: relative; padding: clamp(8px, 1.6vw, 16px);
  display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.stage-main > .tiles { flex: 1; min-height: 0; }

/* video grid */
.tiles {
  height: 100%;
  display: grid;
  gap: clamp(8px, 1.2vw, 14px);
  grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr));
  grid-auto-rows: var(--rowh, minmax(0, 1fr));
  align-content: center;
  justify-content: center;
  width: var(--gw, 100%);
  max-width: 100%;
  margin-inline: auto;
}
.stage[data-layout="speaker"] .tiles {
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: minmax(0, 1fr);
}
.stage[data-layout="speaker"] .filmstrip { display: flex; }

.filmstrip {
  display: none;
  gap: 8px; padding: 8px 0 0;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: thin;
}
.filmstrip .tile { width: clamp(112px, 13vw, 168px); aspect-ratio: 16/9; flex: none; }

.tile {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: linear-gradient(160deg, #161d2f, #0d1220);
  border: 1px solid var(--line);
  min-height: 0;
  transition: box-shadow var(--dur), border-color var(--dur);
  isolation: isolate;
}
:root[data-theme="light"] .tile { background: linear-gradient(160deg, #e7ebf5, #dfe5f1); }
.tile.speaking { border-color: var(--ok); box-shadow: 0 0 0 2px var(--ok), 0 0 30px rgba(52,211,153,.28); }
.tile.pinned { border-color: var(--brand); }
.tile video {
  width: 100%; height: 100%; object-fit: cover; background: #000;
  transition: opacity var(--dur);
}
.tile video.contain { object-fit: contain; background: #05070d; }
.tile.mirror video { transform: scaleX(-1); }
.tile.novideo video { opacity: 0; }

.tile .avatar {
  position: absolute; inset: 0; display: grid; place-items: center;
  opacity: 0; transition: opacity var(--dur); pointer-events: none;
}
.tile.novideo .avatar { opacity: 1; }
.tile .avatar .initials {
  width: clamp(56px, 16%, 104px); aspect-ratio: 1;
  border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-weight: 800; font-size: clamp(1.2rem, 3.4vw, 2.1rem);
  box-shadow: var(--sh-2);
}

.tile .meta {
  position: absolute; inset-inline: 8px; bottom: 8px;
  display: flex; align-items: center; gap: 7px;
  pointer-events: none;
}
.tile .name {
  display: inline-flex; align-items: center; gap: 7px;
  max-width: 100%;
  padding: 5px 11px; border-radius: var(--r-pill);
  background: rgba(6, 9, 17, .62);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: #fff; font-size: .8rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tile .badges { position: absolute; inset-inline-end: 8px; top: 8px; display: flex; gap: 6px; }
.tile .badges b {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(6,9,17,.62); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: #fff;
}
.tile .badges b.red { background: var(--danger); }
.tile .badges b.hand { background: var(--warn); color: #241a00; animation: bob 1.5s var(--ease) infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

.netbars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.netbars i { width: 3px; border-radius: 1px; background: currentColor; opacity: .28; }
.netbars i:nth-child(1) { height: 5px; }
.netbars i:nth-child(2) { height: 8px; }
.netbars i:nth-child(3) { height: 12px; }
.netbars[data-level="1"] i:nth-child(-n+1),
.netbars[data-level="2"] i:nth-child(-n+2),
.netbars[data-level="3"] i:nth-child(-n+3) { opacity: 1; }
.netbars[data-level="1"] { color: var(--danger); }
.netbars[data-level="2"] { color: var(--warn); }
.netbars[data-level="3"] { color: var(--ok); }

.tile .connecting {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(7,9,16,.55); backdrop-filter: blur(3px);
  font-size: .85rem; color: var(--text-2);
}

.reaction-fly {
  position: absolute; bottom: 14%; inset-inline-start: 50%;
  font-size: 2.2rem; pointer-events: none;
  animation: fly 2.4s var(--ease) forwards;
}
@keyframes fly {
  0%   { transform: translate(-50%, 0) scale(.4); opacity: 0; }
  18%  { transform: translate(-50%, -20px) scale(1.15); opacity: 1; }
  100% { transform: translate(-50%, -190px) scale(.9); opacity: 0; }
}

.empty-stage { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; pointer-events: none; }
.empty-stage .inner { pointer-events: auto; }
.empty-stage .inner {
  max-width: 420px;
  padding: 26px 28px;
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--bg-2) 86%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line-2);
  box-shadow: var(--sh-2);
}
.empty-stage h3 { font-size: 1.15rem; margin-bottom: 8px; }
.empty-stage p { color: var(--text-2); font-size: .92rem; margin-bottom: 20px; }

/* ============================================================ side panel */
.panel {
  position: relative;
  z-index: 20;
  width: min(406px, 100vw);
  flex: none;
  border-inline-start: 1px solid var(--line);
  background: var(--bg-2);
  display: none;
  flex-direction: column;
  min-height: 0;
}
.panel.open { display: flex; }
.panel-head { display: flex; align-items: center; gap: 4px; padding: 10px; border-bottom: 1px solid var(--line); }
.panel-tabs {
  display: flex; gap: 2px; flex: 1; min-width: 0;
  overflow-x: auto; scrollbar-width: none;
}
.panel-tabs::-webkit-scrollbar { display: none; }
.panel-tab {
  padding: 8px 11px; border-radius: var(--r-pill); border: 0; background: transparent;
  color: var(--text-2); font-weight: 600; font-size: .82rem; cursor: pointer; transition: all var(--dur);
  position: relative; white-space: nowrap; flex: none;
}
.panel-tab:hover { color: var(--text); background: var(--surface); }
.panel-tab.active { background: var(--brand-soft); color: #b9b0ff; }
:root[data-theme="light"] .panel-tab.active { color: var(--brand); }
.panel-tab .count { font-size: .72rem; opacity: .8; }
.panel-body { flex: 1; overflow-y: auto; min-height: 0; padding: 14px; }
.panel-foot { padding: 12px; border-top: 1px solid var(--line); }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; flex: none;
  border-radius: 50%; border: 1px solid transparent; background: transparent;
  color: var(--text-2); cursor: pointer; transition: all var(--dur);
}
.icon-btn:hover { background: var(--surface); color: var(--text); }

/* chat */
.msg { margin-bottom: 14px; max-width: 88%; }
.msg.me { margin-inline-start: auto; }
.msg .who { font-size: .74rem; color: var(--text-3); margin-bottom: 4px; padding-inline: 4px; }
.msg .bubble {
  padding: 10px 14px; border-radius: 16px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: .92rem; word-break: break-word; white-space: pre-wrap; overflow-wrap: anywhere;
}
.msg.me .bubble { background: linear-gradient(135deg, var(--brand), #7c6cff); border-color: transparent; color: #fff; }
.msg .bubble a { text-decoration: underline; }
.msg.sys { max-width: 100%; text-align: center; }
.msg.sys .bubble { background: transparent; border: 0; color: var(--text-3); font-size: .8rem; padding: 4px; }
.chat-empty { text-align: center; color: var(--text-3); font-size: .86rem; padding: 40px 20px; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; }
.chat-form textarea { flex: 1; resize: none; max-height: 120px; min-height: 46px; padding: 12px 14px; }
.typing-line { font-size: .76rem; color: var(--text-3); height: 18px; padding-inline: 4px; }

/* participants */
.pitem { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--r-md); transition: background var(--dur); }
.pitem:hover { background: var(--surface); }
.pitem .av { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-weight: 700; font-size: .9rem; }
.pitem .info { flex: 1; min-width: 0; }
.pitem .info b { display: block; font-size: .92rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pitem .info span { font-size: .76rem; color: var(--text-3); }
.pitem .acts { display: flex; gap: 2px; }

/* settings */
.set-group { margin-bottom: 26px; }
.set-group > h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); margin-bottom: 14px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 0; }
.set-row > span { font-size: .9rem; }
.kbd { display: inline-block; padding: 3px 8px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--surface-2); font-family: var(--mono); font-size: .76rem; }

.code-box {
  padding: 16px; border-radius: var(--r-md);
  background: var(--brand-soft); border: 1px solid rgba(109,94,252,.3);
  text-align: center; margin-bottom: 12px;
}
.code-box .val { font-family: var(--mono); font-size: 1.3rem; font-weight: 700; letter-spacing: .12em; color: #c2b9ff; direction: ltr; }
:root[data-theme="light"] .code-box .val { color: var(--brand); }
.code-box .lbl { font-size: .74rem; color: var(--text-3); margin-bottom: 6px; }

/* ============================================================ controls */
.controls {
  display: flex; align-items: center; justify-content: center; gap: clamp(6px, 1.2vw, 12px);
  padding: 12px clamp(10px, 2vw, 20px);
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-2) 86%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  position: relative;
  flex-wrap: nowrap;
}
.ctl {
  position: relative;
  width: var(--ctl); height: var(--ctl);
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: transform var(--dur) var(--ease), background var(--dur), color var(--dur), border-color var(--dur);
  -webkit-tap-highlight-color: transparent;
  flex: none;
}
.ctl:hover { transform: translateY(-2px); border-color: var(--line-2); }
.ctl:active { transform: scale(.94); }
.ctl.on { background: var(--brand); border-color: transparent; color: #fff; }
.ctl.off { background: var(--danger); border-color: transparent; color: #fff; }
.ctl.rec { background: var(--danger); border-color: transparent; color: #fff; animation: recpulse 2s infinite; }
@keyframes recpulse { 0%,100% { box-shadow: 0 0 0 0 rgba(242,85,90,.5); } 50% { box-shadow: 0 0 0 9px rgba(242,85,90,0); } }
.ctl.leave { width: auto; padding: 0 22px; border-radius: var(--r-pill); background: var(--danger); border-color: transparent; color: #fff; gap: 8px; display: inline-flex; align-items: center; font-weight: 700; }
.ctl .pip { position: absolute; top: -2px; inset-inline-end: -2px; min-width: 19px; height: 19px; border-radius: 99px; background: var(--accent); color: #fff; font-size: .68rem; font-weight: 800; display: none; place-items: center; padding: 0 5px; border: 2px solid var(--bg-2); }
.ctl .pip.show { display: grid; }

.ctl-tip {
  position: absolute; bottom: calc(100% + 10px); inset-inline-start: 50%; transform: translateX(-50%);
  padding: 6px 11px; border-radius: 9px; background: #05070d; color: #fff;
  font-size: .76rem; white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity var(--dur); border: 1px solid var(--line);
}
[dir="rtl"] .ctl-tip { transform: translateX(50%); }
.ctl:hover .ctl-tip { opacity: 1; }
@media (hover: none) { .ctl-tip { display: none; } }

.popover {
  position: absolute; bottom: calc(100% + 12px);
  background: var(--surface-solid); border: 1px solid var(--line-2);
  border-radius: var(--r-lg); box-shadow: var(--sh-3);
  padding: 8px; display: none; z-index: 60; min-width: 210px;
}
.popover.open { display: block; animation: rise .18s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.popover .item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 12px; border: 0; border-radius: var(--r-sm); background: transparent;
  color: var(--text); font-size: .9rem; cursor: pointer; text-align: start;
  transition: background var(--dur);
}
.popover .item:hover { background: var(--surface); }
.popover .item.active { background: var(--brand-soft); color: #b9b0ff; }
.popover .sep { height: 1px; background: var(--line); margin: 6px 4px; }

.popover.reactions { padding: 6px; }
.popover.reactions.open { display: flex; gap: 4px; }
.reactions button { width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; font-size: 1.5rem; cursor: pointer; transition: transform var(--dur) var(--ease), background var(--dur); }
.reactions button:hover { background: var(--surface); transform: scale(1.18); }

/* ============================================================ overlays */
.overlay {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  padding: var(--pad);
  background: rgba(4, 6, 12, .7);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  overflow-y: auto;
}
.overlay[hidden] { display: none; }
.sheet {
  width: min(880px, 100%);
  background: var(--surface-solid);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-3);
  overflow: hidden;
  animation: rise .28s var(--ease);
}
.sheet-sm { width: min(460px, 100%); }
.sheet-pad { padding: clamp(20px, 4vw, 32px); }

.prejoin {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  max-height: calc(100dvh - var(--pad) * 2);
}
@media (max-width: 780px) { .prejoin { grid-template-columns: minmax(0, 1fr); } }

.prejoin .preview {
  position: relative;
  background: radial-gradient(120% 90% at 50% 0%, #121a2e, #05070d 70%);
  overflow: hidden;
  min-height: 320px;
  display: flex; flex-direction: column;
  justify-content: flex-end; align-items: center;
  padding-bottom: 20px;
}
@media (max-width: 780px) {
  .prejoin .preview { min-height: 0; aspect-ratio: 16/10; }
}
.prejoin .preview video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transform: scaleX(-1);
  transition: opacity var(--dur);
}
.prejoin .preview .off {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 24px 24px 96px; text-align: center;
  pointer-events: none;
}
.pv-avatar {
  width: clamp(72px, 22%, 108px); aspect-ratio: 1;
  border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-weight: 800; font-size: clamp(1.5rem, 5vw, 2.3rem);
  box-shadow: 0 10px 34px rgba(109, 94, 252, .35);
}
.pv-note { color: var(--text-3); font-size: .86rem; max-width: 240px; line-height: 1.6; }

.prejoin .preview .mini-ctl {
  position: relative; z-index: 3;
  display: flex; gap: 12px; justify-content: center; align-items: center;
  flex: 0 0 auto;
}
.prejoin .preview .mini-ctl .pvbtn {
  position: static;
  width: 52px; height: 52px; min-width: 52px; min-height: 52px;
  flex: 0 0 52px;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: rgba(10, 14, 24, .74);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: #fff; cursor: pointer; padding: 0; margin: 0;
  transition: background var(--dur), transform var(--dur) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.prejoin .preview .mini-ctl .pvbtn:hover { transform: translateY(-2px); }
.prejoin .preview .mini-ctl .pvbtn:active { transform: scale(.94); }
.prejoin .preview .mini-ctl .pvbtn.on  { background: var(--brand); border-color: transparent; }
.prejoin .preview .mini-ctl .pvbtn.off { background: var(--danger); border-color: transparent; }

.prejoin .form {
  display: flex; flex-direction: column;
  min-height: 0;
  background: var(--surface-solid);
}
.prejoin .form-body {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: clamp(22px, 3.4vw, 30px);
  display: flex; flex-direction: column; gap: 18px;
}
.prejoin .form-foot {
  padding: 16px clamp(22px, 3.4vw, 30px) clamp(20px, 3vw, 26px);
  border-top: 1px solid var(--line);
  background: var(--surface-solid);
}
.prejoin .form-foot .hint { text-align: center; margin-top: 10px; }
.prejoin .form h2 { font-size: 1.3rem; margin-bottom: 2px; }
.fgroup { display: block; }
.prejoin .form .btn-primary { height: 52px; font-size: 1rem; }
#pjWarn { color: var(--warn); background: rgba(251,191,36,.08); border-inline-start: 3px solid var(--warn); padding: 10px 12px; border-radius: var(--r-sm); margin-top: 0; }

.meter { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--ok), var(--brand-2)); transition: width .09s linear; }

.toasts {
  position: fixed; z-index: 300;
  bottom: calc(96px + env(safe-area-inset-bottom)); inset-inline-start: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 9px; align-items: center;
  pointer-events: none; width: min(440px, calc(100vw - 24px));
}
[dir="rtl"] .toasts { transform: translateX(50%); }
.toast {
  padding: 11px 18px; border-radius: var(--r-pill);
  background: var(--surface-solid); border: 1px solid var(--line-2);
  box-shadow: var(--sh-2); font-size: .87rem; font-weight: 600;
  animation: toastIn .3s var(--ease);
  max-width: 100%; text-align: center;
}
.toast.bad { border-color: rgba(242,85,90,.45); color: #ff9296; }
.toast.good { border-color: rgba(52,211,153,.4); color: var(--ok); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.94); } to { opacity: 1; transform: none; } }

/* ============================================================ responsive */
@media (max-width: 1024px) {
  .panel { position: absolute; inset-block: 0; inset-inline-end: 0; z-index: 40; box-shadow: var(--sh-3); }
}
.only-xs { display: none !important; }

@media (max-width: 640px) {
  :root { --ctl: 46px; }
  .hide-xs { display: none !important; }
  .only-xs { display: flex !important; }
  .popover .item.only-xs { display: flex !important; }
  .panel { width: 100vw; inset: 0; border: 0; }
  .controls { gap: 6px; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  .controls::-webkit-scrollbar { display: none; }
  .controls::after { content: ""; flex: none; width: 2px; }
  .ctl.leave { padding: 0 16px; }
  .ctl.leave span { display: none; }
  .topbar { min-height: 54px; gap: 8px; }
  .top-title strong { font-size: .88rem; }
  .hide-sm { display: none !important; }
  .filmstrip .tile { width: 118px; }
  .tile { border-radius: var(--r-md); }
}
@media (max-width: 400px) {
  .toasts { bottom: calc(86px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ============================================================ content guard */

.chip-guard {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, .35);
  background: rgba(251, 191, 36, .1);
}

/* --- العلامة المائية المتحرّكة --- */
.wm-layer {
  position: absolute; inset: -30%;
  z-index: 5;
  pointer-events: none;
  user-select: none;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-content: space-around;
  justify-items: center;
  transform: rotate(-22deg);
  animation: wmDrift 38s linear infinite alternate;
  overflow: hidden;
}
.wm-layer span {
  font-size: clamp(10px, .95vw, 13px);
  font-weight: 700;
  letter-spacing: .03em;
  white-space: nowrap;
  color: rgba(255, 255, 255, .15);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
  padding: 22px 10px;
  direction: ltr;
}
:root[data-theme="light"] .wm-layer span {
  color: rgba(10, 16, 32, .22);
  text-shadow: 0 1px 2px rgba(255, 255, 255, .5);
}
@keyframes wmDrift {
  from { transform: rotate(-22deg) translate(-3%, -2%); }
  to   { transform: rotate(-22deg) translate(3%, 2%); }
}
@media (max-width: 640px) {
  .wm-layer { grid-template-columns: repeat(3, 1fr); }
}

/* --- درع التسويد --- */
.shield {
  position: fixed; inset: 0; z-index: 9999;
  background: #000;
  display: grid; place-items: center;
  text-align: center;
  padding: 24px;
  animation: shieldIn .12s ease-out;
}
@keyframes shieldIn { from { opacity: .4; } to { opacity: 1; } }
.shield-inner { max-width: 420px; color: #9aa3b8; }
.shield-inner .icon { width: 46px; height: 46px; margin: 0 auto 18px; color: var(--warn); }
.shield-inner h2 { color: #e8ecf6; font-size: 1.2rem; margin-bottom: 10px; }
.shield-inner p { font-size: .92rem; line-height: 1.7; }
.shield-wm {
  display: block; margin-top: 26px;
  font-size: .78rem; font-weight: 700; letter-spacing: .06em;
  color: rgba(255, 255, 255, .3);
  direction: ltr;
}

/* --- بطاقة حالة الأمان --- */
.statecard {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); padding: 16px;
}
.statecard-top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.statecard-top .icon { color: var(--text-3); margin-top: 2px; }
.statecard-top b { display: block; font-size: .95rem; }
.statecard-top span { font-size: .8rem; color: var(--text-3); }
.statecard.on { border-color: rgba(251, 191, 36, .4); background: rgba(251, 191, 36, .07); }
.statecard.on .statecard-top .icon { color: var(--warn); }

.statelist { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.statelist li {
  display: flex; align-items: center; gap: 9px;
  font-size: .84rem; color: var(--text-2);
}
.statelist li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-3); flex: none;
}
.statelist li.yes { color: var(--ok); }
.statelist li.yes::before { background: var(--ok); }
.statelist li.no { color: var(--text-3); }

/* --- سجل الأمان --- */
.seclog-item {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 11px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line);
  margin-bottom: 8px;
}
.seclog-item .ic {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: var(--danger-soft); color: var(--danger);
}
.seclog-item.warn .ic { background: rgba(251,191,36,.14); color: var(--warn); }
.seclog-item .tx { min-width: 0; }
.seclog-item .tx b { display: block; font-size: .87rem; }
.seclog-item .tx span { font-size: .76rem; color: var(--text-3); }

/* --- شارات المربّع --- */
.tile .badges b.guard { background: var(--warn); color: #241a00; }
.tile .badges b.star  { background: var(--brand); }
.tile.audio-only .avatar .initials { opacity: .85; }
.tile .lowband {
  position: absolute; inset-inline-end: 8px; bottom: 8px;
  display: none; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: var(--r-pill);
  background: rgba(6,9,17,.6); color: #cbd3e6; font-size: .7rem; font-weight: 600;
  backdrop-filter: blur(8px);
}
.tile.audio-only .lowband { display: inline-flex; }


/* ============================================================ presenter HUD */
.pres-hud {
  position: absolute; top: 14px; inset-inline-start: 50%;
  transform: translateX(-50%);
  z-index: 8;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px; border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--surface-solid) 92%, transparent);
  border: 1px solid var(--line-2);
  box-shadow: var(--sh-2);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font-size: .8rem; font-variant-numeric: tabular-nums;
  white-space: nowrap; max-width: calc(100% - 24px); overflow: hidden;
}
[dir="rtl"] .pres-hud { transform: translateX(50%); }
.pres-hud b { font-weight: 800; color: var(--ok); }
.pres-hud span { color: var(--text-2); }
.pres-warn { color: var(--warn) !important; font-weight: 600; }
@media (max-width: 640px) {
  .pres-hud { font-size: .72rem; gap: 8px; padding: 6px 12px; top: 8px; }
  .pres-hud .hide-sm { display: none; }
}

/* الشاشة المشاركة: لا تنعيم، حدّة كاملة للنصوص */
.tile video.contain {
  object-fit: contain;
  background: #05070d;
  image-rendering: -webkit-optimize-contrast;
}
.stage[data-layout="presentation"] .tiles { grid-template-columns: minmax(0, 1fr); }


/* ============================================================ boot screen */
.boot {
  position: fixed; inset: 0; z-index: 500;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.boot-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.boot-inner b { font-size: .95rem; font-weight: 600; color: var(--text-2); }
.boot-ring {
  width: 44px; height: 44px; border-radius: 50%;
  border: 3px solid var(--line-2);
  border-top-color: var(--brand);
  animation: bootspin .8s linear infinite;
}
@keyframes bootspin { to { transform: rotate(360deg); } }


/* ============================================================ permissions */
.permcard { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); padding: 16px; }
.permcard .perm-pane { display: none; flex-direction: column; gap: 12px; }
.permcard[data-state="idle"]    .perm-pane[data-pane="idle"],
.permcard[data-state="asking"]  .perm-pane[data-pane="asking"],
.permcard[data-state="granted"] .perm-pane[data-pane="granted"],
.permcard[data-state="problem"] .perm-pane[data-pane="problem"] { display: flex; }
.permcard[data-state="skipped"] { display: none; }
.permcard[data-state="granted"] { border-color: rgba(52,211,153,.28); background: rgba(52,211,153,.05); }
.permcard[data-state="problem"] { border-color: rgba(251,191,36,.35); background: rgba(251,191,36,.06); }

.perm-head { display: flex; gap: 12px; align-items: flex-start; }
.perm-head b { display: block; font-size: .95rem; margin-bottom: 3px; }
.perm-head span { font-size: .82rem; color: var(--text-2); line-height: 1.6; }
.perm-ico {
  width: 38px; height: 38px; flex: none; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--brand-soft); color: #a99cff;
}
:root[data-theme="light"] .perm-ico { color: var(--brand); }
.perm-head.ok  .perm-ico { background: rgba(52,211,153,.14); color: var(--ok); }
.perm-head.bad .perm-ico { background: rgba(251,191,36,.14); color: var(--warn); }
.permcard .btn { height: 46px; }
.permcard .btn-ghost { font-size: .86rem; font-weight: 600; color: var(--text-2); }
.permcard .fgroup + .fgroup { margin-top: 2px; }

/* ============================================================ in-app gate */
.gate-icon {
  width: 60px; height: 60px; border-radius: 18px; margin: 0 auto 18px;
  display: grid; place-items: center;
  background: rgba(251,191,36,.12); color: var(--warn);
}
.gate-icon .icon { width: 28px; height: 28px; }
#appGate h2 { text-align: center; font-size: 1.22rem; margin-bottom: 10px; }
.gate-sub { text-align: center; color: var(--text-2); font-size: .92rem; line-height: 1.7; margin-bottom: 20px; }
.gate-steps {
  margin: 0 0 20px; padding: 0; list-style: none; counter-reset: g;
  display: grid; gap: 10px;
}
.gate-steps li {
  counter-increment: g;
  display: flex; gap: 11px; align-items: flex-start;
  font-size: .88rem; color: var(--text-2); line-height: 1.6;
}
.gate-steps li::before {
  content: counter(g);
  width: 23px; height: 23px; flex: none; border-radius: 50%;
  background: var(--brand-soft); color: #b9b0ff;
  display: grid; place-items: center;
  font-size: .74rem; font-weight: 800; margin-top: 1px;
}
:root[data-theme="light"] .gate-steps li::before { color: var(--brand); }

@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60% { transform: translateX(-5px); }
  40%,80% { transform: translateX(5px); }
}
.field.shake { animation: shake .4s var(--ease); border-color: var(--warn); }


/* ============================================================ session options */
.optgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 460px) { .optgrid { grid-template-columns: 1fr; } }
.opt { cursor: pointer; }
.opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.opt-box {
  display: block; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); transition: all var(--dur);
  height: 100%;
}
.opt-box .icon { color: var(--text-3); margin-bottom: 7px; }
.opt-box b { display: block; font-size: .88rem; margin-bottom: 3px; }
.opt-box small { display: block; font-size: .76rem; color: var(--text-3); line-height: 1.55; }
.opt:hover .opt-box { border-color: var(--line-2); }
.opt input:checked + .opt-box {
  border-color: var(--brand); background: var(--brand-soft);
}
.opt input:checked + .opt-box .icon { color: var(--brand); }
.opt input:focus-visible + .opt-box { box-shadow: var(--ring); }

.optrow {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface);
}
.optrow b { display: block; font-size: .88rem; margin-bottom: 3px; }
.optrow small { display: block; font-size: .76rem; color: var(--text-3); line-height: 1.55; }

/* ============================================================ lobby */
.tab-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); margin-inline-start: 5px; vertical-align: middle;
  animation: pulse 1.6s var(--ease) infinite;
}
.lobby-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px; border-radius: var(--r-md);
  background: var(--brand-soft); border: 1px solid rgba(109,94,252,.28);
  margin-bottom: 8px;
}
.lobby-item .av {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 700; font-size: .84rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
}
.lobby-item .nm { flex: 1; min-width: 0; font-size: .9rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lobby-item .btn-sm { padding: 7px 12px; }
.lobby-actions { display: flex; gap: 6px; flex: none; }
#lobbyWait .gate-icon .boot-ring { border-top-color: var(--brand); }
