:root {
  --bg: #0b1220;
  --bg-2: #111a2e;
  --panel: #0f1830;
  --panel-2: #16223f;
  --line: #22314f;
  --text: #e8eefc;
  --muted: #8ea0c4;
  --accent: #4f7cff;
  --accent-2: #6a8bff;
  --danger: #ff5c73;
  --ok: #34d399;
  --away: #f5b445;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 20% -10%, #16224422, transparent), var(--bg);
  color: var(--text);
}
button { font-family: inherit; cursor: pointer; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.gap { gap: 8px; }
.pad { padding: 12px; }
.name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Inputs and buttons */
.input, .select, .composer-input {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; font-size: 14px; outline: none;
}
.input:focus, .composer-input:focus { border-color: var(--accent); }
.btn {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 14px; font-size: 14px;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: white; }
.btn.primary:hover { background: var(--accent-2); }
.btn.small { padding: 6px 10px; font-size: 13px; }
.btn:disabled { opacity: .6; cursor: default; }
.linkbtn { background: none; border: none; color: var(--muted); padding: 8px 6px; text-align: left; font-size: 14px; border-radius: 8px; }
.linkbtn:hover { color: var(--text); background: var(--panel-2); }
.linkbtn.danger:hover { color: var(--danger); }
.linkbtn.alert { color: var(--accent-2); font-weight: 600; }
.linkbtn.fs-on { color: var(--ok); font-weight: 600; }
.icon-btn { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); width: 38px; height: 38px; border-radius: 10px; font-size: 18px; line-height: 1; }

/* Auth */
.auth-wrap { min-height: 100%; display: grid; place-items: center; padding: 20px; }
.auth-card { width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.brand { font-weight: 800; letter-spacing: 1px; margin: 0; font-size: 30px; }
.brand.big { font-size: 54px; opacity: .5; }
.tabs { display: flex; gap: 6px; margin: 18px 0; }
.tab { flex: 1; padding: 9px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); }
.tab.active { color: var(--text); border-color: var(--accent); }
.form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.error-box { color: var(--danger); font-size: 13px; min-height: 18px; }

/* Shell */
.shell { display: grid; grid-template-columns: 320px 1fr; height: 100vh; }
.sidebar { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px; gap: 10px; min-height: 0; }
.side-head { display: flex; flex-direction: column; gap: 10px; }
.presence-row { justify-content: space-between; }
.select { width: auto; padding: 6px 8px; }
.contact-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.side-foot { display: flex; flex-direction: column; border-top: 1px solid var(--line); padding-top: 8px; }

.avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(145deg, var(--accent), #2a3b6b); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
img.avatar { object-fit: cover; background: var(--panel-2, #1b2440); }
.conn { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); flex: none; }
.conn.ok { background: var(--ok); }

.contact { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; border: none; background: none; color: var(--text); text-align: left; }
.contact:hover { background: var(--panel-2); }
.contact.active { background: var(--panel-2); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #4b5b7d; flex: none; }
.dot.online { background: var(--ok); }
.dot.away { background: var(--away); }
.badge { background: var(--accent); color: white; border-radius: 999px; font-size: 11px; padding: 1px 7px; }

/* Main */
.main { display: flex; flex-direction: column; min-width: 0; }
.empty { flex: 1; display: grid; place-content: center; justify-items: center; gap: 8px; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--panel); }
.messages { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.msg { display: flex; }
.msg.mine { justify-content: flex-end; }
.bubble { max-width: min(560px, 78%); padding: 9px 12px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); white-space: pre-wrap; word-wrap: break-word; }
.msg.mine .bubble { background: var(--accent); border-color: var(--accent); color: white; }
.msg-meta { font-size: 11px; color: var(--muted); margin-top: 3px; text-align: right; }
.msg.mine .msg-meta { color: #dbe4ff; }
.msg.pending .bubble { opacity: .6; }
.msg.pending .msg-meta { font-style: italic; }

.composer { display: flex; align-items: flex-end; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--panel); }
.composer-input { resize: none; max-height: 140px; }

.search-panel { padding: 8px 18px; border-bottom: 1px solid var(--line); background: var(--panel); }
.search-results { max-height: 240px; overflow-y: auto; margin-top: 4px; }
.search-hit { padding: 6px 8px; border-radius: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.search-hit:hover { background: var(--panel-2); color: var(--text); }
.search-hit mark { background: var(--accent); color: white; border-radius: 3px; padding: 0 2px; }
.search-hit-flash { animation: search-flash 1.5s ease-out; }
@keyframes search-flash { 0% { background: color-mix(in srgb, var(--accent) 35%, transparent); } 100% { background: transparent; } }

.attach { display: flex; flex-direction: column; gap: 8px; }
.attach-name { font-weight: 600; }
.attach-img { max-width: 320px; border-radius: 10px; display: block; }
.attach-holder audio { width: 280px; }

/* Modal + toasts */
.overlay { position: fixed; inset: 0; background: rgba(4, 8, 18, .6); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { width: 100%; max-width: 520px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; max-height: 85vh; display: flex; flex-direction: column; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-body { padding: 16px 18px; overflow-y: auto; }
.modal-body h3 { margin: 16px 0 8px; font-size: 14px; color: var(--muted); }
.req-row, .module-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.module-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 700; flex: none; }
.module-host { flex: 1; overflow-y: auto; padding: 16px; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--panel-2); border: 1px solid var(--line); color: var(--text); padding: 10px 16px; border-radius: 10px; opacity: 0; transition: all .25s; z-index: 100; font-size: 14px; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--ok); }
.toast.error { border-color: var(--danger); }

/* Installable-PWA prompt (v1.69.0): a dismissible bar, top of the page. This
   is the affordance on every screen size - including phones, where it
   replaces the browser's own install mini-infobar (suppressed so we can offer
   one consistent, dismissible prompt instead of two). */
.pwa-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 200; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 8px 14px; background: var(--panel-2); border-bottom: 1px solid var(--line); color: var(--text); font-size: 14px; }
.pwa-banner span { flex: 1; min-width: 160px; }

/* Responsive: stack sidebar over chat on narrow screens */
@media (max-width: 720px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .sidebar { max-height: 42vh; }
}

/* ---- v0.2.0: module frame, permission consent, security panel ---- */
.tag { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: var(--panel-2); }
.tag.ok { border-color: var(--ok); color: var(--ok); }
.tag.warn { border-color: var(--away); color: var(--away); }
.tag.off { border-color: var(--danger); color: var(--danger); }
.tag.on { border-color: var(--ok); color: var(--ok); }
.warn { color: var(--away); }

/* Module boundary frame (anti-phishing: drawn by the core, not the module) */
.module-frame-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--panel); }
.frame-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-right: 8px; }
.module-frame-perms { padding: 6px 16px; border-bottom: 1px solid var(--line); background: var(--bg-2); }

/* Permission consent dialog */
.consent .consent-sig { margin: 10px 0; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); font-size: 13px; }
.consent .consent-sig.ok { border-color: var(--ok); color: var(--ok); }
.consent .consent-sig.warn { border-color: var(--away); color: var(--away); }
.perm-list { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
.perm { padding: 6px 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }

/* Security and privacy panel */
.sec-summary { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 10px; }
.sec-summary.ok { border-color: var(--ok); }
.sec-summary.warn { border-color: var(--danger); }
.sec-change { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--away); color: var(--away); margin-bottom: 10px; font-size: 13px; }
.sec-table { display: flex; flex-direction: column; }
.sec-row { display: grid; grid-template-columns: 150px 90px 1fr; gap: 8px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sec-area { font-weight: 600; font-size: 13px; }
.ev { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); text-align: center; }
.ev-verified { border-color: var(--ok); color: var(--ok); }
.ev-declared { border-color: var(--away); color: var(--away); }
.ev-observed { border-color: var(--accent); color: var(--accent-2); }
.ev-unknown { border-color: var(--danger); color: var(--danger); }
@media (max-width: 560px) {
  .sec-row { grid-template-columns: 1fr; gap: 2px; }
}

/* ---- v0.3.0: contact verification and devices ---- */
.secchip { border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: 12px; }
.secchip.ok { border-color: var(--ok); color: var(--ok); }
.secchip.danger { border-color: var(--danger); color: var(--danger); }
.safety-number { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 18px; letter-spacing: 1px; line-height: 1.8; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; text-align: center; word-spacing: 6px; }
.keychange-banner { margin: 10px; padding: 10px 12px; border: 1px solid var(--danger); color: var(--danger); border-radius: 10px; font-size: 13px; }
.verify-panel { max-width: 460px; }
.device-list { display: flex; flex-direction: column; gap: 6px; }

/* ---- v0.4.0: boards module ---- */
.boards-wrap { display: grid; grid-template-columns: 260px 1fr; height: 100%; min-height: 0; }
.board-col { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.board-col > .row { padding: 12px; border-bottom: 1px solid var(--line); }
.board-list { overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.board-item { display: flex; align-items: center; gap: 8px; text-align: left; width: 100%; background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 8px 10px; color: var(--text); cursor: pointer; }
.board-item:hover { background: var(--panel-2); }
.board-item.active { background: var(--panel-2); border-color: var(--line); }
.unread-badge { background: var(--accent); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 8px; min-width: 20px; text-align: center; }
.board-main { display: flex; flex-direction: column; min-height: 0; }
.board-head { display: flex; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.board-posts { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.board-post { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--panel); }
.post-author { font-weight: 600; font-size: 13px; }
.post-body { white-space: pre-wrap; margin-top: 4px; }
.board-composer { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.board-composer .composer-input { flex: 1; }
@media (max-width: 640px) {
  .boards-wrap { grid-template-columns: 1fr; }
  .board-col { max-height: 40%; }
}

/* ---- v0.4.1: communities module ---- */
.comm-view { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.comm-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.pad-h { padding: 6px 16px; }
.comm-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: transparent; border: 1px solid transparent; border-bottom: 1px solid var(--line); padding: 10px 16px; color: var(--text); cursor: pointer; }
.comm-item:hover { background: var(--panel-2); }
.comm-body { display: grid; grid-template-columns: 260px 1fr; flex: 1; min-height: 0; }
.comm-side { border-right: 1px solid var(--line); overflow-y: auto; display: flex; flex-direction: column; }
.comm-rooms { display: flex; flex-direction: column; padding: 6px; gap: 2px; border-bottom: 1px solid var(--line); }
.room-item { text-align: left; background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 8px 10px; color: var(--text); cursor: pointer; }
.room-item:hover { background: var(--panel-2); }
.comm-members { padding: 10px; }
.member-row { display: flex; align-items: center; gap: 6px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.comm-detail { display: flex; flex-direction: column; min-height: 0; }
.room-head { display: flex; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.room-messages { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.room-msg { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--panel); }
.input { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; color: var(--text); }
@media (max-width: 720px) {
  .comm-body { grid-template-columns: 1fr; }
  .comm-side { max-height: 38%; }
}

/* ---- v0.4.7: polls module ---- */
.polls-wrap { display: grid; grid-template-columns: 280px 1fr; height: 100%; min-height: 0; }
.poll-col { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.poll-col > .row { padding: 12px; border-bottom: 1px solid var(--line); }
.poll-list { overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.poll-item { text-align: left; width: 100%; background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 8px 10px; color: var(--text); cursor: pointer; }
.poll-item:hover { background: var(--panel-2); }
.poll-item.active { background: var(--panel-2); border-color: var(--line); }
.poll-detail { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }
.poll-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.field label { display: block; margin-bottom: 4px; }
.poll-option { position: relative; display: block; width: 100%; text-align: left; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-top: 8px; color: var(--text); cursor: pointer; }
.poll-option:disabled { cursor: default; }
.poll-option.chosen { border-color: var(--accent); }
.poll-bar { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--accent) 22%, transparent); z-index: 0; transition: width .3s ease; }
.poll-option-label { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 10px; }

/* ---- v0.4.8: events module ---- */
.events-wrap { display: grid; grid-template-columns: 300px 1fr; height: 100%; min-height: 0; }
.event-col { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.event-col > .row { padding: 12px; border-bottom: 1px solid var(--line); }
.event-list { overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.event-item { text-align: left; width: 100%; background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 8px 10px; color: var(--text); cursor: pointer; }
.event-item:hover { background: var(--panel-2); }
.event-item.active { background: var(--panel-2); border-color: var(--line); }
.event-detail { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }
.event-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.event-when { font-weight: 600; }
.event-desc { white-space: pre-wrap; }

/* Message deletion (unsend) */
.bubble.deleted { font-style: italic; opacity: 0.6; }
.msg-del {
  background: none; border: none; color: inherit; opacity: 0.5;
  cursor: pointer; font-size: 0.75rem; padding: 0 2px;
}
.msg-del:hover { opacity: 1; text-decoration: underline; }

/* Message editing and replies */
.msg-act {
  background: none; border: none; color: inherit; opacity: 0.5;
  cursor: pointer; font-size: 0.75rem; padding: 0 2px;
}
.msg-act:hover { opacity: 1; text-decoration: underline; }
.reply-quote {
  border-left: 3px solid rgba(127,127,127,0.5); padding: 2px 8px; margin: 0 0 4px 0;
  font-size: 0.85rem; opacity: 0.75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.composer-col { display: flex; flex-direction: column; width: 100%; }
.reply-bar {
  display: flex; align-items: center; gap: 8px; padding: 4px 10px;
  font-size: 0.85rem; opacity: 0.85; border-bottom: 1px solid rgba(127,127,127,0.2);
}

/* Disappearing messages */
.expiry-sel {
  background: none; border: 1px solid rgba(127,127,127,0.35); border-radius: 6px;
  color: inherit; font-size: 0.8rem; padding: 2px 4px;
}

/* Account recovery code display */
.recovery-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.05rem;
  letter-spacing: 1px; padding: 10px 12px; margin: 8px 0;
  border: 1px dashed rgba(127,127,127,0.5); border-radius: 8px;
  user-select: all; text-align: center;
}

/* Reports */
.report-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid rgba(127,127,127,0.15); }

/* Restriction (mute) banner */
.mute-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: #b91c1c; color: #fff; text-align: center;
  padding: 6px 10px; font-size: 0.85rem;
}

/* Feedback bubble (v1.83.0): a small floating action button, always reachable,
   for a member to send a bug report or a suggestion straight to the operator. */
.feedback-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent); color: #fff; border: none;
  font-size: 20px; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
.feedback-fab:hover { background: var(--accent-2); }
@media (max-width: 720px) { .feedback-fab { right: 14px; bottom: 14px; width: 44px; height: 44px; } }

/* Trust badges */
.flag-badge {
  display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 10px;
  font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.5px; vertical-align: middle;
}
.flag-badge.verified { background: rgba(56,139,253,0.18); color: #4493f8; }
.flag-badge.trusted { background: rgba(63,185,80,0.18); color: #3fb950; }

/* What is new */
.whatsnew-entry { margin: 10px 0; }
.whatsnew-ver { font-weight: 600; margin-bottom: 4px; }
.whatsnew-items { margin: 0; padding-left: 18px; }
.whatsnew-items li { margin: 2px 0; }

/* Audit log */
.audit-row { padding: 3px 0; border-bottom: 1px solid rgba(127,127,127,0.1); font-family: ui-monospace, monospace; font-size: 0.72rem; word-break: break-word; }

/* Achievements */
.ach-row { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; border-bottom: 1px solid rgba(127,127,127,0.12); opacity: 0.75; }
.ach-row.unlocked { opacity: 1; }
.ach-mark { width: 20px; height: 20px; border-radius: 50%; flex: none; text-align: center; line-height: 20px; font-size: 0.75rem; background: rgba(127,127,127,0.15); }
.ach-row.unlocked .ach-mark { background: rgba(63,185,80,0.25); color: #3fb950; }
.ach-name { font-weight: 600; }
.ach-bar-track { height: 5px; background: rgba(127,127,127,0.15); border-radius: 3px; margin: 4px 0; overflow: hidden; }
.ach-bar { height: 100%; background: #4493f8; }

/* Leaderboard */
.lb-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid rgba(127,127,127,0.1); }
.lb-rank { width: 34px; color: var(--muted, #8b949e); font-variant-numeric: tabular-nums; }

/* Level */
.level-box { padding: 8px; border: 1px solid rgba(127,127,127,0.15); border-radius: 8px; margin-bottom: 10px; }
.level-num { font-weight: 700; font-size: 1.05rem; }

/* Games: Connect Four */
.game-row { padding: 8px; border: 1px solid rgba(127,127,127,0.15); border-radius: 6px; margin: 4px 0; cursor: pointer; }
.game-row.your-turn { border-color: #4493f8; }
.game-status { margin: 8px 0; font-size: 0.85rem; }
.c4-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; background: #1b3a6b; padding: 6px; border-radius: 8px; max-width: 320px; }
.c4-cell { aspect-ratio: 1; border-radius: 50%; background: #0d1117; cursor: pointer; }
.c4-cell.p1 { background: #e5484d; cursor: default; }
.c4-cell.p2 { background: #f5d90a; cursor: default; }

/* Games: Reversi board */
.rv-grid { display: grid; gap: 2px; background: #1b5e20; padding: 6px; border-radius: 8px; max-width: 360px; }
.rv-cell { aspect-ratio: 1; border-radius: 50%; background: #2e7d32; }
.rv-cell.p1 { background: #111; }
.rv-cell.p2 { background: #fafafa; }
.rv-cell.legal { outline: 2px dashed rgba(255,255,255,0.5); cursor: pointer; }

/* Boards depth */
.board-post.pinned { border-left: 3px solid #4493f8; padding-left: 8px; }
.pin-badge { display: inline-block; font-size: 0.7rem; background: rgba(68,147,248,0.2); color: #4493f8; border-radius: 4px; padding: 1px 5px; margin-right: 4px; }

/* Message reactions */
.reactions { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.reaction-chip { font-size: 0.95rem; background: rgba(127,127,127,0.15); border-radius: 10px; padding: 0 6px; line-height: 1.4; }

/* Gomoku (dense grid) */
.rv-grid.dense { gap: 1px; max-width: 420px; background: #b8860b; }
.rv-grid.dense .rv-cell { border-radius: 2px; background: #d2a24c; }
.rv-grid.dense .rv-cell.p1 { background: #111; border-radius: 50%; }
.rv-grid.dense .rv-cell.p2 { background: #fafafa; border-radius: 50%; }

/* Forwarded label */
.fwd-label { font-style: italic; opacity: 0.7; margin-bottom: 2px; }

/* Conversation pinned banner */
.pinned-banner { background: rgba(68,147,248,0.08); border-bottom: 1px solid rgba(68,147,248,0.25); padding: 4px 10px; }
.pinned-item { display: flex; align-items: center; gap: 6px; padding: 2px 0; }
.pinned-item .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
