* { box-sizing: border-box; }
:root {
  /* Mitrika brand: deep navy with a blue → green gradient */
  --blue: #1a7cff; --green: #00c9a7; --grad: linear-gradient(135deg, #1a6dff 0%, #00c8f8 55%, #00c9a7 100%);   /* Mitrika logo colours */
  --green-dark: #2fc493; --bg: #0b1026; --panel: #0e1430; --bar: #131b3b; --raise: #1a2447;
  --text: #e8eefc; --muted: #8b97ba; --line: #1d2850; --out: linear-gradient(135deg, #1e5c9c, #17806f); --in: #18213f;
  --link: #8ecbff; --read: #7ee8c4;
}
html, body { margin: 0; height: 100%; font-family: "Segoe UI", -apple-system, Roboto, Helvetica, Arial, sans-serif; color: var(--text); background: #070b1c; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.error { color: #ff7b7b; min-height: 1.2em; font-size: 14px; }
.clickable { cursor: pointer; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
button.primary { background: var(--grad); color: #061226; padding: 10px 18px; border-radius: 20px; font-weight: 600; width: 100%; }
button.primary:hover { filter: brightness(1.1); }
button.secondary { background: var(--raise); color: var(--text); padding: 8px 14px; border-radius: 18px; }
button.danger { color: #ff7b7b; padding: 8px 0; }
button.link { color: var(--link); margin-top: 8px; }
button.icon { width: 40px; height: 40px; border-radius: 50%; font-size: 18px; color: #a9b6d8; flex-shrink: 0; }
button.icon:hover { background: rgba(255,255,255,.08); color: #fff; }
input, textarea { font: inherit; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; outline: none; background: var(--raise); color: var(--text); }
input:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(63,156,242,.25); }
input::placeholder, textarea::placeholder { color: #6f7ca3; }

/* Login */
#login { display: flex; align-items: center; justify-content: center; height: 100%; background: radial-gradient(ellipse at 20% 0%, rgba(63,156,242,.22), transparent 55%), radial-gradient(ellipse at 90% 100%, rgba(70,224,168,.16), transparent 50%), var(--bg); }
.login-card { background: var(--panel); border: 1px solid var(--line); padding: 32px; border-radius: 12px; width: min(380px, 92vw); text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.login-card input { margin: 8px 0; }
.logo { width: 72px; height: auto; display: block; margin: 0 auto 8px; filter: drop-shadow(0 6px 18px rgba(63,156,242,.35)); }
.logo.big { width: 120px; }
.brand { margin: 4px 0 2px; font-weight: 700; letter-spacing: .14em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tagline { margin: 4px 0; font-weight: 600; font-size: 17px; color: var(--text); }
.pillars { margin: 2px 0 14px; font-size: 13px; color: var(--link); }
.brandbar { display: flex; align-items: center; gap: 8px; padding: 10px 14px 6px; background: var(--panel); }
.brandbar img { height: 26px; }
.brandbar span { font-weight: 700; letter-spacing: .14em; font-size: 15px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dev-code { background: rgba(70,224,168,.08); border: 1px dashed var(--green); color: var(--text); padding: 8px; border-radius: 8px; font-size: 14px; margin: 8px 0; }

/* Layout */
#app { display: flex; height: 100%; max-width: 1600px; margin: 0 auto; background: var(--panel); }
#sidebar { background: var(--panel); }
#sidebar { width: 30%; min-width: 300px; max-width: 420px; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
#content { flex: 1; display: flex; flex-direction: column; min-width: 0; background: radial-gradient(ellipse at 100% 0%, rgba(63,156,242,.08), transparent 45%), radial-gradient(ellipse at 0% 100%, rgba(70,224,168,.06), transparent 45%), var(--bg); }
.bar { height: 60px; background: var(--bar); display: flex; align-items: center; padding: 0 12px; gap: 10px; flex-shrink: 0; }
.bar-actions { margin-left: auto; display: flex; }
.search { padding: 8px 12px; border-bottom: 1px solid var(--line); }
.search input { background: var(--raise); border: 0; }
.conn { background: #3a2f10; color: #ffd98a; padding: 6px 12px; font-size: 13px; text-align: center; }

.avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; background: #2a3560 center/cover; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; font-size: 15px; position: relative; }
.avatar.lg { width: 96px; height: 96px; font-size: 34px; margin: 0 auto 10px; }
.avatar .dot { position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--green); border: 2px solid var(--panel); }

#chat-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
#chat-list li { display: flex; gap: 12px; padding: 10px 14px; cursor: pointer; align-items: center; }
#chat-list li:hover { background: rgba(255,255,255,.04); }
#chat-list li.active { background: var(--raise); box-shadow: inset 3px 0 0 var(--blue); }
.ci-body { flex: 1; min-width: 0; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.ci-top, .ci-bottom { display: flex; justify-content: space-between; gap: 8px; }
.ci-name { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-time { font-size: 12px; color: var(--muted); flex-shrink: 0; }
.ci-last { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-last.typing { color: var(--green); }
.badge { background: var(--grad); color: #061226; border-radius: 12px; font-size: 12px; min-width: 20px; padding: 2px 6px; text-align: center; font-weight: 600; }
.ci-time.unread { color: var(--green); }

.empty { margin: auto; text-align: center; }
#chat { display: flex; flex-direction: column; height: 100%; }
.chat-meta { flex: 1; min-width: 0; }
.chat-meta .title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-meta .sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-meta .sub.typing { color: var(--green); }
.back { display: none; }

#messages { flex: 1; overflow-y: auto; padding: 16px 6%; display: flex; flex-direction: column; gap: 2px; }
.day { align-self: center; background: var(--raise); color: var(--muted); font-size: 12.5px; padding: 5px 12px; border-radius: 8px; margin: 10px 0; box-shadow: none; }
.sys { align-self: center; background: rgba(63,156,242,.12); color: var(--link); font-size: 12.5px; padding: 5px 12px; border-radius: 8px; margin: 6px 0; text-align: center; }
.msg { max-width: min(65%, 520px); padding: 6px 8px 8px; border-radius: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.3); position: relative; word-wrap: break-word; white-space: normal; font-size: 14.5px; }
.msg.out { align-self: flex-end; background: var(--out); color: #fff; }
.msg.out .meta { color: rgba(255,255,255,.7); }
.msg.in { align-self: flex-start; background: var(--in); }
.msg.first { margin-top: 8px; }
.msg .sender { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.msg .meta { float: right; font-size: 11px; color: var(--muted); margin: 6px 0 -4px 10px; white-space: nowrap; }
.tick { margin-left: 3px; letter-spacing: -3px; }
.tick.read { color: var(--read); }
.msg img, .msg video { max-width: 100%; max-height: 320px; border-radius: 6px; display: block; cursor: pointer; }
.msg audio { width: 240px; max-width: 100%; display: block; }
.file-link { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.08); padding: 8px; border-radius: 6px; color: inherit; text-decoration: none; }

#composer { background: var(--bar); display: flex; align-items: flex-end; gap: 6px; padding: 8px 12px; }
#composer textarea { resize: none; max-height: 120px; border: 0; border-radius: 8px; }
#btn-mic.recording { background: #e5484d; color: #fff; }
#btn-send { color: var(--green); }
.blocked-note { background: var(--bar); text-align: center; padding: 14px; color: var(--muted); font-size: 14px; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(3,6,18,.7); display: flex; align-items: center; justify-content: center; z-index: 10; }
.modal-box { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; width: min(440px, 94vw); max-height: 88vh; overflow-y: auto; padding: 20px; }
.modal-box h3 { margin: 0 0 12px; }
.modal-box .row { display: flex; gap: 8px; margin: 8px 0; }
.modal-box .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.modal-box label { font-size: 13px; color: var(--muted); display: block; margin-top: 10px; }
.people { list-style: none; padding: 0; margin: 8px 0; max-height: 300px; overflow-y: auto; }
.people li { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.people li .pname { flex: 1; min-width: 0; }
.people li .pname small { display: block; color: var(--muted); }
.people input[type=checkbox] { width: 18px; height: 18px; }
.tag { font-size: 11px; color: var(--green); border: 1px solid var(--green); border-radius: 4px; padding: 1px 5px; }
.center { text-align: center; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--raise); border: 1px solid var(--line); color: #fff; padding: 10px 18px; border-radius: 6px; z-index: 20; font-size: 14px; }

/* Phones / narrow windows: show list OR chat */
@media (max-width: 760px), (pointer: coarse) and (max-height: 540px) {
  #sidebar { width: 100%; max-width: none; min-width: 0; }
  #content { display: none; }
  #app.in-chat #sidebar { display: none; }
  #app.in-chat #content { display: flex; }
  .back { display: inline-block; }
  #messages { padding: 12px 10px; }
  .msg { max-width: 85%; }
}

/* ---------- Icons ---------- */
button.icon svg { display: block; margin: auto; }
button.icon.on { color: var(--green); background: rgba(70,224,168,.12); }
#btn-send { color: var(--green); }
.tick.pending { font-size: 12px; letter-spacing: 0; }

/* ---------- Messages: body, jumbo emoji, quotes, reactions ---------- */
#chat { position: relative; }
.msg .body { display: inline; white-space: pre-wrap; }
.msg.jumbo { background: transparent !important; box-shadow: none; padding: 0 4px; }
.msg.jumbo .body { font-size: 44px; line-height: 1.15; display: block; }
.msg.jumbo .meta { color: var(--muted) !important; background: rgba(11,16,38,.6); padding: 1px 6px; border-radius: 8px; }
.msg.has-reacts { margin-bottom: 16px; }
.msg.flash { animation: flash 1.4s ease; }
@keyframes flash { 0%, 60% { box-shadow: 0 0 0 3px var(--green); } 100% { box-shadow: 0 1px 2px rgba(0,0,0,.3); } }

.quote { border-left: 3px solid var(--green); background: rgba(0,0,0,.22); border-radius: 6px; padding: 5px 8px; margin: 2px 0 5px; cursor: pointer; white-space: normal; }
.msg.in .quote { border-left-color: var(--blue); background: rgba(255,255,255,.06); }
.q-name { font-size: 12.5px; font-weight: 600; color: var(--green); }
.msg.in .q-name { color: var(--link); }
.q-text { font-size: 13px; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 420px; }

.reacts { position: absolute; bottom: -15px; display: flex; gap: 3px; white-space: nowrap; }
.msg.out .reacts { right: 8px; }
.msg.in .reacts { left: 8px; }
.react-chip { background: var(--raise); border: 1px solid var(--line); border-radius: 12px; padding: 1px 6px; font-size: 14px; line-height: 20px; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.react-chip span { font-size: 11px; margin-left: 3px; color: var(--muted); }
.react-chip.mine { border-color: var(--green); background: rgba(70,224,168,.15); }
.react-chip:hover { filter: brightness(1.2); }

.msg-act { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; color: var(--muted); opacity: 0; transition: opacity .12s; background: var(--raise); }
.msg-act svg { width: 18px; height: 18px; display: block; margin: auto; }
.msg.out .msg-act { left: -38px; }
.msg.in .msg-act { right: -38px; }
.msg:hover .msg-act, .msg-act:focus-visible { opacity: 1; }
.msg-act:hover { color: var(--green); }
@media (hover: none) { .msg-act { display: none; } }   /* phones: long-press the message instead */

/* ---------- Message menu (quick reactions + reply) ---------- */
.msg-menu { position: fixed; z-index: 15; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.55); padding: 6px; min-width: 250px; }
.mm-reacts { display: flex; gap: 2px; padding: 2px 2px 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.mm-emoji { font-size: 24px; width: 38px; height: 38px; border-radius: 50%; transition: transform .1s; }
.mm-emoji:hover { transform: scale(1.2); background: rgba(255,255,255,.06); }
.mm-emoji.on { background: rgba(70,224,168,.18); }
.mm-more { color: var(--muted); }
.mm-more svg { width: 20px; height: 20px; display: block; margin: auto; }
.mm-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.mm-item:hover { background: var(--raise); }
.mm-item span svg { width: 18px; height: 18px; display: block; color: var(--muted); }

/* ---------- Emoji panel ---------- */
.emoji-panel { position: absolute; left: 12px; bottom: 64px; width: min(360px, calc(100% - 24px)); height: 330px; z-index: 12; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 48px rgba(0,0,0,.55); display: flex; flex-direction: column; overflow: hidden; }
.emoji-panel.reacting { left: 50%; transform: translateX(-50%); bottom: 80px; }
.ep-tabs { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); overflow-x: auto; flex-shrink: 0; }
.ep-tab { width: 34px; height: 32px; border-radius: 8px; font-size: 18px; flex-shrink: 0; color: var(--muted); }
.ep-tab svg { width: 18px; height: 18px; display: block; margin: auto; }
.ep-tab.on { background: var(--raise); box-shadow: inset 0 -2px 0 var(--green); }
.ep-title { font-size: 12px; color: var(--muted); padding: 6px 10px 2px; text-transform: uppercase; letter-spacing: .06em; }
.ep-grid { flex: 1; overflow-y: auto; padding: 4px 6px 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); align-content: start; }
.ep-emoji { font-size: 24px; height: 40px; border-radius: 8px; }
.ep-emoji:hover { background: var(--raise); transform: scale(1.12); }

/* ---------- Reply bar ---------- */
.reply-bar { display: flex; align-items: center; gap: 8px; background: var(--bar); padding: 8px 12px 0; }
.rb-body { flex: 1; min-width: 0; border-left: 3px solid var(--green); background: var(--raise); border-radius: 6px; padding: 6px 10px; }
.rb-name { font-size: 12.5px; font-weight: 600; color: var(--green); }
.rb-text { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Picker: Emoji / GIFs / Stickers ---------- */
.emoji-panel { height: 380px; width: min(400px, calc(100% - 24px)); }
.ep-modes { display: flex; gap: 4px; padding: 6px 6px 0; flex-shrink: 0; }
.ep-mode { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 4px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.ep-mode span svg { width: 17px; height: 17px; display: block; }
.ep-mode.on { background: var(--grad); color: #061226; }
.ep-tabs:empty { display: none; }
.ep-tab.text { font-family: "Segoe UI", sans-serif; font-weight: 700; color: var(--text); }
.ep-tab.pack img { width: 26px; height: 26px; display: block; margin: auto; object-fit: contain; }
.ep-emoji.sym { font-size: 21px; color: var(--text); font-family: "Segoe UI", "Segoe UI Symbol", sans-serif; }
.ep-search { display: flex; align-items: center; gap: 6px; margin: 8px 8px 0; background: var(--raise); border-radius: 10px; padding: 0 10px; }
.ep-search span svg { width: 17px; height: 17px; display: block; color: var(--muted); }
.ep-search input { border: 0; background: transparent; padding: 8px 0; box-shadow: none !important; }
.ep-foot { font-size: 10.5px; letter-spacing: .06em; color: var(--muted); text-align: right; padding: 3px 10px 5px; border-top: 1px solid var(--line); text-transform: uppercase; }
.ep-note { grid-column: 1 / -1; color: var(--muted); font-size: 13.5px; line-height: 1.5; padding: 14px 8px; }
.ep-note.small { font-size: 12.5px; padding: 8px 4px; }
.ep-note code { background: var(--raise); padding: 1px 5px; border-radius: 4px; color: var(--green); }
.ep-grid.gifs { display: block; columns: 2; column-gap: 6px; }
.gif-item { display: block; width: 100%; margin: 0 0 6px; border-radius: 8px; overflow: hidden; break-inside: avoid; background: var(--raise); min-height: 60px; }
.gif-item img { display: block; width: 100%; }
.gif-item:hover { outline: 2px solid var(--green); }
.gif-more { width: 100%; padding: 8px; border-radius: 8px; background: var(--raise); color: var(--text); column-span: all; }
.ep-grid.stickers { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.sticker-item { width: 100%; aspect-ratio: 1; border-radius: 10px; padding: 4px; display: flex; align-items: center; justify-content: center; }
.sticker-item img { width: 100%; height: 100%; object-fit: contain; }
.sticker-item:hover { background: var(--raise); transform: scale(1.05); }
.sticker-item.add { border: 2px dashed var(--line); color: var(--muted); flex-direction: column; gap: 2px; font-size: 12px; }
.sticker-item.add svg { width: 26px; height: 26px; }
.sticker-item.add:hover { border-color: var(--green); color: var(--green); }
.sticker-wrap { position: relative; }
.sticker-del { position: absolute; top: 0; right: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--raise); color: var(--muted); opacity: 0; }
.sticker-del svg { width: 12px; height: 12px; display: block; margin: auto; }
.sticker-wrap:hover .sticker-del { opacity: 1; }
.sticker-del:hover { color: #ff7b7b; }

/* ---------- Sticker, GIF and call messages ---------- */
.msg img.sticker { width: 150px; height: 150px; object-fit: contain; display: block; cursor: default; }
.gif-wrap { position: relative; display: block; }
.msg img.gif { max-width: 280px; max-height: 260px; border-radius: 6px; cursor: default; }
.gif-badge { position: absolute; left: 6px; bottom: 6px; font-size: 10px; font-weight: 800; letter-spacing: .06em; background: rgba(0,0,0,.55); color: #fff; border-radius: 4px; padding: 1px 5px; }
.call-card { display: flex; align-items: center; gap: 10px; text-align: left; color: inherit; padding: 2px 6px 2px 0; min-width: 180px; }
.call-card .call-ico { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.call-card .call-ico svg { width: 18px; height: 18px; }
.call-card b { display: block; font-weight: 600; font-size: 14px; }
.call-card small { display: block; opacity: .75; font-size: 12px; }
.call-card.missed .call-ico { background: rgba(255,90,90,.18); color: #ff7b7b; }
.call-card.missed b { color: #ff9b9b; }

/* ---------- Call screen ---------- */
.call { position: fixed; inset: 0; z-index: 30; background: radial-gradient(ellipse at 30% 10%, rgba(63,156,242,.35), transparent 55%), radial-gradient(ellipse at 80% 90%, rgba(70,224,168,.25), transparent 50%), #060a1a; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; }
#remote-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; opacity: 0; pointer-events: none; }
.call.is-video.connected #remote-video { opacity: 1; }
#local-video { position: absolute; right: 16px; top: 16px; width: 180px; max-width: 32vw; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; border: 2px solid rgba(255,255,255,.35); background: #111; transform: scaleX(-1); display: none; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.call.is-video #local-video { display: block; }
.call.is-video.cam-off #local-video { opacity: .25; }
.call-info { position: relative; text-align: center; transition: opacity .3s; }
.call.is-video.connected .call-info { position: absolute; top: 18px; left: 18px; text-align: left; }
.call.is-video.connected .call-info .avatar { display: none; }
.avatar.xl { width: 120px; height: 120px; font-size: 44px; margin: 0 auto 16px; box-shadow: 0 0 0 6px rgba(70,224,168,.18), 0 0 0 14px rgba(63,156,242,.08); }
.call:not(.connected) .avatar.xl { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 12px rgba(70,224,168,.12), 0 0 0 26px rgba(63,156,242,.05); } }
.call-name { font-size: 26px; font-weight: 600; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.call-status { color: #b9c6e8; margin-top: 6px; font-size: 15px; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.call-controls { position: absolute; bottom: 42px; display: flex; gap: 34px; }
.cc { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; color: #d6def5; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.round { width: 62px; height: 62px; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(6px); transition: transform .1s; }
.round svg { width: 26px; height: 26px; }
.round:hover { transform: scale(1.07); }
.round.off { background: #fff; color: #0b1026; }
.round.red { background: #e5484d; }
.round.green { background: #22c55e; animation: bounce 1.2s ease-in-out infinite; }
@keyframes bounce { 50% { transform: translateY(-5px); } }

/* ---------- Layout: only the message list scrolls; header + composer stay put ---------- */
html, body { overflow: hidden; height: 100%; }
#app { height: 100vh; height: 100dvh; overflow: hidden; }
#sidebar { min-height: 0; }
#content { min-height: 0; overflow: hidden; }
#chat { flex: 1; min-height: 0; height: auto; }
#chat > header.bar { position: sticky; top: 0; z-index: 5; flex-shrink: 0; box-shadow: 0 1px 0 var(--line); }
#messages { min-height: 0; }
#composer, #reply-bar, #blocked-note { flex-shrink: 0; }

/* ======================= Mitrika extras ======================= */
select { font: inherit; width: 100%; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--raise); color: var(--text); }
label.check { display: flex; align-items: center; gap: 8px; color: var(--text) !important; font-size: 14px !important; margin: 10px 0 0; cursor: pointer; }
label.check input { width: 17px; height: 17px; flex-shrink: 0; }
label.check svg { width: 16px; height: 16px; }
.small { font-size: 12.5px; }
.modal-box h3 { display: flex; align-items: center; gap: 8px; }
.modal-box h3 svg { width: 20px; height: 20px; color: var(--green); }
.danger-item { color: #ff8a8a; }
.danger-item span svg { color: #ff8a8a !important; }
button.icon.has-badge { position: relative; }
button.icon.has-badge::after { content: ''; position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

/* Smart inbox chips */
.folders { display: flex; gap: 6px; padding: 8px 12px; overflow-x: auto; border-bottom: 1px solid var(--line); flex-shrink: 0; scrollbar-width: none; }
.folders::-webkit-scrollbar { display: none; }
.chip { padding: 5px 12px; border-radius: 16px; background: var(--raise); color: var(--muted); font-size: 13px; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.chip.on { background: var(--grad); color: #061226; font-weight: 600; }
.chip b { background: var(--green); color: #061226; border-radius: 9px; font-size: 11px; padding: 0 6px; }
.chip.on b { background: #061226; color: var(--green); }

/* Pinned bar + catch-up */
.pinned-bar { display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--panel); border-bottom: 1px solid var(--line); flex-shrink: 0; }
.pb-ico svg { width: 18px; height: 18px; color: var(--green); display: block; }
.pb-text { flex: 1; min-width: 0; text-align: left; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid var(--green); padding-left: 8px; }
.pb-text small { display: block; color: var(--green); font-size: 11.5px; font-weight: 600; }
.pinned-bar .icon { width: 30px; height: 30px; }
.pinned-bar .icon svg { width: 16px; height: 16px; }
.catchup { padding: 8px 12px 0; flex-shrink: 0; display: flex; gap: 6px; align-items: flex-start; }
.catchup-offer { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--grad); color: #061226; font-weight: 600; border-radius: 20px; padding: 8px 14px; font-size: 14px; }
.catchup-offer svg { width: 18px; height: 18px; }
.catchup > .icon { width: 34px; height: 34px; }
.cu-card { flex: 1; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; box-shadow: 0 8px 24px rgba(0,0,0,.35); max-height: 40vh; overflow-y: auto; }
.cu-head { display: flex; align-items: center; gap: 8px; }
.cu-head svg { width: 18px; height: 18px; color: var(--green); }
.cu-head .icon { margin-left: auto; width: 30px; height: 30px; }
.cu-mode { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; padding: 1px 8px; }
.cu-body { margin: 6px 0 2px; padding-left: 20px; font-size: 14px; line-height: 1.5; }
.cu-body li { margin: 3px 0; }

/* Smart replies + attach menu */
.smart-replies { display: flex; gap: 6px; align-items: center; padding: 6px 12px 0; background: var(--bar); overflow-x: auto; flex-shrink: 0; scrollbar-width: none; }
.sr-ico svg { width: 16px; height: 16px; color: var(--green); display: block; }
.sr-chip { border: 1px solid var(--green); color: var(--text); border-radius: 16px; padding: 5px 12px; font-size: 13.5px; white-space: nowrap; background: rgba(70,224,168,.07); }
.sr-chip:hover { background: rgba(70,224,168,.18); }
.attach-menu { position: absolute; left: 56px; bottom: 64px; z-index: 12; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.5); padding: 6px; min-width: 230px; }
.attach-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 8px; font-size: 14px; text-align: left; }
.attach-menu button:hover { background: var(--raise); }
.attach-menu span svg { width: 20px; height: 20px; color: var(--green); display: block; }

/* Message extras */
.meta .edited { font-style: italic; margin-right: 5px; }
.meta .timer-ico { margin-right: 4px; }
.deleted-text { display: inline-flex; align-items: center; gap: 6px; opacity: .65; }
.deleted-text svg { width: 14px; height: 14px; }
.msg.deleted .msg-act { display: none; }
.translation, .transcript { margin-top: 6px; padding-top: 6px; border-top: 1px dashed rgba(255,255,255,.2); font-size: 13.5px; opacity: .92; white-space: pre-wrap; }
.transcript { border-top: 0; padding-top: 2px; font-style: italic; }
.once-chip { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 2px; color: inherit; text-align: left; }
.once-chip svg { width: 30px; height: 30px; color: var(--green); }
.once-chip small { display: block; opacity: .7; font-size: 12px; }
.once-chip.tap { cursor: pointer; }
.once-chip.tap:hover svg { transform: scale(1.1); }
.once-chip.done svg { color: var(--muted); }
.once-view img, .once-view video { max-width: 100%; max-height: 65vh; display: block; margin: 0 auto; border-radius: 8px; user-select: none; -webkit-user-drag: none; }
.media-load { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 16px; border-radius: 8px; background: rgba(255,255,255,.07); color: inherit; min-width: 200px; }
.media-load small { opacity: .7; }
.quote-preview { background: var(--raise); border-left: 3px solid var(--green); border-radius: 6px; padding: 8px 10px; font-size: 13.5px; margin: 6px 0; white-space: pre-wrap; max-height: 120px; overflow: auto; }

/* Cards: poll, event, to-do */
.poll, .event, .todo { min-width: min(280px, 62vw); white-space: normal; }
.card-title { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.card-title svg { width: 18px; height: 18px; color: var(--green); flex-shrink: 0; }
.msg.out .card-title svg { color: #b8ffe6; }
.card-foot { font-size: 11.5px; opacity: .7; margin-top: 6px; }
.poll-opt { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 8px 10px; margin: 5px 0; border-radius: 8px; background: rgba(255,255,255,.08); overflow: hidden; color: inherit; }
.po-bar { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(70,224,168,.22); transition: width .3s; }
.poll-opt > span:not(.po-bar) { position: relative; }
.po-check { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); display: flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0; }
.poll-opt.mine .po-check { background: var(--green); border-color: var(--green); color: #061226; }
.po-text { flex: 1; }
.po-count { font-weight: 700; font-size: 13px; }
.ev-head { display: flex; gap: 12px; align-items: center; }
.ev-date { width: 52px; height: 56px; border-radius: 10px; background: var(--grad); color: #061226; display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.ev-date b { font-size: 22px; line-height: 1; }
.ev-date span { font-size: 11px; text-transform: uppercase; font-weight: 700; }
.ev-title { font-weight: 700; font-size: 15px; }
.ev-line { font-size: 13px; opacity: .85; display: flex; align-items: center; gap: 5px; }
.ev-line svg { width: 14px; height: 14px; }
.ev-note { font-size: 13px; margin: 8px 0 0; opacity: .85; }
.ev-rsvp { display: flex; gap: 5px; margin-top: 10px; }
.rsvp { flex: 1; padding: 6px 4px; border-radius: 8px; background: rgba(255,255,255,.08); font-size: 12.5px; color: inherit; display: flex; flex-direction: column; align-items: center; }
.rsvp b { font-size: 14px; }
.rsvp.on { background: var(--green); color: #061226; }
.ev-cal { margin-top: 8px; width: 100%; padding: 6px; border-radius: 8px; border: 1px dashed rgba(255,255,255,.3); font-size: 12.5px; color: inherit; display: flex; align-items: center; justify-content: center; gap: 6px; }
.ev-cal svg { width: 14px; height: 14px; }
.todo-count { margin-left: auto; font-size: 12px; opacity: .8; }
.todo-progress { height: 4px; border-radius: 2px; background: rgba(255,255,255,.12); margin-bottom: 6px; overflow: hidden; }
.todo-progress span { display: block; height: 100%; background: var(--green); transition: width .3s; }
.todo-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 6px 2px; color: inherit; border-bottom: 1px solid rgba(255,255,255,.06); }
.tbox { width: 18px; height: 18px; border-radius: 5px; border: 2px solid rgba(255,255,255,.5); display: flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0; }
.todo-item.done .tbox { background: var(--green); border-color: var(--green); color: #061226; }
.todo-item.done .ttext { text-decoration: line-through; opacity: .6; }
.ttext { flex: 1; }
.todo-item small { opacity: .6; font-size: 11px; }
.todo-add { display: flex; gap: 6px; margin-top: 6px; }
.todo-add input { padding: 6px 8px; font-size: 13px; background: rgba(0,0,0,.2); border-color: transparent; }
.todo-add button { padding: 0 10px; border-radius: 8px; background: rgba(255,255,255,.12); color: inherit; font-size: 13px; }

/* Modals: choices, segments, themes, sticker maker, PIN */
.choice-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0; }
.choice { padding: 8px 10px; border-radius: 10px; background: var(--raise); text-align: left; font-size: 13.5px; }
.choice small { display: block; color: var(--muted); font-size: 11.5px; }
.choice.on { outline: 2px solid var(--green); }
.seg { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.seg button { padding: 7px 12px; border-radius: 16px; background: var(--raise); font-size: 13px; }
.seg button.on { background: var(--grad); color: #061226; font-weight: 600; }
.seg button:disabled { opacity: .4; cursor: not-allowed; }
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; margin-top: 4px; }
.theme-sw { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; border-radius: 10px; background: var(--raise); font-size: 12px; }
.theme-sw span { width: 100%; height: 34px; border-radius: 6px; display: block; }
.theme-sw.on { outline: 2px solid var(--green); }
.t-mitrika span { background: linear-gradient(135deg, #1e5c9c, #17806f); }
.t-ocean span { background: linear-gradient(135deg, #0b63b6, #13a5d8); }
.t-sunset span { background: linear-gradient(135deg, #b2432f, #e68a2e); }
.t-forest span { background: linear-gradient(135deg, #1f6b3a, #56a047); }
.t-midnight span { background: linear-gradient(135deg, #3b2b7a, #6b3fa0); }
.t-rose span { background: linear-gradient(135deg, #a8325e, #e06c9f); }
.t-mono span { background: linear-gradient(135deg, #3a3f4b, #5b6170); }
.sm-canvas { width: 220px; height: 220px; display: block; margin: 10px auto; background: repeating-conic-gradient(#1a2447 0% 25%, #131b3b 0% 50%) 50% / 20px 20px; border-radius: 12px; }
.pin-input { text-align: center; font-size: 26px; letter-spacing: 12px; margin-top: 8px; }
.center svg { width: 34px; height: 34px; color: var(--green); }

/* Per-chat themes: bubble colour + wallpaper */
#chat[data-theme="ocean"] { --out: linear-gradient(135deg, #0b63b6, #1391c4); }
#chat[data-theme="ocean"] #messages { background: radial-gradient(ellipse at 80% 0%, rgba(19,165,216,.18), transparent 55%), radial-gradient(ellipse at 10% 100%, rgba(11,99,182,.2), transparent 50%); }
#chat[data-theme="sunset"] { --out: linear-gradient(135deg, #a83c2a, #d27a26); }
#chat[data-theme="sunset"] #messages { background: radial-gradient(ellipse at 90% 0%, rgba(230,138,46,.18), transparent 55%), radial-gradient(ellipse at 0% 100%, rgba(178,67,47,.18), transparent 50%); }
#chat[data-theme="forest"] { --out: linear-gradient(135deg, #1f6b3a, #4b8f3d); }
#chat[data-theme="forest"] #messages { background: radial-gradient(ellipse at 90% 0%, rgba(86,160,71,.16), transparent 55%), radial-gradient(ellipse at 0% 100%, rgba(31,107,58,.2), transparent 50%); }
#chat[data-theme="midnight"] { --out: linear-gradient(135deg, #3b2b7a, #5e379a); }
#chat[data-theme="midnight"] #messages { background: radial-gradient(ellipse at 80% 0%, rgba(107,63,160,.2), transparent 55%), radial-gradient(ellipse at 0% 100%, rgba(59,43,122,.25), transparent 50%); }
#chat[data-theme="rose"] { --out: linear-gradient(135deg, #a8325e, #cf5a8c); }
#chat[data-theme="rose"] #messages { background: radial-gradient(ellipse at 80% 0%, rgba(224,108,159,.16), transparent 55%), radial-gradient(ellipse at 0% 100%, rgba(168,50,94,.2), transparent 50%); }
#chat[data-theme="mono"] { --out: linear-gradient(135deg, #3a3f4b, #50566a); }
#chat[data-theme="mono"] #messages { background: none; }

/* Data saver: fewer animations */
body.saver *, body.saver *::before, body.saver *::after { animation: none !important; transition: none !important; }
body.saver #content { background: var(--bg); }

@media (max-width: 760px), (pointer: coarse) and (max-height: 540px) {
  .attach-menu { left: 12px; }
  .choice-list { grid-template-columns: 1fr; }
}
/* Layering: pop-up windows above panels and menus */
.modal { z-index: 40; }
.toast { z-index: 60; }
@media (max-width: 760px), (pointer: coarse) and (max-height: 540px) {
  #chat > header.bar { gap: 4px; padding: 0 6px; }
  #chat > header.bar button.icon { width: 32px; height: 32px; }
  #chat > header.bar button.icon svg { width: 19px; height: 19px; }
  #chat > header.bar .avatar { width: 34px; height: 34px; font-size: 13px; }
  .chat-meta .title { font-size: 15px; }
}

/* ======================= Camera & photo editor ======================= */
.cam { position: fixed; inset: 0; z-index: 45; background: #05070f; display: flex; flex-direction: column; color: #fff; }
.cam-top { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; }
.cam-top .icon { color: #fff; font-size: 22px; }
.cam-title { font-weight: 600; }
.cam-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.cam-stage video, .cam-stage canvas, .cam-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; }
.cam-stage video.mirror { transform: scaleX(-1); }
.cam-rec { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); background: #e5484d; padding: 4px 12px; border-radius: 14px; font-size: 13px; font-weight: 600; }
.compare { position: absolute; bottom: 10px; right: 12px; background: rgba(0,0,0,.55); color: #fff; padding: 6px 12px; border-radius: 14px; font-size: 12px; user-select: none; }
.fstrip { display: flex; gap: 8px; padding: 10px 12px; overflow-x: auto; flex-shrink: 0; scrollbar-width: none; }
.fstrip::-webkit-scrollbar { display: none; }
.fchip { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; color: #cdd6f2; flex-shrink: 0; }
.fchip span { width: 54px; height: 54px; border-radius: 12px; display: block; background: linear-gradient(135deg, #f6c177 0%, #e07a5f 35%, #3f9cf2 70%, #46e0a8 100%); border: 2px solid transparent; }
.fchip.on { color: #fff; font-weight: 700; }
.fchip.on span { border-color: var(--green); box-shadow: 0 0 0 2px rgba(70,224,168,.35); }
.cam-bottom { display: flex; align-items: center; justify-content: space-around; padding: 10px 16px 22px; flex-shrink: 0; }
.cam-gal { width: 48px; height: 48px; border-radius: 12px; background: rgba(255,255,255,.12); font-size: 22px; }
.shutter { width: 74px; height: 74px; border-radius: 50%; border: 4px solid #fff; display: flex; align-items: center; justify-content: center; }
.shutter span { width: 58px; height: 58px; border-radius: 50%; background: #fff; transition: all .15s; }
.shutter.video span { background: #e5484d; }
.shutter.recording span { width: 28px; height: 28px; border-radius: 6px; background: #e5484d; }
.cam-modes { display: flex; flex-direction: column; gap: 4px; }
.cam-modes button { font-size: 12.5px; padding: 4px 10px; border-radius: 12px; color: #aab4d4; }
.cam-modes button.on { background: rgba(255,255,255,.16); color: #fff; font-weight: 600; }
.ed-tools { display: flex; align-items: center; gap: 10px; padding: 6px 12px 0; flex-wrap: wrap; }
.enhance-btn { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 18px; background: rgba(255,255,255,.12); color: #fff; font-weight: 600; font-size: 13.5px; }
.enhance-btn svg { width: 17px; height: 17px; }
.enhance-btn.on { background: var(--grad); color: #061226; }
.ed-tabs { margin-left: auto; display: flex; gap: 4px; }
.ed-tabs button { padding: 6px 12px; border-radius: 14px; color: #aab4d4; font-size: 13px; }
.ed-tabs button.on { background: rgba(255,255,255,.14); color: #fff; }
.ed-adjust { padding: 6px 16px; display: grid; gap: 6px; flex-shrink: 0; }
.ed-adjust label { display: grid; grid-template-columns: 90px 1fr 34px; align-items: center; gap: 10px; font-size: 13px; color: #cdd6f2; margin: 0; }
.ed-adjust input[type=range] { padding: 0; accent-color: var(--green); background: none; border: 0; }
.ed-adjust b { text-align: right; font-weight: 600; }
.ed-send { display: flex; gap: 8px; padding: 8px 12px 18px; align-items: center; flex-shrink: 0; }
.ed-send input { flex: 1; background: rgba(255,255,255,.1); border: 0; color: #fff; }
.ed-send .primary { width: auto; padding: 10px 22px; }

/* ======================= Moments ======================= */
.moments-strip { display: flex; gap: 12px; padding: 10px 12px 6px; overflow-x: auto; border-bottom: 1px solid var(--line); flex-shrink: 0; scrollbar-width: none; }
.moments-strip::-webkit-scrollbar { display: none; }
.mtile { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; color: var(--muted); width: 58px; flex-shrink: 0; }
.mtile span:last-child { max-width: 58px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mring { position: relative; padding: 3px; border-radius: 50%; }
.mring .avatar { width: 48px; height: 48px; border: 2px solid var(--panel); }
.mring.ring { background: conic-gradient(from 210deg, #3f9cf2, #46e0a8, #a78bfa, #3f9cf2); }
.mring.ring.close { background: conic-gradient(#46e0a8, #22c55e, #46e0a8); }
.mring.ring.seen { background: #3a4570; }
.mring.mine { background: conic-gradient(from 210deg, #3f9cf2, #46e0a8, #3f9cf2); }
.mplus { position: absolute; right: 0; bottom: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--green); color: #061226; display: flex; align-items: center; justify-content: center; border: 2px solid var(--panel); }
.mplus svg { width: 13px; height: 13px; stroke-width: 3; }
.mmood { position: absolute; right: -4px; bottom: -2px; font-size: 16px; }
.mood-badge { position: absolute; right: -5px; bottom: -4px; font-size: 14px; line-height: 1; }
.mk-kinds { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.mk-kinds button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px; border-radius: 10px; background: var(--raise); font-size: 18px; }
.mk-kinds button span { font-size: 11px; color: var(--muted); }
.mk-kinds button svg { width: 20px; height: 20px; }
.mk-kinds button.on { outline: 2px solid var(--green); }
.mk-preview { margin-top: 10px; border-radius: 14px; min-height: 170px; padding: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.mk-preview textarea, .mk-preview input { background: rgba(0,0,0,.18); border: 0; color: #fff; text-align: center; font-size: 18px; }
.mk-preview textarea { min-height: 120px; resize: none; font-size: 20px; }
.mk-preview input::placeholder, .mk-preview textarea::placeholder { color: rgba(255,255,255,.7); }
.mk-preview .mk-q { font-weight: 700; }
.mk-preview .mk-opt { font-size: 15px; }
.mk-emoji { font-size: 64px; line-height: 1; }
.mk-bgs { display: flex; gap: 6px; margin: 8px 0; }
.mk-bgs button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; }
.mk-bgs button.on { border-color: #fff; box-shadow: 0 0 0 2px var(--green); }
.mk-moods { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin: 8px 0; }
.mk-moods button { font-size: 24px; padding: 4px; border-radius: 10px; }
.mk-moods button.on { background: var(--raise); outline: 2px solid var(--green); }
.link-like { background: none !important; color: var(--link) !important; text-decoration: underline; }
.mbg-aurora { background: linear-gradient(135deg, #3f9cf2, #46e0a8); }
.mbg-sunset { background: linear-gradient(135deg, #f97316, #db2777); }
.mbg-ocean { background: linear-gradient(135deg, #0ea5e9, #1e3a8a); }
.mbg-grape { background: linear-gradient(135deg, #7c3aed, #db2777); }
.mbg-forest { background: linear-gradient(135deg, #15803d, #65a30d); }
.mbg-rose { background: linear-gradient(135deg, #fb7185, #f472b6); }
.mbg-night { background: linear-gradient(135deg, #0b1026, #312e81); }
.mbg-gold { background: linear-gradient(135deg, #ca8a04, #ea580c); }
.font-bold { font-weight: 800; } .font-script p, .font-script textarea { font-family: "Segoe Script", "Brush Script MT", cursive; }
.font-mono p, .font-mono textarea { font-family: Consolas, "Courier New", monospace; }
.mv { position: fixed; inset: 0; z-index: 44; background: rgba(2,4,12,.96); display: flex; align-items: center; justify-content: center; }
.mv-frame { width: min(440px, 100vw); height: min(100dvh, 860px); display: flex; flex-direction: column; color: #fff; position: relative; }
.mv-bars { display: flex; gap: 4px; padding: 10px 10px 6px; }
.mv-bars span { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.28); overflow: hidden; }
.mv-bars span i { display: block; height: 100%; width: 0; background: #fff; }
.mv-bars span.done i { width: 100%; }
.mv-head { display: flex; align-items: center; gap: 10px; padding: 4px 10px; }
.mv-head small { display: block; color: #b6c1e0; font-size: 12px; }
.mv-head .icon { margin-left: auto; color: #fff; }
.mv-body { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; border-radius: 14px; overflow: hidden; margin: 6px 8px; }
.mv-body img, .mv-body video { max-width: 100%; max-height: 100%; object-fit: contain; }
.mv-caption { position: absolute; bottom: 14px; left: 12px; right: 12px; text-align: center; background: rgba(0,0,0,.45); padding: 8px 12px; border-radius: 10px; }
.mv-card { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 30px; text-align: center; }
.mv-card p { font-size: 24px; line-height: 1.35; margin: 0; white-space: pre-wrap; word-break: break-word; }
.mv-emoji { font-size: 96px; line-height: 1; }
.mv-q { font-weight: 800; }
.mv-opt, .mv-res { position: relative; z-index: 3; width: 100%; max-width: 300px; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.92); color: #0b1026; font-weight: 700; font-size: 16px; overflow: hidden; }
.mv-res { display: flex; justify-content: space-between; background: rgba(255,255,255,.25); color: #fff; }
.mv-res span { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255,255,255,.35); }
.mv-res b, .mv-res i { position: relative; font-style: normal; }
.mv-res.mine { outline: 2px solid #fff; }
.mv-nav { position: absolute; top: 0; bottom: 0; width: 35%; z-index: 2; }
.mv-nav.prev { left: 0; } .mv-nav.next { right: 0; }
.kind-poll .mv-nav { height: 30%; }
.mv-foot { display: flex; gap: 8px; align-items: center; padding: 8px 10px 16px; flex-wrap: wrap; }
.mv-reacts { display: flex; gap: 2px; width: 100%; justify-content: space-around; }
.mv-reacts button { font-size: 26px; padding: 4px 8px; border-radius: 50%; transition: transform .15s; }
.mv-reacts button.on, .mv-reacts button.pop { transform: scale(1.3); background: rgba(255,255,255,.12); }
.mv-reply { display: flex; gap: 8px; width: 100%; }
.mv-reply input { flex: 1; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); color: #fff; border-radius: 22px; }
.mv-reply button { width: 44px; height: 44px; border-radius: 50%; background: var(--grad); color: #061226; display: flex; align-items: center; justify-content: center; }
.mv-views { display: flex; align-items: center; gap: 6px; color: #fff; padding: 8px 12px; border-radius: 18px; background: rgba(255,255,255,.12); flex: 1; }
.mv-views svg { width: 18px; height: 18px; }
.mv-foot .secondary { display: flex; align-items: center; gap: 4px; }
.mv-foot svg { width: 16px; height: 16px; }
.big-emoji { font-size: 22px; }
.moment-quote { display: flex; gap: 8px; align-items: center; border-radius: 8px; padding: 6px 8px; margin: 2px 0 6px; color: #fff; max-width: 300px; }
.moment-quote img { width: 42px; height: 52px; object-fit: cover; border-radius: 6px; }
.moment-quote small { display: block; opacity: .85; font-size: 11px; }
.moment-quote span { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mq-emoji { font-size: 30px; }

/* ======================= Profiles ======================= */
.modal-box.wide { width: min(520px, 96vw); padding: 0; }
.modal-box.wide > .pf > *:not(.pf-cover):not(.pf-id) { margin-left: 20px; margin-right: 20px; }
.pf-cover { height: 130px; background-size: cover; background-position: center; border-radius: 10px 10px 0 0; position: relative; }
.pf-cover-btn { position: absolute; right: 10px; top: 10px; background: rgba(0,0,0,.45); color: #fff; border-radius: 14px; padding: 5px 10px; font-size: 12.5px; display: flex; align-items: center; gap: 5px; }
.pf-cover-btn svg { width: 15px; height: 15px; }
.pf-id { text-align: center; margin-top: -54px; padding: 0 20px; }
.pf-avatar { width: 108px !important; height: 108px !important; font-size: 38px !important; margin: 0 auto; border: 4px solid var(--panel); }
.pf-cam { position: absolute; right: 0; bottom: 2px; width: 32px; height: 32px; border-radius: 50%; background: var(--grad); color: #061226; display: flex; align-items: center; justify-content: center; }
.pf-cam svg { width: 17px; height: 17px; }
.pf-name { font-size: 22px; font-weight: 700; margin-top: 8px; }
.pf-user { color: var(--link); font-size: 14px; }
.pf-mood { display: inline-block; margin-top: 6px; padding: 3px 12px; border-radius: 14px; background: color-mix(in srgb, var(--acc) 18%, transparent); border: 1px solid var(--acc); font-size: 13.5px; }
.pf-about { color: var(--muted); margin-top: 6px; font-size: 14px; }
.pf-tabs { display: flex; gap: 4px; margin-top: 14px !important; border-bottom: 1px solid var(--line); }
.pf-tabs button { flex: 1; padding: 9px 4px; color: var(--muted); font-size: 14px; border-bottom: 2px solid transparent; }
.pf-tabs button.on { color: var(--text); border-bottom-color: var(--green); font-weight: 600; }
#pf-body { padding: 12px 0 18px; }
.pf-bio { white-space: pre-wrap; margin: 12px 0 6px; line-height: 1.5; }
.pf-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 13.5px; margin: 8px 0; }
.pf-links { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.pf-links a { color: var(--link); text-decoration: none; background: var(--raise); padding: 4px 10px; border-radius: 14px; font-size: 13px; }
.pf-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.pf-tags span { background: rgba(70,224,168,.12); color: var(--green); border-radius: 12px; padding: 3px 10px; font-size: 13px; }
.pf-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; align-items: center; }
.pf-row.center { justify-content: center; }
.pf-row .secondary { display: flex; align-items: center; gap: 6px; }
.pf-row svg { width: 16px; height: 16px; }
.pf-meta { margin-top: 6px; }
.pf-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.at-input { display: flex; align-items: center; background: var(--raise); border: 1px solid var(--line); border-radius: 8px; padding-left: 10px; }
.at-input span { color: var(--muted); }
.at-input input { border: 0; background: transparent; }
.swatches { display: flex; gap: 8px; margin: 6px 0; }
.swatches button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; }
.swatches button.on { border-color: #fff; box-shadow: 0 0 0 2px var(--green); }
.priv-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.priv-row b { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.priv-row b svg { width: 16px; height: 16px; }
.priv-row small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.priv-row select { width: auto; min-width: 140px; }
.switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 12px; background: #3a4570; transition: .2s; cursor: pointer; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { left: 23px; }
.qr-card { margin: 10px auto; width: 240px; padding: 16px; border-radius: 18px; background: #fff; color: #0b1026; text-align: center; border: 4px solid var(--acc); }
.qr-img svg { width: 100%; height: auto; display: block; }
.qr-card b { display: block; margin-top: 8px; } .qr-card span { color: #3b4a7a; font-size: 13px; }
.pf-actions { display: flex; justify-content: center; gap: 10px; margin: 14px 0 !important; }
.pf-actions button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 14px; border-radius: 12px; background: var(--raise); font-size: 12.5px; min-width: 74px; }
.pf-actions svg { width: 20px; height: 20px; color: var(--green); }
.pf h4 { margin: 16px 20px 6px !important; font-size: 14px; display: flex; gap: 6px; align-items: baseline; }
.pf h4 small { color: var(--muted); font-weight: 400; }
.pf-groups { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-groups button { background: var(--raise); padding: 6px 12px; border-radius: 14px; font-size: 13px; }
.pf-media { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.pf-media a { aspect-ratio: 1; overflow: hidden; border-radius: 6px; background: var(--raise); display: block; }
.pf-media img, .pf-media video { width: 100%; height: 100%; object-fit: cover; }
.pf-files { list-style: none; padding: 0; margin: 0; }
.pf-files li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.pf-files a { color: var(--link); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-files small { color: var(--muted); }
.pf-danger { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 0 18px; border-top: 1px solid var(--line); margin-top: 14px !important; }
@media (max-width: 760px), (pointer: coarse) and (max-height: 540px) {
  .mk-kinds { grid-template-columns: repeat(3, 1fr); }
  .pf-form .two { grid-template-columns: 1fr; }
}
.modal { z-index: 50; }

/* Camera choice sheet (used when the in-app camera is not available, e.g. plain http on a phone) */
.cam.as-sheet { background: rgba(3,5,12,.6); justify-content: flex-end; align-items: center; }
.cam-sheet { width: min(420px, 100%); background: var(--panel, #111a3a); border-radius: 18px 18px 0 0; padding: 14px 14px 18px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 -10px 30px rgba(0,0,0,.4); }
.cam-sheet-title { text-align: center; font-weight: 600; padding: 2px 0 6px; color: #cfd8f5; }
.cam-sheet button { width: 100%; text-align: left; padding: 14px 16px; border-radius: 12px; background: rgba(255,255,255,.07); color: #fff; font-size: 16px; }
.cam-sheet button:active { background: rgba(255,255,255,.16); }
.cam-sheet .cam-sheet-cancel { text-align: center; background: transparent; color: #aab4d4; }
.cam-sheet-tip { margin: 4px 2px; font-size: 12.5px; line-height: 1.45; color: #aab4d4; }
.cam-sheet-tip a { color: #5fd3b8; word-break: break-all; }

/* QR sign-in on a computer + linked devices */
.qr-login-code { width: 232px; height: 232px; margin: 8px auto 10px; background: #fff; border-radius: 14px; padding: 10px; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 26px rgba(0,0,0,.35); }
.qr-login-code svg { width: 100%; height: 100%; display: block; }
.qr-login-code .qr-wait { color: #4a5578; font-size: 13px; }
.qr-login-code .error { color: #c0392b; font-size: 13px; text-align: center; }
.qr-steps { text-align: left; margin: 6px 0 8px; padding-left: 20px; font-size: 13.5px; line-height: 1.55; color: #cfd8f5; }
#btn-qr-login { margin-top: 12px; font-size: 13.5px; }
.ld-list { list-style: none; padding: 0; margin: 6px 0 10px; display: flex; flex-direction: column; gap: 8px; }
.ld-row { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.05); }
.ld-ico { font-size: 22px; }
.ld-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ld-txt small { color: #8f9bc0; font-size: 12px; }
.ld-this { font-size: 11px; background: rgba(70,224,168,.18); color: #46e0a8; padding: 1px 7px; border-radius: 8px; }
.ld-row button.small { width: auto; padding: 6px 12px; font-size: 13px; }

/* ======================= Mitrika Business ======================= */
.modal-box.bmod { padding: 18px 20px; width: min(760px, 96vw); }
.modal-box.tall { min-height: min(640px, 86vh); }
.small { font-size: 12.5px; }
button.small { padding: 5px 12px; font-size: 13px; width: auto; }
.vbadge svg, .vtext svg { width: 15px; height: 15px; vertical-align: -2px; }
.vtext { color: #8ecbff; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.bmini { font-size: 12px; }
.bbadge { font-size: 11px; font-weight: 600; color: #061226; background: var(--grad); border-radius: 9px; padding: 1px 7px; vertical-align: 1px; display: inline-flex; align-items: center; gap: 4px; }
.bbadge svg { width: 12px; height: 12px; }
.open-yes { color: var(--green); font-weight: 600; }
.open-no { color: #ff9b8f; font-weight: 600; }
.ci-labels { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.ci-labels span, .ltag { font-size: 10.5px; padding: 0 7px; border-radius: 8px; color: var(--lc); border: 1px solid var(--lc); line-height: 16px; }
.chip.label-chip { border: 1px solid var(--lc); color: var(--lc); background: transparent; }
.chip.label-chip.on { background: var(--lc); color: #061226; }
.ldot { width: 12px; height: 12px; border-radius: 50%; background: var(--lc); display: inline-block; flex-shrink: 0; }
.lp-list .check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 15px; }
.auto-tag { font-size: 11px; color: #9fb4e6; opacity: .85; margin-bottom: 2px; }

/* product + order cards in chat */
.prod-card { display: flex; gap: 10px; align-items: stretch; min-width: 230px; max-width: 300px; background: rgba(0,0,0,.18); border-radius: 10px; overflow: hidden; }
.prod-card img, .prod-card .prod-ph { width: 86px; min-height: 86px; object-fit: cover; flex-shrink: 0; }
.prod-ph { display: flex; align-items: center; justify-content: center; font-size: 30px; background: var(--raise); border-radius: 8px; }
.prod-ph.sm { width: 44px; height: 44px; font-size: 20px; }
.prod-ph.big { height: 200px; font-size: 60px; }
.pc-body { padding: 8px 10px 8px 0; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pc-body small { color: var(--muted); }
.pc-body button { align-self: flex-start; margin-top: 4px; }
.pc-body em, .pd-info em, .pg-item em { color: #ff9b8f; font-size: 12px; font-style: normal; }
.pc-price { color: var(--green); font-weight: 700; }
.order-card { min-width: 250px; max-width: 320px; display: flex; flex-direction: column; gap: 6px; }
.order-card ul { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.order-card li { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.oc-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.oc-total { display: flex; justify-content: space-between; border-top: 1px dashed rgba(255,255,255,.2); padding-top: 6px; margin-top: 2px; }
.oc-note { font-size: 13px; color: #c7d2f0; }
.oc-actions { display: flex; gap: 6px; align-items: center; }
.oc-actions select { width: auto; padding: 5px 8px; font-size: 13px; }
.pill { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 9px; background: var(--raise); color: #c7d2f0; }
.pill.st-placed { background: #2a3a6e; } .pill.st-confirmed { background: #1c5a8f; color: #fff; } .pill.st-shipped { background: #6b4fb5; color: #fff; }
.pill.st-delivered, .pill.st-completed, .pill.st-paid { background: #1f7a5c; color: #fff; } .pill.st-cancelled { background: #7a2d2d; color: #fff; }
.upi-btn { display: block; text-align: center; background: var(--grad); color: #061226; font-weight: 700; border-radius: 18px; padding: 8px 12px; text-decoration: none; margin-top: 4px; }
.order-card button.link { margin: 0; align-self: flex-start; }

/* quick replies popup */
.qr-pop { margin: 0 12px; background: var(--bar); border: 1px solid var(--line); border-radius: 10px; max-height: 260px; overflow-y: auto; padding: 4px; }
.qr-pop button { display: flex; gap: 10px; width: 100%; text-align: left; padding: 7px 10px; border-radius: 8px; }
.qr-pop button.on, .qr-pop button:hover { background: var(--raise); }
.qr-pop b { color: var(--green); flex-shrink: 0; }
.qr-pop span { color: #c7d2f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qr-pop small { display: block; color: var(--muted); padding: 4px 10px; font-size: 11px; }

/* catalogue */
.cat-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.cat-head h3 { margin: 0; } .cat-head small { color: var(--muted); }
.cat-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 12px; margin-top: 10px; }
.pg-item { background: var(--raise); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.pg-item img, .pg-item .prod-ph { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.pg-item.off { opacity: .55; }
.pg-item button { align-self: flex-start; }
.pd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 8px; }
.pd-imgs { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; }
.pd-imgs img { width: 100%; flex-shrink: 0; aspect-ratio: 1; object-fit: cover; border-radius: 10px; scroll-snap-align: start; }
.pd-info h3 { margin: 0 0 6px; } .pd-info p { color: #c7d2f0; line-height: 1.5; }
.pd-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.pd-actions button { width: auto; display: inline-flex; align-items: center; gap: 6px; }
.pd-actions svg { width: 16px; height: 16px; }
.cart-list { list-style: none; padding: 0; margin: 10px 0; }
.cart-list li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cart-list small { display: block; color: var(--muted); }
.qty { display: flex; align-items: center; gap: 10px; }
.qty button { width: 28px; height: 28px; border-radius: 50%; background: var(--raise); font-size: 16px; }
#cart-note { margin: 10px 0; }
.cart-bar { position: sticky; bottom: -18px; width: 100%; margin-top: 14px; background: var(--grad); color: #061226; border-radius: 22px; padding: 11px 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.cart-bar b { margin-left: auto; } .cart-bar svg { width: 18px; height: 18px; }
.pick-list { list-style: none; padding: 0; margin: 0; max-height: 50vh; overflow-y: auto; }
.pick-list li { padding: 10px; border-radius: 8px; cursor: pointer; } .pick-list li:hover { background: var(--raise); }

/* business profile (customer view) */
.pf-biz { margin: 6px 18px 10px; padding: 12px 14px; background: var(--raise); border-radius: 12px; display: flex; flex-direction: column; gap: 6px; }
.pf-biz p { margin: 2px 0; color: #c7d2f0; }
.pfb-top { display: flex; gap: 10px; align-items: center; }
.pf-biz .pf-facts { display: flex; flex-direction: column; gap: 4px; }
.pf-biz .pf-facts a { color: var(--link); text-decoration: none; font-size: 14px; }
.pfb-hours ul { list-style: none; padding: 0; margin: 6px 0 0; font-size: 13px; }
.pfb-hours li { display: flex; justify-content: space-between; padding: 2px 0; }
.pf-biz .primary { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; } .pf-biz .primary svg { width: 16px; height: 16px; }

/* explore */
.ex-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; max-height: 56vh; overflow-y: auto; }
.ex-item { display: flex; gap: 12px; align-items: center; padding: 10px; background: var(--raise); border-radius: 10px; }
.ex-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; } .ex-body small { color: var(--muted); } .ex-body p { margin: 2px 0; font-size: 13px; color: #c7d2f0; }
.ex-acts { display: flex; flex-direction: column; gap: 6px; }
.vr-list { list-style: none; padding: 0; } .vr-list li { display: flex; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); } .vr-list li > div { flex: 1; }

/* business tools */
.bt-head { display: flex; justify-content: space-between; align-items: center; }
.bt-head h3 { margin: 0; }
.bt-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.bt-body { padding-top: 12px; }
.bt-body h4 { margin: 8px 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hours-ed { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.hr-row { display: grid; grid-template-columns: 90px 110px 1fr 22px 1fr; gap: 6px; align-items: center; font-size: 14px; }
.hr-row input, .hr-row select { padding: 6px 8px; }
.hr-row input:disabled { opacity: .35; }
select.inline { width: auto; display: inline-block; margin-left: 6px; padding: 3px 6px; font-size: 12px; }
.bt-card { background: var(--raise); border-radius: 10px; padding: 12px 14px; margin-top: 12px; }
.bt-card p { margin: 6px 0; }
.bt-card .row { display: flex; gap: 8px; align-items: center; }
.bt-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.bt-row select { width: auto; margin-left: auto; }
.bt-list { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-direction: column; gap: 6px; }
.bt-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--raise); border-radius: 10px; }
.bt-list li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bt-list li small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.bt-list li img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.bt-list.orders li select { width: auto; }
.bt-list.checks li { padding: 4px 10px; }
.bt-list .check { margin: 0; color: var(--text); font-size: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bt-list .check input, .lp-list input, .check input { width: auto; }
.chip .x { font-size: 11px; color: var(--muted); padding: 0 2px; }
.switch { position: relative; width: 38px; height: 22px; flex-shrink: 0; margin: 0 !important; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #3a4670; border-radius: 11px; transition: .2s; cursor: pointer; }
.switch span::after { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--green); } .switch input:checked + span::after { left: 19px; }
.pf-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.pf-img { position: relative; width: 76px; height: 76px; border-radius: 10px; overflow: hidden; background: var(--raise); display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); }
.pf-img img { width: 100%; height: 100%; object-fit: cover; }
.pf-img button { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.6); font-size: 11px; }
.pf-img.add { border: 1px dashed var(--muted); cursor: pointer; margin: 0 !important; }
input.tiny { width: 60px; padding: 3px 6px; display: inline-block; }
.check.big { color: var(--text) !important; font-size: 15px !important; display: flex !important; align-items: center; gap: 8px; margin: 0 !important; }
.slash { font-size: 20px; color: var(--green); font-weight: 700; }
.swatches { display: flex; gap: 4px; }
.sw { width: 22px; height: 22px; border-radius: 50%; background: var(--lc); border: 2px solid transparent; }
.sw.on { border-color: #fff; }
.bt-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bt-table th, .bt-table td { text-align: left; padding: 6px; border-bottom: 1px solid var(--line); }
.bt-table td small { display: block; color: var(--muted); }
.link-grid { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: start; }
.qr-box { background: #fff; border-radius: 12px; padding: 10px; } .qr-box svg { width: 100%; height: auto; display: block; }
.link-grid .row { display: flex; gap: 6px; }
.ln-prev { margin: 10px 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 10px 0; }
.tile { background: var(--raise); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; }
.tile b { font-size: 22px; } .tile span { color: var(--muted); font-size: 13px; } .tile small { color: var(--green); font-size: 12px; }
.todo-list { list-style: none; padding: 0; margin: 6px 0 0; } .todo-list li { padding: 4px 0; } .todo-list li.done { color: var(--muted); }
@media (max-width: 640px) {
  .grid2, .pd, .link-grid { grid-template-columns: 1fr; }
  .hr-row { grid-template-columns: 76px 96px 1fr 18px 1fr; font-size: 13px; }
  .prod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- personal features (personal.js) ---- */
.fwd-tag { font-size: 12px; font-style: italic; color: var(--muted); display: flex; align-items: center; gap: 4px; margin-bottom: 2px; }
.fwd-tag svg { width: 13px; height: 13px; }
.star-mark { font-size: 10px; margin-right: 3px; }
.loc-card, .ct-card { white-space: normal; display: block; width: 260px; max-width: 100%; border-radius: 10px; overflow: hidden; background: rgba(0,0,0,.18); }
.loc-card a { display: block; color: inherit; text-decoration: none; }
.map-tile { position: relative; height: 150px; overflow: hidden; background: #2a3556; }
.map-grid { position: absolute; width: 768px; height: 768px; } .map-grid img { position: absolute; width: 256px; height: 256px; max-width: none; border-radius: 0; }
.map-pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); font-size: 26px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.5)); }
.map-attr { position: absolute; right: 3px; bottom: 2px; font-size: 9px; background: rgba(255,255,255,.75); color: #222; padding: 0 3px; border-radius: 3px; }
.loc-card.live .map-pin { animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { transform: translate(-50%, -100%) scale(1.15); } }
.loc-body { padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.loc-body small, .ct-card small { color: var(--muted); font-size: 12px; display: block; }
.loc-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.btn-mini { font-size: 12px; padding: 4px 10px; border-radius: 12px; background: rgba(255,255,255,.1); color: var(--text); text-decoration: none; display: inline-block; }
.btn-mini:hover { background: rgba(255,255,255,.18); }
.btn-mini.danger { color: #ff9b9b; }
.ct-card { padding: 10px; } .ct-card .row { display: flex; gap: 10px; align-items: center; }
.fw-list, .starred-list, .store-list, .sec-events { list-style: none; margin: 8px 0; padding: 0; max-height: 46vh; overflow: auto; }
.fw-list li label, .fw-list .ct-pick { display: flex; align-items: center; gap: 10px; padding: 6px 4px; width: 100%; text-align: left; cursor: pointer; border-radius: 8px; }
.fw-list li label:hover, .fw-list .ct-pick:hover { background: var(--raise); }
.fw-list .avatar { width: 32px; height: 32px; font-size: 13px; }
.starred-list li { padding: 8px; border-bottom: 1px solid var(--line); cursor: pointer; } .starred-list li:hover { background: var(--raise); }
.starred-list small { color: var(--muted); }
.store-list li { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.store-list li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .store-list li small { color: var(--muted); }
.store-list li i { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--blue); }
.store-list li[data-c] { cursor: pointer; } .store-list.sel li label { flex: 1; margin: 0; }
.row.wrap { flex-wrap: wrap; gap: 6px; display: flex; }
.sec-block { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.sec-block p { margin: 4px 0 8px; }
.sec-events li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; } .sec-events small { color: var(--muted); white-space: nowrap; }
.spd { font-size: 11px; font-weight: 700; padding: 2px 8px; margin-left: 4px; border-radius: 10px; background: rgba(255,255,255,.12); color: var(--text); vertical-align: middle; }
#applock { position: fixed; inset: 0; z-index: 9999; background: radial-gradient(circle at 30% 20%, #16224f, var(--bg) 65%); display: grid; place-items: center; }
#applock .al-card { width: min(320px, 90vw); text-align: center; display: flex; flex-direction: column; gap: 10px; }
#applock img { width: 64px; margin: 0 auto; } #applock h2 { margin: 0 0 6px; font-size: 20px; }
#applock input { text-align: center; font-size: 20px; letter-spacing: 6px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.avatar.sm { width: 36px; height: 36px; font-size: 13px; flex-shrink: 0; }
.sec-block .row { display: flex; gap: 6px; } .sec-block .row input { min-width: 0; flex: 1; } .sec-block .row button { white-space: nowrap; width: auto; }

/* ---- group calls (groupcall.js) ---- */
.gcall { position: fixed; inset: 0; z-index: 900; background: #050817; display: flex; flex-direction: column; }
.gc-head { padding: 14px 18px; display: flex; gap: 12px; align-items: baseline; }
.gc-head b::after { content: attr(data-time); margin-left: 10px; font-weight: 400; color: var(--muted); font-size: 13px; }
.gc-grid { flex: 1; display: grid; gap: 8px; padding: 8px; min-height: 0; grid-auto-rows: 1fr; }
.gc-tile { position: relative; background: #121a38; border-radius: 12px; overflow: hidden; display: grid; place-items: center; min-height: 120px; }
.gc-tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.gc-tile.has-video video { display: block; } .gc-tile.has-video .avatar { display: none; }
.gc-name { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.55); padding: 2px 8px; border-radius: 8px; font-size: 13px; }
.gc-muted { font-style: normal; margin-left: 4px; }
.gc-controls { display: flex; justify-content: center; gap: 14px; padding: 14px; }
.gc-btn { width: 54px; height: 54px; border-radius: 50%; background: #1d2850; color: #fff; display: grid; place-items: center; font-size: 20px; }
.gc-btn svg { width: 24px; height: 24px; } .gc-btn.off { background: #fff; color: #111; } .gc-btn.end { background: #e5484d; } .gc-btn.end svg { transform: rotate(135deg); }
.gc-ring { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 950; background: var(--raise); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; gap: 16px; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.5); max-width: 94vw; }
.gc-ring > div:first-child { display: flex; gap: 10px; align-items: center; } .gc-ring .avatar { width: 44px; height: 44px; font-size: 16px; } .gc-ring small { display: block; color: var(--muted); }
.gc-ring .row { display: flex; gap: 8px; } .gc-ring button { width: auto; }
.gjoin { background: #e5484d; color: #fff; padding: 6px 12px; border-radius: 16px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.gcall-dot { font-size: 11px; color: #ff8a8a; margin-left: 6px; }

/* ---- communities & channels (communities.js) ---- */
.hub-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.hub-head h3 { margin: 0; display: flex; gap: 6px; align-items: center; } .hub-head h3 svg { width: 20px; height: 20px; }
.hub-list { list-style: none; padding: 0; margin: 8px 0 12px; }
.hub-list li { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 8px; }
.hub-list li:hover { background: var(--raise); }
.hub-list li > div { flex: 1; min-width: 0; } .hub-list li small { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-list .avatar { width: 42px; height: 42px; font-size: 15px; flex-shrink: 0; }
.hub-ico { width: 42px; height: 42px; border-radius: 12px; background: var(--raise2); display: grid; place-items: center; font-size: 20px; flex-shrink: 0; }
.hub-list button.small, button.small { width: auto; padding: 4px 12px; font-size: 13px; }
.chan-badge { font-size: 12px; }
.comm-tag { font-size: 11px; color: var(--muted); margin-left: 6px; white-space: nowrap; }
.views { font-size: 11px; margin-right: 6px; color: var(--muted); }
.avatar.lg { width: 72px; height: 72px; font-size: 26px; margin: 0 auto; }
.avatar.xl { width: 84px; height: 84px; font-size: 30px; }

/* ---- end-to-end encryption (e2ee.js) ---- */
.e2e-banner { display: block; margin: 6px auto 10px; max-width: 520px; text-align: center; font-size: 12px; line-height: 1.45; color: #f6d999; background: rgba(90,71,22,.35); border: 1px solid rgba(160,130,40,.35); border-radius: 10px; padding: 6px 12px; }
.e2e-banner u { color: #ffe08a; }
.safety { display: grid; grid-template-columns: repeat(4, auto); gap: 6px 14px; justify-content: center; font-family: Consolas, Menlo, monospace; font-size: 18px; letter-spacing: 1px; margin: 8px 0; }

/* ---------- Main navigation: bottom tabs, panes, + button (nav.js) ---------- */
#sidebar { position: relative; }
.bar-actions.legacy { display: none; }
.me-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.me-meta b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-meta small { color: var(--muted); font-size: 12px; }
.pane { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.pane-head { flex-shrink: 0; border-bottom: 1px solid var(--line); }
.pane-scroll { flex: 1; overflow-y: auto; padding-bottom: 80px; }
.pad { padding: 16px; }
.center { text-align: center; }
.bottom-nav { display: flex; flex-shrink: 0; background: var(--bar); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0); }
.bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 6px; color: var(--muted); position: relative; }
.bottom-nav button svg { width: 23px; height: 23px; }
.bottom-nav button small { font-size: 11.5px; }
.bottom-nav button.on { color: var(--text); }
.bottom-nav button.on span[data-icon] { background: rgba(63,156,242,.18); border-radius: 14px; padding: 2px 16px; color: var(--green); }
.bottom-nav button:focus-visible { outline: 2px solid var(--blue); outline-offset: -3px; }
.nav-badge { position: absolute; top: 3px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--green); color: #061226; font-size: 11px; font-style: normal; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.nav-badge.dot { min-width: 9px; width: 9px; height: 9px; padding: 0; top: 6px; }
#nb-calls { background: #e5484d; color: #fff; }
.fab { position: absolute; right: 16px; bottom: calc(72px + env(safe-area-inset-bottom, 0px)); width: 54px; height: 54px; border-radius: 16px; background: var(--grad); color: #061226; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(0,0,0,.45); z-index: 3; }
.fab svg { width: 24px; height: 24px; }
.fab:hover { filter: brightness(1.08); }
.fab-menu { position: absolute; right: 16px; bottom: calc(134px + env(safe-area-inset-bottom, 0px)); background: var(--raise); border: 1px solid var(--line); border-radius: 12px; padding: 6px; z-index: 4; box-shadow: 0 12px 32px rgba(0,0,0,.5); min-width: 230px; }
.fab-menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 8px; text-align: left; }
.fab-menu button:hover { background: rgba(255,255,255,.06); }
.fab-menu svg { width: 20px; height: 20px; color: var(--green); }

/* Contacts + calls lists */
.ct-actions { display: flex; gap: 8px; padding: 8px 12px 10px; flex-wrap: wrap; align-items: center; }
.ct-actions .secondary { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; padding: 7px 12px; }
.ct-actions svg { width: 17px; height: 17px; }
.ct-h { margin: 14px 14px 4px; font-size: 12.5px; font-weight: 600; color: var(--green); text-transform: uppercase; letter-spacing: .04em; display: flex; justify-content: space-between; align-items: center; }
.ct-h .link { margin: 0; text-transform: none; letter-spacing: 0; font-size: 13px; }
.ct-h .link:disabled { opacity: .45; cursor: default; }
.ct-list, .call-list { list-style: none; margin: 0; padding: 0; }
.ct-row, .cl-row { display: flex; align-items: center; gap: 12px; padding: 9px 14px; cursor: pointer; }
.ct-row:hover, .cl-row:hover { background: rgba(255,255,255,.04); }
.ct-body { flex: 1; min-width: 0; }
.ct-body b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-body small { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-row input[type=checkbox] { width: 18px; height: 18px; flex-shrink: 0; }
.small-btn { padding: 5px 12px !important; font-size: 13px; }
.ct-hint { display: flex; gap: 14px; align-items: flex-start; margin: 14px; padding: 14px; border: 1px dashed var(--line); border-radius: 12px; }
.ct-hint > svg { width: 34px; height: 34px; color: var(--green); flex-shrink: 0; }
.ct-hint p { margin: 0; line-height: 1.45; }
.cl-day { padding: 12px 14px 4px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.cl-dir svg { width: 14px; height: 14px; color: var(--green); }
.cl-row.missed b, .cl-row.missed .cl-dir svg { color: #ff7b7b; }
.cl-row .icon svg, .ct-row .icon svg { width: 21px; height: 21px; color: var(--green); }
.tag { font-size: 11px; background: var(--raise); color: var(--muted); padding: 1px 6px; border-radius: 6px; font-weight: 500; }
.call-pick li .icon svg { color: var(--green); }

/* "Not in your contacts" bar */
.contact-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; background: rgba(63,156,242,.1); border-bottom: 1px solid var(--line); font-size: 13.5px; }
.cb-text { flex: 1; min-width: 160px; display: flex; flex-direction: column; }
.cb-text span { color: var(--muted); font-size: 12.5px; }
.cb-actions { display: flex; gap: 6px; align-items: center; }
.cb-actions .secondary { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 13px; }
.cb-actions svg { width: 16px; height: 16px; }
.cb-actions .icon { width: 32px; height: 32px; }
.danger-soft { color: #ff9b9b !important; }

/* Invite */
.invite-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.invite-grid .secondary { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; }
.invite-grid .secondary:disabled { opacity: .45; cursor: default; }
.invite-grid svg { width: 18px; height: 18px; }

/* Tools page */
.tools .tool-grid { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 0 8px; }
.tool { display: flex; align-items: center; gap: 14px; padding: 11px 10px; border-radius: 10px; text-align: left; }
.tool:hover { background: rgba(255,255,255,.05); }
.tool-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--raise); display: flex; align-items: center; justify-content: center; color: var(--green); flex-shrink: 0; font-size: 18px; }
.tool-ic svg { width: 21px; height: 21px; }
.tool-tx { display: flex; flex-direction: column; min-width: 0; }
.tool-tx small { color: var(--muted); font-size: 12.5px; }
.tool[data-t="logout"] .tool-ic { color: #ff9b9b; }

/* Call screen: 5 buttons fit on phones */
.call-controls { flex-wrap: wrap; justify-content: center; max-width: 96vw; }
@media (max-width: 520px) { .call-controls { gap: 14px; bottom: 28px; } .round { width: 54px; height: 54px; } .round svg { width: 23px; height: 23px; } }
.gc-btn svg { width: 22px; height: 22px; }
.round:disabled, .gc-btn:disabled { opacity: .5; }

/* Video effects panel (callfx.js) */
.fx-panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: rgba(11,16,38,.96); border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; padding: 12px 14px calc(14px + env(safe-area-inset-bottom, 0px)); color: var(--text); box-shadow: 0 -12px 40px rgba(0,0,0,.5); max-width: 720px; margin: 0 auto; }
.fx-head { display: flex; align-items: baseline; gap: 10px; }
.fx-head .muted { font-size: 12.5px; flex: 1; }
.fx-x { width: 32px; height: 32px; border-radius: 50%; background: var(--raise); }
.fx-label { margin: 10px 0 6px; font-size: 12.5px; color: var(--green); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.fx-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.fx-chip { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; width: 68px; }
.fx-chip > span, .fx-chip > img { width: 60px; height: 44px; border-radius: 10px; object-fit: cover; border: 2px solid transparent; display: flex; align-items: center; justify-content: center; background: var(--raise); font-size: 20px; }
.fx-chip small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 68px; }
.fx-chip.on > span, .fx-chip.on > img { border-color: var(--green); }
.fx-chip.on small { color: var(--text); font-weight: 600; }
.fx-sw { background: linear-gradient(135deg, #f2c49b 0%, #d98a6a 35%, #6fa6d6 70%, #4f8f6a 100%) !important; }
.fx-blur { background: radial-gradient(circle at 50% 60%, #c9a98f 0 22%, transparent 23%), linear-gradient(135deg, #6c84a8, #9fb8a0) !important; filter: blur(1.5px); }
.fx-blur.strong { filter: blur(3px); }
.fx-status { min-height: 1.2em; font-size: 12.5px; margin-top: 6px; }
/* toasts sit above the bottom tabs on phones */
@media (max-width: 760px), (pointer: coarse) and (max-height: 540px) { #app:not(.in-chat) ~ .toast, .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } }

/* Phones turned sideways: same one-screen layout as upright, made compact so the list still has room */
@media (pointer: coarse) and (max-height: 540px) and (orientation: landscape) {
  #sidebar > .brandbar { display: none; }
  #sidebar > .bar { height: 48px; }
  #sidebar .bar .avatar { width: 34px; height: 34px; font-size: 13px; }
  #pane-chats { overflow-y: auto; }
  #pane-chats #chat-list { flex: none; overflow: visible; }
  #pane-chats .moments-strip { padding-top: 4px; padding-bottom: 4px; }
  .bottom-nav button { flex-direction: row; justify-content: center; gap: 8px; padding: 6px 0; }
  .bottom-nav button.on span[data-icon] { padding: 2px 10px; }
  .nav-badge { top: 2px; left: calc(50% + 2px); }
  .fab { bottom: calc(56px + env(safe-area-inset-bottom, 0px)); width: 48px; height: 48px; }
  .fab-menu { bottom: calc(112px + env(safe-area-inset-bottom, 0px)); max-height: 70vh; overflow-y: auto; }
  #chat > .bar { height: 50px; }
  .call-controls { bottom: 14px; }
  .modal-box { max-height: 94vh; }
}
.get-app { display: block; margin: 14px auto 0; padding: 12px 18px; border: 1px solid var(--green); border-radius: 24px; color: var(--green); text-decoration: none; font-weight: 600; text-align: center; max-width: 320px; }
.get-app:hover { background: rgba(70,224,168,.08); }

/* ======================================================================
   Attachments: file cards that wrap long names, multi-file send preview
   ====================================================================== */
.msg { min-width: 0; }
.file-link { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.08); padding: 9px 10px; border-radius: 12px; color: inherit; text-decoration: none; max-width: 100%; min-width: 0; }
.fl-ic { flex-shrink: 0; width: 42px; height: 48px; border-radius: 8px; display: grid; place-items: center; font-size: 10.5px; font-weight: 800; letter-spacing: .02em; color: #fff;
  background: linear-gradient(160deg, #4a76d8, #2f4fa3); clip-path: polygon(0 0, 72% 0, 100% 22%, 100% 100%, 0 100%); }
.fl-ic.fl-pdf { background: linear-gradient(160deg, #e5484d, #a8262b); }
.fl-ic.fl-xlsx, .fl-ic.fl-xls, .fl-ic.fl-csv { background: linear-gradient(160deg, #2fa66a, #1b7347); }
.fl-ic.fl-pptx, .fl-ic.fl-ppt { background: linear-gradient(160deg, #e07a3a, #b4511d); }
.fl-ic.fl-zip, .fl-ic.fl-rar { background: linear-gradient(160deg, #8a6ad8, #5b3fa8); }
.fl-name { flex: 1; min-width: 0; overflow-wrap: anywhere; word-break: break-word; line-height: 1.3; font-size: 14px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fl-dl { flex-shrink: 0; opacity: .7; font-size: 15px; }
.send-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 48vh; overflow-y: auto; margin: 6px 0 10px; }
.sg-item { position: relative; border-radius: 12px; background: var(--raise); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.sg-item img, .sg-item .sg-ic { width: 100%; aspect-ratio: 1; object-fit: cover; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--green); background: rgba(255,255,255,.04); }
.sg-item.video .sg-ic { font-size: 30px; }
.sg-name { padding: 4px 6px 0; font-size: 11.5px; overflow-wrap: anywhere; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sg-size { padding: 0 6px 6px; font-size: 11px; color: var(--muted); }
.sg-x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; }

/* ======================================================================
   Mitrika call screen: calm view, glass dock, info pill, self-view,
   reactions, call tools, audio outputs, screen sharing, add people
   ====================================================================== */
.call .cp-lock, .gcall .cp-lock { display: none; }
.call .cp-lock svg, .gcall .cp-lock svg { width: 13px; height: 13px; }

/* the dock: one glass capsule, squircle buttons, a thin Mitrika gradient line on top */
.call-dock { position: absolute; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; gap: 8px; padding: 10px 12px 8px;
  background: rgba(10,14,34,.62); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,.08); border-radius: 26px;
  box-shadow: 0 18px 50px rgba(0,0,0,.45); max-width: calc(100vw - 20px); flex-wrap: nowrap; justify-content: center; transition: opacity .35s, transform .35s; z-index: 3; }
.call-dock::before { content: ''; position: absolute; left: 22px; right: 22px; top: -1px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, #3f9cf2, #46e0a8); opacity: .85; }
.call-dock .cc { gap: 5px; font-size: 11px; color: #c9d4f2; text-shadow: none; min-width: 56px; }
.call-dock .round { width: 52px; height: 52px; border-radius: 18px; background: rgba(255,255,255,.09); backdrop-filter: none; }
.call-dock .round svg { width: 23px; height: 23px; }
.call-dock .round:hover { transform: translateY(-2px); background: rgba(255,255,255,.14); }
.call-dock .round.off { background: #f2f5ff; color: #0b1026; }
.call-dock .round.lit { background: linear-gradient(135deg, #3f9cf2, #46e0a8); color: #061226; }
.call-dock .round.tools { background: linear-gradient(135deg, rgba(63,156,242,.28), rgba(70,224,168,.28)); color: #aef3d8; box-shadow: inset 0 0 0 1px rgba(70,224,168,.45); }
.call-dock .round.red { width: 64px; border-radius: 20px; background: linear-gradient(135deg, #ff5d6c, #d92f4a); }
@media (max-width: 400px) { .call-dock { gap: 4px; padding: 9px 8px 7px; } .call-dock .cc { min-width: 50px; } .call-dock .round { width: 46px; height: 46px; border-radius: 16px; } .call-dock .round.red { width: 56px; } }

/* connected video call: the name + timer float as a pill at the top */
.call.is-video.connected .call-info { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 10px; border-radius: 999px; background: rgba(10,14,34,.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.08);
  text-align: left; max-width: calc(100vw - 150px); z-index: 3; transition: opacity .35s, transform .35s; }
.call.is-video.connected .call-info .cp-lock { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(70,224,168,.18); color: #46e0a8; flex-shrink: 0; }
.call.is-video.connected .call-name { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: none; }
.call.is-video.connected .call-status { margin: 0; font-size: 13px; color: #9fe9cc; font-variant-numeric: tabular-nums; text-shadow: none; }
.pill-add { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px; width: 40px; height: 40px; border-radius: 14px; background: rgba(10,14,34,.55); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.1); color: #fff; display: grid; place-items: center; z-index: 3; transition: opacity .35s; }
.pill-add svg { width: 20px; height: 20px; }
.call:not(.connected) .pill-add { display: none; }

/* my own picture: a tile at the top right; in the calm view it shrinks into the bottom corner */
.call.is-video #local-video { top: calc(66px + env(safe-area-inset-top, 0px)); right: 14px; width: 118px; max-width: 30vw; border-radius: 18px; border: 0;
  box-shadow: 0 0 0 2px rgba(70,224,168,.55), 0 12px 30px rgba(0,0,0,.5); transition: width .35s ease, top .35s ease, bottom .35s ease, border-radius .35s; z-index: 2; }
@media (min-width: 761px) { .call.is-video #local-video { width: 200px; } }
.self-flip { position: absolute; top: calc(74px + env(safe-area-inset-top, 0px)); right: 22px; width: 34px; height: 34px; border-radius: 12px; background: rgba(10,14,34,.6); color: #fff; display: grid; place-items: center; z-index: 3; transition: opacity .3s; }
.self-flip svg { width: 18px; height: 18px; }
.call:not(.connected) .self-flip { display: none; }

/* calm view */
.call.calm .call-dock, .gcall.calm .call-dock { opacity: 0; transform: translate(-50%, 24px); pointer-events: none; }
.call.calm .call-info, .gcall.calm .call-pill { opacity: 0; transform: translate(-50%, -18px); pointer-events: none; }
.call.calm .pill-add, .call.calm .self-flip, .gcall.calm .gc-add { opacity: 0; pointer-events: none; }
.call.calm #local-video { width: 74px; top: calc(100% - 117px - env(safe-area-inset-bottom, 0px)); border-radius: 14px; }   /* 74 wide = 99 tall, 18 from the bottom */
.call.calm .share-chip, .gcall.calm .share-chip { opacity: .0; pointer-events: none; }
.call.peer-sharing #remote-video { object-fit: contain; background: #000; }

/* sharing my screen */
.share-chip { position: absolute; top: calc(66px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; z-index: 4;
  padding: 6px 6px 6px 12px; border-radius: 999px; background: rgba(9,40,32,.85); border: 1px solid rgba(70,224,168,.5); color: #d9fff0; font-size: 13px; transition: opacity .3s; white-space: nowrap; }
.share-chip svg { width: 16px; height: 16px; color: #46e0a8; }
.share-chip button { background: #46e0a8; color: #061226; border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: 12.5px; }
.call.is-video.me-sharing #local-video { box-shadow: 0 0 0 2px #46e0a8, 0 0 22px rgba(70,224,168,.6); }

/* reactions rise as glowing bubbles */
.react-burst { position: absolute; bottom: 130px; z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; animation: mitrika-rise 3.1s cubic-bezier(.2,.7,.3,1) forwards; }
.react-burst .rb-emoji { font-size: 42px; line-height: 1; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle, rgba(70,224,168,.32), rgba(63,156,242,.12) 60%, transparent 70%); filter: drop-shadow(0 6px 14px rgba(0,0,0,.35)); }
.react-burst .rb-who { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: rgba(10,14,34,.7); color: #e8eefc; }
@keyframes mitrika-rise { 0% { transform: translateY(30px) scale(.4); opacity: 0; } 12% { transform: translateY(0) scale(1.15); opacity: 1; } 25% { transform: translateY(-30px) scale(1); }
  100% { transform: translateY(-46vh) translateX(18px) scale(.9); opacity: 0; } }

/* Call tools / people picker: a sheet that rises from the bottom */
.call-sheet { position: absolute; left: 50%; bottom: 0; width: min(560px, 100%); transform: translate(-50%, 105%); z-index: 6; background: rgba(9,13,32,.97); color: #e8eefc;
  border-radius: 26px 26px 0 0; border: 1px solid rgba(255,255,255,.08); border-bottom: 0; padding: 8px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -20px 60px rgba(0,0,0,.55); transition: transform .3s cubic-bezier(.2,.8,.3,1); max-height: 86vh; display: flex; flex-direction: column; }
.call-sheet.open { transform: translate(-50%, 0); }
.cs-grip { width: 42px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.22); margin: 2px auto 10px; flex-shrink: 0; }
.cs-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-shrink: 0; }
.cs-head b { flex: 1; font-size: 16px; }
.cs-spark { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, #3f9cf2, #46e0a8); color: #061226; }
.cs-spark svg { width: 18px; height: 18px; }
.cs-x { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; }
.cs-label { font-size: 12px; color: #8fdcc0; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin: 4px 0 8px; }
.cs-reacts { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 6px; border-radius: 20px; background: rgba(255,255,255,.05); margin-bottom: 14px; }
@media (max-width: 340px) { .cs-reacts { grid-template-columns: repeat(4, 1fr); } }
.cs-reacts button { font-size: 26px; width: 100%; height: 46px; border-radius: 16px; display: grid; place-items: center; transition: transform .12s, background .12s; }
.cs-reacts button:hover { background: rgba(255,255,255,.08); transform: translateY(-3px); }
.cs-reacts button.pop { animation: mitrika-pop .35s ease; }
@keyframes mitrika-pop { 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
.cs-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cs-tile { display: flex; align-items: center; gap: 10px; text-align: left; padding: 11px; border-radius: 18px; background: rgba(255,255,255,.05); color: inherit; border: 1px solid transparent; min-width: 0; }
.cs-tile:hover { background: rgba(255,255,255,.09); }
.cs-tile.on { border-color: rgba(70,224,168,.6); background: rgba(70,224,168,.1); }
.cs-tile[aria-disabled="true"] { opacity: .55; }
.cs-ic { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0; background: rgba(63,156,242,.18); color: #8fc6ff; }
.cs-tile:nth-child(2n) .cs-ic { background: rgba(70,224,168,.16); color: #7fe8c4; }
.cs-ic svg { width: 20px; height: 20px; }
.cs-tx { min-width: 0; display: flex; flex-direction: column; }
.cs-tx b { font-size: 14px; } .cs-tx small { font-size: 11.5px; color: #93a0c4; line-height: 1.3; }
@media (max-width: 360px) { .cs-tiles { grid-template-columns: 1fr; } }
/* people picker */
.call-sheet.picker .cp-search { margin-bottom: 6px; flex-shrink: 0; }
.cp-chosen { font-size: 12.5px; color: #8fdcc0; min-height: 18px; margin-bottom: 4px; flex-shrink: 0; }
.cp-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 120px; }
.cp-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 6px; border-radius: 14px; text-align: left; color: inherit; }
.cp-row:hover { background: rgba(255,255,255,.05); }
.cp-row .avatar { width: 40px; height: 40px; font-size: 14px; flex-shrink: 0; }
.cp-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cp-tx small { color: #93a0c4; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-check { width: 24px; height: 24px; border-radius: 8px; border: 2px solid rgba(255,255,255,.25); display: grid; place-items: center; font-size: 14px; color: #061226; flex-shrink: 0; }
.cp-row.on .cp-check { background: linear-gradient(135deg, #3f9cf2, #46e0a8); border-color: transparent; }
.cp-empty { color: #93a0c4; padding: 16px 6px; }
.cp-go { margin-top: 10px; padding: 13px; border-radius: 16px; font-weight: 700; background: linear-gradient(135deg, #3f9cf2, #46e0a8); color: #061226; flex-shrink: 0; }
.cp-go:disabled { opacity: .45; }

/* audio outputs: a small card above the dock */
.route-pop { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(118px + env(safe-area-inset-bottom, 0px)); z-index: 6; min-width: 240px; padding: 8px;
  background: rgba(9,13,32,.97); border: 1px solid rgba(255,255,255,.1); border-radius: 20px; box-shadow: 0 18px 50px rgba(0,0,0,.55); color: #e8eefc; }
.rp-title { font-size: 12px; color: #8fdcc0; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 4px 8px 6px; }
.route-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 8px; border-radius: 14px; color: inherit; text-align: left; }
.route-pop button:hover { background: rgba(255,255,255,.06); }
.route-pop button.on { background: rgba(70,224,168,.12); }
.rp-ic { width: 32px; height: 32px; border-radius: 11px; display: grid; place-items: center; background: rgba(255,255,255,.07); }
.route-pop .on .rp-ic { background: linear-gradient(135deg, #3f9cf2, #46e0a8); color: #061226; }
.rp-ic svg { width: 18px; height: 18px; }
.rp-name { flex: 1; } .rp-tick { color: #46e0a8; font-weight: 700; }

/* group call in the same style */
.gcall { background: radial-gradient(ellipse at 20% 0%, rgba(63,156,242,.22), transparent 55%), radial-gradient(ellipse at 90% 100%, rgba(70,224,168,.16), transparent 50%), #050817; }
.gcall .call-pill { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 10px;
  border-radius: 999px; background: rgba(10,14,34,.6); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.08); max-width: calc(100vw - 24px); transition: opacity .35s, transform .35s; white-space: nowrap; }
.gcall .call-pill .cp-lock { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(70,224,168,.18); color: #46e0a8; flex-shrink: 0; }
.gcall .call-pill b { overflow: hidden; text-overflow: ellipsis; }
.gcall .call-pill .muted { font-size: 12.5px; }
.gc-add { width: 32px; height: 32px; border-radius: 11px; background: linear-gradient(135deg, rgba(63,156,242,.35), rgba(70,224,168,.35)); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.gc-add svg { width: 17px; height: 17px; }
.gcall .gc-grid { padding: calc(62px + env(safe-area-inset-top, 0px)) 8px calc(110px + env(safe-area-inset-bottom, 0px)); transition: padding .35s; }
.gcall.calm .gc-grid { padding-top: 8px; padding-bottom: 8px; }
.gcall .gc-controls.call-dock { padding: 10px 12px 8px; }
.gc-tile { border-radius: 20px; }
.gc-tile.sharing video { object-fit: contain; background: #000; }
.gcall .share-chip { top: calc(60px + env(safe-area-inset-top, 0px)); }
/* incoming group call: a compact Mitrika card at the top */
.gc-ring { min-width: min(360px, 94vw); padding: 12px 12px 12px 14px; border-radius: 22px; background: rgba(9,13,32,.97); border: 1px solid rgba(70,224,168,.35);
  box-shadow: 0 18px 50px rgba(0,0,0,.55), 0 0 0 4px rgba(70,224,168,.08); justify-content: space-between; }
.gc-ring > div:first-child { min-width: 0; }
.gc-ring .avatar, .gc-ring .avatar.xl { width: 46px; height: 46px; font-size: 17px; flex-shrink: 0; animation: none; box-shadow: 0 0 0 3px rgba(70,224,168,.35); }
.gc-ring b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc-ring small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.gc-ring .row button { border-radius: 14px; padding: 8px 14px; }
.gc-ring #gr-yes { background: linear-gradient(135deg, #3f9cf2, #46e0a8); color: #061226; font-weight: 700; }

/* ---------- Media, links and docs (gallery.js) ---------- */
.gallery { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: flex; flex-direction: column; padding-top: env(safe-area-inset-top); }
.gl-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--panel); }
.gl-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gl-title b { font-size: 16px; } .gl-title small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gl-sel { background: none; border: 1px solid var(--line); color: var(--text); border-radius: 18px; padding: 6px 14px; cursor: pointer; }
.gl-tabs { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--panel); border-bottom: 1px solid var(--line); }
.gl-tabs button { background: none; border: 0; color: var(--muted); padding: 12px 4px; font: inherit; font-weight: 600; cursor: pointer; }
.gl-tabs button.on { color: var(--text); }
.gl-tabs button i { font-style: normal; font-weight: 500; font-size: 12px; opacity: .7; }
.gl-ink { position: absolute; left: 0; bottom: -1px; width: 25%; height: 3px; border-radius: 3px; background: var(--grad); transition: transform .25s ease; }
.gl-body { flex: 1; overflow-y: auto; padding: 6px 6px calc(70px + env(safe-area-inset-bottom)); }
.gl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 3px; }
.gl-month { grid-column: 1 / -1; padding: 12px 6px 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.gl-cell { position: relative; aspect-ratio: 1; border: 0; padding: 0; border-radius: 6px; overflow: hidden; background: var(--raise); cursor: pointer; }
.gl-ph, .gl-ph img, .gl-ph video { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.gl-play { position: absolute; left: 6px; bottom: 6px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; color: #fff; background: rgba(0,0,0,.55); }
.gl-cell.broken::after { content: '⚠'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.gl-check { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.35); color: #04121f; font-size: 13px; font-weight: 800; display: grid; place-items: center; flex-shrink: 0; }
.gl-check.on { background: var(--green); border-color: var(--green); }
.gl-list { list-style: none; margin: 0; padding: 0; }
.gl-list li { border-bottom: 1px solid var(--line); }
.gl-doc, .gl-link, .gl-voice { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 8px; background: none; border: 0; color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.gl-list .gl-check { position: static; border-color: var(--muted); }
.gl-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gl-tx b { overflow-wrap: anywhere; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gl-tx small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-url { color: var(--blue); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-fav { flex-shrink: 0; width: 42px; height: 42px; border-radius: 10px; background: linear-gradient(160deg, #2b3d78, #1a2447); display: grid; place-items: center; font-weight: 800; color: var(--blue); }
.gl-vplay { flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--grad); color: #04121f; display: grid; place-items: center; cursor: pointer; }
.gl-vplay svg { width: 20px; height: 20px; }
.gl-voice audio { width: 100%; height: 34px; margin-top: 4px; }
.gl-empty { display: grid; place-items: center; gap: 6px; padding: 60px 20px; color: var(--muted); text-align: center; }
.gl-empty svg { width: 44px; height: 44px; opacity: .5; }
.gl-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--bar); border-top: 1px solid var(--line); }
.gl-bar .danger { width: auto; }
.gl-viewer { position: fixed; inset: 0; z-index: 70; background: #000; display: flex; flex-direction: column; }
.glv-top { display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 10px 8px; background: linear-gradient(rgba(0,0,0,.7), transparent); color: #fff; position: absolute; top: 0; left: 0; right: 0; z-index: 2; }
.glv-top .icon { color: #fff; }
.glv-meta { flex: 1; display: flex; flex-direction: column; } .glv-meta small { opacity: .75; }
.glv-stage { flex: 1; display: grid; place-items: center; overflow: hidden; }
.glv-stage img, .glv-stage video { max-width: 100%; max-height: 100%; object-fit: contain; }
.glv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; border-radius: 10px; background: rgba(255,255,255,.12); color: #fff; font-size: 30px; cursor: pointer; }
.glv-nav.prev { left: 8px; } .glv-nav.next { right: 8px; }
.glv-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.75)); text-align: center; }
.glv-cap:empty { display: none; }
@media (hover: none) { .glv-nav { display: none; } }
/* profile strip */
.pf-gal { margin: 14px 0 4px; background: var(--raise); border-radius: 14px; padding: 4px 10px 10px; }
.pf-gal-head { display: flex; justify-content: space-between; align-items: center; width: 100%; background: none; border: 0; color: var(--text); padding: 10px 2px; font: inherit; cursor: pointer; }
.pf-gal-head span { color: var(--muted); font-size: 13px; }
.pf-gal-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-bottom: 8px; }
.pf-gal-kinds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pf-gal-kinds button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); font: inherit; font-size: 12px; cursor: pointer; }
.pf-gal-kinds span { font-size: 18px; } .pf-gal-kinds small { color: var(--muted); font-size: 11px; }
.pf-alias { font-style: italic; }

/* ---------- Calls tab: select & delete ---------- */
.cl-selbar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--raise); border-bottom: 1px solid var(--line); }
.cl-selbar .danger { width: auto; padding: 6px 14px; display: inline-flex; align-items: center; gap: 6px; }
.cl-selbar .danger svg { width: 16px; height: 16px; }
.call-list.selecting .cl-row { cursor: pointer; }
.cl-row .gl-check { position: static; border-color: var(--muted); margin-right: 2px; }
.cl-row.sel { background: rgba(70,224,168,.08); }
.call-list.selecting [data-again], .call-list.selecting .cl-more { display: none; }
.cl-selbar b { white-space: nowrap; }
.cl-more { font-size: 20px; line-height: 1; color: var(--muted); }
.cl-menu { display: flex; flex-direction: column; gap: 8px; }
.cl-menu button { display: flex; align-items: center; gap: 10px; justify-content: flex-start; }
.cl-menu button svg { width: 18px; height: 18px; }
.cl-mhead { display: flex; align-items: center; gap: 12px; padding-bottom: 8px; }
.cl-mhead div { display: flex; flex-direction: column; } .cl-mhead small { color: var(--muted); }

/* ---------- Scheduled calls (schedule.js) ---------- */
.sc-form label { display: block; margin: 12px 0 6px; font-size: 13px; color: var(--muted); }
.sc-kind { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sc-kind button { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--raise); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.sc-kind button svg { width: 20px; height: 20px; }
.sc-kind button.on { border-color: transparent; background: var(--grad); color: #04121f; }
.sc-row { display: grid; grid-template-columns: 1.6fr 1fr; gap: 10px; }
.sc-row select { width: 100%; padding: 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--raise); color: var(--text); font: inherit; }
input[type="datetime-local"] { color-scheme: dark; }
.sc-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.sc-chip { border: 0; border-radius: 16px; padding: 5px 10px; background: rgba(63,156,242,.18); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.sc-people { list-style: none; margin: 6px 0; padding: 0; max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.sc-people button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.sc-people button.on { background: rgba(70,224,168,.08); }
.sc-people .gl-check { position: static; border-color: var(--muted); }
.sc-people .avatar { width: 36px; height: 36px; flex-shrink: 0; }
.sc-pn { flex: 1; min-width: 0; display: flex; flex-direction: column; } .sc-pn small { color: var(--muted); font-size: 12px; }
.sc-ic { flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(160deg, #3f9cf2, #2a6fc0); color: #fff; }
.sc-ic.v { background: linear-gradient(160deg, #42c0c8, #1d8a7a); }
.sc-ic svg { width: 22px; height: 22px; }
.sc-card { min-width: 240px; max-width: 320px; display: flex; flex-direction: column; gap: 8px; padding: 4px 2px; }
.sc-card.off { opacity: .65; }
.sc-chead { display: flex; align-items: center; gap: 10px; }
.sc-chead > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sc-chead b { overflow-wrap: anywhere; }
.sc-kicker { font-size: 11.5px; opacity: .8; }
.sc-tag { flex-shrink: 0; font-size: 11.5px; padding: 3px 8px; border-radius: 10px; background: rgba(255,255,255,.12); white-space: nowrap; }
.sc-tag.live { background: var(--green); color: #04121f; font-weight: 700; animation: scPulse 1.6s ease-in-out infinite; }
.sc-tag.off { background: rgba(255,255,255,.08); }
@keyframes scPulse { 50% { box-shadow: 0 0 0 5px rgba(70,224,168,.18); } }
.sc-when { display: flex; align-items: center; gap: 6px; font-size: 13.5px; } .sc-when svg { width: 16px; height: 16px; opacity: .8; }
.sc-note { font-size: 13px; opacity: .9; overflow-wrap: anywhere; }
.sc-going { font-size: 12px; opacity: .75; }
.sc-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border-top: 1px solid rgba(255,255,255,.12); padding-top: 8px; }
.sc-acts button { width: auto; padding: 6px 12px; font-size: 13px; }
.sc-acts .link { margin-left: auto; }
.sc-join { display: inline-flex; align-items: center; gap: 6px; } .sc-join svg { width: 16px; height: 16px; }
.sc-detail .sc-dhead { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.sc-detail .sc-dhead div { display: flex; flex-direction: column; } .sc-detail .sc-dhead small { color: var(--muted); }
.sc-plist { list-style: none; padding: 0; margin: 10px 0; }
.sc-plist li { display: flex; justify-content: space-between; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.sc-yes { color: var(--green); } .sc-no { color: #ff8a8a; }
.sc-detail .actions { flex-wrap: wrap; }
.sc-up { list-style: none; margin: 0 0 6px; padding: 0 10px; }
.sc-up li { display: flex; align-items: center; gap: 12px; padding: 10px; margin-bottom: 6px; border-radius: 12px; background: var(--raise); cursor: pointer; }
.sc-up li.live { box-shadow: inset 0 0 0 1px var(--green); }
.sc-date { flex-shrink: 0; width: 44px; height: 48px; border-radius: 10px; background: var(--grad); color: #04121f; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.sc-date b { font-size: 18px; } .sc-date small { font-size: 11px; text-transform: uppercase; font-weight: 700; }
.sc-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sc-tx b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-tx small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-alert { position: fixed; z-index: 80; left: 50%; transform: translateX(-50%); top: calc(12px + env(safe-area-inset-top)); width: min(460px, 94vw); display: flex; align-items: center; gap: 10px;
  padding: 12px; border-radius: 16px; background: var(--bar); border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(0,0,0,.5); animation: scDrop .3s ease; }
.sc-alert .sc-tx small:first-child { color: var(--green); }
.sc-alert button { width: auto; padding: 8px 12px; }
@keyframes scDrop { from { opacity: 0; transform: translate(-50%, -14px); } }
@media (max-width: 420px) { .sc-alert { flex-wrap: wrap; } .sc-alert .sc-tx { flex-basis: calc(100% - 54px); } .sc-alert button { flex: 1; } }

/* ---------- Encryption: unlock on a new device / approve it on another ---------- */
.ek-wait { display: flex; align-items: center; gap: 12px; padding: 12px; margin: 10px 0; border-radius: 12px; background: var(--raise); }
.ek-wait > div { flex: 1; display: flex; flex-direction: column; gap: 2px; } .ek-wait small { color: var(--muted); }
.ek-code { font-size: 20px; letter-spacing: .08em; font-variant-numeric: tabular-nums; color: var(--green); white-space: nowrap; }
.ek-spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--green); animation: ekSpin 1s linear infinite; flex-shrink: 0; }
@keyframes ekSpin { to { transform: rotate(360deg); } }
.ek-more { margin: 8px 0; } .ek-more summary { cursor: pointer; color: var(--blue); padding: 6px 0; }
.ek-more .danger { width: auto; }
.e2e-ask { position: fixed; z-index: 90; left: 50%; top: calc(12px + env(safe-area-inset-top)); transform: translateX(-50%); width: min(460px, 94vw);
  display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; padding: 14px; border-radius: 16px; background: var(--bar); border: 1px solid var(--green); box-shadow: 0 16px 40px rgba(0,0,0,.55); animation: scDrop .3s ease; }
.ea-ic { font-size: 26px; }
.ea-tx { display: flex; flex-direction: column; gap: 4px; } .ea-tx small { color: var(--muted); }
.ea-code { display: flex; align-items: baseline; gap: 10px; margin: 4px 0; } .ea-code span { color: var(--muted); font-size: 12px; }
.ea-code b { font-size: 22px; letter-spacing: .08em; color: var(--green); font-variant-numeric: tabular-nums; }
.ea-act { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; } .ea-act button { width: auto; padding: 8px 16px; }
.danger-link { color: #ff8a8a !important; }
#chat-list li.held { background: rgba(70,224,168,.10); }
#chat-list li { -webkit-touch-callout: none; user-select: none; }

/* ---------- five bottom tabs ---------- */
.bottom-nav button { min-width: 0; }
.bottom-nav button small { font-size: 11px; max-width: 100%; padding: 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Mitrika menu (logo at the top): Help & Support, About ---------- */
#sidebar { position: relative; }
.brandbar.clickable { cursor: pointer; user-select: none; border-radius: 10px; }
.brandbar.clickable:hover .bb-caret, .brandbar.clickable[aria-expanded="true"] .bb-caret { color: var(--text); }
.bb-caret { color: var(--muted); font-size: 12px; margin-left: -2px; transition: transform .2s; }
.brandbar[aria-expanded="true"] .bb-caret { transform: rotate(180deg); }
.brand-menu { position: absolute; z-index: 40; top: 44px; left: 12px; width: min(290px, calc(100% - 24px)); padding: 6px; border-radius: 14px; background: var(--bar); border: 1px solid var(--line); box-shadow: 0 14px 34px rgba(0,0,0,.5); animation: scDrop .18s ease; }
.brand-menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.brand-menu button:hover, .brand-menu button:focus-visible { background: var(--raise); }
.brand-menu button > span { font-size: 20px; } .brand-menu button div { display: flex; flex-direction: column; } .brand-menu small { color: var(--muted); font-size: 12px; }
.hs input[type="search"] { margin-bottom: 6px; }
.hs-item { border-bottom: 1px solid var(--line); }
.hs-item summary { cursor: pointer; padding: 10px 2px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 8px; }
.hs-item summary::after { content: '+'; color: var(--muted); } .hs-item[open] summary::after { content: '–'; }
.hs-item p { margin: 0 2px 12px; color: var(--muted); }
.hs-contact { margin-top: 16px; padding: 12px; border-radius: 12px; background: var(--raise); display: flex; flex-direction: column; gap: 8px; }
.hs-contact select { padding: 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; }
.hs-contact p { margin: 0; }
.about .ab-logo { width: 84px; } .about .brand { margin: 6px 0 2px; } .about .tagline { margin: 0 0 14px; }
.ab-facts { margin: 0 0 12px; text-align: left; border-radius: 12px; background: var(--raise); padding: 4px 12px; }
.ab-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); } .ab-facts div:last-child { border: 0; }
.ab-facts dt { color: var(--muted); } .ab-facts dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.ab-text { text-align: left; font-size: 14px; } .ab-text p { margin: 8px 0; }

/* ---------- Invite friends ---------- */
.iv-poster { display: grid; place-items: center; min-height: 140px; margin: 8px 0 12px; }
.iv-poster img { width: min(260px, 70%); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.iv textarea { font-size: 14px; }
.iv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0 6px; }
.iv-grid button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 2px; border: 1px solid var(--line); border-radius: 12px; background: var(--raise); color: var(--text); font: inherit; font-size: 12px; cursor: pointer; }
.iv-grid button:hover { border-color: var(--green); }
.iv-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--c); color: #fff; font-size: 20px; font-weight: 800; }
.iv-ic svg { width: 20px; height: 20px; }

/* ---------- Communities tab ---------- */
.cm-intro { display: flex; gap: 12px; align-items: center; padding: 14px 14px 6px; }
.cm-intro-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--grad); color: #04121f; display: grid; place-items: center; flex-shrink: 0; }
.cm-intro-ic svg { width: 24px; height: 24px; }
.cm-intro div { display: flex; flex-direction: column; } .cm-intro small { color: var(--muted); font-size: 12.5px; }
.cm-newbtn { display: flex; align-items: center; gap: 12px; width: calc(100% - 20px); margin: 8px 10px; padding: 10px 12px; border-radius: 14px; border: 1px dashed var(--line); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.cm-newbtn > span { width: 40px; height: 40px; border-radius: 50%; background: var(--raise); display: grid; place-items: center; color: var(--green); }
.cm-newbtn > span svg { width: 20px; height: 20px; }
.cm-newbtn div { display: flex; flex-direction: column; } .cm-newbtn small { color: var(--muted); font-size: 12px; }
.cm-card { margin: 10px; border-radius: 16px; background: var(--raise); overflow: hidden; }
.cm-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; border-bottom: 1px solid var(--line); }
.cm-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; } .cm-head small { color: var(--muted); font-size: 12px; }
.cm-head .avatar { border-radius: 12px; }
.cm-more { color: var(--muted); font-size: 22px; }
.cm-rows { list-style: none; margin: 0; padding: 0; }
.cm-rows li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; cursor: pointer; }
.cm-rows li + li { border-top: 1px solid rgba(255,255,255,.04); }
.cm-rows li:hover { background: rgba(255,255,255,.03); }
.cm-rows li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cm-rows b { font-weight: 600; font-size: 14.5px; }
.cm-rows small { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--panel); display: grid; place-items: center; flex-shrink: 0; }
.cm-unread { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--green); color: #04121f; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }
.cm-join { width: auto; padding: 5px 12px; font-size: 13px; }
.moments-strip.in-panel { border: 0; padding: 6px 0 10px; }
.cm-head .avatar { width: 46px; height: 46px; flex: none; }
.bottom-nav button small { font-size: 10.5px; letter-spacing: -.01em; }

/* ---------- Moments tab ---------- */
.mo-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 14px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.mo-row:hover { background: rgba(255,255,255,.03); }
.mo-row .mring { flex-shrink: 0; position: relative; }
.mo-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mo-tx small { color: var(--muted); font-size: 12.5px; }
.mo-me { padding-top: 14px; }
.mo-add { width: 34px; height: 34px; border-radius: 50%; background: var(--raise); display: grid; place-items: center; color: var(--green); }
.mo-add svg { width: 18px; height: 18px; }
.mo-kinds { display: flex; gap: 8px; overflow-x: auto; padding: 4px 14px 12px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.mo-kinds::-webkit-scrollbar { display: none; }
.mo-kinds button { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 64px; padding: 8px 2px; border-radius: 12px; border: 1px solid var(--line); background: var(--raise); color: var(--text); font: inherit; font-size: 11.5px; cursor: pointer; }
.mo-kinds button span { font-size: 20px; }
.mo-list { list-style: none; margin: 0; padding: 0; }

/* ---------- windows always above full-screen pages ---------- */
.modal { z-index: 75; }

/* ---------- Settings page ---------- */
.settings-page { position: fixed; inset: 0; z-index: 58; background: var(--bg); display: flex; flex-direction: column; padding-top: env(safe-area-inset-top); }
@media (min-width: 900px) { .settings-page { inset: 0 auto 0 0; width: min(520px, 100vw); border-right: 1px solid var(--line); box-shadow: 20px 0 60px rgba(0,0,0,.45); } }
.set-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--panel); border-bottom: 1px solid var(--line); }
.set-head h2 { margin: 0; font-size: 19px; }
.set-body { flex: 1; overflow-y: auto; padding: 8px 0 calc(30px + env(safe-area-inset-bottom)); }
.set-me { display: flex; align-items: center; gap: 14px; width: calc(100% - 20px); margin: 6px 10px 10px; padding: 14px; border-radius: 16px; border: 0; background: var(--raise); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.set-me .avatar.big { width: 64px; height: 64px; font-size: 24px; flex: none; }
.set-group { margin: 10px; border-radius: 16px; background: var(--raise); overflow: hidden; }
.set-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.set-row + .set-row, .set-group .set-sw + .set-row, .set-group .set-row + .set-sw { border-top: 1px solid rgba(255,255,255,.05); }
.set-row:hover { background: rgba(255,255,255,.03); }
.set-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--panel); display: grid; place-items: center; font-size: 18px; flex-shrink: 0; color: var(--green); font-weight: 700; }
.set-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.set-tx small { color: var(--muted); font-size: 12.5px; }
.set-chev { color: var(--muted); font-size: 14px; white-space: nowrap; }
.set-sw { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.set-sw > div { flex: 1; display: flex; flex-direction: column; gap: 2px; } .set-sw small { color: var(--muted); font-size: 12.5px; }
.set-card .set-sw { padding: 10px 0; border-bottom: 1px solid var(--line); }
.set-card { margin: 10px; padding: 14px; border-radius: 16px; background: var(--raise); display: flex; flex-direction: column; gap: 8px; }
.set-card > b { font-size: 15px; } .set-card p { margin: 0; }
.set-card .row input { flex: 1; min-width: 0; }
.set-card .row button { width: auto; white-space: nowrap; }
.set-sub { display: flex; flex-direction: column; padding: 12px 14px 4px; } .set-sub small { color: var(--muted); }
.set-logout { display: flex; align-items: center; justify-content: center; gap: 8px; width: calc(100% - 20px); margin: 14px 10px; padding: 12px; border-radius: 14px; border: 1px solid rgba(255,138,138,.35); background: none; color: #ff8a8a; font: inherit; font-weight: 600; cursor: pointer; }
.set-logout svg { width: 18px; height: 18px; }
.pad-x { padding: 4px 16px; }
#sec-more .sec-block { margin: 10px; padding: 14px; border-radius: 16px; background: var(--raise); }
.pk-list { list-style: none; margin: 0; padding: 0; }
.pk-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pk-list li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; } .pk-list small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.pk-list .link { width: auto; padding: 4px 6px; }
.acc-list { list-style: none; margin: 10px; padding: 0; border-radius: 16px; background: var(--raise); overflow: hidden; }
.acc-list .avatar { width: 44px; height: 44px; flex: none; }
.acc-on { color: var(--green); font-weight: 800; font-size: 18px; }
.acc-state.error { color: #ff8a8a; }
#acc-add { margin: 0 10px; width: calc(100% - 20px); border-radius: 16px; background: var(--raise); }
.blk-list { list-style: none; margin: 0; padding: 0 14px 8px; }
.blk-list li { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px solid rgba(255,255,255,.05); }
.blk-list .link { width: auto; }
.pv-opts { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 4px; }
.pv-opts .radio { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--raise); cursor: pointer; }
.pv-opts input { width: auto; margin: 0; accent-color: var(--green); }

/* ---------- login: password, passkey, more accounts ---------- */
.login-more { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin-top: 6px; }
.login-more .link { width: auto; }
#step-password input { margin-bottom: 10px; }
.add-acc-banner { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; padding: 12px; border-radius: 14px; background: rgba(63,156,242,.12); border: 1px solid rgba(63,156,242,.35); text-align: left; }
.add-acc-banner small { color: var(--muted); }
.add-acc-banner .link { width: auto; align-self: flex-start; padding: 0; }
.acc-pick { display: flex; justify-content: space-between; align-items: center; }

/* ---------- search with a "what to search" dropdown ---------- */
.search.search-x { display: flex; gap: 8px; align-items: center; position: relative; }
.search.search-x input { flex: 1; min-width: 0; }
.search-kind { flex-shrink: 0; display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--raise); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.search-kind i { font-style: normal; color: var(--muted); font-size: 11px; }
@media (max-width: 420px) { .search-kind b { display: none; } }
.search-menu { position: absolute; z-index: 30; right: 12px; margin-top: -4px; width: 210px; padding: 6px; border-radius: 14px; background: var(--bar); border: 1px solid var(--line); box-shadow: 0 14px 34px rgba(0,0,0,.5); }
#pane-chats { position: relative; }
.search-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.search-menu button:hover { background: var(--raise); }
.search-menu button[aria-checked="true"] { background: rgba(70,224,168,.12); color: var(--green); }
.search-results { flex: 1; overflow-y: auto; }
.sr-count { margin: 8px 14px 4px; color: var(--muted); font-size: 12.5px; }
.sr-list { list-style: none; margin: 0; padding: 0; }
.sr-row { display: flex; gap: 12px; width: 100%; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.sr-row:hover { background: rgba(255,255,255,.03); }
.sr-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--raise); display: grid; place-items: center; flex-shrink: 0; }
.sr-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sr-top { display: flex; justify-content: space-between; gap: 8px; } .sr-top small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.sr-body { color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sr-body mark { background: rgba(70,224,168,.3); color: var(--text); border-radius: 3px; padding: 0 1px; }
.sr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 3px; padding: 0 6px; }
.sr-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 4px; font-size: 11px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.7)); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-grid .gl-play { bottom: auto; top: 6px; }
.set-card input, .set-card select, .set-card textarea { background: var(--panel); border: 1px solid var(--line); }

/* ---------- my picture: a box you can drag anywhere, with its own flip button ---------- */
.self-wrap { position: absolute; top: calc(66px + env(safe-area-inset-top, 0px)); right: 14px; width: 118px; max-width: 30vw; z-index: 3; display: none; touch-action: none; cursor: grab;
  border-radius: 18px; box-shadow: 0 0 0 2px rgba(70,224,168,.55), 0 12px 30px rgba(0,0,0,.5); transition: width .3s ease, box-shadow .2s; }
.self-wrap.placed { right: auto; }
.self-wrap.dragging { transition: none; cursor: grabbing; box-shadow: 0 0 0 2px #46e0a8, 0 18px 40px rgba(0,0,0,.6); }
@media (min-width: 761px) { .self-wrap { width: 200px; } }
.call.is-video .self-wrap { display: block; }
.call.no-self .self-wrap { display: none !important; }
#self-wrap #local-video { position: static; display: block; width: 100%; max-width: none; aspect-ratio: 3 / 4; border-radius: 18px; border: 0; box-shadow: none; transition: border-radius .3s; pointer-events: none; }
.call.is-video.me-sharing .self-wrap { box-shadow: 0 0 0 2px #46e0a8, 0 0 22px rgba(70,224,168,.6); }
.call.is-video.me-sharing #self-wrap #local-video { box-shadow: none; }
#self-wrap .self-flip { top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 11px; background: rgba(10,14,34,.62); }
.call.calm .self-wrap { width: 84px; }
.call.calm #self-wrap #local-video { border-radius: 14px; }
.call.calm #self-wrap .self-flip { opacity: 0; pointer-events: none; }

/* "They turned on video" */
.vid-ask { position: absolute; top: calc(66px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px;
  border-radius: 999px; background: rgba(10,20,46,.88); border: 1px solid rgba(63,156,242,.55); color: #e3ecff; font-size: 13px; white-space: nowrap; }
.vid-ask button { display: inline-flex; align-items: center; gap: 6px; background: linear-gradient(135deg, #3f9cf2, #46e0a8); color: #061226; border-radius: 999px; padding: 5px 12px; font-weight: 700; font-size: 12.5px; }
.vid-ask button svg { width: 15px; height: 15px; }
.vid-ask .va-x { background: none; color: #9fb0d6; padding: 4px 6px; }

/* ---------- minimise a call (keep talking, use the app) ---------- */
.call-min { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); left: 14px; width: 40px; height: 40px; border-radius: 14px; background: rgba(10,14,34,.55); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.1); color: #fff; display: grid; place-items: center; z-index: 4; transition: opacity .35s; cursor: pointer; }
.call-min svg { width: 22px; height: 22px; }
.call.calm .call-min, .gcall.calm .call-min { opacity: 0; pointer-events: none; }
.mini-bar { display: none; }
.call.mini, .gcall.mini { inset: auto; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); width: 132px; height: 190px; border-radius: 20px; overflow: hidden; z-index: 70;
  box-shadow: 0 0 0 2px rgba(70,224,168,.6), 0 18px 40px rgba(0,0,0,.6); touch-action: none; cursor: grab; justify-content: flex-start; padding: 0; }
.call.mini.dragging, .gcall.mini.dragging { cursor: grabbing; }
.call.mini > :not(#remote-video):not(.mini-bar):not(.call-info), .gcall.mini > :not(.gc-grid):not(.mini-bar) { display: none !important; }
.call.mini #remote-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.call.mini.rv .call-info { display: none !important; }
.call.mini .call-info { position: static !important; transform: none !important; display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 100%; padding: 10px; background: none !important; border: 0 !important; opacity: 1 !important; }
.call.mini .call-info .avatar { display: grid !important; width: 56px; height: 56px; font-size: 22px; }
.call.mini .call-info .cp-lock { display: none !important; }
.call.mini .call-name { font-size: 13px; max-width: 110px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.call.mini .call-status { font-size: 12px; margin: 0; color: #9fe9cc; }
/* a voice call shrinks to a pill */
.call.mini:not(.is-video) { width: 232px; height: 64px; border-radius: 999px; }
.call.mini:not(.is-video) .call-info { flex-direction: row; justify-content: flex-start; padding: 0 86px 0 8px; gap: 8px; }
.call.mini:not(.is-video) .call-info .avatar { width: 46px; height: 46px; font-size: 17px; }
.call.mini:not(.is-video) .call-name { max-width: 96px; text-align: left; }
.call.mini:not(.is-video) .call-info > div:not(.avatar) { text-align: left; }
.call.mini .mini-bar, .gcall.mini .mini-bar { display: flex; position: absolute; top: 6px; right: 6px; gap: 6px; z-index: 5; }
.call.mini:not(.is-video) .mini-bar { top: 50%; transform: translateY(-50%); right: 9px; }
.mini-bar button { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(10,14,34,.65); cursor: pointer; }
.mini-bar .mini-end { background: linear-gradient(135deg, #ff5d6c, #d92f4a); }
.mini-bar svg { width: 17px; height: 17px; }
.gcall.mini .gc-grid { position: absolute; inset: 0; padding: 0; gap: 0; }
.gcall.mini .gc-grid > :not(:first-child) { display: none; }

/* ---------- Android picture-in-picture: only the call ---------- */
body.pip .call .call-dock, body.pip .call .call-min, body.pip .call .pill-add, body.pip .call .share-chip, body.pip .call .vid-ask, body.pip .call .mini-bar,
body.pip .gcall .call-dock, body.pip .gcall .call-min, body.pip .gcall .call-pill, body.pip #fx-panel, body.pip #call-sheet, body.pip .react-burst { display: none !important; }
body.pip .self-wrap { width: 30% !important; top: 8px !important; right: 8px !important; left: auto !important; }
body.pip #self-wrap .self-flip { display: none; }
body.pip .call.is-video.connected .call-info { top: auto; bottom: 8px; padding: 4px 8px; font-size: 11px; }
/* swiping between the main tabs */
.pane.swipe-l { animation: paneInL .25s ease; } .pane.swipe-r { animation: paneInR .25s ease; }
@keyframes paneInL { from { transform: translateX(36px); opacity: .4; } }
@keyframes paneInR { from { transform: translateX(-36px); opacity: .4; } }

/* ---------- message box: emoji, attach and camera sit inside it; attach + camera fade away while typing ---------- */
#composer { gap: 8px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)); align-items: flex-end; }
.cmp-box { flex: 1; min-width: 0; display: flex; align-items: flex-end; background: var(--raise); border: 1px solid var(--line); border-radius: 24px; padding: 0 4px; min-height: 46px; transition: border-color .2s; }
.cmp-box:focus-within { border-color: rgba(70,224,168,.55); }
#composer .cmp-box textarea { flex: 1; min-width: 0; background: transparent; border: 0; border-radius: 0; padding: 12px 4px; line-height: 1.35; max-height: 120px; }
.cmp-in { width: 40px; height: 44px; flex-shrink: 0; color: var(--muted); }
.cmp-in:hover { color: var(--text); }
.cmp-tools { display: flex; flex-shrink: 0; max-width: 84px; overflow: hidden; transition: max-width .22s ease, opacity .18s ease; }
#composer.typing .cmp-tools { max-width: 0; opacity: 0; pointer-events: none; }
.cmp-round { width: 46px; height: 46px; flex-shrink: 0; border-radius: 50% !important; background: linear-gradient(135deg, #3f9cf2, #46e0a8) !important; color: #04121f !important; display: grid; place-items: center; }
.cmp-round svg { width: 22px; height: 22px; }
#composer:not(.typing) #btn-send { display: none; }
#composer.typing #btn-mic:not(.recording) { display: none; }
#btn-mic.recording { background: #e5484d !important; color: #fff !important; animation: scPulse 1.4s ease-in-out infinite; }

/* ---------- photos and files uploading in the chat ---------- */
.up-wrap { position: relative; display: block; }
.up-wrap img, .up-wrap video { filter: brightness(.7); }
.up-ring { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(#46e0a8 calc(var(--p, 0) * 1%), rgba(255,255,255,.18) 0); }
.up-ring::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: rgba(6,10,26,.78); }
.up-ring b { position: relative; font-size: 12.5px; color: #fff; }
.up-x { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; background: rgba(6,10,26,.7); color: #fff; display: grid; place-items: center; font-size: 13px; cursor: pointer; }
.up-file { position: relative; padding-right: 76px; }
.up-file .up-ring { left: auto; right: 34px; width: 38px; height: 38px; }
.up-file .up-ring b { font-size: 10px; }
.up-file .up-x { top: 50%; transform: translateY(-50%); right: 4px; }
.up-chip { position: fixed; z-index: 80; left: 50%; transform: translateX(-50%); bottom: calc(90px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  border-radius: 999px; background: var(--bar); border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(0,0,0,.45); font-size: 13.5px; }
.up-bar { width: 80px; height: 6px; border-radius: 6px; background: rgba(255,255,255,.12); overflow: hidden; }
.up-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #3f9cf2, #46e0a8); transition: width .2s; }

/* ---------- private chat (18+) ---------- */
.pchat { position: fixed; inset: 0; z-index: 65; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top);
  background: radial-gradient(ellipse at 20% 0%, rgba(124,77,255,.28), transparent 55%), radial-gradient(ellipse at 90% 100%, rgba(63,156,242,.18), transparent 50%), #0a0820; }
@media (min-width: 900px) { .pchat { inset: 0 0 0 auto; width: min(560px, 100vw); border-left: 1px solid rgba(124,77,255,.4); box-shadow: -20px 0 60px rgba(0,0,0,.5); } }
.pc-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: rgba(20,14,48,.92); border-bottom: 1px solid rgba(124,77,255,.35); }
.pc-head .avatar { width: 40px; height: 40px; flex: none; }
.pc-title { flex: 1; min-width: 0; display: flex; flex-direction: column; } .pc-title small { color: #b9a8ff; font-size: 12px; }
.pc-endbtn { width: auto; padding: 7px 16px; border-radius: 999px; }
.pc-note { margin: 10px 12px 4px; padding: 8px 12px; border-radius: 12px; background: rgba(124,77,255,.14); border: 1px solid rgba(124,77,255,.35); color: #d9ceff; font-size: 12.5px; text-align: center; }
.pc-msgs { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; -webkit-user-select: none; user-select: none; }
.pc-m { max-width: 78%; align-self: flex-start; padding: 8px 12px 6px; border-radius: 16px 16px 16px 4px; background: rgba(255,255,255,.08); overflow-wrap: anywhere; display: flex; flex-direction: column; gap: 4px; }
.pc-m.mine { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: linear-gradient(135deg, #5b3fd6, #3f6fe0); }
.pc-m small { align-self: flex-end; font-size: 10.5px; opacity: .7; }
.pc-img { max-width: 100%; max-height: 300px; border-radius: 10px; pointer-events: none; }
.pc-empty, .pc-wait { margin: auto; text-align: center; color: #b9a8ff; padding: 20px; }
.pc-wait { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pc-typing { padding: 2px 16px 6px; color: #b9a8ff; font-size: 12.5px; }
.pc-comp { display: flex; align-items: flex-end; gap: 8px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px)); background: rgba(20,14,48,.92); }
.pc-comp .cmp-box { background: rgba(255,255,255,.07); border-color: rgba(124,77,255,.35); }
.pc-comp textarea { flex: 1; min-width: 0; background: transparent; border: 0; padding: 12px 4px; resize: none; max-height: 110px; }
.pc-comp .cmp-round { background: linear-gradient(135deg, #7c4dff, #3f9cf2) !important; color: #fff !important; }
.pc-invite { position: fixed; z-index: 90; left: 50%; top: calc(12px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); width: min(460px, 94vw); display: grid; grid-template-columns: auto 1fr; gap: 8px 12px;
  padding: 14px; border-radius: 16px; background: #150f33; border: 1px solid #7c4dff; box-shadow: 0 16px 40px rgba(0,0,0,.55); animation: scDrop .3s ease; }
.pc-lock { font-size: 26px; } .pc-tx { display: flex; flex-direction: column; gap: 3px; } .pc-tx small { color: #b9a8ff; }
.pc-btns { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; } .pc-btns button { width: auto; padding: 8px 18px; }
.pc-age { text-align: center; } .pc-age-ic { font-size: 40px; } .pc-age .radio { display: flex; gap: 10px; align-items: center; justify-content: center; margin: 12px 0; font-weight: 600; }
.pc-age .radio input { width: auto; accent-color: #7c4dff; }

/* ---------- trust & safety (trust.js) ---------- */
.sim-gate { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: radial-gradient(ellipse at 20% 0%, rgba(63,156,242,.22), transparent 55%), var(--bg); }
.sg-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 26px 22px; width: min(420px, 100%); text-align: center; display: flex; flex-direction: column; gap: 12px; }
.sg-card h2 { margin: 0; font-size: 20px; } .sg-card p { margin: 0; line-height: 1.45; }
.sg-ic { font-size: 40px; }
.sg-btns { display: flex; flex-direction: column; gap: 8px; margin: 6px 0; }
.sg-btns button { width: 100%; }
.idbadge { display: inline-flex; vertical-align: -2px; margin-left: 2px; }
.ok-chip, .warn-chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 10px; margin-left: 6px; }
.ok-chip { background: rgba(70,224,168,.15); color: #46e0a8; } .warn-chip { background: rgba(250,167,116,.15); color: #faa774; }
.warn-chip.block { display: block; margin: 0; padding: 8px 10px; font-weight: 500; }
.set-card h4 { margin: 0; font-size: 15px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.set-card .actions { display: flex; justify-content: flex-end; gap: 8px; }
.risk-banner { display: flex; gap: 8px; align-items: flex-start; margin: 8px 10px; padding: 10px 12px; border-radius: 12px; background: rgba(250,167,116,.12); color: #ffd6bd; font-size: 13px; }
.idv-keep { background: var(--raise); border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.idv-cam video { width: 100%; max-height: 46vh; border-radius: 12px; background: #000; object-fit: cover; }
.idv-msg { min-height: 1.2em; } .idv-msg.error { color: #ff8f8f; }
.idv-actions { flex-wrap: wrap; }
.btn-like { display: inline-flex; align-items: center; justify-content: center; background: var(--raise); color: var(--text); padding: 8px 14px; border-radius: 18px; cursor: pointer; font-size: 14px; }
.kyc-steps { margin: 4px 0 8px; padding-left: 20px; } .kyc-steps li { margin: 4px 0; }
.sa-status { display: grid; grid-template-columns: 1fr; gap: 6px; font-size: 14px; }
.sa-tabs { padding: 0 10px; flex-wrap: wrap; }
.sa-list { list-style: none; margin: 8px 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sa-list li { background: var(--raise); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.sa-list p { margin: 4px 0 0; }
.sa-act { display: flex; flex-wrap: wrap; gap: 6px; } .sa-act button { width: auto; }
.lvl { font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 1px 7px; border-radius: 8px; margin-left: 4px; }
.lvl-ok { background: var(--line); color: var(--muted); } .lvl-restricted { background: rgba(250,167,116,.18); color: #faa774; } .lvl-suspended { background: rgba(255,99,99,.18); color: #ff8f8f; }
.sa-tabs { display: flex; gap: 6px; margin: 6px 0; }

/* no focus ring inside the message box: the rounded box itself shows focus */
#composer .cmp-box textarea:focus, .pc-comp textarea:focus, .pc-comp input:focus { box-shadow: none; outline: none; border-color: transparent; }

.modal-box label.radio:has(#an-ok) { display: flex; align-items: flex-start; gap: 8px; text-align: left; }
#an-ok { width: auto; flex: none; margin-top: 3px; }

/* Moments: press and hold to pause */
.mv-body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; }
.mv-body img, .mv-body video { -webkit-user-drag: none; pointer-events: none; }
.mv .mv-head, .mv .mv-bars, .mv .mv-foot { transition: opacity .2s; }
.mv.mv-held .mv-head, .mv.mv-held .mv-bars, .mv.mv-held .mv-foot { opacity: 0; }


/* ================= Mitrika Business: its own look (amber / orange, like its logo) ================= */
html.ed-business {
  --blue: #ff9a1f; --green: #ffc12e; --grad: linear-gradient(135deg, #ff8a00 0%, #ffb703 55%, #ff6b2c 100%);
  --green-dark: #e08a00; --bg: #0a1430; --panel: #0d1838; --bar: #122045; --raise: #18284f; --line: #1f2d58;
  --out: linear-gradient(135deg, #7a3f0c, #6a2f14); --in: #172447; --link: #ffc977; --read: #ffd27a;
}
html.ed-business .brandbar span { letter-spacing: .1em; }
html.ed-business #bottom-nav button.on { color: #ffb703; }
html.ed-business .bar { box-shadow: inset 0 -2px 0 rgba(255, 159, 28, .35); }
/* dashboard on top of the customer chats */
.biz-dash { padding: 10px 12px 4px; }
.bd-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.bd-name { font-weight: 700; font-size: 15px; }
.bd-open { font-size: 12px; color: var(--muted); }
.bd-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.bd-tile { background: var(--raise); border-radius: 12px; padding: 8px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: inherit; border: 1px solid var(--line); min-width: 0; }
.bd-tile b { font-size: 18px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bd-tile span { font-size: 10.5px; color: var(--muted); text-align: center; line-height: 1.2; }
.bd-actions { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 2px; scrollbar-width: none; }
.bd-actions .chip { white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.bd-actions .chip svg { width: 15px; height: 15px; }
.bd-setup { background: var(--raise); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.bd-setup span { color: var(--muted); font-size: 13px; }
.bd-setup .primary { width: auto; align-self: flex-start; }
.biz-pane { padding: 10px 12px 90px; }
.pane-back { padding: 8px 12px 0; }
/* step-by-step set-up */
.bsetup { position: fixed; inset: 0; z-index: 60; background: rgba(4, 8, 22, .86); display: flex; align-items: center; justify-content: center; padding: 12px; }
.bs-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; width: min(520px, 100%); max-height: calc(100vh - 24px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.bs-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 0; }
.bs-step { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .04em; }
.bs-dots { display: flex; gap: 5px; padding: 8px 14px 0; }
.bs-dots i { flex: 1; height: 4px; border-radius: 3px; background: var(--line); }
.bs-dots i.done, .bs-dots i.on { background: var(--grad); }
.bs-dots i.on { opacity: .6; }
.bs-body { padding: 6px 18px 4px; overflow-y: auto; }
.bs-body h2 { font-size: 19px; margin: 10px 0 6px; }
.bs-body label { display: block; margin: 10px 0 4px; font-size: 13px; color: var(--muted); }
.bs-body label.check { color: var(--text); display: flex; align-items: center; gap: 8px; }
.bs-body input:not([type=checkbox]), .bs-body select, .bs-body textarea { width: 100%; }
.bs-logo { width: 86px; display: block; margin: 8px auto 0; }
.bs-list { margin: 8px 0 4px 18px; padding: 0; line-height: 1.7; font-size: 14px; }
.bs-done { font-size: 52px; text-align: center; margin-top: 8px; }
.bs-av { display: flex; justify-content: center; margin: 10px 0; }
.bs-av .avatar.big { width: 84px; height: 84px; font-size: 30px; }
.bs-nav { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 10px 16px 14px; border-top: 1px solid var(--line); }
.bs-nav > span { flex: 1; }
.bs-nav .ghost:first-child { margin-right: auto; }
.bs-nav .primary { width: auto; }
.bsetup .error { padding: 0 18px; margin: 4px 0 0; }
.btn-like { display: inline-block; text-decoration: none; padding: 8px 14px; border-radius: 18px; }
.bsetup button.ghost { background: transparent; color: var(--muted); padding: 8px 12px; border-radius: 18px; }
.bsetup button.ghost:hover { color: var(--text); }
a.secondary.btn-like { background: var(--raise); color: var(--text); }

/* Moments: zoom */
.mv-body > img, .mv-body > video { transform-origin: center center; will-change: transform; }
.mv.mv-zoomed .mv-body { overflow: hidden; cursor: grab; }
.mv.mv-zoomed .mv-caption, .mv.mv-zoomed .mv-foot { opacity: 0; pointer-events: none; }
.mv-zoom { background: rgba(0,0,0,.35); border: 0; color: #fff; width: 34px; height: 34px; border-radius: 50%; font-size: 16px; display: grid; place-items: center; margin-left: 4px; flex-shrink: 0; }

/* ---- Business types (biztypes.js): item tags, notices, order questions ---- */
.ibs { display: flex; flex-wrap: wrap; gap: 4px; }
.ibs:empty { display: none; }
.ib { font-size: 11px; padding: 1px 7px; border-radius: 9px; background: var(--bar); border: 1px solid var(--line); color: var(--text); white-space: nowrap; }
em.rx, .oc-rx { color: #ffb4a8; font-style: normal; font-weight: 600; }
.oc-rx { display: block; margin-top: 6px; font-size: 12px; }
.fam-notice { background: rgba(255, 183, 3, .10); border: 1px solid rgba(255, 183, 3, .35); color: var(--text); border-radius: 10px; padding: 8px 12px; font-size: 13px; line-height: 1.45; margin: 8px 0; }
.order-qs { display: grid; gap: 2px; margin: 8px 0; }
.order-qs label { margin-top: 6px; }
.cat-hint { margin-top: 6px; line-height: 1.5; }
.cat-hint b { color: var(--text); font-weight: 600; }
.or-note { white-space: normal; }
.pf-attrs { margin-top: 4px; }
/* v23: quiet "unlock encrypted chats" strip instead of a pop-up */
.ek-bar { display: flex; align-items: center; gap: 10px; margin: 6px 10px; padding: 8px 10px; border-radius: 12px; background: var(--raise); border: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.ek-bar > span { font-size: 18px; } .ek-bar > div { flex: 1; min-width: 0; display: flex; flex-direction: column; } .ek-bar small { color: var(--muted); }
.ek-bar small b { color: var(--green); letter-spacing: .05em; } .ek-bar .icon { width: 28px; height: 28px; flex-shrink: 0; }

/* v23: catalogue tools (import / export, stock, sales) and the numbered service list in customer chats */
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 10px; }
@media (max-width: 520px) { .grid3 { grid-template-columns: 1fr 1fr; } }
.pf-stock { margin: 10px 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; } .pf-stock summary { cursor: pointer; font-weight: 600; }
.ct-io { flex-wrap: wrap; gap: 6px; }
.ct-stock { display: block; color: var(--muted); } .ct-stock.low { color: #e0a43a; } .ct-stock.out { color: var(--red, #e5484d); }
.ct-seg { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.ct-seg button { width: auto; padding: 7px 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--raise); color: var(--text); cursor: pointer; }
.ct-seg button.on { background: var(--green); color: #04201a; border-color: var(--green); font-weight: 600; }
.ctl { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ctl h4 { margin: 8px 0 2px; }
.ctl-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--raise); }
.ctl-card h4 { margin: 0 0 6px; }
.ctl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ctl-row input[type=search], .ctl-row select { width: auto; flex: 1 1 160px; margin: 0; }
.ctl-dl { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; } .ctl-dl b { font-size: 13px; }
.ctl-dl button, .ctl-row > button { width: auto; }
.ctl-file { display: inline-block; cursor: pointer; }
.ctl-file .primary-btn { display: inline-block; padding: 10px 16px; border-radius: 10px; background: var(--green); color: #04201a; font-weight: 600; }
.ctl-sum { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; } .ctl-sum span { padding: 4px 10px; border-radius: 14px; background: var(--panel, rgba(255,255,255,.05)); font-size: 13px; }
.ctl-sum .add { color: var(--green); } .ctl-sum .upd { color: #6aa8ff; } .ctl-sum .del { color: var(--red, #e5484d); }
.ctl-prev { list-style: none; padding: 0; margin: 4px 0; max-height: 220px; overflow: auto; font-size: 13px; }
.ctl-prev li { display: flex; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); } .ctl-prev li span { color: var(--muted); min-width: 56px; } .ctl-prev li em { margin-left: auto; font-style: normal; color: var(--muted); }
.ctl-prev li.add em { color: var(--green); } .ctl-prev li.remove em { color: var(--red, #e5484d); }
.ctl-errs summary { cursor: pointer; color: #e0a43a; } .ctl-errs ul { font-size: 13px; padding-left: 18px; max-height: 220px; overflow: auto; }
.ctl-done { padding: 10px; border-radius: 10px; background: rgba(70, 224, 168, .12); }
.ctl-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.ctl-tiles > div { padding: 10px; border-radius: 12px; background: var(--raise); border: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.ctl-tiles b { font-size: 20px; overflow-wrap: anywhere; } .ctl-tiles span { color: var(--muted); font-size: 12px; }
.ctl-tiles .warn b { color: #e0a43a; } .ctl-tiles .bad b { color: var(--red, #e5484d); }
.ctl-alert { padding: 8px 10px; border-radius: 10px; background: rgba(224, 164, 58, .14); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.ctl-tbl-wrap { overflow-x: auto; max-width: 100%; border: 1px solid var(--line); border-radius: 10px; }
.ctl-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.ctl-tbl th, .ctl-tbl td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.ctl-tbl th { color: var(--muted); font-weight: 600; white-space: nowrap; } .ctl-tbl .num { text-align: right; white-space: nowrap; }
.ctl-tbl small { display: block; color: var(--muted); } .ctl-tbl tr.low td:first-child { box-shadow: inset 3px 0 #e0a43a; } .ctl-tbl tr.out td:first-child { box-shadow: inset 3px 0 var(--red, #e5484d); }
.ctl-tbl .tag { font-style: normal; font-size: 11px; padding: 1px 6px; border-radius: 8px; } .tag.warn { background: rgba(224,164,58,.2); color: #e0a43a; } .tag.bad { background: rgba(229,72,77,.2); color: var(--red, #e5484d); }
.ctl-act { white-space: nowrap; } .ctl-act button { width: auto; }
.ctl-moves summary { cursor: pointer; } .ctl-moves ul { list-style: none; padding: 0; font-size: 13px; }
.ctl-moves li { padding: 5px 0; border-bottom: 1px solid var(--line); } .ctl-moves li span { color: var(--muted); margin-right: 6px; }
.ctl-moves em { font-style: normal; font-weight: 600; } .ctl-moves .plus { color: var(--green); } .ctl-moves .minus { color: #e0a43a; }
.ib.out { background: rgba(229,72,77,.18); color: var(--red, #e5484d); } .ib.low { background: rgba(224,164,58,.18); color: #e0a43a; }
.svc-bar { border-bottom: 1px solid var(--line); background: var(--panel, var(--raise)); max-height: 46vh; overflow: auto; flex-shrink: 0; }
.svc-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 14px; background: none; border: 0; color: var(--text); cursor: pointer; text-align: left; }
.svc-head span { flex: 1; } .svc-head small { color: var(--muted); } .svc-head i { font-style: normal; color: var(--muted); }
.svc-list { list-style: none; margin: 0; padding: 0 8px 8px; }
.svc-list li { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 10px; cursor: pointer; }
.svc-list li:hover, .svc-list li:focus { background: var(--raise); } .svc-list li.off { opacity: .55; }
.svc-list .n { min-width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--raise); color: var(--green); font-weight: 700; font-size: 13px; }
.svc-list .nm { flex: 1; min-width: 0; } .svc-list .nm small { display: block; color: var(--muted); font-size: 12px; } .svc-list .pr { white-space: nowrap; color: var(--muted); font-size: 13px; }
.ctl-dl button { padding: 5px 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel, #0e1430); color: var(--text); font-size: 13px; cursor: pointer; }
.ctl-dl button:hover { border-color: var(--green); }
.me-meta + .gd-btn, header.bar .gd-btn { margin-left: 4px; }
.ctl-date { white-space: nowrap; } .ctl-item .ctl-act { display: flex; gap: 6px; margin-top: 4px; } .ctl-item { min-width: 140px; }
.ctl-tbl .ctl-act button { padding: 3px 10px; font-size: 12px; }
.pg-item { min-width: 0; } .pg-item b { overflow-wrap: anywhere; } .ib { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
/* v23: a device waiting for the OK to open encrypted chats (shown quietly in Tools → Linked computers) */
.e2e-wait .tool[data-t="devices"] .tool-tx b::after { content: ' • waiting for you'; color: var(--green); font-weight: 600; font-size: 12px; }
.ld-wait { border: 1px solid var(--green); border-radius: 12px; padding: 8px 10px; margin: 6px 0 10px; }
.ld-wait .ld-btns { display: flex; gap: 6px; flex-shrink: 0; }
.ld-wait .ld-row { flex-wrap: wrap; } .ld-wait .ld-txt { flex: 1 1 180px; } .ld-wait .ld-btns { margin-left: auto; }

/* ===================== v24 ===================== */
/* "N unread messages" divider */
.unread-div { text-align: center; margin: 10px 0; }
.unread-div span { display: inline-block; background: var(--raise); color: var(--green); font-size: 12px; font-weight: 600; padding: 4px 14px; border-radius: 12px; }
/* selecting messages / chats */
.sel-bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: var(--bar); border-bottom: 1px solid var(--line); min-height: 56px; }
#sel-bar { position: absolute; top: 0; left: 0; right: 0; z-index: 30; }
#chat-sel-bar { position: sticky; top: 0; z-index: 6; }
.sel-bar .sel-n { flex: 1; font-size: 16px; }
.sel-bar .icon { font-size: 18px; }
#messages.selecting .msg { cursor: pointer; }
#messages.selecting .msg::before { content: ''; position: absolute; left: -26px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; border: 2px solid var(--muted); }
#messages.selecting .msg.in { margin-left: 30px; }
#messages.selecting .msg.out::before { left: auto; right: calc(100% + 8px); }
#messages.selecting .msg.sel::before { background: var(--green); border-color: var(--green); }
#messages.selecting .msg.sel { box-shadow: 0 0 0 2px var(--green); }
#messages.selecting .msg .msg-act { display: none; }
#chat-list.selecting li { position: relative; }
#chat-list.selecting li.sel { background: rgba(0, 201, 167, .12); }
#chat-list.selecting li.sel .avatar::after { content: '✓'; position: absolute; right: -2px; bottom: -2px; width: 18px; height: 18px; border-radius: 50%; background: var(--green); color: #032; font-size: 12px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--panel); }
#chat-list li .avatar { position: relative; }
.del-opts { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
/* photo viewer */
.pv { position: fixed; inset: 0; z-index: 400; background: #000; display: flex; flex-direction: column; touch-action: none; user-select: none; -webkit-user-select: none; }
.pv-top { display: flex; align-items: center; gap: 6px; padding: 8px; background: linear-gradient(#000c, #0000); position: absolute; top: 0; left: 0; right: 0; z-index: 2; color: #fff; }
.pv-top .icon { color: #fff; font-size: 20px; }
.pv-meta { flex: 1; display: flex; flex-direction: column; min-width: 0; } .pv-meta small { color: #bbb; }
.pv-stage { flex: 1; display: grid; place-items: center; overflow: hidden; }
.pv-stage img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .05s linear; -webkit-touch-callout: none; pointer-events: none; }
.pv-nav { position: absolute; top: 50%; transform: translateY(-50%); background: #0006; color: #fff; border: 0; font-size: 34px; width: 44px; height: 64px; border-radius: 10px; z-index: 2; }
.pv-nav.prev { left: 6px; } .pv-nav.next { right: 6px; }
.pv-cap { position: absolute; bottom: 0; left: 0; right: 0; padding: 14px; color: #fff; background: linear-gradient(#0000, #000c); text-align: center; }
.pv-cap:empty { display: none; }
.pv-lock { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #bbb; font-size: 12px; }
/* tap to download */
.media-tap, .media-wait { display: flex; align-items: center; gap: 10px; min-width: 200px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line); background: #0002; color: var(--text); text-align: left; }
.media-tap small, .media-wait small { display: block; color: var(--muted); font-size: 12px; }
.media-tap .mt-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--raise); font-size: 18px; }
.ad-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ad-row small { display: block; color: var(--muted); } .ad-row select { width: auto; min-width: 140px; }
/* voice notes */
.vn { display: flex; align-items: center; gap: 10px; min-width: 220px; padding: 4px 2px; }
.vn-play { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--green); color: #032; font-size: 15px; font-weight: 700; flex-shrink: 0; cursor: pointer; }
.vn-bar { flex: 1; height: 6px; border-radius: 3px; background: #ffffff30; position: relative; cursor: pointer; }
.vn-bar span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--read); }
.vn-time { font-size: 12px; color: var(--muted); min-width: 34px; text-align: right; }
.vn-spd { border: 1px solid var(--line); background: transparent; color: var(--text); border-radius: 10px; font-size: 11px; padding: 2px 6px; }
.msg .vn + .spd { display: none; }
/* scan a QR code */
.qr-scan { position: relative; border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 1; max-width: 340px; margin: 8px auto; }
.qr-scan video { width: 100%; height: 100%; object-fit: cover; }
.qr-frame { position: absolute; inset: 18%; border: 3px solid var(--green); border-radius: 16px; box-shadow: 0 0 0 999px #0007; }
.ld-scan { width: 100%; margin: 8px 0 4px; }
/* new Android app */
.app-nag { position: fixed; left: 10px; right: 10px; bottom: 76px; z-index: 300; background: var(--raise); border: 1px solid var(--green); border-radius: 14px; padding: 10px 12px; display: flex; align-items: center; gap: 8px; font-size: 13px; box-shadow: 0 8px 24px #0008; }
.app-nag span { flex: 1; }
/* the "How to use this page" button sits in the top-right corner */
#sidebar header.bar .gd-btn { margin-left: auto; order: 99; }
.modal-box h3 .gd-btn, .bt-head h3 .gd-btn, .cat-head h3 .gd-btn { position: absolute; top: 12px; right: 12px; }
.modal-box { position: relative; }
.crop-stage { position: relative; width: min(100%, 340px); aspect-ratio: 1; margin: 8px auto; border-radius: 12px; overflow: hidden; touch-action: none; }
.crop-stage canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.crop-ring { position: absolute; inset: 0; pointer-events: none; border-radius: 50%; box-shadow: 0 0 0 999px #000a; border: 2px solid #fff8; }
.crop-tools { display: flex; align-items: center; gap: 10px; margin: 6px 0; } .crop-tools input[type=range] { flex: 1; }
/* order tracking */
.oc-track { list-style: none; margin: 10px 0 4px; padding: 0 0 0 4px; position: relative; }
.oc-track li { position: relative; padding: 0 0 10px 22px; display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; color: var(--muted); }
.oc-track li::before { content: ''; position: absolute; left: 5px; top: 12px; bottom: -2px; width: 2px; background: var(--line); }
.oc-track li:last-child::before { display: none; }
.oc-track .dot { position: absolute; left: 0; top: 3px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); background: var(--panel); }
.oc-track li.done { color: var(--text); } .oc-track li.done .dot { background: var(--green); border-color: var(--green); } .oc-track li.done::before { background: var(--green); }
.oc-track li.now { color: var(--text); font-weight: 600; } .oc-track li.now .dot { border-color: var(--green); box-shadow: 0 0 0 3px #00c9a733; }
.oc-track li.cx .dot { background: #e5484d; border-color: #e5484d; } .oc-track.cancelled li:not(.done):not(.cx) { opacity: .45; }
.oc-track small { font-size: 11px; color: var(--muted); font-weight: 400; }
.oc-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.danger-text { color: #ff6b6b !important; }
.bk-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.or-mode { margin-bottom: 10px; }
/* appointments */
.appt-card { min-width: 240px; max-width: 320px; display: flex; flex-direction: column; gap: 4px; }
.appt-card .ap-what { display: flex; flex-direction: column; } .appt-card .ap-what span { color: var(--muted); font-size: 13px; }
.ap-when { font-size: 13px; } .ap-when.old { text-decoration: line-through; color: var(--muted); } .ap-when.new { color: var(--green); }
.bk-chips, .bk-days, .bk-slots { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 8px; }
.bk-days { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
.bk-days .chip { white-space: nowrap; }
.bk-chips .chip { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.bk-chips .chip small { font-size: 11px; color: var(--muted); }
.bk-slots .chip { min-width: 84px; justify-content: center; }
.bk-now { width: 100%; margin: 6px 0; }
.bk-seg { margin-bottom: 10px; flex-wrap: wrap; }
.pd-hours .hr-row { flex-wrap: wrap; } .pd-hours input[type=time] { width: 96px; } .pd-modes { display: flex; flex-wrap: wrap; gap: 4px 12px; }
/* the service list in a customer's chat */
.svc-top { display: flex; align-items: center; gap: 8px; } .svc-top .svc-head { flex: 1; } .svc-book { flex-shrink: 0; }
.svc-list li.in { background: rgba(0, 201, 167, .12); } .svc-list li.in .n { background: var(--green); color: #032; }
.svc-list .pr small { display: block; font-size: 11px; color: var(--green); }
.svc-cart { width: 100%; margin-top: 6px; border: 0; border-radius: 12px; padding: 10px 12px; background: var(--grad); color: #fff; font-weight: 600; text-align: left; display: flex; gap: 8px; }
.svc-cart b { margin-left: auto; }
/* v25: Business / Business Pro plans */
.pl-badge { border: 1px solid var(--line); background: var(--raise); color: var(--text); border-radius: 12px; font-size: 12px; padding: 2px 10px; margin-left: 8px; cursor: pointer; }
.pl-badge.pro { border-color: #a78bfa; background: linear-gradient(90deg, #7c3aed33, #1a6dff33); }
.pl-test { background: #00c9a71a; border: 1px solid #00c9a755; border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.pl-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; margin: 10px 0 14px; }
.pl-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 6px; background: var(--raise); }
.pl-card.on { border-color: var(--green); box-shadow: 0 0 0 1px var(--green) inset; }
.pl-name { display: flex; align-items: center; gap: 8px; font-size: 16px; } .pl-name .pill { margin-left: auto; }
.pl-tag { margin: 0; font-weight: 600; }
.pl-card ul { list-style: none; padding: 0; margin: 4px 0; font-size: 13px; display: flex; flex-direction: column; gap: 3px; }
.pl-card button { margin-top: auto; }
.pl-meter { padding: 8px 0; border-bottom: 1px solid var(--line); }
.pl-m-top { display: flex; justify-content: space-between; font-size: 13px; }
.pl-bar { height: 6px; border-radius: 3px; background: #ffffff22; margin-top: 6px; overflow: hidden; } .pl-bar span { display: block; height: 100%; background: var(--green); }
.pl-bar.warn span { background: #f59e0b; }
.bs-plan-h { margin: 14px 0 6px; font-size: 15px; }
.bs-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bs-plan { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; font-size: 13px; }
.bs-plan input { display: none; } .bs-plan span { color: var(--muted); }
.bs-plan:has(input:checked) { border-color: var(--green); background: #00c9a714; }
.bs-plans .bs-plan { display: flex !important; flex-direction: column; align-items: flex-start; }
.bs-plans .bs-plan b, .bs-plans .bs-plan span { display: block; }
/* v26: business tools tabs wrap onto two lines (fit the screen) instead of scrolling sideways */
.bt-tabs { flex-wrap: wrap; overflow-x: visible; row-gap: 6px; }
.bt-tabs .chip { flex: 0 0 auto; }
input.locked, select.locked { opacity: .75; background: var(--raise); cursor: not-allowed; }
.lock-note { margin-top: 4px; }
/* v26: chat backup, notifications, first-run set-up */
.cb-card { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin: 10px 0; }
.cb-card > b { display: block; margin-bottom: 4px; }
.cb-card .row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.cb-card .row.wrap { flex-wrap: wrap; justify-content: flex-start; }
.warn { color: #ffb347; }
.nt-list { list-style: none; padding: 0; margin: 10px 0; }
.nt-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.media-gone { padding: 12px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 12.5px; max-width: 260px; }
.set-delete { display: block; margin: 6px auto 18px; color: #ff6b6b; font-size: 13px; }
.fr-choice { display: grid; gap: 10px; margin: 14px 0 6px; }
.fr-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px; border-radius: 14px; background: var(--raise); border: 1px solid var(--line); text-align: left; }
.fr-opt b { font-size: 15px; } .fr-opt small { color: var(--muted); }
.fr-opt:hover { border-color: var(--green); }
.fr-photo { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; color: var(--muted) !important; }
.fr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
/* v27: Explore businesses filters, business location */
.ex-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
@media (min-width: 640px) { .ex-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ex-filters label { margin-top: 0; font-size: 12.5px; }
.ex-search { margin-top: 8px; gap: 8px; align-items: center; }
.ex-empty { padding: 18px 14px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; margin-top: 10px; }
.grid3 { display: grid; grid-template-columns: 1.2fr 1fr .8fr; gap: 8px; }
@media (max-width: 420px) { .grid3 { grid-template-columns: 1fr 1fr; } .grid3 > div:first-child { grid-column: 1 / -1; } }
/* v27: bookings — free / booked times, people's status, the day schedule */
.bk-slots .chip.booked { opacity: .45; text-decoration: line-through; cursor: not-allowed; display: inline-flex; flex-direction: column; align-items: center; }
.bk-slots .chip.booked small { text-decoration: none; font-size: 10px; }
.dot-st { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: middle; background: #46e0a8; }
.dot-st.full { background: #ff6b6b; } .dot-st.off { background: #8b97ba; }
.bk-chips .chip small.ps-line { display: block; font-size: 10.5px; opacity: .8; }
.sc-person { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; margin: 8px 0; }
.sc-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.sc-head .sc-now { margin-left: auto; font-size: 12px; }
.sc-head > small:last-child { width: 100%; color: var(--muted); }
.sc-slots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sc-slot { display: inline-flex; flex-direction: column; align-items: center; padding: 4px 8px; border-radius: 10px; font-size: 12px; border: 1px solid var(--line); min-width: 62px; }
.sc-slot small { font-size: 10px; opacity: .85; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-slot.free { border-color: #2f9e6e; color: #46e0a8; }
.sc-slot.booked { background: rgba(255, 107, 107, .14); border-color: #ff6b6b; color: #ffb0b0; }
.sc-slot.past { opacity: .4; }
/* v27: UPI QR */
.upi-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px; margin: 6px auto 12px; max-width: 300px; background: #fff; color: #0b1026; border-radius: 16px; }
.upi-card .upi-qr svg { width: 230px; height: 230px; display: block; }
.upi-card small { color: #445; }
.upi-amt { font-size: 24px; font-weight: 800; }
.upi-btns { gap: 8px; margin-top: 10px; }
.actions.wrap { flex-wrap: wrap; }
/* v27: computer sign-in code, install bar, sign-in link */
.qr-code-txt { text-align: center; margin: 6px 0 2px; font-size: 15px; letter-spacing: 1px; }
.qr-code-txt b { font-size: 20px; letter-spacing: 3px; }
.install-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 9000; display: flex; align-items: center; gap: 10px; max-width: min(720px, 94vw);
  padding: 10px 14px; border-radius: 14px; background: #0f3a2c; color: #e8fff5; border: 1px solid #2f9e6e; box-shadow: 0 8px 30px rgba(0,0,0,.4); font-size: 14px; }
.install-bar .primary { width: auto; }
.ld-alt { gap: 8px; margin: 8px 0; } .ld-alt .secondary { flex: 1; }
.wl-url { word-break: break-all; padding: 10px; border-radius: 10px; background: var(--raise); font-family: ui-monospace, monospace; font-size: 12.5px; user-select: all; }
/* v28: refunds, skipped step */
.pill.st-refund { background: #5a3a07; color: #ffd08a; }
.oc-refund { margin: 6px 0; padding: 8px 10px; border-radius: 10px; background: rgba(255, 179, 71, .12); color: #ffd08a; font-size: 13px; }
.oc-refund.done { background: rgba(70, 224, 168, .12); color: #9ff0cf; }
.oc-track li.skip .lb { opacity: .55; text-decoration: line-through; }
.oc-track li.skip .dot { opacity: .5; }

/* v29: quantity steppers wherever items are chosen (chat menu, catalogue grid, product page) */
.svc-qty { gap: 6px; } .svc-qty button { width: 26px; height: 26px; border: 0; color: var(--text); } .svc-qty b { min-width: 16px; text-align: center; }
.pg-qty { align-self: flex-start; gap: 8px; } .pg-qty button { border: 0; color: var(--text); background: var(--line); } .pg-qty b { min-width: 16px; text-align: center; }
.pd-qty button { border: 0; color: var(--text); }
.pg-add { border: 1px solid var(--green); color: var(--green); }

/* v30: link page warning when the computer is on a local copy */
.qr-warn { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: rgba(255,170,0,.12); color: var(--text); text-align: left; }
.qr-warn a { color: var(--green); }

/* v30: booking flow panel, payment card, invoices */
.fl-box { margin-top: 6px; }
.fl-x { margin: 6px 0; padding: 8px 10px; border-radius: 8px; background: rgba(255,170,0,.12); font-size: 13px; }
.fl-x.fl-resched { background: rgba(0,170,255,.10); }
.fl-x.fl-no_show { background: rgba(255,80,80,.12); }
.fl-pay { margin: 6px 0; padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.04); font-size: 13px; }
.fl-pay.paid { background: rgba(0,200,120,.12); }
.fl-pay.wait { background: rgba(255,170,0,.12); }
.fl-amt { font-weight: 600; margin-bottom: 4px; }
.fl-inv { margin: 6px 0; font-size: 13px; } .fl-inv a, .fl-invcard a { color: var(--green); }
.fl-invcard .btn-like { display: inline-block; margin-top: 6px; }
.fl-menu { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.fl-menu button { width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--text); display: grid; gap: 2px; cursor: pointer; }
.fl-menu button:hover { border-color: var(--green); } .fl-menu small { color: var(--muted, #9aa); }
.fl-settings h4 { margin: 18px 0 6px; } .fl-settings label.row { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; }
.fl-invlist { list-style: none; padding: 0; margin: 6px 0; } .fl-invlist li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.fl-invlist li > div { flex: 1; display: grid; } .fl-invlist small { color: var(--muted, #9aa); }

/* v30: the chat tabs (All, Unread … Locked) can be scrolled on a computer: a thin scrollbar, and the mouse wheel scrolls sideways */
@media (pointer: fine) {
  .folders { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.28) transparent; padding-bottom: 6px; }
  .folders::-webkit-scrollbar { display: block; height: 6px; }
  .folders::-webkit-scrollbar-thumb { background: rgba(255,255,255,.28); border-radius: 3px; }
  .folders::-webkit-scrollbar-track { background: transparent; }
}
.fl-pay .oc-actions { margin-top: 6px; }

/* v31: tables pasted into messages */
.msg .body .mt-wrap { display: block; overflow-x: auto; margin: 4px 0; white-space: normal; }
.mt-table { border-collapse: collapse; font-size: 13.5px; min-width: 100%; }
.mt-table td, .mt-table th { border: 1px solid rgba(255,255,255,.25); padding: 4px 8px; text-align: left; vertical-align: top; white-space: pre-wrap; }
.mt-table th, .mt-table tr:first-child td { font-weight: 600; background: rgba(255,255,255,.06); }
.msg.type-text:has(.mt-table) { max-width: min(92%, 720px); }

/* v31: catalogue items as a list (not icon tiles), under their section headings */
.prod-grid.prod-list { display: flex; flex-direction: column; gap: 6px; }
.prod-list .pg-item { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 10px; }
.prod-list .pg-item img, .prod-list .pg-item .prod-ph { width: 44px; height: 44px; aspect-ratio: 1; flex-shrink: 0; font-size: 22px; display: flex; align-items: center; justify-content: center; }
.prod-list .pg-item b { flex: 1 1 160px; }
.prod-list .pg-item .pl-desc { flex-basis: 100%; order: 5; color: var(--muted); font-size: 12.5px; padding-left: 54px; }
.prod-list .pg-item .ibs { order: 6; padding-left: 54px; flex-basis: 100%; }
.prod-list .pg-item .ibs:empty { display: none; }
.prod-list .pg-item .pc-price { white-space: nowrap; font-weight: 600; }
.prod-list .pg-item button, .prod-list .pg-item .pg-qty { align-self: center; }
.pl-head { font-weight: 600; color: var(--green); font-size: 13.5px; padding: 10px 2px 2px; border-bottom: 1px solid var(--line); }
.bt-list .bt-group { font-weight: 600; color: var(--green); padding: 12px 4px 4px; border-bottom: 1px solid var(--line); background: none; }
.bt-list .bt-group small { color: var(--muted); font-weight: 400; margin-left: 6px; }

/* v32: Made in India */
.mii { color: #46e0a8; font-size: 13px; font-weight: 600; letter-spacing: .3px; margin: 6px 0 0; text-align: center; }
.call-ready-bar { position: fixed; left: 8px; right: 8px; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 60; background: #3a2a05; color: #ffd98a; border: 1px solid #7a5a12; border-radius: 12px; padding: 10px 12px; font-size: 13.5px; display: flex; align-items: center; gap: 10px; box-shadow: 0 4px 16px rgba(0,0,0,.4); }
.call-ready-bar #crb-fix { color: #46e0a8; font-weight: 600; } .call-ready-bar #crb-x { margin-left: auto; color: #ffd98a; }
