/* ── App shell ───────────────────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 2px;
  padding: 0 12px 12px; background: var(--bg-side); border-right: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--text); text-decoration: none; }
.logo { width: 20px; height: 20px; flex-shrink: 0; display: block; color: var(--text); }
.brand-sub { color: var(--muted); font-weight: 500; margin-left: -2px; }
.sidebar-brand { height: 49px; margin: 0 -12px 10px; padding: 0 20px; border-bottom: 1px solid var(--line); }

.side-label { padding: 6px 10px 4px; font-size: 12px; font-weight: 500; color: var(--faint); letter-spacing: .01em; }
.side-label-row { display: flex; align-items: center; justify-content: space-between; }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar-section { margin-top: 10px; min-height: 0; }   /* Gram: labelled groups, no dividers */
.sidebar-footer { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }

.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px;
  border: 1px solid transparent; border-radius: var(--r); background: transparent;
  color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; text-align: left;
  transition: background-color .12s var(--ease), color .12s var(--ease);
}
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item.active { background: var(--hover); color: var(--text); }
.nav-item.active > svg { color: var(--text); }
.nav-item svg { flex-shrink: 0; }

.recent-list { display: flex; flex-direction: column; gap: 1px; }
.recent-item {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 5px 10px;
  border: none; border-radius: var(--r); background: transparent; color: var(--muted);
  font-size: 13px; text-align: left; cursor: pointer;
}
.recent-item:hover { background: var(--hover); color: var(--text); }
.recent-item .rq { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-item .rm { flex-shrink: 0; font-size: 11px; color: var(--faint); }
.recent-empty { padding: 4px 10px; font-size: 12px; color: var(--faint); }

.link-btn { border: none; background: none; padding: 0; color: var(--muted); font-size: 12px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.link-btn:hover { color: var(--text); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 49px; padding: 0 24px;
  background: var(--bar-bg); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-title { font-size: 16px; font-weight: 500; }
.topbar-brand { display: none; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.mobile-only { display: none !important; }

.page { width: 100%; max-width: 780px; margin: 0 auto; padding: 24px 24px 64px; }

/* ── Cards and buttons ───────────────────────────────────────────────────── */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r3); box-shadow: var(--sh-2);
  padding: 16px 18px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 0 14px; border-radius: var(--r); cursor: pointer;
  border: 1px solid var(--line-2); background: var(--input-bg); color: var(--text);
  font-size: 14px; font-weight: 500; box-shadow: var(--sh-1);
  transition: background-color .12s var(--ease), border-color .12s var(--ease);
}
.btn:hover { background: var(--input-bg-hi); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-primary { font-weight: 500; }
.btn-primary:active { background: #c4c4c4; }
.icon-btn {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  border: 1px solid var(--line-2); border-radius: var(--r); background: var(--input-bg); color: var(--muted);
  cursor: pointer; text-decoration: none; box-shadow: var(--sh-1);
}
.icon-btn:hover { color: var(--text); background: var(--input-bg-hi); }

/* ── Search card ─────────────────────────────────────────────────────────── */
.search { margin-bottom: 16px; padding: 14px 16px; }
.search-bar {
  display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 5px 0 14px;
  background: var(--input-bg); border: 1px solid var(--line-2); border-radius: var(--r2);
  transition: border-color .12s var(--ease), box-shadow .12s var(--ease);
}
.search-bar:focus-within { border-color: var(--ring); box-shadow: 0 0 0 3px var(--ring-50); background: var(--input-bg-hi); }
.search-icon { width: 17px; height: 17px; color: var(--faint); flex-shrink: 0; }
#q { flex: 1; min-width: 0; height: 100%; background: transparent; border: none; outline: none; color: var(--text); font-size: 15px; }
#q::placeholder { color: var(--faint); }
#q::-webkit-search-cancel-button { display: none; }
.clear-btn {
  width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  border: none; border-radius: 50%; background: transparent; color: var(--faint); cursor: pointer;
}
.clear-btn:hover { background: var(--hover); color: var(--text); }
.search-btn { height: 36px; padding: 0 16px; border: 1px solid var(--primary); border-radius: var(--r); font-size: 14px; font-weight: 600; cursor: pointer; flex-shrink: 0; }

.search-options { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.filter-toggle {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px;
  border: 1px solid var(--line-2); border-radius: var(--r); background: var(--input-bg); color: var(--muted);
  font-size: 13px; font-weight: 500; cursor: pointer;
}
.filter-toggle:hover, .filter-toggle[aria-expanded="true"] { color: var(--text); background: var(--input-bg-hi); }
.filter-toggle .count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: var(--primary-ink); font-size: 11px; font-weight: 600;
}

.exact { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; user-select: none; }
.exact input { position: absolute; opacity: 0; pointer-events: none; }
.switch { width: 32px; height: 18px; border-radius: 18px; background: var(--panel-3); border: 1px solid var(--line-2); position: relative; transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.exact input:checked + .switch { background: var(--primary); border-color: var(--primary); }
.exact input:checked + .switch::after { transform: translateX(14px); background: var(--primary-ink); }
.exact input:focus-visible + .switch { box-shadow: 0 0 0 3px var(--ring-50); }

.filters {
  display: grid; grid-template-columns: 1fr 1fr 1.7fr; gap: 10px 10px;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line);
}
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field-label { font-size: 12px; font-weight: 500; color: var(--muted); padding-left: 1px; }
.field input {
  height: 36px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--input-bg); color: var(--text); font-size: 14px; outline: none;
}
.field input::placeholder { color: var(--faint); }
.field input:focus { border-color: var(--ring); box-shadow: 0 0 0 3px var(--ring-50); }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--input-bg); border: 1px solid var(--line-2); border-radius: var(--r); width: fit-content; }
.seg button { height: 28px; padding: 0 12px; border: none; border-radius: 6px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--panel-3); color: var(--text); box-shadow: var(--sh-1); }
.filters-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.filters-foot .link-btn { margin-left: auto; }
.filters-hint { font-size: 12px; color: var(--faint); }
.filters-hint b { color: var(--muted); font-weight: 500; }
.filters-foot .link-btn { flex-shrink: 0; }

/* ── Status line, pages, footer ──────────────────────────────────────────── */
.results-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; font-size: 13px; color: var(--faint); padding: 0 2px 12px; min-height: 30px; }
.results-meta b { color: var(--text); font-weight: 600; }
.rm-left { color: var(--muted); }
.rm-right { display: inline-flex; align-items: center; color: var(--faint); font-variant-numeric: tabular-nums; }
.rm-right.warn, .warn-text, .rm-wait { color: var(--muted); }
.rm-right.warn .rm-text::before, .warn-text::before, .rm-wait::before {
  content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--warn); vertical-align: 1px;
}
.rm-left .inline-spin { margin-right: 8px; }
.rm-bar { flex-basis: 100%; height: 2px; border-radius: 2px; background: var(--panel-3); overflow: hidden; }
.rm-bar span { display: block; height: 100%; width: 2%; border-radius: 2px; background: var(--primary); transition: width .5s ease; }
.rm-bar.held span { background: var(--faint); }
.muted { color: var(--faint); }
.inline-spin {
  display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px;
  border-radius: 50%; border: 2px solid var(--panel-3); border-top-color: var(--accent-text);
  animation: spin .7s linear infinite;
}

#pager-top:not(:empty) { display: flex; justify-content: center; margin: 0 0 14px; }
.pager {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px; max-width: 100%;
  background: var(--input-bg); border: 1px solid var(--line-2); border-radius: var(--r);
}
.pg {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  min-width: 34px; height: 32px; padding: 0 8px; border: none; border-radius: 6px; cursor: pointer;
  background: transparent; color: var(--muted);
  font: inherit; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; transition: background-color .12s, color .12s;
}
.pg:hover:not(:disabled) { background: var(--input-bg-hi); color: var(--text); }
.pg.on { background: var(--primary); color: var(--primary-ink); font-weight: 600; cursor: default; }
.pg:disabled { opacity: .3; cursor: default; }
.pg svg { width: 16px; height: 16px; }
.pg .inline-spin { margin: 0; }
.pg.pg-busy { opacity: 1; }
.pg-step { color: var(--text); }
.pg-of { padding: 0 10px; font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pg-of b { color: var(--text); font-weight: 600; }
@media (max-width: 420px) { .pg-far { display: none; } .pg { min-width: 32px; padding: 0 6px; } }
.foot-pager { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pg-caption { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }

.results-foot { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 0 8px; font-size: 13px; color: var(--muted); }
.results-foot .foot-msg:empty, .results-foot .foot-pager:empty { display: none; }
.foot-msg { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.foot-loading { display: flex; align-items: center; justify-content: center; }
.foot-error { color: var(--muted); text-align: center; }

/* ── Welcome and empty states ────────────────────────────────────────────── */
.state { text-align: center; padding: 44px 16px; animation: fade-in .25s ease; }
.state h3 { font-size: 15px; font-weight: 600; color: var(--text); }
.state p { margin: 6px auto 0; font-size: 14px; color: var(--muted); max-width: 440px; }
.state.notice h3 { color: var(--warn); }
.state .btn { margin-top: 16px; }
.examples { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.example {
  border: 1px solid var(--line-2); background: var(--input-bg); color: var(--muted);
  font-size: 13px; padding: 6px 12px; border-radius: var(--r); cursor: pointer;
}
.example:hover { background: var(--input-bg-hi); color: var(--text); }

.welcome { display: flex; flex-direction: column; gap: 16px; animation: fade-in .2s ease; }
.welcome-title { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.welcome-sub { margin-top: 4px; color: var(--muted); font-size: 14px; }
.tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tip { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r3); padding: 14px 16px; }
.tip-ic { width: 28px; height: 28px; margin-bottom: 10px; border-radius: var(--r); display: flex; align-items: center; justify-content: center;
  background: var(--input-bg-hi); color: var(--muted); }
.tip-ic svg { width: 15px; height: 15px; }
.tip-ic .live-dot { margin: 0; }
.tip b { display: block; font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.tip p { margin: 0; font-size: 13px; color: var(--muted); }
.section-label { font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 8px; }
.welcome .recent-list { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r3); padding: 4px; }

/* ── Result cards ────────────────────────────────────────────────────────── */
#results { display: flex; flex-direction: column; gap: 10px; }
#results .card { padding: 14px 16px; animation: rise .18s ease both; transition: border-color .12s; }
#results .card:hover { border-color: var(--line-2); }

.card-head { display: flex; align-items: center; gap: 11px; }
.avatar {
  position: relative; width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--panel-3); color: var(--muted); display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; overflow: hidden;
}
.avatar > span { pointer-events: none; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.clickable { cursor: pointer; }

.who { flex: 1; min-width: 0; }
.who-line { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.name.clickable:hover { text-decoration: underline; text-underline-offset: 2px; }
.handle { font-size: 13px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.where { display: flex; align-items: center; gap: 6px; margin-top: 1px; font-size: 13px; color: var(--faint); min-width: 0; }
.where-name { min-width: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { flex-shrink: 0; color: var(--faint); }
.where-name[data-source] { cursor: pointer; }
.where-name[data-source]:hover { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.kind { flex-shrink: 0; color: var(--faint); white-space: nowrap; }
.time { flex-shrink: 0; color: var(--faint); white-space: nowrap; text-decoration: none; }
a.time:hover { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }

.msg { margin-top: 10px; font-size: 14px; line-height: 1.6; color: var(--text); word-break: break-word; white-space: pre-wrap; }
.msg.empty-msg { color: var(--faint); font-style: italic; font-size: 13px; }
.msg.clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 8; line-clamp: 8; overflow: hidden; }
.show-more { margin-top: 6px; border: none; background: none; padding: 0; color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer; }
.show-more:hover { color: var(--text); }
/* A search word in a result: a faint grey wash, the text keeps its own colour */
mark { background: rgba(255, 255, 255, .13); color: inherit; border-radius: 3px; padding: 0 1px; }
.msg-link { color: var(--link); text-decoration: none; word-break: break-all; }
.msg-link:hover { text-decoration: underline; }

.copyable { cursor: copy; }
.copyable:hover { color: var(--text); }

.media { margin-top: 10px; }
.media img { display: block; width: auto; height: auto; max-width: min(100%, 460px); max-height: 340px; border-radius: var(--r2); cursor: zoom-in; border: 1px solid var(--line); }
.media video { display: block; width: 100%; max-width: 460px; max-height: 340px; border-radius: var(--r2); background: #000; color-scheme: dark; }
.media video.round { border-radius: 50%; max-width: 240px; aspect-ratio: 1; object-fit: cover; }
.media audio { display: block; width: 100%; max-width: 420px; height: 40px; color-scheme: dark; }
.media .sticker { max-width: 160px; max-height: 160px; border: none; }
.media.pending .sk-media { height: 160px; max-width: 320px; }
.doc {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: var(--input-bg); border: 1px solid var(--line-2); border-radius: var(--r);
  font-size: 13px; color: var(--muted); text-decoration: none;
}
.doc:hover { background: var(--input-bg-hi); color: var(--text); }
.doc { max-width: 100%; }
.doc-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.doc-size { flex-shrink: 0; color: var(--faint); font-size: 12px; }
.media-cap { margin-top: 4px; font-size: 12px; color: var(--faint); display: flex; align-items: center; gap: 12px; }
.media-cap .cap-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-cap .dl { margin-left: auto; flex: none; color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.media-cap .dl:hover { color: var(--text); }
.media video.sticker { width: auto; max-width: 160px; max-height: 160px; background: transparent; }
.media-fail {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 12px;
  background: var(--input-bg); border: 1px solid var(--line-2); border-radius: var(--r); font-size: 13px; color: var(--muted);
}
.media-fail a, .linkish { color: var(--link); text-decoration: none; background: none; border: none; padding: 0; font: inherit; cursor: pointer; }
.media-fail a:hover, .linkish:hover { text-decoration: underline; }
.risky { margin-bottom: 8px; padding: 8px 12px; border-radius: var(--r); background: rgba(255, 100, 103, .08); border: 1px solid rgba(255, 100, 103, .3); color: #ff8a8c; font-size: 13px; }

.skeleton { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r3); padding: 14px 16px; }
.sk { border-radius: 6px; background: linear-gradient(90deg, var(--panel-2) 0, var(--panel-3) 80px, var(--panel-2) 160px); background-size: 800px 100%; animation: shimmer 1.2s linear infinite; }
.sk-row { display: flex; gap: 11px; align-items: center; }
.sk-av { width: 36px; height: 36px; border-radius: 50%; }
.sk-l1 { height: 12px; width: 40%; }
.sk-l2 { height: 10px; width: 25%; margin-top: 7px; }
.sk-body { height: 12px; margin-top: 14px; width: 92%; }
.sk-body2 { height: 12px; margin-top: 8px; width: 70%; }

/* ── Profile panel ───────────────────────────────────────────────────────── */
.drw-ov { display: none; position: fixed; inset: 0; z-index: 400; background: rgba(0, 0, 0, .6); }
.drw-ov.on { display: block; animation: fade-in .2s ease; }
.drw {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 500;
  width: min(460px, 100vw); transform: translateX(100%);
  background: var(--panel); border-left: 1px solid var(--line); box-shadow: var(--sh-3);
  overflow-y: auto; transition: transform .26s var(--ease); padding-bottom: var(--safe-bottom);
}
.drw.on { transform: none; }
.drw-hdr {
  position: sticky; top: 0; z-index: 2; height: 49px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 16px; background: var(--panel); border-bottom: 1px solid var(--line);
}
.drw-title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drw-body { padding: 18px; }
.drw-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 48px 0; color: var(--muted); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--panel-3); border-top-color: var(--text); animation: spin .7s linear infinite; }

.p-hero { display: flex; align-items: center; gap: 14px; }
.p-avatar { position: relative; width: 56px; height: 56px; border-radius: 50%; background: var(--panel-3); color: var(--muted); display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 600; overflow: hidden; flex-shrink: 0; }
.p-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.p-name { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.p-sub { font-size: 13px; color: var(--muted); margin-top: 2px; word-break: break-word; }
.p-sub a { color: var(--link); text-decoration: none; margin-right: 6px; }
.p-links a { margin-right: 0; }
.p-links .dot { margin: 0 6px; }
.p-sub a:hover { text-decoration: underline; }
.p-sub .copyable { font-family: var(--mono); font-size: 12px; }
.p-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; margin-top: 16px; }
.p-stat { background: var(--input-bg); border: 1px solid var(--line); border-radius: var(--r2); padding: 10px 12px; }
.p-stat b { display: block; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.p-stat span { font-size: 12px; color: var(--faint); }
.p-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.p-actions .btn { width: 100%; }
.p-actions:has(> .btn:only-child) { grid-template-columns: 1fr; }
/* past profile pictures */
.pic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.pic { margin: 0; }
.pic img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 1px solid var(--line); cursor: zoom-in; background: var(--panel-3); }
.pic figcaption { margin-top: 3px; font-size: 11px; color: var(--faint); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Minecraft player profile */
.mc-skin { width: 56px; height: 90px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.mc-skin img { max-width: 100%; max-height: 100%; image-rendering: pixelated; }
.p-sub b { color: var(--text); font-weight: 600; }
.p-seen { margin-top: 12px; font-size: 13px; color: var(--faint); line-height: 1.6; }
.row-btn { width: 100%; text-align: left; color: var(--text); cursor: pointer; font: inherit; font-size: 14px; }
.row-btn:hover { background: var(--input-bg-hi); border-color: var(--line-2); }
.row-main { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sec { margin-top: 22px; }
.sec-title { font-size: 12px; font-weight: 500; color: var(--faint); margin-bottom: 8px; }
.list { display: flex; flex-direction: column; gap: 6px; }
.row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; background: var(--input-bg); border: 1px solid var(--line); border-radius: var(--r); font-size: 14px; }
.row .sub { color: var(--faint); font-size: 12px; white-space: nowrap; }
.row.col { flex-direction: column; gap: 3px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { border: 1px solid var(--line-2); background: var(--input-bg); color: var(--muted); font-size: 13px; padding: 5px 11px; border-radius: var(--r); cursor: pointer; }
.pill:hover { background: var(--input-bg-hi); color: var(--text); }
.p-msg { padding: 10px 12px; background: var(--input-bg); border: 1px solid var(--line); border-radius: var(--r2); }
.p-msg .sub { font-size: 12px; color: var(--faint); margin-bottom: 4px; }
.p-msg .sub a { color: var(--faint); text-decoration: none; }
.p-msg .sub a:hover { color: var(--text); }
.p-msg .msg { margin-top: 0; font-size: 14px; }
.p-msg .media { margin-top: 8px; }
.p-msg .media img, .p-msg .media video { max-height: 260px; }
.p-note { margin-top: 16px; font-size: 13px; color: var(--faint); text-align: center; }

/* ── Image viewer, toast ─────────────────────────────────────────────────── */
#lightbox { display: none; position: fixed; inset: 0; z-index: 700; background: rgba(0, 0, 0, .92); align-items: center; justify-content: center; cursor: zoom-out; }
#lightbox.on { display: flex; animation: fade-in .15s ease; }
#lightbox img { max-width: 94vw; max-height: 90vh; border-radius: var(--r3); object-fit: contain; }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--safe-bottom)); z-index: 800;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  background: var(--panel-2); border: 1px solid var(--line-2); border-left: 3px solid var(--accent); color: var(--text);
  font-size: 13px; padding: 9px 14px; border-radius: var(--r); box-shadow: var(--sh-3);
  transition: opacity .18s, transform .18s; max-width: calc(100vw - 32px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ── Phones and small tablets ────────────────────────────────────────────── */
.mobtabs { display: none; }

@media (max-width: 860px) {
  .shell { display: block; }
  .sidebar { display: none; }
  .topbar { padding: 0 16px; }
  .topbar-brand { display: inline-flex; }
  .topbar-title { display: none; }
  .kbd-icon { display: none !important; }
  .mobile-only { display: inline-flex !important; }
  .page { padding: 14px 14px calc(84px + var(--safe-bottom)); }
  .tips { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .field-wide { grid-column: 1 / -1; }
  .where-wrap, .filters-foot .seg-where, .type-wrap, .filters-foot .seg-type { width: 100%; }
  .filters-foot .seg-where button { flex: 1 1 0; }
  .filters-foot .seg-type button { flex: 1 1 auto; min-width: 0; padding: 0 6px; }
  .p-actions { grid-template-columns: 1fr; }

  .mobtabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 300;
    display: flex; padding: 6px 6px calc(6px + var(--safe-bottom));
    background: var(--bar-bg); border-top: 1px solid var(--line);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  }
  .mobtabs .nav-item {
    flex: 1 1 0; min-width: 0; height: 50px; padding: 0;
    flex-direction: column; justify-content: center; gap: 3px; font-size: 11px;
  }
  .mobtabs .nav-item.active { background: transparent; color: var(--text); }
  .mobtabs .nav-item.active > svg { color: var(--text); }
  .toast { bottom: calc(76px + var(--safe-bottom)); }
  /* A picker's list stays above the tab bar and the keyboard: its field is scrolled to the top when tapped
     (search.js), and the list is kept short (the server list ran under the tabs, 2026-11-16) */
  .field-ac .ac, .bar-wrap > .ac { max-height: min(300px, 36vh); }
  .field-ac input, #q { scroll-margin-top: 72px; }
}

@media (max-width: 420px) {
  .search { padding: 10px; }
  .search-btn { padding: 0 12px; }
}

/* The search box shows one focus ring (its frame), not a second one around the text field inside it */
#q:focus-visible { box-shadow: none; }

/* ── Suggestion lists (search box, In chat) ──────────────────────────────── */
.search { position: relative; }
.ac {
  position: absolute; left: 12px; right: 12px; top: 64px; z-index: 60;
  max-height: min(420px, 60vh); overflow-y: auto; padding: 4px;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r2); box-shadow: var(--sh-3);
  animation: fade-in .1s ease;
}
.field-ac { position: relative; }
.field-ac .ac { left: 0; right: 0; top: calc(100% + 4px); max-height: 320px; }
.ac-head { padding: 6px 10px 4px; font-size: 12px; font-weight: 500; color: var(--faint); }
.ac-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 6px 10px;
  border: none; border-radius: 6px; background: transparent; color: var(--text); font-size: 14px; text-align: left; cursor: pointer;
}
.ac-item:hover, .ac-item.hi { background: var(--hover); }
.ac-item .ac-ic { width: 16px; height: 16px; color: var(--faint); flex-shrink: 0; }
.ac-item .ac-main { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-item .ac-main b { font-weight: 600; }
.ac-item .ac-sub { flex-shrink: 0; font-size: 12px; color: var(--faint); max-width: 45%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-note { padding: 8px 10px; font-size: 13px; color: var(--faint); }

/* ── Dates, shortcuts, export ────────────────────────────────────────────── */
.date-row { display: flex; align-items: center; gap: 6px; }
.date-row input { flex: 1; min-width: 0; height: 36px; padding: 0 8px 0 10px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--input-bg); color: var(--text); font-size: 14px; color-scheme: dark; outline: none; }
.date-row input:focus { border-color: var(--ring); box-shadow: 0 0 0 3px var(--ring-50); }
.date-row input.is-empty:not(:focus) { color: var(--faint); }
.date-row input::-webkit-calendar-picker-indicator { opacity: .45; cursor: pointer; }
.date-row input:hover::-webkit-calendar-picker-indicator, .date-row input:focus::-webkit-calendar-picker-indicator { opacity: .85; }
.date-to { font-size: 12px; color: var(--faint); }
.filters-hint code { font-family: var(--mono); font-size: 12px; color: var(--muted); background: var(--input-bg); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; white-space: nowrap; }
.rm-export { margin-left: 10px; padding-left: 10px; border-left: 1px solid var(--line); font-size: 13px; display: inline-flex; align-items: center; gap: 5px; }
.rm-share { margin-left: 10px; font-size: 13px; display: inline-flex; align-items: center; gap: 5px; }
.rm-export[hidden], .rm-share[hidden] { display: none; }
.rm-text:empty + .rm-share { margin-left: 0; }

/* ── Under the search box: one line of help, then the filters (always shown since 2026-11-20) ───────── */
.kind-help { margin: 8px 2px 0; font-size: 13px; color: var(--faint); }
.seg-full { display: flex; width: 100%; }
.seg-where button { padding: 0 12px; }
.where-wrap { min-width: 0; }
.seg-full button { flex: 1 1 0; min-width: 0; padding: 0 8px; }
.filters-foot { min-height: 30px; }
body.searching .kind-help { display: none; }   /* the hint is for before the first search */
.seg-live { margin-bottom: 12px; }
.seg-live button.active { background: var(--panel-3); color: var(--text); box-shadow: var(--sh-1); }
.seg button.on, .seg-live button.active { background: var(--panel-3); }

/* ── Sidebar: live logs ──────────────────────────────────────────────────── */
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); margin-left: auto; flex-shrink: 0; }
.nav-item.active .live-dot, .live-dot.on { background: var(--up); box-shadow: 0 0 0 0 rgba(60, 210, 120, .6); animation: live-pulse 2s infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(60, 210, 120, .5); } 70% { box-shadow: 0 0 0 6px rgba(60, 210, 120, 0); } 100% { box-shadow: 0 0 0 0 rgba(60, 210, 120, 0); } }

/* ── Live feed ───────────────────────────────────────────────────────────── */
.live-head { margin-bottom: 14px; padding: 14px 16px; position: sticky; top: 61px; z-index: 40; }
.live-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.live-title { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.live-title .live-dot { margin-left: 0; }
.live-sub { margin-top: 2px; font-size: 13px; color: var(--faint); }
.live-actions { display: flex; align-items: center; gap: 8px; }
.live-actions .btn { min-height: 34px; height: 34px; }
.live-actions .btn[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.live-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.live-filters input {
  width: 100%; height: 34px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--input-bg); color: var(--text); font-size: 14px; outline: none;
}
.live-filters input:focus { border-color: var(--ring); box-shadow: 0 0 0 3px var(--ring-50); }
.live-in { position: relative; }
.live-status { font-size: 13px; color: var(--faint); padding: 0 2px 10px; min-height: 26px; display: flex; align-items: center; gap: 8px; }
#live-list { display: flex; flex-direction: column; gap: 10px; }
#live-list .card { padding: 14px 16px; }
#live-list .card.arrive { animation: live-in .35s var(--ease) both; }
@keyframes live-in { from { opacity: 0; transform: translateY(-8px); background: var(--panel-3); } to { opacity: 1; transform: none; background: var(--panel); } }
.new-pill {
  position: sticky; top: 190px; z-index: 45; display: block; margin: 0 auto 10px; padding: 7px 14px;
  border: 1px solid var(--primary); border-radius: var(--r); background: var(--primary); color: var(--primary-ink);
  font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: var(--sh-3);
}

@media (max-width: 860px) {
  .live-head { position: static; }
  .new-pill { top: 64px; }
  .live-filters { grid-template-columns: 1fr; }
  .live-title { display: none; }
  .live-title-row { flex-wrap: nowrap; }
  .live-title-row > div:first-child { flex: 1; min-width: 0; }
}

/* ── Telegram / Minecraft switch, Minecraft results ──────────────────────── */
.src-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.seg-src button { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 14px; }
.bar-wrap { position: relative; }
.bar-wrap > .ac { left: 0; right: 0; top: calc(100% + 6px); }
.avatar.mc-av { width: 30px; height: 30px; border-radius: 6px; margin: 0 3px; }
.tag-bedrock { font-size: 13px; font-weight: 400; color: var(--faint); }
.rank { min-width: 0; font-size: 13px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.where-name[data-mc-server] { cursor: pointer; }
.where-name[data-mc-server]:hover { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.card-mc .msg { margin-top: 8px; }

@media (max-width: 860px) {
  .seg-src { width: 100%; }
  .seg-src button { flex: 1; justify-content: center; }
}
.msg.mc-event { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.msg.mc-event svg { flex-shrink: 0; }
.msg.mc-event.mc-join { color: var(--join); }   /* a join green, a leave red (the user, 2026-11-21) */
.msg.mc-event.mc-left { color: var(--leave); }
.avatar.mc-av img { border-radius: 6px; image-rendering: pixelated; background: var(--panel-3); }

/* iPhones zoom the page in when a text box under 16px is tapped, and it stays zoomed (audit 2026-11-16) */
@media (max-width: 860px) {
  input, select, textarea { font-size: 16px !important; }
}

/* Submit a chat (2026-11-19) */
.submit-dialog { margin: auto; width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line-2);
  border-radius: var(--r3); background: var(--panel); color: var(--text); box-shadow: var(--sh-3); }
.submit-dialog::backdrop { background: rgba(0, 0, 0, .6); }
.submit-form { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.submit-form h2 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.submit-hint { color: var(--muted); font-size: 13px; line-height: 1.5; }
.submit-input { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--input-bg); color: var(--text); font: inherit; font-size: 14px; }
.submit-input:focus { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px var(--ring-50); }
.submit-status { font-size: 13px; color: var(--muted); }
.submit-status:empty { display: none; }
.submit-status.ok { color: var(--up); }
.submit-status.bad { color: var(--down); }
.submit-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* Results: a quiet divider where the day changes */
.day-sep { display: flex; align-items: center; gap: 10px; margin: 6px 2px 0; font-size: 12px; font-weight: 500; color: var(--faint); }
.day-sep:first-child { margin-top: 0; }
.day-sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* Back to top */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 250; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text); box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .15s, transform .15s var(--ease), background .12s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--panel-3); }
.to-top svg { width: 18px; height: 18px; }
@media (max-width: 860px) { .to-top { right: 14px; bottom: calc(74px + var(--safe-bottom)); } }

/* Welcome: example searches */

/* ── Batch 7: Browse chats, profile activity, shortcuts ── */

.page-head { margin-bottom: 14px; padding: 14px 16px; }
.page-title { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.page-sub { margin-top: 3px; font-size: 13px; color: var(--muted); }

.chats-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.mini-search {
  flex: 1 1 240px; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; cursor: text;
  background: var(--input-bg); border: 1px solid var(--line-2); border-radius: var(--r);
  transition: border-color .12s var(--ease), box-shadow .12s var(--ease);
}
.mini-search:focus-within { border-color: var(--ring); box-shadow: 0 0 0 3px var(--ring-50); }
.mini-search svg { width: 15px; height: 15px; color: var(--faint); flex-shrink: 0; }
.mini-search input { flex: 1; min-width: 0; height: 100%; background: transparent; border: none; outline: none; color: var(--text); font-size: 14px; }
.mini-search input::placeholder { color: var(--faint); }
.mini-search input::-webkit-search-cancel-button { display: none; }

.chat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.chat-grid > .state, .chat-grid > .skeleton, .chat-grid > .more-btn { grid-column: 1 / -1; }
.chat-row {
  display: flex; align-items: center; min-width: 0; animation: fade-in .15s ease;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r2); transition: border-color .12s;
}
.chat-row:hover { border-color: var(--line-2); }
.chat-main {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: none; border: none; border-radius: var(--r2); color: var(--text); text-align: left; cursor: pointer; font: inherit;
}
.chat-av { width: 34px; height: 34px; font-size: 12px; }
.chat-av-mc {
  width: 34px; height: 34px; border-radius: var(--r); flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: var(--panel-3); color: var(--muted);
}
.chat-av-mc svg { width: 16px; height: 16px; }
.chat-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.chat-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-sub { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; }
.chat-user { overflow: hidden; text-overflow: ellipsis; }
.chat-live {
  flex-shrink: 0; margin-right: 10px; height: 28px; padding: 0 10px; border-radius: var(--r); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-2); background: var(--input-bg); color: var(--muted); font-size: 12px; font-weight: 500;
}
.chat-live:hover { color: var(--text); background: var(--input-bg-hi); }
.chat-live .live-dot { margin: 0; width: 7px; height: 7px; }
.more-btn { justify-self: center; margin-top: 8px; }

.card.kb-focus { border-color: var(--ring) !important; box-shadow: 0 0 0 3px var(--ring-50); outline: none; }

@media (min-width: 861px) { .welcome-recent { display: none; } }   /* the sidebar lists them */

.spark {
  display: flex; align-items: flex-end; gap: 2px; height: 56px; padding: 8px 8px 0;
  background: var(--input-bg); border: 1px solid var(--line); border-bottom: none; border-radius: var(--r) var(--r) 0 0;
}
.spark i { flex: 1 1 0; min-width: 0; border-radius: 2px 2px 0 0; background: var(--faint); }
.spark i:hover { background: var(--text); }
.spark i.zero { background: var(--panel-3); }
.spark-axis {
  display: flex; justify-content: space-between; gap: 8px; padding: 5px 8px 6px; font-size: 11px; color: var(--faint);
  background: var(--input-bg); border: 1px solid var(--line); border-top: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r);
}
.pill-n { margin-left: 6px; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }

.keys { display: flex; flex-direction: column; gap: 9px; margin: 14px 0 6px; }
.keys > div { display: grid; grid-template-columns: 88px 1fr; align-items: center; gap: 12px; font-size: 14px; }
.keys dt { display: flex; gap: 4px; }
.keys dd { color: var(--muted); }

@media (max-width: 860px) {
  .chat-grid { grid-template-columns: 1fr; }
  .mobtabs .nav-item { font-size: 11px; }
  .page-head { padding: 14px; }
}

/* Everything in one chat: which chat, above the results */
.chat-banner { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 14px 16px; animation: fade-in .2s ease; }
.chat-banner .chat-av { width: 40px; height: 40px; font-size: 13px; }
.cb-text { flex: 1; min-width: 0; }
.cb-name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-sub { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 13px; color: var(--faint); white-space: nowrap; overflow: hidden; }
.cb-sub > * { flex-shrink: 0; }
.cb-sub > :last-child { flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cb-sub a { color: var(--muted); text-decoration: none; }
.cb-sub a:hover { text-decoration: underline; }
.chat-banner .chat-live { margin-right: 0; }
.live-filters .live-words { grid-column: 1 / -1; }
.live-words-note { margin: -4px 2px 10px; font-size: 13px; color: var(--muted); }

/* Polish 2026-11-20 (b): one focus ring on the chats filter, counts on its tabs, Live buttons on hover */
.mini-search input:focus-visible, .mini-search input:focus { box-shadow: none; outline: none; }
.seg-n { margin-left: 6px; font-size: 11px; font-weight: 500; color: var(--faint); font-variant-numeric: tabular-nums; }
.seg button.on .seg-n { color: var(--muted); }
.chats-count { margin: -4px 2px 10px; font-size: 13px; color: var(--faint); }
.chats-count:empty { display: none; }
@media (hover: hover) and (pointer: fine) {
  .chat-row .chat-live { opacity: 0; transition: opacity .12s; }
  .chat-row:hover .chat-live, .chat-row .chat-live:focus-visible { opacity: 1; }
}
@media (max-width: 860px) {
  #chats-seg { width: 100%; }
  #chats-seg button { flex: 1 1 0; min-width: 0; padding: 0 6px; }
}
@media (max-width: 520px) { #chats-seg .seg-n { display: none; } }   /* the line above gives the counts */


/* ── Pass 2 (2026-11-21): the offline note, the results line on phones ───────────────────────── */
.offline-banner {
  display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; padding: 12px 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r3);
  color: var(--muted); font-size: 13px; line-height: 1.5; animation: fade-in .2s ease;
}
.offline-banner a { color: var(--link); font-weight: 500; text-decoration: none; }
.offline-banner a:hover { text-decoration: underline; }
.ob-dot { flex-shrink: 0; width: 7px; height: 7px; margin-top: 6px; border-radius: 50%; background: var(--warn); }

/* Phones: the count and Copy link / Export CSV on one line, what's happening on the next (it wrapped
   into "Copy / link" and "Export / CSV" beside a two-line "trying again" before) */
@media (max-width: 600px) {
  .results-meta { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 6px 0; }
  .rm-right { display: contents; }
  .rm-left { grid-column: 1; grid-row: 1; }
  .rm-share { grid-column: 2; grid-row: 1; }
  .rm-export { grid-column: 3; grid-row: 1; }
  .rm-right .inline-spin { grid-column: 1; grid-row: 2; align-self: center; }
  .rm-text { grid-column: 1 / -1; grid-row: 2; }
  .rm-text:empty { display: none; }
  .rm-right .inline-spin:not([hidden]) + .rm-text { padding-left: 20px; }
  .rm-bar { grid-column: 1 / -1; grid-row: 3; }
}

/* ── Pass 3 (2026-11-21): the sender's ID / the player's UUID, one quiet line at the bottom of a card ── */
.card-id {
  margin-top: 10px; font-family: var(--mono); font-size: 12px; line-height: 1.5; color: var(--faint);
  overflow-wrap: anywhere;   /* a UUID breaks inside itself on a phone instead of pushing the page sideways */
}
.card-id mark { color: var(--muted); }
.card-id .copyable:hover { color: var(--muted); }
.card-id { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.goto { flex: none; margin-left: auto; padding: 0; border: 0; background: none; cursor: pointer; white-space: nowrap;
  font-family: var(--sans); font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.goto:hover { color: var(--text); }
.card.anchor-hit { border-color: var(--ring); box-shadow: 0 0 0 3px var(--ring-50); }
.p-msg .msg.mc-event { margin-top: 0; }

/* ── Type: only messages with photos / videos / voice / files (2026-11-21) ── */
.type-wrap { min-width: 0; max-width: 100%; }
.seg-type { max-width: 100%; overflow-x: auto; scrollbar-width: none; }   /* never wider than the screen */
.seg-type::-webkit-scrollbar { display: none; }
.seg-type button { padding: 0 11px; white-space: nowrap; flex-shrink: 0; }

/* ── Gram look (2026-11-25): icon buttons in the top bar, quieter live dots ── */
.header-actions .icon-btn { width: 34px; height: 34px; }
.header-actions .icon-btn svg { display: block; }
.live-item .live-dot { width: 6px; height: 6px; }
.icon-sm { flex-shrink: 0; opacity: .85; }

/* ── Audit 2026-11-25: the picked option of a switch stands out on the grey track; keyboard focus shows on icon
   buttons; on a phone the tab you're on is clearly brighter than the rest ── */
.seg button.on, .seg-live button.active { background: #3a3b41; color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.icon-btn:focus-visible { border-color: var(--ring); box-shadow: 0 0 0 3px var(--ring-50); }
@media (max-width: 860px) { .mobtabs .nav-item { color: var(--faint); } .mobtabs .nav-item.active { color: var(--text); } }

/* A Minecraft word that looks like a player's name: "Looking for the player ...?" (2026-11-25) */
.mode-hint { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.mode-hint .linkish { color: var(--text); font-weight: 500; }

/* What to search: Messages / A person (a name, @username or ID) / A chat - back on 2026-11-25 */
.seg-kind button { height: 30px; padding: 0 12px; }
@media (max-width: 860px) { .seg-kind { width: 100%; } .seg-kind button { flex: 1 1 0; min-width: 0; padding: 0 6px; } }

/* Labels in place of a file link (too big, an animated sticker): not clickable (audit 2026-11-25) */
.media span.doc { cursor: auto; }
.media span.doc:hover { background: var(--input-bg); color: var(--muted); }   /* (a label, not a link: no hover; still selectable) */
