/* Chat: bottom left. At rest only the lines; the tabs, the channel and the field appear on hover / focus. Colours of the lines come from shared/chat.js. */
.chat { position: absolute; left: var(--pad); bottom: var(--pad); width: clamp(240px, 22vw, 340px); display: flex; flex-direction: column; gap: 2px; z-index: var(--z-chat); font-size: var(--fs-strong); line-height: 1.3; }
.chat-view { position: relative; }
.chat-log { height: clamp(110px, 20vh, 210px); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 4px 6px; border-radius: 6px;
  background: rgba(8, 5, 2, 0.16); scrollbar-width: none; transition: background 0.15s; }
.chat:hover .chat-log, .chat:focus-within .chat-log, .chat.open .chat-log { background: rgba(8, 5, 2, 0.6); scrollbar-width: thin; scrollbar-color: #676091 rgba(0, 0, 0, 0.3); }
.chat-line { word-break: break-word; text-shadow: -1px -1px 0 #120a04, 1px -1px 0 #120a04, -1px 1px 0 #120a04, 1px 1px 0 #120a04; }
.chat-who { font-weight: 700; }
.chat-link { cursor: pointer; font-weight: 700; }
.chat-link:hover { text-decoration: underline; }
.chat-who-menu { cursor: context-menu; }
.chat-who-menu:hover { text-decoration: underline; }
.chat-more { position: absolute; right: 8px; bottom: 4px; padding: 1px 7px; border-radius: 9px; border: 1px solid #8f8ab1; background: rgba(16, 15, 23, 0.9); color: #c9c6d9; font-size: var(--fs-small); cursor: pointer; }
.chat-row, .chat-tabs { display: none; align-items: center; gap: 4px; }
.chat:hover .chat-row, .chat:focus-within .chat-row, .chat.open .chat-row, .chat:hover .chat-tabs, .chat:focus-within .chat-tabs, .chat.open .chat-tabs { display: flex; }
.chat-chan { flex: none; min-width: 64px; padding: 2px 6px; border-radius: 5px; border: 1px solid #3c3855; background: rgba(16, 15, 23, 0.9); font-weight: 700; font-size: var(--fs-body); cursor: pointer; }
.chat-input { flex: 1; min-width: 0; padding: 3px 6px; border-radius: 5px; border: 1px solid #3c3855; background: rgba(12, 8, 4, 0.92); color: #ebeaf1; font-size: var(--fs-strong); }
.chat-input:focus { outline: 1px solid #8f8ab1; }
.chat-tab, .chat-gear { padding: 2px 10px; border-radius: 12px; border: 2px solid #211f2e; background: linear-gradient(#dfdde9, #9691b6); color: #282638; font-weight: 800; font-size: var(--fs-body); cursor: pointer; }
.chat-tab:nth-child(2) { border-color: #2f6f9c; } .chat-tab:nth-child(3) { border-color: #3c8a46; } .chat-tab:nth-child(4) { border-color: #7a4fa8; }
.chat-tab.on { background: linear-gradient(#ebeaf1, #b8b5cd); box-shadow: inset 0 -3px 0 #908bb2; }
.chat-tab.lit { animation: chat-lit 1s infinite alternate; }
@keyframes chat-lit { to { filter: brightness(1.35); box-shadow: 0 0 6px 1px #ffe44d; } }
.chat-gear { margin-left: auto; padding: 2px 7px; }
/* channel picker (right click) */
.chat-cfg { position: fixed; z-index: var(--z-menu); width: 270px; color: #1c1a28; border-radius: 6px; background: var(--gf-paper, #d1cfdf); box-shadow: 0 0 0 2px #100f17, 0 0 0 4px #4c476b, 0 0 0 5px #8f8ab1, 0 0 0 7px #100f17, 0 10px 28px rgba(0, 0, 0, 0.6); }
.cc-head { display: flex; justify-content: space-between; align-items: center; padding: 3px 6px 3px 10px; font-weight: 800; color: #ffe44d; border-radius: 5px 5px 0 0; background: linear-gradient(#76709f, #605a88 45%, #433e5e); text-shadow: 1px 1px 0 #1c1a28; }
.cc-x { width: 21px; height: 21px; border-radius: 5px; border: 2px solid #211f2e; background: linear-gradient(#dfdde9, #9691b6); color: #282638; font-weight: 800; cursor: pointer; }
.cc-list { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px; padding: 8px 10px; }
.cc-item { display: flex; align-items: center; gap: 5px; font-weight: 700; font-size: var(--fs-body); cursor: pointer; text-shadow: -1px -1px 0 #15141e, 1px 1px 0 #15141e, 1px -1px 0 #15141e, -1px 1px 0 #15141e; }
.cc-foot { display: flex; justify-content: center; gap: 12px; padding: 4px 10px 9px; }
.cc-btn { min-width: 84px; padding: 3px 10px; border-radius: 12px; border: 2px solid #211f2e; background: linear-gradient(#dfdde9, #9691b6); color: #282638; font-weight: 800; cursor: pointer; }
/* megaphone banner */
.mega-banner { position: absolute; left: 0; right: 0; top: 26%; padding: 4px 26px; box-sizing: border-box; border-radius: 4px; pointer-events: none; z-index: var(--z-banner); text-align: center; font-size: calc(17px * var(--ui-text)); line-height: 1.25; font-weight: 800; color: #cdcbdc;
  background: linear-gradient(90deg, transparent, rgba(27, 26, 38, 0.7) 8%, rgba(27, 26, 38, 0.7) 92%, transparent); text-shadow: -1px -1px 0 #14121c, 1px -1px 0 #14121c, -1px 1px 0 #14121c, 1px 1px 0 #14121c; animation: mb-in 0.25s ease-out; }
.mb-who { color: #8782ab; } .mb-icon { margin-right: 8px; }
@keyframes mb-in { from { opacity: 0; transform: scaleX(0.92); } }
.announce-band { position: absolute; left: 0; right: 0; top: calc(var(--pad) + 206px); height: 26px; overflow: hidden; background: rgba(11, 10, 16, 0.78); pointer-events: none; z-index: calc(var(--z-chat) + 1); }
.announce-band.hidden { display: none; }
.announce-band .an-text { position: absolute; top: 0; left: 0; line-height: 26px; font-size: calc(15px * var(--ui-text)); font-weight: 700; color: #9792b7; white-space: nowrap; text-shadow: var(--outline); transform: translateX(var(--an-w, 100vw)); }
@keyframes an-scroll { from { transform: translateX(var(--an-w, 100vw)); } to { transform: translateX(-100%); } }
/* The card of an object linked in the chat: centred just above the action bar, stays until its cross (or Escape) closes it. Content styled like the tooltip (rules shared in base.css). */
.link-card { position: fixed; left: 50%; transform: translateX(-50%); z-index: var(--z-popup); max-width: min(340px, 90vw); max-height: 70vh; overflow: auto; background: linear-gradient(rgba(49, 47, 65, 0.97), rgba(24, 23, 34, 0.98)); color: #ebeaf1; border-radius: 6px; padding: 10px 28px 10px 13px; font-size: var(--fs-strong); line-height: 1.4; box-shadow: 0 0 0 2px var(--surface-deep), inset 0 0 0 1px #bbb8d0, inset 0 0 0 2px #3c3854, var(--drop); }
.link-card .lc-close { position: absolute; top: 3px; right: 4px; width: 20px; height: 20px; padding: 0; line-height: 18px; border: 1px solid #3c3854; border-radius: 4px; background: rgba(0, 0, 0, 0.35); color: #dad8e5; font-size: var(--fs-lead); cursor: pointer; }
.link-card .lc-close:hover { background: #433f5f; color: #fff; }
