/* Shared look of the phone pages - the same Google-Blue Material palette as the desktop app (omnitrace_app/theme.py) and
   the native screens of the Android app (UiKit.kt), with a dark variant that follows the phone's own setting. */
:root {
  --bg: #F8F9FA; --surface: #FFFFFF; --border: #DADCE0; --text: #202124; --muted: #5F6368;
  --primary: #1A73E8; --primary-press: #185ABC; --on-primary: #FFFFFF; --tint: #F1F6FE;
  --danger: #D93025; --danger-tint: #FCE8E6; --success: #188038; --success-tint: #E6F4EA;
  --warn: #B06000; --warn-tint: #FEF7E0;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17191D; --surface: #202328; --border: #34383F; --text: #E8EAED; --muted: #9AA0A6;
    --primary: #6AA6F8; --primary-press: #8AB8FA; --on-primary: #0B1A30; --tint: #26303F;
    --danger: #F28B82; --danger-tint: #3C2321; --success: #81C995; --success-tint: #1E3326;
    --warn: #FDD663; --warn-tint: #3A3220;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.4 Roboto, "Segoe UI", -apple-system, sans-serif; }
body { min-height: 100vh; }
.bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: var(--surface); border-bottom: 1px solid var(--border); }
.bar h1 { flex: 1; margin: 0; font-size: 18px; font-weight: 700; }
.back { border: 0; background: none; color: var(--primary); font-size: 22px; line-height: 1; padding: 4px 8px 4px 0; }
.pill { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 12px; background: var(--border); color: var(--muted); }
.pill.ok { background: var(--success-tint); color: var(--success); }
.pill.bad { background: var(--danger-tint); color: var(--danger); }
.wrap { max-width: 560px; margin: 0 auto; padding: 14px 14px 40px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin-top: 12px; }
.card h2 { margin: 0 0 8px; font-size: 15px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

.btn { display: inline-block; border: 0; border-radius: 10px; padding: 11px 18px; font: inherit; font-weight: 600;
  background: var(--primary); color: var(--on-primary); text-decoration: none; text-align: center; }
.btn:active { background: var(--primary-press); }
.btn.secondary { background: var(--surface); color: var(--primary); border: 1px solid var(--border); }
.btn.block { display: block; width: 100%; }
.btn:disabled { opacity: .5; }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; min-width: 0; }
.row > .btn { flex: 0 0 auto; }

label.field { display: block; margin-top: 12px; font-size: 13px; color: var(--muted); font-weight: 600; }
.field input, .field select, .field textarea, input.plain, select.plain { display: block; width: 100%; margin-top: 4px; padding: 11px 12px;
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.field input:focus, .field select:focus, input.plain:focus, select.plain:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
.field input:disabled, .field select:disabled { opacity: .6; }

.camera { position: relative; margin-top: 12px; border-radius: 20px; overflow: hidden; aspect-ratio: 4 / 3;
  background: linear-gradient(160deg, #1b2330, #0d1118); }
/* The video is invisible until its first real frame (box gets .live), so the web view's own grey "play" placeholder
   can never show; a styled panel (.cam-msg, created by shared.js) covers the box until then. */
.camera video { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .25s ease; background: transparent; }
.camera.live video { opacity: 1; }
.camera:not(.live) .frame { display: none; }
video::-webkit-media-controls, video::-webkit-media-controls-start-playback-button, video::-webkit-media-controls-overlay-play-button { display: none !important; -webkit-appearance: none; }
.cam-msg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 24px; text-align: center; color: #cfd6e0; font-size: 14px; }
.cam-msg.hidden { display: none; }
.cam-msg .cam-ico { width: 40px; height: 40px; color: #8ab4f8; }
.cam-msg .cam-btn { padding: 9px 18px; font-size: 14px; }
.cam-msg .spin { width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(255,255,255,.18); border-top-color: #8ab4f8; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.camera.live .frame::after { content: ''; position: absolute; left: 6px; right: 6px; top: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent); animation: sweep 2.2s ease-in-out infinite; }
@keyframes sweep { 0% { top: 4%; } 50% { top: 94%; } 100% { top: 4%; } }
.camera .frame { position: absolute; inset: 18%; pointer-events: none;
  background:
    linear-gradient(var(--primary), var(--primary)) top left / 26px 4px no-repeat,
    linear-gradient(var(--primary), var(--primary)) top left / 4px 26px no-repeat,
    linear-gradient(var(--primary), var(--primary)) top right / 26px 4px no-repeat,
    linear-gradient(var(--primary), var(--primary)) top right / 4px 26px no-repeat,
    linear-gradient(var(--primary), var(--primary)) bottom left / 26px 4px no-repeat,
    linear-gradient(var(--primary), var(--primary)) bottom left / 4px 26px no-repeat,
    linear-gradient(var(--primary), var(--primary)) bottom right / 26px 4px no-repeat,
    linear-gradient(var(--primary), var(--primary)) bottom right / 4px 26px no-repeat; }
.camera .off { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px;
  text-align: center; color: #cfd3d8; font-size: 14px; }

.status { margin-top: 12px; padding: 11px 14px; border-radius: 10px; background: var(--tint); color: var(--text); font-weight: 500; }
.status.ok { background: var(--success-tint); color: var(--success); }
.status.err { background: var(--danger-tint); color: var(--danger); }
.status.warn { background: var(--warn-tint); color: var(--warn); }

.chip { display: inline-block; padding: 3px 11px; border-radius: 12px; font-size: 12px; font-weight: 700;
  background: var(--tint); color: var(--primary); }
.chip.ok { background: var(--success-tint); color: var(--success); }
.chip.warn { background: var(--warn-tint); color: var(--warn); }
.chip.bad { background: var(--danger-tint); color: var(--danger); }
.result .head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.result .item { font-size: 20px; font-weight: 700; }
.result .serial { font-size: 13px; color: var(--muted); }
.rows { margin-top: 8px; }
.rows .r { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-top: 1px solid var(--border); }
.rows .r span:first-child { color: var(--muted); }
.rows .r span:last-child { font-weight: 600; text-align: right; }
.rows .r .empty { color: var(--muted); font-weight: 400; }
.bigcount { display: flex; align-items: baseline; justify-content: space-between; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--border); }
.bigcount b { font-size: 26px; }
.progress { height: 8px; border-radius: 4px; background: var(--border); overflow: hidden; margin-top: 8px; }
.progress > i { display: block; height: 100%; background: var(--primary); }

.menu { display: block; margin-top: 12px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; color: var(--text); text-decoration: none; }
.menu:active { background: var(--tint); border-color: var(--primary); }
.menu b { display: block; font-size: 17px; }
.menu span { color: var(--muted); font-size: 13px; }

.batch { display: flex; align-items: center; gap: 12px; }
.batch .info { flex: 1; min-width: 0; }
.batch .name { font-weight: 700; font-size: 16px; }
.log { margin-top: 12px; font-size: 13px; color: var(--muted); }
.log div { padding: 6px 0; border-top: 1px solid var(--border); }
.log .ok { color: var(--success); } .log .err { color: var(--danger); }
/* ---- packing: order picker + checklist ---- */
.order { display: block; width: 100%; text-align: left; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin-top: 12px; }
.order:active { background: var(--tint); border-color: var(--primary); }
.order .top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.order .who { font-weight: 700; font-size: 16px; }
.order .meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.checklist { margin-top: 4px; }
.cl-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border); transition: background .6s ease; }
.cl-row:first-child { border-top: 0; }
.cl-row .tick { flex: 0 0 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center;
  font-size: 13px; line-height: 1; color: transparent; }
.cl-row .name { flex: 1; min-width: 0; font-weight: 600; }
.cl-row .qty { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); }
.cl-row.partial .qty { color: var(--primary); }
.cl-row.done .tick { background: var(--success); border-color: var(--success); color: #fff; }
.cl-row.done .qty, .cl-row.done .name { color: var(--success); }
.cl-row.flash { background: var(--success-tint); }
.linkbtn { border: 0; background: none; color: var(--primary); font: inherit; font-weight: 600; padding: 6px 0; }
.linkbtn:disabled { opacity: .4; }

/* ---- the packing pop-up: translucent card over the page, faint until it is touched ---- */
body.has-pop .wrap { padding-bottom: 260px; }
.pop { position: fixed; z-index: 30; left: 12px; right: 12px; max-width: 536px; margin: 0 auto;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px)); padding: 14px 16px 12px; border-radius: 20px; color: #fff;
  background: rgba(24, 28, 34, .5); border: 1px solid rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 10px 34px rgba(0, 0, 0, .22);
  opacity: 1; touch-action: manipulation;
  /* slowly settles back to faint after being touched (the .touched rule below overrides this to be quick) */
  transition: background-color 1.1s ease, opacity .5s ease, transform .35s ease, box-shadow 1.1s ease; }
.pop.hidden { display: none !important; }
.pop.leaving { opacity: 0; transform: translateY(10px); pointer-events: none; }
.pop.entering { animation: popin .28s ease; }
@keyframes popin { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.pop.touched { background: rgba(18, 21, 26, .9); box-shadow: 0 12px 38px rgba(0, 0, 0, .35); transition-duration: .2s; }
.pop .pop-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; }
.pop .pop-title { font-weight: 800; font-size: 16px; letter-spacing: .01em; }
.pop .pop-tag { font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 10px; background: rgba(129, 201, 149, .25); color: #A8E6BA; margin-left: 8px; }
.pop .pop-tag.undone { background: rgba(253, 214, 99, .22); color: #FDD663; }
.pop .pop-x { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; border: 0; font-size: 15px; line-height: 1;
  color: #fff; background: rgba(255, 255, 255, .18); opacity: 0; pointer-events: none; transition: opacity 1.1s ease; }
.pop.touched .pop-x { opacity: 1; pointer-events: auto; transition-duration: .2s; }
.pop .pop-rows { margin-top: 6px; }
.pop .pop-rows .r { display: flex; justify-content: space-between; gap: 14px; padding: 5px 0; font-size: 14px; }
.pop .pop-rows .r span:first-child { color: rgba(255, 255, 255, .72); }
.pop .pop-rows .r span:last-child { font-weight: 700; text-align: right; }
.pop .pop-actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .18); }
.pop .pop-nav { flex: 0 0 auto; width: 38px; height: 36px; border-radius: 10px; border: 0; font-size: 20px; line-height: 1;
  color: #fff; background: rgba(255, 255, 255, .16); }
.pop .pop-nav:disabled { opacity: .3; }
.pop .pop-pos { flex: 0 0 auto; min-width: 54px; text-align: center; font-size: 13px; color: rgba(255, 255, 255, .8); font-variant-numeric: tabular-nums; }
.pop .pop-undo { flex: 1; height: 36px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .35); font: inherit; font-weight: 700;
  color: #fff; background: rgba(217, 48, 37, .45); }
.pop .pop-undo:disabled { opacity: .45; background: rgba(255, 255, 255, .1); }

/* ---- bottom sheet (Mark Broken) ---- */
.sheet-back { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .5); display: flex; align-items: flex-end; justify-content: center;
  animation: fade .2s ease; }
.sheet { width: 100%; max-width: 560px; max-height: 94vh; overflow-y: auto; background: var(--surface); color: var(--text);
  border-radius: 22px 22px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)); animation: rise .25s ease; }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--border); margin: 0 auto 12px; }
.sheet h2 { margin: 0; font-size: 19px; }
.photo-box { position: relative; margin-top: 12px; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: var(--tint);
  border: 1.5px dashed var(--border); display: flex; align-items: center; justify-content: center; color: var(--muted); text-align: center; padding: 12px; }
.photo-box.has { border-style: solid; padding: 0; background: #000; }
.photo-box img, .photo-box video { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-box video { opacity: 0; transition: opacity .25s ease; background: transparent; }
.photo-box.live video { opacity: 1; }
.photo-box .shutter { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); width: 62px; height: 62px; border-radius: 50%;
  border: 4px solid #fff; background: rgba(255, 255, 255, .25); }
.photo-box .shutter:active { background: rgba(255, 255, 255, .6); }
.btn.danger { background: var(--danger); color: #fff; }
textarea.plain { display: block; width: 100%; margin-top: 4px; padding: 11px 12px; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; resize: vertical; min-height: 76px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---- the team pages: Messenger, Notifications, and the administrator's Activity and Permission Code ---- */
.av { position: relative; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 19px; }
.av.small { flex-basis: 34px; width: 34px; height: 34px; font-size: 15px; }
.av.group { background: var(--primary); }
.av.pic { background: none; }
.av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.av.group svg { width: 60%; height: 60%; }
.av .on { position: absolute; right: -1px; bottom: -1px; width: 13px; height: 13px; border-radius: 50%; background: #31A24C; border: 2px solid var(--surface); }
.list { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; margin-top: 12px; }
.item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border: 0; border-top: 1px solid var(--border); background: none;
  color: var(--text); font: inherit; text-align: left; text-decoration: none; }
.item:first-child { border-top: 0; }
.item:active { background: var(--tint); }
.item .body { flex: 1; min-width: 0; }
.item .top { display: flex; align-items: baseline; gap: 8px; }
.item .name { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .time { flex: 0 0 auto; font-size: 12px; color: var(--muted); }
.item .sub { display: flex; align-items: center; gap: 8px; margin-top: 1px; }
.item .text { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .text.wrap { white-space: normal; overflow-wrap: anywhere; }
.item.new .name { font-weight: 800; }
.item.new .text { color: var(--text); font-weight: 600; }
.item.new .time { color: var(--primary); font-weight: 700; }
.count { flex: 0 0 auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--primary); color: var(--on-primary);
  font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }
.dot { flex: 0 0 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.search { display: block; width: 100%; height: 42px; padding: 0 16px; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 21px; }
.search:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
.section { margin: 20px 4px 0; font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.empty { margin-top: 40px; text-align: center; color: var(--muted); }
.chips { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: 0 0 auto; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 600;
  padding: 7px 14px; border-radius: 18px; }
.chips button.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.kind { display: inline-block; padding: 1px 8px; border-radius: 9px; font-size: 11px; font-weight: 700; background: var(--tint); color: var(--primary); }
.kind.removal { background: var(--danger-tint); color: var(--danger); }
.kind.add, .kind.signin { background: var(--success-tint); color: var(--success); }
.kind.pdf_import, .kind.action { background: var(--warn-tint); color: var(--warn); }
.denied svg { width: 46px; height: 46px; color: var(--muted); margin: 8px auto 2px; display: block; }
.denied h2 { font-size: 17px; margin: 8px 0 6px; }
.denied .btn { margin-top: 14px; }
.code-big { margin: 12px 0 6px; padding: 16px 8px; border-radius: 14px; background: var(--tint); color: var(--primary); text-align: center;
  font: 800 30px/1.1 Consolas, "Roboto Mono", monospace; letter-spacing: 3px; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
.credit { margin: 26px 0 6px; text-align: center; font-size: 12px; color: var(--muted); }

/* a conversation: the page is the chat, the bar on top and the box you write in at the bottom */
body.chatting { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
body.chatting .bar { position: static; flex: 0 0 auto; }
.bar .who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.bar .who .names { min-width: 0; line-height: 1.2; }
.bar .who b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .who span.st { font-size: 12px; color: var(--muted); }
.thread { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 10px 12px 6px; display: flex; flex-direction: column; gap: 4px; -webkit-overflow-scrolling: touch; }
.thread .spacer { flex: 1 1 auto; }
.msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 100%; }
.msg.mine { align-items: flex-end; }
.bubble { max-width: 78%; padding: 8px 12px; border-radius: 18px; background: var(--border); color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
@media (prefers-color-scheme: dark) { .bubble { background: #303339; } }
.msg.mine .bubble { background: #1A73E8; color: #fff; }
.msg .from { font-size: 11px; font-weight: 600; color: var(--muted); margin: 6px 0 1px 8px; }
.msg img.pic { display: block; max-width: 70%; max-height: 260px; border-radius: 16px; background: var(--border); }
.msg .file { display: flex; align-items: center; gap: 10px; max-width: 78%; padding: 10px 14px; border: 0; border-radius: 16px; background: var(--border);
  color: var(--text); font: inherit; text-align: left; }
@media (prefers-color-scheme: dark) { .msg .file { background: #303339; } }
.msg .file svg { flex: 0 0 20px; height: 20px; color: var(--primary); }
.msg .file b { display: block; font-size: 14px; overflow-wrap: anywhere; }
.msg .file span { font-size: 12px; color: var(--muted); }
.msg * + .bubble, .msg * + .file { margin-top: 3px; }
.stamp { align-self: center; margin: 10px 0 4px; font-size: 11px; color: var(--muted); }
.seen { align-self: flex-end; font-size: 11px; color: var(--muted); margin: 1px 6px 0; }
.earlier { align-self: center; }
.composer { flex: 0 0 auto; background: var(--surface); border-top: 1px solid var(--border); padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)); }
.composer .line { display: flex; align-items: flex-end; gap: 8px; }
.composer textarea { flex: 1; min-width: 0; min-height: 40px; max-height: 120px; padding: 9px 14px; border: 1px solid var(--border); border-radius: 20px;
  font: inherit; color: var(--text); background: var(--bg); resize: none; }
.composer textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
.round { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; border: 0; display: flex; align-items: center; justify-content: center;
  background: none; color: var(--primary); }
.round svg { width: 22px; height: 22px; }
.round.send { background: var(--primary); color: var(--on-primary); }
.round:disabled { opacity: .45; }
.staged { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding: 6px 6px 6px 12px; border-radius: 14px; background: var(--tint); font-size: 13px; font-weight: 600; }
.staged span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.staged img { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; }
.staged button { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: none; color: var(--muted); font-size: 16px; }
/* Messenger's extras: what a message answers, its reactions, the little "more" button, what is pinned, the emoji panel, the action sheet */
.msg .meta { font-size: 11px; color: var(--muted); margin: 4px 8px 1px; }
.msg .quote { max-width: 78%; margin-top: 3px; padding: 5px 10px; border-left: 3px solid var(--primary); border-radius: 8px; background: var(--tint); font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg .quote b { display: block; color: var(--primary); font-size: 11px; }
.msg .line2 { display: flex; align-items: center; gap: 4px; max-width: 100%; }
.msg.mine .line2 { flex-direction: row-reverse; }
.msg .line2 .bubble, .msg .line2 img.pic, .msg .line2 .file { max-width: calc(78vw - 40px); }
.msg .more { flex: 0 0 26px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 18px; line-height: 1; padding: 0; }
.msg .reacts { margin-top: 2px; padding: 2px 9px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; }
.msg .reacts.mine { border-color: var(--primary); background: var(--tint); }
.pinbar { display: block; width: 100%; flex: 0 0 auto; padding: 7px 14px; border: 0; border-bottom: 1px solid var(--border); background: var(--tint); color: var(--text);
  font: inherit; font-size: 12px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emojis { display: flex; flex-wrap: wrap; gap: 2px; max-height: 168px; overflow-y: auto; margin-bottom: 8px; padding: 6px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); }
.emojis .head { flex: 0 0 100%; font-size: 11px; font-weight: 700; color: var(--muted); padding: 2px 4px; }
.emojis button { flex: 0 0 38px; width: 38px; height: 38px; border: 0; border-radius: 8px; background: none; font-size: 22px; padding: 0; }
.composer .round.emoji { font-size: 20px; }
.msheet { position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .4); display: flex; align-items: flex-end; justify-content: center; }
.msheet .in { width: 100%; max-width: 560px; max-height: 80vh; overflow-y: auto; background: var(--surface); border-radius: 18px 18px 0 0; padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px)); }
.msheet .quick { display: flex; justify-content: space-between; padding: 4px 6px 10px; }
.msheet .quick button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--tint); font-size: 22px; padding: 0; }
.msheet .act { display: block; width: 100%; padding: 13px 12px; border: 0; border-top: 1px solid var(--border); background: none; color: var(--text); font: inherit; font-size: 15px; text-align: left; }
.msheet .act.cancel { color: var(--muted); text-align: center; }
.msheet .title { padding: 6px 12px 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
/* a conversation's own screen: the picture, Profile / Nickname / Search side by side, what was found, and the pictures and videos sent */
.msg .unsent { padding: 6px 12px; border: 1px solid var(--border); border-radius: 16px; font-size: 13px; font-style: italic; color: var(--muted); }
.bar .menu3 { flex: 0 0 40px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: var(--text); font-size: 22px; line-height: 1; }
.info { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: flex; flex-direction: column; }
.info .scroll { flex: 1 1 auto; overflow-y: auto; padding: 18px 14px 24px; -webkit-overflow-scrolling: touch; }
.info .top { display: flex; flex-direction: column; align-items: center; text-align: center; }
.info .top .av { flex: 0 0 92px; width: 92px; height: 92px; font-size: 38px; }
.info .top h2 { margin: 10px 0 2px; font-size: 20px; }
.info .trio { display: flex; justify-content: center; gap: 10px; margin: 16px 0 6px; }
.info .trio button { flex: 1 1 0; max-width: 120px; padding: 10px 4px 8px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text);
  font: inherit; font-size: 13px; font-weight: 600; }
.info .trio button b { display: block; font-size: 20px; font-weight: 400; margin-bottom: 2px; }
.info .trio button.on { border-color: var(--primary); color: var(--primary); }
.info .panel { margin-top: 10px; }
.info .panel .line { display: flex; gap: 8px; }
.info .panel input { flex: 1; min-width: 0; height: 42px; padding: 0 14px; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 21px; }
.info .panel .hit { display: block; width: 100%; padding: 10px 12px; border: 0; border-top: 1px solid var(--border); background: none; color: var(--text); font: inherit; text-align: left; }
.info .panel .hit span { display: block; font-size: 11px; color: var(--muted); }
.mediagrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 8px; }
.mediagrid img, .mediagrid button { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border: 0; border-radius: 8px; background: var(--border); color: var(--text); font: inherit; font-size: 11px;
  overflow: hidden; padding: 4px; }
.mediagrid button b { display: block; font-size: 26px; }
.item .name .mk { font-weight: 400; font-size: 12px; }
.msheet .act.danger { color: #D93025; }
.msheet .pickname { display: block; width: calc(100% - 24px); margin: 0 12px 8px; height: 42px; padding: 0 14px; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 21px; }
.msheet .act.pick::before { content: "\25CB  "; color: var(--muted); }
.msheet .act.pick.on::before { content: "\25CF  "; color: var(--primary); }
.archrow { display: block; width: 100%; margin-top: 12px; padding: 10px; border: 0; background: none; color: var(--primary); font: inherit; font-weight: 600; }
body.overlay #photoBtn, body.overlay #fileBtn { display: none; }
.viewer { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .92); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; }
.viewer img { max-width: 100%; max-height: calc(100% - 70px); border-radius: 8px; }
.viewer .row { margin-top: 14px; width: 100%; max-width: 360px; }
.viewer .btn.secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.viewer .note { color: #fff; font-size: 13px; margin-top: 10px; text-align: center; }

.hidden { display: none !important; }
