.radio-experience {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  text-align: start;
}

.radio-experience > * {
  min-width: 0;
}

.eljame-radio-chat {
  --chat-navy: #111827;
  --chat-ivory: #fbfaf6;
  --chat-gold: #b58118;
  --chat-gold-dark: #835b0d;
  --chat-live: #b4232c;
  --chat-muted: #667085;
  overflow: hidden;
  border: 1px solid #e5dfd1;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.11);
  color: var(--chat-navy);
  font-family: inherit;
  min-width: 0;
}

.eljame-chat__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem 1.25rem 0.9rem;
  border-bottom: 1px solid #eee9de;
}

.eljame-chat__header h2 {
  margin: 0.15rem 0 0;
  color: var(--chat-navy);
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  line-height: 1.35;
}

.eljame-chat__eyebrow {
  margin: 0;
  color: var(--chat-live);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.eljame-chat__eyebrow span {
  display: inline-block;
  font-size: 0.7rem;
  animation: eljame-chat-pulse 1.6s ease-in-out infinite;
}

.eljame-chat__privacy {
  max-width: 245px;
  margin: 0;
  color: var(--chat-muted);
  font-size: 0.74rem;
  line-height: 1.55;
}

.eljame-chat__world {
  padding: 0.8rem 1.25rem;
  background: var(--chat-navy);
  color: #fff;
}

.eljame-chat__world-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
  font-size: 0.8rem;
}

.eljame-chat__world-summary strong {
  min-width: 2rem;
  border: 1px solid rgba(216, 170, 72, 0.55);
  border-radius: 999px;
  padding: 0.08rem 0.55rem;
  background: rgba(181, 129, 24, 0.18);
  color: #f7d98e;
  text-align: center;
}

.eljame-chat__flags {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 0.1rem 0 0.4rem;
  scrollbar-color: #d8aa48 rgba(255, 255, 255, 0.12);
  scrollbar-width: thin;
  max-width: 100%;
}

.eljame-chat__flags:focus-visible,
.eljame-chat__feed:focus-visible {
  outline: 3px solid #d8aa48;
  outline-offset: 2px;
}

.eljame-chat__flag-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.3rem;
  min-height: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.76rem;
}

.eljame-chat__flag-chip b {
  color: #f7d98e;
}

.eljame-chat__status {
  min-height: 1.35rem;
  margin: 0;
  padding: 0.55rem 1.25rem;
  border-bottom: 1px solid #eee9de;
  background: #fffdf8;
  color: #6b5a32;
  font-size: 0.78rem;
  line-height: 1.6;
}

.eljame-chat__status[data-state="online"] {
  color: #27734d;
}

.eljame-chat__status[data-state="offline"],
.eljame-chat__status[data-state="error"] {
  color: var(--chat-live);
}

.eljame-chat__identity {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #eee9de;
  background: #fffdf8;
}

.eljame-chat__identity label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 800;
}

.eljame-chat__identity-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
}

.eljame-chat__identity input,
.eljame-chat__composer textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cfc7b7;
  border-radius: 12px;
  background: #fff;
  color: var(--chat-navy);
  font: inherit;
}

.eljame-chat__identity input {
  min-height: 44px;
  padding: 0.55rem 0.7rem;
}

.eljame-chat__identity button,
.eljame-chat__composer button {
  min-height: 44px;
  border: 1px solid #9a6d13;
  border-radius: 12px;
  padding: 0.55rem 0.9rem;
  background: var(--chat-gold);
  color: var(--chat-navy);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.eljame-chat__identity p {
  margin: 0.45rem 0 0;
  color: var(--chat-muted);
  font-size: 0.74rem;
}

.eljame-chat__feed {
  min-height: 330px;
  max-height: 440px;
  overflow-y: auto;
  padding: 0 1.25rem;
  scroll-behavior: smooth;
}

.eljame-chat__empty {
  display: grid;
  min-height: 240px;
  place-items: center;
  color: var(--chat-muted);
  text-align: center;
}

.eljame-chat__message {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: start;
  padding: 0.9rem 0;
  border-bottom: 1px solid #eee9de;
}

.eljame-chat__message:last-child {
  border-bottom: 0;
}

.eljame-chat__message-flag {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid #e3dccd;
  border-radius: 50%;
  background: #fffaf0;
  font-size: 1rem;
}

.eljame-chat__message-main {
  min-width: 0;
}

.eljame-chat__message-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-bottom: 0.22rem;
  font-size: 0.76rem;
}

.eljame-chat__message-name {
  overflow-wrap: anywhere;
  color: var(--chat-navy);
  font-weight: 800;
}

.eljame-chat__verified {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  border-radius: 999px;
  padding: 0.08rem 0.38rem;
  background: #eaf5ef;
  color: #1f6c47;
  font-size: 0.67rem;
  font-weight: 800;
}

.eljame-chat__message time {
  color: var(--chat-muted);
}

.eljame-chat__message-body {
  margin: 0;
  overflow-wrap: anywhere;
  color: #293143;
  font-size: 0.9rem;
  line-height: 1.75;
  unicode-bidi: plaintext;
  white-space: pre-wrap;
}

.eljame-chat__report {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--chat-muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
}

.eljame-chat__composer {
  padding: 0.9rem 1.25rem 1.15rem;
  border-top: 1px solid #ded7c9;
  background: var(--chat-ivory);
}

.eljame-chat__composer textarea {
  min-height: 64px;
  max-height: 130px;
  resize: vertical;
  padding: 0.65rem 0.75rem;
  line-height: 1.55;
}

.eljame-chat__composer-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.5rem;
  color: var(--chat-muted);
  font-size: 0.75rem;
}

.eljame-chat__composer button:disabled,
.eljame-chat__composer textarea:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.eljame-chat__error {
  margin: 0.55rem 0 0;
  color: var(--chat-live);
  font-size: 0.8rem;
  line-height: 1.55;
}

.eljame-chat__retry {
  margin-top: 0.5rem;
  background: transparent !important;
  color: var(--chat-gold-dark) !important;
}

.eljame-radio-chat :is(input, textarea, button):focus-visible {
  outline: 3px solid var(--chat-gold);
  outline-offset: 2px;
}

@keyframes eljame-chat-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.18); }
}

@media (min-width: 1024px) {
  .radio-experience {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }

  .radio-experience > .radio-player-wrapper {
    max-width: none;
    margin: 0;
    position: sticky;
    top: 1.5rem;
  }
}

@media (max-width: 600px) {
  .eljame-chat__header {
    display: block;
  }

  .eljame-chat__privacy {
    max-width: none;
    margin-top: 0.5rem;
  }

  .eljame-chat__identity-row {
    grid-template-columns: 1fr;
  }

  .eljame-chat__feed {
    min-height: 300px;
    max-height: 410px;
    padding-inline: 0.9rem;
  }

  .eljame-chat__message {
    grid-template-columns: 2rem minmax(0, 1fr);
  }

  .eljame-chat__report {
    grid-column: 2;
    min-height: 32px;
    justify-self: start;
    padding: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .eljame-chat__eyebrow span {
    animation: none;
  }

  .eljame-chat__feed {
    scroll-behavior: auto;
  }
}
