/* Notifications */
.notes-btn.icon-btn { display: inline-flex; position: relative; flex: none; }
.notes-btn:hover, .notes-btn[aria-expanded="true"] { color: var(--accent); border-color: var(--accent); }
.nbadge { position: absolute; top: -4px; right: -5px; min-width: 17px; padding: 1px 4px;
  border: 1px solid var(--panel); border-radius: 999px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 800; }
.notes-panel { position: absolute; top: 100%; right: 16px; z-index: 35; width: min(390px, 100%);
  max-height: min(70vh, 520px); overflow: auto; background: var(--panel); border: 1px solid var(--line-2);
  border-radius: var(--radius); box-shadow: 0 12px 32px var(--shadow); }
.notes-head { position: sticky; top: 0; display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; background: var(--panel); border-bottom: 1px solid var(--line); }
.note { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px;
  color: var(--text); border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.note small { color: var(--muted); }
.note.unread { background: color-mix(in srgb, var(--accent) 10%, var(--panel)); box-shadow: inset 3px 0 var(--accent); }
.note:hover { background: var(--panel-2); color: var(--text); }
.ni { flex: none; width: 24px; text-align: center; }

/* Trash talk */
.talk { margin-top: 12px; }
.talk-list { max-height: 60vh; overflow-y: auto; overscroll-behavior: contain; padding: 12px; }
.tmsg { display: flex; align-items: flex-start; gap: 10px; padding: 10px; }
.tmsg + .tmsg { margin-top: 4px; }
.tmsg.mine { background: var(--panel-2); border-radius: 10px; }
.tm-main { flex: 1; min-width: 0; }
.tm-head, .tm-reacts, .rx-add, .tb-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.tm-head small { color: var(--muted); }
.tm-del { margin-left: auto; min-width: 28px; min-height: 28px; padding: 0;
  border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: inherit; font-size: 18px; cursor: pointer; }
.tm-del:hover { background: var(--panel-2); color: var(--bad-text); }
.tm-body { margin: 2px 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.rx { display: inline-flex; align-items: center; justify-content: center; padding: 3px 7px; min-height: 30px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); font: inherit; font-size: 12px; }
button.rx { cursor: pointer; }
.rx.on, button.rx:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--panel)); }
.rx.ghost { background: transparent; border-color: transparent; }
.talk-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px;
  padding: 12px; border-top: 1px solid var(--line); }
.talk-form textarea { resize: vertical; }
.talk-bet { margin: 6px 0; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px;
  background: var(--panel); overflow-wrap: anywhere; }
.tb-head { gap: 8px; }
.tb-leg { margin-top: 4px; color: var(--muted); }

/* Member profiles and recap */
.profile-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 16px; }
.profile-head .avatar { width: 48px; height: 48px; font-size: 18px; }
.profile-head h1, .profile-head .sub { overflow-wrap: anywhere; }
.profile-head .sub { color: var(--muted); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--panel); font-size: 12px; }
.profile-grid { margin-top: 12px; align-items: start; }
.profile-grid .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 12px 12px; }
.profile-grid .tile { background: var(--panel-2); overflow-wrap: anywhere; }
.profile-grid .tile span, .profile-grid .tile b { display: block; margin: 0; }
.profile-grid .tile.neg b, .recap .down { color: var(--bad-text); }
.pbet { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 8px;
  padding: 8px 12px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.pbet:last-child { border-bottom: 0; }
.recap { margin-top: 12px; }
.recap-group, .recap .panel { margin-bottom: 12px; }
.recap .panel-head { flex-wrap: wrap; }
.recap .panel-body p + p { margin-top: 8px; }
.recap-me { padding: 8px 10px; border-radius: 8px; background: var(--panel-2); }
.recap .up { color: var(--good-text); }
.recap-tbl { margin: 8px 0; }
.recap-tbl td.l { white-space: normal; }
.plink, .mention { color: var(--accent); font-weight: 650; overflow-wrap: anywhere; }
.plink:hover, .mention:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .notes-panel { left: 0; right: 0; width: 100%; border-radius: 0 0 var(--radius) var(--radius); }
  .talk-list { padding: 6px; }
  .talk-form textarea { font-size: 16px; }
  .recap-tbl th, .recap-tbl td { padding-inline: 6px; }
}
