/* 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: 12; font-size: 13px; 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: #b27a3f 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 #f1c04a; background: rgba(30, 16, 8, 0.9); color: #ffe9a0; font-size: 11px; 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 #6b4a22; background: rgba(30, 16, 8, 0.9); font-weight: 700; font-size: 12px; cursor: pointer; }
.chat-input { flex: 1; min-width: 0; padding: 3px 6px; border-radius: 5px; border: 1px solid #6b4a22; background: rgba(12, 8, 4, 0.92); color: #fff6dc; font-size: 13px; }
.chat-input:focus { outline: 1px solid #f1c04a; }
.chat-tab, .chat-gear { padding: 2px 10px; border-radius: 12px; border: 2px solid #3b2412; background: linear-gradient(#f6ead0, #cdb27a); color: #4a2f14; font-weight: 800; font-size: 12px; 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(#fff6dc, #e8d29a); box-shadow: inset 0 -3px 0 #f1b84c; }
.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: 60; width: 270px; color: #3a2208; border-radius: 6px; background: var(--gf-paper, #eadfc4); box-shadow: 0 0 0 2px #1e1008, 0 0 0 4px #8a5a28, 0 0 0 5px #f1c04a, 0 0 0 7px #1e1008, 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(#c58d4a, #a8743a 45%, #7a4c22); text-shadow: 1px 1px 0 #3a2208; }
.cc-x { width: 21px; height: 21px; border-radius: 5px; border: 2px solid #3b2412; background: linear-gradient(#f6ead0, #cdb27a); color: #4a2f14; 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: 12px; cursor: pointer; text-shadow: -1px -1px 0 #2a1608, 1px 1px 0 #2a1608, 1px -1px 0 #2a1608, -1px 1px 0 #2a1608; }
.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 #3b2412; background: linear-gradient(#f6ead0, #cdb27a); color: #4a2f14; font-weight: 800; cursor: pointer; }
/* megaphone banner */
.mega-banner { position: absolute; left: 50%; top: 26%; transform: translateX(-50%); max-width: min(760px, 86vw); padding: 3px 26px; border-radius: 4px; pointer-events: none; z-index: 14; text-align: center; font-size: 17px; line-height: 1.25; font-weight: 800; color: #ffd9a8;
  background: linear-gradient(90deg, transparent, rgba(60, 24, 4, 0.62) 12%, rgba(60, 24, 4, 0.62) 88%, transparent); text-shadow: -1px -1px 0 #2a1004, 1px -1px 0 #2a1004, -1px 1px 0 #2a1004, 1px 1px 0 #2a1004; animation: mb-in 0.25s ease-out; }
.mb-who { color: #ff9a2e; } .mb-icon { margin-right: 8px; }
@keyframes mb-in { from { opacity: 0; transform: translateX(-50%) scale(0.92); } }
.announce-band { position: absolute; left: 0; right: 0; top: 34px; height: 26px; overflow: hidden; background: rgba(20, 12, 6, 0.78); pointer-events: none; z-index: 13; }
.announce-band.hidden { display: none; }
.announce-band .an-text { position: absolute; top: 0; left: 0; line-height: 26px; font-size: 15px; font-weight: 700; color: #ffd24a; white-space: nowrap; text-shadow: var(--outline); transform: translateX(100vw); }
@keyframes an-scroll { from { transform: translateX(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: 2147482000; max-width: min(340px, 90vw); max-height: 70vh; overflow: auto; background: linear-gradient(rgba(74, 58, 38, 0.97), rgba(40, 29, 17, 0.98)); color: #fff6dc; border-radius: 6px; padding: 10px 28px 10px 13px; font-size: 13px; line-height: 1.4; box-shadow: 0 0 0 2px var(--wood-dark), inset 0 0 0 1px #e6d3a2, inset 0 0 0 2px #6b4421, var(--drop); }
.link-card .lc-close { position: absolute; top: 3px; right: 4px; width: 20px; height: 20px; padding: 0; line-height: 18px; border: 1px solid #6b4421; border-radius: 4px; background: rgba(0, 0, 0, 0.35); color: #f1e7cc; font-size: 14px; cursor: pointer; }
.link-card .lc-close:hover { background: #7a3a24; color: #fff; }
