/* ==================================================================== */
/* SCOPED COMMS & MILESTONES STYLESHEET (High-Contrast Layered Cards)   */
/* ==================================================================== */

/* ---------- Feed container: isolate repaints ---------- */
.hud-comms-feed, #chat-feed, .chat-messages {
  contain: layout paint style;
  overflow-y: auto;
}
.hud-comms-msg {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-height: fit-content;
}

/* ---------- Chat line ---------- */
.chat-msg { padding: 2px 0; }
.chat-msg .msg-channel-tag { color: #64748b; font-size: 0.62rem; }
.chat-msg .sender { font-weight: 700; }
.chat-msg .lvl { color: #94a3b8; font-size: 0.62rem; }
.chat-msg .msg-text { color: #e2e8f0; font-size: 0.78rem; line-height: 1.35; word-break: break-word; }

/* ---------- Scoped Achievement Card (.cx-card) ---------- */
.cx-card {
  --accent: #38bdf8;
  --tint: rgba(56,189,248,.14);
  --quote: #cbd5e1;
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin: 8px 0;
  padding: 8px 10px 9px;
  text-align: left;
  font-family: inherit;
  background: linear-gradient(135deg, var(--tint) 0%, rgba(11,16,28,.95) 70%);
  border: 1px solid rgba(255,255,255,.10);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
  flex-shrink: 0;
  min-height: fit-content;
}
.cx-card, .cx-card *, .cx-card *::before, .cx-card *::after { box-sizing: border-box; }

/* 1. Title */
.cx-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.cx-emoji {
  flex-shrink: 0;
  font-size: .95rem;
  line-height: 1;
}
.cx-title {
  color: var(--accent);
  font-family: 'Orbitron', sans-serif;
  font-size: .68rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* 2. Flavor line */
.cx-lead {
  color: #94a3b8;
  font-size: .68rem;
  line-height: 1.35;
  margin-bottom: 5px;
}

/* 3. Main line with chips */
.cx-main {
  color: #e2e8f0;
  font-size: .74rem;
  line-height: 1.9;
}
.cx-name, .cx-chip {
  display: inline-block;
  padding: 0 6px;
  margin: 0 1px;
  line-height: 1.5;
  font-weight: 800;
  border-radius: 4px;
  overflow-wrap: anywhere;
}
.cx-name {
  color: #00f0ff;
  border: 1px solid #00f0ff;
  background: rgba(0,240,255,.08);
}
.cx-chip {
  color: var(--accent);
  border: 1px solid var(--accent);
  background: rgba(255,255,255,.05);
}

/* 4. Quote */
.cx-quote {
  margin-top: 6px;
  padding-left: 7px;
  border-left: 2px solid var(--accent);
  color: var(--quote);
  font-style: italic;
  font-size: .68rem;
  line-height: 1.35;
}

/* Themes */
.ann-centipede { --accent:#34d399; --tint:rgba(16,185,129,.16);  --quote:#6ee7b7; }
.ann-leviathan { --accent:#c084fc; --tint:rgba(168,85,247,.16);  --quote:#d8b4fe; }
.ann-oberon    { --accent:#fb7185; --tint:rgba(244,63,94,.16);   --quote:#fda4af; }
.ann-gold      { --accent:#ffd700; --tint:rgba(255,215,0,.16);   --quote:#fef08a; }
.ann-silver    { --accent:#f8fafc; --tint:rgba(226,232,240,.14); --quote:#e2e8f0; }
.ann-bronze    { --accent:#fb923c; --tint:rgba(245,158,11,.16);  --quote:#fdba74; }
