.menu-tile[data-act="hall"] .label,
.menu-tile[data-act="donate"] .label {
  max-width: 100%;
  font-size: clamp(12px, 1.75vh, 15px);
  line-height: 1.1;
}

/* Match the in-game turn artwork to the compact Chess Mates corner logo. */
#ui .turn-banner {
  width: clamp(68px, 6.5vw, 96px) !important;
}

.cm-community-modal {
  width: min(760px, 92vw);
  max-height: min(86vh, 820px);
}

.cm-community-modal .modal-body {
  box-sizing: border-box;
  max-height: min(74vh, 690px);
  padding: 18px clamp(18px, 4vw, 42px) 28px;
  overflow-y: auto;
}

.cm-community {
  color: #49301d;
  font-family: var(--xcv-font-body, inherit);
}

.cm-community h2 {
  position: static !important;
  top: auto !important;
  left: auto !important;
  translate: none !important;
  z-index: auto !important;
  white-space: normal !important;
  margin: 0 !important;
  padding: 0 30px 8px !important;
  background: none !important;
  box-shadow: none !important;
  color: #6b351d;
  text-align: center;
  font-family: var(--xcv-font-display, Georgia, serif);
  font-size: clamp(25px, 4vw, 35px) !important;
}

.cm-community h2::before,
.cm-community h2::after {
  display: none !important;
}

.cm-community-rule {
  width: min(420px, 80%);
  height: 3px;
  margin: 0 auto 18px;
  background: linear-gradient(90deg, transparent, #c3432d 25%, #e1b65d 75%, transparent);
}

.cm-community p {
  margin: 0 0 14px;
  line-height: 1.6;
}

.cm-community-intro,
.cm-community-thanks {
  color: #57361f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(16px, 2.1vw, 20px);
  font-weight: 700;
}

.cm-community-empty {
  display: grid;
  justify-items: center;
  gap: 9px;
  margin: 16px 0;
  padding: 20px 14px;
  border: 2px solid #b78a43;
  background: linear-gradient(135deg, #fff3d9, #f2dfba);
  box-shadow: inset 0 0 0 5px #e9d2a6, inset 0 0 24px #82532322;
  text-align: center;
}

.cm-community-empty p {
  margin: 0;
  color: #68401f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(17px, 2.4vw, 23px);
  font-weight: 700;
}

.cm-community-details,
.cm-community-email,
.cm-community-foot {
  font-size: 14px;
}

.cm-community-email a {
  color: #8e351f;
  font-weight: 800;
  text-decoration-color: #bc5436;
  text-underline-offset: 3px;
}

.cm-community-foot {
  margin-bottom: 0 !important;
  color: #765d3d;
}

.cm-community-note {
  margin: 20px 0 !important;
  padding: 14px 16px;
  border: 1px solid #c8a56b;
  border-left: 5px solid #bd3d2b;
  background: #e9d4ad;
  color: #614321;
  font-weight: 750;
}

.cm-community-loading {
  min-height: 100px;
  display: grid;
  place-items: center;
  color: #725337;
  font-weight: 750;
  text-align: center;
}

.cm-community-update {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid #c49a50;
  background: linear-gradient(135deg, #fff0c7, #e6cf9c);
  color: #5a351c;
  font-weight: 750;
}

/* Updates are downloaded and applied silently; the Hall of Fame stays focused on its list. */
.cm-community-update {
  display: none !important;
}

.cm-community-update button {
  flex: 0 0 auto;
  padding: 9px 14px;
  border: 2px solid #472510;
  border-radius: 8px;
  background: linear-gradient(180deg, #a86b3d, #70401f);
  color: #fff2d5;
  box-shadow: 0 3px 0 #3e2112;
  font: 800 14px/1.1 var(--xcv-font-display, inherit);
  cursor: pointer;
}

.cm-community-update button:hover {
  filter: brightness(1.1);
}

.cm-community-list {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  padding: 0;
  list-style: none;
}

.cm-community-list li {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid #c9a96f;
  background: linear-gradient(90deg, #fff4dc, #f1dfbd);
  color: #57361f;
}

.cm-community-list img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border: 2px solid #b78a43;
  border-radius: 50%;
}

.cm-community-rank {
  min-width: 28px;
  color: #9a4a26;
  font-weight: 900;
  text-align: center;
}

.cm-community-thanks {
  padding-top: 15px;
  border-top: 1px solid #cbb58f;
}

@media (max-width: 600px) {
  .cm-community-modal {
    width: min(100%, 520px);
    max-height: 84vh;
  }

  .cm-community-modal .modal-body {
    max-height: calc(84vh - 56px);
    padding: 12px 16px 20px;
  }

  .cm-community-details,
  .cm-community-email,
  .cm-community-foot {
    font-size: 12px;
  }
}
