/* Copyright (C) 2026 Orby Platforms, Inc. All rights reserved.
   Orby Messenger 2: the sky and the glossy orbs of the classic messenger, made for
   a phone of today. Glass on the bars, clear surfaces for what people say. */

:root {
  --base: 17px;
  --ts: 1;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", Roboto, sans-serif;
  --accent: #1a6ff0;
  --accent-2: #3d8bff;
  --accent-ink: #ffffff;
  --accent-soft: rgba(26, 111, 240, .12);
  --orange: #ff8a1f;
  --green: #2fc152;
  --red: #ff3b30;
  --amber: #ff9f0a;
  --grey: #a3acb9;
  --bg: #f2f5fa;
  --bg-2: #ffffff;
  --bg-3: #e9eef5;
  --glass: rgba(248, 251, 255, .78);
  --glass-strong: rgba(250, 252, 255, .92);
  --glass-line: rgba(255, 255, 255, .7);
  --line: rgba(17, 35, 64, .09);
  --row-line: rgba(17, 35, 64, .14);
  --line-2: rgba(17, 35, 64, .14);
  --text: #0c1a2d;
  --text-2: #56667c;
  --text-3: #6b7686;
  --fill: rgba(118, 132, 156, .14);
  --fill-2: rgba(118, 132, 156, .22);
  --shadow: 0 10px 30px rgba(18, 40, 80, .12), 0 2px 8px rgba(18, 40, 80, .08);
  --shadow-lg: 0 24px 64px rgba(10, 30, 70, .22), 0 6px 18px rgba(10, 30, 70, .12);
  --chat-bg: radial-gradient(1200px 600px at 100% -10%, rgba(109, 177, 255, .22), transparent 60%), radial-gradient(900px 600px at -10% 110%, rgba(255, 172, 92, .12), transparent 60%), linear-gradient(180deg, #eef5ff 0%, #f5f8fc 100%);
  --me-1: #3e8dff;
  --me-2: #1966ea;
  --me-ink: #ffffff;
  --me-ink-2: rgba(255, 255, 255, .78);
  --them: #ffffff;
  --them-ink: #0c1a2d;
  --them-ink-2: #7b8899;
  --seen: #a5f1ff;
  --radius: 20px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  /* Below the message field: down into the home bar's area, as WhatsApp and Messages do. */
  --comp-b: max(8px, calc(var(--safe-b) - 6px));
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --kb: 0px;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --spring: cubic-bezier(.2, 1.25, .35, 1);
  --tabbar: 60px;
  /* The tabs float above the bottom of the screen (and above the home bar of an iPhone). */
  --tab-lift: max(16px, calc(var(--safe-b) - 2px));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --dark: 1; } }
:root[data-theme="dark"], :root.is-dark {
  --accent: #3d8bff;
  --accent-2: #65a5ff;
  --accent-soft: rgba(61, 139, 255, .18);
  --bg: #070b12;
  --bg-2: #111823;
  --bg-3: #19212e;
  --glass: rgba(14, 20, 30, .74);
  --glass-strong: rgba(16, 22, 33, .92);
  --glass-line: rgba(255, 255, 255, .07);
  --line: rgba(220, 232, 255, .08);
  --row-line: rgba(220, 232, 255, .12);
  --line-2: rgba(220, 232, 255, .13);
  --text: #eef3fb;
  --text-2: #a3b0c3;
  --text-3: #6f7d92;
  --fill: rgba(150, 165, 190, .14);
  --fill-2: rgba(150, 165, 190, .22);
  --shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .3);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, .6), 0 6px 18px rgba(0, 0, 0, .35);
  --chat-bg: radial-gradient(1100px 600px at 100% -10%, rgba(40, 110, 255, .2), transparent 60%), radial-gradient(900px 600px at -10% 110%, rgba(255, 130, 40, .08), transparent 60%), linear-gradient(180deg, #08101c 0%, #070b12 100%);
  --me-1: #3685ff;
  --me-2: #1658d6;
  --them: #1d2637;
  --them-ink: #eef3fb;
  --them-ink-2: #8492a6;
  --seen: #8ce9ff;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--font); font-size: calc(var(--base) * var(--ts));
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; -webkit-text-size-adjust: 100%; overscroll-behavior: none; }
body { position: fixed; inset: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; touch-action: manipulation; }
input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
img, video, canvas, svg { display: block; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 24px; height: 24px; flex: none; }
.icon.sm { width: 18px; height: 18px; }
.icon.lg { width: 28px; height: 28px; }
::selection { background: var(--accent-soft); }

/* ---------- the frame of the app ---------- */
#app { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr; overflow: hidden; }
.pane-list, .pane-chat { position: absolute; inset: 0; overflow: hidden; background: var(--bg); }
.pane-chat { transform: translate3d(100%, 0, 0); transition: transform .42s var(--ease), visibility 0s linear .42s; z-index: 20; visibility: hidden; will-change: transform; }
.pane-chat.open { transform: none; visibility: visible; transition: transform .42s var(--ease), visibility 0s; box-shadow: -12px 0 40px rgba(0, 0, 0, .12); }
.pane-chat.drag { transition: none; }
.pane-list { transition: transform .42s var(--ease), filter .42s var(--ease); }
body.in-chat .pane-list { transform: translate3d(-28%, 0, 0); filter: brightness(.94); }
[dir="rtl"] .pane-chat { transform: translate3d(-100%, 0, 0); }
[dir="rtl"] .pane-chat.open { transform: none; }
[dir="rtl"] body.in-chat .pane-list { transform: translate3d(28%, 0, 0); }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; }
.empty-chat { display: none; }

@media (min-width: 768px) {
  :root { --base: 15px; }
  #app { grid-template-columns: minmax(330px, 400px) 1fr; }
  .pane-list { position: relative; inset: auto; border-inline-end: 1px solid var(--line); transform: none !important; filter: none !important; }
  .pane-chat { position: relative; inset: auto; transform: none !important; box-shadow: none !important; transition: none; visibility: visible; }
  .empty-chat { display: flex; position: absolute; inset: 0; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: var(--chat-bg); color: var(--text-2); text-align: center; padding: 30px; }
  .empty-chat b { font-size: 1.45rem; color: var(--text); font-weight: 700; letter-spacing: -.01em; }
  .empty-chat span { max-width: 380px; line-height: 1.5; }
  .pane-chat.open .empty-chat { display: none; }
  .back-btn { display: none !important; }
}

/* ---------- headers: large titles that shrink, on glass ---------- */
.bar { position: relative; z-index: 5; flex: none; padding: calc(var(--safe-t) + 6px) calc(12px + var(--safe-r)) 8px calc(12px + var(--safe-l)); background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px); border-bottom: .5px solid var(--line); }
.bar.clear { background: transparent; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.bar-row { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.bar-title { flex: 1; min-width: 0; text-align: center; font-weight: 650; font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .2s; }
.bar.scrolled .bar-title { opacity: 1; }
.big-title { margin: 2px 4px 8px; font-family: var(--font-round); font-weight: 760; font-size: 2.05rem; letter-spacing: -.025em; line-height: 1.1; transition: opacity .2s, transform .2s; }
.bar.scrolled .big-title { opacity: 0; }
.hbtn { min-width: 40px; height: 40px; border-radius: 20px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--accent); font-weight: 560; padding: 0 8px; position: relative; flex: none; }
.hbtn:active { background: var(--fill); }
.hbtn.round { color: var(--accent); width: 40px; min-width: 40px; height: 40px; padding: 0; border-radius: 50%; transition: transform .18s var(--spring), background .15s; }
.hbtn.round:active { transform: scale(.88); }
.hbtn.round:disabled { color: var(--text-3); opacity: .55; }
.hbtn.round .icon { width: 25px; height: 25px; }
.hbtn .badge { position: absolute; top: 2px; inset-inline-end: 0; }
.spacer { flex: 1; }

/* ---------- search ---------- */
.search { position: relative; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 12px; background: var(--fill); color: var(--text-3); margin: 0 2px; }
.search input { flex: 1; min-width: 0; border: 0; background: none; height: 100%; font-size: 1rem; color: var(--text); padding: 0; }
.search input::placeholder { color: var(--text-3); }
.search .x { width: 22px; height: 22px; border-radius: 11px; background: var(--fill-2); color: var(--text-2); display: grid; place-items: center; }
.chips { display: flex; gap: 8px; margin: 10px 2px 2px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 32px; padding: 0 13px; border-radius: 16px; background: var(--fill); color: var(--text-2); font-size: .88rem; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--accent); color: #fff; }
.chip .n { font-size: .78rem; opacity: .85; }

/* ---------- scrolling content ---------- */
.scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; scrollbar-width: thin; scrollbar-color: var(--fill-2) transparent; }
.scroll::-webkit-scrollbar { width: 8px; }
.scroll::-webkit-scrollbar-thumb { background: var(--fill-2); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
.tab-content { padding-bottom: calc(var(--tabbar) + var(--tab-lift) + 16px); }

/* ---------- tab bar ---------- */
/* A floating bar with round ends, a little above the bottom of the screen; the list shows under it. */
.tabbar { position: absolute; left: calc(14px + var(--safe-l)); right: calc(14px + var(--safe-r)); bottom: var(--tab-lift); z-index: 10; height: var(--tabbar); display: flex; align-items: center; justify-content: space-around; padding: 0 6px; border-radius: calc(var(--tabbar) / 2); }
.tab { flex: 1; max-width: 140px; height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--text-3); font-size: .66rem; font-weight: 600; letter-spacing: .01em; position: relative; border-radius: 14px; transition: color .2s; }
.tab .icon { width: 26px; height: 26px; transition: transform .25s var(--spring); }
.tab.on { color: var(--accent); }
.tab.on .icon { transform: scale(1.06); }
.tab:active .icon { transform: scale(.9); }
.tab .badge { position: absolute; top: 2px; inset-inline-start: calc(50% + 6px); }
/* My status on the tab "You": the orb at the foot of its icon. */
.tab .tab-st { position: absolute; top: 19px; inset-inline-start: calc(50% + 4px); width: 11px; height: 11px; border-radius: 50%; pointer-events: none;
  background: var(--oc, var(--grey)); box-shadow: 0 0 0 2px var(--bg-2); }
.act.has-dot, .menu-pop button.has-dot { gap: 10px; }
.act .orb-dot, .menu-pop .orb-dot { width: 12px; height: 12px; }
.act .act-on, .menu-pop .act-on { display: inline-flex; color: var(--accent); margin-inline-start: 4px; }
.act .act-on .icon, .menu-pop .act-on .icon { width: 18px; height: 18px; color: var(--accent); }
/* Choosing conversations: the actions take the place of the tabs. */
.sel-bar { position: absolute; left: calc(14px + var(--safe-l)); right: calc(14px + var(--safe-r)); bottom: var(--tab-lift); z-index: 11; height: var(--tabbar); display: flex; align-items: center; justify-content: space-around; padding: 0 6px; border-radius: calc(var(--tabbar) / 2); animation: up .22s var(--ease); }
.sel-bar button { flex: 1; max-width: 160px; height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--accent); font-size: .7rem; font-weight: 650; border-radius: 14px; }
.sel-bar button.red { color: var(--red); }
.sel-bar button .icon { width: 24px; height: 24px; }
.sel-bar button:disabled { opacity: .38; }
.sel-bar button:active:not(:disabled) .icon { transform: scale(.9); }
.pane-list.picking .tabbar { visibility: hidden; }
/* ---------- liquid glass (glass.js): only the round background of the floating bars ----------
   A slab of smoked glass with a rounded bevel: clear (little frost), a little dark so the icons and
   the words on it are strong white, light along the top of the bevel, shade along the bottom, and
   the slab standing off the page with its shadow. */
.lg { --lg-tint: rgba(14, 18, 28, .5);
  background: var(--lg-tint); -webkit-backdrop-filter: blur(12px) saturate(160%) brightness(.8); backdrop-filter: blur(12px) saturate(160%) brightness(.8);
  box-shadow: 0 14px 34px rgba(8, 14, 28, .3), 0 4px 10px rgba(8, 14, 28, .2), 0 0 0 .5px rgba(0, 0, 0, .28),
    inset 0 1px .5px rgba(255, 255, 255, .5), inset 0 -1px .5px rgba(255, 255, 255, .14),
    inset 0 7px 12px -8px rgba(255, 255, 255, .28), inset 0 -8px 12px -8px rgba(0, 0, 0, .45),
    inset 0 0 0 1px rgba(255, 255, 255, .07), inset 0 0 10px 1px rgba(255, 255, 255, .06); }
.lg > * { position: relative; }
/* The edge of the bevel: a thin line of light, brightest where it faces up and to the light, with a
   touch of red on one side and blue on the other where it splits the light. */
.lg::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; padding: 1.25px;
  background: linear-gradient(165deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, .22) 28%, rgba(255, 255, 255, .04) 52%, rgba(255, 255, 255, .1) 72%, rgba(255, 255, 255, .42)),
    linear-gradient(90deg, rgba(255, 80, 130, .5), rgba(255, 80, 130, 0) 12%, rgba(80, 170, 255, 0) 88%, rgba(80, 170, 255, .55));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
:root.is-dark .lg { --lg-tint: rgba(8, 10, 18, .55); }
/* Chromium bends what is behind through the lens of the bevel: a clearer glass, so the bend shows. */
.glass-svg .lg { --lg-tint: rgba(12, 16, 26, .3); -webkit-backdrop-filter: var(--lg-lens, blur(0)) blur(1px) saturate(150%) brightness(.76); backdrop-filter: var(--lg-lens, blur(0)) blur(1px) saturate(150%) brightness(.76); }
:root.is-dark.glass-svg .lg { --lg-tint: rgba(8, 10, 18, .34); -webkit-backdrop-filter: var(--lg-lens, blur(0)) blur(1px) saturate(150%) brightness(.9); backdrop-filter: var(--lg-lens, blur(0)) blur(1px) saturate(150%) brightness(.9); }
/* The iPhone's own glass goes under the bar (the app puts it there): until it is there, a solid bar.
   The backdrop stays the same all along, so the layer the glass lives in is never made anew. */
.glass-ios .lg { --lg-tint: rgba(20, 24, 34, .9); -webkit-backdrop-filter: saturate(105%); backdrop-filter: saturate(105%); transition: background-color .3s; }
.glass-ios.glass-on .lg { --lg-tint: rgba(10, 14, 22, .34); }
:root.is-dark.glass-ios.glass-on .lg { --lg-tint: rgba(6, 8, 14, .4); }
/* On the glass: strong white, with a little shadow so it reads over anything. */
.lg .tab, .lg button { color: rgba(255, 255, 255, .8); text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.lg .tab .icon, .lg button .icon { filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .3)); }
.lg .tab.on { color: #fff; background: rgba(255, 255, 255, .14); border-radius: 24px; box-shadow: inset 0 .5px 0 rgba(255, 255, 255, .35), inset 0 -.5px 0 rgba(255, 255, 255, .08); }
.lg .tab.on .icon { transform: none; }
.lg button.red { color: #ff8f8f; }
.lg .badge, .lg .tab-st { box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .22); text-shadow: none; }
/* On a computer (the apps for Mac, Windows and Linux, or a wide window: glass.js sets lg-flat) the
   tabs are a plain bar along the foot of the list, as before: the floating glass is for phones. */
.lg-flat .tabbar, .lg-flat .sel-bar { left: 0; right: 0; bottom: 0; height: auto; border-radius: 0; padding: 4px calc(10px + var(--safe-r)) max(6px, calc(var(--safe-b) - 13px)) calc(10px + var(--safe-l)); }
.lg-flat .tab-content { padding-bottom: calc(56px + var(--safe-b) + 12px); }
.lg-flat .lg, .lg-flat.glass-svg .lg, :root.is-dark.lg-flat .lg, :root.is-dark.lg-flat.glass-svg .lg { --lg-tint: var(--glass-strong); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); box-shadow: none; border-top: .5px solid var(--line); }
.lg-flat .lg::before { display: none; }
.lg-flat .lg .tab, .lg-flat .lg button { color: var(--text-3); text-shadow: none; }
.lg-flat .lg .tab .icon, .lg-flat .lg button .icon { filter: none; }
.lg-flat .lg .tab.on { color: var(--accent); background: none; box-shadow: none; border-radius: 14px; }
.lg-flat .lg .tab.on .icon { transform: scale(1.06); }
.lg-flat .sel-bar button { color: var(--accent); }
.lg-flat .sel-bar button.red { color: var(--red); }
.lg-flat .lg .badge, .lg-flat .lg .tab-st { box-shadow: 0 0 0 2px var(--bg-2); }
@media (prefers-reduced-transparency: reduce) {
  .lg, .glass-svg .lg, :root.is-dark.glass-svg .lg { --lg-tint: #1c2230; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

.bar.picking .bar-title { opacity: 1; }
.row.picking .row-main::after { inset-inline-start: calc(116px + var(--safe-l)); }
.row.picking.checked { background: var(--accent-soft); }
.chip .icon { width: 15px; height: 15px; }
@media (min-width: 768px) { .sel-bar { padding-bottom: 6px; } }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: .72rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 2px var(--bg-2); }
.badge.blue { background: var(--accent); }
.badge.mute { background: var(--grey); }
.badge.dot { min-width: 12px; width: 12px; height: 12px; padding: 0; }

/* ---------- avatars and presence orbs ---------- */
.av { --s: 52px; position: relative; width: var(--s); height: var(--s); flex: none; border-radius: 50%; }
.av-in { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: linear-gradient(160deg, #e6f2ff, #b7d6fa); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: calc(var(--s) * .4); font-family: var(--font-round); }
.av-in img, .av-in svg { width: 100%; height: 100%; object-fit: cover; }
.av-in.letters { background: linear-gradient(155deg, var(--c1, #5aa6ff), var(--c2, #2a62e0)); text-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.av-in.is-group { background: linear-gradient(155deg, #ffb45a, #ff7a1a); }
.av-in.is-event { background: linear-gradient(155deg, #ff6b8b, #e2335a); }
.av .orb { position: absolute; inset-inline-end: -1px; bottom: -1px; width: calc(var(--s) * .3); height: calc(var(--s) * .3); min-width: 13px; min-height: 13px; border-radius: 50%; border: 2.5px solid var(--bg-2);
  background: var(--oc, var(--grey)); }
.st-online { --oc: var(--green); } .st-busy, .st-phone { --oc: var(--red); } .st-away, .st-brb, .st-lunch { --oc: var(--amber); } .st-offline, .st-invisible { --oc: var(--grey); }
.av.ring { isolation: isolate; }
.av.ring::before { content: ""; position: absolute; inset: -3px; border-radius: 50%; background: conic-gradient(from 200deg, var(--oc), color-mix(in srgb, var(--oc) 40%, transparent), var(--oc)); z-index: -1; opacity: .9; }
.av.ring .av-in { box-shadow: 0 0 0 2.5px var(--bg-2); }
.orb-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--oc, var(--grey)); flex: none; }

/* ---------- lists of conversations and people ---------- */
.rows { padding: 2px 0; }
.row { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px calc(14px + var(--safe-r)) 9px calc(14px + var(--safe-l)); min-height: 72px; background: var(--bg); cursor: pointer; user-select: none; -webkit-user-select: none; contain: layout paint; }
.row:active, .row.pressed { background: var(--fill); }
.row.sel { background: var(--accent-soft); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row-main::after { content: ""; position: absolute; inset-inline-start: calc(78px + var(--safe-l)); inset-inline-end: 0; bottom: 0; height: .5px; background: var(--row-line); }
.row:last-child .row-main::after { display: none; }
.row-top, .row-bot { display: flex; align-items: center; gap: 8px; min-width: 0; }
.row-name { flex: 1; min-width: 0; font-weight: 650; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.005em; }
.row-time { flex: none; font-size: .8rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.row.unread .row-time { color: var(--accent); font-weight: 600; }
.row-text { flex: 1; min-width: 0; color: var(--text-2); font-size: .92rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.row-text .who { color: var(--text); font-weight: 550; }
.row-text .typing { color: var(--accent); font-style: normal; font-weight: 550; }
.row-text .draft { color: var(--red); font-weight: 600; }
.row-text .mi { display: inline-flex; vertical-align: -3px; margin-inline-end: 3px; }
.row-text .mi .icon { width: 17px; height: 17px; }
.emo-img { display: inline; vertical-align: -.22em; }
.mv-cap .emo-img { width: 1.35em; height: 1.35em; margin: 0 .05em; }
.row-text .emo-img { display: inline; width: 1.15em; height: 1.15em; vertical-align: -.2em; }
.row-flags { display: flex; align-items: center; gap: 6px; flex: none; color: var(--text-3); }
.row-flags .icon { width: 17px; height: 17px; }
.ticks { display: inline-flex; vertical-align: -2px; margin-inline-end: 2px; color: var(--text-3); }
.ticks.seen { color: var(--accent); }
.ticks.fail { color: var(--red); }
.ticks svg { width: 17px; height: 17px; }
.row-psm { color: var(--text-2); font-size: .86rem; font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-psm .emo-img { display: inline; width: 1.1em; height: 1.1em; vertical-align: -.2em; }
.row.person { min-height: 62px; }
.row.person .av { --s: 44px; }
.row.person .row-main::after { inset-inline-start: calc(70px + var(--safe-l)); }
.row.off .row-name { color: var(--text-2); font-weight: 560; }
.row.off .av-in { filter: saturate(.55); opacity: .85; }
.sec-h { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 14px calc(18px + var(--safe-r)) 6px calc(18px + var(--safe-l)); font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); background: linear-gradient(var(--bg) 70%, transparent); }
.sec-h .n { font-weight: 600; }
.action-row { display: flex; align-items: center; gap: 14px; padding: 11px calc(16px + var(--safe-r)) 11px calc(16px + var(--safe-l)); color: var(--accent); font-weight: 600; cursor: pointer; }
.action-row:active { background: var(--fill); }
.action-row .ar-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.action-row .ar-ic.orange { background: rgba(255, 138, 31, .14); color: var(--orange); }
.action-row .ar-ic.green { background: rgba(47, 193, 82, .14); color: var(--green); }
.action-row span small { display: block; color: var(--text-3); font-weight: 500; font-size: .82rem; margin-top: 1px; }
.list-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 48px 28px 20px; color: var(--text-2); line-height: 1.5; }
.list-empty b { color: var(--text); font-size: 1.2rem; letter-spacing: -.01em; }
.hero-orbs { width: 120px; height: 120px; position: relative; }
.hero-orbs .o1, .hero-orbs .o2 { position: absolute; border-radius: 50%; }
.hero-orbs .o1 { width: 76px; height: 76px; left: 12px; top: 34px; background: radial-gradient(circle at 36% 30%, #d6f6ff 0, #45c2f2 32%, #0a6fc4 78%, #064a92 100%); box-shadow: 0 12px 30px rgba(10, 111, 196, .35); }
.hero-orbs .o2 { width: 38px; height: 38px; left: 74px; top: 10px; background: radial-gradient(circle at 35% 30%, #fff3c4 0, #ffb23a 38%, #ef6a0c 84%, #b94a05 100%); box-shadow: 0 8px 20px rgba(239, 106, 12, .35); animation: orbit 7s linear infinite; transform-origin: -12px 43px; }
@keyframes orbit { to { transform: rotate(360deg); } }
.card-tip { margin: 12px calc(14px + var(--safe-r)) 6px calc(14px + var(--safe-l)); padding: 14px 14px 14px 16px; border-radius: 18px; background: var(--bg-2); box-shadow: 0 1px 0 var(--line), 0 6px 20px rgba(20, 50, 100, .06); display: flex; gap: 14px; align-items: center; }
.card-tip .ct-ic { width: 46px; height: 46px; border-radius: 14px; flex: none; display: grid; place-items: center; background: linear-gradient(150deg, var(--accent-2), var(--accent)); color: #fff; }
.card-tip .ct-t { flex: 1; min-width: 0; line-height: 1.35; }
.card-tip b { display: block; font-size: .98rem; }
.card-tip span { color: var(--text-2); font-size: .88rem; }
.card-tip .x { width: 28px; height: 28px; border-radius: 14px; color: var(--text-3); display: grid; place-items: center; align-self: flex-start; }

/* swipe actions on rows */
.swipe-wrap { position: relative; overflow: hidden; }
.swipe-acts { position: absolute; inset: 0; display: flex; justify-content: flex-end; }
.swipe-acts.left { justify-content: flex-start; }
.swipe-acts button { width: 78px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #fff; font-size: .72rem; font-weight: 600; }
.swipe-acts .a-pin { background: #ff9f0a; } .swipe-acts .a-mute { background: #8e8e93; } .swipe-acts .a-arch { background: #4f79d6; } .swipe-acts .a-read { background: var(--accent); } .swipe-acts .a-del { background: var(--red); }
.swipe-wrap .row { transition: transform .3s var(--ease); }
.swipe-wrap.dragging .row { transition: none; }

/* ---------- the conversation ---------- */
.chat { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--wall-bg, var(--chat-bg)); isolation: isolate; }
/* The background of a conversation: a vector tile used as a mask, coloured for light and dark. */
.chat::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: var(--wall-ink); -webkit-mask: var(--wall-img) 0 0 / 400px 560px repeat; mask: var(--wall-img) 0 0 / 400px 560px repeat; }
:root, :root[data-wall="stars"] { --wall-img: url(wall-stars.svg); --wall-bg: #f4f3fb; --wall-ink: rgba(112, 108, 170, .40); }
:root[data-wall="orbits"] { --wall-img: url(wall-orbits.svg); --wall-bg: #f2f5fa; --wall-ink: rgba(112, 128, 160, .40); }
:root[data-wall="planets"] { --wall-img: url(wall-planets.svg); --wall-bg: #edf4fd; --wall-ink: rgba(104, 146, 206, .46); }
:root.is-dark, :root.is-dark[data-wall="stars"] { --wall-bg: #121527; --wall-ink: rgba(138, 140, 214, .55); }
:root.is-dark[data-wall="orbits"] { --wall-bg: #13161d; --wall-ink: rgba(150, 160, 186, .42); }
:root.is-dark[data-wall="planets"] { --wall-bg: #0a1626; --wall-ink: rgba(98, 140, 198, .55); }
.wall-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 12px 14px 14px; }
.wall-pick button { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: .8rem; font-weight: 600; color: var(--text-2); }
.wall-pick .wp { position: relative; width: 100%; aspect-ratio: 9 / 15; border-radius: 16px; overflow: hidden; isolation: isolate; background: var(--wb); box-shadow: 0 0 0 1px var(--line), 0 4px 14px rgba(0, 0, 0, .08); transition: transform .2s var(--spring), box-shadow .2s; }
.wall-pick .wp::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--wi); -webkit-mask: var(--wm) 0 0 / 200px 280px repeat; mask: var(--wm) 0 0 / 200px 280px repeat; }
.wall-pick .wp i { position: absolute; height: 12px; border-radius: 7px; }
.wall-pick .wp i.a { left: 10%; top: 30%; width: 52%; background: var(--them); box-shadow: 0 1px 1px rgba(0, 0, 0, .08); }
.wall-pick .wp i.b { right: 10%; top: 44%; width: 46%; background: linear-gradient(180deg, var(--me-1), var(--me-2)); }
.wall-pick .wp i.c { left: 10%; top: 58%; width: 36%; background: var(--them); box-shadow: 0 1px 1px rgba(0, 0, 0, .08); }
.wall-pick button[aria-checked="true"] { color: var(--accent); }
.wall-pick button[aria-checked="true"] .wp { box-shadow: 0 0 0 2.5px var(--accent), 0 6px 18px rgba(26, 111, 240, .25); transform: scale(1.02); }
.wall-pick button:active .wp { transform: scale(.96); }
.wall-pick .wp[data-w="stars"] { --wm: url(wall-stars.svg); --wb: #f4f3fb; --wi: rgba(112, 108, 170, .45); }
.wall-pick .wp[data-w="orbits"] { --wm: url(wall-orbits.svg); --wb: #f2f5fa; --wi: rgba(112, 128, 160, .45); }
.wall-pick .wp[data-w="planets"] { --wm: url(wall-planets.svg); --wb: #edf4fd; --wi: rgba(104, 146, 206, .5); }
:root.is-dark .wall-pick .wp[data-w="stars"] { --wb: #121527; --wi: rgba(138, 140, 214, .6); }
:root.is-dark .wall-pick .wp[data-w="orbits"] { --wb: #13161d; --wi: rgba(150, 160, 186, .5); }
:root.is-dark .wall-pick .wp[data-w="planets"] { --wb: #0a1626; --wi: rgba(98, 140, 198, .6); }
.chat-bar { padding-bottom: 6px; }
.chat-head { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 2px 4px; border-radius: 14px; cursor: pointer; }
.chat-head:active { background: var(--fill); }
.chat-head .av { --s: 38px; }
.chat-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-name { font-weight: 680; font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.chat-sub { font-size: .78rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-sub.live { color: var(--green); font-weight: 600; }
.chat-sub.typing { color: var(--accent); font-weight: 600; }
.chat-sub .emo-img { display: inline; width: 1.1em; height: 1.1em; vertical-align: -.2em; }
.back-btn { padding: 0 4px 0 0; gap: 2px; }
.back-btn .icon { width: 28px; height: 28px; margin-inline-start: -6px; }
[dir="rtl"] .back-btn .icon, [dir="rtl"] .flip-rtl { transform: scaleX(-1); }
.back-btn .badge { position: static; box-shadow: none; }
.chat-notice { margin: 8px 12px 0; padding: 10px 12px; border-radius: 14px; background: var(--glass-strong); border: .5px solid var(--line); font-size: .86rem; color: var(--text-2); line-height: 1.4; display: flex; gap: 10px; align-items: center; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.chat-notice .btn-sm { margin-inline-start: auto; }
.msgs { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; padding: 10px calc(10px + var(--safe-r)) 10px calc(10px + var(--safe-l)); display: flex; flex-direction: column; overflow-anchor: none; }
.msgs-in { margin-top: auto; display: flex; flex-direction: column; }
.load-more { align-self: center; margin: 6px 0 12px; }
.msgs:not(.scrolling) .day.float { opacity: 0; transform: translateY(-6px) scale(.96); }
.day { transition: opacity .3s var(--ease), transform .3s var(--ease); position: sticky; top: 4px; z-index: 3; align-self: center; margin: 12px 0 8px; padding: 5px 12px; border-radius: 12px; font-size: .74rem; font-weight: 650; color: var(--text-2); background: var(--glass-strong); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 4px rgba(10, 30, 60, .08); letter-spacing: .01em; }
.unread-sep { align-self: stretch; margin: 10px -10px; padding: 6px; text-align: center; font-size: .78rem; font-weight: 650; color: var(--accent); background: var(--accent-soft); }
.sys { align-self: center; max-width: 86%; margin: 8px 0; padding: 6px 12px; border-radius: 14px; font-size: .8rem; color: var(--text-2); background: var(--glass-strong); text-align: center; line-height: 1.4; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); display: inline-flex; gap: 6px; align-items: center; justify-content: center; flex-wrap: wrap; }
.sys .emo-img { width: 18px; height: 18px; }
.sys.nudge { color: #b25f00; background: rgba(255, 170, 60, .2); font-weight: 650; }
.sys.wink { color: #9b2aa8; background: rgba(200, 90, 220, .15); }
.sys a { font-weight: 650; }
:root.is-dark .sys.nudge { color: #ffb35c; }
:root.is-dark .sys.wink { color: #e9a3f3; }

.m { display: flex; flex-direction: column; max-width: min(80%, 560px); margin-top: 2px; position: relative; align-self: flex-start; }
.m.me { align-self: flex-end; align-items: flex-end; }
.m.first { margin-top: 10px; }
.m .sender { font-size: .78rem; font-weight: 700; margin: 0 12px 2px; color: var(--nc, var(--accent)); }
.m-line { display: flex; align-items: flex-end; gap: 6px; max-width: 100%; }
.m.me .m-line { flex-direction: row-reverse; }
.m .gav { --s: 28px; width: 28px; flex: none; }
/* In groups the name and the reactions line up with the bubble, not with the face beside it. */
.m.g-in .sender { margin-inline-start: 46px; }
.m.g-in .reacts { margin-inline-start: 44px; }
.m .gav .av { --s: 28px; }
.m.grouped .gav .av { visibility: hidden; }
.bub { position: relative; min-width: 0; max-width: 100%; padding: 7px 11px 7px 12px; border-radius: var(--radius); background: var(--them); color: var(--them-ink); line-height: 1.36; font-size: 1rem; box-shadow: 0 1px .5px rgba(10, 30, 60, .1); overflow-wrap: anywhere; word-break: break-word; white-space: pre-wrap; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transform-origin: bottom left; }
.m.me .bub { background: linear-gradient(180deg, var(--me-1), var(--me-2)); color: var(--me-ink); box-shadow: 0 1px 2px rgba(20, 80, 200, .25); transform-origin: bottom right; }
.m.tail:not(.me) .bub { border-end-start-radius: 6px; }
.m.tail.me .bub { border-end-end-radius: 6px; }
.m.new .bub, .m.new .media-b { animation: pop .34s var(--spring); }
@keyframes pop { from { transform: scale(.72) translateY(8px); opacity: 0; } }
.bub .t { display: inline; }
.bub a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.m:not(.me) .bub a { color: var(--accent); }
.bub .emo-img { display: inline; width: 1.3em; height: 1.3em; vertical-align: -.28em; margin: 0 1px; }
.meta { float: inline-end; display: inline-flex; align-items: center; gap: 3px; margin-block: 6px -4px; margin-inline: 10px 0; font-size: .68rem; line-height: 1; color: var(--them-ink-2); white-space: nowrap; user-select: none; -webkit-user-select: none; position: relative; top: 2px; font-variant-numeric: tabular-nums; }
.m.me .meta { color: var(--me-ink-2); }
.meta .tk svg { width: 16px; height: 16px; }
.meta .tk.seen { color: var(--seen); }
.m:not(.me) .meta .tk.seen { color: var(--accent); }
.meta .ed { font-style: italic; }
.bub.big-emoji { background: none !important; box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; padding: 2px 0; cursor: pointer; line-height: 1; }
.bub.big-emoji .be { display: inline-flex; align-items: flex-end; gap: 0; transform-origin: 50% 85%; }
.bub.big-emoji .ue { line-height: 1.1; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.bub.big-emoji .meta { float: none; display: flex; width: max-content; margin-block: 2px 0; margin-inline: auto 0; padding: 3px 7px; border-radius: 10px; color: var(--text-2); font-size: .68rem; background: var(--glass, rgba(127, 127, 127, .14)); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.m:not(.me) .bub.big-emoji .meta { margin-inline: 0 auto; }
.bub.big-emoji.pop .be { animation: emoPop 1.1s linear both; }
/* The pop of a new one: a damped spring (overshoot, back, settle). */
@keyframes emoPop { 0% { transform: scale(.3) translateY(18%); opacity: 0; } 14% { opacity: 1; } 30% { transform: scale(1.14) translateY(-4%); } 46% { transform: scale(.93); } 62% { transform: scale(1.04); } 78% { transform: scale(.985); } 100% { transform: none; } }
/* A sticker: its picture, its animation over it once playing, and a soft contact shadow under it,
   as if it floated a millimetre above the screen. */
.st { position: relative; display: inline-block; width: var(--s); height: var(--s); flex: none; isolation: isolate; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.st::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: 1%; height: 9%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .26), rgba(0, 0, 0, 0)); z-index: -1; pointer-events: none; }
:root[data-theme="dark"] .st::after, :root.is-dark .st::after { background: radial-gradient(closest-side, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0)); }
.st-pic, .st-vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.st-vid { opacity: 0; transition: opacity .12s; background: transparent; }
.st.live .st-vid { opacity: 1; }
.st.live .st-pic { opacity: 0; transition: opacity .12s .08s; }
@media (hover: hover) and (pointer: fine) {
  .bub.big-emoji .st { transition: transform .45s cubic-bezier(.34, 1.56, .64, 1); }
  .bub.big-emoji .st:hover { transform: scale(1.08); }
}
.bub.big-emoji .st.still.on .st-pic { animation: stIdle 3.6s cubic-bezier(.45, 0, .55, 1) infinite; transform-origin: 50% 92%; }
.bub.big-emoji .be .st.still:nth-child(2) .st-pic { animation-delay: -1.2s; }
.bub.big-emoji .be .st.still:nth-child(3) .st-pic { animation-delay: -2.4s; }
@keyframes stIdle { 0%, 100% { transform: none; } 18% { transform: translateY(1%) scale(1.03, .96); } 40% { transform: translateY(-4%) scale(.98, 1.03) rotate(-2.5deg); } 62% { transform: translateY(-1%) scale(1.01, .99) rotate(1.5deg); } 80% { transform: translateY(.5%) scale(1.015, .985); } }
@media (prefers-reduced-motion: reduce) { .bub.big-emoji .st.still.on .st-pic { animation: none; } }
.emo-burst { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 9000; }
.reactbar .st { --s: 34px; }
.reactbar .st::after { display: none; }
.react .emo-img { width: 18px; height: 18px; }
.emo-sec { content-visibility: auto; }
.emo-credit { text-align: center; font-size: .7rem; opacity: .7; margin: 14px 0 4px; }
.bub.deleted { font-style: italic; color: var(--them-ink-2); }
.m.me .bub.deleted { color: var(--me-ink-2); }
.bub .fwd { display: flex; align-items: center; gap: 4px; font-size: .76rem; font-style: italic; opacity: .8; margin-bottom: 2px; }
.bub .fwd .icon { width: 14px; height: 14px; }
.quote { display: block; margin: 1px -3px 6px; padding: 6px 10px 6px 10px; border-radius: 10px; border-inline-start: 3.5px solid var(--qc, var(--accent)); background: rgba(70, 110, 180, .09); font-size: .86rem; line-height: 1.3; cursor: pointer; white-space: normal; }
.m.me .quote { background: rgba(255, 255, 255, .16); --qc: rgba(255, 255, 255, .85); }
.quote b { display: block; font-size: .8rem; color: var(--qc, var(--accent)); margin-bottom: 1px; }
.m.me .quote b { color: #fff; }
.quote span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; opacity: .9; }
.reacts { display: flex; gap: 4px; margin: -8px 10px 0; position: relative; z-index: 2; flex-wrap: wrap; }
.m.me .reacts { justify-content: flex-start; margin-inline-start: 14px; }
.react { height: 26px; padding: 0 7px; border-radius: 13px; background: var(--bg-2); box-shadow: 0 1px 4px rgba(10, 30, 60, .16), 0 0 0 1.5px var(--bg); display: inline-flex; align-items: center; gap: 3px; font-size: .92rem; line-height: 1; }
.react.mine { background: var(--accent-soft); box-shadow: 0 0 0 1.5px var(--accent), 0 1px 4px rgba(10, 30, 60, .16); }
.react i { font-style: normal; font-size: .72rem; font-weight: 700; color: var(--text-2); }
.m.flash .bub, .m.flash .media-b { animation: flash 1.2s var(--ease); }
@keyframes flash { 30% { box-shadow: 0 0 0 4px var(--accent), 0 0 30px var(--accent); } }
.failed-line { font-size: .76rem; color: var(--red); margin: 3px 10px 0; display: flex; gap: 4px; align-items: center; font-weight: 600; }
.swipe-reply { position: absolute; top: 50%; inset-inline-start: -40px; width: 30px; height: 30px; border-radius: 15px; background: var(--fill-2); color: var(--text-2); display: grid; place-items: center; margin-top: -15px; opacity: 0; transform: scale(.6); transition: opacity .15s, transform .15s; }
.typing-b { align-self: flex-start; margin-top: 10px; padding: 12px 14px; border-radius: 20px; border-end-start-radius: 6px; background: var(--them); box-shadow: 0 1px .5px rgba(10, 30, 60, .1); display: inline-flex; gap: 5px; }
.typing-b i { width: 8px; height: 8px; border-radius: 4px; background: var(--text-3); animation: bounce 1.2s infinite ease-in-out; }
.typing-b i:nth-child(2) { animation-delay: .15s; } .typing-b i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
.to-bottom { position: absolute; inset-inline-end: calc(14px + var(--safe-r)); bottom: 12px; width: 44px; height: 44px; border-radius: 22px; background: var(--glass-strong); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: var(--shadow); color: var(--text-2); display: grid; place-items: center; transition: transform .25s var(--spring), opacity .2s; z-index: 6; }
.to-bottom.hide { transform: scale(.4); opacity: 0; pointer-events: none; }
.to-bottom .badge { position: absolute; top: -6px; inset-inline-end: -4px; }

/* desktop: small actions next to a message on hover */
.hover-acts { display: none; }
@media (hover: hover) and (pointer: fine) {
  .m .hover-acts { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-end: -84px; display: flex; gap: 2px; opacity: 0; transition: opacity .12s; }
  .m.me .hover-acts { inset-inline-end: auto; inset-inline-start: -84px; }
  .m:hover .hover-acts { opacity: 1; }
  .hover-acts button { width: 28px; height: 28px; border-radius: 14px; display: grid; place-items: center; color: var(--text-3); background: var(--glass-strong); }
  .hover-acts button:hover { color: var(--accent); background: var(--bg-2); }
  .hover-acts .icon { width: 17px; height: 17px; }
}

/* ---------- media in the conversation ---------- */
.media-b { position: relative; border-radius: 18px; overflow: hidden; background: var(--fill-2); box-shadow: 0 1px 2px rgba(10, 30, 60, .12); cursor: pointer; max-width: min(72vw, 330px); }
.m.me .media-b { background: rgba(30, 100, 230, .25); }
.media-b img, .media-b video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-b .ph-blur { position: absolute; inset: 0; filter: blur(14px) saturate(1.2); transform: scale(1.1); }
.media-b .ov-meta { position: absolute; inset-inline-end: 6px; bottom: 6px; padding: 3px 7px; border-radius: 10px; background: rgba(0, 0, 0, .42); color: #fff; font-size: .68rem; display: inline-flex; gap: 3px; align-items: center; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.media-b .ov-meta .tk svg { width: 15px; height: 15px; }
.media-b .ov-meta .tk.seen { color: var(--seen); }
.media-b .ov-dur { position: absolute; inset-inline-start: 6px; bottom: 6px; padding: 3px 7px; border-radius: 10px; background: rgba(0, 0, 0, .42); color: #fff; font-size: .72rem; font-weight: 600; display: inline-flex; gap: 4px; align-items: center; font-variant-numeric: tabular-nums; }
.media-b .ov-dur .icon { width: 14px; height: 14px; }
.play-orb { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: rgba(10, 20, 40, .38); -webkit-backdrop-filter: blur(10px) saturate(160%); backdrop-filter: blur(10px) saturate(160%); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45), 0 6px 20px rgba(0, 0, 0, .25); }
.play-orb .icon { width: 26px; height: 26px; margin-inline-start: 3px; }
.ring-progress { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; }
.ring-progress circle { fill: none; stroke-width: 3.5; }
.ring-progress .bg { stroke: rgba(255, 255, 255, .3); }
.ring-progress .fg { stroke: #fff; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset .25s linear; }
.ring-progress.spin .fg { animation: rspin 1s linear infinite; }
@keyframes rspin { to { transform: rotate(270deg); } }
.media-b.gone img { filter: grayscale(1) blur(2px); opacity: .6; }
.media-b .gone-t { position: absolute; inset: auto 0 0 0; padding: 8px; text-align: center; color: #fff; font-size: .76rem; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); }
.media-b.noimg { width: 240px; height: 170px; display: grid; place-items: center; color: var(--text-3); }

/* voice messages, as on a phone */
.voice { display: flex; align-items: center; gap: 10px; width: min(72vw, 290px); padding: 8px 12px 8px 8px !important; white-space: normal !important; }
.voice .vbtn { width: 42px; height: 42px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--accent); color: #fff; box-shadow: 0 2px 6px rgba(26, 111, 240, .35); transition: transform .15s; }
.voice .vbtn:active { transform: scale(.92); }
.m.me .voice .vbtn { background: #fff; color: var(--me-2); box-shadow: 0 2px 6px rgba(0, 0, 0, .15); }
.voice .vbtn .icon { width: 22px; height: 22px; }
.voice .vbtn .play { margin-inline-start: 2px; }
.voice .vmid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
/* The bars go from one end to the other: the colour that fills them and the little ball move together. */
.wave { position: relative; height: 30px; display: flex; align-items: center; justify-content: space-between; gap: 2px; cursor: pointer; touch-action: none; }
.wave i { flex: 1; min-width: 2.5px; max-width: 4px; min-height: 4px; border-radius: 3px; background: var(--wv, rgba(90, 110, 140, .35)); transition: background-color .12s; }
.wave i.on { background: var(--wp, var(--accent)); }
.m.me .wave { --wv: rgba(255, 255, 255, .42); --wp: #ffffff; }
.wave .knob { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--wp, var(--accent)); box-shadow: 0 1px 4px rgba(0, 0, 0, .3); pointer-events: none; transform: scale(0); transition: transform .2s var(--spring); }
.voice.started .wave .knob { transform: scale(1); }
.m:not(.me) .voice.fresh .wave .knob { background: var(--green); }
.vfoot { display: flex; align-items: center; gap: 6px; font-size: .72rem; color: var(--them-ink-2); font-variant-numeric: tabular-nums; }
.m.me .vfoot { color: var(--me-ink-2); }
.vfoot .vmic { display: inline-flex; color: var(--green); }
.vfoot .vmic .icon { width: 13px; height: 13px; }
.voice.heard .vfoot .vmic { color: var(--accent); }
.m.me .voice .vfoot .vmic { color: rgba(255, 255, 255, .7); }
.m.me .voice.heard .vfoot .vmic { color: var(--seen); }
.vfoot .sp { flex: 1; }
.vspeed { height: 22px; min-width: 38px; padding: 0 7px; border-radius: 11px; font-size: .74rem; font-weight: 750; background: var(--fill-2); color: inherit; display: none; }
.m.me .vspeed { background: rgba(255, 255, 255, .25); }
.voice.started .vspeed { display: inline-flex; align-items: center; justify-content: center; }
.voice .meta { margin: 0; top: 0; }

/* files, places, view once */
.filecard { display: flex; align-items: center; gap: 12px; width: min(72vw, 300px); white-space: normal !important; }
.filecard .fi { width: 44px; height: 52px; flex: none; border-radius: 9px; display: grid; place-items: center; color: #fff; font-size: .66rem; font-weight: 800; letter-spacing: .03em; background: linear-gradient(160deg, #6ea9ff, #2f6fe0); position: relative; overflow: hidden; }
.filecard .fi::after { content: ""; position: absolute; top: 0; inset-inline-end: 0; width: 14px; height: 14px; background: rgba(255, 255, 255, .35); border-end-start-radius: 6px; }
.m.me .filecard .fi { background: rgba(255, 255, 255, .22); }
.filecard .fb { flex: 1; min-width: 0; }
.filecard .fn { font-weight: 650; font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.filecard .fs { font-size: .76rem; opacity: .75; margin-top: 2px; }
.loccard { padding: 4px !important; width: min(72vw, 288px); white-space: normal !important; }
.loccard .map { position: relative; height: 140px; border-radius: 16px; overflow: hidden; background: #e8eef4; }
.loccard .map img { position: absolute; width: 256px; height: 256px; max-width: none; }
.loccard .pin { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; transform: translate(-50%, -90%); color: var(--red); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
.loccard .pin svg { width: 30px; height: 30px; }
.loccard .osm { position: absolute; inset-inline-end: 4px; bottom: 2px; font-size: 9px; color: #444; background: rgba(255, 255, 255, .7); padding: 0 3px; border-radius: 3px; }
.loccard .lt { padding: 8px 8px 4px; }
.loccard .lt b { display: block; font-size: .92rem; }
.loccard .lt span { font-size: .78rem; opacity: .75; }
.once { display: flex; align-items: center; gap: 10px; min-width: 200px; white-space: normal !important; }
.once .oic { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.m.me .once .oic { background: rgba(255, 255, 255, .2); color: #fff; }
.once.can { cursor: pointer; }
.once.done { opacity: .7; }
.once .ot b { display: block; font-size: .94rem; }
.once .ot span { font-size: .76rem; opacity: .8; }
.upbar { height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .3); overflow: hidden; margin-top: 6px; }
.upbar i { display: block; height: 100%; background: #fff; transition: width .25s linear; }

/* ---------- writing ---------- */
/* Emoji for the word being written: a strip over the message field. */
.emo-sug { position: absolute; bottom: calc(100% + 6px); inset-inline-start: calc(10px + var(--safe-l)); max-width: calc(100% - 20px - var(--safe-l) - var(--safe-r)); display: flex; gap: 2px; padding: 4px; border-radius: 24px; overflow-x: auto; scrollbar-width: none; touch-action: pan-x;
  background: var(--glass-strong); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); box-shadow: var(--shadow); border: .5px solid var(--line); animation: sugIn .22s var(--spring); z-index: 9; }
.emo-sug::-webkit-scrollbar { display: none; }
.emo-sug button { flex: none; width: 40px; height: 40px; border-radius: 20px; display: grid; place-items: center; font-size: 1.6rem; transition: transform .15s var(--spring); }
.emo-sug button:active { transform: scale(1.25); background: var(--fill); }
.emo-sug .emo-img { width: 30px; height: 30px; display: block; }
@keyframes sugIn { from { opacity: 0; transform: translateY(8px) scale(.96); } }
.composer { position: relative; z-index: 8; flex: none; padding: 6px calc(8px + var(--safe-r)) var(--comp-b) calc(8px + var(--safe-l)); background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px); border-top: .5px solid var(--line); }
body.kb-open .composer { padding-bottom: 8px; }
.cbar { position: relative; display: flex; align-items: flex-end; gap: 6px; }
.cbtn { width: 40px; height: 40px; border-radius: 20px; flex: none; display: grid; place-items: center; color: var(--accent); transition: transform .2s var(--spring), background .15s, color .15s; }
.cbtn:active { transform: scale(.88); background: var(--fill); }
.cbtn .icon { width: 27px; height: 27px; }
.cbtn.send { background: var(--accent); color: #fff; box-shadow: 0 3px 10px rgba(26, 111, 240, .35); }
.cbtn.send .icon { width: 22px; height: 22px; }
.cbtn.mic.rec { background: var(--accent); color: #fff; }
.field { flex: 1; min-width: 0; display: flex; align-items: flex-end; border-radius: 21px; background: var(--bg-2); border: .5px solid var(--line-2); min-height: 40px; padding: 0 4px 0 14px; transition: border-color .15s; }
.field:focus-within { border-color: color-mix(in srgb, var(--accent) 45%, var(--line-2)); }
.field textarea, .field .rich-input { flex: 1; min-width: 0; resize: none; border: 0; background: none; padding: 9px 0; max-height: 8.2em; line-height: 1.34; font-size: 1rem; overflow-y: auto; color: var(--text); }
.field .rich-input { outline: none; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; min-height: 1.34em; cursor: text; -webkit-user-select: text; user-select: text; }
.field .rich-input:empty::before { content: attr(data-placeholder); color: var(--text-3); pointer-events: none; }
.field .rich-input .emo-img { width: 1.3em; height: 1.3em; vertical-align: -.3em; margin: 0 .04em; }
.field textarea::placeholder { color: var(--text-3); }
.field textarea:focus, .field textarea:focus-visible { outline: none; box-shadow: none; }
.field:focus-within { border-color: color-mix(in srgb, var(--accent) 45%, var(--line-2)); }
.field .cbtn { width: 34px; height: 34px; margin: 3px 0; }
.field .cbtn { color: var(--text-3); }
.field .cbtn .icon { width: 25px; height: 25px; }
.ctx-bar { display: flex; align-items: center; gap: 10px; margin: 0 4px 7px; padding: 8px 10px 8px 12px; border-radius: 14px; background: var(--bg-2); border-inline-start: 3.5px solid var(--accent); animation: up .22s var(--ease); }
@keyframes up { from { transform: translateY(10px); opacity: 0; } }
.ctx-bar .ct { flex: 1; min-width: 0; font-size: .86rem; line-height: 1.3; }
.ctx-bar .ct b { display: block; color: var(--accent); font-size: .8rem; }
.ctx-bar .ct span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.ctx-bar .x { width: 28px; height: 28px; border-radius: 14px; background: var(--fill); display: grid; place-items: center; color: var(--text-2); flex: none; }
.blocked-bar { text-align: center; padding: 6px 10px; color: var(--text-2); font-size: .9rem; line-height: 1.4; }
.blocked-bar .btn { margin-top: 8px; }

/* recording a voice message */
.recbar { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 6px 0 10px; }
/* While recording the bar stays (the field keeps its focus and the keyboard stays open); the recording
   is drawn over it. */
.cbar.under > *:not(.rec-ov) { opacity: 0; pointer-events: none; }
.cbar.under > .mic { pointer-events: auto; }
.cbar > .rec-ov { position: absolute; inset: 0; z-index: 3; }
.cbar > .recbar.rec-ov { height: auto; pointer-events: none; padding-inline-end: 106px; }
.cbar > .recbar.rec-ov canvas { max-width: 84px; }
.cbar > .rl-acts.rec-ov { display: flex; align-items: center; gap: 6px; animation: up .2s var(--ease); }
/* Easy to hit with the thumb, the phone in one hand. */
.cbar > .rl-acts .cbtn { width: 44px; height: 44px; border-radius: 22px; }
.cbar > .rl-acts .cbtn.del { color: var(--red); }
.cbar > .rl-acts .once-tg { height: 36px; padding: 0 12px 0 8px; border-radius: 18px; background: var(--fill); color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; font-weight: 650; flex: none; transition: background .15s, color .15s, transform .2s var(--spring); }
.cbar > .rl-acts .once-tg:active { transform: scale(.92); }
.cbar > .rl-acts .once-tg.on { background: var(--accent); color: #fff; }
.cbar > .rl-acts .spacer { flex: 1; }
#cMic { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.rec-locked .rdot, .recbar .rdot { width: 12px; height: 12px; border-radius: 6px; background: var(--red); flex: none; }
.rl-top.paused .rdot, .recbar.paused .rdot { animation: none; background: var(--text-3); }
.rl-top .rtime, .recbar .rtime { font-variant-numeric: tabular-nums; font-weight: 650; min-width: 44px; font-size: 1rem; }
.recbar canvas { flex: 1; min-width: 40px; height: 34px; }
.recbar .slide { flex: 1; min-width: 0; text-align: center; color: var(--text-3); font-size: .92rem; white-space: nowrap; overflow: hidden;
  background: linear-gradient(90deg, var(--text-3) 30%, var(--text) 50%, var(--text-3) 70%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: shimmer 2s linear infinite; }
[dir="rtl"] .recbar .slide { animation-direction: reverse; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.recbar.cancel .slide { color: var(--red); -webkit-text-fill-color: var(--red); animation: none; }
.hold-mic { position: absolute; inset-inline-end: calc(4px + var(--safe-r)); bottom: calc(var(--comp-b) - 22px); width: 84px; height: 84px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--accent-2), var(--accent)); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 30px rgba(26, 111, 240, .5); z-index: 30; pointer-events: none; transition: transform .08s linear; }
body.kb-open .hold-mic { bottom: -12px; }
.hold-mic .icon { width: 34px; height: 34px; }
.hold-mic::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; background: var(--accent); opacity: .18; transform: scale(var(--lv, 1)); transition: transform .08s; }
.hold-lock { position: absolute; inset-inline-end: calc(22px + var(--safe-r)); bottom: calc(102px + var(--comp-b)); width: 48px; height: 96px; border-radius: 24px; background: var(--glass-strong); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; padding-top: 12px; color: var(--text-2); z-index: 29; animation: up .25s var(--spring); transition: transform .08s linear; }
body.kb-open .hold-lock { bottom: 96px; }
.hold-lock .icon { width: 22px; height: 22px; }
.hold-lock .chev { animation: chev 1.4s ease-in-out infinite; }
@keyframes chev { 50% { transform: translateY(-4px); opacity: .5; } }
.hold-lock.locked { color: var(--accent); }
.rec-locked { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; animation: up .2s var(--ease); }
.rec-locked .rl-top { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 6px; }
.rec-locked .rl-top canvas { flex: 1; height: 36px; min-width: 40px; }
.rec-locked .rl-acts { display: flex; align-items: center; gap: 6px; }
.rec-locked .rl-acts .cbtn.del { color: var(--red); }
.rec-locked .once-tg { height: 36px; padding: 0 12px 0 8px; border-radius: 18px; background: var(--fill); color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; font-weight: 650; }
.rec-locked .once-tg.on { background: var(--accent); color: #fff; }
.tooltip { position: absolute; inset-inline-end: calc(10px + var(--safe-r)); bottom: calc(100% + 6px); padding: 9px 12px; border-radius: 12px; background: var(--text); color: var(--bg-2); font-size: .82rem; font-weight: 600; box-shadow: var(--shadow); animation: up .2s var(--ease); white-space: nowrap; z-index: 9; pointer-events: none; }

/* ---------- sheets, menus and dialogs ---------- */
.layer { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; justify-content: flex-end; }
/* Opened during a call (devices, a question): over the call's screen. */
.layer.over-call, .menu-pop.over-call { z-index: 170; }
.layer.center { justify-content: center; align-items: center; padding: 20px; }
.scrim { position: absolute; inset: 0; background: rgba(5, 12, 25, .36); opacity: 0; transition: opacity .3s var(--ease); }
.layer.show .scrim, .msgmenu .scrim { opacity: 1; }
.msgmenu .scrim { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: vin .2s var(--ease); }
.sheet { position: relative; max-height: calc(100% - var(--safe-t) - 24px); display: flex; flex-direction: column; background: var(--bg); border-radius: 22px 22px 0 0; box-shadow: var(--shadow-lg); transform: translateY(100%); transition: transform .42s var(--ease); padding-bottom: var(--safe-b); overflow: hidden; }
.layer.show .sheet { transform: none; }
.sheet.drag { transition: none; }
.sheet .grab { position: relative; width: 38px; height: 5px; border-radius: 3px; background: var(--fill-2); margin: 8px auto 2px; flex: none; }
/* A bigger place to take the bar with the finger. */
.sheet .grab::before { content: ""; position: absolute; inset: -12px -70px; }
.sheet-head { display: grid; grid-template-columns: minmax(64px, 1fr) minmax(0, auto) minmax(64px, 1fr); align-items: center; gap: 8px; padding: 6px 12px 8px 12px; flex: none; }
.sheet-head .sh-l { display: flex; justify-content: flex-start; }
.sheet-head .sh-r { display: flex; justify-content: flex-end; }
.sheet-head h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0; font-size: 1.12rem; font-weight: 720; text-align: center; letter-spacing: -.01em; }
.sheet-head .hbtn { min-width: 64px; }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 16px 18px; }
.sheet.full { height: calc(100% - var(--safe-t) - 12px); }
@media (min-width: 700px) {
  .layer:not(.center) { justify-content: center; align-items: center; padding: 24px; }
  .sheet { width: 100%; max-width: 480px; border-radius: 22px; max-height: min(780px, calc(100% - 48px)); padding-bottom: 0; transform: translateY(24px) scale(.97); opacity: 0; transition: transform .3s var(--ease), opacity .25s; }
  .layer.show .sheet { transform: none; opacity: 1; }
  .sheet .grab { display: none; }
  .sheet.full { height: min(780px, calc(100% - 48px)); }
}
.actions { position: relative; margin: 0 8px calc(8px + var(--safe-b)); display: flex; flex-direction: column; gap: 8px; transform: translateY(120%); transition: transform .4s var(--ease); }
.layer.show .actions { transform: none; }
.act-group { border-radius: 16px; overflow: hidden; background: var(--glass-strong); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px); }
.act-title { padding: 14px 18px 10px; text-align: center; color: var(--text-2); font-size: .84rem; line-height: 1.4; border-bottom: .5px solid var(--line); }
.act-title b { display: block; color: var(--text); font-size: .92rem; margin-bottom: 2px; }
.act { width: 100%; min-height: 56px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 1.05rem; color: var(--accent); border-bottom: .5px solid var(--line); padding: 0 16px; }
.act:last-child { border-bottom: 0; }
.act:active { background: var(--fill); }
.act.red { color: var(--red); }
.act.bold { font-weight: 650; }
@media (min-width: 700px) { .layer .actions { margin: auto; width: 360px; transform: scale(.96); opacity: 0; transition: transform .25s var(--ease), opacity .2s; } .layer.show .actions { transform: none; opacity: 1; } }
.dialog { position: relative; width: min(330px, 100%); border-radius: 20px; background: var(--glass-strong); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px); box-shadow: var(--shadow-lg); overflow: hidden; transform: scale(1.08); opacity: 0; transition: transform .3s var(--spring), opacity .2s; text-align: center; }
.layer.show .dialog { transform: none; opacity: 1; }
.dialog .dg-b { padding: 20px 18px 16px; }
.dialog h3 { margin: 0 0 6px; font-size: 1.06rem; font-weight: 700; }
.dialog p { margin: 0; color: var(--text-2); font-size: .9rem; line-height: 1.45; }
.dialog input, .dialog textarea { width: 100%; margin-top: 12px; }
.dialog .dg-a { display: flex; border-top: .5px solid var(--line); }
.dialog .dg-a button { flex: 1; min-height: 50px; font-size: 1.02rem; color: var(--accent); }
.dialog .dg-a button + button { border-inline-start: .5px solid var(--line); }
.dialog .dg-a button.bold { font-weight: 650; }
.dialog .dg-a button.red { color: var(--red); }
.dialog .dg-a.col { flex-direction: column; }
.dialog .dg-a.col button + button { border-inline-start: 0; border-top: .5px solid var(--line); }

/* the menu of a message: the reactions, the message itself, what can be done */
.msgmenu { position: fixed; inset: 0; z-index: 110; }
.msgmenu .scrim { background: rgba(5, 12, 25, .28); -webkit-backdrop-filter: blur(12px) saturate(140%); backdrop-filter: blur(12px) saturate(140%); }
.msgmenu .mm-wrap { position: absolute; display: flex; flex-direction: column; gap: 8px; transition: transform .3s var(--spring), opacity .2s; }
.msgmenu.me .mm-wrap { align-items: flex-end; }
.reactbar { display: flex; gap: 2px; padding: 6px; border-radius: 30px; background: var(--glass-strong); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); box-shadow: var(--shadow); transform-origin: bottom; animation: rb .32s var(--spring); }
@keyframes rb { from { transform: scale(.4); opacity: 0; } }
.reactbar button { width: 44px; height: 44px; border-radius: 22px; font-size: 1.65rem; display: grid; place-items: center; transition: transform .15s var(--spring); }
.reactbar button:active { transform: scale(1.3); }
.reactbar button.on { background: var(--accent-soft); }
.reactbar button.more { font-size: 1.2rem; color: var(--text-2); background: var(--fill); }
.mm-msg { pointer-events: none; max-width: min(82vw, 560px); }
/* A long message held: the top of it, so the actions always fit under it. */
.mm-msg > .bub, .mm-msg > .media-b { max-height: 38vh; overflow: hidden; }
.mm-acts { min-width: 230px; border-radius: 16px; overflow: hidden; background: var(--glass-strong); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px); box-shadow: var(--shadow-lg); animation: rb .28s var(--spring); transform-origin: top; }
.mm-acts button { width: 100%; height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 16px; font-size: 1rem; border-bottom: .5px solid var(--line); }
.mm-acts button:last-child { border-bottom: 0; }
.mm-acts button:active { background: var(--fill); }
.mm-acts button.red { color: var(--red); }
.mm-acts .icon { width: 21px; height: 21px; }
.menu-pop { position: fixed; z-index: 120; min-width: 220px; border-radius: 14px; overflow: hidden; background: var(--glass-strong); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px); box-shadow: var(--shadow-lg); animation: rb .2s var(--ease); }
.menu-pop button { width: 100%; height: 40px; display: flex; align-items: center; gap: 12px; padding: 0 14px; font-size: .94rem; text-align: start; }
.menu-pop button:hover { background: var(--fill); }
.menu-pop button.red { color: var(--red); }
.menu-pop .icon { width: 19px; height: 19px; color: var(--text-2); }
.menu-pop hr { margin: 4px 0; border: 0; border-top: .5px solid var(--line); }
@media (pointer: coarse) {
  .menu-pop { min-width: 250px; border-radius: 16px; }
  .menu-pop button { height: 50px; font-size: 1.02rem; padding: 0 16px; justify-content: space-between; flex-direction: row-reverse; }
  .menu-pop button + button { border-top: .5px solid var(--line); }
  .menu-pop .icon { width: 22px; height: 22px; color: var(--text); }
}

/* toasts and banners */
.toasts { position: fixed; left: 0; right: 0; top: calc(var(--safe-t) + 8px); z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 10px; }
.toast { pointer-events: auto; max-width: 460px; width: max-content; min-width: 180px; padding: 11px 16px; border-radius: 16px; background: var(--glass-strong); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px); box-shadow: var(--shadow); font-size: .9rem; font-weight: 560; display: flex; gap: 10px; align-items: center; animation: tin .4s var(--spring); }
.toast.error { color: var(--red); }
.toast.out { animation: tout .25s var(--ease) forwards; }
@keyframes tin { from { transform: translateY(-30px) scale(.9); opacity: 0; } }
@keyframes tout { to { transform: translateY(-20px) scale(.95); opacity: 0; } }
.banner { pointer-events: auto; width: min(100%, 480px); display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 20px; background: var(--glass-strong); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px); box-shadow: var(--shadow-lg); animation: tin .45s var(--spring); cursor: pointer; touch-action: pan-x; }
.banner .av { --s: 40px; }
.banner .bt { flex: 1; min-width: 0; }
.banner .bt b { display: block; font-size: .92rem; }
.banner .bt span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .86rem; color: var(--text-2); line-height: 1.3; }
.banner .bt span .emo-img { display: inline; width: 1.1em; height: 1.1em; vertical-align: -.2em; }

/* ---------- controls ---------- */
.btn { min-height: 50px; padding: 0 22px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 650; font-size: 1.02rem; background: var(--fill); color: var(--text); transition: transform .15s var(--spring), filter .15s, opacity .15s; }
.btn:active { transform: scale(.97); filter: brightness(.95); }
.btn.primary { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: #fff; box-shadow: 0 6px 18px rgba(26, 111, 240, .32), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn.red { background: rgba(255, 59, 48, .12); color: var(--red); }
.btn.ghost { background: none; color: var(--accent); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-sm { min-height: 32px; padding: 0 14px; border-radius: 16px; font-size: .86rem; font-weight: 650; background: var(--accent); color: #fff; display: inline-flex; align-items: center; gap: 6px; }
.btn-sm.soft { background: var(--accent-soft); color: var(--accent); }
.input { width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg-2); font-size: 1rem; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.4; }
.input.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .92rem; letter-spacing: .02em; }
.field-label { display: block; font-size: .82rem; font-weight: 650; color: var(--text-2); margin: 14px 4px 6px; }
.hint { font-size: .82rem; color: var(--text-3); line-height: 1.45; margin: 8px 4px 0; }
.err { color: var(--red); font-size: .86rem; min-height: 1.3em; margin: 8px 4px 0; text-align: center; }
.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 16px; background: var(--fill-2); transition: background .25s; }
.switch i::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 28px; height: 28px; border-radius: 14px; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .3s var(--spring); }
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { transform: translateX(20px); }
[dir="rtl"] .switch input:checked + i::after { transform: translateX(-20px); }
.seg { display: flex; padding: 3px; border-radius: 12px; background: var(--fill); gap: 2px; }
.seg button { flex: 1; height: 34px; border-radius: 9px; font-size: .9rem; font-weight: 600; color: var(--text-2); }
.seg button.on { background: var(--bg-2); color: var(--text); box-shadow: 0 2px 6px rgba(0, 0, 0, .1); }
input[type=range].slider { width: 100%; accent-color: var(--accent); }

/* grouped settings, as on the phone */
.group-h { margin: 22px 18px 7px; font-size: .78rem; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.group { margin: 0 14px; border-radius: 16px; background: var(--bg-2); overflow: hidden; box-shadow: 0 1px 0 var(--line); }
.group-f { margin: 7px 20px 0; font-size: .8rem; color: var(--text-3); line-height: 1.45; }
.cell { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 16px; position: relative; width: 100%; text-align: start; }
.cell + .cell::before { content: ""; position: absolute; top: 0; inset-inline-start: 58px; inset-inline-end: 0; height: .5px; background: var(--line); }
.cell.noic + .cell::before, .group.noic .cell + .cell::before { inset-inline-start: 16px; }
button.cell:active, .cell.tap:active { background: var(--fill); }
.cell .ci { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex: none; background: var(--accent); }
.cell .ci .icon { width: 19px; height: 19px; }
.cell .ci.green { background: #2fc152; } .cell .ci.orange { background: #ff9500; } .cell .ci.red { background: #ff3b30; } .cell .ci.purple { background: #8e5cf7; } .cell .ci.grey { background: #8e8e93; } .cell .ci.teal { background: #14b8c6; } .cell .ci.pink { background: #ff2d73; } .cell .ci.indigo { background: #5856d6; }
.cell .cl { flex: 1; min-width: 0; font-size: 1rem; }
.cell .cl small { display: block; font-size: .8rem; color: var(--text-3); margin-top: 1px; line-height: 1.35; }
.cell .cv { color: var(--text-3); font-size: .95rem; max-width: 45%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell .chev { color: var(--text-3); opacity: .7; }
.cell .chev .icon { width: 18px; height: 18px; }
.cell.red .cl { color: var(--red); }
.cell.blue .cl { color: var(--accent); }

/* profile card in "You" */
.me-card { margin: 4px 14px 0; padding: 18px; border-radius: 22px; background: var(--bg-2); box-shadow: 0 1px 0 var(--line), 0 10px 30px rgba(20, 50, 100, .06); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; position: relative; overflow: hidden; }
.me-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 92px; background: linear-gradient(135deg, rgba(61, 139, 255, .22), rgba(255, 138, 31, .14)); }
.me-card .av { --s: 104px; margin-top: 18px; cursor: pointer; }
.me-card .av .cam { position: absolute; inset-inline-end: -2px; bottom: 2px; width: 34px; height: 34px; border-radius: 17px; background: var(--accent); color: #fff; display: grid; place-items: center; border: 3px solid var(--bg-2); }
.me-card .av .cam .icon { width: 18px; height: 18px; }
.me-card .nm { font-size: 1.5rem; font-weight: 750; letter-spacing: -.02em; font-family: var(--font-round); cursor: pointer; overflow-wrap: anywhere; }
.me-card .ps { color: var(--text-2); font-style: italic; font-size: .95rem; cursor: pointer; max-width: 100%; overflow-wrap: anywhere; }
.me-card .ps.empty { color: var(--text-3); }
/* My status: one button that opens the choices. */
.me-st { margin-top: 6px; height: 36px; padding: 0 12px 0 13px; border-radius: 18px; background: var(--fill); display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 650; color: var(--text); transition: transform .18s var(--spring), background .15s; }
.me-st:active { transform: scale(.96); background: var(--fill-2); }
.me-st .orb-dot { width: 12px; height: 12px; }
.me-st .icon { width: 14px; height: 14px; color: var(--text-3); }
/* With a meteor posted, my picture wears the ring of the meteors. */
/* My picture in You: a thick ring in the color of my status, or in the Meteor's colors while one of mine is up. */
.me-card .av.ring::before { inset: -10px; background: conic-gradient(from 200deg, var(--oc), color-mix(in srgb, var(--oc) 62%, #fff), var(--oc)); opacity: 1; }
.me-card .av.ring .av-in { box-shadow: 0 0 0 4px var(--bg-2); }
.me-card .av.ring .orb { inset-inline-end: -4px; bottom: -4px; }
.me-av.has-met .av.ring::before { inset: -11px; background: conic-gradient(from 200deg, #3fd0ff, #7a6bff, #e85bd8, #ffb547, #3fd0ff); opacity: 1; }
.me-av.has-met .av.ring::after { content: ""; position: absolute; inset: -11px; border-radius: 50%; z-index: -2; background: conic-gradient(from 200deg, #3fd0ff, #7a6bff, #e85bd8, #ffb547, #3fd0ff); filter: blur(10px); opacity: .45; }
.me-av.has-met .av.ring .av-in { box-shadow: 0 0 0 4px var(--bg-2); }
.me-av.has-met:active .av, .me-av.has-met.pressed .av { transform: scale(.96); }
.me-av .av { transition: transform .2s var(--spring); }
.me-card .me-av { display: block; margin-top: 22px; margin-bottom: 4px; border-radius: 50%; }
.me-card .me-av .av { margin-top: 0; }
.status-pick { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 6px; }
.status-pick button { height: 34px; padding: 0 12px 0 10px; border-radius: 17px; background: var(--fill); display: inline-flex; align-items: center; gap: 7px; font-size: .86rem; font-weight: 600; color: var(--text-2); }
.status-pick button.on { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }

/* ---------- contact and group details ---------- */
.info-top { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 10px 20px 4px; }
.info-top .av { --s: 112px; }
.info-top h1 { margin: 10px 0 0; font-size: 1.6rem; font-weight: 760; letter-spacing: -.02em; font-family: var(--font-round); overflow-wrap: anywhere; }
.info-top .ip { color: var(--text-2); font-style: italic; overflow-wrap: anywhere; }
.info-top .is { color: var(--text-3); font-size: .88rem; display: flex; gap: 6px; align-items: center; }
.info-acts { display: flex; justify-content: center; gap: 10px; margin: 16px 14px 4px; }
.info-acts button { flex: 1; max-width: 104px; min-height: 64px; border-radius: 16px; background: var(--bg-2); color: var(--accent); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; font-size: .76rem; font-weight: 650; box-shadow: 0 1px 0 var(--line); }
.info-acts button:active { transform: scale(.96); }
.info-acts button:disabled { opacity: .4; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin: 0 14px; border-radius: 16px; overflow: hidden; }
.gallery button { position: relative; aspect-ratio: 1; background: var(--fill-2); overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery .gv { position: absolute; inset-inline-start: 6px; bottom: 6px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5)); }
.member { display: flex; align-items: center; gap: 12px; padding: 8px 16px; min-height: 56px; position: relative; }
.member + .member::before { content: ""; position: absolute; top: 0; inset-inline-start: 66px; inset-inline-end: 0; height: .5px; background: var(--line); }
.member .av { --s: 38px; }
.member .mn { flex: 1; min-width: 0; }
.member .mn small { display: block; color: var(--text-3); font-size: .8rem; }
.event-card { margin: 14px 14px 0; padding: 16px; border-radius: 18px; background: linear-gradient(150deg, rgba(255, 107, 139, .14), rgba(255, 138, 31, .12)); display: flex; flex-direction: column; gap: 10px; }
.event-card .ev-l { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.event-card .rsvp { display: flex; gap: 8px; }
.event-card .rsvp button { flex: 1; height: 40px; border-radius: 12px; background: var(--bg-2); font-weight: 650; font-size: .88rem; }
.event-card .rsvp button.on { background: var(--accent); color: #fff; }

/* ---------- invitations and QR ---------- */
.qr-card { margin: 8px auto 0; width: min(100%, 330px); padding: 22px 22px 18px; border-radius: 28px; background: linear-gradient(160deg, #ffffff, #eef5ff); box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 12px; color: #0c1a2d; }
.qr-card .qr { width: 100%; aspect-ratio: 1; }
.qr-card .qr > svg { width: 100%; height: 100%; display: block; }
.qr-card .qn { font-weight: 760; font-size: 1.2rem; font-family: var(--font-round); text-align: center; overflow-wrap: anywhere; }
.qr-card .qs { color: #5a6a80; font-size: .86rem; text-align: center; line-height: 1.4; }
.qr-acts { display: flex; gap: 10px; margin: 16px 0 6px; }
.qr-acts .btn { flex: 1; min-height: 48px; padding: 0 12px; font-size: .95rem; }
.pill-note { display: flex; gap: 8px; align-items: flex-start; margin: 10px 2px 0; padding: 10px 12px; border-radius: 14px; background: var(--fill); color: var(--text-2); font-size: .82rem; line-height: 1.4; }
.pill-note .icon { width: 18px; height: 18px; flex: none; color: var(--green); margin-top: 1px; }
.pill-note.warn .icon { color: var(--amber); }
.scanner { position: relative; width: 100%; aspect-ratio: 3 / 4; max-height: 56vh; border-radius: 24px; overflow: hidden; background: #000; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scanner .aim { position: absolute; left: 50%; top: 50%; width: 62%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 28px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .45); }
.scanner .aim::before { content: ""; position: absolute; inset: 0; border-radius: 28px; border: 3px solid rgba(255, 255, 255, .9); -webkit-mask: linear-gradient(#000 0 0) top/100% 22% no-repeat, linear-gradient(#000 0 0) bottom/100% 22% no-repeat; mask: linear-gradient(#000 0 0) top/100% 22% no-repeat, linear-gradient(#000 0 0) bottom/100% 22% no-repeat; }
.scanner .aim.hit::before { border-color: #4dff88; }
.scanner .smsg { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; color: #fff; font-size: .9rem; font-weight: 600; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); padding: 0 12px; }
.scanner .sflip { position: absolute; top: 12px; inset-inline-end: 12px; width: 40px; height: 40px; border-radius: 20px; background: rgba(0, 0, 0, .4); color: #fff; display: grid; place-items: center; }

/* ---------- the welcome ---------- */
.welcome { position: absolute; inset: 0; z-index: 50; overflow-y: auto; background: radial-gradient(900px 600px at 80% -10%, rgba(80, 160, 255, .35), transparent 60%), radial-gradient(800px 500px at 0% 110%, rgba(255, 150, 60, .22), transparent 60%), var(--bg); display: flex; flex-direction: column; }
.wl-in { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: calc(var(--safe-t) + 30px) calc(26px + var(--safe-r)) calc(var(--safe-b) + 24px) calc(26px + var(--safe-l)); max-width: 520px; margin: 0 auto; width: 100%; gap: 14px; }
.wl-logo { width: 160px; height: 160px; position: relative; margin-bottom: 6px; }
.wl-logo .hero-orbs { transform: scale(1.33); transform-origin: top left; }
.wl-in h1 { margin: 0; font-family: var(--font-round); font-weight: 800; font-size: 2.35rem; letter-spacing: -.03em; line-height: 1.05; }
.wl-in h1 span { background: linear-gradient(90deg, var(--accent), #00b6ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.wl-in .lead { margin: 0; color: var(--text-2); font-size: 1.08rem; line-height: 1.45; max-width: 380px; }
.wl-feats { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 10px; width: 100%; max-width: 360px; text-align: start; }
.wl-feats div { display: flex; gap: 12px; align-items: center; color: var(--text-2); font-size: .94rem; line-height: 1.35; }
.wl-feats .fi { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--bg-2); color: var(--accent); box-shadow: 0 1px 0 var(--line); }
.wl-btns { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 360px; margin-top: 8px; }
.wl-legal { margin-top: 12px; color: var(--text-3); font-size: .78rem; line-height: 1.5; max-width: 340px; }
.wl-legal a { font-weight: 600; }
.avatar-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 12px 0 4px; }
.avatar-pick button { aspect-ratio: 1; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 3px transparent; transition: box-shadow .15s, transform .15s; }
.avatar-pick button svg, .avatar-pick button img { width: 100%; height: 100%; }
.avatar-pick button.on { box-shadow: 0 0 0 3px var(--accent); transform: scale(1.04); }
.avatar-pick button.photo { background: var(--fill); color: var(--text-2); display: grid; place-items: center; }
.terms-box { color: var(--text-2); font-size: .92rem; line-height: 1.5; }
.terms-box p { margin: 0 0 12px; }

/* ---------- media viewer ---------- */
.viewer { position: fixed; inset: 0; z-index: 150; background: #000; display: flex; flex-direction: column; color: #fff; animation: vin .25s var(--ease); touch-action: none; }
@keyframes vin { from { opacity: 0; } }
.viewer .vtop, .viewer .vbot { position: absolute; left: 0; right: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: calc(var(--safe-t) + 6px) calc(10px + var(--safe-r)) 10px calc(10px + var(--safe-l)); background: linear-gradient(rgba(0, 0, 0, .55), transparent); transition: opacity .2s; }
.viewer .vbot { top: auto; bottom: 0; padding: 14px calc(10px + var(--safe-r)) calc(var(--safe-b) + 10px) calc(10px + var(--safe-l)); background: linear-gradient(transparent, rgba(0, 0, 0, .55)); justify-content: space-around; }
.viewer.chromeless .vtop, .viewer.chromeless .vbot { opacity: 0; pointer-events: none; }
.viewer .vt { flex: 1; min-width: 0; text-align: center; font-size: .86rem; line-height: 1.3; }
.viewer .vt b { display: block; font-size: .95rem; }
.viewer .hbtn { color: #fff; }
.viewer .vstage { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.viewer .vstage img { max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: center; will-change: transform; user-select: none; -webkit-user-drag: none; }
.viewer .vstage video { max-width: 100%; max-height: 100%; background: #000; }
.viewer .once-badge { position: absolute; top: calc(var(--safe-t) + 60px); left: 50%; transform: translateX(-50%); padding: 6px 12px; border-radius: 14px; background: rgba(255, 255, 255, .15); font-size: .8rem; font-weight: 650; display: inline-flex; gap: 6px; align-items: center; z-index: 2; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.viewer .audio-once { width: min(90vw, 380px); padding: 24px; border-radius: 24px; background: rgba(255, 255, 255, .08); display: flex; flex-direction: column; align-items: center; gap: 18px; }
.viewer .audio-once .voice { width: 100%; background: rgba(255, 255, 255, .1); border-radius: 20px; }
.viewer .audio-once .wave { --wv: rgba(255, 255, 255, .35); --wp: #fff; }

/* ---------- calls ---------- */
.call { position: fixed; inset: 0; z-index: 160; color: #fff; display: flex; flex-direction: column; align-items: center; background: radial-gradient(120% 80% at 50% 0%, #2b6be0 0%, #0d2a66 55%, #050d22 100%); animation: vin .3s var(--ease); overflow: hidden; }
/* On the iPhone the two pictures of a video call are the app's own, drawn behind the page: the page
   lets them through. Everything else on the page goes out of sight for as long: by its opacity,
   which nothing inside it can undo (an open conversation keeps its own "visibility: visible"). What
   stays: the call itself, what opens over it, the notices, the lock and the first screen. */
html.call-thru, html.call-thru body { background: transparent !important; }
html.call-thru #app,
html.call-thru body > *:not(.call):not(.over-call):not(.toasts):not(.lock):not(#splash):not(.emo-burst) { opacity: 0 !important; pointer-events: none !important; }
html.call-thru .call, html.call-thru .call .remote, html.call-thru .call .local { background: transparent !important; }
.call.min { inset: auto 10px auto 10px; top: calc(var(--safe-t) + 8px); height: 56px; border-radius: 28px; flex-direction: row; padding: 0 8px 0 16px; gap: 10px; box-shadow: var(--shadow-lg); background: linear-gradient(90deg, #22b04c, #16923a); cursor: pointer; }
.call.min > *:not(.call-mini) { display: none !important; }
.call .call-mini { display: none; }
.call.min .call-mini { display: flex; flex: 1; align-items: center; gap: 10px; font-weight: 650; }
.call .remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.call { --pip-b: calc(var(--ctl-h, calc(var(--safe-b) + 204px)) + 12px); --pip-t: auto; --pip-e: calc(14px + var(--safe-r)); --pip-s: auto; }
/* Without the buttons, the small picture settles right into the corner. */
.call.bare { --pip-b: calc(var(--safe-b) + 12px); --pip-e: calc(12px + var(--safe-r)); }
.call video.c-t { --pip-b: auto; --pip-t: calc(var(--safe-t) + 70px); }
.call.bare video.c-t { --pip-t: calc(var(--safe-t) + 12px); }
.call video.c-s { --pip-e: auto; --pip-s: calc(14px + var(--safe-l)); }
.call.bare video.c-s { --pip-s: calc(12px + var(--safe-l)); }
.call .local { position: absolute; top: var(--pip-t); bottom: var(--pip-b); inset-inline-end: var(--pip-e); inset-inline-start: var(--pip-s); width: 104px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 18px; border: 2px solid rgba(255, 255, 255, .7); box-shadow: 0 8px 24px rgba(0, 0, 0, .5); transform: scaleX(-1); z-index: 3; background: #111; touch-action: none; }
.call .local.back { transform: none; }
.call .c-top { position: relative; z-index: 2; width: 100%; display: flex; align-items: center; padding: calc(var(--safe-t) + 8px) 12px 0; }
.call .c-who { position: relative; z-index: 2; margin-top: 8vh; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 0 20px; transition: opacity .3s; }
.call.video-on.talking:not(.no-pic) .c-who { margin-top: 2vh; }
/* No picture comes (camera off, voice only, no camera): their photo, not a black screen. */
.call.video-on.talking.no-pic .remote { opacity: 0; }
.call.video-on.talking:not(.no-pic) .c-who .av { display: none; }
.call .c-who .av { --s: 132px; }
.call .c-who .av::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); animation: cring 2s ease-out infinite; }
.call.talking .c-who .av::after { display: none; }
@keyframes cring { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.call .c-who h2 { margin: 8px 0 0; font-size: 1.9rem; font-weight: 720; font-family: var(--font-round); letter-spacing: -.02em; text-shadow: 0 2px 10px rgba(0, 0, 0, .3); }
.call .c-who span { font-size: 1rem; opacity: .85; font-variant-numeric: tabular-nums; }
.call .c-btns { position: absolute; left: 0; right: 0; bottom: calc(var(--safe-b) + 34px); z-index: 2; display: flex; justify-content: center; gap: 22px; padding: 0 16px; flex-wrap: wrap; }
.cb { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: .76rem; font-weight: 600; opacity: .95; }
.cb i { width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .18); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); transition: transform .15s var(--spring), background .2s; }
.cb:active i { transform: scale(.9); }
.cb.on i { background: #fff; color: #0d2a66; }
.cb.red i { background: var(--red); }
.cb.green i { background: var(--green); }
.cb .icon { width: 30px; height: 30px; }

/* A screen shared: mine goes in place of my camera (the small picture shows it, whole), theirs
   fills the screen whole (never cropped), and the lines drawn on it go over it. */
.call .local.screen-pic { transform: none; object-fit: contain; aspect-ratio: 16 / 10; width: 172px; background: #000; }
.call.swapped.talking .local.on.screen-pic { aspect-ratio: auto; width: 100%; }
.call.their-screen .remote { object-fit: contain; transform-origin: 0 0; background: #05070d; }
.call.their-screen.swapped.talking .remote.pip { aspect-ratio: 16 / 10; width: 172px; transform: none; }
.call .call-ink { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.call.inking .c-who, .call.inking .c-top { pointer-events: none; }
.call.inking .c-top button { pointer-events: auto; }
.call .ink-colors { position: absolute; z-index: 5; top: calc(var(--safe-t) + 12px); left: 50%; transform: translateX(-50%); display: none; gap: 12px; padding: 9px 14px; border-radius: 24px; background: rgba(10, 12, 24, .5); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .16); }
.call.inking .ink-colors:not(:empty) { display: flex; animation: vin .22s var(--ease); }
.call .ink-colors button { width: 26px; height: 26px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25), 0 0 10px color-mix(in srgb, var(--c) 60%, transparent); transition: transform .15s var(--spring); }
.call .ink-colors button.on { transform: scale(1.18); box-shadow: 0 0 0 2.5px #fff, 0 0 14px color-mix(in srgb, var(--c) 80%, transparent); }
.call .ink-colors button:active { transform: scale(.9); }
.scr-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; padding: 4px 0 18px; }
.scr-pick button { display: flex; flex-direction: column; gap: 8px; align-items: center; font-weight: 600; }
.scr-pick .si { width: 100%; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--fill, rgba(127, 127, 127, .15)); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .15s, transform .15s var(--spring); }
.scr-pick .si img { width: 100%; height: 100%; object-fit: cover; }
.scr-pick button:hover .si { box-shadow: inset 0 0 0 2px var(--accent, #3e8dff); }
.scr-pick button:active .si { transform: scale(.97); }

/* ---------- the lock ---------- */
.lock { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 30px; background: radial-gradient(900px 600px at 80% -10%, rgba(80, 160, 255, .35), transparent 60%), var(--bg); }
.lock-in { width: 100%; max-width: 320px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.lock-in b { font-size: 1.3rem; }
.lock-in span { color: var(--text-2); font-size: .92rem; line-height: 1.45; }
.lock-in.shake { animation: lshake .4s; }
@keyframes lshake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ---------- the big things: nudges and winks ---------- */
.shake-all { animation: nudge .6s cubic-bezier(.36, .07, .19, .97) 2; }
@keyframes nudge { 10%, 90% { transform: translate(-3px, 1px); } 20%, 80% { transform: translate(6px, -2px); } 30%, 50%, 70% { transform: translate(-10px, 3px); } 40%, 60% { transform: translate(10px, -3px); } }
.wink-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 60; }
.emo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 4px; }
.emo-grid button.uni { font-size: 1.85rem; line-height: 1; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.emo-grid button.tapped { animation: emoTap .32s var(--spring); }
@keyframes emoTap { 50% { transform: scale(1.25); } }
.emo-sheet .sheet-body { display: flex; flex-direction: column; padding-top: 0; overflow: hidden; max-height: min(62vh, 520px); }
.emo-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 8px; border-bottom: .5px solid var(--line); flex: none; }
.emo-tabs::-webkit-scrollbar { display: none; }
.emo-tabs button { flex: none; width: 40px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 1.3rem; opacity: .55; transition: opacity .15s, background .15s; }
.emo-tabs button.on { opacity: 1; background: var(--fill); }
.emo-tabs img { width: 22px; height: 22px; }
.emo-scroll { overflow-y: auto; flex: 1; padding-top: 4px; -webkit-overflow-scrolling: touch; }
.emo-sec h3 { margin: 12px 4px 6px; font-size: .78rem; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); }
.emo-grid button { aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; }
.emo-grid button:active { background: var(--fill); }
.emo-grid img { width: 32px; height: 32px; }
.wink-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.wink-grid button { aspect-ratio: 1.1; border-radius: 18px; background: var(--bg-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: .82rem; font-weight: 600; box-shadow: 0 1px 0 var(--line); }
.wink-grid img { width: 46px; height: 46px; }
.attach-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 4px; padding: 10px 0 12px; }
.attach-grid button { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: .76rem; font-weight: 600; color: var(--text-2); min-width: 0; }
.attach-grid button span { max-width: 100%; overflow: hidden; text-align: center; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: break-word; hyphens: auto; }
.attach-grid i { width: 58px; height: 58px; border-radius: 19px; display: grid; place-items: center; color: #fff; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 78%, #fff), var(--c)); box-shadow: 0 6px 16px color-mix(in srgb, var(--c) 32%, transparent); transition: transform .2s var(--spring); }
.attach-grid button:active i { transform: scale(.9); }
.attach-grid i .icon { width: 28px; height: 28px; }
.send-preview { display: grid; gap: 6px; grid-template-columns: repeat(3, 1fr); margin-bottom: 10px; }
.send-preview.one { grid-template-columns: 1fr; }
.send-preview .sp { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #111; }
.send-preview.one .sp { aspect-ratio: auto; max-height: max(160px, calc(100dvh - 420px - var(--safe-t) - var(--safe-b))); display: grid; place-items: center; }
.send-preview .sp img { width: 100%; height: 100%; object-fit: cover; }
.send-preview.one .sp img { object-fit: contain; max-height: max(160px, calc(100dvh - 420px - var(--safe-t) - var(--safe-b))); }
.send-preview .sp .vbadge { position: absolute; inset-inline-start: 8px; bottom: 8px; padding: 3px 8px; border-radius: 10px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .74rem; font-weight: 650; display: inline-flex; gap: 4px; align-items: center; }
.send-preview .sp .rm { position: absolute; top: 6px; inset-inline-end: 6px; width: 28px; height: 28px; border-radius: 14px; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; }
.skeleton { background: linear-gradient(90deg, var(--fill) 25%, var(--fill-2) 50%, var(--fill) 75%); background-size: 200% 100%; animation: sk 1.4s infinite; border-radius: 8px; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (prefers-contrast: more) { :root { --line: rgba(0, 0, 0, .3); --text-3: #4b5563; } }
@media (min-width: 768px) {
  .row { min-height: 68px; }
  .bar { padding-top: 10px; }
  .composer { padding-bottom: 10px; }
  .m { max-width: min(68%, 620px); }
  .media-b { max-width: 360px; }
}

/* ---------- calls: the buttons step aside while the picture is watched ---------- */
.call .c-btns, .call .c-top, .call .c-who { transition: opacity .3s var(--ease), transform .3s var(--ease); }
.call.bare .c-btns { opacity: 0; transform: translateY(20px); pointer-events: none; }
.call.bare .c-top, .call.bare .c-who { opacity: 0; pointer-events: none; }
.call.audio .c-who { margin-top: 14vh; }
.call.min .call-mini .icon { width: 22px; height: 22px; }

/* ---------- polish after the design review ---------- */
/* The date that floats while scrolling: only the newest one shows, and it leaves when the list stops. */
.day.under { opacity: 0 !important; transition: none; }
/* Names and file names in any script read in their own direction. */
.chat-name, .row-name, .sender, .filecard .fn, .info-top h1, .member .mn, .banner .bt b { unicode-bidi: plaintext; }
/* The hint while holding the microphone never runs under the big button. */
.recbar .slide { text-overflow: ellipsis; }
/* Text on colour keeps a readable contrast. */
:root { --green-text: #1d8a3a; --amber-text: #a96300; --accent-strong: #1a6ff0; }
:root.is-dark { --green-text: #3ad16a; --amber-text: #ffb340; --accent-strong: #2563d9; }
.chat-sub.live, .row-status.st-online { color: var(--green-text); }
.row-status.st-away, .row-status.st-brb, .row-status.st-lunch { color: var(--amber-text); }
:root.is-dark .btn.primary { background: linear-gradient(180deg, #3b7cf0, #2560d6); }
:root.is-dark .chip.on, :root.is-dark .badge.blue { background: var(--accent-strong); }
/* Touch: every control at least 44 points to the finger (the drawing stays the same size). */
@media (pointer: coarse) {
  .hbtn { min-height: 44px; }
  .cbtn { width: 44px; height: 44px; }
  .field .cbtn { width: 36px; height: 36px; }
  .vspeed, .ctx-bar .x, .react, .failed-line, [data-replay], #chatsClear, .search .x, .field .cbtn, .chip, .seg button, .status-pick button { position: relative; }
  .vspeed::after, .ctx-bar .x::after, .react::after, .failed-line::after, [data-replay]::after, #chatsClear::after, .search .x::after, .field .cbtn::after, .chip::after, .seg button::after, .status-pick button::after { content: ""; position: absolute; inset: -9px -6px; }
}
/* The chat header keeps room for the name next to its three actions. */
.chat-bar #cActs { gap: 0 !important; }
.chat-bar #cActs .hbtn.round { width: 40px; min-width: 40px; }
@media (max-width: 380px) { .chat-bar #cActs .hbtn.round { width: 36px; min-width: 36px; } .chat-bar #cActs .hbtn.round .icon { width: 23px; height: 23px; } }
/* The invitation's two buttons, one above the other on narrow screens. */
@media (max-width: 420px) { .qr-acts { flex-direction: column; } }
.qr-acts .btn { white-space: nowrap; }
/* A call made small: a pill above everything, the screens moved down to make room (phones);
   a small card at the corner (computers). */
body.call-min .pane-list, body.call-min .pane-chat { top: 64px; transition: top .3s var(--ease); }
@media (min-width: 768px) {
  body.call-min .pane-list, body.call-min .pane-chat { top: 0; }
  .call.min { inset: auto calc(20px + var(--safe-r)) calc(96px + var(--safe-b)) auto; width: 320px; }
}
/* Talking: the small picture (mine, or theirs after a tap on it) in a corner, the other one full. */
.call.talking .pip { cursor: pointer; }
.call.swapped.talking .local.on { inset: 0; top: 0; bottom: auto; width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; border: 0; box-shadow: none; z-index: 0; }
.call.swapped.talking .remote.pip { inset: auto; top: var(--pip-t); bottom: var(--pip-b); inset-inline-end: var(--pip-e); inset-inline-start: var(--pip-s); width: 104px; height: auto; aspect-ratio: 3 / 4; border-radius: 18px; border: 2px solid rgba(255, 255, 255, .7); box-shadow: 0 8px 24px rgba(0, 0, 0, .5); z-index: 3; touch-action: none; }
/* Video before it connects: the camera fills the screen behind the name, as in a mirror. */
.call .local:not(.on), .call:not(.talking) .remote { opacity: 0; pointer-events: none; }
.call.video-on:not(.talking) .local.on { inset: 0; top: 0; width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; border: 0; box-shadow: none; z-index: 0; }
.call.video-on:not(.talking)::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, .55), transparent 35%, transparent 65%, rgba(0, 0, 0, .6)); }
.call.video-on:not(.talking) .c-who h2, .call.video-on:not(.talking) .c-who span { text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
/* The photo viewer's actions stay together on wide screens. */
.viewer .vbot { justify-content: center; gap: 28px; }
/* Long forms keep their main button in sight. */
/* Sending photos: the message, the circled 1 inside it, and the send button; 4K up in the corner. */
.sheet-body .sp-go { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: flex-end; gap: 8px; padding: 10px 0 6px; background: linear-gradient(transparent, var(--sheet-bg, var(--bg)) 30%); }
.sp-go .field { padding-inline-end: 4px; }
.sp-go .cbtn.send { width: 42px; height: 42px; border-radius: 21px; }
.sp-once { width: 34px; height: 34px; margin: 3px 0; border-radius: 17px; flex: none; display: grid; place-items: center; color: var(--text-3); transition: background .15s, color .15s, transform .2s var(--spring); }
.sp-once .icon { width: 24px; height: 24px; }
.sp-once.on { background: var(--accent); color: #fff; }
.sp-once:active { transform: scale(.88); }
/* 4K: a quality seal, in black and white. Off, a fine outline; on, solid, with a sheen passing once. */
.q4k { position: relative; height: 30px; min-width: 44px; padding: 0 10px; justify-content: center; border-radius: 8px; display: inline-flex; align-items: center; gap: 7px; overflow: hidden; color: var(--text-2); box-shadow: inset 0 0 0 1.25px currentColor; transition: color .2s, background .2s, box-shadow .2s, transform .22s var(--spring); }
.q4k b { font-size: .92rem; font-weight: 800; letter-spacing: .01em; line-height: 1; }
.q4k.on { color: var(--bg); background: var(--text); box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.q4k.on::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); transform: translateX(-120%); }
:root.is-dark .q4k.on::after { background: linear-gradient(105deg, transparent 30%, rgba(0, 0, 0, .25) 50%, transparent 70%); }
.q4k.flash::after { animation: q4kShine .7s ease-out; }
@keyframes q4kShine { to { transform: translateX(120%); } }
.q4k:active { transform: scale(.92); }
/* Draw and write on a photo before it goes. */
.send-preview .sp-tools { position: absolute; top: 8px; inset-inline-start: 8px; display: flex; gap: 6px; }
.send-preview .sp-tools button { width: 34px; height: 34px; border-radius: 17px; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 0 0 .5px rgba(255, 255, 255, .25); transition: transform .18s var(--spring); }
.send-preview .sp-tools button:active { transform: scale(.9); }
.send-preview .sp-tools .icon { width: 18px; height: 18px; }
.send-preview .sp-tools .aa, .ed .aa { font-weight: 800; font-size: .86rem; letter-spacing: -.02em; }
.send-preview:not(.one) .sp-tools button { width: 28px; height: 28px; }
.send-preview:not(.one) .sp-tools .icon { width: 15px; height: 15px; }
.sheet-body .sticky-go { position: sticky; bottom: 0; padding: 10px 0 6px; background: linear-gradient(transparent, var(--sheet-bg, var(--bg)) 30%); z-index: 2; }

/* Orby for Mac and Windows (src/main/desktop.js). On the Mac the window has no title bar of its own:
   the top of the screens is where it is dragged from, with room for the three buttons on the left. */
html.desktop.mac { --safe-t: 26px; }
html.desktop.mac .bar { padding-top: calc(var(--safe-t) + 6px); }
html.desktop.mac .bar, html.desktop.mac .wl-in { -webkit-app-region: drag; }
html.desktop.mac .bar :is(button, a, input, textarea, select, label, summary, [role=button], [role=radio], [data-act], [tabindex]),
html.desktop.mac .wl-in :is(button, a, input, textarea, select, label, [role=button]) { -webkit-app-region: no-drag; }
html.desktop .layer { -webkit-app-region: no-drag; }

/* ---------- 2.2: messages live 48 hours (time-fx.js) ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* A finger holding a message or a tab opens what it should, never a text selection. */
/* Nothing on the screen is picked up as text by holding or dragging it: buttons, tabs, lists, the
   messages too (holding one opens its reactions and its menu, with Copy). Only the places to write. */
html, body, button, a, label, .app, .screen, .chat, .sheet, .msgmenu, .call { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
* { -webkit-tap-highlight-color: transparent; }
input, textarea, [contenteditable="true"], [contenteditable="plaintext-only"], .selectable { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
img, svg { -webkit-user-drag: none; }
.tab.holding .icon { transform: scale(.82); transition: transform 2s cubic-bezier(.3, 0, .2, 1); }
.msgmenu.held .reactbar button { width: 41px; }
.reactbar button.more.acts .icon { width: 22px; height: 22px; }
.bar-pad { width: 40px; height: 40px; flex: none; }
.m.leaving, .m.ghost { pointer-events: none; }
.quote.gone { cursor: default; }
.quote.gone span { font-style: italic; opacity: .72; }

/* Outlines of messages that expired: where they were, as they were, without a word of them. */
.bub.gh { display: flex; flex-direction: column; justify-content: center; gap: 7px; padding: 11px 14px; min-height: 37px; }
.bub.gh .gl { display: flex; flex-direction: column; gap: 7px; width: 100%; }
.bub.gh .gl i { display: block; height: 9px; border-radius: 5px; background: currentColor; opacity: .15; }
.bub.gh .gl i:nth-child(2) { width: 84%; }
.bub.gh .gl i:nth-child(3) { width: 56%; }
.m.me .bub.gh .gl i { opacity: .32; }
.bub.gh .gm { align-self: flex-end; width: 30px; height: 6px; border-radius: 3px; background: currentColor; opacity: .1; margin-top: -2px; }
.bub.gh.gs1 { width: 96px; }
.bub.gh.gs2 { width: 176px; }
.bub.gh.gs3 { width: 228px; }
.bub.gh.gs4 { width: 258px; }
.bub.gh-e { background: transparent !important; box-shadow: none !important; padding: 2px 0; }
.bub.gh-e .ge { display: flex; gap: 6px; }
.bub.gh-e .ge i { width: 38px; height: 38px; border-radius: 50%; background: currentColor; opacity: .14; }
.bub.gh-v, .bub.gh-f { width: 240px; }
.bub.gh-v .gv { display: flex; align-items: center; gap: 3px; height: 38px; }
.bub.gh-v .gv b, .bub.gh-f .gf b { width: 36px; height: 36px; border-radius: 50%; background: currentColor; opacity: .16; flex: none; margin-inline-end: 8px; }
.bub.gh-v .gv i { width: 3px; border-radius: 2px; background: currentColor; opacity: .26; height: 30%; flex: none; }
.bub.gh-v .gv i:nth-child(3n) { height: 62%; }
.bub.gh-v .gv i:nth-child(4n+1) { height: 46%; }
.bub.gh-v .gv i:nth-child(5n) { height: 78%; }
.bub.gh-f .gf { display: flex; align-items: center; }
.bub.gh-f .gf b { border-radius: 9px; }
.media-b.gh-m { background: var(--them); background: linear-gradient(160deg, color-mix(in srgb, var(--them) 74%, #8ea4dc), color-mix(in srgb, var(--them) 90%, #8ea4dc)); box-shadow: 0 1px .5px rgba(10, 30, 60, .1); max-width: 100%; }
.media-b.gh-m.gs1 { width: 262px; aspect-ratio: 4 / 3; }
.media-b.gh-m.gs2 { width: 228px; aspect-ratio: 1; }
.media-b.gh-m.gs3 { width: 206px; aspect-ratio: 3 / 4; }
.sys.ghost-sys i { display: block; width: 150px; height: 8px; border-radius: 4px; background: currentColor; opacity: .16; }

/* The past: liquid glass above the oldest message (drawn by WebGL; the rest is for without it). */
.past-zone { position: relative; flex: none; overflow: hidden; pointer-events: none; contain: layout paint; }
.past-zone canvas { position: absolute; left: 0; top: 0; display: block; }
.past-zone.pz-css { background: linear-gradient(to top, transparent 0%, color-mix(in srgb, var(--wall-bg) 35%, transparent) 50%, color-mix(in srgb, var(--wall-bg) 60%, transparent) 100%); }
.past-zone.pz-css::before { content: ""; position: absolute; inset: 0; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); -webkit-mask-image: linear-gradient(to top, transparent, #000 70%); mask-image: linear-gradient(to top, transparent, #000 70%); }
.past-zone .pz-shape { position: absolute; border-radius: 20px; background: var(--them); }
.past-zone .pz-shape.me { background: linear-gradient(180deg, var(--me-1), var(--me-2)); }
.past-zone .pz-text { position: absolute; left: 0; right: 0; transform: translateY(-50%); text-align: center; font-weight: 600; font-size: clamp(21px, 6.4vw, 29px); letter-spacing: .01em; color: rgba(40, 44, 80, .82); text-shadow: -1px 0 rgba(0, 190, 255, .35), 1px 0 rgba(255, 70, 200, .3), 0 0 22px rgba(150, 130, 255, .35); filter: blur(.3px); }
:root.is-dark .past-zone .pz-text { color: rgba(232, 236, 255, .86); }
/* The top of a short conversation, pulled: the edge bulges a little, a lens of tinted glass with a
   bright meniscus, and lets go (time-fx.js, Edge). Gradients and a mask only: no blur, no layout. */
.edge-glow { position: absolute; left: -6%; right: -6%; top: 0; height: 150px; pointer-events: none; opacity: 0; z-index: 2; transform-origin: 50% 0;
  background: radial-gradient(ellipse 56% 100% at 50% 0%, rgba(255, 255, 255, 0) 0 80%, rgba(255, 255, 255, .42) 90%, rgba(255, 255, 255, 0) 97%),
    linear-gradient(90deg, rgba(70, 190, 255, .62), rgba(120, 110, 255, .66) 50%, rgba(225, 110, 235, .56));
  -webkit-mask-image: radial-gradient(ellipse 56% 100% at 50% 0%, rgba(0, 0, 0, .22) 0%, rgba(0, 0, 0, .3) 62%, #000 90%, transparent 97%);
  mask-image: radial-gradient(ellipse 56% 100% at 50% 0%, rgba(0, 0, 0, .22) 0%, rgba(0, 0, 0, .3) 62%, #000 90%, transparent 97%); }
/* What the pull opens above the past: night, and the past fades into it (no wallpaper, no seam). */
.edge-void { position: absolute; left: 0; right: 0; top: 0; height: 0; background: #000; pointer-events: none; z-index: 1; display: none; }
.edge-void.on { display: block; }
@property --edge-k { syntax: "<number>"; inherits: true; initial-value: 0; }
.past-zone::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 190px; pointer-events: none; z-index: 1;
  background: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .82) 22%, rgba(0, 0, 0, .4) 55%, transparent 100%); opacity: calc(var(--edge-k, 0) * 6); }
:root:not(.is-dark) .edge-glow { background: radial-gradient(ellipse 56% 100% at 50% 0%, rgba(255, 255, 255, 0) 0 80%, rgba(255, 255, 255, .7) 90%, rgba(255, 255, 255, 0) 97%),
    linear-gradient(90deg, rgba(40, 150, 240, .42), rgba(100, 90, 240, .46) 50%, rgba(210, 90, 220, .4)); }

/* ---------- 2.2: calls in the conversation (like WhatsApp: on the side of who called) ---------- */
.bub.callcard { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; min-width: 210px; text-align: start; font: inherit; color: inherit; cursor: pointer; }
.bub.callcard .cc-ic { width: 40px; height: 40px; border-radius: 20px; display: grid; place-items: center; background: color-mix(in srgb, currentColor 10%, transparent); flex: none; }
.bub.callcard .cc-ic .icon { width: 21px; height: 21px; }
.bub.callcard .cc-b { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.bub.callcard .cc-b b { font-weight: 650; font-size: .95rem; }
.bub.callcard .cc-s { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; opacity: .72; font-variant-numeric: tabular-nums; }
.bub.callcard .cc-s .icon { width: 13px; height: 13px; }
.bub.callcard.missed .cc-ic { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.bub.callcard.missed .cc-s .icon { color: var(--red); }
.bub.callcard .meta { align-self: flex-end; margin: 0 0 -3px 4px; }
.call-missed, .call-missed .mi { color: var(--red); }

/* ---------- 2.2: five tabs; Calls; Meteors ---------- */
.tab > span:not(.badge) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.call-row .row-name { font-weight: 600; }
.call-row.missed .row-name { color: var(--red); }
.call-sub { display: flex; align-items: center; gap: 5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.call-sub .icon { width: 14px; height: 14px; flex: none; }
.call-row.missed .call-sub .icon { color: var(--red); }
.call-row .call-kind { color: var(--text-3); display: grid; place-items: center; }
.call-row .call-kind .icon { width: 20px; height: 20px; }
.call-row .call-info { color: var(--accent); }
.nc-row .mn { flex: 1; min-width: 0; display: flex; flex-direction: column; font-weight: 600; }
.nc-row .mn small { font-weight: 500; color: var(--text-2); font-size: .8rem; }
.nc-row .hbtn { color: var(--accent); }

.met-ring { position: relative; width: 60px; height: 60px; flex: none; display: grid; place-items: center; }
.met-ring svg { position: absolute; inset: 0; width: 60px; height: 60px; }
.met-ring circle { fill: none; stroke-width: 2.6; stroke-linecap: round; }
.met-ring circle.lit { stroke: url(#metg); }
.met-ring circle.seen { stroke: var(--line-2); stroke-width: 2; }
.met-ring .av { --s: 50px; }
.met-ring.add .met-plus { position: absolute; right: 2px; bottom: 2px; width: 22px; height: 22px; border-radius: 11px; background: var(--accent); color: #fff; display: grid; place-items: center; border: 2.5px solid var(--bg); }
.met-ring.add .met-plus .icon { width: 13px; height: 13px; }
.met-row { min-height: 76px; }
.met-row .hbtn { color: var(--accent); }
.met-empty { padding-top: 26px; }
.toast.met-up { flex-direction: column; align-items: stretch; gap: 8px; min-width: 240px; }
.toast.met-up i { display: block; height: 4px; border-radius: 2px; background: var(--fill); overflow: hidden; }
.toast.met-up b { display: block; height: 100%; background: linear-gradient(90deg, #3fd0ff, #7a6bff, #e85bd8); transition: width .25s linear; }

.met-post .sheet-body { display: flex; flex-direction: column; }
.met-prev { position: relative; flex: 1; min-height: 240px; max-height: 58vh; border-radius: 18px; overflow: hidden; background: #000; display: grid; place-items: center; margin-bottom: 12px; }
.met-prev img, .met-prev video { width: 100%; height: 100%; object-fit: contain; display: block; }
.met-prev .met-dur { position: absolute; right: 10px; bottom: 10px; padding: 3px 8px; border-radius: 10px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .78rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.met-cap { margin: 0; }

.met-view { position: fixed; inset: 0; z-index: 180; background: #000; color: #fff; opacity: 0; transition: opacity .25s var(--ease), transform .25s var(--ease); touch-action: none; overflow: hidden; }
.met-view.show { opacity: 1; }
/* Pulled down to close: it follows the finger with no delay, then settles back or leaves. */
.met-view.pulling { transition: none; will-change: transform, filter, opacity; }
.met-view.settling { transition: transform .32s cubic-bezier(.2, .9, .3, 1), opacity .32s, filter .32s, border-radius .32s; }
.met-view.leaving { transition: transform .23s cubic-bezier(.4, 0, 1, 1), opacity .23s, filter .23s; pointer-events: none; }
.met-view .mv-back { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(30px) brightness(.55); transform: scale(1.1); }
.met-view .mv-stage { position: absolute; inset: 0; display: grid; place-items: center; }
.met-view .mv-media, .met-view .mv-thumb { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; display: block; }
.met-view .mv-thumb { filter: blur(6px); opacity: .7; }
.met-view .mv-spin { position: absolute; }
.met-view .mv-stage > * { grid-area: 1 / 1; }
.met-view .mv-media.loading { opacity: 0; }
.met-view .mv-media { transition: opacity .2s; }
.met-view .mv-gone { padding: 20px; text-align: center; opacity: .8; }
.met-view .mv-top { position: absolute; left: 0; right: 0; top: 0; padding: calc(var(--safe-t) + 8px) 10px 18px; background: linear-gradient(rgba(0, 0, 0, .55), transparent); z-index: 2; }
.met-view .mv-bars { display: flex; gap: 4px; padding: 0 2px; }
.met-view .mv-bars i { flex: 1; height: 2.6px; border-radius: 2px; background: rgba(255, 255, 255, .32); overflow: hidden; }
.met-view .mv-bars b { display: block; height: 100%; width: 0; background: #fff; }
.met-view .mv-who { display: flex; align-items: center; gap: 9px; margin-top: 10px; }
.met-view .mv-who .av { --s: 34px; }
.met-view .mv-name { font-weight: 650; font-size: .95rem; }
.met-view .mv-time { opacity: .7; font-size: .82rem; }
.met-view .mv-btn { width: 40px; height: 40px; border-radius: 20px; display: grid; place-items: center; color: #fff; }
.met-view .mv-btn .icon { width: 24px; height: 24px; }
.met-view .mv-cap { position: absolute; left: 0; right: 0; bottom: calc(var(--safe-b) + 76px); padding: 10px 18px; text-align: center; font-size: 1rem; line-height: 1.4; text-shadow: 0 1px 6px rgba(0, 0, 0, .7); z-index: 2; }
.met-view .mv-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px calc(var(--safe-b) + 12px); background: linear-gradient(transparent, rgba(0, 0, 0, .5)); z-index: 2; }
.met-view .mv-reply { display: flex; gap: 8px; align-items: center; }
.met-view .mv-reply input { flex: 1; min-width: 0; height: 44px; border-radius: 22px; border: 1px solid rgba(255, 255, 255, .45); background: rgba(0, 0, 0, .25); color: #fff; padding: 0 16px; font: inherit; font-size: 1rem; }
.met-view .mv-reply input::placeholder { color: rgba(255, 255, 255, .75); }
.met-view .mv-send { width: 44px; height: 44px; border-radius: 22px; display: grid; place-items: center; color: #fff; }
.met-view .mv-seen { display: flex; align-items: center; gap: 8px; margin: 0 auto; padding: 10px 16px; border-radius: 20px; background: rgba(255, 255, 255, .14); color: #fff; font-weight: 600; font-size: .9rem; }
.met-view .mv-seen .icon { width: 20px; height: 20px; }
.met-view.paused .mv-top, .met-view.paused .mv-cap { opacity: .35; transition: opacity .2s; }
.met-view.muted-start::after { content: "🔇"; position: absolute; right: 16px; bottom: calc(var(--safe-b) + 84px); font-size: 1.3rem; z-index: 3; opacity: .85; }

/* ---------- 2.4: the launch, in the look of the icon (splash.js draws the orbs and the stars) ---------- */
#splash { position: fixed; inset: 0; z-index: 1000; overflow: hidden; color-scheme: dark; }
#splash .sp-bg { position: absolute; inset: 0;
  background: radial-gradient(60% 42% at 47% 44%, rgba(29, 75, 255, .24), transparent 72%), radial-gradient(34% 26% at 66% 34%, rgba(255, 106, 26, .12), transparent 70%), radial-gradient(48% 38% at 18% 14%, rgba(106, 44, 255, .16), transparent 72%), radial-gradient(120% 80% at 50% 45%, transparent 55%, rgba(0, 0, 0, .55)), linear-gradient(160deg, #131843 0%, #080b24 52%, #020310 100%);
  transition: opacity .34s cubic-bezier(.4, 0, .2, 1); }
#splash .sp-sky, #splash .sp-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#splash .sp-canvas { transition: opacity .38s ease .22s, filter .38s ease .22s, transform .46s cubic-bezier(.3, .7, .2, 1) .18s; will-change: opacity, filter, transform; }
/* Leaving: the night first, then the orbs, softly out of focus. */
#splash.out { pointer-events: none; }
#splash.out .sp-bg { opacity: 0; }
#splash.out .sp-word { animation: none; opacity: 0; filter: blur(6px); transition: opacity .26s ease, filter .26s ease; }
#splash.out .sp-canvas { opacity: 0; filter: blur(16px); transform: scale(1.07); }
#splash .sp-word { position: absolute; left: 0; right: 0; top: var(--sp-word, 66%); display: flex; justify-content: center; align-items: baseline; gap: 7px; color: #fff; font-family: var(--font-round, var(--font)); font-size: 1.7rem; line-height: 1; letter-spacing: -.02em; text-shadow: -.8px 0 rgba(255, 50, 100, .45), .8px 0 rgba(40, 200, 255, .45); animation: spWord .6s cubic-bezier(.2, .8, .2, 1) .22s both; }
#splash .sp-word b { font-weight: 800; }
#splash .sp-word span { font-weight: 500; opacity: .7; }
@keyframes spWord {
  from { opacity: 0; transform: translateY(10px); letter-spacing: .1em; text-shadow: -9px 0 rgba(255, 50, 100, .7), 9px 0 rgba(40, 200, 255, .7); }
  to { opacity: 1; transform: none; letter-spacing: -.02em; text-shadow: -.8px 0 rgba(255, 50, 100, .45), .8px 0 rgba(40, 200, 255, .45); }
}
@media (prefers-reduced-motion: reduce) { #splash .sp-word { animation: none; } }

/* ---------- 2.3: Meteors: a bigger meteor with a + to post one; the + before "Tap to post" ---------- */
.hbtn.round.met-new { width: 46px; min-width: 46px; height: 46px; }
.hbtn.round.met-new .icon { width: 32px; height: 32px; }
.met-tap { display: inline-flex; align-items: center; gap: 4px; }
.met-tap .icon { width: 14px; height: 14px; flex: none; opacity: .8; }

/* ---------- 2.3: Calls, simpler: favorites on top, the history under a soft line, New call on glass ---------- */
.favs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 6px 12px 16px; }
.fav { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; padding: 4px 0; border-radius: 18px; transition: transform .18s var(--spring); }
.fav:active { transform: scale(.94); }
.fav > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; font-weight: 600; color: var(--text); }
.fav .av { box-shadow: 0 6px 16px rgba(10, 30, 60, .14); border-radius: 50%; }
.fav.add > span:last-child { color: var(--text-2); font-weight: 560; }
.fav-plus { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; color: var(--accent); background: var(--fill); border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, transparent); }
.fav-plus .icon { width: 26px; height: 26px; }
.calls-h { margin: 0 16px; padding: 14px 4px 6px; border-top: .5px solid var(--line); font-size: .82rem; font-weight: 650; letter-spacing: .02em; color: var(--text-2); }
.call-row { min-height: 60px; }
.call-row .call-kind { opacity: .7; }
.call-row.out .call-sub .icon { color: var(--green, #2fc152); }
.call-row.in:not(.missed) .call-sub .icon { color: var(--accent); }
.calls-f { padding: 14px 20px !important; }
.calls-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 28px 10px; text-align: center; color: var(--text-2); }
.calls-empty b { color: var(--text); font-size: 1.02rem; }
.calls-empty span { font-size: .9rem; max-width: 300px; }
.fav-add-ic { color: var(--accent); display: grid; place-items: center; }
.fav-add-ic .icon { width: 22px; height: 22px; }
button.member.nc-row { width: 100%; text-align: start; }
.calls-new { position: absolute; z-index: 9; left: 50%; bottom: calc(var(--tab-lift) + var(--tabbar) + 24px); transform: translateX(-50%); height: 50px; padding: 0 24px 0 20px; border-radius: 25px; display: inline-flex; align-items: center; gap: 9px; font-weight: 650; font-size: .98rem; white-space: nowrap; transition: opacity .35s ease, transform .35s var(--spring), visibility 0s; }
.calls-new .icon { width: 22px; height: 22px; }
/* New call: a glass plus, higher above the tabs. */
.calls-new.away { opacity: 0; visibility: hidden; transform: translate(-50%, 14px) scale(.96); transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s; pointer-events: none; }
.calls-new:active { transform: translateX(-50%) scale(.95); }
#tabCalls .tab-content { padding-bottom: calc(var(--tabbar) + var(--tab-lift) + 84px); }
/* On a computer the bar is flat along the foot: the button floats just above it. */
.lg-flat .calls-new { bottom: calc(56px + var(--safe-b) + 24px); border-radius: 25px; border-top: 0; box-shadow: 0 10px 28px rgba(8, 14, 28, .18), 0 0 0 .5px var(--line); }
/* New call: a calm frosted glass (no lens, no split light), clean over a plain white list too. */
.calls-new.calm-glass { color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .3); background: rgba(14, 18, 28, .5); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 10px 26px rgba(8, 14, 28, .22), 0 2px 6px rgba(8, 14, 28, .14), 0 0 0 .5px rgba(0, 0, 0, .18), inset 0 1px .5px rgba(255, 255, 255, .42), inset 0 -1px .5px rgba(255, 255, 255, .08); }
:root.is-dark .calls-new.calm-glass { background: rgba(8, 10, 18, .55); box-shadow: 0 10px 26px rgba(0, 0, 0, .35), 0 0 0 .5px rgba(255, 255, 255, .1), inset 0 1px .5px rgba(255, 255, 255, .3); }
.calls-new.calm-glass .icon { filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .3)); }
:root.lg-flat .calls-new.calm-glass { color: var(--accent); text-shadow: none; box-shadow: 0 10px 28px rgba(8, 14, 28, .18), 0 0 0 .5px var(--line); background: var(--glass-strong); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); }
.lg-flat .calls-new.calm-glass .icon { filter: none; }
@media (prefers-reduced-transparency: reduce) { .calls-new.calm-glass { background: #1c2230; -webkit-backdrop-filter: none; backdrop-filter: none; } }

/* ---------- 2.3: soft gradient backgrounds (almost one color, lighter at the top), chosen sideways ---------- */
.chat { background: var(--wall-grad, var(--wall-bg, var(--chat-bg))); }
:root[data-wall="g-sky"] { --wall-img: none; --wall-ink: transparent; --wall-bg: #dcebff; --wall-grad: linear-gradient(180deg, #f1f7ff, #dcebff); }
:root.is-dark[data-wall="g-sky"] { --wall-bg: #0a1322; --wall-grad: linear-gradient(180deg, #101b2e, #0a1322); }
.wall-pick .wp[data-w="g-sky"] { --wm: none; --wi: transparent; --wb: linear-gradient(180deg, #f1f7ff, #dcebff); }
:root.is-dark .wall-pick .wp[data-w="g-sky"] { --wb: linear-gradient(180deg, #101b2e, #0a1322); }
:root[data-wall="g-mint"] { --wall-img: none; --wall-ink: transparent; --wall-bg: #d9f2e6; --wall-grad: linear-gradient(180deg, #f0fbf5, #d9f2e6); }
:root.is-dark[data-wall="g-mint"] { --wall-bg: #0a1712; --wall-grad: linear-gradient(180deg, #0f2019, #0a1712); }
.wall-pick .wp[data-w="g-mint"] { --wm: none; --wi: transparent; --wb: linear-gradient(180deg, #f0fbf5, #d9f2e6); }
:root.is-dark .wall-pick .wp[data-w="g-mint"] { --wb: linear-gradient(180deg, #0f2019, #0a1712); }
:root[data-wall="g-lavender"] { --wall-img: none; --wall-ink: transparent; --wall-bg: #e6ddff; --wall-grad: linear-gradient(180deg, #f6f2ff, #e6ddff); }
:root.is-dark[data-wall="g-lavender"] { --wall-bg: #100d1f; --wall-grad: linear-gradient(180deg, #18142b, #100d1f); }
.wall-pick .wp[data-w="g-lavender"] { --wm: none; --wi: transparent; --wb: linear-gradient(180deg, #f6f2ff, #e6ddff); }
:root.is-dark .wall-pick .wp[data-w="g-lavender"] { --wb: linear-gradient(180deg, #18142b, #100d1f); }
:root[data-wall="g-peach"] { --wall-img: none; --wall-ink: transparent; --wall-bg: #ffe3d1; --wall-grad: linear-gradient(180deg, #fff6ef, #ffe3d1); }
:root.is-dark[data-wall="g-peach"] { --wall-bg: #1a110c; --wall-grad: linear-gradient(180deg, #251912, #1a110c); }
.wall-pick .wp[data-w="g-peach"] { --wm: none; --wi: transparent; --wb: linear-gradient(180deg, #fff6ef, #ffe3d1); }
:root.is-dark .wall-pick .wp[data-w="g-peach"] { --wb: linear-gradient(180deg, #251912, #1a110c); }
:root[data-wall="g-rose"] { --wall-img: none; --wall-ink: transparent; --wall-bg: #ffdde7; --wall-grad: linear-gradient(180deg, #fff3f6, #ffdde7); }
:root.is-dark[data-wall="g-rose"] { --wall-bg: #1a0d13; --wall-grad: linear-gradient(180deg, #25131b, #1a0d13); }
.wall-pick .wp[data-w="g-rose"] { --wm: none; --wi: transparent; --wb: linear-gradient(180deg, #fff3f6, #ffdde7); }
:root.is-dark .wall-pick .wp[data-w="g-rose"] { --wb: linear-gradient(180deg, #25131b, #1a0d13); }
:root[data-wall="g-sand"] { --wall-img: none; --wall-ink: transparent; --wall-bg: #f1e7d3; --wall-grad: linear-gradient(180deg, #fcf9f1, #f1e7d3); }
:root.is-dark[data-wall="g-sand"] { --wall-bg: #16130d; --wall-grad: linear-gradient(180deg, #201c14, #16130d); }
.wall-pick .wp[data-w="g-sand"] { --wm: none; --wi: transparent; --wb: linear-gradient(180deg, #fcf9f1, #f1e7d3); }
:root.is-dark .wall-pick .wp[data-w="g-sand"] { --wb: linear-gradient(180deg, #201c14, #16130d); }
:root[data-wall="g-lemon"] { --wall-img: none; --wall-ink: transparent; --wall-bg: #fff1b8; --wall-grad: linear-gradient(180deg, #fffcea, #fff1b8); }
:root.is-dark[data-wall="g-lemon"] { --wall-bg: #18160a; --wall-grad: linear-gradient(180deg, #232111, #18160a); }
.wall-pick .wp[data-w="g-lemon"] { --wm: none; --wi: transparent; --wb: linear-gradient(180deg, #fffcea, #fff1b8); }
:root.is-dark .wall-pick .wp[data-w="g-lemon"] { --wb: linear-gradient(180deg, #232111, #18160a); }
:root[data-wall="g-ocean"] { --wall-img: none; --wall-ink: transparent; --wall-bg: #d2eef4; --wall-grad: linear-gradient(180deg, #eefafc, #d2eef4); }
:root.is-dark[data-wall="g-ocean"] { --wall-bg: #091619; --wall-grad: linear-gradient(180deg, #0e1f23, #091619); }
.wall-pick .wp[data-w="g-ocean"] { --wm: none; --wi: transparent; --wb: linear-gradient(180deg, #eefafc, #d2eef4); }
:root.is-dark .wall-pick .wp[data-w="g-ocean"] { --wb: linear-gradient(180deg, #0e1f23, #091619); }
:root[data-wall="g-grape"] { --wall-img: none; --wall-ink: transparent; --wall-bg: #ead8f3; --wall-grad: linear-gradient(180deg, #f9f1fc, #ead8f3); }
:root.is-dark[data-wall="g-grape"] { --wall-bg: #160c1b; --wall-grad: linear-gradient(180deg, #201327, #160c1b); }
.wall-pick .wp[data-w="g-grape"] { --wm: none; --wi: transparent; --wb: linear-gradient(180deg, #f9f1fc, #ead8f3); }
:root.is-dark .wall-pick .wp[data-w="g-grape"] { --wb: linear-gradient(180deg, #201327, #160c1b); }
:root[data-wall="g-fog"] { --wall-img: none; --wall-ink: transparent; --wall-bg: #e3e8ef; --wall-grad: linear-gradient(180deg, #f5f7fa, #e3e8ef); }
:root.is-dark[data-wall="g-fog"] { --wall-bg: #0f1115; --wall-grad: linear-gradient(180deg, #16191e, #0f1115); }
.wall-pick .wp[data-w="g-fog"] { --wm: none; --wi: transparent; --wb: linear-gradient(180deg, #f5f7fa, #e3e8ef); }
:root.is-dark .wall-pick .wp[data-w="g-fog"] { --wb: linear-gradient(180deg, #16191e, #0f1115); }
.wall-pick .wp[data-w^="g-"]::before { display: none; }
.me-sub { padding: 12px 16px 0; font-size: .86rem; font-weight: 600; color: var(--text-2); }
/* Sideways: three and a half at a time, so the half one says there are more. */
.wall-pick.slide, .bub-pick.slide { --gap: 12px; display: flex; grid-template-columns: none; gap: var(--gap); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; padding: 12px 16px 14px; scroll-padding-inline: 16px; }
.wall-pick.slide::-webkit-scrollbar, .bub-pick.slide::-webkit-scrollbar { display: none; }
.wall-pick.slide > button, .bub-pick.slide > button { flex: 0 0 calc((100% - 3 * var(--gap)) / 3.5); min-width: 0; scroll-snap-align: start; }
.wall-pick.slide > button > span:last-child, .bub-pick.slide > button > span:last-child { max-width: 100%; font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 2.3: the colors of the bubbles (presets that read well: mine and theirs together) ---------- */
.bub-pick button { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: .8rem; font-weight: 600; color: var(--text-2); }
.bub-pick .bp { position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 16px; background: var(--wall-grad, var(--wall-bg)); box-shadow: 0 0 0 1px var(--line), 0 4px 14px rgba(0, 0, 0, .08); transition: transform .2s var(--spring), box-shadow .2s; overflow: hidden; }
.bub-pick .bp i { position: absolute; height: 14px; border-radius: 8px; }
.bub-pick .bp i.r { left: 10%; top: 22%; width: 54%; background: var(--pt); box-shadow: 0 1px 1px rgba(0, 0, 0, .08); }
.bub-pick .bp i.s { right: 10%; top: 44%; width: 58%; background: linear-gradient(180deg, var(--p1), var(--p2)); }
.bub-pick .bp i.r2 { left: 10%; top: 66%; width: 40%; background: var(--pt); box-shadow: 0 1px 1px rgba(0, 0, 0, .08); }
.bub-pick .bp i.s::after { content: ""; position: absolute; left: 22%; right: 22%; top: 6px; height: 2px; border-radius: 1px; background: var(--pi); opacity: .85; }
.bub-pick .bp i.r::after, .bub-pick .bp i.r2::after { content: ""; position: absolute; left: 18%; right: 26%; top: 6px; height: 2px; border-radius: 1px; background: var(--pti); opacity: .7; }
.bub-pick button[aria-checked="true"] { color: var(--accent); }
.bub-pick button[aria-checked="true"] .bp { box-shadow: 0 0 0 2.5px var(--accent), 0 6px 18px rgba(26, 111, 240, .25); transform: scale(1.02); }
.bub-pick button:active .bp { transform: scale(.96); }
.bub-pick .bp[data-b="orby"] { --p1: #3e8dff; --p2: #1966ea; --pi: #fff; --pt: #fff; --pti: #0c1a2d; }
:root.is-dark .bub-pick .bp[data-b="orby"] { --p1: #3685ff; --p2: #1658d6; --pt: #1d2637; --pti: #eef3fb; }
:root[data-bub="graphite"] { --me-1: #48484c; --me-2: #2c2c2e; --me-ink: #ffffff; --me-ink-2: rgba(255, 255, 255, .72); --them: #eef0f3; --them-ink: #0c1a2d; --them-ink-2: #6b7788; }
:root.is-dark[data-bub="graphite"] { --me-1: #ececf0; --me-2: #d4d4da; --me-ink: #1c1c1e; --me-ink-2: rgba(28, 28, 30, .6); --them: #24272d; --them-ink: #eef3fb; --them-ink-2: #9aa6b8; }
.bub-pick .bp[data-b="graphite"] { --p1: #48484c; --p2: #2c2c2e; --pi: #ffffff; --pt: #eef0f3; --pti: #0c1a2d; }
:root.is-dark .bub-pick .bp[data-b="graphite"] { --p1: #ececf0; --p2: #d4d4da; --pi: #1c1c1e; --pt: #24272d; --pti: #eef3fb; }
:root[data-bub="sun"] { --me-1: #ffd84d; --me-2: #ffc61a; --me-ink: #1c1c1e; --me-ink-2: rgba(28, 28, 30, .62); --them: #fff6cf; --them-ink: #0c1a2d; --them-ink-2: #6b7788; }
:root.is-dark[data-bub="sun"] { --them: #2f2a16; --them-ink: #eef3fb; --them-ink-2: #9aa6b8; }
.bub-pick .bp[data-b="sun"] { --p1: #ffd84d; --p2: #ffc61a; --pi: #1c1c1e; --pt: #fff6cf; --pti: #0c1a2d; }
:root.is-dark .bub-pick .bp[data-b="sun"] { --pt: #2f2a16; --pti: #eef3fb; }
:root[data-bub="orange"] { --me-1: #ffa53d; --me-2: #ff8a1f; --me-ink: #1c1c1e; --me-ink-2: rgba(28, 28, 30, .62); --them: #fff0e0; --them-ink: #0c1a2d; --them-ink-2: #6b7788; }
:root.is-dark[data-bub="orange"] { --them: #2e2214; --them-ink: #eef3fb; --them-ink-2: #9aa6b8; }
.bub-pick .bp[data-b="orange"] { --p1: #ffa53d; --p2: #ff8a1f; --pi: #1c1c1e; --pt: #fff0e0; --pti: #0c1a2d; }
:root.is-dark .bub-pick .bp[data-b="orange"] { --pt: #2e2214; --pti: #eef3fb; }
:root[data-bub="coral"] { --me-1: #de4337; --me-2: #c2312a; --me-ink: #ffffff; --me-ink-2: rgba(255, 255, 255, .76); --them: #ffe9e6; --them-ink: #0c1a2d; --them-ink-2: #6b7788; }
:root.is-dark[data-bub="coral"] { --them: #2e1a18; --them-ink: #eef3fb; --them-ink-2: #9aa6b8; }
.bub-pick .bp[data-b="coral"] { --p1: #de4337; --p2: #c2312a; --pi: #ffffff; --pt: #ffe9e6; --pti: #0c1a2d; }
:root.is-dark .bub-pick .bp[data-b="coral"] { --pt: #2e1a18; --pti: #eef3fb; }
:root[data-bub="rose"] { --me-1: #d93b7a; --me-2: #b8265e; --me-ink: #ffffff; --me-ink-2: rgba(255, 255, 255, .76); --them: #ffe8f1; --them-ink: #0c1a2d; --them-ink-2: #6b7788; }
:root.is-dark[data-bub="rose"] { --them: #2d1724; --them-ink: #eef3fb; --them-ink-2: #9aa6b8; }
.bub-pick .bp[data-b="rose"] { --p1: #d93b7a; --p2: #b8265e; --pi: #ffffff; --pt: #ffe8f1; --pti: #0c1a2d; }
:root.is-dark .bub-pick .bp[data-b="rose"] { --pt: #2d1724; --pti: #eef3fb; }
:root[data-bub="lavender"] { --me-1: #7656f2; --me-2: #5a3bd6; --me-ink: #ffffff; --me-ink-2: rgba(255, 255, 255, .76); --them: #efeaff; --them-ink: #0c1a2d; --them-ink-2: #6b7788; }
:root.is-dark[data-bub="lavender"] { --them: #211c38; --them-ink: #eef3fb; --them-ink-2: #9aa6b8; }
.bub-pick .bp[data-b="lavender"] { --p1: #7656f2; --p2: #5a3bd6; --pi: #ffffff; --pt: #efeaff; --pti: #0c1a2d; }
:root.is-dark .bub-pick .bp[data-b="lavender"] { --pt: #211c38; --pti: #eef3fb; }
:root[data-bub="mint"] { --me-1: #158a54; --me-2: #0f7845; --me-ink: #ffffff; --me-ink-2: rgba(255, 255, 255, .76); --them: #e9f7ef; --them-ink: #0c1a2d; --them-ink-2: #6b7788; }
:root.is-dark[data-bub="mint"] { --them: #16281f; --them-ink: #eef3fb; --them-ink-2: #9aa6b8; }
.bub-pick .bp[data-b="mint"] { --p1: #158a54; --p2: #0f7845; --pi: #ffffff; --pt: #e9f7ef; --pti: #0c1a2d; }
:root.is-dark .bub-pick .bp[data-b="mint"] { --pt: #16281f; --pti: #eef3fb; }
:root[data-bub="ocean"] { --me-1: #0b879b; --me-2: #086e80; --me-ink: #ffffff; --me-ink-2: rgba(255, 255, 255, .76); --them: #e3f5f8; --them-ink: #0c1a2d; --them-ink-2: #6b7788; }
:root.is-dark[data-bub="ocean"] { --them: #142a2f; --them-ink: #eef3fb; --them-ink-2: #9aa6b8; }
.bub-pick .bp[data-b="ocean"] { --p1: #0b879b; --p2: #086e80; --pi: #ffffff; --pt: #e3f5f8; --pti: #0c1a2d; }
:root.is-dark .bub-pick .bp[data-b="ocean"] { --pt: #142a2f; --pti: #eef3fb; }
:root[data-bub="sky"] { --me-1: #d4e9ff; --me-2: #bcdcff; --me-ink: #0b2a4f; --me-ink-2: rgba(11, 42, 79, .6); --them: #ffffff; --them-ink: #0c1a2d; --them-ink-2: #6b7788; }
:root.is-dark[data-bub="sky"] { --them: #1d2637; --them-ink: #eef3fb; --them-ink-2: #9aa6b8; }
.bub-pick .bp[data-b="sky"] { --p1: #d4e9ff; --p2: #bcdcff; --pi: #0b2a4f; --pt: #ffffff; --pti: #0c1a2d; }
:root.is-dark .bub-pick .bp[data-b="sky"] { --pt: #1d2637; --pti: #eef3fb; }
/* Dark words on a light bubble: what was drawn in white on the blue turns dark too. */
.bub-ink-dark .m.me .bub { box-shadow: 0 1px 2px rgba(0, 0, 0, .14); }
.bub-ink-dark .m.me .quote { background: rgba(0, 0, 0, .08); --qc: rgba(0, 0, 0, .65); }
.bub-ink-dark .m.me .quote b { color: var(--me-ink); }
.bub-ink-dark .m.me .voice .vbtn { background: var(--me-ink); color: var(--me-1); }
.bub-ink-dark .m.me .wave { --wv: rgba(0, 0, 0, .25); --wp: var(--me-ink); }
.bub-ink-dark .m.me .voice .vfoot .vmic { color: var(--me-ink-2); }
.bub-ink-dark .m.me .vspeed { background: rgba(0, 0, 0, .12); }
.bub-ink-dark .m.me .filecard .fi { background: rgba(0, 0, 0, .1); }
.bub-ink-dark .m.me .once .oic { background: rgba(0, 0, 0, .1); color: var(--me-ink); }

/* ---------- 2.3: You: the name and the phrase change where they are; the photo seen big ---------- */
.me-card .nm.editing, .me-card .ps.editing { width: 100%; display: flex; justify-content: center; }
.me-card .nm-in, .me-card .ps-in { width: min(100%, 320px); border: 0; outline: 0; text-align: center; background: color-mix(in srgb, var(--fill) 60%, transparent); border-radius: 10px; color: var(--text); padding: 4px 12px; box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--accent) 70%, transparent); caret-color: var(--accent); }
.me-card .nm-in { font: inherit; font-size: 1.35rem; font-weight: 750; letter-spacing: -.02em; }
.me-card .ps-in { font: inherit; font-style: italic; font-size: .95rem; }
.pv-photo { position: fixed; inset: 0; z-index: 300; cursor: zoom-out; }
.pv-photo .pv-blur { position: absolute; inset: 0; background: rgba(8, 12, 22, .28); -webkit-backdrop-filter: blur(0px); backdrop-filter: blur(0px); opacity: 0; transition: opacity .32s ease, backdrop-filter .32s ease, -webkit-backdrop-filter .32s ease; }
.pv-photo.show .pv-blur { opacity: 1; -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%); }
.pv-photo img { position: absolute; object-fit: cover; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); transition: left .36s cubic-bezier(.2, .9, .25, 1.05), top .36s cubic-bezier(.2, .9, .25, 1.05), width .36s cubic-bezier(.2, .9, .25, 1.05), height .36s cubic-bezier(.2, .9, .25, 1.05), border-radius .36s ease; }
.pv-photo.closing img { transition-duration: .3s; transition-timing-function: ease-in-out; }

/* ---------- 2.3: the + of a conversation: places, polls, contacts, the camera ---------- */
.sys.wink .wk-t { font-weight: 750; }
/* Polls and contacts are cards (the same for whoever sent them, as in Messages). */
.bub.pollcard, .m.me .bub.pollcard, .bub.contactcard, .m.me .bub.contactcard { background: var(--them); color: var(--them-ink); box-shadow: 0 1px 2px rgba(10, 30, 60, .14), 0 0 0 .5px var(--line); white-space: normal; }
.m.me .bub.pollcard .meta, .m.me .bub.contactcard .meta { color: var(--them-ink-2); }
.bub.pollcard { width: min(80vw, 310px); padding: 11px 11px 7px; }
.pollcard .pk { display: flex; align-items: center; gap: 6px; font-size: .7rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; color: var(--them-ink-2); }
.pollcard .pk .icon { width: 15px; height: 15px; }
.pollcard .pq { font-weight: 700; font-size: 1.03rem; line-height: 1.3; margin: 5px 2px 10px; }
.pollcard .pos { display: flex; flex-direction: column; gap: 6px; }
.pollcard .po { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 10px; border-radius: 13px; background: color-mix(in srgb, currentColor 6%, transparent); overflow: hidden; text-align: start; color: inherit; transition: transform .15s var(--spring); }
.pollcard .po:active { transform: scale(.98); }
.pollcard .po-fill { position: absolute; inset-block: 0; inset-inline-start: 0; background: color-mix(in srgb, var(--accent) 14%, transparent); transition: width .5s var(--ease); }
.pollcard .po.on .po-fill { background: color-mix(in srgb, var(--accent) 24%, transparent); }
.pollcard .po-ck { position: relative; width: 22px; height: 22px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--them-ink) 28%, transparent); display: grid; place-items: center; flex: none; color: transparent; transition: background .2s, border-color .2s, color .2s; }
.pollcard .po.on .po-ck { background: var(--accent); border-color: var(--accent); color: #fff; animation: ckPop .3s var(--spring); }
.pollcard .po-ck .icon { width: 13px; height: 13px; }
.pollcard .po-t { position: relative; flex: 1; min-width: 0; font-size: .95rem; line-height: 1.3; }
.pollcard .po-faces { position: relative; display: flex; flex: none; padding-inline-start: 6px; }
.pollcard .po-faces .av { --s: 20px; margin-inline-start: -6px; }
.pollcard .po-faces .av-in { box-shadow: 0 0 0 1.5px var(--them); font-size: 9px; }
.pollcard .po-n { position: relative; min-width: 12px; text-align: end; font-weight: 700; font-size: .85rem; font-variant-numeric: tabular-nums; color: var(--them-ink-2); }
.pollcard .po-add { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 6px; padding: 9px 10px; border-radius: 13px; color: var(--accent); font-weight: 650; font-size: .92rem; }
.pollcard .po-add:active { background: var(--fill); }
.pollcard .po-add .icon { width: 18px; height: 18px; }
.pollcard .pfoot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin: 4px 2px 0; font-size: .76rem; color: var(--them-ink-2); }
.pollcard .pfoot .meta { float: none; margin: 0; top: 0; }
@keyframes ckPop { 40% { transform: scale(1.25); } }
.bub.contactcard { width: min(74vw, 280px); padding: 4px 4px 6px; }
.contactcard .cc-top { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 8px 10px; text-align: start; color: inherit; border-radius: 14px; }
.contactcard .cc-top:active { background: var(--fill); }
.contactcard .cc-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.contactcard .cc-b b { font-weight: 700; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contactcard .cc-b span { font-size: .84rem; color: var(--them-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contactcard .cc-top > .icon { width: 16px; height: 16px; opacity: .35; flex: none; }
.contactcard .cc-acts { display: flex; border-top: .5px solid color-mix(in srgb, currentColor 16%, transparent); margin: 0 4px; }
.contactcard .cc-acts button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 4px 4px; color: var(--accent); font-weight: 650; font-size: .88rem; }
.contactcard .cc-acts button + button { border-inline-start: .5px solid color-mix(in srgb, currentColor 16%, transparent); }
.contactcard .cc-acts .icon { width: 17px; height: 17px; }
.contactcard > .meta { float: none; display: flex; justify-content: flex-end; margin: 4px 8px -1px; top: 0; }
/* A live location: a blue dot that breathes; grey once it ended. */
.loccard .live-dot { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: #1a6ff0; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); z-index: 1; }
.loccard .live-dot::before { content: ""; position: absolute; inset: -16px; border-radius: 50%; background: rgba(26, 111, 240, .28); animation: livePulse 1.8s ease-out infinite; z-index: -1; }
.loccard .live-dot.off { background: #8e8e93; }
.loccard .live-dot.off::before { display: none; }
@keyframes livePulse { from { transform: scale(.35); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.loccard.live .lt b { display: flex; align-items: center; gap: 5px; }
.loccard .lt b .icon { width: 16px; height: 16px; flex: none; color: var(--accent); }
.m.me .loccard .lt b .icon { color: currentColor; }
.loccard.ended .lt b .icon { color: currentColor; opacity: .5; }
.loc-stop { display: block; width: 100%; margin: 8px 0 2px; padding: 9px 12px; border-radius: 12px; background: rgba(255, 59, 48, .12); color: #e5322b; font-weight: 650; font-size: .88rem; }
.m.me .loc-stop { background: rgba(255, 255, 255, .22); color: var(--me-ink); }
/* The location sheet: a map that moves with the finger, and what to send. */
.loc-sheet .sheet-body { padding: 0 0 14px; }
.lmap { position: relative; height: min(40vh, 300px); margin: 6px 16px 0; border-radius: 18px; overflow: hidden; background: #e7edf3; touch-action: none; cursor: grab; isolation: isolate; }
.lmap.moving { cursor: grabbing; }
.smap-tiles, .smap-dots { position: absolute; inset: 0; pointer-events: none; }
.smap-tiles img { position: absolute; left: 0; top: 0; width: 256px; height: 256px; max-width: none; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; }
.smap-acc { position: absolute; left: 0; top: 0; border-radius: 50%; background: rgba(26, 111, 240, .14); border: 1px solid rgba(26, 111, 240, .35); }
.smap-me { position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; background: #1a6ff0; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.lpin { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; transform: translate(-50%, -92%); color: #ff3b30; z-index: 2; pointer-events: none; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .3)); opacity: 0; transition: opacity .2s, transform .25s var(--spring); }
.lpin svg { width: 40px; height: 40px; }
.lmap.chosen .lpin { opacity: 1; }
.lmap.chosen.moving .lpin { transform: translate(-50%, -115%); }
.lshadow { position: absolute; left: 50%; top: 50%; width: 12px; height: 5px; margin: -2px 0 0 -6px; border-radius: 50%; background: rgba(0, 0, 0, .28); opacity: 0; z-index: 1; pointer-events: none; transition: opacity .2s; }
.lmap.chosen .lshadow { opacity: 1; }
.lmap-btns { position: absolute; top: 10px; inset-inline-end: 10px; display: flex; flex-direction: column; gap: 8px; z-index: 3; }
.lmap-btns button { width: 40px; height: 40px; border-radius: 12px; background: var(--glass-strong); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: var(--shadow); color: var(--accent); display: grid; place-items: center; font-size: 1.4rem; line-height: 1; }
.lmap-btns .icon { width: 22px; height: 22px; }
.lmap .osm { position: absolute; inset-inline-end: 6px; bottom: 4px; font-size: 10px; color: #444; background: rgba(255, 255, 255, .78); padding: 0 4px; border-radius: 4px; z-index: 3; }
.lrows { margin: 10px 12px 0; display: flex; flex-direction: column; gap: 2px; }
.lrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 6px; border-radius: 14px; text-align: start; color: var(--text); transition: background .15s, opacity .2s; }
.lrow:active { background: var(--fill); }
.lrow:disabled { opacity: .45; }
.lrow.open { background: var(--fill); }
.lic { width: 40px; height: 40px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; flex: none; }
.lic .icon { width: 22px; height: 22px; }
.lrow .lt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.lrow .lt b { font-weight: 650; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow .lt span { font-size: .82rem; color: var(--text-3); line-height: 1.3; }
.ldur { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; width: min(100%, 380px); margin: 4px auto 12px; padding: 6px; border-radius: 20px; background: var(--fill); box-shadow: inset 0 0 0 .5px var(--line); animation: up .22s var(--ease); }
.ldur button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; padding: 8px 0 7px; border-radius: 15px; background: var(--bg); color: var(--text); box-shadow: 0 1px 2px rgba(10, 20, 40, .08), 0 0 0 .5px var(--line); font-variant-numeric: tabular-nums; transition: transform .16s var(--spring), background .16s, color .16s; }
.ldur button b { font-size: 1.15rem; font-weight: 760; letter-spacing: -.03em; line-height: 1; }
.ldur button small { font-size: .66rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); line-height: 1; }
.ldur button:active, .ldur button:disabled { transform: scale(.94); background: linear-gradient(160deg, var(--accent-2, #3f8cff), var(--accent)); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 35%, transparent); }
.ldur button:active small, .ldur button:disabled small { color: rgba(255, 255, 255, .78); }
:root.is-dark .ldur button { background: rgba(255, 255, 255, .06); }
/* Live: a beacon that pulses (not the old flat green). */
.lic.live-ic { position: relative; background: radial-gradient(circle at 35% 30%, #6fe3ff, #1a8cff 55%, #3b3fd8); overflow: visible; }
.lic.live-ic::before, .lic.live-ic::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(40, 150, 255, .55); animation: liveRing 2.2s cubic-bezier(.2, .6, .3, 1) infinite; }
.lic.live-ic::after { animation-delay: 1.1s; }
@keyframes liveRing { from { transform: scale(1); opacity: .9; } to { transform: scale(1.75); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .lic.live-ic::before, .lic.live-ic::after { animation: none; opacity: 0; } }
.lnear .group-h { margin: 14px 6px 4px; }
/* A new poll. */
.poll-sheet .sheet-body { padding-top: 8px; }
.pq-in { min-height: 64px; resize: none; font-size: 1.05rem; font-weight: 600; line-height: 1.35; }
.poll-sheet .group-h { margin: 18px 4px 8px; }
.p-opts { display: flex; flex-direction: column; gap: 8px; }
.p-opt { display: flex; align-items: center; gap: 10px; animation: up .2s var(--ease); }
.p-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; }
.p-opt .input { min-height: 46px; padding: 10px 14px; }
.p-rm { width: 30px; height: 30px; border-radius: 15px; background: var(--fill); display: grid; place-items: center; color: var(--text-2); flex: none; }
.p-rm[hidden] { display: grid; visibility: hidden; }
/* A contact to send. */
.cc-pre { text-align: center; padding: 6px 0 16px; }
.cc-pre .av { margin: 0 auto 10px; }
.cc-pre h3 { margin: 0; font-size: 1.25rem; }
.cc-pre p { margin: 4px 0 0; color: var(--text-3); }
.cc-row { min-height: 60px; cursor: pointer; }
.cc-row .row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cc-row .row-sub { font-size: .78rem; color: var(--text-3); }
.cc-row .row-name { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-ck { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.sheet .form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
/* The camera on a computer. */
.cam-layer { background: #000; justify-content: stretch; }
.cam { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; background: #000; overflow: hidden; animation: camIn .25s ease; }
.cam video { width: 100%; height: 100%; object-fit: contain; transform: scaleX(-1); }
.cam.flash::after { content: ""; position: absolute; inset: 0; background: #fff; animation: camFlash .35s ease-out forwards; }
@keyframes camFlash { from { opacity: .9; } to { opacity: 0; } }
@keyframes camIn { from { opacity: 0; } }
.cam-msg { position: absolute; color: #fff; text-align: center; padding: 20px; max-width: 380px; line-height: 1.45; }
.cam-top { position: absolute; top: calc(14px + var(--safe-t)); inset-inline: 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cam-top button { width: 44px; height: 44px; border-radius: 22px; background: rgba(0, 0, 0, .45); color: #fff; display: grid; place-items: center; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.cam-top button[hidden] { display: grid; visibility: hidden; }
.cam-time { color: #fff; background: #ff3b30; padding: 4px 10px; border-radius: 8px; font-variant-numeric: tabular-nums; font-weight: 700; }
.cam-bottom { position: absolute; bottom: calc(22px + var(--safe-b)); inset-inline: 0; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.cam-modes { display: flex; gap: 4px; padding: 4px; border-radius: 18px; background: rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.cam-modes button { padding: 6px 14px; border-radius: 14px; color: rgba(255, 255, 255, .82); font-weight: 700; font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; }
.cam-modes button.on { background: rgba(255, 255, 255, .18); color: #ffd60a; }
.cam-shot { width: 76px; height: 76px; border-radius: 50%; border: 4px solid #fff; display: grid; place-items: center; transition: transform .15s var(--spring); }
.cam-shot:active { transform: scale(.92); }
.cam-shot span { width: 60px; height: 60px; border-radius: 30px; background: #fff; transition: all .25s var(--ease); }
.cam-shot.video span { background: #ff3b30; }
.cam-shot.rec span { width: 28px; height: 28px; border-radius: 7px; }
.cam-shot:disabled { opacity: .4; }

/* ---------- 2.4: Meteors with nothing to see: the Meteors icon (its lines, no colour) falling ---------- */
.hero-comet { position: relative; width: 104px; height: 104px; margin: 0 auto 8px; color: var(--text-3); }
.hero-comet svg { width: 100%; height: 100%; overflow: visible; }
.hero-comet .hc-fall { transform-box: view-box; animation: hcFall 3s cubic-bezier(.35, .05, .25, 1) infinite; }
.hero-comet .hc-l { stroke-dasharray: 340 420; stroke-dashoffset: 350; animation: hcLine 3s cubic-bezier(.35, .05, .25, 1) infinite; }
.hero-comet .hc-l.l0 { stroke-dasharray: 470 540; stroke-dashoffset: 480; animation-name: hcArc; }
.hero-comet .l1 { animation-delay: .05s; } .hero-comet .l2 { animation-delay: .1s; } .hero-comet .l3 { animation-delay: .15s; } .hero-comet .l4 { animation-delay: .08s; }
@keyframes hcFall {
  0% { transform: translate(64px, -64px); opacity: 0; }
  12% { opacity: 1; }
  58% { transform: translate(0, 0); opacity: 1; }
  82% { transform: translate(0, 0); opacity: 1; }
  100% { transform: translate(-10px, 10px); opacity: 0; }
}
@keyframes hcLine { 0%, 8% { stroke-dashoffset: 350; } 58%, 100% { stroke-dashoffset: 0; } }
@keyframes hcArc { 0%, 4% { stroke-dashoffset: 480; } 52%, 100% { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .hero-comet .hc-fall, .hero-comet .hc-l { animation: none; stroke-dashoffset: 0; } }

/* ---------- 2.4: polls start with two options; the + adds more (up to six) ---------- */
.p-add { display: flex; align-items: center; gap: 8px; margin: 6px 2px 2px; padding: 9px 12px; border-radius: 14px; color: var(--accent); font-weight: 650; font-size: .95rem; transition: background .15s; }
.p-add:active { background: var(--fill); }
.p-add .icon { width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 14%, transparent); }
.p-opt.fresh { animation: up .22s var(--ease); }

/* ---------- 2.4: the photo editor (ui-edit.js): pen and words over a photo before it goes ---------- */
.ed-layer { z-index: 175; background: #000; opacity: 0; transition: opacity .22s ease; }
.ed-layer.open { opacity: 1; }
.ed { position: absolute; inset: 0; display: flex; flex-direction: column; color: #fff; padding: var(--safe-t) var(--safe-r) var(--safe-b) var(--safe-l); }
.ed-top { display: flex; align-items: center; gap: 8px; padding: 8px 12px; }
.ed-sp { flex: 1; }
.ed-b { width: 40px; height: 40px; border-radius: 20px; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .12); transition: opacity .2s, transform .18s var(--spring); }
.ed-b:disabled { opacity: .35; }
.ed-b:active { transform: scale(.9); }
.ed-b .icon { width: 21px; height: 21px; }
.ed-done { height: 38px; padding: 0 18px; border-radius: 19px; background: #fff; color: #000; font-weight: 750; font-size: .95rem; }
.ed-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; margin: 4px 12px; touch-action: none; }
.ed-pic { position: relative; user-select: none; -webkit-user-select: none; }
.ed-pic img { display: block; width: 100%; height: 100%; border-radius: 6px; pointer-events: none; }
.ed-ink { position: absolute; inset: 0; touch-action: none; }
.m-draw .ed-ink { cursor: crosshair; }
.ed-texts { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.ed-word { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; white-space: pre; text-align: center; font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-weight: 800; line-height: 1.2; padding: .1em .2em; text-shadow: 0 .04em .12em rgba(0, 0, 0, .35); touch-action: none; cursor: grab; }
.ed-word.bg, .ed-type.bg { padding: .25em .5em; border-radius: .35em; text-shadow: none; }
.ed-tools { display: flex; flex-direction: column; gap: 12px; padding: 10px 14px 12px; }
.ed-row { display: flex; align-items: center; gap: 10px; justify-content: center; }
.ed-colors { display: flex; gap: 10px; }
.ed-colors button { width: 28px; height: 28px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .85), 0 1px 4px rgba(0, 0, 0, .4); transition: transform .18s var(--spring); }
.ed-colors button.on { transform: scale(1.22); box-shadow: inset 0 0 0 3px #fff, 0 0 0 2px rgba(255, 255, 255, .35), 0 2px 8px rgba(0, 0, 0, .5); }
.ed-bg { width: 34px; height: 34px; }
.ed-bg b { font-size: .95rem; font-weight: 850; }
.ed-bg.on { background: #fff; color: #000; }
.ed-sizes { padding: 0 12px; }
.ed-sizes .ed-size { flex: 1; max-width: 320px; }
.ed-dot { border-radius: 50%; background: #fff; flex: none; }
.ed-dot.s { width: 5px; height: 5px; }
.ed-dot.l { width: 16px; height: 16px; }
.ed-modes { display: flex; justify-content: center; gap: 8px; }
.ed-modes button { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 19px; color: rgba(255, 255, 255, .75); font-weight: 650; font-size: .92rem; background: rgba(255, 255, 255, .08); transition: background .18s, color .18s; }
.ed-modes button.on { background: #fff; color: #000; }
.ed-modes .icon { width: 18px; height: 18px; }
.ed-typing { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: rgba(0, 0, 0, .55); padding: 24px; }
.ed-type { max-width: 100%; min-width: 40px; text-align: center; outline: none; font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-weight: 800; line-height: 1.2; white-space: pre-wrap; caret-color: #fff; text-shadow: 0 .04em .12em rgba(0, 0, 0, .35); }
.ed.typing .ed-tools .ed-modes, .ed.typing .ed-sizes { opacity: .35; pointer-events: none; }
.ed-layer .ed-tools, .ed-layer .ed-top { position: relative; z-index: 4; }

/* ---------- 2.4: the smiley's sheet: Emoji | Winks at the top ---------- */
.emo-seg { display: inline-flex; margin: 0 auto; }
.emo-seg button { min-width: 92px; }
.sheet.emo-two .sheet-head h2 { overflow: visible; }
.wink-pane { padding: 6px 2px 10px; animation: up .2s var(--ease); }
.emo-sheet.emo-two .sheet-body { height: min(62vh, 520px); }
.emo-sheet.emo-two .wink-pane { overflow-y: auto; flex: 1; min-height: 0; }

/* ---------- 2.4: themes of a conversation (chosen in its details; both sides see them) ---------- */
[data-ctheme="xmas"] { --wall-img: url(img/theme-xmas.svg); --wall-bg: #0b3326; --wall-grad: radial-gradient(120% 70% at 50% 0%, #15603f 0%, transparent 70%), linear-gradient(180deg, #0f4a37, #0a2e22); --wall-ink: rgba(255, 255, 255, .17);
  --me-1: #ef4b52; --me-2: #c6202c; --me-ink: #fff; --me-ink-2: rgba(255, 255, 255, .78); --them: #fff8ee; --them-ink: #2a1d14; --them-ink-2: #8a7766; }
[data-ctheme="halloween"] { --wall-img: url(img/theme-halloween.svg); --wall-bg: #120a1f; --wall-grad: radial-gradient(90% 60% at 80% 0%, rgba(255, 140, 30, .22), transparent 70%), linear-gradient(180deg, #2a1640, #120a1f); --wall-ink: rgba(255, 160, 60, .24);
  --me-1: #ff9a1f; --me-2: #ef6405; --me-ink: #fff; --me-ink-2: rgba(255, 255, 255, .8); --them: #33224d; --them-ink: #f6ecff; --them-ink-2: #b9a3cf; }
[data-ctheme="love"] { --wall-img: url(img/theme-love.svg); --wall-bg: #ffc6d9; --wall-grad: linear-gradient(180deg, #ffe4ee, #ffc2d6); --wall-ink: rgba(220, 40, 100, .22);
  --me-1: #ff5d95; --me-2: #e52d6a; --me-ink: #fff; --me-ink-2: rgba(255, 255, 255, .8); --them: #ffffff; --them-ink: #4a1028; --them-ink-2: #b07a8e; }
[data-ctheme="easter"] { --wall-img: url(img/theme-easter.svg); --wall-bg: #e5f5ea; --wall-grad: linear-gradient(180deg, #fff5d9, #e3f4e8); --wall-ink: rgba(140, 110, 200, .26);
  --me-1: #a58aff; --me-2: #7c57f0; --me-ink: #fff; --me-ink-2: rgba(255, 255, 255, .8); --them: #fffdf7; --them-ink: #3b3355; --them-ink-2: #8f86a6; }
[data-ctheme="newyear"] { --wall-img: url(img/theme-newyear.svg); --wall-bg: #120d33; --wall-grad: radial-gradient(100% 60% at 50% 0%, rgba(255, 210, 120, .16), transparent 70%), linear-gradient(180deg, #0c1230, #1b1040); --wall-ink: rgba(255, 214, 120, .26);
  --me-1: #f9dc8c; --me-2: #e0b247; --me-ink: #2a1d00; --me-ink-2: rgba(42, 29, 0, .6); --them: #232a55; --them-ink: #f4f1ff; --them-ink-2: #a9a6cc; }
[data-ctheme="carnival"] { --wall-img: url(img/theme-carnival.svg); --wall-bg: #5b5bd6; --wall-grad: linear-gradient(160deg, #ff5fb0 0%, #8b5cf6 52%, #22b8e6 100%); --wall-ink: rgba(255, 255, 255, .24);
  --me-1: #ffe45c; --me-2: #ffc21f; --me-ink: #2b1a00; --me-ink-2: rgba(43, 26, 0, .6); --them: #ffffff; --them-ink: #2c1a45; --them-ink-2: #8a7aa3; }
.chat[data-ctheme] { transition: background .4s ease; }
.chat[data-ctheme] .m:not(.me) .bub { box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.sys.theme-sys { gap: 6px; }
.sys.theme-sys .icon { width: 15px; height: 15px; flex: none; }
/* The picker: a little conversation in each theme. */
.theme-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 12px; padding: 4px 2px 8px; }
.theme-pick button { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--text-2); }
.theme-pick button.on { color: var(--accent); }
.theme-pick .tp { position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; isolation: isolate; background: var(--wall-grad, var(--wall-bg)); box-shadow: 0 0 0 1px var(--line), 0 4px 14px rgba(0, 0, 0, .1); transition: transform .2s var(--spring), box-shadow .2s; }
.theme-pick .tp::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--wall-ink); -webkit-mask: var(--wall-img) 0 0 / 200px 280px repeat; mask: var(--wall-img) 0 0 / 200px 280px repeat; }
.theme-pick button.on .tp { box-shadow: 0 0 0 2.5px var(--accent), 0 6px 18px rgba(0, 0, 0, .14); transform: scale(1.03); }
.theme-pick .tp i { position: absolute; height: 16px; border-radius: 9px; }
.theme-pick .tp .r { left: 9%; top: 22%; width: 52%; background: var(--them); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.theme-pick .tp .s { right: 9%; top: 46%; width: 58%; background: linear-gradient(180deg, var(--me-1), var(--me-2)); }
.theme-pick .tp .r2 { left: 9%; top: 70%; width: 38%; background: var(--them); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.m:not(.me) .bub.callcard { color: var(--them-ink); }
