/* ════════════════════════════════════════════════════════════════════════
   Community — "Hall of the Guild"
   A candle-lit gothic hall of fame. Builds on styles.css (vars, nav, foot,
   btn, grain, grad, eyebrow, reveal). All component classes prefixed c-.
   ════════════════════════════════════════════════════════════════════════ */

:root {
  --silver: #cdd2dc;
  --bronze: #cd9355;
  --deco: "Cinzel Decorative", "Cinzel", Georgia, serif;
}

/* ── Atmosphere: layered glows + vignette behind everything ─────────────── */
.c-atmos {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.c-atmos::before {
  content: "";
  position: absolute;
  top: -18%;
  left: 50%;
  transform: translateX(-50%);
  width: 1100px;
  height: 760px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(217, 164, 65, 0.16),
    rgba(125, 92, 26, 0.05) 42%,
    transparent 68%
  );
  filter: blur(12px);
  animation: cDrift 16s ease-in-out infinite;
}
.c-atmos::after {
  content: "";
  position: absolute;
  bottom: -22%;
  left: 14%;
  width: 820px;
  height: 680px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(111, 134, 201, 0.12),
    transparent 62%
  );
  filter: blur(16px);
  animation: cDrift 19s ease-in-out infinite reverse;
}
.c-vignette {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  box-shadow: inset 0 0 240px 40px rgba(0, 0, 0, 0.6);
}
@keyframes cDrift {
  50% {
    transform: translate3d(-30px, 22px, 0) scale(1.06);
  }
}
body {
  position: relative;
}
/* .nav keeps its sticky position from styles.css (z-index:50 already sits above
   the atmos layers); only the content blocks need lifting above them here. */
.c-hero,
.c-wrap,
.foot {
  position: relative;
  z-index: 2;
}
/* Full-width header. The brand keeps its original position (aligned with the
   centred page content) via a left pad equal to that content's left margin, while
   the links/button stretch to the right edge. The bar background runs the full
   viewport width and sits above the fixed live-feed sidebar (z-index:60) so the
   header reads as one continuous strip across the top. */
.nav {
  max-width: none;
  z-index: 70;
  padding-left: max(24px, calc((100% - var(--maxw)) / 2));
}
.nav::before {
  left: 0;
  right: auto;
  width: 100vw;
  transform: none;
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.c-hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 42px 24px 4px;
  text-align: center;
}
.c-hero .eyebrow {
  margin-bottom: 18px;
}
.c-title {
  font-family: var(--deco);
  font-weight: 900;
  line-height: 1.05;
  font-size: clamp(40px, 6.4vw, 82px);
  letter-spacing: 0.005em;
  margin: 0 0 20px;
}
.c-title .grad {
  background: linear-gradient(
    110deg,
    var(--gold-deep) 0%,
    var(--gold) 22%,
    var(--gold-bright) 42%,
    #fff7e0 50%,
    var(--gold-bright) 58%,
    var(--gold) 78%,
    var(--gold-deep) 100%
  );
  background-size: 280% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 26px rgba(217, 164, 65, 0.32));
  animation: cShimmerText 7s ease-in-out infinite;
}
@keyframes cShimmerText {
  0%,
  100% {
    background-position: 200% 0;
  }
  50% {
    background-position: -40% 0;
  }
}
.c-hero .lede {
  font-size: 18px;
  color: #cdbfa6;
  max-width: 33em;
  margin: 0 auto;
}

/* Ornamental divider with a gold diamond */
.c-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: 360px;
  margin: 30px auto 0;
}
.c-ornament::before,
.c-ornament::after {
  content: "";
  height: 1px;
  flex: 1;
}
.c-ornament::before {
  background: linear-gradient(90deg, transparent, var(--gold-deep));
}
.c-ornament::after {
  background: linear-gradient(90deg, var(--gold-deep), transparent);
}
.c-diamond {
  width: 11px;
  height: 11px;
  flex: none;
  transform: rotate(45deg);
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  box-shadow: 0 0 14px rgba(217, 164, 65, 0.6);
  position: relative;
}
.c-diamond::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(11, 9, 7, 0.55);
}

.c-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.c-live .live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5fd07a;
  box-shadow: 0 0 9px #5fd07a;
  animation: pulse 1.6s infinite;
}
.c-live.is-stale .live-dot {
  background: var(--muted);
  box-shadow: none;
  animation: none;
}

.c-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px 24px 40px;
}

/* Leaderboard: the podium stands flush on the ranks board, one continuous unit. */
.c-leaderboard {
  margin-top: 0px;
}
.c-leaderboard .c-board-head {
  margin: 0 0 14px;
}

/* Period toggle — Today / week / month / all-time. Switches the board instantly
   from already-fetched data (no extra request). */
.c-period {
  display: inline-flex;
  gap: 4px;
  margin: 0 0 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--panel), #100b07);
}
.c-period-btn {
  appearance: none;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: transparent;
  transition:
    color 0.18s,
    background 0.18s;
}
.c-period-btn:hover {
  color: var(--cream);
}
.c-period-btn.is-active {
  color: #241a08;
  background: radial-gradient(
    circle at 35% 28%,
    var(--gold-bright),
    var(--gold) 60%,
    var(--gold-deep)
  );
  box-shadow: 0 2px 14px -4px rgba(217, 164, 65, 0.6);
}
@media (max-width: 760px) {
  .c-period {
    display: flex;
    width: 100%;
    justify-content: space-between;
  }
  .c-period-btn {
    flex: 1;
    padding: 8px 6px;
    font-size: 12px;
  }
}
.c-leaderboard .c-podium {
  max-width: none;
  margin: 0;
}
.c-board.is-joined {
  border-radius: 0 0 16px 16px;
  border-top: 0;
}

/* ════════════════════════════════════════════════════════════════════════
   PODIUM — the top three, on a gold pedestal
   ════════════════════════════════════════════════════════════════════════ */
.c-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 18px;
  margin: 8px auto 44px;
  max-width: 840px;
}
.c-pod {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  border-bottom: 0;
  background: linear-gradient(180deg, var(--panel2), #100b07);
  padding: 22px 14px 0;
  animation: cRise 0.7s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}
.c-pod.is-rank1 {
  order: 2;
  flex-grow: 1.18;
  padding-top: 30px;
  border-color: var(--gold-deep);
  background: linear-gradient(180deg, #241a09, #130d06);
  box-shadow: 0 -10px 60px -20px rgba(217, 164, 65, 0.5);
  animation-delay: 0.05s;
}
.c-pod.is-rank2 {
  order: 1;
  animation-delay: 0.13s;
}
.c-pod.is-rank3 {
  order: 3;
  animation-delay: 0.2s;
}
.c-pod.is-rank1::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px 18px 0 0;
  pointer-events: none;
  background: radial-gradient(
    120% 70% at 50% -8%,
    rgba(217, 164, 65, 0.22),
    transparent 60%
  );
}

.c-pod-crown {
  font-size: 24px;
  line-height: 1;
  margin-bottom: 6px;
  filter: drop-shadow(0 3px 10px rgba(217, 164, 65, 0.55));
  animation: cFloat 4.5s ease-in-out infinite;
}
.c-pod.is-rank1 .c-pod-crown {
  font-size: 30px;
}
.c-pod-medallion {
  position: relative;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  color: var(--silver);
  background: radial-gradient(circle at 35% 30%, #2a2418, #14100a);
  border: 2px solid var(--line);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
}
.c-pod.is-rank1 .c-pod-medallion {
  width: 82px;
  height: 82px;
  font-size: 32px;
}
.c-pod.is-key .c-pod-medallion {
  color: #241a08;
  border-color: var(--gold-bright);
  background: radial-gradient(
    circle at 35% 28%,
    var(--gold-bright),
    var(--gold) 55%,
    var(--gold-deep)
  );
  box-shadow:
    0 0 26px rgba(217, 164, 65, 0.4),
    inset 0 2px 3px rgba(255, 255, 255, 0.5);
}
.c-pod.is-rank1.is-key .c-pod-medallion {
  animation: cGlow 3.2s ease-in-out infinite;
}

.c-pod-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  color: var(--cream);
  margin: 14px 0 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 4px;
}
.c-pod.is-rank1 .c-pod-name {
  font-size: 21px;
}
.c-pod.is-key .c-pod-name {
  color: var(--gold-bright);
}
.c-pod-key {
  font-size: 0.78em;
}
.c-pod-badge {
  margin-top: 8px;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.c-pod-badge.is-key {
  color: var(--gold-bright);
  border-color: var(--gold-deep);
  background: rgba(217, 164, 65, 0.12);
}
.c-pod-score {
  margin: 16px 0 18px;
}
.c-pod-score b {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 30px;
  color: var(--cream);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.c-pod.is-rank1 .c-pod-score b {
  font-size: 40px;
}
.c-pod.is-key .c-pod-score b {
  color: var(--gold-bright);
  text-shadow: 0 0 24px rgba(217, 164, 65, 0.3);
}
.c-pod-score span {
  display: block;
  margin-top: 4px;
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Pedestal base — the physical podium step, #1 tallest */
.c-pod-base {
  width: 100%;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 66px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
}
.c-pod.is-rank1 .c-pod-base {
  height: 104px;
  border-top-color: var(--gold-deep);
  background: linear-gradient(180deg, rgba(217, 164, 65, 0.12), transparent);
}
.c-pod.is-rank3 .c-pod-base {
  height: 48px;
}
.c-medal {
  font-size: 20px;
}
.c-pod-base-n {
  font-family: var(--deco);
  font-weight: 900;
  font-size: 30px;
  color: rgba(255, 255, 255, 0.1);
}
.c-pod.is-rank1 .c-pod-base-n {
  font-size: 46px;
  color: rgba(217, 164, 65, 0.22);
}

.c-pod:hover {
  transform: translateY(-5px);
}
.c-pod {
  transition: transform 0.25s ease;
}

/* ════════════════════════════════════════════════════════════════════════
   THE RANKS — engraved list (4th onward)
   ════════════════════════════════════════════════════════════════════════ */
.c-board-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 6px 0 16px;
}
.c-board-head h2 {
  font-family: var(--deco);
  font-weight: 700;
  font-size: clamp(22px, 3vw, 30px);
}
.c-board-head p {
  color: var(--muted);
  font-size: 13.5px;
}

.c-board {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--panel), #100b07);
}
.c-row {
  display: grid;
  grid-template-columns: 50px 38px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  animation: cRise 0.5s cubic-bezier(0.2, 0.8, 0.25, 1) both;
  transition: background 0.2s;
}
.c-row:nth-child(1) {
  animation-delay: 0.04s;
}
.c-row:nth-child(2) {
  animation-delay: 0.08s;
}
.c-row:nth-child(3) {
  animation-delay: 0.12s;
}
.c-row:nth-child(4) {
  animation-delay: 0.16s;
}
.c-row:nth-child(5) {
  animation-delay: 0.2s;
}
.c-row:nth-child(6) {
  animation-delay: 0.24s;
}
.c-row:last-child {
  border-bottom: 0;
}
.c-row:hover {
  background: rgba(255, 255, 255, 0.025);
}
.c-rank-pos {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.c-mini {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  background: radial-gradient(circle at 35% 30%, #2a2418, #14100a);
  border: 1px solid var(--line);
}
.c-who {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.c-alias {
  font-weight: 700;
  font-size: 15.5px;
  color: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.c-badge {
  flex: none;
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.c-badge.is-key {
  color: var(--gold-bright);
  border-color: var(--gold-deep);
  background: rgba(217, 164, 65, 0.12);
}
.c-score {
  text-align: right;
  flex: none;
}
.c-score b {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  color: var(--cream);
  font-variant-numeric: tabular-nums;
}
.c-score span {
  display: block;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

/* 🔥 fire streak — consecutive days a player has opened at least one chest */
.c-streak-chip {
  flex: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--gold-deep);
  background: rgba(217, 164, 65, 0.1);
  white-space: nowrap;
}
.c-pod-streak {
  margin: -8px 0 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
}

/* Keymaster rows: lit, golden, carry the crown + lockpick — never says "paid". */
.c-row.is-key {
  background: linear-gradient(90deg, rgba(217, 164, 65, 0.1), transparent 72%);
  border-left: 2px solid var(--gold);
}
.c-row.is-key .c-mini {
  color: #241a08;
  border-color: var(--gold-bright);
  background: radial-gradient(
    circle at 35% 28%,
    var(--gold-bright),
    var(--gold) 60%,
    var(--gold-deep)
  );
}
.c-row.is-key .c-alias {
  color: var(--gold-bright);
}
.c-row.is-key .c-alias::after {
  content: " 👑🗝️";
  font-size: 12px;
}
.c-row.is-key .c-score b {
  color: var(--gold-bright);
}

.c-empty,
.c-error {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}
.c-skel {
  height: 56px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.045),
    transparent
  );
  background-size: 200% 100%;
  animation: cShimmer 1.3s infinite;
}
.c-pod-skel {
  flex: 1;
  height: 240px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.04),
    transparent
  );
  background-size: 200% 100%;
  animation: cShimmer 1.4s infinite;
}
.c-pod-skel.tall {
  height: 300px;
}
@keyframes cShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ── Rank population cards ─────────────────────────────────────────────── */
.c-section-label {
  font-family: var(--deco);
  font-weight: 700;
  font-size: clamp(20px, 2.6vw, 26px);
  text-align: center;
  margin: 54px 0 4px;
}
.c-section-sub {
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  margin-bottom: 22px;
}
.c-ranks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.c-rank {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--panel), #100b07);
  padding: 26px 22px;
  text-align: center;
  transition:
    transform 0.25s ease,
    border-color 0.25s ease;
}
.c-rank:hover {
  transform: translateY(-4px);
}
.c-rank-ico {
  font-size: 30px;
  line-height: 1;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.5));
}
.c-rank-n {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(30px, 4vw, 46px);
  font-variant-numeric: tabular-nums;
  color: var(--cream);
  margin: 12px 0 4px;
}
.c-rank-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
}
.c-rank-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.5;
}
.c-rank.tier-picker {
  border-color: #33405e;
}
.c-rank.tier-picker:hover {
  border-color: #52628c;
}
.c-rank.tier-picker .c-rank-n,
.c-rank.tier-picker .c-rank-name {
  color: #9fb0e0;
}
.c-rank.tier-key {
  border-color: var(--gold-deep);
  background: linear-gradient(180deg, #1f1708, #130d07);
}
.c-rank.tier-key:hover {
  border-color: var(--gold);
}
.c-rank.tier-key::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    120% 80% at 50% -10%,
    rgba(217, 164, 65, 0.18),
    transparent 60%
  );
}
.c-rank.tier-key .c-rank-n {
  color: var(--gold-bright);
  text-shadow: 0 0 26px rgba(217, 164, 65, 0.3);
}
.c-rank.tier-key .c-rank-name {
  color: var(--gold-bright);
}
.c-rank.tier-key .c-rank-name::after {
  content: " 👑🗝️";
  font-size: 15px;
}

/* ── Live counters strip ──────────────────────────────────────────────── */
.c-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  background: linear-gradient(180deg, var(--panel), #100b07);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px 20px;
  margin: 22px 0 0;
  position: relative;
  overflow: hidden;
}
.c-stats::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    80% 120% at 50% -20%,
    rgba(217, 164, 65, 0.08),
    transparent 60%
  );
}
.c-stat {
  text-align: center;
  border-right: 1px solid var(--line);
  position: relative;
}
.c-stat:last-child {
  border-right: 0;
}
.c-stat-n {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(24px, 3.2vw, 38px);
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 24px rgba(217, 164, 65, 0.22);
}
.c-stat-l {
  font-size: 12.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
}

/* ── How to climb ─────────────────────────────────────────────────────── */
.c-legend {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 22px 0 0;
}
.c-leg {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.015);
}
.c-leg h3 {
  font-family: var(--display);
  font-size: 16px;
  margin-bottom: 7px;
}
.c-leg p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.55;
}
.c-leg.tier-key {
  border-color: var(--gold-deep);
}
.c-leg.tier-key h3 {
  color: var(--gold-bright);
}

.c-cta {
  text-align: center;
  margin: 44px 0 8px;
}

/* ════════════════════════════════════════════════════════════════════════
   LIVE ACTIVITY — the dungeon, as it happens
   ════════════════════════════════════════════════════════════════════════ */
.c-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--panel), #100b07);
}
.c-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(217, 164, 65, 0.06), transparent);
}
.c-panel-head h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.c-panel-head .c-bolt {
  color: var(--gold-bright);
  filter: drop-shadow(0 0 8px rgba(217, 164, 65, 0.5));
}
.c-panel-head .c-live {
  margin: 0;
}

.c-feed {
  max-height: 430px;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-deep) transparent;
}
.c-feed::-webkit-scrollbar {
  width: 8px;
}
.c-feed::-webkit-scrollbar-thumb {
  background: var(--gold-deep);
  border-radius: 8px;
}
.c-feed-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 10px 11px;
  border-radius: 11px;
  border: 1px solid transparent;
}
.c-feed-item.is-new {
  animation: cFeedIn 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
/* Great announcements (a new Keymaster) hold a glowing spotlight far longer than
   the usual flash, so they stay the centre of attention on the tray. */
.c-feed-item.is-spotlight {
  animation:
    cFeedIn 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.1),
    cSpotlight 8s ease-out 0.6s 1 both;
}
.c-feed-ico {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 15px;
  background: #211b12;
  border: 1px solid var(--line);
}
.c-feed-main {
  flex: 1;
  min-width: 0;
}
.c-feed-line {
  font-size: 13.5px;
  color: #d8cdb4;
  line-height: 1.4;
}
.c-feed-line b {
  color: var(--cream);
  font-weight: 700;
}
.c-feed-quote {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--muted);
  font-style: italic;
  border-left: 2px solid var(--line);
  padding-left: 9px;
  line-height: 1.45;
}
.c-feed-time {
  margin-top: 3px;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
/* type accents */
.c-feed-chest .c-feed-ico {
  color: var(--gold);
  border-color: #4a3a18;
}
.c-feed-lockpicker .c-feed-ico {
  color: #9fb0e0;
  border-color: #33405e;
}
.c-feed-comment .c-feed-ico {
  color: #d8cdb4;
}
.c-feed-keymaster {
  background: linear-gradient(90deg, rgba(217, 164, 65, 0.12), transparent 75%);
  border-color: rgba(217, 164, 65, 0.22);
}
.c-feed-keymaster .c-feed-ico {
  color: #241a08;
  border-color: var(--gold-bright);
  background: radial-gradient(
    circle at 35% 28%,
    var(--gold-bright),
    var(--gold) 60%,
    var(--gold-deep)
  );
}
.c-feed-keymaster .c-feed-line b {
  color: var(--gold-bright);
}
.c-feed-empty {
  padding: 34px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
@keyframes cFeedIn {
  0% {
    opacity: 0;
    transform: translateY(-10px);
    box-shadow:
      0 0 0 1px var(--gold),
      0 0 22px rgba(217, 164, 65, 0.4);
  }
  100% {
    opacity: 1;
    transform: none;
    box-shadow: none;
  }
}
/* Long, slow fade from a bright gold halo back to rest — runs ~8s. */
@keyframes cSpotlight {
  0% {
    box-shadow:
      0 0 0 1px var(--gold-bright),
      0 0 30px rgba(217, 164, 65, 0.6);
  }
  70% {
    box-shadow:
      0 0 0 1px var(--gold),
      0 0 20px rgba(217, 164, 65, 0.34);
  }
  100% {
    box-shadow:
      0 0 0 1px transparent,
      0 0 0 transparent;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   THE HALL SPEAKS — comments (held for approval)
   ════════════════════════════════════════════════════════════════════════ */
.c-talk {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}
.c-form {
  padding: 18px 20px 20px;
}
.c-form label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 9px;
}
.c-textarea {
  width: 100%;
  min-height: 108px;
  resize: vertical;
  background: #100b07;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--cream);
  font: 400 15px var(--body);
  line-height: 1.55;
  padding: 13px 14px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.c-textarea:focus {
  outline: none;
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 3px rgba(217, 164, 65, 0.12);
}
.c-textarea::placeholder {
  color: #6f6450;
}
.c-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.c-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}
.c-count {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.c-count.is-over {
  color: var(--red);
}
.c-form-note {
  margin-top: 13px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}
.c-msg {
  margin-top: 13px;
  font-size: 13.5px;
  padding: 11px 13px;
  border-radius: 10px;
  display: none;
}
.c-msg.show {
  display: block;
  animation: cRise 0.4s ease both;
}
.c-msg.ok {
  color: #8fe0a6;
  background: rgba(95, 184, 120, 0.1);
  border: 1px solid #2c5a3a;
}
.c-msg.err {
  color: #e69aa8;
  background: rgba(192, 85, 106, 0.1);
  border: 1px solid #5a2c36;
}

.c-comments {
  padding: 8px;
}
.c-comment {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}
.c-comment:last-child {
  border-bottom: 0;
}
.c-comment-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 5px;
}
.c-comment-alias {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--gold-bright);
}
.c-comment-time {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.c-comment-body {
  font-size: 14px;
  color: #d8cdb4;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.c-comments-empty {
  padding: 30px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 760px) {
  .c-talk {
    grid-template-columns: 1fr;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   Live feed as a FIXED full-height sidebar (dashboard-style tray) on large
   screens. Below 1400px it falls back to a normal inline panel.
   ════════════════════════════════════════════════════════════════════════ */
@media (min-width: 1400px) {
  body {
    padding-right: 346px;
  }
  /* The body reserves 346px on the right for the fixed sidebar, which would box
     the nav out of that strip. Pull the nav back over it so the links/button
     reach the true screen edge, and recompute the brand's left pad against the
     full viewport so it still lines up with the centred page content. */
  .nav {
    margin-right: -346px;
    padding-left: max(24px, calc((100vw - 346px - var(--maxw)) / 2));
  }
  .c-feed-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 346px;
    height: 100vh;
    z-index: 60;
    margin: 0;
    /* Clear the full-width header bar (which now sits above this tray) so the
       feed's "Live from the dungeon" head isn't tucked under the nav. */
    padding-top: 63px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(
      180deg,
      rgba(22, 18, 12, 0.97),
      rgba(13, 10, 7, 0.97)
    );
    border-left: 1px solid var(--line);
    box-shadow: -14px 0 46px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(7px);
  }
  .c-feed-sidebar.reveal {
    opacity: 1;
    transform: none;
  } /* never hide the fixed tray */
  .c-feed-sidebar .c-panel {
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: hidden;
  }
  .c-feed-sidebar .c-panel-head {
    flex: 0 0 auto;
    padding: 18px;
  }
  .c-feed-sidebar .c-feed {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    padding: 8px;
  }
}

/* ── Motion primitives ────────────────────────────────────────────────── */
@keyframes cRise {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}
@keyframes cFloat {
  50% {
    transform: translateY(-6px);
  }
}
@keyframes cGlow {
  0%,
  100% {
    box-shadow:
      0 0 26px rgba(217, 164, 65, 0.4),
      inset 0 2px 3px rgba(255, 255, 255, 0.5);
  }
  50% {
    box-shadow:
      0 0 44px rgba(240, 200, 105, 0.7),
      inset 0 2px 3px rgba(255, 255, 255, 0.6);
  }
}
@media (prefers-reduced-motion: reduce) {
  .c-pod,
  .c-row,
  .c-title .grad,
  .c-pod-crown,
  .c-pod.is-rank1.is-key .c-pod-medallion,
  .c-atmos::before,
  .c-atmos::after {
    animation: none;
  }
}

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .c-podium {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    max-width: 420px;
  }
  .c-pod,
  .c-pod.is-rank1,
  .c-pod.is-rank2,
  .c-pod.is-rank3 {
    order: 0;
    flex-grow: 0;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    text-align: left;
    border-radius: 14px;
    border-bottom: 1px solid var(--line);
    padding: 14px 16px;
  }
  .c-pod.is-rank1 {
    border-color: var(--gold-deep);
  }
  .c-pod-crown {
    margin: 0;
    font-size: 20px;
  }
  .c-pod.is-rank1 .c-pod-crown {
    font-size: 22px;
  }
  .c-pod-medallion,
  .c-pod.is-rank1 .c-pod-medallion {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }
  .c-pod-name,
  .c-pod.is-rank1 .c-pod-name {
    margin: 0;
    font-size: 16px;
  }
  .c-pod-badge {
    margin: 0;
  }
  .c-pod-top {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .c-pod-mid {
    flex: 1;
    min-width: 0;
  }
  .c-pod-score,
  .c-pod.is-rank1 .c-pod-score {
    margin: 0;
    text-align: right;
  }
  .c-pod-score b,
  .c-pod.is-rank1 .c-pod-score b {
    font-size: 24px;
  }
  .c-pod-base {
    display: none;
  }
  .c-ranks,
  .c-legend,
  .c-stats {
    grid-template-columns: 1fr;
  }
  .c-stat {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 14px;
  }
  .c-stat:last-child {
    border-bottom: 0;
  }
  .c-row {
    grid-template-columns: 40px 32px 1fr auto;
    gap: 10px;
    padding: 12px 14px;
  }
}

/* ────────────────────────────────────────────────────────────────────────
   Mobile polish / overflow fixes
   Drop this at the END of community.css.
   ──────────────────────────────────────────────────────────────────────── */
/* overflow-x:clip (not hidden) contains the atmos blobs without turning the
   page into a scroll container, which would break the sticky nav. */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

@media (max-width: 760px) {
  body {
    padding-right: 0;
  }
  .c-atmos::before {
    width: 720px;
    height: 520px;
    top: -12%;
  }
  .c-atmos::after {
    width: 520px;
    height: 460px;
    left: -20%;
    bottom: -14%;
  }
  .c-vignette {
    box-shadow: inset 0 0 120px 18px rgba(0, 0, 0, 0.58);
  }

  .c-hero {
    padding: 28px 16px 0;
  }
  .c-title {
    font-size: clamp(34px, 12vw, 48px);
    line-height: 1.08;
    margin-bottom: 16px;
  }
  .c-hero .lede {
    font-size: 15.5px;
    line-height: 1.6;
    max-width: 34em;
  }
  .c-ornament {
    max-width: 260px;
    margin-top: 22px;
  }
  .c-live {
    margin-top: 18px;
  }
  .c-wrap {
    padding: 18px 14px 34px;
  }

  .c-board-head {
    display: block;
    text-align: center;
    margin-bottom: 14px;
  }
  .c-board-head h2 {
    font-size: 24px;
    margin-bottom: 6px;
  }
  .c-board-head p {
    font-size: 12.5px;
    line-height: 1.45;
  }

  .c-feed-sidebar {
    margin-bottom: 22px;
  }
  .c-panel {
    border-radius: 14px;
  }
  .c-panel-head {
    padding: 14px 14px;
    align-items: flex-start;
  }
  .c-panel-head h2 {
    font-size: 14.5px;
    line-height: 1.35;
    min-width: 0;
  }
  .c-panel-head .c-live {
    font-size: 10px;
    letter-spacing: 0.12em;
    white-space: nowrap;
    margin-top: 2px;
  }
  .c-feed {
    max-height: 310px;
    padding: 6px;
  }
  .c-feed-item {
    gap: 9px;
    padding: 9px;
    border-radius: 10px;
  }
  .c-feed-line {
    font-size: 13px;
  }
  .c-feed-quote {
    font-size: 12px;
  }

  .c-podium {
    max-width: none;
    margin-top: 10px;
  }
  .c-pod,
  .c-pod.is-rank1,
  .c-pod.is-rank2,
  .c-pod.is-rank3 {
    padding: 12px;
    gap: 10px;
    min-width: 0;
  }
  .c-pod-top {
    flex: 0 0 auto;
  }
  .c-pod-mid {
    min-width: 0;
    overflow: hidden;
  }
  .c-pod-name,
  .c-pod.is-rank1 .c-pod-name {
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0;
  }
  .c-pod-badge {
    display: inline-block;
    margin-top: 5px;
    font-size: 9.5px;
    padding: 3px 8px;
  }
  .c-pod-score,
  .c-pod.is-rank1 .c-pod-score {
    flex: 0 0 auto;
    min-width: 74px;
  }
  .c-pod-score b,
  .c-pod.is-rank1 .c-pod-score b {
    font-size: 21px;
  }
  .c-pod-score span {
    font-size: 9px;
    letter-spacing: 0.08em;
  }
  .c-pod-streak {
    margin: 0 0 0 4px;
    font-size: 12px;
    white-space: nowrap;
  }

  .c-board {
    border-radius: 14px;
  }
  .c-board.is-joined {
    border-radius: 14px;
  }
  .c-row {
    grid-template-columns: 30px 30px minmax(0, 1fr);
    grid-template-areas: "rank avatar who" "score score score";
    gap: 8px 9px;
    padding: 11px 12px;
  }
  .c-rank-pos {
    grid-area: rank;
    font-size: 15px;
    text-align: left;
  }
  .c-mini {
    grid-area: avatar;
    width: 30px;
    height: 30px;
    font-size: 13px;
  }
  .c-who {
    grid-area: who;
    gap: 6px;
    min-width: 0;
    flex-wrap: wrap;
  }
  .c-alias {
    min-width: 0;
    max-width: 100%;
    font-size: 14px;
  }
  .c-badge,
  .c-streak-chip {
    font-size: 9.5px;
    padding: 2px 7px;
  }
  .c-score {
    grid-area: score;
    text-align: left;
    padding-left: 69px;
  }
  .c-score b {
    font-size: 16px;
  }
  .c-score span {
    display: inline;
    margin-left: 5px;
    font-size: 9.5px;
  }

  .c-section-label {
    margin-top: 38px;
    font-size: 22px;
    line-height: 1.2;
  }
  .c-section-sub {
    font-size: 13px;
    line-height: 1.45;
    margin-bottom: 16px;
    padding: 0 4px;
  }
  .c-ranks,
  .c-legend,
  .c-stats {
    gap: 12px;
  }
  .c-rank,
  .c-leg {
    padding: 20px 16px;
    border-radius: 14px;
  }
  .c-rank-n {
    font-size: 34px;
  }
  .c-stats {
    padding: 18px 16px;
  }
  .c-stat {
    padding: 0 0 14px;
    margin-bottom: 2px;
  }
  .c-stat-n {
    font-size: 32px;
  }
  .c-stat-l {
    font-size: 11.5px;
    letter-spacing: 0.1em;
  }

  .c-talk {
    gap: 14px;
  }
  .c-form {
    padding: 16px 14px;
  }
  .c-form-row {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }
  .c-form-row .btn {
    width: 100%;
    justify-content: center;
  }
  .c-textarea {
    font-size: 16px;
    min-height: 116px;
  }
  .c-comment-head {
    flex-wrap: wrap;
    gap: 5px 9px;
  }
  .c-comment-body {
    font-size: 13.5px;
  }
  .c-cta {
    margin: 34px 0 4px;
  }
  .c-cta .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 420px) {
  .c-title {
    font-size: clamp(31px, 12.5vw, 42px);
  }
  .c-hero .lede {
    font-size: 14.5px;
  }
  .c-wrap {
    padding-left: 12px;
    padding-right: 12px;
  }
  .c-pod-medallion,
  .c-pod.is-rank1 .c-pod-medallion {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }
  .c-pod-crown,
  .c-pod.is-rank1 .c-pod-crown {
    font-size: 18px;
  }
  .c-pod-score,
  .c-pod.is-rank1 .c-pod-score {
    min-width: 62px;
  }
  .c-pod-score b,
  .c-pod.is-rank1 .c-pod-score b {
    font-size: 19px;
  }
  .c-pod-score span {
    display: none;
  }
  .c-row {
    padding: 10px;
    grid-template-columns: 26px 28px minmax(0, 1fr);
  }
  .c-score {
    padding-left: 63px;
  }
  .c-panel-head {
    gap: 8px;
  }
}
