/*
 * Site module styles (home, news, content pages, downloads, staff, donate).
 * Builds on the app.css tokens and components. Logical properties only, so
 * every layout mirrors correctly in RTL.
 */

/* ------------------------------------------------------------------
 * 1. Shared pieces
 * ---------------------------------------------------------------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin: 52px 0 20px;
}
.section-head .section-title { flex: 1 1 auto; min-width: 0; margin: 0; }
.section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.93rem;
  font-weight: 700;
  white-space: nowrap;
}
.section-lead { margin: -6px 0 22px; max-width: 72ch; color: var(--muted); }

.card-header h2 { display: inline-flex; align-items: center; gap: 10px; }
.card-header h2 .icon,
.aside-title .icon { color: var(--gold); }
.card-header .section-link { font-size: 0.88rem; }

.translation-note { margin-bottom: 16px; }
.card-body.card-note { padding-bottom: 0; }
.card-body.card-note .translation-note { margin-bottom: 0; }

/* Call-to-action band: icon + text + actions. */
.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
  padding: 22px 24px;
}
.cta-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(217, 164, 65, 0.45);
  border-radius: 16px;
  background: radial-gradient(circle at 30% 20%, rgba(243, 201, 107, 0.28), rgba(217, 164, 65, 0.05) 70%);
  color: var(--gold-2);
}
.cta-icon .icon { width: 28px; height: 28px; }
.cta-body { flex: 1 1 240px; min-width: 0; }
.cta-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0 0 4px;
  font-size: 1.2rem;
}
.cta-text { margin: 0; color: var(--muted); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cta-row {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 52px;
}
@media (min-width: 1024px) {
  .cta-row.has-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Side by side the cards are narrow: put the button on its own line,
     aligned with the text, so both cards look the same. */
  .cta-row.has-two .cta-band { align-items: flex-start; }
  .cta-row.has-two .cta-body { flex-basis: calc(100% - 76px); }
  .cta-row.has-two .cta-band > .btn { margin-inline-start: 76px; }
}
.cta-discord { border-color: rgba(88, 101, 242, 0.45); }
.cta-discord .cta-icon {
  border-color: rgba(88, 101, 242, 0.55);
  background: radial-gradient(circle at 30% 20%, rgba(88, 101, 242, 0.38), rgba(88, 101, 242, 0.08) 70%);
  color: #b9c0ff;
}
@media (max-width: 639.98px) {
  .cta-band { padding: 20px; }
  .cta-band > .btn,
  .cta-actions,
  .cta-actions .btn { width: 100%; }
}

/* ------------------------------------------------------------------
 * 2. Home: hero, stats, message of the day
 * ---------------------------------------------------------------- */
.home-hero { padding: 48px 0 150px; }
.home-emblem-wrap { position: relative; display: inline-block; margin-bottom: 10px; }
.home-emblem-wrap::before {
  content: "";
  position: absolute;
  inset: -22px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(243, 201, 107, 0.34), rgba(217, 164, 65, 0.08) 55%, transparent 70%);
}
.home-emblem {
  display: block;
  width: 108px;
  height: 108px;
  filter: drop-shadow(0 12px 30px rgba(217, 164, 65, 0.45));
  animation: home-float 7s ease-in-out infinite;
}
@media (min-width: 768px) {
  .home-hero { padding-top: 64px; }
  .home-emblem { width: 136px; height: 136px; }
}
@keyframes home-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.home-wordmark {
  max-width: none;
  margin-bottom: 2px;
  font-size: clamp(2.6rem, 9vw, 5rem);
  letter-spacing: 0.05em;
  line-height: 1.1;
}
:lang(ar) .home-wordmark { letter-spacing: 0; font-size: clamp(2.8rem, 10vw, 5.2rem); line-height: 1.35; }
.home-altname {
  margin: 0 0 16px;
  color: var(--sand);
  font-size: clamp(1.05rem, 3vw, 1.45rem);
  font-weight: 700;
  line-height: 1.4;
  opacity: 0.9;
}
.home-altname:lang(en) { font-family: "Cinzel", Georgia, serif; letter-spacing: 0.16em; }
.home-altname:lang(ar) { font-family: "Reem Kufi", "Cairo", Tahoma, sans-serif; font-size: clamp(1.35rem, 4vw, 1.8rem); letter-spacing: 0; }
.home-tagline { color: var(--text); opacity: 0.92; }

.home-stats { position: relative; z-index: 1; margin-top: -92px; }
.home-stats-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 960px) {
  .home-stats-grid { gap: 20px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.home-stats .stat {
  background:
    radial-gradient(160px 80px at 100% 0%, rgba(217, 164, 65, 0.14), transparent 70%),
    linear-gradient(180deg, rgba(38, 30, 21, 0.96), rgba(29, 23, 17, 0.96));
}
[dir="rtl"] .home-stats .stat {
  background:
    radial-gradient(160px 80px at 0% 0%, rgba(217, 164, 65, 0.14), transparent 70%),
    linear-gradient(180deg, rgba(38, 30, 21, 0.96), rgba(29, 23, 17, 0.96));
}
@media (max-width: 639.98px) {
  .home-stats .stat { padding: 14px 16px; }
  .home-stats .stat-icon { display: none; }
  .home-stats .stat-value { font-size: 1.45rem; }
  .home-stats .stat-label { font-size: 0.82rem; line-height: 1.45; }
}

.motd {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 28px;
  padding: 16px 20px;
  border: 1px solid rgba(217, 164, 65, 0.4);
  border-inline-start: 4px solid var(--gold);
  border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(217, 164, 65, 0.13), rgba(217, 164, 65, 0.03));
}
[dir="rtl"] .motd { background: linear-gradient(270deg, rgba(217, 164, 65, 0.13), rgba(217, 164, 65, 0.03)); }
.motd-icon { flex: none; display: inline-flex; margin-top: 2px; color: var(--gold-2); }
.motd-icon .icon { width: 24px; height: 24px; }
.motd-body { min-width: 0; }
.motd-title {
  margin: 0 0 2px;
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
:lang(ar) .motd-title { font-size: 0.9rem; letter-spacing: 0; text-transform: none; }
.motd-text { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* XP events banner (home/_xp-events): MOTD look, upcoming events in blue. */
.xp-event + .motd { margin-top: 12px; }
.xp-event-name { font-size: 1.05rem; }
.xp-event-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.xp-event-boost { color: var(--gold-2); font-weight: 800; }
.xp-event-when { display: inline-flex; align-items: center; gap: 6px; }
.xp-event-when .icon { width: 16px; height: 16px; flex: none; }
.xp-event.is-upcoming {
  border-color: rgba(94, 168, 222, 0.35);
  border-inline-start-color: var(--blue);
  background: linear-gradient(90deg, rgba(94, 168, 222, 0.1), rgba(94, 168, 222, 0.02));
}
[dir="rtl"] .xp-event.is-upcoming { background: linear-gradient(270deg, rgba(94, 168, 222, 0.1), rgba(94, 168, 222, 0.02)); }
.xp-event.is-upcoming .motd-icon,
.xp-event.is-upcoming .motd-title { color: var(--blue); }

/* ------------------------------------------------------------------
 * 3. Home: top players and first steps
 * ---------------------------------------------------------------- */
.home-split {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 52px;
}
@media (min-width: 960px) {
  .home-split { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
}
.home-top .empty-state,
.home-steps .empty-state { padding-block: 32px; }

.leader-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.leader {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.18);
  transition: border-color 0.15s, background-color 0.15s;
}
.leader:hover { border-color: rgba(217, 164, 65, 0.45); background: rgba(217, 164, 65, 0.06); }
.leader-1 { border-color: rgba(217, 164, 65, 0.5); background: rgba(217, 164, 65, 0.08); }
.leader-rank {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--muted);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.leader-1 .leader-rank { color: var(--gold-ink); border-color: #b5842f; background: linear-gradient(180deg, #ffe7a6, var(--gold)); }
.leader-2 .leader-rank { color: #1c2127; border-color: #8d97a3; background: linear-gradient(180deg, #eef2f6, #aab3bd); }
.leader-3 .leader-rank { color: #2a1508; border-color: #9a5b22; background: linear-gradient(180deg, #f0b07a, #cd7f32); }
.leader-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.leader-name {
  overflow: hidden;
  color: var(--text);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.leader-name:hover { color: var(--gold-2); }
.leader-xp { color: var(--subtle); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.leader-level {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.25;
  text-align: end;
}
.leader-level-value { color: var(--gold-2); font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.leader-level-label { color: var(--subtle); font-size: 0.75rem; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.step { position: relative; display: flex; align-items: flex-start; gap: 14px; }
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  inset-inline-start: 17px;
  top: 42px;
  bottom: -16px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(217, 164, 65, 0.5), rgba(217, 164, 65, 0.05));
}
.step-num {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  box-shadow: 0 0 0 4px rgba(217, 164, 65, 0.14);
  color: var(--gold-ink);
  font-weight: 800;
}
.step-body { min-width: 0; }
.step-title { margin: 4px 0 2px; font-size: 1.05rem; }
.step-text { margin: 0; color: var(--muted); font-size: 0.95rem; }
.step-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 0.9rem;
  font-weight: 700;
}

/* ------------------------------------------------------------------
 * 4. Home: features
 * ---------------------------------------------------------------- */
.feature-spotlights {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 20px;
}
@media (min-width: 768px) {
  .feature-spotlights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.feature-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.feature-card {
  padding: 20px;
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s;
}
.feature-card:hover { transform: translateY(-2px); border-color: rgba(217, 164, 65, 0.5); box-shadow: var(--glow-gold); }
.feature-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.feature-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(217, 164, 65, 0.4);
  border-radius: 14px;
  background: radial-gradient(circle at 30% 20%, rgba(243, 201, 107, 0.25), rgba(217, 164, 65, 0.04) 70%);
  color: var(--gold-2);
}
.feature-icon .icon { width: 24px; height: 24px; }
.feature-icon .skill-icon { width: 28px; height: 28px; }
.feature-tag { --badge-color: var(--sand); }
.feature-title { margin: 0 0 6px; font-size: 1.1rem; }
.feature-text { margin: 0; color: var(--muted); font-size: 0.95rem; }

.feature-spotlight {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 24px;
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(217, 164, 65, 0.18), transparent 70%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
}
[dir="rtl"] .feature-spotlight {
  background:
    radial-gradient(420px 220px at 0% 0%, rgba(217, 164, 65, 0.18), transparent 70%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
}
.feature-spotlight .feature-icon { width: 64px; height: 64px; border-radius: 18px; }
.feature-spotlight .feature-icon .icon { width: 32px; height: 32px; }
.feature-spotlight .feature-tag { --badge-color: var(--gold-2); }
.feature-spotlight .feature-title { margin-top: 8px; font-size: 1.35rem; }
.feature-body { min-width: 0; }

/* Christmas: icy accent. */
.feature-christmas.feature-spotlight {
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(94, 168, 222, 0.18), transparent 70%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
}
[dir="rtl"] .feature-christmas.feature-spotlight {
  background:
    radial-gradient(420px 220px at 0% 0%, rgba(94, 168, 222, 0.18), transparent 70%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
}
.feature-christmas .feature-icon {
  border-color: rgba(94, 168, 222, 0.5);
  background: radial-gradient(circle at 30% 20%, rgba(94, 168, 222, 0.32), rgba(94, 168, 222, 0.05) 70%);
  color: var(--blue-text);
}
.feature-christmas.feature-spotlight .feature-tag { --badge-color: var(--blue-text); }
.feature-christmas:hover { border-color: rgba(94, 168, 222, 0.55); }

@media (max-width: 479.98px) {
  .feature-spotlight { flex-direction: column; gap: 12px; padding: 20px; }
  .feature-spotlight .feature-icon { width: 52px; height: 52px; }
}

/* ------------------------------------------------------------------
 * 5. News
 * ---------------------------------------------------------------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 18px 0 26px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}
.chip:hover { border-color: var(--gold); color: var(--text); text-decoration: none; }
.chip[aria-current="page"] {
  border-color: var(--gold);
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: var(--gold-ink);
}
.chips-count { margin-inline-start: auto; }
@media (max-width: 639.98px) {
  .chips-count { width: 100%; margin-inline-start: 0; }
}

.news-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) {
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-card.is-featured { grid-column: 1 / -1; }
  .news-card.is-featured .news-card-title { font-size: 1.7rem; }
  .news-card.is-featured .news-excerpt { font-size: 1.05rem; max-width: 80ch; }
}
.news-card { display: flex; flex-direction: column; }
.news-card .card-body { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.news-card .card-footer { padding-block: 10px; }
.news-card.is-pinned { border-color: rgba(217, 164, 65, 0.5); }
.news-card.is-featured {
  background:
    radial-gradient(700px 240px at 100% 0%, rgba(217, 164, 65, 0.14), transparent 70%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
}
[dir="rtl"] .news-card.is-featured {
  background:
    radial-gradient(700px 240px at 0% 0%, rgba(217, 164, 65, 0.14), transparent 70%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
}
.news-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  color: var(--muted);
  font-size: 0.85rem;
}
.news-date { display: inline-flex; align-items: center; gap: 6px; }
.news-date .icon { color: var(--gold); opacity: 0.85; }
.badge-pinned { --badge-color: var(--gold-2); }
.news-card-title { margin: 0; font-size: 1.2rem; line-height: 1.4; }
:lang(ar) .news-card-title { line-height: 1.55; }
.news-card-title a { color: var(--text); text-decoration: none; }
.news-card-title a:hover { color: var(--gold-2); text-decoration: none; }
.news-excerpt { margin: 0; color: var(--muted); }
.news-more { display: inline-flex; align-items: center; gap: 6px; font-size: 0.92rem; font-weight: 700; }

.article-header { padding-bottom: 22px; }
.breadcrumb { margin-bottom: 16px; }
.breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}
.breadcrumb a:hover { color: var(--gold-2); text-decoration: none; }
.article-header .news-meta { margin-bottom: 12px; }
.article-title { font-size: clamp(1.8rem, 4.6vw, 2.6rem); }
.article-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.93rem;
}
.article-byline > span { display: inline-flex; align-items: center; gap: 6px; }
.article-byline .icon { color: var(--gold); }
.article-card .card-body { padding: clamp(20px, 4vw, 38px); }
.article-back { margin: 20px 0 0; }

/* ------------------------------------------------------------------
 * 6. Content pages (rules, privacy, terms) and sidebars
 * ---------------------------------------------------------------- */
.content-layout {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 24px;
}
@media (min-width: 960px) {
  .content-layout { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
  .page-content .content-aside { position: sticky; top: calc(var(--header-h) + 20px); }
}
.content-main { min-width: 0; }
.content-aside { display: grid; gap: 16px; min-width: 0; }
.content-updated {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
}
.content-updated .icon { color: var(--gold); }
.content-main .prose h2:not(:first-child) {
  padding-top: 0.9em;
  border-top: 1px solid var(--border);
}
.content-main .prose { padding: clamp(20px, 3.5vw, 34px); }

.aside-nav .card-header h2 { font-size: 1rem; }
.aside-links { list-style: none; margin: 0; padding: 6px; }
.aside-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.aside-links a:hover { background: rgba(217, 164, 65, 0.1); color: var(--gold-2); text-decoration: none; }
.aside-links a[aria-current="page"] {
  background: rgba(217, 164, 65, 0.14);
  box-shadow: inset 3px 0 0 var(--gold);
  color: var(--gold-2);
}
[dir="rtl"] .aside-links a[aria-current="page"] { box-shadow: inset -3px 0 0 var(--gold); }
.aside-links .icon { width: 1em; height: 1em; color: var(--subtle); }
.aside-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 1.05rem;
}
.aside-help p,
.aside-account p { margin-bottom: 12px; }
.aside-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ------------------------------------------------------------------
 * 7. Play / downloads
 * ---------------------------------------------------------------- */
.download-grid {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 768px) {
  .download-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.play-xp-events { margin: 18px 0 28px; }
.play-xp-events .xp-event:first-child { margin-top: 0; }
.download-card { display: flex; flex-direction: column; }
.download-card .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 28px 22px 24px;
  text-align: center;
}
.download-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  margin-bottom: 6px;
  border: 1px solid rgba(217, 164, 65, 0.45);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 164, 65, 0.22), transparent 70%);
  color: var(--gold-2);
}
.download-icon .icon { width: 36px; height: 36px; }
.download-name { margin: 0; font-size: 1.3rem; }
.download-req { flex: 1; margin: 0 0 12px; color: var(--muted); font-size: 0.93rem; }
.download-version { margin: 6px 0 0; color: var(--subtle); font-size: 0.85rem; }
.download-card.is-soon .download-icon {
  border-color: var(--border-strong);
  background: rgba(0, 0, 0, 0.22);
  color: var(--muted);
}
.download-card .btn.is-disabled { opacity: 0.65; }
.play-layout { margin-top: 32px; }
.play-layout .content-main { display: grid; gap: 24px; align-content: start; }
.aside-status .status-pill { margin-top: 2px; }

/* Game worlds (Play page): a compact world switcher in the site palette. */
.world-card .card-header { flex-wrap: wrap; }
.world-card .card-header h2 { display: inline-flex; align-items: center; gap: 10px; }
.world-card .card-header h2 .icon { color: var(--gold); }
.world-total { color: var(--green-text); font-size: 0.9rem; font-weight: 700; }
.world-lead { margin: 0; padding: 14px 20px 4px; color: var(--muted); font-size: 0.95rem; }
.world-table-wrap { overflow-x: auto; padding: 4px 8px 8px; }
.world-table { font-size: 1rem; }
.world-table thead th { background: transparent; }
.world-table th,
.world-table td { padding: 12px; }
.world-table tbody th { font-weight: 500; }
.world-head { width: 100%; }
.world-cell { display: flex; align-items: center; gap: 12px; }
.world-flag { width: 32px; height: 24px; border-radius: 4px; }
.world-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.world-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.world-number { color: var(--text); font-weight: 800; font-size: 1.05rem; }
.world-meta { color: var(--muted); font-size: 0.88rem; overflow-wrap: anywhere; }
.world-players { color: var(--text); font-weight: 700; font-size: 1.05rem; }
.world-status-col { width: 1%; white-space: nowrap; }
.world-table tr.is-offline .world-number,
.world-table tr.is-offline .world-flag { opacity: 0.7; }
.world-table tr.is-default { background: rgba(217, 164, 65, 0.07); }
.world-table tbody tr:last-child > * { border-bottom: 0; }
@media (max-width: 479.98px) {
  .world-lead { padding-inline: 16px; }
  .world-table-wrap { padding-inline: 0; }
  .world-table th,
  .world-table td { padding: 10px 8px; }
  .world-table th:first-child,
  .world-table td:first-child { padding-inline-start: 16px; }
  .world-table th:last-child,
  .world-table td:last-child { padding-inline-end: 16px; }
  .world-cell { gap: 10px; }
  .world-flag { width: 28px; height: 21px; }
  /* Phones: the status is a coloured dot (its word stays for screen readers). */
  .world-table .status-pill-sm { padding: 6px; border: 0; background: none; }
  .world-table .status-pill-sm::before { width: 12px; height: 12px; }
  .world-table .status-pill-sm .status-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* ------------------------------------------------------------------
 * 8. Staff
 * ---------------------------------------------------------------- */
.staff-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
}
.staff-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; }
.staff-avatar {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #eef2f6, var(--silver) 45%, #8d97a3);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.4), 0 0 0 4px rgba(201, 209, 219, 0.45);
  color: #1c2127;
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}
.staff-administrator .staff-avatar {
  background: linear-gradient(135deg, #fff1c9, var(--gold-2) 45%, var(--gold));
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.4), 0 0 0 4px rgba(243, 201, 107, 0.5);
  color: var(--gold-ink);
}
.staff-owner .staff-avatar {
  background: linear-gradient(135deg, #e0685c 0%, #e89a4f 45%, var(--gold-2) 100%);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.4), 0 0 0 4px rgba(232, 154, 79, 0.6), 0 0 22px -4px rgba(232, 154, 79, 0.7);
  color: var(--gold-ink);
}
.staff-owner { border-color: rgba(232, 154, 79, 0.45); }
.staff-info { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.staff-name { overflow-wrap: anywhere; font-size: 1.1rem; line-height: 1.3; }
.staff-joined { color: var(--muted); font-size: 0.85rem; }
.staff-help { margin-top: 52px; }

/* ------------------------------------------------------------------
 * 9. Donate
 * ---------------------------------------------------------------- */
.donate-closed { margin-top: 16px; }
.donor-status { --tier-color: var(--gold); margin-top: 16px; }
.donor-status.is-active { border-color: var(--tier-color); }
.donor-status.is-active .cta-icon { border-color: var(--tier-color); color: var(--tier-color); }
.donor-badge { margin: 6px 0 8px; }

.tier-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 640px) {
  .tier-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .tier-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.tier-card {
  --tier-color: var(--gold);
  display: flex;
  flex-direction: column;
  border-top: 3px solid var(--tier-color);
}
.tier-card::before { display: none; }
.tier-card.is-current { box-shadow: var(--shadow), 0 0 0 2px var(--tier-color); }
.tier-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 26px 20px 18px;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(260px 140px at 50% 0%, rgba(217, 164, 65, 0.16), transparent 75%);
  text-align: center;
}
@supports (background: color-mix(in srgb, red 10%, transparent)) {
  .tier-head { background: radial-gradient(260px 140px at 50% 0%, color-mix(in srgb, var(--tier-color) 24%, transparent), transparent 75%); }
}
.tier-gem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 6px;
  border: 1px solid var(--tier-color);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.28);
  box-shadow: 0 0 24px -6px var(--tier-color);
  color: var(--tier-color);
}
.tier-gem .icon { width: 26px; height: 26px; }
.tier-name { margin: 0; color: var(--tier-color); font-size: 1.45rem; }
.tier-price { margin: 0; color: var(--muted); font-weight: 600; }
.tier-price bdi { color: var(--text); font-weight: 800; }
.tier-current { margin-top: 6px; }
.tier-perks { flex: 1; font-size: 0.95rem; }
.tier-perks.prose { line-height: 1.7; }
.tier-perks em { color: var(--subtle); font-size: 0.88em; }

/* ------------------------------------------------------------------
 * 10. Mixed-language content (the :lang(en) heading font and upright
 * Arabic emphasis rules live in app.css).
 * ---------------------------------------------------------------- */
/* Perk lists sit inside the tier <li>: keep first-level bullets. */
.tier-perks ul { list-style: disc; }
/* Badges inside headings keep the body font. */
.cta-title .badge,
.news-card-title .badge { font-family: var(--font-body); }
