/* 全服聊天: battle-stage bubble, @peek, horn marquee, chat sheet */

/* ---- on the battle stage ---- */
.cht-btn { position: absolute; left: 6px; bottom: 40px; z-index: 3; width: 32px; height: 27px; padding: 0; border: 0; display: grid; place-items: center; background: rgba(14, 8, 24, 0.72); box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px rgba(255, 255, 255, 0.18); cursor: pointer; }
.cht-btn img { width: 22px; height: 16px; image-rendering: pixelated; }
.cht-btn i { position: absolute; top: -7px; right: -9px; min-width: 15px; padding: 1px 3px; font: 700 10px/1.1 var(--font-px); font-style: normal; color: #fff; background: var(--bad); box-shadow: 0 0 0 1px var(--edge); text-align: center; }
.cht-btn i[hidden] { display: none; }
.cht-peek { position: absolute; left: 42px; bottom: 40px; z-index: 3; max-width: 62%; padding: 3px 7px; font-size: 12px; line-height: 1.35; color: #2a1a10; background: #fff6e6; box-shadow: 0 0 0 1px var(--edge), 0 3px 0 0 rgba(0, 0, 0, 0.35); pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cht-peek b { color: #8a3a10; }
.cht-peek .cht-at { color: #2a6ad0; }
.cht-peek.pop { animation: pop 0.22s steps(4); }
/* lives in #news (the sky strip of the fight, under the message line): see-through, fades out at both ends */
.cht-mq { position: relative; width: 100%; height: 20px; overflow: hidden; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(72, 16, 62, 0.5) 14%, rgba(36, 10, 50, 0.5) 86%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); }
.cht-mq::before, .cht-mq::after { content: ""; position: absolute; left: 10%; right: 10%; height: 1px; background: rgba(255, 211, 90, 0.55); }
.cht-mq::before { top: 0; }
.cht-mq::after { bottom: 0; }
.cht-mq span { position: absolute; top: 2px; left: 100%; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-size: 12.5px; color: #fff; text-shadow: 0 1px 0 #000, 1px 0 0 #000, -1px 0 0 #000; }
.cht-mq span img { width: 15px; height: 12px; image-rendering: pixelated; }
.cht-mq.go span { animation: chtMq 6.4s linear forwards; }
.cht-mq .so-nl { flex-wrap: nowrap; }
@keyframes chtMq { from { left: 100%; transform: translateX(0); } to { left: 0; transform: translateX(-100%); } }

/* ---- the sheet ---- */
.modal-box.cht-box { height: 82vh; height: 82dvh; max-height: 82dvh; display: flex; flex-direction: column; padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px)); overflow: hidden; }
.cht { display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 0; }
.cht-head { display: flex; align-items: center; gap: 6px; }
.cht-tabs { flex: 1; min-width: 0; }
.cht-tabs button { position: relative; }
.cht-pk { flex: none; font-size: 11px; }
.cht-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.cht-list { flex: 1; min-height: 0; overflow-y: auto; list-style: none; margin: 0; padding: 6px 4px; display: flex; flex-direction: column; gap: 9px; background: rgba(0, 0, 0, 0.2); box-shadow: inset 0 0 0 1px var(--line); overscroll-behavior: contain; scrollbar-width: thin; }
.cht-m { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px; align-items: start; }
.cht-m.me { grid-template-columns: minmax(0, 1fr) auto; }
.cht-m.me > .so-ava { order: 2; }
.cht-b { display: grid; gap: 2px; justify-items: start; min-width: 0; }
.cht-m.me .cht-b { justify-items: end; }
.cht-who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; }
.cht-m.me .cht-who { justify-content: flex-end; }
.cht-who small { font-size: 10px; color: var(--muted); }
.cht-txt { max-width: 100%; padding: 5px 9px; font-size: 13px; line-height: 1.45; word-break: break-all; background: var(--plate); box-shadow: var(--px); }
.cht-m.me .cht-txt { background: #22361e; }
.cht-m.vipb .cht-txt { box-shadow: var(--px), inset 0 0 0 1px var(--gold); background: linear-gradient(#3a2a14, #241a10); }
.cht-m.horn .cht-txt { background: linear-gradient(#5a1a46, #2e0e2a); box-shadow: var(--px), inset 0 0 0 1px #ff8ad8, 0 0 10px rgba(255, 138, 216, 0.35); color: #ffe6f6; }
.cht-hi { width: 15px; height: 12px; margin-right: 4px; vertical-align: -1px; image-rendering: pixelated; }
.cht-at { font-weight: normal; color: #8ad0ff; }
.cht-at.me { color: #2a1206; background: var(--gold); padding: 0 2px; }
.cht-sys { align-self: center; max-width: 94%; display: grid; justify-items: center; gap: 4px; padding: 4px 10px; font-size: 12px; line-height: 1.45; text-align: center; background: rgba(255, 211, 90, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 211, 90, 0.25); }
.cht-sys.big { font-size: 13px; background: radial-gradient(circle at 50% 0%, rgba(255, 211, 90, 0.22), transparent 70%), rgba(40, 20, 10, 0.6); box-shadow: inset 0 0 0 1px var(--gold), 0 0 10px rgba(255, 211, 90, 0.25); }
.cht-sys-t { font: 10px var(--font-cn); font-style: normal; color: #2a1206; background: var(--gold); padding: 0 5px; }
.cht-v { color: #c49aff; }
.cht-card { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 6px; align-items: center; max-width: 240px; margin-top: 2px; padding: 3px 9px 3px 3px; border: 0; text-align: left; color: var(--text); background: #120c1a; box-shadow: inset 0 0 0 1px var(--qc), inset 3px 0 0 0 var(--qc); cursor: pointer; font: inherit; }
.cht-card img { width: 30px; height: 30px; object-fit: contain; image-rendering: pixelated; }
.cht-card span { display: grid; min-width: 0; }
.cht-card b { font: 13px var(--font-cn); font-weight: normal; color: var(--qc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cht-card small { font-size: 10px; color: var(--muted); }
.cht-quick { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: none; }
.cht-quick::-webkit-scrollbar { display: none; }
.cht-quick button { flex: none; border: 0; padding: 3px 9px; font: 12px var(--font-cn); color: var(--text); background: var(--plate); box-shadow: var(--px); }
.cht-in { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; align-items: center; flex: none; }
.cht-in.g { grid-template-columns: minmax(0, 1fr) auto; }
.cht-in .txt { min-width: 0; }
.cht-horn { display: grid; justify-items: center; gap: 0; padding: 3px 6px 2px; border: 0; background: var(--plate); box-shadow: var(--px); color: var(--muted); font: 10px var(--font-cn); }
.cht-horn img { width: 17px; height: 13px; image-rendering: pixelated; filter: grayscale(0.7) brightness(0.8); }
.cht-horn.on { background: linear-gradient(#5a1a46, #2e0e2a); color: var(--gold); box-shadow: var(--px), inset 0 0 0 1px #ff8ad8; }
.cht-horn.on img { filter: none; }
.cht-note { margin: 0; text-align: center; }
.cht-empty { flex: 1; display: grid; align-content: center; justify-items: center; gap: 8px; padding: 20px; text-align: center; background: rgba(0, 0, 0, 0.2); box-shadow: inset 0 0 0 1px var(--line); }
.cht-empty img { width: 44px; height: 32px; object-fit: contain; image-rendering: pixelated; }
.cht-empty p { margin: 0; }
.cht-noava img { width: 22px !important; height: 22px !important; }
.cht-cardv { display: grid; justify-items: center; gap: 4px; padding: 14px; text-align: center; background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--qc) 30%, transparent), transparent 65%), #120c1a; box-shadow: var(--px), inset 0 0 0 1px var(--qc); }
.cht-cardv img { width: 72px; height: 72px; object-fit: contain; image-rendering: pixelated; }
.cht-cardv b { font: 20px var(--font-cn); font-weight: normal; color: var(--qc); }
.cht-cardv small { color: var(--muted); }

/* the sender's 对话框 decorates the words; its corner ornaments need room */
.cht-txt { position: relative; }
.cht-txt[class*="bb-"] { margin: 3px 5px 4px; }
