/* Chat lines (client/ui.ts chatLine, feedLine, showCard, listingCard): the hunt panel, the chat window and the Chat
   page draw the same list (.clist). Built for the narrow panel first: a one-line message is one row.
   - A line: the speaker's face in the margin; guild tag, name, companion, badge and title on the name row, the
     message on its own lines under it and the time closing the message. The same speaker's next lines are text alone.
   - In a narrow list a titled speaker's name row is theirs alone: the title takes what is left of it.
   - A wide list (the Chat page) keeps the times in a column down the left.
   - Notices (halls, Firstborn, records) are one quiet line with a mark in the margin.
   - A creature card: the creature, who caught it, level and rolls; a record wears the seal. */
.clist { container: chat / inline-size; --gut: 28px; }
.clist[data-sel^="c:"] { gap: 0; }
.clist .t { float: right; margin: 0 0 0 8px; color: var(--faint); font-size: 10.5px; font-style: normal; font-weight: 400; letter-spacing: 0; white-space: nowrap; font-variant-numeric: tabular-nums; opacity: .85; }

/* The Chat page has the room for a larger hand. */
.cp-feed.clist { font-size: 14.5px; }
.cp-feed.clist .cl { --lh: 20px; }

/* ---------- a chat line ---------- */
.clist .cl { position: relative; flex: none; margin-top: 2px; padding: 2px 2px 2px calc(var(--gut) + var(--inset, 0px)); min-height: 22px; --lh: 18px; line-height: var(--lh); overflow-wrap: anywhere; border-radius: 2px; }
/* The time sits at the right end of the name row, so it never takes a line of its own under the message (Cole,
   2026-11-19: a time alone on its own row made chat gappy). A line with no speaker (the market's calls) floats it
   at the end of its first line, the text running round it. */
.clist .cl-who > .t { flex: none; margin-left: auto; padding-left: 8px; }
.clist .cl.cl-bare { --gut: 0px; }
.clist .cl.cl-more { margin-top: 0; padding-top: 0; min-height: 0; }
.clist .cl:hover { background: var(--inlay); }
.cl-av { position: absolute; left: var(--inset, 0px); top: 0; line-height: 0; }
.cl-av .picon-sm { display: block; margin: 0; height: 22px; }
/* The name row is a flex row as tall as the line plus 4 px: tag, name plate, companion, badge and title all sit
   on its center line, which is the first text line's center. */
.cl-who { display: flex; width: auto; align-items: center; height: calc(var(--lh) + 4px); margin: -2px 0; white-space: nowrap; }
.cl-who > * { flex: none; }
.cl-who > b { display: flex; align-items: center; font-weight: 700; }
.cl-who .plink { display: flex; align-items: center; text-decoration: none; }
.cl-who .gtag { margin: 0 4px 0 0; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
/* Small caps-height text sits a pixel low in its box at this size: lifted so its letters center on the row. */
.cl-who > .gtag, .cl-who > .cl-title { position: relative; top: -1px; }
.cp-feed .cl-who > b:not(:has(.ncol)) { position: relative; top: -1px; }
.cl-pal { display: block; width: 22px; height: 22px; margin-left: 5px; line-height: 0; }
.cl-pal img.pface { width: 22px; height: 22px; border-radius: 2px; outline: 1px solid color-mix(in srgb, var(--ink-v) 40%, var(--vellum-lo)); outline-offset: -1px; background-color: var(--vellum-lo); }
.cl-pal.aura img.pface { outline-color: #c9a95e; background-color: color-mix(in srgb, #c9a95e 35%, var(--vellum-lo)); }
.cl-who .cbadge-w { display: block; margin-left: 4px; line-height: 0; }
.cl-who .cbadge-w .cbadge { display: grid; margin: 0; }
.cl-title { margin-left: 5px; font-size: 11px; font-weight: 400; color: var(--muted); }
/* A titled speaker: the name row stays one piece, never wider than the list; a title too long for it is cut short
   with dots (the name's tip has it whole). */
.cl-who.cl-tw { max-width: 100%; overflow: hidden; }
.cl-who.cl-tw > .cl-title { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* The message starts on its own line under the name row, so all its lines share one left edge (Cole, 2026-11-14,
   after Jonny: a word beside a long name row with the rest wrapped under it read badly). */
.cl-text { display: inline; }
/* A line that says your name. */
/* A line naming you: the whole line gets a soft gilt wash with a gilt rule at the left, and your name is bold. */
.clist .cl.cl-hit { background: color-mix(in srgb, var(--gilt, #c9a227) 24%, transparent); box-shadow: inset 2px 0 0 var(--gilt-lo, #7e6440); --inset: 5px; }
.clist .cl-myname { font-weight: 700; }
/* A Loudspeaker shout. */
.clist .cl.b-loud { --inset: 7px; margin: 3px 0; padding-top: 4px; padding-bottom: 4px; border-left: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 34%, transparent), color-mix(in srgb, var(--gold) 12%, transparent)); box-shadow: inset 3px 0 0 var(--gilt-lo); font-weight: 600; }
.clist .cl.b-loud .cl-av { top: 2px; }

/* ---------- notices: one quiet line ---------- */
.clist .fl { position: relative; flex: none; margin-top: 2px; padding: 1px 2px 1px var(--gut); font-size: 11.5px; line-height: 16px; overflow-wrap: anywhere; }
.clist .fl > .t { line-height: 16px; }
.clist .fl::before { content: ''; position: absolute; left: 8px; top: 6px; width: 6px; height: 6px; transform: rotate(45deg); background: var(--gilt); box-shadow: 0 0 0 1px var(--gilt-lo); opacity: .8; }
.clist .fl.b-legendary { color: #5a2f8a; font-weight: 600; font-style: normal; }
.clist .fl.b-legendary::before { background: currentColor; box-shadow: none; }
/* A species record that posts no card (client/community.ts recordLine): the seal in the margin. */
.clist .fl.b-record { display: block; padding: 2px 2px 2px var(--gut); border: 0; border-radius: 0; background: none; color: var(--ink); font-weight: 400; font-style: normal; font-size: 12px; line-height: 18px; }
.clist .fl.b-record::before { content: none; }
.clist .b-record > .t { position: static; float: right; margin-left: 8px; line-height: 18px; }
.clist .fl.b-record .rec-seal { position: absolute; left: 2px; top: 2px; width: 18px; height: 18px; margin: 0; }
.clist .fl.b-record .bsp { width: 18px; height: 18px; margin: -2px 3px -2px 0; vertical-align: middle; }
.clist .fl.b-record a { display: inline; min-height: 0; margin-left: 4px; color: var(--rg-rubric); font-weight: 600; text-decoration: none; white-space: nowrap; }
/* An announcement (client/announce.ts). */
.clist .b-ann { flex: none; margin: 3px 0; padding: 4px 8px; line-height: 18px; }
.clist .b-ann .ann-from { margin-right: 6px; }

/* ---------- a creature card ---------- */
.clist .b-show { position: relative; flex: none; margin: 3px 0; color: var(--ink); font-weight: 400; }
.cl > .show-card, .cl > .lcard { margin: 3px 0 2px; }
.show-card { position: relative; display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: 2px; background: var(--inlay); box-shadow: inset 0 0 0 1px var(--rule-soft); font-weight: 400; }
.show-card.big { background: linear-gradient(90deg, rgba(244, 233, 205, .5), var(--inlay) 60%); box-shadow: inset 0 0 0 1px var(--gilt-lo), inset 3px 0 0 var(--gilt); }
.show-card.aura { background: radial-gradient(circle at 24px 50%, rgba(255, 214, 120, .65), transparent 50px), linear-gradient(90deg, rgba(244, 233, 205, .5), var(--inlay) 60%); box-shadow: inset 0 0 0 1px var(--gilt), inset 3px 0 0 var(--gilt-hi); }
.show-card { cursor: pointer; }
.show-card .sc-pic { position: relative; flex: none; display: grid; place-items: center; width: 40px; height: 40px; }
.show-card .sc-pic img { width: 40px; height: 40px; image-rendering: pixelated; }
.show-card .sc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.show-card .sc-who { display: flex; align-items: center; gap: 4px; min-width: 0; padding-right: 50px; font-size: 12px; line-height: 16px; color: var(--muted); white-space: nowrap; }
.show-card .sc-who .plink { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ink); text-decoration: none; }
.show-card .sc-who .gtag { margin: 0; font-size: 11px; font-weight: 700; }
.show-card .sc-seal { flex: none; display: inline-flex; align-items: center; gap: 3px; font: 700 10.5px/16px var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--rg-rubric); text-decoration: none; }
.show-card .sc-seal img { width: 16px; height: 16px; }
.show-card .sc-seal span { display: none; }
.show-card .sc-what { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; padding-right: 24px; }
.show-card.bare .sc-what { padding-right: 24px; }
.show-card .sc-name { display: inline-flex; align-items: baseline; gap: 5px; min-width: 0; max-width: 100%; }
.show-card .sc-name b { font: 700 15px/18px var(--display); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.show-card.aura .sc-name b { color: #7a5a14; }
.show-card .sc-name .muted { flex: none; font-size: 12px; white-space: nowrap; }
/* A nicknamed creature shows only its nickname; the hover card names the species (Cole 11-21). */
.show-card .sc-name b.nm-long { font-size: 13.5px; }
.show-card .rpills.m { flex-wrap: nowrap; gap: 3px; margin: 0; }
.show-card > .t { position: absolute; top: 4px; right: 8px; float: none; margin: 0; line-height: 16px; }
.show-card .sc-mkt { position: absolute; right: 5px; bottom: 4px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 2px; opacity: .7; cursor: pointer; font: 600 11px var(--sans); color: var(--rg-rubric); text-decoration: none; }
.show-card .sc-mkt:hover, .show-card .sc-mkt:focus-visible { opacity: 1; background: var(--inlay-hi); box-shadow: 0 0 0 1px var(--rule-soft); }
.show-card .sc-mkt img { width: 20px; height: 20px; }
/* An S+ relic find (client/ui.ts relicCard): the gilt big-catch frame, the relic's icon, its effect on a small second line. */
.show-card.k-relic .sc-pic img { width: 32px; height: 32px; }
.show-card.k-relic .sc-name .gbadge { align-self: center; }
.show-card.k-relic .sc-fx { min-width: 0; font-size: 12px; line-height: 15px; color: var(--muted); }

/* ---------- a shared listing (Trade) ---------- */
/* Name, grade and level over the price; the red tab at the end opens the market at it. Nothing in it can cover
   anything else: a long name truncates, a long price wraps. */
.clist .lcard { display: flex; align-items: stretch; gap: 8px; padding: 0 0 0 4px; border-radius: 2px; background: var(--inlay); box-shadow: inset 0 0 0 1px var(--gilt-lo), inset 3px 0 0 var(--gilt); color: var(--ink); font-weight: 400; text-decoration: none; cursor: pointer; overflow: hidden; }
.clist .lcard:hover, .clist .lcard:focus-visible { background: var(--inlay-hi); }
.clist .lcard .lc-pic { flex: none; align-self: center; width: 36px; height: 36px; margin: 3px 0; object-fit: contain; image-rendering: pixelated; }
.clist .lc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 4px 0; }
.clist .lc-name { display: flex; align-items: center; gap: 5px; min-width: 0; line-height: 18px; }
.clist .lc-name b { min-width: 0; font: 700 15px/18px var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clist .lc-name > :not(b) { flex: none; white-space: nowrap; }
.clist .lc-name .muted, .clist .lc-price .muted { color: var(--muted); font-size: 11.5px; font-weight: 400; }
.clist .lc-price { display: flex; flex-wrap: wrap; align-items: center; gap: 0 5px; line-height: 18px; color: var(--warn); font-weight: 700; font-variant-numeric: tabular-nums; }
.clist .lc-px { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.clist .lc-px img { width: 14px; height: 14px; }
/* The digits sit low in their line, so the icon comes down a pixel to their middle; "or" stays with its price when the line wraps. */
.clist .lc-px img { position: relative; top: 1px; }
.clist .lc-alt { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.clist .lc-go { flex: none; display: grid; place-items: center; width: 22px; color: #f2e4cc; background: var(--wax); box-shadow: inset 1px 0 0 rgba(51, 38, 26, .5); }
.clist .lc-go svg { width: 13px; height: 13px; }
.clist .lc-go:hover, .clist a.lcard:hover .lc-go { filter: brightness(1.15); }

/* ---------- new lines while reading back ---------- */
.clist .cjump { position: sticky; bottom: 2px; z-index: 2; flex: none; align-self: center; display: inline-flex; align-items: center; gap: 4px; margin-top: -26px; padding: 3px 10px 3px 12px; border: 0; border-radius: 12px; background: var(--wax); color: #f2e4cc; font: 700 11.5px/18px var(--sans); letter-spacing: .02em; box-shadow: 0 0 0 1px var(--edge), 0 3px 8px rgba(30, 20, 10, .45); cursor: pointer; }
.clist .cjump svg { width: 12px; height: 12px; }
.clist .cjump:hover { filter: brightness(1.12); }

/* ---------- a conversation (client/messages.ts convLinesHtml) ---------- */
.clist .cv-m { flex: none; max-width: min(85%, 520px); padding: 3px 9px; border-radius: 9px; line-height: 18px; box-shadow: inset 0 0 0 1px var(--rule-soft); }
.clist .cv-m.them { background: var(--inlay-hi); border-bottom-left-radius: 2px; }
.clist .cv-m.me { background: color-mix(in srgb, var(--gilt-hi) 55%, var(--vellum-hi)); border-bottom-right-radius: 2px; }
.clist .cv-m.cv-more { margin-top: -2px; }
.clist .cv-m time { align-self: flex-end; font-size: 10px; line-height: 14px; white-space: nowrap; opacity: .85; }
.clist .cv-day { flex: none; }

/* ---------- wider lists ---------- */
/* Room for the title and a short message beside the name: the chat window on a big screen, the Chat page. */
@container chat (min-width: 430px) {
  .show-card .sc-seal span { display: inline; }
}
/* The Chat page: times in a column down the left, lines and cards no wider than reads well. */
@container chat (min-width: 620px) {
  .cl-who > .gtag, .cl-who > .cl-title, .cp-feed .cl-who > b:not(:has(.ncol)) { top: 0; }
  .clist[data-sel^="c:"] > :not(.chat-pin, .cjump) { margin-left: 62px; max-width: 860px; }
  .clist .cv-m.me { margin-right: max(0px, calc(100cqw - 760px)); }
  .clist .cl > .t, .clist .cl-who > .t, .clist .fl > .t, .clist .b-ann > .t, .clist .b-show > .show-card > .t { position: absolute; left: -62px; top: 2px; right: auto; bottom: auto; float: none; width: 52px; margin: 0; text-align: right; line-height: 18px; }
  .clist .fl > .t { top: 1px; line-height: 16px; }
  .clist .b-ann { position: relative; }
  .clist .b-ann > .t, .clist .cl.b-loud .cl-who > .t { top: 4px; bottom: auto; }
  .clist .b-show > .show-card { position: static; max-width: 560px; }
  .clist .b-show > .show-card > .t { top: 50%; transform: translateY(-50%); }
  .clist .cl > :is(.show-card, .lcard) { max-width: 560px; }
  .show-card .sc-who { padding-right: 0; }
  .show-card .sc-main { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0 12px; }
  .show-card .sc-what { padding-right: 0; }
  .show-card .sc-mkt { position: static; flex: none; }
}

/* Fingers: names, seals and the market scales are easy to hit without growing the rows. */
@media (pointer: coarse) {
  .clist .lc-go { width: 30px; }
  .show-card .sc-mkt { width: 28px; height: 28px; right: 2px; bottom: 1px; }
}

/* ---------- scroll bar: a slim gilt rail instead of the browser's dark one ---------- */
/* The theme sets scrollbar-color on the page, which makes Chrome ignore the rules below; put it back to auto here. */
.clist { scrollbar-color: auto; scrollbar-width: auto; }
.clist::-webkit-scrollbar { width: 8px; }
.clist::-webkit-scrollbar-track { background: color-mix(in srgb, var(--rule, #8c7350) 16%, transparent); border-radius: 4px; }
.clist::-webkit-scrollbar-thumb { background: var(--rule, #8c7350); border: 2px solid transparent; background-clip: padding-box; border-radius: 4px; min-height: 28px; }
.clist::-webkit-scrollbar-thumb:hover { background-color: var(--gilt-lo, #6a5233); }
.clist::-webkit-scrollbar-button { display: none; height: 0; }
@supports not selector(::-webkit-scrollbar) {
  .clist { scrollbar-width: thin; scrollbar-color: var(--gilt, #b39a66) transparent; }
}

/* Emoji (client/emoji.ts): pictures in chat lines, a little larger when a line is only one to three of them. */
/* Sized to the text and dropped so the picture's middle sits on the letters' middle, like a typed emoji. */
.emo { display: inline-block; width: 1.25em; height: 1.25em; margin: -.1em .06em; vertical-align: -.28em; object-fit: contain; }
.emo.emo-g { filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .25)); }
/* An emoji we have no picture for: the reader's own emoji font, at the size of our pictures. */
.emo-t { font: normal 400 1.15em/1 "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; letter-spacing: 0; vertical-align: -.1em; }
.clist .cl-big .cl-text .emo-t { font-size: 1.4em; margin: 0 1px; }
.cv-pv .emo-t { font-size: 1.05em; }
/* A line of only emoji: a little larger than in a sentence, and the row is still one line tall (Cole, 2026-11-14: a
   lone 🔥 at 30 px took the room of two messages). */
.clist .cl-big .cl-text .emo { width: 1.5em; height: 1.5em; margin: 0 1px; vertical-align: middle; }
.cv-pv .emo { width: 1.15em; height: 1.15em; }
/* Creature faces (public/emoji/kin) carry their own outline and ears, horns and crests round the head, so the face
   itself is smaller than a round emoji's at the same box: they are set a little larger, without moving the line. */
.emo[src^="emoji/kin/"] { width: 1.5em; height: 1.5em; margin: -.25em .02em; vertical-align: -.42em; }
.clist .cl-big .cl-text .emo[src^="emoji/kin/"] { width: 1.75em; height: 1.75em; margin: 0 1px; }
.cv-pv .emo[src^="emoji/kin/"] { width: 1.35em; height: 1.35em; }

/* The smiley button by every chat box, and the card it opens: a vellum leaf in a gilt frame, 8 by 5, never scrolling. */
/* It sits inside the end of the message box (a negative margin over the box's own right padding), so the box keeps its width. */
form:has(> .emo-btn) > input { padding-right: 32px; }
.emo-btn { position: relative; flex: none; align-self: center; display: inline-grid; place-items: center; width: 28px; height: 28px; margin-left: -34px; margin-right: 6px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.emo-btn svg { width: 19px; height: 19px; transition: transform .12s; }
.emo-btn:hover, .emo-btn.on, .emo-btn:focus-visible { color: var(--rg-rubric, var(--accent)); }
.emo-btn:hover svg, .emo-btn.on svg { transform: scale(1.1); }
.emo-btn:focus-visible { outline: 2px solid var(--gilt, var(--accent)); outline-offset: -2px; }
.emo-btn:disabled { opacity: .5; cursor: not-allowed; }
.emo-pick {
  --cell: 34px;
  position: fixed; z-index: 60; width: calc(var(--cell) * 8 + 14px); max-width: calc(100vw - 12px); padding: 5px 7px 7px;
  color: var(--ink); border-radius: 2px; background: var(--vellum, var(--panel));
  background: url(themes/codex/vellum.svg) 0 0 / 300px, var(--vellum, var(--panel));
  box-shadow: inset 0 0 0 1px var(--gilt-lo, var(--line)), inset 0 0 0 2px var(--gilt, var(--line)), 0 0 0 1px var(--edge, #000), 0 8px 18px rgba(0, 0, 0, .45);
}
.emo-tabs { display: flex; gap: 2px; margin: 0 0 4px; padding-bottom: 4px; border-bottom: 1px solid var(--rule-soft, var(--line)); }
.emo-tab { flex: 1; display: grid; place-items: center; height: 30px; padding: 0; border: 0; border-radius: 2px; background: none; cursor: pointer; }
.emo-tab img { width: 20px; height: 20px; filter: grayscale(.45) opacity(.8); }
.emo-tab:hover img { filter: none; }
.emo-tab.on { background: var(--inlay-hi, var(--panel-3)); box-shadow: inset 0 0 0 1px var(--rule-soft, var(--line)), inset 0 -2px 0 var(--gilt, var(--accent)); }
.emo-tab.on img { filter: none; }
.emo-grid { display: grid; grid-template-columns: repeat(8, 1fr); }
.emo-cell { display: grid; place-items: center; height: var(--cell); padding: 0; border: 0; border-radius: 3px; background: none; cursor: pointer; }
.emo-cell img { width: 26px; height: 26px; transition: transform .08s; }
.emo-cell img[src^="emoji/kin/"], .rx-cell img[src^="emoji/kin/"], .rx-opt img[src^="emoji/kin/"] { width: 30px; height: 30px; }
.emo-tab img[src^="emoji/kin/"], .rx-tab img[src^="emoji/kin/"] { width: 24px; height: 24px; }
.emo-cell:hover, .emo-cell:focus-visible { outline: none; background: var(--inlay-hi, var(--panel-3)); box-shadow: inset 0 0 0 1px var(--gilt-lo, var(--line)); }
.emo-cell:hover img { transform: scale(1.15); }
.emo-cell:active img { transform: scale(.92); }
@media (max-width: 400px) { .emo-pick { --cell: 32px; } }

/* @ mentions (client/mention.ts): the name list above a chat box, dark leather in a gilt frame, and the links. */
.at-pick {
  position: fixed; z-index: 61; padding: 4px; display: flex; flex-direction: column; gap: 1px;
  color: var(--ink-l, #e8ecf4); border-radius: 3px; background: var(--leather-lo, #12151f);
  box-shadow: inset 0 0 0 1px var(--gilt-lo, var(--line)), 0 0 0 1px var(--edge, #000), 0 8px 18px rgba(0, 0, 0, .5);
  font-family: var(--sans, inherit);
}
.at-row {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 3px 8px; border: 0; border-radius: 2px;
  color: inherit; background: none; font: inherit; font-size: 15px; text-align: left; cursor: pointer;
}
.at-row:hover { background: rgba(244, 233, 205, .08); }
.at-row.on { background: rgba(244, 233, 205, .14); box-shadow: inset 2px 0 0 var(--gilt, var(--accent)); }
.at-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted-l, var(--muted)); }
.at-n b { color: var(--gilt-hi, var(--ink)); font-weight: 700; }
.at-row.on .at-n { color: var(--ink-l, var(--ink)); }
.at-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--faint-l, #777); }
.at-dot.live { background: #79b04a; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }
.at-why { flex: none; color: var(--faint-l, var(--muted)); font-size: 12px; }
.at-none { padding: 7px 9px; color: var(--muted-l, var(--muted)); font-size: 14px; font-style: italic; }
@media (pointer: coarse) { .at-row { min-height: 38px; } }
/* ":" emoji codes (client/emoji-complete.ts): the same card as the @ list, a picture in front of each code. */
.ec-row { gap: 10px; }
.ec-pic { flex: none; width: 22px; height: 22px; object-fit: contain; }
.ec-pic[src^="emoji/kin/"] { width: 26px; height: 26px; margin: -2px; }
.ec-row .at-n { font-variant-numeric: tabular-nums; }
.clist .cl-at { color: var(--accent); font-weight: 600; text-decoration: none; }
.clist .cl-at:hover { text-decoration: underline; }
.clist .cl-at.cl-at-me { color: inherit; font-weight: 700; padding: 0 2px; margin: 0 -2px; border-radius: 2px; background: color-mix(in srgb, var(--gilt, #c9a227) 38%, transparent); }
.clist .cl-at-me .cl-myname { font-weight: inherit; }

/* ---------- a chat mod's delete (client/ui.ts modDel) ---------- */
/* Hidden until the line is hovered or tapped; it sits over the line's top right corner (the time), on the panel's
   own colour so the text under it never shows through. */
.clist .cl-del { position: absolute; top: 0; right: 0; z-index: 1; display: none; place-items: center; width: 26px; height: 22px; min-height: 0; padding: 0; border: 0; border-radius: 3px; background: var(--panel, #1d1a16); box-shadow: inset 0 0 0 1px var(--rule-soft); color: var(--muted); cursor: pointer; }
.clist .cl-del svg { width: 15px; height: 15px; }
.clist .cl-del:hover, .clist .cl-del:focus-visible { color: #e06a5a; box-shadow: inset 0 0 0 1px #a8453a; }
@media (hover: hover) { .clist .cl-mod:hover > .cl-del { display: grid; } }
.clist .cl-mod.cl-sel { background: var(--inlay); }
.clist .cl-mod.cl-sel > .cl-del, .clist .cl-del:focus-visible { display: grid; }
.cdel-line { margin: 0 0 6px; overflow-wrap: anywhere; }

/* ---------- reactions (client/reactions.ts) ---------- */
/* Nothing shows until someone reacts: then small chips under the line, emoji and count, yours ringed in gilt.
   The smiley-plus button shows only while a line is hovered (a phone holds the line instead), in the corner the
   mod's delete uses, just left of it when both are there. */
.clist .cv-m { position: relative; flex-wrap: wrap; }
.clist .rx-add { position: absolute; top: 0; right: 0; z-index: 1; display: none; place-items: center; width: 26px; height: 22px; min-height: 0; padding: 0; border: 0; border-radius: 3px; background: var(--panel, #1d1a16); box-shadow: inset 0 0 0 1px var(--rule-soft); color: var(--muted); cursor: pointer; }
.clist .rx-add svg { width: 16px; height: 16px; }
.clist .rx-add:hover, .clist .rx-add:focus-visible, .clist .rx-open > .rx-add { color: var(--rg-rubric, var(--accent)); box-shadow: inset 0 0 0 1px var(--gilt-lo, var(--line)); }
.clist .cl-mod > .rx-add { right: 25px; }
.clist .b-show > .rx-add { top: 3px; right: 3px; }
@media (hover: hover) { .clist [data-rx-line]:hover > .rx-add { display: grid; } }
@media (hover: hover) { .clist .rx-open > .rx-add, .clist .rx-add:focus-visible { display: grid; } }
.clist .cl.rx-open { background: var(--inlay); }
/* A message bubble: the button sits just outside the bubble, so it never covers the words. */
.clist .cv-m > .rx-add { top: 50%; margin-top: -11px; }
.clist .cv-m.them > .rx-add { right: auto; left: calc(100% + 4px); }
.clist .cv-m.me > .rx-add { right: calc(100% + 4px); }
.clist .cv-m > .rx-add::before { content: ''; position: absolute; inset: 0 -6px; }

.clist .rx-row { display: flex; flex-wrap: wrap; gap: 4px; margin: 3px 0 1px; line-height: 0; }
.clist .b-show > .rx-row { margin: 3px 0 0; }
/* No width of its own, so a bubble stays as wide as its words; it takes a row to itself under them. */
.clist .cv-m > .rx-row { flex: 1 0 100%; order: 5; contain: inline-size; margin: 2px 0 1px; }
.clist .rx-chip { display: inline-flex; align-items: center; gap: 3px; height: 20px; min-height: 0; padding: 0 7px 0 4px; border: 0; border-radius: 10px; background: var(--inlay-hi); box-shadow: inset 0 0 0 1px var(--rule-soft); color: var(--muted); font: 700 11px/1 var(--sans, inherit); font-variant-numeric: tabular-nums; cursor: pointer; }
.clist .rx-chip:hover, .clist .rx-chip:focus-visible { box-shadow: inset 0 0 0 1px var(--gilt-lo, var(--line)); color: var(--ink); }
.clist .rx-chip.mine { background: color-mix(in srgb, var(--gilt, #c9a227) 30%, var(--inlay-hi)); box-shadow: inset 0 0 0 1px var(--gilt-lo, var(--line)); color: var(--ink); }
.clist .rx-chip:disabled { cursor: default; }
.rx-pic { width: 14px; height: 14px; }
.rx-pic[src^="emoji/kin/"] { width: 18px; height: 18px; margin: -2px -1px; }

/* The card: dark leather in a gilt frame, like the @ list; the six reactions, then who picked what. */
.rx-card {
  position: fixed; z-index: 61; padding: 4px; max-width: calc(100vw - 12px);
  color: var(--ink-l, #e8ecf4); border-radius: 3px; background: var(--leather-lo, #12151f);
  box-shadow: inset 0 0 0 1px var(--gilt-lo, var(--line)), 0 0 0 1px var(--edge, #000), 0 8px 18px rgba(0, 0, 0, .5);
  font-family: var(--sans, inherit);
}
.rx-opts { display: flex; gap: 2px; }
.rx-opt { display: grid; place-items: center; width: 36px; height: 36px; min-height: 0; padding: 0; border: 0; border-radius: 3px; background: none; cursor: pointer; }
.rx-opt img { width: 24px; height: 24px; transition: transform .08s; }
.rx-opt:hover, .rx-opt:focus-visible { outline: none; background: rgba(244, 233, 205, .1); }
.rx-opt:hover img { transform: scale(1.18); }
.rx-opt:active img { transform: scale(.92); }
.rx-opt.on { background: rgba(244, 233, 205, .14); box-shadow: inset 0 0 0 1px var(--gilt, var(--accent)); }
.rx-whos { display: flex; flex-direction: column; gap: 2px; width: 0; min-width: 100%; margin-top: 4px; padding: 5px 4px 2px; border-top: 1px solid rgba(244, 233, 205, .14); }
.rx-who { display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; color: var(--muted-l, #b9b3a5); }
.rx-who .rx-pic { flex: none; }
.rx-who span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (pointer: coarse) {
  .clist [data-rx-line] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
  .rx-opt { width: 40px; height: 40px; }
  .rx-opt img { width: 28px; height: 28px; }
  .clist .rx-chip { height: 24px; padding: 0 8px 0 5px; }
  .rx-pic { width: 15px; height: 15px; }
}
/* The + on the row, and every emoji behind it: tabs, then 8 by 5 (never scrolls). */
.rx-opt.rx-more { color: var(--muted-l, #b9b3a5); }
.rx-opt.rx-more svg { width: 18px; height: 18px; }
.rx-opt.rx-more:hover { color: var(--gilt-hi, #e8d29a); }
.rx-tabs { display: flex; gap: 2px; margin: 0 0 4px; padding-bottom: 4px; border-bottom: 1px solid rgba(244, 233, 205, .14); }
.rx-tab { flex: 1; display: grid; place-items: center; height: 30px; min-height: 0; padding: 0; border: 0; border-radius: 2px; background: none; cursor: pointer; }
.rx-tab img { width: 20px; height: 20px; filter: grayscale(.45) opacity(.75); }
.rx-tab:hover img, .rx-tab.on img { filter: none; }
.rx-tab.on { background: rgba(244, 233, 205, .12); box-shadow: inset 0 -2px 0 var(--gilt, var(--accent)); }
.rx-grid { display: grid; grid-template-columns: repeat(8, 34px); }
.rx-cell { display: grid; place-items: center; height: 34px; min-height: 0; padding: 0; border: 0; border-radius: 3px; background: none; cursor: pointer; }
.rx-cell img { width: 26px; height: 26px; transition: transform .08s; }
.rx-cell:hover, .rx-cell:focus-visible { outline: none; background: rgba(244, 233, 205, .1); }
.rx-cell:hover img { transform: scale(1.15); }
.rx-cell.on { background: rgba(244, 233, 205, .14); box-shadow: inset 0 0 0 1px var(--gilt, var(--accent)); }
.rx-opt:disabled, .rx-cell:disabled { opacity: .3; cursor: not-allowed; }
.rx-opt:disabled:hover, .rx-cell:disabled:hover { background: none; }
.rx-opt:disabled img, .rx-cell:disabled img { transform: none; }
@media (max-width: 400px) { .rx-grid { grid-template-columns: repeat(8, 1fr); width: calc(100vw - 20px); max-width: 300px; } .rx-cell img { width: 24px; height: 24px; } }

/* A guild tag in chat (guild.ts tagPeek) is a button: hovered it shows the guild's card, clicked it opens the guild. */
button.gpeek { display: inline; margin: 0; padding: 0; border: 0; background: none; font: inherit; letter-spacing: inherit; cursor: pointer; }
button.gpeek:focus-visible { text-decoration: underline; text-underline-offset: 2px; outline: 0; }
@media (hover: hover) { button.gpeek:hover { text-decoration: underline; text-underline-offset: 2px; } }
/* The guild's card (client/guildcard.ts): the trainer preview's frame (.ppop-tip), with the crest beside the name. */
.gct .gct-head { display: flex; align-items: center; gap: 9px; min-width: 0; }
.gct .gct-crest { flex: none; width: 34px; height: 38px; }
.gct .gct-id { min-width: 0; }
.gct .gct-name { display: flex; align-items: baseline; gap: 4px; min-width: 0; font-size: 15px; }
.gct .gct-name .gtag { flex: none; margin: 0; font-size: 12px; color: var(--gold); }
/* The tag crest's letters show at this size (guild.css hides them on the small crests). */
.gct .gd-crest.gct-crest text { display: inline; }
.gct .gct-name b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gct .gct-poster { font-size: 12px; font-style: italic; color: var(--muted); overflow-wrap: anywhere; }
.ppop-tip.gct.pinned { pointer-events: auto; }
.gct .gct-go { justify-self: start; }
