    /* Minimal local styling just for the prototype */

    .chat-shell {
      margin: 1rem auto 2rem;
    }

    .chat-panel {
      background: radial-gradient(circle at top, #14141b 0%, #050508 60%, #020203 100%);
      border-radius: 18px;
      padding: 1rem;
      border: 1px solid rgba(255, 255, 255, 0.14);
      box-shadow: 0 22px 40px rgba(0, 0, 0, 0.85);

    /* NEW: make messages + form stack and let messages flex */
      display: flex;
      flex-direction: column;
    }

    .chat-messages {
      max-height: 55vh;
      overflow-y: auto;
      padding: 0.5rem;
      margin-bottom: 0.75rem;

    /* allows flex parent to shrink this instead of pushing panel off-screen */
      flex: 1;
      min-height: 0;
    }

    .chat-message {
      margin-bottom: 0.5rem;
    }

    .chat-message-meta {
      font-size: 0.75rem;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      color: rgba(247, 243, 236, 0.6);
      margin-bottom: 0.1rem;
    }

    .chat-message-body {
      font-size: 0.95rem;
      color: #f7f3ec;
    }

    .chat-form-row {
      margin-bottom: 0.5rem;
    }

    .chat-input {
      width: 100%;
      border-radius: 999px;
      border: 1px solid rgba(255, 255, 255, 0.25);
      background: rgba(0, 0, 0, 0.45);
      color: #f7f3ec;
      padding: 0.5rem 0.75rem;
      font-size: 0.9rem;
    }

    .chat-input-text {
      border-radius: 14px;
      resize: vertical;
      min-height: 3rem;
    }

    .chat-send-row {
      text-align: right;
    }

    .chat-send-btn {
      padding: 0.45rem 1.2rem;
      border-radius: 999px;
      border: 1px solid rgba(243, 221, 154, 0.7);
      background: rgba(243, 221, 154, 0.14);
      color: #f7f3ec;
      font-size: 0.85rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      cursor: pointer;
    }
    @media (max-width: 768px) {
    .chat-shell {
    margin: 0.5rem auto 1.25rem;
    padding: 0 0.75rem;
    }

    .chat-panel {
    padding: 0.75rem;
    border-radius: 16px;

    /* keep the whole panel within the viewport on phones */
    max-height: calc(100vh - 285px);
    }

    .chat-messages {
    /* let the panel height rule control things on mobile */
    max-height: none;
    }

    .chat-input {
    font-size: 0.85rem;
    padding: 0.45rem 0.7rem;
    }

    .chat-send-btn {
    width: 100%;
    text-align: center;
    padding: 0.55rem 1.2rem;
    }
    }

    /* === Chatroom Disclaimer / Terms buttons === */

.chat-actions {
  margin-top: 1rem;
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.chat-btn {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.04);
  color: #f7f3ec;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background 160ms ease-out,
    border-color 160ms ease-out,
    transform 120ms ease-out;
}

.chat-btn:hover,
.chat-btn:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-1px);
}

.chat-btn:active {
  transform: translateY(0);
}

/* === Modal overlays === */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;               /* HIDE by default */
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.75);
}

.modal-overlay.show {
  display: flex;               /* SHOWN when .show added */
}

.modal-card {
  max-width: 720px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  background: #07070a;
  border-radius: 18px;
  padding: 1.5rem 1.25rem 1.25rem;
  border: 1px solid rgba(243, 221, 154, 0.5);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.9);
  color: #f7f3ec;
  position: relative;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.modal-title {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.modal-body p,
.modal-body li,
.modal-body blockquote {
  font-size: 0.9rem;
  line-height: 1.6;
}

.modal-close {
  border: none;
  background: transparent;
  color: #f7f3ec;
  font-size: 1.4rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .modal-overlay {
    padding: 1rem;
  }

  .modal-card {
    max-height: 85vh;
    padding: 1.25rem 1rem 1rem;
  }
}
/* === Chat message meta + badges === */

.chat-message-meta {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(247, 243, 236, 0.6);
  margin-bottom: 0.1rem;

  /* NEW: lay out name + badge + time nicely */
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.chat-author {
  font-weight: 600;
  color: rgba(247, 243, 236, 0.85);
}

.chat-badge {
  font-size: 0.65rem;
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(243, 221, 154, 0.7);
  background: rgba(243, 221, 154, 0.14);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.chat-badge-host::before {
  content: "▸ ";
}

.chat-badge-host {
  border-color: rgba(243, 221, 154, 0.9);
}

.chat-badge-mod {
  border-color: rgba(179, 209, 255, 0.85);
  background: rgba(179, 209, 255, 0.12);
}
.chat-badge-founder::before {
  content: "▸ ";
}

.chat-badge-founder {
  border-color: rgba(196, 255, 206, 0.9);
  background: rgba(196, 255, 206, 0.12);
}
