:root {
  --navy-900: #070b18; --navy-800: #0b1020; --navy-700: #111a33; --navy-600: #18233f;
  --blue: #2f6bff; --violet: #8b5cf6; --green: #22c55e; --red: #ef4444; --amber: #f59e0b;
  --grad: var(--blue); /* one accent: no blue-to-violet gradient (people can still pick their own accent pair in Settings) */
  --radius: 14px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
[data-theme="dark"] {
  --bg: var(--navy-800); --panel: var(--navy-700); --panel-2: var(--navy-600); --text: #e8ecf8; --muted: #8a96b8;
  --border: rgba(255,255,255,.07); --bubble-in: #1b2748; --bubble-out: #2a4fd6; --bubble-out-text: #fff; --shadow: 0 10px 40px rgba(0,0,0,.45);
  --chat-bg: var(--navy-800);
}
[data-theme="light"] {
  --bg: #f4f6fc; --panel: #ffffff; --panel-2: #eef1fa; --text: #0e1630; --muted: #66719a;
  --border: rgba(14,22,48,.09); --bubble-in: #ffffff; --bubble-out: #2f6bff; --bubble-out-text: #fff; --shadow: 0 10px 40px rgba(30,50,120,.15);
  --chat-bg: #eef1fa;
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 15px; -webkit-font-smoothing: antialiased; overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, textarea { font: inherit; color: inherit; }
::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
.hidden { display: none !important; }

/* boot */
.boot { position: fixed; inset: 0; background: var(--navy-800); display: grid; place-content: center; gap: 24px; justify-items: center; z-index: 100; transition: opacity .4s; }
.boot.done { opacity: 0; pointer-events: none; }
.logo-mark { width: 72px; height: 72px; border-radius: 20px; background: url(/icons/logo-mark.png) center / cover no-repeat, var(--grad); position: relative; box-shadow: 0 0 60px rgba(99,102,241,.5); animation: pulse 1.6s ease-in-out infinite; }
.logo-mark::before, .logo-mark::after { display: none; }
.boot-bar { width: 140px; height: 3px; background: rgba(255,255,255,.1); border-radius: 3px; overflow: hidden; }
.boot-bar span { display: block; height: 100%; width: 40%; background: var(--grad); animation: slide 1.1s infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
@keyframes pulse { 50% { transform: scale(1.06); } }

/* auth */
.auth { height: 100%; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero { background: var(--grad), var(--navy-800); background-blend-mode: normal; color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-hero::before { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; top: -120px; border-radius: 50%; background: rgba(255,255,255,.12); filter: blur(10px); }
.auth-hero::after { content: ""; position: absolute; width: 380px; height: 380px; left: -120px; bottom: -120px; border-radius: 50%; background: rgba(0,0,0,.2); }
.auth-hero h1 { font-size: 44px; line-height: 1.08; letter-spacing: -.02em; z-index: 1; }
.auth-hero p { opacity: .85; margin-top: 14px; max-width: 420px; z-index: 1; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 600; letter-spacing: .08em; z-index: 1; }
.brand .logo-mark { width: 36px; height: 36px; border-radius: 10px; animation: none; box-shadow: none; }

.auth-form-wrap { display: flex; flex-direction: column; align-items: center; padding: 24px; overflow-y: auto; -webkit-overflow-scrolling: touch; } /* a flex column with auto top/bottom margins on the form+footer group (below): centers the group when it fits, but on a short window or a long form (sign-up) it starts at the top and scrolls instead of being cut off with no way to reach it (the app itself has overflow:hidden) */
.auth-form-wrap .auth-card { margin-top: auto; }
.auth-card { width: min(400px, 100%); display: grid; gap: 14px; }
.auth-card h2 { font-size: 26px; }
.auth-card .sub { color: var(--muted); margin-top: -8px; }
.field { display: grid; gap: 6px; } .field label { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: none; letter-spacing: 0; }
.input { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; outline: none; width: 100%; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,107,255,.2); }
.btn { background: var(--grad); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; transition: transform .1s, filter .15s; }
.btn:hover { filter: brightness(1.08); } .btn:active { transform: scale(.98); } .btn[disabled] { opacity: .5; }
.btn.ghost { background: var(--panel-2); color: var(--text); } .btn.danger { background: var(--red); }
.link { color: var(--blue); font-weight: 600; } .err { color: var(--red); font-size: 13px; min-height: 18px; }

/* shell */
.shell { height: 100%; display: grid; grid-template-columns: 72px 360px 1fr; grid-template-rows: minmax(0, 1fr); }
.rail { background: var(--panel); border-right: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; padding: 14px 0; gap: 6px; }
.rail .logo-mark { width: 40px; height: 40px; border-radius: 12px; animation: none; margin-bottom: 14px; }
.rail .logo-mark::before, .rail .logo-mark::after { width: 20px; height: 4px; }
.rail-btn { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: var(--muted); position: relative; transition: background .15s, color .15s; }
.rail-btn:hover { background: var(--panel-2); color: var(--text); }
.rail-btn.active { background: var(--grad); color: #fff; box-shadow: 0 6px 20px rgba(79,70,229,.4); }
.rail-btn svg { width: 22px; height: 22px; } .rail-spacer { flex: 1; }
.badge { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; padding: 0 5px; }
.list-pane { background: var(--panel); border-right: 1px solid var(--border); display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.pane-head { padding: 18px 18px 10px; display: flex; align-items: center; justify-content: space-between; }
.pane-head h2 { font-size: 22px; }
.head-acts { display: flex; align-items: center; gap: 2px; } .head-menu.active { color: var(--blue); }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--muted); } .icon-btn:hover { background: var(--panel-2); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }
.search { margin: 0 16px 10px; width: calc(100% - 32px); } .scroll { overflow-y: auto; flex: 1; }
.row { display: flex; gap: 12px; padding: 12px 16px; align-items: center; cursor: pointer; transition: background .12s; }
.row:hover { background: var(--panel-2); } .row.active { background: var(--panel-2); box-shadow: inset 3px 0 0 var(--blue); }
.row .meta { min-width: 0; flex: 1; } .row .top { display: flex; justify-content: space-between; gap: 8px; }
.row .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .time { color: var(--muted); font-size: 12px; } .row .unread { background: var(--blue); color: #fff; font-size: 11px; font-weight: 600; border-radius: 10px; padding: 2px 7px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 600; color: #fff; position: relative; font-size: 16px; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; } .avatar.lg { width: 84px; height: 84px; font-size: 30px; }
.avatar .dot { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--green); border: 2px solid var(--panel); }
.section-label { padding: 12px 16px 4px; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.empty { color: var(--muted); text-align: center; padding: 40px 24px; }

/* skeleton */
.skel { display: flex; gap: 12px; padding: 12px 16px; } .skel i { background: linear-gradient(90deg, var(--panel-2) 25%, var(--border) 37%, var(--panel-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s infinite; border-radius: 10px; display: block; }
.skel .c { width: 44px; height: 44px; border-radius: 50%; } .skel .l { flex: 1; display: grid; gap: 8px; } .skel .l i { height: 12px; } .skel .l i:last-child { width: 60%; }
@keyframes shimmer { from { background-position: 100% 50%; } to { background-position: 0 50%; } }

/* chat */
.chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--chat-bg); position: relative; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; background: var(--panel); border-bottom: 1px solid var(--border); }
.chat-head .meta { flex: 1; min-width: 0; } .chat-head .name { font-weight: 600; } .chat-head .sub { font-size: 12.5px; color: var(--muted); }
.chat-head .sub.typing { color: var(--blue); }
.back { display: none; }
.messages { flex: 1; overflow-y: auto; padding: 18px 6%; display: flex; flex-direction: column; gap: 4px; }
.day { align-self: center; background: var(--panel); color: var(--muted); font-size: 12px; padding: 4px 12px; border-radius: 10px; margin: 10px 0; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.msg { max-width: min(560px, 78%); padding: 8px 12px 6px; border-radius: 16px; position: relative; background: var(--bubble-in); box-shadow: 0 1px 2px rgba(0,0,0,.18); word-wrap: break-word; overflow-wrap: anywhere; align-self: flex-start; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.msg.fresh { animation: pop .18s ease-out; }
#app { height: 100%; }
.msg.me { align-self: flex-end; background: var(--bubble-out); color: var(--bubble-out-text); border-bottom-right-radius: 5px; }
.msg:not(.me) { border-bottom-left-radius: 5px; }
.msg .who { font-size: 12px; font-weight: 600; color: var(--violet); margin-bottom: 2px; }
.msg .body { white-space: pre-wrap; } .msg.deleted .body { font-style: italic; opacity: .6; }
.msg .foot { display: flex; gap: 6px; justify-content: flex-end; align-items: center; font-size: 11px; opacity: .75; margin-top: 2px; }
.ticks { letter-spacing: -3px; } .ticks.read { color: #7dd3fc; opacity: 1; }
.msg .quote { border-left: 3px solid var(--violet); background: rgba(127,127,127,.15); padding: 4px 8px; border-radius: 6px; margin-bottom: 6px; font-size: 13px; opacity: .9; }
.msg img, .msg video { max-width: 100%; border-radius: 10px; display: block; margin-bottom: 4px; max-height: 340px; }
.msg audio { max-width: 100%; height: 40px; } .msg .file { display: flex; gap: 10px; align-items: center; padding: 8px; background: rgba(127,127,127,.18); border-radius: 10px; color: inherit; text-decoration: none; margin-bottom: 4px; }
.reacts { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; } .reacts span { background: rgba(127,127,127,.25); border-radius: 10px; padding: 1px 7px; font-size: 13px; cursor: pointer; } .reacts span.mine { outline: 1px solid var(--blue); }
.msg .actions { position: absolute; top: -14px; right: 8px; display: none; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); color: var(--text); z-index: 2; }
.msg:hover .actions { display: flex; } .msg .actions button { padding: 4px 8px; font-size: 14px; } .msg .actions button:hover { background: var(--panel-2); }
.composer-wrap { background: var(--panel); border-top: 1px solid var(--border); padding: 10px 14px; }
.replying { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; margin-bottom: 8px; border-left: 3px solid var(--violet); background: var(--panel-2); border-radius: 8px; font-size: 13px; }
.composer { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex: 1; resize: none; max-height: 140px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 22px; padding: 11px 16px; outline: none; }
.send { width: 44px; height: 44px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; flex: none; } .send svg { width: 20px; height: 20px; }
.send.rec { background: var(--red); animation: pulse 1s infinite; }
.send.dict-on { box-shadow: 0 0 0 3px rgba(47,107,255,.55); }
.emoji-pop { position: absolute; bottom: 74px; left: 14px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 8px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; box-shadow: var(--shadow); z-index: 5; }
.emoji-pop button { font-size: 22px; padding: 4px; border-radius: 8px; } .emoji-pop button:hover { background: var(--panel-2); }
.placeholder { margin: auto; text-align: center; color: var(--muted); display: grid; gap: 10px; justify-items: center; padding: 24px; }
.placeholder .logo-mark { animation: none; width: 64px; height: 64px; opacity: .85; }

/* modal / settings */
.modal-back { position: fixed; inset: 0; background: rgba(3,6,16,.6); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 50; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--panel); border: 1px solid var(--border); border-radius: 20px; width: min(460px, 94vw); max-height: 86vh; overflow: auto; padding: 22px; display: grid; gap: 14px; box-shadow: var(--shadow); }
.modal h3 { font-size: 19px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; } .chip { background: var(--panel-2); border-radius: 999px; padding: 4px 10px; font-size: 13px; display: flex; gap: 6px; align-items: center; cursor: pointer; }
.toggle { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; }
.switch { width: 44px; height: 26px; border-radius: 13px; background: var(--panel-2); position: relative; transition: background .2s; } .switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; } .switch.on { background: var(--blue); } .switch.on::after { transform: translateX(18px); }
.settings { padding: 8px 16px 24px; display: grid; gap: 16px; }
.card { background: var(--panel-2); border-radius: 16px; padding: 16px; display: grid; gap: 12px; }
.kv { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; } .stat { background: var(--panel); border-radius: 12px; padding: 12px; } .stat b { font-size: 22px; display: block; }

/* call overlay */
.call { position: fixed; inset: 0; z-index: 60; color: #fff; overflow: hidden; background: #070b18; user-select: none; -webkit-user-select: none; }
.call-bg { position: absolute; inset: 0; background: radial-gradient(900px 560px at 15% -10%, rgba(47,107,255,.38), transparent 60%), radial-gradient(800px 520px at 100% 110%, rgba(139,92,246,.38), transparent 60%), #070b18; }
.tiles { position: absolute; inset: 0; display: grid; gap: 10px; padding: 78px 12px 120px; }
.tiles.solo { padding: 0; gap: 0; }
.tile { position: relative; border-radius: 22px; overflow: hidden; min-width: 0; min-height: 0; background: linear-gradient(145deg, #1a2652, #0c1230); box-shadow: 0 8px 30px rgba(0,0,0,.35); transition: box-shadow .2s; }
.tiles.solo .tile:not(.pip) { border-radius: 0; box-shadow: none; }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.tile.novideo video { visibility: hidden; }
.tile .fallback { position: absolute; inset: 0; display: none; place-items: center; }
.tile.novideo .fallback { display: grid; }
.tile .fallback .avatar { width: clamp(72px, 16vmin, 132px); height: clamp(72px, 16vmin, 132px); font-size: clamp(26px, 6vmin, 48px); }
.tile.ringing .fallback .avatar { animation: ring 1.4s infinite; }
.tile.ringing { opacity: .92; }
.tile.speaking { box-shadow: 0 0 0 3px #22c55e, 0 0 28px rgba(34,197,94,.5); }
.tile.local video { transform: scaleX(-1); } .tile.local.sharing video { transform: none; }
.tile .tinfo { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 6px; align-items: center; max-width: calc(100% - 20px); background: rgba(8,12,28,.55); backdrop-filter: blur(8px); padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.tile .tname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .tmic { color: #fca5a5; display: grid; } .tile .tmic svg { width: 14px; height: 14px; }
.tile .tstate { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); background: rgba(8,12,28,.6); backdrop-filter: blur(8px); padding: 4px 12px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.tile .tstate:empty { display: none; }
.tile.pip { position: absolute; right: 16px; bottom: 124px; width: clamp(96px, 22vw, 168px); aspect-ratio: 3 / 4; z-index: 2; border-radius: 18px; border: 2px solid rgba(255,255,255,.25); box-shadow: var(--shadow); }
.tile.pip .tinfo { display: none; } .tile.pip .fallback .avatar { width: 52px; height: 52px; font-size: 20px; }
.call .top { position: absolute; top: max(16px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 8px; align-items: center; max-width: calc(100% - 24px); white-space: nowrap; font-size: 14px; background: rgba(10,15,35,.55); backdrop-filter: blur(12px); padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.1); transition: opacity .3s, transform .3s; }
.call .top b { overflow: hidden; text-overflow: ellipsis; max-width: 38vw; } .call .ccount { opacity: .75; } .call .ctimer { font-variant-numeric: tabular-nums; opacity: .85; }
.call .q { width: 10px; height: 10px; border-radius: 50%; background: var(--green); flex: none; } .call .q.fair { background: var(--amber); } .call .q.poor { background: var(--red); }
.call .controls { position: absolute; bottom: max(24px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 12px; max-width: calc(100vw - 16px); background: rgba(15,20,40,.62); backdrop-filter: blur(16px); padding: 10px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.12); transition: opacity .3s, transform .3s; }
.call .controls.more { bottom: calc(max(24px, env(safe-area-inset-bottom)) + 82px); z-index: 4; }
.call.idle .top { opacity: 0; transform: translate(-50%, -14px); } .call.idle .controls { opacity: 0; transform: translate(-50%, 18px); }
.cbtn { width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,.14); display: grid; place-items: center; color: #fff; flex: none; transition: background .15s, transform .1s, color .15s; }
.cbtn:hover:not([disabled]) { background: rgba(255,255,255,.26); } .cbtn:active:not([disabled]) { transform: scale(.93); } .cbtn[disabled] { opacity: .35; cursor: not-allowed; }
.cbtn.off { background: #fff; color: #111; } .cbtn.end { background: var(--red); } .cbtn.accept { background: var(--green); animation: acceptRing 1.5s infinite; } .cbtn svg { width: 24px; height: 24px; }
.call.incoming .center { position: absolute; inset: 0; z-index: 2; display: grid; align-content: center; justify-items: center; gap: 10px; text-align: center; padding: 24px 24px 150px; }
.call.incoming h2 { font-size: 30px; } .call.incoming .sub { opacity: .8; } .call.incoming .sub.small { font-size: 14px; opacity: .65; max-width: 80vw; }
.avatar.xl { width: 132px; height: 132px; font-size: 48px; } .avatar.ring { animation: ring 1.4s infinite; }
.call.incoming .controls { gap: 60px; padding: 14px 32px; } .call.incoming .cbtn { width: 68px; height: 68px; }
@keyframes acceptRing { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.65); } 100% { box-shadow: 0 0 0 18px rgba(34,197,94,0); } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(99,102,241,.6); } 100% { box-shadow: 0 0 0 42px rgba(99,102,241,0); } }
.avatar svg { width: 22px; height: 22px; }
.tiles[data-n="3"]:not(.solo) .tile:last-child { grid-column: 1 / -1; justify-self: center; width: calc(50% - 5px); }
@media (max-width: 760px) { .tiles[data-n="3"]:not(.solo) .tile:last-child { width: calc(50% - 4px); } }
/* people picker */
.picker-list { max-height: 36vh; overflow-y: auto; margin: 0 -10px; }
.row.pick { border-radius: 12px; } .row.pick:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.row.pick .tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; font-size: 13px; color: #fff; flex: none; }
.row.pick.sel .tick { background: var(--grad); border-color: transparent; } .row.pick.sel { background: var(--panel-2); }
.modal-back { z-index: 90; }
button:focus-visible, .input:focus-visible, .rail-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
@media (max-width: 760px) { .cbtn { width: 46px; height: 46px; } .call .controls { gap: 8px; padding: 8px 10px; } .call .controls.more { bottom: calc(max(24px, env(safe-area-inset-bottom)) + 70px); } .tiles { padding: 70px 8px 104px; } .tile.pip { bottom: 108px; right: 12px; } .call.incoming .cbtn { width: 64px; height: 64px; } }
.toast:not(.atoast) { pointer-events: none; } /* plain text toasts never block the buttons under them (the first-call notice stays up for 8 s); toasts with buttons (.atoast) stay clickable */
.toast { z-index: 400; position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--panel); border: 1px solid var(--border); padding: 10px 18px; border-radius: 12px; box-shadow: var(--shadow); animation: pop .2s; }

/* responsive */
@media (max-width: 1000px) { .shell { grid-template-columns: 72px 300px 1fr; } }
@media (max-width: 760px) {
  .auth { grid-template-columns: 1fr; } .auth-hero { display: none; }
  .shell { grid-template-columns: 1fr; grid-template-rows: 1fr 64px; }
  .rail { order: 2; flex-direction: row; justify-content: space-around; padding: 6px; border-right: 0; border-top: 1px solid var(--border); } .rail .logo-mark, .rail-spacer { display: none; }
  .list-pane { order: 1; border-right: 0; } .chat { position: fixed; inset: 0; z-index: 20; transform: translateX(100%); transition: transform .25s; }
  .shell.chat-open .chat { transform: none; } .back { display: grid; }
  .messages { padding: 14px 10px; } .msg { max-width: 88%; } .call .tile.local.pip { width: 100px; }
}

/* screen privacy */
@media print { body > * { display: none !important; } body::before { content: "Printing is disabled to protect your privacy."; display: block; padding: 40px; font: 18px sans-serif; color: #000; } }
body.screen-hidden #app { filter: blur(28px) brightness(.5); pointer-events: none; }
.shield { position: fixed; inset: 0; z-index: 120; display: none; place-items: center; text-align: center; color: #fff; background: rgba(7,11,24,.55); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); cursor: pointer; }
body.screen-hidden .shield { display: grid; } .shield .sub { opacity: .7; margin-top: 4px; font-size: 14px; }
.shield-lock { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 18px; background: var(--grad); display: grid; place-items: center; } .shield-lock svg { width: 26px; height: 26px; }
body.privacy .messages, body.privacy .msg, body.privacy .tile { -webkit-user-select: none; user-select: none; }
body.privacy img, body.privacy video { -webkit-user-drag: none; }

/* view once */
.once-toggle.on{color:#fff;background:var(--accent,#2f6bff);border-radius:50%}
.vo-hint{display:flex;align-items:center;gap:8px}.vo-hint svg{width:16px;height:16px}
.vo-card{display:flex;align-items:center;gap:10px;padding:10px 14px;border-radius:14px;border:1.5px dashed currentColor;background:transparent;color:inherit;font:inherit;text-align:left;min-width:190px}
.vo-card .vo-ic svg{width:26px;height:26px}.vo-t{font-weight:600}.vo-s{font-size:12px;opacity:.7}
.vo-card.locked{cursor:default;opacity:.8;max-width:260px}.vo-card.locked .vo-s{opacity:.85;line-height:1.35}.vo-card.live{cursor:pointer}.vo-card.live:hover{background:rgba(127,127,127,.12)}.vo-card.gone{opacity:.55;border-style:solid}
.vo-viewer.shield .vo-stage{visibility:hidden}.vo-viewer.shield::after{content:'Hidden for privacy';position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#fff;font-size:18px}.vo-viewer{position:fixed;inset:0;z-index:110;background:#000;display:flex;flex-direction:column;color:#fff}
.vo-bar{display:flex;align-items:center;gap:10px;padding:max(12px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) 12px max(16px,env(safe-area-inset-left));background:rgba(255,255,255,.08)}.vo-bar span:nth-child(2){flex:1;font-size:14px}.vo-bar svg{width:20px;height:20px}
.vo-stage{flex:1;display:flex;align-items:center;justify-content:center;min-height:0;padding:12px 12px max(12px,env(safe-area-inset-bottom))}.vo-stage audio{width:min(420px,92vw)}
.vo-stage img,.vo-stage video{max-width:100%;max-height:100%;object-fit:contain;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}

.credit{text-align:center;font-size:12px;color:var(--muted);opacity:.8;margin-top:18px;letter-spacing:.02em}
.auth-form-wrap .credit{margin:18px 0 auto;flex:none}

/* friend requests */
.btn.sm{padding:6px 12px;font-size:13px;border-radius:10px;min-height:0}
.row-actions{display:flex;align-items:center;gap:4px;flex-shrink:0}
.sec-title{padding:14px 16px 6px;font-size:12px;font-weight: 600;letter-spacing: 0;text-transform: none;color:var(--muted);display:flex;align-items:center;gap:8px}
.sec-title .count{background:var(--panel-2);border-radius:10px;padding:1px 8px;font-size:11px}
.pill{font-size:12px;color:var(--muted);border:1px solid var(--border);border-radius:999px;padding:3px 10px}
.friend-gate{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:14px 16px;border-top:1px solid var(--border);background:var(--panel-2);font-size:14px}
.friend-gate>div:first-child{flex:1;min-width:200px}

/* profile photos, presence, look */
.avatar .photo{position:absolute;inset:0;width:100%;height:100%;border-radius:50%;object-fit:cover;-webkit-user-drag:none}
.avatar .dot{z-index:1}
.avatar-edit{position:relative;display:inline-block}.avatar-cam{position:absolute;right:-2px;bottom:-2px;width:32px;height:32px;border-radius:50%;background:var(--grad);color:#fff;display:grid;place-items:center;border:2px solid var(--panel)}.avatar-cam svg{width:16px;height:16px}
.head-id{display:flex;align-items:center;gap:12px;flex:1;min-width:0;cursor:pointer}.head-id .meta{min-width:0;flex:1}
.av-hit{display:inline-flex;cursor:pointer}
.modal.profile{display:grid;gap:10px;padding:26px;width:min(360px,92vw)}.modal.profile .about{background:var(--panel-2);border-radius:14px;padding:12px 14px;max-width:100%;overflow-wrap:anywhere;white-space:pre-wrap;font-size:14px}
.swatches,.walls{display:flex;gap:10px;flex-wrap:wrap}
.swatch{width:34px;height:34px;border-radius:50%;border:3px solid transparent;box-shadow:0 0 0 1px var(--border)}.swatch.sel{border-color:var(--text)}
.wall{width:58px;height:42px;border-radius:10px;border:2px solid var(--border);background-color:var(--panel-2);color:var(--muted);display:grid;place-items:center;font-size:12px;font-weight: 600}.wall svg{width:18px;height:18px}.wall.sel{border-color:var(--blue)}
.messages{background-image:var(--wall,none);background-size:var(--wall-size,auto);background-position:center}
/* message polish + voice notes */
.msg{touch-action:pan-y}
@media (pointer:coarse){.msg{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}}
.msg.reply-ready::before{content:"↩";position:absolute;left:-34px;top:50%;transform:translateY(-50%);width:26px;height:26px;border-radius:50%;background:var(--grad);color:#fff;display:grid;place-items:center;font-size:14px}
.msg.flash{animation:flash 1.6s ease}
@keyframes flash{0%,60%{box-shadow:0 0 0 3px var(--blue),0 0 24px var(--blue)}100%{box-shadow:0 1px 2px rgba(0,0,0,.18)}}
.msg .quote.clickable{cursor:pointer}.msg .quote.clickable:hover{background:rgba(127,127,127,.28)}
.to-latest{position:absolute;right:18px;bottom:92px;z-index:5;min-width:42px;height:42px;padding:0 10px;border-radius:21px;background:var(--panel);color:var(--text);border:1px solid var(--border);box-shadow:0 6px 20px rgba(0,0,0,.3);display:flex;align-items:center;justify-content:center;gap:6px}
.to-latest svg{width:20px;height:20px}.to-latest .cnt{background:var(--blue);color:#fff;border-radius:10px;min-width:20px;height:20px;padding:0 6px;font-size:12px;font-weight: 600;display:grid;place-items:center}
.mm-back{position:fixed;inset:0;z-index:300;background:rgba(0,0,0,.28)}
.msg-menu{position:fixed;z-index:301;width:min(300px,92vw);background:var(--panel);border:1px solid var(--border);border-radius:18px;box-shadow:0 16px 48px rgba(0,0,0,.45);padding:8px;display:grid;gap:6px}
.mm-react{display:flex;gap:2px;justify-content:space-between}.mm-e{font-size:24px;width:42px;height:42px;border-radius:50%}.mm-e:hover,.mm-more button:hover{background:var(--panel-2)}
.mm-more{display:grid;grid-template-columns:repeat(8,1fr);gap:2px;max-height:150px;overflow:auto;border-top:1px solid var(--border);padding-top:6px}.mm-more button{font-size:21px;height:36px;border-radius:10px}
.mm-acts{display:grid;border-top:1px solid var(--border);padding-top:4px}.mm-act{display:flex;gap:12px;align-items:center;padding:10px 12px;border-radius:10px;font-size:15px;text-align:left}.mm-act:hover{background:var(--panel-2)}.mm-act svg{width:18px;height:18px}.mm-act.danger{color:var(--red)}
.voice{display:flex;align-items:center;gap:10px;min-width:210px;max-width:100%;padding:2px 0}.voice.pending{opacity:.7;font-size:13px}
.vp-play{width:38px;height:38px;border-radius:50%;background:var(--grad);color:#fff;display:grid;place-items:center;flex:none}.vp-play svg{width:16px;height:16px;fill:currentColor}
.vp-mid{flex:1;min-width:0}.wave{display:flex;align-items:center;gap:2px;height:34px;cursor:pointer}.wave i{flex:1;min-width:2px;border-radius:2px;background:currentColor;opacity:.35;transition:opacity .1s}.wave i.on{opacity:1;background:var(--blue)}
.msg.me .wave i.on{background:#fff}.wave:focus-visible{outline:2px solid var(--blue);outline-offset:2px;border-radius:6px}
.vp-row{display:flex;justify-content:space-between;align-items:center;font-size:11px;opacity:.85}.vp-speed{background:rgba(127,127,127,.28);border-radius:10px;padding:1px 8px;font-weight: 600;font-size:11px}
/* status / stories */
.story-ring{position:relative;display:inline-flex;padding:3px;border-radius:50%;background:var(--grad);flex:none}.story-ring .avatar{border:2px solid var(--panel)}
.story-ring.seen{background:var(--border)}.story-ring.none{background:transparent;border:2px dashed var(--border);padding:1px}
.story-plus{position:absolute;right:-2px;bottom:-2px;width:20px;height:20px;border-radius:50%;background:var(--grad);color:#fff;display:grid;place-items:center;border:2px solid var(--panel)}.story-plus svg{width:12px;height:12px}
.sc-tabs{display:flex;gap:6px;background:var(--panel-2);padding:4px;border-radius:12px}.sc-tab{flex:1;padding:8px;border-radius:9px;font-weight:600;font-size:14px;color:var(--muted)}.sc-tab.on{background:var(--panel);color:var(--text);box-shadow:0 1px 4px rgba(0,0,0,.2)}
.sc-stage{display:grid;gap:10px}.sc-card{border-radius:18px;min-height:220px;display:grid;place-items:center;padding:16px}.sc-text{width:100%;background:transparent;border:0;color:#fff;font-size:24px;font-weight: 600;text-align:center;resize:none;outline:none}.sc-text::placeholder{color:rgba(255,255,255,.7)}
.sc-pick{border:2px dashed var(--border);border-radius:18px;min-height:220px;display:grid;place-items:center;color:var(--muted);overflow:hidden}.sc-pick img,.sc-pick video{max-width:100%;max-height:300px;border-radius:12px}.sc-pick svg{width:30px;height:30px;display:block;margin:0 auto 8px}
.story-viewer{position:fixed;inset:0;z-index:110;background:#05070f;color:#fff;display:flex;flex-direction:column;align-items:center;outline:0;user-select:none;-webkit-user-select:none}
.sv-bars{display:flex;gap:4px;width:min(480px,100%);padding:10px 12px 0;z-index:3}.sv-bars span{flex:1;height:3px;border-radius:2px;background:rgba(255,255,255,.3);overflow:hidden}.sv-bars i{display:block;height:100%;width:0;background:#fff}
.sv-head{display:flex;align-items:center;gap:10px;width:min(480px,100%);padding:10px 12px;z-index:3}.sv-who{display:grid;line-height:1.2}.sv-who span{font-size:12px;opacity:.75}.sv-spacer{flex:1}
.sv-act{display:flex;gap:6px;align-items:center;padding:6px 10px;border-radius:14px;background:rgba(255,255,255,.14);font-size:13px}.sv-act svg{width:16px;height:16px}.sv-icon{color:#fff}
.sv-stage{position:relative;flex:1;width:min(480px,100%);min-height:0;display:grid;place-items:center;border-radius:18px;overflow:hidden;touch-action:manipulation}
.sv-stage img,.sv-stage video{max-width:100%;max-height:100%;object-fit:contain;-webkit-touch-callout:none}
.sv-text{width:100%;height:100%;display:grid;place-items:center;padding:28px;text-align:center;font-size:clamp(22px,5vw,32px);font-weight: 600;overflow-wrap:anywhere;white-space:pre-wrap}
.sv-load{opacity:.7}.sv-cap{width:min(480px,100%);padding:12px 16px calc(14px + env(safe-area-inset-bottom));text-align:center;background:linear-gradient(transparent,rgba(0,0,0,.6));z-index:3}
.story-viewer.paused .sv-bars .cur i{opacity:.6}
.sv-sheet{position:absolute;left:0;right:0;bottom:0;max-height:60%;overflow:auto;background:var(--panel);color:var(--text);border-radius:20px 20px 0 0;padding:8px 0 16px;z-index:5;width:min(480px,100%);margin:0 auto}.sv-sheet-h{display:flex;justify-content:space-between;align-items:center;padding:8px 16px}

/* call extras */
.cbtn.active{background:var(--grad)!important;color:#fff}
.recon{position:absolute;inset:0;z-index:6;display:grid;place-content:center;justify-items:center;gap:10px;text-align:center;padding:24px;background:rgba(5,8,18,.72);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.recon b{font-size:20px}.recon span{opacity:.8;max-width:320px;font-size:14px}
.spin{width:44px;height:44px;border-radius:50%;border:4px solid rgba(255,255,255,.25);border-top-color:#fff;animation:spin 0.9s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.tile.recon::after{content:"";position:absolute;inset:0;background:rgba(5,8,18,.45);z-index:1}
.tile.recon::before{content:"";position:absolute;left:50%;top:50%;width:30px;height:30px;margin:-15px;border-radius:50%;border:3px solid rgba(255,255,255,.3);border-top-color:#fff;animation:spin .9s linear infinite;z-index:2}
.tile.pip{cursor:grab}.tile.pip:active{cursor:grabbing}
@media (hover: none) { .msg .actions, .msg:hover .actions { display: none !important; } }

/* ===== batch A: feel & organisation ===== */
[data-theme="oled"] { --bg:#000; --panel:#050507; --panel-2:#0f1015; --text:#eceff8; --muted:#8a8fa3; --border:rgba(255,255,255,.09); --bubble-in:#14161d; --bubble-out:#2a4fd6; --bubble-out-text:#fff; --shadow:0 10px 40px rgba(0,0,0,.85); --chat-bg:#000; }
.seg { display:grid; grid-template-columns:repeat(4,1fr); gap:4px; background:var(--panel-2); padding:4px; border-radius:12px; margin-top:6px; }
.seg-b { padding:8px 4px; border-radius:9px; font-size:13px; color:var(--muted); } .seg-b.sel { background:var(--grad); color:#fff; font-weight:600; }
.quiet-times { display:flex; gap:12px; flex-wrap:wrap; } .quiet-times label { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:13px; }
.quiet-times .input { width:auto; }
/* typing / recording */
.tdots { display:inline-flex; gap:3px; align-items:center; margin-left:4px; vertical-align:middle; }
.tdots i { width:5px; height:5px; border-radius:50%; background:currentColor; opacity:.35; animation:tdot 1.1s infinite ease-in-out; }
.tdots i:nth-child(2) { animation-delay:.15s; } .tdots i:nth-child(3) { animation-delay:.3s; }
@keyframes tdot { 0%,60%,100% { transform:translateY(0); opacity:.35; } 30% { transform:translateY(-4px); opacity:1; } }
.msg.typing-bubble { background:var(--bubble-in); border-radius:18px; border-bottom-left-radius:6px; padding:12px 14px; width:fit-content; color:var(--muted); display:flex; gap:8px; align-items:center; }
.msg.typing-bubble .tdots { margin:0; } .rec-lbl { font-size:12px; color:var(--red); }
/* chat polish */
.body.jumbo { font-size:44px; line-height:1.15; }
.msg .body mark { background:rgba(245,158,11,.45); color:inherit; border-radius:4px; padding:0 2px; }
.messages { animation:fade .2s ease; }
.msg.sk { background:var(--bubble-in); border-radius:18px; padding:14px; width:fit-content; margin:6px 0; opacity:.7; } .msg.sk.me { margin-left:auto; background:var(--bubble-out); opacity:.35; }
.msg.sk i { display:block; height:12px; border-radius:6px; background:linear-gradient(90deg,rgba(127,127,127,.15) 25%,rgba(127,127,127,.35) 37%,rgba(127,127,127,.15) 63%); background-size:400% 100%; animation:shimmer 1.4s infinite; }
.empty-art { display:grid; justify-items:center; gap:6px; text-align:center; padding:36px 24px; color:var(--muted); } .empty-art b { color:var(--text); font-size:16px; margin-top:6px; }
.messages > .empty-art { margin:auto; }
.row .time { display:inline-flex; gap:6px; align-items:center; } .mini { display:inline-grid; width:13px; height:13px; color:var(--muted); } .mini svg { width:13px; height:13px; }
.unread.muted { background:var(--muted); }
.arch-row { width:100%; text-align:left; display:flex; align-items:center; gap:14px; } .arch-ic { width:22px; height:22px; color:var(--blue); display:grid; } .arch-ic svg { width:22px; height:22px; }
.msg-menu.plain .mm-acts { border-top:0; padding-top:0; } .msg-menu.plain { min-width:200px; }
.csearch { display:flex; align-items:center; gap:6px; padding:8px 12px; border-bottom:1px solid var(--border); background:var(--panel); } .csearch .input { flex:1; padding:8px 12px; } .cs-info { font-size:12px; color:var(--muted); white-space:nowrap; }
/* gallery */
.gal-modal { max-width:520px; width:calc(100vw - 24px); max-height:86vh; display:grid; grid-template-rows:auto auto minmax(0,1fr) auto auto; gap:10px; }
.gtabs { display:flex; gap:6px; } .gtab { padding:7px 14px; border-radius:999px; background:var(--panel-2); font-size:13px; color:var(--muted); } .gtab.sel { background:var(--grad); color:#fff; }
.gal { overflow:auto; display:grid; grid-template-columns:repeat(3,1fr); gap:6px; align-content:start; min-height:120px; }
.gal > .grow, .gal > .empty-art { grid-column:1/-1; }
.gcell { position:relative; aspect-ratio:1; border-radius:10px; overflow:hidden; background:var(--panel-2); padding:0; } .gcell img,.gcell video { width:100%; height:100%; object-fit:cover; display:block; }
.gplay { position:absolute; inset:0; display:grid; place-items:center; color:#fff; background:rgba(0,0,0,.25); } .gplay svg { width:28px; height:28px; fill:#fff; }
.grow { display:grid; gap:4px; padding:10px 12px; border-radius:12px; background:var(--panel-2); text-decoration:none; color:inherit; word-break:break-all; } .grow.file { grid-template-columns:auto 1fr; align-items:center; gap:10px; }
.lightbox { z-index:130; }
/* burst + confetti */
.burst { position:fixed; inset:0; pointer-events:none; overflow:hidden; z-index:125; }
.cf { position:absolute; top:-12px; width:9px; height:14px; border-radius:2px; animation:cfall 2.4s linear forwards; }
@keyframes cfall { to { transform:translate(var(--dx),105vh) rotate(var(--r)); opacity:.9; } }
.fl { position:absolute; bottom:-40px; animation:floaty 2.6s ease-out forwards; }
@keyframes floaty { 0% { transform:translate(0,0) scale(.6); opacity:0; } 15% { opacity:1; } 100% { transform:translate(var(--dx),-85vh) scale(1.2); opacity:0; } }
/* tour */
.tour { text-align:center; display:grid; gap:12px; justify-items:center; max-width:360px; } .tour-ic { width:64px; height:64px; border-radius:20px; background:var(--grad); color:#fff; display:grid; place-items:center; } .tour-ic svg { width:30px; height:30px; }
.tour-dots { display:flex; gap:6px; } .tour-dots i { width:7px; height:7px; border-radius:50%; background:var(--border); } .tour-dots i.on { background:var(--blue); width:20px; border-radius:6px; }
.tour > div:last-child { width:100%; }
@media (prefers-reduced-motion: reduce) { .tdots i, .messages, .msg.sk i { animation:none; } }

/* ===== batch D1 ===== */
.mood-chip { display:inline-block; margin-left:8px; padding:1px 8px; border-radius:999px; font-size:11px; font-weight:600; background:var(--panel-2); color:var(--blue); vertical-align:middle; border:1px solid var(--border); }
.streak { margin-left:6px; font-size:12px; font-weight: 600; color:var(--amber); white-space:nowrap; }
.moods { display:flex; flex-wrap:wrap; gap:8px; } .mood-opt { padding:7px 12px; border-radius:999px; background:var(--panel-2); font-size:13px; border:1px solid var(--border); } .mood-opt.sel { background:var(--grad); color:#fff; border-color:transparent; }
.row { touch-action:pan-y; transition:transform .15s ease, background .15s; } .row.sw-arch { background:rgba(245,158,11,.18); } .row.sw-pin { background:rgba(47,107,255,.18); }
.modal .swatches, .modal .walls { margin:6px 0 10px; }

/* ===== batch B ===== */
.fwd { display:flex; align-items:center; gap:5px; font-size:12px; font-style:italic; opacity:.75; margin-bottom:2px; } .fwd svg { width:13px; height:13px; }
.msg .body a.link { color:inherit; text-decoration:underline; word-break:break-all; }
.lp { display:grid; margin-top:6px; border-radius:12px; overflow:hidden; background:rgba(127,127,127,.16); text-decoration:none; color:inherit; max-width:320px; border:1px solid var(--border); }
.lp-img { width:100%; max-height:170px; object-fit:cover; display:block; } .lp-t { padding:8px 10px; display:grid; gap:2px; } .lp-site { font-size:11px; opacity:.7; text-transform: none; letter-spacing: 0; } .lp-d { font-size:12.5px; opacity:.85; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.trans { margin-top:6px; padding:6px 8px; border-radius:10px; background:rgba(127,127,127,.18); font-size:14px; display:flex; gap:6px; align-items:flex-start; } .trans svg { width:14px; height:14px; flex:none; margin-top:3px; opacity:.7; }
.foot svg { width:12px; height:12px; vertical-align:-2px; opacity:.75; margin-right:3px; } .star-on { color:var(--amber); } .star-on svg { fill:currentColor; opacity:1; }
.sticker { display:grid; justify-items:center; gap:2px; padding:4px 10px; } .st-e { font-size:76px; line-height:1.05; filter:drop-shadow(0 4px 8px rgba(0,0,0,.25)); } .st-l { font-size:12px; font-weight: 600; letter-spacing: 0; text-transform: none; padding:2px 10px; border-radius:999px; background:var(--grad); color:#fff; }
.msg:has(> .sticker) { background:transparent !important; box-shadow:none !important; } .msg:has(> .sticker) .foot { color:var(--muted); }
.gif { max-width:260px; width:100%; border-radius:12px; display:block; } .msg:has(> .gif) { padding:4px; }
.loc { display:flex; gap:10px; align-items:center; text-decoration:none; color:inherit; padding:6px 4px; min-width:200px; } .loc-ic { width:40px; height:40px; border-radius:12px; background:var(--grad); color:#fff; display:grid; place-items:center; } .loc-ic svg { width:20px; height:20px; }
.poll { display:grid; gap:6px; min-width:230px; max-width:320px; padding:2px; } .poll-q { font-size:15px; }
.poll-o { position:relative; display:flex; justify-content:space-between; gap:10px; align-items:center; padding:9px 12px; border-radius:10px; background:rgba(127,127,127,.18); text-align:left; overflow:hidden; border:1px solid transparent; } .poll-o.mine { border-color:var(--blue); } .poll-o:disabled { cursor:default; opacity:.85; }
.poll-bar { position:absolute; left:0; top:0; bottom:0; background:rgba(47,107,255,.28); transition:width .3s; } .poll-t,.poll-n { position:relative; } .poll-n { font-weight: 600; }
.st-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; max-height:50vh; overflow:auto; } .st-pick { display:grid; justify-items:center; gap:2px; padding:8px 4px; border-radius:14px; background:var(--panel-2); } .st-pick:hover { background:var(--border); } .st-pick .st-e { font-size:38px; }  .st-pick .st-l { font-size:10px; }
.gif-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; overflow:auto; align-content:start; min-height:140px; } .gif-pick { padding:0; border-radius:10px; overflow:hidden; aspect-ratio:1; background:var(--panel-2); } .gif-pick img { width:100%; height:100%; object-fit:cover; }
.poll-opts { display:grid; gap:8px; margin:8px 0; } .fw-list { overflow:auto; display:grid; align-content:start; gap:2px; min-height:100px; } .fw-row { display:flex; align-items:center; gap:12px; cursor:pointer; } .star-row { text-align:left; width:100%; }
.smart { display:flex; gap:8px; padding:6px 12px 0; overflow-x:auto; } .chip-q { padding:7px 14px; border-radius:999px; background:var(--panel-2); border:1px solid var(--border); font-size:13px; white-space:nowrap; } .chip-q:hover { background:var(--grad); color:#fff; border-color:transparent; }
.dis-hint svg { width:14px; height:14px; }

/* ===== batch E1 ===== */
.undo-chip { position:fixed; left:50%; bottom:92px; transform:translateX(-50%); z-index:140; display:flex; align-items:center; gap:14px; padding:10px 10px 10px 18px; border-radius:999px; background:var(--panel-2); color:var(--text); box-shadow:var(--shadow); border:1px solid var(--border); animation:pop .2s ease; overflow:hidden; }
.undo-chip button { padding:6px 14px; border-radius:999px; background:var(--grad); color:#fff; font-weight: 600; } .undo-chip::after { content:""; position:absolute; left:0; bottom:0; height:3px; background:var(--grad); animation:undoBar 5s linear forwards; } @keyframes undoBar { from { width:100%; } to { width:0; } }
.pinbar { display:flex; align-items:center; gap:4px; padding:4px 8px 4px 12px; background:var(--panel); border-bottom:1px solid var(--border); } .pin-main { flex:1; min-width:0; display:flex; align-items:center; gap:8px; text-align:left; padding:6px 4px; border-left:3px solid var(--blue); padding-left:10px; border-radius:2px; }
.pin-ic { width:16px; height:16px; color:var(--blue); display:grid; flex:none; } .pin-ic svg { width:16px; height:16px; } .pin-n { font-size:11px; color:var(--muted); flex:none; } .pin-t { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13.5px; }
.rem-banner { position:fixed; top:14px; left:50%; transform:translateX(-50%); z-index:150; display:flex; align-items:center; gap:12px; max-width:min(520px,calc(100vw - 24px)); padding:12px 14px; border-radius:16px; background:var(--panel); border:1px solid var(--amber); box-shadow:var(--shadow); animation:pop .25s ease; } .rem-banner > span { width:22px; height:22px; color:var(--amber); display:grid; flex:none; } .rem-banner svg { width:22px; height:22px; }
.rem-t { flex:1; min-width:0; } .rem-t div { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); font-size:13px; }
.when { display:grid; gap:10px; } .later-row { grid-template-columns:1fr auto; align-items:center; } .quote { padding:8px 10px; border-left:3px solid var(--blue); background:var(--panel-2); border-radius:8px; font-size:13.5px; word-break:break-word; }
.msg-menu .mm-acts { max-height:48vh; overflow-y:auto; } .saved-row { cursor:pointer; }

/* i18n: language picker + right-to-left layouts (Arabic, Urdu) */
.auth-lang { display: flex; justify-content: center; }
.auth-lang .input { width: auto; min-width: 9rem; }
html[dir="rtl"] .icon-back, html[dir="rtl"] .back svg { transform: scaleX(-1); }
html[dir="rtl"] .msg .body, html[dir="rtl"] .input { unicode-bidi: plaintext; }

/* ---- Batch C: call reactions/hand/captions/presenter/lobby, meetings, QR, group info ---- */
.controls.more { flex-wrap: wrap; justify-content: center; max-width: 94vw; }
.cbtn.active { background: var(--blue); color: #fff; }
.cbtn:disabled { opacity: .45; }
.react-pop { position: absolute; left: 50%; bottom: 168px; transform: translateX(-50%); display: flex; gap: 4px; padding: 6px 8px; border-radius: 999px; background: rgba(12,18,48,.92); border: 1px solid rgba(255,255,255,.14); z-index: 6; }
.react-btn { font-size: 26px; line-height: 1; background: none; border: 0; padding: 6px; border-radius: 50%; cursor: pointer; transition: transform .12s; }
.react-btn:hover, .react-btn:focus-visible { transform: scale(1.25); background: rgba(255,255,255,.1); }
.float-react { position: absolute; left: 50%; bottom: 14%; font-size: 40px; pointer-events: none; z-index: 5; animation: floatup 2.2s ease-out forwards; }
@keyframes floatup { 0% { transform: translate(-50%, 0) scale(.6); opacity: 0; } 12% { opacity: 1; transform: translate(-50%, -10px) scale(1.1); } 100% { transform: translate(calc(-50% + var(--dx, 0px)), -220px) scale(1); opacity: 0; } }
.thand { display: none; margin-inline-start: 6px; font-size: 16px; }
.tile.hand .thand { display: inline; animation: wave .9s ease-in-out infinite alternate; }
.tile.hand { outline: 3px solid #fbbf24; outline-offset: -3px; }
@keyframes wave { from { transform: rotate(-12deg); } to { transform: rotate(14deg); } }
.tiles.stage .tile.presenter video { object-fit: contain; background: #05070f; }
.cbanner { position: absolute; top: 64px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; align-items: center; padding: 6px 8px 6px 14px; border-radius: 999px; background: rgba(34,197,94,.92); color: #fff; font-size: 13px; z-index: 6; }
.caps { position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%); width: min(720px, 92vw); display: grid; gap: 4px; z-index: 5; pointer-events: none; }
.caps .cap { background: rgba(0,0,0,.72); color: #fff; padding: 6px 12px; border-radius: 10px; font-size: 16px; line-height: 1.35; }
.lobby { position: absolute; top: 64px; right: 12px; width: min(300px, 90vw); display: grid; gap: 8px; padding: 12px; border-radius: 16px; background: rgba(12,18,48,.94); border: 1px solid rgba(255,255,255,.14); color: #fff; z-index: 7; }
.lobby-row { display: flex; align-items: center; gap: 8px; } .lobby-row .lname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call.waiting .spin.big { width: 54px; height: 54px; margin: 0 auto 10px; }
.meetings { padding-bottom: 6px; } .meeting-actions { display: flex; gap: 8px; padding: 6px 16px 10px; }
.qr-box { display: grid; place-items: center; background: #fff; border-radius: 16px; padding: 8px; justify-self: center; } .qr-box svg { max-width: 100%; height: auto; display: block; } .qr-box.small svg { width: 150px; }
.scan-video { width: 100%; max-height: 300px; border-radius: 14px; background: #000; object-fit: cover; }
.link-code { font: 700 30px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .16em; text-align: center; padding: 2px 0 4px; user-select: all; }
.link-card .qr-box svg { width: min(230px, 100%); } .link-ask { display: grid; gap: 8px; margin: 8px 0 14px; } .link-dev { font-weight: 600; font-size: 17px; }
.dev-list { display: grid; gap: 8px; margin: 10px 0; } .dev-item { align-items: center; gap: 10px; }
.check-row { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.role { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); color: var(--muted); } .role.owner { background: #fbbf2433; color: #f59e0b; } .role.admin { background: #6366f133; color: #818cf8; }
.ginfo-top { display: grid; gap: 10px; justify-items: center; text-align: center; } .ginfo-top .input { width: 100%; }
.member-row { gap: 8px; } .member-row .meta { min-width: 0; } .members { display: grid; gap: 2px; }
.invite-card { gap: 8px; justify-items: center; } .invite-card .input { width: 100%; font-size: 12px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; } .danger-t { color: var(--red); }
@media (max-width: 760px) { .react-pop { bottom: 188px; } .caps { bottom: 176px; } .lobby { top: 58px; right: 8px; } }

/* ===== Batch F/G/H ===== */
.recbar{position:fixed;left:50%;transform:translateX(-50%);bottom:84px;z-index:60;display:flex;align-items:center;gap:10px;padding:8px 12px;border-radius:999px;background:var(--panel);color:var(--text);box-shadow:0 6px 24px rgba(0,0,0,.25);max-width:calc(100vw - 24px);flex-wrap:wrap;justify-content:center}
.rdot{width:10px;height:10px;border-radius:50%;background:#ef4444;animation:rpulse 1s infinite}@keyframes rpulse{50%{opacity:.25}}
.rt{font-variant-numeric:tabular-nums;font-weight: 600}.rhint{font-size:12px;opacity:.75;display:inline-flex;align-items:center}.rhint svg{width:16px;height:16px}
.recbar .btn.on{background:var(--blue);color:#fff}
.vtx{display:flex;gap:6px;align-items:flex-start;font-size:13px;margin-top:4px;opacity:.95}.vtx svg{width:14px;height:14px;flex:none;margin-top:2px}.vtx-b{padding:2px 10px}
.watchpanel{position:fixed;z-index:90;top:64px;right:12px;width:340px;max-width:calc(100vw - 24px);background:var(--panel);color:var(--text);border-radius:14px;box-shadow:0 10px 36px rgba(0,0,0,.3);padding:10px;display:grid;gap:8px}
.wt-head{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.wt-title{display:flex;align-items:center;gap:6px}.wt-title svg{width:18px;height:18px}
.wt-media{width:100%;aspect-ratio:16/9;background:#000;border-radius:10px;overflow:hidden}.wt-media iframe,.wt-el{width:100%;height:100%}audio.wt-el{height:54px}.wt-media:has(audio){aspect-ratio:auto;background:transparent}
.livebar{position:fixed;z-index:70;top:8px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:14px;background:#059669;color:#fff;box-shadow:0 6px 20px rgba(0,0,0,.3);max-width:calc(100vw - 16px);flex-wrap:wrap;font-size:13px}.livebar svg{width:16px;height:16px}.livebar .btn{background:#fff;color:#065f46}.livebar .btn.ghost{background:transparent;color:#fff;border:1px solid #fff8}
.minimap{position:relative;width:240px;max-width:100%;height:150px;border-radius:10px;overflow:hidden;background:#dbe4ea}.mm-in{position:absolute;width:768px;height:768px}.mm-in img{position:absolute;width:256px;height:256px}
.mm-pin{position:absolute;left:50%;top:50%;width:16px;height:16px;margin:-8px 0 0 -8px;border-radius:50%;background:#2f6bff;border:3px solid #fff;box-shadow:0 0 0 6px rgba(47,107,255,.25)}.mm-attr{position:absolute;right:4px;bottom:2px;font-size:9px;background:rgba(255,255,255,.75);color:#333;padding:0 3px;border-radius:3px}
.livec{display:grid;gap:6px}.livec-t{display:flex;align-items:center;gap:6px}.livec-t svg{width:16px;height:16px}.livec.ended{opacity:.8}
.wrap-box{display:grid;gap:10px;justify-items:center}.wrap-canvas{width:min(100%,320px);height:auto;border-radius:14px}.seg{display:flex;gap:6px}.seg-b{border:1px solid var(--border);background:transparent;color:inherit;border-radius:999px;padding:4px 12px}.seg-b.sel{background:var(--blue);color:#fff;border-color:transparent}
.dq,.dq-q{display:flex;align-items:center;gap:6px}.dq{margin-bottom:4px;font-size:12px;opacity:.9}.dq svg{width:16px;height:16px}.dq-q{font-size:18px;font-weight: 600;padding:8px 0}
.games-pick{display:grid;gap:8px}.gp{display:grid;gap:4px;text-align:left;padding:10px 12px;border-radius:12px;border:1px solid var(--border);background:transparent;color:inherit;cursor:pointer}
.game{display:grid;gap:6px;min-width:200px}.ttt-grid{display:grid;grid-template-columns:repeat(3,52px);gap:4px}.ttt-c{width:52px;height:52px;font-size:24px;font-weight: 600;border-radius:8px;border:1px solid var(--border);background:rgba(255,255,255,.12);color:inherit;cursor:pointer}.ttt-c:disabled{cursor:default}.ttt-c.win{background:#22c55e;color:#fff}
.wg-word{display:flex;gap:6px}.wg-word span{display:inline-block;min-width:22px;height:28px;border-bottom:3px solid currentColor;text-align:center;font-weight: 600;font-size:20px}.wg-keys{display:flex;flex-wrap:wrap;gap:3px;max-width:260px}.wg-k{width:26px;height:28px;border-radius:6px;border:1px solid var(--border);background:rgba(255,255,255,.12);color:inherit;text-transform:uppercase;font-size:12px;cursor:pointer}.wg-k:disabled{opacity:.3}
.qz-score{font-size:22px;font-weight: 600}.qz-q{font-weight:600}
.ask-sec{display:grid;gap:6px;width:100%;text-align:left}.ask-a,.ask-i{display:grid;gap:4px;padding:8px;border-radius:10px;background:rgba(127,127,127,.12)}.ask-q{font-weight:600}
.cemoji{width:20px;height:20px;vertical-align:middle;object-fit:contain}.cemoji.big{width:36px;height:36px}.emoji-list{display:grid;gap:6px;max-height:40vh;overflow:auto}.emoji-i{display:flex;align-items:center;gap:8px}.emoji-i code{flex:1}
.study{display:grid;gap:10px}.st-clock{display:grid;justify-items:center;padding:12px;border-radius:14px;background:rgba(127,127,127,.12)}.st-clock.focus{background:rgba(239,68,68,.15)}.st-clock.break{background:rgba(34,197,94,.18)}.st-phase{font-weight: 600;text-transform: none;letter-spacing: 0;font-size:12px}.st-time{font-size:48px;font-weight: 600;font-variant-numeric:tabular-nums}
.st-members{display:flex;gap:6px;flex-wrap:wrap}.st-chip{display:inline-flex;align-items:center;gap:6px}.st-ctl,.st-cfg{display:flex;gap:8px;flex-wrap:wrap}.st-log{height:110px;overflow:auto;border:1px solid var(--border);border-radius:10px;padding:6px;font-size:13px}
.mood-chip.study{background:#fef3c7;color:#92400e}
.board-list{display:grid;gap:6px;max-height:42vh;overflow:auto}.bd{display:flex;gap:8px;align-items:flex-start;padding:8px;border-radius:10px;background:rgba(127,127,127,.12)}.bd.done .bd-m b{text-decoration:line-through;opacity:.6}.bd-m{flex:1;display:grid;gap:2px;min-width:0;overflow-wrap:anywhere}.bd-due{display:flex;align-items:center;gap:4px;font-size:12px}.bd-due svg{width:14px;height:14px}.bd-due.late{color:#ef4444;font-weight: 600}.bd-add{display:grid;gap:6px;margin-top:8px}
.tt-row{display:grid;grid-template-columns:70px 1fr 1fr;gap:6px;align-items:center}.tt-row input[aria-label=Subject]{grid-column:1/3}
@media (max-width:640px){.watchpanel{top:56px;right:12px;left:12px;width:auto}.recbar{bottom:78px}}
.msg-menu.plain{max-height:calc(100vh - 16px);overflow-y:auto}

/* ===== big group calls ===== */
.bigcall{position:fixed;inset:0;z-index:200;background:#0b1020;color:#fff;display:flex;flex-direction:column;gap:8px;padding:10px 10px calc(10px + env(safe-area-inset-bottom))}
.bc-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.bc-head .btn{color:#fff;border-color:#fff4}
.bgrid{flex:1;min-height:0;display:grid;gap:6px;grid-template-columns:repeat(4,1fr);grid-auto-rows:1fr}.bgrid.n1{grid-template-columns:1fr}.bgrid.n2,.bgrid.n3,.bgrid.n4{grid-template-columns:repeat(2,1fr)}.bgrid.n5,.bgrid.n6,.bgrid.n7,.bgrid.n8,.bgrid.n9{grid-template-columns:repeat(3,1fr)}
.btile{position:relative;background:#18233f;border-radius:12px;overflow:hidden;display:grid;place-items:center;min-height:0;outline:3px solid transparent;transition:outline-color .15s}.btile.speaking{outline-color:#22c55e}.btile video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.bt-av{width:clamp(40px,30%,84px);aspect-ratio:1;border-radius:50%;background:var(--grad);display:grid;place-items:center;font-weight: 600;font-size:clamp(18px,3vw,34px)}.bt-n{position:absolute;left:6px;bottom:6px;background:rgba(0,0,0,.55);padding:2px 8px;border-radius:999px;font-size:12px;max-width:90%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bstage{position:relative;flex:2;min-height:0;background:#000;border-radius:12px;overflow:hidden}.bstage video{width:100%;height:100%;object-fit:contain}.bstage~.bgrid{flex:1}
.bc-bar{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}.bpeople{max-height:22vh;overflow:auto;display:flex;flex-wrap:wrap;gap:6px}.bp{background:rgba(255,255,255,.1);padding:3px 10px;border-radius:999px;font-size:13px}
.bigbar{display:flex;align-items:center;gap:8px;padding:8px 12px;background:#059669;color:#fff;font-size:14px}.bigbar svg{width:18px;height:18px}.bb-t{flex:1}.bigbar .btn{background:#fff;color:#065f46}
@media (max-width:640px){.bgrid,.bgrid.n3,.bgrid.n4{grid-template-columns:repeat(2,1fr)}.bgrid.n1{grid-template-columns:1fr}.bgrid.n5,.bgrid.n6{grid-template-columns:repeat(2,1fr)}}
.icon-btn.blocked-on{color:#ef4444}

/* ===== encryption ===== */
.enc-note{display:flex;gap:8px;align-items:flex-start;margin:8px auto 12px;max-width:min(520px,92%);padding:8px 12px;border-radius:12px;background:rgba(245,158,11,.14);color:var(--text);font-size:12.5px;text-align:left;border:1px solid rgba(245,158,11,.3)}.enc-note.on{background:rgba(34,197,94,.13);border-color:rgba(34,197,94,.35)}.enc-note svg{width:15px;height:15px;flex:none;margin-top:1px}
.enc-chip{display:inline-flex;vertical-align:middle;margin-left:4px;color:#22c55e}.enc-chip svg{width:13px;height:13px}.msg.me .foot .enc-chip{color:inherit;opacity:.8}
.safety{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:17px;letter-spacing:.04em;line-height:1.7;background:rgba(127,127,127,.12);padding:10px 12px;border-radius:10px;word-spacing:.3em}.enc-info{display:grid;gap:8px}

/* ---- status replies, voice typing, backgrounds, festivals ---- */
.sv-reply{width:min(480px,100%);padding:8px 12px calc(10px + env(safe-area-inset-bottom));display:grid;gap:8px;background:linear-gradient(transparent,rgba(0,0,0,.55));z-index:4}
.sv-emojis{display:flex;gap:6px;align-items:center;justify-content:center;flex-wrap:wrap}.sv-e{font-size:24px;padding:4px 8px;border-radius:50%;background:rgba(255,255,255,.12)}.sv-e.on{background:rgba(255,255,255,.4);transform:scale(1.15)}
.sv-say{display:flex;gap:8px}.sv-say .input{flex:1;background:rgba(255,255,255,.14);color:#fff;border-color:rgba(255,255,255,.3)}.sv-say .input::placeholder{color:rgba(255,255,255,.7)}
.sv-reply.owner{display:flex;justify-content:space-between;align-items:center;color:#fff}.sv-allow{font-size:13px;display:flex;gap:6px;align-items:center;color:#fff}
.sc-allow{font-size:13px;display:flex;gap:8px;align-items:center;color:var(--muted)}
.sv-float{position:fixed;left:50%;bottom:18%;font-size:64px;z-index:500;pointer-events:none;animation:svfloat 1.4s ease-out forwards}@keyframes svfloat{from{opacity:1;transform:translate(-50%,0) scale(.6)}to{opacity:0;transform:translate(-50%,-220px) scale(1.4)}}
.dict.on{color:#fff;background:var(--red);border-radius:50%;animation:dictpulse 1.2s infinite}@keyframes dictpulse{50%{box-shadow:0 0 0 6px rgba(239,68,68,.25)}}
.dict-hint{border-left-color:var(--red)}
.bgwrap{display:grid;gap:10px}.bggrid{display:flex;flex-wrap:wrap;gap:8px}.bgopt{width:46px;height:46px;border-radius:12px;border:3px solid transparent;box-shadow:0 0 0 1px var(--border);display:grid;place-items:center;font-size:18px;background:var(--panel-2);color:var(--text)}.bgopt.sel{border-color:var(--blue)}
.bgmask{display:grid;gap:4px}.bgsl{display:grid;grid-template-columns:90px 1fr;gap:8px;align-items:center;font-size:13px}.bg-note{font-size:12px;color:var(--muted)}
.pbg-stage{display:grid;place-items:center;background:#000;border-radius:12px;overflow:hidden}.pbg-canvas{max-width:100%;max-height:42vh}
.fest-list{display:grid;gap:6px}.fest-row{display:flex;gap:10px;align-items:center}.fest-row .meta{flex:1;min-width:0}.fest-sw{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;font-size:20px;flex:none}
.fest-strip{padding:14px;border-radius:12px;color:#fff;font-weight: 600;text-align:center}
.col-tpls{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}.col-t{padding:6px 8px;border-radius:10px;border:2px solid transparent;background:var(--panel-2);color:var(--muted)}.col-t.sel{border-color:var(--blue);color:var(--blue)}.col-mini{display:block;line-height:0}
.collage{display:grid;gap:10px}.col-stage{display:grid;place-items:center;background:#000;border-radius:12px;overflow:hidden}.col-canvas{max-height:38vh;max-width:100%;aspect-ratio:9/16;height:auto;width:auto}.col-slots{display:flex;gap:6px;flex-wrap:wrap;justify-content:center}
.bgopt.flt{font-size:11px}
.yt-search{display:grid;gap:8px}.yt-results{display:grid;gap:6px;max-height:34vh;overflow:auto}
.yt-r{display:flex;gap:10px;align-items:center;text-align:left;padding:6px;border-radius:10px;background:var(--panel-2);color:var(--text)}.yt-r img{width:96px;height:54px;object-fit:cover;border-radius:8px;flex:none}.yt-t{display:grid;gap:2px;min-width:0}.yt-t b{font-size:13px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.vsum{font-size:13px;padding:6px 8px;margin-bottom:4px;border-left:3px solid var(--violet);background:var(--panel-2);border-radius:8px}.vtx-row{display:flex;gap:6px;align-items:flex-start}
.dates{display:grid;gap:8px;width:100%;margin-block:6px}.date-card{display:flex;gap:10px;align-items:center;text-align:left;padding:10px 12px;border-radius:12px;background:var(--panel-2)}.date-ic{font-size:26px}.date-card .meta{flex:1}
.vtx:has(.vsum){flex-direction:column}

.atoast{display:flex;gap:10px;align-items:center;flex-wrap:wrap;justify-content:center;max-width:94vw}
.scan-modal{width:min(560px,96vw)!important;max-height:92vh;overflow:auto}.scan-body{display:grid;gap:10px}.scan-stage{display:grid;place-items:center;background:#000;border-radius:12px;overflow:hidden}.scan-canvas{max-width:100%;max-height:52vh;touch-action:none}
.scan-act{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.scan-modes{display:flex;gap:6px;flex-wrap:wrap}.scan-pages{display:flex;gap:8px;flex-wrap:wrap}.scan-th{position:relative}.scan-th canvas{border-radius:8px;border:1px solid var(--border);display:block}
.scan-n{position:absolute;left:4px;bottom:4px;background:rgba(0,0,0,.6);color:#fff;border-radius:8px;padding:0 6px;font-size:11px}.scan-x{position:absolute;right:2px;top:2px;background:rgba(0,0,0,.6);color:#fff;border-radius:50%;width:20px;height:20px;line-height:18px}
.ed-canvas{max-width:100%;max-height:46vh;touch-action:none;cursor:crosshair}.ed-tools{display:grid;gap:8px}.ed-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}

/* ===== mobile polish ===== */
.mob-hide { display: contents; }
html, body { height: 100%; } @supports (height: 100dvh) { html, body, #app, .shell, .auth { height: 100dvh; } }
body { overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
@media (max-width: 760px) {
  input, textarea, select { font-size: 16px; } /* stops iOS zooming into fields */
  .mob-hide { display: none !important; } .mob-hide.keep-on { display: contents !important; }
  .shell { grid-template-rows: minmax(0, 1fr) calc(60px + env(safe-area-inset-bottom)); }
  .rail { padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .shell { grid-template-columns: minmax(0, 1fr); } .rail .icon-btn, .rail button { min-width: 44px; min-height: 48px; }
  .icon-btn { width: 42px; height: 42px; }
  .chat-head { padding: 8px 8px; gap: 6px; padding-top: calc(8px + env(safe-area-inset-top)); }
  .chat-head .head-id { min-width: 0; flex: 1; } .chat-head .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .chat-head .icon-btn { width: 40px; height: 40px; flex: none; }
  .composer-wrap { padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); } .composer { gap: 4px; }
  .composer textarea { min-width: 0; padding: 10px 14px; }
  .messages { padding: 10px 8px; } .msg { max-width: 90%; }
  .list-pane { padding-top: env(safe-area-inset-top); }
  .row { min-height: 64px; }
  /* menus become bottom sheets you can reach with a thumb */
  .msg-menu.plain { left: 0 !important; right: 0; top: auto !important; bottom: 0; width: 100%; max-width: none; border-radius: 20px 20px 0 0; max-height: 72dvh; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); animation: sheet .2s ease-out; }
  .msg-menu.plain::before { content: ''; justify-self: center; width: 40px; height: 4px; border-radius: 4px; background: var(--border); margin: 0 0 4px; }
  .msg-menu.plain .mm-act { padding: 14px 12px; font-size: 16px; } .msg-menu.plain .mm-acts { max-height: none; }
  /* dialogs: bottom sheets too */
  .modal-back { place-items: end center; } .modal-back .modal { width: 100% !important; max-width: none; border-radius: 22px 22px 0 0; max-height: 92dvh; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); animation: sheet .22s ease-out; }
  .modal-back .modal.scan-modal { width: 100% !important; }
  .modal .btn, .btn { min-height: 44px; }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); max-width: 92vw; }
  .shell.chat-open ~ .toast, .chat-open .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .enc-note { font-size: 12.5px; padding: 8px 10px; }
}
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 380px) { .composer .icon-btn { width: 38px; height: 38px; } .chat-head .icon-btn { width: 36px; height: 36px; } }
@media (max-height: 480px) and (orientation: landscape) { .rail { flex-direction: row; } .msg-menu.plain { max-height: 90dvh; } }
select { color: var(--text); } select option { background: var(--panel); color: var(--text); }

/* ===== listen party ===== */
.partypanel { max-height: calc(100dvh - 130px); overflow: auto; width: 360px; }
.pp-dyn { display: grid; gap: 14px; }
.pp-holder { border-radius: 12px; overflow: hidden; background: #000; pointer-events: none; min-height: 200px; }
.pp-holder iframe { display: block; width: 100%; }
.pp-title { font-weight: 600; font-size: 17px; overflow-wrap: anywhere; }
.pp-bar { height: 10px; border-radius: 10px; background: var(--panel-2); overflow: hidden; margin-top: 10px; } .pp-bar i { display: block; height: 100%; width: 0; background: var(--grad); }
.partypanel.is-dj .pp-bar { cursor: pointer; } .partypanel:not(.is-dj) .pp-stop { display: none; }
.pp-time { margin-top: 4px; font-variant-numeric: tabular-nums; }
.pp-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; } .pp-who { flex: 1; min-width: 80px; }
.pp-tap { width: 100%; margin-top: 10px; } .pp-tap.hidden { display: none; }
.pp-add { display: grid; gap: 8px; } .pp-music { display: flex; gap: 6px; align-items: center; font-size: 14px; color: var(--muted); }
.pp-q { display: grid; gap: 8px; } .pp-list { display: grid; gap: 4px; max-height: 260px; overflow: auto; }
.pp-row { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-radius: 10px; } .pp-row.cur { background: var(--panel-2); } .pp-row.past { opacity: .55; }
.pp-n { width: 24px; text-align: center; color: var(--muted); font-size: 13px; flex: none; } .pp-rt { flex: 1; min-width: 0; display: grid; } .pp-rt b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; } .pp-eq i { display: block; flex: none; width: 3px; height: 8px; background: var(--blue, #38bdf8); border-radius: 2px; animation: ppeq 0.9s ease-in-out infinite; } .pp-eq i:nth-child(2) { animation-delay: .2s; } .pp-eq i:nth-child(3) { animation-delay: .4s; }
@keyframes ppeq { 0%, 100% { height: 4px; } 50% { height: 14px; } }
.yt-r .yt-act { flex: none; font-size: 13px; font-weight: 600; color: var(--blue, #38bdf8); padding: 0 6px; } .yt-r.done { opacity: .6; }
@media (max-width: 640px) { .partypanel { width: auto; max-height: calc(100dvh - 90px); } }

/* minimize a call and go back to messages */
.call-min{position:absolute;z-index:4;top:max(16px,env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));width:40px;height:40px;border-radius:50%;border:1px solid rgba(255,255,255,.14);background:rgba(10,15,35,.55);backdrop-filter:blur(12px);color:#fff;display:grid;place-items:center;cursor:pointer}
.call-min svg{width:22px;height:22px}.call-min:hover{background:rgba(255,255,255,.18)}
.tile.local.rear video{transform:none}
/* minimised: a small floating window over the chat, so you can see the call and read or reply at the same time. Tap it to open the call */
.call.min{touch-action:none;inset:auto;right:12px;bottom:calc(88px + env(safe-area-inset-bottom));width:116px;height:156px;z-index:69;border-radius:16px;border:2px solid rgba(255,255,255,.3);box-shadow:0 8px 28px rgba(0,0,0,.5);cursor:pointer}
.call.min>:not(.tiles):not(.call-bg){display:none!important}
.call.min .tiles{padding:0;gap:0;grid-template-columns:1fr!important;grid-template-rows:1fr!important}
.call.min .tile{border-radius:0;box-shadow:none}.call.min .tile:nth-child(n+2),.call.min .tile.pip,.call.min .tinfo,.call.min .tstate{display:none}
.callpill{position:fixed;z-index:70;top:max(10px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);display:flex;align-items:stretch;border-radius:999px;background:#12b76a;color:#fff;box-shadow:0 6px 24px rgba(0,0,0,.35);overflow:hidden;max-width:calc(100vw - 16px)}
.callpill.hidden{display:none}
.callpill button{border:0;background:transparent;color:inherit;font:inherit;cursor:pointer}
.cp-main{display:flex;align-items:center;gap:8px;padding:9px 14px;font-weight:600;font-size:14px;white-space:nowrap;min-height:44px}
.cp-n{overflow:hidden;text-overflow:ellipsis}.cp-t{opacity:.9;font-weight:500;font-variant-numeric:tabular-nums}
.cp-dot{width:9px;height:9px;border-radius:50%;background:#fff;animation:cpPulse 1.4s infinite;flex:none}
@keyframes cpPulse{50%{opacity:.25}}
.cp-end{width:46px;display:grid;place-items:center;background:#e5484d!important}.cp-end svg{width:20px;height:20px}
.btn.danger-text{color:var(--red,#e5484d);border-color:transparent;background:transparent;text-decoration:underline;margin-top:6px}

#wakebar{position:fixed;z-index:120;top:max(10px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);display:flex;gap:10px;align-items:center;padding:10px 16px;border-radius:14px;background:#1f2a52;color:#fff;font-size:14px;box-shadow:0 6px 24px rgba(0,0,0,.35);max-width:calc(100vw - 20px)}
#wakebar .spin{width:16px;height:16px;flex:none;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%;animation:wakespin .8s linear infinite}
@keyframes wakespin{to{transform:rotate(360deg)}}

.pw-wrap{position:relative;display:flex}.pw-wrap .input{flex:1;padding-right:64px}
.pw-eye{position:absolute;right:6px;top:50%;transform:translateY(-50%);border:0;background:transparent;color:var(--muted);font:inherit;font-size:13px;font-weight:600;padding:8px 10px;cursor:pointer;border-radius:8px}.pw-eye:hover{color:var(--text,inherit)}
.pw-rules{list-style:none;margin:2px 0 6px;padding:0;font-size:13px;color:var(--muted)}.pw-rules li{padding:2px 0}.pw-rules li.ok{color:var(--green)}.pw-rules li.tip{margin-top:6px;opacity:.85;font-size:12px}
#un-hint{line-height:1.4}

/* ---- priority messages ---- */
.prio-toggle.on{color:#fff;background:#dc2626;border-radius:50%}
.replying.prio-hint{color:#b91c1c;display:flex;gap:8px;align-items:center}.prio-hint svg{width:16px;height:16px}
.msg.priority{box-shadow:inset 3px 0 0 #dc2626}.msg.me.priority{box-shadow:inset -3px 0 0 #dc2626}
.prio-tag{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight: 600;letter-spacing: 0;text-transform: none;color:#dc2626;margin-bottom:2px}.msg.me .prio-tag{color:#fecaca}.prio-tag svg{width:12px;height:12px}
/* ---- status extras ---- */
.sc-frame,.sc-stage{position:relative}.sc-frame{display:grid}
.st-over{position:absolute;inset:0;pointer-events:none;overflow:hidden;border-radius:inherit;z-index:2}
.st-chips{position:absolute;top:10px;left:10px;right:10px;display:flex;flex-wrap:wrap;gap:6px}
.st-mentions{position:absolute;left:10px;right:10px;bottom:10px;display:flex;flex-wrap:wrap;gap:6px}
.st-chip{pointer-events:auto;display:inline-flex;align-items:center;gap:5px;max-width:100%;padding:5px 10px;border-radius:999px;background:rgba(0,0,0,.55);color:#fff;font-size:12.5px;font-weight:600;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.st-chip a{color:#fff;text-decoration:underline}.st-chip.men{background:rgba(47,107,255,.85)}.st-chip.men.me{background:#16a34a}
.st-chip.aqi i{width:9px;height:9px;border-radius:50%;background:var(--aq,#16a34a);flex:none}
.st-sticker{position:absolute;transform:translate(-50%,-50%);line-height:1;filter:drop-shadow(0 2px 4px rgba(0,0,0,.35));pointer-events:none;white-space:nowrap}
.st-sticker.edit{pointer-events:auto;cursor:grab;touch-action:none;outline-offset:4px}.st-sticker.edit:focus-visible{outline:2px solid #fff}
.sc-extras{display:grid;gap:8px;margin-top:10px}.sc-xrow{display:flex;flex-wrap:wrap;gap:6px}
.sc-x{border:1px solid var(--border);background:var(--panel,transparent);color:inherit;border-radius:999px;padding:6px 12px;font-size:13px;font-weight:600;cursor:pointer}.sc-x.on{background:var(--accent,#2f6bff);border-color:var(--accent,#2f6bff);color:#fff}
.sc-pn{display:grid;gap:8px;padding:10px;border:1px solid var(--border);border-radius:12px}.sc-tg{display:flex;flex-wrap:wrap;gap:12px;align-items:center;font-size:13px}
.men-list{max-height:180px;overflow:auto}.men-row{display:flex;align-items:center;gap:6px;font-size:14px}
.stk-grid{grid-template-columns:repeat(auto-fill,minmax(44px,1fr))}.stk-grid .st-pick{font-size:26px;padding:6px}
.men-badge{margin-left:8px;padding:1px 8px;border-radius:999px;background:var(--accent,#2f6bff);color:#fff;font-size:11px;font-weight: 600}
@media (max-width: 340px) { .composer .prio-toggle:not(.on) { display: none; } } /* tiny phones: the flag lives in the + menu */

/* ---- download button on photos and videos ---- */
.mwrap{position:relative;display:block;width:fit-content;max-width:100%;line-height:0}
.mwrap img.zoomable{cursor:zoom-in}
.mdl{position:absolute;top:8px;right:8px;width:38px;height:38px;border-radius:50%;border:0;display:grid;place-items:center;background:rgba(0,0,0,.62);color:#fff;cursor:pointer;opacity:.9;transform:none;transition:opacity .15s,transform .15s;z-index:3;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
.mdl svg{width:20px;height:20px}
.mwrap:hover .mdl,.mwrap:focus-within .mdl,.mwrap.touched .mdl,.mdl:focus-visible{opacity:1;transform:scale(1.06)}
@media (hover:none){.mwrap video+.mdl{top:8px}}
.lightbox .vo-bar{display:flex;align-items:center;gap:8px}.lightbox .vo-bar span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.call .clock { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.12); opacity: .85; } .call .clock.on { background: rgba(34,197,94,.25); opacity: 1; } .call .clock.hidden { display: none; }

.hide-tag{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:600;opacity:.85;margin-bottom:2px}.hide-tag svg{width:12px;height:12px}

.tiles.scroll{overflow-y:auto;align-content:start}

/* incoming call: decline with a message */
.call-reply-wrap { position: absolute; left: 0; right: 0; bottom: calc(max(24px, env(safe-area-inset-bottom)) + 120px); display: grid; justify-items: center; gap: 12px; padding: 0 16px; z-index: 3; }
.call-msg { color: #fff; font-size: 14px; padding: 8px 16px; border-radius: 999px; background: rgba(255,255,255,.14); } .call-msg:hover { background: rgba(255,255,255,.24); }
.call-replies { display: grid; gap: 8px; width: min(420px, 100%); padding: 12px; border-radius: 16px; background: rgba(12,12,11,.8); border: 1px solid rgba(255,255,255,.12); }
.call-replies .chip-q { text-align: left; white-space: normal; background: rgba(255,255,255,.1); color: #fff; border-color: transparent; } .call-replies .chip-q:hover { background: rgba(255,255,255,.2); }
.call-reply-custom { display: flex; gap: 8px; } .call-reply-custom .input { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.18); padding: 8px 12px; }

/* legal: terms box, reports */
.agree-row { align-items: flex-start; } .agree-row input { margin-top: 3px; flex: none; }
.report-list { max-height: 60vh; overflow: auto; } .report-list blockquote { margin: 6px 0; padding-left: 10px; border-left: 3px solid var(--border); }
.modal .check-row { margin: 6px 0; } .modal textarea.input { width: 100%; margin: 8px 0; }

/* phishing-link protection */
.phish-url { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; word-break: break-all; padding: 8px 10px; margin: 8px 0; border-radius: 10px; background: rgba(220,38,38,.12); color: #fca5a5; }
.phish-why { margin: 6px 0 10px; padding-left: 20px; font-size: 14px; } .phish-why li { margin: 2px 0; }
.link-blocked { text-decoration: line-through; color: #f87171; cursor: not-allowed; word-break: break-all; } .link-warn { text-decoration-style: dashed; }
.phish-note { margin-top: 6px; padding: 6px 10px; border-radius: 10px; font-size: 13px; line-height: 1.35; } .phish-note.block { background: rgba(220,38,38,.18); color: #fecaca; border: 1px solid rgba(248,113,113,.5); } .phish-note.warn { background: rgba(245,158,11,.16); color: #fde68a; border: 1px solid rgba(245,158,11,.4); }

/* ---- safety features: "new device signed in" notice, app lock (PIN), risky files, links from strangers ---- */
.alert-actions { display: grid; gap: 8px; } .alert-actions .btn { width: 100%; }
.applock { position: fixed; inset: 0; z-index: 2147483000; background: var(--bg); color: var(--text); display: grid; align-content: center; justify-items: center; gap: 14px; padding: 24px; text-align: center; overflow: auto; }
body.is-locked > *:not(#applock) { visibility: hidden !important; } /* while locked, nothing else on the page can be seen, focused or read out */
.pin-dots { display: flex; gap: 12px; justify-content: center; margin: 6px 0; } .pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--muted); display: block; } .pin-dots i.on { background: var(--blue); border-color: var(--blue); }
.pin-dots.shake { animation: pinshake .35s; } @keyframes pinshake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pin-msg { min-height: 20px; font-size: 13px; color: var(--red); }
.pin-keys { display: grid; grid-template-columns: repeat(3, 72px); gap: 12px; justify-content: center; }
.pin-key { width: 72px; height: 72px; border-radius: 50%; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); font-size: 24px; font-weight: 600; cursor: pointer; } .pin-key:active { background: var(--blue); color: #fff; } .pin-key.alt { background: transparent; border-color: transparent; font-size: 20px; }
.pin-card { text-align: center; justify-items: center; } .modal-back.pin-modal { z-index: 120; }
.risk-title { font-weight: 600; color: var(--red); } .risk-tag { margin-top: 4px; font-size: 12px; color: var(--red); font-weight: 600; }
.file.risky { border: 1px solid var(--red); border-radius: 12px; padding: 8px 10px; }
.stranger-note { display: grid; gap: 6px; margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: rgba(245,158,11,.15); border: 1px solid rgba(245,158,11,.5); color: var(--text); font-size: 13px; text-align: left; } .stranger-note .btn { justify-self: start; }
/* ---- our own "Are you sure?" window (public/dialog.js) instead of the browser's plain box ---- */
.modal-back.ask-back { z-index: 130; }
.ask-card { text-align: center; justify-items: center; gap: 10px; width: min(380px, 92vw); }
.ask-ic { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; font-weight: 600; line-height: 1; color: #fff; background: linear-gradient(135deg, var(--blue), var(--violet)); box-shadow: 0 8px 24px rgba(47,107,255,.35); }
.ask-ic.danger { background: linear-gradient(135deg, #ef4444, #f59e0b); box-shadow: 0 8px 24px rgba(239,68,68,.35); }
.ask-card h3 { margin: 4px 0 0; font-size: 20px; }
.ask-msg { display: grid; gap: 8px; color: var(--muted); font-size: 15px; line-height: 1.45; } .ask-msg p { margin: 0; overflow-wrap: anywhere; }
.ask-actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; width: 100%; margin-top: 8px; } .ask-actions .btn { width: 100%; padding: 12px 14px; }
.ask-card .input { width: 100%; }
/* ---- cartoon avatars (public/avatar.js) and the avatar editor (public/avatar-editor.js) ---- */
.avatar svg.av { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; display: block; }
.avatar.cartoon { overflow: visible; } .avatar.cartoon .photo { z-index: 0; }
.modal-back.ave-back { z-index: 110; }
.ave-modal { width: min(520px, 96vw); max-height: 92vh; text-align: center; justify-items: center; gap: 10px; }
.ave-preview { width: 168px; height: 168px; border-radius: 50%; overflow: hidden; box-shadow: 0 10px 34px rgba(0,0,0,.35); } .ave-preview .ave-big, .ave-preview svg { width: 100%; height: 100%; display: block; }
.ave-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.ave-note { display: grid; gap: 6px; justify-items: center; padding: 8px 12px; border-radius: 12px; background: rgba(245,158,11,.14); border: 1px solid rgba(245,158,11,.45); }
.ave-tabs { display: flex; gap: 6px; overflow-x: auto; max-width: 100%; padding: 2px; scrollbar-width: thin; } .ave-tab { flex: none; border: 0; border-radius: 999px; padding: 8px 14px; background: var(--panel-2); color: var(--text); font-weight: 600; cursor: pointer; } .ave-tab.on { background: var(--grad); color: #fff; }
.ave-body { width: 100%; display: grid; gap: 12px; overflow-y: auto; max-height: 34vh; padding: 2px 2px 6px; text-align: left; } .ave-title { font-weight: 600; font-size: 13px; color: var(--muted); margin: 4px 0 6px; }
.ave-grid { display: grid; gap: 8px; } .ave-grid.pics { grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); } .ave-grid.dots { grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); }
.ave-opt { padding: 0; border: 3px solid transparent; border-radius: 50%; overflow: hidden; width: 62px; height: 62px; background: var(--panel-2); cursor: pointer; } .ave-opt svg { width: 100%; height: 100%; display: block; } .ave-opt.on { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(47,107,255,.35); }
.ave-sw { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); cursor: pointer; padding: 0; } .ave-sw.on { border-color: var(--text); }
.ave-foot { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; width: 100%; }
/* status: "hide from" friends */
.men-row[hidden]{display:none}
.sc-hidnote{display:flex;gap:6px;align-items:center;font-size:13px;padding:8px 10px}
.hide-head{display:flex;gap:10px;align-items:flex-start;justify-content:space-between}.hide-head .btn{flex:none}
.sv-reply.owner{flex-wrap:wrap}.sv-hid{flex-basis:100%;font-size:12.5px;color:#fff;opacity:.92;margin-bottom:6px}
/* nearby chat (no internet) */
.nb{position:fixed;inset:0;z-index:80;background:var(--bg);color:var(--text);display:flex;flex-direction:column}
.nb-head{display:flex;align-items:center;gap:8px;padding:10px 12px;padding-top:max(10px,env(safe-area-inset-top));border-bottom:1px solid var(--border);background:var(--panel)}
.nb-head h2{font-size:17px;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nb-spacer{flex:1}.nb-hacts{display:flex;gap:2px}
.nb-body{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;width:100%;max-width:640px;margin:0 auto}
.nb-home,.nb-pair{padding:16px;display:grid;gap:14px;align-content:start}
.nb-hero{display:flex;gap:12px;align-items:center;padding:14px;border-radius:16px;background:linear-gradient(135deg,var(--blue),var(--violet));color:#fff}
.nb-hero .sub{color:rgba(255,255,255,.9)}
.nb-hero-ic{width:44px;height:44px;border-radius:14px;background:rgba(255,255,255,.18);display:grid;place-items:center;flex:none}.nb-hero-ic svg{width:24px;height:24px}
.nb-cta{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.nb-rooms{display:grid;gap:6px}
.nb-room{display:flex;gap:12px;align-items:center;text-align:left;padding:10px 12px;border-radius:14px;background:var(--panel);border:1px solid var(--border);color:inherit;width:100%;cursor:pointer}
.nb-rmeta{flex:1;min-width:0}.nb-rname{font-weight:600}.nb-rmeta .sub{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.nb-rtime{flex:none}
.nb-av{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;color:#fff;font-weight: 600;overflow:hidden;flex:none}.nb-av svg{width:100%;height:100%;display:block}.nb-av.sm{width:28px;height:28px;font-size:13px}
.nb-how summary{cursor:pointer;font-weight:600}.nb-how ol{padding-left:20px;display:grid;gap:6px;color:var(--muted);font-size:14px}
.nb-qr{justify-self:center;background:#fff;padding:10px;border-radius:14px;line-height:0}.nb-qr svg{width:min(70vw,300px);height:auto;display:block}
.nb-copyrow{display:flex;gap:8px;align-items:center}.nb-copyrow .input{flex:1;min-width:0}.nb-code{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px}
.nb-video{width:100%;max-height:260px;border-radius:14px;background:#000;object-fit:cover}
.nb-wait{display:flex;gap:10px;align-items:center;color:var(--muted)}
.nb-spin{width:16px;height:16px;border:2px solid var(--border);border-top-color:var(--blue);border-radius:50%;animation:nbspin .8s linear infinite}@keyframes nbspin{to{transform:rotate(360deg)}}
.nb-chat{display:flex;flex-direction:column;flex:1;min-height:0}
.nb-banner{display:flex;gap:8px;align-items:center;padding:8px 14px;font-size:13px;color:var(--muted);border-bottom:1px solid var(--border)}
.nb-dot{width:9px;height:9px;border-radius:50%;background:var(--muted);flex:none}.nb-dot.on{background:var(--green)}
.nb-list{flex:1;min-height:0;overflow:auto;padding:12px 12px 4px;display:flex;flex-direction:column;gap:8px}
.nb-msg{display:flex;gap:8px;align-items:flex-end;max-width:86%;align-self:flex-start}.nb-msg.me{align-self:flex-end;flex-direction:row-reverse}
.nb-bub{background:var(--bubble-in);border:1px solid var(--border);border-radius:16px 16px 16px 4px;padding:8px 12px;min-width:60px;overflow-wrap:anywhere}
.nb-msg.me .nb-bub{background:var(--bubble-out);color:var(--bubble-out-text);border-color:transparent;border-radius:16px 16px 4px 16px}
.nb-who{font-size:12px;font-weight: 600;color:var(--violet);margin-bottom:2px}
.nb-text{white-space:pre-wrap}.nb-time{font-size:11px;opacity:.65;text-align:right;margin-top:2px}
.nb-img{display:block;max-width:min(62vw,280px);max-height:300px;border-radius:12px;cursor:zoom-in}
.nb-file{display:flex;gap:10px;align-items:center}.nb-fic svg{width:22px;height:22px}.nb-fmeta{min-width:0}.nb-fname{font-weight:600;overflow-wrap:anywhere}
.nb-sys{align-self:center;font-size:12px;color:var(--muted);background:var(--panel);border:1px solid var(--border);border-radius:999px;padding:4px 12px;text-align:center}
.nb-empty{margin:auto;color:var(--muted);text-align:center;padding:24px}
.nb-comp{display:flex;gap:8px;align-items:flex-end;padding:10px 12px;padding-bottom:max(10px,env(safe-area-inset-bottom));border-top:1px solid var(--border);background:var(--panel)}.nb-comp.off{opacity:.55}
.nb-input{flex:1;resize:none;border-radius:14px;border:1px solid var(--border);background:var(--bg);color:var(--text);padding:10px 12px;font:inherit;font-size:16px;max-height:120px}
.nb-send{width:44px;height:44px;padding:0;display:grid;place-items:center;border-radius:50%}.nb-send svg{width:20px;height:20px}
.nb-lightbox{position:fixed;inset:0;z-index:95;background:rgba(0,0,0,.9);display:grid;place-items:center;cursor:zoom-out}.nb-lightbox img{max-width:96vw;max-height:92vh}
.nb-sheet{width:min(420px,94vw);max-height:88vh;overflow:auto;display:grid;gap:10px}
.nb-person{display:flex;gap:12px;align-items:center}.nb-pmeta{flex:1;min-width:0}.nb-pname{font-weight:600}.nb-sys{white-space:pre-line}

.nb-safe{font-size:20px;margin-top:2px;white-space:normal}

.nb-gate{display:flex;gap:12px;align-items:flex-start;padding:16px;border-radius:16px;background:var(--panel);border:1px solid var(--border)}.nb-gate-ic{width:40px;height:40px;border-radius:12px;background:var(--panel-2);display:grid;place-items:center;flex:none;color:var(--blue)}.nb-gate-ic svg{width:22px;height:22px}
.nb-me{display:flex;gap:12px;align-items:center;padding:10px 12px;border-radius:14px;background:var(--panel);border:1px solid var(--border)}.nb-ok{color:var(--green);font-weight:600}.nb-pun{margin-top:-2px}
.nb-hint{display:grid;gap:8px;padding:10px 14px;border-bottom:1px solid var(--border);background:var(--panel)}.nb-hint .btn{justify-self:start}
.nb-dot.wait{background:var(--amber);animation:nbpulse 1.4s ease-in-out infinite}@keyframes nbpulse{50%{opacity:.35}}
/* ---------- nearby calls (voice and video between two people of a room) ---------- */
.nb-av.lg{width:96px;height:96px;font-size:40px}
.nb-call{position:fixed;inset:0;z-index:200;background:#070b18;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden;user-select:none;-webkit-user-select:none}
.nb-call-remote{position:absolute;left:0;top:0;width:1px;height:1px;opacity:0;pointer-events:none}
.nb-call.has-remote .nb-call-remote{width:100%;height:100%;opacity:1;object-fit:cover;background:#000}
.nb-call-who{position:relative;z-index:2;display:grid;justify-items:center;gap:8px;text-align:center;padding:24px;text-shadow:0 1px 6px rgba(0,0,0,.6)}
.nb-call.has-remote .nb-call-who{position:absolute;top:max(16px,env(safe-area-inset-top));left:0;right:0;padding:12px;gap:2px}
.nb-call.has-remote .nb-call-who .nb-av{display:none}
.nb-call-who h2{margin:0;font-size:24px}
.nb-call-status{font-size:15px;opacity:.9;font-variant-numeric:tabular-nums}
.nb-call-who .sub{color:rgba(255,255,255,.8)}
.nb-call-lock{display:flex;gap:6px;align-items:center;font-size:12px;opacity:.75;margin-top:6px}.nb-call-lock svg{width:14px;height:14px}
.nb-call-local{position:absolute;right:16px;bottom:calc(max(24px,env(safe-area-inset-bottom)) + 108px);width:clamp(96px,26vw,160px);aspect-ratio:3/4;object-fit:cover;border-radius:16px;border:2px solid rgba(255,255,255,.4);background:#000;z-index:3;transform:scaleX(-1);display:none}
.nb-call.has-local .nb-call-local{display:block}
.nb-call-acts{position:absolute;bottom:max(24px,env(safe-area-inset-bottom));left:0;right:0;z-index:4;display:flex;justify-content:center;gap:6px;flex-wrap:wrap;padding:0 8px}
.nb-cbtn{display:grid;justify-items:center;gap:6px;background:none;border:0;color:#fff;cursor:pointer;font-size:12px;width:64px;text-shadow:0 1px 4px rgba(0,0,0,.6)}
.nb-cic{width:56px;height:56px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.2)}.nb-cic svg{width:26px;height:26px}
.nb-cbtn.on .nb-cic{background:#fff;color:#111}.nb-cbtn.bad .nb-cic{background:var(--red)}.nb-cbtn.good .nb-cic{background:var(--green)}
.nb-callwho{width:100%;background:none;border:0;color:inherit;text-align:left;padding:8px;border-radius:12px;cursor:pointer}.nb-callwho:hover{background:var(--panel-2)}.nb-diag-pre{white-space:pre-wrap;word-break:break-word;font:12px/1.4 ui-monospace,Menlo,Consolas,monospace;background:var(--panel-2);border:1px solid var(--border);border-radius:12px;padding:10px;max-height:46vh;overflow:auto;user-select:text;-webkit-user-select:text;margin:0}.nb-imgwrap{display:grid;gap:4px;justify-items:start}
.nb-lb-dl{position:absolute;bottom:max(22px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);cursor:pointer}
/* verified badge (blue tick) */
.vbadge{display:inline-flex;align-items:center;vertical-align:-0.18em;width:1.05em;height:1.05em;margin-left:.3em;flex:none}
.vbadge svg{width:100%;height:100%;display:block}
.verify,.vadmin{max-height:64vh;overflow:auto;-webkit-overflow-scrolling:touch}
.verify .field{margin:10px 0}.verify textarea.input,.vadmin textarea.input{width:100%;box-sizing:border-box;margin-top:6px}
.vf-group{margin-top:22px;padding-top:14px;border-top:1px solid var(--line)}.vf-group:first-of-type{margin-top:14px}.vf-group h4{margin:0 0 4px;font-size:14px}
.vtl{margin-top:8px}.va-row:focus{outline:2px solid var(--blue,#2f6bff)}
.rv-stars { display: flex; gap: 2px; margin: 8px 0 4px; } .rv-star { background: none; border: 0; font-size: 30px; line-height: 1; color: #6b7390; cursor: pointer; padding: 2px 4px; } .rv-star.on { color: #f5a623; } #review-card textarea { width: 100%; margin-top: 6px; }

/* ---- unslop pass (29 Nov 2026): one accent, no hue-to-hue gradients, no glows or blobs, no looping logo pulse ---- */
.auth-hero { background: var(--navy-700); }
.auth-hero::before, .auth-hero::after { display: none; }
.logo-mark { box-shadow: none; animation: none; }
.rail-btn.active { box-shadow: none; }
.call-bg { background: #070b18; }
.ask-ic { background: var(--blue); box-shadow: none; } .ask-ic.danger { background: var(--red); box-shadow: none; }
.nb-hero { background: var(--blue); }
