/* The chat, tangibles.fun's (owner 2026-10-21: "make the chat box like this"): their .hud-bl / .chat-log / .chat-tab /
   .chat-ch / input rules from their player stylesheet, at their sizes and colours, in the site's font (Lato).
   Loaded after hud.css, so these rules win over the old .mp-chat ones. */
#mpHud .hud-bl {
  --cream-85: #f3edd3d9; --line: #f3edd329; --line-hi: #f3edd352; --paper-hi: #fbf7e6; --charcoal: #2a2a2e; --glass: #1e1e23a8; --hp: #3fc07a;
  position: absolute; left: 86px; right: auto; bottom: 14px; width: 300px; max-width: calc(100vw - 100px);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; text-shadow: none; font-family: var(--fontFamily-default); pointer-events: none;
}
/* the log: closed, the last six lines as pills that dim and go; open, a scrolling panel with every line */
#mpHud .hud-bl .chat-log { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; font-size: 13px; line-height: 1.3; color: #f3edd3; text-shadow: 0 1px 3px #000; overflow-wrap: anywhere; max-height: none; mask-image: none; -webkit-mask-image: none; padding: 0; }
#mpHud .hud-bl .chat-log div { background: #0a0d148c; border-radius: 8px; width: fit-content; max-width: 100%; box-sizing: border-box; padding: 3px 8px; transition: opacity 1s; }
#mpHud .hud-bl .chat-log div.old { opacity: .45; }
#mpHud .hud-bl:not(.open) .chat-log div:is(.gone, :nth-last-child(n+7)) { display: none; }
/* the Local tab: only lines from your island (a payout from any island is World only) */
#mpHud .hud-bl .chat-log.local div:not(.here) { display: none; }
#mpHud .hud-bl .chat-log b { color: #fff; font-weight: 700; }
#mpHud .hud-bl.open .chat-log { pointer-events: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-hi) transparent;
  background: #0a0d1473; border-radius: 10px; align-content: start; max-height: min(320px, 45vh); padding: 6px; overflow: hidden auto; }
#mpHud .hud-bl.open .chat-log div { opacity: 1; background: none; padding: 1px 2px; }
/* the tags */
#mpHud .hud-bl .chat-log span.chtag { font-weight: 700; }
#mpHud .hud-bl .chat-log span.chtag.world { color: #f3edd399; }
#mpHud .hud-bl .chat-log span.chtag.system { color: #8fd0ff; }
#mpHud .hud-bl .chat-log span.lobby { font-variant-numeric: tabular-nums; color: #f3edd38c; margin-right: 5px; font-weight: 700; }
#mpHud .hud-bl .chat-log div.here span.lobby { color: var(--hp); }
#mpHud .hud-bl .chat-log span.at { color: #8fd0ff; font-weight: 700; }
#mpHud .hud-bl .chat-log span.at.me { color: #fff; background: #50a0ff73; border-radius: 4px; padding: 0 3px; }
#mpHud .hud-bl .chat-log div.atme, #mpHud .hud-bl.open .chat-log div.atme { background: #285faa9e; padding-left: 8px; box-shadow: inset 3px 0 #8fd0ff; }
#mpHud .hud-bl .chat-log div.atme.old { opacity: .75; }
#mpHud .hud-bl .chat-log div.coin { color: #fff1c9; background: #463006cc; border: 1px solid #ffc44099; font-weight: 600; }
#mpHud .hud-bl .chat-log div.coin b { color: #ffc440; text-shadow: 0 0 6px #ffc44080, 0 1px 3px #000; }
#mpHud .hud-bl.open .chat-log div.coin { padding: 2px 6px; background: #463006cc; }
#mpHud .hud-bl .chat-log div.coin:before { content: attr(data-tag); letter-spacing: .06em; color: #2a1c00; background: linear-gradient(#ffe08a, #f5a623); border-radius: 999px; margin-right: 6px; padding: 1px 6px; font-size: 10px; font-weight: 800; text-shadow: none; }
#mpHud .hud-bl .chat-log div.coin a { color: #ffc440; }
/* the tabs, only while open */
#mpHud .hud-bl .chat-tabs { display: none; gap: 4px; }
#mpHud .hud-bl.open .chat-tabs { pointer-events: auto; display: flex; }
#mpHud .hud-bl .chat-tab { all: unset; box-sizing: border-box; border: 1px solid var(--line); color: var(--cream-85); cursor: pointer; background: #0a0d148c; border-radius: 999px; padding: 3px 10px; font: 700 12px/1.3 var(--fontFamily-default); }
#mpHud .hud-bl .chat-tab.on { background: var(--paper-hi); color: var(--charcoal); border-color: var(--paper-hi); }
/* the input: the channel in bold at its left */
#mpHud .hud-bl .chat-in { position: relative; display: grid; min-width: 0; margin: 0; padding: 0; pointer-events: auto; }
#mpHud .hud-bl .chat-ch { all: unset; position: absolute; z-index: 1; top: 50%; left: 9px; transform: translateY(-50%); max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--cream-85); cursor: pointer; font: 800 13px/1 var(--fontFamily-default); }
#mpHud .hud-bl .chat-in input { all: unset; box-sizing: border-box; width: 100%; border: 1px solid var(--line); opacity: .6; background: #0a0d1480; border-radius: 10px; padding: 7px 10px;
  font: 400 13px/1.3 var(--fontFamily-default); color: #f3edd3; transition: opacity .15s, background .15s, border-color .15s; }
#mpHud .hud-bl .chat-in input::placeholder { color: #f3edd380; font-style: normal; }
#mpHud .hud-bl .chat-in input:focus { opacity: 1; border-color: var(--line-hi); background: var(--glass); }
@media (max-width: 760px), (pointer: coarse) {
  #mpHud .hud-bl { left: 70px; bottom: 100px; width: min(300px, calc(100vw - 210px)); max-width: none; }   /* right of the icon rail, over the Throw button, left of Race / Battle */
  #mpHud .hud-bl:not(.open) .chat-log div:nth-last-child(n+4) { display: none; }
  #mpHud .hud-bl:not(.open) .chat-in { display: none; }
  #mpHud .hud-bl.open { background: #1e1e23cc; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); width: min(480px, calc(100vw - 24px)); z-index: 32; border-radius: 14px; padding: 8px; top: 56px; bottom: auto; left: 50%; transform: translate(-50%); }
  #mpHud .hud-bl.open .chat-log { max-height: min(220px, 34vh); }
  #mpHud .hud-bl .chat-in input { font-size: 16px; }
  #mpHud .hud-bl .chat-tab { padding: 7px 16px; font-size: 13px; }
  #mpHud .hud-bl .mp-chatbtn { pointer-events: auto; justify-self: start; }
  #mpHud .hud-bl.open .mp-chatbtn { display: none; }
}
