.community-page {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(15, 8, 27, 0.68) 0 34rem, transparent 47rem),
    radial-gradient(circle at 88% 12%, rgba(244, 123, 32, 0.32), transparent 27rem),
    linear-gradient(180deg, #140c25 0 34rem, #f4ead3 34rem 100%);
}

.broadcast-sky {
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 37rem;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 3rem 3rem;
  mask-image: linear-gradient(to bottom, #000 0 70%, transparent);
  pointer-events: none;
}

.broadcast-sky::before {
  position: absolute;
  width: 47rem;
  aspect-ratio: 1;
  top: -26rem;
  left: calc(50% - 23.5rem);
  border: 1px solid rgba(255, 201, 40, 0.22);
  border-radius: 50%;
  box-shadow: 0 0 8rem rgba(244, 123, 32, 0.18);
  content: "";
}

.community-header {
  max-width: 1240px;
}

.community-header .site-nav {
  gap: clamp(1rem, 2.4vw, 2rem);
}

.community-header .site-nav .active::after {
  right: 0;
  left: 0;
}

.community-page main {
  width: min(1240px, calc(100% - 3rem));
  margin: 0 auto;
}

.community-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 23rem;
  gap: 4rem;
  align-items: center;
  min-height: 28rem;
  padding: 3.8rem 2rem 4.8rem;
}

.community-hero h1 {
  max-width: 760px;
  margin: 0.5rem 0 1rem;
  font-family: var(--display);
  font-size: clamp(4rem, 9vw, 7.8rem);
  font-style: italic;
  letter-spacing: -0.035em;
  line-height: 0.82;
  text-transform: uppercase;
}

.community-hero h1 mark {
  color: var(--orange-hot);
  background: none;
  text-shadow: 4px 4px 0 #781f25;
}

.community-hero-copy > p:not(.eyebrow) {
  max-width: 650px;
  margin: 0;
  color: #d4cadf;
  font-size: 1.06rem;
}

.network-state {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.7rem;
  padding: 0.55rem 0.78rem;
  border: 1px solid rgba(72, 231, 255, 0.28);
  border-radius: 0.25rem;
  background: rgba(7, 60, 132, 0.15);
  color: #afeef8;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.network-state i {
  width: 0.55rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 1rem var(--gold);
  animation: signal-pulse 1.3s ease-in-out infinite;
}

.network-state.online {
  border-color: rgba(124, 246, 141, 0.4);
  color: var(--green);
}

.network-state.online i {
  background: var(--green);
  box-shadow: 0 0 1rem var(--green);
  animation: none;
}

.network-state.offline {
  border-color: rgba(255, 133, 120, 0.4);
  color: #ff9b91;
}

.network-state.offline i {
  background: #ff6f61;
  box-shadow: 0 0 1rem #ff6f61;
  animation: none;
}

.broadcast-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: min(22rem, 30vw);
  aspect-ratio: 1;
  justify-self: center;
}

.broadcast-mark::before {
  position: absolute;
  width: 38%;
  aspect-ratio: 1;
  border: 4px solid #ffb833;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #ffea7e, #f47b20 58%, #9d2025);
  box-shadow: 0 0 3rem rgba(244, 123, 32, 0.7), inset -0.7rem -0.8rem 1.2rem rgba(109, 21, 17, 0.45);
  content: "";
}

.broadcast-mark b,
.broadcast-mark small {
  position: relative;
  z-index: 2;
}

.broadcast-mark b {
  margin-top: -0.35rem;
  color: #7b1d23;
  font-family: var(--display);
  font-size: 2.5rem;
  font-style: italic;
  letter-spacing: 0.05em;
}

.broadcast-mark small {
  position: absolute;
  top: 69%;
  color: #c9f8ff;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.24em;
  line-height: 1.35;
  text-align: center;
}

.broadcast-ring {
  position: absolute;
  border: 1px solid rgba(72, 231, 255, 0.33);
  border-radius: 50%;
}

.ring-one { inset: 14%; }
.ring-two { inset: 3%; border-style: dashed; animation: ring-spin 28s linear infinite; }
.ring-three { inset: 29%; border-color: rgba(255, 201, 40, 0.35); }

.activity-board,
.leaderboard-section,
.bulletin-section,
.event-section {
  border: 1px solid rgba(67, 45, 85, 0.18);
  border-radius: 0.65rem;
  background: #fffaf0;
  color: #21152c;
  box-shadow: 0 22px 60px rgba(19, 11, 31, 0.15);
}

.activity-board {
  position: relative;
  z-index: 2;
  margin-top: -1.8rem;
  overflow: hidden;
  border-color: rgba(72, 231, 255, 0.2);
  background: #111226;
  color: var(--cream);
  box-shadow: 0 25px 70px rgba(9, 4, 20, 0.35);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  padding: 1.5rem 1.7rem 1.15rem;
  border-bottom: 1px solid rgba(40, 24, 48, 0.12);
}

.section-heading p {
  margin: 0 0 0.22rem;
  color: var(--orange);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-style: italic;
  letter-spacing: 0.025em;
  line-height: 1;
  text-transform: uppercase;
}

.section-heading > span {
  color: #746a77;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dark-heading {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark-heading > span {
  color: #9f94ae;
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.activity-card {
  position: relative;
  display: flex;
  min-height: 9.5rem;
  padding: 1.45rem 1.7rem 1.3rem;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.activity-card:last-child {
  border-right: 0;
}

.activity-card::after {
  position: absolute;
  width: 7rem;
  aspect-ratio: 1;
  right: -3.5rem;
  bottom: -4rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.14;
  content: "";
}

.activity-card > span {
  color: #9f94ae;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.activity-card strong {
  margin: 0.28rem 0 0;
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3.3rem);
  font-style: italic;
  line-height: 1;
  text-transform: uppercase;
}

.activity-card small {
  margin-top: auto;
  color: #a9a0b4;
  font-size: 0.68rem;
}

.accent-orange { color: var(--orange-hot); }
.accent-green { color: var(--green); }
.accent-cyan { color: var(--cyan); }
.accent-gold { color: var(--gold); }

.leaderboard-section {
  margin-top: 2rem;
  overflow: hidden;
}

.ranking-tabs {
  display: flex;
  gap: 0.55rem;
  padding: 1.2rem 1.7rem 0;
}

.ranking-tabs button {
  padding: 0.62rem 1rem;
  border: 1px solid #d9cedb;
  border-radius: 99rem;
  background: #f6eddf;
  color: #5b4a62;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ranking-tabs button:hover,
.ranking-tabs button:focus-visible {
  border-color: var(--orange);
}

.ranking-tabs button[aria-selected="true"] {
  border-color: #bd3c28;
  background: var(--orange);
  color: #fff;
  box-shadow: 0 7px 18px rgba(213, 75, 31, 0.2);
}

.ranking-panel {
  display: grid;
  grid-template-columns: minmax(24rem, 0.9fr) minmax(28rem, 1.1fr);
  gap: 2rem;
  padding: 1.7rem;
}

.podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  align-items: end;
  min-height: 14rem;
}

.podium-place {
  position: relative;
  display: flex;
  min-width: 0;
  padding: 1rem 0.7rem;
  align-items: center;
  flex-direction: column;
  border: 1px solid #d9cedb;
  border-radius: 0.45rem 0.45rem 0.15rem 0.15rem;
  background: linear-gradient(180deg, #fff 0, #f4e9d9 100%);
  text-align: center;
}

.podium-place.first {
  order: 2;
  min-height: 13.5rem;
  border-color: #e4a92a;
  background: linear-gradient(180deg, #fff9d9, #f4dfac);
}

.podium-place.second {
  order: 1;
  min-height: 11rem;
}

.podium-place.third {
  order: 3;
  min-height: 9.5rem;
  border-color: #c39372;
}

.podium-place .rank-medal {
  display: grid;
  width: 2.8rem;
  aspect-ratio: 1;
  margin-bottom: 0.75rem;
  place-items: center;
  border-radius: 50%;
  background: #2a1b3a;
  color: var(--gold);
  font-family: var(--display);
  font-size: 1.25rem;
}

.podium-place strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium-place small {
  margin-top: 0.25rem;
  color: #8d6570;
  font-weight: 800;
}

.ranking-table-wrap {
  align-self: stretch;
  padding: 0 0.2rem;
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
}

.ranking-table th {
  padding: 0.7rem 0.8rem;
  border-bottom: 2px solid #34223e;
  color: #796b7e;
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  text-align: left;
  text-transform: uppercase;
}

.ranking-table th:last-child,
.ranking-table td:last-child {
  text-align: right;
}

.ranking-table td {
  padding: 0.75rem 0.8rem;
  border-bottom: 1px solid #e6dce2;
  font-size: 0.82rem;
}

.ranking-table td:first-child {
  width: 4rem;
  color: var(--orange);
  font-family: var(--display);
  font-size: 1.05rem;
}

.ranking-table td:nth-child(2) {
  font-weight: 850;
}

.ranking-table td:last-child {
  color: #493553;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 800;
}

.ranking-empty {
  margin: 2rem 0;
  color: #796b7e;
  text-align: center;
}

.community-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(19rem, 0.88fr);
  gap: 2rem;
  margin: 2rem 0;
  align-items: start;
}

.bulletin-section,
.event-section {
  overflow: hidden;
}

.bulletin-list,
.event-list {
  display: grid;
  gap: 0;
}

.bulletin-card {
  padding: 1.35rem 1.7rem;
  border-bottom: 1px solid #e5d9df;
}

.bulletin-card:last-child,
.event-card:last-child {
  border-bottom: 0;
}

.bulletin-meta,
.event-topline {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.bulletin-kind,
.event-status {
  display: inline-flex;
  padding: 0.25rem 0.48rem;
  border-radius: 0.2rem;
  background: #2f1f3f;
  color: #fff0c7;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bulletin-meta time,
.event-topline > span:last-child {
  color: #8f818d;
  font-size: 0.67rem;
  font-weight: 700;
}

.bulletin-card h3,
.event-card h3 {
  margin: 0.7rem 0 0.38rem;
  color: #2d1b36;
  font-family: var(--display);
  font-size: 1.55rem;
  font-style: italic;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
}

.bulletin-card p,
.event-card p {
  margin: 0;
  color: #675a69;
  font-size: 0.82rem;
}

.bulletin-card ul {
  display: grid;
  gap: 0.4rem;
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
}

.bulletin-card li {
  position: relative;
  padding-left: 1rem;
  color: #56475c;
  font-size: 0.76rem;
}

.bulletin-card li::before {
  position: absolute;
  left: 0;
  color: var(--orange);
  content: "◆";
  font-size: 0.55rem;
}

.event-card {
  padding: 1.2rem 1.5rem 1.35rem;
  border-bottom: 1px solid #e5d9df;
}

.event-status.live { background: #138342; }
.event-status.upcoming { background: #1963ae; }
.event-status.completed { background: #6e6571; }

.event-details {
  display: grid;
  gap: 0.32rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #d8cbd4;
}

.event-details span {
  color: #796b7e;
  font-size: 0.7rem;
}

.event-details strong {
  color: #3a2943;
}

.event-tags {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.8rem;
  flex-wrap: wrap;
}

.event-tags span {
  padding: 0.2rem 0.42rem;
  border: 1px solid #ddd0d8;
  border-radius: 99rem;
  color: #6d5a72;
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
}

.community-cta {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: center;
  margin: 2rem 0 4rem;
  padding: 2.2rem 2.5rem;
  border: 1px solid rgba(255, 201, 40, 0.25);
  border-radius: 0.65rem;
  background:
    radial-gradient(circle at 85% 15%, rgba(244, 123, 32, 0.25), transparent 16rem),
    #17102a;
  box-shadow: var(--shadow);
}

.community-cta h2 {
  margin: 0.25rem 0;
  font-family: var(--display);
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  font-style: italic;
  line-height: 0.95;
  text-transform: uppercase;
}

.community-cta p:not(.eyebrow) {
  margin: 0;
  color: #bfb3ca;
}

.community-cta > a {
  display: inline-flex;
  padding: 0.95rem 1.15rem;
  align-items: center;
  gap: 1rem;
  border-radius: 0.25rem;
  background: var(--orange);
  color: #1c0e21;
  font-size: 0.73rem;
  font-weight: 950;
  letter-spacing: 0.07em;
  text-decoration: none;
  text-transform: uppercase;
}

.community-cta > a:hover,
.community-cta > a:focus-visible {
  background: var(--gold);
}

.community-footer {
  width: min(1240px, calc(100% - 3rem));
}

.community-error {
  position: fixed;
  z-index: 50;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  gap: 1.2rem;
  align-items: center;
  max-width: min(34rem, calc(100% - 2rem));
  padding: 1rem;
  border: 1px solid #d85f4d;
  border-radius: 0.35rem;
  background: #261524;
  box-shadow: 0 15px 45px rgba(12, 5, 18, 0.42);
}

.community-error[hidden] {
  display: none;
}

.community-error div {
  display: grid;
}

.community-error strong {
  color: #ffad8d;
}

.community-error span {
  color: #c6b7ca;
  font-size: 0.76rem;
}

.community-error button {
  flex: 0 0 auto;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--orange);
  border-radius: 0.2rem;
  background: transparent;
  color: var(--orange-hot);
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

@keyframes signal-pulse {
  50% { opacity: 0.35; transform: scale(0.72); }
}

@keyframes ring-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 960px) {
  .community-hero {
    grid-template-columns: 1fr 15rem;
    gap: 1rem;
    padding-inline: 0;
  }

  .activity-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .activity-card:nth-child(2) {
    border-right: 0;
  }

  .activity-card:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .ranking-panel {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .community-page main,
  .community-footer {
    width: min(100% - 1.5rem, 1240px);
  }

  .community-hero {
    display: block;
    min-height: 0;
    padding: 4rem 0 5rem;
  }

  .community-hero h1 {
    font-size: clamp(3.7rem, 18vw, 6rem);
  }

  .broadcast-mark {
    display: none;
  }

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

  .activity-card {
    min-height: 8.5rem;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .activity-card:last-child {
    border-bottom: 0;
  }

  .section-heading {
    padding: 1.25rem;
    align-items: start;
    flex-direction: column;
  }

  .ranking-tabs {
    padding-inline: 1.25rem;
    overflow-x: auto;
  }

  .ranking-tabs button {
    flex: 0 0 auto;
  }

  .ranking-panel {
    padding: 1.25rem;
  }

  .podium {
    min-height: 11rem;
  }

  .podium-place.first { min-height: 11rem; }
  .podium-place.second { min-height: 9.5rem; }
  .podium-place.third { min-height: 8.5rem; }

  .ranking-table th,
  .ranking-table td {
    padding-inline: 0.55rem;
  }

  .community-cta {
    padding: 1.7rem;
    align-items: flex-start;
    flex-direction: column;
  }

  .community-cta > a {
    width: 100%;
    justify-content: space-between;
  }

  .community-error {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .network-state i,
  .ring-two {
    animation: none;
  }
}

/* Chronicle palette: community data without paper-white glare. */
.community-page {
  background:
    radial-gradient(circle at 88% 10%, rgba(255, 122, 24, 0.16), transparent 27rem),
    radial-gradient(circle at 12% 38%, rgba(155, 108, 255, 0.14), transparent 28rem),
    linear-gradient(rgba(77, 225, 255, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 225, 255, 0.024) 1px, transparent 1px),
    #090714;
  background-size: auto, auto, 42px 42px, 42px 42px, auto;
  color: #f7f0df;
}

.activity-board,
.leaderboard-section,
.bulletin-section,
.event-section {
  border-color: rgba(77, 225, 255, 0.19);
  background: linear-gradient(135deg, rgba(19, 19, 46, 0.97), rgba(12, 11, 29, 0.97));
  color: #f7f0df;
  box-shadow: 0 22px 60px rgba(4, 2, 13, 0.32);
}

.section-heading {
  border-bottom-color: rgba(77, 225, 255, 0.14);
}

.section-heading > span,
.ranking-table th,
.ranking-empty,
.bulletin-meta time,
.event-topline > span:last-child,
.event-details span {
  color: #aaa3b8;
}

.ranking-tabs button {
  border-color: rgba(77, 225, 255, 0.2);
  background: rgba(77, 225, 255, 0.06);
  color: #cfc8d9;
}

.ranking-tabs button:hover,
.ranking-tabs button:focus-visible {
  border-color: var(--cyan);
  color: var(--cyan);
}

.ranking-tabs button[aria-selected="true"] {
  border-color: rgba(255, 195, 26, 0.55);
  background: #171126;
  color: var(--gold);
  box-shadow: inset 0 -3px 0 var(--orange);
}

.podium-place,
.podium-place.first {
  border-color: rgba(77, 225, 255, 0.2);
  background: linear-gradient(180deg, rgba(30, 29, 62, 0.98), rgba(15, 14, 35, 0.98));
}

.podium-place.first {
  border-color: rgba(255, 195, 26, 0.5);
  box-shadow: inset 0 3px 0 rgba(255, 195, 26, 0.28);
}

.podium-place.third {
  border-color: rgba(255, 122, 24, 0.32);
}

.podium-place small,
.bulletin-card p,
.event-card p,
.bulletin-card li {
  color: #aaa3b8;
}

.ranking-table th {
  border-bottom-color: rgba(77, 225, 255, 0.3);
}

.ranking-table td,
.bulletin-card,
.event-card {
  border-bottom-color: rgba(77, 225, 255, 0.1);
}

.ranking-table td:last-child,
.bulletin-card h3,
.event-card h3,
.event-details strong {
  color: #f7f0df;
}

.event-details {
  border-top-color: rgba(77, 225, 255, 0.16);
}

.event-tags span {
  border-color: rgba(77, 225, 255, 0.2);
  color: #aaa3b8;
}
