:root {
  --navy: #16344a;
  --navy-soft: #2c4a60;
  --ink: #1c2b36;
  --muted: #5f6f7b;
  --line: #e3e8ed;
  --bg: #e8edf2;
  --surface: #ffffff;
  --blue: #1f5f93;
  --bubble-user: #d3e3f3;
  --chip-source: #dde6f0;
  --chip-warm: #f8dcc8;
  --warm-ink: #7a3e12;
  --chip-ok: #d5ebe6;
  --ok-ink: #1f5f55;
  --pinned: #fbf3ee;
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  background: #cfd8df;
  color: var(--ink);
  font-family: Manrope, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.4;
  display: flex;
  justify-content: center;
  align-items: center;
}

button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.phone {
  width: 100%;
  max-width: 430px;
  height: var(--app-height, 100dvh);
  max-height: 900px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
@media (min-width: 480px) and (min-height: 940px) {
  .phone { border-radius: 28px; box-shadow: 0 20px 60px rgba(22, 52, 74, .25); }
}

.full-screen body { align-items: flex-start; overflow: hidden; }

.scroll { flex: 1; overflow-y: auto; }
.icon { width: 22px; height: 22px; flex: none; }

/* Headers */
.head { background: var(--navy); color: #fff; padding: calc(22px + env(safe-area-inset-top)) 20px 16px; flex: none; }
.head h1 { margin: 0; font-size: 23px; font-weight: 800; letter-spacing: -.01em; }
.head p { margin: 2px 0 0; color: #c5d3de; font-size: 14px; }
.head-row { display: flex; align-items: center; gap: 12px; }
.head-row .grow { flex: 1; min-width: 0; }
.round-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--navy-soft); display: grid; place-items: center; color: #fff; flex: none; }
.back { width: 40px; height: 44px; display: grid; place-items: center; color: #fff; flex: none; }
.head.chat { padding: calc(14px + env(safe-area-inset-top)) 12px 14px; }
.head.chat h1 { font-size: 19px; }
.head.chat p { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.search { margin-top: 14px; background: #fff; border-radius: 12px; display: flex; align-items: center; gap: 10px; padding: 0 14px; color: var(--muted); }
.search input { flex: 1; border: 0; outline: 0; font: inherit; padding: 13px 0; background: none; color: var(--ink); min-width: 0; }
.tabs { display: flex; gap: 6px; margin-top: 14px; overflow-x: auto; }
.tabs button { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.tabs .badge { height: 20px; min-width: 20px; font-size: 11px; }
.tabs button { color: #fff; font-weight: 600; padding: 8px 12px; border-radius: 999px; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--navy); font-weight: 700; }

/* Avatars */
.avatar { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; flex: none; }
.avatar.ai { background: var(--navy); }
.avatar.ai.small { width: 46px; height: 46px; background: var(--navy-soft); }
.avatar.ai svg { width: 28px; height: 28px; }
.avatar img.photo { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; background: #fff; }
.avatar.small { width: 46px; height: 46px; }
.group-photo { display: flex; gap: 12px; align-items: center; }
.group-photo .grow { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.group-photo .actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.avatar.ai .logo { width: 100%; height: 100%; border-radius: 50%; display: block; }
.head-logo .logo { width: 44px; height: 44px; border-radius: 12px; display: block; }
.brand-logo .logo { width: 96px; height: 96px; border-radius: 24px; display: block; box-shadow: 0 8px 20px rgba(45, 32, 28, .25); }
.brand p.site { font-weight: 700; color: var(--navy); }
.tone-blue { background: #d5e4f3; color: #1d4467; }
.tone-green { background: #dfead7; color: #2f4a1c; }
.tone-peach { background: #f3dfcf; color: #7a3e12; }
.tone-lilac { background: #e3def0; color: #3d2f6b; }
.tone-teal { background: #d7ebe7; color: #1f5f55; }

/* Chat list */
.list { background: var(--surface); }
.row { display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.row.pinned { background: var(--pinned); }
.row .body { flex: 1; min-width: 0; }
.row .top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.row .name { font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .when { font-size: 13px; color: var(--muted); flex: none; }
.row .when.fresh { color: var(--blue); font-weight: 700; }
.row .bottom { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 15px; }
.row .preview { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .bottom .icon { width: 17px; height: 17px; color: var(--blue); }
.badge { background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; min-width: 22px; height: 22px; border-radius: 11px; display: grid; place-items: center; padding: 0 6px; }
.empty { padding: 32px 24px; color: var(--muted); text-align: center; }
.fab { position: absolute; right: 20px; bottom: 96px; width: 60px; height: 60px; border-radius: 18px; background: var(--navy); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 20px rgba(22, 52, 74, .3); }

/* Bottom navigation */
.nav { flex: none; display: flex; background: var(--surface); border-top: 1px solid var(--line); padding: 10px 4px calc(10px + env(safe-area-inset-bottom)); }
.nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); padding: 4px 0; }
.nav button[aria-current="page"] { color: var(--navy); font-weight: 700; }

/* Conversation */
.thread { padding: 14px 14px 20px; display: flex; flex-direction: column; gap: 12px; }
.thread .earlier { align-self: center; }
.day { align-self: center; background: #fff; border-radius: 10px; padding: 5px 12px; font-size: 13px; font-weight: 600; color: var(--navy-soft); }
.msg { max-width: 86%; border-radius: 16px; padding: 12px 14px; }
.msg.user { align-self: flex-end; background: var(--bubble-user); border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--surface); border-bottom-left-radius: 4px; }
.msg p { margin: 0; }
.msg .time { display: block; text-align: right; font-size: 12px; color: var(--muted); margin-top: 2px; }
.msg .meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; }
.msg .meta .time { margin: 0 0 0 auto; }
.voice { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.voice .play { width: 38px; height: 38px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; }
.voice .play svg { width: 16px; height: 16px; }
.voice .wave { width: 78px; height: 26px; color: var(--blue); }
.msg.user.spoken p { font-style: italic; }

.chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 7px; padding: 3px 8px; font-size: 12px; font-weight: 700; background: var(--chip-source); color: var(--navy); }
.chip .icon { width: 13px; height: 13px; }
.chip.warm { background: var(--chip-warm); color: var(--warm-ink); }
.chip.ok { background: var(--chip-ok); color: var(--ok-ink); }
.call { display: inline-flex; align-items: center; gap: 10px; background: var(--navy); color: #fff; font-weight: 700; border-radius: 12px; padding: 12px 18px; margin-top: 10px; }
.call .icon { width: 18px; height: 18px; }

.composer { flex: none; display: flex; gap: 10px; padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); }
.composer input { flex: 1; min-width: 0; border: 0; border-radius: 999px; padding: 15px 20px; font: inherit; background: #fff; color: var(--ink); }
.composer.read-only { justify-content: center; margin: 0; color: var(--muted, #667); font-size: .9rem; text-align: center; }
.form label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.source .actions label.switch { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--navy-soft); }
.source .actions label.switch input { width: 20px; height: 20px; margin: 0; }
.form label.check input { width: 20px; height: 20px; flex: none; padding: 0; margin: 0; }
.composer button { width: 54px; height: 54px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; flex: none; }

/* Knowledge admin */
.page { padding: 18px; display: flex; flex-direction: column; gap: 18px; }
.upload { display: flex; gap: 14px; align-items: center; text-align: left; width: 100%; border: 2px dashed #9fb1c1; border-radius: 16px; padding: 18px; }
.upload .tile { width: 48px; height: 48px; border-radius: 12px; background: var(--chip-source); display: grid; place-items: center; color: var(--navy); flex: none; }
.upload strong { display: block; font-size: 17px; }
.upload span { color: var(--muted); font-size: 14px; }
.card { background: var(--surface); border-radius: 16px; overflow: hidden; }
.review { border-left: 6px solid var(--blue); padding: 16px 16px 16px 18px; display: grid; gap: 12px; }
.review.conflict { border-left-color: #b8611e; }
.review h2, .section-title { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.review h2 { color: var(--navy-soft); }
.review.conflict h2 { color: var(--warm-ink); }
.section-title { color: var(--navy-soft); }
.review p { margin: 0; }
.muted { color: var(--muted); font-size: 14px; }
.draft, .now { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 8px; }
.now { background: #f4f7f9; }
.version { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.fields { display: grid; gap: 2px; margin-top: 4px; }
.field { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.field span { color: var(--muted); }
.field b { text-align: right; overflow-wrap: anywhere; }
.field.edit { align-items: center; }
.field.edit input { flex: 1; max-width: 60%; font: inherit; border: 1.5px solid #9fb1c1; border-radius: 8px; padding: 6px 8px; }
.from { font-size: 13px; color: var(--muted); }
/* Dashboard */
.dash { display: grid; gap: 14px; align-items: start; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile-stat { background: var(--surface); border-radius: 14px; padding: 14px; display: grid; gap: 2px; min-width: 0; }
.tile-stat b { font-size: 26px; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.tile-stat span { font-size: 13px; font-weight: 700; color: var(--ink); }
.tile-stat small { font-size: 12px; color: var(--muted); }
.tile-stat.warn b { color: var(--warm-ink); }
.note-line.warn { color: var(--warm-ink); font-weight: 700; }
.dash-card { padding: 16px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.dash-card .section-title + * { margin-top: -2px; }
.dash-card .kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.dash-card .kv:last-child { border-bottom: 0; }
.dash-card .kv b { font-variant-numeric: tabular-nums; text-align: right; }
.dash-card .kv > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.dash-card .kv > span.muted { flex: none; }
.hit { display: grid; gap: 4px; font-size: 14px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.hit:last-child { border-bottom: 0; }
.hit p { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.dash-search { display: flex; gap: 8px; }
.dash-search input { flex: 1; min-width: 0; font: inherit; border: 1.5px solid #9fb1c1; border-radius: 10px; padding: 10px 12px; }
.dash-search .btn { flex: none; }
.meter { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--blue); border-radius: 999px; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 90px; }
.bars .bar { flex: 1; min-width: 3px; background: var(--blue); border-radius: 3px 3px 0 0; opacity: .8; }
@media (min-width: 900px) {
  .page.wide { max-width: 1060px; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dash { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash .stats, .dash .wide { grid-column: 1 / -1; }
}
.btn.small { flex: none; padding: 6px 14px; font-size: 14px; }
.source .actions:has(.small) { margin-top: 8px; }
.contents { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.contents li { display: flex; justify-content: space-between; gap: 12px; }
.contents li span:first-child { min-width: 0; overflow-wrap: anywhere; }
.contents li .muted { flex: none; font-size: 13px; }
.roles { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.roles legend { font-weight: 700; font-size: 14px; margin-bottom: 6px; padding: 0; }
.roles label { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.roles input { width: 20px; height: 20px; }
.msg.bot.wide { max-width: 100%; display: grid; gap: 10px; }
.msg.bot.wide .review { box-shadow: none; }
.page-text { font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; display: grid; gap: 2px; }
.page-text .add { background: var(--chip-ok); color: var(--ok-ink); border-radius: 4px; padding: 0 6px; }
.page-text .del { color: var(--muted); text-decoration: line-through; padding: 0 6px; }
.page-text .mark { font-weight: 800; margin-right: 6px; }
.page-edit { font: inherit; font-size: 14px; border: 1.5px solid #9fb1c1; border-radius: 12px; padding: 10px 12px; resize: vertical; width: 100%; }
details.topic { display: block; }
details.topic summary { list-style: none; cursor: pointer; display: flex; }
details.topic summary::-webkit-details-marker { display: none; }
details.topic[open] .page-text, details.topic .actions { margin-top: 10px; }
.doubt { font-size: 13px; color: var(--warm-ink); background: var(--chip-warm); border-radius: 8px; padding: 6px 10px; margin: 4px 0 0; }
.upload.busy { border-style: solid; }
.link { color: var(--blue); font-weight: 700; font-size: 14px; align-self: flex-start; }
.paste { display: grid; gap: 10px; }
.paste textarea { font: inherit; border: 1.5px solid #9fb1c1; border-radius: 12px; padding: 10px 12px; resize: vertical; }
.actions { display: flex; gap: 10px; }
.btn { flex: 1; border-radius: 10px; padding: 12px 6px; font-weight: 700; font-size: 15px; white-space: nowrap; border: 1.5px solid #9fb1c1; color: var(--navy); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
a.btn { display: block; text-align: center; text-decoration: none; }
.source { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.source:last-child { border-bottom: 0; }
.source .body { flex: 1; min-width: 0; }
.source strong { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.source .chip { flex: none; }
.source strong .icon { width: 16px; height: 16px; color: var(--warm-ink); }
.source .note { display: block; color: var(--muted); font-size: 14px; }

.note-line { color: var(--muted); font-size: 13px; margin: 0; }

.toast { position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 340px; text-align: center; }
.toast.show { opacity: 1; }

/* Sign-in and accounts */
.signin { display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: calc(28px + env(safe-area-inset-top)) 22px 28px; }
.brand { text-align: center; display: grid; justify-items: center; gap: 6px; }
.brand h1 { margin: 8px 0 0; font-size: 24px; font-weight: 800; color: var(--navy); }
.brand p { margin: 0; color: var(--muted); }
.form { display: grid; gap: 14px; padding: 18px; }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 700; color: var(--navy-soft); }
.form input, .form select, .source select { font: inherit; font-weight: 500; color: var(--ink); border: 1.5px solid #9fb1c1; border-radius: 10px; padding: 11px 12px; background: #fff; min-width: 0; }
.form .btn { margin-top: 4px; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn .icon { width: 18px; height: 18px; vertical-align: -4px; }
.source.user .actions { margin-top: 10px; flex-wrap: wrap; }
.source.user .actions select { flex: 1 1 140px; padding: 10px; }
.source.user .actions .btn { flex: 1 1 110px; }
.source.user.off strong { color: var(--muted); }
.secret { font-family: ui-monospace, 'SF Mono', Consolas, monospace; font-size: 18px; letter-spacing: .04em; user-select: all; }
.secret.link-text { font-size: 13px; letter-spacing: 0; word-break: break-all; }

/* Team chat and install */
.msg .from-name { font-size: 13px; font-weight: 700; color: var(--blue); margin-bottom: 2px; }
.msg p { white-space: pre-wrap; overflow-wrap: anywhere; }
.avatar .icon { width: 26px; height: 26px; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.form p { margin: 0; }

/* Live answers */
.typing { display: flex; gap: 5px; padding: 16px; }
.typing span { width: 8px; height: 8px; border-radius: 50%; background: #9fb1c1; animation: blink 1.2s infinite both; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .typing span { animation: none; } }
.notice { margin: 0; background: var(--chip-warm); color: var(--warm-ink); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.thread .empty { padding: 12px 8px 0; }

/* Computer: the phone column widens into a full-height app window.
   Phones and narrow windows keep the layout above unchanged. */
@media (min-width: 900px) {
  body { align-items: stretch; }
  .phone { max-width: 1100px; max-height: none; border-radius: 0; box-shadow: 0 0 40px rgba(22, 52, 74, .18); }
  .head { padding-left: 32px; padding-right: 32px; }
  .head.chat { padding-left: 20px; padding-right: 20px; }
  .search { max-width: 640px; }
  .row { padding-left: 32px; padding-right: 32px; }
  .thread { padding: 20px 32px 24px; }
  .msg { max-width: 68%; }
  .composer { padding-left: 32px; padding-right: 32px; }
  .page { padding: 28px 32px; max-width: 820px; width: 100%; margin: 0 auto; }
  .nav { justify-content: center; }
  .nav button { flex: 0 1 180px; }
  .fab { right: 32px; }
}

/* Photos, files and voice messages in the team chat */
.composer { align-items: center; }
.composer .ghost { width: 44px; height: 44px; background: none; color: var(--navy); }
.composer input:not(:placeholder-shown) ~ .mic,
.composer input:placeholder-shown ~ .send { display: none; }
/* The assistant takes typed questions only: always the send arrow, faded until there is text. */
.composer input:placeholder-shown ~ .ask-send { opacity: .4; }
.composer.recording .rec { flex: 1; display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 999px; padding: 15px 20px; color: var(--ink); }
.composer.recording .rec b { font-variant-numeric: tabular-nums; }
.rec .dot { width: 10px; height: 10px; border-radius: 50%; background: #c8402f; animation: blink 1.2s infinite both; }
@media (prefers-reduced-motion: reduce) { .rec .dot { animation: none; } }
.msg .photo { display: block; padding: 0; margin: -4px -6px 6px; border-radius: 12px; overflow: hidden; background: var(--line); }
.msg .photo img { display: block; max-width: 100%; width: 280px; max-height: 320px; object-fit: cover; }
.msg .audio { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.msg .audio audio { width: 240px; max-width: 100%; height: 40px; }
.msg .file { display: flex; align-items: center; gap: 10px; text-align: left; background: rgba(255, 255, 255, .6); border-radius: 12px; padding: 10px 12px; margin-bottom: 6px; color: var(--navy); max-width: 100%; }
.msg.bot .file { background: var(--bg); }
.msg .file .icon { width: 28px; height: 28px; flex: none; }
.msg .file b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.msg .file small { color: var(--muted); }
.viewer { position: absolute; inset: 0; z-index: 20; background: rgba(10, 20, 30, .94); display: grid; place-items: center; padding: calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)); }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.viewer .round-btn { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 14px; }
.ticks { letter-spacing: -3px; margin-left: 2px; }
.ticks.read { color: var(--blue); font-weight: 700; }
.msg .readers { display: block; margin-left: auto; padding: 0; background: none; font: inherit; font-size: 12px; color: var(--muted); }
.read-list { list-style: none; margin: 6px 0 0; padding: 6px 0 0; border-top: 1px solid rgba(31, 95, 147, .2); font-size: 13px; display: grid; gap: 2px; }
.read-list li { display: flex; justify-content: space-between; gap: 16px; }
.read-list li span:last-child { color: var(--muted); }
.msg .learn { display: inline-flex; align-items: center; gap: 6px; margin: 2px 0 6px; padding: 6px 10px; border-radius: 10px; background: var(--chip-source); color: var(--navy); font-size: 13px; font-weight: 700; }
.msg .learn .icon { width: 15px; height: 15px; }
.msg .learn:disabled { opacity: .6; }

/* Sign-up with a QR code */
.qr { background: #fff; border-radius: 12px; padding: 8px; width: 220px; max-width: 100%; align-self: center; }
.qr svg { display: block; width: 100%; height: auto; }
.qr.big { width: min(70vh, 88vw); }
.card.invite { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; }
.card.invite .actions, .show-invite .actions { flex-wrap: wrap; justify-content: center; }
.card.invite p { margin: 0; }
.card.invite.off { opacity: .6; }
.show-invite { align-items: center; text-align: center; }
.show-invite h1 { margin: 0; }
.show-invite p { margin: 0; }
.show-invite .count { font-size: 20px; }

/* A message deleted for everyone, and the button that deletes one. */
.msg.deleted p { display: flex; align-items: center; gap: 6px; font-style: italic; color: var(--muted); }
.msg.deleted .icon { width: 16px; height: 16px; }
.msg[data-action="msg-menu"] { cursor: pointer; -webkit-touch-callout: none; }
.msg.selected { outline: 2px solid var(--blue); outline-offset: 1px; }
.msg-delete { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding: 8px 12px; border-radius: 10px; background: #fff; color: #a3261c; font-weight: 700; font-size: 14px; width: 100%; justify-content: center; }
.msg-delete .icon { width: 18px; height: 18px; }

/* The app's own yes/no question, in English whatever the phone's language. */
.confirm { position: fixed; inset: 0; z-index: 50; background: rgba(10, 20, 30, .55); display: grid; place-items: center; padding: 16px; }
.confirm .sheet { background: var(--surface); color: var(--ink); border-radius: 16px; padding: 20px; width: min(380px, 100%); box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
.confirm p { margin: 0 0 16px; line-height: 1.45; }
.confirm .actions { display: flex; gap: 10px; }
.confirm .btn.danger { background: #a3261c; border-color: #a3261c; }

/* Choosing the people of a chat group */
.form .members label { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--ink); font-size: 15px; }
.form .members label[hidden] { display: none; }
.form .members input[type="checkbox"] { width: 20px; height: 20px; flex: none; padding: 0; margin: 0; }
.form .members input[type="search"] { margin-bottom: 4px; }
.form h2 { margin: 0; font-size: 18px; }
.row.new-group .avatar { background: var(--navy); color: #fff; }

/* Video library */
.link-row { display: flex; width: 100%; text-align: left; margin-bottom: 18px; border: 0; }
.link-row .avatar { width: 40px; height: 40px; }
.folder-title { display: flex; align-items: center; gap: 8px; }
.folder-title .icon { width: 20px; height: 20px; }
.folder-actions { flex-wrap: wrap; margin: 10px 0 22px; }
.player { display: block; width: 100%; max-height: 70vh; margin-top: 10px; border-radius: 12px; background: #000; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.video-card { display: flex; flex-direction: column; gap: 6px; text-align: left; background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; min-width: 0; }
.video-card strong { font-size: 15px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-card .note { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: var(--navy-soft); color: #fff; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb > .icon { width: 34px; height: 34px; opacity: .6; }
.thumb .play { position: absolute; width: 38px; height: 38px; border-radius: 50%; background: rgba(0, 0, 0, .45); display: grid; place-items: center; }
.thumb .play svg { width: 16px; height: 16px; margin-left: 2px; }
.thumb .length { position: absolute; right: 6px; bottom: 6px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 6px; border-radius: 6px; }
.video-card.uploading .thumb { background: var(--line); }
.watch .player { margin-top: 0; }
.player.photo { object-fit: contain; }
.video-heading { margin: 0; font-size: 20px; }
.description { padding: 14px 16px; white-space: pre-wrap; line-height: 1.45; }
.form textarea { font: inherit; font-weight: 500; color: var(--ink); border: 1.5px solid #9fb1c1; border-radius: 10px; padding: 11px 12px; background: #fff; resize: vertical; }
.share-hint { padding: 12px 16px 4px; }
.share-to { width: 100%; text-align: left; background: none; border-left: 0; border-right: 0; border-top: 0; font: inherit; color: inherit; cursor: pointer; }
.video-link { display: flex; gap: 10px; align-items: center; text-align: left; background: rgba(255, 255, 255, .6); border: 0; border-radius: 10px; padding: 6px; font: inherit; color: inherit; cursor: pointer; margin: 2px 0 4px; max-width: 100%; }
.video-link .thumb { width: 64px; flex: none; aspect-ratio: 16 / 10; }
.video-link .thumb > .icon { width: 22px; height: 22px; }
.video-link .thumb .play { width: 24px; height: 24px; }
.video-link .thumb .play svg { width: 10px; height: 10px; }
.video-link strong { display: block; font-size: 15px; }
.video-link small { color: var(--muted); font-size: 12px; }

/* A person's badges (van, snowmobile, camera) after their name. */
.badges { margin-left: 4px; font-size: 0.9em; letter-spacing: 1px; white-space: nowrap; }
