:root {
  --chat-lime: #cef43d;
  --chat-mint: #29d9bd;
  --chat-ink: #0c1113;
  --chat-panel: #141a1c;
  --chat-panel-2: #1b2225;
  --chat-line: #303b3f;
  --chat-copy: #f3f7f4;
  --chat-muted: #8c989c;
  --chat-danger: #ff756d;
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-room-button {
  position: relative;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border: 1px solid #1c2527;
  border-radius: 7px;
  background: #111719;
  color: #f5f8f5;
  font-size: 0.68rem;
  font-weight: 900;
  cursor: pointer;
}

.chat-room-button:hover,
.chat-room-button:focus-visible {
  border-color: #445154;
  background: #20282b;
  transform: none;
}

.chat-room-icon {
  position: relative;
  width: 25px;
  height: 22px;
  flex: 0 0 25px;
  border: 2px solid var(--chat-lime);
  border-radius: 6px;
}

.chat-room-icon::before {
  content: "";
  position: absolute;
  right: 3px;
  bottom: -5px;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--chat-lime);
  border-bottom: 2px solid var(--chat-lime);
  background: #111719;
  transform: skewY(35deg);
}

.chat-room-icon::after {
  content: "•••";
  position: absolute;
  top: 0;
  left: 4px;
  color: var(--chat-lime);
  font-size: 0.62rem;
  letter-spacing: 1px;
}

.header-unread {
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--chat-lime);
  color: #101510;
  font-size: 0.55rem;
  line-height: 1;
}

.chat-community {
  position: fixed;
  inset: 0;
  z-index: 125;
  display: grid;
  grid-template-rows: 66px minmax(0, 1fr);
  overflow: hidden;
  background: var(--chat-ink);
  color: var(--chat-copy);
}

.community-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--chat-line);
  background: #111719;
}

.community-brand,
.community-header-actions,
.community-side-head,
.members-head,
.room-live-stats,
.community-composer-row,
.community-media-actions,
.image-editor-card > header,
.image-editor-actions,
.admin-section-title {
  display: flex;
  align-items: center;
}

.community-brand {
  gap: 12px;
}

.community-brand p,
.community-brand h2,
.community-side-head span,
.community-side-head strong,
.members-head span,
.members-head strong,
.room-title-copy p,
.room-title-copy h3,
.community-empty p,
.community-empty h3,
.guidelines-card > p,
.guidelines-card h2,
.image-editor-card header p,
.image-editor-card header h2,
.admin-section-title p,
.admin-section-title h3 {
  margin: 0;
}

.community-brand p,
.community-side-head span,
.members-head span,
.room-title-copy p,
.community-empty p,
.guidelines-card > p,
.image-editor-card header p,
.admin-section-title p {
  color: var(--chat-lime);
  font-size: 0.56rem;
  font-weight: 950;
  letter-spacing: 0.14em;
}

.community-brand h2 {
  margin-top: 3px;
  font-size: 1rem;
}

.community-header-actions {
  gap: 9px;
}

.community-header-actions > button:first-child,
.members-toggle,
.mobile-room-back {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #3b474b;
  border-radius: 6px;
  background: #1b2326;
  color: #dce3e0;
  font-size: 0.65rem;
  font-weight: 850;
  cursor: pointer;
}

.icon-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #3d484c;
  border-radius: 50%;
  background: #1c2326;
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
}

.community-layout {
  display: grid;
  grid-template-columns: 265px minmax(0, 1fr) 250px;
  min-height: 0;
}

.community-rooms,
.community-members {
  min-height: 0;
  overflow: hidden;
  background: #111719;
}

.community-rooms {
  border-right: 1px solid var(--chat-line);
}

.community-members {
  border-left: 1px solid var(--chat-line);
}

.community-side-head,
.members-head {
  min-height: 64px;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--chat-line);
}

.community-side-head > div,
.members-head > div {
  display: grid;
  gap: 3px;
}

.community-side-head strong,
.members-head strong {
  font-size: 0.82rem;
}

.community-side-head > b {
  color: var(--chat-muted);
  font-size: 0.57rem;
}

.room-list,
.member-list {
  height: calc(100% - 64px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #394549 transparent;
}

.room-list {
  padding: 8px;
}

.room-item {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  min-height: 64px;
  align-items: center;
  gap: 9px;
  width: 100%;
  margin-bottom: 6px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #d9e0dd;
  text-align: left;
}

.room-item:hover,
.room-item.is-active {
  border-color: #364145;
  background: #1a2124;
}

.room-item.is-active {
  border-left: 3px solid var(--chat-lime);
}

.room-symbol {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #394448;
  border-radius: 6px;
  background: #20282b;
  color: var(--chat-lime);
  font-size: 0.9rem;
  font-weight: 950;
}

.room-copy {
  min-width: 0;
}

.room-copy strong,
.room-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-copy strong {
  color: #f5f8f6;
  font-size: 0.69rem;
}

.room-copy small {
  margin-top: 5px;
  color: #798589;
  font-size: 0.54rem;
}

.room-item-action {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.room-item-action button {
  min-width: 42px;
  min-height: 27px;
  padding: 4px 7px;
  border: 1px solid #475257;
  border-radius: 5px;
  background: #232b2e;
  color: #dce3e0;
  font-size: 0.54rem;
  font-weight: 900;
  cursor: pointer;
}

.room-item-action button.join-room {
  border-color: var(--chat-lime);
  background: var(--chat-lime);
  color: #11160b;
}

.room-unread {
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--chat-mint);
  color: #0b1514;
  font-size: 0.52rem;
  font-weight: 950;
}

.community-conversation {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background-color: #101618;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
}

.community-empty {
  display: grid;
  width: min(540px, calc(100% - 40px));
  min-height: 100%;
  align-content: center;
  justify-items: start;
  margin: 0 auto;
}

.community-empty-mark {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin-bottom: 22px;
  border: 1px solid #455156;
  border-radius: 8px;
  background: #171e21;
  color: var(--chat-lime);
  font-size: 2rem;
  font-weight: 950;
  box-shadow: 7px 7px 0 rgba(206, 244, 61, 0.12);
}

.community-empty h3 {
  max-width: 500px;
  margin-top: 8px;
  font-size: clamp(1.7rem, 4vw, 3.1rem);
  line-height: 1.02;
}

.community-empty > span:last-child {
  max-width: 470px;
  margin-top: 14px;
  color: var(--chat-muted);
  font-size: 0.76rem;
  line-height: 1.6;
}

.room-thread {
  display: grid;
  height: 100%;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
}

.room-thread-header {
  grid-row: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-height: 64px;
  align-items: center;
  gap: 16px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--chat-line);
  background: rgba(17, 23, 25, 0.96);
}

.room-title-copy p {
  color: var(--chat-mint);
}

.room-title-copy h3 {
  margin-top: 4px;
  font-size: 1rem;
}

.room-live-stats {
  gap: 14px;
}

.room-live-stats span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #929da1;
  font-size: 0.58rem;
  font-weight: 800;
}

.room-live-stats i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--chat-mint);
  box-shadow: 0 0 0 4px rgba(41, 217, 189, 0.1);
}

.members-toggle,
.mobile-room-back,
.members-head button {
  display: none;
}

.room-notice {
  grid-row: 2;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(255, 117, 109, 0.22);
  background: rgba(255, 117, 109, 0.08);
  color: #ffaaa5;
  font-size: 0.62rem;
  font-weight: 800;
  text-align: center;
}

.message-stream {
  grid-row: 3;
  min-height: 0;
  overflow-y: auto;
  padding: 18px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #3a464a transparent;
}

.community-message {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  margin: 0 0 18px;
}

.community-message.is-own {
  width: 100%;
  margin-left: 0;
}

.message-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #3a464a;
  border-radius: 50%;
  background: #20282b;
  color: var(--chat-lime);
  font-size: 0.65rem;
  font-weight: 950;
  overflow: hidden;
}

.message-avatar img,
.member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.community-message.is-own .message-avatar {
  border-color: rgba(41, 217, 189, 0.42);
  color: var(--chat-mint);
}

.message-content {
  min-width: 0;
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
}

.message-meta strong {
  overflow: hidden;
  color: #f4f7f5;
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-meta time,
.message-meta span {
  color: #748085;
  font-size: 0.52rem;
  font-weight: 750;
}

.activity-badge {
  padding: 3px 5px;
  border: 1px solid rgba(206, 244, 61, 0.34);
  border-radius: 4px;
  color: var(--chat-lime) !important;
}

.message-bubble {
  display: inline-grid;
  max-width: 100%;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #343f43;
  border-radius: 7px;
  background: #1a2124;
  color: #dce3e0;
  font-size: 0.72rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.community-message.is-own .message-bubble {
  border-color: rgba(41, 217, 189, 0.28);
  background: rgba(41, 217, 189, 0.07);
}

.message-bubble .mention {
  color: var(--chat-lime);
  font-weight: 900;
}

.message-image {
  display: block;
  max-width: min(440px, 100%);
  max-height: 440px;
  border: 1px solid #3a464a;
  border-radius: 6px;
  background: #0b1012;
  object-fit: contain;
}

.removed-message {
  color: #778286;
  font-style: italic;
}

.message-report-count {
  margin-left: auto;
  color: #ff928c !important;
}

.message-load-more {
  display: block;
  margin: 0 auto 18px;
  padding: 7px 10px;
  border: 1px solid #3b474b;
  border-radius: 5px;
  background: #1c2326;
  color: #cbd3d0;
  font-size: 0.6rem;
  font-weight: 850;
  cursor: pointer;
}

.new-message-jump {
  position: absolute;
  right: 22px;
  bottom: 112px;
  z-index: 2;
  padding: 7px 10px;
  border: 1px solid var(--chat-lime);
  border-radius: 16px;
  background: #151c1e;
  color: var(--chat-lime);
  font-size: 0.58rem;
  font-weight: 900;
  cursor: pointer;
}

.community-composer {
  position: relative;
  z-index: 3;
  grid-row: 4;
  display: grid;
  gap: 7px;
  padding: 12px 15px;
  border-top: 1px solid var(--chat-line);
  background: #141a1c;
  box-shadow: 0 -12px 28px rgba(5, 9, 10, 0.24);
}

.community-composer textarea {
  width: 100%;
  min-height: 58px;
  max-height: 150px;
  resize: none;
  padding: 10px 12px;
  border: 1px solid #3d494d;
  border-radius: 7px;
  outline: none;
  background: #1c2427;
  color: #f1f5f2;
  font: inherit;
  font-size: 0.72rem;
  line-height: 1.45;
}

.community-composer textarea:focus {
  border-color: var(--chat-mint);
  box-shadow: 0 0 0 3px rgba(41, 217, 189, 0.09);
}

.community-composer-row {
  justify-content: space-between;
  gap: 10px;
}

.community-media-actions {
  min-width: 0;
  gap: 7px;
}

.community-media-actions input[type="file"] {
  display: none;
}

.community-icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid #3e4a4e;
  border-radius: 6px;
  background: #20282b;
  color: var(--chat-lime);
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
}

.camera-button {
  color: var(--chat-mint);
}

.community-media-actions > span {
  overflow: hidden;
  color: #7f8a8e;
  font-size: 0.56rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-media-actions > span.is-limit {
  color: var(--chat-danger);
}

.community-send {
  display: inline-flex;
  min-width: 86px;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--chat-lime);
  border-radius: 6px;
  background: var(--chat-lime);
  color: #111609;
  font-size: 0.66rem;
  font-weight: 950;
  cursor: pointer;
}

.community-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.community-composer-message {
  min-height: 14px;
  margin: 0;
  color: var(--chat-danger);
  font-size: 0.58rem;
  font-weight: 800;
}

.pending-chat-image {
  position: relative;
  width: 92px;
  height: 68px;
  overflow: hidden;
  border: 1px solid #4a565a;
  border-radius: 6px;
  background: #0e1315;
}

.pending-chat-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pending-chat-image button {
  position: absolute;
  top: 3px;
  right: 3px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(10, 14, 16, 0.9);
  color: #fff;
  cursor: pointer;
}

.members-help {
  margin: 0;
  padding: 11px 14px;
  border-bottom: 1px solid var(--chat-line);
  color: #788488;
  font-size: 0.58rem;
  line-height: 1.45;
}

.member-list {
  height: calc(100% - 116px);
  padding: 7px;
}

.member-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  width: 100%;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  padding: 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #dce3e0;
  text-align: left;
  cursor: pointer;
}

.member-item:hover {
  border-color: #354145;
  background: #1b2225;
}

.member-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #242d30;
  color: var(--chat-lime);
  font-size: 0.6rem;
  font-weight: 950;
  overflow: hidden;
}

.member-avatar::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 7px;
  height: 7px;
  border: 2px solid #111719;
  border-radius: 50%;
  background: #657074;
}

.member-item.is-online .member-avatar::after {
  background: var(--chat-mint);
}

.member-item strong,
.member-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-item strong {
  font-size: 0.64rem;
}

.member-item small {
  margin-top: 3px;
  color: #748084;
  font-size: 0.52rem;
}

.member-rank {
  color: var(--chat-lime);
  font-size: 0.54rem;
  font-weight: 950;
}

.chat-context-menu {
  position: fixed;
  z-index: 160;
  width: 190px;
  padding: 7px;
  border: 1px solid #3a464a;
  border-radius: 7px;
  background: #161d20;
  color: #eef2ef;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.48);
}

.chat-context-menu p {
  overflow: hidden;
  margin: 0 0 5px;
  padding: 7px;
  color: #8b969a;
  font-size: 0.58rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-context-menu button {
  display: block;
  width: 100%;
  min-height: 34px;
  padding: 7px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #ff9a94;
  text-align: left;
  font-size: 0.62rem;
  font-weight: 800;
  cursor: pointer;
}

.chat-context-menu button:hover {
  background: rgba(255, 117, 109, 0.1);
}

.chat-guidelines,
.chat-image-editor {
  position: fixed;
  inset: 0;
  z-index: 170;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(6, 9, 10, 0.82);
  backdrop-filter: blur(8px);
}

.guidelines-card,
.image-editor-card {
  position: relative;
  width: min(820px, 100%);
  max-height: 92dvh;
  overflow-y: auto;
  padding: 24px;
  border: 1px solid #3a464a;
  border-radius: 8px;
  background: #141a1c;
  color: #f3f7f4;
}

.guidelines-card > .icon-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.guidelines-card h2 {
  margin-top: 6px;
  font-size: 1.7rem;
}

.guideline-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 22px 0;
  overflow: hidden;
  border: 1px solid #303a3e;
  border-radius: 7px;
  background: #303a3e;
}

.guideline-grid article {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 3px 9px;
  padding: 15px;
  background: #1a2124;
}

.guideline-grid article b {
  grid-row: 1 / 3;
  color: var(--chat-lime);
  font-size: 0.62rem;
}

.guideline-grid article strong {
  font-size: 0.7rem;
}

.guideline-grid article span {
  color: #8b969a;
  font-size: 0.62rem;
  line-height: 1.45;
}

.guidelines-card > .primary-action {
  width: auto;
  min-width: 150px;
}

.image-editor-card {
  display: grid;
  width: min(980px, 100%);
  grid-template-rows: auto auto minmax(240px, 1fr) auto;
  gap: 12px;
  overflow: hidden;
}

.image-editor-card > header,
.image-editor-actions {
  justify-content: space-between;
  gap: 14px;
}

.image-editor-card header h2 {
  margin-top: 4px;
  font-size: 1rem;
}

.image-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px;
  overflow-x: auto;
  border: 1px solid #313b3f;
  border-radius: 7px;
  background: #1a2124;
}

.image-editor-toolbar button,
.drawing-color {
  display: grid;
  place-items: center;
  width: 38px;
  height: 36px;
  flex: 0 0 38px;
  padding: 0;
  border: 1px solid #3b474b;
  border-radius: 6px;
  background: #222a2d;
  color: #e7ece9;
  font-size: 1rem;
  cursor: pointer;
}

.image-editor-toolbar button.is-active {
  border-color: var(--chat-lime);
  background: rgba(206, 244, 61, 0.1);
  color: var(--chat-lime);
}

.drawing-color input {
  width: 25px;
  height: 25px;
  padding: 0;
  border: 0;
  background: transparent;
}

.drawing-size {
  display: flex;
  min-width: 130px;
  align-items: center;
  gap: 8px;
  color: #8b969a;
  font-size: 0.58rem;
  font-weight: 800;
}

.drawing-size input {
  width: 90px;
  accent-color: var(--chat-lime);
}

.image-editor-stage {
  position: relative;
  display: grid;
  min-height: 260px;
  max-height: 62dvh;
  place-items: center;
  overflow: auto;
  border: 1px solid #303a3e;
  border-radius: 7px;
  background-color: #0b1012;
  background-image:
    linear-gradient(45deg, #141a1c 25%, transparent 25%),
    linear-gradient(-45deg, #141a1c 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #141a1c 75%),
    linear-gradient(-45deg, transparent 75%, #141a1c 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
  touch-action: none;
}

.image-editor-stage img,
.image-editor-stage canvas {
  display: block;
  max-width: 100%;
  max-height: 58dvh;
}

.image-editor-stage canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  cursor: crosshair;
  transform: translate(-50%, -50%);
}

.image-editor-actions {
  justify-content: flex-end;
}

.image-editor-actions button {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid #3c484c;
  border-radius: 6px;
  background: #20282b;
  color: #eef2ef;
  font-size: 0.66rem;
  font-weight: 900;
  cursor: pointer;
}

.image-editor-actions .primary-action {
  border-color: var(--chat-lime);
  background: var(--chat-lime);
  color: #111609;
}

.admin-chat-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid #2e373a;
  border-radius: 8px;
  background: #171c1f;
}

.admin-chat-summary article {
  padding: 15px;
  border-right: 1px solid #2e373a;
}

.admin-chat-summary article:last-child {
  border-right: 0;
}

.admin-chat-summary span,
.admin-chat-summary strong {
  display: block;
}

.admin-chat-summary span {
  color: #7e898d;
  font-size: 0.56rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-chat-summary strong {
  margin-top: 5px;
  color: var(--chat-lime);
  font-size: 1.35rem;
}

.admin-chat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.admin-room-item {
  display: grid;
  gap: 11px;
  padding: 14px;
  border: 1px solid #303a3e;
  border-radius: 7px;
  background: #171d20;
}

.admin-room-item header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
}

.admin-room-item header strong {
  font-size: 0.74rem;
}

.admin-room-item header small {
  display: block;
  margin-top: 4px;
  color: #788488;
  font-size: 0.55rem;
}

.room-enabled-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #9aa5a8;
  font-size: 0.55rem;
  font-weight: 850;
}

.room-enabled-toggle input {
  width: 15px;
  height: 15px;
  accent-color: var(--chat-lime);
}

.admin-room-schedule {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.admin-room-schedule label {
  display: grid;
  gap: 5px;
  color: #7f8b8f;
  font-size: 0.54rem;
  font-weight: 800;
}

.admin-room-schedule input {
  width: 100%;
  min-height: 36px;
  padding: 7px;
  border: 1px solid #3a4549;
  border-radius: 5px;
  background: #20272a;
  color: #fff;
}

.admin-room-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.admin-room-actions button {
  min-height: 34px;
  border: 1px solid #4c585c;
  border-radius: 5px;
  background: #232b2e;
  color: #eef2ef;
  font-size: 0.61rem;
  font-weight: 900;
  cursor: pointer;
}

.admin-room-actions button.is-danger,
.message-actions .message-delete-action {
  border-color: rgba(255, 111, 104, 0.45);
  color: #ff8a84;
}

.admin-room-actions button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.admin-report-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #303a3e;
}

.admin-section-title {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.admin-section-title h3 {
  margin-top: 4px;
  font-size: 1rem;
}

.admin-section-title > span {
  color: #788488;
  font-size: 0.58rem;
}

.admin-report-list {
  display: grid;
  gap: 7px;
}

.admin-report-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #303a3e;
  border-radius: 7px;
  background: #171d20;
}

.admin-report-item strong,
.admin-report-item p,
.admin-report-item small {
  display: block;
  margin: 0;
}

.admin-report-item strong {
  font-size: 0.67rem;
}

.admin-report-item p {
  margin-top: 5px;
  color: #a9b2b5;
  font-size: 0.62rem;
  line-height: 1.4;
}

.admin-report-item small {
  margin-top: 5px;
  color: #788488;
  font-size: 0.54rem;
}

.admin-report-item button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 117, 109, 0.34);
  border-radius: 5px;
  background: rgba(255, 117, 109, 0.08);
  color: #ff9a94;
  font-size: 0.58rem;
  font-weight: 900;
  cursor: pointer;
}

body.chat-open {
  overflow: hidden;
}

@media (max-width: 1100px) {
  .community-layout {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .community-members {
    position: absolute;
    z-index: 4;
    top: 66px;
    right: 0;
    bottom: 0;
    width: min(290px, 88vw);
    border-left: 1px solid var(--chat-line);
    box-shadow: -18px 0 50px rgba(0, 0, 0, 0.4);
    transform: translateX(105%);
    transition: transform 180ms ease;
  }

  .chat-community.members-open .community-members {
    transform: translateX(0);
  }

  .members-toggle,
  .members-head button {
    display: grid;
  }

  .members-toggle {
    display: inline-flex;
  }

  .admin-chat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .admin-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-nav button {
    min-width: 0;
    overflow: hidden;
    font-size: 0.56rem;
  }

  .header-actions {
    gap: 5px;
  }

  .chat-room-button {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    justify-content: center;
    padding: 4px;
    border-radius: 50%;
  }

  .chat-room-button > span:nth-child(2) {
    display: none;
  }

  .chat-room-icon {
    width: 23px;
    height: 20px;
    flex-basis: 23px;
  }

  .header-unread {
    position: absolute;
    top: -4px;
    right: -4px;
  }

  .chat-community {
    grid-template-rows: 58px minmax(0, 1fr);
  }

  .community-header {
    padding: 0 9px;
  }

  .community-header .brand-mark {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    font-size: 0.75rem;
  }

  .community-brand p {
    display: none;
  }

  .community-brand h2 {
    font-size: 0.82rem;
  }

  .community-header-actions > button:first-child {
    min-height: 32px;
    padding: 6px 8px;
    font-size: 0.56rem;
  }

  .community-header-actions .icon-close {
    width: 34px;
    height: 34px;
  }

  .community-layout {
    position: relative;
    display: block;
  }

  .community-rooms,
  .community-conversation {
    position: absolute;
    inset: 0;
  }

  .community-rooms {
    border-right: 0;
  }

  .community-conversation {
    display: none;
  }

  .chat-community.is-room-open .community-rooms {
    display: none;
  }

  .chat-community.is-room-open .community-conversation {
    display: block;
  }

  .room-thread-header {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    min-height: 58px;
    gap: 8px;
    padding: 7px 9px;
  }

  .mobile-room-back {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
  }

  .room-live-stats {
    gap: 7px;
  }

  .room-live-stats span {
    font-size: 0.5rem;
  }

  .members-toggle {
    grid-column: 3;
    grid-row: 1;
    width: 34px;
    height: 34px;
    min-height: 34px;
    overflow: hidden;
    padding: 0;
    color: transparent;
  }

  .members-toggle::before {
    content: "@";
    color: var(--chat-lime);
    font-size: 0.8rem;
  }

  .message-stream {
    padding: 13px 10px;
  }

  .community-message {
    width: 96%;
  }

  .community-composer {
    padding: 9px;
  }

  .community-composer textarea {
    min-height: 54px;
    font-size: 0.68rem;
  }

  .community-send {
    min-width: 68px;
  }

  .community-members {
    top: 58px;
  }

  .guidelines-card,
  .image-editor-card {
    width: 100%;
    max-height: 94dvh;
    padding: 18px 12px;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 8px 8px 0 0;
  }

  .chat-guidelines,
  .chat-image-editor {
    align-items: end;
    padding: 0;
  }

  .guideline-grid {
    grid-template-columns: 1fr;
  }

  .image-editor-card {
    height: 94dvh;
  }

  .image-editor-toolbar {
    padding: 6px;
  }

  .admin-chat-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-chat-summary article:nth-child(2) {
    border-right: 0;
  }

  .admin-chat-summary article:nth-child(-n + 2) {
    border-bottom: 1px solid #2e373a;
  }

  .admin-chat-grid {
    grid-template-columns: 1fr;
  }

  .admin-section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-report-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .community-header-actions > button:first-child {
    width: 34px;
    overflow: hidden;
    color: transparent;
  }

  .community-header-actions > button:first-child::before {
    content: "i";
    color: var(--chat-lime);
    font-size: 0.75rem;
    font-weight: 950;
  }

  .room-title-copy h3 {
    max-width: 120px;
    overflow: hidden;
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .room-live-stats span:first-child {
    display: none;
  }

  .community-message {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 7px;
  }

  .message-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.54rem;
  }

  .message-bubble {
    padding: 9px 10px;
    font-size: 0.67rem;
  }

  .community-media-actions > span {
    max-width: 105px;
  }
}

/* Unified room composer */
.community-composer {
  gap: 6px;
  padding: 10px 14px 9px;
}

.community-input-shell {
  position: relative;
  border: 1px solid #3d494d;
  border-radius: 8px;
  background: #1c2427;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.community-input-shell:focus-within {
  border-color: var(--chat-mint);
  box-shadow: 0 0 0 3px rgba(41, 217, 189, 0.09);
}

.community-composer textarea {
  min-height: 62px;
  max-height: 140px;
  padding: 11px 12px 7px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.community-composer textarea:focus {
  border-color: transparent;
  box-shadow: none;
}

.community-composer > input[type="file"] {
  display: none;
}

.community-composer-row {
  display: flex;
  min-height: 45px;
  align-items: center;
  padding: 6px 7px;
  border-top: 1px solid #303b3f;
}

.community-inline-tools,
.community-send-group,
.admin-chat-user-actions {
  display: flex;
  align-items: center;
}

.community-inline-tools {
  min-width: 0;
  gap: 5px;
}

.community-send-group {
  flex: 0 0 auto;
  gap: 10px;
}

.community-send-group > span {
  color: #7f8a8e;
  font-size: 0.55rem;
  font-weight: 760;
  white-space: nowrap;
}

.community-send-group > span.is-limit {
  color: var(--chat-danger);
}

.community-icon-button,
.format-button {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  padding: 0;
  border: 1px solid #3e4a4e;
  border-radius: 6px;
  background: #20282b;
  color: #d7dfdc;
  font-size: 0.8rem;
  cursor: pointer;
}

.attachment-toggle {
  color: var(--chat-lime);
  font-size: 1rem;
}

.emoji-toggle {
  color: #f1c75b;
  font-size: 1rem;
}

.format-button:hover,
.format-button:focus-visible,
.community-icon-button:hover,
.community-icon-button:focus-visible {
  border-color: var(--chat-mint);
  color: #fff;
}

.format-divider {
  width: 1px;
  height: 22px;
  margin: 0 2px;
  background: #394448;
}

.community-send {
  min-width: 78px;
  min-height: 32px;
}

.chat-attachment-menu,
.chat-emoji-picker {
  position: absolute;
  left: 7px;
  bottom: 50px;
  z-index: 8;
  border: 1px solid #3b484c;
  border-radius: 7px;
  background: #111719;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.48);
}

.chat-attachment-menu {
  display: grid;
  width: 220px;
  padding: 6px;
  gap: 4px;
}

.chat-attachment-menu label,
.chat-attachment-menu button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  min-height: 52px;
  align-items: center;
  padding: 7px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #eef3f0;
  text-align: left;
  cursor: pointer;
}

.chat-attachment-menu label:hover,
.chat-attachment-menu button:hover {
  background: #20282b;
}

.chat-attachment-menu span {
  grid-row: 1 / 3;
  color: var(--chat-lime);
  font-size: 1rem;
}

.chat-attachment-menu b {
  font-size: 0.65rem;
}

.chat-attachment-menu small {
  color: #7f8a8e;
  font-size: 0.52rem;
}

.chat-emoji-picker {
  display: grid;
  grid-template-columns: repeat(8, 32px);
  gap: 3px;
  padding: 7px;
}

.chat-emoji-picker button {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  font-size: 1rem;
  cursor: pointer;
}

.chat-emoji-picker button:hover {
  background: #263034;
}

.chat-reply-target {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 6px 11px;
  border-bottom: 1px solid #303b3f;
  border-left: 3px solid var(--chat-mint);
  background: rgba(41, 217, 189, 0.06);
}

.chat-reply-target span {
  display: grid;
  gap: 1px;
}

.chat-reply-target small {
  color: #7e8a8e;
  font-size: 0.48rem;
  font-weight: 850;
  text-transform: uppercase;
}

.chat-reply-target strong {
  font-size: 0.6rem;
}

.chat-reply-target button {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #a9b3b0;
  font-size: 1rem;
  cursor: pointer;
}

/* Message interactions and threads */
.message-text a {
  color: var(--chat-mint);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.message-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
}

.message-actions button {
  min-height: 25px;
  padding: 3px 7px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #778488;
  font-size: 0.52rem;
  font-weight: 820;
  cursor: pointer;
}

.message-actions button:hover {
  border-color: #3b474b;
  color: #dce4e1;
  background: #1b2326;
}

.message-like {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.message-like span {
  color: #758186;
  font-size: 0.72rem;
}

.message-like.is-liked,
.message-like.is-liked span {
  color: #ff7e76;
}

.role-badge {
  padding: 2px 5px;
  border: 1px solid rgba(41, 217, 189, 0.35);
  border-radius: 4px;
  color: var(--chat-mint) !important;
  text-transform: capitalize;
}

.message-thread {
  margin: -7px 0 17px 44px;
  padding-left: 13px;
  border-left: 1px solid #334044;
}

.thread-rule {
  display: flex;
  min-height: 26px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  color: #718085;
  font-size: 0.5rem;
  font-weight: 820;
}

.thread-load-more {
  min-height: 27px;
  padding: 4px 8px;
  border: 1px solid #38464a;
  border-radius: 5px;
  background: #192124;
  color: var(--chat-mint);
  font-size: 0.5rem;
  font-weight: 850;
  cursor: pointer;
}

.thread-load-more:hover,
.thread-load-more:focus-visible {
  border-color: var(--chat-mint);
  background: #202b2e;
}

.thread-load-more:disabled {
  cursor: wait;
  opacity: 0.65;
}

.community-message.is-thread-reply {
  grid-template-columns: 28px minmax(0, 1fr);
  margin-bottom: 10px;
}

.is-thread-reply .message-avatar {
  width: 28px;
  height: 28px;
  font-size: 0.56rem;
}

.is-thread-reply .message-bubble {
  padding: 8px 10px;
}

.youtube-preview {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  max-width: 430px;
  overflow: hidden;
  border: 1px solid #3b474b;
  border-radius: 7px;
  background: #111719;
  color: #eef2ef;
  text-decoration: none;
}

.youtube-preview img {
  width: 120px;
  height: 76px;
  object-fit: cover;
}

.youtube-preview > span {
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 8px 10px;
}

.youtube-preview small {
  color: #ff756d;
  font-size: 0.47rem;
  font-weight: 950;
}

.youtube-preview strong {
  overflow: hidden;
  font-size: 0.62rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.youtube-preview b {
  color: #7e8a8e;
  font-size: 0.49rem;
}

.chat-context-menu #chatReportActions {
  display: grid;
}

.chat-context-menu .moderation-menu-action {
  color: var(--chat-lime);
}

.chat-context-menu #blockChatUser {
  color: #ff9a94;
}

/* Live camera */
.chat-camera {
  position: fixed;
  inset: 0;
  z-index: 175;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(6, 9, 10, 0.86);
  backdrop-filter: blur(8px);
}

.chat-camera-card {
  width: min(760px, 100%);
  padding: 18px;
  border: 1px solid #3a464a;
  border-radius: 8px;
  background: #141a1c;
  color: #f3f7f4;
}

.chat-camera-card header,
.chat-camera-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chat-camera-card header p,
.chat-camera-card header h2 {
  margin: 0;
}

.chat-camera-card header p {
  color: var(--chat-mint);
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.chat-camera-card header h2 {
  margin-top: 3px;
  font-size: 1rem;
}

.chat-camera-stage {
  position: relative;
  display: grid;
  min-height: 300px;
  place-items: center;
  margin: 15px 0;
  overflow: hidden;
  border: 1px solid #303b3f;
  border-radius: 7px;
  background: #080d0f;
}

.chat-camera-stage video {
  display: block;
  width: 100%;
  max-height: 65dvh;
  object-fit: contain;
}

.chat-camera-stage p {
  position: absolute;
  color: #9ba6aa;
  font-size: 0.68rem;
}

.chat-camera-actions {
  justify-content: flex-end;
}

.chat-camera-actions button {
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid #3b474b;
  border-radius: 6px;
  background: #20282b;
  color: #eef2ef;
  font-weight: 850;
  cursor: pointer;
}

.chat-camera-actions .primary-action {
  border-color: var(--chat-lime);
  background: var(--chat-lime);
  color: #111609;
}

/* Super-admin community users */
.admin-chat-user-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-chat-user {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid #303a3e;
  border-radius: 7px;
  background: #171d20;
}

.admin-chat-user > div:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.admin-chat-user strong,
.admin-chat-user small,
.admin-chat-user span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-chat-user strong {
  font-size: 0.66rem;
}

.admin-chat-user small,
.admin-chat-user span {
  color: #7f8b8f;
  font-size: 0.52rem;
}

.admin-chat-user-actions {
  gap: 5px;
}

.admin-chat-user-actions button {
  min-height: 31px;
  padding: 5px 8px;
  border: 1px solid #445055;
  border-radius: 5px;
  background: #222a2d;
  color: #e9efec;
  font-size: 0.52rem;
  font-weight: 850;
  cursor: pointer;
}

.admin-chat-user-actions button.is-danger {
  border-color: rgba(255, 117, 109, 0.35);
  color: #ff9a94;
}

@media (max-width: 760px) {
  .community-composer {
    padding: 8px;
  }

  .community-composer-row {
    align-items: flex-end;
  }

  .community-inline-tools {
    flex-wrap: wrap;
  }

  .community-send-group > span {
    display: none;
  }

  .community-send {
    min-width: 42px;
    width: 42px;
    padding: 0;
  }

  .community-send span {
    display: none;
  }

  .chat-emoji-picker {
    grid-template-columns: repeat(6, 32px);
    max-width: calc(100vw - 32px);
  }

  .message-thread {
    margin-left: 22px;
    padding-left: 8px;
  }

  .youtube-preview {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .youtube-preview img {
    width: 92px;
    height: 62px;
  }

  .admin-chat-user-list {
    grid-template-columns: 1fr;
  }

  .admin-chat-user {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .admin-chat-user-actions {
    grid-column: 1 / -1;
  }

  .chat-camera {
    align-items: end;
    padding: 0;
  }

  .chat-camera-card {
    padding: 14px;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 8px 8px 0 0;
  }

  .chat-camera-stage {
    min-height: 220px;
  }
}

@media (min-width: 701px) and (max-width: 1100px) {
  .admin-chat-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-chat-summary article:nth-child(3n) {
    border-right: 0;
  }

  .admin-chat-summary article:nth-child(-n + 3) {
    border-bottom: 1px solid #2e373a;
  }
}

@media (prefers-reduced-motion: reduce) {
  .community-members,
  .message-stream {
    scroll-behavior: auto;
    transition: none;
  }
}
