/* /chats, like a game client's messages screen: a slim list on the left (your two rooms as tiles, then friends, online
   first), the conversation big on the right with chat bubbles. Header and panel tops line up with Play, Clubs and Me
   (lobby.css tokens). Tablets: the same, the list a little slimmer. Phones: the list, then a chat full screen. */
main.chats {
  display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); grid-template-rows: auto auto; gap: 16px; align-items: start; align-content: start;
  width: min(100% - 2 * var(--gutter), 1440px); margin: 0 auto; padding: 18px 0 calc(var(--tabbar) + 40px); color: var(--text);
}
main.chats > .lobbytop { grid-column: 1 / -1; margin-bottom: 4px; }
main.chats .lobbycity { min-height: 129px; align-content: end; }
main.chats .lobbytop .lobbycity .lobbycity__name { color: var(--paper); text-shadow: 3px 3px 0 var(--cyan), 6px 6px 0 #1e9bb8, 9px 9px 0 #0b4a5a; }
main.chats > .sitefoot { grid-column: 1 / -1; }

/* ---------- the list ---------- */
.chatlist { position: sticky; top: 16px; gap: 12px; padding: 14px; max-height: calc(100vh - 140px); overflow-y: auto; }
.chatlist .center__search { padding-block: 12px; font-size: 15px; }
.chatlist__body { display: grid; gap: 10px; }

.chatlist__head { display: flex; justify-content: space-between; margin-top: 4px; font: 800 var(--fs-label, 11px)/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.chatlist__rows { list-style: none; display: grid; gap: 2px; }
.chatlist__none { padding: 14px; font-size: 14px; color: var(--muted); border: 1px dashed var(--hair); }
.chatrow {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 12px; width: 100%; padding: 8px 10px; text-align: left;
  color: var(--text); background: none; border: 0; border-left: 3px solid transparent; cursor: pointer; transition: background var(--fast);
}
.chatrow:hover, .chatrow:focus-visible { background: rgba(241, 239, 230, 0.05); }
/* a group invite: the group, who asked, then Join / No thanks under it */
.chatinvite { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 8px 12px; padding: 8px 10px; border-left: 3px solid var(--lime); }
.chatinvite__do { grid-column: 2; display: flex; flex-wrap: wrap; gap: 8px; }
a.chatrow__text { text-decoration: none; }
a.chatrow__text:hover b, a.chatrow__text:focus-visible b { color: var(--lime); }
.chatrow.is-open { background: rgba(198, 255, 61, 0.08); border-left-color: var(--lime); }
.chatrow__text { display: grid; gap: 2px; min-width: 0; }
.chatrow__text b { font: 700 15px/1.2 var(--sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chatrow__text span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chatrow.is-online .chatrow__text span { color: var(--lime); }

/* faces: the same round frame as a game's roster; rooms get a rounded square */
.chatrow__face {
  position: relative; display: grid; place-items: end center; width: 40px; height: 40px; overflow: hidden; color: var(--lime);
  background: var(--ink); border: 2px solid var(--lime); border-radius: 50%; box-shadow: 2px 2px 0 var(--pink);
}
.chatrow__face img { width: 100%; height: 100%; object-fit: cover; }
.chatrow__face > svg { width: 26px; height: 26px; margin-bottom: 1px; }
.chatrow.is-online .chatrow__face { overflow: visible; }
.chatrow.is-online .chatrow__face::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 11px; height: 11px; background: var(--lime); border: 2px solid var(--panel); border-radius: 50%; }
.chatrow__face.is-og { place-items: center; color: var(--ink); background: var(--og); border-color: var(--ink); border-radius: 10px; }
.chatrow__face.is-og > svg { width: 20px; height: 20px; margin: 0; }
.chatrow__face.is-club { place-items: center; background: #1a1430; border-color: #b388ff; box-shadow: 2px 2px 0 #3d1f8c; border-radius: 10px; }
.chatrow__face.is-club img { width: 32px; height: 24px; object-fit: contain; }

/* ---------- the conversation ---------- */
.chatpane { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 0; padding: 0; height: min(760px, calc(100vh - 140px)); overflow: hidden; }
.chatpane__head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 14px 18px; background: var(--panel-2); border-bottom: 1px solid var(--hair); }
.chatpane__back { display: none; place-items: center; width: 36px; height: 36px; color: var(--text); background: none; border: 1px solid var(--hair); cursor: pointer; }
.chatpane__who { display: grid; gap: 3px; min-width: 0; }
.chatpane__name { font: 800 20px/1.1 var(--brand); letter-spacing: -0.03em; color: var(--text); text-decoration: none; }
a.chatpane__name:hover { color: var(--lime); }
.chatpane__who span { font: 700 var(--fs-label, 11px)/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.chatpane__empty { margin: auto; color: var(--muted); }

.chatpane__list {
  flex: 1 1 auto; min-height: 0; max-height: none; display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 18px; overflow-y: auto;
  background: radial-gradient(circle at 20% 0%, rgba(198, 255, 61, 0.04), transparent 50%), #0c0d0b; border: 0;
}
.chatpane__list > .chat__note { margin: auto; text-align: center; }
.bubble { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: end; gap: 10px; max-width: min(78%, 620px); margin-top: 10px; }
.bubble.is-run { margin-top: 0; }
.bubble.is-mine { align-self: flex-end; grid-template-columns: minmax(0, 1fr); }
.bubble.is-mine .bubble__face { display: none; }
.bubble__face { width: 34px; }
.bubble__face .chatrow__face { width: 32px; height: 32px; box-shadow: none; border-width: 2px; }
.bubble__face .chatrow__face > svg { width: 20px; height: 20px; }
.bubble__body { display: grid; gap: 3px; padding: 9px 12px 7px; background: var(--panel-2); border: 1px solid var(--hair); border-radius: 14px 14px 14px 4px; }
.bubble.is-mine .bubble__body { color: var(--ink); background: var(--lime); border-color: var(--ink); border-radius: 14px 14px 4px 14px; box-shadow: 3px 3px 0 var(--pink); }
.bubble__who { font: 800 11px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--cyan); }
.bubble.is-mine .bubble__who { color: rgba(16, 16, 20, 0.6); }
.bubble__text { font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
/* a Play again line's game: a lime ticket under the words, the game page (and its Join) a tap away */
.bubble__game {
  justify-self: start; margin-top: 4px; padding: 9px 14px 8px; font: 800 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; background: var(--lime); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--pink);
  transition: transform var(--fast) var(--out), box-shadow var(--fast);
}
.bubble__game:hover, .bubble__game:focus-visible { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--pink); }
.bubble__game:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--pink); }
.bubble.is-mine .bubble__game { color: var(--lime); background: var(--ink); border-color: var(--ink); }
.bubble__at { justify-self: end; font: 700 10px/1 var(--mono); color: var(--muted); }
.bubble.is-mine .bubble__at { color: rgba(16, 16, 20, 0.55); }

.chatpane .chat__form { flex: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 12px 14px; background: var(--panel-2); border-top: 1px solid var(--hair); }
.chatpane .chat__input { padding: 13px 14px; font-size: 15px; }
.chatpane .chat__send { padding-inline: 20px; }

/* tablets: a slimmer list */
@media (max-width: 1100px) { main.chats { grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); } }
/* phones: the list, or the chat you picked, full width */
@media (max-width: 760px) {
  main.chats { grid-template-columns: minmax(0, 1fr); }
  main.chats .lobbytop .lobbycity { min-height: calc(29.4px + clamp(60px, 14vw, 100px)); align-content: start; padding-top: 18px; box-sizing: border-box; }
  main.chats .lobbytop .lobbycity .lobbycity__name { font-size: clamp(68px, 16vw, 114px); }
  main.chats[data-open="yes"] .chatlist, main.chats[data-open="no"] .chatpane { display: none; }
  .chatlist { position: static; max-height: none; overflow: visible; }
  .chatpane { position: static; height: calc(100vh - var(--tabbar) - 230px); min-height: 380px; }
  .chatpane__back { display: grid; }
  .bubble { max-width: 88%; }
}

/* the list and the chat are one screen: the same height side by side (the window's height under the header), the list
   scrolling inside itself, nothing sticky, so the footer always sits below both */
main.chats { --chat-h: max(520px, calc(100dvh - 290px)); }
.chatlist, .chatpane { position: static; height: var(--chat-h); max-height: none; }
.chatlist { overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr); align-content: stretch; }
.chatlist__body { overflow-y: auto; align-content: start; margin-right: -6px; padding-right: 6px; scrollbar-width: thin; }
@media (max-width: 760px) {
  main.chats { --chat-h: max(420px, calc(100dvh - var(--tabbar) - 230px)); }
  .chatlist { height: auto; overflow: visible; display: grid; }
  .chatlist__body { overflow: visible; margin: 0; padding: 0; }
}

/* ---------- Add friends, New group: side by side under the search, over the rooms ---------- */
.chatlist { grid-template-rows: auto auto minmax(0, 1fr); }
.chatstart { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding-bottom: 4px; }   /* room for the CTA's pink shadow */
.chatstart .mode { display: flex; justify-content: center; width: 100%; min-width: 0; padding: 11px 8px 10px; white-space: nowrap; }
.chatstart__group { box-shadow: inset 4px 0 0 var(--lime); }
.chatstart__group:hover, .chatstart__group:focus-visible { box-shadow: inset 6px 0 0 var(--lime); }
.chatstart .mode svg { flex: none; transition: rotate var(--fast) var(--out), scale var(--fast) var(--out); }
.chatstart__group:hover svg { rotate: 90deg; scale: 1.15; }

/* the sheets: paper, ink rows; a picked friend turns lime */
.chatsheet .btn { margin-top: 20px; }
.pick { list-style: none; display: grid; gap: 8px; margin-top: 16px; max-height: min(44svh, 420px); overflow-y: auto; padding: 2px 6px 6px 2px; }
.pick__head { margin-top: 24px; margin-bottom: 0; }
.pick__row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 10px; color: var(--ink); background: #fff; border: 2px solid var(--ink); }
.pick__row.is-check { cursor: pointer; transition: background var(--fast), box-shadow var(--fast); }
.pick__row:has(.pick__box:checked) { background: var(--lime); box-shadow: 3px 3px 0 var(--pink); }
.pick__row.is-off { color: rgba(16, 16, 20, 0.55); background: transparent; border-color: rgba(16, 16, 20, 0.25); cursor: not-allowed; }
.pick__text { display: grid; gap: 2px; min-width: 0; }
.pick__text b { font: 800 15px/1.2 var(--sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick__text span { font-size: 12.5px; color: rgba(16, 16, 20, 0.62); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick__add {
  padding: 9px 14px; font: 800 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); cursor: pointer;
  background: var(--lime); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--pink); transition: transform var(--fast) var(--out), box-shadow var(--fast);
}
.pick__add:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--pink); }
.pick__add:disabled { color: rgba(16, 16, 20, 0.55); background: transparent; border-color: rgba(16, 16, 20, 0.25); box-shadow: none; cursor: default; }
.pick__box { width: 22px; height: 22px; accent-color: var(--ink); color-scheme: light; }   /* white boxes on the paper sheet (the page is dark), in New group and Invite from chats alike */
.pick__none { margin-top: 14px; font-size: 14px; color: rgba(16, 16, 20, 0.62); }
.chatrow__face.is-group { place-items: center; color: var(--ink); background: var(--cyan); border-color: var(--ink); border-radius: 10px; }
.chatrow__face.is-group > svg { width: 20px; height: 20px; margin: 0; }

/* phones, a chat open: the conversation takes the whole screen, like WhatsApp (no title; the tabs stay); back returns to the list */
@media (max-width: 760px) {
  main.chats[data-open="yes"] .chatpane {
    position: fixed; inset: 0 0 calc(var(--tabbar) + 3px + env(safe-area-inset-bottom)); z-index: 100; height: auto; max-height: none; min-height: 0; margin: 0; border: 0;
    padding: env(safe-area-inset-top) 0 0; background: #111114;
  }
  body:has(main.chats[data-open="yes"]) { overflow: hidden; }
  body:has(main.chats[data-open="yes"]) .top .wordmark { display: none; }   /* the logo goes; the tabs (in the same header) stay */
  /* the bell goes too: it would sit over Back to chats, its panel off the left edge (Back returns to the list, bell and all) */
  body:has(main.chats[data-open="yes"]) .top .bell__wrap { display: none; }
}

/* ---------- the conversation, like the app's DM screen ---------- */
/* night sky: a few faint stars over near-black */
.chatpane { background: #111114; }
.chatpane__list {
  background-color: #111114;
  background-image: radial-gradient(1px 1px at 12% 18%, rgba(241, 239, 230, 0.35), transparent 60%), radial-gradient(1px 1px at 67% 9%, rgba(241, 239, 230, 0.25), transparent 60%),
    radial-gradient(1px 1px at 38% 52%, rgba(241, 239, 230, 0.3), transparent 60%), radial-gradient(1px 1px at 84% 41%, rgba(241, 239, 230, 0.22), transparent 60%),
    radial-gradient(1px 1px at 23% 79%, rgba(241, 239, 230, 0.28), transparent 60%), radial-gradient(1px 1px at 58% 88%, rgba(241, 239, 230, 0.2), transparent 60%),
    radial-gradient(1px 1px at 91% 72%, rgba(241, 239, 230, 0.3), transparent 60%), radial-gradient(1px 1px at 5% 46%, rgba(241, 239, 230, 0.2), transparent 60%);
  background-size: 230px 230px;
}
/* header: back left, name and pink @handle centred, ⋯ right */
.chatpane__head { grid-template-columns: 48px minmax(0, 1fr) 48px; gap: 10px; padding: 12px 14px; background: transparent; border-bottom: 1px solid rgba(241, 239, 230, 0.06); }
.chatpane__head > .chatrow__face { display: none; }
.chatpane__who { justify-items: center; text-align: center; gap: 2px; }
.chatpane__name { font: 800 17px/1.15 var(--brand); letter-spacing: -0.02em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chatpane__who span { font: 700 12px/1.2 var(--sans); letter-spacing: 0; text-transform: none; color: var(--pink); }
.chatpane__round {
  display: grid; place-items: center; width: 48px; height: 48px; padding: 0; color: var(--text); cursor: pointer; list-style: none;
  background: rgba(241, 239, 230, 0.07); border: 1px solid rgba(241, 239, 230, 0.12); border-radius: 50%; transition: background var(--fast), transform var(--fast) var(--out);
}
.chatpane__round::-webkit-details-marker { display: none; }
.chatpane__round:hover, .chatpane__round:focus-visible { background: rgba(241, 239, 230, 0.14); }
.chatpane__round:active { transform: scale(0.94); }
.chatpane__back { display: grid; visibility: hidden; }   /* wide screens: no back, but its place keeps the name centred */
.chatmore { position: relative; }
.chatmore[open] > .chatpane__round { background: rgba(241, 239, 230, 0.16); }
.chatmore__list { position: absolute; top: calc(100% + 8px); right: 0; z-index: 5; display: grid; min-width: 230px; padding: 6px; background: var(--panel); border: 1px solid var(--hair); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55); animation: hostmenu-in 160ms var(--out) both; }
.chatmore__list a, .chatmore__list button { padding: 11px 12px; font: 800 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text); text-align: left; text-decoration: none; background: none; border: 0; cursor: pointer; }
.chatmore__list a:hover, .chatmore__list a:focus-visible, .chatmore__list button:hover, .chatmore__list button:focus-visible { color: var(--ink); background: var(--lime); }
/* nothing said yet: a quiet SAY HI just over the box */
.chatpane__list > .chatpane__hi { margin: auto auto 6px; font: 800 12px/1 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
/* the box: dark field, a square lime send with an arrow and the pink shadow */
.chatpane .chat__form { grid-template-columns: minmax(0, 1fr) 48px; align-items: center; gap: 14px; padding: 14px 18px 16px; background: #111114; border-top: 0; }
.chatpane .chat__input { min-height: 50px; padding: 0 14px; font: 500 15px var(--sans); color: var(--text); background: #1b1c20; border: 1.5px solid rgba(241, 239, 230, 0.3); }
.chatpane .chat__input::placeholder { color: rgba(241, 239, 230, 0.45); }
.chatpane .chat__input:focus { outline: none; border-color: var(--lime); }
.chatpane .chat__send { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; box-shadow: 4px 4px 0 var(--pink); transition: transform var(--fast) var(--out), box-shadow var(--fast); }
.chatpane .chat__send:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--pink); }
.chatpane .chat__send:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--pink); }
@media (max-width: 760px) { .chatpane__back { visibility: visible; } }

/* the list sits straight on the page, like Me: no panel around it. Search, Add friends / New group, the rooms, then
   your groups and friends, each under its own small heading with a hairline between the sections. */
main.chats .chatlist { padding: 0; background: none; border: 0; }
main.chats .chatlist__head { margin-top: 10px; padding-top: 16px; border-top: 1px solid var(--hair); }
main.chats .chatrow { padding-inline: 4px; }
@media (min-width: 761px) { main.chats .chatlist__body { padding-right: 10px; } }

/* a chat in the list: the last message under the name, when it was on the right, a lime count when some are new */
.chatrow--chat { grid-template-columns: 40px minmax(0, 1fr) auto; }
.chatrow--chat .chatrow__text span, .chatrow--chat.is-online .chatrow__text span { color: var(--muted); }
.chatrow--chat.is-unread .chatrow__text span { color: var(--text); font-weight: 700; }
.chatrow__meta { display: grid; justify-items: end; align-content: center; gap: 5px; }
.chatrow__at { font: 700 10px/1 var(--mono); letter-spacing: 0.06em; color: var(--muted); white-space: nowrap; }
.chatrow--chat.is-unread .chatrow__at { color: var(--lime); }
.chatrow__unread { min-width: 20px; padding: 3px 6px 2px; text-align: center; font: 800 10.5px/1 var(--mono); color: var(--ink); background: var(--lime); border: 2px solid var(--ink); border-radius: 999px; box-shadow: 2px 2px 0 var(--pink); }

/* Friends | Groups: Clubs' two-tab bar over the list it switches; on phones it docks above the bottom tabs */
.chatkinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.chatkinds .mode { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 12px 10px; font-size: 10.5px; }
.chatkinds .mode__n { padding: 2px 5px 1px; font-size: 10px; color: var(--muted); background: rgba(241, 239, 230, 0.08); }
.chatkinds .mode[aria-selected="true"] .mode__n { color: var(--ink); background: var(--tone); }
/* Friends or Groups: its heading over its rows with the same gap as Chats above it */
.chatkind { display: grid; gap: 12px; }
.chatkind.is-from-right { animation: chatkind-from-right 220ms var(--out) both; }
.chatkind.is-from-left { animation: chatkind-from-left 220ms var(--out) both; }
@keyframes chatkind-from-right { from { opacity: 0; transform: translateX(28px); } }
@keyframes chatkind-from-left { from { opacity: 0; transform: translateX(-28px); } }
@media (prefers-reduced-motion: reduce) { .chatkind { animation: none !important; } }
@media (max-width: 760px) {
  main.chats .chatkinds {
    position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar) + 3px + env(safe-area-inset-bottom)); z-index: 40; margin: 0;
    padding: 10px 10px 9px; background: rgba(18, 19, 16, 0.96); border-top: 1px solid var(--hair); backdrop-filter: blur(8px);
  }
  main.chats[data-open="no"] { padding-bottom: calc(var(--tabbar) + 90px + env(safe-area-inset-bottom)); }
}

/* ---------- Notes from teammates: one read-only thread (chats-notes.js), each note the way it read on Me ---------- */
.chatrow__face.is-notes { place-items: center; color: var(--ink); background: var(--pink); border-color: var(--ink); border-radius: 10px; }
.chatrow__face.is-notes > svg { width: 20px; height: 20px; margin: 0; }
/* a note: me.css's .mecomment, who wrote it (a signed note's face and name, links to their page; an older anonymous
   note's plain face and "A teammate"), the day @ the court, the words, Report */
.chatnotes .mecomment { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 14px; align-items: start; padding: 14px 16px; background: var(--panel-2); border: 1px solid var(--hair); }
.chatnotes .mecomment__face { display: flex; align-items: flex-end; justify-content: center; width: 48px; height: 48px; overflow: hidden; color: rgba(198, 255, 61, 0.7); background: #23251f; border: 2px solid rgba(241, 239, 230, 0.15); }
.chatnotes .mecomment__face svg { flex: none; width: 40px; height: 40px; margin-bottom: -3px; }
.chatnotes .mecomment__face svg path { stroke-width: 1.6; }
.chatnotes .mecomment__body { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 10px; row-gap: 3px; min-width: 0; }
.chatnotes .mecomment__who { font: 700 16px/1.2 var(--sans); color: var(--text); }
.chatnotes .mecomment__meta { grid-column: 1 / -1; font-size: 13px; color: var(--muted); text-decoration: none; }
.chatnotes a.mecomment__meta:hover, .chatnotes a.mecomment__meta:focus-visible { color: var(--lime); }
.chatnotes .mecomment__text { grid-column: 1 / -1; margin-top: 4px; font-size: 15px; line-height: 1.45; color: var(--text); overflow-wrap: anywhere; }
.chatnotes .mecomment__acts { display: flex; gap: 14px; margin-top: 6px; }
.chatnotes .mecomment__act { padding: 0; font: 800 10px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); background: none; border: 0; text-decoration: underline; cursor: pointer; }
.chatnotes .mecomment__act:hover, .chatnotes .mecomment__act:focus-visible { color: var(--pink); }
.chatnotes .mecomment__img { flex: none; width: 40px; height: 40px; margin: auto; object-fit: cover; border-radius: 50%; }
.chatnotes a.mecomment__face { text-decoration: none; transition: border-color var(--fast); }
.chatnotes a.mecomment__face:hover, .chatnotes a.mecomment__face:focus-visible { border-color: var(--lime); }
.chatnotes a.mecomment__who { font-weight: 800; color: var(--text); text-decoration: none; }
.chatnotes a.mecomment__who:hover, .chatnotes a.mecomment__who:focus-visible { color: var(--lime); }
/* Load more, under the oldest note showing (me.css's .more) */
.chatnotes .more {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; margin: 14px 0 6px;
  font-family: var(--mono); font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--paper); background: none; border: 2px solid currentColor; cursor: pointer;
}
.chatnotes .more:hover, .chatnotes .more:focus-visible { color: var(--lime); }
.chatnotes .more:disabled { opacity: 0.6; cursor: progress; }

/* ---------- Message requests (chats-requests.js): their row first in Chats, their list, the bar in a request ---------- */
.chatrow__face.is-requests { place-items: center; color: var(--ink); background: var(--lime); border-color: var(--ink); border-radius: 10px; }
.chatrow__face.is-requests > svg { width: 20px; height: 20px; margin: 0; }
.chatrow--requests .chatrow__text b { font-weight: 800; }
/* how many requests: the other rows' lime pill while one is unread (.chatrow__unread), else this quiet count */
.chatrow__count { font: 800 11px/1 var(--mono); letter-spacing: 0.06em; color: var(--muted); }
.chatreqs__back { display: inline-flex; align-items: center; gap: 8px; justify-self: start; margin-top: 10px; }
/* where the box to write in goes: who wants to message you, then Accept (the CTA), Add friend, Delete, Block */
.chatpane .chatreq { flex: none; display: grid; gap: 12px; padding: 16px 18px 18px; background: #111114; border-top: 1px solid rgba(241, 239, 230, 0.08); }
.chatreq__text { font: 600 14.5px/1.4 var(--sans); color: var(--text); }
.chatreq__do { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
/* a label wraps rather than being cut off (lobby.css keeps .mode on one line above 760px) */
.chatreq__do .mode { min-width: 0; white-space: normal; justify-content: center; text-align: center; }
/* two by two up to the tablet width, where the pane sits narrow beside the list: four across cut off "Add friend" on an
   iPad, and "Adicionar amigo" up to 1024px */
@media (max-width: 1100px) { .chatreq__do { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.chatreq__do .mode:disabled { opacity: 0.6; cursor: progress; }
.chatreq__block { --tone: var(--pink); color: var(--pink); }
.chatreq__block:hover, .chatreq__block:focus-visible { border-color: var(--pink); }

/* New group → Invite with a link (owner, 2026-11-23): an outlined button under Make the group, then the link to copy
   or share; a link opened from elsewhere gets the Join sheet (chats.js joinFromLink). */
.btn--ghost-paper { background: #fff; color: var(--ink); box-shadow: none; }
.btn--ghost-paper:hover, .btn--ghost-paper:focus-visible { background: var(--lime); }
.chatsheet .btn--ghost-paper { margin-top: 12px; }
.invitelink__lede { margin: 0 0 14px; font-size: 15px; line-height: 1.5; color: rgba(16, 16, 20, 0.8); }
.invitelink__url {
  width: 100%; padding: 12px 14px; font: 600 14px/1.3 var(--mono); color: var(--ink); background: #fff;
  border: 2px dashed var(--ink); border-radius: 0; text-overflow: ellipsis;
}
.invitelink__row { display: flex; gap: 10px; }
.invitelink__row .btn { flex: 1; }
.invitelink__row .btn + .btn { margin-top: 20px; }
.joinlink__lede { margin: 0; font-size: 15px; line-height: 1.5; color: rgba(16, 16, 20, 0.8); }
.joinlink__count { margin: 10px 0 0; font: 700 12px/1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: rgba(16, 16, 20, 0.6); }

/* The compact chat (owner, 2026-11-23, saved for 1.1.3: "chat message from friends is too long"): each bubble as wide
   as its words, the time at the end of its line, one name and one time per run from the same person, runs stacked
   tight, and someone else's "…" only on hover (on touch it stays, quieter). */
.bubble { width: fit-content; grid-template-columns: 34px auto; margin-top: 10px; }
.bubble.is-run { margin-top: 4px; }
.bubble.is-mine { grid-template-columns: auto; }
.bubble[data-actions] { grid-template-columns: 34px auto 28px; }
.bubble__body { position: relative; display: block; padding: 8px 11px 7px; }   /* 9/12/8 with the 1px edge, as the app's */
.bubble__who { display: block; margin-bottom: 2px; }
.bubble__text { line-height: 1.45; }
/* the time's room at the end of the words (an invisible copy of it), and the time itself over that room, WhatsApp's way */
.bubble__room { display: inline-block; margin-left: 10px; visibility: hidden; font: 700 10px/1 var(--mono); white-space: nowrap; }
.bubble__body > .bubble__at { position: absolute; right: 11px; bottom: 9px; }
/* a game line: the words, then the button and the time under them, as wide as the longer of the two. A grid, not the
   wrapping row: a wrapping row's natural width is all three side by side, so the bubble ran the chat's full width (owner,
   2026-11-23: "the chat container is too wide, need to auto-width") */
.bubble__body:has(.bubble__game) { display: grid; grid-template-columns: auto auto; align-items: end; gap: 2px 10px; }
.bubble__body:has(.bubble__game) .bubble__who, .bubble__body:has(.bubble__game) .bubble__text { grid-column: 1 / -1; }
.bubble__game, .bubble__at { white-space: nowrap; }   /* "Join the game" and the time stay one line when the words wrap on a phone */
.bubble__body:has(.bubble__game) > .bubble__at { position: static; margin-left: auto; padding-bottom: 2px; }
.bubble.is-cont .bubble__at { display: none; }
.bubble[data-actions] .act { width: 28px; height: 28px; opacity: 0.55; }
@media (hover: hover) {
  .bubble[data-actions] .act { opacity: 0; transition: opacity 120ms ease; }
  .bubble[data-actions]:hover .act, .bubble[data-actions]:focus-within .act, .bubble[data-actions] .act[aria-expanded="true"] { opacity: 1; }
}

/* A group chat's owner: who asked to join with the link, Let in or No (chats.js askingBar) */
.askbar { margin: 0 0 10px; padding: 12px 14px; background: rgba(198, 255, 61, 0.08); border: 1px solid var(--lime); border-left-width: 4px; }
.askbar__head { margin: 0 0 8px; font: 800 11px/1.2 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--lime); }
.askbar__list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.askbar__row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px; }
.askbar__row .chatrow__face { width: 32px; height: 32px; box-shadow: none; border-width: 2px; }
.askbar__who { display: grid; min-width: 0; font-size: 14px; line-height: 1.25; }
.askbar__who b, .askbar__who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.askbar__who span { color: var(--muted); font-size: 12.5px; }
.askbar__yes, .askbar__no { padding: 8px 12px 7px; font: 800 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; }
.askbar__yes { color: var(--ink); background: var(--lime); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--pink); }
.askbar__no { color: var(--paper); background: transparent; border: 1px solid var(--hair); }
.askbar__yes:disabled, .askbar__no:disabled { opacity: 0.5; cursor: progress; }

/* ---------- a group's Members and Connect a game (chats-members.js), as the app's members sheet ---------- */
/* Leave group: small and quiet, at the top, out of thumb reach (owner, 2026-11-23) */
.members__leave { margin-top: 6px; padding: 0; font: 800 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: rgba(16, 16, 20, 0.62); text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; cursor: pointer; }
.members__leave:hover, .members__leave:focus-visible { color: var(--ink); }
.members__list { max-height: none; overflow: visible; }
.members__row { min-height: 56px; }
.members__end { display: inline-flex; align-items: center; gap: 8px; }
.members__tag { padding: 5px 8px; font: 800 10px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--paper); background: var(--ink); transform: rotate(-3deg); }
.members__tag.is-quiet { color: rgba(16, 16, 20, 0.62); background: none; transform: none; }
.pick__round { display: grid; place-items: center; width: 34px; height: 34px; color: var(--paper); background: var(--ink); border: 0; border-radius: 50%; cursor: pointer; transition: transform var(--fast) var(--out); }
.pick__round:hover:not(:disabled), .pick__round:focus-visible { transform: scale(1.08); }
.pick__round:disabled { opacity: 0.4; cursor: default; }
.members__game { grid-template-columns: minmax(0, 1fr) auto; }
.members__bottom { width: 100%; margin-top: 28px; }
.members__rename .btn { width: 100%; }

/* a game's squad chat in Chats (chats-squads.js): the ball on lime, as the app's */
.chatrow__face.is-squad { place-items: center; color: var(--ink); background: var(--lime); border-color: var(--ink); border-radius: 10px; }
.chatrow__face.is-squad > svg { width: 20px; height: 20px; margin: 0; }
