/* =========================================================
   v4 PUBLIC PAGES: Guides, Player Info, Team, Terms, Thank You, Checkout
   ========================================================= */
.nav-mobile-only { display: none; }
.status-dot.offline { background: #f87171; box-shadow: 0 0 8px #f87171; }

.page-hero {
  padding: 3.2rem 0 2.4rem;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(circle at 18% 0%, rgba(56, 216, 100, 0.12), transparent 55%),
    linear-gradient(180deg, #0d1522 0%, var(--bg-deep) 100%);
}
.page-hero.compact { padding: 2.4rem 0 1.8rem; }
.page-hero h1 { font-family: var(--font-display); font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 0.1rem 0 0.5rem; }
.page-hero p { color: var(--text-muted); max-width: 720px; margin: 0; }
.page-hero .store-breadcrumb { margin-bottom: 0.6rem; }

/* Markdown */
.md-body { color: #dce6f7; font-size: 0.95rem; line-height: 1.7; }
.md-body .md-h { font-family: var(--font-display); color: var(--text-main); margin: 1.4rem 0 0.55rem; line-height: 1.25; }
.md-body .md-h:first-child { margin-top: 0; }
.md-body .md-h1 { font-size: 1.6rem; }
.md-body .md-h2 { font-size: 1.25rem; color: var(--emerald); }
.md-body .md-h3 { font-size: 1.05rem; }
.md-body .md-p { margin: 0 0 0.85rem; }
.md-body .md-list { margin: 0 0 0.95rem; padding-left: 1.3rem; display: grid; gap: 0.3rem; }
.md-body code { background: var(--bg-deep); border: 1px solid var(--border); padding: 0.05rem 0.38rem; border-radius: 5px; font-size: 0.85em; }
.md-body a { color: var(--emerald); text-decoration: underline; }
.md-body .md-quote { margin: 0 0 1rem; padding: 0.7rem 1rem; border-left: 3px solid var(--gold); background: rgba(250, 204, 21, 0.07); border-radius: 0 8px 8px 0; color: #fde68a; }
.md-table-wrap { overflow-x: auto; margin: 0 0 1rem; }
.md-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.md-table th, .md-table td { text-align: left; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--border); }
.md-table th { color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* Guides (neutral slate & gold styling — no green accents) */
.guides-page .page-hero {
  background: radial-gradient(circle at 18% 0%, rgba(148, 163, 184, 0.14), transparent 55%),
    linear-gradient(180deg, #0d1522 0%, var(--bg-deep) 100%);
}
.guides-page .eyebrow { color: #94a3b8; }
.guides-page .store-breadcrumb a:hover { color: #f8fafc; }
.guides-page .feature-icon {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.26);
  color: #e2e8f0;
}
.guides-page .scat-icon {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
}
.guides-page .md-body .md-h2 { color: #f8fafc; }
.guides-page .md-body a { color: #fde68a; }
.guides-search, .player-search {
  display: flex; align-items: center; gap: 0.6rem; margin-top: 1.25rem; max-width: 560px;
  background: var(--bg-surface); border: 1px solid var(--border-strong); border-radius: 12px;
  padding: 0.35rem 0.4rem 0.35rem 0.9rem; color: var(--text-muted);
}
.guides-search input, .player-search input { flex: 1; min-width: 0; background: transparent; border: none; color: var(--text-main); font-family: var(--font-sans); font-size: 0.95rem; padding: 0.55rem 0; }
.guides-search input:focus, .player-search input:focus { outline: none; }
.guides-group { margin-bottom: 2.2rem; }
.guides-group-head { display: flex; align-items: center; gap: 0.6rem; color: #cbd5e1; margin-bottom: 1rem; }
.guides-group-head h2 { font-family: var(--font-display); font-size: 1.3rem; color: var(--text-main); margin: 0; }
.guides-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.guide-card { display: flex; flex-direction: column; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.3rem; transition: transform 0.18s ease, border-color 0.2s ease; }
.guide-card:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.22); }
.guide-card h3 { font-family: var(--font-display); font-size: 1.1rem; margin: 0 0 0.4rem; }
.guide-card p { color: var(--text-muted); font-size: 0.88rem; margin: 0 0 0.9rem; flex: 1; }
.guide-card-cta { color: #e2e8f0; font-weight: 700; font-size: 0.85rem; }
.guide-card:hover .guide-card-cta { color: #ffffff; }
.guides-layout, .legal-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 1.5rem; padding: 2rem 0 3.5rem; align-items: start; }
.guides-side, .legal-side { display: grid; gap: 1rem; position: sticky; top: 92px; }
.guides-side-nav { display: grid; gap: 0.3rem; margin-top: 0.4rem; }
.guides-side-link { display: flex; align-items: center; gap: 0.55rem; padding: 0.55rem 0.65rem; border-radius: 8px; color: var(--text-muted); font-weight: 600; font-size: 0.86rem; border: 1px solid transparent; }
.guides-side-link:hover { background: rgba(255, 255, 255, 0.04); color: var(--text-main); }
.guides-side-link.active { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.22); color: #ffffff; }
.guides-side-link.active .scat-icon { background: rgba(255, 255, 255, 0.14); color: #ffffff; }
.guide-article, .legal-content { padding: 1.8rem 2rem; min-width: 0; }
.guide-footer-meta { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--border); margin-top: 1.5rem; padding-top: 1rem; color: var(--text-dim); font-size: 0.82rem; }

/* Legal */
.legal-tabs { display: grid; gap: 0.35rem; }
.legal-tab { display: flex; align-items: center; gap: 0.55rem; padding: 0.65rem 0.75rem; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--text-muted); font-family: var(--font-sans); font-weight: 700; font-size: 0.87rem; cursor: pointer; text-align: left; }
.legal-tab.active { background: rgba(56, 216, 100, 0.12); border-color: rgba(56, 216, 100, 0.32); color: var(--emerald); }
.legal-updated { color: var(--text-dim); font-size: 0.82rem; border-top: 1px solid var(--border); padding-top: 0.9rem; margin: 1.4rem 0 0; }
.legal-updated a { color: var(--emerald); }

/* Player Info (character page) */
.player-server-chip { display: inline-flex; align-items: center; gap: 0.45rem; margin-top: 0.85rem; font-size: 0.8rem; font-weight: 700; color: var(--text-muted); }
.player-landing { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.player-landing-card h3 { font-family: var(--font-display); margin: 0 0 0.4rem; }
.player-landing-card p { color: var(--text-muted); font-size: 0.9rem; margin: 0 0 1rem; }
.charpage-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.charpage-card { position: sticky; top: 92px; text-align: center; background: linear-gradient(170deg, #142337 0%, #121d2c 60%, #14262c 100%); border-color: var(--border-strong); }
.charpage-skin { position: relative; background: radial-gradient(circle at 50% 70%, rgba(56, 216, 100, 0.18), transparent 65%), var(--bg-deep); border: 1px solid var(--border); border-radius: 14px; padding: 1.2rem 0 0.8rem; margin-bottom: 0.9rem; }
.charpage-skin img { height: 260px; width: auto; margin: 0 auto; image-rendering: pixelated; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.55)); }
.charpage-online { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; font-weight: 800; padding: 0.18rem 0.55rem; border-radius: 999px; background: rgba(0, 0, 0, 0.45); color: var(--text-muted); }
.charpage-online .status-dot { background: #6c7e9c; box-shadow: none; }
.charpage-online.on { color: var(--emerald); }
.charpage-online.on .status-dot { background: var(--emerald); box-shadow: 0 0 8px var(--emerald); }
.charpage-name { font-family: var(--font-display); font-size: 1.6rem; margin: 0 0 0.45rem; overflow-wrap: anywhere; }
.charpage-badges { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.charpage-badge { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.74rem; font-weight: 800; padding: 0.2rem 0.6rem; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-card); }
.charpage-badge.rank { color: var(--gold); border-color: rgba(250, 204, 21, 0.4); background: rgba(250, 204, 21, 0.1); }
.charpage-badge.supporter { color: var(--emerald); border-color: rgba(56, 216, 100, 0.4); background: rgba(56, 216, 100, 0.1); }
.charpage-badge.muted { color: var(--text-dim); }
.charpage-quick { display: grid; gap: 0.45rem; text-align: left; margin-bottom: 0.9rem; }
.charpage-quick > div { display: flex; justify-content: space-between; gap: 0.6rem; font-size: 0.84rem; padding: 0.5rem 0.7rem; border-radius: 8px; background: rgba(0, 0, 0, 0.22); }
.charpage-quick span { color: var(--text-muted); }
.charpage-checked { color: var(--text-dim); font-size: 0.72rem; margin: 0.6rem 0 0; }
.charpage-main { display: grid; gap: 1rem; min-width: 0; }
.charpage-warning { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.85rem 1rem; border-radius: 10px; background: rgba(250, 204, 21, 0.08); border: 1px solid rgba(250, 204, 21, 0.3); color: #fde68a; }
.charpage-warning strong { display: block; }
.charpage-warning p { margin: 0.15rem 0 0; font-size: 0.85rem; color: #e6d7a0; }
.charpage-stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.65rem; margin-top: 0.5rem; }
.charpage-stat { display: flex; align-items: center; gap: 0.7rem; padding: 0.75rem 0.85rem; border-radius: 10px; background: var(--bg-card); border: 1px solid var(--border); min-width: 0; }
.charpage-stat.is-empty { opacity: 0.55; }
.charpage-stat-icon { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: rgba(56, 216, 100, 0.12); color: var(--emerald); }
.charpage-stat-label { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.charpage-stat-value { display: block; font-family: var(--font-display); font-size: 1.05rem; overflow-wrap: anywhere; }
.charpage-orders { list-style: none; padding: 0; margin: 0.6rem 0 0; display: grid; gap: 0.45rem; }
.charpage-orders li { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; padding: 0.6rem 0.8rem; border-radius: 8px; background: var(--bg-card); border: 1px solid var(--border); font-size: 0.86rem; }
.charpage-orders li span { display: block; color: var(--text-dim); font-size: 0.75rem; }

/* Team */
.team-role-strip { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1rem; }
.team-role-chip { --role-color: #38d864; display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; font-weight: 800; padding: 0.22rem 0.65rem; border-radius: 999px; color: var(--text-main); background: color-mix(in srgb, var(--role-color) 14%, transparent); border: 1px solid color-mix(in srgb, var(--role-color) 45%, transparent); font-family: var(--font-sans); }
.team-role-chip.as-button { cursor: pointer; }
.team-role-chip.as-button.active { box-shadow: 0 0 0 2px var(--role-color); }
.team-role-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--role-color); }
.team-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; }
.team-card { --role-color: #38d864; background: var(--bg-card); border: 1px solid var(--border); border-top: 3px solid var(--role-color); border-radius: var(--radius-md); overflow: hidden; display: flex; flex-direction: column; transition: transform 0.18s ease; }
.team-card:hover { transform: translateY(-3px); }
.team-card-art { background: radial-gradient(circle at 50% 80%, color-mix(in srgb, var(--role-color) 22%, transparent), transparent 70%), var(--bg-deep); padding: 1.2rem 0 0.6rem; }
.team-card-art img { height: 190px; width: auto; margin: 0 auto; image-rendering: pixelated; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.5)); }
.team-card-body { padding: 1rem 1.1rem 1.2rem; }
.team-card-body h3 { font-family: var(--font-display); font-size: 1.15rem; margin: 0.55rem 0 0.1rem; }
.team-mc-name { color: var(--emerald); font-size: 0.82rem; font-weight: 700; }
.team-card-body p { color: var(--text-muted); font-size: 0.86rem; margin: 0.55rem 0 0; }
.team-discord { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.6rem; color: #a5b4fc; font-size: 0.8rem; font-weight: 700; }
.team-join-card { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; margin-top: 2rem; padding: 1.3rem 1.5rem; border-radius: var(--radius-md); background: linear-gradient(90deg, rgba(88, 101, 242, 0.14), rgba(56, 216, 100, 0.08)); border: 1px solid rgba(88, 101, 242, 0.35); }
.team-join-card > div:nth-child(2) { flex: 1; min-width: 220px; }
.team-join-card h3 { font-family: var(--font-display); margin: 0 0 0.2rem; }
.team-join-card p { margin: 0; color: var(--text-muted); font-size: 0.88rem; }
.team-join-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(88, 101, 242, 0.2); color: #a5b4fc; }

/* Cart: inventory reminder, terms checkbox, coming soon */
.inventory-reminder { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.75rem 0.85rem; border-radius: 10px; background: rgba(250, 204, 21, 0.08); border: 1px solid rgba(250, 204, 21, 0.35); margin-top: 0.9rem; text-align: left; }
.inventory-reminder.large { padding: 0.95rem 1.1rem; margin: 1.1rem auto 0; max-width: 560px; }
.inventory-reminder-icon { color: var(--gold); flex-shrink: 0; margin-top: 0.1rem; }
.inventory-reminder strong { display: block; color: #fde68a; font-size: 0.86rem; }
.inventory-reminder p { margin: 0.15rem 0 0; font-size: 0.8rem; color: #e6d7a0; line-height: 1.5; }
.terms-accept-row { display: flex; gap: 0.6rem; align-items: flex-start; margin-top: 0.75rem; padding: 0.75rem 0.85rem; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-card); font-size: 0.82rem; color: #d0dcf0; cursor: pointer; line-height: 1.5; }
.terms-accept-row input { width: 18px; height: 18px; margin-top: 0.1rem; accent-color: var(--emerald); flex-shrink: 0; cursor: pointer; }
.terms-accept-row a { color: var(--emerald); text-decoration: underline; font-weight: 700; }
.terms-accept-row.is-checked { border-color: rgba(56, 216, 100, 0.45); background: rgba(56, 216, 100, 0.07); }
.terms-accept-row.has-error { border-color: #f87171; background: rgba(239, 68, 68, 0.08); }
.terms-error-text { color: #fca5a5; font-size: 0.78rem; font-weight: 700; margin-top: 0.35rem; }
.btn.is-coming-soon { background: var(--bg-card); color: var(--text-dim); border: 1px dashed rgba(255, 255, 255, 0.18); box-shadow: none; cursor: not-allowed; }
.coming-soon-pill { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 0.1rem 0.4rem; border-radius: 999px; background: rgba(250, 204, 21, 0.16); color: var(--gold); }
.trust-pill.is-soon { opacity: 0.65; border-style: dashed; }

/* Thank You */
.thankyou-page { padding: 2.6rem 0 3.6rem; }
.thankyou-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.4rem; align-items: start; }
.thankyou-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem 2.1rem; text-align: center; }
.thankyou-card.is-paid { border-color: var(--border-strong); background: radial-gradient(circle at 50% 0%, rgba(56, 216, 100, 0.14), transparent 55%), var(--bg-surface); }
.thankyou-card.is-failed { border-color: rgba(239, 68, 68, 0.4); }
.thankyou-card h1 { font-family: var(--font-display); font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin: 0.15rem 0 0.55rem; }
.thankyou-lead { color: var(--text-muted); max-width: 600px; margin: 0 auto; }
.thankyou-status-icon { width: 68px; height: 68px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 0.9rem; border: 2px solid; }
.thankyou-status-icon.paid { color: var(--emerald); border-color: var(--emerald); background: rgba(56, 216, 100, 0.15); box-shadow: 0 0 30px rgba(56, 216, 100, 0.3); }
.thankyou-status-icon.pending { color: var(--gold); border-color: rgba(250, 204, 21, 0.6); background: rgba(250, 204, 21, 0.1); }
.thankyou-status-icon.failed { color: #f87171; border-color: #f87171; background: rgba(239, 68, 68, 0.12); }
.thankyou-spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(250, 204, 21, 0.25); border-top-color: var(--gold); animation: bcSpin 0.9s linear infinite; }
@keyframes bcSpin { to { transform: rotate(360deg); } }
.thankyou-receipt { text-align: left; margin: 1.4rem auto 0; max-width: 560px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.thankyou-receipt-head { display: flex; gap: 0.75rem; align-items: center; padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); }
.thankyou-receipt-head img { width: 40px; height: 40px; border-radius: 8px; image-rendering: pixelated; }
.thankyou-receipt-head strong { display: block; }
.thankyou-receipt-head span { font-size: 0.8rem; color: var(--text-muted); }
.thankyou-items { list-style: none; margin: 0; padding: 0.4rem 1rem 0.6rem; }
.thankyou-items li { display: flex; justify-content: space-between; gap: 0.8rem; padding: 0.45rem 0; font-size: 0.88rem; border-bottom: 1px dashed rgba(255, 255, 255, 0.07); }
.thankyou-items li.thankyou-total { border-bottom: none; padding-top: 0.65rem; font-weight: 700; }
.thankyou-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.4rem; }
.thankyou-side { display: grid; gap: 1rem; }
.thankyou-steps { margin: 0.5rem 0 0; padding-left: 1.1rem; display: grid; gap: 0.65rem; font-size: 0.86rem; color: var(--text-muted); }
.thankyou-steps strong { color: var(--text-main); }
.thankyou-card .sandbox-note { max-width: 560px; margin-inline: auto; }

/* =========================================================
   EVENTS PAGE (/events)
   ========================================================= */
.events-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 1.75rem;
  align-items: center;
}
.events-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.35rem;
}
.events-pass-spotlight {
  border-color: rgba(250, 204, 21, 0.35);
  background: radial-gradient(circle at 80% 0%, rgba(250, 204, 21, 0.14), transparent 60%), var(--bg-surface);
}
.eps-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.22rem 0.65rem;
  border-radius: 6px;
  background: rgba(250, 204, 21, 0.16);
  color: var(--gold);
  border: 1px solid rgba(250, 204, 21, 0.38);
  margin-bottom: 0.65rem;
}
.events-pass-spotlight h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 0.4rem;
}
.events-pass-spotlight p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 0.85rem;
}
.eps-perks {
  margin-bottom: 1rem;
  font-size: 0.85rem;
}
.events-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.35rem;
}
.events-toolbar h2 {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.8vw, 2rem);
  margin: 0.15rem 0 0;
}
.events-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.ev-pill {
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  transition: all 0.18s ease;
}
.ev-pill:hover {
  color: var(--text-main);
  border-color: var(--border-strong);
}
.ev-pill.active {
  background: rgba(250, 204, 21, 0.16);
  border-color: rgba(250, 204, 21, 0.55);
  color: var(--gold);
}
.events-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.event-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, border-color 0.2s ease;
}
.event-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}
.event-card-media {
  position: relative;
  height: 195px;
  overflow: hidden;
  background: var(--bg-deep);
}
.event-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.event-status-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.24rem 0.65rem;
  border-radius: 6px;
  background: rgba(13, 21, 34, 0.88);
  border: 1px solid rgba(56, 216, 100, 0.5);
  color: var(--emerald);
}
.event-status-badge.upcoming {
  border-color: rgba(250, 204, 21, 0.55);
  color: var(--gold);
}
.event-card-body {
  padding: 1.25rem 1.35rem 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.event-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}
.event-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
}
.event-loc-code {
  font-size: 0.75rem;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  padding: 0.14rem 0.48rem;
  border-radius: 6px;
  color: var(--text-muted);
}
.event-card-body h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 0.45rem;
}
.event-card-body p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}
.event-rewards-box {
  margin-top: auto;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}
.event-rewards-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-bottom: 0.45rem;
}
.event-rewards-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.35rem;
}
.event-rewards-box li {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.83rem;
  color: #dce6f7;
}
.event-rewards-box li svg {
  color: var(--emerald);
  flex-shrink: 0;
  margin-top: 0.18rem;
}
.events-schedule-card {
  padding: 1.6rem 1.8rem;
  margin-bottom: 1.5rem;
}
.events-schedule-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}
.events-schedule-head h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  margin: 0.15rem 0 0.3rem;
}
.events-schedule-head p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}
.events-table-wrap {
  overflow-x: auto;
}
.events-schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.events-schedule-table th,
.events-schedule-table td {
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border);
}
.events-schedule-table th {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.ev-day-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  font-size: 0.82rem;
}
.ev-cat-tag {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(250, 204, 21, 0.14);
  color: var(--gold);
}
.ev-desc-cell {
  color: var(--text-muted);
  font-size: 0.86rem;
}
.events-rules-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.event-rule-box h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
}
.event-rule-box p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
}

/* =========================================================
   LEADERBOARD PAGE (/leaderboard)
   ========================================================= */
.lb-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.4rem;
}
.lb-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.58rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.18s ease;
}
.lb-tab-btn:hover {
  color: var(--text-main);
  border-color: var(--border-strong);
}
.lb-tab-btn.active {
  background: linear-gradient(180deg, rgba(250, 204, 21, 0.2) 0%, rgba(250, 204, 21, 0.1) 100%);
  border-color: rgba(250, 204, 21, 0.65);
  color: #fef08a;
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.2);
}
.lb-tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.lb-podium-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
  margin-bottom: 1.5rem;
}
.lb-podium-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.3rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: transform 0.18s ease, border-color 0.2s ease;
}
.lb-podium-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}
.lb-podium-card.place-1 {
  border-color: rgba(250, 204, 21, 0.55);
  background: radial-gradient(circle at 20% 0%, rgba(250, 204, 21, 0.16), transparent 65%), var(--bg-card);
}
.lb-podium-card.place-2 {
  border-color: rgba(203, 213, 225, 0.45);
  background: radial-gradient(circle at 20% 0%, rgba(203, 213, 225, 0.12), transparent 65%), var(--bg-card);
}
.lb-podium-card.place-3 {
  border-color: rgba(217, 119, 6, 0.5);
  background: radial-gradient(circle at 20% 0%, rgba(217, 119, 6, 0.14), transparent 65%), var(--bg-card);
}
.lb-podium-rank-badge {
  position: absolute;
  top: 10px;
  right: 12px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-muted);
}
.lb-podium-card.place-1 .lb-podium-rank-badge { color: var(--gold); }
.lb-podium-card.place-2 .lb-podium-rank-badge { color: #e2e8f0; }
.lb-podium-card.place-3 .lb-podium-rank-badge { color: #f59e0b; }
.lb-podium-art {
  width: 74px;
  height: 126px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.35rem;
}
.lb-podium-art img {
  max-height: 112px;
  width: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.5));
}
.lb-podium-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}
.lb-podium-tag {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.lb-podium-info h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0;
  overflow-wrap: anywhere;
}
.lb-podium-stat {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--gold);
}
.lb-podium-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.lb-table-card {
  padding: 1.5rem 1.7rem;
}
.lb-table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.15rem;
}
.lb-table-toolbar h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 0.2rem;
}
.lb-table-toolbar p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0;
}
.lb-search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.42rem 0.75rem;
  color: var(--text-muted);
  min-width: 240px;
}
.lb-search-box input {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  width: 100%;
}
.lb-search-box input:focus {
  outline: none;
}
.lb-table-wrap {
  overflow-x: auto;
}
.lb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.lb-table th,
.lb-table td {
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border);
}
.lb-table th {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.lb-rank-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 0.22rem 0.5rem;
  border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.84rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}
.lb-rank-pill.rank-1 {
  background: rgba(250, 204, 21, 0.18);
  color: var(--gold);
  border: 1px solid rgba(250, 204, 21, 0.45);
}
.lb-rank-pill.rank-2 {
  background: rgba(226, 232, 240, 0.14);
  color: #f1f5f9;
  border: 1px solid rgba(226, 232, 240, 0.35);
}
.lb-rank-pill.rank-3 {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.lb-player-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.lb-player-cell img {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  image-rendering: pixelated;
}
.lb-player-cell strong {
  display: block;
  color: var(--text-main);
}
.lb-player-cell span {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
}
.lb-town-chip {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}
.lb-detail-cell {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.lb-metric-val {
  font-family: var(--font-display);
  font-size: 1rem;
  color: #fef08a;
}

@media (max-width: 1100px) {
  .team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .events-rules-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lb-podium-grid { grid-template-columns: 1fr; }
  .nav-links, .nav-group { gap: 0.65rem; }
}
@media (max-width: 980px) {
  .mobile-menu-btn { display: flex; }
  .nav-links { display: none; position: absolute; top: 74px; left: 0; right: 0; background: var(--bg-surface); border-bottom: 1px solid var(--border); flex-direction: column; align-items: stretch; padding: 1rem 4%; gap: 0.45rem; box-shadow: 0 18px 36px rgba(0, 0, 0, 0.55); }
  .nav-links.open { display: flex; }
  .nav-group { flex-direction: column; align-items: stretch; gap: 0.35rem; }
  .nav-links a { padding: 0.6rem 0.8rem; border-radius: 8px; }
  .nav-links a.nav-store-pill { text-align: center; }
  .nav-mobile-only { display: block; }
  .guides-grid, .events-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guides-layout, .legal-layout, .charpage-layout, .thankyou-layout, .player-landing, .events-hero-grid { grid-template-columns: 1fr; }
  .guides-side, .legal-side, .charpage-card { position: static; }
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .guides-grid, .team-grid, .events-cards-grid, .events-rules-grid { grid-template-columns: 1fr; }
  .guide-article, .legal-content, .thankyou-card, .events-schedule-card, .lb-table-card { padding: 1.2rem; }
  .player-search, .lb-search-box { width: 100%; flex-wrap: wrap; }
  .player-search .btn { width: 100%; }
}
