:root {
  --bg: #c47878;
  --panel: #7d4545;
  --panel-row: #8a4e4e;
  --panel-row-hover: #965555;
  --accent: #eb8f8f;
  --accent-hover: #edafaf;
  --accent-light: #ffd9a8;
  --accent-light-hover: #ffe6c2;
  --accent-dark: #8a3b3b;
  --white: #ffffff;
  --green: #8ce99a;
  --red: #ff6b6b;
  --gray-dot: #d8b8b8;
  --discord: #5865F2;
  --gold: #ffd9a8;
  --silver: #e6e6ea;
  --bronze: #e0a878;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  font-family: 'Montserrat', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { image-rendering: pixelated; }
a { color: var(--accent-light); text-decoration: none; }
a:hover { color: var(--white); }
h1, h2, h3, .heading { font-family: 'Baloo 2', cursive; font-weight: 800; color: var(--white); margin: 0; }
button { font-family: inherit; }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: #a86767; }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 12px; }

@keyframes petalDrop {
  0% { transform: translate3d(0,-40px,0) rotate(0deg); opacity: 0; }
  8% { opacity: 1; } 92% { opacity: 1; }
  100% { transform: translate3d(120px,940px,0) rotate(300deg); opacity: 0; }
}
@keyframes hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes spin { to { transform: rotate(360deg); } }
.petal { position: absolute; top: -40px; }

/* ---------------- nav ---------------- */
.nav-bar { position: sticky; top: 0; z-index: 50; background: rgba(196,120,120,.92); backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(255,255,255,.14); }
.nav-inner { max-width: 1500px; margin: 0 auto; padding: 16px 28px; display: flex; align-items: center; gap: 16px; }
.nav-logo img { height: 40px; width: auto; display: block; }
.nav-links { display: flex; gap: 2px; align-items: center; }
.nav-link { border: none; cursor: pointer; background: transparent; font-family: 'Baloo 2', cursive; font-weight: 700; font-size: 16.5px; padding: 8px 13px; border-radius: 13px; color: rgba(255,255,255,.78); white-space: nowrap; }
.nav-link:hover { background: rgba(255,255,255,.12); color: #fff; }
.nav-link.active { background: var(--accent-light); color: var(--accent-dark); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.status-chip { display: flex; align-items: center; gap: 9px; font-family: 'Baloo 2', cursive; font-weight: 700; font-size: 15px; white-space: nowrap; color: rgba(255,255,255,.82); background: rgba(255,255,255,.1); padding: 9px 14px; border-radius: 999px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--gray-dot); }
.status-dot.status-online { background: var(--green); }
.status-dot.status-offline { background: var(--red); }
.status-dot.status-unknown { background: var(--gray-dot); }
.nav-store { display: flex; align-items: center; gap: 10px; font-family: 'Baloo 2', cursive; font-weight: 800; font-size: 16.5px; color: var(--accent-dark); background: var(--accent-light); padding: 13px 20px; border-radius: 15px; box-shadow: 0 5px 0 #C53232; }
.nav-store:hover { transform: translateY(2px); box-shadow: 0 3px 0 #C53232; color: var(--accent-dark); background: var(--accent-light-hover); }
.nav-burger { display: none; background: rgba(255,255,255,.12); border: none; color: #fff; font-size: 18px; padding: 10px 13px; border-radius: 12px; cursor: pointer; }

@media (max-width: 860px) {
  .nav-burger { display: block; }
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; background: var(--panel); flex-direction: column; align-items: stretch; padding: 8px; gap: 4px; display: none; box-shadow: 0 14px 30px rgba(94,50,50,.35); }
  .nav-links.open { display: flex; }
  .nav-link { text-align: left; }
}

/* ---------------- buttons ---------------- */
.btn { font-family: 'Baloo 2', cursive; font-weight: 800; border: none; cursor: pointer; border-radius: 15px; display: inline-flex; align-items: center; gap: 10px; }

/* ---------------- footer ---------------- */
.site-footer { margin-top: auto; background: var(--panel); padding: 36px 40px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-logo { height: 32px; width: auto; opacity: .9; }
.footer-copy { font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,.35); line-height: 1.7; }
.footer-links { margin-left: auto; display: flex; gap: 22px; }
.footer-links a { font-family: 'Baloo 2', cursive; font-weight: 800; font-size: 11.7px; color: rgba(255,255,255,.5); }
.footer-links a:hover { color: #fff; }

/* ---------------- home ---------------- */
.hero { position: relative; padding: 44px 40px 64px; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; max-width: 1500px; margin: 0 auto; }
.hero-title { font-size: 76px; line-height: 1.02; letter-spacing: -.01em; color: #fff; text-shadow: 0 5px 0 rgba(125,69,69,.45); font-family: 'Baloo 2', cursive; font-weight: 800; }
.hero-title span { color: var(--accent-light); }
.hero-sub { font-size: 16.5px; line-height: 1.75; color: rgba(255,255,255,.9); margin-top: 22px; max-width: 470px; text-wrap: pretty; }
.hero-ctas { display: flex; gap: 16px; margin-top: 34px; flex-wrap: wrap; }
.ip-btn { display: flex; align-items: center; gap: 16px; background: var(--panel); border-radius: 18px; padding: 16px 16px 16px 24px; box-shadow: 0 8px 0 rgba(94,50,50,.5), 0 14px 28px rgba(94,50,50,.25); }
.ip-btn:hover { transform: translateY(4px); box-shadow: 0 4px 0 rgba(94,50,50,.5), 0 8px 18px rgba(94,50,50,.25); }
.ip-btn .ip-text { font-size: 13px; color: #fff; }
.ip-btn .ip-copy { font-size: 9.5px; color: var(--accent-dark); background: var(--accent-light); padding: 11px 13px; border-radius: 11px; }
.discord-btn { background: var(--discord); color: #fff; font-size: 16.6px; padding: 20px 26px; border-radius: 18px; box-shadow: 0 8px 0 rgba(58,64,170,.75), 0 14px 28px rgba(94,50,50,.22); }
.discord-btn:hover { transform: translateY(4px); box-shadow: 0 4px 0 rgba(58,64,170,.75), 0 8px 18px rgba(94,50,50,.22); color: #fff; }
.hero-art { border-radius: 24px; overflow: hidden; box-shadow: 0 24px 50px rgba(94,50,50,.4); animation: hop 6s ease-in-out infinite; }
.hero-art img { display: block; width: 100%; height: 430px; object-fit: cover; }

.happening { background: var(--panel); padding: 56px 40px; border-radius: 40px 40px 0 0; }
.happening-inner { max-width: 1500px; margin: 0 auto; }
.happening h2 { font-size: 34px; letter-spacing: -.01em; margin-bottom: 28px; }
.happening-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 22px; }
.leaders-card { background: var(--panel-row); border-radius: 26px; padding: 30px 32px; box-shadow: 0 14px 30px rgba(94,50,50,.25); }
.leaders-head { display: flex; align-items: center; margin-bottom: 22px; }
.leaders-head .title { font-size: 24px; flex-grow: 1; }
.pill-btn { background: var(--accent); color: #fff; font-size: 12.4px; padding: 12px 14px; border-radius: 12px; white-space: nowrap; }
.pill-btn:hover { background: var(--accent-hover); transform: translateY(-2px); }
.leaders-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 26px; }
.leader-row { display: flex; align-items: center; gap: 14px; padding: 9px 0; }
.leader-row img.avatar, .avatar { border-radius: 10px; background: rgba(0,0,0,.18); display: block; flex-shrink: 0; }
.leader-row .name { font-family: 'Baloo 2', cursive; font-weight: 700; font-size: 16px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leader-row .cat { font-size: 11px; font-weight: 600; color: rgba(255,255,255,.42); margin-top: 1px; }
.leader-row .val { font-family: 'Baloo 2', cursive; font-weight: 800; font-size: 14.5px; color: var(--accent-light); margin-left: auto; }
.leader-row.ghost .name { color: rgba(255,255,255,.35); }
.leader-row.ghost .avatar-ph { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.06); flex-shrink: 0; }
.leaders-empty { grid-column: 1 / -1; text-align: center; padding: 30px 10px; color: rgba(255,255,255,.6); font-size: 14px; line-height: 1.7; }
.discord-card { background: var(--discord); border-radius: 26px; padding: 34px; display: flex; flex-direction: column; justify-content: center; color: #fff; box-shadow: 0 14px 30px rgba(94,50,50,.25); }
.discord-card:hover { transform: translateY(-3px); color: #fff; }
.discord-card i { font-size: 36px; margin-bottom: 20px; }
.discord-card .count { font-family: 'Baloo 2', cursive; font-weight: 800; font-size: 26px; }
.discord-card .desc { font-size: 14px; line-height: 1.7; opacity: .85; margin-top: 10px; }

/* ---------------- leaderboards page ---------------- */
.lb-page { padding: 36px 40px 70px; max-width: 1500px; margin: 0 auto; width: 100%; }
.lb-top { display: flex; align-items: center; margin-bottom: 22px; gap: 20px; flex-wrap: wrap; }
.lb-top h1 { font-size: 48px; letter-spacing: -.015em; text-shadow: 0 5px 0 rgba(125,69,69,.4); }
.period-pills { margin-left: auto; display: flex; gap: 6px; background: var(--panel); border-radius: 18px; padding: 6px; box-shadow: 0 10px 24px rgba(94,50,50,.25); flex-wrap: wrap; }
.period-pill { font-family: 'Baloo 2', cursive; font-weight: 800; font-size: 13.1px; padding: 14px 18px; border: none; border-radius: 13px; cursor: pointer; background: transparent; color: rgba(255,255,255,.55); white-space: nowrap; }
.period-pill.active { background: var(--accent); color: #fff; }

.lb-search { margin-bottom: 26px; position: relative; max-width: 420px; }
.lb-search input { width: 100%; font-family: 'Baloo 2', cursive; font-weight: 700; font-size: 14px; padding: 14px 18px; border-radius: 15px; border: none; background: var(--panel); color: #fff; }
.lb-search input::placeholder { color: rgba(255,255,255,.45); }
.lb-search-result { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--panel); border-radius: 16px; padding: 16px; box-shadow: 0 14px 30px rgba(94,50,50,.35); z-index: 5; }
.lb-search-result.hidden { display: none; }

.lb-grid { display: grid; grid-template-columns: 268px 1fr; gap: 24px; align-items: start; }
.lb-categories { background: var(--panel); border-radius: 24px; padding: 14px; box-shadow: 0 14px 30px rgba(94,50,50,.25); position: sticky; top: 96px; }
.cat-btn { width: 100%; display: flex; align-items: center; gap: 12px; border: none; cursor: pointer; text-align: left; padding: 13px 14px; border-radius: 14px; font-family: 'Baloo 2', cursive; font-weight: 800; font-size: 13.1px; margin-bottom: 5px; background: rgba(255,255,255,.05); color: rgba(255,255,255,.6); white-space: nowrap; }
.cat-btn i { width: 16px; text-align: center; font-size: 12px; }
.cat-btn.active { background: var(--accent); color: #fff; }

.lb-board { background: var(--panel); border-radius: 26px; padding: 30px 32px 34px; box-shadow: 0 14px 30px rgba(94,50,50,.25); }
.lb-subtabs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 24px; }
.sub-btn { border: none; cursor: pointer; font-family: 'Baloo 2', cursive; font-weight: 800; font-size: 12.4px; padding: 8px 13px; border-radius: 13px; background: rgba(255,255,255,.06); color: rgba(255,255,255,.62); white-space: nowrap; }
.sub-btn.active { background: var(--accent-light); color: var(--accent-dark); }

.podium { display: grid; grid-template-columns: 1fr 1.16fr 1fr; gap: 18px; align-items: end; margin-bottom: 24px; }
.podium-slot { background: var(--panel-row); border-radius: 22px; padding: 24px 18px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.podium-slot.p1 { padding-top: 34px; box-shadow: 0 0 0 3px var(--gold) inset; }
.podium-slot.p2, .podium-slot.p3 { padding-top: 24px; }
.podium-slot.ghost { background: rgba(0,0,0,.08); box-shadow: 0 0 0 2px rgba(255,255,255,.08) inset; }
.podium-slot .place { font-family: 'Baloo 2', cursive; font-weight: 800; font-size: 12.4px; margin-top: 16px; }
.podium-slot .pname { font-family: 'Baloo 2', cursive; font-weight: 700; font-size: 19px; color: #fff; margin-top: 8px; }
.podium-slot .pval { font-family: 'Baloo 2', cursive; font-weight: 800; font-size: 20.7px; margin-top: 10px; }
.podium-slot.ghost .pname { color: rgba(255,255,255,.32); font-size: 13px; font-weight: 700; }
.podium-slot.ghost .avatar-ph { width: 60px; height: 60px; border-radius: 18px; background: rgba(255,255,255,.06); }

.lb-rows { display: flex; flex-direction: column; gap: 6px; }
.lb-row { display: flex; align-items: center; gap: 18px; padding: 11px 18px; border-radius: 16px; background: var(--panel-row); }
.lb-row:hover { background: var(--panel-row-hover); transform: translateX(3px); }
.lb-row .rank { font-family: 'Baloo 2', cursive; font-weight: 800; font-size: 13.8px; color: rgba(255,255,255,.45); width: 44px; }
.lb-row .name { font-family: 'Baloo 2', cursive; font-weight: 700; font-size: 18px; color: #fff; flex-grow: 1; }
.lb-row .val { font-family: 'Baloo 2', cursive; font-weight: 800; font-size: 14.5px; color: var(--accent-light); }

.lb-expand { width: 100%; margin-top: 20px; background: var(--accent); border: none; border-radius: 18px; padding: 18px; cursor: pointer; font-family: 'Baloo 2', cursive; font-weight: 800; font-size: 14.5px; color: #fff; box-shadow: 0 7px 0 rgba(94,50,50,.4); }
.lb-expand:hover { transform: translateY(3px); box-shadow: 0 4px 0 rgba(94,50,50,.4); background: var(--accent-hover); }

/* skeleton / empty / error / not-found states */
.skeleton { background: rgba(255,255,255,.08); border-radius: 12px; position: relative; overflow: hidden; }
.skeleton::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.state-empty, .state-error, .state-notfound { text-align: center; padding: 40px 20px; border-radius: 18px; background: rgba(0,0,0,.08); }
.state-empty .icon, .state-error .icon, .state-notfound .icon { font-size: 30px; color: rgba(255,255,255,.4); margin-bottom: 14px; }
.state-empty .msg, .state-error .msg, .state-notfound .msg { font-family: 'Baloo 2', cursive; font-weight: 700; font-size: 16px; color: rgba(255,255,255,.75); max-width: 380px; margin: 0 auto; line-height: 1.6; }
.state-error .msg { color: #ffd0d0; }
.retry-btn { margin-top: 16px; background: rgba(255,255,255,.12); border: none; color: #fff; font-family: 'Baloo 2', cursive; font-weight: 800; font-size: 13px; padding: 11px 18px; border-radius: 12px; cursor: pointer; }
.retry-btn:hover { background: rgba(255,255,255,.2); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255,255,255,.2); border-top-color: #fff; animation: spin .7s linear infinite; margin: 0 auto; }

@media (max-width: 960px) {
  .lb-grid { grid-template-columns: 1fr; }
  .lb-categories { position: static; display: flex; overflow-x: auto; gap: 8px; padding: 10px; }
  .cat-btn { flex-shrink: 0; width: auto; margin-bottom: 0; }
}
@media (max-width: 720px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-title { font-size: 48px; }
  .hero-art img { height: 260px; }
  .happening-grid { grid-template-columns: 1fr; }
  .leaders-list { grid-template-columns: 1fr; }
  .lb-top h1 { font-size: 34px; }
  .podium { grid-template-columns: 1fr; }
}

/* ---------------- news / rules / staff ---------------- */
.page-narrow { padding: 36px 40px 70px; max-width: 1000px; margin: 0 auto; }
.page-wide { padding: 36px 40px 70px; max-width: 1200px; margin: 0 auto; }
.page-title { font-size: 48px; text-shadow: 0 5px 0 rgba(125,69,69,.4); margin-bottom: 12px; }
.page-lede { font-size: 16px; line-height: 1.75; color: rgba(255,255,255,.85); margin-bottom: 30px; max-width: 640px; text-wrap: pretty; }

.news-list { display: flex; flex-direction: column; gap: 20px; }
.news-card { background: var(--panel); border-radius: 26px; padding: 32px 34px; box-shadow: 0 14px 30px rgba(94,50,50,.25); }
.news-meta { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.news-tag { font-family: 'Baloo 2', cursive; font-weight: 800; font-size: 11.7px; color: var(--accent-dark); background: var(--accent-light); padding: 10px 12px; border-radius: 11px; }
.news-date { font-size: 12.5px; font-weight: 700; color: rgba(255,255,255,.35); }
.news-title { font-size: 30px; line-height: 1.2; margin-bottom: 12px; }
.news-body { font-size: 15px; line-height: 1.8; color: rgba(255,255,255,.68); text-wrap: pretty; }

/* Cards stretch to the tallest in their row on purpose. Letting them size to
   their own content leaves the rows ragged, which reads as broken rather than as
   compact — a tidy row of equal cards beats saving the whitespace. */
.rules-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rule-card { background: var(--panel); border-radius: 20px; padding: 22px 24px; box-shadow: 0 14px 30px rgba(94,50,50,.25); }
.rule-title { font-size: 19px; margin-bottom: 8px; }
.rule-body { font-size: 14px; line-height: 1.7; color: rgba(255,255,255,.64); text-wrap: pretty; }
/* The one aside in the ruleset — a staff-discretion carve-out, so it has to read
   as attached to its rule rather than as another rule. */
.rule-note { margin-top: 12px; padding-left: 14px; border-left: 3px solid var(--accent); font-size: 13px; line-height: 1.65; color: rgba(255,255,255,.5); text-wrap: pretty; }

/* Jump nav. scroll-margin-top clears the sticky header, which would otherwise
   sit over the heading you just jumped to. */
.rules-nav { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 38px; }
.rules-nav a { font-family: 'Baloo 2', cursive; font-weight: 800; font-size: 13.5px; color: #fff; background: var(--panel); padding: 12px 18px; border-radius: 14px; box-shadow: 0 6px 0 rgba(94,50,50,.4); display: inline-flex; align-items: center; gap: 9px; }
.rules-nav a:hover { background: var(--panel-row-hover); transform: translateY(3px); box-shadow: 0 3px 0 rgba(94,50,50,.4); color: #fff; }
.rules-nav a i { font-size: 12px; opacity: .7; }

.rules-section { margin-bottom: 46px; scroll-margin-top: 90px; }
.rules-section-title { font-size: 32px; margin-bottom: 20px; text-shadow: 0 4px 0 rgba(125,69,69,.35); }
.rules-group { margin-bottom: 30px; }
.rules-group-head { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.rules-badge { width: 12px; height: 12px; border-radius: 4px; flex-shrink: 0; }
.rules-group-title { font-size: 21px; }
.rules-count { font-family: 'Baloo 2', cursive; font-weight: 800; font-size: 12px; color: rgba(255,255,255,.4); background: rgba(255,255,255,.08); border-radius: 8px; padding: 3px 9px; }

.mod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.mod-col { background: var(--panel); border-radius: 20px; padding: 24px 26px; box-shadow: 0 14px 30px rgba(94,50,50,.25); }
.mod-col-title { font-size: 19px; margin-bottom: 16px; }
.mod-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.mod-list li { display: flex; align-items: flex-start; gap: 11px; font-size: 14px; line-height: 1.55; color: rgba(255,255,255,.72); }
.mod-list i { font-size: 12px; margin-top: 4px; flex-shrink: 0; }
.mod-col.allowed .mod-list i { color: #8ce99a; }
.mod-col.disallowed .mod-list i { color: #ff6b6b; }
@media (max-width: 720px) { .rules-grid { grid-template-columns: 1fr; } }

.staff-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.staff-card { background: var(--panel); border-radius: 24px; padding: 28px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; box-shadow: 0 14px 30px rgba(94,50,50,.25); }
.staff-card:hover { background: var(--panel-row); transform: translateY(-4px); }
.staff-name { font-size: 21px; margin-top: 16px; }
.staff-role { font-family: 'Baloo 2', cursive; font-weight: 800; font-size: 11px; padding: 10px 12px; border-radius: 11px; margin-top: 10px; color: #fff; }
.staff-blurb { font-size: 13px; line-height: 1.65; color: rgba(255,255,255,.5); margin-top: 14px; }
@media (max-width: 960px) { .staff-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px) { .staff-grid { grid-template-columns: 1fr; } }
