/* Meet v3 — Artisan Digital / geek.wf
   Thèmes : data-theme = light | dark, data-brand = ad | geek ; accent d'espace via --accent* (JS). */

/* ================= jetons ================= */
:root, :root[data-theme=dark] {
  --bg: #04101d; --surface-1: #061A2E; --surface-2: #08213A; --surface-3: #0A2540; --elev: #0F2E4E; --field: #071c33;
  --hover: rgba(191,233,250,.06); --active: rgba(64,189,237,.14); --line: rgba(191,233,250,.08); --line-2: rgba(191,233,250,.15);
  --tx: #E8EEF6; --tx-2: #B8C4D6; --tx-3: #7d8ea5;
  --accent: #6FA8DC; --accent-2: #8CC4E8; --accent-ink: #061A2E; --accent-soft: rgba(111,168,220,.13);
  --grad: linear-gradient(0deg, var(--accent), var(--accent));
  --danger: #E4808E; --ok: #5CC08F; --warn: #E2BE6A; --busy: #E4808E;
  --stage: #030b15; --shadow: 0 24px 60px rgba(0,0,0,.5); --shadow-sm: 0 6px 18px rgba(0,0,0,.32);
  --glass: rgba(6,26,46,.72);
  color-scheme: dark;
}
:root[data-theme=light] {
  --bg: #F6F8FB; --surface-1: #FFFFFF; --surface-2: #FAFBFD; --surface-3: #FFFFFF; --elev: #FFFFFF; --field: #F5F7FA;
  --hover: rgba(15,35,60,.045); --active: rgba(30,95,160,.08); --line: #E8ECF2; --line-2: #D9E0E8;
  --tx: #16263A; --tx-2: #4A5A6E; --tx-3: #7A8799;
  --accent: #2B5F9E; --accent-2: #3E7FB8; --accent-ink: #FFFFFF; --accent-soft: rgba(43,95,158,.08);
  --grad: linear-gradient(0deg, var(--accent), var(--accent));
  --danger: #C2414F; --ok: #2E8B57; --warn: #B7791F; --busy: #C2414F;
  --stage: #EEF2F6; --shadow: 0 18px 44px rgba(16,38,64,.12); --shadow-sm: 0 2px 8px rgba(16,38,64,.07);
  --glass: rgba(255,255,255,.85);
  color-scheme: light;
}
:root[data-brand=geek], :root[data-brand=geek][data-theme=dark] {
  --bg: #07060d; --surface-1: #0d0b17; --surface-2: #110e1e; --surface-3: #141123; --elev: #1d1932; --field: #0f0c1b;
  --hover: rgba(180,160,255,.07); --active: rgba(139,92,246,.2); --line: rgba(180,160,255,.09); --line-2: rgba(180,160,255,.17);
  --tx: #ECE8FF; --tx-2: #B9B2DA; --tx-3: #7d76a3;
  --accent: #39FF88; --accent-2: #00E5FF; --accent-ink: #07060d; --accent-soft: rgba(57,255,136,.12);
  --grad: linear-gradient(135deg, #8B5CF6 0%, #00E5FF 100%);
  --stage: #050409; --glass: rgba(13,11,23,.75);
}
:root[data-brand=geek][data-theme=light] {
  --bg: #ECE9F7; --surface-1: #FFFFFF; --surface-2: #F6F4FD; --surface-3: #FFFFFF; --elev: #FFFFFF; --field: #F3F1FB;
  --hover: rgba(40,20,90,.05); --active: rgba(124,58,237,.10); --line: rgba(40,20,90,.08); --line-2: rgba(40,20,90,.16);
  --tx: #1A1530; --tx-2: #4B4470; --tx-3: #7B74A0;
  --accent: #7C3AED; --accent-2: #0891B2; --accent-ink: #fff; --accent-soft: rgba(124,58,237,.10);
  --grad: linear-gradient(135deg, #7C3AED 0%, #06B6D4 100%);
  --stage: #120f1f; --glass: rgba(255,255,255,.8);
}
:root { --r: 12px; --r-lg: 18px; --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; --mono: 'Space Mono', ui-monospace, monospace;
  --ease: cubic-bezier(.2,.8,.2,1); --tb: 56px; --rail: 72px; --side: 272px; }

/* ================= base ================= */
* { box-sizing: border-box }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--tx); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; overflow: hidden }
body { transition: background .25s var(--ease), color .25s var(--ease) }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0 }
input, textarea, select { font: inherit; color: inherit }
a { color: var(--accent) }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0) }
::-webkit-scrollbar { width: 10px; height: 10px } ::-webkit-scrollbar-track { background: transparent }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box }
kbd { font: 600 11px var(--mono); padding: 2px 6px; border-radius: 6px; background: var(--hover); border: 1px solid var(--line-2); color: var(--tx-2); white-space: nowrap }
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation: none !important; transition: none !important }

/* ================= éléments ================= */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 10px 16px; font-weight: 600;
  background: var(--elev); border: 1px solid var(--line-2); color: var(--tx); transition: transform .12s var(--ease), background .15s, border-color .15s, filter .15s; text-decoration: none }
.btn:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px) }
.btn.primary { background: var(--accent); border: 0; color: var(--accent-ink); box-shadow: 0 1px 2px rgba(0,0,0,.08) }
.btn.primary:hover { filter: brightness(1.06) }
.btn.ghost { background: transparent }
.btn.danger { background: var(--danger); border: 0; color: #fff }
.btn.block { width: 100% } .btn.lg { padding: 13px 18px; font-size: 15px; border-radius: 12px }
.btn:disabled { opacity: .6; cursor: default; transform: none; filter: none }
.btn.google { background: var(--surface-1); color: var(--tx); border: 1px solid var(--line-2) }
.btn.google:hover { background: var(--hover) }
.btn svg.i { width: 18px; height: 18px }
.ibtn { position: relative; width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; color: var(--tx-2); flex: none; transition: background .15s, color .15s }
.ibtn:hover { background: var(--hover); color: var(--tx) }
.ibtn.on { background: var(--accent-soft); color: var(--accent) }
.ibtn.off { color: var(--danger) } .ibtn.danger { color: var(--danger) } .ibtn.danger:hover { background: color-mix(in srgb, var(--danger) 14%, transparent) }
.ibtn.sm { width: 28px; height: 28px } .ibtn.sm svg.i { width: 16px; height: 16px }
.ibtn .cnt { position: absolute; bottom: 2px; right: 2px; font: 700 9px var(--font); background: var(--surface-3); border-radius: 6px; padding: 0 3px; color: var(--tx-2) }
.linkbtn { color: var(--accent); font-weight: 600; font-size: 13px } .linkbtn:hover { text-decoration: underline }
.input { width: 100%; background: var(--field); border: 1px solid var(--line-2); border-radius: 10px; padding: 11px 13px; outline: none; transition: border-color .15s, box-shadow .15s }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft) }
.input.sm { padding: 8px 11px; width: auto; min-width: 120px } .input.xs { padding: 4px 8px; font-size: 12px; width: auto; min-width: 220px; border-radius: 7px }
textarea.input { resize: vertical }
.sel { width: 100%; background: var(--field); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 10px; outline: none }
.sel.sm { width: auto; padding: 5px 8px; font-size: 13px; max-width: 220px }
.field { display: block; margin-bottom: 14px }
.field > span { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--tx-2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em }
.field > span svg.i { width: 14px; height: 14px }
.hint { color: var(--tx-3); font-size: 12.5px; margin: 6px 0 0 } .hint.center, .center { text-align: center }
.err { color: var(--danger); font-size: 13px; min-height: 18px; margin: 4px 0 8px }
.row2 { display: flex; gap: 10px; align-items: center } .row2.center { justify-content: center; margin-top: 16px }
.sp { flex: 1 }
.tabs { display: flex; gap: 4px; background: var(--field); padding: 4px; border-radius: 12px; margin-bottom: 16px; flex-wrap: wrap; border: 1px solid var(--line) }
.tabs button { flex: 1; padding: 8px 12px; border-radius: 9px; color: var(--tx-2); font-weight: 600; font-size: 13px; white-space: nowrap; transition: background .15s, color .15s }
.tabs button[aria-selected=true] { background: var(--surface-1); color: var(--tx); box-shadow: var(--shadow-sm) }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; margin: 10px 0; font-size: 13px; color: var(--tx-2) }
.switch input { accent-color: var(--accent); width: 16px; height: 16px }
.switch.row { justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0 }
.switch.row .sw-t { display: flex; flex-direction: column } .switch.row b { color: var(--tx); font-weight: 600 } .switch.row small { color: var(--tx-3) }
.switch.row input { appearance: none; width: 40px; height: 22px; border-radius: 22px; background: var(--line-2); position: relative; transition: background .2s; flex: none }
.switch.row input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.3) }
.switch.row input:checked { background: var(--accent) } .switch.row input:checked::after { transform: translateX(18px) }
.chips { display: flex; flex-wrap: wrap; gap: 6px }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--field); border: 1px solid var(--line-2); font-size: 12.5px; color: var(--tx-2); transition: all .15s }
.chip i { width: 10px; height: 10px; border-radius: 50% }
.chip[aria-pressed=true] { background: var(--accent-soft); border-color: var(--accent); color: var(--tx) }
.chip.lock { opacity: .7; cursor: default }
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; vertical-align: middle }
.pill.green { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok) } .pill.red { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger) }
.pill.amber { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn) } .pill.accent { background: var(--accent-soft); color: var(--accent); margin-top: 4px }
.badge { background: var(--danger); color: #fff; border-radius: 9px; font-size: 11px; font-weight: 700; padding: 0 6px; min-width: 18px; text-align: center; line-height: 18px }
.nb { position: absolute; top: -3px; right: -3px; background: var(--danger); color: #fff; font: 700 10.5px/17px var(--font); min-width: 17px; height: 17px; border-radius: 9px; padding: 0 4px; text-align: center; border: 2px solid var(--surface-1); font-style: normal }
.udot { width: 8px; height: 8px; border-radius: 50%; background: var(--tx); display: inline-block; flex: none }
.tag { font: 700 9.5px var(--mono); text-transform: uppercase; letter-spacing: .06em; padding: 1px 5px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); margin-left: 6px; vertical-align: middle }
.tag.ghost { background: var(--hover); color: var(--tx-3) }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; font-style: normal }
.st-online { background: var(--ok) } .st-busy { background: var(--busy) } .st-away { background: var(--warn) }
.st-dnd { background: var(--danger); position: relative } .st-dnd::after { content: ""; position: absolute; left: 2px; right: 2px; top: 4px; height: 2px; background: #fff; border-radius: 1px }
.av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #061A2E; flex: none; font-size: 14px; user-select: none; text-transform: uppercase; position: relative }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50% }
.av .dot { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border: 2.5px solid var(--surface-2) }
.av.xs { width: 22px; height: 22px; font-size: 10px } .av.xs .dot { width: 9px; height: 9px; border-width: 2px }
.av.sm { width: 30px; height: 30px; font-size: 12px } .av.lg { width: 44px; height: 44px; font-size: 16px }
.av.xl, .av.big { width: 88px; height: 88px; font-size: 32px } .av.xl .dot, .av.big .dot { width: 20px; height: 20px; border-width: 4px }
.av.speaking { box-shadow: 0 0 0 2px var(--surface-2), 0 0 0 4px var(--ok) }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block }
.spinner.sm { width: 16px; height: 16px; border-width: 2px; vertical-align: -3px }
@keyframes spin { to { transform: rotate(360deg) } }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 400; pointer-events: none; width: min(460px, calc(100% - 32px)) }
.toast { background: var(--elev); border: 1px solid var(--line-2); padding: 11px 16px; border-radius: 12px; box-shadow: var(--shadow); font-size: 13.5px; animation: toastIn .25s var(--ease); pointer-events: auto }
.toast.err { border-color: color-mix(in srgb, var(--danger) 55%, transparent) }
.toast.out { opacity: 0; transform: translateY(6px); transition: all .25s }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.98) } }
.empty { flex: 1; display: grid; place-items: center; color: var(--tx-3); text-align: center; padding: 24px; gap: 6px }
.empty.sm { padding: 18px 14px; font-size: 13px; display: flex; flex-direction: column; align-items: center } .empty small { color: var(--tx-3) }
.big-ico { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; margin: 0 auto 14px; background: var(--accent-soft); color: var(--accent); font-size: 30px }
.big-ico svg.i { width: 30px; height: 30px } .big-ico.sm { width: 44px; height: 44px; border-radius: 14px; margin-bottom: 8px } .big-ico.sm svg.i { width: 22px; height: 22px }
.banner { margin: 12px 20px 0; padding: 10px 14px; border-radius: 10px; font-size: 13px }
.banner.warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--tx) }
.skeleton { padding: 18px } .sk-row { display: flex; gap: 12px; margin: 18px 0 }
.sk-av { width: 40px; height: 40px; border-radius: 50%; background: var(--hover); flex: none }
.sk-row div { flex: 1 } .sk-l { display: block; height: 11px; border-radius: 6px; background: var(--hover); margin: 6px 0; animation: pulse 1.4s ease-in-out infinite }
@keyframes pulse { 50% { opacity: .45 } }

/* ================= authentification ================= */
.auth { position: fixed; inset: 0; display: grid; grid-template-columns: 1.15fr 1fr; background: var(--surface-1); overflow: auto }
.auth-hero { position: relative; overflow: hidden; background: #061A2E; color: #E8EEF6; display: flex; align-items: center; padding: 56px }
:root[data-theme=light] .auth-hero { background: linear-gradient(160deg, #F2F6FB 0%, #E6EEF7 100%); color: var(--tx); border-right: 1px solid var(--line) }
:root[data-theme=light] .auth-hero p, :root[data-theme=light] .hero-feats li { color: var(--tx-2) }
:root[data-theme=light] .auth-hero .kicker { color: var(--accent) } :root[data-theme=light] .hero-feats svg.i { color: var(--accent) }
:root[data-theme=light] .orb { opacity: .16 !important } :root[data-theme=light] .gridlines { background-image: linear-gradient(rgba(16,38,64,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(16,38,64,.05) 1px, transparent 1px) }
:root[data-theme=light] .mock { background: rgba(255,255,255,.7); border-color: var(--line-2); box-shadow: 0 24px 50px rgba(16,38,64,.12) }
:root[data-theme=light] .hero-logo { box-shadow: 0 2px 10px rgba(16,38,64,.08); border: 1px solid var(--line) }
:root[data-brand=geek] .auth-hero { background: #0b0915 }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .7; animation: drift 18s ease-in-out infinite alternate }
.o1 { width: 520px; height: 520px; background: var(--accent); left: -140px; top: -120px; opacity: .22 }
.o2 { width: 460px; height: 460px; background: #4764AC; right: -120px; bottom: -140px; animation-delay: -6s; opacity: .3 }
.o3 { width: 300px; height: 300px; background: var(--accent-2); right: 20%; top: 18%; animation-delay: -12s; opacity: .15 }
:root[data-brand=geek] .o2 { background: #8B5CF6 }
@keyframes drift { to { transform: translate(40px, -30px) scale(1.08) } }
.gridlines { position: absolute; inset: 0; background-image: linear-gradient(rgba(191,233,250,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(191,233,250,.05) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse at 40% 50%, #000 30%, transparent 75%) }
.hero-in { position: relative; max-width: 560px }
.hero-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 30px }
.hero-logo { background: #fff; border-radius: 14px; padding: 8px 14px; display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.25) }
.hero-logo img { height: 40px; max-width: 160px; object-fit: contain }
.hero-x { font-size: 20px; opacity: .6 }
.kicker { font: 700 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent) }
.auth-hero .kicker { color: #6FD6C8 } :root[data-brand=geek] .auth-hero .kicker { color: #39FF88 }
.auth-hero h1 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.08; letter-spacing: -.03em; margin: 12px 0 14px; font-weight: 700 }
:root[data-brand=geek] .auth-hero h1 { font-family: 'Press Start 2P', var(--mono); font-size: clamp(20px, 2.2vw, 30px); line-height: 1.4; letter-spacing: 0 }
.auth-hero p { color: #B8C4D6; font-size: 16px; max-width: 470px; margin: 0 }
.mock { position: relative; margin: 34px 0 26px; display: grid; grid-template-columns: 1.3fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; height: 210px; max-width: 470px;
  padding: 10px; border-radius: 18px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(8px); box-shadow: 0 30px 60px rgba(0,0,0,.35); transform: perspective(900px) rotateY(-8deg) rotateX(4deg) }
.mock-tile { border-radius: 12px; position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 8px }
.mock-tile span { font-size: 11px; font-weight: 600; background: rgba(0,0,0,.45); padding: 2px 8px; border-radius: 6px; color: #fff }
.t1 { grid-row: 1 / 3; background: radial-gradient(circle at 50% 42%, #e9c7aa 0 14%, transparent 15%), radial-gradient(ellipse at 50% 92%, #34506f 0 34%, transparent 35%), linear-gradient(135deg, #5d7896, #46617f); box-shadow: inset 0 0 0 2px var(--ok) }
.t2 { background: radial-gradient(circle at 50% 40%, #dcb79a 0 16%, transparent 17%), radial-gradient(ellipse at 50% 98%, #6d5566 0 38%, transparent 39%), linear-gradient(135deg, #8aa7b5, #61808f) }
.t3 { background: linear-gradient(135deg, #22324a, #10203a); display: grid; place-items: center }
.mock-bar { position: absolute; left: 50%; bottom: -16px; transform: translateX(-50%); display: flex; gap: 6px; background: #0F2E4E; padding: 6px 10px; border-radius: 999px; box-shadow: 0 8px 20px rgba(0,0,0,.3) }
.mock-bar i { width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,.14) } .mock-bar i.r { background: #C2414F; width: 30px; border-radius: 10px }
.hero-feats { list-style: none; padding: 0; margin: 34px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; max-width: 470px }
.hero-feats li { display: flex; align-items: center; gap: 9px; color: #D9E3EF; font-size: 13.5px } .hero-feats svg.i { width: 18px; height: 18px; color: #6FD6C8 }
.auth-side { position: relative; display: grid; place-items: center; padding: 40px 28px; background: var(--surface-1) }
.auth-theme { position: absolute; top: 18px; right: 18px }
.auth-card { width: min(410px, 100%); animation: rise .45s var(--ease) }
@keyframes rise { from { opacity: 0; transform: translateY(10px) } }
.auth-head h2 { font-size: 26px; letter-spacing: -.02em; margin: 0 0 4px } .sub { color: var(--tx-2); margin: 0 0 22px }
.auth-card .btn.google { margin-bottom: 4px }
.or { display: flex; align-items: center; gap: 12px; color: var(--tx-3); font-size: 12px; margin: 16px 0; text-transform: uppercase; letter-spacing: .1em }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-2) }
.auth-fields { min-height: 150px }
.foot { margin-top: 20px; font-size: 13px; color: var(--tx-3); text-align: center }
.auth-wait, .auth-done { text-align: center } .auth-wait .spinner { margin-bottom: 18px }
.auth-done h2, .auth-wait h2 { margin: 0 0 8px; font-size: 24px }
.colors { display: flex; gap: 8px; flex-wrap: wrap }
.colors button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; transition: transform .12s }
.colors button[aria-pressed=true] { border-color: var(--tx); transform: scale(1.14) }

/* ================= coquille ================= */
.app { display: grid; grid-template-columns: var(--rail) var(--side) 1fr; grid-template-rows: var(--tb) 1fr; height: 100dvh; background: var(--bg) }
.app.offline::after { content: "Reconnexion…"; position: fixed; top: calc(var(--tb) + 8px); left: 50%; transform: translateX(-50%); background: var(--warn); color: #000; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; z-index: 50 }
.topbar { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr minmax(240px, 560px) 1fr; align-items: center; gap: 12px; padding: 0 12px 0 14px; background: var(--surface-1); border-bottom: 1px solid var(--line); z-index: 20 }
.tb-l { display: flex; align-items: center; gap: 8px; min-width: 0 }
.tb-brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--tx); min-width: 0 }
.tb-brand img { width: 30px; height: 30px; border-radius: 9px } .tb-brand b { font-size: 15px; letter-spacing: -.01em }
.tb-sep { color: var(--tx-3) } .tb-ws { color: var(--tx-2); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.tb-c { display: flex; justify-content: center }
.searchbox { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 12px; border-radius: 10px; background: var(--field); border: 1px solid var(--line); color: var(--tx-3); transition: border-color .15s, background .15s }
.searchbox:hover { border-color: var(--line-2); color: var(--tx-2) }
.searchbox span { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis } .searchbox svg.i { width: 17px; height: 17px }
.tb-r { display: flex; align-items: center; justify-content: flex-end; gap: 4px }
.tb-btn svg.i { width: 19px; height: 19px }
.me-btn { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: 999px; margin-left: 4px; transition: background .15s }
.me-btn:hover, .me-btn[aria-expanded=true] { background: var(--hover) } .me-btn .av .dot { border-color: var(--surface-1) } .me-btn svg.i { width: 16px; height: 16px; color: var(--tx-3) }
.me-n { font-weight: 600 }
.callpill { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--tx); font-weight: 600; font-size: 13px; margin-right: 6px; animation: rise .3s }
.callpill .timer { font: 600 12px var(--mono); color: var(--tx-2) }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; animation: livep 1.6s ease-in-out infinite; flex: none }
.live.wait { background: var(--warn) } @keyframes livep { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--ok) 0%, transparent); opacity: .7 } }
.burger { display: none }

.rail { background: var(--surface-1); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 0; border-right: 1px solid var(--line); overflow-y: auto; overflow-x: visible }
.srv, .rail .tool { position: relative; width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 16px; transition: border-radius .2s var(--ease), background .2s, transform .15s }
.srv .sp-ico { width: 48px; height: 48px; border-radius: inherit; transition: inherit }
.srv:hover .sp-ico, .srv.active .sp-ico { border-radius: 14px } .srv:not(.active) .sp-ico { border-radius: 50% }
.srv::before { content: ""; position: absolute; left: -12px; width: 5px; border-radius: 0 4px 4px 0; background: var(--tx); height: 0; transition: height .2s var(--ease) }
.srv.unread::before { height: 8px } .srv:hover::before { height: 20px } .srv.active::before { height: 36px }
.live-dot { position: absolute; bottom: -2px; right: -2px; width: 14px; height: 14px; border-radius: 50%; background: var(--ok); border: 3px solid var(--surface-1) }
.rail .sep { width: 32px; height: 2px; background: var(--line-2); border-radius: 2px; flex: none }
.rail-sp { flex: 1 }
.rail .tool { border-radius: 50%; background: var(--surface-2); color: var(--tx-2) }
.rail .tool:hover { border-radius: 16px; background: var(--active); color: var(--accent) }
.rail-tip { position: fixed; left: calc(var(--rail) + 6px); transform: translateY(-50%); background: var(--elev); color: var(--tx); font-weight: 600; font-size: 13px; padding: 6px 10px; border-radius: 8px; box-shadow: var(--shadow-sm); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s; z-index: 60; border: 1px solid var(--line) }
.srv:hover .rail-tip, .rail .tool:hover .rail-tip { opacity: 1 }
.sp-ico { display: grid; place-items: center; background: #fff; overflow: hidden; color: #0A2540; font-weight: 700; flex: none }
.sp-ico img { width: 78%; height: 78%; object-fit: contain }
.sp-ico.home { background: var(--surface-3) } .sp-ico.home img { width: 100%; height: 100% }
.sp-ico.xs { width: 22px; height: 22px; border-radius: 6px } .sp-ico.sm { width: 30px; height: 30px; border-radius: 9px; box-shadow: 0 0 0 1px var(--line) }
.sp-ico.xl { width: 72px; height: 72px; border-radius: 20px; box-shadow: var(--shadow-sm); margin-bottom: 10px }

.side { background: var(--surface-2); display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--line) }
.side-h { position: relative; border-bottom: 1px solid var(--line) }
.side-cover { height: 84px; display: grid; place-items: center; background: #fff; position: relative; overflow: hidden }
.side-cover::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--accent); opacity: .8 }
.side-cover img { max-height: 50px; max-width: 72%; object-fit: contain }
.side-t { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 10px 12px 16px }
.side-t b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.side-t small { display: block; color: var(--tx-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.side .scroll { flex: 1; overflow-y: auto; padding: 8px }
.cat { display: flex; align-items: center; justify-content: space-between; padding: 14px 8px 6px; font: 700 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--tx-3) }
.chan { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 10px; border-radius: 9px; color: var(--tx-3); text-align: left; position: relative; transition: background .12s, color .12s; margin: 1px 0 }
.chan:hover { background: var(--hover); color: var(--tx-2) }
.chan.active { background: var(--active); color: var(--tx); font-weight: 600 }
.chan.unread { color: var(--tx); font-weight: 600 }
.chan .hash { font: 700 17px var(--mono); width: 20px; text-align: center; opacity: .75 }
.chan.active .hash, .chan.active svg.i { color: var(--accent); opacity: 1 }
.chan .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.chan .count { font: 600 11px var(--mono); color: var(--tx-2); background: var(--hover); padding: 1px 7px; border-radius: 999px }
.chan .join-hint { font-size: 11px; color: var(--accent); opacity: 0; transition: opacity .12s; font-weight: 600 }
.chan.room:hover .join-hint { opacity: 1 }
.vmembers { margin: 2px 0 6px 28px; display: flex; flex-direction: column; gap: 1px; border-left: 1px solid var(--line-2); padding-left: 8px }
.vm { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 7px; color: var(--tx-2); font-size: 13px }
.vm .vm-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.vm .ic { display: flex; gap: 4px; color: var(--tx-3); align-items: center } .vm .ic svg.i { width: 14px; height: 14px } .vm .ic .off { color: var(--danger) }
.side-foot { display: flex; align-items: center; gap: 8px; padding: 14px 10px 6px; color: var(--tx-3); font-size: 12px }
.side-foot .dot { width: 8px; height: 8px }
.voicebar { border-top: 1px solid var(--line); padding: 10px 12px 12px; background: var(--surface-1) }
.vb-st { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px }
.vb-st.ok { color: var(--ok) } .vb-st.wait { color: var(--warn) } .vb-st svg.i { width: 16px; height: 16px } .vb-st .timer { margin-left: auto; font: 600 11.5px var(--mono); color: var(--tx-3) }
.vb-rn { color: var(--tx-2); font-size: 12.5px; margin: 2px 0 8px; text-align: left; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.vb-rn:hover { text-decoration: underline; color: var(--tx) }
.vb-b { display: flex; gap: 2px; justify-content: space-between }
.vb-b .ibtn { width: 40px; background: var(--hover) } .vb-b .ibtn.off { background: color-mix(in srgb, var(--danger) 14%, transparent) }

.main { display: flex; min-width: 0; min-height: 0; background: var(--surface-3) }
.pane { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0 }
.pane-h { height: 50px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 16px; border-bottom: 1px solid var(--line); background: var(--surface-3) }
.pane-h .hash { font: 700 20px var(--mono); color: var(--tx-3) }
.pane-h h2 { font-size: 15px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.pane-h .desc { color: var(--tx-3); font-size: 13px; border-left: 1px solid var(--line-2); padding-left: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 }

/* ================= discussion ================= */
.msgs { flex: 1; overflow-y: auto; padding: 12px 0 8px; overflow-anchor: none }
.welcome { padding: 28px 22px 18px }
.welcome .big { width: 68px; height: 68px; border-radius: 22px; background: var(--accent-soft); display: grid; place-items: center; font: 700 32px var(--mono); color: var(--accent); margin-bottom: 12px }
.welcome h3 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.02em } .welcome p { color: var(--tx-2); margin: 0 }
:root[data-brand=geek] .welcome h3 { font-family: 'Press Start 2P', var(--mono); font-size: 16px; line-height: 1.6; letter-spacing: 0 }
.daysep { display: flex; align-items: center; gap: 10px; margin: 18px 22px 6px; color: var(--tx-3); font-size: 12px; font-weight: 600 }
.daysep::before, .daysep::after { content: ""; flex: 1; height: 1px; background: var(--line-2) }
.msg { position: relative; padding: 2px 22px 2px 76px; min-height: 24px; transition: background .12s }
.msg.head { margin-top: 14px; padding-top: 4px }
.msg:hover { background: var(--hover) }
.msg .av { position: absolute; left: 22px; top: 6px; width: 40px; height: 40px }
.msg .meta { display: flex; align-items: baseline; gap: 8px }
.msg .meta b { font-weight: 650 } .msg .meta time { font-size: 11px; color: var(--tx-3) }
.msg .hov-time { position: absolute; left: 20px; width: 46px; text-align: center; top: 5px; font-size: 10px; color: var(--tx-3); display: none }
.msg:not(.head):hover .hov-time { display: block }
.msg .body { white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; color: var(--tx); line-height: 1.5 }
.msg .body code { font: 12.5px var(--mono); background: var(--field); border: 1px solid var(--line); padding: 1px 5px; border-radius: 5px }
.msg .body pre { font: 12.5px/1.5 var(--mono); background: var(--field); border: 1px solid var(--line-2); padding: 10px 12px; border-radius: 10px; overflow-x: auto; margin: 6px 0; white-space: pre }
.msg .body .mention { background: var(--accent-soft); color: var(--accent); border-radius: 4px; padding: 0 3px; font-weight: 600 }
.msg.mentioned { background: color-mix(in srgb, var(--warn) 6%, transparent); box-shadow: inset 2px 0 var(--warn) }
.msg.flash { animation: flash 2s var(--ease) }
@keyframes flash { 0%, 30% { background: var(--accent-soft) } }
.msg .edited { font-size: 10.5px; color: var(--tx-3); margin-left: 4px }
.msg .reply { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--tx-3); margin: 0 0 2px; overflow: hidden; white-space: nowrap; cursor: pointer }
.msg .reply::before { content: ""; width: 28px; height: 10px; border: 2px solid var(--line-2); border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; margin-left: -40px; margin-top: 8px; flex: none }
.msg .reply span { overflow: hidden; text-overflow: ellipsis }
.compact .msg.head { margin-top: 6px } .compact .msg .av { width: 28px; height: 28px; top: 4px } .compact .msg { padding-left: 62px }
.files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px }
.files img { max-width: min(420px, 100%); max-height: 320px; border-radius: 10px; display: block; cursor: zoom-in; border: 1px solid var(--line) }
.filecard { display: flex; align-items: center; gap: 10px; background: var(--field); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; max-width: 360px; text-decoration: none; color: var(--tx) }
.filecard small { color: var(--tx-3); display: block }
.reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px }
.react { display: inline-flex; align-items: center; gap: 4px; background: var(--field); border: 1px solid var(--line-2); border-radius: 8px; padding: 1px 7px; font-size: 13px; transition: transform .1s }
.react:hover { transform: translateY(-1px) } .react.mine { border-color: var(--accent); background: var(--accent-soft) } .react b { font-size: 12px; color: var(--tx-2) }
.actions { position: absolute; right: 16px; top: -16px; display: none; background: var(--elev); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow-sm); z-index: 2; padding: 2px }
.msg:hover .actions { display: flex }
.actions button { width: 32px; height: 30px; display: grid; place-items: center; color: var(--tx-2); border-radius: 8px }
.actions button:hover { color: var(--tx); background: var(--hover) } .actions svg.i { width: 17px; height: 17px }
.loadmore { display: block; margin: 8px auto; color: var(--accent); font-size: 13px }
.composer { padding: 0 18px 18px; flex: none }
.typing { height: 20px; font-size: 12px; color: var(--tx-2); padding: 2px 4px }
.replybar { display: flex; align-items: center; gap: 8px; background: var(--field); border: 1px solid var(--line-2); border-bottom: 0; border-radius: 12px 12px 0 0; padding: 7px 12px; font-size: 13px; color: var(--tx-2) }
.replybar b { color: var(--tx) } .replybar button { margin-left: auto }
.pending { display: flex; gap: 8px; flex-wrap: wrap; background: var(--field); border: 1px solid var(--line-2); border-bottom: 0; padding: 10px; border-radius: 12px 12px 0 0 }
.pending .pf { position: relative; background: var(--surface-3); border-radius: 8px; padding: 6px; font-size: 12px; max-width: 160px; border: 1px solid var(--line) }
.pending .pf img { max-width: 140px; max-height: 90px; display: block; border-radius: 5px }
.pending .pf button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--danger); color: #fff; font-size: 12px; line-height: 20px }
.box { display: flex; align-items: flex-end; gap: 2px; background: var(--field); border-radius: 14px; padding: 5px 6px; border: 1px solid var(--line-2); transition: border-color .15s, box-shadow .15s }
.box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft) }
.replybar + .box, .pending + .box { border-radius: 0 0 14px 14px }
.box textarea { flex: 1; background: none; border: 0; outline: none; resize: none; padding: 8px 4px; max-height: 220px; min-height: 22px; line-height: 1.45 }
.emojis { position: fixed; background: var(--elev); border: 1px solid var(--line-2); border-radius: 14px; padding: 8px; display: grid; grid-template-columns: repeat(8, 34px); gap: 2px; box-shadow: var(--shadow); z-index: 220; animation: popIn .16s var(--ease) }
.emojis button { height: 34px; font-size: 20px; border-radius: 8px } .emojis button:hover { background: var(--hover); transform: scale(1.12) }
.members { width: 248px; flex: none; background: var(--surface-2); border-left: 1px solid var(--line); overflow-y: auto; padding: 6px 8px }
.member { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 9px; transition: background .12s }
.member:hover { background: var(--hover) } .member.dim { opacity: .6 }
.member .av .dot, .person .av .dot { border-color: var(--surface-2) }
.mb { min-width: 0; flex: 1 } .mn { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.mb small { display: block; color: var(--tx-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.drop { position: absolute; inset: 8px; background: color-mix(in srgb, var(--surface-3) 88%, transparent); display: grid; place-items: center; z-index: 30; border: 3px dashed var(--accent); border-radius: 16px; font-size: 20px; font-weight: 700; pointer-events: none }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.9); display: grid; place-items: center; z-index: 300; cursor: zoom-out; padding: 20px; animation: fade .2s }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px }

/* ================= menus, modales ================= */
.pop-menu { position: fixed; z-index: 250; min-width: 230px; max-width: calc(100vw - 16px); background: var(--elev); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; animation: popIn .16s var(--ease) }
.pop-menu.wide { width: 380px } .pop-menu.out { opacity: 0; transform: translateY(-4px); transition: all .14s }
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(.98) } }
.mh { font: 700 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--tx-3); padding: 8px 10px 4px }
.mh small { font: 500 11px var(--font); letter-spacing: 0; text-transform: none }
.mi { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 9px; text-align: left; color: var(--tx); transition: background .1s }
.mi:hover, .mi:focus-visible { background: var(--hover) } .mi svg.i { width: 17px; height: 17px; color: var(--tx-2) }
.mi.danger, .mi.danger svg.i { color: var(--danger) }
.mi-sp { width: 17px } .mi-l { flex: 1 } .mi-r { color: var(--accent); display: flex } .mi-r svg.i { color: var(--accent) }
.mi .dot { width: 10px; height: 10px; margin: 0 3px }
.msep { height: 1px; background: var(--line); margin: 6px 4px }
.me-head { display: flex; gap: 12px; align-items: center; padding: 10px; margin-bottom: 2px }
.me-head b { display: block } .me-head small { display: block; color: var(--tx-3) }
.me-head .av .dot { border-color: var(--elev) }
.inbox { max-height: 70vh; overflow-y: auto }
.ib-it { display: flex; gap: 10px; width: 100%; text-align: left; padding: 9px 10px; border-radius: 10px }
.ib-it:hover { background: var(--hover) } .ib-b { flex: 1; min-width: 0 }
.ib-h { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px } .ib-h span { color: var(--tx-3); white-space: nowrap }
.ib-t { color: var(--tx-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical }
.overlay { position: fixed; inset: 0; background: rgba(2,8,16,.55); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 100; padding: 16px; overflow: auto; animation: fade .18s }
:root[data-theme=light] .overlay { background: rgba(10,37,64,.32) }
.overlay.out { opacity: 0; transition: opacity .16s; pointer-events: none }
@keyframes fade { from { opacity: 0 } }
.modal { background: var(--surface-1); border: 1px solid var(--line-2); border-radius: 20px; width: min(880px, 100%); box-shadow: var(--shadow); max-height: calc(100dvh - 32px); overflow: auto; animation: modalIn .22s var(--ease) }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.985) } }
.modal.sm { width: min(480px, 100%) } .modal.xl { width: min(980px, 100%) }
.modal > header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 0; gap: 12px }
.modal > header h3 { margin: 0; font-size: 18px; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px }
.modal .bd { padding: 18px 20px 20px }

/* palette */
.pal-modal { width: min(640px, 100%); align-self: start; margin-top: 10vh; border-radius: 18px; overflow: hidden }
.pal-modal > header { display: none }
.pal-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line) }
.pal-top svg.i { color: var(--tx-3) }
.pal-in { flex: 1; background: none; border: 0; outline: none; font-size: 16px }
.pal-list { max-height: min(60vh, 460px); overflow-y: auto; padding: 6px }
.pal-g { font: 700 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--tx-3); padding: 10px 10px 4px }
.pal-it { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border-radius: 10px; text-align: left }
.pal-it.sel { background: var(--active) }
.pal-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--field); color: var(--tx-2); flex: none }
.pal-ico .hash { font: 700 15px var(--mono) } .pal-ico svg.i { width: 16px; height: 16px } .pal-ico .av, .pal-ico .sp-ico { width: 24px; height: 24px }
.pal-l { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis } .pal-s { color: var(--tx-3); font-size: 12px; white-space: nowrap; max-width: 40%; overflow: hidden; text-overflow: ellipsis }
.pal-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--tx-3); font-size: 12px } .pal-foot kbd { margin-right: 2px }
.sc-grid { display: grid; gap: 16px } .sc-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px }
.sc-row kbd { margin-left: 4px }
.welcome-modal { text-align: center } .welcome-modal h2 { margin: 4px 0 6px; font-size: 24px } .wm-hero { display: flex; justify-content: center }
.wm-steps { display: grid; gap: 10px; margin: 20px 0 }
.wm-step { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; text-align: left; gap: 0 12px; padding: 12px 14px; border-radius: 14px; background: var(--field); border: 1px solid var(--line); transition: border-color .15s, transform .15s }
.wm-step:hover { border-color: var(--accent); transform: translateY(-1px) }
.wm-step .n { grid-row: 1 / 3; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700 }
.wm-step small { color: var(--tx-3) }

/* ================= lobby ================= */
.lobby-modal { width: min(1000px, 100%) }
.lobby-t { display: flex; align-items: center; gap: 10px }
.lobby { display: grid; grid-template-columns: 1.35fr 1fr; gap: 22px }
.preview { position: relative; aspect-ratio: 16/9; background: #1b2838; border-radius: 16px; overflow: hidden; display: grid; place-items: center; box-shadow: var(--shadow-sm) }
.preview video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover } .preview video.mirror { transform: scaleX(-1) }
.pv-off { display: flex; flex-direction: column; align-items: center; gap: 10px; color: #c9d3df; font-size: 13px }
.pv-name { position: absolute; left: 12px; top: 12px; display: flex; align-items: center; gap: 6px; background: rgba(0,0,0,.5); backdrop-filter: blur(6px); color: #fff; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 8px }
.pv-name svg.i { width: 15px; height: 15px; color: #F07085 }
.mic-ring { position: absolute; inset: 0; border-radius: 16px; pointer-events: none; box-shadow: inset 0 0 0 calc(var(--lvl, 0) * 6px) color-mix(in srgb, var(--ok) 85%, transparent); transition: box-shadow .08s }
.preview .pbar { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 10px }
.preview .busy { position: absolute; top: 12px; right: 12px; display: flex; gap: 8px; align-items: center; font-size: 12px; background: rgba(0,0,0,.6); color: #fff; padding: 5px 10px; border-radius: 8px }
.lobby-who { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--tx-2); font-size: 13px }
.stack { display: flex } .stack .av { margin-left: -8px; box-shadow: 0 0 0 2px var(--surface-1) } .stack .av:first-child { margin-left: 0 }
.lobby-r { display: flex; flex-direction: column; min-width: 0 }
.lobby-panel { flex: 1; max-height: 380px; overflow-y: auto; margin-bottom: 14px; padding-right: 4px }
.devs .field.dev { margin-bottom: 12px }

/* ================= appel ================= */
:root[data-theme=dark] .call { --tx: #E8EEF6; --tx-2: #B8C4D6; --tx-3: #8796ab; --hover: rgba(255,255,255,.07); --line: rgba(255,255,255,.08); --line-2: rgba(255,255,255,.14); --elev: #15263a; --field: #0d1b2b }
.call {
  flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--stage); color: var(--tx); position: relative }
:root[data-brand=geek] .call { --elev: #1d1932; --field: #110e1e }
.call-h { height: 56px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 16px; gap: 10px }
.ch-l { display: flex; align-items: center; gap: 12px; min-width: 0 } .ch-l b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.ch-l small { display: flex; align-items: center; gap: 5px; color: var(--tx-3); font-size: 12px } .ch-l .timer { font-family: var(--mono) }
.ch-r { display: flex; gap: 2px } .call .ibtn { color: var(--tx-2) } .call .ibtn:hover { color: var(--tx) }
.stage { flex: 1; min-height: 0; padding: 4px 14px 8px; display: flex; flex-direction: column; gap: 10px }
.stage-mark { position: absolute; right: 18px; bottom: 96px; height: 34px; max-width: 140px; object-fit: contain; opacity: .5; background: #fff; border-radius: 8px; padding: 4px 8px; pointer-events: none }
.grid { flex: 1; min-height: 0; display: grid; gap: 10px; align-content: center; justify-content: center }
.spot { flex: 1; min-height: 0; display: flex; gap: 10px }
.spot .big { flex: 1; min-width: 0; display: flex } .spot .big .tile { flex: 1 }
.strip { display: flex; flex-direction: column; gap: 10px; width: 220px; overflow-y: auto }
.strip .tile { aspect-ratio: 16/9; flex: none }
.tile { position: relative; background: #1b2838; border-radius: 16px; overflow: hidden; display: grid; place-items: center; outline: 2px solid transparent; outline-offset: -2px; transition: outline-color .15s; min-height: 0; min-width: 0 }
:root[data-brand=geek] .tile { background: #15112a }
.tile.speaking { outline-color: var(--ok) }
.tile video { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0 }
.tile.contain video, .tile.screen video { object-fit: contain; background: #000 }
.tile video.mirror { transform: scaleX(-1) }
.tile-off { display: grid; place-items: center; width: 100%; height: 100%; background: radial-gradient(circle at 50% 45%, rgba(255,255,255,.06), transparent 60%) }
.tile-off .av { width: min(96px, 34%); height: auto; aspect-ratio: 1; font-size: clamp(18px, 3vw, 36px) }
.tile .label { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 6px; background: rgba(0,0,0,.55); backdrop-filter: blur(8px); padding: 4px 9px; border-radius: 8px; font-size: 13px; font-weight: 600; max-width: calc(100% - 20px); color: #fff }
.tile .label span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis } .tile .label svg.i { width: 15px; height: 15px } .tile .label .off { color: #F07085 }
.tile .hand { position: absolute; top: 10px; left: 10px; font-size: 24px; animation: wave 1.2s ease-in-out infinite; transform-origin: 70% 90% }
@keyframes wave { 0%, 100% { transform: rotate(0) } 30% { transform: rotate(16deg) } 60% { transform: rotate(-8deg) } }
.tile .tools { position: absolute; top: 8px; right: 8px; display: none; gap: 4px }
.tile:hover .tools { display: flex }
.tile .tools button { width: 30px; height: 30px; border-radius: 8px; background: rgba(0,0,0,.55); backdrop-filter: blur(6px); display: grid; place-items: center; color: #fff }
.tile .tools svg.i { width: 16px; height: 16px }
.tile .quality { position: absolute; top: 10px; right: 10px; font: 700 10px var(--mono); color: var(--warn) }
.tile .cc { position: absolute; left: 50%; bottom: 48px; transform: translateX(-50%); max-width: 88%; background: rgba(0,0,0,.75); color: #fff; font-size: 15px; line-height: 1.35; padding: 6px 12px; border-radius: 8px; text-align: center; z-index: 3 }
.float-react { position: absolute; bottom: 40px; font-size: 42px; pointer-events: none; z-index: 4; transition: transform 2.2s ease-out, opacity 2.2s ease-in }
.callbar { flex: none; display: flex; justify-content: center; align-items: center; gap: 14px; padding: 8px 12px 16px; flex-wrap: wrap }
.cb-g { display: flex; gap: 6px; background: var(--surface-1); border: 1px solid var(--line-2); padding: 5px; border-radius: 999px; box-shadow: var(--shadow-sm) }
.cbtn { width: 44px; height: 44px; border-radius: 50%; background: transparent; display: grid; place-items: center; transition: background .15s, transform .12s; position: relative; color: var(--tx) }
.cbtn:hover { background: var(--hover) } .cbtn:active { transform: scale(.95) }
.cbtn.off { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger) } .cbtn.off:hover { background: color-mix(in srgb, var(--danger) 18%, transparent) }
.cbtn.on { background: var(--accent-soft); color: var(--accent) }
.cbtn.leave { background: var(--danger); color: #fff; width: 58px; border-radius: 22px } .cbtn.leave:hover { filter: brightness(1.07); background: var(--danger) }
:root[data-theme=dark] .cb-g { background: rgba(255,255,255,.05); border-color: var(--line); box-shadow: none }
.cbtn svg.i { width: 21px; height: 21px }
.cbtn .tip { position: absolute; bottom: 56px; left: 50%; transform: translateX(-50%); background: #0b1622; color: #fff; padding: 5px 9px; border-radius: 7px; font-size: 12px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .15s; box-shadow: 0 6px 16px rgba(0,0,0,.35) }
.cbtn:hover .tip { opacity: 1 }
.cctxt { font: 700 13px var(--mono) }
.preview .cbtn { width: 44px; height: 44px; background: rgba(0,0,0,.5); backdrop-filter: blur(6px); color: #fff } .preview .cbtn.off { background: #C2414F; color: #fff }
.callchat { width: 350px; flex: none; border-left: 1px solid var(--line); display: flex; flex-direction: column; background: var(--surface-3); min-height: 0 }
.callchat .msg { padding-left: 62px; padding-right: 12px } .callchat .msg .av { left: 14px; width: 34px; height: 34px } .callchat .msg .hov-time { left: 12px }
.callchat .composer { padding: 0 10px 12px } .callchat .welcome { padding: 20px 16px }
.people { flex: 1; overflow-y: auto; padding: 8px }
.person { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px }
.person:hover { background: var(--hover) } .person.speaking .av { box-shadow: 0 0 0 2px var(--surface-3), 0 0 0 4px var(--ok) }
.p-ic { display: flex; align-items: center; gap: 6px; color: var(--tx-3) } .p-ic svg.i { width: 16px; height: 16px } .p-ic .off { color: var(--danger) }
.people-foot { padding: 12px; border-top: 1px solid var(--line) }
.pop.fx { position: absolute; bottom: 84px; left: 50%; transform: translateX(-50%); width: min(560px, calc(100% - 24px)); max-height: 60vh; overflow-y: auto; background: var(--surface-1); color: var(--tx); border: 1px solid var(--line-2); border-radius: 18px; padding: 16px; box-shadow: var(--shadow); z-index: 10; animation: popIn .18s var(--ease) }
.pop.fx h4 { margin: 0 0 10px; font-size: 14px }

/* ================= fonds & studio ================= */
.bgsec { display: flex; justify-content: space-between; align-items: center; margin: 14px 0 8px; font: 700 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--tx-3) }
.bgsec:first-child { margin-top: 0 }
.bgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px }
.bg { aspect-ratio: 16/10; border-radius: 11px; border: 2px solid transparent; background: var(--field) center/cover; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--tx-2); position: relative; overflow: hidden; text-align: center; padding: 4px; transition: transform .12s, border-color .12s, box-shadow .12s; outline: 1px solid var(--line) }
.bg:hover { transform: translateY(-1px) }
.bg[aria-pressed=true] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft) }
.bg svg.i { width: 22px; height: 22px }
.bg .x { position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.6); font-size: 11px; line-height: 18px; display: none; color: #fff }
.bg:hover .x { display: block }
.bg.label-bottom { align-items: end; color: #fff; text-shadow: 0 1px 3px #000 }
.bg.label-bottom::before { content: ""; position: absolute; inset: 50% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.55)) }
.bg.label-bottom > * , .bg.label-bottom { z-index: 0 }
.modal.studio { width: min(1200px, 100%) }
.studio-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; align-items: start }
.studio-stage { position: relative; aspect-ratio: 16/9; border-radius: 16px; overflow: hidden; background: #000; box-shadow: var(--shadow) }
.studio-cv { width: 100%; height: 100%; display: block; object-fit: cover } .studio-cv[hidden] { display: none }
.silhouette { position: absolute; inset: auto 0 0 0; height: 78%; display: flex; justify-content: center; pointer-events: none }
.silhouette svg { height: 100%; fill: rgba(255,255,255,.16); stroke: rgba(255,255,255,.5); stroke-width: 1; stroke-dasharray: 3 3 }
.studio-stage .busy { position: absolute; top: 10px; left: 10px; font-size: 12px; background: rgba(0,0,0,.6); color: #fff; padding: 4px 10px; border-radius: 6px }
.studio-panel { max-height: calc(100dvh - 160px); overflow-y: auto; padding-right: 6px }
.seg { display: flex; background: var(--field); border-radius: 10px; padding: 3px; gap: 3px; border: 1px solid var(--line) }
.seg.wrap { flex-wrap: wrap }
.seg button { flex: 1; padding: 7px 9px; border-radius: 7px; font-size: 12.5px; color: var(--tx-2); white-space: nowrap }
.seg button[aria-pressed=true] { background: var(--surface-1); color: var(--accent); font-weight: 600; box-shadow: var(--shadow-sm) }
.swatches { display: flex; gap: 6px }
.swatches button { width: 30px; height: 30px; border-radius: 9px; border: 2px solid var(--line-2) }
.swatches button[aria-pressed=true] { border-color: var(--tx); box-shadow: 0 0 0 3px var(--accent-soft) }
.range { width: 100%; accent-color: var(--accent) }
.row2 > .field { flex: 1 }

/* ================= réglages & admin ================= */
.settings-modal { width: min(900px, 100%) }
.settings { display: grid; grid-template-columns: 210px 1fr; min-height: 460px }
.set-nav { padding: 18px 12px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px }
.set-nav button { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--tx-2); font-weight: 550; text-align: left }
.set-nav button:hover { background: var(--hover); color: var(--tx) } .set-nav button.on { background: var(--active); color: var(--tx) }
.set-nav button.on svg.i { color: var(--accent) } .set-nav svg.i { width: 18px; height: 18px }
.set-body { min-width: 0 }
.set-h { margin: 6px 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--tx-3) }
.theme-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px }
.theme-card { border-radius: 14px; border: 2px solid var(--line-2); padding: 8px; text-align: left; transition: border-color .15s, transform .15s }
.theme-card:hover { transform: translateY(-1px) } .theme-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft) }
.theme-card span { display: flex; align-items: center; justify-content: space-between; padding: 8px 4px 2px; font-weight: 600 } .theme-card span svg.i { width: 16px; height: 16px; color: var(--accent) }
.tc-prev { height: 78px; border-radius: 9px; display: grid; grid-template-columns: 22% 1fr; grid-template-rows: 26% 1fr; gap: 4px; padding: 6px; overflow: hidden }
.tc-prev i { border-radius: 4px } .tc-prev i:first-child { grid-column: 1 / 3 }
.t-light .tc-prev { background: #E7EDF5 } .t-light .tc-prev i { background: #fff } .t-light .tc-prev i:last-child { background: linear-gradient(135deg,#4764AC,#2CA6DA); opacity: .85 }
.t-dark .tc-prev { background: #04101d } .t-dark .tc-prev i { background: #0F2E4E } .t-dark .tc-prev i:last-child { background: linear-gradient(135deg,#4764AC,#40BDED); opacity: .8 }
.t-auto .tc-prev { background: linear-gradient(105deg, #E7EDF5 50%, #04101d 50%) } .t-auto .tc-prev i { background: rgba(127,140,160,.45) }
.avedit { display: flex; flex-direction: column; align-items: center; gap: 10px } .avedit .col { display: flex; flex-direction: column; align-items: center; gap: 6px }
.pwbox summary { cursor: pointer; color: var(--tx-2); font-size: 13px; margin-top: 8px }
.card-row { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 10px }
.card-row.done { opacity: .6 } .card-row .chips { margin-top: 10px }
.quote { border-left: 3px solid var(--accent); padding-left: 10px; color: var(--tx-2); margin: 10px 0; white-space: pre-wrap }
.newuser { margin-bottom: 14px; flex-wrap: wrap }
.email-edit { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--tx-3) } .email-edit svg.i { width: 14px; height: 14px }
.brandgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px }
.brandcard { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: left; display: flex; flex-direction: column; gap: 8px; transition: transform .15s, border-color .15s }
.brandcard:hover { transform: translateY(-2px); border-color: var(--accent) }
.brandcard .bl { height: 64px; background: #fff; border-radius: 10px; display: grid; place-items: center; padding: 8px; color: #0A2540; font-weight: 700; border: 1px solid var(--line) }
.brandcard .bl img { max-height: 48px; max-width: 100% }
.brandcard .bc { display: flex; gap: 4px } .brandcard .bc i { flex: 1; height: 8px; border-radius: 4px }
.brandcard small { color: var(--tx-3) }
.creds { font: 13px/1.5 var(--mono); background: var(--field); padding: 12px; border-radius: 10px; white-space: pre-wrap; border: 1px solid var(--line-2) }

/* ================= responsive ================= */
@media (max-width: 1180px) { .members { display: none } .callchat { width: 310px } .hide-md { display: none } }
@media (max-width: 960px) { .auth { grid-template-columns: 1fr } .auth-hero { display: none } }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr }
  .topbar { grid-template-columns: auto 1fr auto; padding: 0 8px }
  .tb-c { justify-content: stretch } .searchbox span, .searchbox kbd { display: none } .searchbox { width: 40px; padding: 8px; justify-content: center; margin-left: auto }
  .tb-ws, .tb-sep, .hide-sm { display: none }
  .rail, .side { position: fixed; top: var(--tb); bottom: 0; z-index: 50; transform: translateX(-110%); transition: transform .22s var(--ease); box-shadow: 20px 0 50px rgba(0,0,0,.35) }
  .rail { left: 0; width: var(--rail) } .side { left: var(--rail); width: min(290px, calc(100vw - var(--rail) - 20px)); transform: translateX(calc(-100% - var(--rail) - 40px)) }
  .app.drawer .rail, .app.drawer .side { transform: none }
  .scrim { position: fixed; inset: var(--tb) 0 0 0; background: rgba(0,0,0,.45); z-index: 40 }
  .burger { display: inline-grid }
  .main { grid-column: 1 / -1 }
  .callchat { position: fixed; inset: var(--tb) 0 0 0; width: auto; z-index: 45 }
  .lobby, .studio-grid { grid-template-columns: 1fr } .studio-panel { max-height: none }
  .strip { flex-direction: row; width: auto; height: 96px; overflow-x: auto } .strip .tile { height: 96px; width: auto }
  .spot { flex-direction: column }
  .cbtn { width: 42px; height: 42px } .callbar { gap: 8px } .cb-g { gap: 4px } .cbtn .tip { display: none }
  .msg { padding-left: 62px; padding-right: 12px } .msg .av { left: 12px; width: 36px; height: 36px } .msg .hov-time { left: 10px }
  .composer { padding: 0 10px 12px }
  .pane-h .desc { display: none }
  .settings { grid-template-columns: 1fr } .set-nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px } .set-nav span { white-space: nowrap }
  .theme-cards { grid-template-columns: 1fr 1fr 1fr; gap: 8px }
  .rail-tip { display: none }
}
.sp-mono { width: 100%; height: 100%; display: grid; place-items: center; color: #fff; font: 800 15px var(--font); letter-spacing: .02em; text-shadow: 0 1px 2px rgba(0,0,0,.25) }
.sp-ico.xs .sp-mono { font-size: 9px } .sp-ico.sm .sp-mono { font-size: 11px } .sp-ico.xl .sp-mono { font-size: 24px }
.bg { font-size: 11.5px; line-height: 1.25 }

/* sobriété (thème clair) */
:root[data-theme=light] .topbar { box-shadow: none }
:root[data-theme=light] .modal { box-shadow: 0 24px 60px rgba(16,38,64,.16) }
:root[data-theme=light] .overlay { background: rgba(22,38,58,.28); backdrop-filter: blur(3px) }
:root[data-theme=light] .rail { background: #FFFFFF }
:root[data-theme=light] .srv .sp-ico { box-shadow: 0 0 0 1px var(--line-2) }
:root[data-theme=light] .rail .tool { background: var(--surface-2); color: var(--tx-3) }
:root[data-theme=light] .chan.active { background: var(--active); color: var(--accent) }
:root[data-theme=light] .chan.active .nm { color: var(--tx) }
:root[data-theme=light] .tile { background: #2a3746 }
:root[data-theme=light] .tile.speaking { outline-color: #2E8B57 }
:root[data-theme=light] .callchat { border-left-color: var(--line-2) }
:root[data-theme=light] .call-h { border-bottom: 1px solid var(--line) ; background: var(--surface-1) }
:root[data-theme=light] .stage { padding-top: 12px }
.welcome .big { background: var(--accent-soft); color: var(--accent) }

/* aide fonds virtuels */
.fxwarn { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); color: var(--tx-2); font-size: 13px }
.fxwarn > svg { width: 18px; height: 18px; flex: none; color: var(--accent) } .fxwarn > span { flex: 1 }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px }
.modal.help { width: min(580px, 100%) }
.fxhelp { padding: 4px 22px 22px } .fxhelp > .sub { margin: 0 0 14px; color: var(--tx-2); line-height: 1.55 }
.fxhelp .steps { margin: 0; padding: 0; list-style: none; counter-reset: st; display: grid; gap: 12px }
.fxhelp .steps li { counter-increment: st; display: grid; grid-template-columns: 28px 1fr; gap: 2px 12px; line-height: 1.55; color: var(--tx-2); font-size: 14px }
.fxhelp .steps li::before { content: counter(st); grid-row: span 2; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px }
.fxhelp .steps b { color: var(--tx) }
.fxhelp code { font: 500 12.5px/1.4 ui-monospace, 'JetBrains Mono', monospace; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: var(--tx) }
.codecopy { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; cursor: pointer; vertical-align: baseline; color: inherit }
.codecopy svg { width: 14px; height: 14px; color: var(--tx-3) } .codecopy:hover code { border-color: var(--accent) } .codecopy:hover svg { color: var(--accent) }
.fxwarn.info > svg { color: var(--tx-3) }
