/* Sweep Text: a plain, familiar messaging look. System fonts, flat colors, no decoration. */
@font-face { font-family: 'Bricolage Grotesque'; src: url('fonts/bricolage.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }

:root {
  /* Calm dark is the default. Light mode is chosen in Profile → Appearance. */
  color-scheme: dark;
  --bg: #15171a;          /* screens and lists */
  --chat-bg: #101214;     /* behind the messages */
  --field: #1e2125;       /* inputs and search */
  --ink: #e4e6e9;
  --muted: #868b93;
  --line: #24272c;
  --hover: #1b1e22;
  --blue: #4a8af4;
  --blue-soft: rgba(74, 138, 244, .14);
  --me: #2f62c4;
  --me-ink: #f4f6fa;
  --them: #1f2226;
  --them-ink: #e4e6e9;
  --danger: #e5585b;
  --green: #3fb879;
  --av-s: 28%;           /* softer profile-picture colors */
  --av-l: 40%;
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', Roboto, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --brand: 'Bricolage Grotesque', var(--sans);
  --top: env(safe-area-inset-top, 0px);
  --bottom: env(safe-area-inset-bottom, 0px);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --chat-bg: #f2f3f5;
  --field: #f0f1f4;
  --ink: #111318;
  --muted: #8a8d93;
  --line: #e8e9ec;
  --hover: #f3f4f6;
  --blue: #1a7cff;
  --blue-soft: rgba(26, 124, 255, .1);
  --me: #1a7cff;
  --me-ink: #ffffff;
  --them: #ffffff;
  --them-ink: #111318;
  --danger: #e5383b;
  --green: #1fae60;
  --av-s: 45%;
  --av-l: 52%;
}

/* On / off switch (Appearance setting) */
.switch { position: relative; width: 46px; height: 28px; flex: none; border-radius: 14px; background: var(--line); transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch.on { background: var(--blue); }
.switch.on::after { transform: translateX(18px); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.4 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
#root { height: 100dvh; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
a { color: var(--blue); text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.icon { display: inline-flex; flex: none; }
.muted { color: var(--muted); }

/* ----- brand ----- */
.logo { display: block; flex: none; border-radius: 23%; }
.wordmark { font: 700 26px/1 var(--brand); letter-spacing: -.04em; }
.wordmark b { font-weight: 700; color: var(--blue); }
.tick { display: inline-flex; flex: none; }
.tick .seal { fill: var(--blue); }

/* ----- sign in / create account ----- */
.auth { height: 100%; overflow-y: auto; background: var(--bg); }
.auth-inner { max-width: 400px; margin: 0 auto; padding: calc(var(--top) + 40px) 20px calc(24px + var(--bottom)); display: grid; gap: 28px; }
.brand { display: grid; justify-items: center; gap: 12px; }
.auth-form { display: grid; gap: 14px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 10px; background: var(--field); }
.seg button { height: 38px; border-radius: 8px; font-weight: 600; font-size: 15px; color: var(--muted); }
.seg button.on { background: var(--bg); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.auth-title h2 { font-size: 22px; }
.auth-title p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.types { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.type { display: grid; gap: 2px; justify-items: start; text-align: left; padding: 12px; border-radius: 12px; border: 1.5px solid var(--line); }
.type.on { border-color: var(--blue); background: var(--blue-soft); }
.type-ic { color: var(--muted); margin-bottom: 4px; }
.type.on .type-ic { color: var(--blue); }
.type-title { display: flex; align-items: center; gap: 5px; font-weight: 600; }
.type-sub { font-size: 13px; color: var(--muted); line-height: 1.3; }
.field { display: grid; gap: 6px; }
.label { font-size: 13px; font-weight: 600; color: var(--muted); }
.control {
  display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 12px; border-radius: 10px;
  background: var(--field); border: 1.5px solid transparent; color: var(--muted);
}
.control:focus-within { border-color: var(--blue); background: var(--bg); }
.control input, .control select { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; color: var(--ink); appearance: none; }
.control input::placeholder { color: var(--muted); }
.control.phone { padding-left: 0; }
.cc { position: relative; display: flex; align-items: center; gap: 4px; align-self: stretch; padding: 0 10px 0 14px; margin-right: 4px; border-right: 1px solid var(--line); font-weight: 600; color: var(--ink); flex: none; }
.cc .icon { color: var(--muted); transform: rotate(90deg); }
.cc select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.eye { width: 40px; height: 40px; margin-right: -8px; display: grid; place-items: center; color: var(--muted); }
.hint { font-size: 13px; font-weight: 600; margin-top: -8px; }
.hint:empty { display: none; }
.hint.good { color: var(--green); }
.hint.bad { color: var(--danger); }
.primary { position: relative; height: 48px; border-radius: 10px; font-weight: 600; font-size: 16px; color: #fff; background: var(--blue); display: grid; place-items: center; }
.primary:active { opacity: .85; }
.primary.danger { background: var(--danger); }
.spinner { display: none; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite; }
.busy > span { visibility: hidden; }
.busy > .spinner { display: block; position: absolute; }
@keyframes spin { to { transform: rotate(360deg); } }
.error { margin: 0; color: var(--danger); font-weight: 600; font-size: 14px; }
.error:empty { display: none; }
.legal { margin: 0; text-align: center; font-size: 13px; color: var(--muted); }
.socials { display: grid; gap: 10px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.social { position: relative; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 600; font-size: 16px; color: var(--ink); background: var(--field); border: 1px solid var(--line); }
.social:active { opacity: .85; }
.social.apple { background: #fff; color: #000; border-color: #fff; }
:root[data-theme="light"] .social.apple { background: #000; color: #fff; border-color: #000; }
.social .spinner { border-color: rgba(128, 128, 128, .35); border-top-color: currentColor; }
.social.busy > .social-ic { visibility: hidden; }
.social-ic { display: grid; place-items: center; }
.gsi-box { display: flex; justify-content: center; min-height: 44px; }

/* ----- app shell ----- */
.app { height: 100%; display: grid; grid-template-columns: 380px 1fr; }
.side { display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; background: var(--bg); border-right: 1px solid var(--line); }
.page { flex: 1; min-height: 0; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.page-head { display: flex; align-items: center; gap: 12px; padding: calc(var(--top) + 14px) 16px 4px; flex: none; }
.page-head h1 { font-size: 28px; line-height: 1.1; }
.ghost { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--muted); flex: none; }
.ghost:active { background: var(--hover); }
@media (hover: hover) { .ghost:hover { background: var(--hover); } }
.searchbox { margin: 8px 16px; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; border-radius: 10px; background: var(--field); color: var(--muted); flex: none; }
.searchbox input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; color: var(--ink); appearance: none; font-size: 16px; }
.searchbox input::-webkit-search-cancel-button { display: none; }
.list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.empty { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 56px 28px; color: var(--muted); }
.empty-ic { color: var(--muted); margin-bottom: 6px; }
.empty h3 { font-size: 18px; color: var(--ink); }
.empty p { margin: 0; max-width: 270px; font-size: 15px; }
.pill-btn { margin-top: 12px; height: 40px; padding: 0 18px; border-radius: 999px; font-weight: 600; color: #fff; background: var(--blue); }
.pill-btn.small { margin: 0; height: 32px; padding: 0 14px; font-size: 14px; background: var(--blue-soft); color: var(--blue); }
.text-btn { height: 44px; font-weight: 600; color: var(--muted); }

.tabbar { flex: none; display: flex; padding: 4px 0 calc(4px + var(--bottom)); border-top: 1px solid var(--line); background: var(--bg); }
.tabbar button { flex: 1; display: grid; justify-items: center; gap: 1px; padding: 4px 0; font-size: 11px; font-weight: 500; color: var(--muted); }
.tab-ic { position: relative; height: 28px; display: grid; place-items: center; }
.tabbar button.on { color: var(--blue); }
.tab-ic .badge { position: absolute; top: -3px; left: 16px; min-width: 18px; height: 18px; padding: 0 5px; font-size: 11px; font-style: normal; border: 2px solid var(--bg); box-sizing: content-box; }

.avatar {
  --s: 44px; position: relative; flex: none; width: var(--s); height: var(--s);
  display: inline-grid; place-items: center; border-radius: 50%;
  color: #fff; font-weight: 600; font-size: calc(var(--s) * .38);
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; border-radius: inherit; display: block; }
.avatar .dot { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--green); border: 2px solid var(--bg); }
.name { display: inline-flex; align-items: center; gap: 4px; min-width: 0; font-weight: 600; }
.name-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* chat list */
.row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 0 0 0 16px; text-align: left; }
.row:active { background: var(--hover); }
@media (hover: hover) { .row:hover { background: var(--hover); } }
.row-body { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); }
.row-top, .row-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row time { flex: none; font-size: 13px; color: var(--muted); }
.row time.unread { color: var(--blue); }
.preview { display: block; color: var(--muted); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.preview .icon { vertical-align: -2px; }
.badge { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 600; display: grid; place-items: center; }

/* find a business */
.find-form { display: flex; gap: 8px; margin: 8px 16px; flex: none; }
.find-form .control { flex: 1; min-width: 0; }
.find-btn { width: 48px; height: 48px; flex: none; border-radius: 10px; display: grid; place-items: center; color: #fff; background: var(--blue); }
.find-result { flex: 1; overflow-y: auto; padding: 8px 16px 24px; }
.found { display: grid; justify-items: center; gap: 2px; text-align: center; padding: 24px 16px 16px; border-radius: 14px; border: 1px solid var(--line); }
.found p { margin: 8px 0 0; color: var(--muted); max-width: 300px; font-size: 15px; }
.found .primary { width: 100%; margin-top: 16px; }

/* ----- profile ----- */
.profile { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 16px 24px; display: grid; gap: 16px; align-content: start; grid-auto-rows: max-content; }
.profile-card { display: grid; justify-items: center; gap: 2px; text-align: center; padding: 12px 8px 4px; }
.profile-name { font-size: 22px; font-weight: 700; margin-top: 10px; max-width: 100%; }
.profile-name .name { font-weight: 700; }
.profile-user { color: var(--muted); }
.profile-card p { margin: 6px 0 0; color: var(--muted); max-width: 300px; font-size: 15px; }
.chip-static { margin-top: 6px; font-size: 13px; color: var(--muted); }
.share { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--field); }
.share div { flex: 1; min-width: 0; display: grid; gap: 1px; font-size: 15px; }
.share b { font-weight: 600; }
.share span { font-size: 13px; color: var(--muted); }
.share { flex-wrap: wrap; }
.share .share-btns { display: flex; flex: 1 0 100%; gap: 8px; }
.pill-btn.small.fill { background: var(--blue); color: #fff; }
.qr-sheet { text-align: center; justify-items: center; }
.qr-sheet h3 { display: flex; justify-content: center; }
.qr-box { width: min(260px, 70vw); aspect-ratio: 1; padding: 6px; border-radius: 16px; background: #fff; margin: 4px auto; }
.qr-box svg { display: block; width: 100%; height: 100%; }
.qr-link { margin: 0; font-size: 14px; color: var(--muted); word-break: break-all; }
.qr-save { display: grid; place-items: center; }
.small { font-size: 13px; }
.note { font-size: 13px; color: var(--muted); }
.group { border-radius: 12px; background: var(--field); overflow: hidden; display: grid; }
.item { width: 100%; min-height: 48px; display: flex; align-items: center; gap: 12px; padding: 0 14px; text-align: left; color: var(--ink); }
.item + .item { border-top: 1px solid var(--line); }
.item > span:not(.icon) { flex: 1; min-width: 0; }
.item .icon { color: var(--muted); }
.item:active { background: var(--hover); }
.item.danger, .item.danger .icon:first-child { color: var(--danger); }
.item.detail { min-height: 58px; padding-top: 8px; padding-bottom: 8px; }
.item.detail > span { display: grid; gap: 1px; }
.item.detail small { font-size: 12.5px; color: var(--muted); }
.item.detail b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
div.item.detail { cursor: default; }
.private-note { margin: -6px 4px 0; }
.text-btn.danger-text { color: var(--danger); }
.version { margin: 0; text-align: center; font-size: 13px; color: var(--muted); }
.edit-top { display: flex; align-items: center; gap: 16px; }

/* ----- sheets (menus at the bottom of the screen) ----- */
.sheet-wrap { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .4); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease-out; }
.sheet { width: min(500px, 100%); max-height: 86dvh; overflow-y: auto; background: var(--bg); border-radius: 14px 14px 0 0; padding: 8px 16px calc(16px + var(--bottom)); animation: rise .2s ease-out; }
.grab { display: block; width: 36px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
.sheet-body { display: grid; gap: 12px; }
.sheet-body h3 { font-size: 20px; }
.sheet-body p { margin: 0; }
.sheet-who { display: flex; align-items: center; gap: 12px; }
.sheet-who > div { display: grid; min-width: 0; }
.blocked-row { display: flex; align-items: center; gap: 12px; }
.blocked-row .name { flex: 1; }
.menu-snippet { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(30px); } }

/* ----- chat ----- */
.chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--chat-bg); }
.blank { margin: auto; display: grid; justify-items: center; gap: 8px; text-align: center; max-width: 340px; padding: 24px; color: var(--muted); }
.blank.offline { height: 100%; align-content: center; }
.blank h3 { font-size: 20px; color: var(--ink); margin-top: 10px; }
.blank p { margin: 0; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: calc(var(--top) + 6px) 6px 6px 12px; border-bottom: 1px solid var(--line); background: var(--bg); flex: none; }
.back { display: none; }
.who { flex: 1; display: grid; min-width: 0; line-height: 1.25; text-align: left; }
.status { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status.online { color: var(--green); }
.scroll { flex: 1; overflow-y: auto; padding: 12px clamp(10px, 4vw, 40px) 8px; display: flex; flex-direction: column; gap: 2px; -webkit-overflow-scrolling: touch; }
.intro { display: grid; justify-items: center; gap: 3px; text-align: center; padding: 16px 0 8px; }
.intro .name { font-size: 18px; margin-top: 8px; }
.intro-meta { font-size: 13px; color: var(--muted); }
.intro p { margin: 4px 0 0; max-width: 320px; color: var(--muted); font-size: 14px; }
.older { align-self: center; padding: 10px; font-size: 13px; color: var(--muted); }
.day { align-self: center; margin: 10px 0 6px; }
.day span { font-size: 12px; font-weight: 500; color: var(--muted); padding: 4px 10px; border-radius: 8px; background: var(--bg); }

.msg { display: flex; max-width: min(80%, 520px); }
.msg.mine { align-self: flex-end; }
.msg.theirs { align-self: flex-start; }
.msg.mine + .msg.theirs, .msg.theirs + .msg.mine { margin-top: 8px; }
.bubble { position: relative; padding: 7px 10px 5px 12px; border-radius: 16px; background: var(--them); color: var(--them-ink); min-width: 0; box-shadow: none; }
:root[data-theme="light"] .bubble { box-shadow: 0 1px .5px rgba(0, 0, 0, .08); }
.theirs .bubble { border-bottom-left-radius: 4px; }
.mine .bubble { background: var(--me); color: var(--me-ink); border-bottom-right-radius: 4px; box-shadow: none; }
.text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.text a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.text.gone { display: flex; align-items: center; gap: 5px; font-style: italic; opacity: .7; }
.meta { display: flex; justify-content: flex-end; align-items: center; gap: 3px; margin-top: 1px; font-size: 11px; opacity: .6; }
.mine .meta { opacity: .85; }
.receipt { display: inline-flex; opacity: .8; }
.receipt.read { opacity: 1; }

/* photos and videos */
.msg.image .bubble, .msg.video .bubble { padding: 3px 3px 5px; }
.msg.image .text, .msg.video .text { padding: 5px 8px 0; }
.msg.image .meta, .msg.video .meta { padding: 0 7px; }
.photo { display: block; max-width: 100%; width: 260px; max-height: 340px; min-height: 80px; border-radius: 13px; object-fit: cover; background: rgba(0, 0, 0, .08); }
.photo.video { background: #000; object-fit: contain; }

/* documents */
.file-card { display: flex; align-items: center; gap: 10px; min-width: 220px; max-width: 280px; padding: 8px 6px 6px 2px; color: inherit; }
.file-ic { width: 40px; height: 46px; flex: none; border-radius: 6px; display: grid; place-items: end center; padding-bottom: 6px; background: var(--blue); color: #fff; position: relative; }
.file-ic b { font-size: 10px; font-weight: 700; letter-spacing: .02em; }
.mine .file-ic { background: rgba(255, 255, 255, .25); }
.file-info { flex: 1; min-width: 0; display: grid; }
.file-name { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-size: 12px; opacity: .7; }
.file-dl { opacity: .7; }

/* voice */
.voice { display: flex; align-items: center; gap: 10px; min-width: 210px; padding: 3px 0 1px; }
.play { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; }
.mine .play { background: #fff; color: var(--blue); }
.wave { flex: 1; height: 28px; display: flex; align-items: center; gap: 2px; }
.wave i { flex: 1; min-width: 2px; border-radius: 2px; background: currentColor; opacity: .3; }
.wave i.on { opacity: 1; }
.dur { font-size: 12px; font-variant-numeric: tabular-nums; opacity: .8; min-width: 30px; text-align: right; }

/* reply quote inside a bubble */
.quote { display: grid; width: 100%; text-align: left; padding: 5px 9px; margin: 2px 0 5px; border-radius: 8px; border-left: 3px solid var(--blue); background: rgba(0, 0, 0, .05); font-size: 13.5px; line-height: 1.35; }
.quote b { color: var(--blue); font-weight: 600; }
.quote span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .85; }
.mine .quote { background: rgba(255, 255, 255, .18); border-left-color: #fff; }
.mine .quote b { color: #fff; }
.msg.image .quote, .msg.video .quote { width: auto; margin: 4px 4px 6px; }
.msg.flash .bubble { animation: flash 1.2s ease-out; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 3px var(--blue); } }

/* ----- composer (where you type) ----- */
.composer { flex: none; padding: 6px 6px calc(6px + var(--bottom)); background: var(--bg); border-top: 1px solid var(--line); }
.bar, .recording { display: flex; align-items: flex-end; gap: 4px; }
.field-wrap { flex: 1; min-width: 0; display: flex; align-items: flex-end; border-radius: 20px; background: var(--field); padding-left: 14px; }
.field-wrap textarea { flex: 1; min-width: 0; resize: none; border: 0; outline: none; background: none; padding: 9px 0; max-height: 140px; line-height: 1.35; font-size: 16px; }
.field-wrap .cam { width: 40px; height: 40px; }
.bar.typing .cam { display: none; }
.bar .attach { width: 40px; height: 40px; }
.send { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; }
.send:active { opacity: .8; }
.send.busy { opacity: .5; }
.tray { display: flex; gap: 8px; overflow-x: auto; padding: 4px 4px 10px; scrollbar-width: none; }
.tray::-webkit-scrollbar { display: none; }
.chip { position: relative; flex: none; width: 72px; height: 72px; border-radius: 10px; background: var(--field); }
.chip img, .chip video { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; background: #000; }
.chip-play { position: absolute; left: 6px; bottom: 6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .55); color: #fff; }
.chip.doc { width: 200px; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 10px; }
.chip.doc .file-ic { width: 34px; height: 40px; }
.chip-x { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); }
.progress { display: grid; gap: 5px; padding: 2px 6px 8px; font-size: 13px; color: var(--muted); }
.progress i { display: block; height: 4px; border-radius: 2px; background: var(--field); overflow: hidden; }
.progress b { display: block; height: 100%; background: var(--blue); transition: width .2s; }
.replying { display: flex; align-items: center; gap: 10px; padding: 4px 4px 8px 10px; color: var(--blue); }
.replying div { flex: 1; min-width: 0; display: grid; font-size: 13.5px; line-height: 1.35; border-left: 3px solid var(--blue); padding-left: 8px; }
.replying b { color: var(--ink); font-weight: 600; }
.replying span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recording { align-items: center; height: 40px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: pulse 1s infinite; margin-left: 4px; }
@keyframes pulse { 50% { opacity: .25; } }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 600; }
.rec-label { flex: 1; color: var(--muted); }

.lightbox { position: fixed; inset: 0; z-index: 50; background: #000; display: grid; place-items: center; padding: 20px; }
.lightbox img { max-width: 100%; max-height: 100%; }
.lightbox .ghost { position: absolute; top: calc(var(--top) + 10px); right: 12px; color: #fff; }
.toast { position: fixed; left: 50%; bottom: calc(var(--bottom) + 84px); transform: translateX(-50%); z-index: 60; width: max-content; max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 10px; background: rgba(30, 30, 32, .94); color: #fff; font-size: 14px; text-align: center; animation: fade .2s ease-out; }
.toast.tap { top: calc(var(--top) + 10px); bottom: auto; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ----- phones ----- */
@media (max-width: 859px) {
  .app { grid-template-columns: 1fr; }
  .side { border-right: 0; }
  .chat { display: none; }
  body.chat-open .side { display: none; }
  body.chat-open .chat { display: flex; }
  .back { display: inline-grid; margin-left: -8px; margin-right: -6px; color: var(--blue); }
  .msg { max-width: 82%; }
}

/* ----- tablets and computers ----- */
@media (min-width: 860px) {
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 14px; }
  .grab { visibility: hidden; margin-bottom: 4px; }
  .row.active { background: var(--hover); }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (pointer: coarse) {
  .text { user-select: none; -webkit-user-select: none; }
  .bubble, .photo { -webkit-touch-callout: none; }
}

/* appeal box on the suspended-account screen */
.control:has(textarea.appeal-text) { height: auto; padding-top: 4px; padding-bottom: 4px; }
.control textarea.appeal-text { flex: 1; min-width: 0; resize: vertical; border: 0; outline: none; background: none; color: var(--ink); font-size: 16px; line-height: 1.4; padding: 8px 0; min-height: 96px; }
.control textarea.appeal-text::placeholder { color: var(--muted); }

/* ----- business profile & showcase page ----- */
.head-av { display: flex; border-radius: 50%; }
.page-overlay { position: fixed; inset: 0; z-index: 35; background: var(--bg); animation: slide-in .26s cubic-bezier(.2, .8, .2, 1); }
@keyframes slide-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.bp-scroll { height: 100%; overflow-y: auto; overscroll-behavior: contain; padding-bottom: calc(100px + var(--bottom)); }
.sc-edit .bp-scroll { padding-bottom: calc(32px + var(--bottom)); }
:root[data-theme="light"] .bp-id, :root[data-theme="light"] .bp-logo { background: #fff; border-color: transparent; box-shadow: 0 10px 40px rgba(20, 30, 60, .12); }
.bp-scroll > * { max-width: 560px; margin-left: auto; margin-right: auto; }
.bp-top { position: fixed; top: 0; left: 0; right: 0; z-index: 4; display: flex; align-items: center; gap: 8px; padding: calc(var(--top) + 8px) 12px 8px; max-width: none !important; transition: background .2s, box-shadow .2s; }
.bp-top.solid { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 1px 0 var(--line); }
.bp-top.solid .bp-round { color: var(--ink); background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.bp-title { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; }
.bp-top.solid .bp-title { opacity: 1; transform: none; }
.bp-round { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(10, 12, 16, .3); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: background .2s; }
.bp.plain .bp-round { color: var(--ink); background: var(--field); }
.bp-preview { padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #fff; background: rgba(10, 12, 16, .3); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.bp-top.solid .bp-preview { color: var(--ink); background: var(--field); }
.bp-plain { display: grid; justify-items: center; text-align: center; gap: 2px; padding: calc(var(--top) + 72px) 24px 24px; }
.bp-plain p { margin: 10px 0 0; color: var(--muted); max-width: 320px; }

/* Cover colours a business can pick. */
.sc-ocean { --sc1: #2563eb; --sc2: #06b6d4; --sc3: #6366f1; }
.sc-sunset { --sc1: #f0643c; --sc2: #e23d7c; --sc3: #f59e0b; }
.sc-forest { --sc1: #0f8a5f; --sc2: #65b33c; --sc3: #0ea5a4; }
.sc-berry { --sc1: #7c3aed; --sc2: #db2777; --sc3: #4f46e5; }
.sc-gold { --sc1: #e8952a; --sc2: #d9482b; --sc3: #f4c542; }
.sc-graphite { --sc1: #2f3542; --sc2: #5d6779; --sc3: #1f2937; }
.showcase { --sc-ink: color-mix(in srgb, var(--sc1) 55%, #fff); --sc-soft: color-mix(in srgb, var(--sc1) 16%, transparent); }
:root[data-theme="light"] .showcase { --sc-ink: var(--sc1); --sc-soft: color-mix(in srgb, var(--sc1) 10%, transparent); }
.sc-graphite.showcase { --sc-ink: #b7c0d1; }
:root[data-theme="light"] .sc-graphite.showcase { --sc-ink: #3b4352; }

/* Hero: a slowly moving colour wash behind the logo. */
.bp-hero { position: relative; overflow: hidden; height: calc(var(--top) + 230px); max-width: none !important;
  background: linear-gradient(135deg, var(--sc1), var(--sc2)); }
.bp-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0, 0, 0, .18), transparent 40%, transparent 70%, color-mix(in srgb, var(--bg) 35%, transparent)); }
.bp-orb { position: absolute; border-radius: 50%; filter: blur(30px); opacity: .75; pointer-events: none; animation: drift 14s ease-in-out infinite alternate; }
.bp-orb.one { width: 280px; height: 280px; top: -120px; right: -70px; background: var(--sc3); }
.bp-orb.two { width: 220px; height: 220px; bottom: -110px; left: -60px; background: var(--sc2); animation-duration: 18s; }
.bp-orb.three { width: 140px; height: 140px; top: 40px; left: 38%; background: rgba(255, 255, 255, .35); animation-duration: 11s; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(-30px, 24px) scale(1.15); } }
.bp-grain { position: absolute; inset: 0; opacity: .5; mix-blend-mode: soft-light;
  background-image: radial-gradient(rgba(255, 255, 255, .35) 1px, transparent 1px); background-size: 4px 4px; }

/* The business card that overlaps the hero. */
.bp-id { position: relative; z-index: 2; margin: -64px 12px 0 !important; padding: 0 18px 18px; border-radius: 24px; text-align: center;
  display: grid; justify-items: center; background: color-mix(in srgb, var(--field) 60%, var(--bg)); border: 1px solid color-mix(in srgb, #fff 5%, transparent); box-shadow: 0 10px 40px rgba(0, 0, 0, .25); animation: rise-in .45s .05s cubic-bezier(.2, .8, .2, 1) both; }
@media (min-width: 584px) { .bp-id { margin: -64px auto 0 !important; } }
@keyframes rise-in { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
.bp-logo { display: inline-flex; margin-top: -50px; padding: 4px; border-radius: 50%; background: color-mix(in srgb, var(--field) 60%, var(--bg)); box-shadow: 0 8px 24px rgba(0, 0, 0, .28); }
.bp-logo .avatar { box-shadow: 0 0 0 2px color-mix(in srgb, var(--sc1) 70%, #fff); }
.bp-name { margin-top: 12px; font: 700 26px/1.15 var(--brand); letter-spacing: -.02em; max-width: 100%; }
.bp-name .name { font-weight: 700; }
.bp-sub { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 6px; font-size: 14px; color: var(--muted); }
.bp-sub i { font-style: normal; opacity: .6; }
.bp-tagline { margin: 12px 0 0; font-size: 16px; line-height: 1.5; max-width: 400px; color: var(--ink); opacity: .92; }

.bp-acts { display: flex; justify-content: center; gap: 10px; width: 100%; margin-top: 18px; }
.bp-act { flex: 1; max-width: 86px; display: grid; justify-items: center; gap: 6px; color: var(--ink); font-size: 12.5px; font-weight: 600; }
.bp-act-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: var(--sc-ink); background: var(--sc-soft); transition: transform .15s; }
.bp-act:first-child .bp-act-ic { color: #fff; background: linear-gradient(135deg, var(--sc1), var(--sc2)); box-shadow: 0 6px 18px color-mix(in srgb, var(--sc1) 40%, transparent); }
.bp-act:active .bp-act-ic { transform: scale(.94); }
.bp-act small { font-size: 12.5px; }

.bp-nums { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.bp-num { display: grid; justify-items: center; gap: 3px; padding: 0 6px; }
.bp-num + .bp-num { border-left: 1px solid var(--line); }
.bp-num .icon { color: var(--sc-ink); }
.bp-num b { font-size: 15px; font-weight: 700; white-space: nowrap; }
.bp-num small { font-size: 12px; color: var(--muted); }

/* Sections */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease-out, transform .5s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.bp-highs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 18px 16px 0; }
.bp-high { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px 9px 9px; border-radius: 999px; font-size: 14px; background: var(--sc-soft); border: 1px solid color-mix(in srgb, var(--sc1) 22%, transparent); }
.bp-high b { font-weight: 600; }
.bp-high-ic { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--sc1), var(--sc2)); }

.bp-grid { display: grid; gap: 6px; margin-top: 18px !important; padding: 0 16px; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 84px; }
.bp-tile { position: relative; overflow: hidden; border-radius: 12px; background: var(--field); }
.bp-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.bp-tile:active img { transform: scale(1.04); }
.bp-grid.n1 { grid-auto-rows: 210px; } .bp-grid.n1 .bp-tile { grid-column: span 4; }
.bp-grid.n2 { grid-auto-rows: 170px; } .bp-grid.n2 .bp-tile { grid-column: span 2; }
.bp-grid.n3 .bp-tile:first-child, .bp-grid.n4 .bp-tile:first-child, .bp-grid.n5 .bp-tile:first-child { grid-column: span 2; grid-row: span 2; }
.bp-grid.n3 .bp-tile:not(:first-child) { grid-column: span 2; }
.bp-grid.n4 .bp-tile:nth-child(2) { grid-column: span 2; }
.bp-plus { position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; font-weight: 700; color: #fff; background: rgba(0, 0, 0, .5); }

.bp-card { margin: 16px 16px 0 !important; padding: 18px; border-radius: 20px; background: var(--field); }
@media (min-width: 592px) { .bp-card { margin: 16px auto 0 !important; } }
.bp-card h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.bp-card h2::before { content: ''; width: 4px; height: 18px; border-radius: 2px; background: linear-gradient(var(--sc1), var(--sc2)); }
.bp-about { margin: 0; line-height: 1.6; white-space: pre-line; }
.bp-about.folded { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.bp-more { margin-top: 6px; font-weight: 600; color: var(--sc-ink); }
.bp-note { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.bp-service { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 0; text-align: left; color: var(--ink); }
.bp-service + .bp-service { border-top: 1px solid var(--line); }
.bp-svc { flex: 1; min-width: 0; font-weight: 500; }
.bp-price { font-weight: 700; white-space: nowrap; color: var(--sc-ink); }
.bp-ask { flex: none; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--sc-ink); background: var(--sc-soft); }
.bp-service:active { opacity: .7; }
.bp-info { display: flex; align-items: center; gap: 12px; padding: 10px 0; color: var(--ink); }
.bp-info + .bp-info { border-top: 1px solid var(--line); }
.bp-info > .icon:first-child { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--sc-ink); background: var(--sc-soft); }
.bp-info > span:not(.icon) { flex: 1; display: grid; min-width: 0; }
.bp-info small { font-size: 12.5px; color: var(--muted); }
.bp-info b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-info > .icon:last-child { color: var(--muted); }
.bp-foot { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 13px; margin: 24px 0 0 !important; }
.bp-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; max-width: none !important; padding: 14px 16px calc(12px + var(--bottom)); background: linear-gradient(to bottom, transparent, var(--bg) 45%); }
.bp-cta:empty { display: none; }
.bp-message { width: 100%; max-width: 528px; margin: 0 auto; height: 54px; border-radius: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 16px; color: #fff; background: var(--blue); }
.bp-message span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.showcase .bp-message { background: linear-gradient(120deg, var(--sc1), var(--sc2)); box-shadow: 0 10px 28px color-mix(in srgb, var(--sc1) 38%, transparent); }
.bp-message:active { opacity: .88; transform: scale(.99); }

/* Photos full screen */
.gal img { max-width: 100%; max-height: 100%; touch-action: pan-y; }
.gal-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .14); }
.gal-nav.prev { left: 10px; } .gal-nav.next { right: 10px; }
.gal-count { position: absolute; bottom: calc(var(--bottom) + 20px); left: 50%; transform: translateX(-50%); padding: 4px 12px; border-radius: 999px; font-size: 13px; color: #fff; background: rgba(255, 255, 255, .14); }

/* Profile tab: the business's way into its showcase page. */
.sc-promo { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border-radius: 14px; text-align: left; color: var(--ink);
  background: linear-gradient(120deg, color-mix(in srgb, #7c3aed 16%, var(--field)), color-mix(in srgb, #2563eb 14%, var(--field))); }
.sc-promo > span:nth-child(2) { flex: 1; display: grid; gap: 2px; min-width: 0; }
.sc-promo small { color: var(--muted); font-size: 13px; }
.sc-promo > .icon { color: var(--muted); }
.sc-promo-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, #7c3aed, #2563eb); }
.see-page { height: 32px; margin-top: -8px; justify-self: center; color: var(--blue); font-size: 14px; }

/* Showcase editor */
.sc-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: calc(var(--top) + 6px) 8px 6px; background: var(--bg); border-bottom: 1px solid var(--line); max-width: none !important; }
.sc-head h3 { flex: 1; font-size: 17px; }
.sc-save { height: 36px; padding: 0 16px; border-radius: 999px; font-weight: 700; color: #fff; background: var(--blue); }
.sc-save.busy { opacity: .6; }
.sc-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 16px; }
.sc-body h4 { margin: 14px 0 0; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sc-body .note { margin: 0; }
.sc-swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.sc-swatch { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(150deg, var(--sc1), var(--sc2)); }
.sc-swatch.on { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ink); }
.sc-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.sc-service input { width: 100%; }
.sc-service { display: flex; align-items: center; gap: 8px; }
.sc-service .control { flex: 1; min-width: 0; }
.sc-service .control.price { flex: 0 0 104px; }
.sc-more { justify-self: start; height: 36px; color: var(--blue); }
.sc-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sc-thumb, .sc-add-photo { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--field); }
.sc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sc-thumb.busy img { opacity: .45; }
.sc-thumb button { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .55); }
.sc-add-photo { display: grid; place-content: center; justify-items: center; gap: 4px; color: var(--muted); font-size: 13px; border: 1.5px dashed var(--line); }
.sc-body .primary { margin-top: 8px; }

/* ----- business tools ----- */
/* Inbox labels */
.label-filters { display: flex; gap: 8px; padding: 2px 16px 8px; overflow-x: auto; scrollbar-width: none; flex: none; }
.label-filters::-webkit-scrollbar { display: none; }
.label-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); background: var(--field); }
.label-chip i { font-style: normal; font-size: 12px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: grid; place-items: center; background: var(--line); color: var(--ink); }
.label-chip.on { color: #fff; background: var(--blue); }
.label-chip.on i { background: rgba(255, 255, 255, .25); color: #fff; }
.label-chip.l-new.on { background: #3b82f6; } .label-chip.l-waiting.on { background: #d97706; } .label-chip.l-done.on { background: #16a34a; }
.row-label { flex: none; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.row-label.l-new { color: #60a5fa; background: rgba(59, 130, 246, .16); }
.row-label.l-waiting { color: #f59e0b; background: rgba(217, 119, 6, .16); }
.row-label.l-done { color: #22c55e; background: rgba(22, 163, 74, .16); }
:root[data-theme="light"] .row-label.l-new { color: #2563eb; } :root[data-theme="light"] .row-label.l-waiting { color: #b45309; } :root[data-theme="light"] .row-label.l-done { color: #15803d; }
.label-pick { display: grid; gap: 8px; }
.label-pick small { color: var(--muted); font-size: 13px; }
.label-pick > div { display: flex; gap: 8px; flex-wrap: wrap; }
.label-pick .label-chip.l-new.on, .label-pick .label-chip.l-waiting.on, .label-pick .label-chip.l-done.on { color: #fff; }

/* Away note at the top of a chat while the business is closed */
.away-note { display: flex; align-items: flex-start; gap: 10px; margin: 8px 12px 0; padding: 10px 14px; border-radius: 12px; flex: none;
  background: color-mix(in srgb, #8b5cf6 12%, var(--bg)); border: 1px solid color-mix(in srgb, #8b5cf6 24%, transparent); color: var(--ink); }
.away-note .icon { color: #a78bfa; margin-top: 1px; }
.away-note > span { display: grid; gap: 2px; min-width: 0; }
.away-note b { font-size: 14px; font-weight: 600; }
.away-note small { font-size: 13px; color: var(--muted); }

/* Quick replies */
.bar .quick { color: #f59e0b; }
.qr-list { max-height: 50dvh; overflow-y: auto; }
.qr-item { min-height: 52px; padding-top: 10px; padding-bottom: 10px; }
.qr-item span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.sc-row { display: flex; align-items: flex-start; gap: 6px; }
.sc-row .control { flex: 1; min-width: 0; }

/* Weekly stats in Profile */
.stats-card { padding: 16px; border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, #2563eb 14%, var(--field)), color-mix(in srgb, #06b6d4 10%, var(--field))); }
.stats-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.stats-head b { font-size: 16px; }
.stats-head small { color: var(--muted); font-size: 13px; }
.stats-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats-num { display: grid; justify-items: start; gap: 2px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--bg) 55%, transparent); }
.stats-num b { font-size: 24px; font-weight: 700; line-height: 1.1; }
.stats-num small { font-size: 12.5px; color: var(--muted); }
.stats-num .trend { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.stats-num .trend.up { color: var(--green); } .stats-num .trend.down { color: var(--danger); }
.stats-num.loading b { opacity: .4; }
.stats-note { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.stats-note .icon { color: #f59e0b; }

/* Opening times editor */
.sc-week { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.sc-day { display: flex; align-items: center; gap: 10px; min-height: 48px; }
.sc-day-name { display: flex; align-items: center; gap: 8px; width: 92px; flex: none; font-weight: 600; color: var(--ink); }
.sc-day-name .switch { width: 40px; height: 24px; }
.sc-day-name .switch::after { width: 18px; height: 18px; }
.sc-day-name .switch.on::after { transform: translateX(16px); }
.sc-times { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; }
.sc-times .control { flex: 1; min-width: 0; height: 42px; padding: 0 8px; }
.sc-times .control input { width: 100%; font-size: 15px; }
.sc-times .control input::-webkit-calendar-picker-indicator { display: none; }
.sc-day { min-width: 0; }
.sc-hours-link { border-radius: 12px; background: var(--field); }
.sc-hours-link > span { display: grid; }
.sc-hours-link small { font-size: 13px; color: var(--muted); }

/* Showcase page: open badge, offer, week */
.bp-open { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 6px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: #f87171; background: rgba(239, 68, 68, .12); }
.bp-open i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.bp-open.yes { color: #22c55e; background: rgba(34, 197, 94, .13); }
.bp-open.yes i { box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: pulse 2s infinite; }
:root[data-theme="light"] .bp-open { color: #dc2626; } :root[data-theme="light"] .bp-open.yes { color: #15803d; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.bp-offer { position: relative; overflow: hidden; margin: 16px 16px 0 !important; padding: 18px; border-radius: 20px; color: #fff;
  background: linear-gradient(135deg, var(--sc1), var(--sc2)); box-shadow: 0 12px 30px color-mix(in srgb, var(--sc1) 30%, transparent); }
@media (min-width: 592px) { .bp-offer { margin: 16px auto 0 !important; } }
.bp-offer-glow { position: absolute; width: 200px; height: 200px; right: -70px; top: -90px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.bp-offer > *:not(.bp-offer-glow) { position: relative; }
.bp-offer-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: rgba(255, 255, 255, .22); }
.bp-offer h3 { margin-top: 10px; font: 700 22px/1.2 var(--brand); letter-spacing: -.01em; }
.bp-offer p { margin: 6px 0 0; opacity: .92; line-height: 1.45; }
.bp-offer small { display: block; margin-top: 8px; font-size: 13px; opacity: .85; }
.bp-offer-btn { margin-top: 14px; display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 12px 0 18px; border-radius: 999px; font-weight: 700; color: var(--sc1); background: #fff; }
.sc-graphite .bp-offer-btn { color: #2f3542; }
.bp-week { display: grid; }
.bp-day { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; color: var(--muted); }
.bp-day b { font-weight: 500; color: var(--ink); }
.bp-day.today { color: var(--ink); font-weight: 700; }
.bp-day.today b { font-weight: 700; color: var(--sc-ink); }

/* ----- gold tick, saved businesses, pinned chats, broadcasts ----- */
.tick.gold .seal { fill: #e0a422; }
:root[data-theme="light"] .tick.gold .seal { fill: #d69a14; }
.bp-name .tick.gold .seal { fill: #f2b632; }
.bp-save.on { color: #f5b301; }
.bp-top.solid .bp-save.on { color: #f5b301; }
.row-pin { opacity: .85; display: inline-flex; color: var(--muted); margin-left: auto; margin-right: 4px; }
.row-top .row-pin + time { margin-left: 0; }
.saved { display: grid; gap: 8px; margin: 4px 0 8px; }
.saved:empty { display: none; }
.saved h4 { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.saved h4 .icon { color: #f5b301; }
.saved-row { min-height: 60px; }
.item.saved-row > .avatar { flex: 0 0 auto; }
.saved-row > span:not(.icon):not(.avatar) { display: grid; min-width: 0; flex: 1; text-align: left; }
.saved-row small { font-size: 13px; color: var(--muted); }
.mini-open { font-style: normal; color: #f87171; }
.mini-open.yes { color: #22c55e; }
.bubble.cast { border: 1px solid color-mix(in srgb, #f59e0b 35%, transparent); }
.cast-tag { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 4px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #f59e0b; }
.bc-hero { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, #f59e0b 16%, var(--field)), color-mix(in srgb, #ef4444 10%, var(--field))); }
.bc-hero > div { display: grid; gap: 2px; }
.bc-hero small { color: var(--muted); font-size: 13px; }
.bc-ic { width: 48px; height: 48px; flex: none; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #f59e0b, #ef4444); }
.primary:disabled { opacity: .45; }

/* ---------- customer side: archive, mute, reactions, swipe to reply, business cards, recently viewed ---------- */
.archived-row { min-height: 56px; }
.archived-row .arch-ic { width: 52px; height: 40px; display: grid; place-items: center; color: var(--muted); flex: none; }
.archived-row .row-body { display: grid; align-content: center; min-height: 56px; }
.archived-row b { font-weight: 600; font-size: 15.5px; }
.archived-row small { font-size: 12.5px; color: var(--muted); }
.archived-row.arch-back .arch-ic { color: var(--blue); }
.arch-count { margin-right: 16px; font-size: 13px; color: var(--muted); font-weight: 600; }
.arch-count.unread { color: var(--blue); }
.badge.quiet { background: var(--muted); opacity: .75; }

.msg { position: relative; flex-direction: column; align-items: flex-start; will-change: transform; }
.msg.mine { align-items: flex-end; }
.swipe-ic { position: absolute; left: -38px; top: 50%; translate: 0 -50%; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--hover); color: var(--muted); opacity: 0; transition: opacity .12s, color .12s; pointer-events: none; }
.msg[style*="translateX"] .swipe-ic { opacity: .6; }
.msg.swipe-ready .swipe-ic { opacity: 1; color: var(--blue); }

.reacts { display: flex; gap: 4px; margin-top: -6px; padding: 0 8px; position: relative; z-index: 1; flex-wrap: wrap; }
.react { display: inline-flex; align-items: center; gap: 3px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font-size: 14px; line-height: 1; }
.react i { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 600; }
.react.on { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 16%, var(--bg)); }
.react-pick { display: flex; justify-content: space-between; gap: 6px; padding: 4px 2px 12px; }
.react-pick button { flex: 1; height: 48px; border-radius: 14px; font-size: 26px; background: var(--hover); transition: transform .12s; }
.react-pick button:active { transform: scale(1.15); }
.react-pick button.on { background: color-mix(in srgb, var(--blue) 22%, transparent); box-shadow: inset 0 0 0 1.5px var(--blue); }

.biz-card { display: flex; align-items: center; gap: 10px; min-width: 220px; max-width: 280px; padding: 6px 2px 4px; text-align: left; color: inherit; }
.biz-card > span:not(.icon):not(.avatar) { flex: 1; min-width: 0; display: grid; gap: 1px; }
.biz-card > .avatar { flex: none; }
.biz-card small { font-size: 12.5px; opacity: .75; }
.biz-card i { font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--blue); }
.msg.mine .biz-card i { color: #fff; opacity: .9; }
.msg.business .bubble { padding-top: 6px; }

.recent { margin: 4px 0 10px; }
.recent:empty { display: none; }
.recent-head { display: flex; align-items: center; justify-content: space-between; }
.recent-head h4 { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.recent-head .text-btn { font-size: 13px; }
.recent-row { display: flex; gap: 14px; overflow-x: auto; padding: 10px 2px 4px; scrollbar-width: none; }
.recent-row::-webkit-scrollbar { display: none; }
.recent-item { flex: none; width: 68px; display: grid; justify-items: center; gap: 6px; color: var(--ink); }
.recent-item > span:not(.avatar) { font-size: 12.5px; max-width: 68px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; align-items: center; gap: 2px; }
.pick-chat .group { max-height: 55vh; overflow-y: auto; }
.pick-chat .item .icon:last-child { color: var(--blue); }

/* Notice from Sweep Text (owner announcements), at the top of Chats */
.notice { display: flex; gap: 10px; align-items: flex-start; margin: 4px 14px 10px; padding: 12px 12px 12px 14px; border-radius: 14px; background: var(--blue-soft); color: var(--ink); }
.notice-ic { color: var(--blue); flex: none; margin-top: 1px; }
.notice-text { flex: 1; min-width: 0; }
.notice-text b { display: block; font-size: 15px; }
.notice-text p { margin: 2px 0 0; font-size: 14px; color: var(--ink); opacity: .85; white-space: pre-wrap; overflow-wrap: anywhere; }
.notice-x { flex: none; border: 0; background: none; color: var(--muted); padding: 4px; cursor: pointer; border-radius: 8px; }

/* Verified tick request (business Profile) */
.tick-req { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--field); text-align: left; }
.tick-req > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tick-req b { font-size: 15px; }
.tick-req small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.tick-req .tick-req-ic { flex: none; filter: grayscale(1); opacity: .55; }

/* ---------- polish 2026-12-05: chat bubbles, Find suggestions, phone keyboard ---------- */
#root { height: var(--app-h, 100dvh); }
body.kb-open .composer { padding-bottom: 6px; }

/* Messages: grouped like other chat apps, softer corners, time on the last line */
.scroll { gap: 0; padding-top: 14px; padding-bottom: 10px; }
.msg { margin-top: 10px; }
.msg.cont { margin-top: 2px; }
.day + .msg, .intro + .msg, .older + .msg { margin-top: 4px; }
.day { margin: 16px 0 6px; }
.day span { font-size: 12px; font-weight: 600; letter-spacing: .01em; padding: 5px 12px; border-radius: 999px; background: var(--them); color: var(--muted); }
.bubble { padding: 8px 12px; border-radius: 19px; font-size: 16px; line-height: 1.36; }
.theirs .bubble { border-bottom-left-radius: 19px; }
.mine .bubble { border-bottom-right-radius: 19px; }
.theirs.cont .bubble { border-top-left-radius: 6px; }
.theirs.has-next .bubble { border-bottom-left-radius: 6px; }
.mine.cont .bubble { border-top-right-radius: 6px; }
.mine.has-next .bubble { border-bottom-right-radius: 6px; }
.theirs:not(.has-next) .bubble { border-bottom-left-radius: 6px; }
.mine:not(.has-next) .bubble { border-bottom-right-radius: 6px; }
.mine .bubble { background: linear-gradient(180deg, color-mix(in srgb, var(--me) 88%, #fff) 0%, var(--me) 100%); }
:root[data-theme="light"] .mine .bubble { background: var(--me); }

/* the time sits at the bottom right, on the same line as the end of the text */
.bubble:has(> .text:not(.gone)) { padding-bottom: 7px; }
.bubble:has(> .text:not(.gone) .meta-space) > .meta { position: absolute; right: 11px; bottom: 6px; margin: 0; }
.meta-space { display: inline-block; width: 58px; height: 1px; }
.meta-space.mine { width: 76px; }
.meta { font-size: 11px; font-variant-numeric: tabular-nums; letter-spacing: .01em; opacity: .55; }
.mine .meta { opacity: .78; }

/* photos without a caption: no frame, time on the photo */
.bubble.bare { padding: 0; background: none !important; box-shadow: none !important; border-radius: 16px; overflow: hidden; }
.bubble.bare .photo { width: 240px; max-height: 320px; border-radius: 16px; }
.bubble.bare > .meta { position: absolute; right: 8px; bottom: 8px; margin: 0; padding: 2px 7px; border-radius: 999px; background: rgba(0, 0, 0, .5); color: #fff; opacity: 1; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.msg.image .bubble:not(.bare), .msg.video .bubble:not(.bare) { padding: 4px 4px 6px; }
.msg.image .bubble:not(.bare) .photo { border-radius: 15px; }
.photo { border-radius: 16px; }

/* just an emoji or two: big, no bubble */
.bubble.jumbo { padding: 0 2px; background: none !important; box-shadow: none !important; }
.bubble.jumbo .text { font-size: 44px; line-height: 1.1; }
.bubble.jumbo > .meta { justify-content: flex-end; margin-top: 2px; color: var(--muted); opacity: 1; }

/* a new message slides in gently */
.msg.pop { animation: pop .22s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .msg.pop { animation: none; } }

/* top bar and message box */
.chat-head { min-height: calc(var(--top) + 58px); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.composer { padding: 8px 8px calc(8px + var(--bottom)); }
.bar { align-items: flex-end; gap: 6px; }
.bar .attach, .bar > button:not(.send) { color: var(--muted); }
.field-wrap { border-radius: 22px; min-height: 42px; border: 1px solid transparent; transition: border-color .15s, background .15s; }
.field-wrap:focus-within { border-color: color-mix(in srgb, var(--blue) 55%, transparent); background: var(--bg); }
.field-wrap textarea { padding: 10px 0; }
.send { width: 42px; height: 42px; transition: transform .12s; }
.send:active { transform: scale(.92); }

/* ----- Find: suggestions while typing ----- */
.find-form .control { height: 46px; border-radius: 14px; }
.find-form .control .icon { color: var(--muted); }
.find-form input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.find-result { padding-top: 4px; }
.sugg-list { display: grid; }
.sugg-head { padding: 6px 2px 6px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.row.sugg { margin: 0 -16px; padding-left: 16px; width: calc(100% + 32px); }
.row.sugg .row-body { min-height: 58px; }
.sugg-hint { margin: 18px 4px; color: var(--muted); font-size: 14px; text-align: center; }
.found { position: relative; padding-top: 44px; }
.found-back { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 6px 8px; border-radius: 8px; font-size: 14px; color: var(--blue); }
.bubble.bare .photo { outline: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); outline-offset: -1px; }

/* =====================================================================
   Calm premium pass (2026-12-05): softer palette, roomier spacing,
   glass bars, gentle motion. Overrides the rules above.
   ===================================================================== */
:root {
  --bg: #121418;
  --chat-bg: #0d0f12;
  --field: #1b1e23;
  --raised: #181b20;
  --ink: #eceef1;
  --muted: #8b919c;
  --line: #24282e;
  --hover: #1a1d22;
  --blue: #5b8cff;
  --blue-2: #7c6cff;
  --blue-soft: rgba(91, 140, 255, .14);
  --me: #3d6ee0;
  --them: #1d2025;
  --r: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --ease: cubic-bezier(.2, .8, .2, 1);
}
:root[data-theme="light"] {
  --bg: #ffffff;
  --chat-bg: #f4f5f8;
  --field: #f2f3f6;
  --raised: #ffffff;
  --ink: #101318;
  --muted: #868b95;
  --line: #e9eaee;
  --hover: #f4f5f7;
  --blue: #2f6bff;
  --blue-2: #6a5cff;
  --blue-soft: rgba(47, 107, 255, .09);
  --me: #2f6bff;
  --them: #ffffff;
  --shadow: 0 10px 30px rgba(20, 30, 60, .12);
}
body { font-feature-settings: 'cv11', 'ss01'; letter-spacing: -.005em; }
::selection { background: color-mix(in srgb, var(--blue) 35%, transparent); }

/* ----- buttons and fields everywhere ----- */
.primary { height: 52px; border-radius: var(--r); font-size: 16.5px; letter-spacing: -.01em;
  background: linear-gradient(135deg, var(--blue), color-mix(in srgb, var(--blue) 60%, var(--blue-2)));
  box-shadow: 0 6px 18px color-mix(in srgb, var(--blue) 28%, transparent), inset 0 1px 0 rgba(255, 255, 255, .14);
  transition: transform .12s var(--ease), opacity .12s; }
.primary:active { transform: scale(.985); opacity: .92; }
.primary.danger { background: var(--danger); box-shadow: none; }
.pill-btn { background: linear-gradient(135deg, var(--blue), color-mix(in srgb, var(--blue) 60%, var(--blue-2))); }
.pill-btn.small { background: var(--blue-soft); }
.control { height: 52px; border-radius: var(--r); padding: 0 14px; transition: border-color .15s, background .15s, box-shadow .15s; }
.control:focus-within { border-color: color-mix(in srgb, var(--blue) 70%, transparent); background: var(--bg); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 12%, transparent); }
.social { height: 52px; border-radius: var(--r); }
.label { font-size: 13px; font-weight: 600; letter-spacing: .01em; }
.group { border-radius: 16px; background: var(--field); }
.item { min-height: 52px; padding: 0 16px; }
.item.detail { min-height: 60px; }

/* ----- sign in / create account ----- */
.auth { position: relative; isolation: isolate; }
.auth-glow { position: absolute; z-index: -1; top: -140px; left: 50%; width: 560px; height: 420px; translate: -50% 0; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--blue) 34%, transparent), transparent 70%),
              radial-gradient(closest-side at 70% 60%, color-mix(in srgb, var(--blue-2) 26%, transparent), transparent 70%);
  filter: blur(30px); opacity: .75; animation: glow 9s ease-in-out infinite alternate; }
:root[data-theme="light"] .auth-glow { opacity: .45; }
@keyframes glow { to { transform: translate(18px, 14px) scale(1.06); } }
.auth-inner { position: relative; gap: 26px; padding-top: calc(var(--top) + 52px); }
.brand { gap: 10px; animation: rise-in .6s var(--ease) both; }
.brand .logo { box-shadow: 0 12px 30px color-mix(in srgb, var(--blue) 30%, transparent); }
.wordmark { font-size: 28px; }
.tagline { margin: 2px 0 0; max-width: 260px; text-align: center; color: var(--muted); font-size: 15px; line-height: 1.4; }
.auth-form { gap: 16px; animation: rise-in .6s .08s var(--ease) both; }
.seg { padding: 4px; border-radius: 14px; background: color-mix(in srgb, var(--field) 85%, transparent); }
.seg button { height: 40px; border-radius: 10px; transition: background .2s, color .2s; }
.seg button.on { background: var(--raised); box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.auth-title h2 { font-size: 26px; letter-spacing: -.02em; }
.auth-title p { font-size: 15.5px; line-height: 1.45; }
.type { border-radius: 16px; padding: 14px; transition: border-color .15s, background .15s; }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } }

/* ----- top of each tab ----- */
.page-head { padding: calc(var(--top) + 16px) 16px 6px; }
.page-head h1 { font-size: 32px; font-weight: 750; letter-spacing: -.03em; }
.home-head { align-items: flex-end; }
.head-text { flex: 1; min-width: 0; display: grid; }
.greet { font-size: 13.5px; font-weight: 500; color: var(--muted); margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.head-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); margin-bottom: 2px; }
.head-me { border-radius: 50%; margin-bottom: 2px; }
.head-me .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--line); }
.head-btn:active, .head-me:active { transform: scale(.94); }
.searchbox { height: 42px; border-radius: 12px; margin: 10px 16px 8px; padding: 0 12px; }

/* ----- chat list ----- */
.row { gap: 14px; transition: background .15s; }
.row-body { padding: 13px 16px 13px 0; gap: 3px; }
.row .name { font-size: 16.5px; letter-spacing: -.01em; }
.row time { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.preview { font-size: 14.5px; }
.preview.unread { color: var(--ink); font-weight: 500; }
.badge { background: linear-gradient(135deg, var(--blue), color-mix(in srgb, var(--blue) 55%, var(--blue-2))); }
.avatar { font-weight: 650; letter-spacing: .01em; text-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.avatar .dot { width: 13px; height: 13px; border-width: 2.5px; }

/* ----- tab bar: frosted, with a soft pill behind the current tab ----- */
.tabbar { background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.5) blur(18px); -webkit-backdrop-filter: saturate(1.5) blur(18px); border-top-color: color-mix(in srgb, var(--line) 70%, transparent); padding-top: 6px; }
.tabbar button { font-size: 11px; font-weight: 600; gap: 2px; transition: color .2s; }
.tab-ic { width: 58px; border-radius: 16px; transition: background .25s var(--ease); }
.tabbar button.on .tab-ic { background: var(--blue-soft); }
.tabbar button:active .tab-ic { transform: scale(.94); }

/* ----- chat screen ----- */
.chat { background: radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--blue) 5%, transparent), transparent 60%), var(--chat-bg); }
.chat-head { gap: 12px; padding: calc(var(--top) + 8px) 8px 8px 12px; border-bottom-color: color-mix(in srgb, var(--line) 70%, transparent); }
.chat-head .name { font-size: 16.5px; }
.status { font-size: 12.5px; }
.intro { padding: 26px 0 14px; gap: 4px; }
.intro .avatar { box-shadow: 0 10px 28px rgba(0, 0, 0, .3); }
.intro .name { font-size: 20px; letter-spacing: -.02em; }
.day span { background: color-mix(in srgb, var(--them) 80%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset; }
.theirs .bubble:not(.bare):not(.jumbo) { box-shadow: 0 1px 0 rgba(255, 255, 255, .025) inset; }
:root[data-theme="light"] .theirs .bubble:not(.bare):not(.jumbo) { box-shadow: 0 1px 2px rgba(16, 24, 40, .06); }
.mine .bubble:not(.bare):not(.jumbo) { box-shadow: 0 2px 10px color-mix(in srgb, var(--me) 22%, transparent); }
:root[data-theme="light"] .mine .bubble:not(.bare):not(.jumbo) { background: linear-gradient(180deg, color-mix(in srgb, var(--me) 90%, #fff), var(--me)); }

/* reply inside a bubble */
.quote { padding: 6px 10px; border-radius: 12px; border-left-width: 3px; background: color-mix(in srgb, var(--blue) 10%, transparent); margin: 2px -4px 6px; width: calc(100% + 8px); }
.quote b { font-size: 13px; }
.quote span { font-size: 13.5px; }
.mine .quote { background: rgba(255, 255, 255, .16); }

/* reactions sit on the edge of the bubble */
.reacts { margin-top: -8px; padding: 0 10px; }
.react { height: 26px; padding: 0 8px; background: var(--raised); border-color: var(--line); box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
:root[data-theme="light"] .react { box-shadow: 0 2px 6px rgba(16, 24, 40, .1); }

/* "Replying to" above the message box */
.replying { margin: 0 2px 8px; padding: 8px 6px 8px 12px; border-radius: 14px; background: var(--field); animation: rise-in .2s var(--ease); }
.replying div { border-left-color: var(--blue); }
.replying > .icon:first-child { color: var(--blue); }

/* message box */
.composer { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px); border-top-color: color-mix(in srgb, var(--line) 70%, transparent); }
.send { background: linear-gradient(135deg, var(--blue), color-mix(in srgb, var(--blue) 55%, var(--blue-2))); box-shadow: 0 4px 14px color-mix(in srgb, var(--blue) 35%, transparent); }

/* ----- menus that slide up ----- */
.sheet-wrap { background: rgba(5, 7, 10, .5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet { background: var(--raised); border-radius: 24px 24px 0 0; padding: 10px 16px calc(18px + var(--bottom)); box-shadow: var(--shadow); animation: sheet-up .32s var(--ease); }
:root:not([data-theme="light"]) .sheet .group { background: #20242a; }
@keyframes sheet-up { from { transform: translateY(100%); } }
.grab { width: 40px; opacity: .8; }
.react-pick { gap: 8px; padding: 6px 0 14px; }
.react-pick button { height: 52px; border-radius: 50%; aspect-ratio: 1; flex: 0 0 auto; width: calc((100% - 40px) / 6); font-size: 27px; background: var(--field); }
:root:not([data-theme="light"]) .react-pick button { background: #20242a; }
@media (min-width: 860px) { .sheet { border-radius: 24px; } }

/* ----- Find ----- */
.find-form { margin: 10px 16px 6px; }
.find-start { display: grid; gap: 18px; padding-top: 6px; }
.people .recent-row, .recent .recent-row { gap: 16px; }
.recent-item .avatar { box-shadow: 0 6px 16px rgba(0, 0, 0, .22); transition: transform .15s var(--ease); }
.recent-item:active .avatar { transform: scale(.94); }
.recent-head h4, .saved h4, .sugg-head { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.recent, .saved { margin: 0; }
.find-tip { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 18px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--blue) 12%, var(--field)), color-mix(in srgb, var(--blue-2) 8%, var(--field))); }
.find-tip-ic { width: 42px; height: 42px; flex: none; border-radius: 13px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--blue-2)); box-shadow: 0 6px 16px color-mix(in srgb, var(--blue) 30%, transparent); }
.find-tip > span:last-child { display: grid; gap: 2px; }
.find-tip b { font-size: 15.5px; }
.find-tip small { font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.sugg-list + .sugg-list { margin-top: 14px; }
.sugg-list { animation: fade .18s ease-out; }
.sugg-tag { flex: none; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; color: var(--blue); background: var(--blue-soft); }
.sugg-hint.small { margin: 12px 4px; font-size: 13px; }
.sugg-loading { display: flex; justify-content: center; gap: 6px; padding: 28px; }
.sugg-loading i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.sugg-loading i:nth-child(2) { animation-delay: .15s; }
.sugg-loading i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 100% { opacity: .2; } 40% { opacity: 1; } }
.found { border: 0; border-radius: 22px; padding: 52px 20px 20px; overflow: hidden; isolation: isolate; animation: rise-in .3s var(--ease);
  background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 16%, var(--field)) 0, var(--field) 120px); }
.found .avatar { box-shadow: 0 0 0 4px var(--field), 0 12px 30px rgba(0, 0, 0, .3); }
.found .profile-name { font-size: 22px; letter-spacing: -.02em; }
.found .chip-static { padding: 3px 10px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-weight: 600; font-size: 12.5px; }
.found .text-btn { color: var(--blue); }

/* ----- Profile ----- */
.profile { gap: 14px; }
.profile-card { position: relative; padding: 26px 16px 18px; border-radius: 22px; isolation: isolate; overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 15%, var(--field)), var(--field) 70%); }
.profile-card::before { content: ''; position: absolute; z-index: -1; inset: -40% -20% auto; height: 160px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--blue-2) 25%, transparent), transparent); filter: blur(20px); }
.profile-card .avatar { box-shadow: 0 0 0 4px var(--bg), 0 12px 30px rgba(0, 0, 0, .3); }
.profile-name { letter-spacing: -.02em; }
.profile-card .chip-static { padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 55%, transparent); font-weight: 600; font-size: 12.5px; }

/* plain business page */
.bp-plain { position: relative; isolation: isolate; }
.bp-plain::before { content: ''; position: absolute; z-index: -1; inset: 0 0 auto; height: calc(var(--top) + 170px);
  background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 18%, transparent), transparent); }
.bp-plain .avatar { box-shadow: 0 0 0 4px var(--bg), 0 14px 34px rgba(0, 0, 0, .3); }

/* empty states */
.empty { padding: 64px 32px; }
.empty-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); margin-bottom: 10px; }
.empty h3 { font-size: 19px; letter-spacing: -.01em; }

/* a gentle slide when a chat opens on a phone */
@media (max-width: 859px) {
  body.chat-open .chat { animation: chat-in .28s var(--ease); }
  @keyframes chat-in { from { transform: translateX(24px); opacity: .4; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.tab-ic .badge { left: calc(50% + 3px); top: -4px; }
:root { --av-s: 36%; --av-l: 43%; }
:root[data-theme="light"] { --av-s: 52%; --av-l: 55%; }

/* =====================================================================
   Feel (2026-12-05): Inter everywhere, loading placeholders, photo fade-in, typing dots
   ===================================================================== */
@font-face { font-family: 'Inter'; src: url('fonts/inter-latin.woff2') format('woff2'); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; src: url('fonts/inter-latin-ext.woff2') format('woff2'); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root { --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }
body { font-feature-settings: 'cv11', 'ss01', 'ss03', 'calt'; letter-spacing: -.011em; }
.page-head h1, .auth-title h2, .profile-name, .intro .name { letter-spacing: -.035em; }
.meta, .row time, .badge { font-feature-settings: 'tnum', 'cv11'; }

/* photos and profile pictures fade in */
img.photo, .avatar img, .recent-item img, .sc-thumb img { opacity: 0; transition: opacity .35s ease; }
img.photo.loaded, .avatar img.loaded, .recent-item img.loaded, .sc-thumb img.loaded { opacity: 1; }
img.photo:not(.loaded) { background: linear-gradient(100deg, var(--field) 40%, color-mix(in srgb, var(--field) 70%, var(--ink) 6%) 50%, var(--field) 60%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }

/* loading placeholders */
.skel, .skel-msg { display: block; border-radius: 8px; background: linear-gradient(100deg, var(--field) 40%, color-mix(in srgb, var(--field) 70%, var(--ink) 7%) 50%, var(--field) 60%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }
.skel-row { pointer-events: none; }
.skel-av { width: 52px; height: 52px; flex: none; border-radius: 50%; }
.skel-row .row-body { gap: 9px; padding: 18px 16px 18px 0; }
.skel-line { height: 12px; }
.skel-line.short { height: 10px; opacity: .7; }
.skel-msgs { display: grid; gap: 8px; padding: 12px 0; }
.skel-msg { height: 38px; border-radius: 18px; }
.skel-msg.mine { justify-self: end; }
.skel-msg.w35 { width: 35%; } .skel-msg.w40 { width: 40%; } .skel-msg.w50 { width: 50%; } .skel-msg.w55 { width: 55%; } .skel-msg.w60 { width: 60%; } .skel-msg.w70 { width: 70%; }

/* typing dots */
.typing-bubble { align-self: flex-start; display: inline-flex; gap: 4px; align-items: center; margin-top: 10px; padding: 12px 14px; border-radius: 19px 19px 19px 6px; background: var(--them); animation: rise-in .2s var(--ease); }
.typing-bubble i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: bounce 1.2s infinite ease-in-out; }
.typing-bubble i:nth-child(2) { animation-delay: .15s; }
.typing-bubble i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
:root[data-theme="light"] .typing-bubble { box-shadow: 0 1px 2px rgba(16, 24, 40, .06); }

/* ----- welcome screens for new accounts ----- */
.welcome { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; background: var(--bg); isolation: isolate; overflow: hidden; animation: fade .3s ease-out; transition: opacity .25s, transform .25s; }
.welcome.out { opacity: 0; transform: scale(1.02); }
.welcome .auth-glow { top: -80px; }
.wl-track { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.wl-track::-webkit-scrollbar { display: none; }
.wl-slide { flex: 0 0 100%; scroll-snap-align: center; display: grid; align-content: center; justify-items: center; gap: 14px; padding: calc(var(--top) + 40px) 32px 24px; text-align: center; }
.wl-slide h2 { font-size: 28px; letter-spacing: -.035em; max-width: 320px; }
.wl-slide p { margin: 0; max-width: 310px; color: var(--muted); font-size: 16.5px; line-height: 1.5; }
.wl-art { width: 150px; height: 150px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 44px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--blue) 22%, var(--field)), color-mix(in srgb, var(--blue-2) 14%, var(--field)));
  box-shadow: 0 24px 60px color-mix(in srgb, var(--blue) 22%, transparent), inset 0 1px 0 rgba(255, 255, 255, .06); }
.wl-art.logo-art { background: none; box-shadow: none; }
.wl-art.logo-art .logo { box-shadow: 0 20px 50px color-mix(in srgb, var(--blue) 40%, transparent); }
.wl-ic { width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--blue), var(--blue-2)); box-shadow: 0 10px 26px color-mix(in srgb, var(--blue) 40%, transparent); }
.wl-pic { position: relative; margin-bottom: 14px; border-radius: 50%; }
.wl-pic .avatar { box-shadow: 0 0 0 6px var(--bg), 0 0 0 7.5px color-mix(in srgb, var(--blue) 50%, transparent), 0 24px 50px rgba(0, 0, 0, .3); }
.wl-cam { position: absolute; right: 2px; bottom: 2px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--blue), var(--blue-2)); border: 3px solid var(--bg); }
.wl-foot { display: grid; gap: 10px; padding: 8px 24px calc(18px + var(--bottom)); max-width: 440px; width: 100%; margin: 0 auto; }
.wl-dots { display: flex; justify-content: center; gap: 7px; margin-bottom: 10px; }
.wl-dots i { width: 7px; height: 7px; border-radius: 4px; background: var(--line); transition: width .3s var(--ease), background .3s; }
.wl-dots i.on { width: 22px; background: var(--blue); }

/* ----- chat details page ----- */
.cd-scroll { height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px calc(32px + var(--bottom)); display: grid; gap: 18px; align-content: start; max-width: 560px; margin: 0 auto; }
.cd { isolation: isolate; }
.cd::before { content: ''; position: absolute; z-index: -1; inset: 0 0 auto; height: calc(var(--top) + 240px); pointer-events: none;
  background: radial-gradient(80% 100% at 50% 0%, color-mix(in srgb, var(--blue) 20%, transparent), transparent 75%); }
.cd-top { position: sticky; top: 0; z-index: 2; display: flex; padding: calc(var(--top) + 8px) 0 4px; }
.cd-top .bp-round { color: var(--ink); background: color-mix(in srgb, var(--field) 80%, transparent); }
.cd-hero { display: grid; justify-items: center; text-align: center; gap: 3px; margin-top: -8px; animation: rise-in .35s var(--ease) both; }
.cd-hero .avatar { box-shadow: 0 0 0 5px var(--bg), 0 18px 44px rgba(0, 0, 0, .35); margin-bottom: 8px; }
.cd-hero .profile-name { margin-top: 4px; }
.cd-hero p { margin: 8px 0 0; max-width: 320px; color: var(--muted); font-size: 15px; }
.cd-hero .chip-static { padding: 3px 10px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-weight: 600; font-size: 12.5px; }
.cd-status { font-size: 13.5px; color: var(--muted); }
.cd-status.online { color: var(--green); }
.cd-status:empty { display: none; }
.cd-acts { display: flex; justify-content: center; gap: 10px; animation: rise-in .35s .05s var(--ease) both; }
.cd-act { flex: 1; max-width: 96px; display: grid; justify-items: center; gap: 6px; padding: 12px 6px 10px; border-radius: 16px; background: var(--field); color: var(--blue); transition: transform .12s var(--ease); }
.cd-act small { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.cd-act.on { background: var(--blue-soft); }
.cd-act:active { transform: scale(.95); }
.cd-sec { display: grid; gap: 10px; animation: rise-in .35s .1s var(--ease) both; }
.cd-sec[hidden] { display: none; }
.cd-sec h4 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cd-count { margin-left: auto; letter-spacing: 0; font-weight: 600; }
.cd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: 16px; overflow: hidden; }
.cd-ph, .cd-skel { aspect-ratio: 1; border-radius: 0; }
.cd-ph img.photo { width: 100%; height: 100%; min-height: 0; max-height: none; border-radius: 0; object-fit: cover; }
.cd-empty { grid-column: 1 / -1; margin: 0; padding: 20px; text-align: center; color: var(--muted); font-size: 14px; border-radius: 16px; background: var(--field); }
.cd-files { display: grid; gap: 6px; }
.cd-files .file-card { max-width: none; padding: 10px 12px; border-radius: 14px; background: var(--field); }
.cd-note { text-align: center; margin: -4px 0 0; }
.cd-scroll { grid-auto-rows: max-content; }

/* Disappearing messages: a quiet line at the top of each chat */
.disappear-note { flex: none; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 16px 2px; color: var(--muted); font-size: 12.5px; }
.disappear-note .icon { flex: none; opacity: .8; }

/* ----- stories and notes (row at the top of Chats, full-screen viewer, makers) ----- */
.story-row { display: flex; gap: 10px; overflow-x: auto; padding: 4px 14px 10px; scrollbar-width: none; flex: none; }
.story-row::-webkit-scrollbar { display: none; }
.story-row[hidden] { display: none; }
.story-item { flex: none; width: 78px; display: grid; justify-items: center; grid-template-rows: 36px auto; }
.story-btn { position: relative; display: grid; justify-items: center; gap: 5px; color: var(--ink); }
.story-name { font-size: 12.5px; max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; align-items: center; gap: 2px; color: var(--muted); }
.story-name.unseen { color: var(--ink); font-weight: 600; }
.story-face { display: grid; place-items: center; width: 66px; height: 66px; border-radius: 50%; padding: 3px; }
.story-face .avatar { box-shadow: 0 0 0 2.5px var(--bg); }
.story-face.ring.new { background: conic-gradient(from 210deg, #4a8af4, #7c5cff, #e2508d, #f59e0b, #4a8af4); }
.story-face.ring.seen { background: var(--line); }
.story-face.ring.mine { background: color-mix(in srgb, var(--blue) 45%, var(--line)); }
.story-btn:active .story-face { transform: scale(.94); }
.story-face { transition: transform .15s ease; }
.story-plus { position: absolute; right: 4px; top: 46px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; box-shadow: 0 0 0 2.5px var(--bg); }
.note-bubble, .note-space { position: relative; z-index: 1; align-self: end; max-width: 78px; min-height: 24px; margin-bottom: -6px; padding: 4px 8px; border-radius: 12px; background: var(--field); color: var(--ink); font-size: 11.5px; line-height: 1.25; text-align: center; word-break: break-word; box-shadow: 0 4px 12px rgba(0, 0, 0, .22); }
.note-bubble > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.note-bubble::after { content: ''; position: absolute; left: 50%; bottom: -3px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: inherit; }
.note-bubble.empty { color: var(--muted); font-style: italic; }
.note-space { visibility: hidden; }

/* Note sheets */
.note-preview { display: flex; gap: 12px; align-items: center; }
.note-field { flex: 1; position: relative; }
.note-input { width: 100%; height: 46px; padding: 0 52px 0 14px; border-radius: 23px; border: 0; background: var(--field); color: var(--ink); font-size: 16px; outline: none; }
.note-count { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 12px; }
.note-sheet { justify-items: center; text-align: center; }
.note-big { display: grid; justify-items: center; gap: 8px; padding-top: 8px; }
.note-big p { margin: 0; max-width: 280px; padding: 10px 16px; border-radius: 18px; background: var(--field); font-size: 17px; line-height: 1.35; word-break: break-word; }
.note-who { display: grid; justify-items: center; gap: 2px; }
.reply-line { display: flex; gap: 8px; width: 100%; align-items: center; }
.reply-line .note-input { padding-right: 14px; }
.send-round { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; }

/* Story backgrounds (text stories) */
.sbg-ocean { background: linear-gradient(150deg, #1e4fd6, #0ea5c6 60%, #6366f1); }
.sbg-sunset { background: linear-gradient(150deg, #f0643c, #e23d7c 60%, #b8327a); }
.sbg-forest { background: linear-gradient(150deg, #0f7a55, #3f9e3c 60%, #0e8f8e); }
.sbg-berry { background: linear-gradient(150deg, #6d34d6, #c4267a 60%, #4f46e5); }
.sbg-gold { background: linear-gradient(150deg, #e08a1e, #d9482b 60%, #c98a14); }
.sbg-graphite { background: linear-gradient(150deg, #252a35, #4b5363 60%, #1b2029); }

/* Full-screen story pages */
.page-overlay.story-viewer, .page-overlay.story-make { background: #000; z-index: 40; animation: fade .18s ease-out; }
.story-stage { position: absolute; inset: 0; margin: 0 auto; max-width: 520px; display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr); color: #fff; overflow: hidden; }
.story-stage:not(.text) { background: #000; }
@media (min-width: 700px) { .story-stage { inset: 16px auto; left: 0; right: 0; border-radius: 18px; } }
.story-stage.text { background-size: cover; }
.story-top { position: relative; z-index: 2; grid-row: 1; padding: calc(var(--top) + 8px) 10px 10px; display: grid; gap: 10px; background: linear-gradient(rgba(0, 0, 0, .45), transparent); }
.story-make .story-top { display: flex; justify-content: flex-start; background: none; }
.story-bars { display: flex; gap: 4px; }
.story-bars i { flex: 1; height: 2.5px; border-radius: 2px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.story-bars b { display: block; height: 100%; background: #fff; }
.story-head { display: flex; align-items: center; gap: 4px; }
.story-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: #fff; text-align: left; }
.story-who > span:last-child { display: grid; min-width: 0; }
.story-who b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story-who small { font-size: 12.5px; opacity: .75; }
.story-x { width: 40px; height: 40px; display: grid; place-items: center; color: #fff; border-radius: 50%; }
.story-x:active { background: rgba(255, 255, 255, .15); }
.story-media { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.story-make .story-photo, .story-media .story-photo { width: 100%; height: 100%; object-fit: contain; opacity: 1; -webkit-user-drag: none; }
.story-make .story-photo { position: absolute; inset: 0; }
.story-cap { position: absolute; left: 16px; right: 16px; bottom: 96px; margin: 0; text-align: center; font-size: 17px; line-height: 1.35; padding: 8px 12px; border-radius: 12px; background: rgba(0, 0, 0, .45); word-break: break-word; }
.story-text { margin: 0; padding: 32px; text-align: center; font-weight: 650; line-height: 1.3; white-space: pre-wrap; word-break: break-word; text-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.story-foot, .story-bottom { position: relative; z-index: 2; grid-row: 3; display: flex; gap: 8px; align-items: center; padding: 12px 12px calc(var(--bottom) + 12px); background: linear-gradient(transparent, rgba(0, 0, 0, .5)); }
.story-stage.held .story-top, .story-stage.held .story-foot, .story-stage.held .story-cap { opacity: 0; transition: opacity .2s; }
.story-reply { flex: 1; min-width: 0; height: 44px; padding: 0 16px; border-radius: 22px; border: 1.5px solid rgba(255, 255, 255, .55); background: rgba(0, 0, 0, .2); color: #fff; font-size: 16px; outline: none; }
.story-reply::placeholder { color: rgba(255, 255, 255, .75); }
.story-react { flex: none; width: 40px; height: 40px; font-size: 26px; display: grid; place-items: center; transition: transform .12s; }
.story-react:active { transform: scale(1.3); }
.story-views { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 20px; background: rgba(0, 0, 0, .35); color: #fff; font-weight: 600; font-size: 14.5px; }
.story-bottom { flex-wrap: wrap; justify-content: space-between; }
.story-caption { flex: 1 1 100%; height: 44px; padding: 0 16px; border-radius: 22px; border: 0; background: rgba(0, 0, 0, .45); color: #fff; font-size: 16px; outline: none; }
.story-caption::placeholder { color: rgba(255, 255, 255, .7); }
.story-share { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 22px; background: #fff; color: #111; font-weight: 650; }
.story-share.busy { opacity: .6; pointer-events: none; }
.story-center { grid-row: 2; display: grid; place-items: center; padding: 20px; z-index: 1; }
.story-text-input { width: 100%; resize: none; border: 0; outline: none; background: none; color: #fff; text-align: center; font-weight: 650; font-size: 30px; line-height: 1.3; overflow: hidden; }
.story-text-input::placeholder { color: rgba(255, 255, 255, .6); }
.story-swatches { display: flex; gap: 8px; }
.swatch { width: 28px; height: 28px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); }
.viewer-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; }
.viewer-row > span:not(.avatar) { flex: 1; min-width: 0; }
.muted.pad { padding: 14px; }

/* "Replied to your story" on a message */
.about-tag { display: grid; gap: 1px; margin: 1px 0 5px; padding: 4px 9px; border-radius: 8px; border-left: 3px solid #e2508d; background: rgba(0, 0, 0, .06); font-size: 13.5px; line-height: 1.3; }
.about-tag small { font-size: 12px; opacity: .75; }
.about-tag span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mine .about-tag { background: rgba(255, 255, 255, .16); border-left-color: #fff; }
.viewer-row > .avatar { flex: 0 0 auto; }
.story-row.away { display: none; }
.story-item.hushed { opacity: .45; }
.story-blur { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(28px) brightness(.55) saturate(1.2); transform: scale(1.1); pointer-events: none; }
.story-media .story-photo, .story-make .story-photo { position: relative; z-index: 1; }
.story-make .story-photo { position: absolute; }
.story-media .story-cap { z-index: 2; }
.story-count { display: block; margin-top: 8px; text-align: center; font-size: 12.5px; opacity: .8; }
.story-media .story-photo.fill { object-fit: cover; }

/* Business offers: a card in the chat with a headline, countdown, alerts switch and report. */
.offer-tag { color: #ec4899; }
.offer-card { display: grid; gap: 6px; min-width: 210px; }
.offer-title { font-size: 19px; line-height: 1.25; font-weight: 800; letter-spacing: -.01em; background: linear-gradient(90deg, #f59e0b, #ec4899); -webkit-background-clip: text; background-clip: text; color: transparent; }
.offer-card .text { margin: 0; }
.offer-left { display: inline-flex; align-items: center; gap: 4px; width: fit-content; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #b45309; background: color-mix(in srgb, #f59e0b 16%, transparent); }
.offer-card.ended .offer-title { background: none; color: var(--muted); text-decoration: line-through; }
.offer-card.ended .offer-left { color: var(--muted); background: var(--field); }
.offer-acts { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.offer-alert { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #fff; background: linear-gradient(90deg, #f59e0b, #ec4899); }
.offer-alert.on { color: var(--muted); background: var(--field); }
.offer-report { font-size: 12.5px; color: var(--muted); text-decoration: underline; }
.offer-hours { display: flex; flex-wrap: wrap; gap: 8px; }
.bubble.cast:has(.offer-card) { border-color: color-mix(in srgb, #ec4899 40%, transparent); }

/* ---------- group chats ---------- */
.avatar.group-face { color: #fff; }
.avatar.group-face .icon { opacity: .92; }
/* A line like "Anna added Ben", centred and quiet. */
.event-line { align-self: center; max-width: 86%; margin: 10px 0 4px; text-align: center; }
.event-line span { display: inline-block; font-size: 12.5px; line-height: 1.35; color: var(--muted); padding: 5px 12px; border-radius: 12px; background: color-mix(in srgb, var(--them) 70%, transparent); }
.event-line + .msg { margin-top: 8px; }
/* Other people's messages in a group: a small face on the left and their name on the first message. */
.msg.in-group.theirs { flex-direction: row; align-items: flex-end; gap: 6px; max-width: min(86%, 560px); }
.msg-face { flex: 0 0 28px; width: 28px; align-self: flex-start; padding-top: 18px; }
.msg.cont .msg-face { padding-top: 0; }
.msg-col { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.msg .sender { font-size: 12.5px; font-weight: 650; padding: 0 0 3px 10px; color: hsl(var(--hue) 62% 66%); display: inline-flex; align-items: center; gap: 3px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root[data-theme="light"] .msg .sender { color: hsl(var(--hue) 55% 40%); }
.msg.in-group .swipe-ic { left: -4px; }
/* New group / add people */
.group-pick .cd-scroll { padding-bottom: calc(96px + var(--bottom)); gap: 12px; }
.group-pick .cd-top { align-items: center; gap: 10px; background: var(--bg); }
.group-pick .cd-top h3 { margin: 0; font-size: 19px; letter-spacing: -.01em; }
.group-pick .searchbox { margin: 0; }
.ng-top { display: flex; align-items: center; gap: 14px; padding: 4px 0 2px; }
.ng-pic { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--field); color: var(--blue); overflow: hidden; position: relative; }
.ng-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ng-name { flex: 1; display: grid; gap: 4px; min-width: 0; }
.ng-name input { height: 46px; padding: 0 14px; border-radius: 12px; background: var(--field); color: var(--ink); font-size: 16px; border: 1px solid transparent; }
.ng-name input:focus { outline: none; border-color: color-mix(in srgb, var(--blue) 60%, transparent); }
.ng-name small { font-size: 12.5px; color: var(--muted); padding-left: 4px; }
.pick-note { margin: 0; font-size: 12.5px; color: var(--muted); }
.pick-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.pick-chips:empty { display: none; }
.pick-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 3px; border-radius: 999px; background: var(--blue-soft); color: var(--ink); font-size: 13.5px; font-weight: 600; animation: pop .2s ease-out; }
.pick-chip .icon { color: var(--muted); }
.pick-list, .member-list { display: grid; gap: 2px; }
.pick-row, .member-row { width: 100%; border-radius: 14px; padding-left: 8px; padding-right: 8px; text-align: left; }
.pick-row.on { background: var(--blue-soft); }
.pick-box { flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: #fff; transition: background .15s, border-color .15s; }
.pick-row.on .pick-box { background: var(--blue); border-color: var(--blue); }
.pick-foot { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + var(--bottom)); background: linear-gradient(to top, var(--bg) 70%, transparent); display: grid; gap: 6px; max-width: 560px; margin: 0 auto; }
.pick-foot .error:empty { display: none; }
.pick-foot .primary { width: 100%; }
.pick-foot .primary:disabled { opacity: .45; }
.add-row .add-ic { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); }
.add-row b { color: var(--blue); font-weight: 600; }
.admin-tag { margin-left: auto; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); }
.ghost-pill { background: var(--field) !important; color: var(--ink) !important; }
/* ---------- everyday features (2026-12-05) ---------- */
/* Text size (Profile → Text size) */
:root[data-text="small"] .bubble { font-size: 14.5px; }
:root[data-text="large"] .bubble { font-size: 18.5px; }
:root[data-text="xl"] .bubble { font-size: 21px; line-height: 1.32; }
:root[data-text="large"] .row .preview, :root[data-text="xl"] .row .preview { font-size: 16px; }
.text-preview { margin: 4px 0 14px; display: inline-block; align-self: flex-start; }
.ts-small { font-size: 14px; } .ts-normal { font-size: 16px; } .ts-large { font-size: 18px; } .ts-xl { font-size: 21px; }
.group-title { margin: 18px 16px 6px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: none; }
.item-sub { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; margin-top: 1px; line-height: 1.3; }
.item[role="switch"] { padding-top: 8px; padding-bottom: 8px; }
.control.area { height: auto; padding-top: 8px; padding-bottom: 8px; }
.control.area textarea { flex: 1; width: 100%; min-height: 64px; border: 0; outline: none; background: none; color: var(--ink); resize: vertical; font: inherit; }

/* Edited and kept */
.meta .edited { font-style: italic; margin-right: 2px; }
.kept-tag { display: inline-flex; color: #f5b942; margin-right: 2px; }
.mine .kept-tag { color: #ffd479; }

/* Wallpapers: soft colour washes behind the messages, per chat */
.scroll[data-wall="dusk"] { background: linear-gradient(180deg, color-mix(in srgb, #7c6cf0 14%, var(--chat-bg)), color-mix(in srgb, #f08a6c 10%, var(--chat-bg))); }
.scroll[data-wall="sea"] { background: linear-gradient(180deg, color-mix(in srgb, #2fa4c7 14%, var(--chat-bg)), color-mix(in srgb, #2f6fc7 10%, var(--chat-bg))); }
.scroll[data-wall="sage"] { background: linear-gradient(180deg, color-mix(in srgb, #6fae8a 15%, var(--chat-bg)), color-mix(in srgb, #9bb76f 9%, var(--chat-bg))); }
.scroll[data-wall="sand"] { background: linear-gradient(180deg, color-mix(in srgb, #d8b07a 16%, var(--chat-bg)), color-mix(in srgb, #c98f5a 9%, var(--chat-bg))); }
.scroll[data-wall="rose"] { background: linear-gradient(180deg, color-mix(in srgb, #e07a9a 14%, var(--chat-bg)), color-mix(in srgb, #b77ae0 9%, var(--chat-bg))); }
.scroll[data-wall="night"] { background: linear-gradient(180deg, color-mix(in srgb, #1b2a4a 55%, var(--chat-bg)), color-mix(in srgb, #0b1020 50%, var(--chat-bg))); }
.wall-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 8px; }
.wall-sw { display: grid; justify-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.wall-sw i { width: 58px; height: 74px; border-radius: 14px; border: 2px solid var(--line); display: grid; place-items: center; color: #fff; background: var(--chat-bg); }
.wall-sw.on i { border-color: var(--blue); }
.wall-sw[data-wall="dusk"] i { background: linear-gradient(180deg, #8a7cf0, #f0a08a); }
.wall-sw[data-wall="sea"] i { background: linear-gradient(180deg, #4fb8d8, #3f7fd8); }
.wall-sw[data-wall="sage"] i { background: linear-gradient(180deg, #86c09e, #aac587); }
.wall-sw[data-wall="sand"] i { background: linear-gradient(180deg, #e3c08f, #d49e6e); }
.wall-sw[data-wall="rose"] i { background: linear-gradient(180deg, #ea8fab, #c18fea); }
.wall-sw[data-wall="night"] i { background: linear-gradient(180deg, #24365e, #0b1020); }

/* Forward */
.fwd-list { display: grid; max-height: 46vh; overflow-y: auto; margin: 6px -8px 12px; }
.fwd-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; text-align: left; }
.fwd-row:active { background: var(--hover); }
.fwd-name { flex: 1; min-width: 0; display: grid; }
.fwd-name small { color: var(--muted); font-size: 13px; }
.pick-box { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.fwd-row.on .pick-box { border-color: var(--blue); background: var(--blue); box-shadow: inset 0 0 0 3px var(--bg); }

/* Search in chat, kept messages, scheduled */
.search-results { display: grid; margin-top: 8px; max-height: 50vh; overflow-y: auto; }
.search-hit { min-height: 58px; padding-top: 8px; padding-bottom: 8px; }
.search-hit > span { display: grid; gap: 2px; }
.search-hit small { font-size: 12.5px; color: var(--muted); }
.search-hit b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-none { text-align: center; padding: 16px 0; }
.sched-bar { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 14px; font-size: 13.5px; color: var(--blue); border-bottom: 1px solid var(--line); text-align: left; }
.sched-bar span:not(.icon) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sched-item { min-height: 60px; padding-top: 8px; padding-bottom: 8px; }
.sched-item > span { display: grid; gap: 2px; }
.sched-item small { font-size: 12.5px; color: var(--muted); }
.sched-item b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sched-item .text-btn { height: 36px; flex: none; }
.when-picks { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.when-picks .label-chip { height: 34px; padding: 0 14px; border-radius: 17px; background: var(--field); font-size: 14px; color: var(--ink); }
.when-picks .label-chip.on { background: var(--blue-soft); color: var(--blue); }
.control input[type="datetime-local"] { color-scheme: inherit; }

/* Rating */
.rate-sheet { display: grid; justify-items: center; text-align: center; gap: 8px; }
.rate-sheet .primary { width: 100%; }
.rate-stars { display: flex; gap: 6px; margin: 8px 0 12px; }
.rate-stars button { color: var(--muted); padding: 2px; transition: transform .12s; }
.rate-stars button.on { color: #f5b942; }
.rate-stars button:active { transform: scale(.9); }
.cd-rating { margin-top: 6px; font-size: 14px; color: #f5b942; }

/* Away */
.away-chip { display: flex; align-items: center; gap: 8px; margin: 0 16px 10px; padding: 10px 14px; border-radius: 12px; width: calc(100% - 32px);
  background: color-mix(in srgb, #a78bfa 14%, var(--bg)); color: var(--ink); font-size: 14px; text-align: left; }
.away-chip .icon { color: #a78bfa; }
.away-chip span:not(.icon) { flex: 1; }
.away-chip b { color: var(--blue); font-weight: 600; }

/* Photo editor */
.chip-edit { position: absolute; left: 4px; bottom: 4px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .55); color: #fff; }
.page-overlay.pe { background: #000; }
.pe-wrap { height: 100%; display: flex; flex-direction: column; color: #fff; padding-top: var(--top); padding-bottom: var(--bottom); }
.pe-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; }
.pe-top b { font-size: 16px; }
.pe-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 8px; }
.pe-canvas { max-width: 100%; max-height: 100%; touch-action: none; border-radius: 4px; }
.pe-hint { margin: 4px 16px 0; text-align: center; font-size: 13px; color: rgba(255, 255, 255, .7); }
.pe-tools { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 12px; }
.pe-tool { display: grid; justify-items: center; gap: 3px; min-width: 62px; padding: 8px 6px; border-radius: 12px; color: rgba(255, 255, 255, .85); font-size: 12px; }
.pe-tool.on { background: rgba(255, 255, 255, .14); color: #fff; }
.pe-tool:disabled { opacity: .35; }

/* ---------- group chats: extras ---------- */
/* A group without a photo: two of its people, overlapping. */
.avatar.group-stack { background: none !important; box-shadow: none !important; }
.group-stack > .avatar { position: absolute; font-size: calc(var(--s) * .27); }
.group-stack > .avatar:first-child { top: 0; right: 0; opacity: .92; padding: 0 0 24% 24%; }
.group-stack > .avatar:last-child { bottom: 0; left: 0; box-shadow: 0 0 0 2px var(--bg); }
.chat-head .group-stack > .avatar:last-child, .cd-hero .group-stack > .avatar:last-child { box-shadow: 0 0 0 2px var(--bg); }
.cd-hero .avatar.group-stack, .intro .avatar.group-stack { box-shadow: none; }
.cd-hero .group-stack > .avatar:last-child { box-shadow: 0 0 0 4px var(--bg); }
.status.typing { color: var(--green); }
/* Pinned message bar under the chat header. */
.pin-bar { display: flex; align-items: center; gap: 4px; padding: 0 8px 0 14px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.pin-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px 0; text-align: left; color: var(--blue); }
.pin-main > span:last-child { display: grid; min-width: 0; }
.pin-main b { font-size: 12.5px; font-weight: 700; color: var(--blue); }
.pin-main small { font-size: 13.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pin-bar .ghost { color: var(--muted); }
/* Only admins can send */
.composer-locked { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 16px; font-size: 14px; color: var(--muted); }
/* Seen by */
.seen-h { display: flex; align-items: center; gap: 6px; margin: 14px 0 6px; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.seen-h .icon { color: var(--blue); }
.seen-list { display: grid; gap: 2px; max-height: 46vh; overflow-y: auto; }
.seen-row { display: flex; align-items: center; gap: 12px; padding: 6px 2px; }
/* Group info */
.gi-about { text-align: center; display: grid; justify-items: center; gap: 4px; margin-top: -8px; }
.gi-about[hidden] { display: none; }
.gi-about p { margin: 0; max-width: 360px; color: var(--ink); opacity: .85; font-size: 15px; line-height: 1.45; white-space: pre-wrap; }
.gi-about .text-btn { font-size: 13px; color: var(--blue); font-weight: 600; }
.gi-add-desc { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--blue); padding: 6px 12px; border-radius: 999px; background: var(--blue-soft); }
.gi-search { margin: 0; }
.member-row .preview.on { color: var(--green); }
.gi-desc { padding: 0; }
.gi-desc textarea { width: 100%; min-height: 84px; resize: vertical; padding: 12px 14px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 15.5px; line-height: 1.4; }
.gi-desc textarea:focus { outline: none; }
/* New group: friendly first steps */
.group-intro p { white-space: pre-wrap; }
.gi-steps { display: grid; gap: 8px; margin-top: 14px; width: min(320px, 100%); }
.gi-step { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: var(--them); color: var(--ink); font-size: 14.5px; font-weight: 600; text-align: left; transition: transform .12s var(--ease); }
.gi-step > span { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); flex: none; }
.gi-step:active { transform: scale(.97); }
.cd-hero .gi-desc-text { margin: 10px 0 2px; max-width: 360px; color: var(--ink); opacity: .85; font-size: 15px; line-height: 1.45; white-space: pre-wrap; }
.cd-hero .gi-add-desc { margin-top: 10px; }
/* Round 3: mentions, polls, new-messages line, private replies */
.mention { display: inline; padding: 0 3px; margin: 0 -1px; border-radius: 6px; font: inherit; font-weight: 650; color: var(--blue); background: var(--blue-soft); }
.msg.mine .mention { color: inherit; background: rgba(255, 255, 255, .2); }
.mention.me { color: #fff; background: var(--blue); }
.bubble.tagged { box-shadow: inset 3px 0 0 var(--blue); }
.badge.at { background: var(--blue); font-size: 13px; font-weight: 800; padding: 0; width: 20px; }
.badge.at { margin-right: -4px; }
.new-line { align-self: stretch; display: flex; align-items: center; gap: 10px; margin: 14px 4px 6px; color: var(--blue); font-size: 12.5px; font-weight: 700; letter-spacing: .02em; }
.new-line::before, .new-line::after { content: ''; flex: 1; height: 1px; background: color-mix(in srgb, var(--blue) 45%, transparent); }
.new-line span { padding: 3px 10px; border-radius: 999px; background: var(--blue-soft); }
.replying.private > .icon:first-child { color: var(--green, #3bb273); }
.replying.private div { border-left-color: var(--green, #3bb273); }
.mention-pick { display: grid; gap: 2px; margin: 0 2px 8px; padding: 6px; border-radius: 16px; background: var(--field); max-height: 240px; overflow-y: auto; animation: rise-in .16s var(--ease); }
.mention-pick[hidden] { display: none; }
.mention-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; text-align: left; color: var(--ink); }
.mention-row:hover, .mention-row:active { background: var(--blue-soft); }
.mention-row span { display: grid; line-height: 1.25; }
.mention-row b { font-size: 14.5px; font-weight: 600; }
.mention-row small { font-size: 12.5px; color: var(--muted); }
.bubble.poll-bubble { min-width: min(280px, 72vw); }
.poll { display: grid; gap: 8px; padding: 2px 2px 4px; }
.poll-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; opacity: .7; }
.poll-q { font-size: 16px; font-weight: 650; line-height: 1.35; }
.poll-opts { display: grid; gap: 6px; }
.poll-opt { position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 8px 12px; border-radius: 12px; text-align: left; color: inherit; font: inherit; font-size: 14.5px;
  background: color-mix(in srgb, currentColor 8%, transparent); border: 1px solid color-mix(in srgb, currentColor 14%, transparent); transition: transform .12s var(--ease); }
.poll-opt:active:not(:disabled) { transform: scale(.98); }
.poll-opt:disabled { cursor: default; }
.poll-fill { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, currentColor 14%, transparent); transition: width .35s var(--ease); pointer-events: none; }
.poll-opt.on .poll-fill { background: color-mix(in srgb, var(--blue) 30%, transparent); }
.msg.mine .poll-opt.on .poll-fill { background: rgba(255, 255, 255, .3); }
.poll-opt.win { border-color: color-mix(in srgb, currentColor 40%, transparent); font-weight: 650; }
.poll-mark { position: relative; flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid color-mix(in srgb, currentColor 45%, transparent); }
.poll-opt.on .poll-mark { background: var(--blue); border-color: var(--blue); color: #fff; }
.msg.mine .poll-opt.on .poll-mark { background: #fff; border-color: #fff; color: var(--blue); }
.poll-text { position: relative; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.poll-n { position: relative; flex: none; font-size: 13px; font-weight: 700; opacity: .8; }
.poll-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; padding-top: 2px; }
.poll-link { font: inherit; font-size: 12.5px; font-weight: 600; color: inherit; opacity: .75; padding: 2px 0; }
.poll.closed .poll-tag { opacity: .55; }
.np-opts { display: grid; gap: 6px; margin-bottom: 10px; }
.np-opts .field { margin: 0; }
.new-poll .muted.small, .seen-sheet .muted.small { font-size: 13px; margin: 4px 2px; }
.seen-block { margin-top: 12px; }
.seen-head { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 4px; font-weight: 650; font-size: 14.5px; }
.seen-head i { font-style: normal; color: var(--muted); font-weight: 500; font-size: 13px; }
.seen-name { flex: 1; min-width: 0; }
.seen-emoji { font-size: 20px; }

/* ---------- everyday features: polish (2026-12-05, round 2) ---------- */
/* Round quick actions in the message menu */
.quick-acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 12px; }
.quick-act { display: grid; justify-items: center; gap: 6px; padding: 10px 4px; border-radius: 16px; background: var(--field); color: var(--ink); font-size: 12.5px; font-weight: 500; transition: transform .12s, background .15s; }
.quick-act span { color: var(--blue); display: grid; }
.quick-act.on span { color: #f5b942; }
.quick-act:active { transform: scale(.95); background: var(--hover); }
.menu-note { display: flex; align-items: center; gap: 6px; margin: -4px 2px 12px; font-size: 13px; color: var(--muted); }
.menu-note .icon { color: #f5b942; }
.menu-time { margin: 12px 2px 0; text-align: center; font-size: 12.5px; color: var(--muted); display: grid; gap: 2px; }
/* Forwarded label */
.fwd-tag { display: flex; align-items: center; gap: 4px; font-size: 12px; font-style: italic; opacity: .7; margin: 0 0 3px; }
.fwd-preview { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--field); color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.fwd-preview span:not(.icon) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.sheet-body .searchbox { margin: 0 0 8px; }
.fwd-row[hidden] { display: none; }
/* Search highlights */
.search-hit mark { background: color-mix(in srgb, #f5b942 40%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.search-count { margin: 4px 2px 2px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
/* End of chat: scheduled messages as faded bubbles, and the rating card */
.chat-tail { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.msg.sched .bubble { opacity: .62; border: 1.5px dashed color-mix(in srgb, var(--me-ink) 45%, transparent); text-align: left; font: inherit; cursor: pointer; }
.msg.sched .bubble:active { opacity: .8; }
.sched-tag { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.rate-card { position: relative; align-self: center; width: min(320px, 92%); margin: 10px 0 4px; padding: 16px 16px 12px; border-radius: 18px; text-align: center;
  background: var(--them); color: var(--them-ink); display: grid; justify-items: center; gap: 6px; box-shadow: 0 4px 18px rgba(0, 0, 0, .12); }
.rate-card b { font-size: 15px; font-weight: 600; padding: 0 18px; }
.rate-card small { font-size: 12px; color: var(--muted); }
.rate-x { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.rate-stars.small { margin: 2px 0; gap: 2px; }
.rate-stars.small button:hover, .rate-stars.small button:focus-visible { color: #f5b942; }
.rate-word { margin: -6px 0 4px; font-weight: 600; font-size: 15px; color: #f5b942; min-height: 20px; }
.rate-word.muted { color: var(--muted); font-weight: 500; }
.rate-comment { width: 100%; text-align: left; }
.rate-sheet .muted.small { display: flex; align-items: center; justify-content: center; gap: 4px; }
/* Ratings page for businesses */
.stats-link { display: flex; align-items: center; gap: 6px; width: 100%; text-align: left; font: inherit; color: inherit; }
.stats-link span:not(.icon) { flex: 1; }
.stats-link b { color: var(--blue); font-weight: 600; font-size: 13.5px; }
.ratings-sheet .muted.small { display: flex; align-items: center; gap: 4px; margin-top: -4px; }
.ratings-top { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; margin: 12px 0 16px; }
.ratings-avg { display: grid; justify-items: center; gap: 2px; padding: 0 6px; }
.ratings-avg b { font-size: 40px; line-height: 1; font-weight: 700; letter-spacing: -.02em; }
.ratings-avg span { color: #f5b942; font-size: 15px; letter-spacing: 1px; }
.ratings-avg small { color: var(--muted); font-size: 12.5px; }
.ratings-bars { display: grid; gap: 5px; }
.rbar { display: grid; grid-template-columns: 26px 1fr 22px; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.rbar i { height: 7px; border-radius: 4px; background: var(--field); overflow: hidden; }
.rbar i b { display: block; height: 100%; border-radius: inherit; background: #f5b942; }
.ratings-list { max-height: 44vh; overflow-y: auto; }
.rating-row { min-height: 64px; padding-top: 10px; padding-bottom: 10px; align-items: flex-start; }
.item.rating-row > .avatar { flex: none; }
.rating-row > .r-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.rating-row b { font-weight: 600; font-size: 15px; }
.rating-stars { font-style: normal; color: #f5b942; font-size: 13px; letter-spacing: 1px; }
.rating-row small { color: var(--ink); font-size: 14px; line-height: 1.35; }
.rating-row small.when { color: var(--muted); font-size: 12px; }
/* Away: until when */
.away-hint { margin: -4px 2px 12px; }
/* Live previews for text size and wallpaper */
.mini-chat { display: flex; flex-direction: column; gap: 6px; padding: 14px 12px; border-radius: 16px; background: var(--chat-bg); margin: 6px 0 14px; overflow: hidden; flex: none; }
.mini-chat .msg { max-width: 82%; }
.mini-chat .msg.mine { align-self: flex-end; }
.ts-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 4px; border-radius: 14px; background: var(--field); margin-bottom: 14px; }
.ts-seg button { display: grid; justify-items: center; gap: 2px; padding: 8px 2px; border-radius: 10px; color: var(--muted); }
.ts-seg button.on { background: var(--bg); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.ts-seg b { line-height: 1; font-weight: 600; }
.ts-seg .ts-small b { font-size: 14px; } .ts-seg .ts-normal b { font-size: 18px; } .ts-seg .ts-large b { font-size: 22px; } .ts-seg .ts-xl b { font-size: 26px; }
.ts-seg small { font-size: 11.5px; }
:root[data-theme="light"] .kept-tag { color: #d69a14; }
:root[data-theme="light"] .mine .kept-tag { color: #ffe08a; }

/* =====================================================================
   Premium motion (2026-12-05): smooth screens, soft blur, springs,
   pull to refresh, gradient bubbles, peek, tab icons, shimmer, accent colour.
   Only transform and opacity move, so it stays smooth on cheap phones.
   ===================================================================== */
:root { --spring: cubic-bezier(.34, 1.4, .64, 1); --tick: #5b8cff; }
:root[data-theme="light"] { --tick: #2f6bff; }
.tick .seal { fill: var(--tick); }

/* ----- 9. accent colours (sent messages, buttons, links). The tick above stays blue. ----- */
:root[data-accent="violet"] { --blue: #9a86ff; --blue-2: #c77dff; --me: #6d56e6; }
:root[data-accent="teal"] { --blue: #3cc3bd; --blue-2: #46a6e8; --me: #168c88; }
:root[data-accent="green"] { --blue: #4cc787; --blue-2: #36b8a4; --me: #22925b; }
:root[data-accent="rose"] { --blue: #f47d9a; --blue-2: #d27bff; --me: #cf4f72; }
:root[data-accent="amber"] { --blue: #f5a25a; --blue-2: #f2727a; --me: #cf7330; }
:root[data-accent="graphite"] { --blue: #aab3c2; --blue-2: #8d97a8; --me: #434a56; }
:root[data-theme="light"][data-accent="violet"] { --blue: #6a4cff; --blue-2: #a74cff; --me: #6a4cff; }
:root[data-theme="light"][data-accent="teal"] { --blue: #0c9a93; --blue-2: #1a84c9; --me: #0c9a93; }
:root[data-theme="light"][data-accent="green"] { --blue: #16a05a; --blue-2: #0f9d8a; --me: #16a05a; }
:root[data-theme="light"][data-accent="rose"] { --blue: #e1416b; --blue-2: #b04cff; --me: #e1416b; }
:root[data-theme="light"][data-accent="amber"] { --blue: #e8711b; --blue-2: #e5484d; --me: #e8711b; }
:root[data-theme="light"][data-accent="graphite"] { --blue: #3b4350; --blue-2: #5b6575; --me: #3b4350; }
:root[data-accent] { --blue-soft: color-mix(in srgb, var(--blue) 15%, transparent); }
:root[data-theme="light"][data-accent] { --blue-soft: color-mix(in srgb, var(--blue) 10%, transparent); }
.accent-dot, .accent-sw i { --c: #5b8cff; --c2: #7c6cff; }
:root[data-theme="light"] :is(.accent-dot, .accent-sw i) { --c: #2f6bff; --c2: #6a5cff; }
[data-a="violet"] { --c: #8b72ff !important; --c2: #c77dff !important; }
[data-a="teal"] { --c: #19a7a1 !important; --c2: #46a6e8 !important; }
[data-a="green"] { --c: #2fb06e !important; --c2: #36b8a4 !important; }
[data-a="rose"] { --c: #e85a80 !important; --c2: #d27bff !important; }
[data-a="amber"] { --c: #ee8a3a !important; --c2: #f2727a !important; }
[data-a="graphite"] { --c: #5d6676 !important; --c2: #8d97a8 !important; }
.accent-dot { width: 18px; height: 18px; flex: none; border-radius: 50%; background: linear-gradient(135deg, var(--c), var(--c2)); box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--line); margin-right: 2px; }
.accent-pick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 2px 0 8px; }
.accent-sw { display: grid; justify-items: center; gap: 6px; padding: 4px 0; color: var(--muted); }
.accent-sw i { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--c), var(--c2));
  box-shadow: 0 4px 12px color-mix(in srgb, var(--c) 30%, transparent); transition: transform .25s var(--spring), box-shadow .2s; }
.accent-sw.on i { transform: scale(1.08); box-shadow: 0 0 0 3px var(--raised), 0 0 0 5px var(--c), 0 6px 16px color-mix(in srgb, var(--c) 35%, transparent); }
.accent-sw:active i { transform: scale(.92); }
.accent-sw small { font-size: 11px; font-weight: 600; }
.accent-sw.on small { color: var(--ink); }

/* ----- 5. sent messages: a soft gradient instead of a flat colour ----- */
.mine .bubble:not(.bare):not(.jumbo),
:root[data-theme="light"] .mine .bubble:not(.bare):not(.jumbo) {
  background: linear-gradient(150deg, color-mix(in srgb, var(--me) 72%, #fff 28%) 0%, var(--me) 58%, color-mix(in srgb, var(--me) 78%, var(--blue-2)) 100%);
  color: #fff;
  box-shadow: 0 3px 12px color-mix(in srgb, var(--me) 26%, transparent), inset 0 1px 0 rgba(255, 255, 255, .14);
}
:root:not([data-theme="light"]) .mine .bubble:not(.bare):not(.jumbo) {
  background: linear-gradient(150deg, color-mix(in srgb, var(--me) 80%, #fff 20%) 0%, var(--me) 60%, color-mix(in srgb, var(--me) 80%, var(--blue-2)) 100%);
}
.mine .bubble a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }

/* ----- 3. springs: your message springs up from the corner, theirs floats in; reactions pop ----- */
.msg.mine.pop { animation: sent-spring .46s var(--spring) both; transform-origin: 100% 100%; }
.msg.theirs.pop { animation: got-in .34s var(--ease) both; transform-origin: 0 100%; }
@keyframes sent-spring { 0% { opacity: 0; transform: translateY(16px) scale(.9); } 60% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes got-in { from { opacity: 0; transform: translateY(8px) scale(.96); } }
.react.popped { animation: react-pop .5s var(--spring); }
@keyframes react-pop { 0% { transform: scale(.4); } 55% { transform: scale(1.25); } 100% { transform: scale(1); } }
.react, .quick-act span, .react-pick button { transition: transform .18s var(--spring); }
.react:active { transform: scale(.9); }
.send:active, .head-btn:active, .bp-round:active, .pill-btn:active { transform: scale(.92); }
.send, .head-btn, .pill-btn { transition: transform .18s var(--spring), opacity .15s; }

/* ----- 1. smooth screen changes ----- */
@media (max-width: 859px) {
  body.chat-open .chat { animation: chat-in .34s var(--ease); }
  @keyframes chat-in { from { transform: translateX(40%); opacity: 0; } 60% { opacity: 1; } }
  .side.side-back { animation: side-back .3s var(--ease); }
  @keyframes side-back { from { transform: translateX(-8%); opacity: .5; } }
  .chat-head .who { animation: who-in .38s .06s var(--ease) both; }
  @keyframes who-in { from { opacity: 0; transform: translateX(10px); } }
}
.avatar.fly { position: fixed; z-index: 90; margin: 0; transform-origin: 0 0; pointer-events: none; will-change: transform; }
.page.tab-in { animation: tab-in .28s var(--ease); }
@keyframes tab-in { from { opacity: 0; transform: translateY(8px); } }
.page-overlay.closing { animation: overlay-out .2s cubic-bezier(.4, 0, 1, 1) forwards; pointer-events: none; }
@keyframes overlay-out { to { opacity: 0; transform: translateY(24px); } }

/* ----- 2. soft blur behind sheets and menus ----- */
.sheet-wrap { background: rgba(5, 7, 10, .38); backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2); animation: veil-in .22s ease-out; }
:root[data-theme="light"] .sheet-wrap { background: rgba(20, 24, 32, .22); }
@keyframes veil-in { from { background: transparent; backdrop-filter: blur(0); -webkit-backdrop-filter: blur(0); } }
.sheet { animation: sheet-up .38s var(--spring); transition: transform .25s var(--ease); touch-action: pan-y; }
@keyframes sheet-up { from { transform: translateY(100%); } }
.sheet-wrap.closing { animation: veil-out .2s ease-in forwards; pointer-events: none; }
.sheet-wrap.closing .sheet { animation: sheet-down .2s cubic-bezier(.4, 0, 1, 1) forwards; }
@keyframes veil-out { to { opacity: 0; } }
@keyframes sheet-down { to { transform: translateY(105%); } }
@media (min-width: 860px) {
  .sheet { animation: sheet-zoom .26s var(--ease); }
  @keyframes sheet-zoom { from { opacity: 0; transform: translateY(12px) scale(.97); } }
  .sheet-wrap.closing .sheet { animation: veil-out .18s ease-in forwards; }
}

/* ----- 4. pull to refresh ----- */
.ptr { position: relative; height: 0; z-index: 0; }
.ptr-logo { position: absolute; left: 50%; top: 10px; margin-left: -15px; opacity: 0; pointer-events: none; }
.ptr-logo .logo { box-shadow: 0 6px 16px color-mix(in srgb, var(--blue) 30%, transparent); }
.ptr.spin .ptr-logo { opacity: 1 !important; animation: ptr-spin 1s var(--ease) infinite; }
@keyframes ptr-spin { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(180deg) scale(.86); } 100% { transform: rotate(360deg) scale(1); } }
.pull-body { position: relative; z-index: 1; flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--bg); will-change: transform; }

/* ----- 6. press and hold a chat to peek ----- */
.row.pressing { background: var(--hover); transform: scale(.985); transition: transform .4s var(--ease), background .2s; }
.peek-wrap { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; padding: calc(var(--top) + 20px) 18px calc(var(--bottom) + 20px);
  background: rgba(5, 7, 10, .42); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); animation: veil-in .22s ease-out; }
:root[data-theme="light"] .peek-wrap { background: rgba(20, 24, 32, .2); }
.peek-stack { width: min(420px, 100%); display: grid; gap: 10px; animation: peek-in .4s var(--spring); }
@keyframes peek-in { from { opacity: 0; transform: translateY(var(--from-y, 0)) scale(.86); } }
.peek-wrap.closing { animation: veil-out .18s ease-in forwards; pointer-events: none; }
.peek-wrap.closing .peek-stack { animation: peek-out .18s ease-in forwards; }
@keyframes peek-out { to { opacity: 0; transform: scale(.94); } }
.peek-card { border-radius: 22px; overflow: hidden; background: var(--chat-bg); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); cursor: pointer; }
:root[data-theme="light"] .peek-card { box-shadow: 0 24px 60px rgba(20, 30, 60, .22); }
.peek-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--raised); border-bottom: 1px solid var(--line); }
.peek-who { display: grid; min-width: 0; }
.peek-who small { color: var(--muted); font-size: 12.5px; }
.peek-msgs { display: flex; flex-direction: column; gap: 4px; padding: 14px 12px; min-height: 150px; max-height: min(46vh, 360px); overflow: hidden; }
.peek-msgs .skel-msg { flex: none; }
.peek-msg { display: flex; }
.peek-msg.mine { justify-content: flex-end; }
.peek-bubble { max-width: 80%; padding: 7px 11px; border-radius: 17px; font-size: 14.5px; line-height: 1.35; background: var(--them); color: var(--them-ink); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.peek-msg.mine .peek-bubble { color: #fff; background: linear-gradient(150deg, color-mix(in srgb, var(--me) 78%, #fff 22%), var(--me) 60%, color-mix(in srgb, var(--me) 80%, var(--blue-2))); }
.peek-msgs > .peek-msg:first-child { margin-top: auto; }
.peek-empty { margin: auto; color: var(--muted); font-size: 14px; }
.peek-actions { background: var(--raised); border-radius: 18px; overflow: hidden; box-shadow: 0 12px 30px rgba(0, 0, 0, .3); }
.peek-actions .item { justify-content: space-between; min-height: 48px; }
.peek-actions .item span { flex: 1; text-align: left; }

/* ----- 7. tab bar: icons fill in and bounce a little when tapped ----- */
.tab-ic .icon { transition: transform .2s var(--spring); }
.tabbar button:active .tab-ic .icon { transform: scale(.86); }
.tab-ic.bump .icon { animation: tab-bump .45s var(--spring); }
.tab-ic.bump { animation: pill-in .35s var(--ease); }
@keyframes tab-bump { 0% { transform: scale(.7); } 60% { transform: scale(1.14); } 100% { transform: scale(1); } }
@keyframes pill-in { from { background: transparent; } }
.tabbar button.on .tab-ic { background: color-mix(in srgb, var(--blue) 14%, transparent); }

/* ----- 8. shimmer placeholders shaped like the real screen ----- */
.skel, .skel-msg { background: linear-gradient(100deg, var(--field) 30%, color-mix(in srgb, var(--field) 72%, var(--ink) 8%) 50%, var(--field) 70%) 0 0 / 250% 100%; animation: shimmer 1.6s ease-in-out infinite; }
.skel-row { min-height: 78px; animation: fade .3s ease-out both; animation-delay: calc(var(--i, 0) * 40ms); }
.skel-row .row-body { padding: 13px 16px 13px 0; gap: 8px; }
.skel-row .row-top, .skel-row .row-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.skel-time { width: 34px; height: 10px; flex: none; opacity: .7; }
.skel-msgs { display: flex; flex-direction: column; gap: 3px; padding: 10px 0; }
.skel-day { width: 64px; height: 22px; border-radius: 999px; align-self: center; margin: 6px 0 10px; }
.skel-msg { height: 36px; border-radius: 19px; flex: none; animation: shimmer 1.6s ease-in-out infinite, fade .3s ease-out both; }
.skel-msg.theirs { align-self: flex-start; }
.skel-msg.mine { align-self: flex-end; }
.skel-msg.tall { height: 56px; }
.skel-msg.theirs:not(.first) { border-top-left-radius: 6px; }
.skel-msg.theirs:not(.last) { border-bottom-left-radius: 6px; }
.skel-msg.mine:not(.first) { border-top-right-radius: 6px; }
.skel-msg.mine:not(.last) { border-bottom-right-radius: 6px; }
.skel-msg.last { margin-bottom: 10px; }
.skel-msg.w30 { width: 30%; } .skel-msg.w45 { width: 45%; }
.list.list-in > * { animation: row-in .32s var(--ease) both; }
.list.list-in > :nth-child(2) { animation-delay: 30ms; } .list.list-in > :nth-child(3) { animation-delay: 60ms; }
.list.list-in > :nth-child(4) { animation-delay: 90ms; } .list.list-in > :nth-child(5) { animation-delay: 120ms; }
.list.list-in > :nth-child(n+6) { animation-delay: 150ms; }
@keyframes row-in { from { opacity: 0; transform: translateY(6px); } }

/* ----- cheaper phones: no see-through blur (it is costly to draw); a slightly darker veil instead ----- */
:root[data-lite] *, :root[data-lite] *::before { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
:root[data-lite] .sheet-wrap, :root[data-lite] .peek-wrap { background: rgba(5, 7, 10, .6); }
:root[data-lite] .tabbar, :root[data-lite] .chat-head, :root[data-lite] .composer { background: var(--bg); }

/* ----- less motion when the phone asks for it ----- */
@media (prefers-reduced-motion: reduce) {
  .msg.pop, .react.popped, .tab-ic.bump .icon, .peek-stack, .list.list-in > *, .page.tab-in, .chat-head .who { animation: none !important; }
  .sheet, .row.pressing { transition: none; }
}

/* =====================================================================
   Polish round 2 (2026-12-05): swipe back, lifted message, jump arrow,
   photo zoom, gliding rows, badge pops, floating day, toasts, press feedback.
   ===================================================================== */
/* swipe from the left edge to go back: the chat list waits underneath */
@media (max-width: 859px) {
  body.chat-open.swiping .side { display: flex; position: fixed; inset: 0; z-index: 0; width: 100%; }
  body.chat-open.swiping .side::after { content: ''; position: absolute; inset: 0; background: #000; opacity: var(--dim, .28); pointer-events: none; }
  body.chat-open.swiping .chat { position: fixed; inset: 0; z-index: 2; animation: none; box-shadow: -12px 0 30px rgba(0, 0, 0, .35); }
  body.chat-open.swiping .chat .who { animation: none; }
}

/* the message you hold floats above the blur */
.msg.lifted { position: fixed; z-index: 2; margin: 0; max-width: none; pointer-events: none; animation: none !important; }
.msg.lifted .bubble { box-shadow: 0 14px 36px rgba(0, 0, 0, .4) !important; }
.msg.lifted .bubble.bare, .msg.lifted .bubble.jumbo { box-shadow: none !important; }
:root[data-theme="light"] .msg.lifted .bubble { box-shadow: 0 14px 36px rgba(20, 30, 60, .2) !important; }

/* round arrow to jump to the newest message */
.chat { position: relative; }
.jump-down { position: absolute; right: 14px; bottom: 84px; z-index: 5; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  color: var(--ink); background: color-mix(in srgb, var(--raised) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .3), 0 0 0 1px color-mix(in srgb, var(--line) 80%, transparent); transition: transform .2s var(--spring); }
.jump-down[hidden] { display: none; }
.jump-down.in { animation: jump-in .32s var(--spring); }
@keyframes jump-in { from { opacity: 0; transform: translateY(10px) scale(.8); } }
.jump-down:active { transform: scale(.9); }
.jump-down .badge { position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; font-style: normal; font-size: 11.5px; }
.jump-down .badge[hidden] { display: none; }
:root[data-theme="light"] .jump-down { box-shadow: 0 6px 18px rgba(20, 30, 60, .14), 0 0 0 1px var(--line); }

/* badges pop when the number goes up */
.badge.bump { animation: badge-pop .45s var(--spring); }
@keyframes badge-pop { 0% { transform: scale(.5); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }

/* the day floats at the top while you scroll through a chat */
.scroll > .day { position: sticky; top: 8px; z-index: 3; }

/* photos zoom open from the chat; swipe down to close */
.lightbox { background: rgba(0, 0, 0, var(--fade, 1)); animation: lb-in .25s ease-out; touch-action: none; }
@keyframes lb-in { from { background: rgba(0, 0, 0, 0); } }
.lightbox img { border-radius: 4px; will-change: transform; }
.lightbox.closing { background: transparent; transition: background .22s; pointer-events: none; }
.lightbox.closing .ghost { opacity: 0; }
.lightbox .ghost { transition: opacity .15s; background: rgba(255, 255, 255, .12); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; }

/* toasts: rise in with a little spring, fade away */
.toast { border-radius: 14px; padding: 11px 18px; font-weight: 500; background: color-mix(in srgb, #1d2026 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35); animation: toast-in .38s var(--spring); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 14px) scale(.96); } }
.toast.tap { animation-name: toast-down; }
@keyframes toast-down { from { opacity: 0; transform: translate(-50%, -14px) scale(.96); } }
.toast.closing { opacity: 0; transition: opacity .2s; }
:root[data-theme="light"] .toast { background: color-mix(in srgb, #1d2026 90%, transparent); }

/* send / mic button swaps with a turn */
.send.morph .icon, #send.morph .icon, .morph > .icon { animation: morph .28s var(--spring); }
@keyframes morph { from { opacity: 0; transform: rotate(-40deg) scale(.5); } }

/* press feedback everywhere you can tap */
.item { transition: background .15s; }
.item:active { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.quick-act:active span { transform: scale(.9); }
.row:active .avatar { transform: scale(.97); transition: transform .15s; }
.story-btn:active .avatar, .story-btn:active .story-ring { transform: scale(.94); }
.story-btn .avatar { transition: transform .2s var(--spring); }

/* the app gently fades in after the splash */
.app { animation: fade .35s ease-out; }

@media (prefers-reduced-motion: reduce) {
  .jump-down.in, .badge.bump, .toast, .morph > .icon, .lightbox { animation: none !important; }
}

/* ----- customer polish ----- */
/* business page (plain): calm facts under the name */
.bp-facts { width: 100%; max-width: 520px; margin: 4px auto 0; padding: 0 16px calc(var(--bottom) + 110px); animation: rise-in .4s .08s var(--ease) both; }
.bp-facts .group { background: var(--field); }
.bp-fact { cursor: default; gap: 14px; align-items: center; }
.bp-fact > .icon { color: var(--blue); flex: none; }
.bp-fact > span { display: grid; gap: 1px; text-align: left; }
.bp-fact b { font-size: 15px; font-weight: 600; }
.bp-fact small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.bp-fact.open > .icon { color: var(--green); }
.bp-fact:active { background: none; }
.bp-plain .chip-static { margin-top: 8px; padding: 4px 12px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-weight: 600; font-size: 13px; }
.bp-plain .profile-user { color: var(--muted); }

/* the empty "Your note…" bubble fits on one line */
.note-bubble.empty { max-width: 92px; white-space: nowrap; }

/* chat menu: quick buttons on top, quieter list below */
.sheet-body .quick-acts + .group { margin-top: 2px; }
.item.danger, .item.danger .icon { color: var(--danger); }

/* ----- Profile, tidied (2026-12-05): a card, then a few rows that open their own pages ----- */
.profile-card { display: grid; justify-items: center; text-align: center; }
.profile-av { position: relative; border-radius: 50%; transition: transform .2s var(--spring); }
.profile-av:active { transform: scale(.95); }
.profile-edit { position: absolute; right: 0; bottom: 2px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-style: normal;
  background: linear-gradient(135deg, var(--blue), var(--blue-2)); box-shadow: 0 0 0 3px var(--field), 0 4px 10px rgba(0, 0, 0, .3); }
.profile-btns { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.profile-btns .pill-btn { display: inline-flex; align-items: center; gap: 6px; margin: 0; height: 36px; padding: 0 16px; }
.profile-card .tick-req { margin-top: 14px; }
.set-row { min-height: 62px; gap: 14px; }
.set-row > span:nth-child(2) { flex: 1; min-width: 0; display: grid; gap: 1px; text-align: left; }
.set-row .item-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-ic { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; color: #fff; }
.set-ic.blue { background: linear-gradient(135deg, #5b8cff, #3d6ee0); }
.set-ic.pink { background: linear-gradient(135deg, #f47d9a, #c86cff); }
.set-ic.green { background: linear-gradient(135deg, #4cc787, #22925b); }
.set-ic.amber { background: linear-gradient(135deg, #f5b04a, #e8711b); }
.set-ic.violet { background: linear-gradient(135deg, #9a86ff, #6d56e6); }
.set-ic.grey { background: linear-gradient(135deg, #8d97a8, #5d6676); }
.item.sign-out { color: var(--danger); justify-content: center; }
.item.sign-out .icon { color: var(--danger); }
.profile > .group + .group { margin-top: 0; }
/* settings pages */
.set-page .cd-scroll { gap: 14px; }
.set-top { align-items: center; gap: 12px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); margin: 0 -16px; padding-left: 12px; padding-right: 12px; }
.set-top h3 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.set-body { display: grid; gap: 14px; animation: rise-in .3s var(--ease) both; }
.set-body .note { margin: -6px 4px 0; font-size: 13px; color: var(--muted); line-height: 1.4; }
.set-body .version { text-align: center; color: var(--muted); font-size: 12.5px; }
.item.set-row > .set-ic { flex: 0 0 34px; width: 34px; }
.item.set-row > .set-ic .icon { color: #fff; }

/* =====================================================================
   Find, redesigned (2026-12-05): big search with Scan QR, recent searches,
   your people, share card, calm empty picture. Nobody is listed unprompted.
   ===================================================================== */
.find-head { display: grid; gap: 2px; }
.find-head .greet { order: 2; margin: 0; }
.find-form { margin: 10px 16px 8px; gap: 10px; align-items: center; }
.find-form .find-control { height: 54px; border-radius: 18px; padding: 0 8px 0 16px; gap: 10px; background: var(--field); border: 1px solid transparent;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset; transition: border-color .2s, box-shadow .25s, background .2s; }
.find-form .find-control:focus-within { border-color: color-mix(in srgb, var(--blue) 60%, transparent); background: var(--bg);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--blue) 12%, transparent), 0 10px 30px color-mix(in srgb, var(--blue) 14%, transparent); }
.find-form .find-control > .icon { color: var(--muted); }
.find-form .find-control:focus-within > .icon { color: var(--blue); }
.find-form input { font-size: 16.5px; }
.find-clear { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--muted); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.find-clear[hidden] { display: none; }
.scan-btn { width: 54px; height: 54px; flex: none; border-radius: 18px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--blue-2)); box-shadow: 0 8px 20px color-mix(in srgb, var(--blue) 32%, transparent); transition: transform .2s var(--spring); }
.scan-btn:active { transform: scale(.92); }
.find-start { gap: 22px; padding: 6px 16px calc(24px + var(--bottom)); }
.find-start > * { animation: rise-in .35s var(--ease) both; }
.find-start > :nth-child(2) { animation-delay: 40ms; } .find-start > :nth-child(3) { animation-delay: 80ms; }
.find-start > :nth-child(4) { animation-delay: 120ms; } .find-start > :nth-child(n+5) { animation-delay: 160ms; }
.find-start:empty { display: none; }
.recent-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.recent-head h4 { display: flex; align-items: center; gap: 6px; margin: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.find-chip { height: 36px; padding: 0 14px; border-radius: 999px; font-size: 14.5px; font-weight: 600; color: var(--ink); background: var(--field); border: 1px solid var(--line); transition: transform .15s var(--spring), background .15s; }
.find-chip:active { transform: scale(.95); background: var(--blue-soft); }
/* share card with my QR code */
.share-card { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 20px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--blue) 14%, var(--field)), color-mix(in srgb, var(--blue-2) 10%, var(--field))); border: 1px solid color-mix(in srgb, var(--blue) 14%, transparent); }
.share-qr { width: 64px; height: 64px; flex: none; padding: 5px; border-radius: 14px; background: #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, .2); transition: transform .2s var(--spring); }
.share-qr:active { transform: scale(.94); }
.share-qr svg { width: 100%; height: 100%; display: block; }
.share-card-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.share-card-text small { color: var(--muted); font-size: 13px; }
.share-card-text b { font-size: 17px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-card .pill-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px; margin: 0; }
/* calm picture */
.calm-art { display: grid; place-items: center; }
.calm-art svg { overflow: visible; }
.calm-art .ca-b1 { animation: float 6s ease-in-out infinite; }
.calm-art .ca-b2 { animation: float 6s ease-in-out -3s infinite; }
.calm-art .ca-s { animation: twinkle 4s ease-in-out infinite; transform-origin: 160px 42px; }
@keyframes float { 50% { transform: translateY(-5px); } }
@keyframes twinkle { 50% { opacity: .5; transform: scale(.85); } }
.find-empty { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 8px 12px 4px; }
.find-empty h3 { font-size: 19px; letter-spacing: -.02em; margin-top: 4px; }
.find-empty p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.45; max-width: 300px; }
.find-tip { border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); background: var(--field); }
.find-tip-ic { background: color-mix(in srgb, var(--blue) 16%, transparent); color: var(--blue); box-shadow: none; }

/* ----- QR scanner ----- */
.page-overlay.scan { background: #000; z-index: 45; }
.scan-page { position: absolute; inset: 0; overflow: hidden; color: #fff; }
.scan-page video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-shade { position: absolute; inset: 0; display: grid; place-items: center; }
.scan-frame { position: relative; width: min(66vw, 280px); aspect-ratio: 1; border-radius: 28px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .55); }
.scan-frame b { position: absolute; width: 38px; height: 38px; border: 4px solid #fff; border-radius: 4px; }
.scan-frame b:nth-child(1) { top: -2px; left: -2px; border-right: 0; border-bottom: 0; border-top-left-radius: 28px; }
.scan-frame b:nth-child(2) { top: -2px; right: -2px; border-left: 0; border-bottom: 0; border-top-right-radius: 28px; }
.scan-frame b:nth-child(3) { bottom: -2px; left: -2px; border-right: 0; border-top: 0; border-bottom-left-radius: 28px; }
.scan-frame b:nth-child(4) { bottom: -2px; right: -2px; border-left: 0; border-top: 0; border-bottom-right-radius: 28px; }
.scan-line { position: absolute; left: 12%; right: 12%; top: 50%; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--blue), transparent); box-shadow: 0 0 12px var(--blue); animation: scanline 2.2s ease-in-out infinite; }
@keyframes scanline { 0%, 100% { transform: translateY(-110px); opacity: .4; } 50% { transform: translateY(110px); opacity: 1; } }
.scan-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 12px; padding: calc(var(--top) + 10px) 12px 10px; }
.scan-top b { font-size: 17px; }
.scan-top .bp-round { color: #fff; }
.scan-bottom { position: absolute; left: 0; right: 0; bottom: 0; display: grid; justify-items: center; gap: 14px; padding: 16px 24px calc(var(--bottom) + 28px); text-align: center; }
.scan-status { margin: 0; font-size: 15px; font-weight: 500; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); max-width: 300px; }
.scan-photo { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px; color: #fff; font-weight: 600;
  background: rgba(255, 255, 255, .16); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

/* ----- a warm home for new accounts ----- */
.welcome-home { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 18px 16px calc(28px + var(--bottom)); animation: rise-in .4s var(--ease) both; }
.welcome-home h3 { font-size: 24px; letter-spacing: -.03em; margin-top: 2px; }
.welcome-home > p { margin: 0 0 8px; color: var(--muted); font-size: 15px; line-height: 1.45; max-width: 310px; }
.wh-btns { width: 100%; max-width: 420px; display: grid; gap: 10px; margin-bottom: 14px; }
.wh-btns .primary { display: flex; align-items: center; justify-content: center; gap: 8px; }
.wh-scan { height: 50px; border-radius: var(--r); display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; color: var(--blue); background: var(--blue-soft); transition: transform .15s var(--spring); }
.wh-scan:active { transform: scale(.98); }
.welcome-home .share-card, .welcome-home .start-card { width: 100%; max-width: 420px; text-align: left; }
.welcome-home .start-card { margin-bottom: 12px; }
/* getting-started card */
.start-card { border-radius: 20px; padding: 14px 14px 8px; background: var(--field); border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); }
.start-card.compact { margin: 4px 16px 10px; }
.start-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.start-head > span:nth-child(2) { flex: 1; display: grid; gap: 1px; }
.start-head b { font-size: 16px; }
.start-head small { color: var(--muted); font-size: 13px; }
.start-ring { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--blue) calc(var(--p) * 360deg), color-mix(in srgb, var(--ink) 10%, transparent) 0); }
.start-ring b { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--field); font-size: 11.5px !important; font-weight: 700; }
.start-x { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.start-x:active { background: var(--hover); }
.start-steps { display: grid; }
.start-step { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 2px; text-align: left; font-size: 15px; color: var(--ink); border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.start-step > span { flex: 1; }
.start-step > .icon { color: var(--muted); }
.start-check { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 2px solid color-mix(in srgb, var(--ink) 22%, transparent); color: #fff; font-style: normal; }
.start-step.done { color: var(--muted); cursor: default; }
.start-step.done > span { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.start-step.done .start-check { border: 0; background: linear-gradient(135deg, var(--green), color-mix(in srgb, var(--green) 70%, #0a8)); animation: badge-pop .45s var(--spring); }
.start-card.compact .start-steps { display: none; }
.start-card.compact { cursor: default; }
.start-card.compact .start-head { cursor: pointer; margin-bottom: 4px; }
.start-card.compact.open .start-steps { display: grid; animation: rise-in .25s var(--ease); }
.start-card.compact:not(.open) { padding-bottom: 12px; }
.find-start { padding-left: 0; padding-right: 0; }
.start-step { width: 100%; }
.start-step > span { flex: 1 1 auto; min-width: 0; }
.share-card-text small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.start-step > .icon { margin-left: auto; }
.start-step > .icon { flex: none; } .start-step > span:not(.icon) { flex: 1 1 auto; }

/* ---------- Welcome from the official Sweep Text account ---------- */
.welcome-home.under { padding-top: 26px; margin-top: 6px; border-top: 1px solid var(--line); animation-delay: .12s; }
.composer-locked.official { text-align: center; line-height: 1.4; }
.composer-locked.official a { color: var(--blue); font-weight: 600; text-decoration: none; }
