/* Live chat beside the Twitch stream (Dr-Disco page). Light card, like the stream card. */
.live-grid { max-width: 760px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
.live-grid > * { min-width: 0; }
.live-grid.has-chat { max-width: 1120px; }
@media (min-width: 960px) {
  .live-grid.has-chat { grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); align-items: stretch; }
}
.chat-card { position: relative; display: flex; flex-direction: column; padding: 1.1rem 1.1rem 1rem; min-height: 0; }
.chat-card[hidden] { display: none; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.chat-head h3 { font-size: 1.1rem; color: var(--text); margin: 0; }
.chat-live { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.8rem; font-weight: 600; color: #b42318; }
.chat-live::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #e11d48; box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.2); }
.chat-rules { font-size: 0.8rem; color: var(--text-muted); margin: 0.35rem 0 0.6rem; }
.chat-list { list-style: none; margin: 0; padding: 0.4rem 0.2rem 0.4rem 0; flex: 1 1 auto; min-height: 300px; max-height: 460px; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
@media (max-width: 959px) { .chat-list { height: 340px; flex: none; } }
.chat-msg { position: relative; padding: 0.35rem 2rem 0.35rem 0.45rem; border-radius: 8px; line-height: 1.4; font-size: 0.95rem; color: var(--text); overflow-wrap: anywhere; }
.chat-msg[hidden] { display: none; }
.chat-msg:hover { background: rgba(58, 42, 24, 0.05); }
.chat-msg.is-owner { background: rgba(179, 67, 104, 0.1); }
.chat-msg.is-mention { box-shadow: inset 3px 0 0 #b34368; background: rgba(179, 67, 104, 0.06); }
.chat-name { font-weight: 700; margin-right: 0.4rem; }
.chat-badge { display: inline-block; font-size: 0.75rem; font-weight: 700; color: #fff; background: #b34368; border-radius: 999px; padding: 0.05rem 0.5rem; margin-right: 0.4rem; vertical-align: 1px; }
.chat-time { display: block; font-size: 0.72rem; color: var(--text-faint); }
.chat-more { position: absolute; right: 0.15rem; top: 0.2rem; width: 30px; height: 30px; border: 0; background: none; color: var(--text-muted); border-radius: 6px; cursor: pointer; font-size: 1.1rem; line-height: 1; opacity: 0.55; }
.chat-msg:hover .chat-more, .chat-more:focus-visible { opacity: 1; background: rgba(58, 42, 24, 0.08); }
@media (hover: none) { .chat-more { opacity: 1; } }
.chat-new { position: absolute; left: 50%; transform: translateX(-50%); bottom: 7.2rem; z-index: 2; border: 0; border-radius: 999px; padding: 0.4rem 0.9rem; background: #241b10; color: #fdfaf3; font: 600 0.8rem Inter, system-ui, sans-serif; cursor: pointer; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25); }
.chat-new[hidden] { display: none; }
.chat-form { margin-top: 0.75rem; }
.chat-form[hidden], .chat-join[hidden] { display: none; }
.chat-row { display: flex; gap: 0.5rem; }
.chat-field { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 0.7rem 0.8rem; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--text); min-height: 44px; }
.chat-field:focus { outline: 2px solid #b34368; outline-offset: 1px; }
.chat-card .btn { min-height: 44px; }
.chat-meta { display: flex; justify-content: space-between; gap: 0.5rem; margin-top: 0.4rem; font-size: 0.8rem; color: var(--text-muted); }
.chat-error { color: #b42318; font-size: 0.85rem; margin: 0.4rem 0 0; }
.chat-error[hidden] { display: none; }
.chat-link { border: 0; background: none; padding: 0; font: inherit; color: #b34368; text-decoration: underline; cursor: pointer; }
.chat-join { margin-top: 0.75rem; }
.chat-join-label { display: block; font-size: 0.9rem; color: var(--text); margin-bottom: 0.45rem; }
.chat-join-row { display: flex; gap: 0.5rem; margin-bottom: 0.4rem; }
/* the menu and the message line sit inside the card, so they take its light colours */
.chat-menu { position: absolute; z-index: 5; min-width: 230px; max-width: 290px; background: #fdfaf3; border: 1px solid rgba(58, 42, 24, 0.2); border-radius: 12px; padding: 6px; box-shadow: 0 14px 34px rgba(36, 27, 16, 0.22); }
.chat-menu p { margin: 6px 10px 4px; font-size: 0.75rem; color: #6d5c46; }
.chat-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; color: #241b10; font: 0.9rem Inter, system-ui, sans-serif; padding: 9px 10px; border-radius: 8px; cursor: pointer; min-height: 40px; }
.chat-menu button:hover, .chat-menu button:focus-visible { background: rgba(58, 42, 24, 0.08); outline: none; }
.chat-menu .is-quiet { color: #6d5c46; }
.chat-toast { position: absolute; left: 0.75rem; right: 0.75rem; bottom: 0.75rem; z-index: 6; background: #241b10; color: #fdfaf3; padding: 0.6rem 0.8rem; border-radius: 10px; font-size: 0.85rem; }
.chat-toast[hidden] { display: none; }
.chat-card .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chat-list:empty::before { content: "No messages yet. Say hello!"; display: block; padding: 1.5rem 0.5rem; text-align: center; color: var(--text-faint); font-size: 0.9rem; }

/* song requests */
.chat-req-btn { display: inline-flex; align-items: center; gap: 0.45rem; margin-top: 0.55rem; min-height: 40px; padding: 0 0.9rem; border-radius: 999px; border: 1px solid rgba(179, 67, 104, 0.45); background: rgba(179, 67, 104, 0.07); color: #8f2f50; font: 600 0.88rem Inter, system-ui, sans-serif; cursor: pointer; }
.chat-req-btn[hidden] { display: none; }
.chat-req-btn:hover, .chat-req-btn:focus-visible { background: rgba(179, 67, 104, 0.14); outline: none; }
.chat-req-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.chat-msg.is-request { background: rgba(58, 42, 24, 0.04); }
.chat-req { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.35rem; padding: 0.4rem; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.chat-req img { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; flex: none; }
.chat-req-title { flex: 1; min-width: 0; font-weight: 600; line-height: 1.25; }
.chat-req-status { flex: none; font-size: 0.72rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 999px; background: #f3ead9; color: #6d5c46; }
.chat-req-status.is-played { background: #dcfce7; color: #166534; }
.chat-req-status.is-skipped { background: #f1f1f1; color: #6b7280; }
.chat-reqs { margin: 0 0 0.5rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.chat-reqs[hidden] { display: none; }
.chat-reqs-head { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 0.6rem 0.75rem; font: 700 0.88rem Inter, system-ui, sans-serif; color: #8f2f50; cursor: pointer; min-height: 40px; }
.chat-reqs-head::after { content: " \25BE"; }
.chat-reqs-head[aria-expanded="false"]::after { content: " \25B8"; }
.chat-reqs-list { list-style: none; margin: 0; padding: 0 0.6rem 0.5rem; max-height: 190px; overflow-y: auto; }
.chat-reqs-list li { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0; border-top: 1px solid var(--line); }
.chat-reqs-list img { width: 34px; height: 34px; border-radius: 4px; object-fit: cover; flex: none; }
.chat-reqs-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.chat-reqs-text b { font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-reqs-text small { color: var(--text-muted); font-size: 0.75rem; }
.chat-reqs-list .btn { min-height: 34px; padding: 0 0.7rem; font-size: 0.8rem; }
.chat-picker { position: absolute; inset: 0.6rem 0.6rem auto; max-height: min(calc(100% - 1.2rem), calc(100vh - 100px)); z-index: 7; display: flex; flex-direction: column; gap: 0.5rem; padding: 0.85rem; background: #fdfaf3; border: 1px solid rgba(58, 42, 24, 0.2); border-radius: 14px; box-shadow: 0 18px 40px rgba(36, 27, 16, 0.25); }
.chat-picker[hidden] { display: none; }
.chat-picker-head { display: flex; justify-content: space-between; align-items: center; color: #241b10; }
.chat-picker-list { flex: 1; min-height: 0; overflow-y: auto; }
.chat-picker-genre { margin: 0.6rem 0 0.25rem; font-size: 0.75rem; font-weight: 700; color: #6d5c46; text-transform: uppercase; letter-spacing: 0.04em; }
.chat-picker-item { display: flex; align-items: center; gap: 0.6rem; width: 100%; text-align: left; border: 0; background: none; padding: 0.35rem; border-radius: 8px; cursor: pointer; color: #241b10; font: 0.92rem Inter, system-ui, sans-serif; min-height: 48px; }
.chat-picker-item:hover, .chat-picker-item:focus-visible { background: rgba(58, 42, 24, 0.07); outline: none; }
.chat-picker-item img { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; flex: none; }
.chat-picker .chat-field { flex: none; }
.chat-badge.is-mod { background: #2c5f8a; }
.chat-msg.is-mod { background: rgba(44, 95, 138, 0.06); }

/* emojis and shortcuts */
.chat-tools { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.55rem; align-items: center; }
.chat-tools .chat-req-btn { margin-top: 0; }
.chat-tool { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 40px; padding: 0 0.75rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: #241b10; font: 600 0.85rem Inter, system-ui, sans-serif; cursor: pointer; }
.chat-tool:hover, .chat-tool:focus-visible, .chat-tool[aria-expanded="true"] { border-color: rgba(179, 67, 104, 0.5); outline: none; }
.chat-tool-bang { font: 900 1rem Anton, "Arial Narrow", sans-serif; color: #b34368; }
@media (max-width: 400px) { .chat-tool-text { display: none; } .chat-tool { padding: 0 0.7rem; } }
.chat-form { position: relative; }
.chat-pop { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 8; max-height: 260px; overflow-y: auto; background: #fdfaf3; border: 1px solid rgba(58, 42, 24, 0.2); border-radius: 14px; padding: 0.5rem; box-shadow: 0 14px 34px rgba(36, 27, 16, 0.22); }
.chat-pop[hidden] { display: none; }
.chat-pop[data-chat-emoji] { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 2px; }
.chat-pop[data-chat-emoji][hidden] { display: none; }
.chat-emoji { border: 0; background: none; font-size: 1.45rem; line-height: 1; height: 44px; border-radius: 8px; cursor: pointer; }
.chat-emoji:hover, .chat-emoji:focus-visible { background: rgba(58, 42, 24, 0.08); outline: none; }
.chat-pop-note { margin: 0.2rem 0.4rem 0.4rem; font-size: 0.78rem; color: #6d5c46; }
.chat-shout-item { display: flex; align-items: center; gap: 0.6rem; width: 100%; text-align: left; border: 0; background: none; padding: 0.45rem 0.5rem; border-radius: 8px; cursor: pointer; min-height: 44px; color: #241b10; font: 0.92rem Inter, system-ui, sans-serif; }
.chat-shout-item:hover, .chat-shout-item:focus-visible { background: rgba(58, 42, 24, 0.08); outline: none; }
.chat-shout-item code { flex: none; min-width: 5.2rem; font: 700 0.85rem ui-monospace, Menlo, monospace; color: #b34368; }
.chat-msg.is-shout { background: linear-gradient(90deg, rgba(179, 67, 104, 0.1), transparent); }
.chat-shout { display: inline-block; font: 400 1.25rem/1.1 Anton, "Arial Narrow", sans-serif; text-transform: uppercase; letter-spacing: 0.03em; color: #b34368; animation: chat-pop 0.45s ease-out; }
@keyframes chat-pop { 0% { transform: scale(0.6); opacity: 0; } 70% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .chat-shout { animation: none; } }

/* who is here */
.chat-head-right { display: inline-flex; align-items: center; gap: 0.6rem; }
.chat-here-btn { border: 1px solid var(--line); background: #fff; color: #241b10; border-radius: 999px; padding: 0 0.7rem; min-height: 32px; font: 600 0.8rem Inter, system-ui, sans-serif; cursor: pointer; }
.chat-here-btn[hidden] { display: none; }
.chat-here-btn:hover, .chat-here-btn:focus-visible, .chat-here-btn[aria-expanded="true"] { border-color: rgba(179, 67, 104, 0.5); outline: none; }
.chat-here { margin: 0.5rem 0 0.2rem; padding: 0.6rem 0.75rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; max-height: 180px; overflow-y: auto; }
.chat-here[hidden] { display: none; }
.chat-here-names { list-style: none; margin: 0 0 0.35rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; font-size: 0.9rem; color: #241b10; }
.chat-here-names li { display: inline-flex; align-items: center; gap: 0.3rem; }
.chat-here-names .chat-badge { margin-right: 0; }
.chat-here-more { margin: 0; font-size: 0.8rem; color: #6d5c46; }

/* any song requests */
.chat-any label { display: block; font-size: 0.85rem; font-weight: 600; color: #241b10; margin-bottom: 0.3rem; }
.chat-any .chat-field { flex: 1; }
.chat-picker-or { margin: 0.2rem 0 0; font-size: 0.75rem; font-weight: 700; color: #6d5c46; text-transform: uppercase; letter-spacing: 0.04em; }
.chat-req-note { width: 40px; height: 40px; flex: none; border-radius: 4px; display: grid; place-items: center; background: #f3ead9; color: #b34368; font-size: 1.3rem; }
.chat-req-note.is-small { width: 34px; height: 34px; font-size: 1.1rem; }
.chat-req-switch[hidden] { display: none; }
.chat-req-switch[aria-pressed="false"] { color: #6d5c46; }
