.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.floating-chat-toggle {
  position: fixed;
}

.floating-chat-notification {
  position: absolute;
  top: 3px;
  right: 5px;
  width: 11px;
  height: 11px;
  border: 2px solid #080808;
  border-radius: 50%;
  background: #c50267;
  box-shadow: 0 0 0 3px rgba(197, 2, 103, 0.18);
}

.floating-chat-pane:not([hidden]) {
  display: flex;
  min-height: 100%;
  flex-direction: column;
}

.community-intro {
  padding-bottom: 12px;
}

.community-workspace {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-rows: auto minmax(260px, 1fr) auto;
}

.community-feed-status,
.news-feed-status {
  margin: 0 18px 10px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
}

.community-feed-status[data-tone="success"] {
  border-color: rgba(76, 217, 100, 0.2);
  color: #9be6a9;
}

.community-feed-status[data-tone="error"],
.news-feed-status[data-tone="error"] {
  border-color: rgba(255, 111, 111, 0.3);
  color: #ffabab;
}

.community-feed {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 16px 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(251, 176, 4, 0.38) transparent;
}

.community-empty {
  display: grid;
  min-height: 190px;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 24px;
  border: 1px dashed rgba(251, 176, 4, 0.24);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.58);
  text-align: center;
}

.community-empty strong {
  color: #fff;
  font-size: 0.95rem;
}

.community-empty p {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.5;
}

.community-message {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  transition: background 180ms ease;
}

.community-message.is-highlighted {
  border-radius: 18px;
  background: rgba(251, 176, 4, 0.12);
}

.community-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(251, 176, 4, 0.38);
  border-radius: 12px;
  background: rgba(251, 176, 4, 0.11);
  color: #fbb004;
  font-size: 0.66rem;
  font-weight: 900;
}

.community-message.is-own .community-avatar {
  background: #fbb004;
  color: #080808;
}

.community-message-card {
  min-width: 0;
  padding: 12px 13px 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 5px 17px 17px 17px;
  background: rgba(255, 255, 255, 0.045);
}

.community-message.is-own .community-message-card {
  border-color: rgba(251, 176, 4, 0.28);
  background: linear-gradient(145deg, rgba(251, 176, 4, 0.11), rgba(255, 255, 255, 0.035));
}

.community-message-card > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.community-message-card > header strong {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-message-card time {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.39);
  font-size: 0.58rem;
}

.community-message-card > p {
  margin: 8px 0 9px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.78rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.community-message-card > p a,
.news-card-content a {
  color: #fbb004;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.community-parent {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 8px 10px;
  overflow: hidden;
  border: 0;
  border-left: 2px solid #fbb004;
  border-radius: 0 9px 9px 0;
  background: rgba(0, 0, 0, 0.25);
  color: rgba(255, 255, 255, 0.6);
  font: inherit;
  font-size: 0.64rem;
  line-height: 1.4;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.community-parent span {
  display: block;
  color: #fbb004;
  font-weight: 800;
}

.community-image-open {
  display: block;
  width: 100%;
  max-height: 280px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 13px;
  background: #050505;
  cursor: zoom-in;
}

.community-image-open img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
}

.community-message-card > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.community-reactions {
  display: flex;
  min-width: 0;
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: none;
}

.community-reactions::-webkit-scrollbar {
  display: none;
}

.community-reactions button,
.community-reply-button {
  min-height: 26px;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font: inherit;
  font-size: 0.67rem;
  cursor: pointer;
}

.community-reactions button:hover,
.community-reactions button.is-active {
  border-color: rgba(251, 176, 4, 0.28);
  background: rgba(251, 176, 4, 0.1);
}

.community-reactions button span {
  margin-left: 3px;
  color: #fff;
  font-size: 0.58rem;
}

.community-reply-button {
  flex: 0 0 auto;
  color: #fbb004;
  font-weight: 800;
}

.community-composer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: grid;
  gap: 9px;
  padding: 13px 16px max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 8, 8, 0.96);
  backdrop-filter: blur(15px);
}

.community-message-field {
  position: relative;
  display: block;
}

.community-message-field textarea {
  width: 100%;
  min-height: 82px;
  max-height: 150px;
  resize: vertical;
  padding: 13px 14px 25px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 16px;
  outline: 0;
  background: rgba(255, 255, 255, 0.045);
  color: #fff;
  font: inherit;
  font-size: 0.79rem;
  line-height: 1.5;
}

.community-message-field textarea:focus {
  border-color: rgba(251, 176, 4, 0.7);
  box-shadow: 0 0 0 3px rgba(251, 176, 4, 0.09);
}

.community-message-field small {
  position: absolute;
  right: 12px;
  bottom: 9px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.6rem;
}

.community-composer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.community-image-button,
.community-send {
  min-height: 37px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
}

.community-image-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.community-image-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.community-send {
  margin-left: auto;
  padding-inline: 17px;
  border-color: #fbb004;
  background: #fbb004;
  color: #080808;
}

.community-send:disabled {
  cursor: wait;
  opacity: 0.58;
}

.community-status {
  min-width: 0;
  flex: 1;
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.62rem;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.community-status[data-tone="error"] {
  color: #ffabab;
}

.community-status[data-tone="success"] {
  color: #9be6a9;
}

.community-image-preview,
.community-reply-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid rgba(251, 176, 4, 0.22);
  border-radius: 13px;
  background: rgba(251, 176, 4, 0.07);
}

.community-image-preview img {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 9px;
  object-fit: cover;
}

.community-image-preview div,
.community-reply-preview div {
  min-width: 0;
  flex: 1;
}

.community-image-preview strong,
.community-image-preview small,
.community-reply-preview span,
.community-reply-preview strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-image-preview strong,
.community-reply-preview strong {
  color: #fff;
  font-size: 0.7rem;
}

.community-image-preview small,
.community-reply-preview span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.61rem;
}

.community-image-preview button,
.community-reply-preview button {
  flex: 0 0 auto;
  padding: 6px 8px;
  border: 0;
  background: transparent;
  color: #fbb004;
  font: inherit;
  font-size: 0.67rem;
  font-weight: 800;
  cursor: pointer;
}

.community-reply-preview button {
  font-size: 1.2rem;
}

.news-feed {
  display: grid;
  gap: 15px;
  padding: 0 18px 24px;
}

.news-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.045);
}

.news-card.is-pinned {
  border-color: rgba(251, 176, 4, 0.34);
  box-shadow: inset 0 1px 0 rgba(251, 176, 4, 0.12);
}

.news-card > img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.news-card-body {
  padding: 16px;
}

.news-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.62rem;
}

.news-card-meta span {
  color: #fbb004;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.news-card h3 {
  margin: 10px 0 7px;
  color: #fff;
  font-size: 1.03rem;
  line-height: 1.18;
}

.news-card p,
.news-card-content {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.76rem;
  line-height: 1.58;
}

.news-card-content {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.news-card-body > a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  margin-top: 13px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fbb004;
  color: #080808;
  font-size: 0.7rem;
  font-weight: 900;
}

/* Panel de comunidad y noticias */
.admin-community-list,
.admin-news-list,
.admin-moderation-list {
  display: grid;
  gap: 13px;
}

.admin-community-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0;
}

.admin-community-toolbar label {
  min-width: min(330px, 100%);
  display: grid;
  gap: 7px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.75rem;
  font-weight: 800;
}

.admin-community-toolbar input,
.admin-news-form input,
.admin-news-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 13px;
  outline: 0;
  background: rgba(255, 255, 255, 0.045);
  color: #fff;
  font: inherit;
}

.admin-community-toolbar input:focus,
.admin-news-form input:focus,
.admin-news-form textarea:focus {
  border-color: rgba(251, 176, 4, 0.66);
}

.admin-community-card,
.admin-news-card,
.admin-moderation-card {
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.admin-community-card.is-hidden {
  opacity: 0.65;
  border-style: dashed;
}

.admin-community-card header,
.admin-news-card header,
.admin-moderation-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.admin-community-card header strong,
.admin-news-card h3,
.admin-moderation-card header strong {
  color: #fff;
}

.admin-community-card time,
.admin-news-card time,
.admin-moderation-card time {
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.7rem;
}

.admin-community-card p,
.admin-moderation-card p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.admin-community-card img,
.admin-news-card img {
  width: 150px;
  max-height: 120px;
  margin-top: 10px;
  border-radius: 12px;
  object-fit: cover;
}

.admin-community-card .admin-actions,
.admin-news-card .admin-actions {
  margin-top: 13px;
}

.admin-news-form {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
  padding: 20px;
  border: 1px solid rgba(251, 176, 4, 0.2);
  border-radius: 20px;
  background: rgba(251, 176, 4, 0.045);
}

.admin-news-form label {
  display: grid;
  gap: 7px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.76rem;
  font-weight: 800;
}

.admin-news-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-news-options {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-news-options label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-news-options input {
  width: 18px;
  height: 18px;
  accent-color: #fbb004;
}

.admin-news-form > button {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  background: #fbb004;
  color: #080808;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.admin-moderation-section {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-moderation-section h3 {
  margin: 0 0 14px;
}

.admin-moderation-card {
  border-color: rgba(197, 2, 103, 0.28);
}

.admin-moderation-card .admin-badge {
  background: rgba(197, 2, 103, 0.14);
  color: #ff8cc6;
}

@media (max-width: 620px) {
  .floating-chat-tabs {
    padding-inline: 14px;
  }

  .floating-chat-tabs button {
    flex: 1 0 auto;
  }

  .community-workspace {
    min-height: calc(100svh - 205px);
  }

  .community-feed {
    min-height: 220px;
    padding-inline: 12px;
  }

  .community-composer {
    padding-inline: 12px;
  }

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

  .community-avatar {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }

  .community-message-card {
    padding-inline: 11px;
  }

  .community-message-card > footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .community-reactions {
    width: 100%;
  }

  .community-reply-button {
    align-self: flex-end;
  }

  .community-composer-actions {
    flex-wrap: wrap;
  }

  .community-status {
    order: 3;
    flex-basis: 100%;
  }

  .admin-news-form-row {
    grid-template-columns: 1fr;
  }
}

