/* MeowChat Web — "Aura" look, same tokens as the Android app (AuraTokens.kt / MessageItem.kt / BubbleShape.kt) */
:root {
  --bg: #090a10;
  --glass: rgba(255, 255, 255, .06);
  --glass-2: rgba(255, 255, 255, .10);
  --stroke: rgba(255, 255, 255, .14);
  --panel: rgba(18, 20, 31, .78);            /* top island / dock: 0xFF12141F @ 75% */
  --text: #f4f6fb;
  --muted: #c5cad8;
  --muted-2: #8c93a6;
  --teal: #3ef0d0;
  --magenta: #c084fc;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --in-bg: #24262f;
  --in-stroke: #3c3f4a;
  --out-bg: linear-gradient(135deg, #0b2e28, #134e45);
  --out-tail: #114038;
  --out-stroke: rgba(62, 240, 208, .40);
  --ai-bg: linear-gradient(135deg, #121212, #1e1e2e, #121212);
  --ai-tail: #131318;
  --ai-grad: linear-gradient(90deg, #6a11cb, #2575fc, #22d3ee);
  --quote: rgba(0, 0, 0, .25);
  --react: #0088cc;
  --react-bg: rgba(28, 28, 28, .9);
  --menu-bg: rgba(24, 25, 38, .96);
  --pulse-bg: linear-gradient(90deg, rgba(19, 23, 44, .9), rgba(31, 24, 54, .9));
  --danger: #ff6b81;
  --seen: #5cf5ff;
  --gold: #fbbf24;
  --shadow: 0 18px 50px rgba(0, 0, 0, .55);
  --grad: linear-gradient(110deg, #c084fc 0%, #7b8cff 50%, #22d3ee 100%);
  --glow-a: rgba(34, 211, 238, .12);
  --glow-b: rgba(244, 114, 182, .14);
  --dock-bg: rgba(255, 255, 255, .07);
  --dock-stroke: rgba(255, 255, 255, .26);
  --col: 880px;                               /* reading width of a chat on wide screens */
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f3f5f8; --glass: rgba(255,255,255,.80); --glass-2: rgba(0,0,0,.06); --stroke: rgba(0,0,0,.12); --panel: rgba(255,255,255,.86);
  --text: #12141a; --muted: #5b6170; --muted-2: #7a8091; --teal: #0f9f8a; --magenta: #7a3dcc; --cyan: #0891b2;
  --in-bg: #ffffff; --in-stroke: #e2e8f0; --out-bg: #d7f6ef; --out-tail: #d7f6ef; --out-stroke: rgba(15,159,138,.30);
  --ai-bg: linear-gradient(135deg, #f8f9fa, #e9ecef, #f8f9fa); --ai-tail: #f8f9fa; --quote: rgba(0,0,0,.06);
  --react-bg: rgba(255,255,255,.95); --dock-bg: rgba(255,255,255,.5); --dock-stroke: rgba(0,0,0,.12); --menu-bg: rgba(255,255,255,.97); --pulse-bg: linear-gradient(90deg, #eef4ff, #f6eeff);
  --seen: #0088cc; --shadow: 0 18px 50px rgba(20,30,60,.18);
  --glow-a: rgba(34,211,238,.18); --glow-b: rgba(192,132,252,.16); color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f3f5f8; --glass: rgba(255,255,255,.80); --glass-2: rgba(0,0,0,.06); --stroke: rgba(0,0,0,.12); --panel: rgba(255,255,255,.86);
    --text: #12141a; --muted: #5b6170; --muted-2: #7a8091; --teal: #0f9f8a; --magenta: #7a3dcc; --cyan: #0891b2;
    --in-bg: #ffffff; --in-stroke: #e2e8f0; --out-bg: #d7f6ef; --out-tail: #d7f6ef; --out-stroke: rgba(15,159,138,.30);
    --ai-bg: linear-gradient(135deg, #f8f9fa, #e9ecef, #f8f9fa); --ai-tail: #f8f9fa; --quote: rgba(0,0,0,.06);
    --react-bg: rgba(255,255,255,.95); --dock-bg: rgba(255,255,255,.5); --dock-stroke: rgba(0,0,0,.12); --menu-bg: rgba(255,255,255,.97); --pulse-bg: linear-gradient(90deg, #eef4ff, #f6eeff);
    --seen: #0088cc; --shadow: 0 18px 50px rgba(20,30,60,.18);
    --glow-a: rgba(34,211,238,.18); --glow-b: rgba(192,132,252,.16); color-scheme: light;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: 'Rubik', 'Segoe UI', Arial, sans-serif; background: var(--bg); color: var(--text); overflow: hidden; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.grow { flex: 1; min-width: 0; }
.ellipsis { min-width: 0; }
.ellipsis b, .ellipsis small, .ellipsis span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
img.emoji { width: 1.25em; height: 1.25em; vertical-align: -0.28em; margin: 0 .03em; display: inline-block; }
svg.ic { flex: none; display: block; }
[data-ic] { display: inline-grid; place-items: center; }

.aura-bg { position: fixed; inset: 0; z-index: -1; background:
  radial-gradient(1100px 900px at 0% 45%, var(--glow-a), transparent 60%),
  radial-gradient(1200px 900px at 100% 100%, var(--glow-b), transparent 60%), var(--bg); }
.glass { background: var(--glass); border: 1px solid var(--stroke); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); }

.screen { height: 100vh; height: 100dvh; }
.center { display: grid; place-items: center; padding: 16px; }
.logo-big { width: 96px; height: 96px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(34,211,238,.3), 0 0 50px rgba(34,211,238,.3); }
.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.92); opacity: .7; } }

.auth-card { width: 100%; max-width: 400px; text-align: center; border-radius: 28px; padding: 36px 28px; display: grid; gap: 14px; justify-items: center; box-shadow: var(--shadow); }
.auth-card h1 { margin: 6px 0 0; font-size: 1.9rem; }
.auth-card p { margin: 0; color: var(--muted); }
.err { color: var(--danger) !important; font-size: .92rem; }
.muted-link { color: var(--muted); text-decoration: none; font-size: .92rem; }
.field { display: grid; gap: 6px; width: 100%; text-align: right; }
.field > span { font-size: .86rem; color: var(--muted); }
.field input, .field textarea, .field select { background: var(--glass); border: 1px solid var(--stroke); border-radius: 14px; padding: 11px 14px; outline: none; width: 100%; }
.field input:focus, .field textarea:focus { border-color: var(--teal); }
.check { display: flex; align-items: center; gap: 10px; font-size: .95rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--teal); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 22px; border-radius: 999px; border: 0; cursor: pointer; font-weight: 700; transition: transform .15s, opacity .15s; width: 100%; }
.btn:active { transform: scale(.97); }
.btn svg { width: 22px; height: 22px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 26px rgba(123,140,255,.35); }
.btn-ghost { background: var(--glass); border: 1px solid var(--stroke); }
.btn-teal { background: var(--teal); color: #04221d; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-row { display: flex; gap: 10px; width: 100%; }

.icon-btn { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--muted); transition: background .15s, transform .15s, color .15s; }
.icon-btn:hover { background: var(--glass-2); color: var(--text); }
.icon-btn:active { transform: scale(.9); }
.icon-btn.sm { width: 36px; height: 36px; }
.icon-btn.on { color: var(--teal); background: color-mix(in srgb, var(--teal) 14%, transparent); }
.back svg, .flip svg { transform: scaleX(-1); }

/* avatars */
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; background: var(--glass-2); display: block; }
.avatar.letter { display: grid; place-items: center; font-weight: 700; color: #fff; font-size: 1.1em; background: linear-gradient(135deg, hsl(var(--h) 70% 45%), hsl(calc(var(--h) + 40) 75% 38%)); }
.avatar.s34 { width: 34px; height: 34px; font-size: .9rem; }
.avatar.s40 { width: 40px; height: 40px; }
.avatar.s52 { width: 52px; height: 52px; font-size: 1.25rem; }
.avatar.s58 { width: 58px; height: 58px; font-size: 1.35rem; }
.avatar.s112 { width: 112px; height: 112px; font-size: 2.6rem; }
.avatar.xl { width: 96px; height: 96px; }
.av-wrap { position: relative; flex: none; border-radius: 50%; }
.av-wrap.ring { padding: 2px; box-shadow: 0 0 0 2px var(--ring, var(--teal)); }
.av-wrap.soft { box-shadow: 0 0 0 1px var(--stroke); }
.av-wrap .online { position: absolute; bottom: 1px; left: 1px; width: 13px; height: 13px; border-radius: 50%; background: #3ee08f; border: 2.5px solid var(--bg); box-shadow: 0 0 8px #3ee08f; }

/* ───────── layout ───────── */
.app { display: flex; }
.side { width: 400px; flex: none; display: flex; flex-direction: column; border-left: 1px solid var(--stroke); position: relative; }
.island { display: flex; align-items: center; gap: 4px; margin: 12px 14px 4px; padding: 7px 8px; border-radius: 26px; background: var(--panel); border: 1px solid var(--stroke); backdrop-filter: blur(18px); }
.me-btn { display: flex; align-items: center; gap: 10px; background: none; border: 0; cursor: pointer; flex: 1; min-width: 0; text-align: right; padding: 0; }
.me-btn b { font-size: 1rem; }
.me-btn small { font-size: .78rem; text-align: right; color: var(--muted-2); }
.tab-body { flex: 1; overflow-y: auto; padding: 4px 0 104px; }
.tab-title { margin: 12px 20px 10px; font-size: 1.3rem; display: flex; align-items: baseline; gap: 8px; }
.tab-title small { font-size: .85rem; color: var(--teal); font-weight: 500; }

.pulse-card { display: flex; align-items: center; gap: 14px; width: calc(100% - 28px); margin: 6px 14px; padding: 13px 16px; border-radius: 22px; cursor: pointer; text-align: right;
  background: var(--pulse-bg) padding-box, linear-gradient(90deg, rgba(34,211,238,.45), rgba(244,114,182,.45)) border-box; border: 1px solid transparent; transition: transform .15s; }
.pulse-card:active { transform: scale(.98); }
.pulse-card .paw { width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--cyan);
  background: radial-gradient(circle, rgba(34,211,238,.35), rgba(244,114,182,.2), transparent) padding-box, linear-gradient(var(--bg), var(--bg)) padding-box, conic-gradient(var(--cyan), var(--pink), var(--cyan)) border-box; border: 2px solid transparent; animation: spinGlow 6s linear infinite; }
@keyframes spinGlow { 50% { box-shadow: 0 0 18px rgba(34,211,238,.45); } }
.pulse-card b { display: block; font-size: .95rem; }
.pulse-card b i { font-style: normal; color: var(--cyan); }
.pulse-card small { display: block; font-size: .82rem; color: var(--muted); margin-top: 1px; }

.presence { display: flex; gap: 4px; overflow-x: auto; padding: 8px 12px 4px; scrollbar-width: none; }
.presence::-webkit-scrollbar { display: none; }
.presence:empty { display: none; }
.presence button { flex: none; width: 70px; display: grid; justify-items: center; gap: 5px; background: none; border: 0; cursor: pointer; padding: 4px 0; }
.presence .av-wrap { padding: 2px; background: conic-gradient(var(--cyan), var(--pink), var(--teal), var(--cyan)); }
.presence .av-wrap .avatar { border: 2px solid var(--bg); }
.presence span.n { font-size: .72rem; color: var(--muted); max-width: 66px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.search-pill { display: flex; align-items: center; gap: 8px; margin: 8px 14px; padding: 0 16px; border-radius: 999px; background: var(--glass); border: 1px solid var(--stroke); color: var(--muted-2); }
.search-pill:focus-within { border-color: color-mix(in srgb, var(--teal) 55%, transparent); }
.search-pill input { flex: 1; background: none; border: 0; outline: none; padding: 11px 0; color: var(--text); min-width: 0; }
.archive-head { margin: 8px 20px; display: grid; }
.archive-head b { font-size: 1.15rem; }
.archive-head span { font-size: .82rem; }

.chat-list { display: flex; flex-direction: column; padding: 0 6px; }
.list-label { font-size: .78rem; color: var(--muted-2); padding: 14px 14px 6px; font-weight: 500; }
.chat-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 20px; cursor: pointer; width: 100%; background: none; border: 1px solid transparent; text-align: right; transition: background .15s, transform .15s; }
.chat-item:hover { background: var(--glass); }
.chat-item:active { transform: scale(.975); }
.chat-item.active { background: var(--glass); border-color: var(--stroke); }
.chat-item .name { font-size: 1rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; display: flex; align-items: center; gap: 5px; }
.chat-item .name svg { color: var(--teal); }
.chat-item .prev { font-size: .88rem; color: color-mix(in srgb, var(--text) 52%, transparent); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; margin-top: 1px; }
.chat-item.unread .prev { color: color-mix(in srgb, var(--text) 90%, transparent); font-weight: 600; }
.chat-item .side-col { display: grid; justify-items: end; gap: 5px; flex: none; }
.chat-item .t { display: flex; align-items: center; gap: 5px; font-size: .75rem; color: color-mix(in srgb, var(--text) 45%, transparent); }
.chat-item.unread .t { color: var(--teal); font-weight: 700; }
.chat-item .t svg { opacity: .8; }
.chat-item .t .pin { transform: rotate(45deg); }
.badge { background: var(--teal); color: #000; font-size: .7rem; font-weight: 800; border-radius: 999px; min-width: 20px; height: 20px; padding: 0 7px; display: grid; place-items: center; }
.badge.dot { min-width: 11px; width: 11px; height: 11px; padding: 0; }
.global-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #7c3aed, #22d3ee); flex: none; box-shadow: 0 0 22px rgba(34,211,238,.25); }
.global-ic.s34 { width: 34px; height: 34px; }
.global-ic.s40 { width: 40px; height: 40px; }
.global-ic.s96 { width: 96px; height: 96px; }

.dock { position: absolute; bottom: 14px; left: 14px; right: 14px; height: 68px; display: flex; align-items: center; justify-content: space-around; border-radius: 28px; padding: 4px 6px; z-index: 3; overflow: hidden;
  background: var(--dock-bg); border: 1px solid var(--dock-stroke); backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 12px 34px rgba(0,229,255,.12), 0 10px 30px rgba(224,64,251,.10), 0 14px 40px rgba(0,0,0,.35);
  transition: left .34s cubic-bezier(.3,1.25,.4,1), right .34s cubic-bezier(.3,1.25,.4,1), height .3s, border-radius .3s, padding .3s; }
.dock button { position: relative; flex: 1; min-width: 0; display: grid; justify-items: center; gap: 2px; background: none; border: 0; cursor: pointer; padding: 2px; color: var(--muted-2); font-size: .7rem; font-weight: 500; white-space: nowrap;
  transition: color .2s, opacity .18s, flex-grow .3s, transform .3s; }
.dock .pill { width: 54px; height: 30px; border-radius: 999px; transition: background .25s, transform .25s; }
.dock button.active { color: var(--teal); font-weight: 700; }
.dock button.active .pill { background: color-mix(in srgb, var(--teal) 16%, transparent); }
.dock button:active .pill { transform: scale(.9); }
.dock .dot { position: absolute; top: 1px; left: calc(50% - 20px); width: 9px; height: 9px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 8px var(--pink); }
.dock .ai-tab { flex: none; width: 58px; padding: 0; }
.dock .orb { width: 48px; height: 48px; border-radius: 50%; color: #fff; background: radial-gradient(circle, rgba(224,64,251,.85), rgba(0,229,255,.6) 62%, rgba(0,229,255,.12)); box-shadow: 0 0 22px rgba(224,64,251,.35); transition: transform .2s; }
.dock .ai-tab:hover .orb { transform: scale(1.06) rotate(8deg); }
/* collapsed: only the floating Botito orb is left (AuraDock's collapsed state) */
.dock.collapsed { left: calc(50% - 30px); right: calc(50% - 30px); height: 60px; border-radius: 30px; padding: 0; }
.dock.collapsed button:not(.ai-tab) { flex-grow: 0; flex-basis: 0; opacity: 0; pointer-events: none; transform: scale(.6); padding: 0; }
.dock.collapsed .orb { width: 46px; height: 46px; }

.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; padding: 2px 14px; }
.person { display: grid; justify-items: center; gap: 6px; padding: 16px 6px 12px; border-radius: 22px; background: var(--glass); border: 1px solid var(--stroke); cursor: pointer; text-align: center; transition: transform .15s; }
.person:active { transform: scale(.96); }
.person b { font-size: .88rem; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person small { font-size: .72rem; color: var(--muted-2); }

.news { display: grid; gap: 12px; padding: 2px 14px; }
.news-card { border-radius: 22px; padding: 16px; background: var(--glass); border: 1px solid var(--stroke); }
.news-card .cat { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: color-mix(in srgb, var(--teal) 14%, transparent); color: var(--teal); margin-bottom: 8px; }
.news-card h3 { margin: 0 0 6px; font-size: 1.08rem; }
.news-card p { margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.55; }
.news-card img.cover { width: 100%; border-radius: 14px; margin-top: 10px; max-height: 260px; object-fit: cover; cursor: zoom-in; }
.news-card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; color: var(--muted-2); font-size: .8rem; }
.like { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--stroke); background: none; border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.like.on { border-color: var(--pink); color: var(--pink); background: rgba(244,114,182,.1); }
.news-card a.ext { color: var(--teal); font-size: .88rem; display: inline-block; margin-top: 8px; }

.main { flex: 1; min-width: 0; display: flex; position: relative; }
.empty-main { margin: auto; text-align: center; padding: 20px; }
.empty-main h2 { margin: 18px 0 6px; font-size: 1.7rem; }
.quick { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.quick button { display: flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px; background: var(--glass); border: 1px solid var(--stroke); cursor: pointer; font-weight: 500; }
.quick button:hover { border-color: var(--teal); color: var(--teal); }
.chat { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; }

/* chat header: the app's floating pill */
.chat-top { display: flex; align-items: center; gap: 2px; width: min(calc(100% - 24px), var(--col)); margin: 12px auto 0; padding: 6px 8px; border-radius: 26px; z-index: 2;
  background: var(--panel); border: 1px solid var(--stroke); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.chat-who { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; background: none; border: 0; cursor: pointer; text-align: right; padding: 0 4px; }
.chat-who b { font-size: 1rem; }
.chat-top small { font-size: .78rem; color: var(--muted-2); }
.chat-top small.live { color: var(--teal); }
.back { display: none; }
#chat-search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; padding: 9px 6px; }
#search-count { font-size: .8rem; padding: 0 6px; white-space: nowrap; }

/* ───────── messages ───────── */
.messages { flex: 1; overflow-y: auto; padding: 10px max(10px, calc((100% - var(--col)) / 2)) 6px; display: flex; flex-direction: column; overscroll-behavior: contain; }
.loading-more { text-align: center; color: var(--muted-2); font-size: .82rem; padding: 8px; }
.day, .sys { align-self: center; margin: 12px 0 6px; font-size: .74rem; color: var(--muted); padding: 4px 13px; border-radius: 999px; background: var(--panel); border: 1px solid var(--stroke); text-align: center; max-width: 86%; }
.sys { margin: 6px 0; }
.m { display: flex; gap: 8px; align-items: flex-end; max-width: min(82%, 600px); margin-top: 2px; }
.m.first { margin-top: 7px; }
.m.last { margin-bottom: 5px; }
.m.new { animation: msgIn .28s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px) scale(.96); } }
.m.out { align-self: flex-end; flex-direction: row-reverse; }
.m .av-slot { width: 34px; flex: none; }
.m.out .av-slot, .no-av .m .av-slot { display: none; }
.no-av .m.bot .av-slot { display: block; }
.m .av-slot .avatar { cursor: pointer; }
.col { display: flex; flex-direction: column; min-width: 0; }
.m.out .col { align-items: flex-end; }
.m.in .col { align-items: flex-start; }

.bubble { position: relative; padding: 7px 12px 6px; border-radius: 16px; min-width: 56px; cursor: pointer; overflow-wrap: anywhere; line-height: 1.42; font-size: .97rem;
  background: var(--in-bg); border: 1px solid var(--in-stroke); box-shadow: 0 1px 2px rgba(0,0,0,.18); --tail-bg: var(--in-bg); --tail-stroke: var(--in-stroke); }
.m.in .bubble { margin-right: 12px; }
.m.out .bubble { margin-left: 12px; background: var(--out-bg); border-color: var(--out-stroke); --tail-bg: var(--out-tail); --tail-stroke: var(--out-stroke); }
/* grouped corners + tail, as BubbleShape.kt draws them (RTL: incoming sits on the right) */
.m.in:not(.first) .bubble { border-top-right-radius: 4px; }
.m.in:not(.last) .bubble { border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; }
.m.in.last .bubble:not(.clear) { border-bottom-right-radius: 0; }
.m.out:not(.first) .bubble { border-top-left-radius: 4px; }
.m.out:not(.last) .bubble { border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; }
.m.out.last .bubble:not(.clear) { border-bottom-left-radius: 0; }
.tail { position: absolute; bottom: -1px; right: -12px; overflow: visible; pointer-events: none; }
.m.out .tail { right: auto; left: -12px; transform: scaleX(-1); }
.tail .f { fill: var(--tail-bg); }
.tail .s { fill: none; stroke: var(--tail-stroke); stroke-width: 1; }
.m.bot .bubble { background: var(--ai-bg) padding-box, var(--ai-grad) border-box; border: 1.2px solid transparent; box-shadow: 0 6px 18px rgba(37,117,252,.18); --tail-bg: var(--ai-tail); --tail-stroke: #22d3ee; }
.m.bot .bubble::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background-image: linear-gradient(rgba(106,17,203,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(106,17,203,.05) 1px, transparent 1px); background-size: 20px 20px; }
.m.flash .bubble, .m.hit.cur .bubble { animation: flash 1.4s; }
@keyframes flash { 25% { box-shadow: 0 0 0 3px var(--teal); } }
.m.hit .bubble { outline: 1.5px solid color-mix(in srgb, var(--gold) 70%, transparent); }
mark { background: var(--gold); color: #000; border-radius: 3px; padding: 0 1px; }
.bubble.clear { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 2px; }
.bubble.clear::before { display: none; }
.bubble.media-only { padding: 3px; }
.bubble.media-only .meta { position: absolute; bottom: 8px; left: 9px; background: rgba(0,0,0,.55); color: #fff; padding: 1px 8px; border-radius: 999px; margin: 0; }
.bubble.clear .meta { justify-content: center; background: var(--panel); border: 1px solid var(--stroke); border-radius: 999px; padding: 1px 8px; width: fit-content; margin: 3px auto 0; }
.who { display: flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; margin-bottom: 1px; }
.ai-name { background: var(--ai-grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 900; }
.ai-badge { font-size: .52rem; font-weight: 700; padding: 1px 5px; border-radius: 6px; border: .5px solid #2575fc; color: #6a9bff; background: rgba(106,17,203,.08); white-space: nowrap; }
.text { position: relative; }
.text a { color: var(--cyan); }
.m.out .text a { color: var(--teal); }
.mention { color: var(--teal); font-weight: 600; cursor: pointer; }
.hashtag { color: var(--cyan); }
.big-emoji { font-size: 2.9rem; line-height: 1.15; }
.big-emoji img.emoji { width: 1.1em; height: 1.1em; vertical-align: -0.1em; }
.fwd { font-size: .75rem; color: var(--muted-2); font-style: italic; margin-bottom: 3px; display: flex; align-items: center; gap: 4px; }
.fwd svg { transform: scaleX(-1); }
.quote { border-right: 3px solid var(--teal); background: var(--quote); border-radius: 9px; padding: 5px 9px; margin: 1px 0 5px; font-size: .84rem; cursor: pointer; display: flex; gap: 8px; align-items: center; }
.quote b { display: block; color: var(--teal); font-size: .76rem; }
.quote span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; opacity: .82; }
.quote img:not(.emoji) { width: 38px; height: 38px; border-radius: 7px; object-fit: cover; flex: none; }
.media { display: block; width: auto; max-width: min(100%, 320px); max-height: 420px; border-radius: 13px; cursor: zoom-in; background: rgba(0,0,0,.25); object-fit: cover; }
.media + .text, .media + .quote { margin-top: 5px; }
.sticker { width: 168px; height: 168px; object-fit: contain; display: block; filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); }
.sticker-text { font-size: .8rem; color: var(--muted); text-align: center; }
.meta { display: flex; justify-content: flex-end; align-items: center; gap: 4px; font-size: .67rem; color: var(--muted-2); margin-top: 2px; white-space: nowrap; direction: ltr; }
.m.out .meta { color: color-mix(in srgb, var(--text) 62%, transparent); }
.meta svg.seen { color: var(--seen); }
.translation { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--stroke); font-size: .9rem; color: var(--muted); }
.translation small { display: flex; align-items: center; gap: 4px; font-size: .68rem; color: var(--teal); margin-bottom: 2px; }
.voice-btn { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 4px 2px; cursor: pointer; min-width: 190px; }
.voice-btn .play { width: 38px; height: 38px; border-radius: 50%; background: var(--teal); color: #04221d; display: grid; place-items: center; flex: none; }
.voice-btn .wave { flex: 1; height: 26px; display: flex; align-items: center; gap: 2px; direction: ltr; }
.voice-btn .wave i { flex: 1; min-width: 2px; border-radius: 2px; background: color-mix(in srgb, var(--text) 45%, transparent); }
.voice-btn small { font-size: .72rem; color: var(--muted-2); }
audio { max-width: 250px; height: 38px; }
.reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: -5px; padding: 0 18px; position: relative; z-index: 1; }
.react-chip { display: inline-flex; align-items: center; gap: 3px; font-size: .78rem; font-weight: 700; color: var(--react); background: var(--react-bg); border: 1px solid var(--stroke); border-radius: 999px; padding: 1px 8px; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: transform .12s; }
.react-chip:hover { transform: scale(1.1); }
.react-chip.mine { background: var(--react); border-color: var(--react); color: #fff; }

.poll { min-width: min(270px, 62vw); padding: 2px 0; }
.poll h4 { margin: 2px 0 10px; font-size: 1rem; display: flex; gap: 6px; align-items: flex-start; }
.poll h4 svg { color: var(--teal); margin-top: 2px; }
.poll .opt { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; border: 1px solid var(--stroke); background: rgba(0,0,0,.15); border-radius: 12px; padding: 9px 12px; margin-bottom: 7px; cursor: pointer; overflow: hidden; text-align: right; }
.poll .opt:disabled { cursor: default; }
.poll .opt .fill { position: absolute; inset: 0 0 0 auto; background: color-mix(in srgb, var(--teal) 22%, transparent); z-index: 0; transition: width .45s ease; }
.poll .opt > span { position: relative; z-index: 1; }
.poll .opt.voted { border-color: var(--teal); }
.poll .opt.correct { border-color: #3ee08f; }
.poll .opt.correct .fill { background: rgba(62,224,143,.25); }
.poll .opt-img { width: 26px; height: 26px; border-radius: 6px; vertical-align: middle; margin-left: 6px; object-fit: cover; }
.poll small { font-size: .74rem; color: var(--muted-2); }

.to-bottom { position: absolute; left: max(18px, calc((100% - var(--col)) / 2)); bottom: 86px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--stroke); background: var(--menu-bg); color: var(--text); cursor: pointer; box-shadow: var(--shadow); z-index: 4; }
.bottom { width: min(100%, calc(var(--col) + 24px)); margin: 0 auto; padding: 0 12px; }
.typing-line { font-size: .8rem; color: var(--teal); display: flex; align-items: center; gap: 6px; padding: 0 8px; }
.typing-line:not(:empty) { padding-bottom: 4px; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--teal); animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; }
.dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
.notice { margin-bottom: 8px; padding: 10px 14px; border-radius: 16px; background: rgba(255,107,129,.12); color: var(--danger); font-size: .9rem; text-align: center; }
.reply-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; padding: 7px 8px 7px 12px; border-radius: 18px; background: var(--panel); border: 1px solid var(--stroke); border-right: 3px solid var(--teal); }
.reply-bar .rb-ic { color: var(--teal); }
.reply-bar b { color: var(--teal); font-size: .8rem; }
.reply-bar span { font-size: .85rem; color: var(--muted); }
.composer { display: flex; align-items: flex-end; gap: 8px; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
.input-wrap { flex: 1; display: flex; align-items: flex-end; border-radius: 26px; padding: 5px 6px; background: var(--panel); border: 1px solid var(--stroke); backdrop-filter: blur(18px); min-width: 0; }
.input-wrap:focus-within { border-color: color-mix(in srgb, var(--teal) 55%, transparent); }
.composer textarea { flex: 1; min-width: 0; resize: none; max-height: 150px; background: none; border: 0; padding: 8px 4px; outline: none; line-height: 1.4; }
#btn-attach.open { color: var(--teal); transform: rotate(-20deg); }
.send { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--teal); color: #04221d; cursor: pointer; flex: none; box-shadow: 0 6px 20px color-mix(in srgb, var(--teal) 40%, transparent); transition: transform .15s; }
.send svg { transform: scaleX(-1); }
.send:active { transform: scale(.88); }
.pop { position: absolute; bottom: 76px; z-index: 5; border-radius: 22px; padding: 8px; box-shadow: var(--shadow); background: var(--menu-bg); border: 1px solid var(--stroke); backdrop-filter: blur(20px); animation: pop .15s ease-out; }
#attach-pop { left: max(70px, calc((100% - var(--col)) / 2 + 58px)); display: grid; gap: 2px; min-width: 200px; }
#attach-pop button { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; background: none; border: 0; cursor: pointer; text-align: right; font-weight: 500; }
#attach-pop button:hover { background: var(--glass-2); }
.pill-ic { width: 36px; height: 36px; border-radius: 50%; color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); }
.emoji-pop { right: max(12px, calc((100% - var(--col)) / 2)); width: min(372px, calc(100% - 24px)); max-height: 320px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, 40px); gap: 2px; justify-content: center; }
.emoji-pop button, .reacts-row button { background: none; border: 0; font-size: 1.4rem; width: 40px; height: 40px; border-radius: 12px; cursor: pointer; display: grid; place-items: center; transition: transform .12s; }
.emoji-pop button:hover, .reacts-row button:hover { background: var(--glass-2); transform: scale(1.18); }
.emoji-pop .sec { grid-column: 1 / -1; font-size: .74rem; color: var(--muted-2); padding: 6px 4px 2px; }
#mention-pop { right: max(60px, calc((100% - var(--col)) / 2 + 48px)); min-width: 230px; max-height: 260px; overflow: auto; display: grid; gap: 2px; }

/* menus: the app's "sleek" glass menu, icons in tinted circles */
.menu { position: fixed; z-index: 20; border-radius: 22px; padding: 6px; min-width: 236px; box-shadow: var(--shadow); background: var(--menu-bg); border: 1px solid var(--stroke); backdrop-filter: blur(22px); animation: pop .15s ease-out; max-height: calc(100dvh - 16px); overflow-y: auto; }
@keyframes pop { from { opacity: 0; transform: scale(.93) translateY(4px); } }
.reacts-row { display: flex; gap: 0; padding: 2px 2px 6px; border-bottom: 1px solid var(--stroke); margin-bottom: 4px; justify-content: space-between; }
.menu > button { display: flex; align-items: center; width: 100%; gap: 12px; background: none; border: 0; padding: 7px 10px; border-radius: 14px; cursor: pointer; text-align: right; font-size: .95rem; }
.menu > button:hover { background: var(--glass-2); }
.menu > button .mi { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--c, var(--teal)); background: color-mix(in srgb, var(--c, var(--teal)) 15%, transparent); flex: none; }
.menu > button.danger { color: var(--danger); --c: var(--danger); }
.menu > button .cnt { margin-inline-start: auto; }
.menu > hr { border: 0; border-top: 1px solid var(--stroke); margin: 4px 8px; }

.modal-back { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.55); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 440px; max-height: calc(100dvh - 32px); overflow-y: auto; border-radius: 28px; padding: 22px; background: var(--menu-bg); border: 1px solid var(--stroke); box-shadow: var(--shadow); display: grid; gap: 14px; animation: pop .2s ease-out; }
.modal.wide { max-width: 560px; }
.modal h2 { margin: 0; font-size: 1.25rem; display: flex; align-items: center; gap: 8px; }
.modal h2 svg { color: var(--teal); }
.profile { display: grid; justify-items: center; gap: 5px; text-align: center; }
.profile .av-wrap { box-shadow: 0 0 0 3px var(--teal), 0 0 40px color-mix(in srgb, var(--teal) 35%, transparent); cursor: zoom-in; margin-bottom: 8px; }
.sticker-grid, .gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.sticker-grid button { background: var(--glass); border: 1px solid var(--stroke); border-radius: 16px; padding: 6px; cursor: pointer; aspect-ratio: 1; }
.sticker-grid img { width: 100%; height: 100%; object-fit: contain; }
.gallery-grid button { border: 0; padding: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 1; cursor: zoom-in; background: var(--glass); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fwd-list { display: grid; gap: 2px; max-height: 50vh; overflow-y: auto; margin: 0 -8px; }
.member { display: flex; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 14px; cursor: pointer; background: none; border: 0; width: 100%; text-align: right; }
.member:hover { background: var(--glass-2); }
.member small { color: var(--muted-2); font-size: .78rem; }
.member .tag { margin-inline-start: auto; font-size: .7rem; color: var(--teal); border: 1px solid var(--teal); border-radius: 999px; padding: 1px 8px; }
.saved { display: grid; gap: 8px; }
.saved-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 16px; background: var(--glass); border: 1px solid var(--stroke); }
.saved-item b { font-size: .82rem; color: var(--teal); }
.saved-item p { margin: 2px 0 0; font-size: .93rem; overflow-wrap: anywhere; }
.saved-item img.thumb { width: 54px; height: 54px; border-radius: 10px; object-fit: cover; flex: none; }
.saved-item small { color: var(--muted-2); font-size: .72rem; }
.tips { display: grid; gap: 8px; }
.tips button { display: flex; align-items: center; gap: 12px; text-align: right; padding: 11px 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--stroke); cursor: pointer; }
.tips button:hover { border-color: var(--cyan); }
.tips button small { display: block; color: var(--muted-2); font-size: .8rem; }

.toast { position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%); padding: 10px 18px; border-radius: 999px; z-index: 40; font-size: .92rem; box-shadow: var(--shadow); max-width: calc(100% - 32px); text-align: center; background: var(--menu-bg); border: 1px solid var(--stroke); animation: pop .2s; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 45; display: grid; place-items: center; cursor: zoom-out; padding: 16px; animation: fade .15s; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(143,150,170,.28); border-radius: 8px; }

@media (max-width: 760px) {
  .side { width: 100%; border: 0; }
  .main { display: none; }
  .app.in-chat .side { display: none; }
  .app.in-chat .main { display: flex; }
  .back { display: grid; }
  .m { max-width: 86%; }
  .chat-top { margin-top: 8px; width: calc(100% - 16px); }
  .messages { padding-inline: 8px; }
  .bottom { padding: 0 8px; }
  #btn-gallery { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ───────── Botito at work: the presence strip (BotitoPresence) and the light on the bubbles (botitoFx) ───────── */
.bot-presence { display: inline-flex; align-items: center; gap: 10px; margin: 0 2px 8px; padding: 7px 8px 7px 16px; border-radius: 22px; width: fit-content; max-width: 100%;
  background: linear-gradient(var(--bp-bg), var(--bp-bg)) padding-box, linear-gradient(120deg, rgba(0,212,255,.6), rgba(124,77,255,.6), rgba(255,77,157,.6), rgba(0,212,255,.6)) border-box; border: 1px solid transparent;
  --bp-bg: #14151f; box-shadow: 0 8px 26px rgba(124,77,255,.18); animation: bpIn .32s cubic-bezier(.2,.9,.3,1.25); }
:root[data-theme="light"] .bot-presence { --bp-bg: #ffffff; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .bot-presence { --bp-bg: #ffffff; } }
@keyframes bpIn { from { opacity: 0; transform: translateY(10px) scale(.94); } }
.bp-face { position: relative; width: 38px; height: 38px; flex: none; display: grid; place-items: center; }
.bp-face::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(#00d4ff, #7c4dff, #ff4d9d, #00d4ff);
  -webkit-mask: radial-gradient(circle, transparent 16.2px, #000 16.8px); mask: radial-gradient(circle, transparent 16.2px, #000 16.8px); animation: bpSpin 2.6s linear infinite; }
@keyframes bpSpin { to { transform: rotate(360deg); } }
.bp-face img { width: 31px; height: 31px; border-radius: 50%; object-fit: cover; }
.bp-text { display: grid; line-height: 1.25; min-width: 0; overflow: hidden; }
.bp-text b { font-size: .7rem; background: linear-gradient(90deg, #00d4ff, #7c4dff, #ff4d9d); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; }
.bp-phrase { font-size: .9rem; font-weight: 600; white-space: nowrap; color: transparent; -webkit-background-clip: text; background-clip: text;
  background-image: linear-gradient(100deg, color-mix(in srgb, var(--text) 55%, transparent) 35%, var(--text) 50%, color-mix(in srgb, var(--text) 55%, transparent) 65%); background-size: 250% 100%; animation: bpSheen 1.9s linear infinite; }
.bp-phrase.in { animation: bpSheen 1.9s linear infinite, bpWord .26s ease-out; }
@keyframes bpSheen { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@keyframes bpWord { from { transform: translateY(9px); opacity: 0; } }
.bp-glyph { width: 30px; height: 22px; flex: none; display: grid; place-items: center; direction: ltr; }
.g-dots, .g-bars { display: flex; align-items: center; gap: 4px; height: 100%; }
.g-dots i { width: 6px; height: 6px; border-radius: 50%; animation: gDot 1.1s ease-in-out infinite; }
.g-dots i:nth-child(1) { background: #00d4ff; } .g-dots i:nth-child(2) { background: #7c4dff; animation-delay: .14s; } .g-dots i:nth-child(3) { background: #ff4d9d; animation-delay: .28s; }
@keyframes gDot { 0%, 100% { transform: translateY(2px) scale(.8); opacity: .45; } 50% { transform: translateY(-4px) scale(1.15); opacity: 1; } }
.g-bars { gap: 3px; }
.g-bars i { width: 3px; height: 100%; border-radius: 2px; background: linear-gradient(#00d4ff, #7c4dff); animation: gBar 1.1s ease-in-out infinite; transform-origin: center; }
.g-bars i:nth-child(2) { animation-delay: .15s; } .g-bars i:nth-child(3) { animation-delay: .3s; } .g-bars i:nth-child(4) { animation-delay: .45s; } .g-bars i:nth-child(5) { animation-delay: .6s; }
@keyframes gBar { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
.g-scan { position: relative; width: 28px; height: 20px; border: 1.6px solid rgba(124,77,255,.7); border-radius: 5px; overflow: hidden; display: block; }
.g-scan i { position: absolute; left: 2px; right: 2px; height: 2px; background: linear-gradient(90deg, transparent, #00d4ff, transparent); animation: gScan 1.1s ease-in-out infinite alternate; }
@keyframes gScan { from { top: 12%; } to { top: 82%; } }
/* the message that summoned him glows; the voice note he works on gets a scan line */
.m.fx-ask .bubble { animation: fxAsk 1.6s ease-in-out infinite; }
@keyframes fxAsk { 0%, 100% { box-shadow: 0 0 0 1.5px rgba(0,212,255,.75), 0 0 16px rgba(0,212,255,.35); } 50% { box-shadow: 0 0 0 1.5px rgba(255,77,157,.75), 0 0 20px rgba(124,77,255,.45); } }
.m.fx-target .bubble { box-shadow: 0 0 0 1.5px rgba(124,77,255,.8), 0 0 18px rgba(0,212,255,.4); }
.cmd-ic { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #7c4dff, #00d4ff); }
#mention-pop[data-mode="cmd"] { min-width: min(330px, calc(100% - 24px)); }
.text b.h { font-size: 1.08em; }

/* ───────── videos ───────── */
.video { position: relative; max-width: 100%; border-radius: 13px; overflow: hidden; background: #000; cursor: pointer; display: grid; place-items: center; }
.video img, .video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.video video { object-fit: contain; background: #000; }
.vplay { position: relative; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(0,0,0,.5); border: 1.5px solid rgba(255,255,255,.7); backdrop-filter: blur(6px); transition: transform .15s; }
.video:hover .vplay { transform: scale(1.08); }
.vdur { position: absolute; top: 8px; left: 9px; background: rgba(0,0,0,.55); color: #fff; font-size: .7rem; padding: 1px 8px; border-radius: 999px; direction: ltr; }
.video.uploading { color: #fff; gap: 8px; align-content: center; background: linear-gradient(135deg, #1a1b2b, #0d0e17); cursor: default; }
.video.uploading small { color: var(--muted); }
.video + .text { margin-top: 5px; }

/* ───────── polls: the glowing card (PollCard) ───────── */
.bubble.is-poll > .meta { display: none; }
.bubble.is-poll > .who { margin: 0 6px 4px; }
.avatar.s20 { width: 20px; height: 20px; font-size: .6rem; border: 1.5px solid var(--pc-b); }
.stack { display: inline-flex; flex: none; }
.stack > * + * { margin-inline-start: -7px; }
.pcard { --pc-t: #1a1b2b; --pc-b: #0d0e17; --p-gold: #ffc94d; --p-good: #22e58b; --p-bad: #ff5a6e; position: relative; width: min(320px, 74vw); padding: 16px; border-radius: 26px; cursor: default; text-align: right;
  background: radial-gradient(420px 260px at 100% 0, color-mix(in srgb, var(--magenta) 17%, transparent), transparent 70%) padding-box, linear-gradient(var(--pc-t), var(--pc-b)) padding-box,
    linear-gradient(120deg, var(--teal), var(--cyan), var(--magenta), var(--p-gold), var(--teal), var(--cyan), var(--magenta)) border-box;
  background-size: auto, auto, 300% 300%; border: 1.6px solid transparent; box-shadow: 0 12px 34px color-mix(in srgb, var(--magenta) 30%, transparent); animation: pFlow 6s linear infinite; }
:root[data-theme="light"] .pcard { --pc-t: #ffffff; --pc-b: #f1f3fa; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .pcard { --pc-t: #ffffff; --pc-b: #f1f3fa; } }
@keyframes pFlow { from { background-position: 0 0, 0 0, 0% 50%; } to { background-position: 0 0, 0 0, 150% 50%; } }
.pcard.ended { background: radial-gradient(420px 260px at 0 0, rgba(255,201,77,.16), transparent 70%) padding-box, linear-gradient(var(--pc-t), var(--pc-b)) padding-box, linear-gradient(120deg, var(--p-gold), #ff9f43, var(--teal), var(--p-gold), #ff9f43) border-box;
  background-size: auto, auto, 300% 300%; box-shadow: 0 12px 34px rgba(255,201,77,.25); animation-duration: 9s; }
.phead { display: flex; align-items: center; gap: 8px; }
.phead b { display: block; font-size: .72rem; font-weight: 900; opacity: .8; }
.phead small { display: flex; align-items: center; gap: 3px; font-size: .66rem; opacity: .5; min-height: 1em; }
.pico { width: 30px; height: 30px; border-radius: 10px; flex: none; display: grid; place-items: center; color: #07070b; background: linear-gradient(135deg, var(--teal), var(--cyan), var(--magenta)); }
.pico.gold { background: linear-gradient(135deg, var(--p-gold), #ff9f43); }
.pchip { display: inline-flex; align-items: center; gap: 4px; flex: none; font-size: .66rem; font-weight: 900; padding: 4px 9px; border-radius: 999px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.pchip.live { --c: var(--p-good); } .pchip.gold { --c: var(--p-gold); } .pchip.off { --c: var(--muted-2); }
.pchip.live i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); animation: pLive .9s ease-in-out infinite alternate; }
@keyframes pLive { from { opacity: .35; } }
.pcard h4 { margin: 12px 0 14px; font-size: 1.16rem; line-height: 1.3; font-weight: 900; }
.popt { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; margin-bottom: 7px; padding: 10px 12px; border-radius: 16px; overflow: hidden; cursor: pointer; text-align: right;
  background: color-mix(in srgb, var(--text) 5%, transparent); border: 1px solid color-mix(in srgb, var(--text) 12%, transparent); --acc: var(--magenta); transition: transform .15s; }
.popt:active:not(:disabled) { transform: scale(.97); }
.popt:disabled { cursor: default; }
.popt > * { position: relative; z-index: 1; }
.popt .pbar { position: absolute; inset: 0 0 0 auto; z-index: 0; background: linear-gradient(to left, color-mix(in srgb, var(--acc) 28%, transparent), color-mix(in srgb, var(--acc) 12%, transparent)); transition: width .8s cubic-bezier(.4, 0, .2, 1); overflow: hidden; }
.popt .pbar::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 35%, rgba(255,255,255,.16) 50%, transparent 65%); background-size: 250% 100%; animation: bpSheen 2.2s linear infinite; }
.popt.mine { --acc: var(--teal); border: 1.5px solid var(--teal); }
.popt.winner { --acc: var(--p-gold); border: 1.5px solid var(--p-gold); }
.popt.good { --acc: var(--p-good); border: 1.5px solid var(--p-good); }
.popt.bad { --acc: var(--p-bad); border: 1.5px solid var(--p-bad); }
.popt.mine .pbar, .popt.winner .pbar, .popt.good .pbar, .popt.bad .pbar { background: linear-gradient(to left, color-mix(in srgb, var(--acc) 55%, transparent), color-mix(in srgb, var(--acc) 12%, transparent)); }
.pmark { width: 21px; height: 21px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #07070b; border: 1.5px solid color-mix(in srgb, var(--text) 40%, transparent); }
.pmark.sq { border-radius: 6px; }
.popt.mine .pmark, .popt.good .pmark, .popt.bad .pmark { background: var(--acc); border-color: var(--acc); }
.pmedia { width: 42px; height: 42px; border-radius: 11px; object-fit: cover; flex: none; }
.pemoji { font-size: 1.5rem; line-height: 1; flex: none; }
.ptext { flex: 1; min-width: 0; font-size: .95rem; }
.popt.mine .ptext, .popt.winner .ptext { font-weight: 700; }
.ppct { font-size: .82rem; font-weight: 900; flex: none; }
.popt.winner .ppct { color: var(--p-gold); }
.padd { display: flex; align-items: center; gap: 8px; width: 100%; padding: 11px 12px; margin-bottom: 6px; border-radius: 15px; background: none; border: 1px solid color-mix(in srgb, var(--teal) 35%, transparent); color: var(--teal); font-weight: 700; font-size: .9rem; cursor: pointer; }
.pquiz { font-size: .84rem; font-weight: 900; margin: 2px 0 4px; }
.pquiz.good { color: var(--p-good); } .pquiz.bad { color: var(--p-bad); }
.pfoot { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding-top: 8px; border-top: 1px solid color-mix(in srgb, var(--text) 8%, transparent); }
.pfoot time { font-size: .66rem; opacity: .5; }
.pvoters { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 3px 2px; border-radius: 10px; font-size: .78rem; font-weight: 700; color: color-mix(in srgb, var(--text) 75%, transparent); cursor: pointer; }
.pvoters:disabled { cursor: default; }
.pend { background: none; border: 0; color: var(--p-bad); font-size: .78rem; font-weight: 900; cursor: pointer; padding: 3px 6px; border-radius: 8px; }
.pend:hover { background: color-mix(in srgb, var(--p-bad) 12%, transparent); }
.ptap { color: var(--teal); font-size: .78rem; font-weight: 700; }
.confetti { position: fixed; z-index: 50; pointer-events: none; }
.confetti i { position: absolute; left: 50%; top: 50%; width: 8px; height: 12px; border-radius: 2px; animation: conf 1.1s cubic-bezier(.1, .7, .3, 1) forwards; }
@keyframes conf { to { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; } }
/* the "new poll" sheet */
.seg { display: flex; padding: 4px; border-radius: 16px; background: var(--glass); border: 1px solid var(--stroke); }
.seg button { flex: 1; padding: 9px; border-radius: 12px; border: 0; background: none; cursor: pointer; font-weight: 700; color: var(--muted); }
.seg button.on { background: linear-gradient(135deg, var(--teal), var(--cyan)); color: #04221d; }
.prow { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.prow input { flex: 1; min-width: 0; background: var(--glass); border: 1px solid var(--stroke); border-radius: 14px; padding: 11px 14px; outline: none; }
.prow input:focus { border-color: var(--teal); }
.prow .pm { width: 44px; height: 44px; flex: none; border-radius: 13px; background: var(--glass); border: 1px dashed var(--stroke); cursor: pointer; display: grid; place-items: center; font-size: 1.3rem; color: var(--muted-2); }
.prow .pc { width: 30px; height: 30px; flex: none; border-radius: 50%; border: 1.5px solid var(--stroke); background: none; cursor: pointer; display: grid; place-items: center; color: transparent; }
.prow .pc.on { background: #22e58b; border-color: #22e58b; color: #07070b; }
.ppick { display: grid; grid-template-columns: repeat(auto-fill, 38px); gap: 2px; justify-content: center; padding: 8px; margin-bottom: 8px; border-radius: 16px; background: var(--glass); border: 1px solid var(--stroke); }
.ppick button { width: 38px; height: 38px; border: 0; background: none; border-radius: 10px; cursor: pointer; font-size: 1.3rem; display: grid; place-items: center; color: var(--muted); }
.ppick button:hover { background: var(--glass-2); }
.pswitch { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--stroke); cursor: pointer; font-weight: 500; }
.pswitch input { position: absolute; opacity: 0; pointer-events: none; }
.pswitch i { width: 44px; height: 26px; border-radius: 999px; background: color-mix(in srgb, var(--text) 18%, transparent); position: relative; flex: none; transition: background .2s; }
.pswitch i::after { content: ""; position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.pswitch input:checked + i { background: var(--teal); }
.pswitch input:checked + i::after { transform: translateX(-18px); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips button { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--stroke); background: var(--glass); cursor: pointer; font-weight: 500; }
.chips button.on { background: color-mix(in srgb, var(--teal) 18%, transparent); border-color: var(--teal); color: var(--teal); font-weight: 700; }

/* ───────── recording a voice note ───────── */
.rec-bar { display: flex; align-items: center; gap: 10px; padding: 5px 6px; margin-bottom: max(12px, env(safe-area-inset-bottom)); border-radius: 26px; background: var(--panel); border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent); }
.rec-bar b { font-variant-numeric: tabular-nums; direction: ltr; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: pLive .7s ease-in-out infinite alternate; flex: none; }
.rec-wave { flex: 1; height: 30px; display: flex; align-items: center; justify-content: flex-end; gap: 2px; overflow: hidden; direction: ltr; }
.rec-wave i { width: 3px; border-radius: 2px; background: var(--teal); flex: none; }
.rec-bar .send { width: 44px; height: 44px; }

/* ───────── uploading a picture / video ───────── */
.upload-bar { position: relative; overflow: hidden; display: flex; align-items: center; gap: 8px; margin-bottom: 6px; padding: 9px 14px; border-radius: 18px; background: var(--panel); border: 1px solid var(--stroke); font-size: .88rem; }
.upload-bar i { position: absolute; bottom: 0; right: 0; height: 3px; background: linear-gradient(to left, var(--teal), var(--cyan)); transition: width .2s; }
.drop-hint { position: absolute; inset: 76px 12px 12px; border: 2px dashed var(--teal); border-radius: 26px; display: grid; place-items: center; font-size: 1.2rem; font-weight: 700; color: var(--teal); background: color-mix(in srgb, var(--bg) 70%, transparent); z-index: 6; pointer-events: none; }

/* ───────── media in the chat list ───────── */
.pthumb { position: relative; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; overflow: hidden; vertical-align: -6px; margin-inline-end: 6px; background: var(--glass-2); }
.pthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pthumb.stk { background: none; } .pthumb.stk img { object-fit: contain; }
.pthumb.vid svg { position: absolute; color: #fff; filter: drop-shadow(0 0 2px #000); }
.pvoice { display: inline-grid; place-items: center; vertical-align: -3px; margin-inline-end: 4px; color: var(--teal); }
.pdur { font-size: .78rem; opacity: .75; }

/* ───────── a picture / video that is still uploading ───────── */
.video.up { cursor: default; }
.video.up img, .video.up video { filter: brightness(.55) blur(1px); object-fit: cover; }
.upring { position: relative; width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: conic-gradient(var(--teal) calc(var(--p) * 1%), rgba(255,255,255,.22) 0); transition: background .2s;
  -webkit-mask: radial-gradient(circle, #000 0 0); }
.upring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: rgba(0,0,0,.62); }
.upring b { position: relative; font-size: .86rem; direction: ltr; font-variant-numeric: tabular-nums; }
.upx { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; display: grid; place-items: center; }
.upx:hover { background: rgba(255,90,110,.85); }

/* the text box: no scrollbar track showing up as a stray line */
.composer textarea { scrollbar-width: none; overflow-y: auto; }
.composer textarea::-webkit-scrollbar { display: none; }
[data-motion="min"] *, [data-motion="min"] *::before, [data-motion="min"] *::after { animation: none !important; transition: none !important; }

/* ───────── media sheet (preview + edits + caption) ───────── */
.ms-preview { display: grid; place-items: center; border-radius: 18px; overflow: hidden; background: #000; min-height: 160px; }
.ms-preview canvas, .ms-preview video { max-width: 100%; max-height: 46vh; display: block; }
.ms-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ms-tools .chips { margin-inline-start: auto; }
.ms-tools .chips button, .ms-filters button { padding: 6px 12px; font-size: .86rem; }
.ms-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.ms-filters button { flex: none; }

/* ───────── settings ───────── */
.shead { display: flex; align-items: center; justify-content: space-between; }
.sprofile { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 22px; background: linear-gradient(135deg, color-mix(in srgb, var(--teal) 14%, transparent), color-mix(in srgb, var(--magenta) 12%, transparent)); border: 1px solid var(--stroke); flex-wrap: wrap; }
.sprofile .sphoto { position: relative; border: 0; background: none; padding: 0; cursor: pointer; }
.sprofile .sphoto .avatar { width: 76px; height: 76px; font-size: 1.8rem; box-shadow: 0 0 0 2px var(--teal); }
.scam { position: absolute; bottom: -2px; left: -2px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--teal); color: #04221d; border: 2px solid var(--bg); }
.sprofile input { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--stroke); padding: 4px 0; font-size: 1.15rem; font-weight: 700; outline: none; }
.sprofile input:focus { border-color: var(--teal); }
.sprofile small { display: block; color: var(--muted-2); font-size: .8rem; text-align: right; overflow: hidden; text-overflow: ellipsis; }
.btn.sm { width: auto; padding: 8px 16px; font-size: .88rem; flex: none; }
.slabel { font-size: .8rem; font-weight: 700; color: var(--teal); padding: 4px 6px 0; }
.scard { border-radius: 20px; background: var(--glass); border: 1px solid var(--stroke); overflow: hidden; }
.srow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; background: none; border: 0; text-align: right; }
button.srow { cursor: pointer; }
button.srow:hover { background: var(--glass-2); }
.srow + .srow { border-top: 1px solid color-mix(in srgb, var(--stroke) 60%, transparent); }
.srow .mi { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); }
.srow b { display: block; font-weight: 500; }
.srow small { display: block; color: var(--muted-2); font-size: .78rem; line-height: 1.35; }
.srow > svg { color: var(--muted-2); flex: none; }
.seg.sm { padding: 3px; border-radius: 13px; flex: none; }
.seg.sm button { padding: 6px 11px; font-size: .82rem; border-radius: 10px; white-space: nowrap; }
.sswitch { position: relative; flex: none; cursor: pointer; }
.sswitch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.sswitch i { display: block; width: 46px; height: 27px; border-radius: 999px; background: color-mix(in srgb, var(--text) 18%, transparent); position: relative; transition: background .2s; }
.sswitch i::after { content: ""; position: absolute; top: 3px; right: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.sswitch input:checked + i { background: var(--teal); }
.sswitch input:checked + i::after { transform: translateX(-19px); }
.sradio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--muted-2); flex: none; display: grid; place-items: center; }
.sradio.on { border-color: var(--teal); }
.sradio.on::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--teal); }
.stars { display: flex; justify-content: center; gap: 6px; direction: ltr; }
.stars button { background: none; border: 0; cursor: pointer; color: color-mix(in srgb, var(--text) 22%, transparent); padding: 0; }
.stars button.on { color: var(--gold); }

/* ───────── sign-in: Google · Telegram · email · QR ───────── */
.au-btn { width: 100%; justify-content: center; gap: 10px; }
.au-btn svg { width: 20px; height: 20px; flex: none; }
.au-btn:disabled { opacity: .55; pointer-events: none; }
.au-tg { background: #2aabee; color: #fff; text-decoration: none; }
.au-tg:hover { background: #1f9bdb; }
.au-or { width: 100%; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; }
.au-or::before, .au-or::after { content: ""; flex: 1; height: 1px; background: var(--stroke); }
.au-terms { font-size: .8rem !important; line-height: 1.6; }
.au-note { color: var(--teal) !important; font-size: .92rem; }
.au-link { background: none; border: 0; cursor: pointer; padding: 2px 6px; }
.au-link:disabled { opacity: .5; cursor: default; }
.au-title { font-size: 1.45rem !important; }
.au-big { font-size: 2.6rem; line-height: 1; }
.au-form { width: 100%; display: grid; gap: 12px; }
.au-seg { width: 100%; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 16px; background: var(--glass); border: 1px solid var(--stroke); }
.au-seg button { border: 0; background: none; padding: 9px; border-radius: 12px; cursor: pointer; color: var(--muted); font-weight: 600; }
.au-seg button.on { background: var(--panel); color: var(--text); box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.au-meter { width: 100%; height: 4px; border-radius: 4px; background: var(--stroke); overflow: hidden; }
.au-meter i { display: block; height: 100%; width: 0; background: var(--danger); transition: width .25s, background .25s; }
.au-meter i[data-p="2"] { background: #f59e0b; } .au-meter i[data-p="3"] { background: var(--cyan); } .au-meter i[data-p="4"] { background: var(--teal); }
.au-rules { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; text-align: right; font-size: .82rem; color: var(--muted); }
.au-rules li::before { content: "○ "; }
.au-rules li.ok { color: var(--teal); } .au-rules li.ok::before { content: "✓ "; }
.au-code { width: 100%; text-align: center; font-size: 1.9rem; letter-spacing: .45em; font-variant-numeric: tabular-nums; background: var(--glass); border: 1px solid var(--stroke); border-radius: 16px; padding: 12px 8px 12px 0; outline: none; }
.au-code:focus { border-color: var(--teal); }
.au-number { font-size: 3.4rem; font-weight: 800; letter-spacing: .08em; line-height: 1; padding: 14px 30px; border-radius: 22px; background: var(--glass); border: 1px solid var(--stroke); color: var(--teal); font-variant-numeric: tabular-nums; }
.au-qr { width: 216px; height: 216px; padding: 14px; border-radius: 22px; background: #fff; display: grid; place-items: center; color: #333; font-size: .85rem; }
.au-qr.small { width: 132px; height: 132px; padding: 9px; border-radius: 16px; }
.au-qr svg { width: 100%; height: 100%; display: block; }
.au-qr.off { opacity: .18; filter: blur(2px); }
/* the code arrives: it lands with a little spin, its squares come into focus, a line of light keeps sweeping it */
.au-qr { position: relative; overflow: hidden; animation: qrIn .7s cubic-bezier(.2,.9,.25,1.15) both, qrGlow 2.6s ease-in-out .7s infinite; }
.au-qr svg { animation: qrDraw .8s ease .12s both; }
.au-qr:not(.off):not(:empty)::after { content: ""; position: absolute; left: 7%; right: 7%; top: 8%; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--teal), var(--cyan), transparent); box-shadow: 0 0 14px var(--teal); animation: qrSweep 2.3s ease-in-out .8s infinite alternate both; }
@keyframes qrIn { from { opacity: 0; transform: scale(.55) rotate(-10deg); } }
@keyframes qrDraw { from { opacity: 0; filter: blur(7px); transform: scale(.9); } }
@keyframes qrSweep { from { top: 8%; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } to { top: 90%; opacity: 0; } }
@keyframes qrGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(45,212,191,0); } 50% { box-shadow: 0 0 0 7px rgba(45,212,191,.22), 0 0 34px rgba(45,212,191,.28); } }
/* approved: the code spins and becomes a round green tick that covers the screen - then lifts off the chats (app.js: qrWinStart) */
.qr-win { position: fixed; inset: 0; z-index: 99999; overflow: hidden; perspective: 1100px; clip-path: circle(150% at 50% 50%);
  transition: clip-path .7s cubic-bezier(.7,0,.25,1), opacity .3s ease .45s; }
.qr-win.out { clip-path: circle(0% at 50% 50%); opacity: 0; pointer-events: none; }
.qr-win-fill, .qr-win-coin { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2); }
.qr-win-fill { border-radius: 50%; background: radial-gradient(circle at 38% 32%, #4ade80, #16a34a 55%, #0f8a45); transform: scale(0);
  animation: qrFill .75s cubic-bezier(.6,0,.2,1) .95s forwards; }
.qr-win-coin { transform-style: preserve-3d; animation: qrSpin 1s cubic-bezier(.45,0,.2,1) forwards, qrCenter .75s cubic-bezier(.6,0,.2,1) .95s forwards; }
.qr-win-face { position: absolute; inset: 0; display: grid; place-items: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.qr-win-face.front { background: #fff; border-radius: 22px; padding: 14px; animation: qrRound 1s ease forwards; }
.qr-win-face.front svg { width: 100%; height: 100%; display: block; }
.qr-win-face.back { transform: rotateY(180deg); border-radius: 50%; background: #fff; box-shadow: 0 0 0 12px rgba(255,255,255,.22), 0 24px 70px rgba(0,0,0,.28); }
/* (transform: none - the "back" class also belongs to the back-arrow buttons, whose rule mirrors every svg inside: the tick came out flipped) */
.qr-win-face.back svg { transform: none; width: 60%; fill: none; stroke: #16a34a; stroke-width: 5.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 48; stroke-dashoffset: 48; animation: qrTick .45s ease-out 1.1s forwards; }
.qr-win-text { position: absolute; left: 0; right: 0; top: calc(50% + 122px); margin: 0; text-align: center; color: #fff; font-size: 1.6rem; font-weight: 800; opacity: 0; animation: qrText .45s ease 1.55s forwards; }
@keyframes qrSpin { 0% { transform: rotateY(0) scale(1); } 45% { transform: rotateY(250deg) scale(.8); } 100% { transform: rotateY(540deg) scale(.8); } }
@keyframes qrRound { to { border-radius: 50%; } }
@keyframes qrCenter { to { translate: var(--dx) var(--dy); } }
@keyframes qrFill { to { transform: scale(var(--cover)); } }
@keyframes qrTick { to { stroke-dashoffset: 0; } }
@keyframes qrText { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.qr-win.calm * { animation-duration: .01s !important; animation-delay: 0s !important; }
@media (prefers-reduced-motion: reduce) { .au-qr, .au-qr svg, .au-qr::after { animation: none !important; } }
.au-steps { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 8px; text-align: right; font-size: .92rem; counter-reset: st; }
.au-steps li { display: flex; align-items: center; gap: 10px; color: var(--muted); counter-increment: st; }
.au-steps li i { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--stroke); display: grid; place-items: center; font-style: normal; font-size: .75rem; }
.au-steps li i::before { content: counter(st); }
.au-steps li.done { color: var(--text); } .au-steps li.done i { background: var(--teal); border-color: var(--teal); color: #04121a; } .au-steps li.done i::before { content: "✓"; }
.au-locked { width: 100%; display: grid; gap: 6px; padding: 14px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent); background: color-mix(in srgb, var(--danger) 10%, transparent); font-size: .9rem; }
.au-locked span { color: var(--muted); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }

/* a link to join a group (askJoin) */
.join-pic { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; display: block; margin: 0 auto; box-shadow: 0 0 0 3px rgba(31,216,255,.35); }
.join-ph { display: grid; place-items: center; background: linear-gradient(135deg, #22d3c5, #7c4dff); color: #fff; }

.join-about { margin: 12px 0 4px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(135deg, rgba(34,211,197,.10), rgba(124,77,255,.10)); border: 1px solid rgba(34,211,197,.35); text-align: start; }
.join-about b { display: block; color: #22d3c5; font-size: .8rem; margin-bottom: 6px; }
.join-about p { margin: 0; line-height: 1.65; white-space: pre-line; word-break: break-word; unicode-bidi: plaintext; max-height: 200px; overflow: auto; }

