/* Live chat (public/chat.js): a scrolling list of short lines over a one-line send box, in the look's own colors.
   .chat-big is Boomer mode's card: bigger print, bigger box and button. */
.chat { display: flex; flex-direction: column; gap: 10px; }
.chat .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.chat-list { list-style: none; margin: 0; padding: 4px 0; max-height: 320px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 2px; }
.chat-line { position: relative; display: flex; align-items: flex-start; gap: 8px; padding: 6px 8px; border-radius: 10px; font-size: .98rem; line-height: 1.35; }
.chat-line:hover { background: var(--bg); }
.chat-av { flex: none; width: 1.5em; text-align: center; font-size: 1.05em; line-height: 1.3; }
.chat-body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.chat-who { font-weight: 700; margin-right: 2px; }
.chat-label { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: var(--bg); font-size: .72em; font-weight: 700; vertical-align: .1em; }
.chat-ago { flex: none; color: var(--muted); font-size: .78rem; font-family: var(--mono, ui-monospace, monospace); padding-top: .15em; }
.chat-x { flex: none; border: 0; background: none; color: var(--muted); font: inherit; font-size: .85rem; cursor: pointer; padding: 0 4px; min-width: 28px; min-height: 28px; }
.chat-x:hover { color: var(--warn-ink, var(--ink)); }
.chat-confirm { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: flex; gap: 6px; padding: 4px; border-radius: 10px; background: var(--surface); box-shadow: 0 2px 10px rgba(0, 0, 0, .18); border: 1px solid var(--line); }
.chat-confirm button { font: inherit; font-size: .82rem; font-weight: 700; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.chat-confirm [data-act="block"] { border-color: var(--warn-ink, var(--accent)); color: var(--warn-ink, var(--accent)); }
.chat-empty { padding: 14px 8px; color: var(--muted); text-align: center; }
.chat-form { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.chat-row { display: flex; gap: 8px; }
.chat-form input { font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; box-sizing: border-box; }
.chat-form input:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.chat-name { width: 100%; }
.chat-text { flex: 1; }
.chat-send { flex: none; font: inherit; font-weight: 700; padding: 10px 18px; border-radius: 10px; border: 2px solid var(--accent); background: var(--accent); color: var(--bg); cursor: pointer; }
.chat-send:disabled { opacity: .6; cursor: default; }
.chat-msg { min-height: 1em; color: var(--muted); font-size: .85rem; }
.chat-msg:empty { display: none; }
.chat-msg.err { color: var(--warn-ink, var(--ink)); }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.chat-live { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono, ui-monospace, monospace); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.chat-live i { width: 8px; height: 8px; border-radius: 50%; background: #d4452b; animation: chat-pulse 2s ease-in-out infinite; }
@keyframes chat-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .chat-live i { animation: none; } }
.chat-tv { font-size: .9rem; font-weight: 700; color: var(--accent); text-decoration: none; }
.chat-tv:hover { text-decoration: underline; }
#chat .chat { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 12px; margin-top: 12px; }

/* Boomer mode: one message per line in big print, a tall box and a big Send */
.chat-big .chat-list { max-height: none; overflow: visible; gap: 6px; }
.chat-big .chat-line { font-size: 1.3rem; padding: 8px 4px; border-bottom: 2px solid var(--line); border-radius: 0; }
.chat-big .chat-line:last-child { border-bottom: 0; }
.chat-big .chat-ago { font-size: 1rem; }
.chat-big .chat-x { font-size: 1.2rem; min-width: 44px; min-height: 44px; }
.chat-big .chat-form input { font-size: 1.3rem; padding: 14px 16px; border-width: 3px; border-radius: 14px; }
.chat-big .chat-row { flex-direction: column; }
.chat-big .chat-send { font-size: 1.4rem; font-weight: 800; min-height: 64px; border-radius: 18px; border-width: 3px; }
.chat-big .chat-msg { font-size: 1.1rem; }
.chat-big .chat-empty { font-size: 1.2rem; }
