/* FamilyCall look. Colours come from the variables below, so the Settings screen can switch theme, accent, font and size. */
:root {
  --scale: 1;
  --font: system-ui, -apple-system, "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px;
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
  --good: #22c55e; --bad: #ef4444;
  --accent: #4f8cff; --accent-text: #fff;
  color-scheme: dark;
  /* dark (default) */
  --bg: #0b1020; --bg-glow: #14204a; --panel: #141c33; --panel2: #1b2544; --elev: #1f2a4b;
  --line: #26324f; --text: #eaf0ff; --muted: #93a1c0; --input: #0e1528; --scrim: rgba(5, 9, 20, .82);
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 6px 18px rgba(0,0,0,.25); --shadow-lg: 0 10px 40px rgba(0,0,0,.5);
  --warn-bg: #3a2a10; --warn-line: #6b4e17; --warn-text: #ffd9a0;
  --bad-bg: #3a1414; --bad-line: #7a2323; --bad-text: #ff9a9a;
  --t-secured: #7fd1ff; --t-secret: #ffd479; --t-conf: #ff8a8a;
  --pill-on-bg: #0f3d22; --pill-on-text: #7bf0a8; --pill-off-bg: #3d1515; --pill-off-text: #ff9a9a;
}
html[data-theme="midnight"] { --bg: #000; --bg-glow: #0b0b14; --panel: #0b0b12; --panel2: #14141f; --elev: #161622; --line: #1e1e2c; --input: #07070c; --scrim: rgba(0,0,0,.9); }
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f5fb; --bg-glow: #e3eaff; --panel: #ffffff; --panel2: #eef2fb; --elev: #ffffff;
  --line: #dbe2f0; --text: #141a2e; --muted: #5a6683; --input: #f4f6fc; --scrim: rgba(235, 240, 252, .85);
  --shadow: 0 1px 2px rgba(20,30,70,.06), 0 6px 18px rgba(20,30,70,.08); --shadow-lg: 0 10px 40px rgba(20,30,70,.2);
  --warn-bg: #fff4dc; --warn-line: #f1cf7a; --warn-text: #7a5200;
  --bad-bg: #ffe9e9; --bad-line: #f1a9a9; --bad-text: #b42318;
  --t-secured: #0b74b8; --t-secret: #9a6a00; --t-conf: #c0392b;
  --pill-on-bg: #dcf7e6; --pill-on-text: #136c37; --pill-off-bg: #ffe3e3; --pill-off-text: #b42318;
}
@media (prefers-color-scheme: light) {
  html[data-theme="auto"] {
    color-scheme: light;
    --bg: #f3f5fb; --bg-glow: #e3eaff; --panel: #ffffff; --panel2: #eef2fb; --elev: #ffffff;
    --line: #dbe2f0; --text: #141a2e; --muted: #5a6683; --input: #f4f6fc; --scrim: rgba(235, 240, 252, .85);
    --shadow: 0 1px 2px rgba(20,30,70,.06), 0 6px 18px rgba(20,30,70,.08); --shadow-lg: 0 10px 40px rgba(20,30,70,.2);
    --warn-bg: #fff4dc; --warn-line: #f1cf7a; --warn-text: #7a5200;
    --bad-bg: #ffe9e9; --bad-line: #f1a9a9; --bad-text: #b42318;
    --t-secured: #0b74b8; --t-secret: #9a6a00; --t-conf: #c0392b;
    --pill-on-bg: #dcf7e6; --pill-on-text: #136c37; --pill-off-bg: #ffe3e3; --pill-off-text: #b42318;
  }
}
/* accent colours */
html[data-accent="blue"] { --accent: #4f8cff; }
html[data-accent="teal"] { --accent: #0fa896; }
html[data-accent="green"] { --accent: #1fa84f; }
html[data-accent="orange"] { --accent: #e08a00; }
html[data-accent="pink"] { --accent: #e0408f; }
html[data-accent="purple"] { --accent: #7c5cf0; }
:root { --accent-soft: color-mix(in srgb, var(--accent) 15%, transparent); --accent-2: color-mix(in srgb, var(--accent) 70%, #fff); }
/* fonts */
html[data-font="rounded"] { --font: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Segoe UI Variable", "Nunito", "Quicksand", system-ui, sans-serif; }
html[data-font="serif"] { --font: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif; }
html[data-font="easy"] { --font: Verdana, Tahoma, "Trebuchet MS", "Segoe UI", sans-serif; letter-spacing: .01em; word-spacing: .06em; }
html[data-font="mono"] { --font: ui-monospace, "SF Mono", Menlo, Consolas, "Courier New", monospace; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: calc(16px * var(--scale)); }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 1rem/1.45 var(--font); -webkit-font-smoothing: antialiased; }
body { background: radial-gradient(1200px 600px at 50% -10%, var(--bg-glow), var(--bg) 60%) fixed; }
button, input, select, textarea { font-family: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.error { color: var(--bad-text); min-height: 1.4em; margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.screen { min-height: 100%; display: flex; flex-direction: column; padding: var(--safe-top) 0 var(--safe-bottom); }
#app { max-width: 760px; width: 100%; margin: 0 auto; }
#login { align-items: center; justify-content: center; padding: 24px; }
.card { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  border-radius: 24px; padding: 32px 26px; display: flex; flex-direction: column; gap: 12px; text-align: center; }
.card h1 { margin: 0; font-size: 1.7rem; letter-spacing: -.02em; } .card h2 { margin: 0; } .card p { margin: 0 0 6px; }
.logo { width: 112px; height: 112px; margin: 0 auto 2px; object-fit: contain; filter: drop-shadow(0 6px 18px rgba(30,140,200,.35)); }
.wordmark { font-size: 2.1rem; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.wm-cj { color: #3b82d6; } .wm-calls { color: var(--text); font-weight: 400; }
.tagline { letter-spacing: .28em; font-size: .72rem; font-weight: 600; color: var(--muted); margin: 0 0 8px !important; }

input, select, textarea { width: 100%; background: var(--input); color: var(--text); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 13px 14px; font-size: 1rem; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder { color: var(--muted); opacity: .8; }
button { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 12px 16px; cursor: pointer; transition: transform .08s, filter .15s, background .15s, border-color .15s; }
button:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
button:active { transform: scale(.97); filter: brightness(1.12); }
button:disabled { opacity: .45; cursor: default; transform: none; }
button.primary { background: linear-gradient(180deg, var(--accent-2), var(--accent)); border-color: transparent; color: var(--accent-text); font-weight: 600;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 38%, transparent); }
button.ghost { background: transparent; border-color: transparent; } button.ghost:hover { background: var(--accent-soft); }
button.small { padding: 7px 12px; font-size: .875rem; border-radius: 999px; }

header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; gap: 8px;
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.hdr-actions { display: flex; gap: 4px; align-items: center; }
.pill { font-size: .75rem; padding: 3px 9px; border-radius: 999px; margin-left: 8px; font-weight: 600; }
.pill.on { background: var(--pill-on-bg); color: var(--pill-on-text); } .pill.off { background: var(--pill-off-bg); color: var(--pill-off-text); }

.tabs { display: flex; gap: 4px; padding: 8px 10px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 1 0 auto; border: 0; border-radius: 999px; background: transparent; padding: 9px 14px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.tabs button.active { color: var(--accent-text); background: var(--accent); box-shadow: 0 3px 10px color-mix(in srgb, var(--accent) 40%, transparent); }
.tabs button.active .badge { background: #fff; color: var(--accent); }
.panel { padding: 14px 16px 28px; display: flex; flex-direction: column; gap: 14px; flex: 1; animation: rise .25s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.list li { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 11px 13px; box-shadow: var(--shadow); }
.list .who { flex: 1; min-width: 0; font-weight: 500; }
.list .who small { display: block; color: var(--muted); font-weight: 400; }
.dot { width: 11px; height: 11px; border-radius: 50%; background: #64748b; flex: none; }
.dot.on { background: var(--good); box-shadow: 0 0 0 4px color-mix(in srgb, var(--good) 22%, transparent); }
.badge { background: var(--accent); color: var(--accent-text); border-radius: 999px; font-size: .75rem; padding: 1px 7px; font-weight: 600; }
.list input[type=checkbox], .check input[type=checkbox] { width: 20px; height: 20px; padding: 0; accent-color: var(--accent); }
.list button { padding: 8px 14px; }

.row { display: flex; gap: 10px; } .row > * { flex: 1; }
.dial-input { font-size: 1.5rem; text-align: center; letter-spacing: 1px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.keypad button { font-size: 1.5rem; padding: 16px 0; border-radius: 18px; box-shadow: var(--shadow); }
.call-btn { background: var(--good); border-color: var(--good); color: #04210f; font-weight: 700; }

.overlay { position: fixed; inset: 0; background: var(--bg); display: flex; flex-direction: column;
  padding: var(--safe-top) 0 var(--safe-bottom); z-index: 10; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 7px; }
.msg { max-width: 82%; padding: 9px 13px; border-radius: 18px 18px 18px 6px; background: var(--panel); border: 1px solid var(--line);
  align-self: flex-start; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: var(--shadow); }
.msg.mine { align-self: flex-end; border-radius: 18px 18px 6px 18px; background: linear-gradient(180deg, var(--accent-2), var(--accent)); border-color: transparent; color: var(--accent-text); }
.msg time { display: block; font-size: .7rem; opacity: .7; margin-top: 2px; }
.chat-form { display: flex; gap: 8px; padding: 10px 12px calc(10px + 0px); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 85%, transparent); align-items: center; }
.chat-form input { border-radius: 999px; }
.chat-form .primary { border-radius: 999px; padding: 11px 18px; }

/* calls and conferences stay dark in every theme: video looks best on dark */
.call, .conf, #rec, #incoming {
  --bg: #0b1020; --panel: #141c33; --panel2: #1b2544; --elev: #1f2a4b; --line: #2a3658; --text: #eaf0ff; --muted: #a2b0d0; --input: #0e1528;
  color: var(--text); color-scheme: dark; }
.call { z-index: 20; justify-content: space-between; align-items: center; text-align: center;
  background: radial-gradient(circle at 50% 18%, #1a2a58, var(--bg) 70%); }
.call-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 24px; }
.avatar { width: 124px; height: 124px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: #fff; display: grid; place-items: center;
  font-size: 3rem; font-weight: 700; margin-bottom: 12px; box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 40%, transparent); }
.avatar.pulse { animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 100% { box-shadow: 0 0 0 36px transparent; } }
.people { list-style: none; padding: 0; margin: 12px 0 0; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.people li { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: .875rem; }
.people li.ok { border-color: var(--good); }
.call-actions { display: flex; gap: 36px; padding: 24px 24px 40px; }
.round { width: 76px; height: 76px; border-radius: 50%; font-size: 1.6rem; padding: 0; display: flex; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.14);
  flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.round span { font-size: .7rem; margin-top: 2px; }
.round.danger { background: var(--bad); border-color: var(--bad); color: #fff; } .round.good { background: var(--good); border-color: var(--good); color: #04210f; }
.round.on { background: #fff; color: #111; }

#toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-bottom)); transform: translateX(-50%) translateY(20px);
  background: var(--elev); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: 11px 18px; border-radius: 14px; opacity: 0;
  pointer-events: none; transition: .25s; z-index: 80; max-width: 90%; text-align: center; }
#toast.show { opacity: 1; transform: translateX(-50%); }

/* ---------- settings ---------- */
.settings-body { flex: 1; overflow-y: auto; padding: 14px 16px 40px; display: flex; flex-direction: column; gap: 14px; max-width: 640px; width: 100%; margin: 0 auto; }
.setrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.setrow > span { font-weight: 600; }
.setrow select { width: auto; min-width: 180px; }
.seg { display: inline-flex; background: var(--panel2); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 7px 12px; font-size: .875rem; color: var(--muted); }
.seg button.active { background: var(--accent); color: var(--accent-text); }
.swatches { display: inline-flex; gap: 10px; }
.swatches button { width: 32px; height: 32px; padding: 0; border-radius: 50%; background: var(--sw); border: 3px solid transparent; }
.swatches button.active { border-color: var(--text); box-shadow: 0 0 0 2px var(--bg) inset; }
.preview { margin: 0; padding: 12px; background: var(--panel2); border-radius: var(--r-md); }
.diag li.verdict { font-weight: 600; box-shadow: none; }
.diag li.verdict.ok { border-color: var(--good); } .diag li.verdict.warn { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn-text); }
.diag li.verdict.bad { border-color: var(--bad-line); background: var(--bad-bg); color: var(--bad-text); }
.diag li.col small { white-space: normal; }

/* ---------- upgrade: banners, boxes, attachments, video, conference, recorder ---------- */
.small-note { font-size: 13px; margin: 0; }
.box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.box h3 { margin: 0; }
.banner { display: flex; align-items: center; gap: 10px; background: var(--accent-soft); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; font-size: 14px; }
.banner span { flex: 1; }
.tabs .badge { margin-left: 4px; }

.att { display: flex; flex-direction: column; gap: 6px; min-width: 180px; }
.att img, .att video { max-width: min(260px, 70vw); max-height: 320px; border-radius: 10px; background: #000; }
.att audio { width: min(260px, 70vw); }
.att-info { display: flex; flex-direction: column; overflow-wrap: anywhere; }
.att-info small { opacity: .7; }
.att button { align-self: flex-start; padding: 6px 12px; font-size: 14px; }
.msg.uploading { min-width: 220px; }
.bar { height: 6px; background: rgba(255,255,255,.25); border-radius: 3px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: #fff; transition: width .2s; }
.chat-form button.ghost { padding: 8px; font-size: 18px; border: 0; }

.call .grid { position: absolute; inset: 0; display: none; gap: 4px; padding: 4px; }
.call.has-video .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(45%, 1fr)); grid-auto-rows: 1fr; }
.call.has-video .grid[data-n="1"] { grid-template-columns: 1fr; }
.tile { position: relative; background: #000; border-radius: 12px; overflow: hidden; min-height: 0; }
.tile video { width: 100%; height: 100%; object-fit: cover; }
.tile-name { position: absolute; left: 8px; bottom: 6px; background: rgba(0,0,0,.55); padding: 2px 8px; border-radius: 8px; font-size: 13px; }
.self { position: absolute; right: 12px; top: calc(12px + var(--safe-top)); width: 96px; height: 128px; object-fit: cover; border-radius: 12px; border: 2px solid rgba(255,255,255,.4); background: #000; z-index: 2; transform: scaleX(-1); }
.call.has-video .call-body { position: absolute; left: 0; right: 0; top: 0; z-index: 1; padding: calc(10px + var(--safe-top)) 12px; flex-direction: row; justify-content: flex-start; gap: 10px; background: linear-gradient(rgba(0,0,0,.6), transparent); pointer-events: none; }
.call.has-video .avatar, .call.has-video .people { display: none; }
.call.has-video h2, .call.has-video p { margin: 0; font-size: 15px; }
.call .call-actions { position: relative; z-index: 3; flex-wrap: wrap; justify-content: center; gap: 16px; }
.call.has-video .call-actions { background: linear-gradient(transparent, rgba(0,0,0,.7)); width: 100%; justify-content: center; }
.call.pstn #call-cam, .call.pstn #call-flip { display: none; }
.round.off { opacity: .7; }

.conf { z-index: 25; }
.conf header { z-index: 3; }
.conf-grid { flex: 1; overflow: hidden; display: grid; gap: 6px; padding: 6px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); grid-auto-rows: minmax(110px, 1fr); }
.ctile { position: relative; background: #101a2e; border: 2px solid transparent; border-radius: 12px; overflow: hidden; display: grid; place-items: center; min-height: 0; }
.ctile.speaking { border-color: var(--good); }
.ctile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ctile .ini { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 22px; }
.ctile .nm { position: absolute; left: 6px; bottom: 5px; background: rgba(0,0,0,.6); padding: 1px 7px; border-radius: 8px; font-size: 12px; }
.ctile .mic { position: absolute; right: 6px; bottom: 5px; font-size: 14px; }
.conf-pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 2px; }
.conf .call-actions { padding: 8px 16px calc(14px + var(--safe-bottom)); gap: 12px; flex-wrap: wrap; justify-content: center; }
.conf .round { width: 64px; height: 64px; font-size: 22px; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 65%; background: var(--panel); border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; display: flex; flex-direction: column; z-index: 5; }
.sheet .list { overflow-y: auto; padding: 8px 12px 16px; }

.rec-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; }
.rec-video { width: min(360px, 90vw); border-radius: 14px; background: #000; transform: scaleX(-1); }
.rec-body audio { width: min(360px, 90vw); }
.rec-time { font-size: 40px; font-variant-numeric: tabular-nums; }
.rec .call-actions, #rec .call-actions { justify-content: center; }

.offer { position: fixed; left: 12px; right: 12px; bottom: calc(16px + var(--safe-bottom)); background: var(--elev); box-shadow: var(--shadow-lg); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; display: flex; gap: 10px; align-items: center; z-index: 60; }
.offer span { flex: 1; }
.list audio { width: 100%; margin-top: 6px; }
.list li.col { flex-direction: column; align-items: stretch; }
.list li.unheard .who { font-weight: 700; }

/* ---------- attachments, voicemail, conference tiles ---------- */
.att-img { display: block; max-width: min(260px, 70vw); max-height: 260px; border-radius: 10px; margin-bottom: 4px; background: #000; }
.att-video { display: block; max-width: min(280px, 70vw); border-radius: 10px; margin-bottom: 4px; background: #000; }
.att-audio { display: block; width: min(260px, 70vw); margin-bottom: 4px; }
.att-play { display: inline-flex; align-items: center; gap: 6px; background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; color: inherit; margin-bottom: 4px; cursor: pointer; }
.att-card { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; margin-bottom: 4px; }
.att-name { word-break: break-all; font-weight: 600; }
.msg.uploading progress { width: 100%; display: block; margin: 6px 0; }
#vm-list li.unheard .who { font-weight: 700; }
.tile-initial { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 40px; background: #1b2a47; z-index: 0; }
.conf-grid .tile video { position: relative; z-index: 1; }
.conf-grid .tile:not(.has-video) video { visibility: hidden; }
.conf-grid .tile.has-video .tile-initial { display: none; }
.tile-name { z-index: 2; }

/* ---------- private groups, admin, history, captions ---------- */
.tier { text-transform: uppercase; letter-spacing: .05em; font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); margin-left: 6px; }
.tier.secured { color: var(--t-secured); } .tier.secret { color: var(--t-secret); } .tier.confidential { color: var(--t-conf); }
.grow { flex: 1; text-align: center; }
.banner.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-text); display: block; }
.banner.bad { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad-text); display: block; }
.modal { align-items: center; justify-content: center; background: var(--scrim); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); z-index: 40; }
.modal .card { width: min(380px, 92vw); display: flex; flex-direction: column; gap: 10px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.num { width: 90px; margin-left: 8px; }
.list.pick { max-height: 220px; overflow-y: auto; }
.danger-text { color: var(--bad-text); }
.pad { padding: 8px 14px 0; }
.msg.lockedmsg { opacity: .7; font-style: italic; }
.msg .sender { display: block; font-size: 12px; font-weight: 700; opacity: .8; margin-bottom: 2px; }
.msg.bad { border-color: var(--bad-line); }
.confidential-view .msg { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.confidential-view.blurred .chat-log, .confidential-view.blurred .chat-form { filter: blur(18px); pointer-events: none; }
#hist-list li.missed .who { color: var(--bad-text); }
.caps { position: absolute; left: 0; right: 0; bottom: 118px; display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; z-index: 6; padding: 0 12px; }
.cap { background: rgba(0,0,0,.72); color: #fff; padding: 6px 12px; border-radius: 10px; max-width: min(640px, 94vw); font-size: 16px; line-height: 1.3; }
.cap b { color: #9bd; margin-right: 6px; }
.tile.screen { grid-column: 1 / -1; }
.tile.screen video { object-fit: contain; background: #000; }
.conf-grid .tile.screen { grid-column: 1 / -1; grid-row: span 2; }

.call.pstn #call-share, .call.pstn #call-cc { display: none; }
.hist-ico { width: 28px; text-align: center; font-size: 18px; }
.list li.col { flex-direction: column; align-items: stretch; gap: 6px; }
.list li.off { opacity: .55; }
.row.wrap { flex-wrap: wrap; gap: 6px; }
code.safety { display: block; font-size: 13px; line-height: 1.5; word-spacing: 6px; background: var(--panel2); padding: 6px 8px; border-radius: 8px; user-select: all; }
.sheet > header { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; }
.list li.tap { cursor: pointer; }
.sheet { overflow-y: auto; }
.sheet > header { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; }
.box > h3 + .small-note { margin-top: -4px; }
.screenbox { position: relative; background: #000; border-radius: 12px; margin: 8px; flex: 1 1 45%; min-height: 160px; }
.screenbox video { width: 100%; height: 100%; object-fit: contain; }

.lockline { color: #4ade80; font-size: 13px; margin: 2px 0 6px; }
.lockline.warn { color: #fbbf24; }

/* Logo in the header, settings and call screens */
.hdr-id { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hdr-logo { width: 28px; height: 28px; object-fit: contain; flex: none; }
.brandmark { position: absolute; top: calc(14px + var(--safe-top, 0px)); left: 50%; transform: translateX(-50%); width: 40px; height: 40px;
  object-fit: contain; opacity: .85; pointer-events: none; z-index: 2; }
.call.has-video .brandmark { display: none; }
img { -webkit-user-drag: none; user-select: none; }
.call:not(.has-video) .call-body { padding-top: calc(72px + var(--safe-top, 0px)); }
.brandmark { width: 36px; height: 36px; }
