:root {
  color-scheme: dark;
  --night: #050d1d;
  --deep-blue: #08172e;
  --panel: rgba(8, 21, 43, 0.94);
  --panel-soft: rgba(16, 35, 60, 0.82);
  --ivory: #f5efdc;
  --text: #e9edf4;
  --muted: #99a8bb;
  --faint: #617187;
  --gold: #e5ca86;
  --gold-light: #fff0b8;
  --cyan: #8de9ef;
  --line: rgba(221, 204, 151, 0.25);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 42%, rgba(56, 112, 155, 0.24), transparent 30%),
    radial-gradient(circle at 14% 18%, rgba(64, 86, 163, 0.21), transparent 27%),
    radial-gradient(circle at 86% 78%, rgba(24, 122, 142, 0.18), transparent 26%),
    linear-gradient(155deg, #030815, #071126 48%, #040b18);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
}

body::before {
  opacity: 0.7;
  background-image:
    radial-gradient(circle, rgba(255, 242, 194, 0.95) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(133, 218, 255, 0.7) 0 0.7px, transparent 1.1px),
    radial-gradient(circle, rgba(255, 255, 255, 0.5) 0 0.6px, transparent 1px);
  background-position: 16px 21px, 7px 13px, 31px 7px;
  background-size: 97px 113px, 137px 151px, 61px 79px;
  animation: sky-drift 45s linear infinite;
}

body::after {
  background:
    linear-gradient(115deg, transparent 40%, rgba(101, 190, 220, 0.035) 50%, transparent 60%),
    radial-gradient(ellipse at center, transparent 32%, rgba(2, 6, 14, 0.8) 92%);
}

button {
  color: inherit;
  font: inherit;
}

.stage {
  position: relative;
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 26px;
  isolation: isolate;
}

.sky-vignette {
  position: absolute;
  z-index: -4;
  inset: 0;
  overflow: hidden;
}

.sky-vignette::before,
.sky-vignette::after {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  content: "";
  opacity: 0.17;
  filter: blur(105px);
  animation: nebula-breathe 9s ease-in-out infinite alternate;
}

.sky-vignette::before {
  top: -180px;
  right: 2%;
  background: #526dc7;
}

.sky-vignette::after {
  bottom: -230px;
  left: 5%;
  background: #1ca1a8;
  animation-delay: -4s;
}

.celestial-backdrop {
  position: absolute;
  z-index: -2;
  top: 50%;
  left: 50%;
  width: min(880px, 86vw);
  aspect-ratio: 1;
  opacity: 0.36;
  transform: translate(-50%, -50%);
}

.celestial-backdrop::before,
.celestial-backdrop::after {
  position: absolute;
  top: 50%;
  left: 50%;
  content: "";
  transform: translate(-50%, -50%) rotate(45deg);
}

.celestial-backdrop::before {
  width: 64%;
  height: 64%;
  border: 1px solid rgba(222, 206, 155, 0.22);
}

.celestial-backdrop::after {
  width: 14px;
  height: 14px;
  border: 1px solid rgba(255, 235, 170, 0.85);
  background: rgba(255, 234, 169, 0.18);
  box-shadow: 0 0 32px rgba(255, 222, 139, 0.65);
}

.sky-ring,
.sky-axis {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.sky-ring {
  border: 1px solid rgba(219, 205, 159, 0.2);
}

.sky-ring::before,
.sky-ring::after {
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(255, 236, 176, 0.65);
  content: "";
  background: #071329;
  transform: translateY(-50%) rotate(45deg);
}

.sky-ring::before { left: -4px; }
.sky-ring::after { right: -4px; }

.sky-ring--outer {
  width: 100%;
  height: 100%;
  border-style: dashed;
  animation: celestial-spin 80s linear infinite;
}

.sky-ring--middle {
  width: 78%;
  height: 78%;
  border-color: rgba(119, 208, 229, 0.24);
  animation: celestial-spin-reverse 46s linear infinite;
}

.sky-ring--inner {
  width: 54%;
  height: 54%;
  border-style: dotted;
  animation: celestial-spin 28s linear infinite;
}

.sky-axis {
  width: 94%;
  height: 1px;
  border-radius: 0;
  background: linear-gradient(90deg, transparent, rgba(225, 210, 159, 0.22), transparent);
}

.sky-axis--one { transform: translate(-50%, -50%) rotate(26deg); }
.sky-axis--two { transform: translate(-50%, -50%) rotate(-26deg); }

.sky-star {
  position: absolute;
  color: rgba(255, 235, 170, 0.8);
  font-family: Georgia, serif;
  text-shadow: 0 0 18px rgba(255, 230, 150, 0.8);
  animation: star-pulse 3s ease-in-out infinite;
}

.sky-star--one { top: 12%; left: 20%; font-size: 17px; }
.sky-star--two { right: 9%; bottom: 30%; font-size: 26px; animation-delay: -1.3s; }
.sky-star--three { bottom: 7%; left: 34%; font-size: 11px; animation-delay: -2.1s; }

.shooting-star {
  position: absolute;
  z-index: -1;
  width: 110px;
  height: 1px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(185, 237, 255, 0.9));
  filter: drop-shadow(0 0 5px #aee9ff);
  transform: rotate(-31deg);
  animation: shooting 8s ease-in infinite;
}

.shooting-star::after {
  position: absolute;
  right: -2px;
  top: -2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  content: "";
  background: white;
  box-shadow: 0 0 9px white;
}

.shooting-star--one { top: 20%; left: 10%; }
.shooting-star--two { right: 10%; bottom: 24%; animation-delay: -4.7s; }

.chat-widget {
  position: relative;
  display: flex;
  width: min(470px, calc(100vw - 34px));
  height: min(850px, calc(100dvh - 62px));
  min-height: 560px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(231, 214, 158, 0.38);
  border-radius: 18px 18px 27px 27px;
  background:
    linear-gradient(180deg, rgba(18, 41, 68, 0.97), rgba(6, 17, 36, 0.975) 28%, rgba(5, 13, 29, 0.98)),
    var(--panel);
  box-shadow:
    0 44px 110px rgba(0, 0, 0, 0.62),
    0 0 80px rgba(75, 150, 194, 0.1),
    inset 0 1px 0 rgba(255, 244, 201, 0.15),
    inset 0 0 0 6px rgba(5, 14, 30, 0.62),
    inset 0 0 0 7px rgba(222, 201, 135, 0.1);
  backdrop-filter: blur(24px) saturate(1.2);
  animation: panel-awaken 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.chat-widget::before {
  position: absolute;
  z-index: 16;
  inset: 7px;
  border: 1px solid rgba(226, 208, 148, 0.13);
  border-radius: 12px 12px 21px 21px;
  pointer-events: none;
  content: "";
}

.chat-widget::after {
  position: absolute;
  z-index: 16;
  top: 0;
  left: 16%;
  width: 68%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
  box-shadow: 0 0 15px rgba(255, 224, 139, 0.7);
}

.frame-corner {
  position: absolute;
  z-index: 18;
  width: 32px;
  height: 32px;
  pointer-events: none;
  opacity: 0.9;
}

.frame-corner::before,
.frame-corner::after {
  position: absolute;
  content: "";
  background: linear-gradient(90deg, var(--gold-light), #7d714f);
}

.frame-corner::before { top: 0; left: 0; width: 26px; height: 1px; }
.frame-corner::after { top: 0; left: 0; width: 1px; height: 26px; }
.frame-corner--tl { top: 9px; left: 9px; }
.frame-corner--tr { top: 9px; right: 9px; transform: rotate(90deg); }
.frame-corner--br { right: 9px; bottom: 9px; transform: rotate(180deg); }
.frame-corner--bl { bottom: 9px; left: 9px; transform: rotate(270deg); }

.frame-gem {
  position: absolute;
  z-index: 20;
  left: 50%;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: var(--gold-light);
  background: #0a1a32;
  font-family: Georgia, serif;
  font-size: 10px;
  text-shadow: 0 0 9px #ffe49d;
  transform: translateX(-50%) rotate(45deg);
  box-shadow: inset 0 0 0 1px rgba(229, 202, 134, 0.6), 0 0 13px rgba(229, 202, 134, 0.28);
}

.frame-gem::first-letter { transform: rotate(-45deg); }
.frame-gem--top { top: -11px; }
.frame-gem--bottom { bottom: -11px; }

.chat-header {
  position: relative;
  z-index: 8;
  display: flex;
  min-height: 90px;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-bottom: 1px solid rgba(226, 209, 151, 0.2);
  background:
    radial-gradient(circle at 15% 50%, rgba(100, 184, 207, 0.13), transparent 27%),
    linear-gradient(180deg, rgba(25, 49, 76, 0.7), rgba(8, 22, 44, 0.58));
}

.chat-header::after {
  position: absolute;
  right: 28px;
  bottom: -1px;
  left: 28px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(246, 226, 161, 0.55), transparent);
}

.chat-title-wrap,
.header-actions,
.hype-label,
.hype-topline,
.composer-row,
.identity-button,
.input-icons {
  display: flex;
  align-items: center;
}

.chat-title-wrap { gap: 13px; }

.header-crest {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(223, 205, 145, 0.38);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(128, 218, 232, 0.2), transparent 65%);
  box-shadow: inset 0 0 13px rgba(113, 211, 230, 0.16), 0 0 17px rgba(89, 193, 219, 0.1);
}

.header-crest::before,
.header-crest::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(229, 207, 139, 0.55);
  transform: rotate(45deg);
}

.header-crest::before { width: 8px; height: 8px; }
.header-crest::after { width: 29px; height: 29px; border-color: rgba(115, 213, 231, 0.24); }

.header-crest-ring {
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(130, 220, 237, 0.42);
  border-radius: 50%;
  animation: orbit-spin 12s linear infinite;
}

.header-crest-star {
  z-index: 2;
  color: var(--gold-light);
  font-size: 15px;
  text-shadow: 0 0 10px #f8dda0;
  animation: star-pulse 2.4s ease-in-out infinite;
}

.eyebrow {
  display: block;
  margin-bottom: 4px;
  color: #8ad8e6;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.19em;
}

.chat-header h1 {
  margin: 0;
  color: var(--ivory);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 9px rgba(255, 235, 178, 0.2);
}

.header-actions { gap: 8px; }

.viewer-pill {
  display: inline-flex;
  height: 28px;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid rgba(226, 208, 146, 0.2);
  border-radius: 2px 9px 2px 9px;
  color: #ccd6df;
  background: rgba(5, 15, 31, 0.5);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.live-dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #80e6d9;
  box-shadow: 0 0 10px #55dcc8;
}

.live-dot::after {
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(101, 225, 210, 0.55);
  border-radius: inherit;
  content: "";
  animation: pulse-ring 2s ease-out infinite;
}

.icon-button {
  width: 29px;
  height: 29px;
  padding: 0;
  border: 0;
  color: var(--gold);
  background: transparent;
  font-size: 17px;
  text-shadow: 0 0 8px rgba(255, 223, 139, 0.4);
}

.hype-card {
  position: relative;
  z-index: 7;
  margin: 13px 17px 2px;
  padding: 12px 15px 11px;
  border: 1px solid rgba(229, 205, 131, 0.26);
  border-radius: 3px 13px 3px 13px;
  background:
    linear-gradient(100deg, rgba(78, 157, 180, 0.13), rgba(17, 40, 67, 0.55) 48%, rgba(188, 145, 71, 0.08)),
    rgba(5, 17, 37, 0.7);
  box-shadow: inset 0 0 24px rgba(90, 176, 201, 0.05), 0 7px 22px rgba(0, 0, 0, 0.12);
}

.hype-card::before,
.hype-card::after {
  position: absolute;
  left: 50%;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(242, 221, 156, 0.55);
  content: "";
  background: #0b1c36;
  transform: translateX(-50%) rotate(45deg);
}

.hype-card::before { top: -4px; }
.hype-card::after { bottom: -4px; }

.hype-wing {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  border-top: 1px solid rgba(229, 205, 131, 0.36);
  border-left: 1px solid rgba(229, 205, 131, 0.36);
}

.hype-wing--left { left: -7px; transform: translateY(-50%) rotate(-45deg); }
.hype-wing--right { right: -7px; transform: translateY(-50%) rotate(135deg); }
.hype-topline { justify-content: space-between; }
.hype-label { gap: 7px; color: #dfe8ec; font-size: 8px; font-weight: 800; letter-spacing: 0.13em; }
.hype-label strong { margin-left: 2px; color: var(--gold); font-size: 8px; }

.hype-sigil {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border: 1px solid rgba(125, 220, 235, 0.5);
  color: #c6f8ff;
  background: rgba(82, 180, 202, 0.14);
  font-size: 10px;
  transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(93, 207, 229, 0.16);
}

.hype-time { color: #b8c5cf; font-size: 9px; font-weight: 700; font-variant-numeric: tabular-nums; }

.progress-track {
  height: 5px;
  margin-top: 10px;
  padding: 1px;
  overflow: hidden;
  border: 1px solid rgba(225, 205, 139, 0.18);
  background: rgba(1, 8, 20, 0.7);
}

.progress-fill {
  position: relative;
  display: block;
  width: 68%;
  height: 100%;
  background: linear-gradient(90deg, #4494ad, #94e1e7 68%, #ffdfa0);
  box-shadow: 0 0 11px rgba(109, 220, 232, 0.42);
}

.progress-fill::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, transparent 10%, rgba(255, 255, 255, 0.9), transparent 45%);
  animation: progress-shine 2.8s linear infinite;
}

.hype-card p { margin: 7px 0 0; color: #778ba0; font-size: 9px; letter-spacing: 0.02em; }
.hype-card p span { color: #9ee7ed; font-weight: 800; }

.chat-feed-wrap { position: relative; min-height: 0; flex: 1; }

.chat-feed {
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: flex-end;
  gap: 3px;
  overflow: hidden;
  padding: 19px 16px 14px;
}

.top-fade {
  position: absolute;
  z-index: 6;
  top: 0;
  right: 0;
  left: 0;
  height: 44px;
  pointer-events: none;
  background: linear-gradient(#091a33 5%, transparent);
}

.chat-row {
  --row-delay: 0ms;
  position: relative;
  flex: 0 0 auto;
  color: #dce4ec;
}

.chat-row.message {
  margin-left: 4px;
  padding: 6px 8px 6px 22px;
  border-radius: 2px 8px 2px 8px;
  font-size: 12px;
  line-height: 1.48;
  animation: message-shell-in 520ms cubic-bezier(0.16, 1, 0.3, 1) var(--row-delay) both;
}

.chat-row.message::before {
  position: absolute;
  top: 10px;
  left: 5px;
  width: 5px;
  height: 5px;
  border: 1px solid rgba(227, 205, 138, 0.65);
  content: "";
  background: #0b213c;
  transform: rotate(45deg);
  box-shadow: 0 0 7px rgba(246, 218, 134, 0.35);
  animation: node-awaken 500ms ease-out calc(var(--row-delay) + 110ms) both;
}

.chat-row.message::after {
  position: absolute;
  top: 19px;
  bottom: -6px;
  left: 8px;
  width: 1px;
  content: "";
  opacity: 0.24;
  background: linear-gradient(var(--gold), transparent);
  transform-origin: top;
  animation: line-draw 550ms ease-out calc(var(--row-delay) + 190ms) both;
}

.chat-row.message:hover { background: linear-gradient(90deg, rgba(95, 178, 201, 0.08), transparent); }

.timestamp,
.badges,
.username,
.message-text {
  animation: item-reveal 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.timestamp { margin-right: 6px; color: #60758b; font-size: 8px; font-variant-numeric: tabular-nums; vertical-align: 1px; animation-delay: calc(var(--row-delay) + 140ms); }
.badges { display: inline-flex; gap: 3px; margin-right: 5px; vertical-align: -2px; animation-delay: calc(var(--row-delay) + 220ms); }
.username { font-weight: 800; text-shadow: 0 0 9px color-mix(in srgb, currentColor 28%, transparent); animation-delay: calc(var(--row-delay) + 300ms); }
.username::after { color: #8091a2; content: ":"; }
.message-text { display: inline; overflow-wrap: anywhere; animation-delay: calc(var(--row-delay) + 390ms); }

.badge {
  display: inline-grid;
  width: 15px;
  height: 15px;
  place-items: center;
  border: 1px solid rgba(255, 242, 202, 0.34);
  border-radius: 50%;
  color: #fff7d9;
  background: color-mix(in srgb, var(--badge-color) 78%, #07162d);
  box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.15), 0 0 7px color-mix(in srgb, var(--badge-color) 30%, transparent);
  font-family: Georgia, serif;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
}

.emote {
  display: inline-grid;
  min-width: 25px;
  height: 25px;
  margin: -6px 2px -7px;
  place-items: center;
  vertical-align: 1px;
  font-size: 20px;
  filter: drop-shadow(0 0 5px rgba(255, 222, 141, 0.25));
  transform: translateY(1px);
}

.mention {
  padding: 1px 5px 2px;
  border: 1px solid rgba(121, 216, 230, 0.2);
  border-radius: 2px 6px 2px 6px;
  color: #d7faff;
  background: rgba(74, 164, 188, 0.13);
  font-weight: 700;
}

.chat-row.event {
  --event-color: #8edee9;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  min-height: 100px;
  align-items: center;
  gap: 11px;
  margin: 9px 2px;
  padding: 13px 14px 13px 10px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--event-color) 42%, var(--gold) 22%);
  border-radius: 3px 15px 3px 15px;
  background:
    radial-gradient(circle at 12% 50%, color-mix(in srgb, var(--event-color) 22%, transparent), transparent 36%),
    linear-gradient(105deg, color-mix(in srgb, var(--event-color) 10%, #102643), rgba(8, 22, 43, 0.98) 58%, rgba(19, 27, 47, 0.97));
  box-shadow:
    inset 0 0 28px color-mix(in srgb, var(--event-color) 7%, transparent),
    0 12px 32px rgba(0, 0, 0, 0.25),
    0 0 16px color-mix(in srgb, var(--event-color) 9%, transparent);
  animation: event-shell-in 720ms cubic-bezier(0.16, 1, 0.3, 1) var(--row-delay) both;
}

.chat-row.event::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  content: "";
  background: linear-gradient(transparent, var(--event-color), var(--gold-light), transparent);
  box-shadow: 0 0 11px var(--event-color);
  transform-origin: top;
  animation: event-line-draw 650ms ease-out calc(var(--row-delay) + 100ms) both;
}

.chat-row.event::after {
  position: absolute;
  z-index: 4;
  top: -90%;
  left: -38%;
  width: 24%;
  height: 280%;
  pointer-events: none;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 248, 216, 0.22), transparent);
  transform: rotate(19deg);
  animation: event-sweep 1.2s ease-out calc(var(--row-delay) + 310ms) both;
}

.event-corner {
  position: absolute;
  z-index: 3;
  width: 13px;
  height: 13px;
  opacity: 0;
  border-color: var(--event-color);
  animation: ornament-appear 380ms ease-out calc(var(--row-delay) + 190ms) both;
}

.event-corner--tl { top: 4px; left: 5px; border-top: 1px solid; border-left: 1px solid; }
.event-corner--tr { top: 4px; right: 5px; border-top: 1px solid; border-right: 1px solid; animation-delay: calc(var(--row-delay) + 260ms); }
.event-corner--bl { bottom: 4px; left: 5px; border-bottom: 1px solid; border-left: 1px solid; animation-delay: calc(var(--row-delay) + 330ms); }
.event-corner--br { right: 5px; bottom: 4px; border-right: 1px solid; border-bottom: 1px solid; animation-delay: calc(var(--row-delay) + 400ms); }

.event-stars { position: absolute; z-index: 2; inset: 0; pointer-events: none; }

.event-star {
  position: absolute;
  color: color-mix(in srgb, var(--event-color) 76%, var(--gold-light));
  font-family: Georgia, serif;
  line-height: 1;
  opacity: 0;
  text-shadow: 0 0 9px currentColor;
  animation:
    spark-enter 520ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--row-delay) + var(--spark-delay)) both,
    spark-orbit 5s linear calc(var(--row-delay) + var(--spark-delay) + 520ms) infinite;
}

.event-star:nth-child(1) { --spark-delay: 300ms; top: 11px; left: 55px; font-size: 9px; }
.event-star:nth-child(2) { --spark-delay: 410ms; top: 15px; right: 18px; font-size: 6px; }
.event-star:nth-child(3) { --spark-delay: 520ms; right: 48px; bottom: 10px; font-size: 10px; }
.event-star:nth-child(4) { --spark-delay: 630ms; bottom: 7px; left: 89px; font-size: 5px; }

.event-crest {
  position: relative;
  z-index: 3;
  display: grid;
  width: 60px;
  height: 60px;
  place-items: center;
  opacity: 0;
  transform: scale(0.4) rotate(-45deg);
  animation: crest-awaken 650ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--row-delay) + 260ms) both;
}

.orbit-ring {
  position: absolute;
  border: 1px solid color-mix(in srgb, var(--event-color) 55%, var(--gold) 20%);
  border-radius: 50%;
  opacity: 0;
  animation:
    orbit-appear 420ms ease-out calc(var(--row-delay) + 390ms) both,
    orbit-spin 5.5s linear calc(var(--row-delay) + 810ms) infinite;
}

.orbit-ring::before,
.orbit-ring::after {
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  border: 1px solid currentColor;
  content: "";
  background: #0a1c36;
  transform: translateY(-50%) rotate(45deg);
}

.orbit-ring::before { left: -3px; }
.orbit-ring::after { right: -3px; }
.orbit-ring--one { inset: 3px; border-style: dashed; }
.orbit-ring--two { inset: 10px; animation-delay: calc(var(--row-delay) + 480ms), calc(var(--row-delay) + 900ms); animation-direction: normal, reverse; }

.event-icon {
  position: relative;
  z-index: 3;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--event-color) 62%, var(--gold-light) 28%);
  color: #fff5ce;
  background: radial-gradient(circle, color-mix(in srgb, var(--event-color) 30%, #0c2340), #08172e);
  font-family: Georgia, serif;
  font-size: 15px;
  font-weight: 700;
  text-shadow: 0 0 8px var(--event-color);
  transform: rotate(45deg);
  box-shadow: inset 0 0 12px color-mix(in srgb, var(--event-color) 22%, transparent), 0 0 18px color-mix(in srgb, var(--event-color) 27%, transparent);
}

.event-icon span { transform: rotate(-45deg); }
.event-content { position: relative; z-index: 5; min-width: 0; }

.event-kicker,
.event-title,
.event-note {
  opacity: 0;
  animation: event-copy-in 500ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.event-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
  color: var(--event-color);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  animation-delay: calc(var(--row-delay) + 470ms);
}

.event-kicker::before { content: "✦"; color: var(--gold-light); font-size: 7px; }
.event-kicker::after { width: 28px; height: 1px; content: ""; opacity: 0.42; background: linear-gradient(90deg, currentColor, transparent); }

.event-title {
  color: #f4f2e9;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: 0.015em;
  animation-delay: calc(var(--row-delay) + 610ms);
}

.event-title strong { color: var(--gold-light); font-weight: 700; text-shadow: 0 0 12px color-mix(in srgb, var(--event-color) 55%, transparent); }

.event-note {
  margin-top: 5px;
  color: #99a9b9;
  font-size: 9.5px;
  line-height: 1.4;
  animation-delay: calc(var(--row-delay) + 750ms);
}

.event--follow { --event-color: #8de9ef; }
.event--sub { --event-color: #c0a3ff; }
.event--gift { --event-color: #73e0b0; }
.event--cheer { --event-color: #76bdff; }
.event--tip { --event-color: #f0c976; }
.event--raid { --event-color: #ff9d82; }

.composer {
  position: relative;
  z-index: 9;
  padding: 13px 17px 16px;
  border-top: 1px solid rgba(225, 205, 142, 0.2);
  background: linear-gradient(180deg, rgba(8, 22, 43, 0.88), rgba(5, 14, 30, 0.98));
}

.composer::before {
  position: absolute;
  top: -1px;
  left: 50%;
  width: 48%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 226, 148, 0.6), transparent);
  transform: translateX(-50%);
}

.input-shell {
  display: flex;
  height: 41px;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 0 14px;
  border: 1px solid rgba(226, 207, 143, 0.24);
  border-radius: 2px 10px 2px 10px;
  background: rgba(2, 10, 23, 0.55);
  box-shadow: inset 0 0 16px rgba(87, 174, 199, 0.04);
}

.input-placeholder { color: #64778b; font-family: Georgia, serif; font-size: 10px; font-style: italic; }
.input-icons { gap: 11px; color: #a7bbc8; font-size: 14px; }
.input-icons span:first-child { color: var(--gold); text-shadow: 0 0 7px rgba(241, 212, 132, 0.4); }
.composer-row { justify-content: space-between; margin-top: 9px; }

.identity-button,
.chat-button { height: 30px; border: 0; font-size: 9px; font-weight: 700; }
.identity-button { gap: 7px; padding: 0 6px; color: #a7b3c0; background: transparent; }

.identity-avatar {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border: 1px solid rgba(239, 216, 147, 0.55);
  color: var(--gold-light);
  background: linear-gradient(145deg, #24466a, #112442);
  font-size: 9px;
  transform: rotate(45deg);
  box-shadow: 0 0 9px rgba(98, 190, 213, 0.15);
}

.identity-avatar::first-letter { transform: rotate(-45deg); }
.chevron { color: #6f8194; }

.chat-button {
  position: relative;
  min-width: 68px;
  padding: 0 17px;
  overflow: hidden;
  border: 1px solid rgba(255, 234, 172, 0.55);
  border-radius: 2px 9px 2px 9px;
  color: #13253d;
  background: linear-gradient(135deg, #f5e4ae, #bfa76b);
  box-shadow: 0 5px 16px rgba(220, 190, 112, 0.16), inset 0 1px rgba(255, 255, 255, 0.6);
}

.chat-button::before {
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(71, 61, 39, 0.18);
  border-radius: inherit;
  content: "";
}

.chat-button span { position: relative; z-index: 1; }

.demo-caption {
  position: absolute;
  right: 27px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: rgba(224, 211, 167, 0.42);
  font-family: Georgia, serif;
  font-size: 8px;
  letter-spacing: 0.17em;
}

.demo-caption span { color: var(--gold-light); font-size: 8px; text-shadow: 0 0 8px #ffe09a; animation: star-pulse 2.4s ease-in-out infinite; }
.demo-caption span:last-child { animation-delay: -1.2s; }
.is-removing { animation: message-out 280ms ease-in forwards !important; }

@keyframes panel-awaken {
  0% { opacity: 0; transform: translateY(24px) scale(0.96); filter: blur(8px) brightness(1.5); }
  55% { opacity: 1; filter: blur(0) brightness(1.15); }
  100% { transform: translateY(0) scale(1); filter: brightness(1); }
}

@keyframes message-shell-in {
  from { opacity: 0; transform: translate3d(-18px, 7px, 0); background: rgba(110, 210, 230, 0.13); }
  to { opacity: 1; transform: translate3d(0, 0, 0); background: transparent; }
}

@keyframes item-reveal {
  from { opacity: 0; filter: blur(4px); transform: translateY(5px); }
  to { opacity: 1; filter: blur(0); transform: translateY(0); }
}

@keyframes node-awaken {
  0% { opacity: 0; transform: rotate(45deg) scale(0); box-shadow: 0 0 20px #ffe092; }
  65% { opacity: 1; transform: rotate(225deg) scale(1.5); }
  100% { opacity: 1; transform: rotate(405deg) scale(1); }
}

@keyframes line-draw { from { opacity: 0; transform: scaleY(0); } to { opacity: 0.24; transform: scaleY(1); } }

@keyframes event-shell-in {
  0% { opacity: 0; transform: translate3d(-32px, 13px, 0) scaleX(0.82); filter: blur(6px) brightness(1.7); }
  60% { opacity: 1; transform: translate3d(3px, 0, 0) scaleX(1.01); filter: blur(0) brightness(1.18); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scaleX(1); filter: brightness(1); }
}

@keyframes event-line-draw { from { opacity: 0; transform: scaleY(0); } to { opacity: 1; transform: scaleY(1); } }
@keyframes ornament-appear { from { opacity: 0; transform: scale(1.8); filter: brightness(2); } to { opacity: 0.8; transform: scale(1); filter: brightness(1); } }

@keyframes crest-awaken {
  0% { opacity: 0; transform: scale(0.35) rotate(-70deg); filter: blur(7px) brightness(2); }
  70% { opacity: 1; transform: scale(1.12) rotate(7deg); filter: blur(0) brightness(1.4); }
  100% { opacity: 1; transform: scale(1) rotate(0); filter: brightness(1); }
}

@keyframes orbit-appear { from { opacity: 0; transform: scale(0.2); } to { opacity: 0.78; transform: scale(1); } }

@keyframes event-copy-in {
  from { opacity: 0; transform: translateX(14px); filter: blur(4px); }
  to { opacity: 1; transform: translateX(0); filter: blur(0); }
}

@keyframes spark-enter {
  0% { opacity: 0; transform: scale(0) rotate(-90deg); }
  70% { opacity: 1; transform: scale(1.7) rotate(30deg); }
  100% { opacity: 0.9; transform: scale(1) rotate(0); }
}

@keyframes spark-orbit { to { transform: rotate(360deg); } }
@keyframes event-sweep { from { left: -38%; opacity: 0; } 30% { opacity: 1; } to { left: 126%; opacity: 0; } }
@keyframes message-out { to { opacity: 0; transform: translate3d(0, -16px, 0) scale(0.98); filter: blur(3px); } }
@keyframes progress-shine { from { transform: translateX(-100%); } to { transform: translateX(220%); } }
@keyframes celestial-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes celestial-spin-reverse { to { transform: translate(-50%, -50%) rotate(-360deg); } }
@keyframes orbit-spin { to { transform: rotate(360deg); } }
@keyframes star-pulse { 0%, 100% { opacity: 0.45; transform: scale(0.8) rotate(0); } 50% { opacity: 1; transform: scale(1.25) rotate(90deg); } }
@keyframes pulse-ring { 0% { opacity: 0.7; transform: scale(0.6); } 80%, 100% { opacity: 0; transform: scale(1.7); } }
@keyframes sky-drift { to { background-position: 113px 134px, -130px 164px, 92px -72px; } }
@keyframes nebula-breathe { to { opacity: 0.3; transform: translate3d(35px, 20px, 0) scale(1.1); } }
@keyframes shooting { 0%, 73% { opacity: 0; transform: translate3d(0, 0, 0) rotate(-31deg); } 76% { opacity: 0.9; } 84%, 100% { opacity: 0; transform: translate3d(280px, 170px, 0) rotate(-31deg); } }

@media (max-width: 540px) {
  .stage { padding: 0; }
  .chat-widget { width: 100vw; height: 100dvh; min-height: 490px; border: 0; border-radius: 0; }
  .chat-widget::before { inset: 5px; border-radius: 0; }
  .frame-corner--tl,
  .frame-corner--tr { top: 5px; }
  .frame-corner--bl,
  .frame-corner--br { bottom: 5px; }
  .frame-corner--tl,
  .frame-corner--bl { left: 5px; }
  .frame-corner--tr,
  .frame-corner--br { right: 5px; }
  .frame-gem { display: none; }
  .demo-caption { display: none; }
  .celestial-backdrop { width: 140vw; }
}

@media (max-width: 390px) {
  .chat-header { padding-inline: 17px; }
  .header-crest { width: 37px; height: 37px; }
  .chat-header h1 { font-size: 15px; }
  .eyebrow { font-size: 7px; }
  .chat-feed { padding-inline: 11px; }
  .chat-row.event { grid-template-columns: 59px minmax(0, 1fr); padding-right: 10px; }
  .event-crest { width: 54px; height: 54px; }
}

@media (max-height: 690px) {
  .chat-widget { height: calc(100dvh - 12px); min-height: 480px; }
  .chat-header { min-height: 76px; }
  .hype-card { margin-top: 8px; padding-block: 9px; }
  .chat-feed { padding-top: 10px; }
  .chat-row.event { min-height: 88px; padding-block: 9px; }
  .event-crest { transform-origin: center; scale: 0.9; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
  }
}
